From 48663c562f3b70d7d51e5dfcd21705e16b86b471 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Sat, 13 Jul 2019 12:21:47 -0700 Subject: [PATCH] New upstream version 1.36.0+dfsg1 --- Cargo.lock | 719 +- Cargo.toml | 1 + README.md | 28 +- RELEASES.md | 106 +- config.toml.example | 2 +- git-commit-hash | 2 +- src/bootstrap/Cargo.toml | 11 +- src/bootstrap/bin/rustc.rs | 6 +- src/bootstrap/bootstrap.py | 13 +- src/bootstrap/builder.rs | 28 +- src/bootstrap/cache.rs | 2 + src/bootstrap/channel.rs | 2 +- src/bootstrap/clean.rs | 2 + src/bootstrap/compile.rs | 5 +- src/bootstrap/config.rs | 2 + src/bootstrap/dist.rs | 3 +- src/bootstrap/doc.rs | 10 +- src/bootstrap/install.rs | 2 + src/bootstrap/lib.rs | 19 +- src/bootstrap/metadata.rs | 1 + src/bootstrap/native.rs | 14 +- src/bootstrap/sanity.rs | 7 +- src/bootstrap/test.rs | 54 +- src/bootstrap/tool.rs | 53 +- src/bootstrap/toolstate.rs | 2 + src/bootstrap/util.rs | 2 + src/build_helper/lib.rs | 2 +- src/ci/docker/arm-android/Dockerfile | 16 +- src/ci/docker/arm-android/android-sdk.lock | 6 + src/ci/docker/dist-aarch64-linux/Dockerfile | 5 +- .../dist-various-1/install-x86_64-redox.sh | 1 - src/ci/docker/dist-various-2/Dockerfile | 18 +- .../dist-various-2/build-fuchsia-toolchain.sh | 4 +- .../dist-various-2/build-wasi-toolchain.sh | 2 +- src/ci/docker/dist-x86_64-linux/build-gcc.sh | 1 + src/ci/docker/dist-x86_64-musl/Dockerfile | 19 +- src/ci/docker/scripts/android-sdk-manager.py | 190 + src/ci/docker/scripts/android-sdk.sh | 81 +- src/ci/docker/scripts/musl-toolchain.sh | 10 +- src/ci/docker/scripts/sccache.sh | 2 - src/ci/docker/x86_64-gnu-debug/Dockerfile | 2 +- src/ci/docker/x86_64-gnu/Dockerfile | 2 +- src/doc/book/.travis.yml | 2 +- src/doc/book/2018-edition/src/appendix-00.md | 2 +- .../2018-edition/src/appendix-01-keywords.md | 2 +- .../2018-edition/src/appendix-02-operators.md | 2 +- .../src/appendix-03-derivable-traits.md | 2 +- .../appendix-04-useful-development-tools.md | 2 +- .../2018-edition/src/appendix-05-editions.md | 2 +- .../src/appendix-06-translation.md | 2 +- .../src/appendix-07-nightly-rust.md | 2 +- .../2018-edition/src/ch00-00-introduction.md | 2 +- .../src/ch01-00-getting-started.md | 2 +- .../2018-edition/src/ch01-01-installation.md | 2 +- .../2018-edition/src/ch01-02-hello-world.md | 2 +- .../2018-edition/src/ch01-03-hello-cargo.md | 2 +- .../src/ch02-00-guessing-game-tutorial.md | 2 +- .../ch03-00-common-programming-concepts.md | 2 +- .../src/ch03-01-variables-and-mutability.md | 2 +- .../2018-edition/src/ch03-02-data-types.md | 2 +- .../src/ch03-03-how-functions-work.md | 2 +- .../book/2018-edition/src/ch03-04-comments.md | 2 +- .../2018-edition/src/ch03-05-control-flow.md | 2 +- .../src/ch04-00-understanding-ownership.md | 2 +- .../src/ch04-01-what-is-ownership.md | 2 +- .../src/ch04-02-references-and-borrowing.md | 2 +- .../book/2018-edition/src/ch04-03-slices.md | 2 +- .../book/2018-edition/src/ch05-00-structs.md | 2 +- .../src/ch05-01-defining-structs.md | 2 +- .../src/ch05-02-example-structs.md | 2 +- .../2018-edition/src/ch05-03-method-syntax.md | 2 +- .../book/2018-edition/src/ch06-00-enums.md | 2 +- .../src/ch06-01-defining-an-enum.md | 2 +- .../book/2018-edition/src/ch06-02-match.md | 2 +- .../book/2018-edition/src/ch06-03-if-let.md | 2 +- .../src/ch08-00-common-collections.md | 2 +- .../book/2018-edition/src/ch08-01-vectors.md | 2 +- .../book/2018-edition/src/ch08-02-strings.md | 2 +- .../2018-edition/src/ch08-03-hash-maps.md | 2 +- .../src/ch09-00-error-handling.md | 2 +- ...ch09-01-unrecoverable-errors-with-panic.md | 2 +- .../ch09-02-recoverable-errors-with-result.md | 2 +- .../src/ch09-03-to-panic-or-not-to-panic.md | 2 +- .../book/2018-edition/src/ch10-00-generics.md | 2 +- .../book/2018-edition/src/ch10-01-syntax.md | 2 +- .../book/2018-edition/src/ch10-02-traits.md | 2 +- .../src/ch10-03-lifetime-syntax.md | 2 +- .../book/2018-edition/src/ch11-00-testing.md | 2 +- .../2018-edition/src/ch11-01-writing-tests.md | 2 +- .../2018-edition/src/ch11-02-running-tests.md | 2 +- .../src/ch11-03-test-organization.md | 2 +- .../2018-edition/src/ch12-00-an-io-project.md | 2 +- ...h12-01-accepting-command-line-arguments.md | 2 +- .../src/ch12-02-reading-a-file.md | 2 +- ...improving-error-handling-and-modularity.md | 2 +- ...2-04-testing-the-librarys-functionality.md | 2 +- ...2-05-working-with-environment-variables.md | 2 +- ...-06-writing-to-stderr-instead-of-stdout.md | 2 +- .../src/ch13-00-functional-features.md | 2 +- .../book/2018-edition/src/ch13-01-closures.md | 2 +- .../2018-edition/src/ch13-02-iterators.md | 2 +- .../src/ch13-03-improving-our-io-project.md | 2 +- .../2018-edition/src/ch13-04-performance.md | 2 +- .../src/ch14-00-more-about-cargo.md | 2 +- .../src/ch14-01-release-profiles.md | 2 +- .../src/ch14-02-publishing-to-crates-io.md | 2 +- .../src/ch14-03-cargo-workspaces.md | 2 +- .../src/ch14-04-installing-binaries.md | 2 +- .../src/ch14-05-extending-cargo.md | 2 +- .../src/ch15-00-smart-pointers.md | 2 +- src/doc/book/2018-edition/src/ch15-01-box.md | 2 +- .../book/2018-edition/src/ch15-02-deref.md | 2 +- src/doc/book/2018-edition/src/ch15-03-drop.md | 2 +- src/doc/book/2018-edition/src/ch15-04-rc.md | 2 +- .../src/ch15-05-interior-mutability.md | 2 +- .../src/ch15-06-reference-cycles.md | 2 +- .../2018-edition/src/ch16-00-concurrency.md | 2 +- .../book/2018-edition/src/ch16-01-threads.md | 2 +- .../src/ch16-02-message-passing.md | 2 +- .../2018-edition/src/ch16-03-shared-state.md | 2 +- ...04-extensible-concurrency-sync-and-send.md | 2 +- src/doc/book/2018-edition/src/ch17-00-oop.md | 2 +- .../2018-edition/src/ch17-01-what-is-oo.md | 2 +- .../2018-edition/src/ch17-02-trait-objects.md | 2 +- .../src/ch17-03-oo-design-patterns.md | 2 +- .../book/2018-edition/src/ch18-00-patterns.md | 2 +- .../ch18-01-all-the-places-for-patterns.md | 2 +- .../2018-edition/src/ch18-02-refutability.md | 2 +- .../src/ch18-03-pattern-syntax.md | 2 +- .../src/ch19-00-advanced-features.md | 2 +- .../2018-edition/src/ch19-01-unsafe-rust.md | 2 +- .../src/ch19-03-advanced-traits.md | 2 +- .../src/ch19-04-advanced-types.md | 2 +- ...ch19-05-advanced-functions-and-closures.md | 2 +- .../book/2018-edition/src/ch19-06-macros.md | 2 +- .../src/ch20-00-final-project-a-web-server.md | 2 +- .../src/ch20-01-single-threaded.md | 2 +- .../2018-edition/src/ch20-02-multithreaded.md | 2 +- .../ch20-03-graceful-shutdown-and-cleanup.md | 2 +- src/doc/book/2018-edition/src/foreword.md | 2 +- src/doc/book/README.md | 4 +- src/doc/book/ci/dictionary.txt | 1 + src/doc/book/nostarch/chapter07.md | 1015 - .../chapter08-error-message-updates.md | 15 - .../book/nostarch/chapter08-listing-8-5.md | 13 - .../chapter09-error-message-updates.md | 47 - .../nostarch/chapter09-listing-9-2-update.md | 50 - .../nostarch/chapter09-listing-9-5-update.md | 21 - .../book/nostarch/chapter09-match-update.md | 39 - .../chapter09-read-to-string-update.md | 28 - .../chapter10-traits-as-parameters.md | 174 - src/doc/book/nostarch/updates.md | 32 + src/doc/book/nostarch/version-note.md | 9 - src/doc/book/redirects/lifetimes.md | 2 - .../src/ch19-02-advanced-lifetimes.md | 2 +- src/doc/book/src/SUMMARY.md | 1 - src/doc/book/src/appendix-06-translation.md | 2 +- src/doc/book/src/ch01-01-installation.md | 18 +- src/doc/book/src/ch03-02-data-types.md | 4 +- src/doc/book/src/ch04-03-slices.md | 8 +- ...ojects-with-packages-crates-and-modules.md | 2 +- .../book/src/ch07-01-packages-and-crates.md | 8 +- ...referring-to-an-item-in-the-module-tree.md | 13 +- ...g-paths-into-scope-with-the-use-keyword.md | 22 +- .../ch09-02-recoverable-errors-with-result.md | 12 +- src/doc/book/src/ch10-03-lifetime-syntax.md | 21 +- src/doc/book/src/ch12-00-an-io-project.md | 23 +- ...h12-01-accepting-command-line-arguments.md | 27 +- ...improving-error-handling-and-modularity.md | 72 +- ...2-04-testing-the-librarys-functionality.md | 31 +- src/doc/book/src/ch15-01-box.md | 2 +- .../book/src/ch15-05-interior-mutability.md | 40 +- src/doc/book/src/ch18-03-pattern-syntax.md | 16 +- src/doc/book/src/ch19-00-advanced-features.md | 1 - .../book/src/ch19-02-advanced-lifetimes.md | 458 - src/doc/book/src/ch19-03-advanced-traits.md | 56 +- src/doc/book/src/ch19-04-advanced-types.md | 20 +- ...ch19-05-advanced-functions-and-closures.md | 4 +- src/doc/book/src/ch19-06-macros.md | 40 +- src/doc/book/src/title-page.md | 33 +- .../documentation/new-editions-of-the-book.md | 36 +- .../src/rust-2018/edition-changes.md | 1 - .../controlling-panics-with-std-panic.md | 4 +- .../non-lexical-lifetimes.md | 8 +- .../rustup-for-managing-rust-versions.md | 2 +- ...e-container-types-support-trait-objects.md | 6 +- src/doc/embedded-book/src/intro/index.md | 2 +- src/doc/embedded-book/src/intro/install.md | 12 +- .../embedded-book/src/intro/install/linux.md | 56 +- .../embedded-book/src/intro/install/verify.md | 2 +- src/doc/embedded-book/src/start/qemu.md | 2 +- src/doc/nomicon/src/borrow-splitting.md | 10 +- src/doc/nomicon/src/checked-uninit.md | 4 +- src/doc/nomicon/src/lifetime-mismatch.md | 64 +- src/doc/nomicon/src/lifetimes.md | 109 +- src/doc/nomicon/src/phantom-data.md | 4 +- src/doc/nomicon/src/subtyping.md | 2 +- src/doc/nomicon/src/transmutes.md | 18 +- src/doc/nomicon/src/unchecked-uninit.md | 39 +- src/doc/nomicon/src/vec-alloc.md | 4 +- .../reference/src/attributes-redirect.html | 16 +- src/doc/reference/src/attributes/testing.md | 2 - src/doc/reference/src/const_eval.md | 2 +- .../reference/src/crates-and-source-files.md | 2 - src/doc/reference/src/destructors.md | 1 - src/doc/reference/src/expressions.md | 10 - .../reference/src/expressions/block-expr.md | 2 - .../reference/src/expressions/closure-expr.md | 1 - .../reference/src/expressions/loop-expr.md | 1 - .../reference/src/expressions/match-expr.md | 4 - .../src/expressions/method-call-expr.md | 1 - .../src/expressions/operator-expr.md | 2 +- .../reference/src/expressions/struct-expr.md | 1 - src/doc/reference/src/glossary.md | 1 - src/doc/reference/src/interior-mutability.md | 1 - .../reference/src/items/associated-items.md | 3 - src/doc/reference/src/items/constant-items.md | 1 - src/doc/reference/src/items/enumerations.md | 1 - src/doc/reference/src/items/extern-crates.md | 2 - .../reference/src/items/external-blocks.md | 4 +- src/doc/reference/src/items/functions.md | 2 - .../reference/src/items/implementations.md | 5 +- src/doc/reference/src/items/modules.md | 1 - src/doc/reference/src/items/traits.md | 2 - src/doc/reference/src/lifetime-elision.md | 2 - src/doc/reference/src/macro-ambiguity.md | 1 - src/doc/reference/src/macros.md | 4 +- src/doc/reference/src/paths.md | 8 +- src/doc/reference/src/procedural-macros.md | 3 - src/doc/reference/src/subtyping.md | 2 - src/doc/reference/src/tokens.md | 3 - src/doc/reference/src/unsafety.md | 1 - src/doc/robots.txt | 8 + src/doc/rust-by-example/src/SUMMARY.md | 1 + src/doc/rust-by-example/src/crates/lib.md | 2 +- .../rust-by-example/src/custom_types/enum.md | 6 +- src/doc/rust-by-example/src/expression.md | 7 +- .../rust-by-example/src/flow_control/for.md | 8 +- .../src/flow_control/if_else.md | 2 +- .../src/flow_control/if_let.md | 20 + .../destructuring/destructure_structures.md | 30 +- .../rust-by-example/src/flow_control/while.md | 2 +- .../rust-by-example/src/macros/designators.md | 6 +- src/doc/rust-by-example/src/macros/dsl.md | 2 +- src/doc/rust-by-example/src/meta/doc.md | 33 +- src/doc/rust-by-example/src/scope/borrow.md | 4 +- .../src/scope/lifetime/lifetime_bounds.md | 4 +- src/doc/rust-by-example/src/std/vec.md | 2 +- .../src/std_misc/file/read_lines.md | 44 + .../rust-by-example/src/types/inference.md | 5 +- src/doc/rustc-guide/.travis.yml | 2 + src/doc/rustc-guide/src/SUMMARY.md | 2 + .../moves_and_initialization/move_paths.md | 14 +- .../src/borrow_check/two_phase_borrows.md | 100 + .../rustc-guide/src/codegen/updating-llvm.md | 62 +- src/doc/rustc-guide/src/compiler-debugging.md | 24 +- src/doc/rustc-guide/src/compiler-team.md | 14 +- src/doc/rustc-guide/src/diag.md | 37 + src/doc/rustc-guide/src/diag/json-format.md | 0 src/doc/rustc-guide/src/hir.md | 4 +- .../rustc-guide/src/how-to-build-and-run.md | 17 +- .../query-evaluation-model-in-detail.md | 2 +- src/doc/rustc-guide/src/query.md | 76 +- .../rustc-guide/src/test-implementation.md | 18 +- .../src/traits/canonical-queries.md | 2 +- .../src/traits/canonicalization.md | 10 +- .../rustc-guide/src/traits/chalk-overview.md | 53 +- .../rustc-guide/src/traits/lowering-module.md | 17 +- .../rustc-guide/src/traits/lowering-rules.md | 6 +- src/doc/rustc-guide/src/traits/wf.md | 10 +- src/doc/rustc-guide/src/walkthrough.md | 2 + src/doc/rustc-ux-guidelines.md | 22 +- src/doc/rustc/src/command-line-arguments.md | 174 +- src/doc/rustc/src/lints/groups.md | 4 +- .../src/lints/listing/deny-by-default.md | 41 - src/doc/rustdoc/src/the-doc-attribute.md | 15 + src/doc/rustdoc/src/what-is-rustdoc.md | 20 +- src/doc/unstable-book/book.toml | 1 + .../src/library-features/borrow-state.md | 7 + src/etc/natvis/liballoc.natvis | 12 +- src/etc/natvis/libcore.natvis | 8 +- src/liballoc/Cargo.toml | 3 +- src/liballoc/alloc.rs | 19 + src/liballoc/borrow.rs | 1 + src/liballoc/boxed.rs | 5 +- src/liballoc/collections/binary_heap.rs | 67 + src/liballoc/collections/linked_list.rs | 50 +- src/liballoc/collections/vec_deque.rs | 47 +- src/liballoc/fmt.rs | 7 +- src/liballoc/lib.rs | 18 +- src/liballoc/macros.rs | 2 +- src/liballoc/prelude/mod.rs | 1 - src/liballoc/raw_vec.rs | 4 +- src/liballoc/rc.rs | 5 + src/liballoc/slice.rs | 10 + src/liballoc/str.rs | 13 +- src/liballoc/string.rs | 22 +- src/liballoc/sync.rs | 7 + src/liballoc/tests/binary_heap.rs | 2 +- src/liballoc/tests/btree/set.rs | 4 +- src/liballoc/tests/cow_str.rs | 24 +- src/liballoc/tests/lib.rs | 2 +- src/liballoc/tests/slice.rs | 21 +- src/liballoc/tests/string.rs | 4 +- src/liballoc/vec.rs | 14 +- src/libarena/lib.rs | 3 +- src/libcore/Cargo.toml | 1 + src/libcore/alloc.rs | 24 +- src/libcore/any.rs | 10 +- src/libcore/array.rs | 25 +- src/libcore/ascii.rs | 8 +- src/libcore/benches/lib.rs | 1 - src/libcore/cell.rs | 70 +- src/libcore/char/convert.rs | 14 +- src/libcore/char/decode.rs | 5 +- src/libcore/char/methods.rs | 9 +- src/libcore/char/mod.rs | 20 +- src/libcore/clone.rs | 4 +- src/libcore/cmp.rs | 10 +- src/libcore/convert.rs | 42 +- src/libcore/ffi.rs | 12 +- src/libcore/fmt/builders.rs | 4 +- src/libcore/fmt/float.rs | 34 +- src/libcore/fmt/mod.rs | 146 +- src/libcore/fmt/num.rs | 24 +- src/libcore/future/future.rs | 47 +- src/libcore/future/mod.rs | 5 +- src/libcore/hash/mod.rs | 35 +- src/libcore/hash/sip.rs | 10 +- src/libcore/hint.rs | 9 +- src/libcore/internal_macros.rs | 10 +- src/libcore/intrinsics.rs | 14 +- src/libcore/iter/adapters/chain.rs | 6 +- src/libcore/iter/adapters/flatten.rs | 10 +- src/libcore/iter/adapters/mod.rs | 64 +- src/libcore/iter/adapters/zip.rs | 3 +- src/libcore/iter/mod.rs | 4 +- src/libcore/iter/range.rs | 10 +- src/libcore/iter/sources.rs | 14 +- src/libcore/iter/traits/accum.rs | 4 +- src/libcore/iter/traits/double_ended.rs | 4 +- src/libcore/iter/traits/exact_size.rs | 1 - src/libcore/iter/traits/iterator.rs | 40 +- src/libcore/lib.rs | 7 +- src/libcore/macros.rs | 22 +- src/libcore/marker.rs | 14 +- src/libcore/mem.rs | 471 +- src/libcore/num/bignum.rs | 60 +- src/libcore/num/dec2flt/algorithm.rs | 14 +- src/libcore/num/dec2flt/mod.rs | 14 +- src/libcore/num/dec2flt/num.rs | 4 +- src/libcore/num/dec2flt/parse.rs | 2 +- src/libcore/num/dec2flt/rawfp.rs | 18 +- src/libcore/num/f32.rs | 4 +- src/libcore/num/f64.rs | 4 +- src/libcore/num/flt2dec/decoder.rs | 7 +- src/libcore/num/flt2dec/mod.rs | 2 +- src/libcore/num/flt2dec/strategy/dragon.rs | 10 +- src/libcore/num/flt2dec/strategy/grisu.rs | 8 +- src/libcore/num/mod.rs | 385 +- src/libcore/num/wrapping.rs | 2 +- src/libcore/ops/arith.rs | 28 +- src/libcore/ops/mod.rs | 4 +- src/libcore/ops/range.rs | 16 +- src/libcore/ops/unsize.rs | 3 +- src/libcore/option.rs | 42 +- src/libcore/panic.rs | 12 +- src/libcore/panicking.rs | 8 +- src/libcore/pin.rs | 78 +- src/libcore/prelude/v1.rs | 22 +- src/libcore/ptr.rs | 83 +- src/libcore/raw.rs | 4 +- src/libcore/result.rs | 12 +- src/libcore/slice/memchr.rs | 6 +- src/libcore/slice/mod.rs | 121 +- src/libcore/slice/rotate.rs | 6 +- src/libcore/slice/sort.rs | 6 +- src/libcore/str/lossy.rs | 15 +- src/libcore/str/mod.rs | 81 +- src/libcore/str/pattern.rs | 10 +- src/libcore/sync/atomic.rs | 18 +- src/libcore/task/mod.rs | 6 +- src/libcore/task/poll.rs | 24 +- src/libcore/task/wake.rs | 127 +- src/libcore/tests/alloc.rs | 10 + src/libcore/tests/cell.rs | 20 +- src/libcore/tests/fmt/builders.rs | 50 +- src/libcore/tests/iter.rs | 22 +- src/libcore/tests/lib.rs | 8 +- src/libcore/tests/num/bignum.rs | 1 - src/libcore/tests/num/flt2dec/estimator.rs | 1 - src/libcore/tests/num/flt2dec/mod.rs | 1 - src/libcore/tests/num/flt2dec/random.rs | 1 - .../tests/num/flt2dec/strategy/dragon.rs | 1 - .../tests/num/flt2dec/strategy/grisu.rs | 1 - src/libcore/tests/num/int_macros.rs | 28 +- src/libcore/tests/num/uint_macros.rs | 3 +- src/libcore/tests/slice.rs | 17 +- src/libcore/time.rs | 14 +- src/libcore/tuple.rs | 4 +- src/libcore/unicode/mod.rs | 6 +- src/libcore/unicode/tables.rs | 4 +- src/libcore/unit.rs | 2 +- src/libfmt_macros/lib.rs | 2 +- src/libpanic_unwind/lib.rs | 2 - src/libproc_macro/bridge/rpc.rs | 36 +- src/libprofiler_builtins/build.rs | 13 + src/librustc/Cargo.toml | 7 +- src/librustc/arena.rs | 256 + src/librustc/cfg/construct.rs | 42 +- src/librustc/dep_graph/graph.rs | 26 +- .../{diagnostics.rs => error_codes.rs} | 38 +- src/librustc/hir/check_attr.rs | 39 +- src/librustc/hir/def.rs | 306 +- src/librustc/hir/def_id.rs | 101 +- src/librustc/hir/intravisit.rs | 24 +- src/librustc/hir/lowering.rs | 1534 +- src/librustc/hir/map/blocks.rs | 18 +- src/librustc/hir/map/collector.rs | 42 +- src/librustc/hir/map/def_collector.rs | 106 +- src/librustc/hir/map/definitions.rs | 233 +- src/librustc/hir/map/mod.rs | 594 +- src/librustc/hir/mod.rs | 151 +- src/librustc/hir/pat_util.rs | 12 +- src/librustc/hir/print.rs | 173 +- src/librustc/ich/hcx.rs | 3 +- src/librustc/ich/impls_hir.rs | 22 +- src/librustc/ich/impls_syntax.rs | 44 +- src/librustc/ich/mod.rs | 20 +- src/librustc/infer/at.rs | 15 + src/librustc/infer/canonical/canonicalizer.rs | 89 +- src/librustc/infer/canonical/mod.rs | 54 +- .../infer/canonical/query_response.rs | 32 +- src/librustc/infer/canonical/substitute.rs | 9 +- src/librustc/infer/combine.rs | 96 +- src/librustc/infer/equate.rs | 48 +- src/librustc/infer/error_reporting/mod.rs | 51 +- .../infer/error_reporting/need_type_info.rs | 54 +- .../nice_region_error/different_lifetimes.rs | 15 +- .../nice_region_error/named_anon_conflict.rs | 9 +- .../nice_region_error/outlives_closure.rs | 1 - .../nice_region_error/placeholder_error.rs | 2 +- .../error_reporting/nice_region_error/util.rs | 2 +- src/librustc/infer/error_reporting/note.rs | 4 +- src/librustc/infer/freshen.rs | 121 +- src/librustc/infer/fudge.rs | 48 +- src/librustc/infer/glb.rs | 13 + src/librustc/infer/higher_ranked/mod.rs | 15 +- .../infer/lexical_region_resolve/graphviz.rs | 4 +- .../infer/lexical_region_resolve/mod.rs | 12 +- src/librustc/infer/lub.rs | 13 + src/librustc/infer/mod.rs | 556 +- src/librustc/infer/nll_relate/mod.rs | 43 +- src/librustc/infer/opaque_types/mod.rs | 202 +- src/librustc/infer/resolve.rs | 73 +- src/librustc/infer/sub.rs | 48 +- src/librustc/infer/type_variable.rs | 5 +- src/librustc/infer/unify_key.rs | 122 +- src/librustc/lib.rs | 8 +- src/librustc/lint/builtin.rs | 96 +- src/librustc/lint/context.rs | 75 +- src/librustc/lint/internal.rs | 138 +- src/librustc/lint/levels.rs | 10 +- src/librustc/lint/mod.rs | 55 +- src/librustc/macros.rs | 1 - src/librustc/middle/cstore.rs | 1 + src/librustc/middle/dead.rs | 49 +- src/librustc/middle/entry.rs | 10 +- src/librustc/middle/exported_symbols.rs | 8 +- src/librustc/middle/expr_use_visitor.rs | 65 +- src/librustc/middle/free_region.rs | 1 - src/librustc/middle/intrinsicck.rs | 10 +- src/librustc/middle/lang_items.rs | 99 +- src/librustc/middle/lib_features.rs | 14 +- src/librustc/middle/liveness.rs | 86 +- src/librustc/middle/mem_categorization.rs | 89 +- src/librustc/middle/reachable.rs | 24 +- src/librustc/middle/recursion_limit.rs | 7 +- src/librustc/middle/region.rs | 39 +- src/librustc/middle/resolve_lifetime.rs | 128 +- src/librustc/middle/stability.rs | 29 +- src/librustc/middle/weak_lang_items.rs | 6 +- src/librustc/mir/interpret/allocation.rs | 73 +- src/librustc/mir/interpret/error.rs | 12 +- src/librustc/mir/interpret/pointer.rs | 10 +- src/librustc/mir/interpret/value.rs | 43 +- src/librustc/mir/mod.rs | 365 +- src/librustc/mir/mono.rs | 10 +- src/librustc/mir/tcx.rs | 55 +- src/librustc/mir/visit.rs | 183 +- src/librustc/query/mod.rs | 60 +- src/librustc/session/code_stats.rs | 8 +- src/librustc/session/config.rs | 292 +- src/librustc/session/mod.rs | 110 +- src/librustc/session/search_paths.rs | 1 - src/librustc/traits/auto_trait.rs | 100 +- src/librustc/traits/codegen/mod.rs | 10 +- src/librustc/traits/coherence.rs | 9 +- src/librustc/traits/error_reporting.rs | 30 +- src/librustc/traits/fulfill.rs | 8 +- src/librustc/traits/mod.rs | 12 +- src/librustc/traits/object_safety.rs | 5 +- src/librustc/traits/on_unimplemented.rs | 11 +- src/librustc/traits/project.rs | 15 +- src/librustc/traits/query/dropck_outlives.rs | 2 +- .../traits/query/evaluate_obligation.rs | 2 +- src/librustc/traits/select.rs | 533 +- src/librustc/traits/specialize/mod.rs | 52 +- .../traits/specialize/specialization_graph.rs | 13 +- src/librustc/traits/structural_impls.rs | 20 +- src/librustc/traits/util.rs | 2 +- src/librustc/ty/_match.rs | 28 +- src/librustc/ty/adjustment.rs | 53 +- src/librustc/ty/codec.rs | 56 + src/librustc/ty/constness.rs | 7 + src/librustc/ty/context.rs | 242 +- src/librustc/ty/erase_regions.rs | 2 +- src/librustc/ty/error.rs | 5 + src/librustc/ty/flags.rs | 7 +- src/librustc/ty/fold.rs | 146 +- .../ty/inhabitedness/def_id_forest.rs | 1 - src/librustc/ty/inhabitedness/mod.rs | 25 +- src/librustc/ty/layout.rs | 657 +- src/librustc/ty/mod.rs | 165 +- src/librustc/ty/print/mod.rs | 2 +- src/librustc/ty/print/pretty.rs | 53 +- src/librustc/ty/query/config.rs | 4 +- src/librustc/ty/query/mod.rs | 3 +- src/librustc/ty/query/on_disk_cache.rs | 12 +- src/librustc/ty/query/plumbing.rs | 67 +- src/librustc/ty/query/values.rs | 4 +- src/librustc/ty/relate.rs | 108 +- src/librustc/ty/structural_impls.rs | 51 +- src/librustc/ty/sty.rs | 187 +- src/librustc/ty/subst.rs | 100 +- src/librustc/ty/trait_def.rs | 7 +- src/librustc/ty/util.rs | 73 +- src/librustc/ty/walk.rs | 2 +- src/librustc/ty/wf.rs | 4 +- src/librustc/util/common.rs | 3 +- src/librustc/util/profiling.rs | 531 +- src/librustc_allocator/expand.rs | 15 +- src/librustc_allocator/lib.rs | 2 +- src/librustc_apfloat/tests/ieee.rs | 2 + src/librustc_asan/Cargo.toml | 2 +- .../borrowck/gather_loans/lifetime.rs | 2 +- src/librustc_borrowck/borrowck/mod.rs | 12 +- src/librustc_borrowck/borrowck/unused.rs | 116 - .../{diagnostics.rs => error_codes.rs} | 0 src/librustc_borrowck/lib.rs | 2 +- src/librustc_codegen_llvm/abi.rs | 393 +- src/librustc_codegen_llvm/attributes.rs | 6 +- src/librustc_codegen_llvm/back/archive.rs | 94 +- src/librustc_codegen_llvm/back/bytecode.rs | 2 - src/librustc_codegen_llvm/back/link.rs | 1494 -- src/librustc_codegen_llvm/back/lto.rs | 14 +- src/librustc_codegen_llvm/back/write.rs | 72 +- src/librustc_codegen_llvm/base.rs | 40 +- src/librustc_codegen_llvm/builder.rs | 13 + src/librustc_codegen_llvm/common.rs | 2 +- src/librustc_codegen_llvm/consts.rs | 3 +- src/librustc_codegen_llvm/context.rs | 11 +- src/librustc_codegen_llvm/debuginfo/gdb.rs | 4 +- .../debuginfo/metadata.rs | 385 +- src/librustc_codegen_llvm/debuginfo/mod.rs | 11 +- src/librustc_codegen_llvm/declare.rs | 4 +- .../{diagnostics.rs => error_codes.rs} | 0 src/librustc_codegen_llvm/intrinsic.rs | 4 +- src/librustc_codegen_llvm/lib.rs | 43 +- src/librustc_codegen_llvm/llvm/ffi.rs | 1 - src/librustc_codegen_llvm/llvm_util.rs | 135 +- src/librustc_codegen_llvm/metadata.rs | 4 +- src/librustc_codegen_llvm/type_.rs | 2 +- src/librustc_codegen_llvm/type_of.rs | 145 +- src/librustc_codegen_llvm/va_arg.rs | 1 - src/librustc_codegen_ssa/Cargo.toml | 1 + src/librustc_codegen_ssa/back/archive.rs | 23 +- src/librustc_codegen_ssa/back/link.rs | 1449 +- src/librustc_codegen_ssa/back/linker.rs | 10 + src/librustc_codegen_ssa/back/mod.rs | 2 + .../back/rpath.rs | 0 .../back/symbol_export.rs | 2 +- .../back/wasm.rs | 0 src/librustc_codegen_ssa/back/write.rs | 69 +- src/librustc_codegen_ssa/base.rs | 57 +- .../{debuginfo.rs => debuginfo/mod.rs} | 2 + .../debuginfo/type_names.rs | 63 +- .../{diagnostics.rs => error_codes.rs} | 0 src/librustc_codegen_ssa/lib.rs | 7 +- src/librustc_codegen_ssa/mir/analyze.rs | 23 +- src/librustc_codegen_ssa/mir/block.rs | 24 +- src/librustc_codegen_ssa/mir/mod.rs | 64 +- src/librustc_codegen_ssa/mir/operand.rs | 1 + src/librustc_codegen_ssa/mir/place.rs | 24 +- src/librustc_codegen_ssa/mir/rvalue.rs | 35 +- src/librustc_codegen_ssa/mono_item.rs | 13 +- src/librustc_codegen_ssa/traits/abi.rs | 8 +- src/librustc_codegen_ssa/traits/backend.rs | 7 +- src/librustc_codegen_ssa/traits/builder.rs | 6 +- src/librustc_codegen_ssa/traits/debuginfo.rs | 2 +- src/librustc_codegen_ssa/traits/mod.rs | 13 +- src/librustc_codegen_utils/codegen_backend.rs | 4 +- src/librustc_codegen_utils/lib.rs | 5 +- src/librustc_codegen_utils/link.rs | 5 +- src/librustc_codegen_utils/symbol_names.rs | 12 +- .../symbol_names_test.rs | 6 +- src/librustc_data_structures/Cargo.toml | 6 +- src/librustc_data_structures/bit_set.rs | 4 +- src/librustc_data_structures/flock.rs | 1 - .../graph/dominators/mod.rs | 47 - src/librustc_data_structures/jobserver.rs | 128 +- src/librustc_data_structures/macros.rs | 9 + .../owning_ref/mod.rs | 12 +- src/librustc_data_structures/stable_hasher.rs | 54 +- src/librustc_driver/Cargo.toml | 2 +- src/librustc_driver/lib.rs | 11 +- src/librustc_driver/pretty.rs | 28 +- src/librustc_errors/diagnostic_builder.rs | 14 +- src/librustc_errors/emitter.rs | 87 +- src/librustc_errors/lib.rs | 52 +- .../assert_module_sources.rs | 9 +- src/librustc_incremental/lib.rs | 2 +- .../persist/dirty_clean.rs | 15 +- src/librustc_interface/Cargo.toml | 4 +- src/librustc_interface/interface.rs | 8 +- src/librustc_interface/lib.rs | 2 +- src/librustc_interface/passes.rs | 104 +- src/librustc_interface/proc_macro_decls.rs | 3 +- src/librustc_interface/util.rs | 34 +- src/librustc_lint/builtin.rs | 120 +- .../{diagnostics.rs => error_codes.rs} | 0 src/librustc_lint/lib.rs | 28 +- src/librustc_lint/nonstandard_style.rs | 11 +- src/librustc_lint/types.rs | 596 +- src/librustc_lint/unused.rs | 66 +- src/librustc_lsan/Cargo.toml | 2 +- src/librustc_macros/src/lib.rs | 6 + src/librustc_macros/src/query.rs | 2 +- src/librustc_macros/src/symbols.rs | 182 + src/librustc_metadata/creader.rs | 50 +- src/librustc_metadata/cstore.rs | 7 +- src/librustc_metadata/cstore_impl.rs | 28 +- src/librustc_metadata/decoder.rs | 136 +- src/librustc_metadata/encoder.rs | 41 +- .../{diagnostics.rs => error_codes.rs} | 0 src/librustc_metadata/index.rs | 139 +- src/librustc_metadata/index_builder.rs | 6 +- src/librustc_metadata/lib.rs | 4 +- src/librustc_metadata/link_args.rs | 5 +- src/librustc_metadata/locator.rs | 15 +- src/librustc_metadata/native_libs.rs | 20 +- src/librustc_metadata/schema.rs | 2 +- src/librustc_mir/Cargo.toml | 2 +- src/librustc_mir/borrow_check/borrow_set.rs | 29 +- .../borrow_check/error_reporting.rs | 198 +- src/librustc_mir/borrow_check/flows.rs | 2 +- src/librustc_mir/borrow_check/mod.rs | 469 +- src/librustc_mir/borrow_check/move_errors.rs | 14 +- .../borrow_check/mutability_errors.rs | 21 +- .../borrow_check/nll/constraint_generation.rs | 15 +- .../nll/explain_borrow/find_use.rs | 2 +- .../borrow_check/nll/explain_borrow/mod.rs | 34 +- src/librustc_mir/borrow_check/nll/facts.rs | 12 - .../borrow_check/nll/invalidation.rs | 107 +- src/librustc_mir/borrow_check/nll/mod.rs | 10 +- .../borrow_check/nll/region_infer/dump_mir.rs | 1 - .../nll/region_infer/error_reporting/mod.rs | 32 +- .../error_reporting/region_name.rs | 99 +- .../region_infer/error_reporting/var_name.rs | 9 +- .../borrow_check/nll/region_infer/mod.rs | 14 +- .../nll/type_check/liveness/local_use_map.rs | 2 +- .../nll/type_check/liveness/mod.rs | 5 +- .../nll/type_check/liveness/trace.rs | 9 +- .../borrow_check/nll/type_check/mod.rs | 387 +- .../borrow_check/nll/type_check/relate_tys.rs | 4 +- .../borrow_check/nll/universal_regions.rs | 8 +- src/librustc_mir/borrow_check/path_utils.rs | 12 +- src/librustc_mir/borrow_check/place_ext.rs | 19 +- .../borrow_check/places_conflict.rs | 460 +- src/librustc_mir/borrow_check/used_muts.rs | 6 +- src/librustc_mir/build/expr/as_place.rs | 13 +- src/librustc_mir/build/expr/as_rvalue.rs | 52 +- src/librustc_mir/build/expr/category.rs | 9 +- src/librustc_mir/build/expr/into.rs | 47 +- src/librustc_mir/build/matches/mod.rs | 101 +- src/librustc_mir/build/matches/test.rs | 18 +- src/librustc_mir/build/mod.rs | 66 +- src/librustc_mir/const_eval.rs | 99 +- .../dataflow/impls/borrowed_locals.rs | 4 +- src/librustc_mir/dataflow/impls/borrows.rs | 7 +- src/librustc_mir/dataflow/mod.rs | 18 +- src/librustc_mir/dataflow/move_paths/mod.rs | 77 +- .../{diagnostics.rs => error_codes.rs} | 134 +- src/librustc_mir/hair/cx/expr.rs | 207 +- src/librustc_mir/hair/cx/mod.rs | 7 +- src/librustc_mir/hair/mod.rs | 22 +- src/librustc_mir/hair/pattern/_match.rs | 31 +- src/librustc_mir/hair/pattern/check_match.rs | 30 +- src/librustc_mir/hair/pattern/mod.rs | 75 +- src/librustc_mir/interpret/cast.rs | 26 +- src/librustc_mir/interpret/eval_context.rs | 132 +- src/librustc_mir/interpret/machine.rs | 40 +- src/librustc_mir/interpret/memory.rs | 12 +- src/librustc_mir/interpret/operand.rs | 105 +- src/librustc_mir/interpret/place.rs | 180 +- src/librustc_mir/interpret/snapshot.rs | 17 +- src/librustc_mir/interpret/step.rs | 3 +- src/librustc_mir/interpret/terminator.rs | 45 +- src/librustc_mir/interpret/traits.rs | 18 +- src/librustc_mir/interpret/validity.rs | 41 +- src/librustc_mir/interpret/visitor.rs | 60 +- src/librustc_mir/lib.rs | 4 +- src/librustc_mir/monomorphize/collector.rs | 26 +- src/librustc_mir/monomorphize/item.rs | 46 +- src/librustc_mir/monomorphize/partitioning.rs | 48 +- src/librustc_mir/shim.rs | 12 +- src/librustc_mir/transform/add_retag.rs | 2 +- src/librustc_mir/transform/check_unsafety.rs | 58 +- .../transform/cleanup_post_borrowck.rs | 5 +- src/librustc_mir/transform/const_prop.rs | 370 +- src/librustc_mir/transform/copy_prop.rs | 10 +- src/librustc_mir/transform/deaggregator.rs | 20 +- src/librustc_mir/transform/erase_regions.rs | 5 +- src/librustc_mir/transform/generator.rs | 165 +- src/librustc_mir/transform/inline.rs | 21 +- src/librustc_mir/transform/mod.rs | 7 +- src/librustc_mir/transform/no_landing_pads.rs | 9 +- src/librustc_mir/transform/promote_consts.rs | 20 +- src/librustc_mir/transform/qualify_consts.rs | 160 +- .../transform/qualify_min_const_fn.rs | 29 +- src/librustc_mir/transform/rustc_peek.rs | 11 +- src/librustc_mir/transform/simplify.rs | 4 +- .../transform/uniform_array_move_out.rs | 8 +- src/librustc_mir/util/borrowck_errors.rs | 38 +- src/librustc_mir/util/collect_writes.rs | 2 +- src/librustc_mir/util/def_use.rs | 61 +- src/librustc_mir/util/elaborate_drops.rs | 135 +- src/librustc_mir/util/graphviz.rs | 7 +- src/librustc_mir/util/liveness.rs | 19 +- src/librustc_mir/util/mod.rs | 4 +- src/librustc_mir/util/pretty.rs | 151 +- src/librustc_msan/Cargo.toml | 2 +- src/librustc_passes/ast_validation.rs | 66 +- .../{diagnostics.rs => error_codes.rs} | 0 src/librustc_passes/layout_test.rs | 20 +- src/librustc_passes/lib.rs | 4 +- src/librustc_passes/rvalue_promotion.rs | 66 +- src/librustc_plugin/build.rs | 4 +- .../{diagnostics.rs => error_codes.rs} | 0 src/librustc_plugin/lib.rs | 7 +- src/librustc_plugin/load.rs | 11 +- src/librustc_plugin/registry.rs | 8 +- .../{diagnostics.rs => error_codes.rs} | 0 src/librustc_privacy/lib.rs | 105 +- src/librustc_resolve/Cargo.toml | 1 + src/librustc_resolve/build_reduced_graph.rs | 218 +- src/librustc_resolve/diagnostics.rs | 2475 +-- src/librustc_resolve/error_codes.rs | 1685 ++ src/librustc_resolve/error_reporting.rs | 573 - src/librustc_resolve/lib.rs | 1093 +- src/librustc_resolve/macros.rs | 177 +- src/librustc_resolve/resolve_imports.rs | 145 +- src/librustc_save_analysis/Cargo.toml | 7 +- src/librustc_save_analysis/dump_visitor.rs | 34 +- src/librustc_save_analysis/json_dumper.rs | 6 +- src/librustc_save_analysis/lib.rs | 116 +- src/librustc_save_analysis/sig.rs | 22 +- src/librustc_target/abi/mod.rs | 43 +- src/librustc_target/lib.rs | 2 +- src/librustc_target/spec/apple_base.rs | 25 +- src/librustc_target/spec/bitrig_base.rs | 16 - src/librustc_target/spec/i686_apple_darwin.rs | 8 +- src/librustc_target/spec/mod.rs | 5 +- ...{wasm32_unknown_wasi.rs => wasm32_wasi.rs} | 38 +- .../spec/x86_64_apple_darwin.rs | 10 +- .../spec/x86_64_unknown_bitrig.rs | 23 - src/librustc_traits/chalk_context/mod.rs | 7 +- .../chalk_context/program_clauses/builtin.rs | 193 +- .../chalk_context/program_clauses/mod.rs | 27 +- .../program_clauses/primitive.rs | 18 +- .../chalk_context/resolvent_ops.rs | 45 +- src/librustc_traits/dropck_outlives.rs | 5 +- src/librustc_traits/evaluate_obligation.rs | 2 +- src/librustc_traits/generic_types.rs | 19 +- .../implied_outlives_bounds.rs | 4 +- src/librustc_traits/lib.rs | 2 +- src/librustc_traits/lowering/mod.rs | 30 +- .../normalize_projection_ty.rs | 3 +- src/librustc_traits/type_op.rs | 17 +- src/librustc_tsan/Cargo.toml | 2 +- src/librustc_typeck/astconv.rs | 276 +- src/librustc_typeck/check/_match.rs | 598 +- src/librustc_typeck/check/callee.rs | 16 +- src/librustc_typeck/check/cast.rs | 2 +- src/librustc_typeck/check/closure.rs | 49 +- src/librustc_typeck/check/coercion.rs | 44 +- src/librustc_typeck/check/compare_method.rs | 21 +- src/librustc_typeck/check/demand.rs | 541 +- .../check/generator_interior.rs | 19 +- src/librustc_typeck/check/intrinsic.rs | 6 +- src/librustc_typeck/check/method/confirm.rs | 6 +- src/librustc_typeck/check/method/mod.rs | 30 +- src/librustc_typeck/check/method/probe.rs | 62 +- src/librustc_typeck/check/method/suggest.rs | 146 +- src/librustc_typeck/check/mod.rs | 610 +- src/librustc_typeck/check/op.rs | 178 +- src/librustc_typeck/check/regionck.rs | 3 +- src/librustc_typeck/check/upvar.rs | 49 +- src/librustc_typeck/check/wfcheck.rs | 37 +- src/librustc_typeck/check/writeback.rs | 148 +- src/librustc_typeck/check_unused.rs | 7 + src/librustc_typeck/coherence/builtin.rs | 15 +- .../coherence/inherent_impls_overlap.rs | 38 +- src/librustc_typeck/collect.rs | 147 +- .../constrained_generic_params.rs | 2 +- .../{diagnostics.rs => error_codes.rs} | 18 +- src/librustc_typeck/impl_wf_check.rs | 14 +- src/librustc_typeck/lib.rs | 19 +- src/librustc_typeck/outlives/mod.rs | 22 +- src/librustc_typeck/outlives/test.rs | 3 +- src/librustc_typeck/variance/constraints.rs | 34 +- src/librustc_typeck/variance/mod.rs | 8 +- src/librustc_typeck/variance/solve.rs | 38 +- src/librustc_typeck/variance/terms.rs | 2 +- src/librustc_typeck/variance/test.rs | 3 +- src/librustdoc/Cargo.toml | 4 +- src/librustdoc/clean/auto_trait.rs | 256 +- src/librustdoc/clean/blanket_impl.rs | 158 +- src/librustdoc/clean/cfg.rs | 33 +- src/librustdoc/clean/def_ctor.rs | 55 - src/librustdoc/clean/inline.rs | 56 +- src/librustdoc/clean/mod.rs | 451 +- src/librustdoc/config.rs | 58 +- src/librustdoc/core.rs | 192 +- src/librustdoc/externalfiles.rs | 9 +- src/librustdoc/html/format.rs | 4 +- src/librustdoc/html/highlight.rs | 2 + src/librustdoc/html/layout.rs | 10 +- src/librustdoc/html/markdown.rs | 198 +- src/librustdoc/html/render.rs | 247 +- .../html/static/FiraSans-LICENSE.txt | 11 +- .../html/static/FiraSans-Medium.woff | Bin 89883 -> 186824 bytes .../html/static/FiraSans-Regular.woff | Bin 91946 -> 183268 bytes .../html/static/SourceSerifPro-Bold.ttf.woff | Bin 93380 -> 93248 bytes .../html/static/SourceSerifPro-It.ttf.woff | Bin 36332 -> 36200 bytes ...-LICENSE.txt => SourceSerifPro-LICENSE.md} | 2 +- .../static/SourceSerifPro-Regular.ttf.woff | Bin 88724 -> 88596 bytes src/librustdoc/html/static/main.js | 18 +- src/librustdoc/html/static/rustdoc.css | 466 +- src/librustdoc/html/static/source-script.js | 34 +- src/librustdoc/html/static/themes/dark.css | 11 +- src/librustdoc/html/static/themes/light.css | 10 +- src/librustdoc/html/static_files.rs | 2 +- src/librustdoc/lib.rs | 13 +- src/librustdoc/markdown.rs | 19 +- .../passes/calculate_doc_coverage.rs | 3 +- .../passes/collect_intra_doc_links.rs | 231 +- src/librustdoc/passes/collect_trait_impls.rs | 32 +- src/librustdoc/passes/mod.rs | 49 +- src/librustdoc/passes/strip_hidden.rs | 3 +- src/librustdoc/test.rs | 88 +- src/librustdoc/visit_ast.rs | 83 +- src/librustdoc/visit_lib.rs | 15 +- src/libserialize/serialize.rs | 11 +- src/libserialize/tests/json.rs | 1 + src/libserialize/tests/opaque.rs | 1 + src/libstd/Cargo.toml | 7 +- src/libstd/alloc.rs | 5 + src/libstd/build.rs | 3 +- src/libstd/collections/hash/map.rs | 1664 +- src/libstd/collections/hash/mod.rs | 9 - src/libstd/collections/hash/set.rs | 140 +- src/libstd/collections/hash/table.rs | 1131 - src/libstd/collections/mod.rs | 7 +- src/libstd/env.rs | 9 +- src/libstd/error.rs | 30 +- src/libstd/ffi/c_str.rs | 9 +- src/libstd/ffi/os_str.rs | 2 + src/libstd/fs.rs | 31 +- src/libstd/future.rs | 1 + src/libstd/io/buffered.rs | 27 +- src/libstd/io/cursor.rs | 83 +- src/libstd/io/impls.rs | 18 +- src/libstd/io/mod.rs | 75 +- src/libstd/io/stdio.rs | 51 +- src/libstd/io/util.rs | 6 +- src/libstd/keyword_docs.rs | 349 +- src/libstd/lib.rs | 23 +- src/libstd/macros.rs | 113 +- src/libstd/net/addr.rs | 17 +- src/libstd/net/tcp.rs | 20 +- src/libstd/net/udp.rs | 4 +- src/libstd/num.rs | 6 + src/libstd/os/android/fs.rs | 1 - src/libstd/os/android/raw.rs | 1 - src/libstd/os/bitrig/fs.rs | 139 - src/libstd/os/bitrig/mod.rs | 6 - src/libstd/os/bitrig/raw.rs | 71 - src/libstd/os/dragonfly/fs.rs | 1 - src/libstd/os/freebsd/fs.rs | 1 - src/libstd/os/ios/fs.rs | 1 - src/libstd/os/macos/fs.rs | 1 - src/libstd/os/mod.rs | 3 +- src/libstd/os/netbsd/fs.rs | 1 - src/libstd/os/openbsd/fs.rs | 1 - src/libstd/panic.rs | 8 +- src/libstd/path.rs | 2 + src/libstd/primitive_docs.rs | 2 +- src/libstd/process.rs | 28 +- src/libstd/sync/mpsc/mod.rs | 89 +- src/libstd/sync/mpsc/oneshot.rs | 72 - src/libstd/sync/mpsc/select.rs | 352 - src/libstd/sync/mpsc/select_tests.rs | 413 - src/libstd/sync/mpsc/shared.rs | 35 +- src/libstd/sync/mpsc/stream.rs | 53 - src/libstd/sync/mpsc/sync.rs | 37 - src/libstd/sync/mutex.rs | 2 + src/libstd/sync/rwlock.rs | 2 + src/libstd/sys/cloudabi/io.rs | 16 +- src/libstd/sys/cloudabi/shims/fs.rs | 10 +- src/libstd/sys/cloudabi/shims/net.rs | 6 +- src/libstd/sys/cloudabi/shims/pipe.rs | 10 +- src/libstd/sys/cloudabi/thread.rs | 3 +- src/libstd/sys/mod.rs | 2 +- src/libstd/sys/redox/ext/net.rs | 82 +- src/libstd/sys/redox/fs.rs | 10 +- src/libstd/sys/redox/io.rs | 16 +- src/libstd/sys/redox/net/tcp.rs | 6 +- src/libstd/sys/redox/pipe.rs | 10 +- src/libstd/sys/redox/thread.rs | 3 +- src/libstd/sys/sgx/abi/entry.S | 14 +- src/libstd/sys/sgx/abi/mem.rs | 12 +- src/libstd/sys/sgx/abi/mod.rs | 8 +- src/libstd/sys/sgx/abi/panic.rs | 8 +- src/libstd/sys/sgx/abi/usercalls/alloc.rs | 24 +- src/libstd/sys/sgx/abi/usercalls/mod.rs | 45 +- src/libstd/sys/sgx/alloc.rs | 6 +- src/libstd/sys/sgx/fd.rs | 14 +- src/libstd/sys/sgx/fs.rs | 10 +- src/libstd/sys/sgx/io.rs | 16 +- src/libstd/sys/sgx/net.rs | 10 +- src/libstd/sys/sgx/pipe.rs | 15 +- src/libstd/sys/sgx/thread.rs | 8 +- src/libstd/sys/unix/args.rs | 1 - src/libstd/sys/unix/env.rs | 11 - src/libstd/sys/unix/ext/net.rs | 18 +- src/libstd/sys/unix/fd.rs | 6 +- src/libstd/sys/unix/fs.rs | 119 +- src/libstd/sys/unix/io.rs | 16 +- src/libstd/sys/unix/l4re.rs | 10 +- src/libstd/sys/unix/mod.rs | 1 - src/libstd/sys/unix/net.rs | 6 +- src/libstd/sys/unix/os.rs | 5 +- src/libstd/sys/unix/pipe.rs | 10 +- src/libstd/sys/unix/rand.rs | 14 +- src/libstd/sys/unix/stack_overflow.rs | 3 - src/libstd/sys/unix/stdio.rs | 30 +- src/libstd/sys/unix/thread.rs | 12 +- src/libstd/sys/wasi/ext/fs.rs | 10 +- src/libstd/sys/wasi/ext/io.rs | 55 + src/libstd/sys/wasi/fd.rs | 26 +- src/libstd/sys/wasi/fs.rs | 10 +- src/libstd/sys/wasi/io.rs | 16 +- src/libstd/sys/wasi/net.rs | 208 +- src/libstd/sys/wasi/pipe.rs | 10 +- src/libstd/sys/wasi/stdio.rs | 20 +- src/libstd/sys/wasi/thread.rs | 3 +- src/libstd/sys/wasm/fs.rs | 10 +- src/libstd/sys/wasm/io.rs | 16 +- src/libstd/sys/wasm/net.rs | 6 +- src/libstd/sys/wasm/pipe.rs | 10 +- src/libstd/sys/wasm/thread.rs | 3 +- src/libstd/sys/windows/fs.rs | 10 +- src/libstd/sys/windows/handle.rs | 14 +- src/libstd/sys/windows/io.rs | 16 +- src/libstd/sys/windows/net.rs | 6 +- src/libstd/sys/windows/pipe.rs | 10 +- src/libstd/sys/windows/thread.rs | 3 +- src/libstd/sys_common/at_exit_imp.rs | 5 +- src/libstd/sys_common/backtrace.rs | 1 - src/libstd/sys_common/mod.rs | 10 +- src/libstd/sys_common/net.rs | 10 +- src/libstd/sys_common/thread.rs | 3 +- src/libstd/sys_common/wtf8.rs | 6 +- src/libstd/thread/mod.rs | 8 +- src/libsyntax/Cargo.toml | 2 + src/libsyntax/ast.rs | 106 +- src/libsyntax/attr/builtin.rs | 135 +- src/libsyntax/attr/mod.rs | 132 +- src/libsyntax/config.rs | 11 +- src/libsyntax/diagnostics/metadata.rs | 4 +- src/libsyntax/early_buffered_lints.rs | 2 - src/libsyntax/entry.rs | 7 +- .../{diagnostic_list.rs => error_codes.rs} | 30 +- src/libsyntax/ext/base.rs | 5 +- src/libsyntax/ext/build.rs | 17 +- src/libsyntax/ext/derive.rs | 4 +- src/libsyntax/ext/expand.rs | 46 +- src/libsyntax/ext/placeholders.rs | 23 +- src/libsyntax/ext/source_util.rs | 4 +- src/libsyntax/ext/tt/macro_parser.rs | 5 +- src/libsyntax/ext/tt/macro_rules.rs | 51 +- src/libsyntax/ext/tt/quoted.rs | 1 + src/libsyntax/ext/tt/transcribe.rs | 259 +- src/libsyntax/feature_gate.rs | 1773 +- src/libsyntax/json.rs | 78 +- src/libsyntax/lib.rs | 4 +- src/libsyntax/mut_visit.rs | 47 +- src/libsyntax/parse/classify.rs | 13 - src/libsyntax/parse/diagnostics.rs | 524 + src/libsyntax/parse/lexer/comments.rs | 29 +- src/libsyntax/parse/lexer/mod.rs | 664 +- src/libsyntax/parse/lexer/tokentrees.rs | 67 +- src/libsyntax/parse/literal.rs | 487 + src/libsyntax/parse/mod.rs | 530 +- src/libsyntax/parse/parser.rs | 1030 +- src/libsyntax/parse/token.rs | 35 +- src/libsyntax/parse/unescape.rs | 515 + .../parse/unescape_error_reporting.rs | 200 + src/libsyntax/print/pprust.rs | 221 +- src/libsyntax/source_map.rs | 37 +- src/libsyntax/std_inject.rs | 19 +- src/libsyntax/test.rs | 20 +- src/libsyntax/test_snippet.rs | 2 +- src/libsyntax/tokenstream.rs | 10 +- src/libsyntax/util/parser.rs | 28 + src/libsyntax/visit.rs | 14 + src/libsyntax_ext/asm.rs | 12 +- src/libsyntax_ext/assert.rs | 81 +- src/libsyntax_ext/concat_idents.rs | 4 +- src/libsyntax_ext/deriving/clone.rs | 4 +- src/libsyntax_ext/deriving/debug.rs | 1 + src/libsyntax_ext/deriving/generic/mod.rs | 8 +- src/libsyntax_ext/deriving/mod.rs | 4 +- src/libsyntax_ext/env.rs | 5 +- .../{diagnostics.rs => error_codes.rs} | 0 src/libsyntax_ext/format.rs | 6 +- src/libsyntax_ext/global_asm.rs | 4 +- src/libsyntax_ext/lib.rs | 4 +- src/libsyntax_ext/log_syntax.rs | 3 +- src/libsyntax_ext/proc_macro_decls.rs | 29 +- src/libsyntax_ext/proc_macro_server.rs | 6 +- src/libsyntax_ext/test.rs | 14 +- src/libsyntax_ext/test_case.rs | 4 +- src/libsyntax_ext/trace_macros.rs | 4 +- src/libsyntax_pos/Cargo.toml | 1 + src/libsyntax_pos/edition.rs | 7 +- src/libsyntax_pos/hygiene.rs | 16 +- src/libsyntax_pos/lib.rs | 21 +- src/libsyntax_pos/span_encoding.rs | 186 +- src/libsyntax_pos/symbol.rs | 891 +- src/libtest/Cargo.toml | 2 +- src/libtest/lib.rs | 10 +- src/libunwind/build.rs | 9 +- src/rustc/rustc.rs | 1 - src/rustllvm/PassWrapper.cpp | 5 +- src/rustllvm/RustWrapper.cpp | 8 - src/stage0.txt | 6 +- src/stdsimd/.appveyor.yml | 1 + src/stdsimd/.travis.yml | 9 +- src/stdsimd/ci/run.sh | 22 + .../crates/assert-instr-macro/src/lib.rs | 2 +- src/stdsimd/crates/core_arch/Cargo.toml | 4 +- .../crates/core_arch/src/aarch64/crypto.rs | 82 +- src/stdsimd/crates/core_arch/src/acle/dsp.rs | 68 +- .../crates/core_arch/src/acle/simd32.rs | 151 +- src/stdsimd/crates/core_arch/src/arm/neon.rs | 14 +- .../core_arch/src/arm/table_lookup_tests.rs | 22 +- src/stdsimd/crates/core_arch/src/lib.rs | 37 +- src/stdsimd/crates/core_arch/src/macros.rs | 3 +- src/stdsimd/crates/core_arch/src/mips/msa.rs | 18447 +++++++++++++++- .../crates/core_arch/src/mips/msa/macros.rs | 4353 ++++ src/stdsimd/crates/core_arch/src/mod.rs | 3 +- .../crates/core_arch/src/powerpc/vsx.rs | 13 +- src/stdsimd/crates/core_arch/src/simd.rs | 4 +- src/stdsimd/crates/core_arch/src/simd_llvm.rs | 8 - src/stdsimd/crates/core_arch/src/x86/adx.rs | 26 +- src/stdsimd/crates/core_arch/src/x86/avx.rs | 20 +- src/stdsimd/crates/core_arch/src/x86/bswap.rs | 3 +- src/stdsimd/crates/core_arch/src/x86/cpuid.rs | 10 +- .../crates/core_arch/src/x86/rdrand.rs | 3 +- src/stdsimd/crates/core_arch/src/x86/rdtsc.rs | 4 +- src/stdsimd/crates/core_arch/src/x86/sha.rs | 18 +- src/stdsimd/crates/core_arch/src/x86/sse.rs | 19 +- src/stdsimd/crates/core_arch/src/x86/sse2.rs | 31 +- src/stdsimd/crates/core_arch/src/x86/sse4a.rs | 4 + src/stdsimd/crates/core_arch/src/x86/xsave.rs | 6 +- .../crates/core_arch/src/x86_64/adx.rs | 1 - .../crates/core_arch/src/x86_64/bswap.rs | 2 +- .../crates/core_arch/src/x86_64/cmpxchg16b.rs | 4 +- .../crates/core_arch/src/x86_64/rdrand.rs | 2 +- .../crates/core_arch/src/x86_64/sse2.rs | 8 +- .../crates/core_arch/src/x86_64/xsave.rs | 2 +- .../crates/core_arch/tests/cpu-detection.rs | 5 +- src/stdsimd/crates/simd-test-macro/src/lib.rs | 8 +- src/stdsimd/crates/std_detect/Cargo.toml | 2 +- .../crates/std_detect/src/detect/cache.rs | 9 +- .../crates/std_detect/src/detect/os/x86.rs | 2 +- src/stdsimd/crates/std_detect/src/lib.rs | 7 +- .../crates/std_detect/tests/cpu-detection.rs | 5 +- .../std_detect/tests/macro_trailing_commas.rs | 5 +- .../crates/stdsimd-test/src/disassembly.rs | 6 +- src/stdsimd/crates/stdsimd-test/src/lib.rs | 10 +- src/stdsimd/crates/stdsimd-verify/mips-msa.h | 707 + src/stdsimd/crates/stdsimd-verify/src/lib.rs | 102 +- .../crates/stdsimd-verify/tests/arm.rs | 17 +- .../crates/stdsimd-verify/tests/mips.rs | 336 + .../crates/stdsimd-verify/tests/x86-intel.rs | 5 + src/stdsimd/examples/hex.rs | 27 +- src/test/assembly/nvptx-internalizing.rs | 1 - .../auxiliary/cgu_generic_function.rs | 1 - .../item-collection/cross-crate-closures.rs | 1 - .../cross-crate-generic-functions.rs | 1 - .../cross-crate-trait-method.rs | 1 - .../item-collection/function-as-argument.rs | 1 - .../item-collection/generic-functions.rs | 1 - .../item-collection/generic-impl.rs | 1 - .../impl-in-non-instantiated-generic.rs | 1 - .../items-within-generic-items.rs | 1 - .../item-collection/non-generic-functions.rs | 1 - .../item-collection/overloaded-operators.rs | 1 - .../item-collection/static-init.rs | 1 - .../item-collection/statics-and-consts.rs | 1 - .../item-collection/trait-implementations.rs | 1 - .../trait-method-as-argument.rs | 1 - .../trait-method-default-impl.rs | 1 - .../item-collection/unreferenced-const-fn.rs | 1 - .../unreferenced-inline-function.rs | 1 - .../codegen-units/item-collection/unsizing.rs | 1 - .../unused-traits-and-generics.rs | 1 - .../auxiliary/cgu_generic_function.rs | 1 - .../codegen-units/partitioning/statics.rs | 1 - src/test/codegen/adjustments.rs | 1 - src/test/codegen/box-maybe-uninit.rs | 1 - src/test/codegen/dllimports/main.rs | 2 +- src/test/codegen/enum-debug-niche-2.rs | 1 - src/test/codegen/enum-debug-niche.rs | 1 - src/test/codegen/enum-debug-tagged.rs | 1 - src/test/codegen/generic-debug.rs | 1 - .../codegen/i686-macosx-deployment-target.rs | 26 + .../i686-no-macosx-deployment-target.rs | 26 + src/test/codegen/likely.rs | 1 - src/test/codegen/mainsubprogram.rs | 1 - src/test/codegen/mainsubprogramstart.rs | 1 - src/test/codegen/noreturn-uninhabited.rs | 1 - src/test/codegen/noreturnflag.rs | 1 - src/test/codegen/nounwind.rs | 1 - src/test/codegen/packed.rs | 1 - src/test/codegen/panic-abort-windows.rs | 4 +- src/test/codegen/pgo-instrumentation.rs | 20 + src/test/codegen/refs.rs | 1 - .../remap_path_prefix/xcrate-generic.rs | 1 - src/test/codegen/union-abi.rs | 1 - src/test/codegen/vtabletype.rs | 1 - .../x86_64-macosx-deployment-target.rs | 26 + .../x86_64-no-macosx-deployment-target.rs | 26 + .../compile-fail/must_use-in-stdlib-traits.rs | 2 +- src/test/debuginfo/enum-thinlto.rs | 2 - src/test/debuginfo/generator-locals.rs | 87 + src/test/debuginfo/generator-objects.rs | 68 + src/test/debuginfo/generators.rs | 42 - .../generic-enum-with-different-disr-sizes.rs | 1 - src/test/debuginfo/recursive-struct.rs | 1 - src/test/debuginfo/should-fail.rs | 1 - src/test/debuginfo/unique-enum.rs | 2 - src/test/debuginfo/unreachable-locals.rs | 1 - .../change_crate_order/auxiliary/a.rs | 1 - .../change_crate_order/auxiliary/b.rs | 1 - .../change_name_of_static_in_fn.rs | 1 - src/test/incremental/feature_gate.rs | 8 +- src/test/incremental/foreign.rs | 1 + .../incremental/hashes/closure_expressions.rs | 4 +- .../incremental/hashes/exported_vs_not.rs | 1 - src/test/incremental/hashes/if_expressions.rs | 4 +- src/test/incremental/issue-39569.rs | 1 - src/test/incremental/issue-60629.rs | 10 + src/test/incremental/krate-inherent.rs | 1 - .../krate_reassign_34991/auxiliary/a.rs | 1 - src/test/incremental/no_mangle.rs | 10 + .../auxiliary/extern_crate.rs | 2 - src/test/incremental/span_hash_stable/main.rs | 1 - src/test/mir-opt/array-index-is-temporary.rs | 21 +- src/test/mir-opt/basic_assignment.rs | 2 - src/test/mir-opt/box_expr.rs | 9 +- src/test/mir-opt/const_prop/array_index.rs | 33 + src/test/mir-opt/const_prop/checked_add.rs | 21 + .../const_prop/const_prop_fails_gracefully.rs | 34 + src/test/mir-opt/const_prop/slice_len.rs | 37 + src/test/mir-opt/const_prop/switch_int.rs | 38 + src/test/mir-opt/generator-drop-cleanup.rs | 3 +- src/test/mir-opt/graphviz.rs | 2 +- .../mir-opt/inline-closure-borrows-arg.rs | 2 +- src/test/mir-opt/inline-closure.rs | 2 +- src/test/mir-opt/issue-38669.rs | 8 +- src/test/mir-opt/issue-41110.rs | 21 +- src/test/mir-opt/issue-49232.rs | 10 +- src/test/mir-opt/loop_test.rs | 21 +- src/test/mir-opt/match_test.rs | 10 +- src/test/mir-opt/nll/named-lifetimes-basic.rs | 1 - .../mir-opt/nll/region-subtyping-basic.rs | 10 +- .../mir-opt/packed-struct-drop-aligned.rs | 10 +- src/test/mir-opt/remove_fake_borrows.rs | 2 - src/test/mir-opt/retag.rs | 16 +- src/test/mir-opt/simplify_if.rs | 12 +- src/test/mir-opt/slice-drop-shim.rs | 88 + .../mir-opt/storage_live_dead_in_statics.rs | 2 +- src/test/mir-opt/storage_ranges.rs | 6 +- src/test/run-fail/borrowck-local-borrow.rs | 2 +- src/test/run-fail/call-fn-never-arg.rs | 1 - src/test/run-fail/cast-never.rs | 1 - src/test/run-fail/issue-51345.rs | 2 - src/test/run-fail/never-associated-type.rs | 1 - src/test/run-fail/never-type-arg.rs | 1 - .../cross-lang-lto-clang/Makefile | 12 +- .../cross-lang-lto-upstream-rlibs/Makefile | 4 +- .../run-make-fulldeps/cross-lang-lto/Makefile | 4 +- .../hotplug_codegen_backend/the_backend.rs | 4 +- .../run-make-fulldeps/issue-14500/Makefile | 4 - src/test/run-make-fulldeps/issue-18943/foo.rs | 1 - src/test/run-make-fulldeps/issue-28595/b.c | 1 - .../libs-through-symlinks/Makefile | 2 +- src/test/run-make-fulldeps/libtest-json/f.rs | 1 - src/test/run-make-fulldeps/link-cfg/Makefile | 2 +- .../linker-output-non-utf8/Makefile | 2 +- .../lto-dylib-dep/a_dylib.rs | 1 - .../run-make-fulldeps/lto-dylib-dep/main.rs | 1 - .../lto-no-link-whole-rlib/lib2.rs | 1 - .../override-aliased-flags/Makefile | 22 + .../override-aliased-flags/main.rs | 1 + .../run-make-fulldeps/pgo-gen-lto/Makefile | 10 +- .../pgo-gen-no-imp-symbols/Makefile | 11 + .../pgo-gen-no-imp-symbols/test.rs | 1 + src/test/run-make-fulldeps/pgo-gen/Makefile | 10 +- src/test/run-make-fulldeps/pgo-use/Makefile | 51 + .../pgo-use/filecheck-patterns.txt | 11 + src/test/run-make-fulldeps/pgo-use/main.rs | 23 + src/test/run-make-fulldeps/profile/Makefile | 4 +- .../reproducible-build/Makefile | 4 + .../rustdoc-error-lines/Makefile | 5 + .../rustdoc-error-lines/input.rs | 17 + .../sanitizer-address/Makefile | 6 +- .../sanitizer-cdylib-link/Makefile | 10 +- .../sanitizer-dylib-link/Makefile | 10 +- .../sanitizer-invalid-cratetype/Makefile | 6 +- .../run-make-fulldeps/sanitizer-leak/Makefile | 3 +- .../sanitizer-memory/Makefile | 3 +- .../sanitizer-staticlib-link/Makefile | 13 +- .../sanitizer-staticlib-link/program.c | 1 - .../stable-symbol-names2.rs | 1 - .../sysroot-crates-are-unstable/test.py | 4 +- src/test/run-make-fulldeps/tools.mk | 6 +- .../use-extern-for-plugins/Makefile | 1 - .../windows-subsystem/console.rs | 1 - .../run-make/rustc-macro-dep-files/Makefile | 5 +- .../run-make/wasm-export-all-symbols/Makefile | 6 + .../run-make/wasm-export-all-symbols/main.rs | 3 + .../wasm-export-all-symbols/verify.js | 10 +- .../auxiliary/custom-derive-plugin-attr.rs | 4 +- .../auxiliary/issue-40001-plugin.rs | 4 +- .../auxiliary/lint-for-crate.rs | 7 +- src/test/run-pass-fulldeps/newtype_index.rs | 2 +- src/test/run-pass-valgrind/exit-flushes.rs | 1 + src/test/run-pass/abort-on-c-abi.rs | 1 + .../array-slice-vec/vec-macro-no-std.rs | 2 +- src/test/run-pass/asm-concat-src.rs | 1 - src/test/run-pass/asm-in-moved.rs | 3 - src/test/run-pass/asm-out-assign.rs | 3 - src/test/run-pass/async-await.rs | 43 +- src/test/run-pass/atomic-print.rs | 1 + src/test/run-pass/auxiliary/arc_wake.rs | 28 +- src/test/run-pass/await-macro.rs | 199 + src/test/run-pass/backtrace-debuginfo.rs | 8 +- src/test/run-pass/backtrace.rs | 1 + .../binding/empty-types-in-patterns.rs | 1 - .../run-pass/binding/match-pipe-binding.rs | 1 - .../borrowck-assignment-to-static-mut.rs | 3 - ...orrowck-multiple-borrows-interior-boxes.rs | 2 - .../borrowck-unsafe-static-mutable-borrows.rs | 2 - .../borrowck/borrowck-unused-mut-locals.rs | 1 - .../run-pass/borrowck/two-phase-baseline.rs | 1 - .../run-pass/borrowck/two-phase-bin-ops.rs | 4 - ...se-control-flow-split-before-activation.rs | 4 - src/test/run-pass/c-stack-returning-int64.rs | 1 + src/test/run-pass/cfg/cfg-family.rs | 1 + src/test/run-pass/cfg/cfg-target-family.rs | 1 + .../run-pass/chalkify/builtin-copy-clone.rs | 43 + .../auxiliary/re_rebalance_coherence_lib.rs | 3 +- src/test/run-pass/command-exec.rs | 1 + src/test/run-pass/command-pre-exec.rs | 1 + src/test/run-pass/const-needs_drop.rs | 2 - .../run-pass/consts/const-fn-feature-flags.rs | 1 - .../run-pass/consts/const-labeled-break.rs | 10 + src/test/run-pass/consts/const-ptr-nonnull.rs | 2 - src/test/run-pass/core-run-destroy.rs | 1 + src/test/run-pass/default-alloc-error-hook.rs | 1 + .../deriving/auxiliary/derive-no-std.rs | 1 - src/test/run-pass/deriving/derive-no-std.rs | 1 - .../run-pass/discriminant_value-wrapper.rs | 1 - src/test/run-pass/dispatch_from_dyn_zst.rs | 49 + src/test/run-pass/drop/dynamic-drop.rs | 2 - src/test/run-pass/dupe-first-attr.rc | 3 - .../run-pass/env-args-reverse-iterator.rs | 1 + src/test/run-pass/env-funky-keys.rs | 1 + src/test/run-pass/env-home-dir.rs | 1 + src/test/run-pass/exec-env.rs | 1 + src/test/run-pass/existential_type.rs | 4 +- .../run-pass/extern/extern-prelude-core.rs | 2 +- .../extern/extern-prelude-core.stderr | 2 +- src/test/run-pass/fat-lto.rs | 1 - src/test/run-pass/fds-are-cloexec.rs | 1 + .../for-loop-while/for-loop-no-std.rs | 2 +- .../run-pass/foreign/foreign-fn-linkname.rs | 1 + src/test/run-pass/format-no-std.rs | 2 +- .../expect-infer-supply-two-infers.rs | 2 +- .../parallel-codegen-closures.rs | 1 - src/test/run-pass/futures-api.rs | 11 +- src/test/run-pass/generator/issue-59972.rs | 23 + src/test/run-pass/generator/yield-subtype.rs | 3 - src/test/run-pass/if-ret.stderr | 8 + src/test/run-pass/impl-for-never.rs | 1 - src/test/run-pass/impl-trait-in-bindings.rs | 1 + .../run-pass/impl-trait-in-bindings.stderr | 6 + .../run-pass/impl-trait/example-calendar.rs | 3 - src/test/run-pass/impl-trait/lifetimes.rs | 6 + src/test/run-pass/inc-range-pat.rs | 1 - src/test/run-pass/inherit-env.rs | 2 +- .../intrinsics/intrinsic-alignment.rs | 2 +- src/test/run-pass/invalid_const_promotion.rs | 1 + src/test/run-pass/issue-55809.rs | 10 +- src/test/run-pass/issue-59020.rs | 1 + .../issues/auxiliary/issue-17718-aux.rs | 1 - src/test/run-pass/issues/issue-10626.rs | 1 + src/test/run-pass/issues/issue-12133-3.rs | 1 + src/test/run-pass/issues/issue-12699.rs | 1 + src/test/run-pass/issues/issue-13304.rs | 1 + src/test/run-pass/issues/issue-13494.rs | 35 - src/test/run-pass/issues/issue-14456.rs | 1 + src/test/run-pass/issues/issue-14940.rs | 1 + src/test/run-pass/issues/issue-16272.rs | 1 + src/test/run-pass/issues/issue-16278.rs | 1 - src/test/run-pass/issues/issue-16671.rs | 1 - src/test/run-pass/issues/issue-18075.rs | 2 +- src/test/run-pass/issues/issue-18353.rs | 2 +- src/test/run-pass/issues/issue-21400.rs | 1 - src/test/run-pass/issues/issue-2214.rs | 2 +- src/test/run-pass/issues/issue-23699.rs | 1 - src/test/run-pass/issues/issue-24313.rs | 2 +- ...535-allow-mutable-borrow-in-match-guard.rs | 1 - .../auxiliary/issue-24687-lib.rs | 1 - .../issues/issue-26873-multifile/A/B.rs | 1 - .../issues/issue-26873-multifile/A/C.rs | 1 - .../issues/issue-26873-multifile/A/mod.rs | 1 - .../issues/issue-26873-multifile/mod.rs | 1 - .../run-pass/issues/issue-26873-onefile.rs | 1 - src/test/run-pass/issues/issue-26905.rs | 1 - src/test/run-pass/issues/issue-26996.rs | 4 +- src/test/run-pass/issues/issue-27021.rs | 4 +- .../issues/issue-28498-must-work-ex2.rs | 1 - .../run-pass/issues/issue-28498-ugeh-ex1.rs | 1 - src/test/run-pass/issues/issue-29466.rs | 4 + src/test/run-pass/issues/issue-30371.rs | 1 - src/test/run-pass/issues/issue-30490.rs | 1 + src/test/run-pass/issues/issue-33770.rs | 1 + src/test/run-pass/issues/issue-34784.rs | 1 - src/test/run-pass/issues/issue-39709.rs | 1 - src/test/run-pass/issues/issue-42453.rs | 1 - src/test/run-pass/issues/issue-48962.rs | 1 - src/test/run-pass/issues/issue-49298.rs | 4 +- src/test/run-pass/issues/issue-49955.rs | 1 - src/test/run-pass/issues/issue-51345.rs | 1 - src/test/run-pass/issues/issue-8860.rs | 1 - src/test/run-pass/issues/issue-9396.rs | 1 + src/test/run-pass/link-cfg-works.rs | 1 - src/test/run-pass/linkage1.rs | 1 + src/test/run-pass/lint-cap.rs | 1 - src/test/run-pass/logging-only-prints-once.rs | 2 +- .../run-pass/logging_before_rt_started.rs | 2 +- .../run-pass/macros/macro-comma-support.rs | 2 - src/test/run-pass/macros/macro-first-set.rs | 1 - src/test/run-pass/macros/macro-follow.rs | 1 - src/test/run-pass/macros/macro-nested_expr.rs | 1 - src/test/run-pass/macros/macro-pat-neg-lit.rs | 1 - src/test/run-pass/mir/mir_constval_adts.rs | 1 - src/test/run-pass/mir/mir_static_subtype.rs | 8 + src/test/run-pass/mpsc_stress.rs | 1 + src/test/run-pass/multi-panic.rs | 1 + src/test/run-pass/never-result.rs | 1 - src/test/run-pass/never_coercions.rs | 1 - .../run-pass/nll/issue-47153-generic-const.rs | 1 - src/test/run-pass/nll/issue-47589.rs | 2 - src/test/run-pass/nll/issue-48623-closure.rs | 2 - .../run-pass/nll/issue-48623-generator.rs | 1 - src/test/run-pass/nll/issue-50343.rs | 1 - .../nll/issue-50461-used-mut-from-moves.rs | 1 - .../nll/issue-53123-raw-pointer-cast.rs | 1 - src/test/run-pass/nll/mutating_references.rs | 2 - .../run-pass/nll/process_or_insert_default.rs | 2 - src/test/run-pass/nll/rc-loop.rs | 3 - src/test/run-pass/no-stdio.rs | 1 + src/test/run-pass/numbers-arithmetic/i128.rs | 1 - src/test/run-pass/numbers-arithmetic/u128.rs | 1 - src/test/run-pass/optimization-fuel-0.rs | 1 - src/test/run-pass/out-of-stack.rs | 1 + .../abort-link-to-unwinding-crates.rs | 1 + src/test/run-pass/panic-runtime/abort.rs | 1 + src/test/run-pass/panic-runtime/lto-abort.rs | 1 + src/test/run-pass/panic-runtime/lto-unwind.rs | 1 + .../run-pass/panic-uninitialized-zeroed.rs | 2 +- src/test/run-pass/paths-containing-nul.rs | 1 + .../run-pass/print-stdout-eprint-stderr.rs | 1 + .../auxiliary/expand-with-a-macro.rs | 1 - .../auxiliary/external-crate-var.rs | 1 - .../proc-macro/auxiliary/span-api-tests.rs | 1 - .../proc-macro/expand-with-a-macro.rs | 1 - src/test/run-pass/process/process-envs.rs | 1 + src/test/run-pass/process/process-exit.rs | 1 + .../process/process-remove-from-env.rs | 1 + .../process/process-spawn-nonexistent.rs | 1 + .../process-spawn-with-unicode-params.rs | 1 + .../process/process-status-inherits-stdin.rs | 1 + .../run-pass/project-cache-issue-31849.rs | 1 - src/test/run-pass/range_inclusive_gate.rs | 1 - src/test/run-pass/rfcs/rfc-1014.rs | 1 + src/test/run-pass/running-with-no-runtime.rs | 1 + src/test/run-pass/rustc-rust-log.rs | 2 +- src/test/run-pass/segfault-no-out-of-stack.rs | 1 + src/test/run-pass/sepcomp/sepcomp-cci.rs | 1 - src/test/run-pass/sepcomp/sepcomp-extern.rs | 1 - .../run-pass/sepcomp/sepcomp-fns-backwards.rs | 1 - src/test/run-pass/sepcomp/sepcomp-fns.rs | 1 - src/test/run-pass/sepcomp/sepcomp-statics.rs | 1 - src/test/run-pass/sepcomp/sepcomp-unwind.rs | 1 - .../signal-alternate-stack-cleanup.rs | 2 +- src/test/run-pass/signal-exit-status.rs | 1 + .../run-pass/sigpipe-should-be-ignored.rs | 1 + .../simd/simd-target-feature-mixup.rs | 1 + src/test/run-pass/sleep.rs | 1 + src/test/run-pass/stack-probes-lto.rs | 1 + src/test/run-pass/stack-probes.rs | 1 + src/test/run-pass/stdio-is-blocking.rs | 1 + .../run-pass/structs-enums/rec-align-u64.rs | 2 +- .../unit-like-struct-drop-run.rs | 3 - src/test/run-pass/tcp-stress.rs | 2 +- .../run-pass/thinlto/thin-lto-inlines2.rs | 1 - .../threads-sendsync/spawning-with-debug.rs | 2 +- .../threads-sendsync/sync-send-in-std.rs | 1 + src/test/run-pass/try-wait.rs | 1 + src/test/run-pass/try_from.rs | 1 - src/test/run-pass/union/union-nonzero.rs | 51 + .../run-pass/wait-forked-but-failed-child.rs | 1 + src/test/run-pass/weird-exprs.rs | 1 - src/test/run-pass/x86stdcall.rs | 3 +- src/test/rustdoc-js/search-short-types.js | 8 + src/test/rustdoc-js/search-short-types.rs | 68 + src/test/rustdoc-js/substring.js | 8 + src/test/rustdoc-js/substring.rs | 21 + src/test/rustdoc-ui/cfg-test.rs | 22 + src/test/rustdoc-ui/cfg-test.stdout | 6 + src/test/rustdoc-ui/doc-without-codeblock.rs | 4 +- .../rustdoc-ui/doc-without-codeblock.stderr | 18 +- .../rustdoc-ui/failed-doctest-output.stdout | 4 +- .../rustdoc-ui/intra-link-span-ice-55723.rs | 2 - .../intra-link-span-ice-55723.stderr | 4 +- .../lint-missing-doc-code-example.rs | 40 + .../lint-missing-doc-code-example.stderr | 21 + src/test/rustdoc-ui/unparseable-doc-test.rs | 10 + .../rustdoc-ui/unparseable-doc-test.stdout | 24 + src/test/rustdoc/assoc-consts-version.rs | 5 +- src/test/rustdoc/async-fn.rs | 2 +- src/test/rustdoc/async-move-doctest.rs | 14 + src/test/rustdoc/attributes.rs | 4 +- .../auxiliary/intra-links-external-traits.rs | 6 + src/test/rustdoc/auxiliary/issue-23207-2.rs | 1 - src/test/rustdoc/blanket-reexport-item.rs | 2 +- src/test/rustdoc/empty-mod-private.rs | 1 - src/test/rustdoc/extern-html-root-url.rs | 2 - src/test/rustdoc/generic-const.rs | 30 + src/test/rustdoc/index-page.rs | 3 + .../inline_cross/auxiliary/proc_macro.rs | 1 - .../auxiliary/rustdoc-trait-object-impl.rs | 1 - src/test/rustdoc/inline_cross/issue-32881.rs | 1 - .../rustdoc/intra-link-libstd-re-export.rs | 3 + .../rustdoc/intra-links-external-traits.rs | 12 + src/test/rustdoc/issue-15318-2.rs | 1 - src/test/rustdoc/issue-19190-3.rs | 1 - src/test/rustdoc/issue-20727-2.rs | 1 - src/test/rustdoc/issue-23207.rs | 1 - src/test/rustdoc/issue-34473.rs | 1 - src/test/rustdoc/issue-38129.rs | 1 - src/test/rustdoc/issue-56701.rs | 1 - src/test/rustdoc/issue-60482.rs | 9 + src/test/rustdoc/method-list.rs | 2 - src/test/rustdoc/playground-arg.rs | 2 +- src/test/rustdoc/playground.rs | 6 +- src/test/rustdoc/pub-method.rs | 1 - .../rustdoc/sidebar-links-to-foreign-impl.rs | 16 + src/test/rustdoc/static-root-path.rs | 4 + src/test/rustdoc/synthetic_auto/complex.rs | 2 +- .../synthetic_auto/self-referential.rs | 1 - .../ui-fulldeps/auxiliary/attr-plugin-test.rs | 8 +- .../ui-fulldeps/auxiliary/lint-for-crate.rs | 3 +- .../ui-fulldeps/auxiliary/lint-plugin-test.rs | 2 +- .../ui-fulldeps/auxiliary/lint-tool-test.rs | 4 +- .../dropck-tarena-cycle-checked.stderr | 11 +- .../ui-fulldeps/dropck-tarena-unsound-drop.rs | 1 - .../dropck-tarena-unsound-drop.stderr | 11 +- src/test/ui-fulldeps/gated-plugin.stderr | 3 +- .../hash-stable-is-unstable.stderr | 17 +- .../internal-lints/pass_ty_by_ref.rs | 64 + .../internal-lints/pass_ty_by_ref.stderr | 80 + .../internal-lints/qualified_ty_ty_ctxt.rs | 35 + .../qualified_ty_ty_ctxt.stderr | 20 + .../internal-lints/ty_tykind_usage.stderr | 2 +- src/test/ui-fulldeps/macro-crate-rlib.stderr | 1 - src/test/ui/E0501.ast.stderr | 31 - src/test/ui/E0501.mir.stderr | 31 - src/test/ui/E0501.rs | 12 +- .../ui/{E0501.ast.nll.stderr => E0501.stderr} | 4 +- src/test/ui/E0506.ast.nll.stderr | 14 - src/test/ui/E0506.ast.stderr | 11 - src/test/ui/E0506.rs | 6 +- .../ui/{E0506.mir.stderr => E0506.stderr} | 4 +- src/test/ui/E0508-fail.ast.nll.stderr | 12 - src/test/ui/E0508-fail.ast.stderr | 12 - src/test/ui/E0508-fail.mir.stderr | 12 - src/test/ui/E0508-fail.rs | 6 +- .../{E0508.nll.stderr => E0508-fail.stderr} | 2 +- src/test/ui/E0508.stderr | 2 +- src/test/ui/E0594.ast.nll.stderr | 9 - src/test/ui/E0594.ast.stderr | 9 - src/test/ui/E0594.rs | 6 +- .../ui/{E0594.mir.stderr => E0594.stderr} | 3 +- src/test/ui/E0596.ast.stderr | 11 - src/test/ui/E0596.mir.stderr | 11 - src/test/ui/E0596.rs | 6 +- .../ui/{E0596.ast.nll.stderr => E0596.stderr} | 2 +- src/test/ui/E0660.stderr | 1 - src/test/ui/E0661.stderr | 1 - src/test/ui/E0662.stderr | 1 - src/test/ui/E0663.stderr | 1 - src/test/ui/E0664.stderr | 1 - src/test/ui/E0665.stderr | 1 - .../ui/access-mode-in-closures.nll.stderr | 18 - src/test/ui/access-mode-in-closures.stderr | 9 +- src/test/ui/allocator-submodule.rs | 2 - src/test/ui/allocator-submodule.stderr | 2 +- src/test/ui/allocator/two-allocators.rs | 1 - src/test/ui/allocator/two-allocators2.rs | 1 - .../anonymous-higher-ranked-lifetime.stderr | 1 - src/test/ui/asm/asm-bad-clobber.stderr | 1 - src/test/ui/asm/asm-in-bad-modifier.stderr | 2 - src/test/ui/asm/asm-out-assign-imm.nll.stderr | 14 - src/test/ui/asm/asm-out-assign-imm.stderr | 2 + src/test/ui/asm/asm-out-no-modifier.stderr | 1 - .../ui/asm/asm-out-read-uninit.mir.stderr | 9 - src/test/ui/asm/asm-out-read-uninit.rs | 6 +- ....ast.stderr => asm-out-read-uninit.stderr} | 2 +- src/test/ui/assign-imm-local-twice.ast.stderr | 12 - src/test/ui/assign-imm-local-twice.mir.stderr | 15 - src/test/ui/assign-imm-local-twice.rs | 16 +- ...l.stderr => assign-imm-local-twice.stderr} | 4 +- .../associated-item/associated-item-enum.rs | 20 + .../associated-item-enum.stderr | 36 + src/test/ui/associated-path-shl.stderr | 2 +- ...rojection-from-multiple-supertraits.stderr | 2 +- .../associated-types-eq-3.stderr | 2 +- .../associated-types-eq-hr.stderr | 2 +- .../associated-types-outlives.nll.stderr | 13 - .../associated-types-outlives.stderr | 4 +- ...associated-types-overridden-binding.stderr | 1 - .../associated-types-path-1.stderr | 2 +- .../associated-types-path-2.stderr | 10 +- ...es-project-from-hrtb-in-fn-body.nll.stderr | 24 + ...-types-project-from-hrtb-in-fn-body.stderr | 1 - ...iated-types-project-from-hrtb-in-fn.stderr | 1 - ...d-types-project-from-hrtb-in-struct.stderr | 1 - ...s-project-from-hrtb-in-trait-method.stderr | 1 - .../associated-types-subtyping-1.nll.stderr | 24 + .../associated-types-subtyping-1.stderr | 1 - .../associated-types-unconstrained.stderr | 1 - ...fn-ret-contravariant.krisskross.nll.stderr | 24 + ...ect-fn-ret-contravariant.krisskross.stderr | 1 - ...-fn-ret-contravariant.transmute.nll.stderr | 10 + ...ject-fn-ret-contravariant.transmute.stderr | 1 - ...ect-fn-ret-invariant.krisskross.nll.stderr | 24 + ...project-fn-ret-invariant.krisskross.stderr | 1 - ...project-fn-ret-invariant.oneuse.nll.stderr | 24 + .../project-fn-ret-invariant.oneuse.stderr | 1 - ...ject-fn-ret-invariant.transmute.nll.stderr | 11 + .../project-fn-ret-invariant.transmute.stderr | 1 - src/test/ui/async-await/argument-patterns.rs | 30 + src/test/ui/async-await/auxiliary/arc_wake.rs | 64 + .../ui/async-await/auxiliary/issue-60674.rs | 12 + ...-for-async-fn-parameters-by-ref-binding.rs | 271 + .../drop-order-for-async-fn-parameters.rs | 263 + .../drop-order-locals-are-hidden.rs | 16 + .../drop-order-locals-are-hidden.stderr | 27 + src/test/ui/async-await/issue-60518.rs | 12 + src/test/ui/async-await/issue-60674.rs | 20 + src/test/ui/async-await/issue-60674.stdout | 3 + src/test/ui/async-fn-multiple-lifetimes.rs | 2 +- src/test/ui/async-fn-path-elision.rs | 16 + src/test/ui/async-fn-path-elision.stderr | 8 + src/test/ui/async-with-closure.rs | 26 + src/test/ui/attr-eq-token-tree.stderr | 4 +- src/test/ui/augmented-assignments.nll.stderr | 22 - src/test/ui/augmented-assignments.rs | 14 +- src/test/ui/augmented-assignments.stderr | 30 +- src/test/ui/auto-ref-slice-plus-ref.stderr | 2 +- src/test/ui/auto-trait-validation.stderr | 3 +- .../default-ty-param-cross-crate-crate.rs | 1 - src/test/ui/auxiliary/issue-59764.rs | 18 + ...015-edition-error-in-non-macro-position.rs | 36 + ...edition-error-in-non-macro-position.stderr | 88 + ...5-edition-no-warnings-with-feature-gate.rs | 16 - ...018-edition-error-in-non-macro-position.rs | 25 + ...edition-error-in-non-macro-position.stderr | 72 + .../ui/await-keyword/2018-edition-error.rs | 13 +- .../await-keyword/2018-edition-error.stderr | 45 +- ...2018-edition-no-error-with-feature-gate.rs | 16 - .../incorrect-syntax-suggestions.rs | 111 + .../incorrect-syntax-suggestions.stderr | 207 + .../ui/await-keyword/post_expansion_error.rs | 2 +- .../await-keyword/post_expansion_error.stderr | 9 +- src/test/ui/bad/bad-env-capture.stderr | 2 +- src/test/ui/bad/bad-env-capture2.stderr | 2 +- src/test/ui/bad/bad-env-capture3.stderr | 2 +- src/test/ui/bad/bad-expr-lhs.stderr | 2 +- src/test/ui/bad/bad-expr-path.stderr | 2 +- src/test/ui/bad/bad-expr-path2.stderr | 2 +- src/test/ui/bad/bad-extern-link-attrs.stderr | 2 +- .../bad/bad-intrinsic-monomorphization.stderr | 1 - src/test/ui/bad/bad-lint-cap3.rs | 1 - src/test/ui/bad/bad-sized.stderr | 2 +- src/test/ui/bad/bad-type-env-capture.stderr | 2 +- .../bind-by-move-no-guards.nll.stderr | 11 - .../bind-by-move-no-guards.stderr | 2 + .../ui/binop/binop-consume-args.nll.stderr | 253 - src/test/ui/binop/binop-consume-args.stderr | 120 +- src/test/ui/binop/binop-logic-float.rs | 1 - .../ui/binop/binop-move-semantics.nll.stderr | 95 - src/test/ui/binop/binop-move-semantics.rs | 2 +- src/test/ui/binop/binop-move-semantics.stderr | 69 +- src/test/ui/block-result/issue-20862.stderr | 2 +- src/test/ui/block-result/issue-22645.stderr | 2 +- src/test/ui/block-result/issue-3563.stderr | 2 +- src/test/ui/bogus-tag.stderr | 6 +- .../borrowck/assign_mutable_fields.nll.stderr | 15 - src/test/ui/borrowck/assign_mutable_fields.rs | 14 +- .../ui/borrowck/assign_mutable_fields.stderr | 24 +- ...borrow-immutable-upvar-mutation.nll.stderr | 76 - .../borrow-immutable-upvar-mutation.stderr | 45 +- .../borrowck/borrow-tuple-fields.nll.stderr | 65 - .../ui/borrowck/borrow-tuple-fields.stderr | 61 +- ...borrowck-access-permissions.ast.nll.stderr | 53 - .../borrowck-access-permissions.ast.stderr | 46 - .../borrowck/borrowck-access-permissions.rs | 22 +- ...err => borrowck-access-permissions.stderr} | 12 +- .../ui/borrowck/borrowck-and-init.nll.stderr | 9 - src/test/ui/borrowck/borrowck-and-init.rs | 2 +- src/test/ui/borrowck/borrowck-and-init.stderr | 2 +- .../borrowck-anon-fields-struct.nll.stderr | 15 - .../borrowck-anon-fields-struct.stderr | 4 +- .../borrowck-anon-fields-tuple.nll.stderr | 15 - .../borrowck-anon-fields-tuple.stderr | 4 +- .../borrowck-anon-fields-variant.nll.stderr | 13 +- .../borrowck/borrowck-anon-fields-variant.rs | 12 +- .../borrowck-anon-fields-variant.stderr | 38 +- .../ui/borrowck/borrowck-argument.nll.stderr | 35 - src/test/ui/borrowck/borrowck-argument.rs | 9 +- src/test/ui/borrowck/borrowck-argument.stderr | 24 +- src/test/ui/borrowck/borrowck-asm.ast.stderr | 76 - src/test/ui/borrowck/borrowck-asm.mir.stderr | 81 - src/test/ui/borrowck/borrowck-asm.rs | 27 +- ...asm.ast.nll.stderr => borrowck-asm.stderr} | 20 +- .../borrowck-assign-comp-idx.nll.stderr | 27 - .../borrowck/borrowck-assign-comp-idx.stderr | 15 +- .../borrowck/borrowck-assign-comp.ast.stderr | 28 - .../borrowck/borrowck-assign-comp.mir.stderr | 37 - src/test/ui/borrowck/borrowck-assign-comp.rs | 12 +- ...nll.stderr => borrowck-assign-comp.stderr} | 10 +- ...sign-to-andmut-in-aliasable-loc.nll.stderr | 19 - ...k-assign-to-andmut-in-aliasable-loc.stderr | 13 +- ...ssign-to-andmut-in-borrowed-loc.nll.stderr | 24 - ...rrowck-assign-to-andmut-in-borrowed-loc.rs | 4 +- ...ck-assign-to-andmut-in-borrowed-loc.stderr | 21 +- .../borrowck-assign-to-constants.ast.stderr | 9 - .../borrowck-assign-to-constants.mir.stderr | 9 - .../borrowck/borrowck-assign-to-constants.rs | 6 +- ...rr => borrowck-assign-to-constants.stderr} | 3 +- ...rowck-auto-mut-ref-to-immut-var.nll.stderr | 11 - .../borrowck-auto-mut-ref-to-immut-var.stderr | 6 +- .../borrowck/borrowck-autoref-3261.nll.stderr | 16 - .../ui/borrowck/borrowck-autoref-3261.stderr | 9 +- .../borrowck-bad-nested-calls-free.nll.stderr | 23 - .../borrowck-bad-nested-calls-free.stderr | 24 +- .../borrowck-bad-nested-calls-move.nll.stderr | 23 - .../borrowck-bad-nested-calls-move.stderr | 8 +- .../borrowck/borrowck-block-unint.nll.stderr | 11 - src/test/ui/borrowck/borrowck-block-unint.rs | 2 +- .../ui/borrowck/borrowck-block-unint.stderr | 4 +- .../borrowck-borrow-from-owned-ptr.nll.stderr | 116 - .../borrowck-borrow-from-owned-ptr.rs | 13 +- .../borrowck-borrow-from-owned-ptr.stderr | 156 +- ...owck-borrow-from-stack-variable.nll.stderr | 116 - ...borrowck-borrow-from-stack-variable.stderr | 108 +- .../borrowck-borrow-from-temporary.nll.stderr | 11 - .../borrowck-borrow-from-temporary.rs | 4 +- .../borrowck-borrow-from-temporary.stderr | 17 +- ...orrow-immut-deref-of-box-as-mut.nll.stderr | 11 - ...rrowck-borrow-immut-deref-of-box-as-mut.rs | 2 +- ...ck-borrow-immut-deref-of-box-as-mut.stderr | 4 +- ...w-mut-base-ptr-in-aliasable-loc.nll.stderr | 31 - ...orrow-mut-base-ptr-in-aliasable-loc.stderr | 30 +- ...orrowck-borrow-mut-object-twice.nll.stderr | 13 - .../borrowck-borrow-mut-object-twice.stderr | 3 +- ...ck-borrow-overloaded-auto-deref.nll.stderr | 88 - ...rrowck-borrow-overloaded-auto-deref.stderr | 53 +- ...orrowck-borrow-overloaded-deref.nll.stderr | 46 - .../borrowck-borrow-overloaded-deref.stderr | 39 +- ...borrowck-borrowed-uniq-rvalue-2.nll.stderr | 16 - .../borrowck-borrowed-uniq-rvalue-2.rs | 2 +- .../borrowck-borrowed-uniq-rvalue-2.stderr | 13 +- .../borrowck-borrowed-uniq-rvalue.nll.stderr | 16 - .../borrowck/borrowck-borrowed-uniq-rvalue.rs | 2 +- .../borrowck-borrowed-uniq-rvalue.stderr | 18 +- .../borrowck-box-insensitivity.ast.stderr | 165 - .../borrowck-box-insensitivity.mir.stderr | 14 - .../borrowck-box-insensitivity.nll.stderr | 14 - ...itivity.rs => borrowck-box-sensitivity.rs} | 75 +- .../borrowck-break-uninit-2.nll.stderr | 9 - .../ui/borrowck/borrowck-break-uninit-2.rs | 2 +- .../borrowck/borrowck-break-uninit-2.stderr | 2 +- .../borrowck/borrowck-break-uninit.nll.stderr | 9 - src/test/ui/borrowck/borrowck-break-uninit.rs | 2 +- .../ui/borrowck/borrowck-break-uninit.stderr | 2 +- ...rrowck-closures-mut-and-imm.ast.nll.stderr | 116 - .../borrowck-closures-mut-and-imm.ast.stderr | 96 - .../borrowck/borrowck-closures-mut-and-imm.rs | 36 +- ...r => borrowck-closures-mut-and-imm.stderr} | 18 +- .../borrowck-closures-mut-of-imm.nll.stderr | 32 - .../borrowck-closures-mut-of-imm.stderr | 35 +- .../borrowck-closures-mut-of-mut.nll.stderr | 18 - .../borrowck-closures-mut-of-mut.stderr | 11 +- .../borrowck-closures-two-mut-fail.nll.stderr | 75 - .../borrowck-closures-two-mut-fail.stderr | 41 +- .../ui/borrowck/borrowck-closures-two-mut.rs | 7 - .../borrowck/borrowck-closures-two-mut.stderr | 104 +- .../borrowck-closures-unique-imm.nll.stderr | 13 - .../borrowck-closures-unique-imm.stderr | 9 +- .../borrowck-closures-unique.nll.stderr | 54 - .../ui/borrowck/borrowck-closures-unique.rs | 9 +- .../borrowck/borrowck-closures-unique.stderr | 48 +- ...orrowck-closures-use-after-free.nll.stderr | 16 - .../borrowck-closures-use-after-free.stderr | 12 +- .../borrowck-consume-unsize-vec.nll.stderr | 13 - .../borrowck-consume-unsize-vec.stderr | 4 +- .../borrowck-consume-upcast-box.nll.stderr | 13 - .../borrowck-consume-upcast-box.stderr | 4 +- .../borrowck-describe-lvalue.ast.stderr | 246 - ...rr => borrowck-describe-lvalue.nll.stderr} | 79 +- .../ui/borrowck/borrowck-describe-lvalue.rs | 102 +- ...stderr => borrowck-describe-lvalue.stderr} | 79 +- ...rrowck-escaping-closure-error-1.nll.stderr | 21 - .../borrowck-escaping-closure-error-1.stderr | 6 + ...rrowck-escaping-closure-error-2.nll.stderr | 21 - .../borrowck-escaping-closure-error-2.stderr | 6 + .../borrowck-field-sensitivity.nll.stderr | 132 - .../ui/borrowck/borrowck-field-sensitivity.rs | 20 +- .../borrowck-field-sensitivity.stderr | 81 +- .../borrowck-fn-in-const-a.mir.stderr | 9 - .../ui/borrowck/borrowck-fn-in-const-a.rs | 6 +- ...t.stderr => borrowck-fn-in-const-a.stderr} | 2 +- .../borrowck-fn-in-const-c.nll.stderr | 11 - .../ui/borrowck/borrowck-fn-in-const-c.rs | 2 +- .../ui/borrowck/borrowck-fn-in-const-c.stderr | 12 +- ...or-loop-correct-cmt-for-pattern.nll.stderr | 48 - ...ck-for-loop-correct-cmt-for-pattern.stderr | 42 +- .../borrowck-for-loop-head-linkage.nll.stderr | 2 +- .../borrowck-for-loop-head-linkage.stderr | 18 +- ...f-to-mut-rec-field-issue-3162-c.ast.stderr | 12 - ...f-to-mut-rec-field-issue-3162-c.mir.stderr | 15 - ...k-imm-ref-to-mut-rec-field-issue-3162-c.rs | 6 +- ...-ref-to-mut-rec-field-issue-3162-c.stderr} | 2 +- .../ui/borrowck/borrowck-in-static.nll.stderr | 11 - src/test/ui/borrowck/borrowck-in-static.rs | 2 +- .../ui/borrowck/borrowck-in-static.stderr | 4 +- .../borrowck-init-in-fru.ast.nll.stderr | 9 - .../borrowck/borrowck-init-in-fru.ast.stderr | 9 - src/test/ui/borrowck/borrowck-init-in-fru.rs | 6 +- ...mir.stderr => borrowck-init-in-fru.stderr} | 2 +- .../borrowck-insert-during-each.nll.stderr | 30 - .../borrowck/borrowck-insert-during-each.rs | 3 +- .../borrowck-insert-during-each.stderr | 35 +- .../borrowck-issue-14498.ast.nll.stderr | 108 - .../borrowck/borrowck-issue-14498.ast.stderr | 82 - src/test/ui/borrowck/borrowck-issue-14498.rs | 30 +- ...mir.stderr => borrowck-issue-14498.stderr} | 29 +- .../borrowck/borrowck-issue-2657-1.nll.stderr | 13 - .../ui/borrowck/borrowck-issue-2657-1.stderr | 6 +- .../borrowck/borrowck-issue-2657-2.nll.stderr | 12 - .../ui/borrowck/borrowck-issue-2657-2.stderr | 2 +- src/test/ui/borrowck/borrowck-issue-48962.rs | 2 - .../ui/borrowck/borrowck-issue-48962.stderr | 4 +- .../borrowck/borrowck-lend-flow-if.nll.stderr | 14 - .../ui/borrowck/borrowck-lend-flow-if.stderr | 11 +- .../borrowck-lend-flow-loop.ast.stderr | 93 - .../ui/borrowck/borrowck-lend-flow-loop.rs | 44 +- ....stderr => borrowck-lend-flow-loop.stderr} | 10 +- .../borrowck-lend-flow-match.ast.stderr | 11 - .../borrowck-lend-flow-match.mir.stderr | 14 - .../ui/borrowck/borrowck-lend-flow-match.rs | 12 +- ...stderr => borrowck-lend-flow-match.stderr} | 3 +- .../ui/borrowck/borrowck-lend-flow.nll.stderr | 13 - .../ui/borrowck/borrowck-lend-flow.stderr | 11 +- .../borrowck-loan-blocks-move-cc.nll.stderr | 29 - .../borrowck/borrowck-loan-blocks-move-cc.rs | 4 +- .../borrowck-loan-blocks-move-cc.stderr | 28 +- .../borrowck-loan-blocks-move.nll.stderr | 13 - .../borrowck/borrowck-loan-blocks-move.stderr | 4 +- .../borrowck-loan-blocks-mut-uniq.nll.stderr | 15 - .../borrowck-loan-blocks-mut-uniq.stderr | 11 +- .../borrowck-loan-in-overloaded-op.nll.stderr | 13 - .../borrowck-loan-in-overloaded-op.rs | 2 +- .../borrowck-loan-in-overloaded-op.stderr | 8 +- ...loan-of-static-data-issue-27616.nll.stderr | 14 - ...wck-loan-of-static-data-issue-27616.stderr | 6 +- ...orrowck-loan-rcvr-overloaded-op.nll.stderr | 28 - .../borrowck-loan-rcvr-overloaded-op.stderr | 15 +- .../ui/borrowck/borrowck-loan-rcvr.nll.stderr | 25 - .../ui/borrowck/borrowck-loan-rcvr.stderr | 17 +- .../borrowck-loan-vec-content.nll.stderr | 15 - .../borrowck/borrowck-loan-vec-content.stderr | 6 +- ...rrowck-local-borrow-outlives-fn.ast.stderr | 14 - ...rrowck-local-borrow-outlives-fn.mir.stderr | 9 - .../borrowck-local-borrow-outlives-fn.rs | 6 +- ... borrowck-local-borrow-outlives-fn.stderr} | 2 +- ...l-borrow-with-panic-outlives-fn.ast.stderr | 14 - ...l-borrow-with-panic-outlives-fn.mir.stderr | 15 - ...wck-local-borrow-with-panic-outlives-fn.rs | 6 +- ...ocal-borrow-with-panic-outlives-fn.stderr} | 2 +- ...owck-match-already-borrowed.ast.nll.stderr | 51 - ...borrowck-match-already-borrowed.ast.stderr | 30 - .../borrowck-match-already-borrowed.rs | 14 +- ...=> borrowck-match-already-borrowed.stderr} | 12 +- ...match-binding-is-assignment.ast.nll.stderr | 58 - ...wck-match-binding-is-assignment.ast.stderr | 43 - .../borrowck-match-binding-is-assignment.rs | 18 +- ...rrowck-match-binding-is-assignment.stderr} | 10 +- .../borrowck-move-by-capture.nll.stderr | 12 - .../borrowck/borrowck-move-by-capture.stderr | 4 +- .../borrowck-move-error-with-note.nll.stderr | 67 - .../borrowck/borrowck-move-error-with-note.rs | 3 +- .../borrowck-move-error-with-note.stderr | 65 +- ...e-from-subpath-of-borrowed-path.nll.stderr | 14 - ...-move-from-subpath-of-borrowed-path.stderr | 8 +- .../borrowck-move-from-unsafe-ptr.nll.stderr | 12 - .../borrowck-move-from-unsafe-ptr.stderr | 2 +- ...orrowck-move-in-irrefut-pat.ast.nll.stderr | 50 - .../borrowck-move-in-irrefut-pat.ast.stderr | 30 - .../borrowck/borrowck-move-in-irrefut-pat.rs | 12 +- ...rr => borrowck-move-in-irrefut-pat.stderr} | 12 +- ...ve-moved-value-into-closure.ast.nll.stderr | 18 - ...k-move-moved-value-into-closure.ast.stderr | 13 - .../borrowck-move-moved-value-into-closure.rs | 6 +- ...owck-move-moved-value-into-closure.stderr} | 2 +- .../borrowck-move-mut-base-ptr.nll.stderr | 14 - .../borrowck-move-mut-base-ptr.stderr | 9 +- .../borrowck-move-out-from-array.mir.stderr | 23 - .../borrowck/borrowck-move-out-from-array.rs | 9 +- ...rr => borrowck-move-out-from-array.stderr} | 4 +- ...ut-of-overloaded-auto-deref.ast.nll.stderr | 9 - ...ve-out-of-overloaded-auto-deref.ast.stderr | 9 - ...rowck-move-out-of-overloaded-auto-deref.rs | 6 +- ...-move-out-of-overloaded-auto-deref.stderr} | 2 +- ...ck-move-out-of-overloaded-deref.nll.stderr | 12 - .../borrowck-move-out-of-overloaded-deref.rs | 2 +- ...rrowck-move-out-of-overloaded-deref.stderr | 6 +- ...orrowck-move-out-of-static-item.mir.stderr | 9 - .../borrowck-move-out-of-static-item.rs | 6 +- ...> borrowck-move-out-of-static-item.stderr} | 2 +- ...ove-out-of-struct-with-dtor.ast.nll.stderr | 47 - ...ck-move-out-of-struct-with-dtor.ast.stderr | 30 - .../borrowck-move-out-of-struct-with-dtor.rs | 12 +- ...rowck-move-out-of-struct-with-dtor.stderr} | 12 +- ...e-out-of-tuple-struct-with-dtor.nll.stderr | 46 - ...owck-move-out-of-tuple-struct-with-dtor.rs | 2 +- ...-move-out-of-tuple-struct-with-dtor.stderr | 39 +- .../borrowck-move-out-of-vec-tail.nll.stderr | 31 - .../borrowck/borrowck-move-out-of-vec-tail.rs | 4 +- .../borrowck-move-out-of-vec-tail.stderr | 33 +- .../borrowck-move-subcomponent.nll.stderr | 13 - .../borrowck-move-subcomponent.stderr | 4 +- .../borrowck-multiple-captures.nll.stderr | 103 - .../ui/borrowck/borrowck-multiple-captures.rs | 18 +- .../borrowck-multiple-captures.stderr | 97 +- .../borrowck-mut-addr-of-imm-var.nll.stderr | 11 - .../borrowck-mut-addr-of-imm-var.stderr | 8 +- ...rrowck-mut-borrow-linear-errors.ast.stderr | 36 - ...rrowck-mut-borrow-linear-errors.mir.stderr | 32 - .../borrowck-mut-borrow-linear-errors.rs | 12 +- ... borrowck-mut-borrow-linear-errors.stderr} | 10 +- ...owck-mut-borrow-of-mut-base-ptr.nll.stderr | 26 - ...borrowck-mut-borrow-of-mut-base-ptr.stderr | 28 +- .../borrowck-mut-slice-of-imm-vec.nll.stderr | 11 - .../borrowck-mut-slice-of-imm-vec.stderr | 8 +- .../borrowck-mutate-in-guard.nll.stderr | 25 +- .../ui/borrowck/borrowck-mutate-in-guard.rs | 8 +- .../borrowck/borrowck-mutate-in-guard.stderr | 31 +- ...rowck-no-cycle-in-exchange-heap.nll.stderr | 13 - .../borrowck-no-cycle-in-exchange-heap.stderr | 4 +- .../borrowck-object-lifetime.nll.stderr | 2 +- .../borrowck/borrowck-object-lifetime.stderr | 14 +- .../ui/borrowck/borrowck-or-init.nll.stderr | 9 - src/test/ui/borrowck/borrowck-or-init.rs | 2 +- src/test/ui/borrowck/borrowck-or-init.stderr | 2 +- .../borrowck-overloaded-call.nll.stderr | 34 - .../ui/borrowck/borrowck-overloaded-call.rs | 2 +- .../borrowck/borrowck-overloaded-call.stderr | 18 +- ...-index-and-overloaded-deref.ast.nll.stderr | 14 - ...aded-index-and-overloaded-deref.ast.stderr | 11 - ...k-overloaded-index-and-overloaded-deref.rs | 6 +- ...rloaded-index-and-overloaded-deref.stderr} | 4 +- ...owck-overloaded-index-autoderef.nll.stderr | 84 - ...borrowck-overloaded-index-autoderef.stderr | 22 +- ...-overloaded-index-move-from-vec.nll.stderr | 12 - ...borrowck-overloaded-index-move-from-vec.rs | 2 +- ...owck-overloaded-index-move-from-vec.stderr | 6 +- ...wck-overloaded-index-move-index.nll.stderr | 40 - ...orrowck-overloaded-index-move-index.stderr | 17 +- ...-overloaded-index-ref-index.ast.nll.stderr | 33 - ...owck-overloaded-index-ref-index.ast.stderr | 35 - .../borrowck-overloaded-index-ref-index.rs | 12 +- ...orrowck-overloaded-index-ref-index.stderr} | 9 +- .../borrowck-partial-reinit-1.nll.stderr | 25 - .../ui/borrowck/borrowck-partial-reinit-1.rs | 4 +- .../borrowck/borrowck-partial-reinit-1.stderr | 20 +- .../borrowck-partial-reinit-2.nll.stderr | 13 - .../ui/borrowck/borrowck-partial-reinit-2.rs | 2 +- .../borrowck/borrowck-partial-reinit-2.stderr | 10 +- .../borrowck-partial-reinit-3.nll.stderr | 13 - .../ui/borrowck/borrowck-partial-reinit-3.rs | 2 +- .../borrowck/borrowck-partial-reinit-3.stderr | 10 +- .../borrowck-partial-reinit-4.nll.stderr | 9 - .../ui/borrowck/borrowck-partial-reinit-4.rs | 2 +- .../borrowck/borrowck-partial-reinit-4.stderr | 6 +- .../borrowck-pat-reassign-binding.ast.stderr | 12 - .../borrowck-pat-reassign-binding.mir.stderr | 15 - .../borrowck/borrowck-pat-reassign-binding.rs | 6 +- ...r => borrowck-pat-reassign-binding.stderr} | 3 +- .../borrowck-reborrow-from-mut.nll.stderr | 116 - .../borrowck-reborrow-from-mut.stderr | 108 +- ...orrow-from-shorter-lived-andmut.nll.stderr | 12 + ...-reborrow-from-shorter-lived-andmut.stderr | 1 - .../borrowck-ref-mut-of-imm.nll.stderr | 12 - .../borrowck/borrowck-ref-mut-of-imm.stderr | 6 +- src/test/ui/borrowck/borrowck-reinit.rs | 5 +- src/test/ui/borrowck/borrowck-reinit.stderr | 16 +- ...k-report-with-custom-diagnostic.nll.stderr | 40 - ...rowck-report-with-custom-diagnostic.stderr | 32 +- ...urn-variable-on-stack-via-clone.nll.stderr | 12 - ...owck-return-variable-on-stack-via-clone.rs | 2 +- ...-return-variable-on-stack-via-clone.stderr | 19 +- src/test/ui/borrowck/borrowck-storage-dead.rs | 5 +- .../ui/borrowck/borrowck-storage-dead.stderr | 12 +- ...wck-struct-update-with-dtor.ast.nll.stderr | 15 - ...orrowck-struct-update-with-dtor.ast.stderr | 15 - .../borrowck-struct-update-with-dtor.rs | 9 +- ...> borrowck-struct-update-with-dtor.stderr} | 4 +- .../borrowck-swap-mut-base-ptr.nll.stderr | 14 - .../borrowck-swap-mut-base-ptr.stderr | 14 +- ...l-static-borrow-outlives-fn.ast.nll.stderr | 12 - ...local-static-borrow-outlives-fn.ast.stderr | 13 - ...-thread-local-static-borrow-outlives-fn.rs | 6 +- ...ad-local-static-borrow-outlives-fn.stderr} | 3 +- .../borrowck-unary-move.ast.nll.stderr | 14 - .../borrowck/borrowck-unary-move.ast.stderr | 11 - src/test/ui/borrowck/borrowck-unary-move.rs | 7 +- ....mir.stderr => borrowck-unary-move.stderr} | 3 +- .../borrowck-unboxed-closures.nll.stderr | 34 - .../ui/borrowck/borrowck-unboxed-closures.rs | 2 +- .../borrowck/borrowck-unboxed-closures.stderr | 19 +- .../borrowck-uninit-field-access.ast.stderr | 30 - .../borrowck-uninit-field-access.mir.stderr | 30 - .../borrowck/borrowck-uninit-field-access.rs | 12 +- ...rr => borrowck-uninit-field-access.stderr} | 8 +- .../borrowck-uninit-ref-chain.ast.stderr | 45 - .../borrowck-uninit-ref-chain.mir.stderr | 45 - .../ui/borrowck/borrowck-uninit-ref-chain.rs | 32 +- ...tderr => borrowck-uninit-ref-chain.stderr} | 14 +- .../borrowck-union-borrow-nested.nll.stderr | 13 - .../borrowck-union-borrow-nested.stderr | 8 +- .../borrowck/borrowck-union-borrow.nll.stderr | 131 - src/test/ui/borrowck/borrowck-union-borrow.rs | 4 +- .../ui/borrowck/borrowck-union-borrow.stderr | 99 +- .../borrowck-union-move-assign.nll.stderr | 13 - .../ui/borrowck/borrowck-union-move-assign.rs | 2 +- .../borrowck-union-move-assign.stderr | 12 +- .../borrowck/borrowck-union-move.nll.stderr | 63 - src/test/ui/borrowck/borrowck-union-move.rs | 12 +- .../ui/borrowck/borrowck-union-move.stderr | 72 +- .../borrowck-union-uninitialized.nll.stderr | 15 - .../borrowck/borrowck-union-uninitialized.rs | 8 +- .../borrowck-union-uninitialized.stderr | 16 +- .../borrowck-uniq-via-lend.nll.stderr | 23 - .../ui/borrowck/borrowck-uniq-via-lend.stderr | 22 +- .../borrowck-use-in-index-lvalue.ast.stderr | 15 - .../borrowck-use-in-index-lvalue.mir.stderr | 15 - .../borrowck/borrowck-use-in-index-lvalue.rs | 9 +- ...rr => borrowck-use-in-index-lvalue.stderr} | 4 +- .../borrowck-use-mut-borrow.nll.stderr | 95 - .../borrowck/borrowck-use-mut-borrow.stderr | 46 +- ...uninitialized-in-cast-trait.ast.nll.stderr | 9 - ...use-uninitialized-in-cast-trait.ast.stderr | 9 - ...orrowck-use-uninitialized-in-cast-trait.rs | 6 +- ...ck-use-uninitialized-in-cast-trait.stderr} | 2 +- ...rowck-use-uninitialized-in-cast.ast.stderr | 9 - ...rowck-use-uninitialized-in-cast.mir.stderr | 9 - .../borrowck-use-uninitialized-in-cast.rs | 6 +- ...borrowck-use-uninitialized-in-cast.stderr} | 2 +- ...rrowck-vec-pattern-element-loan.nll.stderr | 30 - .../borrowck-vec-pattern-element-loan.rs | 12 +- .../borrowck-vec-pattern-element-loan.stderr | 50 +- ...rowck-vec-pattern-loan-from-mut.nll.stderr | 14 - .../borrowck-vec-pattern-loan-from-mut.stderr | 9 +- .../borrowck-vec-pattern-move-tail.ast.stderr | 12 - .../borrowck-vec-pattern-move-tail.cmp.stderr | 24 - .../borrowck-vec-pattern-move-tail.rs | 8 +- ... => borrowck-vec-pattern-move-tail.stderr} | 3 +- .../borrowck-vec-pattern-nesting.nll.stderr | 117 - .../borrowck/borrowck-vec-pattern-nesting.rs | 51 +- .../borrowck-vec-pattern-nesting.stderr | 116 +- ...k-vec-pattern-tail-element-loan.nll.stderr | 12 - .../borrowck-vec-pattern-tail-element-loan.rs | 4 +- ...rowck-vec-pattern-tail-element-loan.stderr | 18 +- .../borrowck/borrowck-while-break.nll.stderr | 9 - src/test/ui/borrowck/borrowck-while-break.rs | 2 +- .../ui/borrowck/borrowck-while-break.stderr | 2 +- src/test/ui/borrowck/immutable-arg.rs | 6 +- src/test/ui/borrowck/immutable-arg.stderr | 14 +- .../index-mut-help-with-impl.nll.stderr | 11 - .../borrowck/index-mut-help-with-impl.stderr | 4 +- .../ui/borrowck/index-mut-help.nll.stderr | 26 - src/test/ui/borrowck/index-mut-help.stderr | 17 +- src/test/ui/borrowck/issue-10876.rs | 2 - src/test/ui/borrowck/issue-41962.rs | 6 +- src/test/ui/borrowck/issue-41962.stderr | 24 +- src/test/ui/borrowck/issue-45983.ast.stderr | 12 - .../ui/borrowck/issue-45983.migrate.stderr | 2 +- src/test/ui/borrowck/issue-45983.nll.stderr | 6 +- src/test/ui/borrowck/issue-45983.rs | 16 +- .../issue-47215-ice-from-drop-elab.nll.stderr | 12 - .../issue-47215-ice-from-drop-elab.rs | 2 +- .../issue-47215-ice-from-drop-elab.stderr | 6 +- src/test/ui/borrowck/issue-51117.nll.stderr | 13 - src/test/ui/borrowck/issue-51117.stderr | 5 +- .../issue-51348-multi-ref-mut-in-guard.rs | 2 - src/test/ui/borrowck/issue-51415.nll.stderr | 18 - src/test/ui/borrowck/issue-51415.stderr | 16 +- src/test/ui/borrowck/issue-52713-bug.rs | 2 - src/test/ui/borrowck/issue-52713-bug.stderr | 2 +- ...67-edition-2018-needs-two-phase-borrows.rs | 5 +- ...ield-mutation-marks-mut-as-used.ast.stderr | 39 - ...-54499-field-mutation-marks-mut-as-used.rs | 22 +- ...9-field-mutation-marks-mut-as-used.stderr} | 6 +- ...-mutation-of-moved-out-with-mut.ast.stderr | 69 - ...99-field-mutation-of-moved-out-with-mut.rs | 22 +- ...eld-mutation-of-moved-out-with-mut.stderr} | 6 +- ...499-field-mutation-of-moved-out.ast.stderr | 124 - ...issue-54499-field-mutation-of-moved-out.rs | 40 +- ...-54499-field-mutation-of-moved-out.stderr} | 21 +- ...99-field-mutation-of-never-init.ast.stderr | 91 - ...ssue-54499-field-mutation-of-never-init.rs | 28 +- ...54499-field-mutation-of-never-init.stderr} | 6 +- ...54597-reject-move-out-of-borrow-via-pat.rs | 2 - ...7-reject-move-out-of-borrow-via-pat.stderr | 2 +- ...-borrowck-migrate-scans-parents.ast.stderr | 55 - ...rowck-migrate-scans-parents.migrate.stderr | 15 +- ...-borrowck-migrate-scans-parents.nll.stderr | 15 +- ...ue-55492-borrowck-migrate-scans-parents.rs | 28 +- ...e-58776-borrowck-scans-children.ast.stderr | 15 - ...776-borrowck-scans-children.migrate.stderr | 8 +- .../issue-58776-borrowck-scans-children.rs | 14 +- ...ssue-58776-borrowck-scans-children.stderr} | 8 +- src/test/ui/borrowck/issue-7573.nll.stderr | 14 + ...-static-initializer-issue-38520.mir.stderr | 15 - .../move-in-static-initializer-issue-38520.rs | 9 +- ...-in-static-initializer-issue-38520.stderr} | 4 +- .../ui/borrowck/mut-borrow-in-loop.nll.stderr | 39 - src/test/ui/borrowck/mut-borrow-in-loop.rs | 1 - .../ui/borrowck/mut-borrow-in-loop.stderr | 33 +- .../borrowck/mut-borrow-of-mut-ref.nll.stderr | 11 - .../ui/borrowck/mut-borrow-of-mut-ref.stderr | 12 +- .../mut-borrow-outside-loop.nll.stderr | 24 - .../borrowck/mut-borrow-outside-loop.stderr | 23 +- .../ui/borrowck/mutability-errors.nll.stderr | 379 - src/test/ui/borrowck/mutability-errors.rs | 10 +- src/test/ui/borrowck/mutability-errors.stderr | 284 +- ...mote-ref-mut-in-let-issue-46557.nll.stderr | 50 - .../promote-ref-mut-in-let-issue-46557.rs | 16 +- .../promote-ref-mut-in-let-issue-46557.stderr | 77 +- .../reassignment_immutable_fields.nll.stderr | 15 - .../borrowck/reassignment_immutable_fields.rs | 10 +- .../reassignment_immutable_fields.stderr | 53 +- ...nt_immutable_fields_overlapping.nll.stderr | 19 - ...gnment_immutable_fields_overlapping.stderr | 14 +- ...signment_immutable_fields_twice.nll.stderr | 19 - .../reassignment_immutable_fields_twice.rs | 4 +- ...reassignment_immutable_fields_twice.stderr | 34 +- ...regions-bound-missing-bound-in-impl.stderr | 2 +- .../regions-escape-bound-fn-2.nll.stderr | 12 + .../regions-escape-bound-fn.nll.stderr | 12 + .../regions-escape-unboxed-closure.nll.stderr | 12 + src/test/ui/borrowck/two-phase-across-loop.rs | 2 - .../ui/borrowck/two-phase-across-loop.stderr | 2 +- ...ion-sharing-interference.nll_target.stderr | 8 +- ...o-phase-activation-sharing-interference.rs | 6 +- ...o-phase-allow-access-during-reservation.rs | 4 +- .../two-phase-cannot-nest-mut-self-calls.rs | 2 +- .../ui/borrowck/two-phase-method-receivers.rs | 2 +- src/test/ui/borrowck/two-phase-multi-mut.rs | 2 - .../ui/borrowck/two-phase-multi-mut.stderr | 4 +- .../two-phase-multiple-activations.rs | 2 +- .../two-phase-nonrecv-autoref.ast.nll.stderr | 71 - .../two-phase-nonrecv-autoref.ast.stderr | 113 - .../two-phase-nonrecv-autoref.nll.stderr | 16 +- .../ui/borrowck/two-phase-nonrecv-autoref.rs | 19 +- ...ervation-sharing-interference-2.ast.stderr | 36 - ...-sharing-interference-2.migrate2015.stderr | 6 +- ...-sharing-interference-2.migrate2018.stderr | 6 +- ...tion-sharing-interference-2.nll2015.stderr | 6 +- ...tion-sharing-interference-2.nll2018.stderr | 6 +- ...hase-reservation-sharing-interference-2.rs | 9 +- ...interference-future-compat-lint.nll.stderr | 36 + ...-phase-reservation-sharing-interference.rs | 5 +- .../ui/borrowck/two-phase-sneaky.nll.stderr | 14 - src/test/ui/borrowck/two-phase-sneaky.rs | 2 +- src/test/ui/borrowck/two-phase-sneaky.stderr | 7 +- .../two-phase-surprise-no-conflict.ast.stderr | 133 - ...wo-phase-surprise-no-conflict.no2pb.stderr | 159 - .../two-phase-surprise-no-conflict.rs | 72 +- ... => two-phase-surprise-no-conflict.stderr} | 34 +- ...upvar-from-non-once-ref-closure.nll.stderr | 12 - ...es-move-upvar-from-non-once-ref-closure.rs | 2 +- ...ove-upvar-from-non-once-ref-closure.stderr | 4 +- src/test/ui/break-outside-loop.stderr | 2 +- .../ui/by-move-pattern-binding.nll.stderr | 21 - src/test/ui/by-move-pattern-binding.rs | 4 +- src/test/ui/by-move-pattern-binding.stderr | 17 +- src/test/ui/c-variadic/variadic-ffi-1.rs | 22 +- src/test/ui/c-variadic/variadic-ffi-1.stderr | 77 +- src/test/ui/c-variadic/variadic-ffi-3.rs | 29 - src/test/ui/c-variadic/variadic-ffi-3.stderr | 76 - ...ffi-5.stderr => variadic-ffi-4.nll.stderr} | 44 +- src/test/ui/c-variadic/variadic-ffi-4.stderr | 2 +- src/test/ui/c-variadic/variadic-ffi-5.rs | 31 - src/test/ui/call-fn-never-arg-wrong-type.rs | 1 - ...not-mutate-captured-non-mut-var.ast.stderr | 16 - ...not-mutate-captured-non-mut-var.mir.stderr | 20 - .../ui/cannot-mutate-captured-non-mut-var.rs | 10 +- ...cannot-mutate-captured-non-mut-var.stderr} | 7 +- src/test/ui/cast/cast-ptr-to-int-const.stderr | 6 +- src/test/ui/cast_char.rs | 4 +- src/test/ui/cast_char.stderr | 8 +- src/test/ui/cdylib-deps-must-be-static.rs | 2 +- src/test/ui/chalkify/type_inference.stderr | 2 +- src/test/ui/changing-crates.stderr | 1 - ...check-static-values-constraints.nll.stderr | 112 - .../ui/check-static-values-constraints.stderr | 7 +- src/test/ui/class-missing-self.stderr | 2 +- src/test/ui/cleanup-rvalue-scopes-cf.rs | 20 +- src/test/ui/cleanup-rvalue-scopes-cf.stderr | 119 +- .../expect-fn-supply-fn.nll.stderr | 53 + .../expect-fn-supply-fn.stderr | 3 +- .../expect-infer-var-appearing-twice.stderr | 1 - src/test/ui/closure_promotion.rs | 5 +- src/test/ui/closure_promotion.stderr | 13 - ...ds-static-cant-capture-borrowed.nll.stderr | 37 + .../expect-region-supply-region.nll.stderr | 42 + .../closure-immutable-outer-variable.fixed | 3 +- ...losure-immutable-outer-variable.nll.stderr | 11 - .../closure-immutable-outer-variable.rs | 3 +- .../closure-immutable-outer-variable.stderr | 7 +- ...nce-overlapping-inherent-impl-trait.stderr | 1 - .../huge_multispan_highlight.nll.stderr | 12 - .../huge_multispan_highlight.stderr | 8 +- .../ui/codemap_tests/issue-11715.nll.stderr | 14 - src/test/ui/codemap_tests/issue-11715.stderr | 12 +- src/test/ui/codemap_tests/one_line.nll.stderr | 12 - src/test/ui/codemap_tests/one_line.stderr | 6 +- .../overlapping_inherent_impls.stderr | 1 - src/test/ui/codemap_tests/tab.stderr | 2 +- src/test/ui/codemap_tests/tab_3.nll.stderr | 14 - src/test/ui/codemap_tests/tab_3.rs | 2 +- src/test/ui/codemap_tests/tab_3.stderr | 8 +- src/test/ui/codemap_tests/unicode.stderr | 1 - .../coerce-overloaded-autoderef.ast.stderr | 42 - ...coerce-overloaded-autoderef.mir.nll.stderr | 46 - .../coerce-overloaded-autoderef.mir.stderr | 45 - .../coercion/coerce-overloaded-autoderef.rs | 15 +- ...err => coerce-overloaded-autoderef.stderr} | 14 +- .../auxiliary/re_rebalance_coherence_lib.rs | 3 +- .../coherence-cross-crate-conflict.old.stderr | 2 +- .../coherence-cross-crate-conflict.re.stderr | 2 +- .../coherence-default-trait-impl.old.stderr | 2 +- .../coherence-default-trait-impl.re.stderr | 2 +- ...mpl-trait-for-marker-trait-negative.stderr | 2 +- ...mpl-trait-for-marker-trait-positive.stderr | 2 +- .../coherence/coherence-impls-copy.old.stderr | 2 +- .../coherence/coherence-impls-copy.re.stderr | 2 +- .../coherence/coherence-impls-send.old.stderr | 2 +- .../coherence/coherence-impls-send.re.stderr | 2 +- .../coherence-impls-sized.old.stderr | 2 +- .../coherence/coherence-impls-sized.re.stderr | 2 +- ...nce-overlap-downstream-inherent.old.stderr | 1 - ...ence-overlap-downstream-inherent.re.stderr | 1 - ...ce-overlap-issue-23516-inherent.old.stderr | 1 - ...nce-overlap-issue-23516-inherent.re.stderr | 1 - ...rence-overlap-upstream-inherent.old.stderr | 1 - ...erence-overlap-upstream-inherent.re.stderr | 1 - .../ui/command-line-diagnostics.nll.stderr | 14 - src/test/ui/command-line-diagnostics.stderr | 5 +- .../cfg-arg-invalid-1.stderr | 2 + .../cfg-arg-invalid-2.stderr | 2 + .../cfg-arg-invalid-3.stderr | 2 + .../cfg-arg-invalid-4.stderr | 2 + .../cfg-arg-invalid-5.stderr | 2 + .../cfg-attr-crate-2.stderr | 3 +- .../cfg-attr-multi-invalid-1.stderr | 3 +- .../cfg-attr-multi-invalid-2.stderr | 3 +- .../cfg-attr-syntax-validation.stderr | 2 +- ...r-unknown-attribute-macro-expansion.stderr | 3 +- .../cfg-empty-codemap.stderr | 2 + src/test/ui/conflicting-repr-hints.stderr | 2 - .../const-generics/cannot-infer-const-args.rs | 10 + .../cannot-infer-const-args.stderr | 15 + .../cannot-infer-type-for-const-param.rs | 6 - .../concrete-const-as-fn-arg.rs | 14 + .../concrete-const-as-fn-arg.stderr | 6 + .../concrete-const-impl-method.rs | 24 + .../concrete-const-impl-method.stderr | 6 + src/test/ui/const-generics/const-arg-in-fn.rs | 13 + .../ui/const-generics/const-arg-in-fn.stderr | 6 + .../const-expression-parameter.rs | 2 +- .../const-expression-parameter.stderr | 8 +- .../const-param-before-other-params.rs | 8 +- .../const-param-before-other-params.stderr | 12 +- .../const-param-from-outer-fn.stderr | 2 +- .../const-param-in-trait-ungated.rs | 3 + .../const-param-in-trait-ungated.stderr | 12 + .../ui/const-generics/const-param-in-trait.rs | 8 + .../const-param-in-trait.stderr | 6 + ...aram-type-depends-on-type-param-ungated.rs | 6 + ...-type-depends-on-type-param-ungated.stderr | 19 + .../const-param-type-depends-on-type-param.rs | 13 + ...st-param-type-depends-on-type-param.stderr | 24 + src/test/ui/const-generics/const-types.rs | 16 + src/test/ui/const-generics/const-types.stderr | 6 + .../impl-const-generic-struct.rs | 16 + .../impl-const-generic-struct.stderr | 6 + .../incorrect-number-of-const-args.rs | 11 + .../incorrect-number-of-const-args.stderr | 21 + .../invalid-const-arg-for-type-param.stderr | 2 +- src/test/ui/const-generics/issue-60263.rs | 9 + src/test/ui/const-generics/issue-60263.stderr | 12 + .../struct-with-invalid-const-param.stderr | 1 - .../ui/const-generics/unused-const-param.rs | 8 + .../const-generics/unused-const-param.stderr | 6 + src/test/ui/consts/array-literal-index-oob.rs | 5 + .../ui/consts/array-literal-index-oob.stderr | 18 + src/test/ui/consts/const-array-oob.rs | 2 - src/test/ui/consts/const-array-oob.stderr | 2 +- src/test/ui/consts/const-call.stderr | 2 +- src/test/ui/consts/const-deref-ptr.stderr | 3 +- src/test/ui/consts/const-err.rs | 1 + src/test/ui/consts/const-err.stderr | 12 +- .../const-eval/const-eval-overflow-3b.rs | 7 - .../const-eval/const-eval-overflow-3b.stderr | 6 +- .../const-eval/const-eval-overflow-4b.stderr | 2 +- .../dont_promote_unstable_const_fn.nll.stderr | 43 - .../dont_promote_unstable_const_fn.rs | 6 +- .../dont_promote_unstable_const_fn.stderr | 32 +- ...e_unstable_const_fn_cross_crate.nll.stderr | 24 - ...t_promote_unstable_const_fn_cross_crate.rs | 4 +- ...omote_unstable_const_fn_cross_crate.stderr | 22 +- .../feature-gate-const_fn_union.stderr | 3 +- .../feature-gate-const_panic.stderr | 9 +- .../ui/consts/const-eval/infinite_loop.stderr | 2 +- .../ui/consts/const-eval/issue-52442.stderr | 2 +- .../ui/consts/const-eval/issue-52475.stderr | 2 +- .../consts/const-eval/match-test-ptr-null.rs | 4 +- .../const-eval/match-test-ptr-null.stderr | 9 +- .../mod-static-with-const-fn.stderr | 2 +- .../promote_mutable_zst_mir_borrowck.rs | 2 - .../promoted_const_fn_fail.nll.stderr | 14 - .../const-eval/promoted_const_fn_fail.rs | 2 +- .../const-eval/promoted_const_fn_fail.stderr | 12 +- ...ed_const_fn_fail_deny_const_err.nll.stderr | 14 - .../promoted_const_fn_fail_deny_const_err.rs | 2 +- ...omoted_const_fn_fail_deny_const_err.stderr | 12 +- .../promoted_raw_ptr_ops.nll.stderr | 46 - .../consts/const-eval/promoted_raw_ptr_ops.rs | 11 +- .../const-eval/promoted_raw_ptr_ops.stderr | 49 +- .../transmute-const-promotion.nll.stderr | 14 - .../const-eval/transmute-const-promotion.rs | 2 +- .../transmute-const-promotion.stderr | 12 +- .../const-eval/union_promotion.nll.stderr | 16 - .../ui/consts/const-eval/union_promotion.rs | 2 +- .../consts/const-eval/union_promotion.stderr | 14 +- .../const-eval/unused-broken-const.stderr | 2 - .../consts/const-fn-not-safe-for-const.stderr | 2 +- .../ui/consts/const-int-conversion.nll.stderr | 80 - src/test/ui/consts/const-int-conversion.rs | 14 +- .../ui/consts/const-int-conversion.stderr | 72 +- .../consts/const-int-overflowing.nll.stderr | 35 - src/test/ui/consts/const-int-overflowing.rs | 9 +- .../ui/consts/const-int-overflowing.stderr | 39 +- .../ui/consts/const-int-rotate.nll.stderr | 24 - src/test/ui/consts/const-int-rotate.rs | 6 +- src/test/ui/consts/const-int-rotate.stderr | 27 +- src/test/ui/consts/const-int-sign.nll.stderr | 24 - src/test/ui/consts/const-int-sign.rs | 6 +- src/test/ui/consts/const-int-sign.stderr | 27 +- .../ui/consts/const-int-wrapping.nll.stderr | 57 - src/test/ui/consts/const-int-wrapping.rs | 15 +- src/test/ui/consts/const-int-wrapping.stderr | 63 +- .../ui/consts/const-integer-bool-ops.stderr | 2 +- .../ui/consts/const-ptr-nonnull.nll.stderr | 25 - src/test/ui/consts/const-ptr-nonnull.rs | 4 +- src/test/ui/consts/const-ptr-nonnull.stderr | 22 +- .../ui/consts/const-ptr-unique.nll.stderr | 14 - src/test/ui/consts/const-ptr-unique.rs | 2 +- src/test/ui/consts/const-ptr-unique.stderr | 12 +- .../ui/consts/const-tup-index-span.stderr | 2 +- src/test/ui/consts/const_let_assign3.stderr | 2 +- .../ui/consts/const_let_refutable.nll.stderr | 31 + src/test/ui/consts/const_let_refutable.rs | 8 +- src/test/ui/consts/const_let_refutable.stderr | 32 +- src/test/ui/consts/issue-54224.rs | 2 - src/test/ui/consts/issue-54224.stderr | 4 +- src/test/ui/consts/match_ice.rs | 12 +- src/test/ui/consts/match_ice.stderr | 16 +- .../consts/min_const_fn/allow_const_fn_ptr.rs | 10 + .../min_const_fn/allow_const_fn_ptr.stderr | 12 + .../allow_const_fn_ptr_feature_gate.rs | 11 + .../allow_const_fn_ptr_feature_gate.stderr | 12 + .../allow_const_fn_ptr_run_pass.rs | 18 + .../min_const_fn/bad_const_fn_body_ice.stderr | 3 +- .../ui/consts/min_const_fn/cast_errors.stderr | 15 +- .../min_const_fn/cmp_fn_pointers.stderr | 3 +- .../ui/consts/min_const_fn/loop_ice.stderr | 3 +- .../min_const_fn/min_const_fn.nll.stderr | 116 +- .../ui/consts/min_const_fn/min_const_fn.rs | 4 +- .../consts/min_const_fn/min_const_fn.stderr | 121 +- .../min_const_fn/min_const_fn_dyn.nll.stderr | 15 +- .../consts/min_const_fn/min_const_fn_dyn.rs | 3 + .../min_const_fn/min_const_fn_dyn.stderr | 21 +- .../min_const_fn/min_const_fn_fn_ptr.stderr | 6 +- .../min_const_fn_libstd_stability.rs | 6 +- .../min_const_fn_libstd_stability.stderr | 12 +- .../min_const_fn/min_const_fn_unsafe.stderr | 14 +- .../min_const_unsafe_fn_libstd_stability.rs | 7 +- ...in_const_unsafe_fn_libstd_stability.stderr | 12 +- .../min_const_unsafe_fn_libstd_stability2.rs | 6 +- ...n_const_unsafe_fn_libstd_stability2.stderr | 9 +- .../consts/min_const_fn/mutable_borrow.stderr | 6 +- .../consts/min_const_fn/promotion.nll.stderr | 68 - src/test/ui/consts/min_const_fn/promotion.rs | 12 +- .../ui/consts/min_const_fn/promotion.stderr | 62 +- ...gate-unleash_the_miri_inside_of_you.stderr | 1 - src/test/ui/consts/projection_qualif.stderr | 5 +- .../ui/consts/promote_const_let.nll.stderr | 29 - src/test/ui/consts/promote_const_let.rs | 2 +- src/test/ui/consts/promote_const_let.stderr | 26 +- .../promote_evaluation_unused_result.rs | 2 - src/test/ui/consts/promote_fn_calls.rs | 2 - src/test/ui/consts/promote_fn_calls_std.rs | 2 - .../ui/consts/single_variant_match_ice.stderr | 5 +- .../static_mut_containing_mut_ref2.stderr | 2 +- src/test/ui/consts/std/alloc.rs | 10 + src/test/ui/consts/std/alloc.stderr | 11 + src/test/ui/consts/union_constant.rs | 1 - .../ui/continue-after-missing-main.nll.stderr | 7 + src/test/ui/continue-after-missing-main.rs | 32 + .../ui/continue-after-missing-main.stderr | 16 + src/test/ui/custom_attribute.stderr | 9 +- ...le-projection-based-on-where-clause.stderr | 2 +- src/test/ui/defaulted-never-note.rs | 1 - .../ui/deprecation/deprecation-in-future.rs | 2 - .../deprecation/deprecation-in-future.stderr | 2 +- .../ui/deprecation/deprecation-sanity.stderr | 2 +- src/test/ui/derive-uninhabited-enum-38885.rs | 1 - src/test/ui/derives/deriving-copyclone.rs | 1 - .../ui/derives/deriving-meta-unknown-trait.rs | 2 - .../deriving-meta-unknown-trait.stderr | 2 +- ...eriving-no-inner-impl-error-message.stderr | 2 +- src/test/ui/derives/deriving-primitive.rs | 1 - src/test/ui/destructure-trait-ref.stderr | 14 +- src/test/ui/did_you_mean/bad-assoc-ty.stderr | 2 +- .../ui/did_you_mean/issue-31424.nll.stderr | 33 - src/test/ui/did_you_mean/issue-31424.stderr | 25 +- .../ui/did_you_mean/issue-34126.nll.stderr | 22 - src/test/ui/did_you_mean/issue-34126.rs | 1 + src/test/ui/did_you_mean/issue-34126.stderr | 26 +- .../ui/did_you_mean/issue-34337.nll.stderr | 12 - src/test/ui/did_you_mean/issue-34337.stderr | 12 +- .../ui/did_you_mean/issue-35937.nll.stderr | 28 - src/test/ui/did_you_mean/issue-35937.stderr | 21 +- .../ui/did_you_mean/issue-37139.nll.stderr | 12 - src/test/ui/did_you_mean/issue-37139.rs | 2 +- src/test/ui/did_you_mean/issue-37139.stderr | 12 +- .../ui/did_you_mean/issue-38147-1.nll.stderr | 11 - src/test/ui/did_you_mean/issue-38147-1.rs | 2 +- src/test/ui/did_you_mean/issue-38147-1.stderr | 8 +- .../ui/did_you_mean/issue-38147-2.nll.stderr | 12 - src/test/ui/did_you_mean/issue-38147-2.rs | 2 +- src/test/ui/did_you_mean/issue-38147-2.stderr | 4 +- .../ui/did_you_mean/issue-38147-3.nll.stderr | 12 - src/test/ui/did_you_mean/issue-38147-3.rs | 2 +- src/test/ui/did_you_mean/issue-38147-3.stderr | 4 +- .../ui/did_you_mean/issue-38147-4.nll.stderr | 11 - src/test/ui/did_you_mean/issue-38147-4.rs | 2 +- src/test/ui/did_you_mean/issue-38147-4.stderr | 8 +- .../ui/did_you_mean/issue-39544.nll.stderr | 102 - src/test/ui/did_you_mean/issue-39544.rs | 2 +- src/test/ui/did_you_mean/issue-39544.stderr | 95 +- src/test/ui/did_you_mean/issue-40396.stderr | 2 +- .../ui/did_you_mean/issue-40823.nll.stderr | 11 - src/test/ui/did_you_mean/issue-40823.rs | 2 +- src/test/ui/did_you_mean/issue-40823.stderr | 6 +- .../issue-42599_available_fields_note.stderr | 2 +- ...issue-43871-enum-instead-of-variant.stderr | 2 +- ...ssue-56028-there-is-an-enum-variant.stderr | 2 +- .../ui/did_you_mean/recursion_limit_deref.rs | 1 - .../did_you_mean/recursion_limit_deref.stderr | 2 +- .../ui/did_you_mean/recursion_limit_macro.rs | 1 - ...reference-without-parens-suggestion.stderr | 2 +- ...tructing-destructing-struct-let.nll.stderr | 17 - ...constructing-destructing-struct-let.stderr | 15 +- ...ucting-destructing-struct-match.nll.stderr | 17 - ...deconstructing-destructing-struct-match.rs | 2 +- ...nstructing-destructing-struct-match.stderr | 16 +- src/test/ui/discrim/discrim-ill-typed.stderr | 32 + src/test/ui/discrim/discrim-overflow-2.rs | 2 - src/test/ui/discrim/discrim-overflow-2.stderr | 16 +- src/test/ui/discrim/discrim-overflow.rs | 2 - src/test/ui/discrim/discrim-overflow.stderr | 16 +- .../dollar-crate-is-keyword-2.stderr | 2 +- src/test/ui/dropck/drop-on-non-struct.stderr | 2 +- .../drop-with-active-borrows-1.nll.stderr | 13 - .../dropck/drop-with-active-borrows-1.stderr | 2 + .../drop-with-active-borrows-2.nll.stderr | 12 - .../ui/dropck/drop-with-active-borrows-2.rs | 2 +- .../dropck/drop-with-active-borrows-2.stderr | 18 +- .../dropck-eyepatch-extern-crate.ast.stderr | 69 - .../dropck-eyepatch-extern-crate.nll.stderr | 17 - .../ui/dropck/dropck-eyepatch-extern-crate.rs | 102 +- .../dropck-eyepatch-extern-crate.stderr | 31 + .../dropck/dropck-eyepatch-reorder.ast.stderr | 69 - .../dropck/dropck-eyepatch-reorder.nll.stderr | 17 - src/test/ui/dropck/dropck-eyepatch-reorder.rs | 115 +- .../ui/dropck/dropck-eyepatch-reorder.stderr | 31 + src/test/ui/dropck/dropck-eyepatch.ast.stderr | 69 - src/test/ui/dropck/dropck-eyepatch.nll.stderr | 17 - src/test/ui/dropck/dropck-eyepatch.rs | 118 +- src/test/ui/dropck/dropck-eyepatch.stderr | 31 + src/test/ui/dropck/dropck-union.nll.stderr | 14 - src/test/ui/dropck/dropck-union.stderr | 11 +- .../dropck_no_diverge_on_nonregular_1.stderr | 1 - .../dropck_no_diverge_on_nonregular_2.stderr | 1 - .../dropck_no_diverge_on_nonregular_3.stderr | 1 - .../dropck_trait_cycle_checked.nll.stderr | 73 - .../dropck/dropck_trait_cycle_checked.stderr | 65 +- src/test/ui/dst/dst-bad-assign-3.stderr | 2 +- src/test/ui/dst/dst-bad-assign.stderr | 2 +- src/test/ui/dst/dst-bad-coerce1.stderr | 2 +- src/test/ui/dst/dst-bad-coerce3.nll.stderr | 58 - src/test/ui/dst/dst-bad-coerce3.stderr | 67 +- src/test/ui/dst/dst-index.nll.stderr | 28 - src/test/ui/dst/dst-index.rs | 4 +- src/test/ui/dst/dst-index.stderr | 12 +- src/test/ui/dst/dst-rvalue.nll.stderr | 28 - src/test/ui/dst/dst-rvalue.rs | 2 +- src/test/ui/dst/dst-rvalue.stderr | 6 +- src/test/ui/duplicate/dupe-symbols-7.rs | 4 + src/test/ui/duplicate/dupe-symbols-7.stderr | 2 +- .../duplicate/duplicate-type-parameter.stderr | 2 +- src/test/ui/dyn-trait-compatibility.stderr | 2 +- src/test/ui/e0119/complex-impl.stderr | 2 +- src/test/ui/e0119/conflict-with-std.rs | 1 - src/test/ui/e0119/conflict-with-std.stderr | 6 +- src/test/ui/e0119/issue-28981.stderr | 2 +- .../editions/edition-deny-async-fns-2015.rs | 2 +- .../edition-deny-async-fns-2015.stderr | 3 +- .../edition-raw-pointer-method-2015.rs | 1 - .../edition-raw-pointer-method-2015.stderr | 4 +- .../edition-raw-pointer-method-2018.rs | 1 - .../edition-raw-pointer-method-2018.stderr | 2 +- .../ui/emit-artifact-notifications.nll.stderr | 1 + src/test/ui/emit-artifact-notifications.rs | 6 + .../ui/emit-artifact-notifications.stderr | 1 + .../ui/empty/empty-never-array.nll.stderr | 23 + src/test/ui/empty/empty-never-array.rs | 3 + src/test/ui/empty/empty-never-array.stderr | 12 +- src/test/ui/empty/empty-struct-braces-expr.rs | 6 +- .../ui/empty/empty-struct-braces-expr.stderr | 22 +- .../ui/empty/empty-struct-tuple-pat.stderr | 2 +- src/test/ui/enum-variant-generic-args.stderr | 2 +- src/test/ui/enum/enum-discrim-too-small2.rs | 8 +- .../ui/enum/enum-discrim-too-small2.stderr | 8 +- src/test/ui/enum/enum-variant-type-2.stderr | 1 - src/test/ui/enums-pats-not-idents.stderr | 1 - src/test/ui/error-codes/E0007.rs | 1 + src/test/ui/error-codes/E0007.stderr | 16 +- src/test/ui/error-codes/E0008.nll.stderr | 11 - src/test/ui/error-codes/E0008.stderr | 2 + src/test/ui/error-codes/E0010-teach.stderr | 2 +- src/test/ui/error-codes/E0010.stderr | 2 +- src/test/ui/error-codes/E0017.nll.stderr | 34 - src/test/ui/error-codes/E0017.stderr | 8 +- src/test/ui/error-codes/E0030-teach.rs | 1 + src/test/ui/error-codes/E0030-teach.stderr | 8 +- src/test/ui/error-codes/E0033-teach.stderr | 2 +- src/test/ui/error-codes/E0033.stderr | 2 +- src/test/ui/error-codes/E0067.stderr | 2 +- src/test/ui/error-codes/E0070.stderr | 2 +- src/test/ui/error-codes/E0117.stderr | 2 +- ...{E0161.ast.stderr => E0161.migrate.stderr} | 0 ...61.astul.stderr => E0161.migrateul.stderr} | 0 src/test/ui/error-codes/E0161.rs | 12 +- src/test/ui/error-codes/E0206.stderr | 2 +- src/test/ui/error-codes/E0220.stderr | 2 +- src/test/ui/error-codes/E0254.rs | 1 - src/test/ui/error-codes/E0254.stderr | 2 +- src/test/ui/error-codes/E0259.rs | 2 +- src/test/ui/error-codes/E0260.rs | 1 - src/test/ui/error-codes/E0260.stderr | 2 +- src/test/ui/error-codes/E0301.nll.stderr | 11 - src/test/ui/error-codes/E0301.rs | 2 +- src/test/ui/error-codes/E0301.stderr | 15 +- src/test/ui/error-codes/E0302.rs | 1 + src/test/ui/error-codes/E0302.stderr | 10 +- src/test/ui/error-codes/E0303.stderr | 2 +- src/test/ui/error-codes/E0375.rs | 2 - src/test/ui/error-codes/E0375.stderr | 2 +- src/test/ui/error-codes/E0388.nll.stderr | 34 - src/test/ui/error-codes/E0388.stderr | 8 +- src/test/ui/error-codes/E0389.nll.stderr | 11 - src/test/ui/error-codes/E0389.rs | 2 +- src/test/ui/error-codes/E0389.stderr | 7 +- src/test/ui/error-codes/E0392.stderr | 2 +- src/test/ui/error-codes/E0395.rs | 4 +- src/test/ui/error-codes/E0395.stderr | 3 +- src/test/ui/error-codes/E0396.stderr | 3 +- src/test/ui/error-codes/E0401.stderr | 4 +- src/test/ui/error-codes/E0423.rs | 6 +- src/test/ui/error-codes/E0423.stderr | 54 +- src/test/ui/error-codes/E0430.stderr | 2 +- src/test/ui/error-codes/E0458.stderr | 2 +- src/test/ui/error-codes/E0499.nll.stderr | 14 - src/test/ui/error-codes/E0499.stderr | 12 +- src/test/ui/error-codes/E0502.nll.stderr | 4 +- src/test/ui/error-codes/E0502.stderr | 9 +- src/test/ui/error-codes/E0503.nll.stderr | 13 - src/test/ui/error-codes/E0503.stderr | 4 +- src/test/ui/error-codes/E0504.nll.stderr | 17 - src/test/ui/error-codes/E0504.rs | 4 +- src/test/ui/error-codes/E0504.stderr | 17 +- src/test/ui/error-codes/E0505.nll.stderr | 13 - src/test/ui/error-codes/E0505.stderr | 4 +- src/test/ui/error-codes/E0509.nll.stderr | 12 - src/test/ui/error-codes/E0509.stderr | 2 +- src/test/ui/error-codes/E0511.stderr | 1 - src/test/ui/error-codes/E0597.nll.stderr | 17 - src/test/ui/error-codes/E0597.stderr | 11 +- ...1-does-not-trigger-for-closures.nll.stderr | 11 + ...E0621-does-not-trigger-for-closures.stderr | 1 - src/test/ui/error-codes/E0637.stderr | 1 - src/test/ui/error-codes/E0657.stderr | 1 - src/test/ui/error-codes/E0658.stderr | 3 +- src/test/ui/error-codes/E0719.stderr | 1 - src/test/ui/error-festival.stderr | 2 +- ...sive_range_pattern_syntax_collision.stderr | 4 +- ...ive_range_pattern_syntax_collision2.stderr | 4 +- src/test/ui/existential-type/issue-60371.rs | 15 + .../ui/existential-type/issue-60371.stderr | 29 + .../auxiliary/cross_crate_ice.rs | 1 - .../existential-types-with-no-traits.rs | 14 + .../existential-types-with-no-traits.stderr | 14 + .../generic_duplicate_param_use7.rs | 1 - .../generic_nondefining_use.rs | 2 + .../generic_nondefining_use.stderr | 10 +- .../ui/existential_types/generic_not_used.rs | 1 + .../existential_types/generic_not_used.stderr | 10 +- ..._type_does_not_live_long_enough.nll.stderr | 18 + .../generic_type_does_not_live_long_enough.rs | 1 + ...eric_type_does_not_live_long_enough.stderr | 10 +- .../generic_underconstrained.rs | 1 + .../generic_underconstrained.stderr | 8 +- .../generic_underconstrained2.rs | 2 + .../generic_underconstrained2.stderr | 16 +- .../issue-60655-latebound-regions.rs | 30 + .../nested_existential_types.rs | 1 - .../never_reveal_concrete_type.stderr | 2 +- .../existential_types/unused_generic_param.rs | 5 +- .../unused_generic_param.stderr | 14 + src/test/ui/explore-issue-38412.stderr | 23 +- src/test/ui/export.stderr | 2 +- src/test/ui/extern-prelude-fail.stderr | 2 +- src/test/ui/fat-ptr-cast.stderr | 2 +- .../ui/feature-gate-optimize_attribute.rs | 10 +- .../ui/feature-gate-optimize_attribute.stderr | 18 +- .../ui/feature-gate/allow-features-empty.rs | 2 + .../feature-gate/allow-features-empty.stderr | 8 +- src/test/ui/feature-gate/allow-features.rs | 2 + .../ui/feature-gate/allow-features.stderr | 8 +- src/test/ui/feature-gate/await-macro.rs | 12 + src/test/ui/feature-gate/await-macro.stderr | 12 + .../feature-gate/feature-gate-c_variadic.rs | 2 +- .../feature-gate-c_variadic.stderr | 3 +- .../feature-gate-static-nobundle-2.stderr | 3 +- .../issue-43106-gating-of-builtin-attrs.rs | 2 - ...issue-43106-gating-of-builtin-attrs.stderr | 358 +- .../stability-attribute-consistency.stderr | 1 - .../auxiliary/re_rebalance_coherence_lib.rs | 3 +- .../feature-gate-abi-msp430-interrupt.stderr | 3 +- .../ui/feature-gates/feature-gate-abi.stderr | 126 +- .../feature-gate-alloc-error-handler.rs | 2 +- .../feature-gate-alloc-error-handler.stderr | 3 +- .../feature-gate-allocator_internals.rs | 1 - .../feature-gate-allow_fail.stderr | 3 +- .../feature-gate-arbitrary-self-types.stderr | 9 +- ...te-arbitrary_self_types-raw-pointer.stderr | 9 +- .../ui/feature-gates/feature-gate-asm.stderr | 3 +- .../ui/feature-gates/feature-gate-asm2.stderr | 3 +- .../feature-gate-assoc-type-defaults.stderr | 3 +- .../feature-gate-async-await-2015-edition.rs | 2 - ...ature-gate-async-await-2015-edition.stderr | 13 +- .../feature-gates/feature-gate-async-await.rs | 11 +- .../feature-gate-async-await.stderr | 41 +- .../feature-gate-box-expr.stderr | 3 +- .../feature-gate-box_patterns.stderr | 3 +- .../feature-gates/feature-gate-box_syntax.rs | 2 +- .../feature-gate-box_syntax.stderr | 3 +- .../feature-gate-cfg-target-has-atomic.rs | 36 +- .../feature-gate-cfg-target-has-atomic.stderr | 54 +- .../feature-gate-cfg-target-thread-local.rs | 2 +- ...eature-gate-cfg-target-thread-local.stderr | 3 +- .../feature-gate-compiler-builtins.rs | 1 - .../feature-gate-concat_idents.stderr | 6 +- .../feature-gate-concat_idents2.stderr | 5 +- .../feature-gate-concat_idents3.stderr | 6 +- .../feature-gate-const_fn.stderr | 8 +- .../feature-gate-const_generics.stderr | 6 +- .../feature-gate-const_transmute.rs | 2 +- .../feature-gate-const_transmute.stderr | 3 +- ...ture-gate-crate_visibility_modifier.stderr | 3 +- .../feature-gate-custom_attribute.stderr | 39 +- .../feature-gate-custom_attribute2.stderr | 51 +- ...feature-gate-custom_test_frameworks.stderr | 3 +- .../feature-gates/feature-gate-decl_macro.rs | 2 +- .../feature-gate-decl_macro.stderr | 3 +- .../feature-gate-doc_alias.stderr | 3 +- .../feature-gate-doc_cfg-cfg-rustdoc.stderr | 3 +- .../feature-gates/feature-gate-doc_cfg.stderr | 3 +- .../feature-gate-doc_keyword.stderr | 3 +- .../feature-gate-doc_masked.stderr | 3 +- .../feature-gate-doc_spotlight.stderr | 3 +- .../feature-gate-dropck-ugeh.stderr | 3 +- ...eature-gate-exclusive-range-pattern.stderr | 3 +- .../feature-gate-exhaustive-patterns.rs | 1 - .../feature-gate-existential-type.stderr | 6 +- .../feature-gate-extern_absolute_paths.stderr | 2 +- .../feature-gate-extern_types.stderr | 3 +- .../feature-gate-external_doc.stderr | 3 +- .../feature-gate-ffi_returns_twice.rs | 3 +- .../feature-gate-ffi_returns_twice.stderr | 5 +- .../feature-gate-fundamental.stderr | 3 +- .../feature-gate-generators.stderr | 6 +- ...ature-gate-generic_associated_types.stderr | 21 +- .../feature-gate-global_asm.stderr | 3 +- .../feature-gate-intrinsics.stderr | 2 +- .../feature-gate-is_sorted.stderr | 12 +- .../feature-gate-label_break_value.stderr | 3 +- .../feature-gate-lang-items.stderr | 2 +- .../feature-gate-link_args.stderr | 9 +- .../feature-gate-link_cfg.stderr | 3 +- .../feature-gate-link_llvm_intrinsics.stderr | 3 +- .../feature-gates/feature-gate-linkage.stderr | 3 +- .../feature-gate-lint-reasons.stderr | 3 +- .../feature-gate-log_syntax.stderr | 3 +- .../feature-gate-log_syntax2.stderr | 3 +- .../feature-gate-macros_in_extern.stderr | 9 +- .../ui/feature-gates/feature-gate-main.stderr | 3 +- .../feature-gate-marker_trait_attr.rs | 2 +- .../feature-gate-marker_trait_attr.stderr | 3 +- .../feature-gate-may-dangle.stderr | 3 +- .../feature-gate-min_const_fn.stderr | 8 +- .../feature-gate-naked_functions.stderr | 6 +- .../feature-gate-needs-allocator.rs | 1 - .../feature-gate-never_type.stderr | 15 +- src/test/ui/feature-gates/feature-gate-nll.rs | 23 +- .../ui/feature-gates/feature-gate-nll.stderr | 32 +- .../feature-gate-no-debug.stderr | 3 +- .../feature-gates/feature-gate-no_core.stderr | 3 +- .../feature-gate-non_ascii_idents.stderr | 39 +- .../feature-gate-non_exhaustive.rs | 2 +- .../feature-gate-non_exhaustive.stderr | 3 +- .../feature-gate-on-unimplemented.stderr | 3 +- .../feature-gate-optin-builtin-traits.stderr | 6 +- .../feature-gates/feature-gate-plugin.stderr | 3 +- .../feature-gate-plugin_registrar.stderr | 3 +- .../feature-gate-repr-simd.stderr | 9 +- .../feature-gates/feature-gate-repr128.stderr | 3 +- .../feature-gate-repr_align_enum.rs | 2 +- .../feature-gate-repr_align_enum.stderr | 3 +- .../feature-gate-rustc-attrs-1.stderr | 6 +- .../feature-gate-rustc-attrs.stderr | 3 +- .../feature-gate-rustc_const_unstable.rs | 1 - .../ui/feature-gates/feature-gate-simd.stderr | 3 +- .../feature-gate-slice-patterns.stderr | 18 +- .../feature-gates/feature-gate-start.stderr | 3 +- .../feature-gate-static-nobundle.stderr | 3 +- .../feature-gate-stmt_expr_attributes.rs | 2 +- .../feature-gate-stmt_expr_attributes.stderr | 3 +- .../feature-gate-thread_local.stderr | 3 +- .../feature-gate-trace_macros.stderr | 3 +- .../feature-gate-trait-alias.stderr | 3 +- .../feature-gate-try_blocks.stderr | 3 +- .../feature-gate-try_reserve.stderr | 3 +- .../feature-gate-type_ascription.stderr | 3 +- ...-gate-unboxed-closures-manual-impls.stderr | 23 +- ...-gate-unboxed-closures-method-calls.stderr | 9 +- ...re-gate-unboxed-closures-ufcs-calls.stderr | 9 +- .../feature-gate-unboxed-closures.rs | 2 +- .../feature-gate-unboxed-closures.stderr | 6 +- ...feature-gate-underscore_const_names.stderr | 3 +- ...feature-gate-unsized_tuple_coercion.stderr | 3 +- .../feature-gate-untagged_unions.stderr | 9 +- .../feature-gate-unwind-attributes.stderr | 3 +- ...underscore_const_names_feature_gate.stderr | 3 +- src/test/ui/ffi_returns_twice.rs | 1 - src/test/ui/ffi_returns_twice.stderr | 3 +- ...loat-literal-inference-restrictions.stderr | 4 + src/test/ui/fmt/format-string-error-2.rs | 2 +- src/test/ui/fmt/format-string-error-2.stderr | 46 +- .../fn/fn-closure-mutable-capture.nll.stderr | 15 - src/test/ui/fn/fn-closure-mutable-capture.rs | 5 +- .../ui/fn/fn-closure-mutable-capture.stderr | 8 +- src/test/ui/fn/fn-compare-mismatch.stderr | 10 +- src/test/ui/fn/fn-trait-formatting.stderr | 2 +- ...ional-struct-update-noncopyable.nll.stderr | 9 - ...unctional-struct-update-noncopyable.stderr | 4 +- src/test/ui/gated-bad-feature.stderr | 3 +- .../generator-yielding-or-returning-itself.rs | 2 +- ...erator-yielding-or-returning-itself.stderr | 24 +- .../generator/auto-trait-regions.nll.stderr | 41 + src/test/ui/generator/borrowing.nll.stderr | 34 - src/test/ui/generator/borrowing.rs | 1 - src/test/ui/generator/borrowing.stderr | 26 +- src/test/ui/generator/dropck.nll.stderr | 34 - src/test/ui/generator/dropck.stderr | 16 +- ...erator-region-requirements.migrate.stderr} | 0 .../generator-region-requirements.rs | 7 +- ...r => generator-region-requirements.stderr} | 2 +- src/test/ui/generator/generator-with-nll.rs | 1 - .../ui/generator/generator-with-nll.stderr | 2 +- src/test/ui/generator/issue-53548.rs | 1 - .../no-arguments-on-generators.stderr | 1 - .../ref-escapes-but-not-over-yield.nll.stderr | 15 - .../ref-escapes-but-not-over-yield.rs | 2 +- .../ref-escapes-but-not-over-yield.stderr | 18 +- .../type-mismatch-signature-deduction.rs | 17 + .../type-mismatch-signature-deduction.stderr | 12 + .../ui/generator/unresolved_type_param.rs | 15 + .../ui/generator/unresolved_type_param.stderr | 15 + .../ui/generator/yield-in-args.nll.stderr | 9 - src/test/ui/generator/yield-in-args.stderr | 4 +- src/test/ui/generator/yield-in-const.stderr | 1 - .../ui/generator/yield-in-function.stderr | 1 - src/test/ui/generator/yield-in-static.stderr | 1 - .../yield-while-iterating.nll.stderr | 25 - .../ui/generator/yield-while-iterating.stderr | 11 +- .../generator/yield-while-local-borrowed.rs | 8 +- .../yield-while-local-borrowed.stderr | 32 +- .../yield-while-ref-reborrowed.nll.stderr | 16 - .../yield-while-ref-reborrowed.stderr | 9 +- .../generic-arg-mismatch-recover.stderr | 2 +- src/test/ui/glob-resolve1.stderr | 2 +- .../ui/hashmap-iter-value-lifetime.nll.stderr | 2 +- .../ui/hashmap-iter-value-lifetime.stderr | 8 +- src/test/ui/hashmap-lifetimes.nll.stderr | 2 +- src/test/ui/hashmap-lifetimes.stderr | 5 +- ...ubtype.free_inv_x_vs_free_inv_y.nll.stderr | 30 + .../hr-subtype.free_x_vs_free_y.nll.stderr | 16 + .../ui/hrtb/hrtb-cache-issue-54302.nll.stderr | 8 + .../hrtb/hrtb-debruijn-in-receiver.nll.stderr | 14 - .../ui/hrtb/hrtb-debruijn-in-receiver.stderr | 7 +- .../hrtb/hrtb-identity-fn-borrows.ast.stderr | 11 - .../hrtb/hrtb-identity-fn-borrows.mir.stderr | 14 - src/test/ui/hrtb/hrtb-identity-fn-borrows.rs | 6 +- ...stderr => hrtb-identity-fn-borrows.stderr} | 2 +- .../hrtb/hrtb-perfect-forwarding.nll.stderr | 77 + src/test/ui/huge-array-simple.rs | 4 + src/test/ui/huge-array.rs | 4 + src/test/ui/huge-enum.rs | 4 + src/test/ui/huge-struct.rs | 4 + src/test/ui/hygiene/assoc_item_ctxt.stderr | 2 +- src/test/ui/hygiene/fields-move.nll.stderr | 38 - src/test/ui/hygiene/fields-move.stderr | 23 +- .../fields-numeric-borrowck.nll.stderr | 14 - .../ui/hygiene/fields-numeric-borrowck.stderr | 6 +- src/test/ui/hygiene/hygienic-label-1.stderr | 2 +- src/test/ui/hygiene/hygienic-label-2.stderr | 2 +- src/test/ui/hygiene/hygienic-label-3.stderr | 2 +- src/test/ui/hygiene/hygienic-label-4.stderr | 2 +- src/test/ui/hygiene/no_implicit_prelude.rs | 2 +- .../ui/hygiene/no_implicit_prelude.stderr | 8 +- src/test/ui/if/if-let-arm-types.rs | 5 +- src/test/ui/if/if-let-arm-types.stderr | 8 +- src/test/ui/if/if-no-match-bindings.rs | 22 + src/test/ui/if/if-no-match-bindings.stderr | 39 + src/test/ui/if/if-without-else-as-fn-expr.rs | 30 + .../ui/if/if-without-else-as-fn-expr.stderr | 123 +- .../ui/immut-function-arguments.ast.stderr | 19 - .../ui/immut-function-arguments.mir.stderr | 19 - src/test/ui/immut-function-arguments.rs | 9 +- ...stderr => immut-function-arguments.stderr} | 5 +- .../dyn-trait.nll.stderr | 10 + .../dyn-trait.stderr | 1 - .../path-elided.rs | 2 +- .../path-elided.stderr | 5 +- .../trait-elided.rs | 2 +- .../trait-elided.stderr | 5 +- src/test/ui/impl-trait/auto-trait-leak.rs | 2 - src/test/ui/impl-trait/auto-trait-leak.stderr | 26 +- src/test/ui/impl-trait/auto-trait-leak2.rs | 3 - .../ui/impl-trait/auto-trait-leak2.stderr | 12 +- src/test/ui/impl-trait/bindings-opaque.rs | 1 + src/test/ui/impl-trait/bindings-opaque.stderr | 12 +- src/test/ui/impl-trait/bindings.rs | 1 + src/test/ui/impl-trait/bindings.stderr | 14 +- .../can-return-unconstrained-closure.rs | 23 + .../impl-trait/closure-calling-parent-fn.rs | 2 - src/test/ui/impl-trait/equality.stderr | 2 +- .../impl-trait/impl_trait_projections.stderr | 3 +- .../issue-55608-captures-empty-region.rs | 4 +- .../issue-55608-captures-empty-region.stderr | 11 - .../issue-57464-unexpected-regions.rs | 29 + ...ply-nested-impl-trait-in-assoc-proj.stderr | 1 - .../method-suggestion-no-duplication.rs | 2 - .../method-suggestion-no-duplication.stderr | 2 +- ...t_outlive_least_region_or_bound.nll.stderr | 51 + .../must_outlive_least_region_or_bound.stderr | 3 +- .../recursive-async-impl-trait-type.rs | 2 +- .../impl-trait/recursive-impl-trait-type.rs | 2 +- ...-escape-via-bound-contravariant-closure.rs | 1 - .../region-escape-via-bound-contravariant.rs | 1 - .../ui/impl-trait/region-escape-via-bound.rs | 1 - .../impl-trait/region-escape-via-bound.stderr | 6 +- .../static-return-lifetime-infered.nll.stderr | 26 + src/test/ui/impl-trait/trait_type.stderr | 2 +- .../type_parameters_captured.nll.stderr | 11 + .../impl-trait/universal-issue-48703.stderr | 1 - ...sal-turbofish-in-method-issue-50950.stderr | 1 - src/test/ui/impl-trait/where-allowed.stderr | 3 +- src/test/ui/import.stderr | 2 +- src/test/ui/imports/duplicate.stderr | 2 +- src/test/ui/imports/extern-crate-used.rs | 12 +- src/test/ui/imports/extern-crate-used.stderr | 34 +- src/test/ui/imports/issue-53269.rs | 2 +- src/test/ui/imports/issue-53269.stderr | 2 +- src/test/ui/imports/issue-53512.rs | 2 +- src/test/ui/imports/issue-56125.stderr | 2 +- .../local-modularized-tricky-fail-1.rs | 1 - .../local-modularized-tricky-fail-1.stderr | 24 +- .../local-modularized-tricky-fail-2.stderr | 9 +- src/test/ui/imports/reexports.stderr | 2 +- .../ui/imports/unresolved-imports-used.rs | 12 + .../ui/imports/unresolved-imports-used.stderr | 22 + src/test/ui/in-band-lifetimes/E0687.stderr | 1 - .../ui/in-band-lifetimes/E0687_where.stderr | 1 - src/test/ui/in-band-lifetimes/E0688.stderr | 1 - .../in-band-lifetimes/mismatched.nll.stderr | 20 + .../ui/in-band-lifetimes/mismatched.stderr | 3 +- .../mismatched_trait_impl-2.stderr | 1 - .../mismatched_trait_impl.nll.stderr | 24 + .../mismatched_trait_impl.rs | 2 +- .../mismatched_trait_impl.stderr | 13 +- .../mut_while_borrow.nll.stderr | 13 - .../in-band-lifetimes/mut_while_borrow.stderr | 4 +- src/test/ui/indexing-requires-a-uint.stderr | 6 +- .../inference_unstable_forced.stderr | 3 +- .../ui/infinite/infinite-autoderef.stderr | 2 +- .../infinite/infinite-tag-type-recursion.rs | 1 + .../infinite-tag-type-recursion.stderr | 14 +- src/test/ui/inline-asm-bad-constraint.stderr | 1 - src/test/ui/inline-asm-bad-operand.stderr | 1 - .../ui/inner-static-type-parameter.stderr | 6 +- .../integer-literal-suffix-inference.stderr | 234 +- .../invalid-module-declaration.rs | 2 - src/test/ui/invalid/invalid-inline.stderr | 2 +- .../ui/invalid_dispatch_from_dyn_impls.rs | 9 + .../ui/invalid_dispatch_from_dyn_impls.stderr | 15 +- src/test/ui/issue-53249.rs | 47 + src/test/ui/issue-59756.fixed | 17 + src/test/ui/issue-59756.rs | 17 + src/test/ui/issue-59756.stderr | 15 + src/test/ui/issue-59764.rs | 136 + src/test/ui/issue-59764.stderr | 241 + src/test/ui/issue-60075.rs | 12 + src/test/ui/issue-60075.stderr | 35 + src/test/ui/issue-60622.rs | 18 + src/test/ui/issue-60622.stderr | 27 + src/test/ui/issues/issue-10291.nll.stderr | 11 + src/test/ui/issues/issue-10291.stderr | 1 - src/test/ui/issues/issue-10398.nll.stderr | 13 - src/test/ui/issues/issue-10398.stderr | 2 +- src/test/ui/issues/issue-10412.rs | 3 +- src/test/ui/issues/issue-10412.stderr | 21 +- src/test/ui/issues/issue-11192.nll.stderr | 17 - src/test/ui/issues/issue-11192.stderr | 13 +- src/test/ui/issues/issue-11493.ast.stderr | 16 - src/test/ui/issues/issue-11493.mir.stderr | 16 - src/test/ui/issues/issue-11493.rs | 11 +- src/test/ui/issues/issue-11493.stderr | 15 + src/test/ui/issues/issue-11681.nll.stderr | 11 - src/test/ui/issues/issue-11681.rs | 4 +- src/test/ui/issues/issue-11681.stderr | 17 +- src/test/ui/issues/issue-11873.nll.stderr | 16 - src/test/ui/issues/issue-11873.stderr | 11 +- src/test/ui/issues/issue-12028.stderr | 1 - src/test/ui/issues/issue-12041.nll.stderr | 11 - src/test/ui/issues/issue-12041.stderr | 4 +- src/test/ui/issues/issue-12470.nll.stderr | 11 - src/test/ui/issues/issue-12470.rs | 4 +- src/test/ui/issues/issue-12470.stderr | 17 +- src/test/ui/issues/issue-12567.nll.stderr | 45 - src/test/ui/issues/issue-12567.rs | 6 +- src/test/ui/issues/issue-12567.stderr | 56 +- src/test/ui/issues/issue-13058.nll.stderr | 12 + src/test/ui/issues/issue-13359.stderr | 8 + src/test/ui/issues/issue-13407.stderr | 2 +- src/test/ui/issues/issue-13497-2.nll.stderr | 14 - src/test/ui/issues/issue-13497-2.rs | 2 +- src/test/ui/issues/issue-13497-2.stderr | 22 +- src/test/ui/issues/issue-1362.stderr | 4 + src/test/ui/issues/issue-13853.stderr | 2 +- src/test/ui/issues/issue-1448-2.stderr | 4 + src/test/ui/issues/issue-15034.nll.stderr | 11 + src/test/ui/issues/issue-15381.nll.stderr | 16 + src/test/ui/issues/issue-15381.rs | 3 + src/test/ui/issues/issue-15381.stderr | 12 +- src/test/ui/issues/issue-15919.rs | 4 + src/test/ui/issues/issue-16048.rs | 2 + src/test/ui/issues/issue-16048.stderr | 13 +- src/test/ui/issues/issue-16538.stderr | 2 +- src/test/ui/issues/issue-16683.nll.stderr | 10 + src/test/ui/issues/issue-16683.stderr | 1 - src/test/ui/issues/issue-17001.stderr | 1 - src/test/ui/issues/issue-17263.ast.stderr | 26 - src/test/ui/issues/issue-17263.nll.stderr | 14 - src/test/ui/issues/issue-17263.rs | 22 +- src/test/ui/issues/issue-17385.nll.stderr | 24 - src/test/ui/issues/issue-17385.rs | 4 +- src/test/ui/issues/issue-17385.stderr | 13 +- src/test/ui/issues/issue-17405.stderr | 1 - src/test/ui/issues/issue-17458.stderr | 3 +- src/test/ui/issues/issue-17545.nll.stderr | 16 - src/test/ui/issues/issue-17545.rs | 2 +- src/test/ui/issues/issue-17545.stderr | 24 +- src/test/ui/issues/issue-17546.stderr | 1 - .../issue-17718-const-bad-values.stderr | 2 +- ...ssue-17718-constants-not-static.nll.stderr | 12 - .../issue-17718-constants-not-static.rs | 2 +- .../issue-17718-constants-not-static.stderr | 15 +- .../issues/issue-17718-static-move.nll.stderr | 12 - .../ui/issues/issue-17718-static-move.stderr | 2 +- src/test/ui/issues/issue-17728.nll.stderr | 21 + src/test/ui/issues/issue-17728.stderr | 3 +- src/test/ui/issues/issue-17758.nll.stderr | 10 + src/test/ui/issues/issue-17758.stderr | 1 - src/test/ui/issues/issue-17904-2.stderr | 2 +- src/test/ui/issues/issue-17913.rs | 4 + src/test/ui/issues/issue-17954.nll.stderr | 12 - src/test/ui/issues/issue-17954.rs | 7 +- src/test/ui/issues/issue-17954.stderr | 12 +- src/test/ui/issues/issue-18118.nll.stderr | 14 - src/test/ui/issues/issue-18118.stderr | 11 +- src/test/ui/issues/issue-18119.stderr | 1 - src/test/ui/issues/issue-18294.stderr | 3 +- src/test/ui/issues/issue-18566.nll.stderr | 12 - src/test/ui/issues/issue-18566.stderr | 6 +- src/test/ui/issues/issue-18783.nll.stderr | 33 - src/test/ui/issues/issue-18783.stderr | 12 +- src/test/ui/issues/issue-19163.nll.stderr | 9 - src/test/ui/issues/issue-19163.rs | 2 +- src/test/ui/issues/issue-19163.stderr | 2 +- src/test/ui/issues/issue-19883.stderr | 1 - src/test/ui/issues/issue-19991.stderr | 3 + src/test/ui/issues/issue-20091.rs | 1 + src/test/ui/issues/issue-20313.stderr | 3 +- src/test/ui/issues/issue-20413.stderr | 4 +- src/test/ui/issues/issue-20772.stderr | 2 +- src/test/ui/issues/issue-20801.nll.stderr | 39 - src/test/ui/issues/issue-20801.stderr | 20 +- .../ui/issues/issue-20831-debruijn.stderr | 3 +- src/test/ui/issues/issue-21177.stderr | 2 +- src/test/ui/issues/issue-21449.stderr | 1 - src/test/ui/issues/issue-2149.stderr | 2 +- src/test/ui/issues/issue-21600.nll.stderr | 34 - src/test/ui/issues/issue-21600.rs | 5 +- src/test/ui/issues/issue-21600.stderr | 33 +- src/test/ui/issues/issue-21763.stderr | 6 +- src/test/ui/issues/issue-21950.rs | 2 - src/test/ui/issues/issue-21950.stderr | 6 +- src/test/ui/issues/issue-22037.stderr | 1 - src/test/ui/issues/issue-22370.rs | 2 - src/test/ui/issues/issue-22370.stderr | 2 +- src/test/ui/issues/issue-22384.stderr | 1 - src/test/ui/issues/issue-22560.rs | 2 - src/test/ui/issues/issue-22560.stderr | 10 +- src/test/ui/issues/issue-22933-2.rs | 2 +- src/test/ui/issues/issue-22933-2.stderr | 6 +- src/test/ui/issues/issue-22933-3.stderr | 4 + src/test/ui/issues/issue-23024.stderr | 5 +- src/test/ui/issues/issue-23080-2.rs | 4 +- src/test/ui/issues/issue-23080-2.stderr | 4 +- src/test/ui/issues/issue-23080.rs | 2 - src/test/ui/issues/issue-23080.stderr | 2 +- src/test/ui/issues/issue-23173.rs | 12 +- src/test/ui/issues/issue-23173.stderr | 12 +- src/test/ui/issues/issue-23189.stderr | 1 - src/test/ui/issues/issue-23217.rs | 3 +- src/test/ui/issues/issue-23217.stderr | 8 +- src/test/ui/issues/issue-23281.rs | 2 - src/test/ui/issues/issue-23281.stderr | 2 +- src/test/ui/issues/issue-23302-1.stderr | 2 +- src/test/ui/issues/issue-23302-2.stderr | 2 +- src/test/ui/issues/issue-23302-3.rs | 1 + src/test/ui/issues/issue-23302-3.stderr | 24 +- src/test/ui/issues/issue-23589.stderr | 2 +- .../issues/issue-24267-flow-exit.nll.stderr | 15 - src/test/ui/issues/issue-24267-flow-exit.rs | 4 +- .../ui/issues/issue-24267-flow-exit.stderr | 4 +- src/test/ui/issues/issue-24357.nll.stderr | 16 - src/test/ui/issues/issue-24357.rs | 5 +- src/test/ui/issues/issue-24357.stderr | 15 +- src/test/ui/issues/issue-24363.stderr | 2 +- src/test/ui/issues/issue-25579.ast.nll.stderr | 9 - src/test/ui/issues/issue-25579.ast.stderr | 21 - src/test/ui/issues/issue-25579.mir.stderr | 9 - src/test/ui/issues/issue-25579.rs | 14 +- src/test/ui/issues/issue-25700.nll.stderr | 13 - src/test/ui/issues/issue-25700.stderr | 4 +- src/test/ui/issues/issue-25793.nll.stderr | 16 - src/test/ui/issues/issue-25793.stderr | 6 +- src/test/ui/issues/issue-25826.stderr | 3 +- src/test/ui/issues/issue-2590.nll.stderr | 9 - src/test/ui/issues/issue-2590.stderr | 2 +- src/test/ui/issues/issue-26217.nll.stderr | 10 + src/test/ui/issues/issue-26217.stderr | 1 - src/test/ui/issues/issue-26459.stderr | 1 - src/test/ui/issues/issue-26619.nll.stderr | 11 - src/test/ui/issues/issue-26619.rs | 2 +- src/test/ui/issues/issue-26619.stderr | 13 +- src/test/ui/issues/issue-26905.rs | 1 - src/test/ui/issues/issue-27592.nll.stderr | 21 - src/test/ui/issues/issue-27592.rs | 4 +- src/test/ui/issues/issue-27592.stderr | 26 +- src/test/ui/issues/issue-27815.stderr | 1 - src/test/ui/issues/issue-28344.stderr | 6 +- src/test/ui/issues/issue-28848.nll.stderr | 12 + src/test/ui/issues/issue-28971.rs | 4 +- src/test/ui/issues/issue-28971.stderr | 10 +- src/test/ui/issues/issue-28992-empty.stderr | 2 +- src/test/ui/issues/issue-29161.stderr | 2 +- src/test/ui/issues/issue-3021-c.stderr | 4 +- src/test/ui/issues/issue-30236.rs | 1 - src/test/ui/issues/issue-30240-b.rs | 1 - src/test/ui/issues/issue-30438-a.nll.stderr | 12 - src/test/ui/issues/issue-30438-a.rs | 2 +- src/test/ui/issues/issue-30438-a.stderr | 23 +- src/test/ui/issues/issue-30438-b.nll.stderr | 12 - src/test/ui/issues/issue-30438-b.rs | 2 +- src/test/ui/issues/issue-30438-b.stderr | 23 +- src/test/ui/issues/issue-30438-c.nll.stderr | 9 - src/test/ui/issues/issue-30438-c.rs | 2 +- src/test/ui/issues/issue-30438-c.stderr | 17 +- src/test/ui/issues/issue-30535.stderr | 1 - src/test/ui/issues/issue-30560.rs | 9 +- src/test/ui/issues/issue-30560.stderr | 8 +- src/test/ui/issues/issue-31173.stderr | 2 +- src/test/ui/issues/issue-31212.stderr | 2 +- src/test/ui/issues/issue-31769.stderr | 2 +- src/test/ui/issues/issue-31910.stderr | 4 + src/test/ui/issues/issue-3214.stderr | 4 +- src/test/ui/issues/issue-32655.stderr | 6 +- src/test/ui/issues/issue-32709.stderr | 7 +- src/test/ui/issues/issue-32829.stderr | 3 +- src/test/ui/issues/issue-32963.stderr | 2 +- src/test/ui/issues/issue-33140.stderr | 3 +- src/test/ui/issues/issue-33264.rs | 1 - src/test/ui/issues/issue-33287.rs | 1 - src/test/ui/issues/issue-33525.stderr | 2 +- src/test/ui/issues/issue-33819.nll.stderr | 12 - src/test/ui/issues/issue-33819.rs | 3 +- src/test/ui/issues/issue-33819.stderr | 9 +- src/test/ui/issues/issue-33903.rs | 1 - src/test/ui/issues/issue-34209.rs | 3 +- src/test/ui/issues/issue-34209.stderr | 11 +- src/test/ui/issues/issue-34334.stderr | 2 +- src/test/ui/issues/issue-34721.rs | 2 - src/test/ui/issues/issue-34721.stderr | 2 +- src/test/ui/issues/issue-35675.stderr | 2 +- src/test/ui/issues/issue-36082.ast.nll.stderr | 16 - src/test/ui/issues/issue-36082.ast.stderr | 16 - src/test/ui/issues/issue-36082.rs | 18 +- ...ue-36082.mir.stderr => issue-36082.stderr} | 2 +- src/test/ui/issues/issue-36163.stderr | 2 +- src/test/ui/issues/issue-36299.stderr | 4 +- src/test/ui/issues/issue-36400.nll.stderr | 11 - src/test/ui/issues/issue-36400.rs | 2 +- src/test/ui/issues/issue-36400.stderr | 8 +- src/test/ui/issues/issue-36638.stderr | 2 +- src/test/ui/issues/issue-37534.stderr | 4 +- src/test/ui/issues/issue-37550.stderr | 3 +- src/test/ui/issues/issue-3763.stderr | 2 +- src/test/ui/issues/issue-37887.stderr | 5 +- src/test/ui/issues/issue-38293.stderr | 2 +- src/test/ui/issues/issue-38857.stderr | 2 +- src/test/ui/issues/issue-38940.stderr | 2 +- src/test/ui/issues/issue-39175.rs | 1 + src/test/ui/issues/issue-39175.stderr | 2 +- src/test/ui/issues/issue-39559-2.stderr | 2 +- src/test/ui/issues/issue-3973.stderr | 2 +- src/test/ui/issues/issue-40288.nll.stderr | 15 - src/test/ui/issues/issue-40288.stderr | 5 +- .../issue-40402-1.nll.stderr | 12 - .../issue-40402-ref-hints/issue-40402-1.rs | 2 +- .../issue-40402-1.stderr | 6 +- .../issue-40402-2.nll.stderr | 20 - .../issue-40402-ref-hints/issue-40402-2.rs | 2 +- .../issue-40402-2.stderr | 18 +- .../issues/issue-40510-1.migrate.nll.stderr | 13 + .../ui/issues/issue-40510-1.migrate.stderr | 21 + src/test/ui/issues/issue-40510-1.nll.stderr | 8 +- src/test/ui/issues/issue-40510-1.rs | 12 +- .../issues/issue-40510-3.migrate.nll.stderr | 15 + .../ui/issues/issue-40510-3.migrate.stderr | 23 + src/test/ui/issues/issue-40510-3.nll.stderr | 8 +- src/test/ui/issues/issue-40510-3.rs | 12 +- src/test/ui/issues/issue-40782.rs | 1 - src/test/ui/issues/issue-41139.nll.stderr | 9 - src/test/ui/issues/issue-41139.rs | 2 +- src/test/ui/issues/issue-41139.stderr | 2 +- src/test/ui/issues/issue-41255.rs | 2 + src/test/ui/issues/issue-41255.stderr | 27 +- src/test/ui/issues/issue-41394.stderr | 2 +- src/test/ui/issues/issue-41726.nll.stderr | 11 - src/test/ui/issues/issue-41726.rs | 2 +- src/test/ui/issues/issue-41726.stderr | 2 +- src/test/ui/issues/issue-41974.stderr | 2 +- src/test/ui/issues/issue-42060.rs | 1 - src/test/ui/issues/issue-42060.stderr | 2 +- src/test/ui/issues/issue-42106.nll.stderr | 13 - src/test/ui/issues/issue-42106.stderr | 7 +- src/test/ui/issues/issue-42344.nll.stderr | 9 - src/test/ui/issues/issue-42344.rs | 3 +- src/test/ui/issues/issue-42344.stderr | 6 +- src/test/ui/issues/issue-42796.nll.stderr | 14 - src/test/ui/issues/issue-42796.rs | 2 +- src/test/ui/issues/issue-42796.stderr | 10 +- src/test/ui/issues/issue-42944.stderr | 2 +- src/test/ui/issues/issue-43162.stderr | 2 +- src/test/ui/issues/issue-43196.rs | 1 - src/test/ui/issues/issue-4335.nll.stderr | 30 - src/test/ui/issues/issue-4335.stderr | 22 +- src/test/ui/issues/issue-43355.rs | 1 - src/test/ui/issues/issue-43355.stderr | 6 +- src/test/ui/issues/issue-4366-2.stderr | 2 +- src/test/ui/issues/issue-43988.stderr | 2 +- src/test/ui/issues/issue-44005.rs | 1 - src/test/ui/issues/issue-44373-2.rs | 1 - src/test/ui/issues/issue-44373.nll.stderr | 13 - src/test/ui/issues/issue-44373.rs | 2 +- src/test/ui/issues/issue-44373.stderr | 12 +- src/test/ui/issues/issue-45199.ast.nll.stderr | 36 - src/test/ui/issues/issue-45199.ast.stderr | 30 - src/test/ui/issues/issue-45199.rs | 40 +- ...ue-45199.mir.stderr => issue-45199.stderr} | 9 +- .../issue-45696-long-live-borrows-in-boxes.rs | 9 - .../issue-45696-no-variant-box-recur.rs | 18 +- ...-45696-scribble-on-boxed-borrow.ast.stderr | 14 - ...96-scribble-on-boxed-borrow.migrate.stderr | 10 +- ...-45696-scribble-on-boxed-borrow.nll.stderr | 6 +- .../issue-45696-scribble-on-boxed-borrow.rs | 17 +- src/test/ui/issues/issue-45697-1.rs | 7 +- src/test/ui/issues/issue-45697-1.stderr | 16 +- src/test/ui/issues/issue-45697.rs | 7 +- src/test/ui/issues/issue-45697.stderr | 16 +- src/test/ui/issues/issue-45730.stderr | 1 - .../ui/issues/issue-45829/import-self.stderr | 2 +- src/test/ui/issues/issue-46023.ast.nll.stderr | 12 - src/test/ui/issues/issue-46023.ast.stderr | 12 - src/test/ui/issues/issue-46023.rs | 6 +- ...ue-46023.mir.stderr => issue-46023.stderr} | 3 +- src/test/ui/issues/issue-46036.rs | 1 - src/test/ui/issues/issue-46036.stderr | 2 +- src/test/ui/issues/issue-46101.stderr | 2 +- src/test/ui/issues/issue-46471-1.rs | 5 +- src/test/ui/issues/issue-46471-1.stderr | 17 +- src/test/ui/issues/issue-46471.rs | 5 +- src/test/ui/issues/issue-46471.stderr | 20 +- src/test/ui/issues/issue-46472.rs | 5 +- src/test/ui/issues/issue-46472.stderr | 24 +- src/test/ui/issues/issue-46604.ast.nll.stderr | 16 - src/test/ui/issues/issue-46604.ast.stderr | 16 - src/test/ui/issues/issue-46604.rs | 9 +- ...ue-46604.mir.stderr => issue-46604.stderr} | 7 +- src/test/ui/issues/issue-46843.stderr | 2 +- src/test/ui/issues/issue-46983.rs | 2 - src/test/ui/issues/issue-46983.stderr | 2 +- src/test/ui/issues/issue-47184.rs | 2 - src/test/ui/issues/issue-47184.stderr | 2 +- src/test/ui/issues/issue-47377.stderr | 2 +- src/test/ui/issues/issue-47380.stderr | 2 +- src/test/ui/issues/issue-47646.rs | 3 - src/test/ui/issues/issue-47646.stderr | 2 +- src/test/ui/issues/issue-47703-1.rs | 2 - src/test/ui/issues/issue-47703-tuple.rs | 2 - src/test/ui/issues/issue-47703.rs | 2 - src/test/ui/issues/issue-47722.rs | 2 - src/test/ui/issues/issue-47789.rs | 3 - src/test/ui/issues/issue-48132.rs | 3 - src/test/ui/issues/issue-48179.rs | 3 - src/test/ui/issues/issue-48803.rs | 2 - src/test/ui/issues/issue-48803.stderr | 2 +- src/test/ui/issues/issue-49074.stderr | 3 +- src/test/ui/issues/issue-49556.rs | 4 +- src/test/ui/issues/issue-49579.rs | 2 - src/test/ui/issues/issue-49824.nll.stderr | 21 +- src/test/ui/issues/issue-49824.rs | 9 +- src/test/ui/issues/issue-49824.stderr | 20 +- .../issue-49851/compiler-builtins-error.rs | 1 - .../result-deref-err.stderr | 2 +- src/test/ui/issues/issue-50480.stderr | 2 +- src/test/ui/issues/issue-50518.rs | 40 + src/test/ui/issues/issue-50576.stderr | 2 +- src/test/ui/issues/issue-50577.rs | 1 + src/test/ui/issues/issue-50577.stderr | 15 +- src/test/ui/issues/issue-50599.stderr | 2 +- src/test/ui/issues/issue-50714-1.rs | 1 - src/test/ui/issues/issue-50714.rs | 1 - src/test/ui/issues/issue-5100.stderr | 2 +- src/test/ui/issues/issue-51102.stderr | 2 +- src/test/ui/issues/issue-51244.nll.stderr | 11 - src/test/ui/issues/issue-51244.rs | 2 +- src/test/ui/issues/issue-51244.stderr | 7 +- src/test/ui/issues/issue-51279.stderr | 3 +- src/test/ui/issues/issue-51515.rs | 2 - src/test/ui/issues/issue-51515.stderr | 5 +- ...1632-try-desugar-incompatible-types.stderr | 5 +- src/test/ui/issues/issue-51714.rs | 1 - src/test/ui/issues/issue-51714.stderr | 8 - src/test/ui/issues/issue-51719.rs | 13 + src/test/ui/issues/issue-51719.stderr | 10 + src/test/ui/issues/issue-51751.rs | 13 + src/test/ui/issues/issue-51751.stderr | 11 + ...issue-52023-array-size-pointer-cast.stderr | 5 +- src/test/ui/issues/issue-52049.nll.stderr | 14 - src/test/ui/issues/issue-52049.rs | 2 +- src/test/ui/issues/issue-52049.stderr | 15 +- src/test/ui/issues/issue-52057.rs | 2 - ...ssue-52126-assign-op-invariance.nll.stderr | 15 - .../issue-52126-assign-op-invariance.stderr | 5 +- src/test/ui/issues/issue-52213.nll.stderr | 13 + src/test/ui/issues/issue-52213.stderr | 1 - src/test/ui/issues/issue-52240.nll.stderr | 9 - src/test/ui/issues/issue-52240.rs | 2 +- src/test/ui/issues/issue-52240.stderr | 4 +- src/test/ui/issues/issue-52533-1.nll.stderr | 11 + src/test/ui/issues/issue-52533.nll.stderr | 11 + src/test/ui/issues/issue-52533.stderr | 1 - src/test/ui/issues/issue-52891.stderr | 2 +- src/test/ui/issues/issue-52992.rs | 2 - src/test/ui/issues/issue-53419.rs | 1 - src/test/ui/issues/issue-53498.rs | 17 + src/test/ui/issues/issue-53498.stderr | 9 + src/test/ui/issues/issue-53568.rs | 4 - .../issue-53787-inline-assembler-macro.stderr | 1 - .../ui/issues/issue-54302-cases.nll.stderr | 26 + src/test/ui/issues/issue-54302.nll.stderr | 8 + src/test/ui/issues/issue-54943-1.rs | 2 - src/test/ui/issues/issue-54943-2.rs | 2 - src/test/ui/issues/issue-54943.nll.stderr | 11 + src/test/ui/issues/issue-54943.rs | 5 +- src/test/ui/issues/issue-54943.stderr | 11 +- src/test/ui/issues/issue-54954.rs | 19 + src/test/ui/issues/issue-54954.stderr | 16 + src/test/ui/issues/issue-54974.rs | 2 +- src/test/ui/issues/issue-5500-1.ast.stderr | 15 - src/test/ui/issues/issue-5500-1.mir.stderr | 15 - src/test/ui/issues/issue-5500-1.rs | 14 +- src/test/ui/issues/issue-55324.rs | 2 +- src/test/ui/issues/issue-55511.nll.stderr | 15 - src/test/ui/issues/issue-55511.stderr | 11 +- src/test/ui/issues/issue-55731.nll.stderr | 11 + src/test/ui/issues/issue-55796.nll.stderr | 20 + src/test/ui/issues/issue-55796.stderr | 1 - src/test/ui/issues/issue-56411.stderr | 2 +- src/test/ui/issues/issue-56762.rs | 4 + src/test/ui/issues/issue-56806.stderr | 1 - src/test/ui/issues/issue-57843.nll.stderr | 8 + .../{run-pass => ui}/issues/issue-57924.rs | 1 + src/test/ui/issues/issue-57924.stderr | 9 + src/test/ui/issues/issue-58006.stderr | 1 - src/test/ui/issues/issue-58712.rs | 1 - src/test/ui/issues/issue-58856-1.stderr | 5 +- src/test/ui/issues/issue-58885.rs | 2 +- src/test/ui/issues/issue-59001.rs | 2 +- src/test/ui/issues/issue-5927.stderr | 3 +- src/test/ui/issues/issue-59488.rs | 34 + src/test/ui/issues/issue-59488.stderr | 109 + src/test/ui/issues/issue-59896.rs | 9 + src/test/ui/issues/issue-59896.stderr | 17 + src/test/ui/issues/issue-5997-enum.stderr | 2 +- src/test/ui/issues/issue-5997-struct.stderr | 2 +- src/test/ui/issues/issue-60057.rs | 17 + src/test/ui/issues/issue-60057.stderr | 20 + src/test/ui/issues/issue-60283.stderr | 3 +- src/test/ui/issues/issue-60662.rs | 11 + src/test/ui/issues/issue-60662.stdout | 14 + src/test/ui/issues/issue-60989.rs | 18 + src/test/ui/issues/issue-60989.stderr | 15 + src/test/ui/issues/issue-61475.rs | 15 + src/test/ui/issues/issue-61623.rs | 11 + src/test/ui/issues/issue-61623.stderr | 22 + src/test/ui/issues/issue-61882-2.rs | 11 + src/test/ui/issues/issue-61882-2.stderr | 15 + src/test/ui/issues/issue-61882.rs | 9 + src/test/ui/issues/issue-61882.stderr | 21 + src/test/ui/issues/issue-6801.nll.stderr | 16 - src/test/ui/issues/issue-6801.stderr | 6 +- src/test/ui/issues/issue-6804.rs | 2 + src/test/ui/issues/issue-6804.stderr | 13 +- src/test/ui/issues/issue-7364.stderr | 2 +- src/test/ui/issues/issue-8761.stderr | 8 + src/test/ui/issues/issue-9725.stderr | 2 +- .../keyword/keyword-self-as-identifier.stderr | 1 - .../kindck/kindck-impl-type-params.nll.stderr | 63 + .../ui/kindck/kindck-impl-type-params.stderr | 3 +- .../kindck/kindck-inherited-copy-bound.stderr | 2 +- .../ui/kindck/kindck-send-object1.nll.stderr | 32 + src/test/ui/kindck/kindck-send-object1.stderr | 3 +- .../label/label_break_value_continue.stderr | 3 +- src/test/ui/lexical-scopes.stderr | 3 +- .../borrowck-let-suggestion.nll.stderr | 17 - .../ui/lifetimes/borrowck-let-suggestion.rs | 2 +- .../lifetimes/borrowck-let-suggestion.stderr | 16 +- ...etime-bound-will-change-warning.nll.stderr | 20 + .../lifetime-doesnt-live-long-enough.stderr | 2 +- ...xisting-name-if-else-using-impl.nll.stderr | 13 + ...ne-existing-name-if-else-using-impl.stderr | 1 - ...isting-name-return-type-is-anon.nll.stderr | 13 + ...e-existing-name-return-type-is-anon.stderr | 1 - ...-one-existing-name-self-is-anon.nll.stderr | 13 + ...turn-one-existing-name-self-is-anon.stderr | 1 - .../ex2a-push-one-existing-name-2.nll.stderr | 11 + ...h-one-existing-name-early-bound.nll.stderr | 12 + .../ex2a-push-one-existing-name.nll.stderr | 11 + .../ex2b-push-no-existing-names.nll.stderr | 12 + .../ex2b-push-no-existing-names.stderr | 1 - .../ex2c-push-inference-variable.nll.stderr | 13 + .../ex2c-push-inference-variable.stderr | 1 - .../ex2d-push-inference-variable-2.nll.stderr | 13 + .../ex2d-push-inference-variable-2.stderr | 1 - .../ex2e-push-inference-variable-3.nll.stderr | 13 + .../ex2e-push-inference-variable-3.stderr | 1 - .../ex3-both-anon-regions-2.nll.stderr | 12 + .../ex3-both-anon-regions-2.stderr | 1 - .../ex3-both-anon-regions-3.nll.stderr | 22 + .../ex3-both-anon-regions-3.rs | 1 - .../ex3-both-anon-regions-3.stderr | 1 - ...anon-regions-both-are-structs-2.nll.stderr | 12 + ...oth-anon-regions-both-are-structs-2.stderr | 1 - ...anon-regions-both-are-structs-3.nll.stderr | 13 + ...oth-anon-regions-both-are-structs-3.stderr | 5 +- ...-are-structs-earlybound-regions.nll.stderr | 13 + ...both-are-structs-earlybound-regions.stderr | 1 - ...h-are-structs-latebound-regions.nll.stderr | 12 + ...-both-are-structs-latebound-regions.stderr | 1 - ...h-anon-regions-both-are-structs.nll.stderr | 12 + ...-both-anon-regions-both-are-structs.stderr | 1 - ...-anon-regions-latebound-regions.nll.stderr | 12 + ...both-anon-regions-latebound-regions.stderr | 1 - ...th-anon-regions-one-is-struct-2.nll.stderr | 21 + ...3-both-anon-regions-one-is-struct-2.stderr | 1 - ...th-anon-regions-one-is-struct-3.nll.stderr | 12 + ...3-both-anon-regions-one-is-struct-3.stderr | 1 - ...th-anon-regions-one-is-struct-4.nll.stderr | 12 + ...3-both-anon-regions-one-is-struct-4.stderr | 1 - ...both-anon-regions-one-is-struct.nll.stderr | 12 + ...ex3-both-anon-regions-one-is-struct.stderr | 1 - ...non-regions-return-type-is-anon.nll.stderr | 12 + ...3-both-anon-regions-return-type-is-anon.rs | 1 - ...th-anon-regions-return-type-is-anon.stderr | 1 - ...-both-anon-regions-self-is-anon.nll.stderr | 12 + .../ex3-both-anon-regions-self-is-anon.rs | 1 - .../ex3-both-anon-regions-self-is-anon.stderr | 1 - ...oth-anon-regions-using-fn-items.nll.stderr | 21 + ...x3-both-anon-regions-using-fn-items.stderr | 1 - ...h-anon-regions-using-impl-items.nll.stderr | 12 + ...-both-anon-regions-using-impl-items.stderr | 1 - ...non-regions-using-trait-objects.nll.stderr | 21 + ...th-anon-regions-using-trait-objects.stderr | 1 - .../ex3-both-anon-regions.nll.stderr | 12 + .../ex3-both-anon-regions.stderr | 1 - .../liveness-assign-imm-local-notes.rs | 15 +- .../liveness-assign-imm-local-notes.stderr | 51 +- src/test/ui/linkage2.rs | 5 + src/test/ui/linkage2.stderr | 2 +- src/test/ui/linkage3.rs | 4 + src/test/ui/linkage3.stderr | 2 +- src/test/ui/linkage4.stderr | 3 +- src/test/ui/lint/deny-overflowing-literals.rs | 5 +- .../ui/lint/deny-overflowing-literals.stderr | 10 +- .../lint/issue-54180-unused-ref-field.fixed | 34 + .../ui/lint/issue-54180-unused-ref-field.rs | 34 + .../lint/issue-54180-unused-ref-field.stderr | 39 + .../lint-incoherent-auto-trait-objects.rs | 2 - .../lint-incoherent-auto-trait-objects.stderr | 6 +- .../ui/lint/lint-range-endpoint-overflow.rs | 17 + .../lint/lint-range-endpoint-overflow.stderr | 44 + src/test/ui/lint/lint-type-limits2.rs | 2 +- src/test/ui/lint/lint-type-limits2.stderr | 2 +- src/test/ui/lint/lint-type-limits3.rs | 2 +- src/test/ui/lint/lint-type-limits3.stderr | 2 +- src/test/ui/lint/lint-type-overflow.rs | 38 +- src/test/ui/lint/lint-type-overflow.stderr | 74 +- src/test/ui/lint/lint-type-overflow2.stderr | 10 +- src/test/ui/lint/type-overflow.stderr | 2 +- .../lint/unused_import_warning_issue_45268.rs | 48 + .../unused_import_warning_issue_45268.stderr | 12 + src/test/ui/lint/use_suggestion_json.rs | 3 +- src/test/ui/lint/use_suggestion_json.stderr | 140 +- ...ss-assign-imm-local-in-loop.ast.nll.stderr | 12 - ...veness-assign-imm-local-in-loop.ast.stderr | 9 - .../liveness-assign-imm-local-in-loop.rs | 14 +- ... liveness-assign-imm-local-in-loop.stderr} | 2 +- ...eness-assign-imm-local-in-op-eq.ast.stderr | 12 - ...eness-assign-imm-local-in-op-eq.mir.stderr | 15 - .../liveness-assign-imm-local-in-op-eq.rs | 16 +- ...liveness-assign-imm-local-in-op-eq.stderr} | 3 +- ...ness-assign-imm-local-with-drop.ast.stderr | 12 - ...ness-assign-imm-local-with-drop.mir.stderr | 15 - .../liveness-assign-imm-local-with-drop.rs | 16 +- ...iveness-assign-imm-local-with-drop.stderr} | 2 +- ...-assign-imm-local-with-init.ast.nll.stderr | 15 - ...ness-assign-imm-local-with-init.ast.stderr | 12 - .../liveness-assign-imm-local-with-init.rs | 16 +- ...iveness-assign-imm-local-with-init.stderr} | 2 +- .../liveness-move-call-arg.nll.stderr | 12 - .../ui/liveness/liveness-move-call-arg.stderr | 7 +- .../liveness/liveness-move-in-loop.nll.stderr | 12 - .../ui/liveness/liveness-move-in-loop.stderr | 7 +- .../liveness-move-in-while.nll.stderr | 14 - .../ui/liveness/liveness-move-in-while.rs | 3 +- .../ui/liveness/liveness-move-in-while.stderr | 21 +- .../liveness-use-after-move.nll.stderr | 13 - .../ui/liveness/liveness-use-after-move.rs | 2 +- .../liveness/liveness-use-after-move.stderr | 10 +- .../liveness-use-after-send.nll.stderr | 13 - .../ui/liveness/liveness-use-after-send.rs | 2 +- .../liveness/liveness-use-after-send.stderr | 8 +- src/test/ui/loops/loop-break-value.stderr | 2 +- .../ui/loops/loop-proper-liveness.nll.stderr | 9 - src/test/ui/loops/loop-proper-liveness.rs | 2 +- src/test/ui/loops/loop-proper-liveness.stderr | 2 +- src/test/ui/lub-if.nll.stderr | 20 + src/test/ui/lub-if.stderr | 1 - src/test/ui/lub-match.nll.stderr | 20 + src/test/ui/lub-match.stderr | 1 - src/test/ui/macro_backtrace/auxiliary/ping.rs | 1 - src/test/ui/macros/assert-trailing-junk.rs | 24 + .../ui/macros/assert-trailing-junk.stderr | 60 + src/test/ui/macros/issue-61033-1.rs | 9 + src/test/ui/macros/issue-61033-1.stderr | 8 + src/test/ui/macros/issue-61033-2.rs | 19 + src/test/ui/macros/issue-61033-2.stderr | 11 + src/test/ui/macros/macro-attribute.stderr | 4 +- .../macro-backtrace-invalid-internals.stderr | 2 +- src/test/ui/macros/macro-follow.rs | 1 - .../macros/macro-multiple-matcher-bindings.rs | 13 +- .../macro-multiple-matcher-bindings.stderr | 57 +- .../ui/macros/macro-path-prelude-fail-1.rs | 4 +- .../macros/macro-path-prelude-fail-1.stderr | 8 +- .../ui/macros/macro-reexport-removed.stderr | 5 +- src/test/ui/macros/macros-in-extern.stderr | 9 +- .../ui/macros/macros-nonfatal-errors.stderr | 1 - src/test/ui/macros/missing-comma.rs | 7 + src/test/ui/macros/missing-comma.stderr | 23 +- src/test/ui/macros/must-use-in-macro-55516.rs | 1 - .../span-covering-argument-1.nll.stderr | 14 - .../ui/macros/span-covering-argument-1.rs | 2 +- .../ui/macros/span-covering-argument-1.stderr | 8 +- .../ui/malformed/malformed-interpolated.rs | 5 +- .../malformed/malformed-interpolated.stderr | 17 +- .../ui/malformed/malformed-plugin-3.stderr | 1 - .../ui/malformed/malformed-regressions.stderr | 4 +- src/test/ui/match/match-argm-statics-2.rs | 1 - .../ui/match/match-byte-array-patterns-2.rs | 1 - src/test/ui/match/match-range-fail-2.stderr | 2 +- .../ui/match/match-range-fail-dominate.stderr | 9 + src/test/ui/match/match-range-fail.stderr | 2 +- .../match/match-ref-mut-invariance.nll.stderr | 12 + .../match-ref-mut-let-invariance.nll.stderr | 13 + src/test/ui/match/match-type-err-first-arm.rs | 24 +- .../ui/match/match-type-err-first-arm.stderr | 35 +- src/test/ui/match/match-vec-mismatch.stderr | 2 +- src/test/ui/maybe-bounds-where.stderr | 1 - .../meta-expected-error-correct-rev.a.stderr | 4 + ...od-ambig-one-trait-unknown-int-type.stderr | 6 +- .../ui/methods/method-call-err-msg.stderr | 2 +- ...e-trait-object-with-separate-params.stderr | 2 +- .../ui/methods/method-path-in-pattern.stderr | 1 - .../ui/methods/method-self-arg-2.nll.stderr | 24 - src/test/ui/methods/method-self-arg-2.stderr | 22 +- src/test/ui/mir-dataflow/def-inits-1.rs | 1 - src/test/ui/mir-dataflow/def-inits-1.stderr | 8 +- src/test/ui/mir-dataflow/inits-1.rs | 1 - src/test/ui/mir-dataflow/inits-1.stderr | 6 +- src/test/ui/mir-dataflow/uninits-1.rs | 1 - src/test/ui/mir-dataflow/uninits-1.stderr | 10 +- src/test/ui/mir-dataflow/uninits-2.rs | 1 - src/test/ui/mir-dataflow/uninits-2.stderr | 2 +- src/test/ui/mismatched_types/E0409.stderr | 2 +- src/test/ui/mismatched_types/E0631.stderr | 1 - .../ui/mismatched_types/cast-rfc0401.stderr | 2 +- .../closure-arg-type-mismatch.stderr | 3 +- .../mismatched_types/closure-mismatch.stderr | 3 +- .../ui/mismatched_types/fn-variance-1.stderr | 1 - .../ui/mismatched_types/issue-26480.stderr | 6 +- .../ui/mismatched_types/issue-36053-2.stderr | 3 +- .../ui/mismatched_types/issue-38371.stderr | 8 +- src/test/ui/mismatched_types/main.rs | 1 - .../mismatched_types/numeric-literal-cast.rs | 1 - .../overloaded-calls-bad.stderr | 2 +- .../trait-impl-fn-incompatibility.rs | 1 - .../unboxed-closures-vtable-mismatch.stderr | 1 - .../ui/missing/missing-alloc_error_handler.rs | 2 +- src/test/ui/missing/missing-allocator.rs | 2 +- .../missing-fields-in-struct-pattern.stderr | 2 +- src/test/ui/mod-subitem-as-enum-variant.rs | 1 - .../ui/mod-subitem-as-enum-variant.stderr | 2 +- src/test/ui/mod/mod_file_disambig.stderr | 1 - .../moves/move-guard-same-consts.nll.stderr | 14 - .../ui/moves/move-guard-same-consts.stderr | 5 +- src/test/ui/moves/move-in-guard-1.nll.stderr | 14 - src/test/ui/moves/move-in-guard-1.stderr | 5 +- src/test/ui/moves/move-in-guard-2.nll.stderr | 12 - src/test/ui/moves/move-in-guard-2.stderr | 7 +- .../moves/move-into-dead-array-1.nll.stderr | 9 - .../ui/moves/move-into-dead-array-1.stderr | 2 +- .../moves/move-into-dead-array-2.nll.stderr | 13 - .../ui/moves/move-into-dead-array-2.stderr | 6 +- .../ui/moves/move-out-of-slice-1.nll.stderr | 17 - src/test/ui/moves/move-out-of-slice-1.rs | 4 +- src/test/ui/moves/move-out-of-slice-1.stderr | 15 +- .../moves/move-out-of-tuple-field.nll.stderr | 23 - .../ui/moves/move-out-of-tuple-field.stderr | 12 +- ...s-based-on-type-access-to-field.nll.stderr | 13 - .../moves-based-on-type-access-to-field.rs | 2 +- ...moves-based-on-type-access-to-field.stderr | 8 +- .../moves-based-on-type-block-bad.nll.stderr | 21 - .../ui/moves/moves-based-on-type-block-bad.rs | 2 - .../moves-based-on-type-block-bad.stderr | 15 +- ...ased-on-type-capture-clause-bad.nll.stderr | 16 - .../moves-based-on-type-capture-clause-bad.rs | 2 +- ...es-based-on-type-capture-clause-bad.stderr | 14 +- ...on-type-cyclic-types-issue-4821.nll.stderr | 14 - ...s-based-on-type-cyclic-types-issue-4821.rs | 2 +- ...sed-on-type-cyclic-types-issue-4821.stderr | 6 +- ...type-distribute-copy-over-paren.nll.stderr | 25 - ...ased-on-type-distribute-copy-over-paren.rs | 12 +- ...-on-type-distribute-copy-over-paren.stderr | 22 +- .../moves-based-on-type-exprs.nll.stderr | 123 - .../ui/moves/moves-based-on-type-exprs.rs | 22 +- .../ui/moves/moves-based-on-type-exprs.stderr | 115 +- ...es-based-on-type-match-bindings.nll.stderr | 14 - .../moves-based-on-type-match-bindings.rs | 4 +- .../moves-based-on-type-match-bindings.stderr | 6 +- ...e-out-of-closure-env-issue-1965.nll.stderr | 11 - ...-move-out-of-closure-env-issue-1965.stderr | 4 +- ...type-no-recursive-stack-closure.nll.stderr | 25 - ...ased-on-type-no-recursive-stack-closure.rs | 2 +- ...-on-type-no-recursive-stack-closure.stderr | 18 +- .../ui/moves/moves-based-on-type-tuple.rs | 5 +- .../ui/moves/moves-based-on-type-tuple.stderr | 16 +- .../ui/moves/moves-sru-moved-field.nll.stderr | 13 - .../ui/moves/moves-sru-moved-field.stderr | 6 +- src/test/ui/mut/mut-cant-alias.nll.stderr | 13 - src/test/ui/mut/mut-cant-alias.stderr | 3 +- ...mut-pattern-internal-mutability.ast.stderr | 20 - ...mut-pattern-internal-mutability.mir.stderr | 26 - .../ui/mut/mut-pattern-internal-mutability.rs | 9 +- ...=> mut-pattern-internal-mutability.stderr} | 7 +- src/test/ui/mut/mut-suggestion.nll.stderr | 21 - src/test/ui/mut/mut-suggestion.rs | 10 +- src/test/ui/mut/mut-suggestion.stderr | 14 +- .../ui/mut/mutable-class-fields-2.nll.stderr | 11 - src/test/ui/mut/mutable-class-fields-2.stderr | 7 +- .../ui/mut/mutable-class-fields.ast.stderr | 11 - .../ui/mut/mutable-class-fields.mir.stderr | 11 - src/test/ui/mut/mutable-class-fields.rs | 6 +- ...nll.stderr => mutable-class-fields.stderr} | 3 +- src/test/ui/namespace/namespace-mix.stderr | 2 +- src/test/ui/nested-ty-params.stderr | 4 +- src/test/ui/nested_impl_trait.stderr | 3 +- src/test/ui/nll/borrow-use-issue-46875.rs | 2 - ...ead-local-static-mut-borrow-outlives-fn.rs | 1 - src/test/ui/nll/borrowed-local-error.rs | 2 - src/test/ui/nll/borrowed-local-error.stderr | 2 +- .../ui/nll/borrowed-referent-issue-38899.rs | 1 - .../nll/borrowed-referent-issue-38899.stderr | 2 +- src/test/ui/nll/borrowed-temporary-error.rs | 2 - .../ui/nll/borrowed-temporary-error.stderr | 2 +- src/test/ui/nll/borrowed-universal-error-2.rs | 3 - .../ui/nll/borrowed-universal-error-2.stderr | 2 +- src/test/ui/nll/borrowed-universal-error.rs | 3 - .../ui/nll/borrowed-universal-error.stderr | 2 +- .../ui/nll/cannot-move-block-spans.nll.stderr | 85 - .../ui/nll/cannot-move-block-spans.stderr | 47 +- src/test/ui/nll/capture-mut-ref.rs | 1 - src/test/ui/nll/capture-mut-ref.stderr | 4 +- src/test/ui/nll/capture-ref-in-struct.rs | 3 - src/test/ui/nll/capture-ref-in-struct.stderr | 2 +- src/test/ui/nll/closure-access-spans.rs | 2 - src/test/ui/nll/closure-access-spans.stderr | 20 +- src/test/ui/nll/closure-borrow-spans.rs | 2 - src/test/ui/nll/closure-borrow-spans.stderr | 30 +- src/test/ui/nll/closure-captures.rs | 3 - src/test/ui/nll/closure-captures.stderr | 39 +- src/test/ui/nll/closure-move-spans.rs | 2 - src/test/ui/nll/closure-move-spans.stderr | 6 +- .../escape-argument-callee.stderr | 6 +- .../escape-argument.stderr | 6 +- .../escape-upvar-nested.stderr | 6 +- .../escape-upvar-ref.stderr | 4 +- .../issue-58127-mutliple-requirements.rs | 4 - ...pagate-approximated-fail-no-postdom.stderr | 6 +- .../propagate-approximated-ref.stderr | 6 +- ...er-to-static-comparing-against-free.stderr | 15 +- ...oximated-shorter-to-static-no-bound.stderr | 7 +- ...mated-shorter-to-static-wrong-bound.stderr | 7 +- .../propagate-approximated-val.stderr | 6 +- .../propagate-despite-same-free-region.stderr | 6 +- ...ail-to-approximate-longer-no-bounds.stderr | 6 +- ...-to-approximate-longer-wrong-bounds.stderr | 6 +- .../propagate-from-trait-match.stderr | 4 +- .../propagate-multiple-requirements.rs | 2 - .../propagate-multiple-requirements.stderr | 2 +- ...does-outlive-lbr2-because-implied-bound.rs | 3 +- .../return-wrong-bound-region.stderr | 6 +- src/test/ui/nll/closure-use-spans.rs | 2 - src/test/ui/nll/closure-use-spans.stderr | 6 +- src/test/ui/nll/closures-in-loops.rs | 2 - src/test/ui/nll/closures-in-loops.stderr | 8 +- .../nll/constant-thread-locals-issue-47053.rs | 1 - .../constant-thread-locals-issue-47053.stderr | 3 +- src/test/ui/nll/decl-macro-illegal-copy.rs | 1 - .../ui/nll/decl-macro-illegal-copy.stderr | 2 +- src/test/ui/nll/extra-unused-mut.rs | 19 +- .../ui/nll/generator-upvar-mutability.stderr | 1 - src/test/ui/nll/get_default.nll.stderr | 48 + src/test/ui/nll/get_default.rs | 11 +- src/test/ui/nll/get_default.stderr | 58 +- src/test/ui/nll/guarantor-issue-46974.stderr | 2 +- src/test/ui/nll/issue-16223.rs | 1 - src/test/ui/nll/issue-21114-ebfull.rs | 2 - src/test/ui/nll/issue-21114-kixunil.rs | 2 - ...ue-21232-partial-init-and-erroneous-use.rs | 2 - ...1232-partial-init-and-erroneous-use.stderr | 14 +- .../issue-21232-partial-init-and-use.stderr | 2 +- .../ui/nll/issue-22323-temp-destruction.rs | 2 - src/test/ui/nll/issue-30104.rs | 2 - ...ue-32382-index-assoc-type-with-lifetime.rs | 1 - src/test/ui/nll/issue-43058.rs | 2 - src/test/ui/nll/issue-46589.rs | 2 - src/test/ui/nll/issue-46589.stderr | 2 +- src/test/ui/nll/issue-47022.rs | 4 - src/test/ui/nll/issue-47388.rs | 1 - src/test/ui/nll/issue-47388.stderr | 3 +- src/test/ui/nll/issue-47470.rs | 2 - src/test/ui/nll/issue-47470.stderr | 2 +- src/test/ui/nll/issue-48070.rs | 2 - src/test/ui/nll/issue-48697.rs | 2 - src/test/ui/nll/issue-48697.stderr | 2 +- src/test/ui/nll/issue-50716-1.rs | 4 - src/test/ui/nll/issue-50716.nll.stderr | 11 + src/test/ui/nll/issue-50716.rs | 2 - src/test/ui/nll/issue-50716.stderr | 19 +- src/test/ui/nll/issue-51191.rs | 2 - src/test/ui/nll/issue-51191.stderr | 12 +- src/test/ui/nll/issue-51244.rs | 2 - src/test/ui/nll/issue-51244.stderr | 3 +- src/test/ui/nll/issue-51268.rs | 2 - src/test/ui/nll/issue-51268.stderr | 2 +- src/test/ui/nll/issue-51351.rs | 2 - src/test/ui/nll/issue-51512.rs | 3 - src/test/ui/nll/issue-51512.stderr | 2 +- ...59-report-when-borrow-and-drop-conflict.rs | 1 - ...eport-when-borrow-and-drop-conflict.stderr | 10 +- src/test/ui/nll/issue-52078.rs | 3 - src/test/ui/nll/issue-52086.rs | 2 - src/test/ui/nll/issue-52086.stderr | 4 +- src/test/ui/nll/issue-52113.rs | 3 - src/test/ui/nll/issue-52113.stderr | 2 +- src/test/ui/nll/issue-52534-1.rs | 3 - src/test/ui/nll/issue-52534-1.stderr | 16 +- src/test/ui/nll/issue-52534-2.rs | 3 - src/test/ui/nll/issue-52534-2.stderr | 2 +- src/test/ui/nll/issue-52534.rs | 3 - src/test/ui/nll/issue-52534.stderr | 4 +- ...issue-52663-span-decl-captured-variable.rs | 2 - ...e-52663-span-decl-captured-variable.stderr | 2 +- src/test/ui/nll/issue-52663-trait-object.rs | 1 - .../ui/nll/issue-52663-trait-object.stderr | 2 +- src/test/ui/nll/issue-52669.rs | 2 - src/test/ui/nll/issue-52669.stderr | 2 +- src/test/ui/nll/issue-52742.nll.stderr | 12 + src/test/ui/nll/issue-52742.rs | 3 +- src/test/ui/nll/issue-52742.stderr | 24 +- src/test/ui/nll/issue-53119.rs | 2 - src/test/ui/nll/issue-53570.rs | 4 - src/test/ui/nll/issue-53807.nll.stderr | 11 - src/test/ui/nll/issue-53807.rs | 3 +- src/test/ui/nll/issue-53807.stderr | 18 +- ...54382-use-span-of-tail-of-block.nll.stderr | 20 - ...sue-54382-use-span-of-tail-of-block.stderr | 11 +- .../ui/nll/issue-54556-niconii.nll.stderr | 20 - src/test/ui/nll/issue-54556-niconii.stderr | 12 +- .../ui/nll/issue-54556-stephaneyfx.nll.stderr | 19 - .../ui/nll/issue-54556-stephaneyfx.stderr | 13 +- ...-54556-temps-in-tail-diagnostic.nll.stderr | 19 - ...ssue-54556-temps-in-tail-diagnostic.stderr | 11 +- ...ssue-54556-used-vs-unused-tails.nll.stderr | 113 - .../issue-54556-used-vs-unused-tails.stderr | 117 +- .../ui/nll/issue-54556-wrap-it-up.nll.stderr | 14 - src/test/ui/nll/issue-54556-wrap-it-up.stderr | 4 +- src/test/ui/nll/issue-55288.rs | 2 - src/test/ui/nll/issue-55344.rs | 2 - src/test/ui/nll/issue-55394.nll.stderr | 12 + src/test/ui/nll/issue-55394.rs | 4 +- src/test/ui/nll/issue-55394.stderr | 31 +- src/test/ui/nll/issue-55401.nll.stderr | 11 + src/test/ui/nll/issue-55401.rs | 2 - src/test/ui/nll/issue-55401.stderr | 16 +- src/test/ui/nll/issue-55850.nll.stderr | 18 - src/test/ui/nll/issue-55850.rs | 3 +- src/test/ui/nll/issue-55850.stderr | 26 +- .../nll/issue-57265-return-type-wf-check.rs | 2 - .../issue-57265-return-type-wf-check.stderr | 2 +- src/test/ui/nll/issue-57280-1.rs | 2 - src/test/ui/nll/issue-57280.rs | 2 - src/test/ui/nll/issue-57989.rs | 2 - src/test/ui/nll/issue-57989.stderr | 7 +- src/test/ui/nll/issue-58053.rs | 1 - src/test/ui/nll/issue-58053.stderr | 4 +- src/test/ui/nll/issue-58299.rs | 1 - src/test/ui/nll/issue-58299.stderr | 4 +- src/test/ui/nll/loan_ends_mid_block_pair.rs | 10 +- .../ui/nll/loan_ends_mid_block_pair.stderr | 60 +- src/test/ui/nll/loan_ends_mid_block_vec.rs | 14 +- .../ui/nll/loan_ends_mid_block_vec.stderr | 88 +- .../ui/nll/local-outlives-static-via-hrtb.rs | 26 + .../nll/local-outlives-static-via-hrtb.stderr | 26 + src/test/ui/nll/match-cfg-fake-edges.stderr | 2 +- .../match-guards-always-borrow.ast.nll.stderr | 22 - .../nll/match-guards-always-borrow.ast.stderr | 12 - src/test/ui/nll/match-guards-always-borrow.rs | 14 +- ...derr => match-guards-always-borrow.stderr} | 2 +- .../nll/match-guards-partially-borrow.stderr | 2 +- src/test/ui/nll/match-on-borrowed.stderr | 2 +- ...initialized-drop-implicit-fragment-drop.rs | 3 - ...ialized-drop-implicit-fragment-drop.stderr | 2 +- src/test/ui/nll/move-errors.rs | 3 - src/test/ui/nll/move-errors.stderr | 46 +- src/test/ui/nll/move-subpaths-moves-root.rs | 2 - .../ui/nll/move-subpaths-moves-root.stderr | 2 +- src/test/ui/nll/normalization-bounds-error.rs | 1 - .../ui/nll/normalization-bounds-error.stderr | 11 +- src/test/ui/nll/normalization-bounds.rs | 1 - src/test/ui/nll/polonius-smoke-test.stderr | 2 +- src/test/ui/nll/projection-return.rs | 1 - .../promotable-mutable-zst-doesnt-conflict.rs | 2 - src/test/ui/nll/promoted-bounds.rs | 2 - src/test/ui/nll/promoted-bounds.stderr | 2 +- src/test/ui/nll/promoted-closure-pair.rs | 2 - src/test/ui/nll/promoted-closure-pair.stderr | 2 +- ...ce-carried-through-struct-field.ast.stderr | 11 - ...ce-carried-through-struct-field.mir.stderr | 14 - .../reference-carried-through-struct-field.rs | 8 +- ...rence-carried-through-struct-field.stderr} | 3 +- .../region-ends-after-if-condition.nll.stderr | 15 + .../ui/nll/region-ends-after-if-condition.rs | 6 +- .../nll/region-ends-after-if-condition.stderr | 32 +- src/test/ui/nll/relate_tys/issue-48071.rs | 4 - .../ui/nll/relate_tys/var-appears-twice.rs | 3 - .../nll/relate_tys/var-appears-twice.stderr | 2 +- src/test/ui/nll/return-ref-mut-issue-46557.rs | 3 - .../ui/nll/return-ref-mut-issue-46557.stderr | 2 +- src/test/ui/nll/return_from_loop.rs | 6 +- src/test/ui/nll/return_from_loop.stderr | 32 +- src/test/ui/nll/ty-outlives/issue-53789-1.rs | 4 - src/test/ui/nll/ty-outlives/issue-53789-2.rs | 4 - .../projection-no-regions-closure.stderr | 16 +- .../projection-one-region-closure.stderr | 18 +- ...tion-one-region-trait-bound-closure.stderr | 20 +- ...e-region-trait-bound-static-closure.stderr | 20 +- ...tion-two-region-trait-bound-closure.stderr | 34 +- ...on-where-clause-env-wrong-bound.nll.stderr | 11 + ...projection-where-clause-env-wrong-bound.rs | 2 - ...ection-where-clause-env-wrong-bound.stderr | 11 +- ...where-clause-env-wrong-lifetime.nll.stderr | 11 + .../projection-where-clause-env.rs | 2 - ...ram-closure-approximate-lower-bound.stderr | 14 +- ...m-closure-outlives-from-return-type.stderr | 4 +- ...-closure-outlives-from-where-clause.stderr | 20 +- .../ty-param-fn-body-nll-feature.rs | 30 - .../ui/nll/type-alias-free-regions.nll.stderr | 22 + src/test/ui/nll/type-alias-free-regions.rs | 2 - .../ui/nll/type-alias-free-regions.stderr | 58 +- src/test/ui/nll/unused-mut-issue-50343.rs | 1 - src/test/ui/nll/unused-mut-issue-50343.stderr | 4 +- .../nll/user-annotations/adt-brace-enums.rs | 2 - .../user-annotations/adt-brace-enums.stderr | 6 +- .../nll/user-annotations/adt-brace-structs.rs | 2 - .../user-annotations/adt-brace-structs.stderr | 6 +- .../nll/user-annotations/adt-nullary-enums.rs | 1 - .../user-annotations/adt-nullary-enums.stderr | 6 +- .../nll/user-annotations/adt-tuple-enums.rs | 1 - .../user-annotations/adt-tuple-enums.stderr | 6 +- .../nll/user-annotations/adt-tuple-struct.rs | 2 - .../user-annotations/adt-tuple-struct.stderr | 6 +- .../user-annotations/cast_static_lifetime.rs | 1 - .../cast_static_lifetime.stderr | 2 +- .../user-annotations/closure-substs.stderr | 1 - .../constant-in-expr-inherent-1.nll.stderr | 10 + .../constant-in-expr-inherent-1.rs | 3 - .../constant-in-expr-inherent-1.stderr | 21 +- .../constant-in-expr-inherent-2.rs | 2 - .../constant-in-expr-inherent-2.stderr | 8 +- .../constant-in-expr-normalize.nll.stderr | 10 + .../constant-in-expr-normalize.rs | 2 - .../constant-in-expr-normalize.stderr | 15 +- .../constant-in-expr-trait-item-1.nll.stderr | 10 + .../constant-in-expr-trait-item-1.rs | 2 - .../constant-in-expr-trait-item-1.stderr | 15 +- .../constant-in-expr-trait-item-2.nll.stderr | 10 + .../constant-in-expr-trait-item-2.rs | 2 - .../constant-in-expr-trait-item-2.stderr | 15 +- .../constant-in-expr-trait-item-3.nll.stderr | 10 + .../constant-in-expr-trait-item-3.rs | 2 - .../constant-in-expr-trait-item-3.stderr | 21 +- src/test/ui/nll/user-annotations/fns.rs | 2 - src/test/ui/nll/user-annotations/fns.stderr | 6 +- .../issue-54570-bootstrapping.rs | 1 - .../ui/nll/user-annotations/issue-55219.rs | 2 - .../ui/nll/user-annotations/issue-55241.rs | 2 - .../ui/nll/user-annotations/method-call.rs | 2 - .../nll/user-annotations/method-call.stderr | 6 +- .../ui/nll/user-annotations/method-ufcs-1.rs | 2 - .../nll/user-annotations/method-ufcs-1.stderr | 6 +- .../ui/nll/user-annotations/method-ufcs-2.rs | 2 - .../nll/user-annotations/method-ufcs-2.stderr | 6 +- .../ui/nll/user-annotations/method-ufcs-3.rs | 2 - .../nll/user-annotations/method-ufcs-3.stderr | 6 +- .../method-ufcs-inherent-2.rs | 2 - .../method-ufcs-inherent-2.stderr | 4 +- .../method-ufcs-inherent-4.rs | 2 - .../method-ufcs-inherent-4.stderr | 4 +- .../ui/nll/user-annotations/normalization.rs | 2 - .../nll/user-annotations/normalization.stderr | 2 +- .../nll/user-annotations/normalize-self-ty.rs | 2 - .../pattern_substs_on_brace_enum_variant.rs | 2 - ...attern_substs_on_brace_enum_variant.stderr | 4 +- .../pattern_substs_on_brace_struct.rs | 2 - .../pattern_substs_on_brace_struct.stderr | 4 +- .../pattern_substs_on_tuple_enum_variant.rs | 2 - ...attern_substs_on_tuple_enum_variant.stderr | 4 +- .../pattern_substs_on_tuple_struct.rs | 2 - .../pattern_substs_on_tuple_struct.stderr | 4 +- .../ui/nll/user-annotations/patterns.stderr | 2 +- .../user-annotations/promoted-annotation.rs | 2 - .../promoted-annotation.stderr | 2 +- .../type_ascription_static_lifetime.rs | 1 - .../type_ascription_static_lifetime.stderr | 2 +- src/test/ui/no-args-non-move-async-closure.rs | 2 +- .../ui/no-args-non-move-async-closure.stderr | 1 - src/test/ui/no-capture-arc.nll.stderr | 17 - src/test/ui/no-capture-arc.rs | 2 +- src/test/ui/no-capture-arc.stderr | 26 +- src/test/ui/no-implicit-prelude-nested.stderr | 2 +- src/test/ui/no-implicit-prelude.stderr | 2 +- src/test/ui/no-patterns-in-args-macro.stderr | 2 +- src/test/ui/no-patterns-in-args.stderr | 3 +- src/test/ui/no-reuse-move-arc.nll.stderr | 17 - src/test/ui/no-reuse-move-arc.rs | 4 +- src/test/ui/no-reuse-move-arc.stderr | 26 +- src/test/ui/non-interger-atomic.stderr | 1 - src/test/ui/not-copy-closure.nll.stderr | 17 - src/test/ui/not-copy-closure.stderr | 8 +- src/test/ui/numeric/const-scope.rs | 12 + src/test/ui/numeric/const-scope.stderr | 47 + src/test/ui/numeric/len.rs | 8 + src/test/ui/numeric/len.stderr | 13 + src/test/ui/numeric/numeric-cast-2.stderr | 12 + .../numeric-cast-without-suggestion.rs | 38 + .../numeric-cast-without-suggestion.stderr | 129 + src/test/ui/numeric/numeric-cast.fixed | 293 + src/test/ui/numeric/numeric-cast.rs | 68 +- src/test/ui/numeric/numeric-cast.stderr | 845 +- src/test/ui/numeric/numeric-fields.stderr | 2 +- src/test/ui/numeric/numeric-suffix.fixed | 298 + src/test/ui/numeric/numeric-suffix.rs | 298 + src/test/ui/numeric/numeric-suffix.stderr | 1341 ++ .../object-lifetime-default-ambiguous.stderr | 1 - ...object-lifetime-default-elision.nll.stderr | 13 + .../object-lifetime-default-elision.stderr | 1 - ...lifetime-default-from-box-error.nll.stderr | 28 + ...ime-default-from-rptr-box-error.nll.stderr | 10 + ...-default-from-rptr-struct-error.nll.stderr | 10 + .../object-lifetime-default-mybox.nll.stderr | 21 + .../object-lifetime-default-mybox.stderr | 3 +- ...object-safety-by-value-self-use.nll.stderr | 9 - .../object-safety-by-value-self-use.rs | 2 +- .../object-safety-by-value-self-use.stderr | 2 +- .../ui/on-unimplemented/auxiliary/no_debug.rs | 2 - .../ui/on-unimplemented/bad-annotation.stderr | 2 +- src/test/ui/on-unimplemented/no-debug.rs | 1 - src/test/ui/on-unimplemented/slice-index.rs | 3 - .../ui/on-unimplemented/slice-index.stderr | 4 +- .../once-cant-call-twice-on-heap.nll.stderr | 15 - .../ui/once-cant-call-twice-on-heap.stderr | 6 +- .../ui/order-dependent-cast-inference.stderr | 1 - .../abort-link-to-unwind-dylib.rs | 1 + src/test/ui/panic-runtime/libtest-unwinds.rs | 1 - src/test/ui/panic-runtime/needs-gate.stderr | 6 +- src/test/ui/parse-error-correct.stderr | 2 +- src/test/ui/parser-recovery-1.stderr | 2 +- .../parser/ascii-only-character-escape.stderr | 12 +- src/test/ui/parser/attr-bad-meta-2.stderr | 4 +- src/test/ui/parser/byte-literals.stderr | 6 +- src/test/ui/parser/byte-string-literals.rs | 3 - .../ui/parser/byte-string-literals.stderr | 12 +- src/test/ui/parser/default.stderr | 2 +- .../ui/parser/doc-inside-trait-item.stderr | 1 - src/test/ui/parser/expr-as-stmt.fixed | 40 + src/test/ui/parser/expr-as-stmt.rs | 40 + src/test/ui/parser/expr-as-stmt.stderr | 92 + src/test/ui/parser/issue-10636-2.stderr | 5 +- .../ui/parser/issue-23620-invalid-escapes.rs | 7 +- .../parser/issue-23620-invalid-escapes.stderr | 60 +- src/test/ui/parser/issue-8537.stderr | 1 - .../ui/parser/lex-bad-char-literals-1.stderr | 8 +- .../ui/parser/lex-bad-char-literals-2.stderr | 4 + src/test/ui/parser/lex-bad-char-literals-4.rs | 2 +- .../ui/parser/lex-bad-char-literals-4.stderr | 4 +- .../ui/parser/lex-bad-char-literals-6.stderr | 14 +- src/test/ui/parser/lex-bad-char-literals-7.rs | 14 + .../ui/parser/lex-bad-char-literals-7.stderr | 20 + ...literals-are-validated-before-expansion.rs | 10 + ...rals-are-validated-before-expansion.stderr | 18 + .../parser/match-arrows-block-then-binop.rs | 6 +- .../match-arrows-block-then-binop.stderr | 6 + .../ui/parser/new-unicode-escapes-1.stderr | 4 +- .../ui/parser/new-unicode-escapes-2.stderr | 4 +- .../ui/parser/new-unicode-escapes-3.stderr | 8 +- src/test/ui/parser/pat-tuple-5.stderr | 4 +- src/test/ui/parser/recover-missing-semi.rs | 13 + .../ui/parser/recover-missing-semi.stderr | 39 + ...quire-parens-for-chained-comparison.stderr | 2 +- src/test/ui/parser/struct-literal-in-for.rs | 6 +- .../ui/parser/struct-literal-in-for.stderr | 41 +- src/test/ui/parser/struct-literal-in-if.rs | 6 +- .../ui/parser/struct-literal-in-if.stderr | 34 +- .../struct-literal-in-match-discriminant.rs | 10 +- ...truct-literal-in-match-discriminant.stderr | 47 +- src/test/ui/parser/struct-literal-in-while.rs | 7 +- .../ui/parser/struct-literal-in-while.stderr | 41 +- .../struct-literal-restrictions-in-lamda.rs | 7 +- ...truct-literal-restrictions-in-lamda.stderr | 48 +- src/test/ui/pattern/const-pat-ice.rs | 2 + src/test/ui/pattern/const-pat-ice.stderr | 13 + src/test/ui/pattern/pat-tuple-bad-type.stderr | 2 +- .../ui/pattern/pat-tuple-overfield.stderr | 2 +- .../pattern-bindings-after-at.nll.stderr | 22 + .../ui/pattern/pattern-bindings-after-at.rs | 3 + .../pattern/pattern-bindings-after-at.stderr | 18 +- .../ui/pattern/pattern-error-continue.stderr | 2 +- src/test/ui/pptypedef.stderr | 8 + .../ui/print_type_sizes/multiple_types.stdout | 4 +- src/test/ui/print_type_sizes/niche-filling.rs | 17 + .../ui/print_type_sizes/niche-filling.stdout | 54 +- src/test/ui/print_type_sizes/padding.stdout | 10 +- .../ui/print_type_sizes/repr-align.stdout | 4 +- src/test/ui/print_type_sizes/variants.stdout | 4 +- src/test/ui/privacy/privacy-ns1.stderr | 2 +- src/test/ui/privacy/privacy-ns2.stderr | 2 +- src/test/ui/privacy/privacy1.stderr | 2 +- src/test/ui/privacy/privacy2.stderr | 2 +- .../privacy/private-in-public-assoc-ty.stderr | 2 +- src/test/ui/privacy/private-in-public.stderr | 2 +- src/test/ui/privacy/pub-priv-dep/pub-priv1.rs | 2 +- src/test/ui/privacy/restricted/test.stderr | 2 +- .../proc-macro/ambiguous-builtin-attrs.stderr | 2 +- src/test/ui/proc-macro/attr-stmt-expr.stderr | 6 +- .../ui/proc-macro/auxiliary/derive-bad.rs | 1 - .../proc-macro/derive-helper-shadowing.stderr | 5 +- .../ui/proc-macro/derive-still-gated.stderr | 3 +- .../ui/proc-macro/expand-to-unstable-2.stderr | 3 +- .../ui/proc-macro/invalid-punct-ident-1.rs | 4 + .../proc-macro/invalid-punct-ident-1.stderr | 2 +- .../ui/proc-macro/invalid-punct-ident-2.rs | 4 + .../proc-macro/invalid-punct-ident-2.stderr | 2 +- .../ui/proc-macro/invalid-punct-ident-3.rs | 4 + .../proc-macro/invalid-punct-ident-3.stderr | 2 +- src/test/ui/proc-macro/issue-41211.stderr | 3 +- src/test/ui/proc-macro/issue-50493.rs | 1 - .../ui/proc-macro/macros-in-extern.stderr | 9 +- src/test/ui/proc-macro/more-gates.stderr | 15 +- src/test/ui/proc-macro/no-missing-docs.rs | 16 + .../proc-macro/proc-macro-attributes.stderr | 5 +- .../ui/proc-macro/proc-macro-gates.stderr | 48 +- .../ui/proc-macro/proc-macro-gates2.stderr | 6 +- .../ui/proc-macro/span-preservation.stderr | 2 +- src/test/ui/pub/pub-ident-fn-3.rs | 8 + src/test/ui/pub/pub-ident-fn-3.stderr | 8 + src/test/ui/pub/pub-restricted.rs | 2 + src/test/ui/pub/pub-restricted.stderr | 19 +- .../qualified/qualified-path-params-2.stderr | 2 +- .../ui/qualified/qualified-path-params.stderr | 3 +- src/test/ui/question-mark-type-infer.stderr | 1 - src/test/ui/range/range-1.stderr | 2 +- src/test/ui/range/range_traits-2.rs | 1 - src/test/ui/range/range_traits-3.rs | 1 - src/test/ui/range/range_traits-4.rs | 1 - src/test/ui/range/range_traits-5.rs | 1 - src/test/ui/range/range_traits-6.rs | 1 - src/test/ui/range/range_traits-7.rs | 1 - src/test/ui/reachable/expr_if.rs | 2 +- src/test/ui/reachable/expr_if.stderr | 20 +- ...rsive-types-are-not-uninhabited.nll.stderr | 16 + .../recursive-types-are-not-uninhabited.rs | 4 +- ...recursive-types-are-not-uninhabited.stderr | 12 +- src/test/ui/ref-suggestion.nll.stderr | 34 - src/test/ui/ref-suggestion.rs | 2 +- src/test/ui/ref-suggestion.stderr | 18 +- ...6537-closure-uses-region-from-container.rs | 7 - ...n-borrow-params-issue-29793-big.ast.stderr | 29 - ...n-borrow-params-issue-29793-big.mir.stderr | 39 - .../region-borrow-params-issue-29793-big.rs | 10 +- ...gion-borrow-params-issue-29793-big.stderr} | 8 +- ...borrow-params-issue-29793-small.nll.stderr | 363 - .../region-borrow-params-issue-29793-small.rs | 9 +- ...ion-borrow-params-issue-29793-small.stderr | 183 +- ...-bound-on-closure-outlives-call.nll.stderr | 24 - ...gion-bound-on-closure-outlives-call.stderr | 5 +- ...unds-on-objects-and-type-parameters.stderr | 6 +- ...nvariant-static-error-reporting.nll.stderr | 11 + ...time-bounds-on-fns-where-clause.nll.stderr | 12 + ...lifetime-bounds-on-fns-where-clause.stderr | 3 +- ...time-bounds-on-fns-where-clause.nll.stderr | 12 + ...lifetime-bounds-on-fns-where-clause.stderr | 3 +- .../region-object-lifetime-2.nll.stderr | 12 + .../regions/region-object-lifetime-2.stderr | 1 - .../region-object-lifetime-4.nll.stderr | 12 + .../regions/region-object-lifetime-4.stderr | 1 - .../region-object-lifetime-5.nll.stderr | 12 - .../ui/regions/region-object-lifetime-5.rs | 2 +- .../regions/region-object-lifetime-5.stderr | 13 +- ...ion-object-lifetime-in-coercion.nll.stderr | 38 + .../region-object-lifetime-in-coercion.stderr | 3 +- .../ui/regions/regions-addr-of-arg.nll.stderr | 20 - src/test/ui/regions/regions-addr-of-arg.rs | 2 +- .../ui/regions/regions-addr-of-arg.stderr | 27 +- .../regions/regions-addr-of-self.nll.stderr | 10 + .../ui/regions/regions-addr-of-self.stderr | 1 - .../regions-addr-of-upvar-self.nll.stderr | 35 + .../regions/regions-addr-of-upvar-self.stderr | 1 - .../regions-adjusted-lvalue-op.nll.stderr | 21 - .../regions/regions-adjusted-lvalue-op.stderr | 16 +- ...ait-outlives-container.migrate.nll.stderr} | 6 +- ...ertrait-outlives-container.migrate.stderr} | 6 +- ...n-supertrait-outlives-container.nll.stderr | 13 + ...c-type-in-supertrait-outlives-container.rs | 12 +- ...pe-in-supertrait-outlives-container.stderr | 20 - ...-type-region-bound-in-trait-not-met.stderr | 1 - ...-type-static-bound-in-trait-not-met.stderr | 1 - ...unded-by-trait-requiring-static.nll.stderr | 50 + ...s-bounded-by-trait-requiring-static.stderr | 1 - ...hod-type-parameters-cross-crate.nll.stderr | 13 + ...-method-type-parameters-cross-crate.stderr | 1 - ...hod-type-parameters-trait-bound.nll.stderr | 13 + ...-method-type-parameters-trait-bound.stderr | 1 - ...-bounded-method-type-parameters.nll.stderr | 10 + ...ions-bounded-method-type-parameters.stderr | 1 - src/test/ui/regions/regions-bounds.nll.stderr | 22 + ...ose-associated-type-into-object.nll.stderr | 36 + ...s-close-associated-type-into-object.stderr | 2 +- ...ions-close-object-into-object-1.nll.stderr | 12 - .../regions-close-object-into-object-1.rs | 2 +- .../regions-close-object-into-object-1.stderr | 15 +- ...ions-close-object-into-object-2.nll.stderr | 20 + .../regions-close-object-into-object-2.stderr | 1 - ...ions-close-object-into-object-3.nll.stderr | 12 - .../regions-close-object-into-object-3.rs | 2 +- .../regions-close-object-into-object-3.stderr | 15 +- ...ions-close-object-into-object-4.nll.stderr | 37 + .../regions-close-object-into-object-4.stderr | 1 - ...ions-close-object-into-object-5.nll.stderr | 29 + ...ons-close-over-type-parameter-1.nll.stderr | 20 + ...regions-close-over-type-parameter-1.stderr | 2 +- ...se-over-type-parameter-multiple.nll.stderr | 13 + ...-close-over-type-parameter-multiple.stderr | 1 - ...regions-close-param-into-object.nll.stderr | 36 + .../regions-close-param-into-object.stderr | 2 +- .../regions/regions-creating-enums.nll.stderr | 21 - src/test/ui/regions/regions-creating-enums.rs | 4 +- .../ui/regions/regions-creating-enums.stderr | 38 +- .../regions-creating-enums3.nll.stderr | 12 + .../ui/regions/regions-creating-enums3.stderr | 1 - .../regions-creating-enums4.nll.stderr | 12 + .../ui/regions/regions-creating-enums4.stderr | 1 - ...egions-early-bound-error-method.nll.stderr | 12 + .../regions-early-bound-error-method.stderr | 1 - .../regions-early-bound-error.nll.stderr | 12 + .../regions/regions-early-bound-error.stderr | 1 - .../regions/regions-escape-method.nll.stderr | 11 + .../ui/regions/regions-escape-method.stderr | 1 - ...regions-escape-via-trait-or-not.nll.stderr | 11 + .../regions-escape-via-trait-or-not.stderr | 1 - ...ons-free-region-ordering-callee.nll.stderr | 24 + ...regions-free-region-ordering-callee.stderr | 1 - ...region-ordering-caller.migrate.nll.stderr} | 0 ...ree-region-ordering-caller.migrate.stderr} | 1 - ...ons-free-region-ordering-caller.nll.stderr | 33 + .../regions-free-region-ordering-caller.rs | 16 +- ...ns-free-region-ordering-caller1.nll.stderr | 32 - .../regions-free-region-ordering-caller1.rs | 2 +- ...egions-free-region-ordering-caller1.stderr | 37 +- ...-free-region-ordering-incorrect.nll.stderr | 15 + ...ions-free-region-ordering-incorrect.stderr | 1 - ...mplied-bounds-projection-gap-1.nll.stderr} | 8 +- ...ions-infer-borrow-scope-too-big.nll.stderr | 12 - .../regions-infer-borrow-scope-too-big.rs | 4 +- .../regions-infer-borrow-scope-too-big.stderr | 20 +- ...ons-infer-bound-from-trait-self.nll.stderr | 11 + .../regions-infer-bound-from-trait.nll.stderr | 19 + .../regions/regions-infer-call-3.nll.stderr | 11 + .../ui/regions/regions-infer-call-3.stderr | 1 - ...nfer-contravariance-due-to-decl.nll.stderr | 13 + ...ns-infer-contravariance-due-to-decl.stderr | 1 - ...ns-infer-covariance-due-to-decl.nll.stderr | 13 + ...egions-infer-covariance-due-to-decl.stderr | 1 - ...ns-infer-invariance-due-to-decl.nll.stderr | 10 + ...-invariance-due-to-mutability-3.nll.stderr | 10 + ...-invariance-due-to-mutability-4.nll.stderr | 10 + .../regions-infer-not-param.nll.stderr | 26 + .../regions-infer-paramd-indirect.nll.stderr | 13 + ...regions-infer-proc-static-upvar.nll.stderr | 15 - .../regions-infer-proc-static-upvar.stderr | 17 +- .../regions-lifetime-bounds-on-fns.nll.stderr | 12 + .../regions-lifetime-bounds-on-fns.stderr | 3 +- ...etime-of-struct-or-enum-variant.nll.stderr | 21 - ...ions-lifetime-of-struct-or-enum-variant.rs | 4 +- ...-lifetime-of-struct-or-enum-variant.stderr | 36 +- .../regions/regions-nested-fns-2.nll.stderr | 18 - src/test/ui/regions/regions-nested-fns-2.rs | 2 +- .../ui/regions/regions-nested-fns-2.stderr | 21 +- .../ui/regions/regions-nested-fns.nll.stderr | 51 + src/test/ui/regions/regions-nested-fns.stderr | 2 - ...ions-normalize-in-where-clause-list.stderr | 1 - ...jection-container-hrtb.migrate.nll.stderr} | 0 ...-projection-container-hrtb.migrate.stderr} | 0 ...lives-projection-container-hrtb.nll.stderr | 24 + ...ions-outlives-projection-container-hrtb.rs | 12 +- ...-outlives-projection-container-hrtb.stderr | 37 - ...rojection-container-wc.migrate.nll.stderr} | 0 ...es-projection-container-wc.migrate.stderr} | 0 ...utlives-projection-container-wc.nll.stderr | 13 + ...egions-outlives-projection-container-wc.rs | 8 +- ...ns-outlives-projection-container-wc.stderr | 20 - ...s-outlives-projection-container.nll.stderr | 46 + ...ions-pattern-typing-issue-19552.nll.stderr | 14 - .../regions-pattern-typing-issue-19552.stderr | 8 +- ...ions-pattern-typing-issue-19997.ast.stderr | 12 - ...ions-pattern-typing-issue-19997.mir.stderr | 15 - .../regions-pattern-typing-issue-19997.rs | 6 +- ...regions-pattern-typing-issue-19997.stderr} | 3 +- ...ow-from-shorter-mut-ref-mut-ref.nll.stderr | 12 + ...borrow-from-shorter-mut-ref-mut-ref.stderr | 1 - ...s-reborrow-from-shorter-mut-ref.nll.stderr | 12 + ...gions-reborrow-from-shorter-mut-ref.stderr | 1 - .../regions/regions-ref-in-fn-arg.nll.stderr | 19 - src/test/ui/regions/regions-ref-in-fn-arg.rs | 4 +- .../ui/regions/regions-ref-in-fn-arg.stderr | 25 +- .../regions/regions-ret-borrowed-1.nll.stderr | 11 + .../ui/regions/regions-ret-borrowed-1.stderr | 1 - .../regions/regions-ret-borrowed.nll.stderr | 11 + .../ui/regions/regions-ret-borrowed.stderr | 1 - src/test/ui/regions/regions-ret.nll.stderr | 12 - src/test/ui/regions/regions-ret.rs | 2 +- src/test/ui/regions/regions-ret.stderr | 22 +- ...return-ref-to-upvar-issue-17403.nll.stderr | 13 + ...ons-return-ref-to-upvar-issue-17403.stderr | 1 - ...ions-return-stack-allocated-vec.nll.stderr | 12 - .../regions-return-stack-allocated-vec.rs | 2 +- .../regions-return-stack-allocated-vec.stderr | 15 +- .../regions-static-bound.ll.nll.stderr | 28 + .../regions-static-bound.migrate.nll.stderr | 28 + ...rr => regions-static-bound.migrate.stderr} | 3 +- src/test/ui/regions/regions-static-bound.rs | 8 +- .../regions/regions-steal-closure.nll.stderr | 16 - .../ui/regions/regions-steal-closure.stderr | 10 +- .../regions-trait-object-subtyping.nll.stderr | 24 + .../regions-trait-object-subtyping.stderr | 2 +- .../regions/regions-trait-variance.nll.stderr | 11 - src/test/ui/regions/regions-trait-variance.rs | 4 +- .../ui/regions/regions-trait-variance.stderr | 17 +- .../regions-var-type-out-of-scope.nll.stderr | 16 - .../regions/regions-var-type-out-of-scope.rs | 2 +- .../regions-var-type-out-of-scope.stderr | 16 +- ...se-covariant-in-second-position.nll.stderr | 13 + ...nt-use-covariant-in-second-position.stderr | 5 +- ...nce-contravariant-use-covariant.nll.stderr | 13 + ...ariance-contravariant-use-covariant.stderr | 1 - ...nce-covariant-use-contravariant.nll.stderr | 13 + ...ariance-covariant-use-contravariant.stderr | 1 - ...nce-invariant-use-contravariant.nll.stderr | 13 + ...ariance-invariant-use-contravariant.stderr | 1 - ...ariance-invariant-use-covariant.nll.stderr | 11 + .../ui/reject-specialized-drops-8142.stderr | 2 +- src/test/ui/repeat_count.stderr | 10 +- src/test/ui/repr/repr-align-assign.stderr | 1 - .../ui/repr/repr-packed-contains-align.stderr | 1 - .../repr/repr-transparent-other-items.stderr | 2 +- src/test/ui/repr/repr-transparent.stderr | 2 +- .../ui/reserved/reserved-attr-on-macro.stderr | 3 +- .../ui/resolve/enums-are-namespaced-xc.stderr | 2 +- src/test/ui/resolve/issue-14254.stderr | 8 +- src/test/ui/resolve/issue-16058.stderr | 1 - src/test/ui/resolve/issue-21221-1.stderr | 2 +- src/test/ui/resolve/issue-2356.stderr | 14 +- src/test/ui/resolve/issue-5035.stderr | 2 +- src/test/ui/resolve/levenshtein.stderr | 2 +- src/test/ui/resolve/privacy-enum-ctor.stderr | 2 +- .../ui/resolve/privacy-struct-ctor.stderr | 2 +- .../resolve/resolve-assoc-suggestions.stderr | 4 +- .../ui/resolve/resolve-bad-visibility.stderr | 2 - .../resolve-inconsistent-binding-mode.stderr | 2 +- .../resolve/resolve-primitive-fallback.stderr | 2 +- .../ui/resolve/resolve-self-in-impl-2.stderr | 2 +- .../resolve-speculative-adjustment.stderr | 2 +- ...resolve-type-param-in-item-in-trait.stderr | 8 +- .../ui/resolve/resolve-variant-assoc-item.rs | 4 +- .../resolve/resolve-variant-assoc-item.stderr | 8 +- .../ui/resolve/token-error-correct-3.stderr | 7 +- src/test/ui/resolve/tuple-struct-alias.stderr | 2 +- ...xed-closure-sugar-nonexistent-trait.stderr | 2 +- .../unresolved_static_type_field.stderr | 5 +- .../resolve/use_suggestion_placement.stderr | 2 +- src/test/ui/resolve_self_super_hint.rs | 1 - src/test/ui/resolve_self_super_hint.stderr | 8 +- src/test/ui/return/return-from-diverging.rs | 1 - .../ui/return/return-unit-from-diverging.rs | 1 - .../bind-by-move-no-guards.rs | 1 - .../feature-gate.gate_and_2015.stderr | 11 +- .../feature-gate.gate_and_2018.stderr | 2 +- .../feature-gate.gate_and_feature_nll.stderr | 2 +- .../feature-gate.gate_and_znll.stderr | 2 +- .../feature-gate.no_gate.stderr | 2 + .../feature-gate.rs | 8 +- .../rfc-basic-examples.rs | 1 - .../termination-trait-test-wrong-type.rs | 4 +- .../termination-trait-test-wrong-type.stderr | 6 +- .../borrowck-issue-49631.nll.stderr | 2 +- .../borrowck-issue-49631.stderr | 9 +- .../enum.nll.stderr | 21 - .../ui/rfc-2005-default-binding-mode/enum.rs | 6 +- .../rfc-2005-default-binding-mode/enum.stderr | 13 +- .../explicit-mut.nll.stderr | 21 - .../explicit-mut.rs | 6 +- .../explicit-mut.stderr | 13 +- .../ui/rfc-2005-default-binding-mode/for.rs | 1 + .../rfc-2005-default-binding-mode/for.stderr | 19 +- .../ui/rfc-2008-non-exhaustive/struct.stderr | 2 +- .../uninhabited/auxiliary/uninhabited.rs | 33 + .../uninhabited/coercions.rs | 38 + .../uninhabited/coercions.stderr | 47 + .../uninhabited/coercions_same_crate.rs | 46 + .../uninhabited/coercions_same_crate.stderr | 47 + .../uninhabited/indirect_match.rs | 36 + .../uninhabited/indirect_match.stderr | 35 + .../uninhabited/indirect_match_same_crate.rs | 52 + .../indirect_match_same_crate.stderr | 59 + ...indirect_match_with_exhaustive_patterns.rs | 40 + ...rect_match_with_exhaustive_patterns.stderr | 35 + ...tch_with_exhaustive_patterns_same_crate.rs | 58 + .../uninhabited/match.rs | 34 + .../uninhabited/match.stderr | 35 + .../uninhabited/match_same_crate.rs | 42 + .../uninhabited/match_same_crate.stderr | 49 + .../match_with_exhaustive_patterns.rs | 37 + .../match_with_exhaustive_patterns.stderr | 35 + ...tch_with_exhaustive_patterns_same_crate.rs | 48 + .../uninhabited/patterns.rs | 59 + .../uninhabited/patterns_same_crate.rs | 71 + .../uninhabited/patterns_same_crate.stderr | 38 + .../ui/rfc-2008-non-exhaustive/variant.stderr | 2 +- .../variants_fictive_visibility.rs | 12 + .../ui/rfc-2093-infer-outlives/cross-crate.rs | 1 - .../dont-infer-static.rs | 3 - .../dont-infer-static.stderr | 4 +- src/test/ui/rfc-2093-infer-outlives/enum.rs | 2 - .../ui/rfc-2093-infer-outlives/enum.stderr | 6 +- .../rfc-2093-infer-outlives/explicit-enum.rs | 1 - .../explicit-struct.rs | 1 - .../rfc-2093-infer-outlives/explicit-union.rs | 1 - .../rfc-2093-infer-outlives/infer-static.rs | 1 - .../ui/rfc-2093-infer-outlives/projection.rs | 1 - .../regions-struct-not-wf.stderr | 2 +- .../dbg-macro-expected-behavior.rs | 41 +- .../dbg-macro-move-semantics.nll.stderr | 15 - .../dbg-macro-move-semantics.rs | 1 - .../dbg-macro-move-semantics.stderr | 16 +- .../ui/rfc1445/feature-gate.no_gate.stderr | 3 +- .../ui/rfc1445/match-forbidden-without-eq.rs | 2 + .../rfc1445/match-forbidden-without-eq.stderr | 9 + .../gat-dont-ice-on-absent-feature.rs | 14 + .../gat-dont-ice-on-absent-feature.stderr | 12 + ...ssociated_type_undeclared_lifetimes.stderr | 2 +- .../extern-crate-idiomatic-in-2018.fixed | 8 +- .../extern-crate-idiomatic-in-2018.rs | 6 +- .../extern-crate-idiomatic-in-2018.stderr | 8 +- .../ui/rust-2018/extern-crate-idiomatic.fixed | 1 - .../ui/rust-2018/extern-crate-idiomatic.rs | 1 - ...extern-crate-referenced-by-self-path.fixed | 1 - .../extern-crate-referenced-by-self-path.rs | 1 - .../ui/rust-2018/extern-crate-rename.fixed | 1 - src/test/ui/rust-2018/extern-crate-rename.rs | 1 - .../ui/rust-2018/extern-crate-submod.fixed | 1 - src/test/ui/rust-2018/extern-crate-submod.rs | 1 - .../ui/rust-2018/remove-extern-crate.fixed | 7 +- src/test/ui/rust-2018/remove-extern-crate.rs | 5 +- .../ui/rust-2018/remove-extern-crate.stderr | 12 +- .../uniform-paths/macro-rules.stderr | 2 +- .../uniform-paths/prelude-fail.stderr | 2 +- .../arbitrary-self-types-not-object-safe.rs | 0 ...rbitrary-self-types-not-object-safe.stderr | 0 .../self/arbitrary_self_types_pin_lifetime.rs | 60 + ...f_types_pin_lifetime_impl_trait.nll.stderr | 14 + ...rary_self_types_pin_lifetime_impl_trait.rs | 13 + ..._self_types_pin_lifetime_impl_trait.stderr | 20 + ...elf_types_pin_lifetime_mismatch.nll.stderr | 28 + ...itrary_self_types_pin_lifetime_mismatch.rs | 18 + ...ry_self_types_pin_lifetime_mismatch.stderr | 26 + ...itrary_self_types_pointers_and_wrappers.rs | 1 + ...arbitrary_self_types_raw_pointer_struct.rs | 0 .../arbitrary_self_types_raw_pointer_trait.rs | 0 .../self/arbitrary_self_types_silly.rs | 0 .../arbitrary_self_types_stdlib_pointers.rs | 1 + .../self/arbitrary_self_types_struct.rs | 0 .../self/arbitrary_self_types_trait.rs | 0 .../arbitrary_self_types_unsized_struct.rs | 0 .../self/auxiliary/explicit_self_xcrate.rs | 0 .../self/builtin-superkinds-self-type.rs | 0 .../self/by-value-self-in-mut-slot.rs | 0 .../self/explicit-self-closures.rs | 2 +- .../self/explicit-self-generic.rs | 0 .../self/explicit-self-objects-uniq.rs | 0 .../{run-pass => ui}/self/explicit-self.rs | 0 .../self/explicit_self_xcrate_exe.rs | 0 src/test/{run-pass => ui}/self/move-self.rs | 0 .../object-safety-sized-self-by-value-self.rs | 0 ...object-safety-sized-self-generic-method.rs | 0 .../object-safety-sized-self-return-Self.rs | 0 .../self-impl.rs => ui/self/self-impl-2.rs} | 0 .../self/self-in-mut-slot-default-method.rs | 0 .../self/self-in-mut-slot-immediate-value.rs | 0 .../{run-pass => ui}/self/self-in-typedefs.rs | 2 +- .../{run-pass => ui}/self/self-re-assign.rs | 0 .../self/self-shadowing-import.rs | 0 .../{run-pass => ui}/self/self-type-param.rs | 2 +- src/test/ui/self/self_lifetime.rs | 13 + src/test/ui/self/self_type_keyword-2.stderr | 3 +- src/test/ui/self/self_type_keyword.stderr | 2 +- .../self/string-self-append.rs | 0 src/test/ui/self/suggest-self.rs | 1 - .../self/ufcs-explicit-self.rs | 0 .../self/uniq-self-in-mut-slot.rs | 0 .../{run-pass => ui}/self/where-for-self.rs | 0 src/test/ui/shift-various-bad-types.stderr | 6 +- ...insic-generic-arithmetic-saturating.stderr | 1 - .../simd-intrinsic-generic-arithmetic.stderr | 1 - .../simd-intrinsic-generic-bitmask.stderr | 1 - .../simd-intrinsic-generic-cast.stderr | 1 - .../simd-intrinsic-generic-comparison.stderr | 1 - .../simd-intrinsic-generic-elements.stderr | 1 - .../simd-intrinsic-generic-reduction.stderr | 1 - .../simd-intrinsic-generic-select.stderr | 1 - src/test/ui/simd-type.stderr | 2 +- src/test/ui/slice-mut-2.nll.stderr | 12 - src/test/ui/slice-mut-2.rs | 2 +- src/test/ui/slice-mut-2.stderr | 7 +- src/test/ui/span/E0493.stderr | 1 - ...orrow-overloaded-auto-deref-mut.nll.stderr | 88 - ...ck-borrow-overloaded-auto-deref-mut.stderr | 56 +- ...wck-borrow-overloaded-deref-mut.nll.stderr | 35 - ...orrowck-borrow-overloaded-deref-mut.stderr | 24 +- ...owck-call-is-borrow-issue-12224.nll.stderr | 51 - .../borrowck-call-is-borrow-issue-12224.rs | 8 +- ...borrowck-call-is-borrow-issue-12224.stderr | 44 +- ...-call-method-from-mut-aliasable.nll.stderr | 12 - ...owck-call-method-from-mut-aliasable.stderr | 6 +- .../ui/span/borrowck-fn-in-const-b.nll.stderr | 11 - .../ui/span/borrowck-fn-in-const-b.stderr | 6 +- ...orrowck-let-suggestion-suffixes.nll.stderr | 42 - .../span/borrowck-let-suggestion-suffixes.rs | 46 +- .../borrowck-let-suggestion-suffixes.stderr | 56 +- .../borrowck-object-mutability.nll.stderr | 21 - .../ui/span/borrowck-object-mutability.stderr | 10 +- .../span/borrowck-ref-into-rvalue.nll.stderr | 16 - src/test/ui/span/borrowck-ref-into-rvalue.rs | 2 +- .../ui/span/borrowck-ref-into-rvalue.stderr | 17 +- .../span/destructor-restrictions.nll.stderr | 18 - .../ui/span/destructor-restrictions.stderr | 9 +- .../ui/span/dropck-object-cycle.nll.stderr | 15 - src/test/ui/span/dropck-object-cycle.rs | 1 - src/test/ui/span/dropck-object-cycle.stderr | 11 +- .../span/dropck_arr_cycle_checked.nll.stderr | 43 - src/test/ui/span/dropck_arr_cycle_checked.rs | 3 - .../ui/span/dropck_arr_cycle_checked.stderr | 68 +- .../dropck_direct_cycle_with_drop.nll.stderr | 29 - .../span/dropck_direct_cycle_with_drop.stderr | 22 +- .../ui/span/dropck_misc_variants.nll.stderr | 30 - src/test/ui/span/dropck_misc_variants.stderr | 22 +- .../span/dropck_vec_cycle_checked.nll.stderr | 43 - src/test/ui/span/dropck_vec_cycle_checked.rs | 3 - .../ui/span/dropck_vec_cycle_checked.stderr | 68 +- .../ui/span/gated-features-attr-spans.stderr | 3 +- .../ui/span/impl-wrong-item-for-trait.stderr | 2 +- src/test/ui/span/issue-11925.nll.stderr | 9 - src/test/ui/span/issue-11925.rs | 2 +- src/test/ui/span/issue-11925.stderr | 14 +- src/test/ui/span/issue-15480.nll.stderr | 16 - src/test/ui/span/issue-15480.rs | 2 +- src/test/ui/span/issue-15480.stderr | 14 +- ...locals-die-before-temps-of-body.nll.stderr | 34 - ...338-locals-die-before-temps-of-body.stderr | 21 +- src/test/ui/span/issue-24356.rs | 2 - src/test/ui/span/issue-24356.stderr | 2 +- ...opck-child-has-items-via-parent.nll.stderr | 17 - ...5-dropck-child-has-items-via-parent.stderr | 11 +- ...ue-24805-dropck-trait-has-items.nll.stderr | 42 - .../issue-24805-dropck-trait-has-items.stderr | 33 +- .../issue-24895-copy-clone-dropck.nll.stderr | 16 - .../span/issue-24895-copy-clone-dropck.stderr | 11 +- src/test/ui/span/issue-25199.nll.stderr | 15 - src/test/ui/span/issue-25199.rs | 1 - src/test/ui/span/issue-25199.stderr | 24 +- src/test/ui/span/issue-26656.nll.stderr | 16 - src/test/ui/span/issue-26656.stderr | 11 +- src/test/ui/span/issue-27522.stderr | 1 - src/test/ui/span/issue-29106.nll.stderr | 29 - src/test/ui/span/issue-29106.stderr | 22 +- src/test/ui/span/issue-34264.stderr | 2 +- src/test/ui/span/issue-36530.stderr | 9 +- src/test/ui/span/issue-36537.nll.stderr | 14 - src/test/ui/span/issue-36537.stderr | 9 +- src/test/ui/span/issue-39018.rs | 20 + src/test/ui/span/issue-39018.stderr | 150 +- src/test/ui/span/issue-40157.nll.stderr | 13 - src/test/ui/span/issue-40157.stderr | 12 +- src/test/ui/span/issue-7575.rs | 2 - src/test/ui/span/issue-7575.stderr | 16 +- .../ui/span/issue28498-reject-ex1.nll.stderr | 17 - src/test/ui/span/issue28498-reject-ex1.rs | 3 +- src/test/ui/span/issue28498-reject-ex1.stderr | 26 +- ...ssue28498-reject-lifetime-param.nll.stderr | 17 - .../span/issue28498-reject-lifetime-param.rs | 3 +- .../issue28498-reject-lifetime-param.stderr | 24 +- .../issue28498-reject-passed-to-fn.nll.stderr | 17 - .../ui/span/issue28498-reject-passed-to-fn.rs | 3 +- .../issue28498-reject-passed-to-fn.stderr | 24 +- .../issue28498-reject-trait-bound.nll.stderr | 17 - .../ui/span/issue28498-reject-trait-bound.rs | 3 +- .../span/issue28498-reject-trait-bound.stderr | 24 +- src/test/ui/span/mut-arg-hint.nll.stderr | 27 - src/test/ui/span/mut-arg-hint.rs | 6 +- src/test/ui/span/mut-arg-hint.stderr | 18 +- .../span/mut-ptr-cant-outlive-ref.nll.stderr | 14 - .../ui/span/mut-ptr-cant-outlive-ref.stderr | 6 +- src/test/ui/span/range-2.nll.stderr | 25 - src/test/ui/span/range-2.stderr | 20 +- ...ionck-unboxed-closure-lifetimes.nll.stderr | 14 - .../regionck-unboxed-closure-lifetimes.stderr | 7 +- ...-close-over-borrowed-ref-in-obj.nll.stderr | 16 - .../regions-close-over-borrowed-ref-in-obj.rs | 2 +- ...ions-close-over-borrowed-ref-in-obj.stderr | 12 +- ...ons-close-over-type-parameter-2.nll.stderr | 13 - ...regions-close-over-type-parameter-2.stderr | 9 +- ...egions-escape-loop-via-variable.nll.stderr | 13 - .../regions-escape-loop-via-variable.stderr | 9 +- .../regions-escape-loop-via-vec.nll.stderr | 49 - .../ui/span/regions-escape-loop-via-vec.rs | 2 +- .../span/regions-escape-loop-via-vec.stderr | 46 +- ...-infer-borrow-scope-within-loop.nll.stderr | 14 - ...ions-infer-borrow-scope-within-loop.stderr | 7 +- ...d-is-not-static-ensures-scoping.nll.stderr | 29 - .../send-is-not-static-ensures-scoping.stderr | 20 +- .../send-is-not-static-std-sync-2.nll.stderr | 37 - .../span/send-is-not-static-std-sync-2.stderr | 30 +- .../send-is-not-static-std-sync.nll.stderr | 72 - .../span/send-is-not-static-std-sync.stderr | 65 +- src/test/ui/span/slice-borrow.nll.stderr | 17 - src/test/ui/span/slice-borrow.rs | 2 +- src/test/ui/span/slice-borrow.stderr | 12 +- src/test/ui/span/suggestion-non-ascii.rs | 1 - ...-must-not-hide-type-from-dropck.nll.stderr | 29 - .../vec-must-not-hide-type-from-dropck.stderr | 22 +- .../vec_refs_data_with_early_death.nll.stderr | 31 - .../vec_refs_data_with_early_death.stderr | 22 +- src/test/ui/span/visibility-ty-params.stderr | 1 - .../wf-method-late-bound-regions.nll.stderr | 14 - .../span/wf-method-late-bound-regions.stderr | 10 +- ...specialization-feature-gate-default.stderr | 3 +- ...specialization-feature-gate-default.stderr | 3 +- .../specialization-overlap-hygiene.stderr | 1 - .../stability-attribute-issue.rs | 6 +- .../stability-attribute-issue.stderr | 10 +- .../stability-attribute-sanity-2.stderr | 2 +- .../stability-attribute-sanity.stderr | 3 +- src/test/ui/static/static-closures.stderr | 1 - .../ui/static/static-drop-scope.nll.stderr | 72 - src/test/ui/static/static-drop-scope.rs | 4 +- src/test/ui/static/static-drop-scope.stderr | 27 +- .../static/static-lifetime-bound.nll.stderr | 22 - .../ui/static/static-lifetime-bound.stderr | 11 +- .../ui/static/static-mut-not-constant.stderr | 2 +- .../static-reference-to-fn-2.nll.stderr | 47 - .../ui/static/static-reference-to-fn-2.rs | 8 +- .../ui/static/static-reference-to-fn-2.stderr | 86 +- .../ui/static/static-region-bound.nll.stderr | 13 - src/test/ui/static/static-region-bound.rs | 2 +- src/test/ui/static/static-region-bound.stderr | 11 +- src/test/ui/std-uncopyable-atomics.nll.stderr | 39 - src/test/ui/std-uncopyable-atomics.stderr | 8 +- src/test/ui/stmt_expr_attrs_no_feature.rs | 16 +- src/test/ui/stmt_expr_attrs_no_feature.stderr | 27 +- src/test/ui/str/str-array-assignment.stderr | 2 +- src/test/ui/str/str-as-char.fixed | 3 +- src/test/ui/str/str-as-char.rs | 1 - src/test/ui/str/str-as-char.stderr | 12 +- .../ui/str/str-concat-on-double-ref.stderr | 7 +- src/test/ui/struct-literal-variant-in-if.rs | 25 + .../ui/struct-literal-variant-in-if.stderr | 73 + .../ui/structs/struct-base-wrong-type-2.rs | 19 - .../structs/struct-base-wrong-type-2.stderr | 21 - src/test/ui/structs/struct-base-wrong-type.rs | 17 +- .../ui/structs/struct-base-wrong-type.stderr | 24 +- src/test/ui/structs/struct-field-cfg.stderr | 2 +- .../ui/structs/struct-fields-shorthand.rs | 1 - .../structs/struct-pat-derived-error.stderr | 2 +- .../struct-path-associated-type.stderr | 2 +- src/test/ui/structs/struct-path-self.stderr | 2 +- ...structure-constructor-type-mismatch.stderr | 2 +- src/test/ui/substs-ppaux.normal.stderr | 2 +- src/test/ui/substs-ppaux.verbose.stderr | 2 +- .../ui/suggestions/attribute-typos.stderr | 9 +- .../borrow-for-loop-head.nll.stderr | 25 - .../suggestions/borrow-for-loop-head.stderr | 11 +- .../dont-suggest-ref/duplicate-suggestions.rs | 2 - .../duplicate-suggestions.stderr | 68 +- .../dont-suggest-ref/move-into-closure.rs | 2 - .../dont-suggest-ref/move-into-closure.stderr | 84 +- .../ui/suggestions/dont-suggest-ref/simple.rs | 2 - .../dont-suggest-ref/simple.stderr | 240 +- src/test/ui/suggestions/issue-57672.rs | 14 + src/test/ui/suggestions/issue-59819.fixed | 35 + src/test/ui/suggestions/issue-59819.rs | 35 + src/test/ui/suggestions/issue-59819.stderr | 39 + src/test/ui/suggestions/match-ergonomics.rs | 41 + .../ui/suggestions/match-ergonomics.stderr | 52 + .../suggestions/recover-invalid-float.fixed | 10 + .../ui/suggestions/recover-invalid-float.rs | 11 +- .../suggestions/recover-invalid-float.stderr | 42 +- .../suggest-impl-trait-lifetime.nll.stderr | 11 + src/test/ui/suggestions/suggest-labels.stderr | 18 +- .../ui/suggestions/suggest-methods.stderr | 6 +- src/test/ui/suggestions/suggest-ref-mut.rs | 2 - .../ui/suggestions/suggest-ref-mut.stderr | 9 +- .../suggest-std-when-using-type.rs | 7 + .../suggest-std-when-using-type.stderr | 24 + src/test/ui/suggestions/suggest-variants.rs | 3 + .../ui/suggestions/suggest-variants.stderr | 65 +- .../type-ascription-instead-of-path.stderr | 2 +- ...e-mismatch-struct-field-shorthand-2.stderr | 20 +- ...ype-mismatch-struct-field-shorthand.stderr | 27 +- ...type-argument-instead-of-assoc-type.stderr | 2 +- src/test/ui/svh/svh-change-lit.stderr | 1 - .../ui/svh/svh-change-significant-cfg.stderr | 1 - src/test/ui/svh/svh-change-trait-bound.stderr | 1 - src/test/ui/svh/svh-change-type-arg.stderr | 1 - src/test/ui/svh/svh-change-type-ret.stderr | 1 - src/test/ui/svh/svh-change-type-static.stderr | 1 - src/test/ui/svh/svh-use-trait.stderr | 1 - src/test/ui/symbol-names/basic.stderr | 2 +- src/test/ui/symbol-names/impl1.stderr | 4 +- .../syntax-trait-polarity-feature-gate.stderr | 3 +- src/test/ui/syntax-trait-polarity.stderr | 2 +- src/test/ui/synthetic-param.stderr | 1 - src/test/ui/target-feature-gate.rs | 2 + src/test/ui/target-feature-gate.stderr | 5 +- src/test/ui/thread-local-in-ctfe.nll.stderr | 23 +- src/test/ui/thread-local-in-ctfe.rs | 6 + src/test/ui/thread-local-in-ctfe.stderr | 30 +- src/test/ui/thread-local-mutation.nll.stderr | 9 - src/test/ui/thread-local-mutation.stderr | 5 +- .../tool-attributes-misplaced-1.stderr | 3 +- src/test/ui/tool_lints.stderr | 1 - src/test/ui/trace_macros-gate.stderr | 12 +- src/test/ui/traits/cycle-cache-err-60010.rs | 71 + .../ui/traits/cycle-cache-err-60010.stderr | 20 + src/test/ui/traits/trait-alias-object.stderr | 2 +- .../traits/trait-as-struct-constructor.stderr | 1 - .../trait-coercion-generic-regions.nll.stderr | 15 - .../trait-coercion-generic-regions.stderr | 11 +- ...-impl-can-not-have-untraitful-items.stderr | 2 +- .../ui/traits/trait-impl-for-module.stderr | 1 - ...trait-has-wrong-lifetime-parameters.stderr | 1 - src/test/ui/traits/trait-item-privacy.stderr | 2 +- .../trait-object-auto-dedup-in-impl.stderr | 1 - .../traits/trait-object-macro-matcher.stderr | 3 +- .../traits/trait-object-vs-lifetime-2.stderr | 1 - .../ui/traits/trait-object-vs-lifetime.stderr | 3 +- ...n-projection-output-repeated-supertrait.rs | 3 + .../ui/traits/trait-safety-trait-impl.stderr | 2 +- src/test/ui/traits/trait-test-2.stderr | 2 +- ...inductive-overflow-supertrait-oibit.stderr | 3 +- .../ui/traits/traits-multidispatch-bad.stderr | 4 + .../transmute-from-fn-item-types-error.stderr | 2 +- .../ui/transmute/transmute-imut-to-mut.rs | 1 - ...unds-inconsistent-copy-reborrow.nll.stderr | 19 - ...l-bounds-inconsistent-copy-reborrow.stderr | 14 +- ...ounds-inconsistent-projection-error.stderr | 4 + .../ui/trivial-bounds/trivial-bounds-leak.rs | 1 - .../trivial-bounds/trivial-bounds-leak.stderr | 2 +- .../ui/try-block/try-block-bad-lifetime.rs | 1 - .../try-block/try-block-bad-lifetime.stderr | 2 +- src/test/ui/try-block/try-block-bad-type.rs | 2 +- .../ui/try-block/try-block-bad-type.stderr | 9 +- src/test/ui/try-block/try-block-catch.rs | 10 + src/test/ui/try-block/try-block-catch.stderr | 10 + .../try-block/try-block-in-edition2015.stderr | 1 - .../try-block/try-block-maybe-bad-lifetime.rs | 1 - .../try-block-maybe-bad-lifetime.stderr | 2 +- src/test/ui/try-block/try-block-opt-init.rs | 1 - src/test/ui/try-on-option.rs | 4 +- src/test/ui/try-on-option.stderr | 7 +- src/test/ui/try-poll.rs | 1 - .../ui/tutorial-suffix-inference-test.stderr | 17 +- .../ui/type-alias-enum-variants-panic.stderr | 3 +- .../ui/type-alias-enum-variants-priority.rs | 1 - .../type-alias-enum-variants-priority.stderr | 12 +- src/test/ui/type/type-arg-out-of-scope.stderr | 4 +- .../ui/type/type-ascription-precedence.stderr | 2 +- .../type/type-ascription-with-fn-call.stderr | 1 - .../assignment-expected-bool.stderr | 2 +- .../ui/type/type-check/issue-41314.stderr | 2 +- .../type/type-check/missing_trait_impl.stderr | 2 +- .../type-dependent-def-issue-49241.stderr | 2 +- src/test/ui/type/type-mismatch-multiple.rs | 1 - ...ter-defaults-referencing-Self-ppaux.stderr | 2 +- .../ui/type/type-path-err-node-types.stderr | 2 +- .../typeck-auto-trait-no-supertraits-2.stderr | 1 - .../typeck-auto-trait-no-supertraits.stderr | 1 - ...lt-trait-impl-cross-crate-coherence.stderr | 2 +- ...typeck-default-trait-impl-negation-sync.rs | 2 - ...ck-default-trait-impl-negation-sync.stderr | 12 +- .../ui/ufcs/ufcs-explicit-self-bad.stderr | 3 +- src/test/ui/ufcs/ufcs-partially-resolved.rs | 4 +- .../ui/ufcs/ufcs-partially-resolved.stderr | 10 +- .../ui/ufcs/ufcs-qpath-self-mismatch.stderr | 10 +- .../unboxed-closure-feature-gate.stderr | 3 +- .../unboxed-closure-illegal-move.nll.stderr | 35 - .../unboxed-closure-illegal-move.stderr | 16 +- ...boxed-closure-immutable-capture.nll.stderr | 75 - .../unboxed-closure-immutable-capture.rs | 6 +- .../unboxed-closure-immutable-capture.stderr | 89 +- .../unboxed-closure-region.nll.stderr | 16 - .../unboxed-closure-region.stderr | 10 +- ...nboxed-closure-sugar-not-used-on-fn.stderr | 6 +- ...oxed-closure-sugar-used-on-struct-1.stderr | 2 +- ...nboxed-closure-sugar-used-on-struct.stderr | 2 +- ...ong-number-number-type-parameters-3.stderr | 2 +- ...wrong-number-number-type-parameters.stderr | 2 +- .../unboxed-closure-sugar-wrong-trait.stderr | 2 +- ...nboxed-closures-borrow-conflict.nll.stderr | 15 - .../unboxed-closures-borrow-conflict.stderr | 10 +- ...-closures-failed-recursive-fn-1.nll.stderr | 62 - .../unboxed-closures-failed-recursive-fn-1.rs | 4 +- ...oxed-closures-failed-recursive-fn-1.stderr | 58 +- ...ument-types-two-region-pointers.nll.stderr | 12 + ...-argument-types-two-region-pointers.stderr | 1 - ...nfer-fnmut-calling-fnmut-no-mut.nll.stderr | 21 - ...osures-infer-fnmut-calling-fnmut-no-mut.rs | 7 +- ...es-infer-fnmut-calling-fnmut-no-mut.stderr | 21 +- ...losures-infer-fnmut-missing-mut.nll.stderr | 11 - ...nboxed-closures-infer-fnmut-missing-mut.rs | 2 +- ...ed-closures-infer-fnmut-missing-mut.stderr | 6 +- ...es-infer-fnmut-move-missing-mut.nll.stderr | 11 - ...d-closures-infer-fnmut-move-missing-mut.rs | 2 +- ...osures-infer-fnmut-move-missing-mut.stderr | 6 +- .../unboxed-closures-mutate-upvar.nll.stderr | 45 - .../unboxed-closures-mutate-upvar.rs | 4 +- .../unboxed-closures-mutate-upvar.stderr | 41 +- ...s-mutated-upvar-from-fn-closure.ast.stderr | 20 - ...s-mutated-upvar-from-fn-closure.mir.stderr | 20 - ...-closures-mutated-upvar-from-fn-closure.rs | 6 +- ...ures-mutated-upvar-from-fn-closure.stderr} | 6 +- ...sures-recursive-fn-using-fn-mut.nll.stderr | 12 - ...-closures-recursive-fn-using-fn-mut.stderr | 6 +- .../unboxed-closures-type-mismatch.stderr | 4 + .../dyn-trait-underscore-in-struct.stderr | 3 +- .../dyn-trait-underscore.nll.stderr | 11 + .../dyn-trait-underscore.stderr | 1 - .../ui/underscore-lifetime/in-binder.stderr | 1 - .../underscore-lifetime-binders.stderr | 3 +- ...rscore-lifetime-elison-mismatch.nll.stderr | 11 + ...underscore-lifetime-elison-mismatch.stderr | 1 - .../underscore-outlives-bounds.stderr | 1 - ...se-inherent-impl-ampersand.rust2015.stderr | 1 - ...se-inherent-impl-ampersand.rust2018.stderr | 1 - ...e-inherent-impl-underscore.rust2015.stderr | 1 - ...e-inherent-impl-underscore.rust2018.stderr | 1 - ...e-clause-trait-impl-region.rust2015.stderr | 1 - ...e-clause-trait-impl-region.rust2018.stderr | 1 - ...ause-trait-impl-underscore.rust2015.stderr | 1 - ...ause-trait-impl-underscore.rust2018.stderr | 1 - .../underscore-lifetime/where-clauses.stderr | 1 - .../ui/uninhabited/uninhabited-irrefutable.rs | 1 - .../uninhabited-matches-feature-gated.stderr | 2 +- .../ui/uninhabited/uninhabited-patterns.rs | 1 - ...nion-borrow-move-parent-sibling.nll.stderr | 70 - .../union/union-borrow-move-parent-sibling.rs | 10 +- .../union-borrow-move-parent-sibling.stderr | 77 +- src/test/ui/union/union-derive-clone.stderr | 2 +- src/test/ui/union/union-fields-2.stderr | 2 +- src/test/ui/union/union-suggest-field.stderr | 2 +- src/test/ui/unknown-lint-tool-name.stderr | 1 - src/test/ui/unnecessary-extern-crate.rs | 2 +- src/test/ui/unop-move-semantics.nll.stderr | 52 - src/test/ui/unop-move-semantics.rs | 2 +- src/test/ui/unop-move-semantics.stderr | 21 +- src/test/ui/unreachable/unreachable-arm.rs | 1 - .../unreachable/unreachable-loop-patterns.rs | 2 +- .../unreachable-loop-patterns.stderr | 8 +- .../ui/unreachable/unreachable-try-pattern.rs | 1 - src/test/ui/unsafe/ranged_ints2_const.stderr | 8 +- src/test/ui/unsafe/ranged_ints3_const.stderr | 2 +- src/test/ui/unsafe/unsafe-const-fn.rs | 1 - .../borrow-after-move.nll.stderr | 57 - .../ui/unsized-locals/borrow-after-move.rs | 10 +- .../unsized-locals/borrow-after-move.stderr | 42 +- .../ui/unsized-locals/double-move.nll.stderr | 63 - src/test/ui/unsized-locals/double-move.stderr | 26 +- .../unsized-locals/unsized-exprs2.nll.stderr | 9 - src/test/ui/unsized-locals/unsized-exprs2.rs | 2 +- .../ui/unsized-locals/unsized-exprs2.stderr | 6 +- src/test/ui/unsized-locals/unsized-index.rs | 23 + src/test/ui/unsized/unsized-enum2.rs | 1 - .../ui/unspecified-self-in-trait-ref.stderr | 2 +- src/test/ui/use/issue-18986.stderr | 1 - .../use-after-move-based-on-type.nll.stderr | 13 - .../ui/use/use-after-move-based-on-type.rs | 2 +- .../use/use-after-move-based-on-type.stderr | 10 +- ...r-move-implicity-coerced-object.nll.stderr | 14 - ...use-after-move-implicity-coerced-object.rs | 2 +- ...after-move-implicity-coerced-object.stderr | 9 +- ...e-after-move-self-based-on-type.nll.stderr | 13 - .../use/use-after-move-self-based-on-type.rs | 2 +- .../use-after-move-self-based-on-type.stderr | 6 +- .../ui/use/use-after-move-self.nll.stderr | 13 - src/test/ui/use/use-after-move-self.rs | 2 +- src/test/ui/use/use-after-move-self.stderr | 6 +- src/test/ui/use/use-associated-const.rs | 13 + src/test/ui/use/use-associated-const.stderr | 9 + src/test/ui/use/use-from-trait-xc.stderr | 8 +- src/test/ui/use/use-from-trait.rs | 17 +- src/test/ui/use/use-from-trait.stderr | 14 +- src/test/ui/use/use-keyword.stderr | 2 +- src/test/ui/use/use-mod.stderr | 2 +- src/test/ui/use/use-mod/use-mod-4.stderr | 2 +- src/test/ui/use/use-self-type.stderr | 2 +- src/test/ui/use/use-super-global-path.stderr | 2 +- src/test/ui/utf8_idents.stderr | 12 +- .../variance/variance-associated-types.stderr | 1 - .../variance-btree-invariant-types.nll.stderr | 106 + .../variance-cell-is-invariant.nll.stderr | 13 + .../variance-cell-is-invariant.stderr | 1 - ...riance-contravariant-arg-object.nll.stderr | 24 + ...e-contravariant-arg-trait-match.nll.stderr | 24 + ...-contravariant-self-trait-match.nll.stderr | 24 + .../variance-covariant-arg-object.nll.stderr | 24 + ...iance-covariant-arg-trait-match.nll.stderr | 24 + ...ance-covariant-self-trait-match.nll.stderr | 24 + .../variance-invariant-arg-object.nll.stderr | 24 + ...iance-invariant-arg-trait-match.nll.stderr | 24 + ...ance-invariant-self-trait-match.nll.stderr | 24 + .../variance/variance-issue-20533.nll.stderr | 33 - .../ui/variance/variance-issue-20533.stderr | 12 +- .../ui/variance/variance-object-types.stderr | 1 - .../variance/variance-regions-direct.stderr | 1 - .../variance/variance-regions-indirect.stderr | 1 - .../variance-regions-unused-direct.stderr | 4 +- .../variance-regions-unused-indirect.stderr | 4 +- .../ui/variance/variance-trait-bounds.stderr | 1 - .../variance-trait-matching.nll.stderr | 12 + .../variance-trait-object-bound.stderr | 1 - .../ui/variance/variance-types-bounds.stderr | 1 - src/test/ui/variance/variance-types.stderr | 1 - .../variance-unused-region-param.stderr | 4 +- .../variance-unused-type-param.stderr | 6 +- ...ance-use-contravariant-struct-1.nll.stderr | 13 + ...variance-use-covariant-struct-1.nll.stderr | 13 + ...variance-use-invariant-struct-1.nll.stderr | 24 + .../ui/variants/variant-used-as-type.stderr | 1 - .../ui/vec/vec-mut-iter-borrow.nll.stderr | 14 - src/test/ui/vec/vec-mut-iter-borrow.stderr | 8 +- .../ui/walk-struct-literal-with.nll.stderr | 13 - src/test/ui/walk-struct-literal-with.rs | 2 +- src/test/ui/walk-struct-literal-with.stderr | 8 +- src/test/ui/wasm-import-module.rs | 1 - src/test/ui/wf/wf-fn-where-clause.stderr | 2 +- .../wf/wf-misc-methods-issue-28609.nll.stderr | 55 - src/test/ui/wf/wf-misc-methods-issue-28609.rs | 16 +- .../ui/wf/wf-misc-methods-issue-28609.stderr | 122 +- .../ui/wf/wf-outlives-ty-in-fn-or-trait.rs | 1 - src/test/ui/wf/wf-static-method.nll.stderr | 65 + src/test/ui/wf/wf-static-method.stderr | 3 +- .../ui/where-clauses/where-for-self.stderr | 1 - .../where-lifetime-resolution.stderr | 3 +- .../ui/write-to-static-mut-in-static.stderr | 2 +- .../ui/writing-to-immutable-vec.nll.stderr | 11 - src/test/ui/writing-to-immutable-vec.rs | 2 +- src/test/ui/writing-to-immutable-vec.stderr | 6 +- src/test/ui/wrong-mul-method-signature.rs | 5 +- src/test/ui/wrong-mul-method-signature.stderr | 23 +- src/tools/build-manifest/Cargo.toml | 1 - src/tools/build-manifest/src/main.rs | 2 +- src/tools/compiletest/Cargo.toml | 4 +- src/tools/compiletest/src/common.rs | 3 + src/tools/compiletest/src/errors.rs | 2 + src/tools/compiletest/src/header.rs | 50 +- src/tools/compiletest/src/json.rs | 34 +- src/tools/compiletest/src/main.rs | 42 +- src/tools/compiletest/src/raise_fd_limit.rs | 1 - src/tools/compiletest/src/runtest.rs | 205 +- src/tools/compiletest/src/util.rs | 3 +- src/tools/error_index_generator/main.rs | 4 +- src/tools/linkchecker/main.rs | 4 +- src/tools/publish_toolstate.py | 4 +- src/tools/rustbook/Cargo.toml | 2 +- .../rustc-std-workspace-alloc/Cargo.toml | 14 + src/tools/rustc-std-workspace-alloc/lib.rs | 9 + src/tools/rustc-std-workspace-core/Cargo.toml | 2 +- src/tools/rustc-workspace-hack/Cargo.toml | 2 +- src/tools/tidy/Cargo.toml | 5 +- src/tools/tidy/src/deps.rs | 2 + src/tools/tidy/src/errors.rs | 2 +- src/tools/tidy/src/features.rs | 150 +- src/tools/tidy/src/features/version.rs | 90 + src/tools/tidy/src/lib.rs | 6 - src/tools/tidy/src/main.rs | 2 - src/tools/tidy/src/style.rs | 144 +- src/tools/tidy/src/unstable_book.rs | 8 +- src/tools/unstable-book-gen/Cargo.toml | 2 +- src/tools/unstable-book-gen/src/main.rs | 14 +- vendor/aho-corasick/.cargo-checksum.json | 2 +- vendor/aho-corasick/Cargo.toml | 53 +- vendor/aho-corasick/README.md | 211 +- vendor/aho-corasick/appveyor.yml | 26 + vendor/aho-corasick/benches/bench.rs | 373 - vendor/aho-corasick/benches/random.txt | 513 - vendor/aho-corasick/examples/dict-search.rs | 138 - vendor/aho-corasick/src/ahocorasick.rs | 2032 ++ vendor/aho-corasick/src/autiter.rs | 530 - vendor/aho-corasick/src/automaton.rs | 401 + vendor/aho-corasick/src/buffer.rs | 131 + vendor/aho-corasick/src/classes.rs | 243 + vendor/aho-corasick/src/dfa.rs | 688 + vendor/aho-corasick/src/error.rs | 103 + vendor/aho-corasick/src/full.rs | 145 - vendor/aho-corasick/src/lib.rs | 1247 +- vendor/aho-corasick/src/main.rs | 13 - vendor/aho-corasick/src/nfa.rs | 1230 ++ vendor/aho-corasick/src/prefilter.rs | 251 + vendor/aho-corasick/src/state_id.rs | 166 + vendor/aho-corasick/src/tests.rs | 694 + vendor/cc/.cargo-checksum.json | 2 +- vendor/cc/Cargo.toml | 9 +- vendor/cc/README.md | 6 +- vendor/cc/azure-pipelines.yml | 89 + vendor/cc/ci/azure-install-rust.yml | 23 + vendor/cc/ci/azure-steps.yml | 21 + vendor/cc/src/com.rs | 4 +- vendor/cc/src/lib.rs | 282 +- vendor/cc/src/setup_config.rs | 22 +- vendor/cc/src/winapi.rs | 4 +- vendor/cc/src/windows_registry.rs | 108 +- vendor/cc/tests/cc_env.rs | 8 +- vendor/cc/tests/support/mod.rs | 6 +- vendor/cc/tests/test.rs | 8 +- vendor/cmake/.cargo-checksum.json | 2 +- vendor/cmake/Cargo.toml | 5 +- vendor/cmake/README.md | 4 +- vendor/cmake/src/lib.rs | 228 +- vendor/compiler_builtins/.cargo-checksum.json | 2 +- vendor/compiler_builtins/Cargo.toml | 6 +- vendor/compiler_builtins/README.md | 2 +- vendor/compiler_builtins/build.rs | 447 +- .../compiler-rt/CMakeLists.txt | 24 +- .../compiler_builtins/compiler-rt/LICENSE.TXT | 2 +- .../compiler-rt/lib/builtins/CMakeLists.txt | 2 + .../compiler-rt/lib/builtins/cpu_model.c | 12 +- .../compiler-rt/lib/builtins/divdf3.c | 46 +- .../compiler-rt/lib/builtins/divsf3.c | 40 +- .../lib/builtins/gcc_personality_v0.c | 5 +- .../compiler-rt/lib/builtins/int_math.h | 1 - .../compiler-rt/lib/builtins/ppc/fixunstfti.c | 106 + .../compiler-rt/lib/builtins/ppc/floattitf.c | 48 + .../ubsan_minimal/ubsan_minimal_handlers.cc | 1 + .../utils/generate_netbsd_ioctls.awk | 1 - .../compiler_builtins/examples/intrinsics.rs | 24 +- .../compiler_builtins/libm/src/math/acos.rs | 7 +- .../compiler_builtins/libm/src/math/acosf.rs | 1 + .../compiler_builtins/libm/src/math/asin.rs | 9 +- .../compiler_builtins/libm/src/math/asinf.rs | 1 + .../compiler_builtins/libm/src/math/atan.rs | 20 +- .../compiler_builtins/libm/src/math/atan2.rs | 7 +- .../compiler_builtins/libm/src/math/atan2f.rs | 1 + .../compiler_builtins/libm/src/math/atanf.rs | 17 +- .../compiler_builtins/libm/src/math/cbrt.rs | 1 + .../compiler_builtins/libm/src/math/cbrtf.rs | 1 + .../compiler_builtins/libm/src/math/ceil.rs | 3 +- .../compiler_builtins/libm/src/math/ceilf.rs | 3 +- vendor/compiler_builtins/libm/src/math/cos.rs | 1 + .../compiler_builtins/libm/src/math/cosf.rs | 17 +- .../compiler_builtins/libm/src/math/cosh.rs | 1 + .../compiler_builtins/libm/src/math/coshf.rs | 1 + vendor/compiler_builtins/libm/src/math/exp.rs | 1 + .../compiler_builtins/libm/src/math/exp2.rs | 1 + .../compiler_builtins/libm/src/math/exp2f.rs | 1 + .../compiler_builtins/libm/src/math/expf.rs | 2 +- .../compiler_builtins/libm/src/math/expm1.rs | 1 + .../compiler_builtins/libm/src/math/expm1f.rs | 1 + .../compiler_builtins/libm/src/math/expo2.rs | 3 +- .../compiler_builtins/libm/src/math/fabs.rs | 1 + .../compiler_builtins/libm/src/math/fabsf.rs | 1 + .../compiler_builtins/libm/src/math/fdim.rs | 9 +- .../compiler_builtins/libm/src/math/fdimf.rs | 9 +- .../compiler_builtins/libm/src/math/floor.rs | 3 +- .../compiler_builtins/libm/src/math/floorf.rs | 13 +- vendor/compiler_builtins/libm/src/math/fma.rs | 19 +- .../compiler_builtins/libm/src/math/fmaf.rs | 1 + .../compiler_builtins/libm/src/math/fmod.rs | 1 + .../compiler_builtins/libm/src/math/fmodf.rs | 1 + .../compiler_builtins/libm/src/math/hypot.rs | 3 +- .../compiler_builtins/libm/src/math/hypotf.rs | 1 + .../compiler_builtins/libm/src/math/k_cos.rs | 1 + .../compiler_builtins/libm/src/math/k_cosf.rs | 1 + .../libm/src/math/k_expo2.rs | 1 + .../libm/src/math/k_expo2f.rs | 1 + .../compiler_builtins/libm/src/math/k_sin.rs | 1 + .../compiler_builtins/libm/src/math/k_sinf.rs | 1 + .../compiler_builtins/libm/src/math/k_tan.rs | 1 + .../compiler_builtins/libm/src/math/k_tanf.rs | 1 + .../compiler_builtins/libm/src/math/ldexp.rs | 5 + .../compiler_builtins/libm/src/math/ldexpf.rs | 5 + vendor/compiler_builtins/libm/src/math/log.rs | 3 +- .../compiler_builtins/libm/src/math/log10.rs | 3 +- .../compiler_builtins/libm/src/math/log10f.rs | 3 +- .../compiler_builtins/libm/src/math/log1p.rs | 3 +- .../compiler_builtins/libm/src/math/log1pf.rs | 3 +- .../compiler_builtins/libm/src/math/log2.rs | 3 +- .../compiler_builtins/libm/src/math/log2f.rs | 3 +- .../compiler_builtins/libm/src/math/logf.rs | 1 + vendor/compiler_builtins/libm/src/math/mod.rs | 4 + vendor/compiler_builtins/libm/src/math/pow.rs | 229 +- .../compiler_builtins/libm/src/math/powf.rs | 27 +- .../libm/src/math/rem_pio2.rs | 26 +- .../libm/src/math/rem_pio2_large.rs | 1 + .../libm/src/math/rem_pio2f.rs | 1 + .../compiler_builtins/libm/src/math/round.rs | 1 + .../compiler_builtins/libm/src/math/roundf.rs | 1 + .../compiler_builtins/libm/src/math/scalbn.rs | 3 +- .../libm/src/math/scalbnf.rs | 1 + vendor/compiler_builtins/libm/src/math/sin.rs | 1 + .../compiler_builtins/libm/src/math/sinf.rs | 3 +- .../compiler_builtins/libm/src/math/sinh.rs | 3 +- .../compiler_builtins/libm/src/math/sinhf.rs | 1 + .../compiler_builtins/libm/src/math/sqrt.rs | 64 +- .../compiler_builtins/libm/src/math/sqrtf.rs | 1 + vendor/compiler_builtins/libm/src/math/tan.rs | 1 + .../compiler_builtins/libm/src/math/tanf.rs | 1 + .../compiler_builtins/libm/src/math/tanh.rs | 1 + .../compiler_builtins/libm/src/math/tanhf.rs | 1 + .../compiler_builtins/libm/src/math/trunc.rs | 1 + .../compiler_builtins/libm/src/math/truncf.rs | 1 + vendor/compiler_builtins/src/arm_linux.rs | 98 +- vendor/compiler_builtins/src/float/add.rs | 50 +- vendor/compiler_builtins/src/float/cmp.rs | 67 +- vendor/compiler_builtins/src/float/conv.rs | 91 +- vendor/compiler_builtins/src/float/div.rs | 6 +- vendor/compiler_builtins/src/float/extend.rs | 7 +- vendor/compiler_builtins/src/float/mod.rs | 46 +- vendor/compiler_builtins/src/float/mul.rs | 2 +- vendor/compiler_builtins/src/float/pow.rs | 2 +- vendor/compiler_builtins/src/float/sub.rs | 4 +- vendor/compiler_builtins/src/int/addsub.rs | 23 +- vendor/compiler_builtins/src/int/mod.rs | 53 +- vendor/compiler_builtins/src/int/mul.rs | 11 +- vendor/compiler_builtins/src/int/sdiv.rs | 16 +- vendor/compiler_builtins/src/int/shift.rs | 41 +- vendor/compiler_builtins/src/int/udiv.rs | 15 +- vendor/compiler_builtins/src/lib.rs | 34 +- vendor/compiler_builtins/src/macros.rs | 25 +- vendor/compiler_builtins/src/math.rs | 3 + vendor/compiler_builtins/src/mem.rs | 10 +- vendor/compiler_builtins/src/probestack.rs | 4 +- vendor/getopts/.cargo-checksum.json | 2 +- vendor/getopts/Cargo.toml | 8 +- vendor/getopts/README.md | 4 + vendor/getopts/src/lib.rs | 1593 +- vendor/getopts/src/tests/mod.rs | 1240 ++ vendor/hashbrown/.cargo-checksum.json | 1 + vendor/hashbrown/CHANGELOG.md | 128 + vendor/hashbrown/Cargo.toml | 65 + .../LICENSE-APACHE | 0 .../LICENSE-MIT | 2 +- vendor/hashbrown/README.md | 87 + vendor/hashbrown/benches/bench.rs | 150 + vendor/hashbrown/clippy.toml | 1 + .../hashbrown/src/external_trait_impls/mod.rs | 4 + .../src/external_trait_impls/rayon/helpers.rs | 26 + .../src/external_trait_impls/rayon/map.rs | 676 + .../src/external_trait_impls/rayon/mod.rs | 5 + .../src/external_trait_impls/rayon/raw.rs | 193 + .../src/external_trait_impls/rayon/set.rs | 646 + .../src/external_trait_impls/serde.rs | 200 + vendor/hashbrown/src/fx.rs | 119 + vendor/hashbrown/src/lib.rs | 93 + vendor/hashbrown/src/macros.rs | 54 + vendor/hashbrown/src/map.rs | 3566 +++ vendor/hashbrown/src/raw/bitmask.rs | 108 + vendor/hashbrown/src/raw/generic.rs | 157 + vendor/hashbrown/src/raw/mod.rs | 1374 ++ vendor/hashbrown/src/raw/sse2.rs | 140 + vendor/hashbrown/src/rustc_entry.rs | 573 + vendor/hashbrown/src/scopeguard.rs | 49 + vendor/hashbrown/src/set.rs | 1829 ++ vendor/hashbrown/tests/hasher.rs | 65 + vendor/hashbrown/tests/rayon.rs | 533 + vendor/hashbrown/tests/serde.rs | 59 + vendor/hashbrown/tests/set.rs | 31 + vendor/lazy_static/.cargo-checksum.json | 2 +- vendor/lazy_static/Cargo.toml | 9 +- vendor/lazy_static/README.md | 4 +- vendor/lazy_static/src/lib.rs | 7 +- vendor/libc/.cargo-checksum.json | 2 +- vendor/libc/Cargo.toml | 4 +- vendor/libc/src/fuchsia/mod.rs | 2 +- vendor/libc/src/lib.rs | 2 +- vendor/libc/src/unix/bsd/apple/mod.rs | 1 + vendor/libc/src/unix/bsd/freebsdlike/mod.rs | 1 + vendor/libc/src/unix/bsd/mod.rs | 2 +- vendor/libc/src/unix/bsd/netbsdlike/mod.rs | 1 + vendor/libc/src/unix/haiku/mod.rs | 2 +- vendor/libc/src/unix/mod.rs | 8 +- vendor/libc/src/unix/newlib/mod.rs | 2 +- vendor/libc/src/unix/notbsd/android/mod.rs | 2 +- vendor/libc/src/unix/notbsd/linux/mod.rs | 2 +- .../libc/src/unix/notbsd/linux/other/mod.rs | 19 + vendor/libc/src/unix/notbsd/mod.rs | 9 +- vendor/libc/src/unix/solarish/mod.rs | 2 +- vendor/libc/src/unix/uclibc/mod.rs | 2 +- vendor/libc/src/wasi.rs | 562 +- vendor/measureme/.cargo-checksum.json | 1 + vendor/measureme/Cargo.toml | 32 + .../measureme/benches/serialization_bench.rs | 21 + vendor/measureme/src/event.rs | 13 + vendor/measureme/src/file_header.rs | 103 + .../measureme/src/file_serialization_sink.rs | 41 + vendor/measureme/src/lib.rs | 23 + .../measureme/src/mmap_serialization_sink.rs | 73 + vendor/measureme/src/profiler.rs | 99 + vendor/measureme/src/profiling_data.rs | 149 + vendor/measureme/src/raw_event.rs | 54 + vendor/measureme/src/rustc.rs | 11 + vendor/measureme/src/serialization.rs | 68 + vendor/measureme/src/stringtable.rs | 316 + vendor/measureme/src/testing_common.rs | 113 + vendor/measureme/tests/serialization.rs | 13 + vendor/memchr/.cargo-checksum.json | 2 +- vendor/memchr/Cargo.toml | 15 +- vendor/memchr/README.md | 5 + vendor/memchr/build.rs | 123 +- vendor/memchr/src/lib.rs | 195 +- vendor/memchr/src/tests/mod.rs | 12 + vendor/memchr/src/x86/mod.rs | 45 +- vendor/minifier/.cargo-checksum.json | 2 +- vendor/minifier/Cargo.toml | 4 +- vendor/minifier/src/js/js.rs | 67 +- vendor/minifier/src/js/mod.rs | 2 + vendor/polonius-engine/.cargo-checksum.json | 2 +- vendor/polonius-engine/Cargo.toml | 4 +- vendor/polonius-engine/src/output/hybrid.rs | 29 + .../src/output/location_insensitive.rs | 11 +- vendor/polonius-engine/src/output/mod.rs | 18 +- vendor/pulldown-cmark/.cargo-checksum.json | 1 + vendor/pulldown-cmark/CONTRIBUTING.md | 11 + vendor/pulldown-cmark/Cargo.toml | 64 + vendor/pulldown-cmark/LICENSE | 21 + vendor/pulldown-cmark/README.md | 150 + vendor/pulldown-cmark/azure-pipelines.yml | 17 + .../pulldown-cmark/benches/html_rendering.rs | 77 + vendor/pulldown-cmark/benches/lib.rs | 151 + vendor/pulldown-cmark/build.rs | 160 + .../pulldown-cmark/examples/event-filter.rs | 29 + .../examples/string-to-string.rs | 26 + vendor/pulldown-cmark/specs/footnotes.txt | 153 + vendor/pulldown-cmark/specs/regression.txt | 415 + vendor/pulldown-cmark/specs/table.txt | 217 + vendor/pulldown-cmark/src/entities.rs | 2156 ++ vendor/pulldown-cmark/src/escape.rs | 298 + vendor/pulldown-cmark/src/html.rs | 523 + vendor/pulldown-cmark/src/lib.rs | 74 + vendor/pulldown-cmark/src/linklabel.rs | 143 + vendor/pulldown-cmark/src/main.rs | 263 + vendor/pulldown-cmark/src/parse.rs | 2677 +++ vendor/pulldown-cmark/src/puncttable.rs | 348 + vendor/pulldown-cmark/src/scanners.rs | 1266 ++ vendor/pulldown-cmark/src/simd.rs | 217 + vendor/pulldown-cmark/src/strings.rs | 233 + vendor/pulldown-cmark/src/tree.rs | 224 + vendor/pulldown-cmark/tests/errors.rs | 44 + vendor/pulldown-cmark/tests/html.rs | 245 + vendor/pulldown-cmark/tests/lib.rs | 336 + .../pulldown-cmark/tests/suite/footnotes.rs | 165 + .../tests/suite/gfm_strikethrough.rs | 27 + .../pulldown-cmark/tests/suite/gfm_table.rs | 205 + .../tests/suite/gfm_tasklist.rs | 39 + vendor/pulldown-cmark/tests/suite/mod.rs | 12 + .../pulldown-cmark/tests/suite/regression.rs | 475 + vendor/pulldown-cmark/tests/suite/spec.rs | 8447 +++++++ vendor/pulldown-cmark/tests/suite/table.rs | 205 + .../third_party/CommonMark/LICENSE | 105 + .../third_party/CommonMark/README.google | 12 + .../third_party/CommonMark/spec.txt | 9710 ++++++++ .../pulldown-cmark/third_party/GitHub/LICENSE | 170 + .../third_party/GitHub/gfm_strikethrough.txt | 27 + .../third_party/GitHub/gfm_table.txt | 208 + .../third_party/GitHub/gfm_tasklist.txt | 55 + .../third_party/GitHub/spec.txt | 10041 +++++++++ .../third_party/xi-editor/LICENSE | 203 + .../third_party/xi-editor/crdt.md | 1097 + vendor/pulldown-cmark/tools/mk_entities.py | 71 + vendor/pulldown-cmark/tools/mk_puncttable.py | 130 + vendor/regex-syntax/.cargo-checksum.json | 2 +- vendor/regex-syntax/Cargo.toml | 4 +- vendor/regex-syntax/src/ast/parse.rs | 19 + vendor/regex-syntax/src/hir/mod.rs | 147 +- vendor/regex-syntax/src/hir/translate.rs | 130 +- vendor/regex/.cargo-checksum.json | 2 +- vendor/regex/CHANGELOG.md | 77 + vendor/regex/Cargo.toml | 10 +- vendor/regex/README.md | 15 +- vendor/regex/build.rs | 45 +- vendor/regex/src/backtrack.rs | 7 +- vendor/regex/src/exec.rs | 209 +- vendor/regex/src/lib.rs | 2 +- vendor/regex/src/literal/mod.rs | 22 +- vendor/regex/src/literal/teddy_avx2/imp.rs | 18 +- vendor/regex/src/literal/teddy_ssse3/imp.rs | 18 +- vendor/regex/src/pikevm.rs | 5 +- vendor/regex/tests/regression.rs | 41 +- vendor/regex/tests/test_default.rs | 34 + vendor/rls-data/.cargo-checksum.json | 2 +- vendor/rls-data/Cargo.toml | 20 +- vendor/rls-data/src/config.rs | 12 +- vendor/rls-data/src/lib.rs | 243 +- vendor/rls-data/src/serde_expanded.rs | 9397 ++++++++ vendor/rls-span/.cargo-checksum.json | 2 +- vendor/rls-span/Cargo.toml | 12 +- vendor/rls-span/src/compiler.rs | 26 +- vendor/rls-span/src/lib.rs | 157 +- vendor/rls-span/src/serde_expanded.rs | 2689 +++ vendor/rustc-rayon-core/.cargo-checksum.json | 2 +- vendor/rustc-rayon-core/Cargo.toml | 8 +- vendor/rustc-rayon-core/src/job.rs | 15 +- vendor/rustc-rayon-core/src/join/mod.rs | 17 +- vendor/rustc-rayon-core/src/lib.rs | 1 - vendor/rustc-rayon-core/src/registry.rs | 15 +- vendor/rustc-rayon-core/src/scope/mod.rs | 14 +- vendor/rustc-rayon-core/src/spawn/mod.rs | 2 +- vendor/rustc-rayon/.cargo-checksum.json | 2 +- vendor/rustc-rayon/Cargo.toml | 6 +- vendor/rustc-serialize/.cargo-checksum.json | 1 - vendor/rustc-serialize/Cargo.toml | 18 - vendor/rustc-serialize/README.md | 31 - vendor/rustc-serialize/appveyor.yml | 17 - vendor/rustc-serialize/benches/base64.rs | 48 - vendor/rustc-serialize/benches/hex.rs | 28 - vendor/rustc-serialize/benches/json.rs | 84 - vendor/rustc-serialize/src/base64.rs | 489 - .../rustc-serialize/src/collection_impls.rs | 186 - vendor/rustc-serialize/src/hex.rs | 221 - vendor/rustc-serialize/src/json.rs | 3999 ---- vendor/rustc-serialize/src/lib.rs | 79 - vendor/rustc-serialize/src/serialize.rs | 1671 -- vendor/unicase/.cargo-checksum.json | 1 + vendor/unicase/Cargo.toml | 28 + vendor/unicase/LICENSE-APACHE | 201 + vendor/unicase/LICENSE-MIT | 20 + vendor/unicase/README.md | 31 + vendor/unicase/build.rs | 15 + vendor/unicase/src/ascii.rs | 185 + vendor/unicase/src/lib.rs | 432 + vendor/unicase/src/unicode/map.rs | 1497 ++ vendor/unicase/src/unicode/mod.rs | 185 + vendor/winapi-util/.cargo-checksum.json | 2 +- vendor/winapi-util/Cargo.toml | 4 +- vendor/winapi-util/README.md | 2 +- vendor/winapi-util/src/file.rs | 13 + version | 2 +- 5247 files changed, 162122 insertions(+), 68983 deletions(-) create mode 100644 src/ci/docker/arm-android/android-sdk.lock create mode 100755 src/ci/docker/scripts/android-sdk-manager.py mode change 100644 => 100755 src/ci/docker/scripts/android-sdk.sh delete mode 100644 src/doc/book/nostarch/chapter07.md delete mode 100644 src/doc/book/nostarch/chapter08-error-message-updates.md delete mode 100644 src/doc/book/nostarch/chapter08-listing-8-5.md delete mode 100644 src/doc/book/nostarch/chapter09-error-message-updates.md delete mode 100644 src/doc/book/nostarch/chapter09-listing-9-2-update.md delete mode 100644 src/doc/book/nostarch/chapter09-listing-9-5-update.md delete mode 100644 src/doc/book/nostarch/chapter09-match-update.md delete mode 100644 src/doc/book/nostarch/chapter09-read-to-string-update.md delete mode 100644 src/doc/book/nostarch/chapter10-traits-as-parameters.md create mode 100644 src/doc/book/nostarch/updates.md delete mode 100644 src/doc/book/nostarch/version-note.md delete mode 100644 src/doc/book/src/ch19-02-advanced-lifetimes.md create mode 100644 src/doc/rust-by-example/src/std_misc/file/read_lines.md create mode 100644 src/doc/rustc-guide/src/borrow_check/two_phase_borrows.md create mode 100644 src/doc/rustc-guide/src/diag/json-format.md create mode 100644 src/doc/unstable-book/src/library-features/borrow-state.md create mode 100644 src/libcore/tests/alloc.rs create mode 100644 src/librustc/arena.rs rename src/librustc/{diagnostics.rs => error_codes.rs} (98%) delete mode 100644 src/librustc_borrowck/borrowck/unused.rs rename src/librustc_borrowck/{diagnostics.rs => error_codes.rs} (100%) delete mode 100644 src/librustc_codegen_llvm/back/link.rs rename src/librustc_codegen_llvm/{diagnostics.rs => error_codes.rs} (100%) rename src/{librustc_codegen_llvm => librustc_codegen_ssa}/back/rpath.rs (100%) rename src/{librustc_codegen_llvm => librustc_codegen_ssa}/back/wasm.rs (100%) rename src/librustc_codegen_ssa/{debuginfo.rs => debuginfo/mod.rs} (99%) rename src/{librustc_codegen_llvm => librustc_codegen_ssa}/debuginfo/type_names.rs (77%) rename src/librustc_codegen_ssa/{diagnostics.rs => error_codes.rs} (100%) rename src/librustc_lint/{diagnostics.rs => error_codes.rs} (100%) create mode 100644 src/librustc_macros/src/symbols.rs rename src/librustc_metadata/{diagnostics.rs => error_codes.rs} (100%) rename src/librustc_mir/{diagnostics.rs => error_codes.rs} (96%) rename src/librustc_passes/{diagnostics.rs => error_codes.rs} (100%) rename src/librustc_plugin/{diagnostics.rs => error_codes.rs} (100%) rename src/librustc_privacy/{diagnostics.rs => error_codes.rs} (100%) create mode 100644 src/librustc_resolve/error_codes.rs delete mode 100644 src/librustc_resolve/error_reporting.rs delete mode 100644 src/librustc_target/spec/bitrig_base.rs rename src/librustc_target/spec/{wasm32_unknown_wasi.rs => wasm32_wasi.rs} (79%) delete mode 100644 src/librustc_target/spec/x86_64_unknown_bitrig.rs rename src/librustc_typeck/{diagnostics.rs => error_codes.rs} (99%) delete mode 100644 src/librustdoc/clean/def_ctor.rs rename src/librustdoc/html/static/{SourceSerifPro-LICENSE.txt => SourceSerifPro-LICENSE.md} (95%) delete mode 100644 src/libstd/collections/hash/table.rs delete mode 100644 src/libstd/os/bitrig/fs.rs delete mode 100644 src/libstd/os/bitrig/mod.rs delete mode 100644 src/libstd/os/bitrig/raw.rs delete mode 100644 src/libstd/sync/mpsc/select.rs delete mode 100644 src/libstd/sync/mpsc/select_tests.rs rename src/libsyntax/{diagnostic_list.rs => error_codes.rs} (95%) create mode 100644 src/libsyntax/parse/diagnostics.rs create mode 100644 src/libsyntax/parse/literal.rs create mode 100644 src/libsyntax/parse/unescape.rs create mode 100644 src/libsyntax/parse/unescape_error_reporting.rs rename src/libsyntax_ext/{diagnostics.rs => error_codes.rs} (100%) create mode 100644 src/stdsimd/crates/core_arch/src/mips/msa/macros.rs create mode 100644 src/stdsimd/crates/stdsimd-verify/mips-msa.h create mode 100644 src/stdsimd/crates/stdsimd-verify/tests/mips.rs create mode 100644 src/test/codegen/i686-macosx-deployment-target.rs create mode 100644 src/test/codegen/i686-no-macosx-deployment-target.rs create mode 100644 src/test/codegen/pgo-instrumentation.rs create mode 100644 src/test/codegen/x86_64-macosx-deployment-target.rs create mode 100644 src/test/codegen/x86_64-no-macosx-deployment-target.rs create mode 100644 src/test/debuginfo/generator-locals.rs create mode 100644 src/test/debuginfo/generator-objects.rs delete mode 100644 src/test/debuginfo/generators.rs create mode 100644 src/test/incremental/issue-60629.rs create mode 100644 src/test/incremental/no_mangle.rs create mode 100644 src/test/mir-opt/const_prop/array_index.rs create mode 100644 src/test/mir-opt/const_prop/checked_add.rs create mode 100644 src/test/mir-opt/const_prop/const_prop_fails_gracefully.rs create mode 100644 src/test/mir-opt/const_prop/slice_len.rs create mode 100644 src/test/mir-opt/const_prop/switch_int.rs create mode 100644 src/test/mir-opt/slice-drop-shim.rs create mode 100644 src/test/run-make-fulldeps/override-aliased-flags/Makefile create mode 100644 src/test/run-make-fulldeps/override-aliased-flags/main.rs create mode 100644 src/test/run-make-fulldeps/pgo-gen-no-imp-symbols/Makefile create mode 100644 src/test/run-make-fulldeps/pgo-gen-no-imp-symbols/test.rs create mode 100644 src/test/run-make-fulldeps/pgo-use/Makefile create mode 100644 src/test/run-make-fulldeps/pgo-use/filecheck-patterns.txt create mode 100644 src/test/run-make-fulldeps/pgo-use/main.rs create mode 100644 src/test/run-make/wasm-export-all-symbols/main.rs create mode 100644 src/test/run-pass/await-macro.rs create mode 100644 src/test/run-pass/chalkify/builtin-copy-clone.rs create mode 100644 src/test/run-pass/consts/const-labeled-break.rs create mode 100644 src/test/run-pass/dispatch_from_dyn_zst.rs create mode 100644 src/test/run-pass/generator/issue-59972.rs create mode 100644 src/test/run-pass/if-ret.stderr create mode 100644 src/test/run-pass/impl-trait-in-bindings.stderr delete mode 100644 src/test/run-pass/issues/issue-13494.rs create mode 100644 src/test/run-pass/mir/mir_static_subtype.rs create mode 100644 src/test/run-pass/union/union-nonzero.rs create mode 100644 src/test/rustdoc-js/search-short-types.js create mode 100644 src/test/rustdoc-js/search-short-types.rs create mode 100644 src/test/rustdoc-js/substring.js create mode 100644 src/test/rustdoc-js/substring.rs create mode 100644 src/test/rustdoc-ui/cfg-test.rs create mode 100644 src/test/rustdoc-ui/cfg-test.stdout create mode 100644 src/test/rustdoc-ui/lint-missing-doc-code-example.rs create mode 100644 src/test/rustdoc-ui/lint-missing-doc-code-example.stderr create mode 100644 src/test/rustdoc-ui/unparseable-doc-test.rs create mode 100644 src/test/rustdoc-ui/unparseable-doc-test.stdout create mode 100644 src/test/rustdoc/async-move-doctest.rs create mode 100644 src/test/rustdoc/auxiliary/intra-links-external-traits.rs create mode 100644 src/test/rustdoc/generic-const.rs create mode 100644 src/test/rustdoc/intra-link-libstd-re-export.rs create mode 100644 src/test/rustdoc/intra-links-external-traits.rs create mode 100644 src/test/rustdoc/issue-60482.rs create mode 100644 src/test/rustdoc/sidebar-links-to-foreign-impl.rs create mode 100644 src/test/ui-fulldeps/internal-lints/pass_ty_by_ref.rs create mode 100644 src/test/ui-fulldeps/internal-lints/pass_ty_by_ref.stderr create mode 100644 src/test/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.rs create mode 100644 src/test/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.stderr delete mode 100644 src/test/ui/E0501.ast.stderr delete mode 100644 src/test/ui/E0501.mir.stderr rename src/test/ui/{E0501.ast.nll.stderr => E0501.stderr} (95%) delete mode 100644 src/test/ui/E0506.ast.nll.stderr delete mode 100644 src/test/ui/E0506.ast.stderr rename src/test/ui/{E0506.mir.stderr => E0506.stderr} (95%) delete mode 100644 src/test/ui/E0508-fail.ast.nll.stderr delete mode 100644 src/test/ui/E0508-fail.ast.stderr delete mode 100644 src/test/ui/E0508-fail.mir.stderr rename src/test/ui/{E0508.nll.stderr => E0508-fail.stderr} (92%) delete mode 100644 src/test/ui/E0594.ast.nll.stderr delete mode 100644 src/test/ui/E0594.ast.stderr rename src/test/ui/{E0594.mir.stderr => E0594.stderr} (62%) delete mode 100644 src/test/ui/E0596.ast.stderr delete mode 100644 src/test/ui/E0596.mir.stderr rename src/test/ui/{E0596.ast.nll.stderr => E0596.stderr} (93%) delete mode 100644 src/test/ui/access-mode-in-closures.nll.stderr delete mode 100644 src/test/ui/asm/asm-out-assign-imm.nll.stderr delete mode 100644 src/test/ui/asm/asm-out-read-uninit.mir.stderr rename src/test/ui/asm/{asm-out-read-uninit.ast.stderr => asm-out-read-uninit.stderr} (88%) delete mode 100644 src/test/ui/assign-imm-local-twice.ast.stderr delete mode 100644 src/test/ui/assign-imm-local-twice.mir.stderr rename src/test/ui/{assign-imm-local-twice.ast.nll.stderr => assign-imm-local-twice.stderr} (84%) create mode 100644 src/test/ui/associated-item/associated-item-enum.rs create mode 100644 src/test/ui/associated-item/associated-item-enum.stderr delete mode 100644 src/test/ui/associated-types/associated-types-outlives.nll.stderr create mode 100644 src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn-body.nll.stderr create mode 100644 src/test/ui/associated-types/associated-types-subtyping-1.nll.stderr create mode 100644 src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.nll.stderr create mode 100644 src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.nll.stderr create mode 100644 src/test/ui/associated-types/cache/project-fn-ret-invariant.krisskross.nll.stderr create mode 100644 src/test/ui/associated-types/cache/project-fn-ret-invariant.oneuse.nll.stderr create mode 100644 src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.nll.stderr create mode 100644 src/test/ui/async-await/argument-patterns.rs create mode 100644 src/test/ui/async-await/auxiliary/arc_wake.rs create mode 100644 src/test/ui/async-await/auxiliary/issue-60674.rs create mode 100644 src/test/ui/async-await/drop-order-for-async-fn-parameters-by-ref-binding.rs create mode 100644 src/test/ui/async-await/drop-order-for-async-fn-parameters.rs create mode 100644 src/test/ui/async-await/drop-order-locals-are-hidden.rs create mode 100644 src/test/ui/async-await/drop-order-locals-are-hidden.stderr create mode 100644 src/test/ui/async-await/issue-60518.rs create mode 100644 src/test/ui/async-await/issue-60674.rs create mode 100644 src/test/ui/async-await/issue-60674.stdout create mode 100644 src/test/ui/async-fn-path-elision.rs create mode 100644 src/test/ui/async-fn-path-elision.stderr create mode 100644 src/test/ui/async-with-closure.rs delete mode 100644 src/test/ui/augmented-assignments.nll.stderr create mode 100644 src/test/ui/auxiliary/issue-59764.rs create mode 100644 src/test/ui/await-keyword/2015-edition-error-in-non-macro-position.rs create mode 100644 src/test/ui/await-keyword/2015-edition-error-in-non-macro-position.stderr delete mode 100644 src/test/ui/await-keyword/2015-edition-no-warnings-with-feature-gate.rs create mode 100644 src/test/ui/await-keyword/2018-edition-error-in-non-macro-position.rs create mode 100644 src/test/ui/await-keyword/2018-edition-error-in-non-macro-position.stderr delete mode 100644 src/test/ui/await-keyword/2018-edition-no-error-with-feature-gate.rs create mode 100644 src/test/ui/await-keyword/incorrect-syntax-suggestions.rs create mode 100644 src/test/ui/await-keyword/incorrect-syntax-suggestions.stderr delete mode 100644 src/test/ui/bind-by-move/bind-by-move-no-guards.nll.stderr delete mode 100644 src/test/ui/binop/binop-consume-args.nll.stderr delete mode 100644 src/test/ui/binop/binop-move-semantics.nll.stderr delete mode 100644 src/test/ui/borrowck/assign_mutable_fields.nll.stderr delete mode 100644 src/test/ui/borrowck/borrow-immutable-upvar-mutation.nll.stderr delete mode 100644 src/test/ui/borrowck/borrow-tuple-fields.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-access-permissions.ast.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-access-permissions.ast.stderr rename src/test/ui/borrowck/{borrowck-access-permissions.mir.stderr => borrowck-access-permissions.stderr} (87%) delete mode 100644 src/test/ui/borrowck/borrowck-and-init.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-anon-fields-struct.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-anon-fields-tuple.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-argument.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-asm.ast.stderr delete mode 100644 src/test/ui/borrowck/borrowck-asm.mir.stderr rename src/test/ui/borrowck/{borrowck-asm.ast.nll.stderr => borrowck-asm.stderr} (88%) delete mode 100644 src/test/ui/borrowck/borrowck-assign-comp-idx.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-assign-comp.ast.stderr delete mode 100644 src/test/ui/borrowck/borrowck-assign-comp.mir.stderr rename src/test/ui/borrowck/{borrowck-assign-comp.ast.nll.stderr => borrowck-assign-comp.stderr} (86%) delete mode 100644 src/test/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-assign-to-constants.ast.stderr delete mode 100644 src/test/ui/borrowck/borrowck-assign-to-constants.mir.stderr rename src/test/ui/borrowck/{borrowck-assign-to-constants.ast.nll.stderr => borrowck-assign-to-constants.stderr} (57%) delete mode 100644 src/test/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-autoref-3261.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-bad-nested-calls-free.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-bad-nested-calls-move.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-block-unint.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-borrow-from-stack-variable.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-borrow-from-temporary.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-borrow-mut-object-twice.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-borrow-overloaded-deref.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-box-insensitivity.ast.stderr delete mode 100644 src/test/ui/borrowck/borrowck-box-insensitivity.mir.stderr delete mode 100644 src/test/ui/borrowck/borrowck-box-insensitivity.nll.stderr rename src/test/ui/borrowck/{borrowck-box-insensitivity.rs => borrowck-box-sensitivity.rs} (54%) delete mode 100644 src/test/ui/borrowck/borrowck-break-uninit-2.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-break-uninit.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-closures-mut-and-imm.ast.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-closures-mut-and-imm.ast.stderr rename src/test/ui/borrowck/{borrowck-closures-mut-and-imm.mir.stderr => borrowck-closures-mut-and-imm.stderr} (88%) delete mode 100644 src/test/ui/borrowck/borrowck-closures-mut-of-imm.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-closures-mut-of-mut.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-closures-two-mut-fail.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-closures-unique-imm.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-closures-unique.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-closures-use-after-free.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-consume-unsize-vec.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-consume-upcast-box.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-describe-lvalue.ast.stderr rename src/test/ui/borrowck/{borrowck-describe-lvalue.mir.stderr => borrowck-describe-lvalue.nll.stderr} (87%) rename src/test/ui/borrowck/{borrowck-describe-lvalue.ast.nll.stderr => borrowck-describe-lvalue.stderr} (88%) delete mode 100644 src/test/ui/borrowck/borrowck-escaping-closure-error-1.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-escaping-closure-error-2.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-field-sensitivity.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-fn-in-const-a.mir.stderr rename src/test/ui/borrowck/{borrowck-fn-in-const-a.ast.stderr => borrowck-fn-in-const-a.stderr} (85%) delete mode 100644 src/test/ui/borrowck/borrowck-fn-in-const-c.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.ast.stderr delete mode 100644 src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.mir.stderr rename src/test/ui/borrowck/{borrowck-imm-ref-to-mut-rec-field-issue-3162-c.ast.nll.stderr => borrowck-imm-ref-to-mut-rec-field-issue-3162-c.stderr} (86%) delete mode 100644 src/test/ui/borrowck/borrowck-in-static.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-init-in-fru.ast.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-init-in-fru.ast.stderr rename src/test/ui/borrowck/{borrowck-init-in-fru.mir.stderr => borrowck-init-in-fru.stderr} (88%) delete mode 100644 src/test/ui/borrowck/borrowck-insert-during-each.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-issue-14498.ast.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-issue-14498.ast.stderr rename src/test/ui/borrowck/{borrowck-issue-14498.mir.stderr => borrowck-issue-14498.stderr} (85%) delete mode 100644 src/test/ui/borrowck/borrowck-issue-2657-1.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-issue-2657-2.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-lend-flow-if.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-lend-flow-loop.ast.stderr rename src/test/ui/borrowck/{borrowck-lend-flow-loop.nll.stderr => borrowck-lend-flow-loop.stderr} (82%) delete mode 100644 src/test/ui/borrowck/borrowck-lend-flow-match.ast.stderr delete mode 100644 src/test/ui/borrowck/borrowck-lend-flow-match.mir.stderr rename src/test/ui/borrowck/{borrowck-lend-flow-match.ast.nll.stderr => borrowck-lend-flow-match.stderr} (89%) delete mode 100644 src/test/ui/borrowck/borrowck-lend-flow.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-loan-blocks-move-cc.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-loan-blocks-move.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-loan-in-overloaded-op.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-loan-of-static-data-issue-27616.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-loan-rcvr-overloaded-op.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-loan-rcvr.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-loan-vec-content.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.ast.stderr delete mode 100644 src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.mir.stderr rename src/test/ui/borrowck/{borrowck-local-borrow-outlives-fn.ast.nll.stderr => borrowck-local-borrow-outlives-fn.stderr} (83%) delete mode 100644 src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.ast.stderr delete mode 100644 src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.mir.stderr rename src/test/ui/borrowck/{borrowck-local-borrow-with-panic-outlives-fn.ast.nll.stderr => borrowck-local-borrow-with-panic-outlives-fn.stderr} (86%) delete mode 100644 src/test/ui/borrowck/borrowck-match-already-borrowed.ast.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-match-already-borrowed.ast.stderr rename src/test/ui/borrowck/{borrowck-match-already-borrowed.mir.stderr => borrowck-match-already-borrowed.stderr} (84%) delete mode 100644 src/test/ui/borrowck/borrowck-match-binding-is-assignment.ast.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-match-binding-is-assignment.ast.stderr rename src/test/ui/borrowck/{borrowck-match-binding-is-assignment.mir.stderr => borrowck-match-binding-is-assignment.stderr} (88%) delete mode 100644 src/test/ui/borrowck/borrowck-move-by-capture.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-move-error-with-note.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-move-in-irrefut-pat.ast.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-move-in-irrefut-pat.ast.stderr rename src/test/ui/borrowck/{borrowck-move-in-irrefut-pat.mir.stderr => borrowck-move-in-irrefut-pat.stderr} (82%) delete mode 100644 src/test/ui/borrowck/borrowck-move-moved-value-into-closure.ast.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-move-moved-value-into-closure.ast.stderr rename src/test/ui/borrowck/{borrowck-move-moved-value-into-closure.mir.stderr => borrowck-move-moved-value-into-closure.stderr} (91%) delete mode 100644 src/test/ui/borrowck/borrowck-move-mut-base-ptr.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-move-out-from-array.mir.stderr rename src/test/ui/borrowck/{borrowck-move-out-from-array.ast.stderr => borrowck-move-out-from-array.stderr} (87%) delete mode 100644 src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.ast.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.ast.stderr rename src/test/ui/borrowck/{borrowck-move-out-of-overloaded-auto-deref.mir.stderr => borrowck-move-out-of-overloaded-auto-deref.stderr} (81%) delete mode 100644 src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-move-out-of-static-item.mir.stderr rename src/test/ui/borrowck/{borrowck-move-out-of-static-item.ast.stderr => borrowck-move-out-of-static-item.stderr} (81%) delete mode 100644 src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.ast.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.ast.stderr rename src/test/ui/borrowck/{borrowck-move-out-of-struct-with-dtor.mir.stderr => borrowck-move-out-of-struct-with-dtor.stderr} (80%) delete mode 100644 src/test/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-move-out-of-vec-tail.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-move-subcomponent.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-multiple-captures.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-mut-addr-of-imm-var.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.ast.stderr delete mode 100644 src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.mir.stderr rename src/test/ui/borrowck/{borrowck-mut-borrow-linear-errors.ast.nll.stderr => borrowck-mut-borrow-linear-errors.stderr} (84%) delete mode 100644 src/test/ui/borrowck/borrowck-mut-borrow-of-mut-base-ptr.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-mut-slice-of-imm-vec.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-or-init.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-overloaded-call.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.ast.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.ast.stderr rename src/test/ui/borrowck/{borrowck-overloaded-index-and-overloaded-deref.mir.stderr => borrowck-overloaded-index-and-overloaded-deref.stderr} (86%) delete mode 100644 src/test/ui/borrowck/borrowck-overloaded-index-autoderef.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-overloaded-index-move-index.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-overloaded-index-ref-index.ast.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-overloaded-index-ref-index.ast.stderr rename src/test/ui/borrowck/{borrowck-overloaded-index-ref-index.mir.stderr => borrowck-overloaded-index-ref-index.stderr} (74%) delete mode 100644 src/test/ui/borrowck/borrowck-partial-reinit-1.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-partial-reinit-2.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-partial-reinit-3.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-partial-reinit-4.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-pat-reassign-binding.ast.stderr delete mode 100644 src/test/ui/borrowck/borrowck-pat-reassign-binding.mir.stderr rename src/test/ui/borrowck/{borrowck-pat-reassign-binding.ast.nll.stderr => borrowck-pat-reassign-binding.stderr} (89%) delete mode 100644 src/test/ui/borrowck/borrowck-reborrow-from-mut.nll.stderr create mode 100644 src/test/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-ref-mut-of-imm.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-struct-update-with-dtor.ast.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-struct-update-with-dtor.ast.stderr rename src/test/ui/borrowck/{borrowck-struct-update-with-dtor.mir.stderr => borrowck-struct-update-with-dtor.stderr} (81%) delete mode 100644 src/test/ui/borrowck/borrowck-swap-mut-base-ptr.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.ast.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.ast.stderr rename src/test/ui/borrowck/{borrowck-thread-local-static-borrow-outlives-fn.mir.stderr => borrowck-thread-local-static-borrow-outlives-fn.stderr} (83%) delete mode 100644 src/test/ui/borrowck/borrowck-unary-move.ast.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-unary-move.ast.stderr rename src/test/ui/borrowck/{borrowck-unary-move.mir.stderr => borrowck-unary-move.stderr} (88%) delete mode 100644 src/test/ui/borrowck/borrowck-unboxed-closures.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-uninit-field-access.ast.stderr delete mode 100644 src/test/ui/borrowck/borrowck-uninit-field-access.mir.stderr rename src/test/ui/borrowck/{borrowck-uninit-field-access.ast.nll.stderr => borrowck-uninit-field-access.stderr} (82%) delete mode 100644 src/test/ui/borrowck/borrowck-uninit-ref-chain.ast.stderr delete mode 100644 src/test/ui/borrowck/borrowck-uninit-ref-chain.mir.stderr rename src/test/ui/borrowck/{borrowck-uninit-ref-chain.ast.nll.stderr => borrowck-uninit-ref-chain.stderr} (81%) delete mode 100644 src/test/ui/borrowck/borrowck-union-borrow-nested.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-union-borrow.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-union-move-assign.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-union-move.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-union-uninitialized.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-uniq-via-lend.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-use-in-index-lvalue.ast.stderr delete mode 100644 src/test/ui/borrowck/borrowck-use-in-index-lvalue.mir.stderr rename src/test/ui/borrowck/{borrowck-use-in-index-lvalue.ast.nll.stderr => borrowck-use-in-index-lvalue.stderr} (89%) delete mode 100644 src/test/ui/borrowck/borrowck-use-mut-borrow.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.ast.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.ast.stderr rename src/test/ui/borrowck/{borrowck-use-uninitialized-in-cast-trait.mir.stderr => borrowck-use-uninitialized-in-cast-trait.stderr} (81%) delete mode 100644 src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.ast.stderr delete mode 100644 src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.mir.stderr rename src/test/ui/borrowck/{borrowck-use-uninitialized-in-cast.ast.nll.stderr => borrowck-use-uninitialized-in-cast.stderr} (82%) delete mode 100644 src/test/ui/borrowck/borrowck-vec-pattern-element-loan.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-vec-pattern-loan-from-mut.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-vec-pattern-move-tail.ast.stderr delete mode 100644 src/test/ui/borrowck/borrowck-vec-pattern-move-tail.cmp.stderr rename src/test/ui/borrowck/{borrowck-vec-pattern-move-tail.ast.nll.stderr => borrowck-vec-pattern-move-tail.stderr} (89%) delete mode 100644 src/test/ui/borrowck/borrowck-vec-pattern-nesting.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.nll.stderr delete mode 100644 src/test/ui/borrowck/borrowck-while-break.nll.stderr delete mode 100644 src/test/ui/borrowck/index-mut-help-with-impl.nll.stderr delete mode 100644 src/test/ui/borrowck/index-mut-help.nll.stderr delete mode 100644 src/test/ui/borrowck/issue-45983.ast.stderr delete mode 100644 src/test/ui/borrowck/issue-47215-ice-from-drop-elab.nll.stderr delete mode 100644 src/test/ui/borrowck/issue-51117.nll.stderr delete mode 100644 src/test/ui/borrowck/issue-51415.nll.stderr delete mode 100644 src/test/ui/borrowck/issue-54499-field-mutation-marks-mut-as-used.ast.stderr rename src/test/ui/borrowck/{issue-54499-field-mutation-marks-mut-as-used.nll.stderr => issue-54499-field-mutation-marks-mut-as-used.stderr} (75%) delete mode 100644 src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out-with-mut.ast.stderr rename src/test/ui/borrowck/{issue-54499-field-mutation-of-moved-out-with-mut.nll.stderr => issue-54499-field-mutation-of-moved-out-with-mut.stderr} (94%) delete mode 100644 src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.ast.stderr rename src/test/ui/borrowck/{issue-54499-field-mutation-of-moved-out.nll.stderr => issue-54499-field-mutation-of-moved-out.stderr} (84%) delete mode 100644 src/test/ui/borrowck/issue-54499-field-mutation-of-never-init.ast.stderr rename src/test/ui/borrowck/{issue-54499-field-mutation-of-never-init.nll.stderr => issue-54499-field-mutation-of-never-init.stderr} (76%) delete mode 100644 src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.ast.stderr delete mode 100644 src/test/ui/borrowck/issue-58776-borrowck-scans-children.ast.stderr rename src/test/ui/borrowck/{issue-58776-borrowck-scans-children.nll.stderr => issue-58776-borrowck-scans-children.stderr} (86%) create mode 100644 src/test/ui/borrowck/issue-7573.nll.stderr delete mode 100644 src/test/ui/borrowck/move-in-static-initializer-issue-38520.mir.stderr rename src/test/ui/borrowck/{move-in-static-initializer-issue-38520.ast.stderr => move-in-static-initializer-issue-38520.stderr} (78%) delete mode 100644 src/test/ui/borrowck/mut-borrow-in-loop.nll.stderr delete mode 100644 src/test/ui/borrowck/mut-borrow-of-mut-ref.nll.stderr delete mode 100644 src/test/ui/borrowck/mut-borrow-outside-loop.nll.stderr delete mode 100644 src/test/ui/borrowck/mutability-errors.nll.stderr delete mode 100644 src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.nll.stderr delete mode 100644 src/test/ui/borrowck/reassignment_immutable_fields.nll.stderr delete mode 100644 src/test/ui/borrowck/reassignment_immutable_fields_overlapping.nll.stderr delete mode 100644 src/test/ui/borrowck/reassignment_immutable_fields_twice.nll.stderr create mode 100644 src/test/ui/borrowck/regions-escape-bound-fn-2.nll.stderr create mode 100644 src/test/ui/borrowck/regions-escape-bound-fn.nll.stderr create mode 100644 src/test/ui/borrowck/regions-escape-unboxed-closure.nll.stderr delete mode 100644 src/test/ui/borrowck/two-phase-nonrecv-autoref.ast.nll.stderr delete mode 100644 src/test/ui/borrowck/two-phase-nonrecv-autoref.ast.stderr delete mode 100644 src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.ast.stderr create mode 100644 src/test/ui/borrowck/two-phase-reservation-sharing-interference-future-compat-lint.nll.stderr delete mode 100644 src/test/ui/borrowck/two-phase-sneaky.nll.stderr delete mode 100644 src/test/ui/borrowck/two-phase-surprise-no-conflict.ast.stderr delete mode 100644 src/test/ui/borrowck/two-phase-surprise-no-conflict.no2pb.stderr rename src/test/ui/borrowck/{two-phase-surprise-no-conflict.nll.stderr => two-phase-surprise-no-conflict.stderr} (88%) delete mode 100644 src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.nll.stderr delete mode 100644 src/test/ui/by-move-pattern-binding.nll.stderr delete mode 100644 src/test/ui/c-variadic/variadic-ffi-3.rs delete mode 100644 src/test/ui/c-variadic/variadic-ffi-3.stderr rename src/test/ui/c-variadic/{variadic-ffi-5.stderr => variadic-ffi-4.nll.stderr} (65%) delete mode 100644 src/test/ui/c-variadic/variadic-ffi-5.rs delete mode 100644 src/test/ui/cannot-mutate-captured-non-mut-var.ast.stderr delete mode 100644 src/test/ui/cannot-mutate-captured-non-mut-var.mir.stderr rename src/test/ui/{cannot-mutate-captured-non-mut-var.ast.nll.stderr => cannot-mutate-captured-non-mut-var.stderr} (80%) delete mode 100644 src/test/ui/check-static-values-constraints.nll.stderr create mode 100644 src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr delete mode 100644 src/test/ui/closure_promotion.stderr create mode 100644 src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.nll.stderr create mode 100644 src/test/ui/closures/closure-expected-type/expect-region-supply-region.nll.stderr delete mode 100644 src/test/ui/closures/closure-immutable-outer-variable.nll.stderr delete mode 100644 src/test/ui/codemap_tests/huge_multispan_highlight.nll.stderr delete mode 100644 src/test/ui/codemap_tests/issue-11715.nll.stderr delete mode 100644 src/test/ui/codemap_tests/one_line.nll.stderr delete mode 100644 src/test/ui/codemap_tests/tab_3.nll.stderr delete mode 100644 src/test/ui/coercion/coerce-overloaded-autoderef.ast.stderr delete mode 100644 src/test/ui/coercion/coerce-overloaded-autoderef.mir.nll.stderr delete mode 100644 src/test/ui/coercion/coerce-overloaded-autoderef.mir.stderr rename src/test/ui/coercion/{coerce-overloaded-autoderef.ast.nll.stderr => coerce-overloaded-autoderef.stderr} (83%) delete mode 100644 src/test/ui/command-line-diagnostics.nll.stderr create mode 100644 src/test/ui/conditional-compilation/cfg-arg-invalid-1.stderr create mode 100644 src/test/ui/conditional-compilation/cfg-arg-invalid-2.stderr create mode 100644 src/test/ui/conditional-compilation/cfg-arg-invalid-3.stderr create mode 100644 src/test/ui/conditional-compilation/cfg-arg-invalid-4.stderr create mode 100644 src/test/ui/conditional-compilation/cfg-arg-invalid-5.stderr create mode 100644 src/test/ui/conditional-compilation/cfg-empty-codemap.stderr create mode 100644 src/test/ui/const-generics/cannot-infer-const-args.rs create mode 100644 src/test/ui/const-generics/cannot-infer-const-args.stderr create mode 100644 src/test/ui/const-generics/concrete-const-as-fn-arg.rs create mode 100644 src/test/ui/const-generics/concrete-const-as-fn-arg.stderr create mode 100644 src/test/ui/const-generics/concrete-const-impl-method.rs create mode 100644 src/test/ui/const-generics/concrete-const-impl-method.stderr create mode 100644 src/test/ui/const-generics/const-arg-in-fn.rs create mode 100644 src/test/ui/const-generics/const-arg-in-fn.stderr create mode 100644 src/test/ui/const-generics/const-param-in-trait-ungated.rs create mode 100644 src/test/ui/const-generics/const-param-in-trait-ungated.stderr create mode 100644 src/test/ui/const-generics/const-param-in-trait.rs create mode 100644 src/test/ui/const-generics/const-param-in-trait.stderr create mode 100644 src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs create mode 100644 src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr create mode 100644 src/test/ui/const-generics/const-param-type-depends-on-type-param.rs create mode 100644 src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr create mode 100644 src/test/ui/const-generics/const-types.rs create mode 100644 src/test/ui/const-generics/const-types.stderr create mode 100644 src/test/ui/const-generics/impl-const-generic-struct.rs create mode 100644 src/test/ui/const-generics/impl-const-generic-struct.stderr create mode 100644 src/test/ui/const-generics/incorrect-number-of-const-args.rs create mode 100644 src/test/ui/const-generics/incorrect-number-of-const-args.stderr create mode 100644 src/test/ui/const-generics/issue-60263.rs create mode 100644 src/test/ui/const-generics/issue-60263.stderr create mode 100644 src/test/ui/const-generics/unused-const-param.rs create mode 100644 src/test/ui/const-generics/unused-const-param.stderr create mode 100644 src/test/ui/consts/array-literal-index-oob.rs create mode 100644 src/test/ui/consts/array-literal-index-oob.stderr delete mode 100644 src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.nll.stderr delete mode 100644 src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.nll.stderr delete mode 100644 src/test/ui/consts/const-eval/promoted_const_fn_fail.nll.stderr delete mode 100644 src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.nll.stderr delete mode 100644 src/test/ui/consts/const-eval/promoted_raw_ptr_ops.nll.stderr delete mode 100644 src/test/ui/consts/const-eval/transmute-const-promotion.nll.stderr delete mode 100644 src/test/ui/consts/const-eval/union_promotion.nll.stderr delete mode 100644 src/test/ui/consts/const-int-conversion.nll.stderr delete mode 100644 src/test/ui/consts/const-int-overflowing.nll.stderr delete mode 100644 src/test/ui/consts/const-int-rotate.nll.stderr delete mode 100644 src/test/ui/consts/const-int-sign.nll.stderr delete mode 100644 src/test/ui/consts/const-int-wrapping.nll.stderr delete mode 100644 src/test/ui/consts/const-ptr-nonnull.nll.stderr delete mode 100644 src/test/ui/consts/const-ptr-unique.nll.stderr create mode 100644 src/test/ui/consts/const_let_refutable.nll.stderr create mode 100644 src/test/ui/consts/min_const_fn/allow_const_fn_ptr.rs create mode 100644 src/test/ui/consts/min_const_fn/allow_const_fn_ptr.stderr create mode 100644 src/test/ui/consts/min_const_fn/allow_const_fn_ptr_feature_gate.rs create mode 100644 src/test/ui/consts/min_const_fn/allow_const_fn_ptr_feature_gate.stderr create mode 100644 src/test/ui/consts/min_const_fn/allow_const_fn_ptr_run_pass.rs delete mode 100644 src/test/ui/consts/min_const_fn/promotion.nll.stderr delete mode 100644 src/test/ui/consts/promote_const_let.nll.stderr create mode 100644 src/test/ui/consts/std/alloc.rs create mode 100644 src/test/ui/consts/std/alloc.stderr create mode 100644 src/test/ui/continue-after-missing-main.nll.stderr create mode 100644 src/test/ui/continue-after-missing-main.rs create mode 100644 src/test/ui/continue-after-missing-main.stderr delete mode 100644 src/test/ui/did_you_mean/issue-31424.nll.stderr delete mode 100644 src/test/ui/did_you_mean/issue-34126.nll.stderr delete mode 100644 src/test/ui/did_you_mean/issue-34337.nll.stderr delete mode 100644 src/test/ui/did_you_mean/issue-35937.nll.stderr delete mode 100644 src/test/ui/did_you_mean/issue-37139.nll.stderr delete mode 100644 src/test/ui/did_you_mean/issue-38147-1.nll.stderr delete mode 100644 src/test/ui/did_you_mean/issue-38147-2.nll.stderr delete mode 100644 src/test/ui/did_you_mean/issue-38147-3.nll.stderr delete mode 100644 src/test/ui/did_you_mean/issue-38147-4.nll.stderr delete mode 100644 src/test/ui/did_you_mean/issue-39544.nll.stderr delete mode 100644 src/test/ui/did_you_mean/issue-40823.nll.stderr delete mode 100644 src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.nll.stderr delete mode 100644 src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.nll.stderr delete mode 100644 src/test/ui/dropck/drop-with-active-borrows-1.nll.stderr delete mode 100644 src/test/ui/dropck/drop-with-active-borrows-2.nll.stderr delete mode 100644 src/test/ui/dropck/dropck-eyepatch-extern-crate.ast.stderr delete mode 100644 src/test/ui/dropck/dropck-eyepatch-extern-crate.nll.stderr create mode 100644 src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr delete mode 100644 src/test/ui/dropck/dropck-eyepatch-reorder.ast.stderr delete mode 100644 src/test/ui/dropck/dropck-eyepatch-reorder.nll.stderr create mode 100644 src/test/ui/dropck/dropck-eyepatch-reorder.stderr delete mode 100644 src/test/ui/dropck/dropck-eyepatch.ast.stderr delete mode 100644 src/test/ui/dropck/dropck-eyepatch.nll.stderr create mode 100644 src/test/ui/dropck/dropck-eyepatch.stderr delete mode 100644 src/test/ui/dropck/dropck-union.nll.stderr delete mode 100644 src/test/ui/dropck/dropck_trait_cycle_checked.nll.stderr delete mode 100644 src/test/ui/dst/dst-bad-coerce3.nll.stderr delete mode 100644 src/test/ui/dst/dst-index.nll.stderr delete mode 100644 src/test/ui/dst/dst-rvalue.nll.stderr create mode 100644 src/test/ui/emit-artifact-notifications.nll.stderr create mode 100644 src/test/ui/emit-artifact-notifications.rs create mode 100644 src/test/ui/emit-artifact-notifications.stderr create mode 100644 src/test/ui/empty/empty-never-array.nll.stderr delete mode 100644 src/test/ui/error-codes/E0008.nll.stderr delete mode 100644 src/test/ui/error-codes/E0017.nll.stderr rename src/test/ui/error-codes/{E0161.ast.stderr => E0161.migrate.stderr} (100%) rename src/test/ui/error-codes/{E0161.astul.stderr => E0161.migrateul.stderr} (100%) delete mode 100644 src/test/ui/error-codes/E0301.nll.stderr delete mode 100644 src/test/ui/error-codes/E0388.nll.stderr delete mode 100644 src/test/ui/error-codes/E0389.nll.stderr delete mode 100644 src/test/ui/error-codes/E0499.nll.stderr delete mode 100644 src/test/ui/error-codes/E0503.nll.stderr delete mode 100644 src/test/ui/error-codes/E0504.nll.stderr delete mode 100644 src/test/ui/error-codes/E0505.nll.stderr delete mode 100644 src/test/ui/error-codes/E0509.nll.stderr delete mode 100644 src/test/ui/error-codes/E0597.nll.stderr create mode 100644 src/test/ui/error-codes/E0621-does-not-trigger-for-closures.nll.stderr create mode 100644 src/test/ui/existential-type/issue-60371.rs create mode 100644 src/test/ui/existential-type/issue-60371.stderr create mode 100644 src/test/ui/existential_types/existential-types-with-no-traits.rs create mode 100644 src/test/ui/existential_types/existential-types-with-no-traits.stderr create mode 100644 src/test/ui/existential_types/generic_type_does_not_live_long_enough.nll.stderr create mode 100644 src/test/ui/existential_types/issue-60655-latebound-regions.rs create mode 100644 src/test/ui/existential_types/unused_generic_param.stderr create mode 100644 src/test/ui/feature-gate/await-macro.rs create mode 100644 src/test/ui/feature-gate/await-macro.stderr delete mode 100644 src/test/ui/fn/fn-closure-mutable-capture.nll.stderr delete mode 100644 src/test/ui/functional-struct-update/functional-struct-update-noncopyable.nll.stderr create mode 100644 src/test/ui/generator/auto-trait-regions.nll.stderr delete mode 100644 src/test/ui/generator/borrowing.nll.stderr delete mode 100644 src/test/ui/generator/dropck.nll.stderr rename src/test/ui/generator/{generator-region-requirements.ast.stderr => generator-region-requirements.migrate.stderr} (100%) rename src/test/ui/generator/{generator-region-requirements.nll.stderr => generator-region-requirements.stderr} (90%) delete mode 100644 src/test/ui/generator/ref-escapes-but-not-over-yield.nll.stderr create mode 100644 src/test/ui/generator/type-mismatch-signature-deduction.rs create mode 100644 src/test/ui/generator/type-mismatch-signature-deduction.stderr create mode 100644 src/test/ui/generator/unresolved_type_param.rs create mode 100644 src/test/ui/generator/unresolved_type_param.stderr delete mode 100644 src/test/ui/generator/yield-in-args.nll.stderr delete mode 100644 src/test/ui/generator/yield-while-iterating.nll.stderr delete mode 100644 src/test/ui/generator/yield-while-ref-reborrowed.nll.stderr create mode 100644 src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.nll.stderr create mode 100644 src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.nll.stderr create mode 100644 src/test/ui/hrtb/hrtb-cache-issue-54302.nll.stderr delete mode 100644 src/test/ui/hrtb/hrtb-debruijn-in-receiver.nll.stderr delete mode 100644 src/test/ui/hrtb/hrtb-identity-fn-borrows.ast.stderr delete mode 100644 src/test/ui/hrtb/hrtb-identity-fn-borrows.mir.stderr rename src/test/ui/hrtb/{hrtb-identity-fn-borrows.ast.nll.stderr => hrtb-identity-fn-borrows.stderr} (89%) create mode 100644 src/test/ui/hrtb/hrtb-perfect-forwarding.nll.stderr delete mode 100644 src/test/ui/hygiene/fields-move.nll.stderr delete mode 100644 src/test/ui/hygiene/fields-numeric-borrowck.nll.stderr create mode 100644 src/test/ui/if/if-no-match-bindings.rs create mode 100644 src/test/ui/if/if-no-match-bindings.stderr delete mode 100644 src/test/ui/immut-function-arguments.ast.stderr delete mode 100644 src/test/ui/immut-function-arguments.mir.stderr rename src/test/ui/{immut-function-arguments.ast.nll.stderr => immut-function-arguments.stderr} (77%) create mode 100644 src/test/ui/impl-header-lifetime-elision/dyn-trait.nll.stderr create mode 100644 src/test/ui/impl-trait/can-return-unconstrained-closure.rs delete mode 100644 src/test/ui/impl-trait/issue-55608-captures-empty-region.stderr create mode 100644 src/test/ui/impl-trait/issue-57464-unexpected-regions.rs create mode 100644 src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr create mode 100644 src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr create mode 100644 src/test/ui/impl-trait/type_parameters_captured.nll.stderr create mode 100644 src/test/ui/imports/unresolved-imports-used.rs create mode 100644 src/test/ui/imports/unresolved-imports-used.stderr create mode 100644 src/test/ui/in-band-lifetimes/mismatched.nll.stderr create mode 100644 src/test/ui/in-band-lifetimes/mismatched_trait_impl.nll.stderr delete mode 100644 src/test/ui/in-band-lifetimes/mut_while_borrow.nll.stderr create mode 100644 src/test/ui/issue-53249.rs create mode 100644 src/test/ui/issue-59756.fixed create mode 100644 src/test/ui/issue-59756.rs create mode 100644 src/test/ui/issue-59756.stderr create mode 100644 src/test/ui/issue-59764.rs create mode 100644 src/test/ui/issue-59764.stderr create mode 100644 src/test/ui/issue-60075.rs create mode 100644 src/test/ui/issue-60075.stderr create mode 100644 src/test/ui/issue-60622.rs create mode 100644 src/test/ui/issue-60622.stderr create mode 100644 src/test/ui/issues/issue-10291.nll.stderr delete mode 100644 src/test/ui/issues/issue-10398.nll.stderr delete mode 100644 src/test/ui/issues/issue-11192.nll.stderr delete mode 100644 src/test/ui/issues/issue-11493.ast.stderr delete mode 100644 src/test/ui/issues/issue-11493.mir.stderr create mode 100644 src/test/ui/issues/issue-11493.stderr delete mode 100644 src/test/ui/issues/issue-11681.nll.stderr delete mode 100644 src/test/ui/issues/issue-11873.nll.stderr delete mode 100644 src/test/ui/issues/issue-12041.nll.stderr delete mode 100644 src/test/ui/issues/issue-12470.nll.stderr delete mode 100644 src/test/ui/issues/issue-12567.nll.stderr create mode 100644 src/test/ui/issues/issue-13058.nll.stderr delete mode 100644 src/test/ui/issues/issue-13497-2.nll.stderr create mode 100644 src/test/ui/issues/issue-15034.nll.stderr create mode 100644 src/test/ui/issues/issue-15381.nll.stderr create mode 100644 src/test/ui/issues/issue-16683.nll.stderr delete mode 100644 src/test/ui/issues/issue-17263.ast.stderr delete mode 100644 src/test/ui/issues/issue-17263.nll.stderr delete mode 100644 src/test/ui/issues/issue-17385.nll.stderr delete mode 100644 src/test/ui/issues/issue-17545.nll.stderr delete mode 100644 src/test/ui/issues/issue-17718-constants-not-static.nll.stderr delete mode 100644 src/test/ui/issues/issue-17718-static-move.nll.stderr create mode 100644 src/test/ui/issues/issue-17728.nll.stderr create mode 100644 src/test/ui/issues/issue-17758.nll.stderr delete mode 100644 src/test/ui/issues/issue-17954.nll.stderr delete mode 100644 src/test/ui/issues/issue-18118.nll.stderr delete mode 100644 src/test/ui/issues/issue-18566.nll.stderr delete mode 100644 src/test/ui/issues/issue-18783.nll.stderr delete mode 100644 src/test/ui/issues/issue-19163.nll.stderr delete mode 100644 src/test/ui/issues/issue-20801.nll.stderr delete mode 100644 src/test/ui/issues/issue-21600.nll.stderr delete mode 100644 src/test/ui/issues/issue-24267-flow-exit.nll.stderr delete mode 100644 src/test/ui/issues/issue-24357.nll.stderr delete mode 100644 src/test/ui/issues/issue-25579.ast.nll.stderr delete mode 100644 src/test/ui/issues/issue-25579.ast.stderr delete mode 100644 src/test/ui/issues/issue-25579.mir.stderr delete mode 100644 src/test/ui/issues/issue-25700.nll.stderr delete mode 100644 src/test/ui/issues/issue-25793.nll.stderr delete mode 100644 src/test/ui/issues/issue-2590.nll.stderr create mode 100644 src/test/ui/issues/issue-26217.nll.stderr delete mode 100644 src/test/ui/issues/issue-26619.nll.stderr delete mode 100644 src/test/ui/issues/issue-27592.nll.stderr create mode 100644 src/test/ui/issues/issue-28848.nll.stderr delete mode 100644 src/test/ui/issues/issue-30438-a.nll.stderr delete mode 100644 src/test/ui/issues/issue-30438-b.nll.stderr delete mode 100644 src/test/ui/issues/issue-30438-c.nll.stderr delete mode 100644 src/test/ui/issues/issue-33819.nll.stderr delete mode 100644 src/test/ui/issues/issue-36082.ast.nll.stderr delete mode 100644 src/test/ui/issues/issue-36082.ast.stderr rename src/test/ui/issues/{issue-36082.mir.stderr => issue-36082.stderr} (94%) delete mode 100644 src/test/ui/issues/issue-36400.nll.stderr delete mode 100644 src/test/ui/issues/issue-40288.nll.stderr delete mode 100644 src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.nll.stderr delete mode 100644 src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.nll.stderr create mode 100644 src/test/ui/issues/issue-40510-1.migrate.nll.stderr create mode 100644 src/test/ui/issues/issue-40510-1.migrate.stderr create mode 100644 src/test/ui/issues/issue-40510-3.migrate.nll.stderr create mode 100644 src/test/ui/issues/issue-40510-3.migrate.stderr delete mode 100644 src/test/ui/issues/issue-41139.nll.stderr delete mode 100644 src/test/ui/issues/issue-41726.nll.stderr delete mode 100644 src/test/ui/issues/issue-42106.nll.stderr delete mode 100644 src/test/ui/issues/issue-42344.nll.stderr delete mode 100644 src/test/ui/issues/issue-42796.nll.stderr delete mode 100644 src/test/ui/issues/issue-4335.nll.stderr delete mode 100644 src/test/ui/issues/issue-44373.nll.stderr delete mode 100644 src/test/ui/issues/issue-45199.ast.nll.stderr delete mode 100644 src/test/ui/issues/issue-45199.ast.stderr rename src/test/ui/issues/{issue-45199.mir.stderr => issue-45199.stderr} (90%) delete mode 100644 src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.ast.stderr delete mode 100644 src/test/ui/issues/issue-46023.ast.nll.stderr delete mode 100644 src/test/ui/issues/issue-46023.ast.stderr rename src/test/ui/issues/{issue-46023.mir.stderr => issue-46023.stderr} (72%) delete mode 100644 src/test/ui/issues/issue-46604.ast.nll.stderr delete mode 100644 src/test/ui/issues/issue-46604.ast.stderr rename src/test/ui/issues/{issue-46604.mir.stderr => issue-46604.stderr} (70%) create mode 100644 src/test/ui/issues/issue-50518.rs delete mode 100644 src/test/ui/issues/issue-51244.nll.stderr create mode 100644 src/test/ui/issues/issue-51719.rs create mode 100644 src/test/ui/issues/issue-51719.stderr create mode 100644 src/test/ui/issues/issue-51751.rs create mode 100644 src/test/ui/issues/issue-51751.stderr delete mode 100644 src/test/ui/issues/issue-52049.nll.stderr delete mode 100644 src/test/ui/issues/issue-52126-assign-op-invariance.nll.stderr create mode 100644 src/test/ui/issues/issue-52213.nll.stderr delete mode 100644 src/test/ui/issues/issue-52240.nll.stderr create mode 100644 src/test/ui/issues/issue-52533-1.nll.stderr create mode 100644 src/test/ui/issues/issue-52533.nll.stderr create mode 100644 src/test/ui/issues/issue-53498.rs create mode 100644 src/test/ui/issues/issue-53498.stderr create mode 100644 src/test/ui/issues/issue-54302-cases.nll.stderr create mode 100644 src/test/ui/issues/issue-54302.nll.stderr create mode 100644 src/test/ui/issues/issue-54943.nll.stderr create mode 100644 src/test/ui/issues/issue-54954.rs create mode 100644 src/test/ui/issues/issue-54954.stderr delete mode 100644 src/test/ui/issues/issue-5500-1.ast.stderr delete mode 100644 src/test/ui/issues/issue-5500-1.mir.stderr delete mode 100644 src/test/ui/issues/issue-55511.nll.stderr create mode 100644 src/test/ui/issues/issue-55731.nll.stderr create mode 100644 src/test/ui/issues/issue-55796.nll.stderr create mode 100644 src/test/ui/issues/issue-57843.nll.stderr rename src/test/{run-pass => ui}/issues/issue-57924.rs (64%) create mode 100644 src/test/ui/issues/issue-57924.stderr create mode 100644 src/test/ui/issues/issue-59488.rs create mode 100644 src/test/ui/issues/issue-59488.stderr create mode 100644 src/test/ui/issues/issue-59896.rs create mode 100644 src/test/ui/issues/issue-59896.stderr create mode 100644 src/test/ui/issues/issue-60057.rs create mode 100644 src/test/ui/issues/issue-60057.stderr create mode 100644 src/test/ui/issues/issue-60662.rs create mode 100644 src/test/ui/issues/issue-60662.stdout create mode 100644 src/test/ui/issues/issue-60989.rs create mode 100644 src/test/ui/issues/issue-60989.stderr create mode 100644 src/test/ui/issues/issue-61475.rs create mode 100644 src/test/ui/issues/issue-61623.rs create mode 100644 src/test/ui/issues/issue-61623.stderr create mode 100644 src/test/ui/issues/issue-61882-2.rs create mode 100644 src/test/ui/issues/issue-61882-2.stderr create mode 100644 src/test/ui/issues/issue-61882.rs create mode 100644 src/test/ui/issues/issue-61882.stderr delete mode 100644 src/test/ui/issues/issue-6801.nll.stderr create mode 100644 src/test/ui/kindck/kindck-impl-type-params.nll.stderr create mode 100644 src/test/ui/kindck/kindck-send-object1.nll.stderr delete mode 100644 src/test/ui/lifetimes/borrowck-let-suggestion.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-bound-will-change-warning.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.nll.stderr create mode 100644 src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.nll.stderr create mode 100644 src/test/ui/lint/issue-54180-unused-ref-field.fixed create mode 100644 src/test/ui/lint/issue-54180-unused-ref-field.rs create mode 100644 src/test/ui/lint/issue-54180-unused-ref-field.stderr create mode 100644 src/test/ui/lint/lint-range-endpoint-overflow.rs create mode 100644 src/test/ui/lint/lint-range-endpoint-overflow.stderr create mode 100644 src/test/ui/lint/unused_import_warning_issue_45268.rs create mode 100644 src/test/ui/lint/unused_import_warning_issue_45268.stderr delete mode 100644 src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.ast.nll.stderr delete mode 100644 src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.ast.stderr rename src/test/ui/liveness/liveness-assign/{liveness-assign-imm-local-in-loop.mir.stderr => liveness-assign-imm-local-in-loop.stderr} (86%) delete mode 100644 src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.ast.stderr delete mode 100644 src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.mir.stderr rename src/test/ui/liveness/liveness-assign/{liveness-assign-imm-local-in-op-eq.ast.nll.stderr => liveness-assign-imm-local-in-op-eq.stderr} (86%) delete mode 100644 src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.ast.stderr delete mode 100644 src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.mir.stderr rename src/test/ui/liveness/liveness-assign/{liveness-assign-imm-local-with-drop.ast.nll.stderr => liveness-assign-imm-local-with-drop.stderr} (88%) delete mode 100644 src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.ast.nll.stderr delete mode 100644 src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.ast.stderr rename src/test/ui/liveness/liveness-assign/{liveness-assign-imm-local-with-init.mir.stderr => liveness-assign-imm-local-with-init.stderr} (87%) delete mode 100644 src/test/ui/liveness/liveness-move-call-arg.nll.stderr delete mode 100644 src/test/ui/liveness/liveness-move-in-loop.nll.stderr delete mode 100644 src/test/ui/liveness/liveness-move-in-while.nll.stderr delete mode 100644 src/test/ui/liveness/liveness-use-after-move.nll.stderr delete mode 100644 src/test/ui/liveness/liveness-use-after-send.nll.stderr delete mode 100644 src/test/ui/loops/loop-proper-liveness.nll.stderr create mode 100644 src/test/ui/lub-if.nll.stderr create mode 100644 src/test/ui/lub-match.nll.stderr create mode 100644 src/test/ui/macros/assert-trailing-junk.rs create mode 100644 src/test/ui/macros/assert-trailing-junk.stderr create mode 100644 src/test/ui/macros/issue-61033-1.rs create mode 100644 src/test/ui/macros/issue-61033-1.stderr create mode 100644 src/test/ui/macros/issue-61033-2.rs create mode 100644 src/test/ui/macros/issue-61033-2.stderr delete mode 100644 src/test/ui/macros/span-covering-argument-1.nll.stderr create mode 100644 src/test/ui/match/match-ref-mut-invariance.nll.stderr create mode 100644 src/test/ui/match/match-ref-mut-let-invariance.nll.stderr delete mode 100644 src/test/ui/methods/method-self-arg-2.nll.stderr delete mode 100644 src/test/ui/moves/move-guard-same-consts.nll.stderr delete mode 100644 src/test/ui/moves/move-in-guard-1.nll.stderr delete mode 100644 src/test/ui/moves/move-in-guard-2.nll.stderr delete mode 100644 src/test/ui/moves/move-into-dead-array-1.nll.stderr delete mode 100644 src/test/ui/moves/move-into-dead-array-2.nll.stderr delete mode 100644 src/test/ui/moves/move-out-of-slice-1.nll.stderr delete mode 100644 src/test/ui/moves/move-out-of-tuple-field.nll.stderr delete mode 100644 src/test/ui/moves/moves-based-on-type-access-to-field.nll.stderr delete mode 100644 src/test/ui/moves/moves-based-on-type-block-bad.nll.stderr delete mode 100644 src/test/ui/moves/moves-based-on-type-capture-clause-bad.nll.stderr delete mode 100644 src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.nll.stderr delete mode 100644 src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.nll.stderr delete mode 100644 src/test/ui/moves/moves-based-on-type-exprs.nll.stderr delete mode 100644 src/test/ui/moves/moves-based-on-type-match-bindings.nll.stderr delete mode 100644 src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.nll.stderr delete mode 100644 src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.nll.stderr delete mode 100644 src/test/ui/moves/moves-sru-moved-field.nll.stderr delete mode 100644 src/test/ui/mut/mut-cant-alias.nll.stderr delete mode 100644 src/test/ui/mut/mut-pattern-internal-mutability.ast.stderr delete mode 100644 src/test/ui/mut/mut-pattern-internal-mutability.mir.stderr rename src/test/ui/mut/{mut-pattern-internal-mutability.ast.nll.stderr => mut-pattern-internal-mutability.stderr} (81%) delete mode 100644 src/test/ui/mut/mut-suggestion.nll.stderr delete mode 100644 src/test/ui/mut/mutable-class-fields-2.nll.stderr delete mode 100644 src/test/ui/mut/mutable-class-fields.ast.stderr delete mode 100644 src/test/ui/mut/mutable-class-fields.mir.stderr rename src/test/ui/mut/{mutable-class-fields.ast.nll.stderr => mutable-class-fields.stderr} (74%) delete mode 100644 src/test/ui/nll/cannot-move-block-spans.nll.stderr create mode 100644 src/test/ui/nll/get_default.nll.stderr create mode 100644 src/test/ui/nll/issue-50716.nll.stderr create mode 100644 src/test/ui/nll/issue-52742.nll.stderr delete mode 100644 src/test/ui/nll/issue-53807.nll.stderr delete mode 100644 src/test/ui/nll/issue-54382-use-span-of-tail-of-block.nll.stderr delete mode 100644 src/test/ui/nll/issue-54556-niconii.nll.stderr delete mode 100644 src/test/ui/nll/issue-54556-stephaneyfx.nll.stderr delete mode 100644 src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.nll.stderr delete mode 100644 src/test/ui/nll/issue-54556-used-vs-unused-tails.nll.stderr delete mode 100644 src/test/ui/nll/issue-54556-wrap-it-up.nll.stderr create mode 100644 src/test/ui/nll/issue-55394.nll.stderr create mode 100644 src/test/ui/nll/issue-55401.nll.stderr delete mode 100644 src/test/ui/nll/issue-55850.nll.stderr create mode 100644 src/test/ui/nll/local-outlives-static-via-hrtb.rs create mode 100644 src/test/ui/nll/local-outlives-static-via-hrtb.stderr delete mode 100644 src/test/ui/nll/match-guards-always-borrow.ast.nll.stderr delete mode 100644 src/test/ui/nll/match-guards-always-borrow.ast.stderr rename src/test/ui/nll/{match-guards-always-borrow.mir.stderr => match-guards-always-borrow.stderr} (86%) delete mode 100644 src/test/ui/nll/reference-carried-through-struct-field.ast.stderr delete mode 100644 src/test/ui/nll/reference-carried-through-struct-field.mir.stderr rename src/test/ui/nll/{reference-carried-through-struct-field.ast.nll.stderr => reference-carried-through-struct-field.stderr} (86%) create mode 100644 src/test/ui/nll/region-ends-after-if-condition.nll.stderr create mode 100644 src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.nll.stderr create mode 100644 src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.nll.stderr delete mode 100644 src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.rs create mode 100644 src/test/ui/nll/type-alias-free-regions.nll.stderr create mode 100644 src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.nll.stderr create mode 100644 src/test/ui/nll/user-annotations/constant-in-expr-normalize.nll.stderr create mode 100644 src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.nll.stderr create mode 100644 src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.nll.stderr create mode 100644 src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.nll.stderr delete mode 100644 src/test/ui/no-capture-arc.nll.stderr delete mode 100644 src/test/ui/no-reuse-move-arc.nll.stderr delete mode 100644 src/test/ui/not-copy-closure.nll.stderr create mode 100644 src/test/ui/numeric/const-scope.rs create mode 100644 src/test/ui/numeric/const-scope.stderr create mode 100644 src/test/ui/numeric/len.rs create mode 100644 src/test/ui/numeric/len.stderr create mode 100644 src/test/ui/numeric/numeric-cast-without-suggestion.rs create mode 100644 src/test/ui/numeric/numeric-cast-without-suggestion.stderr create mode 100644 src/test/ui/numeric/numeric-cast.fixed create mode 100644 src/test/ui/numeric/numeric-suffix.fixed create mode 100644 src/test/ui/numeric/numeric-suffix.rs create mode 100644 src/test/ui/numeric/numeric-suffix.stderr create mode 100644 src/test/ui/object-lifetime/object-lifetime-default-elision.nll.stderr create mode 100644 src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr create mode 100644 src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.nll.stderr create mode 100644 src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.nll.stderr create mode 100644 src/test/ui/object-lifetime/object-lifetime-default-mybox.nll.stderr delete mode 100644 src/test/ui/object-safety/object-safety-by-value-self-use.nll.stderr delete mode 100644 src/test/ui/once-cant-call-twice-on-heap.nll.stderr create mode 100644 src/test/ui/parser/expr-as-stmt.fixed create mode 100644 src/test/ui/parser/expr-as-stmt.rs create mode 100644 src/test/ui/parser/expr-as-stmt.stderr create mode 100644 src/test/ui/parser/lex-bad-char-literals-7.rs create mode 100644 src/test/ui/parser/lex-bad-char-literals-7.stderr create mode 100644 src/test/ui/parser/macro/literals-are-validated-before-expansion.rs create mode 100644 src/test/ui/parser/macro/literals-are-validated-before-expansion.stderr create mode 100644 src/test/ui/parser/recover-missing-semi.rs create mode 100644 src/test/ui/parser/recover-missing-semi.stderr create mode 100644 src/test/ui/pattern/const-pat-ice.stderr create mode 100644 src/test/ui/pattern/pattern-bindings-after-at.nll.stderr create mode 100644 src/test/ui/proc-macro/no-missing-docs.rs create mode 100644 src/test/ui/pub/pub-ident-fn-3.rs create mode 100644 src/test/ui/pub/pub-ident-fn-3.stderr create mode 100644 src/test/ui/recursion/recursive-types-are-not-uninhabited.nll.stderr delete mode 100644 src/test/ui/ref-suggestion.nll.stderr delete mode 100644 src/test/ui/regions/region-borrow-params-issue-29793-big.ast.stderr delete mode 100644 src/test/ui/regions/region-borrow-params-issue-29793-big.mir.stderr rename src/test/ui/regions/{region-borrow-params-issue-29793-big.ast.nll.stderr => region-borrow-params-issue-29793-big.stderr} (88%) delete mode 100644 src/test/ui/regions/region-borrow-params-issue-29793-small.nll.stderr delete mode 100644 src/test/ui/regions/region-bound-on-closure-outlives-call.nll.stderr create mode 100644 src/test/ui/regions/region-invariant-static-error-reporting.nll.stderr create mode 100644 src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.nll.stderr create mode 100644 src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.nll.stderr create mode 100644 src/test/ui/regions/region-object-lifetime-2.nll.stderr create mode 100644 src/test/ui/regions/region-object-lifetime-4.nll.stderr delete mode 100644 src/test/ui/regions/region-object-lifetime-5.nll.stderr create mode 100644 src/test/ui/regions/region-object-lifetime-in-coercion.nll.stderr delete mode 100644 src/test/ui/regions/regions-addr-of-arg.nll.stderr create mode 100644 src/test/ui/regions/regions-addr-of-self.nll.stderr create mode 100644 src/test/ui/regions/regions-addr-of-upvar-self.nll.stderr delete mode 100644 src/test/ui/regions/regions-adjusted-lvalue-op.nll.stderr rename src/test/ui/regions/{regions-assoc-type-in-supertrait-outlives-container.mir.stderr => regions-assoc-type-in-supertrait-outlives-container.migrate.nll.stderr} (65%) rename src/test/ui/regions/{regions-assoc-type-in-supertrait-outlives-container.ast.stderr => regions-assoc-type-in-supertrait-outlives-container.migrate.stderr} (87%) create mode 100644 src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.nll.stderr delete mode 100644 src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.stderr create mode 100644 src/test/ui/regions/regions-bounded-by-trait-requiring-static.nll.stderr create mode 100644 src/test/ui/regions/regions-bounded-method-type-parameters-cross-crate.nll.stderr create mode 100644 src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.nll.stderr create mode 100644 src/test/ui/regions/regions-bounded-method-type-parameters.nll.stderr create mode 100644 src/test/ui/regions/regions-bounds.nll.stderr create mode 100644 src/test/ui/regions/regions-close-associated-type-into-object.nll.stderr delete mode 100644 src/test/ui/regions/regions-close-object-into-object-1.nll.stderr create mode 100644 src/test/ui/regions/regions-close-object-into-object-2.nll.stderr delete mode 100644 src/test/ui/regions/regions-close-object-into-object-3.nll.stderr create mode 100644 src/test/ui/regions/regions-close-object-into-object-4.nll.stderr create mode 100644 src/test/ui/regions/regions-close-object-into-object-5.nll.stderr create mode 100644 src/test/ui/regions/regions-close-over-type-parameter-1.nll.stderr create mode 100644 src/test/ui/regions/regions-close-over-type-parameter-multiple.nll.stderr create mode 100644 src/test/ui/regions/regions-close-param-into-object.nll.stderr delete mode 100644 src/test/ui/regions/regions-creating-enums.nll.stderr create mode 100644 src/test/ui/regions/regions-creating-enums3.nll.stderr create mode 100644 src/test/ui/regions/regions-creating-enums4.nll.stderr create mode 100644 src/test/ui/regions/regions-early-bound-error-method.nll.stderr create mode 100644 src/test/ui/regions/regions-early-bound-error.nll.stderr create mode 100644 src/test/ui/regions/regions-escape-method.nll.stderr create mode 100644 src/test/ui/regions/regions-escape-via-trait-or-not.nll.stderr create mode 100644 src/test/ui/regions/regions-free-region-ordering-callee.nll.stderr rename src/test/ui/regions/{regions-free-region-ordering-caller.mir.stderr => regions-free-region-ordering-caller.migrate.nll.stderr} (100%) rename src/test/ui/regions/{regions-free-region-ordering-caller.ast.stderr => regions-free-region-ordering-caller.migrate.stderr} (95%) create mode 100644 src/test/ui/regions/regions-free-region-ordering-caller.nll.stderr delete mode 100644 src/test/ui/regions/regions-free-region-ordering-caller1.nll.stderr create mode 100644 src/test/ui/regions/regions-free-region-ordering-incorrect.nll.stderr rename src/test/ui/{nll/ty-outlives/ty-param-fn-body-nll-feature.stderr => regions/regions-implied-bounds-projection-gap-1.nll.stderr} (51%) delete mode 100644 src/test/ui/regions/regions-infer-borrow-scope-too-big.nll.stderr create mode 100644 src/test/ui/regions/regions-infer-bound-from-trait-self.nll.stderr create mode 100644 src/test/ui/regions/regions-infer-bound-from-trait.nll.stderr create mode 100644 src/test/ui/regions/regions-infer-call-3.nll.stderr create mode 100644 src/test/ui/regions/regions-infer-contravariance-due-to-decl.nll.stderr create mode 100644 src/test/ui/regions/regions-infer-covariance-due-to-decl.nll.stderr create mode 100644 src/test/ui/regions/regions-infer-invariance-due-to-decl.nll.stderr create mode 100644 src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.nll.stderr create mode 100644 src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.nll.stderr create mode 100644 src/test/ui/regions/regions-infer-not-param.nll.stderr create mode 100644 src/test/ui/regions/regions-infer-paramd-indirect.nll.stderr delete mode 100644 src/test/ui/regions/regions-infer-proc-static-upvar.nll.stderr create mode 100644 src/test/ui/regions/regions-lifetime-bounds-on-fns.nll.stderr delete mode 100644 src/test/ui/regions/regions-lifetime-of-struct-or-enum-variant.nll.stderr delete mode 100644 src/test/ui/regions/regions-nested-fns-2.nll.stderr create mode 100644 src/test/ui/regions/regions-nested-fns.nll.stderr rename src/test/ui/regions/{regions-outlives-projection-container-hrtb.mir.stderr => regions-outlives-projection-container-hrtb.migrate.nll.stderr} (100%) rename src/test/ui/regions/{regions-outlives-projection-container-hrtb.ast.stderr => regions-outlives-projection-container-hrtb.migrate.stderr} (100%) create mode 100644 src/test/ui/regions/regions-outlives-projection-container-hrtb.nll.stderr delete mode 100644 src/test/ui/regions/regions-outlives-projection-container-hrtb.stderr rename src/test/ui/regions/{regions-outlives-projection-container-wc.mir.stderr => regions-outlives-projection-container-wc.migrate.nll.stderr} (100%) rename src/test/ui/regions/{regions-outlives-projection-container-wc.ast.stderr => regions-outlives-projection-container-wc.migrate.stderr} (100%) create mode 100644 src/test/ui/regions/regions-outlives-projection-container-wc.nll.stderr delete mode 100644 src/test/ui/regions/regions-outlives-projection-container-wc.stderr create mode 100644 src/test/ui/regions/regions-outlives-projection-container.nll.stderr delete mode 100644 src/test/ui/regions/regions-pattern-typing-issue-19552.nll.stderr delete mode 100644 src/test/ui/regions/regions-pattern-typing-issue-19997.ast.stderr delete mode 100644 src/test/ui/regions/regions-pattern-typing-issue-19997.mir.stderr rename src/test/ui/regions/{regions-pattern-typing-issue-19997.ast.nll.stderr => regions-pattern-typing-issue-19997.stderr} (87%) create mode 100644 src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.nll.stderr create mode 100644 src/test/ui/regions/regions-reborrow-from-shorter-mut-ref.nll.stderr delete mode 100644 src/test/ui/regions/regions-ref-in-fn-arg.nll.stderr create mode 100644 src/test/ui/regions/regions-ret-borrowed-1.nll.stderr create mode 100644 src/test/ui/regions/regions-ret-borrowed.nll.stderr delete mode 100644 src/test/ui/regions/regions-ret.nll.stderr create mode 100644 src/test/ui/regions/regions-return-ref-to-upvar-issue-17403.nll.stderr delete mode 100644 src/test/ui/regions/regions-return-stack-allocated-vec.nll.stderr create mode 100644 src/test/ui/regions/regions-static-bound.ll.nll.stderr create mode 100644 src/test/ui/regions/regions-static-bound.migrate.nll.stderr rename src/test/ui/regions/{regions-static-bound.ll.stderr => regions-static-bound.migrate.stderr} (91%) delete mode 100644 src/test/ui/regions/regions-steal-closure.nll.stderr create mode 100644 src/test/ui/regions/regions-trait-object-subtyping.nll.stderr delete mode 100644 src/test/ui/regions/regions-trait-variance.nll.stderr delete mode 100644 src/test/ui/regions/regions-var-type-out-of-scope.nll.stderr create mode 100644 src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.nll.stderr create mode 100644 src/test/ui/regions/regions-variance-contravariant-use-covariant.nll.stderr create mode 100644 src/test/ui/regions/regions-variance-covariant-use-contravariant.nll.stderr create mode 100644 src/test/ui/regions/regions-variance-invariant-use-contravariant.nll.stderr create mode 100644 src/test/ui/regions/regions-variance-invariant-use-covariant.nll.stderr delete mode 100644 src/test/ui/rfc-2005-default-binding-mode/enum.nll.stderr delete mode 100644 src/test/ui/rfc-2005-default-binding-mode/explicit-mut.nll.stderr create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/auxiliary/uninhabited.rs create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.rs create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.rs create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.rs create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.stderr create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.rs create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.stderr create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.rs create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.stderr create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns_same_crate.rs create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.rs create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.rs create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.stderr create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.rs create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns_same_crate.rs create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.rs create mode 100644 src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.stderr create mode 100644 src/test/ui/rfc-2008-non-exhaustive/variants_fictive_visibility.rs delete mode 100644 src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.nll.stderr create mode 100644 src/test/ui/rfc1598-generic-associated-types/gat-dont-ice-on-absent-feature.rs create mode 100644 src/test/ui/rfc1598-generic-associated-types/gat-dont-ice-on-absent-feature.stderr rename src/test/ui/{ => self}/arbitrary-self-types-not-object-safe.rs (100%) rename src/test/ui/{ => self}/arbitrary-self-types-not-object-safe.stderr (100%) create mode 100644 src/test/ui/self/arbitrary_self_types_pin_lifetime.rs create mode 100644 src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.nll.stderr create mode 100644 src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.rs create mode 100644 src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr create mode 100644 src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.nll.stderr create mode 100644 src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.rs create mode 100644 src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.stderr rename src/test/{run-pass => ui/self}/arbitrary_self_types_pointers_and_wrappers.rs (99%) rename src/test/{run-pass => ui}/self/arbitrary_self_types_raw_pointer_struct.rs (100%) rename src/test/{run-pass => ui}/self/arbitrary_self_types_raw_pointer_trait.rs (100%) rename src/test/{run-pass => ui}/self/arbitrary_self_types_silly.rs (100%) rename src/test/{run-pass => ui/self}/arbitrary_self_types_stdlib_pointers.rs (99%) rename src/test/{run-pass => ui}/self/arbitrary_self_types_struct.rs (100%) rename src/test/{run-pass => ui}/self/arbitrary_self_types_trait.rs (100%) rename src/test/{run-pass => ui}/self/arbitrary_self_types_unsized_struct.rs (100%) rename src/test/{run-pass => ui}/self/auxiliary/explicit_self_xcrate.rs (100%) rename src/test/{run-pass => ui}/self/builtin-superkinds-self-type.rs (100%) rename src/test/{run-pass => ui}/self/by-value-self-in-mut-slot.rs (100%) rename src/test/{run-pass => ui}/self/explicit-self-closures.rs (94%) rename src/test/{run-pass => ui}/self/explicit-self-generic.rs (100%) rename src/test/{run-pass => ui}/self/explicit-self-objects-uniq.rs (100%) rename src/test/{run-pass => ui}/self/explicit-self.rs (100%) rename src/test/{run-pass => ui}/self/explicit_self_xcrate_exe.rs (100%) rename src/test/{run-pass => ui}/self/move-self.rs (100%) rename src/test/{run-pass => ui}/self/object-safety-sized-self-by-value-self.rs (100%) rename src/test/{run-pass => ui}/self/object-safety-sized-self-generic-method.rs (100%) rename src/test/{run-pass => ui}/self/object-safety-sized-self-return-Self.rs (100%) rename src/test/{run-pass/self/self-impl.rs => ui/self/self-impl-2.rs} (100%) rename src/test/{run-pass => ui}/self/self-in-mut-slot-default-method.rs (100%) rename src/test/{run-pass => ui}/self/self-in-mut-slot-immediate-value.rs (100%) rename src/test/{run-pass => ui}/self/self-in-typedefs.rs (96%) rename src/test/{run-pass => ui}/self/self-re-assign.rs (100%) rename src/test/{run-pass => ui}/self/self-shadowing-import.rs (100%) rename src/test/{run-pass => ui}/self/self-type-param.rs (93%) create mode 100644 src/test/ui/self/self_lifetime.rs rename src/test/{run-pass => ui}/self/string-self-append.rs (100%) rename src/test/{run-pass => ui}/self/ufcs-explicit-self.rs (100%) rename src/test/{run-pass => ui}/self/uniq-self-in-mut-slot.rs (100%) rename src/test/{run-pass => ui}/self/where-for-self.rs (100%) delete mode 100644 src/test/ui/slice-mut-2.nll.stderr delete mode 100644 src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.nll.stderr delete mode 100644 src/test/ui/span/borrowck-borrow-overloaded-deref-mut.nll.stderr delete mode 100644 src/test/ui/span/borrowck-call-is-borrow-issue-12224.nll.stderr delete mode 100644 src/test/ui/span/borrowck-call-method-from-mut-aliasable.nll.stderr delete mode 100644 src/test/ui/span/borrowck-fn-in-const-b.nll.stderr delete mode 100644 src/test/ui/span/borrowck-let-suggestion-suffixes.nll.stderr delete mode 100644 src/test/ui/span/borrowck-object-mutability.nll.stderr delete mode 100644 src/test/ui/span/borrowck-ref-into-rvalue.nll.stderr delete mode 100644 src/test/ui/span/destructor-restrictions.nll.stderr delete mode 100644 src/test/ui/span/dropck-object-cycle.nll.stderr delete mode 100644 src/test/ui/span/dropck_arr_cycle_checked.nll.stderr delete mode 100644 src/test/ui/span/dropck_direct_cycle_with_drop.nll.stderr delete mode 100644 src/test/ui/span/dropck_misc_variants.nll.stderr delete mode 100644 src/test/ui/span/dropck_vec_cycle_checked.nll.stderr delete mode 100644 src/test/ui/span/issue-11925.nll.stderr delete mode 100644 src/test/ui/span/issue-15480.nll.stderr delete mode 100644 src/test/ui/span/issue-23338-locals-die-before-temps-of-body.nll.stderr delete mode 100644 src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.nll.stderr delete mode 100644 src/test/ui/span/issue-24805-dropck-trait-has-items.nll.stderr delete mode 100644 src/test/ui/span/issue-24895-copy-clone-dropck.nll.stderr delete mode 100644 src/test/ui/span/issue-25199.nll.stderr delete mode 100644 src/test/ui/span/issue-26656.nll.stderr delete mode 100644 src/test/ui/span/issue-29106.nll.stderr delete mode 100644 src/test/ui/span/issue-36537.nll.stderr delete mode 100644 src/test/ui/span/issue-40157.nll.stderr delete mode 100644 src/test/ui/span/issue28498-reject-ex1.nll.stderr delete mode 100644 src/test/ui/span/issue28498-reject-lifetime-param.nll.stderr delete mode 100644 src/test/ui/span/issue28498-reject-passed-to-fn.nll.stderr delete mode 100644 src/test/ui/span/issue28498-reject-trait-bound.nll.stderr delete mode 100644 src/test/ui/span/mut-arg-hint.nll.stderr delete mode 100644 src/test/ui/span/mut-ptr-cant-outlive-ref.nll.stderr delete mode 100644 src/test/ui/span/range-2.nll.stderr delete mode 100644 src/test/ui/span/regionck-unboxed-closure-lifetimes.nll.stderr delete mode 100644 src/test/ui/span/regions-close-over-borrowed-ref-in-obj.nll.stderr delete mode 100644 src/test/ui/span/regions-close-over-type-parameter-2.nll.stderr delete mode 100644 src/test/ui/span/regions-escape-loop-via-variable.nll.stderr delete mode 100644 src/test/ui/span/regions-escape-loop-via-vec.nll.stderr delete mode 100644 src/test/ui/span/regions-infer-borrow-scope-within-loop.nll.stderr delete mode 100644 src/test/ui/span/send-is-not-static-ensures-scoping.nll.stderr delete mode 100644 src/test/ui/span/send-is-not-static-std-sync-2.nll.stderr delete mode 100644 src/test/ui/span/send-is-not-static-std-sync.nll.stderr delete mode 100644 src/test/ui/span/slice-borrow.nll.stderr delete mode 100644 src/test/ui/span/vec-must-not-hide-type-from-dropck.nll.stderr delete mode 100644 src/test/ui/span/vec_refs_data_with_early_death.nll.stderr delete mode 100644 src/test/ui/span/wf-method-late-bound-regions.nll.stderr delete mode 100644 src/test/ui/static/static-drop-scope.nll.stderr delete mode 100644 src/test/ui/static/static-lifetime-bound.nll.stderr delete mode 100644 src/test/ui/static/static-reference-to-fn-2.nll.stderr delete mode 100644 src/test/ui/static/static-region-bound.nll.stderr delete mode 100644 src/test/ui/std-uncopyable-atomics.nll.stderr create mode 100644 src/test/ui/struct-literal-variant-in-if.rs create mode 100644 src/test/ui/struct-literal-variant-in-if.stderr delete mode 100644 src/test/ui/structs/struct-base-wrong-type-2.rs delete mode 100644 src/test/ui/structs/struct-base-wrong-type-2.stderr delete mode 100644 src/test/ui/suggestions/borrow-for-loop-head.nll.stderr create mode 100644 src/test/ui/suggestions/issue-57672.rs create mode 100644 src/test/ui/suggestions/issue-59819.fixed create mode 100644 src/test/ui/suggestions/issue-59819.rs create mode 100644 src/test/ui/suggestions/issue-59819.stderr create mode 100644 src/test/ui/suggestions/match-ergonomics.rs create mode 100644 src/test/ui/suggestions/match-ergonomics.stderr create mode 100644 src/test/ui/suggestions/recover-invalid-float.fixed create mode 100644 src/test/ui/suggestions/suggest-impl-trait-lifetime.nll.stderr create mode 100644 src/test/ui/suggestions/suggest-std-when-using-type.rs create mode 100644 src/test/ui/suggestions/suggest-std-when-using-type.stderr delete mode 100644 src/test/ui/thread-local-mutation.nll.stderr create mode 100644 src/test/ui/traits/cycle-cache-err-60010.rs create mode 100644 src/test/ui/traits/cycle-cache-err-60010.stderr delete mode 100644 src/test/ui/traits/trait-coercion-generic-regions.nll.stderr delete mode 100644 src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.nll.stderr create mode 100644 src/test/ui/try-block/try-block-catch.rs create mode 100644 src/test/ui/try-block/try-block-catch.stderr delete mode 100644 src/test/ui/unboxed-closures/unboxed-closure-illegal-move.nll.stderr delete mode 100644 src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.nll.stderr delete mode 100644 src/test/ui/unboxed-closures/unboxed-closure-region.nll.stderr delete mode 100644 src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.nll.stderr delete mode 100644 src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.nll.stderr create mode 100644 src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.nll.stderr delete mode 100644 src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.nll.stderr delete mode 100644 src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.nll.stderr delete mode 100644 src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.nll.stderr delete mode 100644 src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.nll.stderr delete mode 100644 src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.ast.stderr delete mode 100644 src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.mir.stderr rename src/test/ui/unboxed-closures/{unboxed-closures-mutated-upvar-from-fn-closure.ast.nll.stderr => unboxed-closures-mutated-upvar-from-fn-closure.stderr} (65%) delete mode 100644 src/test/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.nll.stderr create mode 100644 src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr create mode 100644 src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.nll.stderr delete mode 100644 src/test/ui/union/union-borrow-move-parent-sibling.nll.stderr delete mode 100644 src/test/ui/unop-move-semantics.nll.stderr delete mode 100644 src/test/ui/unsized-locals/borrow-after-move.nll.stderr delete mode 100644 src/test/ui/unsized-locals/double-move.nll.stderr delete mode 100644 src/test/ui/unsized-locals/unsized-exprs2.nll.stderr create mode 100644 src/test/ui/unsized-locals/unsized-index.rs delete mode 100644 src/test/ui/use/use-after-move-based-on-type.nll.stderr delete mode 100644 src/test/ui/use/use-after-move-implicity-coerced-object.nll.stderr delete mode 100644 src/test/ui/use/use-after-move-self-based-on-type.nll.stderr delete mode 100644 src/test/ui/use/use-after-move-self.nll.stderr create mode 100644 src/test/ui/use/use-associated-const.rs create mode 100644 src/test/ui/use/use-associated-const.stderr create mode 100644 src/test/ui/variance/variance-btree-invariant-types.nll.stderr create mode 100644 src/test/ui/variance/variance-cell-is-invariant.nll.stderr create mode 100644 src/test/ui/variance/variance-contravariant-arg-object.nll.stderr create mode 100644 src/test/ui/variance/variance-contravariant-arg-trait-match.nll.stderr create mode 100644 src/test/ui/variance/variance-contravariant-self-trait-match.nll.stderr create mode 100644 src/test/ui/variance/variance-covariant-arg-object.nll.stderr create mode 100644 src/test/ui/variance/variance-covariant-arg-trait-match.nll.stderr create mode 100644 src/test/ui/variance/variance-covariant-self-trait-match.nll.stderr create mode 100644 src/test/ui/variance/variance-invariant-arg-object.nll.stderr create mode 100644 src/test/ui/variance/variance-invariant-arg-trait-match.nll.stderr create mode 100644 src/test/ui/variance/variance-invariant-self-trait-match.nll.stderr delete mode 100644 src/test/ui/variance/variance-issue-20533.nll.stderr create mode 100644 src/test/ui/variance/variance-trait-matching.nll.stderr create mode 100644 src/test/ui/variance/variance-use-contravariant-struct-1.nll.stderr create mode 100644 src/test/ui/variance/variance-use-covariant-struct-1.nll.stderr create mode 100644 src/test/ui/variance/variance-use-invariant-struct-1.nll.stderr delete mode 100644 src/test/ui/vec/vec-mut-iter-borrow.nll.stderr delete mode 100644 src/test/ui/walk-struct-literal-with.nll.stderr delete mode 100644 src/test/ui/wf/wf-misc-methods-issue-28609.nll.stderr create mode 100644 src/test/ui/wf/wf-static-method.nll.stderr delete mode 100644 src/test/ui/writing-to-immutable-vec.nll.stderr create mode 100644 src/tools/rustc-std-workspace-alloc/Cargo.toml create mode 100644 src/tools/rustc-std-workspace-alloc/lib.rs create mode 100644 src/tools/tidy/src/features/version.rs create mode 100644 vendor/aho-corasick/appveyor.yml delete mode 100644 vendor/aho-corasick/benches/bench.rs delete mode 100644 vendor/aho-corasick/benches/random.txt delete mode 100644 vendor/aho-corasick/examples/dict-search.rs create mode 100644 vendor/aho-corasick/src/ahocorasick.rs delete mode 100644 vendor/aho-corasick/src/autiter.rs create mode 100644 vendor/aho-corasick/src/automaton.rs create mode 100644 vendor/aho-corasick/src/buffer.rs create mode 100644 vendor/aho-corasick/src/classes.rs create mode 100644 vendor/aho-corasick/src/dfa.rs create mode 100644 vendor/aho-corasick/src/error.rs delete mode 100644 vendor/aho-corasick/src/full.rs delete mode 100644 vendor/aho-corasick/src/main.rs create mode 100644 vendor/aho-corasick/src/nfa.rs create mode 100644 vendor/aho-corasick/src/prefilter.rs create mode 100644 vendor/aho-corasick/src/state_id.rs create mode 100644 vendor/aho-corasick/src/tests.rs create mode 100644 vendor/cc/azure-pipelines.yml create mode 100644 vendor/cc/ci/azure-install-rust.yml create mode 100644 vendor/cc/ci/azure-steps.yml mode change 100755 => 100644 vendor/cmake/src/lib.rs create mode 100644 vendor/compiler_builtins/compiler-rt/lib/builtins/ppc/fixunstfti.c create mode 100644 vendor/compiler_builtins/compiler-rt/lib/builtins/ppc/floattitf.c create mode 100644 vendor/compiler_builtins/libm/src/math/ldexp.rs create mode 100644 vendor/compiler_builtins/libm/src/math/ldexpf.rs create mode 100644 vendor/getopts/src/tests/mod.rs create mode 100644 vendor/hashbrown/.cargo-checksum.json create mode 100644 vendor/hashbrown/CHANGELOG.md create mode 100644 vendor/hashbrown/Cargo.toml rename vendor/{rustc-serialize => hashbrown}/LICENSE-APACHE (100%) rename vendor/{rustc-serialize => hashbrown}/LICENSE-MIT (95%) create mode 100644 vendor/hashbrown/README.md create mode 100644 vendor/hashbrown/benches/bench.rs create mode 100644 vendor/hashbrown/clippy.toml create mode 100644 vendor/hashbrown/src/external_trait_impls/mod.rs create mode 100644 vendor/hashbrown/src/external_trait_impls/rayon/helpers.rs create mode 100644 vendor/hashbrown/src/external_trait_impls/rayon/map.rs create mode 100644 vendor/hashbrown/src/external_trait_impls/rayon/mod.rs create mode 100644 vendor/hashbrown/src/external_trait_impls/rayon/raw.rs create mode 100644 vendor/hashbrown/src/external_trait_impls/rayon/set.rs create mode 100644 vendor/hashbrown/src/external_trait_impls/serde.rs create mode 100644 vendor/hashbrown/src/fx.rs create mode 100644 vendor/hashbrown/src/lib.rs create mode 100644 vendor/hashbrown/src/macros.rs create mode 100644 vendor/hashbrown/src/map.rs create mode 100644 vendor/hashbrown/src/raw/bitmask.rs create mode 100644 vendor/hashbrown/src/raw/generic.rs create mode 100644 vendor/hashbrown/src/raw/mod.rs create mode 100644 vendor/hashbrown/src/raw/sse2.rs create mode 100644 vendor/hashbrown/src/rustc_entry.rs create mode 100644 vendor/hashbrown/src/scopeguard.rs create mode 100644 vendor/hashbrown/src/set.rs create mode 100644 vendor/hashbrown/tests/hasher.rs create mode 100644 vendor/hashbrown/tests/rayon.rs create mode 100644 vendor/hashbrown/tests/serde.rs create mode 100644 vendor/hashbrown/tests/set.rs create mode 100644 vendor/measureme/.cargo-checksum.json create mode 100644 vendor/measureme/Cargo.toml create mode 100644 vendor/measureme/benches/serialization_bench.rs create mode 100644 vendor/measureme/src/event.rs create mode 100644 vendor/measureme/src/file_header.rs create mode 100644 vendor/measureme/src/file_serialization_sink.rs create mode 100644 vendor/measureme/src/lib.rs create mode 100644 vendor/measureme/src/mmap_serialization_sink.rs create mode 100644 vendor/measureme/src/profiler.rs create mode 100644 vendor/measureme/src/profiling_data.rs create mode 100644 vendor/measureme/src/raw_event.rs create mode 100644 vendor/measureme/src/rustc.rs create mode 100644 vendor/measureme/src/serialization.rs create mode 100644 vendor/measureme/src/stringtable.rs create mode 100644 vendor/measureme/src/testing_common.rs create mode 100644 vendor/measureme/tests/serialization.rs create mode 100644 vendor/polonius-engine/src/output/hybrid.rs create mode 100644 vendor/pulldown-cmark/.cargo-checksum.json create mode 100644 vendor/pulldown-cmark/CONTRIBUTING.md create mode 100644 vendor/pulldown-cmark/Cargo.toml create mode 100644 vendor/pulldown-cmark/LICENSE create mode 100644 vendor/pulldown-cmark/README.md create mode 100644 vendor/pulldown-cmark/azure-pipelines.yml create mode 100644 vendor/pulldown-cmark/benches/html_rendering.rs create mode 100644 vendor/pulldown-cmark/benches/lib.rs create mode 100644 vendor/pulldown-cmark/build.rs create mode 100644 vendor/pulldown-cmark/examples/event-filter.rs create mode 100644 vendor/pulldown-cmark/examples/string-to-string.rs create mode 100644 vendor/pulldown-cmark/specs/footnotes.txt create mode 100644 vendor/pulldown-cmark/specs/regression.txt create mode 100644 vendor/pulldown-cmark/specs/table.txt create mode 100644 vendor/pulldown-cmark/src/entities.rs create mode 100644 vendor/pulldown-cmark/src/escape.rs create mode 100644 vendor/pulldown-cmark/src/html.rs create mode 100644 vendor/pulldown-cmark/src/lib.rs create mode 100644 vendor/pulldown-cmark/src/linklabel.rs create mode 100644 vendor/pulldown-cmark/src/main.rs create mode 100644 vendor/pulldown-cmark/src/parse.rs create mode 100644 vendor/pulldown-cmark/src/puncttable.rs create mode 100644 vendor/pulldown-cmark/src/scanners.rs create mode 100644 vendor/pulldown-cmark/src/simd.rs create mode 100644 vendor/pulldown-cmark/src/strings.rs create mode 100644 vendor/pulldown-cmark/src/tree.rs create mode 100644 vendor/pulldown-cmark/tests/errors.rs create mode 100644 vendor/pulldown-cmark/tests/html.rs create mode 100644 vendor/pulldown-cmark/tests/lib.rs create mode 100644 vendor/pulldown-cmark/tests/suite/footnotes.rs create mode 100644 vendor/pulldown-cmark/tests/suite/gfm_strikethrough.rs create mode 100644 vendor/pulldown-cmark/tests/suite/gfm_table.rs create mode 100644 vendor/pulldown-cmark/tests/suite/gfm_tasklist.rs create mode 100644 vendor/pulldown-cmark/tests/suite/mod.rs create mode 100644 vendor/pulldown-cmark/tests/suite/regression.rs create mode 100644 vendor/pulldown-cmark/tests/suite/spec.rs create mode 100644 vendor/pulldown-cmark/tests/suite/table.rs create mode 100644 vendor/pulldown-cmark/third_party/CommonMark/LICENSE create mode 100644 vendor/pulldown-cmark/third_party/CommonMark/README.google create mode 100644 vendor/pulldown-cmark/third_party/CommonMark/spec.txt create mode 100644 vendor/pulldown-cmark/third_party/GitHub/LICENSE create mode 100644 vendor/pulldown-cmark/third_party/GitHub/gfm_strikethrough.txt create mode 100644 vendor/pulldown-cmark/third_party/GitHub/gfm_table.txt create mode 100644 vendor/pulldown-cmark/third_party/GitHub/gfm_tasklist.txt create mode 100644 vendor/pulldown-cmark/third_party/GitHub/spec.txt create mode 100644 vendor/pulldown-cmark/third_party/xi-editor/LICENSE create mode 100644 vendor/pulldown-cmark/third_party/xi-editor/crdt.md create mode 100644 vendor/pulldown-cmark/tools/mk_entities.py create mode 100644 vendor/pulldown-cmark/tools/mk_puncttable.py create mode 100644 vendor/rls-data/src/serde_expanded.rs create mode 100644 vendor/rls-span/src/serde_expanded.rs delete mode 100644 vendor/rustc-serialize/.cargo-checksum.json delete mode 100644 vendor/rustc-serialize/Cargo.toml delete mode 100644 vendor/rustc-serialize/README.md delete mode 100644 vendor/rustc-serialize/appveyor.yml delete mode 100644 vendor/rustc-serialize/benches/base64.rs delete mode 100644 vendor/rustc-serialize/benches/hex.rs delete mode 100644 vendor/rustc-serialize/benches/json.rs delete mode 100644 vendor/rustc-serialize/src/base64.rs delete mode 100644 vendor/rustc-serialize/src/collection_impls.rs delete mode 100644 vendor/rustc-serialize/src/hex.rs delete mode 100644 vendor/rustc-serialize/src/json.rs delete mode 100644 vendor/rustc-serialize/src/lib.rs delete mode 100644 vendor/rustc-serialize/src/serialize.rs create mode 100644 vendor/unicase/.cargo-checksum.json create mode 100644 vendor/unicase/Cargo.toml create mode 100644 vendor/unicase/LICENSE-APACHE create mode 100644 vendor/unicase/LICENSE-MIT create mode 100644 vendor/unicase/README.md create mode 100644 vendor/unicase/build.rs create mode 100644 vendor/unicase/src/ascii.rs create mode 100644 vendor/unicase/src/lib.rs create mode 100644 vendor/unicase/src/unicode/map.rs create mode 100644 vendor/unicase/src/unicode/mod.rs diff --git a/Cargo.lock b/Cargo.lock index f7890338b1..b687637a24 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,14 +10,22 @@ name = "aho-corasick" version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "aho-corasick" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "alloc" version = "0.0.0" dependencies = [ - "compiler_builtins 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -29,13 +37,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "html5ever 0.22.5 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tendril 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "annotate-snippets" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ansi_term" version = "0.11.0" @@ -84,7 +100,7 @@ name = "atty" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -96,7 +112,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace-sys 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -106,9 +122,9 @@ name = "backtrace-sys" version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", - "compiler_builtins 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-std-workspace-core 1.0.0", ] @@ -158,22 +174,29 @@ name = "bootstrap" version = "0.0.0" dependencies = [ "build_helper 0.1.0", - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", - "cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", "filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "bstr" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "bufstream" version = "0.1.4" @@ -184,7 +207,6 @@ name = "build-manifest" version = "0.1.0" dependencies = [ "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -231,7 +253,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cargo" -version = "0.36.0" +version = "0.37.0" dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "bufstream 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -239,11 +261,11 @@ dependencies = [ "bytesize 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "crates-io 0.24.0", - "crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crates-io 0.25.0", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "crypto-hash 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "curl 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", - "curl-sys 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", + "curl 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)", + "curl-sys 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -255,17 +277,18 @@ dependencies = [ "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "home 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "ignore 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "ignore 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "im-rc 12.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "jobserver 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "libgit2-sys 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "opener 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opener 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_env_logger 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "proptest 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -288,18 +311,6 @@ dependencies = [ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "cargo_metadata" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "cargo_metadata" version = "0.7.1" @@ -318,7 +329,7 @@ version = "0.1.0" [[package]] name = "cc" -version = "1.0.28" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -375,15 +386,14 @@ dependencies = [ "cargo_metadata 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "clippy-mini-macro-test 0.2.0", "clippy_lints 0.0.212", - "compiletest_rs 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)", + "compiletest_rs 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "derive-new 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-workspace-hack 1.0.0", "rustc_tools_util 0.1.1", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -397,16 +407,15 @@ dependencies = [ "cargo_metadata 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "pulldown-cmark 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pulldown-cmark 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -421,10 +430,10 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.33" +version = "0.1.38" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -448,15 +457,15 @@ name = "commoncrypto-sys" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "compiler_builtins" -version = "0.1.9" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-std-workspace-core 1.0.0", ] @@ -466,16 +475,14 @@ version = "0.0.0" dependencies = [ "diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", - "filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustfix 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -483,16 +490,16 @@ dependencies = [ [[package]] name = "compiletest_rs" -version = "0.3.21" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustfix 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)", @@ -520,7 +527,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -530,9 +537,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "crates-io" -version = "0.24.0" +version = "0.25.0" dependencies = [ - "curl 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "curl 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", @@ -559,13 +566,10 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.3.4" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-epoch 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -584,7 +588,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-epoch 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -595,7 +599,7 @@ dependencies = [ "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -608,8 +612,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -624,10 +628,11 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.6.2" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -643,14 +648,14 @@ dependencies = [ [[package]] name = "curl" -version = "0.4.19" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "curl-sys 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", + "curl-sys 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", "schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -658,14 +663,14 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.4.15" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -720,7 +725,7 @@ name = "directories" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -729,7 +734,7 @@ name = "dirs" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_users 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -739,8 +744,8 @@ name = "dlmalloc" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "compiler_builtins 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-std-workspace-core 1.0.0", ] @@ -754,8 +759,8 @@ name = "elasticlunr-rs" version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -787,7 +792,7 @@ dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -799,7 +804,7 @@ dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -857,7 +862,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -872,7 +877,7 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crc32fast 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide_c_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -905,7 +910,7 @@ name = "fortanix-sgx-abi" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "compiler_builtins 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-std-workspace-core 1.0.0", ] @@ -914,7 +919,7 @@ name = "fs2" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -964,7 +969,7 @@ name = "fwdansi" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -978,8 +983,11 @@ dependencies = [ [[package]] name = "getopts" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "git2" @@ -987,11 +995,11 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "libgit2-sys 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1000,7 +1008,7 @@ name = "git2-curl" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "curl 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "curl 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)", "git2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1013,14 +1021,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "globset" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bstr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1032,12 +1040,12 @@ name = "handlebars" version = "0.32.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "pest_derive 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1047,17 +1055,27 @@ name = "handlebars" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "pest 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "hashbrown" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-std-workspace-alloc 1.0.0", + "rustc-std-workspace-core 1.0.0", +] + [[package]] name = "heck" version = "0.3.0" @@ -1128,19 +1146,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ignore" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "globset 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1159,7 +1177,7 @@ dependencies = [ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "tar 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1172,7 +1190,7 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1207,9 +1225,9 @@ name = "jemalloc-sys" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1217,7 +1235,7 @@ name = "jobserver" version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1255,7 +1273,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lazy_static" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1265,7 +1283,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.51" +version = "0.2.54" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rustc-std-workspace-core 1.0.0", @@ -1276,12 +1294,12 @@ name = "libgit2-sys" version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", - "curl-sys 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "curl-sys 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1290,8 +1308,8 @@ name = "libnghttp2-sys" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1299,10 +1317,10 @@ name = "libssh2-sys" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1312,8 +1330,8 @@ name = "libz-sys" version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1344,7 +1362,7 @@ name = "log_settings" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1359,7 +1377,7 @@ dependencies = [ [[package]] name = "lsp-types" -version = "0.55.4" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1377,9 +1395,9 @@ name = "lzma-sys" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1431,9 +1449,9 @@ dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "handlebars 0.32.4 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "open 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1459,12 +1477,12 @@ dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "handlebars 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "open 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1475,21 +1493,26 @@ dependencies = [ ] [[package]] -name = "memchr" -version = "2.1.1" +name = "measureme" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "memchr" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "memmap" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1500,7 +1523,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "minifier" -version = "0.0.29" +version = "0.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "macro-utils 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1511,8 +1534,8 @@ name = "miniz-sys" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1528,9 +1551,9 @@ name = "miniz_oxide_c_api" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1544,7 +1567,7 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1569,7 +1592,7 @@ version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1598,12 +1621,14 @@ name = "miri" version = "0.1.0" dependencies = [ "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cargo_metadata 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cargo_metadata 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "colored 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "compiletest_rs 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)", + "compiletest_rs 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "directories 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-workspace-hack 1.0.0", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "shell-escape 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1616,7 +1641,7 @@ version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1662,7 +1687,7 @@ name = "num_cpus" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1672,11 +1697,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "opener" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1688,9 +1711,9 @@ dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1703,18 +1726,19 @@ name = "openssl-src" version = "111.1.0+1.1.1a" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "openssl-sys" -version = "0.9.40" +version = "0.9.43" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-src 111.1.0+1.1.1a (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1748,9 +1772,9 @@ dependencies = [ name = "panic_abort" version = "0.0.0" dependencies = [ - "compiler_builtins 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1758,9 +1782,9 @@ name = "panic_unwind" version = "0.0.0" dependencies = [ "alloc 0.0.0", - "compiler_builtins 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "unwind 0.0.0", ] @@ -1778,7 +1802,7 @@ name = "parking_lot_core" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1894,7 +1918,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "polonius-engine" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "datafrog 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1942,8 +1966,8 @@ version = "0.0.0" name = "profiler_builtins" version = "0.0.0" dependencies = [ - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", - "compiler_builtins 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", ] @@ -1955,13 +1979,13 @@ dependencies = [ "bit-set 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "rusty-fork 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1972,16 +1996,18 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pulldown-cmark" -version = "0.2.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2009,7 +2035,7 @@ dependencies = [ [[package]] name = "racer" -version = "2.1.21" +version = "2.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2017,9 +2043,9 @@ dependencies = [ "derive_more 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-span 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-span 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-ap-syntax 407.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2029,7 +2055,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2040,7 +2066,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2113,8 +2139,8 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2149,7 +2175,7 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2157,12 +2183,12 @@ dependencies = [ [[package]] name = "regex" -version = "1.1.0" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2177,7 +2203,7 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.4" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2201,12 +2227,12 @@ dependencies = [ [[package]] name = "rls" -version = "1.35.0" +version = "1.36.0" dependencies = [ - "cargo 0.36.0", + "cargo 0.37.0", "cargo_metadata 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "clippy_lints 0.0.212", - "crossbeam-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2215,26 +2241,26 @@ dependencies = [ "home 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "lsp-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lsp-types 0.55.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lsp-types 0.57.0 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "ordslice 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "racer 2.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "racer 2.1.22 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-analysis 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-analysis 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", "rls-blacklist 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-data 0.18.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-data 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "rls-rustc 0.6.0", - "rls-span 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-vfs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-span 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-vfs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-workspace-hack 1.0.0", "rustc_tools_util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustfmt-nightly 1.2.0", + "rustfmt-nightly 1.2.2", "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)", "serde_ignored 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2250,7 +2276,7 @@ dependencies = [ [[package]] name = "rls-analysis" -version = "0.16.12" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "derive-new 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2258,9 +2284,10 @@ dependencies = [ "itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", "json 0.11.13 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-data 0.18.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-span 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-data 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-span 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2270,13 +2297,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "rls-data" -version = "0.18.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rls-span 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-span 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2285,21 +2310,19 @@ version = "0.6.0" [[package]] name = "rls-span" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rls-vfs" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-span 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-span 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2324,13 +2347,14 @@ dependencies = [ "fmt_macros 0.0.0", "graphviz 0.0.0", "jobserver 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "measureme 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "polonius-engine 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-rayon 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-rayon-core 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "polonius-engine 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-rayon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-rayon-core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_apfloat 0.0.0", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", @@ -2376,7 +2400,7 @@ dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "ena 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "jobserver 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-ap-graphviz 407.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2458,7 +2482,7 @@ name = "rustc-demangle" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "compiler_builtins 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-std-workspace-core 1.0.0", ] @@ -2490,14 +2514,35 @@ dependencies = [ "rustc-rayon-core 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rustc-rayon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-rayon-core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rustc-rayon-core" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustc-rayon-core" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2506,6 +2551,13 @@ name = "rustc-serialize" version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "rustc-std-workspace-alloc" +version = "1.0.0" +dependencies = [ + "alloc 0.0.0", +] + [[package]] name = "rustc-std-workspace-core" version = "1.0.0" @@ -2557,8 +2609,8 @@ version = "0.0.0" dependencies = [ "alloc 0.0.0", "build_helper 0.1.0", - "cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", - "compiler_builtins 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", + "compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", ] @@ -2580,7 +2632,7 @@ dependencies = [ name = "rustc_codegen_llvm" version = "0.0.0" dependencies = [ - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2592,9 +2644,9 @@ name = "rustc_codegen_ssa" version = "0.0.0" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "jobserver 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2613,6 +2665,7 @@ dependencies = [ "serialize 0.0.0", "syntax 0.0.0", "syntax_pos 0.0.0", + "tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2647,12 +2700,12 @@ dependencies = [ "ena 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "graphviz 0.0.0", "jobserver 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-rayon 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-rayon-core 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-rayon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-rayon-core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_cratesio_shim 0.0.0", "serialize 0.0.0", "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2668,7 +2721,7 @@ dependencies = [ "graphviz 0.0.0", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", - "rustc-rayon 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-rayon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_allocator 0.0.0", "rustc_borrowck 0.0.0", "rustc_codegen_utils 0.0.0", @@ -2734,9 +2787,10 @@ version = "0.0.0" dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", - "rustc-rayon 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-rayon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_allocator 0.0.0", "rustc_borrowck 0.0.0", + "rustc_codegen_ssa 0.0.0", "rustc_codegen_utils 0.0.0", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", @@ -2756,6 +2810,7 @@ dependencies = [ "syntax 0.0.0", "syntax_ext 0.0.0", "syntax_pos 0.0.0", + "tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2775,7 +2830,7 @@ name = "rustc_llvm" version = "0.0.0" dependencies = [ "build_helper 0.1.0", - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2784,8 +2839,8 @@ version = "0.0.0" dependencies = [ "alloc 0.0.0", "build_helper 0.1.0", - "cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", - "compiler_builtins 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", + "compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", ] @@ -2828,7 +2883,7 @@ dependencies = [ "graphviz 0.0.0", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "log_settings 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "polonius-engine 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "polonius-engine 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc_apfloat 0.0.0", "rustc_data_structures 0.0.0", @@ -2846,8 +2901,8 @@ version = "0.0.0" dependencies = [ "alloc 0.0.0", "build_helper 0.1.0", - "cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", - "compiler_builtins 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", + "compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", ] @@ -2899,6 +2954,7 @@ dependencies = [ "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", "rustc_metadata 0.0.0", + "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "syntax 0.0.0", "syntax_pos 0.0.0", ] @@ -2908,14 +2964,14 @@ name = "rustc_save_analysis" version = "0.0.0" dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-data 0.18.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-span 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-data 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-span 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_codegen_utils 0.0.0", "rustc_data_structures 0.0.0", "rustc_target 0.0.0", "rustc_typeck 0.0.0", + "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "syntax 0.0.0", "syntax_pos 0.0.0", ] @@ -2962,8 +3018,8 @@ version = "0.0.0" dependencies = [ "alloc 0.0.0", "build_helper 0.1.0", - "cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", - "compiler_builtins 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", + "compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", ] @@ -2994,9 +3050,9 @@ dependencies = [ name = "rustdoc" version = "0.0.0" dependencies = [ - "minifier 0.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "minifier 0.0.30 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pulldown-cmark 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3025,8 +3081,9 @@ dependencies = [ [[package]] name = "rustfmt-nightly" -version = "1.2.0" +version = "1.2.2" dependencies = [ + "annotate-snippets 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "bytecount 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "cargo_metadata 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3035,11 +3092,12 @@ dependencies = [ "dirs 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", + "ignore 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-ap-rustc_target 407.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-ap-syntax 407.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-ap-syntax_pos 407.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3048,7 +3106,7 @@ dependencies = [ "serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "term 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "unicode_categories 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3075,7 +3133,7 @@ name = "same-file" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3083,7 +3141,7 @@ name = "schannel" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3186,7 +3244,7 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arc-swap 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3213,7 +3271,7 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3229,12 +3287,13 @@ version = "0.0.0" dependencies = [ "alloc 0.0.0", "backtrace-sys 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", - "compiler_builtins 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", "dlmalloc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "fortanix-sgx-abi 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "hashbrown 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "panic_abort 0.0.0", "panic_unwind 0.0.0", "profiler_builtins 0.0.0", @@ -3252,7 +3311,7 @@ name = "string_cache" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "new_debug_unreachable 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "phf_shared 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)", "precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3343,9 +3402,11 @@ name = "syntax" version = "0.0.0" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", + "rustc_macros 0.1.0", "rustc_target 0.0.0", "scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serialize 0.0.0", @@ -3374,6 +3435,7 @@ dependencies = [ "arena 0.0.0", "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_data_structures 0.0.0", + "rustc_macros 0.1.0", "scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serialize 0.0.0", "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3385,7 +3447,7 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3396,7 +3458,7 @@ version = "3.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3448,7 +3510,7 @@ name = "termion" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3457,7 +3519,7 @@ dependencies = [ name = "test" version = "0.0.0" dependencies = [ - "getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "proc_macro 0.0.0", "term 0.0.0", ] @@ -3467,8 +3529,8 @@ name = "tester" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3485,15 +3547,15 @@ name = "thread_local" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tidy" version = "0.1.0" dependencies = [ + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3502,7 +3564,7 @@ name = "time" version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3553,7 +3615,7 @@ name = "tokio-executor" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3583,7 +3645,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-named-pipes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3597,9 +3659,9 @@ name = "tokio-reactor" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3615,7 +3677,7 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "signal-hook 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3643,9 +3705,9 @@ name = "tokio-threadpool" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3658,7 +3720,7 @@ name = "tokio-timer" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3686,7 +3748,7 @@ dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3718,7 +3780,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "is-match 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3730,8 +3792,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "is-match 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3750,6 +3812,14 @@ name = "ucd-util" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "unicase" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "unicode-bidi" version = "0.3.4" @@ -3808,10 +3878,10 @@ dependencies = [ name = "unwind" version = "0.0.0" dependencies = [ - "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", - "compiler_builtins 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3878,7 +3948,7 @@ name = "wait-timeout" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3888,7 +3958,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3917,7 +3987,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi-util" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3934,7 +4004,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3951,7 +4021,7 @@ name = "xattr" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3970,7 +4040,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" "checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e" +"checksum aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c" "checksum ammonia 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd4c682378117e4186a492b2252b9537990e1617f44aed9788b9a1149de45477" +"checksum annotate-snippets 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e8bcdcd5b291ce85a78f2b9d082a8de9676c12b1840d386d67bc5eea6f9d2b4e" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum arc-swap 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1025aeae2b664ca0ea726a89d574fe8f4e77dd712d443236ad1de00379450cf6" "checksum argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3f67b0b6a86dae6e67ff4ca2b6201396074996379fba2b92ff649126f37cb392" @@ -3985,6 +4057,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" "checksum block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a076c298b9ecdb530ed9d967e74a6027d6a7478924520acddcddc24c1c8ab3ab" +"checksum bstr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "853b090ce0f45d0265902666bf88039ea3da825e33796716c511a1ec9c170036" "checksum bufstream 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "40e38929add23cdf8a366df9b0e088953150724bcbe5fc330b0d8eb3b328eec8" "checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" "checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" @@ -3992,36 +4065,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d" "checksum bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "40ade3d27603c2cb345eb0912aec461a6dec7e06a4ae48589904e808335c7afa" "checksum bytesize 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "716960a18f978640f25101b5cbf1c6f6b0d3192fab36a2d98ca96f0ecbe41010" -"checksum cargo_metadata 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d8dfe3adeb30f7938e6c1dd5327f29235d8ada3e898aeb08c343005ec2915a2" "checksum cargo_metadata 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "585784cac9b05c93a53b17a0b24a5cdd1dfdda5256f030e089b549d2390cc720" -"checksum cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a8b715cb4597106ea87c7c84b2f1d452c7492033765df7f32651e66fcf749" +"checksum cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)" = "5e5f3fee5eeb60324c2781f1e41286bdee933850fff9b3c672587fed5ec58c83" "checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" "checksum chalk-engine 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17ec698a6f053a23bfbe646d9f2fde4b02abc19125595270a99e6f44ae0bdd1a" "checksum chalk-macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "295635afd6853aa9f20baeb7f0204862440c0fe994c5a253d5f479dac41d047e" "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" "checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "704fbf3bb5149daab0afb255dbea24a1f08d2f4099cedb9baab6d470d4c5eefb" +"checksum cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "96210eec534fc3fbfc0452a63769424eaa80205fda6cea98e5b61cb3d97bcec8" "checksum colored 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b0aa3473e85a3161b59845d6096b289bb577874cafeaf75ea1b1beaa6572c7fc" "checksum commoncrypto 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d056a8586ba25a1e4d61cb090900e495952c7886786fc55f909ab2f819b69007" "checksum commoncrypto-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1fed34f46747aa73dfaa578069fd8279d2818ade2b55f38f22a9401c7f4083e2" -"checksum compiler_builtins 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "d7de11892d9f9f1bc76d43011c8233d27d58300d629dc9dfb51b6626ef7f6077" -"checksum compiletest_rs 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)" = "17a60483b7d4d1534db7b77458a03d5d8a93a707432a04978dfe87ea43bb61b1" +"checksum compiler_builtins 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "e3f235c329e5cb9fa3d2ca2cc36256ba9a7f23fa76e0f4db6f68c23b73b2ac69" +"checksum compiletest_rs 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "f40ecc9332b68270998995c00f8051ee856121764a0d3230e64c9efd059d27b6" "checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e" "checksum core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4e2640d6d0bf22e82bed1b73c6aef8d5dd31e5abe6666c57e6d45e2649f4f887" "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" "checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" "checksum crc32fast 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e91d5240c6975ef33aeb5f148f35275c25eda8e8a5f95abe421978b05b8bf192" -"checksum crossbeam-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5b2a9ea8f77c7f9efd317a8a5645f515d903a2d86ee14d2337a5facd1bd52c12" +"checksum crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f0ed1a4de2235cabda8558ff5840bffb97fcb64c97827f354a451307df5f72b" "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" "checksum crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "05e44b8cf3e1a625844d1750e1f7820da46044ff6d28f4d43e455ba3e5bb2c13" "checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150" "checksum crossbeam-epoch 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f10a4f8f409aaac4b16a5474fb233624238fcdeefb9ba50d5ea059aab63ba31c" "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" -"checksum crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e07fc155212827475223f0bcfae57e945e694fc90950ddf3f6695bbfd5555c72" +"checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" "checksum crypto-hash 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "09de9ee0fc255ace04c7fa0763c9395a945c37c8292bb554f8d48361d1dcf1b4" -"checksum curl 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "c7c9d851c825e0c033979d4516c9173bc19a78a96eb4d6ae51d4045440eafa16" -"checksum curl-sys 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)" = "721c204978be2143fab0a84b708c49d79d1f6100b8785610f456043a90708870" +"checksum curl 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)" = "a85f2f95f2bd277d316d1aa8a477687ab4a6942258c7db7c89c187534669979c" +"checksum curl-sys 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)" = "9d91a0052d5b982887d8e829bee0faffc7218ea3c6ebd3d6c2c8f678a93c9a42" "checksum datafrog 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a0afaad2b26fa326569eb264b1363e8ae3357618c43982b3f285f0774ce76b69" "checksum derive-new 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6ca414e896ae072546f4d789f452daaecf60ddee4c9df5dc6d5936d769e3d87c" "checksum derive_more 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f57d78cf3bd45270dad4e70c21ec77a960b36c7a841ff9db76aaa775a8fb871" @@ -4058,13 +4130,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "1a70b146671de62ec8c8ed572219ca5d594d9b06c0b364d5e67b722fc559b48c" "checksum fwdansi 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "34dd4c507af68d37ffef962063dfa1944ce0dd4d5b82043dbab1dabe088610c3" "checksum generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef25c5683767570c2bbd7deba372926a55eaae9982d7726ee2a1050239d45b9d" -"checksum getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "b900c08c1939860ce8b54dc6a89e26e00c04c380fd0e09796799bd7f12861e05" +"checksum getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)" = "72327b15c228bfe31f1390f93dd5e9279587f0463836393c9df719ce62a3e450" "checksum git2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7339329bfa14a00223244311560d11f8f489b453fb90092af97f267a6090ab0" "checksum git2-curl 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d58551e903ed7e2d6fe3a2f3c7efa3a784ec29b19d0fbb035aaf0497c183fbdd" "checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" -"checksum globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4743617a7464bbda3c8aec8558ff2f9429047e025771037df561d383337ff865" +"checksum globset 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef4feaabe24a0a658fd9cf4a9acf6ed284f045c77df0f49020ba3245cfb7b454" "checksum handlebars 0.32.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d89ec99d1594f285d4590fc32bac5f75cdab383f1123d504d27862c644a807dd" "checksum handlebars 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d82e5750d8027a97b9640e3fefa66bbaf852a35228e1c90790efd13c4b09c166" +"checksum hashbrown 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9529213c67695ca2d146e6f263b7b72df8fa973368beadf767e8ed80c03f2f36" "checksum heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea04fa3ead4e05e51a7c806fc07271fdbde4e246a6c6d1efd52e72230b771b82" "checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" "checksum home 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "80dff82fb58cfbbc617fb9a9184b010be0529201553cda50ad04372bc2333aff" @@ -4073,7 +4146,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4bac95d9aa0624e7b78187d6fb8ab012b41d9f6f54b1bcb61e61c4845f8357ec" -"checksum ignore 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ad03ca67dc12474ecd91fdb94d758cbd20cb4e7a78ebe831df26a9b7511e1162" +"checksum ignore 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8dc57fa12805f367736a38541ac1a9fc6a52812a0ca959b1d4d4b640a89eb002" "checksum im-rc 12.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9460397452f537fd51808056ff209f4c4c4c9d20d42ae952f517708726284972" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum is-match 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7e5b386aef33a1c677be65237cb9d32c3f3ef56bd035949710c4bb13083eb053" @@ -4086,9 +4159,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a5152c3fda235dfd68341b3edf4121bc4428642c93acbd6de88c26bf95fc5d7" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" -"checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" +"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" -"checksum libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)" = "bedcc7a809076656486ffe045abeeac163da1b558e963a31e29fbfbeba916917" +"checksum libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)" = "c6785aa7dd976f5fbf3b71cfd9cd49d7f783c1ff565a858d71031c6c313aa5c6" "checksum libgit2-sys 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)" = "48441cb35dc255da8ae72825689a95368bf510659ae1ad55dc4aa88cb1789bf1" "checksum libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d75d7966bda4730b722d1eab8e668df445368a24394bae9fc1e8dc0ab3dbe4f4" "checksum libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "126a1f4078368b163bfdee65fbab072af08a1b374a5551b21e87ade27b1fbf9d" @@ -4097,7 +4170,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" "checksum log_settings 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19af41f0565d7c19b2058153ad0b42d4d5ce89ec4dbf06ed6741114a8b63e7cd" "checksum lsp-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "169d737ad89cf8ddd82d1804d9122f54568c49377665157277cc90d747b1d31a" -"checksum lsp-types 0.55.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6392b5843615b8a2adeebe87b83fdd29567c0870baba3407a67e6dbfee4712f8" +"checksum lsp-types 0.57.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d220de1fbbb12b60df17898272579c22329375fc4baa960402fbd17cf0cdd165" "checksum lzma-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d1eaa027402541975218bb0eec67d6b0412f6233af96e0d096d31dbdfd22e614" "checksum mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" "checksum macro-utils 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2c4deaccc2ead6a28c16c0ba82f07d52b6475397415ce40876e559b0b0ea510" @@ -4106,10 +4179,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum mdbook 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "90b5a8d7e341ceee5db3882a06078d42661ddcfa2b3687319cc5da76ec4e782f" "checksum mdbook 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0ba0d44cb4089c741b9a91f3e5218298a40699c2f3a070a85014eed290c60819" -"checksum memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a3eb002f0535929f1199681417029ebea04aadc0c7a4224b46be99c7f5d6a16" +"checksum measureme 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d09de7dafa3aa334bc806447c7e4de69419723312f4b88b80b561dea66601ce8" +"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" "checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" -"checksum minifier 0.0.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1f4950cb2617b1933e2da0446e864dfe0d6a22c22ff72297996c46e6a63b210b" +"checksum minifier 0.0.30 (registry+https://github.com/rust-lang/crates.io-index)" = "4c909e78edf61f3aa0dd2086da168cdf304329044bbf248768ca3d20253ec8c0" "checksum miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0300eafb20369952951699b68243ab4334f4b10a88f411c221d444b36c40e649" "checksum miniz_oxide 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ad30a47319c16cde58d0314f5d98202a80c9083b5f61178457403dfb14e509c" "checksum miniz_oxide_c_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "28edaef377517fd9fe3e085c37d892ce7acd1fbeab9239c5a36eec352d8a8b7e" @@ -4126,11 +4200,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" "checksum open 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c281318d992e4432cfa799969467003d05921582a7489a8325e37f8a450d5113" -"checksum opener 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "04b1d6b086d9b3009550f9b6f81b10ad9428cf14f404b8e1a3a06f6f012c8ec9" +"checksum opener 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "998c59e83d9474c01127a96e023b7a04bb061dd286bf8bb939d31dc8d31a7448" "checksum openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ec7bd7ca4cce6dbdc77e7c1230682740d307d1218a87fb0349a571272be749f9" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" "checksum openssl-src 111.1.0+1.1.1a (registry+https://github.com/rust-lang/crates.io-index)" = "26bb632127731bf4ac49bf86a5dde12d2ca0918c2234fc39d79d4da2ccbc6da7" -"checksum openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)" = "1bb974e77de925ef426b6bc82fce15fd45bdcbeb5728bffcfc7cdeeb7ce1c2d6" +"checksum openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)" = "33c86834957dd5b915623e94f2f4ab2c70dd8f6b70679824155d5ae21dbd495d" "checksum ordermap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a86ed3f5f244b372d6b1a00b72ef7f8876d0bc6a78a4c9985c53614041512063" "checksum ordslice 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dd20eec3dbe4376829cb7d80ae6ac45e0a766831dca50202ff2d40db46a8a024" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" @@ -4150,19 +4224,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum phf_generator 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)" = "05a079dd052e7b674d21cb31cbb6c05efd56a2cd2827db7692e2f1a507ebd998" "checksum phf_shared 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)" = "c2261d544c2bb6aa3b10022b0be371b9c7c64f762ef28c6f5d4f1ef6d97b5930" "checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" -"checksum polonius-engine 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2490c396085801abf88df91758bad806b0890354f0875d624e62ecf0579a8145" +"checksum polonius-engine 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8b24942fee141ea45628484a453762bb7e515099c3ec05fbeb76b7bf57b1aeed" "checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" "checksum pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a029430f0d744bc3d15dd474d591bed2402b645d024583082b9f63bb936dac6" "checksum pretty_env_logger 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df8b3f4e0475def7d9c2e5de8e5a1306949849761e107b360d03e98eafaffd61" "checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09" "checksum proptest 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24f5844db2f839e97e3021980975f6ebf8691d9b9b2ca67ed3feb38dc3edb52c" "checksum pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdf85cda6cadfae5428a54661d431330b312bc767ddbc57adbedc24da66e32" -"checksum pulldown-cmark 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eef52fac62d0ea7b9b4dc7da092aa64ea7ec3d90af6679422d3d7e0e14b6ee15" +"checksum pulldown-cmark 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "051e60ace841b3bfecd402fe5051c06cb3bec4a6e6fdd060a37aa8eb829a1db3" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" "checksum quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "07589615d719a60c8dd8a4622e7946465dfef20d1a428f969e3443e7386d5f45" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" "checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c" -"checksum racer 2.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "37c88638777cc178684cf648ca0e1dad56646ce105b8593dfe665c436300adc3" +"checksum racer 2.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "1e4323343f25bc372dc9293ac6b5cd3034b32784af1e7de9366b4db71466d8c7" "checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd" "checksum rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9d223d52ae411a33cf7e54ec6034ec165df296ccd23533d671a28252b6f66a" "checksum rand_chacha 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "771b009e3a508cb67e8823dda454aaa5368c7bc1c16829fb77d3e980440dd34a" @@ -4177,15 +4251,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum redox_users 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "214a97e49be64fd2c86f568dd0cb2c757d2cc53de95b273b6ad0a1c908482f26" "checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" -"checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f" +"checksum regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8f0a0bcab2fd7d1d7c54fa9eae6f43eddeb9ce2e7352f8518a814a4f65d60c58" "checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" -"checksum regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4e47a2ed29da7a9e1960e1639e7a982e6edc6d49be308a3b02daf511504a16d1" +"checksum regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dcfd8681eebe297b81d98498869d4aae052137651ad7b96822f09ceb690d0a96" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" -"checksum rls-analysis 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)" = "ae18d8ad01dec3b2014f4d7ae3c607d7adbcff79e5d3b48ea42ea71c10d43a71" +"checksum rls-analysis 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d53d49a28f75da9d02790d9256fecf6c0481e0871374326023c7a33131295579" "checksum rls-blacklist 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b8ce1fdac03e138c4617ff87b194e1ff57a39bb985a044ccbd8673d30701e411" -"checksum rls-data 0.18.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5f80b84551b32e26affaf7f12374913b5061730c0dcd185d9e8fa5a15e36e65c" -"checksum rls-span 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "33d66f1d6c6ccd5c98029f162544131698f6ebb61d8c697681cac409dcd08805" -"checksum rls-vfs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "72d56425bd5aa86d9d4372b76f0381d3b4bda9c0220e71956c9fcc929f45c1f1" +"checksum rls-data 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "76c72ea97e045be5f6290bb157ebdc5ee9f2b093831ff72adfaf59025cf5c491" +"checksum rls-span 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f1cb4694410d8d2ce43ccff3682f1c782158a018d5a9a92185675677f7533eb3" +"checksum rls-vfs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce4b57b25b4330ed5ec14028fc02141e083ddafda327e7eb598dc0569c8c83c9" "checksum rustc-ap-arena 407.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5aab2fb5e5becf1c9183f6c63b8714817a3e780a20b4fe6b3920751c98a18225" "checksum rustc-ap-graphviz 407.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0235ff613d4f96176ea56748010b5d8e978605cc47856ba9bb5372f4f38e9c03" "checksum rustc-ap-rustc_cratesio_shim 407.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "63e04a90b0dd8597da83633961698c61a2948f50c9d4b9a71e8afafc0ba0f158" @@ -4198,7 +4272,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rustc-demangle 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "82ae957aa1b3055d8e086486723c0ccd3d7b8fa190ae8fa2e35543b6171c810e" "checksum rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" "checksum rustc-rayon 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8d98c51d9cbbe810c8b6693236d3412d8cd60513ff27a3e1b6af483dca0af544" +"checksum rustc-rayon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0d2e07e19601f21c59aad953c2632172ba70cb27e685771514ea66e4062b3363" "checksum rustc-rayon-core 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "526e7b6d2707a5b9bec3927d424ad70fa3cfc68e0ac1b75e46cdbbc95adc5108" +"checksum rustc-rayon-core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "79d38ca7cbc22fa59f09d8534ea4b27f67b0facf0cbe274433aceea227a02543" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" "checksum rustc_tools_util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c5a95edfa0c893236ae4778bb7c4752760e4c0d245e19b5eff33c5aa5eb9dc" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" @@ -4267,6 +4343,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" "checksum ucd-trie 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "71a9c5b1fe77426cf144cc30e49e955270f5086e31a6441dfa8b32efc09b9d77" "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" +"checksum unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a84e5511b2a947f3ae965dcb29b13b7b1691b6e7332cf5dbc1744138d5acb7f6" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25" "checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" @@ -4290,7 +4367,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "afc5508759c5bf4285e61feb862b6083c8480aec864fa17a81fdec6f69b461ab" +"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" diff --git a/Cargo.toml b/Cargo.toml index cb3c0ee194..ccd7e8b765 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,6 +67,7 @@ rustc-workspace-hack = { path = 'src/tools/rustc-workspace-hack' } # See comments in `tools/rustc-std-workspace-core/README.md` for what's going on # here rustc-std-workspace-core = { path = 'src/tools/rustc-std-workspace-core' } +rustc-std-workspace-alloc = { path = 'src/tools/rustc-std-workspace-alloc' } [patch."https://github.com/rust-lang/rust-clippy"] clippy_lints = { path = "src/tools/clippy/clippy_lints" } diff --git a/README.md b/README.md index 55e6e8d7f1..75d7823490 100644 --- a/README.md +++ b/README.md @@ -128,9 +128,15 @@ build. #### MSVC [windows-msvc]: #windows-msvc -MSVC builds of Rust additionally require an installation of Visual Studio 2013 -(or later) so `rustc` can use its linker. Make sure to check the “C++ tools” -option. +MSVC builds of Rust additionally require an installation of Visual Studio 2017 +(or later) so `rustc` can use its linker. The simplest way is to get the +[Visual Studio Build Tools] and check the “C++ build tools” workload. + +[Visual Studio Build Tools]: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019 + +At last check (cmake 3.14.3 and msvc 16.0.3) using the 2019 tools fails to +build the in-tree LLVM build with a CMake error, so use 2017 instead by +including the “MSVC v141 – VS 2017 C++ x64/x86 build tools (v14.16)” component. With these dependencies installed, you can build the compiler in a `cmd.exe` shell with: @@ -261,3 +267,19 @@ BSD-like licenses. See [LICENSE-APACHE](LICENSE-APACHE), [LICENSE-MIT](LICENSE-MIT), and [COPYRIGHT](COPYRIGHT) for details. + +## Trademark +[trademark]: #trademark + +The Rust programming language is an open source, community project governed +by a core team. It is also sponsored by the Mozilla Foundation (“Mozilla”), +which owns and protects the Rust and Cargo trademarks and logos +(the “Rust Trademarks”). + +If you want to use these names or brands, please read the [media guide][media-guide]. + +Third-party logos may be subject to third-party copyrights and trademarks. See +[Licenses][policies-licenses] for details. + +[media-guide]: https://www.rust-lang.org/policies/media-guide +[policies-licenses]: https://www.rust-lang.org/policies/licenses diff --git a/RELEASES.md b/RELEASES.md index 4185961187..fcf42b5fcb 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,107 @@ +Version 1.36.0 (2019-07-04) +========================== + +Language +-------- +- [Non-Lexical Lifetimes are now enabled on the 2015 edition.][59114] +- [The order of traits in trait objects no longer affects the semantics of that + object.][59445] e.g. `dyn Send + fmt::Debug` is now equivalent to + `dyn fmt::Debug + Send`, where this was previously not the case. + +Libraries +--------- +- [`HashMap`'s implementation has been replaced with `hashbrown::HashMap` implementation.][58623] +- [`TryFromSliceError` now implements `From`.][60318] +- [`mem::needs_drop` is now available as a const fn.][60364] +- [`alloc::Layout::from_size_align_unchecked` is now available as a const fn.][60370] +- [`String` now implements `BorrowMut`.][60404] +- [`io::Cursor` now implements `Default`.][60234] +- [Both `NonNull::{dangling, cast}` are now const fns.][60244] +- [The `alloc` crate is now stable.][59675] `alloc` allows you to use a subset + of `std` (e.g. `Vec`, `Box`, `Arc`) in `#![no_std]` environments if the + environment has access to heap memory allocation. +- [`String` now implements `From<&String>`.][59825] +- [You can now pass multiple arguments to the `dbg!` macro.][59826] `dbg!` will + return a tuple of each argument when there is multiple arguments. +- [`Result::{is_err, is_ok}` are now `#[must_use]` and will produce a warning if + not used.][59648] + +Stabilized APIs +--------------- +- [`VecDeque::rotate_left`] +- [`VecDeque::rotate_right`] +- [`Iterator::copied`] +- [`io::IoSlice`] +- [`io::IoSliceMut`] +- [`Read::read_vectored`] +- [`Write::write_vectored`] +- [`str::as_mut_ptr`] +- [`mem::MaybeUninit`] +- [`pointer::align_offset`] +- [`future::Future`] +- [`task::Context`] +- [`task::RawWaker`] +- [`task::RawWakerVTable`] +- [`task::Waker`] +- [`task::Poll`] + +Cargo +----- +- [Cargo will now produce an error if you attempt to use the name of a required dependency as a feature.][cargo/6860] +- [You can now pass the `--offline` flag to run cargo without accessing the network.][cargo/6934] + +You can find further change's in [Cargo's 1.36.0 release notes][cargo-1-36-0]. + +Clippy +------ +There have been numerous additions and fixes to clippy, see [Clippy's 1.36.0 release notes][clippy-1-36-0] for more details. + +Misc +---- + +Compatibility Notes +------------------- +- [`std::arch::x86::_rdtsc` returns `u64` instead of `i64`][stdsimd/559] +- [`std::arch::x86_64::_mm_shuffle_ps` takes an `i32` instead of `u32` for `mask`][stdsimd/522] +- With the stabilisation of `mem::MaybeUninit`, `mem::uninitialized` use is no + longer recommended, and will be deprecated in 1.38.0. + +[60318]: https://github.com/rust-lang/rust/pull/60318/ +[60364]: https://github.com/rust-lang/rust/pull/60364/ +[60370]: https://github.com/rust-lang/rust/pull/60370/ +[60404]: https://github.com/rust-lang/rust/pull/60404/ +[60234]: https://github.com/rust-lang/rust/pull/60234/ +[60244]: https://github.com/rust-lang/rust/pull/60244/ +[58623]: https://github.com/rust-lang/rust/pull/58623/ +[59648]: https://github.com/rust-lang/rust/pull/59648/ +[59675]: https://github.com/rust-lang/rust/pull/59675/ +[59825]: https://github.com/rust-lang/rust/pull/59825/ +[59826]: https://github.com/rust-lang/rust/pull/59826/ +[59445]: https://github.com/rust-lang/rust/pull/59445/ +[59114]: https://github.com/rust-lang/rust/pull/59114/ +[cargo/6860]: https://github.com/rust-lang/cargo/pull/6860/ +[cargo/6934]: https://github.com/rust-lang/cargo/pull/6934/ +[`VecDeque::rotate_left`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.rotate_left +[`VecDeque::rotate_right`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.rotate_right +[`Iterator::copied`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#tymethod.copied +[`io::IoSlice`]: https://doc.rust-lang.org/std/io/struct.IoSlice.html +[`io::IoSliceMut`]: https://doc.rust-lang.org/std/io/struct.IoSliceMut.html +[`Read::read_vectored`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_vectored +[`Write::write_vectored`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_vectored +[`str::as_mut_ptr`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_mut_ptr +[`mem::MaybeUninit`]: https://doc.rust-lang.org/std/mem/union.MaybeUninit.html +[`pointer::align_offset`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.align_offset +[`future::Future`]: https://doc.rust-lang.org/std/future/trait.Future.html +[`task::Context`]: https://doc.rust-lang.org/beta/std/task/struct.Context.html +[`task::RawWaker`]: https://doc.rust-lang.org/beta/std/task/struct.RawWaker.html +[`task::RawWakerVTable`]: https://doc.rust-lang.org/beta/std/task/struct.RawWakerVTable.html +[`task::Waker`]: https://doc.rust-lang.org/beta/std/task/struct.Waker.html +[`task::Poll`]: https://doc.rust-lang.org/beta/std/task/enum.Poll.html +[clippy-1-36-0]: https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-136 +[cargo-1-36-0]: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-136-2019-07-04 +[stdsimd/522]: https://github.com/rust-lang-nursery/stdsimd/issues/522 +[stdsimd/559]: https://github.com/rust-lang-nursery/stdsimd/issues/559 + Version 1.35.0 (2019-05-23) ========================== @@ -62,7 +166,7 @@ Cargo - [You can now set `cargo:rustc-cdylib-link-arg` at build time to pass custom linker arguments when building a `cdylib`.][cargo/6298] Its usage is highly platform specific. - + Misc ---- - [The Rust toolchain is now available natively for musl based distros.][58575] diff --git a/config.toml.example b/config.toml.example index 8b2153cd2e..556625b531 100644 --- a/config.toml.example +++ b/config.toml.example @@ -480,7 +480,7 @@ # linked binaries #musl-root = "..." -# The root location of the `wasm32-unknown-wasi` sysroot. +# The root location of the `wasm32-wasi` sysroot. #wasi-root = "..." # Used in testing for configuring where the QEMU images are located, you diff --git a/git-commit-hash b/git-commit-hash index c442996fb9..aab6c2dea5 100644 --- a/git-commit-hash +++ b/git-commit-hash @@ -1 +1 @@ -3c235d5600393dfe6c36eeed34042efad8d4f26e \ No newline at end of file +a53f9df32fbb0b5f4382caaad8f1a46f36ea887c \ No newline at end of file diff --git a/src/bootstrap/Cargo.toml b/src/bootstrap/Cargo.toml index 0f7b6c22e1..589ee9276a 100644 --- a/src/bootstrap/Cargo.toml +++ b/src/bootstrap/Cargo.toml @@ -36,17 +36,16 @@ test = false [dependencies] build_helper = { path = "../build_helper" } -cmake = "0.1.23" +cmake = "0.1.38" filetime = "0.2" num_cpus = "1.0" -getopts = "0.2" -cc = "1.0.1" +getopts = "0.2.19" +cc = "1.0.35" libc = "0.2" -serde = "1.0.8" -serde_derive = "1.0.8" +serde = { version = "1.0.8", features = ["derive"] } serde_json = "1.0.2" toml = "0.4" -lazy_static = "0.2" +lazy_static = "1.3.0" time = "0.1" petgraph = "0.4.13" diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index a76584093f..821c37dc23 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -262,6 +262,7 @@ fn main() { // The flags here should be kept in sync with `add_miri_default_args` // in miri's `src/lib.rs`. cmd.arg("-Zalways-encode-mir"); + cmd.arg("--cfg=miri"); // These options are preferred by miri, to be able to perform better validation, // but the bootstrap compiler might not understand them. if stage != "0" { @@ -290,9 +291,7 @@ fn main() { } // This is required for internal lints. - if stage != "0" { - cmd.arg("-Zunstable-options"); - } + cmd.arg("-Zunstable-options"); // Force all crates compiled by this compiler to (a) be unstable and (b) // allow the `rustc_private` feature to link to other unstable crates @@ -310,6 +309,7 @@ fn main() { { cmd.arg("-Dwarnings"); cmd.arg("-Dbare_trait_objects"); + cmd.arg("-Drust_2018_idioms"); } if verbose > 1 { diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 8af7aa4856..1c2b882f66 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -177,7 +177,6 @@ def default_build_triple(): # The goal here is to come up with the same triple as LLVM would, # at least for the subset of platforms we're willing to target. ostype_mapper = { - 'Bitrig': 'unknown-bitrig', 'Darwin': 'apple-darwin', 'DragonFly': 'unknown-dragonfly', 'FreeBSD': 'unknown-freebsd', @@ -677,9 +676,15 @@ class RustBuild(object): run(["git", "submodule", "-q", "sync", module], cwd=self.rust_root, verbose=self.verbose) - run(["git", "submodule", "update", - "--init", "--recursive", "--progress", module], - cwd=self.rust_root, verbose=self.verbose) + try: + run(["git", "submodule", "update", + "--init", "--recursive", "--progress", module], + cwd=self.rust_root, verbose=self.verbose, exception=True) + except RuntimeError: + # Some versions of git don't support --progress. + run(["git", "submodule", "update", + "--init", "--recursive", module], + cwd=self.rust_root, verbose=self.verbose) run(["git", "reset", "-q", "--hard"], cwd=module_path, verbose=self.verbose) run(["git", "clean", "-qdfx"], diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 522466314d..51663e9316 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -11,6 +11,8 @@ use std::path::{Path, PathBuf}; use std::process::Command; use std::time::{Duration, Instant}; +use build_helper::t; + use crate::cache::{Cache, Interned, INTERNER}; use crate::check; use crate::compile; @@ -853,14 +855,30 @@ impl<'a> Builder<'a> { // FIXME: Temporary fix for https://github.com/rust-lang/cargo/issues/3005 // Force cargo to output binaries with disambiguating hashes in the name - let metadata = if compiler.stage == 0 { - // Treat stage0 like special channel, whether it's a normal prior- + let mut metadata = if compiler.stage == 0 { + // Treat stage0 like a special channel, whether it's a normal prior- // release rustc or a local rebuild with the same version, so we // never mix these libraries by accident. - "bootstrap" + "bootstrap".to_string() } else { - &self.config.channel + self.config.channel.to_string() }; + // We want to make sure that none of the dependencies between + // std/test/rustc unify with one another. This is done for weird linkage + // reasons but the gist of the problem is that if librustc, libtest, and + // libstd all depend on libc from crates.io (which they actually do) we + // want to make sure they all get distinct versions. Things get really + // weird if we try to unify all these dependencies right now, namely + // around how many times the library is linked in dynamic libraries and + // such. If rustc were a static executable or if we didn't ship dylibs + // this wouldn't be a problem, but we do, so it is. This is in general + // just here to make sure things build right. If you can remove this and + // things still build right, please do! + match mode { + Mode::Std => metadata.push_str("std"), + Mode::Test => metadata.push_str("test"), + _ => {}, + } cargo.env("__CARGO_DEFAULT_LIB_METADATA", &metadata); let stage; @@ -1292,6 +1310,8 @@ mod __test { use crate::config::Config; use std::thread; + use pretty_assertions::assert_eq; + fn configure(host: &[&str], target: &[&str]) -> Config { let mut config = Config::default_opts(); // don't save toolstates diff --git a/src/bootstrap/cache.rs b/src/bootstrap/cache.rs index 239959682c..f137a7b8cc 100644 --- a/src/bootstrap/cache.rs +++ b/src/bootstrap/cache.rs @@ -13,6 +13,8 @@ use std::path::{Path, PathBuf}; use std::sync::Mutex; use std::cmp::{PartialOrd, Ord, Ordering}; +use lazy_static::lazy_static; + use crate::builder::Step; pub struct Interned(usize, PhantomData<*const T>); diff --git a/src/bootstrap/channel.rs b/src/bootstrap/channel.rs index e42b073322..a6da4f5385 100644 --- a/src/bootstrap/channel.rs +++ b/src/bootstrap/channel.rs @@ -13,7 +13,7 @@ use build_helper::output; use crate::Build; // The version number -pub const CFG_RELEASE_NUM: &str = "1.35.0"; +pub const CFG_RELEASE_NUM: &str = "1.36.0"; pub struct GitInfo { inner: Option, diff --git a/src/bootstrap/clean.rs b/src/bootstrap/clean.rs index b52e1a7b0e..73be8bfed8 100644 --- a/src/bootstrap/clean.rs +++ b/src/bootstrap/clean.rs @@ -9,6 +9,8 @@ use std::fs; use std::io::{self, ErrorKind}; use std::path::Path; +use build_helper::t; + use crate::Build; pub fn clean(build: &Build, all: bool) { diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 66443d472d..e1cdd226fd 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -15,8 +15,9 @@ use std::path::{Path, PathBuf}; use std::process::{Command, Stdio, exit}; use std::str; -use build_helper::{output, mtime, up_to_date}; +use build_helper::{output, mtime, t, up_to_date}; use filetime::FileTime; +use serde::Deserialize; use serde_json; use crate::dist; @@ -167,7 +168,7 @@ pub fn std_cargo(builder: &Builder<'_>, .arg("--manifest-path") .arg(builder.src.join("src/liballoc/Cargo.toml")) .arg("--features") - .arg("compiler-builtins-mem"); + .arg("compiler-builtins-mem compiler-builtins-c"); } else { let features = builder.std_features(); diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 0c31c41ced..b1d009a674 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -10,8 +10,10 @@ use std::path::{Path, PathBuf}; use std::process; use std::cmp; +use build_helper::t; use num_cpus; use toml; +use serde::Deserialize; use crate::cache::{INTERNER, Interned}; use crate::flags::Flags; pub use crate::flags::Subcommand; diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 61a7705bd6..b0616ff669 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -14,7 +14,7 @@ use std::io::Write; use std::path::{PathBuf, Path}; use std::process::{Command, Stdio}; -use build_helper::output; +use build_helper::{output, t}; use crate::{Compiler, Mode, LLVM_TOOLS}; use crate::channel; @@ -906,6 +906,7 @@ impl Step for Src { "src/stdsimd", "src/libproc_macro", "src/tools/rustc-std-workspace-core", + "src/tools/rustc-std-workspace-alloc", "src/librustc", "src/libsyntax", ]; diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index d831d2f1af..9c3a17bff6 100644 --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs @@ -13,7 +13,7 @@ use std::io; use std::path::{PathBuf, Path}; use crate::Mode; -use build_helper::up_to_date; +use build_helper::{t, up_to_date}; use crate::util::symlink_dir; use crate::builder::{Builder, Compiler, RunConfig, ShouldRun, Step}; @@ -277,7 +277,7 @@ impl Step for TheBook { builder.ensure(Rustbook { target, name: INTERNER.intern_string(name.to_string()), - version: RustbookVersion::MdBook1, + version: RustbookVersion::MdBook2, }); // building older edition redirects @@ -286,21 +286,21 @@ impl Step for TheBook { builder.ensure(Rustbook { target, name: INTERNER.intern_string(source_name), - version: RustbookVersion::MdBook1, + version: RustbookVersion::MdBook2, }); let source_name = format!("{}/second-edition", name); builder.ensure(Rustbook { target, name: INTERNER.intern_string(source_name), - version: RustbookVersion::MdBook1, + version: RustbookVersion::MdBook2, }); let source_name = format!("{}/2018-edition", name); builder.ensure(Rustbook { target, name: INTERNER.intern_string(source_name), - version: RustbookVersion::MdBook1, + version: RustbookVersion::MdBook2, }); // build the version info page and CSS diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs index 2d040d60e5..deda30b6bb 100644 --- a/src/bootstrap/install.rs +++ b/src/bootstrap/install.rs @@ -8,6 +8,8 @@ use std::fs; use std::path::{Path, PathBuf, Component}; use std::process::Command; +use build_helper::t; + use crate::dist::{self, pkgname, sanitize_sh, tmpdir}; use crate::builder::{Builder, RunConfig, ShouldRun, Step}; diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index fb60b470a3..ca4489655c 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -108,17 +108,6 @@ #![feature(core_intrinsics)] #![feature(drain_filter)] -#[macro_use] -extern crate build_helper; -#[macro_use] -extern crate serde_derive; -#[macro_use] -extern crate lazy_static; - -#[cfg(test)] -#[macro_use] -extern crate pretty_assertions; - use std::cell::{RefCell, Cell}; use std::collections::{HashSet, HashMap}; use std::env; @@ -134,7 +123,9 @@ use std::os::unix::fs::symlink as symlink_file; #[cfg(windows)] use std::os::windows::fs::symlink_file; -use build_helper::{run_silent, run_suppressed, try_run_silent, try_run_suppressed, output, mtime}; +use build_helper::{ + mtime, output, run_silent, run_suppressed, t, try_run_silent, try_run_suppressed, +}; use filetime::FileTime; use crate::util::{exe, libdir, OutputFolder, CiEnv}; @@ -1049,7 +1040,7 @@ impl Build { } fn llvm_tools_package_vers(&self) -> String { - self.package_vers(&self.rust_version()) + self.package_vers(channel::CFG_RELEASE_NUM) } fn llvm_tools_vers(&self) -> String { @@ -1057,7 +1048,7 @@ impl Build { } fn lldb_package_vers(&self) -> String { - self.package_vers(&self.rust_version()) + self.package_vers(channel::CFG_RELEASE_NUM) } fn lldb_vers(&self) -> String { diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs index 7fa377f310..4a71fd2ce0 100644 --- a/src/bootstrap/metadata.rs +++ b/src/bootstrap/metadata.rs @@ -4,6 +4,7 @@ use std::path::PathBuf; use std::collections::HashSet; use build_helper::output; +use serde::Deserialize; use serde_json; use crate::{Build, Crate}; diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index fde40b0d1b..da2e03a1a0 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -14,7 +14,7 @@ use std::fs::{self, File}; use std::path::{Path, PathBuf}; use std::process::Command; -use build_helper::output; +use build_helper::{output, t}; use cmake; use cc; @@ -156,8 +156,10 @@ impl Step for Llvm { .define("LLVM_DEFAULT_TARGET_TRIPLE", target); if builder.config.llvm_thin_lto && !emscripten { - cfg.define("LLVM_ENABLE_LTO", "Thin") - .define("LLVM_ENABLE_LLD", "ON"); + cfg.define("LLVM_ENABLE_LTO", "Thin"); + if !target.contains("apple") { + cfg.define("LLVM_ENABLE_LLD", "ON"); + } } // By default, LLVM will automatically find OCaml and, if it finds it, @@ -315,6 +317,10 @@ fn check_llvm_version(builder: &Builder<'_>, llvm_config: &Path) { fn configure_cmake(builder: &Builder<'_>, target: Interned, cfg: &mut cmake::Config) { + // Do not print installation messages for up-to-date files. + // LLVM and LLD builds can produce a lot of those and hit CI limits on log size. + cfg.define("CMAKE_INSTALL_MESSAGE", "LAZY"); + if builder.config.ninja { cfg.generator("Ninja"); } @@ -434,7 +440,7 @@ fn configure_cmake(builder: &Builder<'_>, } if env::var_os("SCCACHE_ERROR_LOG").is_some() { - cfg.env("RUST_LOG", "sccache=warn"); + cfg.env("RUSTC_LOG", "sccache=warn"); } } diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs index b9f456e910..dc65fb9b79 100644 --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -15,7 +15,7 @@ use std::fs; use std::path::PathBuf; use std::process::Command; -use build_helper::output; +use build_helper::{output, t}; use crate::Build; @@ -131,6 +131,11 @@ pub fn check(build: &mut Build) { continue; } + // We don't use a C compiler on wasm32 + if target.contains("wasm32") { + continue; + } + if !build.config.dry_run { cmd_finder.must_have(build.cc(*target)); if let Some(ar) = build.ar(*target) { diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 881bea5d97..be0af8be7b 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -11,7 +11,7 @@ use std::iter; use std::path::{Path, PathBuf}; use std::process::Command; -use build_helper::{self, output}; +use build_helper::{self, output, t}; use crate::builder::{Builder, Compiler, Kind, RunConfig, ShouldRun, Step}; use crate::cache::{Interned, INTERNER}; @@ -683,7 +683,7 @@ impl Step for RustdocUi { target: self.target, mode: "ui", suite: "rustdoc-ui", - path: None, + path: Some("src/test/rustdoc-ui"), compare_mode: None, }) } @@ -1016,7 +1016,10 @@ impl Step for Compiletest { // Also provide `rust_test_helpers` for the host. builder.ensure(native::TestHelpers { target: compiler.host }); - builder.ensure(native::TestHelpers { target }); + // wasm32 can't build the test helpers + if !target.contains("wasm32") { + builder.ensure(native::TestHelpers { target }); + } builder.ensure(RemoteCopyLibs { compiler, target }); let mut cmd = builder.tool_cmd(Tool::Compiletest); @@ -1181,8 +1184,19 @@ impl Step for Compiletest { Err(_) => p, } }) - .filter(|p| p.starts_with(suite_path) && p.is_file()) - .map(|p| p.strip_prefix(suite_path).unwrap().to_str().unwrap()) + .filter(|p| p.starts_with(suite_path) && (p.is_dir() || p.is_file())) + .filter_map(|p| { + // Since test suite paths are themselves directories, if we don't + // specify a directory or file, we'll get an empty string here + // (the result of the test suite directory without its suite prefix). + // Therefore, we need to filter these out, as only the first --test-args + // flag is respected, so providing an empty --test-args conflicts with + // any following it. + match p.strip_prefix(suite_path).ok().and_then(|p| p.to_str()) { + Some(s) if s != "" => Some(s), + _ => None, + } + }) .collect(); test_args.append(&mut builder.config.cmd.test_args()); @@ -1228,6 +1242,28 @@ impl Step for Compiletest { if let Some(ar) = builder.ar(target) { cmd.arg("--ar").arg(ar); } + + // The llvm/bin directory contains many useful cross-platform + // tools. Pass the path to run-make tests so they can use them. + let llvm_bin_path = llvm_config.parent() + .expect("Expected llvm-config to be contained in directory"); + assert!(llvm_bin_path.is_dir()); + cmd.arg("--llvm-bin-dir").arg(llvm_bin_path); + + // If LLD is available, add it to the PATH + if builder.config.lld_enabled { + let lld_install_root = builder.ensure(native::Lld { + target: builder.config.build, + }); + + let lld_bin_path = lld_install_root.join("bin"); + + let old_path = env::var_os("PATH").unwrap_or_default(); + let new_path = env::join_paths(std::iter::once(lld_bin_path) + .chain(env::split_paths(&old_path))) + .expect("Could not add LLD bin path to PATH"); + cmd.env("PATH", new_path); + } } } @@ -1265,11 +1301,11 @@ impl Step for Compiletest { builder.add_rust_test_threads(&mut cmd); if builder.config.sanitizers { - cmd.env("SANITIZER_SUPPORT", "1"); + cmd.env("RUSTC_SANITIZER_SUPPORT", "1"); } if builder.config.profiler { - cmd.env("PROFILER_SUPPORT", "1"); + cmd.env("RUSTC_PROFILER_SUPPORT", "1"); } cmd.env("RUST_TEST_TMPDIR", builder.out.join("tmp")); @@ -1845,6 +1881,10 @@ impl Step for CrateRustdoc { cargo.arg("--"); cargo.args(&builder.config.cmd.test_args()); + if self.host.contains("musl") { + cargo.arg("'-Ctarget-feature=-crt-static'"); + } + if !builder.config.verbose_tests { cargo.arg("--quiet"); } diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index 23775a91e4..edcd68d010 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -4,12 +4,13 @@ use std::path::PathBuf; use std::process::{Command, exit}; use std::collections::HashSet; +use build_helper::t; + use crate::Mode; use crate::Compiler; use crate::builder::{Step, RunConfig, ShouldRun, Builder}; use crate::util::{exe, add_lib_path}; use crate::compile; -use crate::native; use crate::channel::GitInfo; use crate::channel; use crate::cache::Interned; @@ -698,56 +699,6 @@ impl<'a> Builder<'a> { } } - // Add the llvm/bin directory to PATH since it contains lots of - // useful, platform-independent tools - if tool.uses_llvm_tools() && !self.config.dry_run { - let mut additional_paths = vec![]; - - if let Some(llvm_bin_path) = self.llvm_bin_path() { - additional_paths.push(llvm_bin_path); - } - - // If LLD is available, add that too. - if self.config.lld_enabled { - let lld_install_root = self.ensure(native::Lld { - target: self.config.build, - }); - - let lld_bin_path = lld_install_root.join("bin"); - additional_paths.push(lld_bin_path); - } - - if host.contains("windows") { - // On Windows, PATH and the dynamic library path are the same, - // so we just add the LLVM bin path to lib_path - lib_paths.extend(additional_paths); - } else { - let old_path = env::var_os("PATH").unwrap_or_default(); - let new_path = env::join_paths(additional_paths.into_iter() - .chain(env::split_paths(&old_path))) - .expect("Could not add LLVM bin path to PATH"); - cmd.env("PATH", new_path); - } - } - add_lib_path(lib_paths, cmd); } - - fn llvm_bin_path(&self) -> Option { - if self.config.llvm_enabled() { - let llvm_config = self.ensure(native::Llvm { - target: self.config.build, - emscripten: false, - }); - - // Add the llvm/bin directory to PATH since it contains lots of - // useful, platform-independent tools - let llvm_bin_path = llvm_config.parent() - .expect("Expected llvm-config to be contained in directory"); - assert!(llvm_bin_path.is_dir()); - Some(llvm_bin_path.to_path_buf()) - } else { - None - } - } } diff --git a/src/bootstrap/toolstate.rs b/src/bootstrap/toolstate.rs index 8ff7c09fc2..e86209be91 100644 --- a/src/bootstrap/toolstate.rs +++ b/src/bootstrap/toolstate.rs @@ -1,3 +1,5 @@ +use serde::{Deserialize, Serialize}; + #[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] #[serde(rename_all = "kebab-case")] /// Whether a tool can be compiled, tested or neither diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs index bda1e56e1e..a162c65672 100644 --- a/src/bootstrap/util.rs +++ b/src/bootstrap/util.rs @@ -11,6 +11,8 @@ use std::path::{Path, PathBuf}; use std::process::Command; use std::time::{SystemTime, Instant}; +use build_helper::t; + use crate::config::Config; use crate::builder::Builder; diff --git a/src/build_helper/lib.rs b/src/build_helper/lib.rs index bd99dc118e..60911d9178 100644 --- a/src/build_helper/lib.rs +++ b/src/build_helper/lib.rs @@ -113,7 +113,7 @@ pub fn gnu_target(target: &str) -> &str { } pub fn make(host: &str) -> PathBuf { - if host.contains("bitrig") || host.contains("dragonfly") || host.contains("freebsd") + if host.contains("dragonfly") || host.contains("freebsd") || host.contains("netbsd") || host.contains("openbsd") { PathBuf::from("gmake") diff --git a/src/ci/docker/arm-android/Dockerfile b/src/ci/docker/arm-android/Dockerfile index bbf700ae23..b934d1ce97 100644 --- a/src/ci/docker/arm-android/Dockerfile +++ b/src/ci/docker/arm-android/Dockerfile @@ -7,23 +7,21 @@ COPY scripts/android-ndk.sh /scripts/ RUN . /scripts/android-ndk.sh && \ download_and_make_toolchain android-ndk-r15c-linux-x86_64.zip arm 14 -# Note: -# Do not upgrade to `openjdk-9-jre-headless`, as it will cause certificate error -# when installing the Android SDK (see PR #45193). This is unfortunate, but -# every search result suggested either disabling HTTPS or replacing JDK 9 by -# JDK 8 as the solution (e.g. https://stackoverflow.com/q/41421340). :| RUN dpkg --add-architecture i386 && \ apt-get update && \ apt-get install -y --no-install-recommends \ libgl1-mesa-glx \ libpulse0 \ libstdc++6:i386 \ - openjdk-8-jre-headless \ - tzdata + openjdk-9-jre-headless \ + tzdata \ + wget \ + python3 COPY scripts/android-sdk.sh /scripts/ -RUN . /scripts/android-sdk.sh && \ - download_and_create_avd 4333796 armeabi-v7a 18 5264690 +COPY scripts/android-sdk-manager.py /scripts/ +COPY arm-android/android-sdk.lock /android/sdk/android-sdk.lock +RUN /scripts/android-sdk.sh ENV PATH=$PATH:/android/sdk/emulator ENV PATH=$PATH:/android/sdk/tools diff --git a/src/ci/docker/arm-android/android-sdk.lock b/src/ci/docker/arm-android/android-sdk.lock new file mode 100644 index 0000000000..a1be8a4346 --- /dev/null +++ b/src/ci/docker/arm-android/android-sdk.lock @@ -0,0 +1,6 @@ +emulator emulator-linux-5264690.zip 48c1cda2bdf3095d9d9d5c010fbfb3d6d673e3ea +patcher;v4 3534162-studio.sdk-patcher.zip 046699c5e2716ae11d77e0bad814f7f33fab261e +platform-tools platform-tools_r28.0.2-linux.zip 46a4c02a9b8e4e2121eddf6025da3c979bf02e28 +platforms;android-18 android-18_r03.zip e6b09b3505754cbbeb4a5622008b907262ee91cb +system-images;android-18;default;armeabi-v7a sys-img/android/armeabi-v7a-18_r05.zip 580b583720f7de671040d5917c8c9db0c7aa03fd +tools sdk-tools-linux-4333796.zip 8c7c28554a32318461802c1291d76fccfafde054 diff --git a/src/ci/docker/dist-aarch64-linux/Dockerfile b/src/ci/docker/dist-aarch64-linux/Dockerfile index cddfa557f6..f5eb66ed71 100644 --- a/src/ci/docker/dist-aarch64-linux/Dockerfile +++ b/src/ci/docker/dist-aarch64-linux/Dockerfile @@ -32,5 +32,8 @@ ENV CC_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-gcc \ ENV HOSTS=aarch64-unknown-linux-gnu -ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs +ENV RUST_CONFIGURE_ARGS \ + --enable-extended \ + --enable-profiler \ + --disable-docs ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS diff --git a/src/ci/docker/dist-various-1/install-x86_64-redox.sh b/src/ci/docker/dist-various-1/install-x86_64-redox.sh index 339042bb67..dad9792233 100755 --- a/src/ci/docker/dist-various-1/install-x86_64-redox.sh +++ b/src/ci/docker/dist-various-1/install-x86_64-redox.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -# ignore-tidy-linelength set -ex diff --git a/src/ci/docker/dist-various-2/Dockerfile b/src/ci/docker/dist-various-2/Dockerfile index c0f3326524..e7d6f201b4 100644 --- a/src/ci/docker/dist-various-2/Dockerfile +++ b/src/ci/docker/dist-various-2/Dockerfile @@ -1,9 +1,12 @@ -FROM ubuntu:17.10 +FROM ubuntu:18.04 COPY scripts/cross-apt-packages.sh /scripts/ RUN sh /scripts/cross-apt-packages.sh -RUN apt-get build-dep -y clang llvm && apt-get install -y --no-install-recommends \ +# Enable source repositories, which are disabled by default on Ubuntu >= 18.04 +RUN sed -i 's/^# deb-src/deb-src/' /etc/apt/sources.list + +RUN apt-get update && apt-get build-dep -y clang llvm && apt-get install -y --no-install-recommends \ build-essential \ gcc-multilib \ libedit-dev \ @@ -15,10 +18,13 @@ RUN apt-get build-dep -y clang llvm && apt-get install -y --no-install-recommend nodejs \ python2.7-dev \ software-properties-common \ - unzip + unzip \ + # Needed for apt-key to work: + dirmngr \ + gpg-agent RUN apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys 74DA7924C5513486 -RUN add-apt-repository -y 'deb http://apt.dilos.org/dilos dilos2-testing main' +RUN add-apt-repository -y 'deb http://apt.dilos.org/dilos dilos2 main' WORKDIR /tmp COPY dist-various-2/shared.sh /tmp/ @@ -69,7 +75,7 @@ ENV TARGETS=x86_64-fuchsia ENV TARGETS=$TARGETS,aarch64-fuchsia ENV TARGETS=$TARGETS,sparcv9-sun-solaris ENV TARGETS=$TARGETS,wasm32-unknown-unknown -ENV TARGETS=$TARGETS,wasm32-unknown-wasi +ENV TARGETS=$TARGETS,wasm32-wasi ENV TARGETS=$TARGETS,x86_64-sun-solaris ENV TARGETS=$TARGETS,x86_64-unknown-linux-gnux32 ENV TARGETS=$TARGETS,x86_64-unknown-cloudabi @@ -79,5 +85,5 @@ ENV TARGETS=$TARGETS,nvptx64-nvidia-cuda ENV X86_FORTANIX_SGX_LIBS="/x86_64-fortanix-unknown-sgx/lib/" ENV RUST_CONFIGURE_ARGS --enable-extended --enable-lld --disable-docs \ - --set target.wasm32-unknown-wasi.wasi-root=/wasm32-unknown-wasi + --set target.wasm32-wasi.wasi-root=/wasm32-wasi ENV SCRIPT python2.7 ../x.py dist --target $TARGETS diff --git a/src/ci/docker/dist-various-2/build-fuchsia-toolchain.sh b/src/ci/docker/dist-various-2/build-fuchsia-toolchain.sh index ef486075ff..73acdf5be6 100755 --- a/src/ci/docker/dist-various-2/build-fuchsia-toolchain.sh +++ b/src/ci/docker/dist-various-2/build-fuchsia-toolchain.sh @@ -1,7 +1,5 @@ #!/usr/bin/env bash -# ignore-tidy-linelength - set -ex source shared.sh @@ -12,7 +10,7 @@ pushd zircon > /dev/null # Download sources git init -git remote add origin https://fuchsia.googlesource.com/zircon +git remote add origin https://github.com/rust-lang-nursery/mirror-google-fuchsia-zircon git fetch --depth=1 origin $ZIRCON git reset --hard FETCH_HEAD diff --git a/src/ci/docker/dist-various-2/build-wasi-toolchain.sh b/src/ci/docker/dist-various-2/build-wasi-toolchain.sh index 965286e5bc..98d6df043b 100755 --- a/src/ci/docker/dist-various-2/build-wasi-toolchain.sh +++ b/src/ci/docker/dist-various-2/build-wasi-toolchain.sh @@ -13,7 +13,7 @@ git clone https://github.com/CraneStation/wasi-sysroot cd wasi-sysroot git reset --hard e5f14be38362f1ab83302895a6e74b2ffd0e2302 -make -j$(nproc) INSTALL_DIR=/wasm32-unknown-wasi install +make -j$(nproc) INSTALL_DIR=/wasm32-wasi install cd .. rm -rf reference-sysroot-wasi diff --git a/src/ci/docker/dist-x86_64-linux/build-gcc.sh b/src/ci/docker/dist-x86_64-linux/build-gcc.sh index 7f6e94d326..ddc2066537 100755 --- a/src/ci/docker/dist-x86_64-linux/build-gcc.sh +++ b/src/ci/docker/dist-x86_64-linux/build-gcc.sh @@ -32,6 +32,7 @@ hide_output ../gcc-$GCC/configure \ --enable-languages=c,c++ hide_output make -j10 hide_output make install +ln -s gcc /rustroot/bin/cc cd .. rm -rf gcc-build diff --git a/src/ci/docker/dist-x86_64-musl/Dockerfile b/src/ci/docker/dist-x86_64-musl/Dockerfile index 21a9023a45..385eefde84 100644 --- a/src/ci/docker/dist-x86_64-musl/Dockerfile +++ b/src/ci/docker/dist-x86_64-musl/Dockerfile @@ -23,15 +23,19 @@ COPY scripts/musl-toolchain.sh /build/ # We need to mitigate rust-lang/rust#34978 when compiling musl itself as well RUN CFLAGS="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none -Wl,--compress-debug-sections=none" \ CXXFLAGS="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none -Wl,--compress-debug-sections=none" \ - bash musl-toolchain.sh x86_64 && rm -rf build + REPLACE_CC=1 bash musl-toolchain.sh x86_64 && rm -rf build COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh +ENV HOSTS=x86_64-unknown-linux-musl + ENV RUST_CONFIGURE_ARGS \ --musl-root-x86_64=/usr/local/x86_64-linux-musl \ --enable-extended \ - --disable-docs + --disable-docs \ + --set target.x86_64-unknown-linux-musl.crt-static=false \ + --build $HOSTS # Newer binutils broke things on some vms/distros (i.e., linking against # unknown relocs disabled by the following flag), so we need to go out of our @@ -42,12 +46,5 @@ ENV RUST_CONFIGURE_ARGS \ ENV CFLAGS_x86_64_unknown_linux_musl="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none \ -Wl,--compress-debug-sections=none" -ENV HOSTS=x86_64-unknown-linux-musl \ - CC_x86_64_unknown_linux_musl=x86_64-linux-musl-gcc \ - CXX_x86_64_unknown_linux_musl=x86_64-linux-musl-g++ - -# Musl defaults to static libs but we need them to be dynamic for host toolchain. -# The toolchain will produce static libs by default. -ENV RUSTFLAGS="-C target-feature=-crt-static" - -ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS +# To run native tests replace `dist` below with `test` +ENV SCRIPT python2.7 ../x.py dist --build $HOSTS diff --git a/src/ci/docker/scripts/android-sdk-manager.py b/src/ci/docker/scripts/android-sdk-manager.py new file mode 100755 index 0000000000..7c9a8b82e9 --- /dev/null +++ b/src/ci/docker/scripts/android-sdk-manager.py @@ -0,0 +1,190 @@ +#!/usr/bin/env python3 +# Simpler reimplementation of Android's sdkmanager +# Extra features of this implementation are pinning and mirroring + +# These URLs are the Google repositories containing the list of available +# packages and their versions. The list has been generated by listing the URLs +# fetched while executing `tools/bin/sdkmanager --list` +BASE_REPOSITORY = "https://dl.google.com/android/repository/" +REPOSITORIES = [ + "sys-img/android/sys-img2-1.xml", + "sys-img/android-wear/sys-img2-1.xml", + "sys-img/android-wear-cn/sys-img2-1.xml", + "sys-img/android-tv/sys-img2-1.xml", + "sys-img/google_apis/sys-img2-1.xml", + "sys-img/google_apis_playstore/sys-img2-1.xml", + "addon2-1.xml", + "glass/addon2-1.xml", + "extras/intel/addon2-1.xml", + "repository2-1.xml", +] + +# Available hosts: linux, macosx and windows +HOST_OS = "linux" + +# Mirroring options +MIRROR_BUCKET = "rust-lang-ci2" +MIRROR_BASE_DIR = "rust-ci-mirror/android/" + +import argparse +import hashlib +import os +import subprocess +import sys +import tempfile +import urllib.request +import xml.etree.ElementTree as ET + +class Package: + def __init__(self, path, url, sha1, deps=None): + if deps is None: + deps = [] + self.path = path.strip() + self.url = url.strip() + self.sha1 = sha1.strip() + self.deps = deps + + def download(self, base_url): + _, file = tempfile.mkstemp() + url = base_url + self.url + subprocess.run(["curl", "-o", file, url], check=True) + # Ensure there are no hash mismatches + with open(file, "rb") as f: + sha1 = hashlib.sha1(f.read()).hexdigest() + if sha1 != self.sha1: + raise RuntimeError( + "hash mismatch for package " + self.path + ": " + + sha1 + " vs " + self.sha1 + " (known good)" + ) + return file + + def __repr__(self): + return " /dev/null - yes | sdkmanager platform-tools \ - "platforms;android-$api" \ - "system-images;android-$api;default;$abi" > /dev/null -} - -download_emulator() { - # Download a pinned version of the emulator since upgrades can cause issues - curl -fo emulator.zip "https://dl.google.com/android/repository/emulator-linux-$1.zip" - rm -rf "${ANDROID_HOME}/emulator" - unzip -q emulator.zip -d "${ANDROID_HOME}" - rm -f emulator.zip -} - -create_avd() { - abi=$1 - api=$2 - - # See https://developer.android.com/studio/command-line/avdmanager.html for - # usage of `avdmanager`. - echo no | avdmanager create avd \ - -n "$abi-$api" \ - -k "system-images;android-$api;default;$abi" -} - -download_and_create_avd() { - download_sdk $1 - download_sysimage $2 $3 - create_avd $2 $3 - download_emulator $4 -} - -# Usage: +# To add a new packages to the SDK or to update an existing one you need to +# run the command: +# +# android-sdk-manager.py add-to-lockfile $LOCKFILE +# +# Then, after every lockfile update the mirror has to be synchronized as well: # -# download_and_create_avd 4333796 armeabi-v7a 18 5264690 +# android-sdk-manager.py update-mirror $LOCKFILE # -# 4333796 => -# SDK tool version. -# Copy from https://developer.android.com/studio/index.html#command-tools -# armeabi-v7a => -# System image ABI -# 18 => -# Android API Level (18 = Android 4.3 = Jelly Bean MR2) -# 5264690 => -# Android Emulator version. -# Copy from the "build_id" in the `/android/sdk/emulator/emulator -version` output +/scripts/android-sdk-manager.py install "${LOCKFILE}" "${ANDROID_HOME}" + +details=$(cat "${LOCKFILE}" \ + | grep system-images \ + | sed 's/^system-images;android-\([0-9]\+\);default;\([a-z0-9-]\+\) /\1 \2 /g') +api="$(echo "${details}" | awk '{print($1)}')" +abi="$(echo "${details}" | awk '{print($2)}')" + +# See https://developer.android.com/studio/command-line/avdmanager.html for +# usage of `avdmanager`. +echo no | avdmanager create avd \ + -n "$abi-$api" \ + -k "system-images;android-$api;default;$abi" diff --git a/src/ci/docker/scripts/musl-toolchain.sh b/src/ci/docker/scripts/musl-toolchain.sh index 3caf2852ed..d5988a2567 100644 --- a/src/ci/docker/scripts/musl-toolchain.sh +++ b/src/ci/docker/scripts/musl-toolchain.sh @@ -45,6 +45,15 @@ cd - ln -s $OUTPUT/$TARGET/lib/libc.so /lib/ld-musl-$ARCH.so.1 echo $OUTPUT/$TARGET/lib >> /etc/ld-musl-$ARCH.path +# Now when musl bootstraps itself create proper toolchain symlinks to make build and tests easier +if [ "$REPLACE_CC" = "1" ]; then + for exec in cc gcc; do + ln -s $TARGET-gcc /usr/local/bin/$exec + done + for exec in cpp c++ g++; do + ln -s $TARGET-g++ /usr/local/bin/$exec + done +fi export CC=$TARGET-gcc export CXX=$TARGET-g++ @@ -71,4 +80,3 @@ cmake ../libunwind-release_$LLVM \ hide_output make -j$(nproc) cp lib/libunwind.a $OUTPUT/$TARGET/lib cd - && rm -rf libunwind-build - diff --git a/src/ci/docker/scripts/sccache.sh b/src/ci/docker/scripts/sccache.sh index e05246201d..4c03419894 100644 --- a/src/ci/docker/scripts/sccache.sh +++ b/src/ci/docker/scripts/sccache.sh @@ -1,5 +1,3 @@ -# ignore-tidy-linelength - set -ex curl -fo /usr/local/bin/sccache \ diff --git a/src/ci/docker/x86_64-gnu-debug/Dockerfile b/src/ci/docker/x86_64-gnu-debug/Dockerfile index 1c7eff68ad..7a503ea4e9 100644 --- a/src/ci/docker/x86_64-gnu-debug/Dockerfile +++ b/src/ci/docker/x86_64-gnu-debug/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.10 +FROM ubuntu:19.04 RUN apt-get update && apt-get install -y --no-install-recommends \ g++ \ diff --git a/src/ci/docker/x86_64-gnu/Dockerfile b/src/ci/docker/x86_64-gnu/Dockerfile index dd94f2652b..c3519a0077 100644 --- a/src/ci/docker/x86_64-gnu/Dockerfile +++ b/src/ci/docker/x86_64-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.10 +FROM ubuntu:19.04 RUN apt-get update && apt-get install -y --no-install-recommends \ g++ \ diff --git a/src/doc/book/.travis.yml b/src/doc/book/.travis.yml index 5195b85338..be8ed09bda 100644 --- a/src/doc/book/.travis.yml +++ b/src/doc/book/.travis.yml @@ -13,6 +13,6 @@ addons: - aspell - aspell-en before_script: - - (cargo install mdbook --vers 0.1.7 --force || true) + - (cargo install mdbook --vers 0.2.3 --force || true) script: - bash ci/build.sh diff --git a/src/doc/book/2018-edition/src/appendix-00.md b/src/doc/book/2018-edition/src/appendix-00.md index d8b1a6e8f6..c4145d6d8c 100644 --- a/src/doc/book/2018-edition/src/appendix-00.md +++ b/src/doc/book/2018-edition/src/appendix-00.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../appendix-00.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/appendix-01-keywords.md b/src/doc/book/2018-edition/src/appendix-01-keywords.md index c02bd347cf..dde1ac6ce9 100644 --- a/src/doc/book/2018-edition/src/appendix-01-keywords.md +++ b/src/doc/book/2018-edition/src/appendix-01-keywords.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../appendix-01-keywords.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/appendix-02-operators.md b/src/doc/book/2018-edition/src/appendix-02-operators.md index 2efce8b436..4bca5b78f0 100644 --- a/src/doc/book/2018-edition/src/appendix-02-operators.md +++ b/src/doc/book/2018-edition/src/appendix-02-operators.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../appendix-02-operators.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/appendix-03-derivable-traits.md b/src/doc/book/2018-edition/src/appendix-03-derivable-traits.md index 165da07169..effe9c22af 100644 --- a/src/doc/book/2018-edition/src/appendix-03-derivable-traits.md +++ b/src/doc/book/2018-edition/src/appendix-03-derivable-traits.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../appendix-03-derivable-traits.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/appendix-04-useful-development-tools.md b/src/doc/book/2018-edition/src/appendix-04-useful-development-tools.md index e745c6b18e..9757c17ab8 100644 --- a/src/doc/book/2018-edition/src/appendix-04-useful-development-tools.md +++ b/src/doc/book/2018-edition/src/appendix-04-useful-development-tools.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../appendix-04-useful-development-tools.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/appendix-05-editions.md b/src/doc/book/2018-edition/src/appendix-05-editions.md index 9c9494ad0f..fe22543627 100644 --- a/src/doc/book/2018-edition/src/appendix-05-editions.md +++ b/src/doc/book/2018-edition/src/appendix-05-editions.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../appendix-05-editions.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/appendix-06-translation.md b/src/doc/book/2018-edition/src/appendix-06-translation.md index 5ffa22e484..ef6345533e 100644 --- a/src/doc/book/2018-edition/src/appendix-06-translation.md +++ b/src/doc/book/2018-edition/src/appendix-06-translation.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../appendix-06-translation.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/appendix-07-nightly-rust.md b/src/doc/book/2018-edition/src/appendix-07-nightly-rust.md index f465a1f26e..d5ee3806de 100644 --- a/src/doc/book/2018-edition/src/appendix-07-nightly-rust.md +++ b/src/doc/book/2018-edition/src/appendix-07-nightly-rust.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../appendix-07-nightly-rust.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch00-00-introduction.md b/src/doc/book/2018-edition/src/ch00-00-introduction.md index 0310be3af1..2645d6f549 100644 --- a/src/doc/book/2018-edition/src/ch00-00-introduction.md +++ b/src/doc/book/2018-edition/src/ch00-00-introduction.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch00-00-introduction.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch01-00-getting-started.md b/src/doc/book/2018-edition/src/ch01-00-getting-started.md index e98f85cebb..18db714093 100644 --- a/src/doc/book/2018-edition/src/ch01-00-getting-started.md +++ b/src/doc/book/2018-edition/src/ch01-00-getting-started.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch01-00-getting-started.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch01-01-installation.md b/src/doc/book/2018-edition/src/ch01-01-installation.md index 1039d9ca6b..29ec038dee 100644 --- a/src/doc/book/2018-edition/src/ch01-01-installation.md +++ b/src/doc/book/2018-edition/src/ch01-01-installation.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch01-01-installation.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch01-02-hello-world.md b/src/doc/book/2018-edition/src/ch01-02-hello-world.md index 0f9c96962b..f56f59291c 100644 --- a/src/doc/book/2018-edition/src/ch01-02-hello-world.md +++ b/src/doc/book/2018-edition/src/ch01-02-hello-world.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch01-02-hello-world.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch01-03-hello-cargo.md b/src/doc/book/2018-edition/src/ch01-03-hello-cargo.md index 9c754fb452..464955150a 100644 --- a/src/doc/book/2018-edition/src/ch01-03-hello-cargo.md +++ b/src/doc/book/2018-edition/src/ch01-03-hello-cargo.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch01-03-hello-cargo.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch02-00-guessing-game-tutorial.md b/src/doc/book/2018-edition/src/ch02-00-guessing-game-tutorial.md index a4c9d5f9c2..40a5936914 100644 --- a/src/doc/book/2018-edition/src/ch02-00-guessing-game-tutorial.md +++ b/src/doc/book/2018-edition/src/ch02-00-guessing-game-tutorial.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch02-00-guessing-game-tutorial.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch03-00-common-programming-concepts.md b/src/doc/book/2018-edition/src/ch03-00-common-programming-concepts.md index 5e9009025f..52e38dedf3 100644 --- a/src/doc/book/2018-edition/src/ch03-00-common-programming-concepts.md +++ b/src/doc/book/2018-edition/src/ch03-00-common-programming-concepts.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch03-00-common-programming-concepts.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch03-01-variables-and-mutability.md b/src/doc/book/2018-edition/src/ch03-01-variables-and-mutability.md index fcfd219e91..990602058a 100644 --- a/src/doc/book/2018-edition/src/ch03-01-variables-and-mutability.md +++ b/src/doc/book/2018-edition/src/ch03-01-variables-and-mutability.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch03-01-variables-and-mutability.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch03-02-data-types.md b/src/doc/book/2018-edition/src/ch03-02-data-types.md index dc989d9e89..7109be297d 100644 --- a/src/doc/book/2018-edition/src/ch03-02-data-types.md +++ b/src/doc/book/2018-edition/src/ch03-02-data-types.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch03-02-data-types.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch03-03-how-functions-work.md b/src/doc/book/2018-edition/src/ch03-03-how-functions-work.md index 84e49a56a6..60213ba9ae 100644 --- a/src/doc/book/2018-edition/src/ch03-03-how-functions-work.md +++ b/src/doc/book/2018-edition/src/ch03-03-how-functions-work.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch03-03-how-functions-work.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch03-04-comments.md b/src/doc/book/2018-edition/src/ch03-04-comments.md index 6b713c62a9..679c7ee212 100644 --- a/src/doc/book/2018-edition/src/ch03-04-comments.md +++ b/src/doc/book/2018-edition/src/ch03-04-comments.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch03-04-comments.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch03-05-control-flow.md b/src/doc/book/2018-edition/src/ch03-05-control-flow.md index 62b0dfaf34..de3f331be2 100644 --- a/src/doc/book/2018-edition/src/ch03-05-control-flow.md +++ b/src/doc/book/2018-edition/src/ch03-05-control-flow.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch03-05-control-flow.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch04-00-understanding-ownership.md b/src/doc/book/2018-edition/src/ch04-00-understanding-ownership.md index 0a4f6078f0..d48cc711b7 100644 --- a/src/doc/book/2018-edition/src/ch04-00-understanding-ownership.md +++ b/src/doc/book/2018-edition/src/ch04-00-understanding-ownership.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch04-00-understanding-ownership.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch04-01-what-is-ownership.md b/src/doc/book/2018-edition/src/ch04-01-what-is-ownership.md index 88bbc9d4f7..f6a2e485e9 100644 --- a/src/doc/book/2018-edition/src/ch04-01-what-is-ownership.md +++ b/src/doc/book/2018-edition/src/ch04-01-what-is-ownership.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch04-01-what-is-ownership.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch04-02-references-and-borrowing.md b/src/doc/book/2018-edition/src/ch04-02-references-and-borrowing.md index 79c4dcb363..a6b9d5cba3 100644 --- a/src/doc/book/2018-edition/src/ch04-02-references-and-borrowing.md +++ b/src/doc/book/2018-edition/src/ch04-02-references-and-borrowing.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch04-02-references-and-borrowing.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch04-03-slices.md b/src/doc/book/2018-edition/src/ch04-03-slices.md index 1c0ef2ad06..8e1f8bcf92 100644 --- a/src/doc/book/2018-edition/src/ch04-03-slices.md +++ b/src/doc/book/2018-edition/src/ch04-03-slices.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch04-03-slices.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch05-00-structs.md b/src/doc/book/2018-edition/src/ch05-00-structs.md index 1e3b1aba5e..8957ae29d4 100644 --- a/src/doc/book/2018-edition/src/ch05-00-structs.md +++ b/src/doc/book/2018-edition/src/ch05-00-structs.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch05-00-structs.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch05-01-defining-structs.md b/src/doc/book/2018-edition/src/ch05-01-defining-structs.md index a4dd73362a..abd150f93b 100644 --- a/src/doc/book/2018-edition/src/ch05-01-defining-structs.md +++ b/src/doc/book/2018-edition/src/ch05-01-defining-structs.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch05-01-defining-structs.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch05-02-example-structs.md b/src/doc/book/2018-edition/src/ch05-02-example-structs.md index 5d7f776f2e..ac6b43e19d 100644 --- a/src/doc/book/2018-edition/src/ch05-02-example-structs.md +++ b/src/doc/book/2018-edition/src/ch05-02-example-structs.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch05-02-example-structs.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch05-03-method-syntax.md b/src/doc/book/2018-edition/src/ch05-03-method-syntax.md index 5eb2aa78de..a45b9f3346 100644 --- a/src/doc/book/2018-edition/src/ch05-03-method-syntax.md +++ b/src/doc/book/2018-edition/src/ch05-03-method-syntax.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch05-03-method-syntax.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch06-00-enums.md b/src/doc/book/2018-edition/src/ch06-00-enums.md index d07bfeb18f..55d2cd1624 100644 --- a/src/doc/book/2018-edition/src/ch06-00-enums.md +++ b/src/doc/book/2018-edition/src/ch06-00-enums.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch06-00-enums.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch06-01-defining-an-enum.md b/src/doc/book/2018-edition/src/ch06-01-defining-an-enum.md index 366595c8f7..81c2603dcc 100644 --- a/src/doc/book/2018-edition/src/ch06-01-defining-an-enum.md +++ b/src/doc/book/2018-edition/src/ch06-01-defining-an-enum.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch06-01-defining-an-enum.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch06-02-match.md b/src/doc/book/2018-edition/src/ch06-02-match.md index 60eabdac2d..5663fb82a8 100644 --- a/src/doc/book/2018-edition/src/ch06-02-match.md +++ b/src/doc/book/2018-edition/src/ch06-02-match.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch06-02-match.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch06-03-if-let.md b/src/doc/book/2018-edition/src/ch06-03-if-let.md index 86f5c5094d..24b14c1d02 100644 --- a/src/doc/book/2018-edition/src/ch06-03-if-let.md +++ b/src/doc/book/2018-edition/src/ch06-03-if-let.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch06-03-if-let.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch08-00-common-collections.md b/src/doc/book/2018-edition/src/ch08-00-common-collections.md index d75e32b588..079daccf3d 100644 --- a/src/doc/book/2018-edition/src/ch08-00-common-collections.md +++ b/src/doc/book/2018-edition/src/ch08-00-common-collections.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch08-00-common-collections.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch08-01-vectors.md b/src/doc/book/2018-edition/src/ch08-01-vectors.md index 72f98d5d0b..e13e45d522 100644 --- a/src/doc/book/2018-edition/src/ch08-01-vectors.md +++ b/src/doc/book/2018-edition/src/ch08-01-vectors.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch08-01-vectors.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch08-02-strings.md b/src/doc/book/2018-edition/src/ch08-02-strings.md index da41c9da58..2ca314b872 100644 --- a/src/doc/book/2018-edition/src/ch08-02-strings.md +++ b/src/doc/book/2018-edition/src/ch08-02-strings.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch08-02-strings.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch08-03-hash-maps.md b/src/doc/book/2018-edition/src/ch08-03-hash-maps.md index 2aa4c8594e..365ede452a 100644 --- a/src/doc/book/2018-edition/src/ch08-03-hash-maps.md +++ b/src/doc/book/2018-edition/src/ch08-03-hash-maps.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch08-03-hash-maps.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch09-00-error-handling.md b/src/doc/book/2018-edition/src/ch09-00-error-handling.md index 448cfb7a72..d499077757 100644 --- a/src/doc/book/2018-edition/src/ch09-00-error-handling.md +++ b/src/doc/book/2018-edition/src/ch09-00-error-handling.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch09-00-error-handling.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch09-01-unrecoverable-errors-with-panic.md b/src/doc/book/2018-edition/src/ch09-01-unrecoverable-errors-with-panic.md index f23d47af54..4850a3d00e 100644 --- a/src/doc/book/2018-edition/src/ch09-01-unrecoverable-errors-with-panic.md +++ b/src/doc/book/2018-edition/src/ch09-01-unrecoverable-errors-with-panic.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch09-01-unrecoverable-errors-with-panic.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch09-02-recoverable-errors-with-result.md b/src/doc/book/2018-edition/src/ch09-02-recoverable-errors-with-result.md index 7e55146697..12c2158f97 100644 --- a/src/doc/book/2018-edition/src/ch09-02-recoverable-errors-with-result.md +++ b/src/doc/book/2018-edition/src/ch09-02-recoverable-errors-with-result.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch09-02-recoverable-errors-with-result.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch09-03-to-panic-or-not-to-panic.md b/src/doc/book/2018-edition/src/ch09-03-to-panic-or-not-to-panic.md index 87c3589821..1d1d06e482 100644 --- a/src/doc/book/2018-edition/src/ch09-03-to-panic-or-not-to-panic.md +++ b/src/doc/book/2018-edition/src/ch09-03-to-panic-or-not-to-panic.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch09-03-to-panic-or-not-to-panic.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch10-00-generics.md b/src/doc/book/2018-edition/src/ch10-00-generics.md index e8532b139a..e295912479 100644 --- a/src/doc/book/2018-edition/src/ch10-00-generics.md +++ b/src/doc/book/2018-edition/src/ch10-00-generics.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch10-00-generics.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch10-01-syntax.md b/src/doc/book/2018-edition/src/ch10-01-syntax.md index c04ff0daf3..0237c76945 100644 --- a/src/doc/book/2018-edition/src/ch10-01-syntax.md +++ b/src/doc/book/2018-edition/src/ch10-01-syntax.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch10-01-syntax.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch10-02-traits.md b/src/doc/book/2018-edition/src/ch10-02-traits.md index 9eb2a7ab79..667383339b 100644 --- a/src/doc/book/2018-edition/src/ch10-02-traits.md +++ b/src/doc/book/2018-edition/src/ch10-02-traits.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch10-02-traits.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch10-03-lifetime-syntax.md b/src/doc/book/2018-edition/src/ch10-03-lifetime-syntax.md index d9c0e8b6ec..a3ccf0033b 100644 --- a/src/doc/book/2018-edition/src/ch10-03-lifetime-syntax.md +++ b/src/doc/book/2018-edition/src/ch10-03-lifetime-syntax.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch10-03-lifetime-syntax.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch11-00-testing.md b/src/doc/book/2018-edition/src/ch11-00-testing.md index 7543292b1f..33f5d7eeb1 100644 --- a/src/doc/book/2018-edition/src/ch11-00-testing.md +++ b/src/doc/book/2018-edition/src/ch11-00-testing.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch11-00-testing.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch11-01-writing-tests.md b/src/doc/book/2018-edition/src/ch11-01-writing-tests.md index e9914d5655..17c608e61f 100644 --- a/src/doc/book/2018-edition/src/ch11-01-writing-tests.md +++ b/src/doc/book/2018-edition/src/ch11-01-writing-tests.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch11-01-writing-tests.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch11-02-running-tests.md b/src/doc/book/2018-edition/src/ch11-02-running-tests.md index 18e193794f..3774076846 100644 --- a/src/doc/book/2018-edition/src/ch11-02-running-tests.md +++ b/src/doc/book/2018-edition/src/ch11-02-running-tests.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch11-02-running-tests.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch11-03-test-organization.md b/src/doc/book/2018-edition/src/ch11-03-test-organization.md index 8e7e357fa0..92cca4c74d 100644 --- a/src/doc/book/2018-edition/src/ch11-03-test-organization.md +++ b/src/doc/book/2018-edition/src/ch11-03-test-organization.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch11-03-test-organization.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch12-00-an-io-project.md b/src/doc/book/2018-edition/src/ch12-00-an-io-project.md index c0794f221b..3e1fbac98e 100644 --- a/src/doc/book/2018-edition/src/ch12-00-an-io-project.md +++ b/src/doc/book/2018-edition/src/ch12-00-an-io-project.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch12-00-an-io-project.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch12-01-accepting-command-line-arguments.md b/src/doc/book/2018-edition/src/ch12-01-accepting-command-line-arguments.md index fad838fb12..a91b0cad1c 100644 --- a/src/doc/book/2018-edition/src/ch12-01-accepting-command-line-arguments.md +++ b/src/doc/book/2018-edition/src/ch12-01-accepting-command-line-arguments.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch12-01-accepting-command-line-arguments.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch12-02-reading-a-file.md b/src/doc/book/2018-edition/src/ch12-02-reading-a-file.md index 1230e8130c..6ef3349398 100644 --- a/src/doc/book/2018-edition/src/ch12-02-reading-a-file.md +++ b/src/doc/book/2018-edition/src/ch12-02-reading-a-file.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch12-02-reading-a-file.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch12-03-improving-error-handling-and-modularity.md b/src/doc/book/2018-edition/src/ch12-03-improving-error-handling-and-modularity.md index 5c9dce1986..5d52ab8933 100644 --- a/src/doc/book/2018-edition/src/ch12-03-improving-error-handling-and-modularity.md +++ b/src/doc/book/2018-edition/src/ch12-03-improving-error-handling-and-modularity.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch12-03-improving-error-handling-and-modularity.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch12-04-testing-the-librarys-functionality.md b/src/doc/book/2018-edition/src/ch12-04-testing-the-librarys-functionality.md index 2ba75fe9ba..12b0204d82 100644 --- a/src/doc/book/2018-edition/src/ch12-04-testing-the-librarys-functionality.md +++ b/src/doc/book/2018-edition/src/ch12-04-testing-the-librarys-functionality.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch12-04-testing-the-librarys-functionality.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch12-05-working-with-environment-variables.md b/src/doc/book/2018-edition/src/ch12-05-working-with-environment-variables.md index fa130a5dd9..d6316cb2d3 100644 --- a/src/doc/book/2018-edition/src/ch12-05-working-with-environment-variables.md +++ b/src/doc/book/2018-edition/src/ch12-05-working-with-environment-variables.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch12-05-working-with-environment-variables.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch12-06-writing-to-stderr-instead-of-stdout.md b/src/doc/book/2018-edition/src/ch12-06-writing-to-stderr-instead-of-stdout.md index a6091b1e30..6114b4bb8c 100644 --- a/src/doc/book/2018-edition/src/ch12-06-writing-to-stderr-instead-of-stdout.md +++ b/src/doc/book/2018-edition/src/ch12-06-writing-to-stderr-instead-of-stdout.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch12-06-writing-to-stderr-instead-of-stdout.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch13-00-functional-features.md b/src/doc/book/2018-edition/src/ch13-00-functional-features.md index d6916e7838..466b49c6f5 100644 --- a/src/doc/book/2018-edition/src/ch13-00-functional-features.md +++ b/src/doc/book/2018-edition/src/ch13-00-functional-features.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch13-00-functional-features.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch13-01-closures.md b/src/doc/book/2018-edition/src/ch13-01-closures.md index 54a7098f75..bc580304e8 100644 --- a/src/doc/book/2018-edition/src/ch13-01-closures.md +++ b/src/doc/book/2018-edition/src/ch13-01-closures.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch13-01-closures.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch13-02-iterators.md b/src/doc/book/2018-edition/src/ch13-02-iterators.md index f8feb23c28..7f5e9cf867 100644 --- a/src/doc/book/2018-edition/src/ch13-02-iterators.md +++ b/src/doc/book/2018-edition/src/ch13-02-iterators.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch13-02-iterators.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch13-03-improving-our-io-project.md b/src/doc/book/2018-edition/src/ch13-03-improving-our-io-project.md index f3706c3263..5148fcf1bb 100644 --- a/src/doc/book/2018-edition/src/ch13-03-improving-our-io-project.md +++ b/src/doc/book/2018-edition/src/ch13-03-improving-our-io-project.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch13-03-improving-our-io-project.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch13-04-performance.md b/src/doc/book/2018-edition/src/ch13-04-performance.md index 7c9a41f6d9..817a13844f 100644 --- a/src/doc/book/2018-edition/src/ch13-04-performance.md +++ b/src/doc/book/2018-edition/src/ch13-04-performance.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch13-04-performance.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch14-00-more-about-cargo.md b/src/doc/book/2018-edition/src/ch14-00-more-about-cargo.md index 993704d8b3..dea00b8aa5 100644 --- a/src/doc/book/2018-edition/src/ch14-00-more-about-cargo.md +++ b/src/doc/book/2018-edition/src/ch14-00-more-about-cargo.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch14-00-more-about-cargo.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch14-01-release-profiles.md b/src/doc/book/2018-edition/src/ch14-01-release-profiles.md index 36fe099336..eb9946ac73 100644 --- a/src/doc/book/2018-edition/src/ch14-01-release-profiles.md +++ b/src/doc/book/2018-edition/src/ch14-01-release-profiles.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch14-01-release-profiles.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch14-02-publishing-to-crates-io.md b/src/doc/book/2018-edition/src/ch14-02-publishing-to-crates-io.md index fbe530c20c..a5707e5ace 100644 --- a/src/doc/book/2018-edition/src/ch14-02-publishing-to-crates-io.md +++ b/src/doc/book/2018-edition/src/ch14-02-publishing-to-crates-io.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch14-02-publishing-to-crates-io.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch14-03-cargo-workspaces.md b/src/doc/book/2018-edition/src/ch14-03-cargo-workspaces.md index 504036bf2f..50691e6541 100644 --- a/src/doc/book/2018-edition/src/ch14-03-cargo-workspaces.md +++ b/src/doc/book/2018-edition/src/ch14-03-cargo-workspaces.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch14-03-cargo-workspaces.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch14-04-installing-binaries.md b/src/doc/book/2018-edition/src/ch14-04-installing-binaries.md index 4d6bb68c52..b6e196bb93 100644 --- a/src/doc/book/2018-edition/src/ch14-04-installing-binaries.md +++ b/src/doc/book/2018-edition/src/ch14-04-installing-binaries.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch14-04-installing-binaries.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch14-05-extending-cargo.md b/src/doc/book/2018-edition/src/ch14-05-extending-cargo.md index 7cb9f1d147..ed1235de65 100644 --- a/src/doc/book/2018-edition/src/ch14-05-extending-cargo.md +++ b/src/doc/book/2018-edition/src/ch14-05-extending-cargo.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch14-05-extending-cargo.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch15-00-smart-pointers.md b/src/doc/book/2018-edition/src/ch15-00-smart-pointers.md index 9c2ac4f7bc..de4c648df0 100644 --- a/src/doc/book/2018-edition/src/ch15-00-smart-pointers.md +++ b/src/doc/book/2018-edition/src/ch15-00-smart-pointers.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch15-00-smart-pointers.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch15-01-box.md b/src/doc/book/2018-edition/src/ch15-01-box.md index ba087c9f01..cbbc07bbf8 100644 --- a/src/doc/book/2018-edition/src/ch15-01-box.md +++ b/src/doc/book/2018-edition/src/ch15-01-box.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch15-01-box.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch15-02-deref.md b/src/doc/book/2018-edition/src/ch15-02-deref.md index 75d6f7f65a..b5f1f8612a 100644 --- a/src/doc/book/2018-edition/src/ch15-02-deref.md +++ b/src/doc/book/2018-edition/src/ch15-02-deref.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch15-02-deref.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch15-03-drop.md b/src/doc/book/2018-edition/src/ch15-03-drop.md index ad765093f1..2ae0b436d9 100644 --- a/src/doc/book/2018-edition/src/ch15-03-drop.md +++ b/src/doc/book/2018-edition/src/ch15-03-drop.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch15-03-drop.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch15-04-rc.md b/src/doc/book/2018-edition/src/ch15-04-rc.md index cdbd54173f..2b4015e7e4 100644 --- a/src/doc/book/2018-edition/src/ch15-04-rc.md +++ b/src/doc/book/2018-edition/src/ch15-04-rc.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch15-04-rc.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch15-05-interior-mutability.md b/src/doc/book/2018-edition/src/ch15-05-interior-mutability.md index 0e8529fc3f..fb1f96df7a 100644 --- a/src/doc/book/2018-edition/src/ch15-05-interior-mutability.md +++ b/src/doc/book/2018-edition/src/ch15-05-interior-mutability.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch15-05-interior-mutability.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch15-06-reference-cycles.md b/src/doc/book/2018-edition/src/ch15-06-reference-cycles.md index 4f37b7da21..ac93fe3bbc 100644 --- a/src/doc/book/2018-edition/src/ch15-06-reference-cycles.md +++ b/src/doc/book/2018-edition/src/ch15-06-reference-cycles.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch15-06-reference-cycles.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch16-00-concurrency.md b/src/doc/book/2018-edition/src/ch16-00-concurrency.md index 849fd1f333..1cf6b2f580 100644 --- a/src/doc/book/2018-edition/src/ch16-00-concurrency.md +++ b/src/doc/book/2018-edition/src/ch16-00-concurrency.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch16-00-concurrency.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch16-01-threads.md b/src/doc/book/2018-edition/src/ch16-01-threads.md index a30e52bbf1..708e30be79 100644 --- a/src/doc/book/2018-edition/src/ch16-01-threads.md +++ b/src/doc/book/2018-edition/src/ch16-01-threads.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch16-01-threads.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch16-02-message-passing.md b/src/doc/book/2018-edition/src/ch16-02-message-passing.md index 36a6235baf..4540efaac3 100644 --- a/src/doc/book/2018-edition/src/ch16-02-message-passing.md +++ b/src/doc/book/2018-edition/src/ch16-02-message-passing.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch16-02-message-passing.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch16-03-shared-state.md b/src/doc/book/2018-edition/src/ch16-03-shared-state.md index 277de7439c..043aa25cdb 100644 --- a/src/doc/book/2018-edition/src/ch16-03-shared-state.md +++ b/src/doc/book/2018-edition/src/ch16-03-shared-state.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch16-03-shared-state.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch16-04-extensible-concurrency-sync-and-send.md b/src/doc/book/2018-edition/src/ch16-04-extensible-concurrency-sync-and-send.md index 3de434edb4..44a4a0b197 100644 --- a/src/doc/book/2018-edition/src/ch16-04-extensible-concurrency-sync-and-send.md +++ b/src/doc/book/2018-edition/src/ch16-04-extensible-concurrency-sync-and-send.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch16-04-extensible-concurrency-sync-and-send.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch17-00-oop.md b/src/doc/book/2018-edition/src/ch17-00-oop.md index ba60595a35..c731bbc95b 100644 --- a/src/doc/book/2018-edition/src/ch17-00-oop.md +++ b/src/doc/book/2018-edition/src/ch17-00-oop.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch17-00-oop.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch17-01-what-is-oo.md b/src/doc/book/2018-edition/src/ch17-01-what-is-oo.md index 1c59b3e528..ed1ec4013d 100644 --- a/src/doc/book/2018-edition/src/ch17-01-what-is-oo.md +++ b/src/doc/book/2018-edition/src/ch17-01-what-is-oo.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch17-01-what-is-oo.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch17-02-trait-objects.md b/src/doc/book/2018-edition/src/ch17-02-trait-objects.md index a4d9ace084..1999647aae 100644 --- a/src/doc/book/2018-edition/src/ch17-02-trait-objects.md +++ b/src/doc/book/2018-edition/src/ch17-02-trait-objects.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch17-02-trait-objects.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch17-03-oo-design-patterns.md b/src/doc/book/2018-edition/src/ch17-03-oo-design-patterns.md index d0b649e964..1b74425fe2 100644 --- a/src/doc/book/2018-edition/src/ch17-03-oo-design-patterns.md +++ b/src/doc/book/2018-edition/src/ch17-03-oo-design-patterns.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch17-03-oo-design-patterns.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch18-00-patterns.md b/src/doc/book/2018-edition/src/ch18-00-patterns.md index 496d8c9f9f..f3da1f40d2 100644 --- a/src/doc/book/2018-edition/src/ch18-00-patterns.md +++ b/src/doc/book/2018-edition/src/ch18-00-patterns.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch18-00-patterns.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch18-01-all-the-places-for-patterns.md b/src/doc/book/2018-edition/src/ch18-01-all-the-places-for-patterns.md index c50bed60fe..ccf3884069 100644 --- a/src/doc/book/2018-edition/src/ch18-01-all-the-places-for-patterns.md +++ b/src/doc/book/2018-edition/src/ch18-01-all-the-places-for-patterns.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch18-01-all-the-places-for-patterns.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch18-02-refutability.md b/src/doc/book/2018-edition/src/ch18-02-refutability.md index 4f81985f0d..074f950e65 100644 --- a/src/doc/book/2018-edition/src/ch18-02-refutability.md +++ b/src/doc/book/2018-edition/src/ch18-02-refutability.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch18-02-refutability.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch18-03-pattern-syntax.md b/src/doc/book/2018-edition/src/ch18-03-pattern-syntax.md index b1909a36a4..0e0929e7b8 100644 --- a/src/doc/book/2018-edition/src/ch18-03-pattern-syntax.md +++ b/src/doc/book/2018-edition/src/ch18-03-pattern-syntax.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch18-03-pattern-syntax.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch19-00-advanced-features.md b/src/doc/book/2018-edition/src/ch19-00-advanced-features.md index a6bd24d8fc..b34d6b9b67 100644 --- a/src/doc/book/2018-edition/src/ch19-00-advanced-features.md +++ b/src/doc/book/2018-edition/src/ch19-00-advanced-features.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch19-00-advanced-features.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch19-01-unsafe-rust.md b/src/doc/book/2018-edition/src/ch19-01-unsafe-rust.md index f33c5706e3..34b569fee6 100644 --- a/src/doc/book/2018-edition/src/ch19-01-unsafe-rust.md +++ b/src/doc/book/2018-edition/src/ch19-01-unsafe-rust.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch19-01-unsafe-rust.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch19-03-advanced-traits.md b/src/doc/book/2018-edition/src/ch19-03-advanced-traits.md index 99a610d070..4219b208b9 100644 --- a/src/doc/book/2018-edition/src/ch19-03-advanced-traits.md +++ b/src/doc/book/2018-edition/src/ch19-03-advanced-traits.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch19-03-advanced-traits.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch19-04-advanced-types.md b/src/doc/book/2018-edition/src/ch19-04-advanced-types.md index 21814bb11d..fecbd52dc8 100644 --- a/src/doc/book/2018-edition/src/ch19-04-advanced-types.md +++ b/src/doc/book/2018-edition/src/ch19-04-advanced-types.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch19-04-advanced-types.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch19-05-advanced-functions-and-closures.md b/src/doc/book/2018-edition/src/ch19-05-advanced-functions-and-closures.md index ae405fe5ea..1bf0450904 100644 --- a/src/doc/book/2018-edition/src/ch19-05-advanced-functions-and-closures.md +++ b/src/doc/book/2018-edition/src/ch19-05-advanced-functions-and-closures.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch19-05-advanced-functions-and-closures.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch19-06-macros.md b/src/doc/book/2018-edition/src/ch19-06-macros.md index 707d92ce8f..bf019c5d68 100644 --- a/src/doc/book/2018-edition/src/ch19-06-macros.md +++ b/src/doc/book/2018-edition/src/ch19-06-macros.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch19-06-macros.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch20-00-final-project-a-web-server.md b/src/doc/book/2018-edition/src/ch20-00-final-project-a-web-server.md index 91f0be4ab2..f9b9e5c2d2 100644 --- a/src/doc/book/2018-edition/src/ch20-00-final-project-a-web-server.md +++ b/src/doc/book/2018-edition/src/ch20-00-final-project-a-web-server.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch20-00-final-project-a-web-server.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch20-01-single-threaded.md b/src/doc/book/2018-edition/src/ch20-01-single-threaded.md index 118c905b44..30d0884adb 100644 --- a/src/doc/book/2018-edition/src/ch20-01-single-threaded.md +++ b/src/doc/book/2018-edition/src/ch20-01-single-threaded.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch20-01-single-threaded.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch20-02-multithreaded.md b/src/doc/book/2018-edition/src/ch20-02-multithreaded.md index f10a5d5c3e..e8b592ad22 100644 --- a/src/doc/book/2018-edition/src/ch20-02-multithreaded.md +++ b/src/doc/book/2018-edition/src/ch20-02-multithreaded.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch20-02-multithreaded.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/ch20-03-graceful-shutdown-and-cleanup.md b/src/doc/book/2018-edition/src/ch20-03-graceful-shutdown-and-cleanup.md index 5070d1d842..928d199bee 100644 --- a/src/doc/book/2018-edition/src/ch20-03-graceful-shutdown-and-cleanup.md +++ b/src/doc/book/2018-edition/src/ch20-03-graceful-shutdown-and-cleanup.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../ch20-03-graceful-shutdown-and-cleanup.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/2018-edition/src/foreword.md b/src/doc/book/2018-edition/src/foreword.md index 9fb288516d..3af707e354 100644 --- a/src/doc/book/2018-edition/src/foreword.md +++ b/src/doc/book/2018-edition/src/foreword.md @@ -3,7 +3,7 @@ The 2018 edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../index.html) instead. +version of the book](../foreword.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/README.md b/src/doc/book/README.md index 0d485ea56d..0ac1992bbc 100644 --- a/src/doc/book/README.md +++ b/src/doc/book/README.md @@ -1,6 +1,6 @@ # The Rust Programming Language -[![Build Status](https://travis-ci.org/rust-lang/book.svg?branch=master)](https://travis-ci.org/rust-lang/book) +[![Build Status](https://travis-ci.com/rust-lang/book.svg?branch=master)](https://travis-ci.com/rust-lang/book) This repository contains the source of "The Rust Programming Language" book. @@ -19,7 +19,7 @@ releases are updated less frequently. ## Requirements -Building the book requires [mdBook], ideally the same version that +Building the book requires [mdBook], ideally the same 0.2.x version that rust-lang/rust uses in [this file][rust-mdbook]. To get it: [mdBook]: https://github.com/azerupi/mdBook diff --git a/src/doc/book/ci/dictionary.txt b/src/doc/book/ci/dictionary.txt index 3a780fd7ad..52f3b6a0db 100644 --- a/src/doc/book/ci/dictionary.txt +++ b/src/doc/book/ci/dictionary.txt @@ -217,6 +217,7 @@ initializers inline instantiation internet +interoperate IntoIterator InvalidDigit invariants diff --git a/src/doc/book/nostarch/chapter07.md b/src/doc/book/nostarch/chapter07.md deleted file mode 100644 index 14d09a3fd6..0000000000 --- a/src/doc/book/nostarch/chapter07.md +++ /dev/null @@ -1,1015 +0,0 @@ - -[TOC] - -# Managing Growing Projects with Packages, Crates, and Modules - -As you write large programs, organizing your code is important because it’ll -become impossible to keep track of your entire program in your head. By -grouping related functionality and separating code with distinct features, -you’ll clarify where to find code that implements a particular feature and -where to go to change how a feature works. - -The programs we’ve written so far have been in one module in one file. As a -project grows, you can organize code by splitting it into multiple modules and -then multiple files. A package can contain multiple binary crates and -optionally one library crate. As a package grows, you can extract parts into -separate crates that become external dependencies. This chapter covers all -these techniques. For very large projects of a set of interrelated packages -that evolve together, Cargo provides *workspaces*, which we’ll cover in the -section “Cargo Workspaces” in Chapter 14. - -In addition to grouping functionality, encapsulating implementation details -lets you reuse code at a higher level: once you’ve implemented an operation, -other code can call that code via the code’s public interface without knowing -how the implementation works. The way you write code defines which parts are -public for other code to use and which parts are private implementation details -that you reserve the right to change. This is another way to limit the amount -of detail you have to keep in your head. - -A related aspect to organization and encapsulation is *scope*: the nested -context in which code is written has a set of names that are defined as “in -scope.” When reading, writing, and compiling code, programmers and compilers -need to know whether a particular name at a particular spot refers to a -variable, function, struct, enum, module, constant, or other item, and what -that item means. You can create scopes and change which names are in or out of -scope. You can’t have two items with the same name in the same scope; tools are -available to resolve name conflicts. - -Rust has a number of features that allow you to manage your code’s -organization, including which details are exposed and which details are -private, and what names are in each scope in your programs. These features are -sometimes collectively referred to as the *module system* and include: - -* **Packages:** A Cargo feature that lets you build, test, and share crates -* **Crates:** A tree of modules that produces a library or executable -* **Modules** and **use:** Let you control the organization, scope, and - privacy of paths -* **Paths:** A way of naming an item, such as a struct, function, or module - -In this chapter, we’ll cover all these features, discuss how they interact, and -explain how to use them to manage scope. By the end, you should have a solid -understanding of the module system and be able to work with scopes like a pro! - -## Packages and Crates - -The first parts of the module system we’ll cover are *packages* and *crates*. A -*crate* is a binary or library. The *crate root* is a source file that the Rust -compiler starts from and makes up the root module of your crate (we’ll explain -modules in depth in the section “Defining Modules to Control Scope and -Privacy”). A *package* is one or more crates that provide a set of -functionality. A package contains a *Cargo.toml* file that describes how to -build those crates. - -Several rules determine what a package can contain. A package *must* contain -zero or one library crates, and no more. It can contain as many binary crates -as you’d like, but it must contain at least one crate (either library or -binary). - -Let’s walk through what happens when we create a package. First, we enter the -command `cargo new`: - -``` -$ cargo new my-project - Created binary (application) `my-project` package -$ ls my-project -Cargo.toml -src -$ ls my-project/src -main.rs -``` - -When we entered the command, Cargo created a *Cargo.toml* file, giving us a -package. Looking at the contents of *Cargo.toml*, there’s no mention of -*src/main.rs* because Cargo follows a convention that *src/main.rs* is the -crate root of a binary crate with the same name as the package. Likewise, Cargo -knows that if the package directory contains *src/lib.rs*, the package contains -a library crate with the same name as the package, and *src/lib.rs* is its -crate root. Cargo passes the crate root files to `rustc` to build the library -or binary. - -Here, we have a package that only contains *src/main.rs*, meaning it only -contains a binary crate named `my-project`. If a package contains *src/main.rs* -and *src/lib.rs*, it has two crates: a library and a binary, both with the same -name as the package. A package can have multiple binary crates by placing files -in the *src/bin* directory: each file will be a separate binary crate. - -A crate will group related functionality together in a scope so the -functionality is easy to share between multiple projects. For example, the -`rand` crate we used in Chapter 2 provides functionality that generates random -numbers. We can use that functionality in our own projects by bringing the -`rand` crate into our project’s scope. All the functionality provided by the -`rand` crate is accessible through the crate’s name, `rand`. - -Keeping a crate’s functionality in its own scope clarifies whether particular -functionality is defined in our crate or the `rand` crate and prevents -potential conflicts. For example, the `rand` crate provides a trait named -`Rng`. We can also define a `struct` named `Rng` in our own crate. Because a -crate’s functionality is namespaced in its own scope, when we add `rand` as a -dependency, the compiler isn’t confused about what the name `Rng` refers to. In -our crate, it refers to the `struct Rng` that we defined. We would access the -`Rng` trait from the `rand` crate as `rand::Rng`. - -Let’s move on and talk about the module system! - -## Defining Modules to Control Scope and Privacy - -In this section, we’ll talk about modules and other parts of the module system, -namely *paths* that allow you to name items; the `use` keyword that brings a -path into scope; and the `pub` keyword to make items public. We’ll also discuss -using the `as` keyword, external packages, and the glob operator. For now, -let’s focus on modules! - -*Modules* let us organize code within a crate into groups for readability and -easy reuse. Modules also control the *privacy* of items, which is whether an -item can be used by outside code (*public*) or whether it’s an internal -implementation detail and not available for outside use (*private*). - -As an example, let’s write a library crate that provides the functionality of a -restaurant. We’ll define the signatures of functions but leave their bodies -empty to concentrate on the organization of the code rather than actually -implementing a restaurant in code. - -In the restaurant industry, parts of a restaurant are referred to as *front of -house* and others as *back of house*. Front of house is where customers are and -includes hosts seating customers, servers taking orders and payment, and -bartenders making drinks. Back of house includes the chefs and cooks in the -kitchen, dishwashers cleaning up, and managers doing administrative work. - -To structure our crate in the same way that a real restaurant works, we can -organize the functions into nested modules. Create a new library named -`restaurant` by running `cargo new --lib restaurant`; then put the code in -Listing 7-1 into *src/lib.rs* to define some modules and function signatures. - -Filename: src/lib.rs - -``` -mod front_of_house { - mod hosting { - fn add_to_waitlist() {} - - fn seat_at_table() {} - } - - mod serving { - fn take_order() {} - - fn serve_order() {} - - fn take_payment() {} - } -} -``` - -Listing 7-1: A `front_of_house` module containing other modules that then -contain functions - -We define a module by starting with the `mod` keyword, and then specify the -name of the module (in this case, `front_of_house`) and place curly brackets -around the body of the module. Inside modules, we can have other modules, as in -this case with the modules `hosting` and `serving`. Modules can also hold -definitions for other items, such as structs, enums, constants, traits, or as -in Listing 7-1, functions. - -By using modules, we can group related definitions together and name why -they’re related. Programmers using this code would have an easier time finding -the definitions they want to use because they could navigate the code based on -the groups rather than having to read through all the definitions. Programmers -adding new functionality to this code would know where to place the code to -keep the program organized. - -Earlier, we mentioned that *src/main.rs* and *src/lib.rs* are called *crate -roots*. The reason for their name is that the contents of either of these two -files form a module named `crate` at the root of the crate’s module structure, -known as the *module tree*. - -Listing 7-2 shows the module tree for the structure in Listing 7-1. - -``` -crate - └── front_of_house - ├── hosting - │ ├── add_to_waitlist - │ └── seat_at_table - └── serving - ├── take_order - ├── serve_order - └── take_payment -``` - -Listing 7-2: The module tree for the code in Listing 7-1 - -This tree shows how some of the modules nest inside one another (such as -`hosting` nests inside `front_of_house`). The tree also shows how some modules -are *siblings* to each other, meaning they’re defined in the same module -(`hosting` and `serving` are defined within `front_of_house`). To continue the -family metaphor, if module A is contained inside module B, we say that module A -is the *child* of module B, and that module B is the *parent* of module A. -Notice that the entire module tree is rooted under the implicit module named -`crate`. - -The module tree might remind you of the filesystem’s directory tree on your -computer; this is a very apt comparison! Just like directories in a filesystem, -you use modules to organize your code. And just like files in a directory, we -need a way to find our modules. - -## Paths for Referring to an Item in the Module Tree - -To show Rust where to find an item in a module tree, we use a *path* in the -same way we use a path when navigating a filesystem. If we want to call a -function, we need to know its path. - -A *path* can take two forms: - -* An *absolute path* starts from a crate root by using a crate name or a - literal `crate`. -* A *relative path* starts from the current module and uses `self`, `super`, or - an identifier in the current module. - -Both absolute and relative paths are followed by one or more identifiers -separated by double colons (`::`). - -Let’s return to the example in Listing 7-1. How do we call the -`add_to_waitlist` function? This is the same as asking, what’s the path of the -`add_to_waitlist` function? In Listing 7-3, we simplified our code a bit by -removing some of the modules and functions. We’ll show two ways to call the -`add_to_waitlist` function from a new function `eat_at_restaurant` defined in -the crate root. Note that this example won’t compile just yet; we’ll explain -why in a bit. - -Filename: src/lib.rs - -``` -mod front_of_house { - mod hosting { - fn add_to_waitlist() {} - } -} - -pub fn eat_at_restaurant() { - // Absolute path - crate::front_of_house::hosting::add_to_waitlist(); - - // Relative path - front_of_house::hosting::add_to_waitlist(); -} -``` - -Listing 7-3: Calling the `add_to_waitlist` function using absolute and relative -paths - -The first time we call the `add_to_waitlist` function in `eat_at_restaurant`, -we use an absolute path. The `add_to_waitlist` function is defined in the same -crate as `eat_at_restaurant`, which means we can use the `crate` keyword to -start an absolute path. - -After `crate`, we include each of the successive modules until we make our way -to `add_to_waitlist`. You can imagine a filesystem with the same structure, and -we’d specify the path `/front_of_house/hosting/add_to_waitlist` to run the -`add_to_waitlist` program; using the `crate` name to start from the crate root -is like using `/` to start from the filesystem root in your shell. - -The second time we call `add_to_waitlist` in `eat_at_restaurant`, we use a -relative path. The path starts with `front_of_house`, the name of the module -defined at the same level of the module tree as `eat_at_restaurant`. Here the -filesystem equivalent would be using the path -`front_of_house/hosting/add_to_waitlist`. Starting with a name means that the -path is relative. - -Choosing whether to use a relative or absolute path is a decision you’ll make -based on your project. The decision should depend on whether you’re more likely -to move item definition code separately from or together with the code that -uses the item. For example, if we move the `front_of_house` module and the -`eat_at_restaurant` function into a module named `customer_experience`, we’d -need to update the absolute path to `add_to_waitlist`, but the relative path -would still be valid. However, if we moved the `eat_at_restaurant` function -separately into a module named `dining`, the absolute path to the -`add_to_waitlist` call would stay the same, but the relative path would need to -be updated. We tend to specify absolute paths because it’s more likely to move -code definitions and item calls independently of each other. - -Let’s try to compile Listing 7-3 and find out why it won’t compile yet! The -error we get is shown in Listing 7-4. - -``` -$ cargo build - Compiling restaurant v0.1.0 (file:///projects/restaurant) -error[E0603]: module `hosting` is private - --> src/lib.rs:9:28 - | -9 | crate::front_of_house::hosting::add_to_waitlist(); - | ^^^^^^^ - -error[E0603]: module `hosting` is private - --> src/lib.rs:12:21 - | -12 | front_of_house::hosting::add_to_waitlist(); - | ^^^^^^^ -``` - -Listing 7-4: Compiler errors from building the code in Listing 7-3 - -The error messages say that module `hosting` is private. In other words, we -have the correct paths for the `hosting` module and the `add_to_waitlist` -function, but Rust won’t let us use them because it doesn’t have access to the -private sections. - -Modules aren’t only useful for organizing your code, they also define Rust’s -*privacy boundary*: the line that encapsulates the implementation details -external code isn’t allowed to know about, call, or rely on. So, if you want to -make an item like a function or struct private, you put it in a module. - -The way privacy works in Rust is that all items (functions, methods, structs, -enums, modules, and constants) are private by default. Items in a parent module -can’t use the private items inside child modules, but items in child modules -can use the items in their ancestor modules. The reason is that child modules -wrap and hide their implementation details, but the child modules can see the -context in which they’re defined. To continue with the restaurant metaphor, -think of the privacy rules like the back office of a restaurant: what goes on -in there is private to restaurant customers, but office managers can see and do -everything in the restaurant in which they operate. - -Rust chose to have the module system function this way so that hiding inner -implementation details is the default. That way, you know which parts of the -inner code you can change without breaking outer code. But you can expose inner -parts of child modules code to outer ancestor modules by making an item public -using the `pub` keyword. - -### Exposing Paths with the `pub` Keyword - -Let’s return to the error in Listing 7-4 that told us the `hosting` module is -private. We want the `eat_at_restaurant` function in the parent module to have -access to the `add_to_waitlist` function in the child module, so we mark the -`hosting` module with the `pub` keyword, as shown in Listing 7-5. - -Filename: src/lib.rs - -``` -mod front_of_house { - pub mod hosting { - fn add_to_waitlist() {} - } -} - -pub fn eat_at_restaurant() { - // Absolute path - crate::front_of_house::hosting::add_to_waitlist(); - - // Relative path - front_of_house::hosting::add_to_waitlist(); -} -``` - -Listing 7-5: Declaring the `hosting` module as `pub` to use it from -`eat_at_restaurant` - -Unfortunately, the code in Listing 7-5 still results in an error, as shown in -Listing 7-6. - -``` -$ cargo build - Compiling restaurant v0.1.0 (file:///projects/restaurant) -error[E0603]: function `add_to_waitlist` is private - --> src/lib.rs:9:37 - | -9 | crate::front_of_house::hosting::add_to_waitlist(); - | ^^^^^^^^^^^^^^^ - -error[E0603]: function `add_to_waitlist` is private - --> src/lib.rs:12:30 - | -12 | front_of_house::hosting::add_to_waitlist(); - | ^^^^^^^^^^^^^^^ -``` - -Listing 7-6: Compiler errors from building the code in Listing 7-5 - -What happened? Adding the `pub` keyword in front of `mod hosting` makes the -module public. With this change, if we can access `front_of_house`, we can -access `hosting`. But the *contents* of `hosting` are still private; making the -module public doesn’t make its contents public. The `pub` keyword on a module -only lets code in its ancestor modules refer to it. - -The errors in Listing 7-6 say that the `add_to_waitlist` function is private. -The privacy rules apply to structs, enums, functions, and methods as well as -modules. - -Let’s also make the `add_to_waitlist` function public by adding the `pub` -keyword before its definition, as in Listing 7-7. - -Filename: src/lib.rs - -``` -mod front_of_house { - pub mod hosting { - pub fn add_to_waitlist() {} - } -} - -pub fn eat_at_restaurant() { - // Absolute path - crate::front_of_house::hosting::add_to_waitlist(); - - // Relative path - front_of_house::hosting::add_to_waitlist(); -} -``` - -Listing 7-7: Adding the `pub` keyword to `mod hosting` and `fn add_to_waitlist` -lets us call the function from `eat_at_restaurant` - -Now the code will compile! Let’s look at the absolute and the relative path, -and double-check why adding the `pub` keyword lets us use these paths in -`add_to_waitlist` with respect to the privacy rules. - -In the absolute path, we start with `crate`, the root of our crate’s module -tree. Then the `front_of_house` module is defined in the crate root. The -`front_of_house` module isn’t public, but because the `eat_at_restaurant` -function is defined in the same module as `front_of_house` (that is, -`eat_at_restaurant` and `front_of_house` are siblings), we can refer to -`front_of_house` from `eat_at_restaurant`. Next is the `hosting` module marked -with `pub`. We can access the parent module of `hosting`, so we can access -`hosting`. Finally, the `add_to_waitlist` function is marked with `pub` and we -can access its parent module, so this function call works! - -In the relative path, the logic is the same as the absolute path except for the -first step: rather than starting from the crate root, the path starts from -`front_of_house`. The `front_of_house` module is defined within the same module -as `eat_at_restaurant`, so the relative path starting from the module in which -`eat_at_restaurant` is defined works. Then, because `hosting` and -`add_to_waitlist` are marked with `pub`, the rest of the path works and this -function call is valid! - -### Starting Relative Paths with `super` - -We can also construct relative paths that begin in the parent module by using -`super` at the start of the path. This is like starting a filesystem path with -the `..` syntax. Why would we want to do this? - -Consider the code in Listing 7-8 that models the situation in which a chef -fixes an incorrect order and personally brings it out to the customer. The -function `fix_incorrect_order` calls the function `serve_order` by specifying -the path to `serve_order` starting with `super`: - -Filename: src/lib.rs - -``` -fn serve_order() {} - -mod back_of_house { - fn fix_incorrect_order() { - cook_order(); - super::serve_order(); - } - - fn cook_order() {} -} -``` - -Listing 7-8: Calling a function using a relative path starting with `super` - -The `fix_incorrect_order` function is in the `back_of_house` module, so we can -use `super` to go to the parent module of `back_of_house`, which in this case -is `crate`, the root. From there, we look for `serve_order` and find it. -Success! We think the `back_of_house` module and the `serve_order` function are -likely to stay in the same relationship to each other and get moved together -should we decide to reorganize the crate’s module tree. Therefore, we used -`super` so we’ll have fewer places to update code in the future if this code -gets moved to a different module. - -### Making Structs and Enums Public - -We can also use `pub` to designate structs and enums as public, but there are a -few extra details. If we use `pub` before a struct definition, we make the -struct public, but the struct’s fields will still be private. We can make each -field public or not on a case-by-case basis. In Listing 7-9, we’ve defined a -public `back_of_house::Breakfast` struct with a public `toast` field but a -private `seasonal_fruit` field. This models the case in a restaurant where the -customer can pick the type of bread that comes with a meal, but the chef -decides which fruit accompanies the meal based on what’s in season and in -stock. The available fruit changes quickly, so customers can’t choose the fruit -or even see which fruit they’ll get. - -Filename: src/lib.rs - -``` -mod back_of_house { - pub struct Breakfast { - pub toast: String, - seasonal_fruit: String, - } - - impl Breakfast { - pub fn summer(toast: &str) -> Breakfast { - Breakfast { - toast: String::from(toast), - seasonal_fruit: String::from("peaches"), - } - } - } -} - -pub fn eat_at_restaurant() { - // Order a breakfast in the summer with Rye toast - let mut meal = back_of_house::Breakfast::summer("Rye"); - // Change our mind about what bread we'd like - meal.toast = String::from("Wheat"); - println!("I'd like {} toast please", meal.toast); - - // The next line won't compile if we uncomment it; we're not allowed - // to see or modify the seasonal fruit that comes with the meal - // meal.seasonal_fruit = String::from("blueberries"); -} -``` - -Listing 7-9: A struct with some public fields and some private fields - -Because the `toast` field in the `back_of_house::Breakfast` struct is public, -in `eat_at_restaurant` we can write and read to the `toast` field using dot -notation. Notice that we can’t use the `seasonal_fruit` field in -`eat_at_restaurant` because `seasonal_fruit` is private. Try uncommenting the -line modifying the `seasonal_fruit` field value to see what error you get! - -Also, note that because `back_of_house::Breakfast` has a private field, the -struct needs to provide a public associated function that constructs an -instance of `Breakfast` (we’ve named it `summer` here). If `Breakfast` didn’t -have such a function, we couldn’t create an instance of `Breakfast` in -`eat_at_restaurant` because we can’t set the value of the private -`seasonal_fruit` field in `eat_at_restaurant`. - -In contrast, if we make an enum public, all of its variants are then public. We -only need the `pub` before the `enum` keyword, as shown in Listing 7-10. - -Filename: src/lib.rs - -``` -mod back_of_house { - pub enum Appetizer { - Soup, - Salad, - } -} - -pub fn eat_at_restaurant() { - let order1 = back_of_house::Appetizer::Soup; - let order2 = back_of_house::Appetizer::Salad; -} -``` - -Listing 7-10: Designating an enum as public makes all its variants public - -Because we made the `Appetizer` enum public, we can use the `Soup` and `Salad` -variants in `eat_at_restaurant`. Enums aren’t very useful unless their variants -are public; it would be annoying to have to annotate all enum variants with -`pub` in every case, so the default for enum variants is to be public. Structs -are often useful without their fields being public, so struct fields follow the -general rule of everything being private by default unless annotated with `pub`. - -There’s one more situation involving `pub` that we haven’t covered, and that is -our last module system feature: the `use` keyword. We’ll cover `use` by itself -first, and then we’ll show how to combine `pub` and `use`. - -## Bringing Paths into Scope with the `use` Keyword - -It might seem like the paths we’ve written to call functions so far are -inconveniently long and repetitive. For example, in Listing 7-7, whether we -chose the absolute or relative path to the `add_to_waitlist` function, every -time we wanted to call `add_to_waitlist` we had to specify `front_of_house` and -`hosting` too. Fortunately, there’s a way to simplify this process. We can -bring a path into a scope once and then call the items in that path as if -they’re local items with the `use` keyword. - -In Listing 7-11, we bring the `crate::front_of_house::hosting` module into the -scope of the `eat_at_restaurant` function so we only have to specify -`hosting::add_to_waitlist` to call the `add_to_waitlist` function in -`eat_at_restaurant`. - -Filename: src/lib.rs - -``` -mod front_of_house { - pub mod hosting { - pub fn add_to_waitlist() {} - } -} - -use crate::front_of_house::hosting; - -pub fn eat_at_restaurant() { - hosting::add_to_waitlist(); - hosting::add_to_waitlist(); - hosting::add_to_waitlist(); -} -``` - -Listing 7-11: Bringing a module into scope with `use` - -Adding `use` and a path in a scope is similar to creating a symbolic link in -the filesystem. By adding `use crate::front_of_house::hosting` in the crate -root, `hosting` is now a valid name in that scope, just as though the `hosting` -module had been defined in the crate root. Paths brought into scope with `use` -also check privacy, like any other paths. - -Specifying a relative path with `use` is slightly different. Instead of -starting from a name in the current scope, we must start the path given to -`use` with the keyword `self`. Listing 7-12 shows how to specify a relative -path to get the same behavior as Listing 7-11. - -Filename: src/lib.rs - -``` -mod front_of_house { - pub mod hosting { - pub fn add_to_waitlist() {} - } -} - -use self::front_of_house::hosting; - -pub fn eat_at_restaurant() { - hosting::add_to_waitlist(); - hosting::add_to_waitlist(); - hosting::add_to_waitlist(); -} -``` - -Listing 7-12: Bringing a module into scope with `use` and a relative path -starting with `self` - -Note that using `self` in this way might not be necessary in the future; it’s -an inconsistency in the language that Rust developers are working to eliminate. - -### Creating Idiomatic `use` Paths - -In Listing 7-11, you might have wondered why we specified `use -crate::front_of_house::hosting` and then called `hosting::add_to_waitlist` in -`eat_at_restaurant` rather than specifying the `use` path all the way out to -the `add_to_waitlist` function to achieve the same result, as in Listing 7-13. - -Filename: src/lib.rs - -``` -mod front_of_house { - pub mod hosting { - pub fn add_to_waitlist() {} - } -} - -use crate::front_of_house::hosting::add_to_waitlist; - -pub fn eat_at_restaurant() { - add_to_waitlist(); - add_to_waitlist(); - add_to_waitlist(); -} -``` - -Listing 7-13: Bringing the `add_to_waitlist` function into scope with `use`, -which is unidiomatic - -Although both Listing 7-11 and 7-13 accomplish the same task, Listing 7-11 is -the idiomatic way to bring a function into scope with `use`. Bringing the -function’s parent module into scope with `use` so we have to specify the parent -module when calling the function makes it clear that the function isn’t locally -defined while still minimizing repetition of the full path. The code in Listing -7-13 is unclear as to where `add_to_waitlist` is defined. - -On the other hand, when bringing in structs, enums, and other items with `use`, -it’s idiomatic to specify the full path. Listing 7-14 shows the idiomatic way -to bring the standard library’s `HashMap` struct into the scope of a binary -crate. - -Filename: src/main.rs - -``` -use std::collections::HashMap; - -fn main() { - let mut map = HashMap::new(); - map.insert(1, 2); -} -``` - -Listing 7-14: Bringing `HashMap` into scope in an idiomatic way - -There’s no strong reason behind this idiom: it’s just the convention that has -emerged, and folks have gotten used to reading and writing Rust code this way. - -The exception to this idiom is if we’re bringing two items with the same name -into scope with `use` statements, because Rust doesn’t allow that. Listing 7-15 -shows how to bring two `Result` types into scope that have the same name but -different parent modules and how to refer to them. - -Filename: src/lib.rs - -``` -use std::fmt; -use std::io; - -fn function1() -> fmt::Result { -} - -fn function2() -> io::Result<()> { -} -``` - -Listing 7-15: Bringing two types with the same name into the same scope -requires using their parent modules. - -As you can see, using the parent modules distinguishes the two `Result` types. -If instead we specified `use std::fmt::Result` and `use std::io::Result`, we’d -have two `Result` types in the same scope and Rust wouldn’t know which one we -meant when we used `Result`. Try it and see what compiler error you get! - -### Providing New Names with the `as` Keyword - -There’s another solution to the problem of bringing two types of the same name -into the same scope with `use`: after the path, we can specify `as` and a new -local name, or alias, for the type. Listing 7-16 shows another way to write the -code in Listing 7-15 by renaming one of the two `Result` types using `as`. - -Filename: src/lib.rs - -``` -use std::fmt::Result; -use std::io::Result as IoResult; - -fn function1() -> Result { -} - -fn function2() -> IoResult<()> { -} -``` - -Listing 7-16: Renaming a type when it’s brought into scope with the `as` keyword - -In the second `use` statement, we chose the new name `IoResult` for the -`std::io::Result` type, which won’t conflict with the `Result` from `std::fmt` -that we’ve also brought into scope. Listing 7-15 and Listing 7-16 are -considered idiomatic, so the choice is up to you! - -### Re-exporting Names with `pub use` - -When we bring a name into scope with the `use` keyword, the name available in -the new scope is private. To enable the code that calls our code to refer to -that name as if it had been defined in that code’s scope, we can combine `pub` -and `use`. This technique is called *re-exporting* because we’re bringing -an item into scope but also making that item available for others to bring into -their scope. - -Listing 7-17 shows the code in Listing 7-11 with `use` in the root module -changed to `pub use`. - -Filename: src/lib.rs - -``` -mod front_of_house { - pub mod hosting { - pub fn add_to_waitlist() {} - } -} - -pub use crate::front_of_house::hosting; - -pub fn eat_at_restaurant() { - hosting::add_to_waitlist(); - hosting::add_to_waitlist(); - hosting::add_to_waitlist(); -} -``` - -Listing 7-17: Making a name available for any code to use from a new scope with -`pub use` - -By using `pub use`, external code can now call the `add_to_waitlist` function -using `hosting::add_to_waitlist`. If we hadn’t specified `pub use`, the -`eat_at_restaurant` function could call `hosting::add_to_waitlist` in its scope -but external code couldn’t take advantage of this new path. - -Re-exporting is useful when the internal structure of your code is different -than the way programmers calling your code would think about the domain. For -example, in this restaurant metaphor, the people running the restaurant think -about “front of house” and “back of house.” But customers visiting a restaurant -probably won’t think about the parts of the restaurant in those terms. With -`pub use`, we can write our code with one structure but expose a different -structure. Doing so makes our library well organized for programmers working on -the library and programmers calling the library. - -### Using External Packages - -In Chapter 2, we programmed a guessing game project that used an external -package called `rand` to get random numbers. To use `rand` in our project, we -added this line to *Cargo.toml*: - -Filename: Cargo.toml - -``` -[dependencies] -rand = "0.5.5" -``` - -Adding `rand` as a dependency in *Cargo.toml* tells Cargo to download the -`rand` package and any dependencies from *https://crates.io* and make `rand` -available to our project. - -Then, to bring `rand` definitions into the scope of our package, we added a -`use` line starting with the name of the package, `rand`, and listing the items -we wanted to bring into scope. Recall that in the section “Generating a Random -Number” in Chapter 2, we brought the `Rng` trait into scope and called the -`rand::thread_rng` function: - -``` -use rand::Rng; -fn main() { - let secret_number = rand::thread_rng().gen_range(1, 101); -} -``` - -Members of the Rust community have made many packages available at -*https://crates.io*, and pulling any of them into your package involves these -same steps: listing them in your package’s *Cargo.toml* file and using `use` to -bring items into scope. - -Note that the standard library (`std`) is also a crate that’s external to our -package. Because the standard library is shipped with the Rust language, we -don’t need to change *Cargo.toml* to include `std`. But we do need to refer to -it with `use` to bring items from there into our package’s scope. For example, -with `HashMap` we would use this line: - -``` -use std::collections::HashMap; -``` - -This is an absolute path starting with `std`, the name of the standard library -crate. - -### Using Nested Paths to Clean Up Large `use` Lists - -If we’re using multiple items defined in the same package or same module, -listing each item on its own line can take up a lot of vertical space in our -files. For example, these two `use` statements we had in Listing 2-4 in the -Guessing Game bring items from `std` into scope: - -Filename: src/main.rs - -``` -use std::cmp::Ordering; -use std::io; -// ---snip--- -``` - -Instead, we can use nested paths to bring the same items into scope in one -line. We do this by specifying the common part of the path, followed by two -colons, and then curly brackets around a list of the parts of the paths that -differ, as shown in Listing 7-18. - -Filename: src/main.rs - -``` -use std::{cmp::Ordering, io}; -// ---snip--- -``` - -Listing 7-18: Specifying a nested path to bring multiple items with the same -prefix into scope - -In bigger programs, bringing many items into scope from the same package or -module using nested paths can reduce the number of separate `use` statements -needed by a lot! - -We can use a nested path at any level in a path, which is useful when combining -two `use` statements that share a subpath. For example, Listing 7-19 shows two -`use` statements: one that brings `std::io` into scope and one that brings -`std::io::Write` into scope. - -Filename: src/lib.rs - -``` -use std::io; -use std::io::Write; -``` - -Listing 7-19: Two `use` statements where one is a subpath of the other - -The common part of these two paths is `std::io`, and that’s the complete first -path. To merge these two paths into one `use` statement, we can use `self` in -the nested path, as shown in Listing 7-20. - -Filename: src/lib.rs - -``` -use std::io::{self, Write}; -``` - -Listing 7-20: Combining the paths in Listing 7-19 into one `use` statement - -This line brings `std::io` and `std::io::Write` into scope. - -### The Glob Operator - -If we want to bring *all* public items defined in a path into scope, we can -specify that path followed by `*`, the glob operator: - -``` -use std::collections::*; -``` - -This `use` statement brings all public items defined in `std::collections` into -the current scope. Be careful when using the glob operator! Glob can make it -harder to tell what names are in scope and where a name used in your program -was defined. - -The glob operator is often used when testing to bring everything under test -into the `tests` module; we’ll talk about that in the section “How to Write -Tests” in Chapter 11. The glob operator is also sometimes used as part of the -prelude pattern: see the standard library documentation at -*https://doc.rust-lang.org/stable/std/prelude/index.html#other-preludes* for -more information on that pattern. - -## Separating Modules into Different Files - -So far, all the examples in this chapter defined multiple modules in one file. -When modules get large, you might want to move their definitions to a separate -file to make the code easier to navigate. - -For example, let’s start from the code in Listing 7-17 and move the -`front_of_house` module to its own file *src/front_of_house.rs* by changing the -crate root file so it contains the code shown in Listing 7-21. In this case, -the crate root file is *src/lib.rs*, but this procedure also works with binary -crates whose crate root file is *src/main.rs*. - -Filename: src/lib.rs - -``` -mod front_of_house; - -pub use crate::front_of_house::hosting; - -pub fn eat_at_restaurant() { - hosting::add_to_waitlist(); - hosting::add_to_waitlist(); - hosting::add_to_waitlist(); -} -``` - -Listing 7-21: Declaring the `front_of_house` module whose body will be in -*src/front_of_house.rs* - -And *src/front_of_house.rs* gets the definitions from the body of the -`front_of_house` module, as shown in Listing 7-22. - -Filename: src/front_of_house.rs - -``` -pub mod hosting { - pub fn add_to_waitlist() {} -} -``` - -Listing 7-22: Definitions inside the `front_of_house` module in -*src/front_of_house.rs* - -Using a semicolon after `mod front_of_house` rather than using a block tells -Rust to load the contents of the module from another file with the same name as -the module. To continue with our example and extract the `hosting` module to -its own file as well, we change *src/front_of_house.rs* to contain only the -declaration of the `hosting` module: - -Filename: src/front_of_house.rs - -``` -pub mod hosting; -``` - -Then we create a *src/front_of_house* directory and a file -*src/front_of_house/hosting.rs* to contain the definitions made in the -`hosting` module: - -Filename: src/front_of_house/hosting.rs - -``` -pub fn add_to_waitlist() {} -``` - -The module tree remains the same, and the function calls in `eat_at_restaurant` -will work without any modification, even though the definitions live in -different files. This technique lets you move modules to new files as they grow -in size. - -Note that the `pub use crate::front_of_house::hosting` statement in -*src/lib.rs* also hasn’t changed, nor does `use` have any impact on what files -are compiled as part of the crate. The `mod` keyword declares modules, and Rust -looks in a file with the same name as the module for the code that goes into -that module. - -## Summary - -Rust lets you organize your packages into crates and your crates into modules -so you can refer to items defined in one module from another module. You can do -this by specifying absolute or relative paths. These paths can be brought into -scope with a `use` statement so you can use a shorter path for multiple uses of -the item in that scope. Module code is private by default, but you can make -definitions public by adding the `pub` keyword. - -In the next chapter, we’ll look at some collection data structures in the -standard library that you can use in your neatly organized code. - diff --git a/src/doc/book/nostarch/chapter08-error-message-updates.md b/src/doc/book/nostarch/chapter08-error-message-updates.md deleted file mode 100644 index 8a7e3b9943..0000000000 --- a/src/doc/book/nostarch/chapter08-error-message-updates.md +++ /dev/null @@ -1,15 +0,0 @@ -Please replace the error message on page 133 with this one: - -``` -error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable - --> src/main.rs:6:5 - | -4 | let first = &v[0]; - | - immutable borrow occurs here -5 | -6 | v.push(6); - | ^^^^^^^^^ mutable borrow occurs here -7 | -8 | println!("The first element is: {}", first); - | ----- immutable borrow later used here -``` diff --git a/src/doc/book/nostarch/chapter08-listing-8-5.md b/src/doc/book/nostarch/chapter08-listing-8-5.md deleted file mode 100644 index 7af3c6acf4..0000000000 --- a/src/doc/book/nostarch/chapter08-listing-8-5.md +++ /dev/null @@ -1,13 +0,0 @@ -Please replace the code in Listing 8-5 with this code: - -``` -let v = vec![1, 2, 3, 4, 5]; - -let third: &i32 = &v[2]; -println!("The third element is {}", third); - -match v.get(2) { - Some(third) => println!("The third element is {}", third), - None => println!("There is no third element."), -} -``` \ No newline at end of file diff --git a/src/doc/book/nostarch/chapter09-error-message-updates.md b/src/doc/book/nostarch/chapter09-error-message-updates.md deleted file mode 100644 index bce8976bd5..0000000000 --- a/src/doc/book/nostarch/chapter09-error-message-updates.md +++ /dev/null @@ -1,47 +0,0 @@ -Please use the following message instead of the error message on page 161. - -``` -error[E0277]: the `?` operator can only be used in a function that returns -`Result` or `Option` (or another type that implements `std::ops::Try`) - --> src/main.rs:4:13 - | -4 | let f = File::open("hello.txt")?; - | ^^^^^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a - function that returns `()` - | - = help: the trait `std::ops::Try` is not implemented for `()` - = note: required by `std::ops::Try::from_error` -``` - ---- - -Then, please replace the highlighted paragraph on page 161 with this text: - -This error points out that we’re only allowed to use the `?` operator in a -function that returns `Result`. When you’re writing code in a function -that doesn’t return `Result`, and you want to use `?` when you call other -functions that return `Result`, you have two choices to fix this problem. -One technique is to change the return type of your function to be `Result` if you have no restrictions preventing that. The other technique is to use -a `match` or one of the `Result` methods to handle the `Result` in -whatever way is appropriate. - -The `main` function is special, and there are restrictions on what its return -type must be. One valid return type for main is `()`, and conveniently, another -valid return type is `Result`, as shown here: - -``` -use std::error::Error; -use std::fs::File; - -fn main() -> Result<(), Box> { - let f = File::open("hello.txt")?; - - Ok(()) -} -``` - -The `Box` type is called a *trait object*, which we’ll talk -about in the section “Using Trait Objects that Allow for Values of Different -Types” in Chapter 17. For now, you can read `Box` to mean “any -kind of error.” Using `?` in a `main` function with this return type is allowed. diff --git a/src/doc/book/nostarch/chapter09-listing-9-2-update.md b/src/doc/book/nostarch/chapter09-listing-9-2-update.md deleted file mode 100644 index bef9dcde70..0000000000 --- a/src/doc/book/nostarch/chapter09-listing-9-2-update.md +++ /dev/null @@ -1,50 +0,0 @@ -Please replace the text of Listing 9-2 on page 152-153 with this text: - -``` -$ RUST_BACKTRACE=1 cargo run - Finished dev [unoptimized + debuginfo] target(s) in 0.00s - Running `target/debug/panic` -thread 'main' panicked at 'index out of bounds: the len is 3 but the index is 99', libcore/slice/mod.rs:2448:10 -stack backtrace: - 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace - at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 - 1: std::sys_common::backtrace::print - at libstd/sys_common/backtrace.rs:71 - at libstd/sys_common/backtrace.rs:59 - 2: std::panicking::default_hook::{{closure}} - at libstd/panicking.rs:211 - 3: std::panicking::default_hook - at libstd/panicking.rs:227 - 4: as core::panic::BoxMeUp>::get - at libstd/panicking.rs:476 - 5: std::panicking::continue_panic_fmt - at libstd/panicking.rs:390 - 6: std::panicking::try::do_call - at libstd/panicking.rs:325 - 7: core::ptr::drop_in_place - at libcore/panicking.rs:77 - 8: core::ptr::drop_in_place - at libcore/panicking.rs:59 - 9: >::index - at libcore/slice/mod.rs:2448 - 10: core::slice:: for [T]>::index - at libcore/slice/mod.rs:2316 - 11: as core::ops::index::Index>::index - at liballoc/vec.rs:1653 - 12: panic::main - at src/main.rs:4 - 13: std::rt::lang_start::{{closure}} - at libstd/rt.rs:74 - 14: std::panicking::try::do_call - at libstd/rt.rs:59 - at libstd/panicking.rs:310 - 15: macho_symbol_search - at libpanic_unwind/lib.rs:102 - 16: std::alloc::default_alloc_error_hook - at libstd/panicking.rs:289 - at libstd/panic.rs:392 - at libstd/rt.rs:58 - 17: std::rt::lang_start - at libstd/rt.rs:74 - 18: panic::main -``` diff --git a/src/doc/book/nostarch/chapter09-listing-9-5-update.md b/src/doc/book/nostarch/chapter09-listing-9-5-update.md deleted file mode 100644 index c5163cd632..0000000000 --- a/src/doc/book/nostarch/chapter09-listing-9-5-update.md +++ /dev/null @@ -1,21 +0,0 @@ -Please replace the text of Listing 9-5 on page 156 with this text: - -``` -use std::fs::File; -use std::io::ErrorKind; - -fn main() { - let f = File::open("hello.txt"); - - let f = match f { - Ok(file) => file, - Err(error) => match error.kind() { - ErrorKind::NotFound => match File::create("hello.txt") { - Ok(fc) => fc, - Err(e) => panic!("Tried to create file but there was a problem: {:?}", e), - }, - other_error => panic!("There was a problem opening the file: {:?}", other_error), - }, - }; -} -``` \ No newline at end of file diff --git a/src/doc/book/nostarch/chapter09-match-update.md b/src/doc/book/nostarch/chapter09-match-update.md deleted file mode 100644 index 91998c521f..0000000000 --- a/src/doc/book/nostarch/chapter09-match-update.md +++ /dev/null @@ -1,39 +0,0 @@ -Please enter this text to replace the highlighted text that starts with -“However,” at the bottom of page 156 and top of page 157. - ---- - -However, because `File::create` could also fail, we need a second arm in the -inner `match` expression. When the file can’t be created, a different error -message is printed. The second arm of the outer `match` stays the same, so the -program panics on any error besides the missing file error. - -That’s a lot of `match`! The `match` expression is very useful but also very -much a primitive. In Chapter 13, you’ll learn about closures; the `Result` type has many methods that accept a closure and are implemented using -`match` expressions. Using those methods will make your code more concise. A -more seasoned Rustacean might write this code instead of Listing 9-5: - -``` -use std::fs::File; -use std::io::ErrorKind; - -fn main() { - let f = File::open("hello.txt").unwrap_or_else(|error| { - if error.kind() == ErrorKind::NotFound { - File::create("hello.txt").unwrap_or_else(|error| { - panic!("Tried to create file but there was a problem: {:?}", -error); - }) - } else { - panic!("There was a problem opening the file: {:?}", error); - } - }); -} -``` - -Although this code has the same behavior as Listing 9-5, it doesn’t contain any -`match` expressions and is cleaner to read. Come back to this example after -you’ve read Chapter 13, and look up the `unwrap_or_else` method in the standard -library documentation. Many more of these methods can clean up huge nested -`match` expressions when you’re dealing with errors. diff --git a/src/doc/book/nostarch/chapter09-read-to-string-update.md b/src/doc/book/nostarch/chapter09-read-to-string-update.md deleted file mode 100644 index 6441cbe7da..0000000000 --- a/src/doc/book/nostarch/chapter09-read-to-string-update.md +++ /dev/null @@ -1,28 +0,0 @@ -Please insert this text after the paragraph ending in “ergonomic way to write -it” on page 160. - ---- - -Speaking of different ways to write this function, Listing 9-9 shows that -there’s a way to make this even shorter. - -Filename: src/main.rs - -``` -use std::io; -use std::fs; - -fn read_username_from_file() -> Result { - fs::read_to_string("hello.txt") -} -``` - -Listing 9-9: Using `fs::read_to_string` instead of opening and then reading the -file - -Reading a file into a string is a fairly common operation, so Rust provides the -convenient `fs::read_to_string` function that opens the file, creates a new -`String`, reads the contents of the file, puts the contents into that `String`, -and returns it. Of course, using `fs::read_to_string` doesn’t give us the -opportunity to explain all the error handling, so we did it the longer way -first. diff --git a/src/doc/book/nostarch/chapter10-traits-as-parameters.md b/src/doc/book/nostarch/chapter10-traits-as-parameters.md deleted file mode 100644 index daa779322b..0000000000 --- a/src/doc/book/nostarch/chapter10-traits-as-parameters.md +++ /dev/null @@ -1,174 +0,0 @@ -Please replace the “Trait Bounds” section on page 182-183 with this text, which -should then be followed by the existing “Fixing the largest Function with Trait -Bounds” section. - -### Traits as Parameters - -Now that you know how to define and implement traits, we can explore how to use -traits to define functions that accept many different types. - -For example, in Listing 10-13, we implemented the `Summary` trait on the -`NewsArticle` and `Tweet` types. We can define a `notify` function that calls -the `summarize` method on its `item` parameter, which is of some type that -implements the `Summary` trait. To do this, we can use the `impl Trait` -syntax, like this: - -``` -pub fn notify(item: impl Summary) { - println!("Breaking news! {}", item.summarize()); -} -``` - -Instead of a concrete type for the `item` parameter, we specify the `impl` -keyword and the trait name. This parameter accepts any type that implements the -specified trait. In the body of `notify`, we can call any methods on `item` -that come from the `Summary` trait, such as `summarize`. We can call `notify` -and pass in any instance of `NewsArticle` or `Tweet`. Code that calls the -function with any other type, such as a `String` or an `i32`, won’t compile -because those types don’t implement `Summary`. - -#### Trait Bound Syntax - -The `impl Trait` syntax works for straightforward cases but is actually -syntax sugar for a longer form, which is called a *trait bound*; it looks like -this: - -``` -pub fn notify(item: T) { - println!("Breaking news! {}", item.summarize()); -} -``` - -This longer form is equivalent to the example in the previous section but is -more verbose. We place trait bounds with the declaration of the generic type -parameter after a colon and inside angle brackets. - -The `impl Trait` syntax is convenient and makes for more concise code in simple -cases. The trait bound syntax can express more complexity in other cases. For -example, we can have two parameters that implement `Summary`. Using the `impl -Trait` syntax looks like this: - -``` -pub fn notify(item1: impl Summary, item2: impl Summary) { -``` - -If we wanted this function to allow `item1` and `item2` to have different -types, using `impl Trait` would be appropriate (as long as both types implement -`Summary`). If we wanted to force both parameters to have the same type, that’s -only possible to express using a trait bound, like this: - -``` -pub fn notify(item1: T, item2: T) { -``` - -The generic type `T` specified as the type of the `item1` and `item2` -parameters constrains the function such that the concrete type of the value -passed as an argument for `item1` and `item2` must be the same. - -#### Specifying Multiple Trait Bounds with the `+` Syntax - -We can also specify more than one trait bound. Say we wanted `notify` to use -display formatting on `item` as well as the `summarize` method: we specify in -the `notify` definition that `item` must implement both `Display` and -`Summary`. We can do so using the `+` syntax: - -``` -pub fn notify(item: impl Summary + Display) { -``` - -The `+` syntax is also valid with trait bounds on generic types: - -``` -pub fn notify(item: T) { -``` - -With the two trait bounds specified, the body of `notify` can call `summarize` -and use `{}` to format `item`. - -#### Clearer Trait Bounds with `where` Clauses - -Using too many trait bounds has its downsides. Each generic has its own trait -bounds, so functions with multiple generic type parameters can contain lots of -trait bound information between the function’s name and its parameter list, -making the function signature hard to read. For this reason, Rust has alternate -syntax for specifying trait bounds inside a `where` clause after the function -signature. So instead of writing this: - -``` -fn some_function(t: T, u: U) -> i32 { -``` - -we can use a `where` clause, like this: - -``` -fn some_function(t: T, u: U) -> i32 - where T: Display + Clone, - U: Clone + Debug -{ -``` - -This function’s signature is less cluttered: the function name, parameter list, -and return type are close together, similar to a function without lots of trait -bounds. - -### Returning Types that Implement Traits - -We can also use the `impl Trait` syntax in the return position to return a -value of some type that implements a trait, as shown here: - -``` -fn returns_summarizable() -> impl Summary { - Tweet { - username: String::from("horse_ebooks"), - content: String::from("of course, as you probably already know, -people"), - reply: false, - retweet: false, - } -} -``` - -By using `impl Summary` for the return type, we specify that the -`returns_summarizable` function returns some type that implements the `Summary` -trait without naming the concrete type. In this case, `returns_summarizable` -returns a `Tweet`, but the code calling this function doesn’t know that. - -The ability to return a type that is only specified by the trait it implements -is especially useful in the context of closures and iterators, which we cover -in Chapter 13. Closures and iterators create types that only the compiler knows -or types that are very long to specify. The `impl Trait` syntax lets you -concisely specify that a function returns some type that implements the -`Iterator` trait without needing to write out a very long type. - -However, you can only use `impl Trait` if you’re returning a single type. For -example, this code that returns either a `NewsArticle` or a `Tweet` with the -return type specified as `impl Summary` wouldn’t work: - -``` -fn returns_summarizable(switch: bool) -> impl Summary { - if switch { - NewsArticle { - headline: String::from("Penguins win the Stanley Cup -Championship!"), - location: String::from("Pittsburgh, PA, USA"), - author: String::from("Iceburgh"), - content: String::from("The Pittsburgh Penguins once again are the -best - hockey team in the NHL."), - } - } else { - Tweet { - username: String::from("horse_ebooks"), - content: String::from("of course, as you probably already know, -people"), - reply: false, - retweet: false, - } - } -} -``` - -Returning either a `NewsArticle` or a `Tweet` isn’t allowed due to restrictions -around how the `impl Trait` syntax is implemented in the compiler. We’ll cover -how to write a function with this behavior in the section “Using Trait Objects -that Allow for Values of Different Types” in Chapter 17 on page XX. diff --git a/src/doc/book/nostarch/updates.md b/src/doc/book/nostarch/updates.md new file mode 100644 index 0000000000..f4ab6f0f9c --- /dev/null +++ b/src/doc/book/nostarch/updates.md @@ -0,0 +1,32 @@ +Welcome to The Rust Programming Language book! This version of the text assumes +you are using Rust 1.31.0 or later, with `edition="2018"` in *Cargo.toml* of +all projects to use Rust 2018 Edition idioms. See the “Installation” section of +Chapter 1 to install or update Rust, and see the new Appendix E for information +on what editions of Rust are. + +The 2018 Edition of the Rust language includes a number of improvements to make +Rust more ergonomic and easier to learn. This printing of the book has a number +of changes to reflect the improvements: + +- Chapter 7, "Managing Growing Projects with Packages, Crates, and Modules", + has been mostly rewritten. The module system and the way paths work in the + 2018 Edition have been made more consistent. +- Chapter 10 has new sections titled "Traits as Parameters" and "Returning + Types that Implement Traits" that explain the new `impl Trait` syntax. +- Chapter 11 has a new section "Using `Result` in Tests" that shows how + to write tests that can use the `?` operator. +- The "Advanced Lifetimes" section of Chapter 19 has been removed as compiler + improvements have made the constructs in that section even more rare. +- The previous Appendix D on macros has been expanded to include procedural + macros, and has been moved to the "Macros" section in Chapter 19. +- Appendix A, "Keywords", also explains the new raw identifiers feature that + enables code written in Rust 2015 and Rust 2018 to interoperate. +- Appendix D now covers useful development tools that have been recently + released. +- We fixed a number of small errors and imprecise wording throughout the book. + Thank you to the readers who reported them! + +Note that any code in the first printing of *The Rust Programming Language* +that compiled will continue to compile without `edition="2018"` in the +project's *Cargo.toml*, even as you update the version of the Rust compiler +that you're using. That's Rust's backwards compatibility guarantees at work! \ No newline at end of file diff --git a/src/doc/book/nostarch/version-note.md b/src/doc/book/nostarch/version-note.md deleted file mode 100644 index 60538cea55..0000000000 --- a/src/doc/book/nostarch/version-note.md +++ /dev/null @@ -1,9 +0,0 @@ -Somewhere in the frontmatter, possibly just before the introduction? we'd like the following note about the version and edition of Rust used for this printing of the book. We're open to other locations if you think somewhere else would be best. - -## Note on Rust Version and Edition - -This version of the text assumes you are using Rust 1.31.0 or later, with -`edition="2018"` in *Cargo.toml* of all projects to use Rust 2018 Edition -idioms. See the "Installation" section of Chapter 1 on page XX to install or -update Rust, and see Appendix E on page XX for information on what editions of -Rust are. diff --git a/src/doc/book/redirects/lifetimes.md b/src/doc/book/redirects/lifetimes.md index c7da13d7a0..21ddb38ce8 100644 --- a/src/doc/book/redirects/lifetimes.md +++ b/src/doc/book/redirects/lifetimes.md @@ -21,10 +21,8 @@ Here are the relevant sections in the new and old books: * **[in the current edition: Ch 10.03 — Lifetimes][2]** -* [in the current edition: Ch 19.02 — Advanced Lifetimes][3] * [In the first edition: Ch 3.10 — Lifetimes][1] [1]: https://doc.rust-lang.org/1.30.0/book/first-edition/lifetimes.html [2]: ch10-03-lifetime-syntax.html -[3]: ch19-02-advanced-lifetimes.html diff --git a/src/doc/book/second-edition/src/ch19-02-advanced-lifetimes.md b/src/doc/book/second-edition/src/ch19-02-advanced-lifetimes.md index 36c5bb8b96..374382886b 100644 --- a/src/doc/book/second-edition/src/ch19-02-advanced-lifetimes.md +++ b/src/doc/book/second-edition/src/ch19-02-advanced-lifetimes.md @@ -3,7 +3,7 @@ The second edition of the book is no longer distributed with Rust's documentation. If you came here via a link or web search, you may want to check out [the current -version of the book](../ch19-02-advanced-lifetimes.html) instead. +version of the book](../index.html) instead. If you have an internet connection, you can [find a copy distributed with Rust diff --git a/src/doc/book/src/SUMMARY.md b/src/doc/book/src/SUMMARY.md index 26eac3015e..a9b8feb00a 100644 --- a/src/doc/book/src/SUMMARY.md +++ b/src/doc/book/src/SUMMARY.md @@ -115,7 +115,6 @@ - [Advanced Features](ch19-00-advanced-features.md) - [Unsafe Rust](ch19-01-unsafe-rust.md) - - [Advanced Lifetimes](ch19-02-advanced-lifetimes.md) - [Advanced Traits](ch19-03-advanced-traits.md) - [Advanced Types](ch19-04-advanced-types.md) - [Advanced Functions and Closures](ch19-05-advanced-functions-and-closures.md) diff --git a/src/doc/book/src/appendix-06-translation.md b/src/doc/book/src/appendix-06-translation.md index 62fdef443d..dee8e6f221 100644 --- a/src/doc/book/src/appendix-06-translation.md +++ b/src/doc/book/src/appendix-06-translation.md @@ -11,7 +11,7 @@ For resources in languages other than English. Most are still in progress; see - [Українська](https://github.com/pavloslav/rust-book-uk-ua) - [Español](https://github.com/thecodix/book), [alternate](https://github.com/ManRR/rust-book-es) - [Italiano](https://github.com/AgeOfWar/rust-book-it) -- [Русский](https://github.com/iDeBugger/rust-book-ru) +- [Русский](https://github.com/ruRust/rust_book_2ed) - [한국어](https://github.com/rinthel/rust-lang-book-ko) - [日本語](https://github.com/hazama-yuinyan/book) - [Français](https://github.com/quadrifoglio/rust-book-fr) diff --git a/src/doc/book/src/ch01-01-installation.md b/src/doc/book/src/ch01-01-installation.md index e03a50d427..9061389e6d 100644 --- a/src/doc/book/src/ch01-01-installation.md +++ b/src/doc/book/src/ch01-01-installation.md @@ -71,11 +71,11 @@ On Windows, go to [https://www.rust-lang.org/tools/install][install] and follow the instructions for installing Rust. At some point in the installation, you’ll receive a message explaining that you’ll also need the C++ build tools for Visual Studio 2013 or later. The easiest way to acquire the build tools is to -install [Build Tools for Visual Studio 2017][visualstudio]. The tools are in +install [Build Tools for Visual Studio 2019][visualstudio]. The tools are in the Other Tools and Frameworks section. [install]: https://www.rust-lang.org/tools/install -[visualstudio]: https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017 +[visualstudio]: https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2019 The rest of this book uses commands that work in both *cmd.exe* and PowerShell. If there are specific differences, we’ll explain which to use. @@ -115,14 +115,12 @@ rustc x.y.z (abcabcabc yyyy-mm-dd) If you see this information, you have installed Rust successfully! If you don’t see this information and you’re on Windows, check that Rust is in your `%PATH%` system variable. If that’s all correct and Rust still isn’t working, there are -a number of places you can get help. The easiest is [the #rust IRC channel on -irc.mozilla.org][irc], which you can access through -[Mibbit][mibbit]. At that address you can chat with other Rustaceans (a silly -nickname we call ourselves) who can help you out. Other great resources include -[the Users forum][users] and [Stack Overflow][stackoverflow]. - -[irc]: irc://irc.mozilla.org/#rust -[mibbit]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust +a number of places you can get help. The easiest is the #beginners channel on +[the official Rust Discord][discord]. There, you can chat with other Rustaceans +(a silly nickname we call ourselves) who can help you out. Other great +resources include [the Users forum][users] and [Stack Overflow][stackoverflow]. + +[discord]: https://discord.gg/rust-lang [users]: https://users.rust-lang.org/ [stackoverflow]: http://stackoverflow.com/questions/tagged/rust diff --git a/src/doc/book/src/ch03-02-data-types.md b/src/doc/book/src/ch03-02-data-types.md index 7111284d92..02fcf5d66b 100644 --- a/src/doc/book/src/ch03-02-data-types.md +++ b/src/doc/book/src/ch03-02-data-types.md @@ -394,8 +394,8 @@ $ cargo run Compiling arrays v0.1.0 (file:///projects/arrays) Finished dev [unoptimized + debuginfo] target(s) in 0.31 secs Running `target/debug/arrays` -thread '
' panicked at 'index out of bounds: the len is 5 but the index is - 10', src/main.rs:6 +thread 'main' panicked at 'index out of bounds: the len is 5 but the index is + 10', src/main.rs:5:19 note: Run with `RUST_BACKTRACE=1` for a backtrace. ``` diff --git a/src/doc/book/src/ch04-03-slices.md b/src/doc/book/src/ch04-03-slices.md index de12cee576..8ad29a896c 100644 --- a/src/doc/book/src/ch04-03-slices.md +++ b/src/doc/book/src/ch04-03-slices.md @@ -284,9 +284,9 @@ error[E0502]: cannot borrow `s` as mutable because it is also borrowed as immuta Recall from the borrowing rules that if we have an immutable reference to something, we cannot also take a mutable reference. Because `clear` needs to -truncate the `String`, it tries to take a mutable reference, which fails. Not -only has Rust made our API easier to use, but it has also eliminated an entire -class of errors at compile time! +truncate the `String`, it needs to get a mutable reference. Rust disallows +this, and compilation fails. Not only has Rust made our API easier to use, but +it has also eliminated an entire class of errors at compile time! #### String Literals Are Slices @@ -311,7 +311,7 @@ fn first_word(s: &String) -> &str { ``` A more experienced Rustacean would write the signature shown in Listing 4-9 -instead because it allows us to use the same function on both `String` values +instead because it allows us to use the same function on both `&String` values and `&str` values. ```rust,ignore diff --git a/src/doc/book/src/ch07-00-managing-growing-projects-with-packages-crates-and-modules.md b/src/doc/book/src/ch07-00-managing-growing-projects-with-packages-crates-and-modules.md index 718655f56b..b4c0526406 100644 --- a/src/doc/book/src/ch07-00-managing-growing-projects-with-packages-crates-and-modules.md +++ b/src/doc/book/src/ch07-00-managing-growing-projects-with-packages-crates-and-modules.md @@ -13,7 +13,7 @@ optionally one library crate. As a package grows, you can extract parts into separate crates that become external dependencies. This chapter covers all these techniques. For very large projects of a set of interrelated packages that evolve together, Cargo provides *workspaces*, which we’ll cover in the -section [“Cargo Workspaces”][workspaces] in Chapter 14. +[“Cargo Workspaces”][workspaces] section in Chapter 14. In addition to grouping functionality, encapsulating implementation details lets you reuse code at a higher level: once you’ve implemented an operation, diff --git a/src/doc/book/src/ch07-01-packages-and-crates.md b/src/doc/book/src/ch07-01-packages-and-crates.md index 60bb381de7..c731ec32cb 100644 --- a/src/doc/book/src/ch07-01-packages-and-crates.md +++ b/src/doc/book/src/ch07-01-packages-and-crates.md @@ -3,10 +3,10 @@ The first parts of the module system we’ll cover are *packages* and *crates*. A *crate* is a binary or library. The *crate root* is a source file that the Rust compiler starts from and makes up the root module of your crate (we’ll explain -modules in depth in the section [“Defining Modules to Control Scope and -Privacy”][modules]). A *package* is one or more crates that -provide a set of functionality. A package contains a *Cargo.toml* file that -describes how to build those crates. +modules in depth in the [“Defining Modules to Control Scope and +Privacy”][modules]) section. A *package* is one or more crates +that provide a set of functionality. A package contains a *Cargo.toml* file +that describes how to build those crates. Several rules determine what a package can contain. A package *must* contain zero or one library crates, and no more. It can contain as many binary crates diff --git a/src/doc/book/src/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md b/src/doc/book/src/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md index a132a12895..9cc52ade7c 100644 --- a/src/doc/book/src/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md +++ b/src/doc/book/src/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md @@ -19,8 +19,11 @@ Let’s return to the example in Listing 7-1. How do we call the `add_to_waitlist` function? In Listing 7-3, we simplified our code a bit by removing some of the modules and functions. We’ll show two ways to call the `add_to_waitlist` function from a new function `eat_at_restaurant` defined in -the crate root. Note that this example won’t compile just yet; we’ll explain -why in a bit. +the crate root. The `eat_at_restaurant` function is part of our library crate's +public API, so we mark it with the `pub` keyword. In the ["Exposing Paths with +the `pub` Keyword"][pub] section, we'll go into more detail +about `pub`. Note that this example won’t compile just yet; we’ll explain why +in a bit. Filename: src/lib.rs @@ -70,8 +73,8 @@ need to update the absolute path to `add_to_waitlist`, but the relative path would still be valid. However, if we moved the `eat_at_restaurant` function separately into a module named `dining`, the absolute path to the `add_to_waitlist` call would stay the same, but the relative path would need to -be updated. We tend to specify absolute paths because it’s more likely to move -code definitions and item calls independently of each other. +be updated. Our preference is to specify absolute paths because it’s more +likely to move code definitions and item calls independently of each other. Let’s try to compile Listing 7-3 and find out why it won’t compile yet! The error we get is shown in Listing 7-4. @@ -361,3 +364,5 @@ general rule of everything being private by default unless annotated with `pub`. There’s one more situation involving `pub` that we haven’t covered, and that is our last module system feature: the `use` keyword. We’ll cover `use` by itself first, and then we’ll show how to combine `pub` and `use`. + +[pub]: ch07-03-paths-for-referring-to-an-item-in-the-module-tree.html#exposing-paths-with-the-pub-keyword diff --git a/src/doc/book/src/ch07-04-bringing-paths-into-scope-with-the-use-keyword.md b/src/doc/book/src/ch07-04-bringing-paths-into-scope-with-the-use-keyword.md index 878adb4389..257f68ce9d 100644 --- a/src/doc/book/src/ch07-04-bringing-paths-into-scope-with-the-use-keyword.md +++ b/src/doc/book/src/ch07-04-bringing-paths-into-scope-with-the-use-keyword.md @@ -141,10 +141,12 @@ use std::fmt; use std::io; fn function1() -> fmt::Result { + // --snip-- # Ok(()) } fn function2() -> io::Result<()> { + // --snip-- # Ok(()) } ``` @@ -155,7 +157,7 @@ the same scope requires using their parent modules. As you can see, using the parent modules distinguishes the two `Result` types. If instead we specified `use std::fmt::Result` and `use std::io::Result`, we’d have two `Result` types in the same scope and Rust wouldn’t know which one we -meant when we used `Result`. Try it and see what compiler error you get! +meant when we used `Result`. ### Providing New Names with the `as` Keyword @@ -171,10 +173,12 @@ use std::fmt::Result; use std::io::Result as IoResult; fn function1() -> Result { + // --snip-- # Ok(()) } fn function2() -> IoResult<()> { + // --snip-- # Ok(()) } ``` @@ -254,9 +258,9 @@ available to our project. Then, to bring `rand` definitions into the scope of our package, we added a `use` line starting with the name of the package, `rand`, and listing the items -we wanted to bring into scope. Recall that in the section [“Generating a Random -Number”][rand] in Chapter 2, we brought the `Rng` trait into -scope and called the `rand::thread_rng` function: +we wanted to bring into scope. Recall that in the [“Generating a Random +Number”][rand] section in Chapter 2, we brought the `Rng` trait +into scope and called the `rand::thread_rng` function: ```rust,ignore use rand::Rng; @@ -362,11 +366,11 @@ harder to tell what names are in scope and where a name used in your program was defined. The glob operator is often used when testing to bring everything under test -into the `tests` module; we’ll talk about that in the section [“How to Write -Tests”][writing-tests] in Chapter 11. The glob operator is also -sometimes used as part of the prelude pattern: see [the standard library -documentation](../std/prelude/index.html#other-preludes) for -more information on that pattern. +into the `tests` module; we’ll talk about that in the [“How to Write +Tests”][writing-tests] section in Chapter 11. The glob operator +is also sometimes used as part of the prelude pattern: see [the standard +library documentation](../std/prelude/index.html#other-preludes) +for more information on that pattern. [rand]: ch02-00-guessing-game-tutorial.html#generating-a-random-number [writing-tests]: ch11-01-writing-tests.html#how-to-write-tests diff --git a/src/doc/book/src/ch09-02-recoverable-errors-with-result.md b/src/doc/book/src/ch09-02-recoverable-errors-with-result.md index 80d07b3276..7d666e42e0 100644 --- a/src/doc/book/src/ch09-02-recoverable-errors-with-result.md +++ b/src/doc/book/src/ch09-02-recoverable-errors-with-result.md @@ -103,7 +103,7 @@ fn main() { let f = match f { Ok(file) => file, Err(error) => { - panic!("There was a problem opening the file: {:?}", error) + panic!("Problem opening the file: {:?}", error) }, }; } @@ -127,7 +127,7 @@ there’s no file named *hello.txt* in our current directory and we run this code, we’ll see the following output from the `panic!` macro: ```text -thread 'main' panicked at 'There was a problem opening the file: Error { repr: +thread 'main' panicked at 'Problem opening the file: Error { repr: Os { code: 2, message: "No such file or directory" } }', src/main.rs:9:12 ``` @@ -160,9 +160,9 @@ fn main() { Err(error) => match error.kind() { ErrorKind::NotFound => match File::create("hello.txt") { Ok(fc) => fc, - Err(e) => panic!("Tried to create file but there was a problem: {:?}", e), + Err(e) => panic!("Problem creating the file: {:?}", e), }, - other_error => panic!("There was a problem opening the file: {:?}", other_error), + other_error => panic!("Problem opening the file: {:?}", other_error), }, }; } @@ -202,10 +202,10 @@ fn main() { let f = File::open("hello.txt").unwrap_or_else(|error| { if error.kind() == ErrorKind::NotFound { File::create("hello.txt").unwrap_or_else(|error| { - panic!("Tried to create file but there was a problem: {:?}", error); + panic!("Problem creating the file: {:?}", error); }) } else { - panic!("There was a problem opening the file: {:?}", error); + panic!("Problem opening the file: {:?}", error); } }); } diff --git a/src/doc/book/src/ch10-03-lifetime-syntax.md b/src/doc/book/src/ch10-03-lifetime-syntax.md index c9961bf3ab..893d9ba6fc 100644 --- a/src/doc/book/src/ch10-03-lifetime-syntax.md +++ b/src/doc/book/src/ch10-03-lifetime-syntax.md @@ -14,8 +14,7 @@ The concept of lifetimes is somewhat different from tools in other programming languages, arguably making lifetimes Rust’s most distinctive feature. Although we won’t cover lifetimes in their entirety in this chapter, we’ll discuss common ways you might encounter lifetime syntax so you can become familiar with -the concepts. See the [“Advanced Lifetimes”][advanced-lifetimes] -section in Chapter 19 for more detailed information. +the concepts. ### Preventing Dangling References with Lifetimes @@ -277,13 +276,15 @@ The function signature now tells Rust that for some lifetime `'a`, the function takes two parameters, both of which are string slices that live at least as long as lifetime `'a`. The function signature also tells Rust that the string slice returned from the function will live at least as long as lifetime `'a`. -These constraints are what we want Rust to enforce. Remember, when we specify -the lifetime parameters in this function signature, we’re not changing the -lifetimes of any values passed in or returned. Rather, we’re specifying that -the borrow checker should reject any values that don’t adhere to these -constraints. Note that the `longest` function doesn’t need to know exactly how -long `x` and `y` will live, only that some scope can be substituted for `'a` -that will satisfy this signature. +In practice, it means that the lifetime of the reference returned by the +`longest` function is the same as the smaller of the lifetimes of the +references passed in. These constraints are what we want Rust to enforce. +Remember, when we specify the lifetime parameters in this function signature, +we’re not changing the lifetimes of any values passed in or returned. Rather, +we’re specifying that the borrow checker should reject any values that don’t +adhere to these constraints. Note that the `longest` function doesn’t need to +know exactly how long `x` and `y` will live, only that some scope can be +substituted for `'a` that will satisfy this signature. When annotating lifetimes in functions, the annotations go in the function signature, not in the function body. Rust can analyze the code within the @@ -772,8 +773,6 @@ traits. Chapter 19 covers more complex scenarios involving lifetime annotations as well as some advanced type system features. But next, you’ll learn how to write tests in Rust so you can make sure your code is working the way it should. -[advanced-lifetimes]: -ch19-02-advanced-lifetimes.html#advanced-lifetimes [references-and-borrowing]: ch04-02-references-and-borrowing.html#references-and-borrowing [string-slices-as-parameters]: diff --git a/src/doc/book/src/ch12-00-an-io-project.md b/src/doc/book/src/ch12-00-an-io-project.md index 0b84111a85..5802d97984 100644 --- a/src/doc/book/src/ch12-00-an-io-project.md +++ b/src/doc/book/src/ch12-00-an-io-project.md @@ -28,11 +28,22 @@ the background knowledge you need to understand a real-world project such as Our `grep` project will combine a number of concepts you’ve learned so far: -* Organizing code (using what you learned about modules in Chapter 7) -* Using vectors and strings (collections, Chapter 8) -* Handling errors (Chapter 9) -* Using traits and lifetimes where appropriate (Chapter 10) -* Writing tests (Chapter 11) +* Organizing code (using what you learned about modules in [Chapter 7][ch7]) +* Using vectors and strings (collections, [Chapter 8][ch8]) +* Handling errors ([Chapter 9][ch9]) +* Using traits and lifetimes where appropriate ([Chapter 10][ch10]) +* Writing tests ([Chapter 11][ch11]) We’ll also briefly introduce closures, iterators, and trait objects, which -Chapters 13 and 17 will cover in detail. +Chapters [13][ch13] and [17][ch17] will cover in +detail. + +[ch7]: ch07-00-managing-growing-projects-with-packages-crates-and-modules.html +[ch8]: ch08-00-common-collections.html +[ch9]: ch09-00-error-handling.html +[ch10]: ch10-00-generics.html +[ch11]: ch11-00-testing.html +[ch13]: ch13-00-functional-features.html +[ch17]: ch17-00-oop.html diff --git a/src/doc/book/src/ch12-01-accepting-command-line-arguments.md b/src/doc/book/src/ch12-01-accepting-command-line-arguments.md index 6a8116b14f..50d17ae5d1 100644 --- a/src/doc/book/src/ch12-01-accepting-command-line-arguments.md +++ b/src/doc/book/src/ch12-01-accepting-command-line-arguments.md @@ -29,11 +29,11 @@ just learning this concept, let’s implement this capability ourselves. To enable `minigrep` to read the values of command line arguments we pass to it, we’ll need a function provided in Rust’s standard library, which is `std::env::args`. This function returns an iterator of the command line -arguments that were given to `minigrep`. We’ll cover iterators fully in Chapter 13. -For now, you only need to know two details about iterators: iterators -produce a series of values, and we can call the `collect` method on an iterator -to turn it into a collection, such as a vector, containing all the elements the -iterator produces. +arguments that were given to `minigrep`. We’ll cover iterators fully in +[Chapter 13][ch13]. For now, you only need to know two details +about iterators: iterators produce a series of values, and we can call the +`collect` method on an iterator to turn it into a collection, such as a vector, +containing all the elements the iterator produces. Use the code in Listing 12-1 to allow your `minigrep` program to read any command line arguments passed to it and then collect the values into a vector. @@ -54,13 +54,13 @@ a vector and printing them First, we bring the `std::env` module into scope with a `use` statement so we can use its `args` function. Notice that the `std::env::args` function is -nested in two levels of modules. As we discussed in Chapter 7, in cases where -the desired function is nested in more than one module, it’s conventional to -bring the parent module into scope rather than the function. By doing so, we -can easily use other functions from `std::env`. It’s also less ambiguous than -adding `use std::env::args` and then calling the function with just `args`, -because `args` might easily be mistaken for a function that’s defined in the -current module. +nested in two levels of modules. As we discussed in [Chapter +7][ch7-idiomatic-use], in cases where the desired function is +nested in more than one module, it’s conventional to bring the parent module +into scope rather than the function. By doing so, we can easily use other +functions from `std::env`. It’s also less ambiguous than adding `use +std::env::args` and then calling the function with just `args`, because `args` +might easily be mistaken for a function that’s defined in the current module. > ### The `args` Function and Invalid Unicode > @@ -151,3 +151,6 @@ saved into the right variables. Later we’ll add some error handling to deal with certain potential erroneous situations, such as when the user provides no arguments; for now, we’ll ignore that situation and work on adding file-reading capabilities instead. + +[ch13]: ch13-00-functional-features.html +[ch7-idiomatic-use]: ch07-04-bringing-paths-into-scope-with-the-use-keyword.html#creating-idiomatic-use-paths diff --git a/src/doc/book/src/ch12-03-improving-error-handling-and-modularity.md b/src/doc/book/src/ch12-03-improving-error-handling-and-modularity.md index 005a1437c0..5f014d7f98 100644 --- a/src/doc/book/src/ch12-03-improving-error-handling-and-modularity.md +++ b/src/doc/book/src/ch12-03-improving-error-handling-and-modularity.md @@ -187,14 +187,14 @@ trade-off. > ### The Trade-Offs of Using `clone` > > There’s a tendency among many Rustaceans to avoid using `clone` to fix -> ownership problems because of its runtime cost. In Chapter 13, you’ll learn -> how to use more efficient methods in this type of situation. But for now, -> it’s okay to copy a few strings to continue making progress because you’ll -> make these copies only once and your filename and query string are very -> small. It’s better to have a working program that’s a bit inefficient than to -> try to hyperoptimize code on your first pass. As you become more experienced -> with Rust, it’ll be easier to start with the most efficient solution, but for -> now, it’s perfectly acceptable to call `clone`. +> ownership problems because of its runtime cost. In [Chapter 13][ch13], you’ll learn how to use more efficient methods in this type of +> situation. But for now, it’s okay to copy a few strings to continue making +> progress because you’ll make these copies only once and your filename and +> query string are very small. It’s better to have a working program that’s a +> bit inefficient than to try to hyperoptimize code on your first pass. As you +> become more experienced with Rust, it’ll be easier to start with the most +> efficient solution, but for now, it’s perfectly acceptable to call `clone`. We’ve updated `main` so it places the instance of `Config` returned by `parse_config` into a variable named `config`, and we updated the code that @@ -304,13 +304,13 @@ fn new(args: &[String]) -> Config { Listing 12-8: Adding a check for the number of arguments -This code is similar to the `Guess::new` function we wrote in Listing 9-10, -where we called `panic!` when the `value` argument was out of the range of -valid values. Instead of checking for a range of values here, we’re checking -that the length of `args` is at least 3 and the rest of the function can -operate under the assumption that this condition has been met. If `args` has -fewer than three items, this condition will be true, and we call the `panic!` -macro to end the program immediately. +This code is similar to [the `Guess::new` function we wrote in Listing +9-10][ch9-custom-types], where we called `panic!` when the +`value` argument was out of the range of valid values. Instead of checking for +a range of values here, we’re checking that the length of `args` is at least 3 +and the rest of the function can operate under the assumption that this +condition has been met. If `args` has fewer than three items, this condition +will be true, and we call the `panic!` macro to end the program immediately. With these extra few lines of code in `new`, let’s run the program without any arguments again to see what the error looks like now: @@ -327,10 +327,10 @@ note: Run with `RUST_BACKTRACE=1` for a backtrace. This output is better: we now have a reasonable error message. However, we also have extraneous information we don’t want to give to our users. Perhaps using the technique we used in Listing 9-10 isn’t the best to use here: a call to -`panic!` is more appropriate for a programming problem than a usage problem, as -discussed in Chapter 9. Instead, we can use the other technique you learned -about in Chapter 9—returning a `Result` that indicates either success or an -error. +`panic!` is more appropriate for a programming problem than a usage problem, +[as discussed in Chapter 9][ch9-error-guidelines]. Instead, we +can use the other technique you learned about in Chapter 9—[returning a +`Result`][ch9-result] that indicates either success or an error. #### Returning a `Result` from `new` Instead of Calling `panic!` @@ -416,11 +416,12 @@ handling. If the `Result` is an `Ok` value, this method’s behavior is similar to `unwrap`: it returns the inner value `Ok` is wrapping. However, if the value is an `Err` value, this method calls the code in the *closure*, which is an anonymous function we define and pass as an argument to `unwrap_or_else`. We’ll -cover closures in more detail in Chapter 13. For now, you just need to know -that `unwrap_or_else` will pass the inner value of the `Err`, which in this -case is the static string `not enough arguments` that we added in Listing 12-9, -to our closure in the argument `err` that appears between the vertical pipes. -The code in the closure can then use the `err` value when it runs. +cover closures in more detail in [Chapter 13][ch13]. For now, +you just need to know that `unwrap_or_else` will pass the inner value of the +`Err`, which in this case is the static string `not enough arguments` that we +added in Listing 12-9, to our closure in the argument `err` that appears +between the vertical pipes. The code in the closure can then use the `err` +value when it runs. We’ve added a new `use` line to bring `process` from the standard library into scope. The code in the closure that will be run in the error case is only two @@ -519,16 +520,17 @@ returned the unit type, `()`, and we keep that as the value returned in the For the error type, we used the *trait object* `Box` (and we’ve brought `std::error::Error` into scope with a `use` statement at the top). -We’ll cover trait objects in Chapter 17. For now, just know that `Box` means the function will return a type that implements the `Error` -trait, but we don’t have to specify what particular type the return value -will be. This gives us flexibility to return error values that may be of -different types in different error cases. The `dyn` keyword is short for -“dynamic.” +We’ll cover trait objects in [Chapter 17][ch17]. For now, just +know that `Box` means the function will return a type that +implements the `Error` trait, but we don’t have to specify what particular type +the return value will be. This gives us flexibility to return error values that +may be of different types in different error cases. The `dyn` keyword is short +for “dynamic.” Second, we’ve removed the call to `expect` in favor of the `?` operator, as we -talked about in Chapter 9. Rather than `panic!` on an error, `?` will return -the error value from the current function for the caller to handle. +talked about in [Chapter 9][ch9-question-mark]. Rather than +`panic!` on an error, `?` will return the error value from the current function +for the caller to handle. Third, the `run` function now returns an `Ok` value in the success case. We’ve declared the `run` function’s success type as `()` in the signature, which @@ -671,3 +673,9 @@ have been difficult with the old code but is easy with the new code: we’ll write some tests! [the-static-lifetime]: ch10-03-lifetime-syntax.html#the-static-lifetime +[ch13]: ch13-00-functional-features.html +[ch9-custom-types]: ch09-03-to-panic-or-not-to-panic.html#creating-custom-types-for-validation +[ch9-error-guidelines]: ch09-03-to-panic-or-not-to-panic.html#guidelines-for-error-handling +[ch9-result]: ch09-02-recoverable-errors-with-result.html +[ch17]: ch17-00-oop.html +[ch9-question-mark]: ch09-02-recoverable-errors-with-result.html#a-shortcut-for-propagating-errors-the--operator diff --git a/src/doc/book/src/ch12-04-testing-the-librarys-functionality.md b/src/doc/book/src/ch12-04-testing-the-librarys-functionality.md index 99b561d132..2d1eeb04d6 100644 --- a/src/doc/book/src/ch12-04-testing-the-librarys-functionality.md +++ b/src/doc/book/src/ch12-04-testing-the-librarys-functionality.md @@ -32,10 +32,11 @@ lines that match the query. We’ll add this functionality in a function called Because we don’t need them anymore, let’s remove the `println!` statements from *src/lib.rs* and *src/main.rs* that we used to check the program’s behavior. Then, in *src/lib.rs*, we’ll add a `tests` module with a test function, as we -did in Chapter 11. The test function specifies the behavior we want the -`search` function to have: it will take a query and the text to search for the -query in, and it will return only the lines from the text that contain the -query. Listing 12-15 shows this test, which won’t compile yet. +did in [Chapter 11][ch11-anatomy]. The test function specifies +the behavior we want the `search` function to have: it will take a query and +the text to search for the query in, and it will return only the lines from the +text that contain the query. Listing 12-15 shows this test, which won’t compile +yet. Filename: src/lib.rs @@ -91,10 +92,11 @@ function so our test will compile Notice that we need an explicit lifetime `'a` defined in the signature of `search` and used with the `contents` argument and the return value. Recall in -Chapter 10 that the lifetime parameters specify which argument lifetime is -connected to the lifetime of the return value. In this case, we indicate that -the returned vector should contain string slices that reference slices of the -argument `contents` (rather than the argument `query`). +[Chapter 10][ch10-lifetimes] that the lifetime parameters +specify which argument lifetime is connected to the lifetime of the return +value. In this case, we indicate that the returned vector should contain string +slices that reference slices of the argument `contents` (rather than the +argument `query`). In other words, we tell Rust that the data returned by the `search` function will live as long as the data passed into the `search` function in the @@ -194,9 +196,9 @@ pub fn search<'a>(query: &str, contents: &'a str) -> Vec<&'a str> { The `lines` method returns an iterator. We’ll talk about iterators in depth in -Chapter 13, but recall that you saw this way of using an iterator in Listing -3-5, where we used a `for` loop with an iterator to run some code on each item -in a collection. +[Chapter 13][ch13], but recall that you saw this way of using an +iterator in [Listing 3-5][ch3-iter], where we used a `for` loop +with an iterator to run some code on each item in a collection. #### Searching Each Line for the Query @@ -264,8 +266,8 @@ At this point, we could consider opportunities for refactoring the implementation of the search function while keeping the tests passing to maintain the same functionality. The code in the search function isn’t too bad, but it doesn’t take advantage of some useful features of iterators. We’ll -return to this example in Chapter 13, where we’ll explore iterators in detail, -and look at how to improve it. +return to this example in [Chapter 13][ch13], where we’ll +explore iterators in detail, and look at how to improve it. #### Using the `search` Function in the `run` Function @@ -331,3 +333,6 @@ useful when you’re writing command line programs. [validating-references-with-lifetimes]: ch10-03-lifetime-syntax.html#validating-references-with-lifetimes +[ch11-anatomy]: ch11-01-writing-tests.html#the-anatomy-of-a-test-function +[ch10-lifetimes]: ch10-03-lifetime-syntax.html +[ch3-iter]: ch03-05-control-flow.html#looping-through-a-collection-with-for diff --git a/src/doc/book/src/ch15-01-box.md b/src/doc/book/src/ch15-01-box.md index a7af7131c4..2b9a51b306 100644 --- a/src/doc/book/src/ch15-01-box.md +++ b/src/doc/book/src/ch15-01-box.md @@ -128,7 +128,7 @@ Listing 15-3: Filename: src/main.rs -```rust,ignore +```rust,ignore,does_not_compile use crate::List::{Cons, Nil}; fn main() { diff --git a/src/doc/book/src/ch15-05-interior-mutability.md b/src/doc/book/src/ch15-05-interior-mutability.md index 5210ff3b83..f43d549244 100644 --- a/src/doc/book/src/ch15-05-interior-mutability.md +++ b/src/doc/book/src/ch15-05-interior-mutability.md @@ -140,7 +140,7 @@ pub trait Messenger { fn send(&self, msg: &str); } -pub struct LimitTracker<'a, T: 'a + Messenger> { +pub struct LimitTracker<'a, T: Messenger> { messenger: &'a T, value: usize, max: usize, @@ -195,7 +195,7 @@ implement a mock object to do just that, but the borrow checker won’t allow it Filename: src/lib.rs -```rust,does_not_compile +```rust,ignore,does_not_compile #[cfg(test)] mod tests { use super::*; @@ -275,6 +275,41 @@ shows what that looks like: Filename: src/lib.rs ```rust +# pub trait Messenger { +# fn send(&self, msg: &str); +# } +# +# pub struct LimitTracker<'a, T: Messenger> { +# messenger: &'a T, +# value: usize, +# max: usize, +# } +# +# impl<'a, T> LimitTracker<'a, T> +# where T: Messenger { +# pub fn new(messenger: &T, max: usize) -> LimitTracker { +# LimitTracker { +# messenger, +# value: 0, +# max, +# } +# } +# +# pub fn set_value(&mut self, value: usize) { +# self.value = value; +# +# let percentage_of_max = self.value as f64 / self.max as f64; +# +# if percentage_of_max >= 1.0 { +# self.messenger.send("Error: You are over your quota!"); +# } else if percentage_of_max >= 0.9 { +# self.messenger.send("Urgent warning: You've used up over 90% of your quota!"); +# } else if percentage_of_max >= 0.75 { +# self.messenger.send("Warning: You've used up over 75% of your quota!"); +# } +# } +# } +# #[cfg(test)] mod tests { use super::*; @@ -306,6 +341,7 @@ mod tests { assert_eq!(mock_messenger.sent_messages.borrow().len(), 1); } } +# fn main() {} ``` Listing 15-22: Using `RefCell` to mutate an inner diff --git a/src/doc/book/src/ch18-03-pattern-syntax.md b/src/doc/book/src/ch18-03-pattern-syntax.md index 9beee4ee73..ccdeb6608b 100644 --- a/src/doc/book/src/ch18-03-pattern-syntax.md +++ b/src/doc/book/src/ch18-03-pattern-syntax.md @@ -115,16 +115,16 @@ arm will execute: let x = 5; match x { - 1 ... 5 => println!("one through five"), + 1...5 => println!("one through five"), _ => println!("something else"), } ``` If `x` is 1, 2, 3, 4, or 5, the first arm will match. This syntax is more -convenient than using the `|` operator to express the same idea; instead of `1 -... 5`, we would have to specify `1 | 2 | 3 | 4 | 5` if we used `|`. Specifying -a range is much shorter, especially if we want to match, say, any number -between 1 and 1,000! +convenient than using the `|` operator to express the same idea; instead of +`1...5`, we would have to specify `1 | 2 | 3 | 4 | 5` if we used `|`. +Specifying a range is much shorter, especially if we want to match, say, any +number between 1 and 1,000! Ranges are only allowed with numeric values or `char` values, because the compiler checks that the range isn’t empty at compile time. The only types for @@ -136,8 +136,8 @@ Here is an example using ranges of `char` values: let x = 'c'; match x { - 'a' ... 'j' => println!("early ASCII letter"), - 'k' ... 'z' => println!("late ASCII letter"), + 'a'...'j' => println!("early ASCII letter"), + 'k'...'z' => println!("late ASCII letter"), _ => println!("something else"), } ``` @@ -335,7 +335,7 @@ colors in the `ChangeColor` message, as shown in Listing 18-16. ```rust enum Color { Rgb(i32, i32, i32), - Hsv(i32, i32, i32) + Hsv(i32, i32, i32), } enum Message { diff --git a/src/doc/book/src/ch19-00-advanced-features.md b/src/doc/book/src/ch19-00-advanced-features.md index 0b7f98737d..270d6da6d1 100644 --- a/src/doc/book/src/ch19-00-advanced-features.md +++ b/src/doc/book/src/ch19-00-advanced-features.md @@ -12,7 +12,6 @@ In this chapter, we’ll cover: * Unsafe Rust: how to opt out of some of Rust’s guarantees and take responsibility for manually upholding those guarantees -* Advanced lifetimes: syntax for complex lifetime situations * Advanced traits: associated types, default type parameters, fully qualified syntax, supertraits, and the newtype pattern in relation to traits * Advanced types: more about the newtype pattern, type aliases, the never type, diff --git a/src/doc/book/src/ch19-02-advanced-lifetimes.md b/src/doc/book/src/ch19-02-advanced-lifetimes.md deleted file mode 100644 index 208790a0e1..0000000000 --- a/src/doc/book/src/ch19-02-advanced-lifetimes.md +++ /dev/null @@ -1,458 +0,0 @@ -## Advanced Lifetimes - -In Chapter 10 in the [“Validating References with Lifetimes”] -[validating-references-with-lifetimes] section, you learned how -to annotate references with lifetime parameters to tell Rust how lifetimes of -different references relate. You saw how every reference has a lifetime, but -most of the time, Rust will let you elide lifetimes. Now we’ll look at three -advanced features of lifetimes that we haven’t covered yet: - -* Lifetime subtyping: ensures that one lifetime outlives another lifetime -* Lifetime bounds: specifies a lifetime for a reference to a generic type -* Inference of trait object lifetimes: allows the compiler to infer trait - object lifetimes and when they need to be specified - -### Ensuring One Lifetime Outlives Another with Lifetime Subtyping - -*Lifetime subtyping* specifies that one lifetime should outlive another -lifetime. To explore lifetime subtyping, imagine we want to write a parser. -We’ll use a structure called `Context` that holds a reference to the string -we’re parsing. We’ll write a parser that will parse this string and return -success or failure. The parser will need to borrow the `Context` to do the -parsing. Listing 19-12 implements this parser code, except the code doesn’t -have the required lifetime annotations, so it won’t compile. - -Filename: src/lib.rs - -```rust,ignore,does_not_compile -struct Context(&str); - -struct Parser { - context: &Context, -} - -impl Parser { - fn parse(&self) -> Result<(), &str> { - Err(&self.context.0[1..]) - } -} -``` - -Listing 19-12: Defining a parser without lifetime -annotations - -Compiling the code results in errors because Rust expects lifetime parameters -on the string slice in `Context` and the reference to a `Context` in `Parser`. - -For simplicity’s sake, the `parse` function returns `Result<(), &str>`. That -is, the function will do nothing on success and, on failure, will return the -part of the string slice that didn’t parse correctly. A real implementation -would provide more error information and would return a structured data type -when parsing succeeds. We won’t be discussing those details because they aren’t -relevant to the lifetimes part of this example. - -To keep this code simple, we won’t write any parsing logic. However, it’s very -likely that somewhere in the parsing logic we would handle invalid input by -returning an error that references the part of the input that is invalid; this -reference is what makes the code example interesting in regard to lifetimes. -Let’s pretend that the logic of our parser is that the input is invalid after -the first byte. Note that this code might panic if the first byte is not on a -valid character boundary; again, we’re simplifying the example to focus on the -lifetimes involved. - -To get this code to compile, we need to fill in the lifetime parameters for the -string slice in `Context` and the reference to the `Context` in `Parser`. The -most straightforward way to do this is to use the same lifetime name -everywhere, as shown in Listing 19-13. Recall from the [“Lifetime Annotations -in Struct Definitions”][lifetime-annotations-in-struct-definitions] section in Chapter 10 that each of `struct Context<'a>`, `struct -Parser<'a>`, and `impl<'a>` is declaring a new lifetime parameter. While their -names happen to all be the same, the three lifetime parameters declared in this -example aren’t related. - -Filename: src/lib.rs - -```rust -struct Context<'a>(&'a str); - -struct Parser<'a> { - context: &'a Context<'a>, -} - -impl<'a> Parser<'a> { - fn parse(&self) -> Result<(), &str> { - Err(&self.context.0[1..]) - } -} -``` - -Listing 19-13: Annotating all references in `Context` and -`Parser` with lifetime parameters - -This code compiles just fine. It tells Rust that a `Parser` holds a reference -to a `Context` with lifetime `'a` and that `Context` holds a string slice that -also lives as long as the reference to the `Context` in `Parser`. Rust’s -compiler error message stated that lifetime parameters were required for these -references, and we’ve now added lifetime parameters. - -Next, in Listing 19-14, we’ll add a function that takes an instance of -`Context`, uses a `Parser` to parse that context, and returns what `parse` -returns. This code doesn’t quite work. - -Filename: src/lib.rs - -```rust,ignore,does_not_compile -fn parse_context(context: Context) -> Result<(), &str> { - Parser { context: &context }.parse() -} -``` - -Listing 19-14: An attempt to add a `parse_context` -function that takes a `Context` and uses a `Parser` - -We get two verbose errors when we try to compile the code with the addition of -the `parse_context` function: - -```text -error[E0597]: borrowed value does not live long enough - --> src/lib.rs:14:5 - | -14 | Parser { context: &context }.parse() - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ does not live long enough -15 | } - | - temporary value only lives until here - | -note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 13:1... - --> src/lib.rs:13:1 - | -13 | / fn parse_context(context: Context) -> Result<(), &str> { -14 | | Parser { context: &context }.parse() -15 | | } - | |_^ - -error[E0597]: `context` does not live long enough - --> src/lib.rs:14:24 - | -14 | Parser { context: &context }.parse() - | ^^^^^^^ does not live long enough -15 | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 13:1... - --> src/lib.rs:13:1 - | -13 | / fn parse_context(context: Context) -> Result<(), &str> { -14 | | Parser { context: &context }.parse() -15 | | } - | |_^ -``` - -These errors state that the `Parser` instance that is created and the `context` -parameter live only until the end of the `parse_context` function. But they -both need to live for the entire lifetime of the function. - -In other words, `Parser` and `context` need to *outlive* the entire function -and be valid before the function starts as well as after it ends for all the -references in this code to always be valid. The `Parser` we’re creating and the -`context` parameter go out of scope at the end of the function, because -`parse_context` takes ownership of `context`. - -To figure out why these errors occur, let’s look at the definitions in Listing -19-13 again, specifically the references in the signature of the `parse` method: - -```rust,ignore -fn parse(&self) -> Result<(), &str> { -``` - -Remember the elision rules? If we annotate the lifetimes of the references -rather than eliding, the signature would be as follows: - -```rust,ignore -fn parse<'a>(&'a self) -> Result<(), &'a str> { -``` - -That is, the error part of the return value of `parse` has a lifetime that is -tied to the lifetime of the `Parser` instance (that of `&self` in the `parse` -method signature). That makes sense: the returned string slice references the -string slice in the `Context` instance held by the `Parser`, and the definition -of the `Parser` struct specifies that the lifetime of the reference to -`Context` and the lifetime of the string slice that `Context` holds should be -the same. - -The problem is that the `parse_context` function returns the value returned -from `parse`, so the lifetime of the return value of `parse_context` is tied to -the lifetime of the `Parser` as well. But the `Parser` instance created in the -`parse_context` function won’t live past the end of the function (it’s -temporary), and `context` will go out of scope at the end of the function -(`parse_context` takes ownership of it). - -Rust thinks we’re trying to return a reference to a value that goes out of -scope at the end of the function, because we annotated all the lifetimes with -the same lifetime parameter. The annotations told Rust the lifetime of the -string slice that `Context` holds is the same as that of the lifetime of the -reference to `Context` that `Parser` holds. - -The `parse_context` function can’t see that within the `parse` function, the -string slice returned will outlive `Context` and `Parser` and that the -reference `parse_context` returns refers to the string slice, not to `Context` -or `Parser`. - -By knowing what the implementation of `parse` does, we know that the only -reason the return value of `parse` is tied to the `Parser` instance is that -it’s referencing the `Parser` instance’s `Context`, which is referencing the -string slice. So, it’s really the lifetime of the string slice that -`parse_context` needs to care about. We need a way to tell Rust that the string -slice in `Context` and the reference to the `Context` in `Parser` have -different lifetimes and that the return value of `parse_context` is tied to the -lifetime of the string slice in `Context`. - -First, we’ll try giving `Parser` and `Context` different lifetime parameters, -as shown in Listing 19-15. We’ll use `'s` and `'c` as lifetime parameter names -to clarify which lifetime goes with the string slice in `Context` and which -goes with the reference to `Context` in `Parser`. Note that this solution won’t -completely fix the problem, but it’s a start. We’ll look at why this fix isn’t -sufficient when we try to compile. - -Filename: src/lib.rs - -```rust,ignore,does_not_compile -struct Context<'s>(&'s str); - -struct Parser<'c, 's> { - context: &'c Context<'s>, -} - -impl<'c, 's> Parser<'c, 's> { - fn parse(&self) -> Result<(), &'s str> { - Err(&self.context.0[1..]) - } -} - -fn parse_context(context: Context) -> Result<(), &str> { - Parser { context: &context }.parse() -} -``` - -Listing 19-15: Specifying different lifetime parameters -for the references to the string slice and to `Context` - -We’ve annotated the lifetimes of the references in all the same places that we -annotated them in Listing 19-13. But this time we used different parameters -depending on whether the reference goes with the string slice or with -`Context`. We’ve also added an annotation to the string slice part of the -return value of `parse` to indicate that it goes with the lifetime of the -string slice in `Context`. - -When we try to compile now, we get the following error: - -```text -error[E0491]: in type `&'c Context<'s>`, reference has a longer lifetime than the data it references - --> src/lib.rs:4:5 - | -4 | context: &'c Context<'s>, - | ^^^^^^^^^^^^^^^^^^^^^^^^ - | -note: the pointer is valid for the lifetime 'c as defined on the struct at 3:1 - --> src/lib.rs:3:1 - | -3 | / struct Parser<'c, 's> { -4 | | context: &'c Context<'s>, -5 | | } - | |_^ -note: but the referenced data is only valid for the lifetime 's as defined on the struct at 3:1 - --> src/lib.rs:3:1 - | -3 | / struct Parser<'c, 's> { -4 | | context: &'c Context<'s>, -5 | | } - | |_^ -``` - -Rust doesn’t know of any relationship between `'c` and `'s`. To be valid, the -referenced data in `Context` with lifetime `'s` needs to be constrained to -guarantee that it lives longer than the reference with lifetime `'c`. If `'s` -is not longer than `'c`, the reference to `Context` might not be valid. - -Now we get to the point of this section: the Rust feature *lifetime -subtyping* specifies that one lifetime parameter lives at least as long as -another one. In the angle brackets where we declare lifetime parameters, we can -declare a lifetime `'a` as usual and declare a lifetime `'b` that lives at -least as long as `'a` by declaring `'b` using the syntax `'b: 'a`. - -In our definition of `Parser`, to say that `'s` (the lifetime of the string -slice) is guaranteed to live at least as long as `'c` (the lifetime of the -reference to `Context`), we change the lifetime declarations to look like this: - -Filename: src/lib.rs - -```rust -# struct Context<'a>(&'a str); -# -struct Parser<'c, 's: 'c> { - context: &'c Context<'s>, -} -``` - -Now the reference to `Context` in the `Parser` and the reference to the string -slice in the `Context` have different lifetimes; we’ve ensured that the -lifetime of the string slice is longer than the reference to the `Context`. - -That was a very long-winded example, but as we mentioned at the start of this -chapter, Rust’s advanced features are very specific. You won’t often need the -syntax we described in this example, but in such situations, you’ll know how to -refer to something and give it the necessary lifetime. - -### Lifetime Bounds on References to Generic Types - -In the [“Traits as Parameters”][traits-as-parameters] section in -Chapter 10, we discussed using trait bounds on generic types. We can also add -lifetime parameters as constraints on generic types; these are called *lifetime -bounds*. Lifetime bounds help Rust verify that references in generic types -won’t outlive the data they’re referencing. - -As an example, consider a type that is a wrapper over references. Recall the -`RefCell` type from the [“`RefCell` and the Interior Mutability Pattern”] -[refcellt-and-the-interior-mutability-pattern] section in -Chapter 15: its `borrow` and `borrow_mut` methods return the types `Ref` and -`RefMut`, respectively. These types are wrappers over references that keep -track of the borrowing rules at runtime. The definition of the `Ref` struct is -shown in Listing 19-16, without lifetime bounds for now. - -Filename: src/lib.rs - -```rust,ignore,does_not_compile -struct Ref<'a, T>(&'a T); -``` - -Listing 19-16: Defining a struct to wrap a reference to a -generic type, without lifetime bounds - -Without explicitly constraining the lifetime `'a` in relation to the generic -parameter `T`, Rust will error because it doesn’t know how long the generic -type `T` will live: - -```text -error[E0309]: the parameter type `T` may not live long enough - --> src/lib.rs:1:19 - | -1 | struct Ref<'a, T>(&'a T); - | ^^^^^^ - | - = help: consider adding an explicit lifetime bound `T: 'a`... -note: ...so that the reference type `&'a T` does not outlive the data it points at - --> src/lib.rs:1:19 - | -1 | struct Ref<'a, T>(&'a T); - | ^^^^^^ -``` - -Because `T` can be any type, `T` could be a reference or a type that holds one -or more references, each of which could have their own lifetimes. Rust can’t be -sure `T` will live as long as `'a`. - -Fortunately, the error provides helpful advice on how to specify the lifetime -bound in this case: - -```text -consider adding an explicit lifetime bound `T: 'a` so that the reference type -`&'a T` does not outlive the data it points at -``` - -Listing 19-17 shows how to apply this advice by specifying the lifetime bound -when we declare the generic type `T`. - -```rust -struct Ref<'a, T: 'a>(&'a T); -``` - -Listing 19-17: Adding lifetime bounds on `T` to specify -that any references in `T` live at least as long as `'a` - -This code now compiles because the `T: 'a` syntax specifies that `T` can be any -type, but if it contains any references, the references must live at least as -long as `'a`. - -We could solve this problem in a different way, as shown in the definition of a -`StaticRef` struct in Listing 19-18, by adding the `'static` lifetime bound on -`T`. This means if `T` contains any references, they must have the `'static` -lifetime. - -```rust -struct StaticRef(&'static T); -``` - -Listing 19-18: Adding a `'static` lifetime bound to `T` -to constrain `T` to types that have only `'static` references or no -references - -Because `'static` means the reference must live as long as the entire program, -a type that contains no references meets the criteria of all references living -as long as the entire program (because there are no references). For the borrow -checker concerned about references living long enough, there is no real -distinction between a type that has no references and a type that has -references that live forever: both are the same for determining whether or not -a reference has a shorter lifetime than what it refers to. - -### Inference of Trait Object Lifetimes - -In Chapter 17 in the [“Using Trait Objects That Allow for Values of Different -Types”][using-trait-objects-that-allow-for-values-of-different-types] section, we discussed trait objects, consisting of a trait behind a -reference, that allow us to use dynamic dispatch. We haven’t yet discussed what -happens if the type implementing the trait in the trait object has a lifetime -of its own. Consider Listing 19-19 where we have a trait `Red` and a struct -`Ball`. The `Ball` struct holds a reference (and thus has a lifetime parameter) -and also implements trait `Red`. We want to use an instance of `Ball` as the -trait object `Box`. - -Filename: src/main.rs - -```rust -trait Red { } - -struct Ball<'a> { - diameter: &'a i32, -} - -impl<'a> Red for Ball<'a> { } - -fn main() { - let num = 5; - - let obj = Box::new(Ball { diameter: &num }) as Box; -} -``` - -Listing 19-19: Using a type that has a lifetime parameter -with a trait object - -This code compiles without any errors, even though we haven’t explicitly -annotated the lifetimes involved in `obj`. This code works because there are -rules for working with lifetimes and trait objects: - -* The default lifetime of a trait object is `'static`. -* With `&'a Trait` or `&'a mut Trait`, the default lifetime of the trait object - is `'a`. -* With a single `T: 'a` clause, the default lifetime of the trait object is - `'a`. -* With multiple clauses like `T: 'a`, there is no default lifetime; we must be - explicit. - -When we must be explicit, we can add a lifetime bound on a trait object like -`Box` using the syntax `Box` or `Box`, depending on whether the reference lives for the entire program or not. -As with the other bounds, the syntax adding a lifetime bound means that any -implementor of the `Red` trait that has references inside the type must have -the same lifetime specified in the trait object bounds as those references. - -Next, let’s look at some other advanced features that manage traits. - -[lifetime-annotations-in-struct-definitions]: -ch10-03-lifetime-syntax.html#lifetime-annotations-in-struct-definitions -[refcellt-and-the-interior-mutability-pattern]: -ch15-05-interior-mutability.html#refcellt-and-the-interior-mutability-pattern -[traits-as-parameters]: ch10-02-traits.html#traits-as-parameters -[using-trait-objects-that-allow-for-values-of-different-types]: -ch17-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types -[validating-references-with-lifetimes]: -ch10-03-lifetime-syntax.html#validating-references-with-lifetimes diff --git a/src/doc/book/src/ch19-03-advanced-traits.md b/src/doc/book/src/ch19-03-advanced-traits.md index d19258c001..288777057e 100644 --- a/src/doc/book/src/ch19-03-advanced-traits.md +++ b/src/doc/book/src/ch19-03-advanced-traits.md @@ -25,7 +25,7 @@ for the type of the values the type implementing the `Iterator` trait is iterating over. In [“The `Iterator` Trait and the `next` Method”] [the-iterator-trait-and-the-next-method] section of Chapter 13, we mentioned that the definition of the `Iterator` trait is as shown in Listing -19-20. +19-12. ```rust pub trait Iterator { @@ -35,7 +35,7 @@ pub trait Iterator { } ``` -Listing 19-20: The definition of the `Iterator` trait +Listing 19-12: The definition of the `Iterator` trait that has an associated type `Item` The type `Item` is a placeholder type, and the `next` method’s definition shows @@ -62,7 +62,7 @@ impl Iterator for Counter { ``` This syntax seems comparable to that of generics. So why not just define the -`Iterator` trait with generics, as shown in Listing 19-21? +`Iterator` trait with generics, as shown in Listing 19-13? ```rust pub trait Iterator { @@ -70,10 +70,10 @@ pub trait Iterator { } ``` -Listing 19-21: A hypothetical definition of the +Listing 19-13: A hypothetical definition of the `Iterator` trait using generics -The difference is that when using generics, as in Listing 19-21, we must +The difference is that when using generics, as in Listing 19-13, we must annotate the types in each implementation; because we can also implement `Iterator for Counter` or any other type, we could have multiple implementations of `Iterator` for `Counter`. In other words, when a trait has a @@ -83,7 +83,7 @@ the concrete types of the generic type parameters each time. When we use the indicate which implementation of `Iterator` we want to use. With associated types, we don’t need to annotate types because we can’t -implement a trait on a type multiple times. In Listing 19-20 with the +implement a trait on a type multiple times. In Listing 19-12 with the definition that uses associated types, we can only choose what the type of `Item` will be once, because there can only be one `impl Iterator for Counter`. We don’t have to specify that we want an iterator of `u32` values everywhere @@ -104,7 +104,7 @@ overloading. *Operator overloading* is customizing the behavior of an operator Rust doesn’t allow you to create your own operators or overload arbitrary operators. But you can overload the operations and corresponding traits listed in `std::ops` by implementing the traits associated with the operator. For -example, in Listing 19-22 we overload the `+` operator to add two `Point` +example, in Listing 19-14 we overload the `+` operator to add two `Point` instances together. We do this by implementing the `Add` trait on a `Point` struct: @@ -136,7 +136,7 @@ fn main() { } ``` -Listing 19-22: Implementing the `Add` trait to overload +Listing 19-14: Implementing the `Add` trait to overload the `+` operator for `Point` instances The `add` method adds the `x` values of two `Point` instances and the `y` @@ -171,7 +171,7 @@ default. We have two structs, `Millimeters` and `Meters`, holding values in different units. We want to add values in millimeters to values in meters and have the implementation of `Add` do the conversion correctly. We can implement `Add` for -`Millimeters` with `Meters` as the `RHS`, as shown in Listing 19-23. +`Millimeters` with `Meters` as the `RHS`, as shown in Listing 19-15. Filename: src/lib.rs @@ -190,7 +190,7 @@ impl Add for Millimeters { } ``` -Listing 19-23: Implementing the `Add` trait on +Listing 19-15: Implementing the `Add` trait on `Millimeters` to add `Millimeters` to `Meters` To add `Millimeters` and `Meters`, we specify `impl Add` to set the @@ -221,7 +221,7 @@ on one type. It’s also possible to implement a method directly on the type wit the same name as methods from traits. When calling methods with the same name, you’ll need to tell Rust which one you -want to use. Consider the code in Listing 19-24 where we’ve defined two traits, +want to use. Consider the code in Listing 19-16 where we’ve defined two traits, `Pilot` and `Wizard`, that both have a method called `fly`. We then implement both traits on a type `Human` that already has a method named `fly` implemented on it. Each `fly` method does something different. @@ -258,12 +258,12 @@ impl Human { } ``` -Listing 19-24: Two traits are defined to have a `fly` +Listing 19-16: Two traits are defined to have a `fly` method and are implemented on the `Human` type, and a `fly` method is implemented on `Human` directly When we call `fly` on an instance of `Human`, the compiler defaults to calling -the method that is directly implemented on the type, as shown in Listing 19-25. +the method that is directly implemented on the type, as shown in Listing 19-17. Filename: src/main.rs @@ -302,7 +302,7 @@ fn main() { } ``` -Listing 19-25: Calling `fly` on an instance of +Listing 19-17: Calling `fly` on an instance of `Human` Running this code will print `*waving arms furiously*`, showing that Rust @@ -310,7 +310,7 @@ called the `fly` method implemented on `Human` directly. To call the `fly` methods from either the `Pilot` trait or the `Wizard` trait, we need to use more explicit syntax to specify which `fly` method we mean. -Listing 19-26 demonstrates this syntax. +Listing 19-18 demonstrates this syntax. Filename: src/main.rs @@ -351,13 +351,13 @@ fn main() { } ``` -Listing 19-26: Specifying which trait’s `fly` method we +Listing 19-18: Specifying which trait’s `fly` method we want to call Specifying the trait name before the method name clarifies to Rust which implementation of `fly` we want to call. We could also write `Human::fly(&person)`, which is equivalent to the `person.fly()` that we used -in Listing 19-26, but this is a bit longer to write if we don’t need to +in Listing 19-18, but this is a bit longer to write if we don’t need to disambiguate. Running this code prints the following: @@ -375,7 +375,7 @@ trait to use based on the type of `self`. However, associated functions that are part of traits don’t have a `self` parameter. When two types in the same scope implement that trait, Rust can’t figure out which type you mean unless you use *fully qualified syntax*. For -example, the `Animal` trait in Listing 19-27 has the associated function +example, the `Animal` trait in Listing 19-19 has the associated function `baby_name`, the implementation of `Animal` for the struct `Dog`, and the associated function `baby_name` defined on `Dog` directly. @@ -405,7 +405,7 @@ fn main() { } ``` -Listing 19-27: A trait with an associated function and a +Listing 19-19: A trait with an associated function and a type with an associated function of the same name that also implements the trait @@ -426,8 +426,8 @@ A baby dog is called a Spot This output isn’t what we wanted. We want to call the `baby_name` function that is part of the `Animal` trait that we implemented on `Dog` so the code prints `A baby dog is called a puppy`. The technique of specifying the trait name that -we used in Listing 19-26 doesn’t help here; if we change `main` to the code in -Listing 19-28, we’ll get a compilation error. +we used in Listing 19-18 doesn’t help here; if we change `main` to the code in +Listing 19-20, we’ll get a compilation error. Filename: src/main.rs @@ -437,7 +437,7 @@ fn main() { } ``` -Listing 19-28: Attempting to call the `baby_name` +Listing 19-20: Attempting to call the `baby_name` function from the `Animal` trait, but Rust doesn’t know which implementation to use @@ -456,7 +456,7 @@ error[E0283]: type annotations required: cannot resolve `_: Animal` ``` To disambiguate and tell Rust that we want to use the implementation of -`Animal` for `Dog`, we need to use fully qualified syntax. Listing 19-29 +`Animal` for `Dog`, we need to use fully qualified syntax. Listing 19-21 demonstrates how to use fully qualified syntax. Filename: src/main.rs @@ -485,7 +485,7 @@ fn main() { } ``` -Listing 19-29: Using fully qualified syntax to specify +Listing 19-21: Using fully qualified syntax to specify that we want to call the `baby_name` function from the `Animal` trait as implemented on `Dog` @@ -537,7 +537,7 @@ functionality. Therefore, we need to specify that the `OutlinePrint` trait will work only for types that also implement `Display` and provide the functionality that `OutlinePrint` needs. We can do that in the trait definition by specifying `OutlinePrint: Display`. This technique is similar to adding a trait bound to -the trait. Listing 19-30 shows an implementation of the `OutlinePrint` trait. +the trait. Listing 19-22 shows an implementation of the `OutlinePrint` trait. Filename: src/main.rs @@ -557,7 +557,7 @@ trait OutlinePrint: fmt::Display { } ``` -Listing 19-30: Implementing the `OutlinePrint` trait that +Listing 19-22: Implementing the `OutlinePrint` trait that requires the functionality from `Display` Because we’ve specified that `OutlinePrint` requires the `Display` trait, we @@ -639,7 +639,7 @@ As an example, let’s say we want to implement `Display` on `Vec`, which the orphan rule prevents us from doing directly because the `Display` trait and the `Vec` type are defined outside our crate. We can make a `Wrapper` struct that holds an instance of `Vec`; then we can implement `Display` on -`Wrapper` and use the `Vec` value, as shown in Listing 19-31. +`Wrapper` and use the `Vec` value, as shown in Listing 19-23. Filename: src/main.rs @@ -660,7 +660,7 @@ fn main() { } ``` -Listing 19-31: Creating a `Wrapper` type around +Listing 19-23: Creating a `Wrapper` type around `Vec` to implement `Display` The implementation of `Display` uses `self.0` to access the inner `Vec`, diff --git a/src/doc/book/src/ch19-04-advanced-types.md b/src/doc/book/src/ch19-04-advanced-types.md index adcab5b643..97ea1bb17b 100644 --- a/src/doc/book/src/ch19-04-advanced-types.md +++ b/src/doc/book/src/ch19-04-advanced-types.md @@ -15,7 +15,7 @@ discuss the `!` type and dynamically sized types. The newtype pattern is useful for tasks beyond those we’ve discussed so far, including statically enforcing that values are never confused and indicating the units of a value. You saw an example of using newtypes to indicate units in -Listing 19-23: recall that the `Millimeters` and `Meters` structs wrapped `u32` +Listing 19-15: recall that the `Millimeters` and `Meters` structs wrapped `u32` values in a newtype. If we wrote a function with a parameter of type `Millimeters`, we couldn’t compile a program that accidentally tried to call that function with a value of type `Meters` or a plain `u32`. @@ -47,7 +47,7 @@ type Kilometers = i32; ``` Now, the alias `Kilometers` is a *synonym* for `i32`; unlike the `Millimeters` -and `Meters` types we created in Listing 19-23, `Kilometers` is not a separate, +and `Meters` types we created in Listing 19-15, `Kilometers` is not a separate, new type. Values that have the type `Kilometers` will be treated the same as values of type `i32`: @@ -74,7 +74,7 @@ Box Writing this lengthy type in function signatures and as type annotations all over the code can be tiresome and error prone. Imagine having a project full of -code like that in Listing 19-32. +code like that in Listing 19-24. ```rust let f: Box = Box::new(|| println!("hi")); @@ -89,10 +89,10 @@ fn returns_long_type() -> Box { } ``` -Listing 19-32: Using a long type in many places +Listing 19-24: Using a long type in many places A type alias makes this code more manageable by reducing the repetition. In -Listing 19-33, we’ve introduced an alias named `Thunk` for the verbose type and +Listing 19-25, we’ve introduced an alias named `Thunk` for the verbose type and can replace all uses of the type with the shorter alias `Thunk`. ```rust @@ -110,7 +110,7 @@ fn returns_long_type() -> Thunk { } ``` -Listing 19-33: Introducing a type alias `Thunk` to reduce +Listing 19-25: Introducing a type alias `Thunk` to reduce repetition This code is much easier to read and write! Choosing a meaningful name for a @@ -184,7 +184,7 @@ never are called *diverging functions*. We can’t create values of the type `!` so `bar` can never possibly return. But what use is a type you can never create values for? Recall the code from -Listing 2-5; we’ve reproduced part of it here in Listing 19-34. +Listing 2-5; we’ve reproduced part of it here in Listing 19-26. ```rust # let guess = "3"; @@ -197,7 +197,7 @@ let guess: u32 = match guess.trim().parse() { # } ``` -Listing 19-34: A `match` with an arm that ends in +Listing 19-26: A `match` with an arm that ends in `continue` At the time, we skipped over some details in this code. In Chapter 6 in [“The @@ -215,7 +215,7 @@ let guess = match guess.trim().parse() { The type of `guess` in this code would have to be an integer *and* a string, and Rust requires that `guess` have only one type. So what does `continue` return? How were we allowed to return a `u32` from one arm and have another arm -that ends with `continue` in Listing 19-34? +that ends with `continue` in Listing 19-26? As you might have guessed, `continue` has a `!` value. That is, when Rust computes the type of `guess`, it looks at both match arms, the former with a @@ -243,7 +243,7 @@ impl Option { } ``` -In this code, the same thing happens as in the `match` in Listing 19-34: Rust +In this code, the same thing happens as in the `match` in Listing 19-26: Rust sees that `val` has the type `T` and `panic!` has the type `!`, so the result of the overall `match` expression is `T`. This code works because `panic!` doesn’t produce a value; it ends the program. In the `None` case, we won’t be diff --git a/src/doc/book/src/ch19-05-advanced-functions-and-closures.md b/src/doc/book/src/ch19-05-advanced-functions-and-closures.md index e450c7beeb..a40e222e3d 100644 --- a/src/doc/book/src/ch19-05-advanced-functions-and-closures.md +++ b/src/doc/book/src/ch19-05-advanced-functions-and-closures.md @@ -12,7 +12,7 @@ with function pointers will allow you to use functions as arguments to other functions. Functions coerce to the type `fn` (with a lowercase f), not to be confused with the `Fn` closure trait. The `fn` type is called a *function pointer*. The syntax for specifying that a parameter is a function pointer is -similar to that of closures, as shown in Listing 19-35. +similar to that of closures, as shown in Listing 19-27. Filename: src/main.rs @@ -32,7 +32,7 @@ fn main() { } ``` -Listing 19-35: Using the `fn` type to accept a function +Listing 19-27: Using the `fn` type to accept a function pointer as an argument This code prints `The answer is: 12`. We specify that the parameter `f` in diff --git a/src/doc/book/src/ch19-06-macros.md b/src/doc/book/src/ch19-06-macros.md index f2d0c328f1..a1a23b444a 100644 --- a/src/doc/book/src/ch19-06-macros.md +++ b/src/doc/book/src/ch19-06-macros.md @@ -73,7 +73,7 @@ We could also use the `vec!` macro to make a vector of two integers or a vector of five string slices. We wouldn’t be able to use a function to do the same because we wouldn’t know the number or type of values up front. -Listing 19-36 shows a slightly simplified definition of the `vec!` macro. +Listing 19-28 shows a slightly simplified definition of the `vec!` macro. Filename: src/lib.rs @@ -92,7 +92,7 @@ macro_rules! vec { } ``` -Listing 19-36: A simplified version of the `vec!` macro +Listing 19-28: A simplified version of the `vec!` macro definition > Note: The actual definition of the `vec!` macro in the standard library @@ -118,7 +118,7 @@ one arm. Valid pattern syntax in macro definitions is different than the pattern syntax covered in Chapter 18 because macro patterns are matched against Rust code structure rather than values. Let’s walk through what the pattern pieces in -Listing 19-36 mean; for the full macro pattern syntax, see [the reference]. +Listing 19-28 mean; for the full macro pattern syntax, see [the reference]. [the reference]: ../reference/macros.html @@ -178,7 +178,7 @@ function-like, all work in a similar fashion. When creating procedural macros, the definitions must reside in their own crate with a special crate type. This is for complex technical reasons that we hope to eliminate in the future. Using procedural macros looks like the code in -Listing 19-37, where `some_attribute` is a placeholder for using a specific +Listing 19-29, where `some_attribute` is a placeholder for using a specific macro. Filename: src/lib.rs @@ -191,7 +191,7 @@ pub fn some_name(input: TokenStream) -> TokenStream { } ``` -Listing 19-37: An example of using a procedural +Listing 19-29: An example of using a procedural macro The function that defines a procedural macro takes a `TokenStream` as an input @@ -217,7 +217,7 @@ types, we’ll provide a procedural macro so users can annotate their type with function. The default implementation will print `Hello, Macro! My name is TypeName!` where `TypeName` is the name of the type on which this trait has been defined. In other words, we’ll write a crate that enables another -programmer to write code like Listing 19-38 using our crate. +programmer to write code like Listing 19-30 using our crate. Filename: src/main.rs @@ -233,7 +233,7 @@ fn main() { } ``` -Listing 19-38: The code a user of our crate will be able +Listing 19-30: The code a user of our crate will be able to write when using our procedural macro This code will print `Hello, Macro! My name is Pancakes!` when we’re done. The @@ -319,7 +319,7 @@ syn = "0.14.4" quote = "0.6.3" ``` -To start defining the procedural macro, place the code in Listing 19-39 into +To start defining the procedural macro, place the code in Listing 19-31 into your *src/lib.rs* file for the `hello_macro_derive` crate. Note that this code won’t compile until we add a definition for the `impl_hello_macro` function. @@ -350,7 +350,7 @@ pub fn hello_macro_derive(input: TokenStream) -> TokenStream { } ``` -Listing 19-39: Code that most procedural macro crates +Listing 19-31: Code that most procedural macro crates will require in order to process Rust code Notice that we’ve split the code into the `hello_macro_derive` function @@ -386,7 +386,7 @@ The `hello_macro_derive` function first converts the `input` from a `TokenStream` to a data structure that we can then interpret and perform operations on. This is where `syn` comes into play. The `parse` function in `syn` takes a `TokenStream` and returns a `DeriveInput` struct representing the -parsed Rust code. Listing 19-40 shows the relevant parts of the `DeriveInput` +parsed Rust code. Listing 19-32 shows the relevant parts of the `DeriveInput` struct we get from parsing the `struct Pancakes;` string: ```rust,ignore @@ -409,8 +409,8 @@ DeriveInput { } ``` -Listing 19-40: The `DeriveInput` instance we get when -parsing the code that has the macro’s attribute in Listing 19-38 +Listing 19-32: The `DeriveInput` instance we get when +parsing the code that has the macro’s attribute in Listing 19-30 The fields of this struct show that the Rust code we’ve parsed is a unit struct with the `ident` (identifier, meaning the name) of `Pancakes`. There are more @@ -436,7 +436,7 @@ about what went wrong by using `panic!` or `expect`. Now that we have the code to turn the annotated Rust code from a `TokenStream` into a `DeriveInput` instance, let’s generate the code that implements the -`HelloMacro` trait on the annotated type, as shown in Listing 19-41. +`HelloMacro` trait on the annotated type, as shown in Listing 19-33. Filename: hello_macro_derive/src/lib.rs @@ -454,16 +454,16 @@ fn impl_hello_macro(ast: &syn::DeriveInput) -> TokenStream { } ``` -Listing 19-41: Implementing the `HelloMacro` trait using +Listing 19-33: Implementing the `HelloMacro` trait using the parsed Rust code We get an `Ident` struct instance containing the name (identifier) of the -annotated type using `ast.ident`. The struct in Listing 19-40 shows that when -we run the `impl_hello_macro` function on the code in Listing 19-38, the +annotated type using `ast.ident`. The struct in Listing 19-32 shows that when +we run the `impl_hello_macro` function on the code in Listing 19-30, the `ident` we get will have the `ident` field with a value of `"Pancakes"`. Thus, -the `name` variable in Listing 19-41 will contain an `Ident` struct instance +the `name` variable in Listing 19-33 will contain an `Ident` struct instance that, when printed, will be the string `"Pancakes"`, the name of the struct in -Listing 19-38. +Listing 19-30. The `quote!` macro lets us define the Rust code that we want to return. The compiler expects something different to the direct result of the `quote!` @@ -494,7 +494,7 @@ saves an allocation by converting `#name` to a string literal at compile time. At this point, `cargo build` should complete successfully in both `hello_macro` and `hello_macro_derive`. Let’s hook up these crates to the code in Listing -19-38 to see the procedural macro in action! Create a new binary project in +19-30 to see the procedural macro in action! Create a new binary project in your *projects* directory using `cargo new pancakes`. We need to add `hello_macro` and `hello_macro_derive` as dependencies in the `pancakes` crate’s *Cargo.toml*. If you’re publishing your versions of `hello_macro` and @@ -507,7 +507,7 @@ hello_macro = { path = "../hello_macro" } hello_macro_derive = { path = "../hello_macro/hello_macro_derive" } ``` -Put the code in Listing 19-38 into *src/main.rs*, and run `cargo run`: it +Put the code in Listing 19-30 into *src/main.rs*, and run `cargo run`: it should print `Hello, Macro! My name is Pancakes!` The implementation of the `HelloMacro` trait from the procedural macro was included without the `pancakes` crate needing to implement it; the `#[derive(HelloMacro)]` added the diff --git a/src/doc/book/src/title-page.md b/src/doc/book/src/title-page.md index 84fd62fc0a..4e77b77ebd 100644 --- a/src/doc/book/src/title-page.md +++ b/src/doc/book/src/title-page.md @@ -5,9 +5,36 @@ Welcome to The Rust Programming Language book! This version of the text assumes you are using Rust 1.31.0 or later, with `edition="2018"` in *Cargo.toml* of all projects to use Rust 2018 Edition idioms. See the [“Installation” section -of Chapter 1][install] to install or update Rust, and see -[Appendix E][editions] for information on what editions of Rust -are. +of Chapter 1][install] to install or update Rust, and see the +new [Appendix E][editions] for information on what editions of +Rust are. + +The 2018 Edition of the Rust language includes a number of improvements to make +Rust more ergonomic and easier to learn. This printing of the book has a number +of changes to reflect the improvements: + +- Chapter 7, "Managing Growing Projects with Packages, Crates, and Modules", + has been mostly rewritten. The module system and the way paths work in the + 2018 Edition have been made more consistent. +- Chapter 10 has new sections titled "Traits as Parameters" and "Returning + Types that Implement Traits" that explain the new `impl Trait` syntax. +- Chapter 11 has a new section "Using `Result` in Tests" that shows how + to write tests that can use the `?` operator. +- The "Advanced Lifetimes" section of Chapter 19 has been removed as compiler + improvements have made the constructs in that section even more rare. +- The previous Appendix D on macros has been expanded to include procedural + macros, and has been moved to the "Macros" section in Chapter 19. +- Appendix A, "Keywords", also explains the new raw identifiers feature that + enables code written in Rust 2015 and Rust 2018 to interoperate. +- Appendix D now covers useful development tools that have been recently + released. +- We fixed a number of small errors and imprecise wording throughout the book. + Thank you to the readers who reported them! + +Note that any code in the first printing of *The Rust Programming Language* +that compiled will continue to compile without `edition="2018"` in the +project's *Cargo.toml*, even as you update the version of the Rust compiler +that you're using. That's Rust's backwards compatibility guarantees at work! The HTML format is available online at [https://doc.rust-lang.org/stable/book/](https://doc.rust-lang.org/stable/book/) diff --git a/src/doc/edition-guide/src/rust-2018/documentation/new-editions-of-the-book.md b/src/doc/edition-guide/src/rust-2018/documentation/new-editions-of-the-book.md index 1b30935b09..ecee4bc81a 100644 --- a/src/doc/edition-guide/src/rust-2018/documentation/new-editions-of-the-book.md +++ b/src/doc/edition-guide/src/rust-2018/documentation/new-editions-of-the-book.md @@ -1,10 +1,8 @@ # New editions of the "the book" -![Minimum Rust version: 1.18](https://img.shields.io/badge/Minimum%20Rust%20Version-1.18-red.svg) for drafts of the second edition - ![Minimum Rust version: 1.26](https://img.shields.io/badge/Minimum%20Rust%20Version-1.26-brightgreen.svg) for the final version of the second edition -![Minimum Rust version: 1.28](https://img.shields.io/badge/Minimum%20Rust%20Version-1.28-red.svg) for drafts of the 2018 edition +![Minimum Rust version: 1.31](https://img.shields.io/badge/Minimum%20Rust%20Version-1.31-brightgreen.svg) for the 2018 edition We've distributed a copy of "The Rust Programming Language," affectionately nicknamed "the book", with every version of Rust since Rust 1.0. @@ -15,23 +13,19 @@ details were nailed down for the 1.0 release. It didn't do a fantastic job of teaching lifetimes. Starting with Rust 1.18, we shipped drafts of a second edition of the book. -The final version was shipped with Rust 1.26. The new edition is a complete +The final version was shipped with Rust 1.26. The second edition is a complete re-write from the ground up, using the last two years of knowledge we’ve -gained from teaching people Rust. You’ll find brand-new explanations for a -lot of Rust’s core concepts, new projects to build, and all kinds of other -good stuff. Please [check it -out](https://doc.rust-lang.org/book/second-edition/index.html) and let us +gained from teaching people Rust. + +You can purchase [a printed version of the second edition from No Starch +Press](https://nostarch.com/Rust). Now that the print version has shipped, the +second edition is frozen. + +As of 1.31, the book has been completely updated for the 2018 Edition release. +It's still pretty close to the second edition, but contains information about +newer features since the book's content was frozen. Additionally, instead of +publishing separate editions of the book, only the latest version of the book +is published online. You’ll find brand-new explanations for a lot of Rust’s +core concepts, new projects to build, and all kinds of other good stuff. +Please [check it out](https://doc.rust-lang.org/book/index.html) and let us know what you think! - -You can also purchase [a dead-tree version from No Starch -Press](https://nostarch.com/Rust). Now that the print version has shipped, -the second edition is frozen. - -The names are a bit confusing though, because the "second edition" of the -book is the first printed edition of the book. As such, we decided that newer -editions of the book will correspond with newer editions of Rust itself, and -so starting with 1.28, we've been shipping drafts of the next version, [the -2018 Edition](https://doc.rust-lang.org/book/2018-edition/index.html). It's -still pretty close to the second edition, but contains information about -newer features since the book's content was frozen. We'll be continuing to -update this edition until we decide to print a second edition in paper. \ No newline at end of file diff --git a/src/doc/edition-guide/src/rust-2018/edition-changes.md b/src/doc/edition-guide/src/rust-2018/edition-changes.md index ebfa1caac0..db9a54c9db 100644 --- a/src/doc/edition-guide/src/rust-2018/edition-changes.md +++ b/src/doc/edition-guide/src/rust-2018/edition-changes.md @@ -3,7 +3,6 @@ The following is a summary of changes that only apply to code compiled with the 2018 edition compared to the 2015 edition. -- [Non-lexical lifetimes] (future inclusion planned for 2015 edition) - [At most once] `?` macro repetition operator. - [Path changes]: - Paths in `use` declarations work the same as other paths. diff --git a/src/doc/edition-guide/src/rust-2018/error-handling-and-panics/controlling-panics-with-std-panic.md b/src/doc/edition-guide/src/rust-2018/error-handling-and-panics/controlling-panics-with-std-panic.md index 6c1bf63465..3f4ae23640 100644 --- a/src/doc/edition-guide/src/rust-2018/error-handling-and-panics/controlling-panics-with-std-panic.md +++ b/src/doc/edition-guide/src/rust-2018/error-handling-and-panics/controlling-panics-with-std-panic.md @@ -49,7 +49,7 @@ and so catching panics may not work. If your code relies on `catch_unwind`, you should add this to your Cargo.toml: ```toml -[profile.debug] +[profile.dev] panic = "unwind" [profile.release] @@ -77,4 +77,4 @@ paired with `resume_unwind`, which can then be used to restart the panicking process on the client of the pool, where it belongs. In both cases, you're introducing a new isolation boundary within a thread, and -then translating the panic into some other form of error elsewhere. \ No newline at end of file +then translating the panic into some other form of error elsewhere. diff --git a/src/doc/edition-guide/src/rust-2018/ownership-and-lifetimes/non-lexical-lifetimes.md b/src/doc/edition-guide/src/rust-2018/ownership-and-lifetimes/non-lexical-lifetimes.md index a4debaa074..8daaef9a5d 100644 --- a/src/doc/edition-guide/src/rust-2018/ownership-and-lifetimes/non-lexical-lifetimes.md +++ b/src/doc/edition-guide/src/rust-2018/ownership-and-lifetimes/non-lexical-lifetimes.md @@ -1,6 +1,8 @@ # Non-lexical lifetimes -![Minimum Rust version: 1.31](https://img.shields.io/badge/Minimum%20Rust%20Version-1.31-brightgreen.svg) +![Minimum Rust version: 1.31](https://img.shields.io/badge/Minimum%20Rust%20Version-1.31-brightgreen.svg) for 2018 edition + +![Minimum Rust version: 1.36](https://img.shields.io/badge/Minimum%20Rust%20Version-1.36-brightgreen.svg) for 2015 edition The borrow checker has been enhanced to accept more code, via a mechanism called "non-lexical lifetimes." Consider this example: @@ -44,7 +46,7 @@ fn main() { let mut x = 5; let y = &x; let z = &mut x; - + println!("y: {}", y); } ``` @@ -74,7 +76,7 @@ error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immuta | -- immutable borrow occurs here 5 | let z = &mut x; | ^^^^^^ mutable borrow occurs here -6 | +6 | 7 | println!("y: {}", y); | - borrow later used here ``` diff --git a/src/doc/edition-guide/src/rust-2018/rustup-for-managing-rust-versions.md b/src/doc/edition-guide/src/rust-2018/rustup-for-managing-rust-versions.md index 53b32450c6..73be9e6b2d 100644 --- a/src/doc/edition-guide/src/rust-2018/rustup-for-managing-rust-versions.md +++ b/src/doc/edition-guide/src/rust-2018/rustup-for-managing-rust-versions.md @@ -50,7 +50,7 @@ will update anything that has one. To set the default toolchain to something other than `stable`: ```console -$ rustup toolchain default nightly +$ rustup default nightly ``` To use a toolchain other than the default, use `rustup run`: diff --git a/src/doc/edition-guide/src/rust-2018/trait-system/more-container-types-support-trait-objects.md b/src/doc/edition-guide/src/rust-2018/trait-system/more-container-types-support-trait-objects.md index d186a74617..cf3a927a88 100644 --- a/src/doc/edition-guide/src/rust-2018/trait-system/more-container-types-support-trait-objects.md +++ b/src/doc/edition-guide/src/rust-2018/trait-system/more-container-types-support-trait-objects.md @@ -3,7 +3,7 @@ ![Minimum Rust version: 1.2](https://img.shields.io/badge/Minimum%20Rust%20Version-1.2-brightgreen.svg) In Rust 1.0, only certain, special types could be used to create [trait -objects](https://doc.rust-lang.org/book/second-edition/ch17-02-trait-objects.html). +objects](https://doc.rust-lang.org/book/ch17-02-trait-objects.html). With Rust 1.2, that restriction was lifted, and more types became able to do this. For example, `Rc`, one of Rust's reference-counted types: @@ -14,7 +14,7 @@ use std::rc::Rc; trait Foo {} impl Foo for i32 { - + } fn main() { @@ -25,4 +25,4 @@ fn main() { This code would not work with Rust 1.0, but now works. > If you haven't seen the `dyn` syntax before, see the section on it. For -> versions that do not support it, replace `Rc` with `Rc`. \ No newline at end of file +> versions that do not support it, replace `Rc` with `Rc`. diff --git a/src/doc/embedded-book/src/intro/index.md b/src/doc/embedded-book/src/intro/index.md index 6064391276..d4304f0050 100644 --- a/src/doc/embedded-book/src/intro/index.md +++ b/src/doc/embedded-book/src/intro/index.md @@ -55,7 +55,7 @@ If you are unfamiliar with anything mentioned above or if you want more informat | Topic | Resource | Description | |--------------|----------|-------------| -| Rust | [Rust Book](https://doc.rust-lang.org/book/) | If you are not yet comfortable with Rust, we highly suggest reading the this book. | +| Rust | [Rust Book](https://doc.rust-lang.org/book/) | If you are not yet comfortable with Rust, we highly suggest reading this book. | | Rust, Embedded | [Embedded Rust Bookshelf](https://docs.rust-embedded.org) | Here you can find several other resources provided by Rust's Embedded Working Group. | | Rust, Embedded | [Embedonomicon](https://docs.rust-embedded.org/embedonomicon/) | The nitty gritty details when doing embedded programming in Rust. | | Rust, Embedded | [embedded FAQ](https://docs.rust-embedded.org/faq.html) | Frequently asked questions about Rust in an embedded context. | diff --git a/src/doc/embedded-book/src/intro/install.md b/src/doc/embedded-book/src/intro/install.md index a09cbd5866..28df690463 100644 --- a/src/doc/embedded-book/src/intro/install.md +++ b/src/doc/embedded-book/src/intro/install.md @@ -16,25 +16,25 @@ rustc 1.31.1 (b6c32da9b 2018-12-18) For bandwidth and disk usage concerns the default installation only supports native compilation. To add cross compilation support for the ARM Cortex-M -architecture choose one of the following compilation targets. Use the last one -for the STM32F3DISCOVERY board and follow along with the book. +architectures choose one of the following compilation targets. For the STM32F3DISCOVERY +board used for the examples in this book, use the final `thumbv7em-none-eabihf` target. -Cortex M0 M0+ +Cortex-M0, M0+, and M1 (ARMv6-M architecture): ``` console $ rustup target add thumbv6m-none-eabi ``` -Cortex M3 +Cortex-M3 (ARMv7-M architecture): ``` console $ rustup target add thumbv7m-none-eabi ``` -Cortex M4 M7 without FPU +Cortex-M4 and M7 without hardware floating point (ARMv7E-M architecture): ``` console $ rustup target add thumbv7em-none-eabi ``` -Cortex M4 M7 with FPU <-- STM32F3DISCOVERY +Cortex-M4F and M7F with hardware floating point (ARMv7E-M architecture): ``` console $ rustup target add thumbv7em-none-eabihf ``` diff --git a/src/doc/embedded-book/src/intro/install/linux.md b/src/doc/embedded-book/src/intro/install/linux.md index e1a0c95c46..f8684d0a83 100644 --- a/src/doc/embedded-book/src/intro/install/linux.md +++ b/src/doc/embedded-book/src/intro/install/linux.md @@ -20,10 +20,7 @@ Here are the installation commands for a few Linux distributions. ``` console -$ sudo apt install \ - gdb-multiarch \ - openocd \ - qemu-system-arm +sudo apt install gdb-multiarch openocd qemu-system-arm ``` - Ubuntu 14.04 and 16.04 @@ -37,10 +34,7 @@ $ sudo apt install \ ``` console -$ sudo apt install \ - gdb-arm-none-eabi \ - openocd \ - qemu-system-arm +sudo apt install gdb-arm-none-eabi openocd qemu-system-arm ``` - Fedora 27 or newer @@ -54,10 +48,7 @@ $ sudo apt install \ ``` console -$ sudo dnf install \ - arm-none-eabi-gdb \ - openocd \ - qemu-system-arm +sudo dnf install arm-none-eabi-gdb openocd qemu-system-arm ``` - Arch Linux @@ -66,22 +57,14 @@ $ sudo dnf install \ > Cortex-M programs ``` console -$ sudo pacman -S \ - arm-none-eabi-gdb \ - qemu-arch-extra \ - openocd - +sudo pacman -S arm-none-eabi-gdb qemu-arch-extra openocd ``` ## udev rules This rule lets you use OpenOCD with the Discovery board without root privilege. -Create this file in `/etc/udev/rules.d` with the contents shown below. - -``` console -$ cat /etc/udev/rules.d/70-st-link.rules -``` +Create the file `/etc/udev/rules.d/70-st-link.rules` with the contents shown below. ``` text # STM32F3DISCOVERY rev A/B - ST-LINK/V2 @@ -94,28 +77,41 @@ ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", TAG+="uaccess" Then reload all the udev rules with: ``` console -$ sudo udevadm control --reload-rules +sudo udevadm control --reload-rules ``` If you had the board plugged to your laptop, unplug it and then plug it again. -You can check the permissions by running these commands: +You can check the permissions by running this command: ``` console -$ lsusb +lsusb +``` + +Which should show something like + +```text (..) Bus 001 Device 018: ID 0483:374b STMicroelectronics ST-LINK/V2.1 (..) ``` -Take note of the bus and device numbers. Use those numbers in the following -command: +Take note of the bus and device numbers. Use those numbers to create a path like +`/dev/bus/usb//`. Then use this path like so: ``` console -$ # the format of the path is /dev/bus/usb// -$ ls -l /dev/bus/usb/001/018 +ls -l /dev/bus/usb/001/018 +``` + +```text crw-------+ 1 root root 189, 17 Sep 13 12:34 /dev/bus/usb/001/018 -$ getfacl /dev/bus/usb/001/018 | grep user +``` + +```console +getfacl /dev/bus/usb/001/018 | grep user +``` + +```text user::rw- user:you:rw- ``` diff --git a/src/doc/embedded-book/src/intro/install/verify.md b/src/doc/embedded-book/src/intro/install/verify.md index 2db7005cb3..873fb3dba8 100644 --- a/src/doc/embedded-book/src/intro/install/verify.md +++ b/src/doc/embedded-book/src/intro/install/verify.md @@ -60,7 +60,7 @@ you'll need to configure things a bit differently later on. You can move to the If neither command worked as a normal user then try to run them with root permission (e.g. `sudo openocd ..`). If the commands do work with root -permission then check that the [udev rules] has been correctly set. +permission then check that the [udev rules] have been correctly set. [udev rules]: linux.md#udev-rules diff --git a/src/doc/embedded-book/src/start/qemu.md b/src/doc/embedded-book/src/start/qemu.md index 30b3d9cb99..239ea24b32 100644 --- a/src/doc/embedded-book/src/start/qemu.md +++ b/src/doc/embedded-book/src/start/qemu.md @@ -362,7 +362,7 @@ echo $? 0 ``` -Let me break down that long QEMU command for you: +Let's break down that QEMU command: - `qemu-system-arm`. This is the QEMU emulator. There are a few variants of these QEMU binaries; this one does full *system* emulation of *ARM* machines diff --git a/src/doc/nomicon/src/borrow-splitting.md b/src/doc/nomicon/src/borrow-splitting.md index 5bd1839d22..487e1f63e8 100644 --- a/src/doc/nomicon/src/borrow-splitting.md +++ b/src/doc/nomicon/src/borrow-splitting.md @@ -26,7 +26,7 @@ println!("{} {} {} {}", a, b, c, c2); However borrowck doesn't understand arrays or slices in any way, so this doesn't work: -```rust,ignore +```rust,compile_fail let mut x = [1, 2, 3]; let a = &mut x[0]; let b = &mut x[1]; @@ -60,7 +60,12 @@ the left of the index, and one for everything to the right. Intuitively we know this is safe because the slices don't overlap, and therefore alias. However the implementation requires some unsafety: -```rust,ignore +```rust +# use std::slice::from_raw_parts_mut; +# struct FakeSlice(T); +# impl FakeSlice { +# fn len(&self) -> usize { unimplemented!() } +# fn as_mut_ptr(&mut self) -> *mut T { unimplemented!() } fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T]) { let len = self.len(); let ptr = self.as_mut_ptr(); @@ -70,6 +75,7 @@ fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T]) { from_raw_parts_mut(ptr.offset(mid as isize), len - mid)) } } +# } ``` This is actually a bit subtle. So as to avoid ever making two `&mut`'s to the diff --git a/src/doc/nomicon/src/checked-uninit.md b/src/doc/nomicon/src/checked-uninit.md index 1aff6f5593..59badccccb 100644 --- a/src/doc/nomicon/src/checked-uninit.md +++ b/src/doc/nomicon/src/checked-uninit.md @@ -4,7 +4,7 @@ Like C, all stack variables in Rust are uninitialized until a value is explicitly assigned to them. Unlike C, Rust statically prevents you from ever reading them until you do: -```rust,ignore +```rust,compile_fail fn main() { let x: i32; println!("{}", x); @@ -39,7 +39,7 @@ fn main() { but this doesn't: -```rust,ignore +```rust,compile_fail fn main() { let x: i32; if true { diff --git a/src/doc/nomicon/src/lifetime-mismatch.md b/src/doc/nomicon/src/lifetime-mismatch.md index 7ad2a8444b..5d7500dd99 100644 --- a/src/doc/nomicon/src/lifetime-mismatch.md +++ b/src/doc/nomicon/src/lifetime-mismatch.md @@ -2,7 +2,8 @@ Given the following code: -```rust,ignore +```rust,edition2018,compile_fail +#[derive(Debug)] struct Foo; impl Foo { @@ -14,25 +15,25 @@ fn main() { let mut foo = Foo; let loan = foo.mutate_and_share(); foo.share(); + println!("{:?}", loan); } ``` -One might expect it to compile. We call `mutate_and_share`, which mutably borrows -`foo` temporarily, but then returns only a shared reference. Therefore we -would expect `foo.share()` to succeed as `foo` shouldn't be mutably borrowed. +One might expect it to compile. We call `mutate_and_share`, which mutably +borrows `foo` temporarily, but then returns only a shared reference. Therefore +we would expect `foo.share()` to succeed as `foo` shouldn't be mutably borrowed. However when we try to compile it: ```text error[E0502]: cannot borrow `foo` as immutable because it is also borrowed as mutable - --> src/lib.rs:11:5 + --> src/main.rs:12:5 | -10 | let loan = foo.mutate_and_share(); +11 | let loan = foo.mutate_and_share(); | --- mutable borrow occurs here -11 | foo.share(); +12 | foo.share(); | ^^^ immutable borrow occurs here -12 | } - | - mutable borrow ends here +13 | println!("{:?}", loan); ``` What happened? Well, we got the exact same reasoning as we did for @@ -48,20 +49,21 @@ impl Foo { } fn main() { - 'b: { - let mut foo: Foo = Foo; - 'c: { - let loan: &'c Foo = Foo::mutate_and_share::<'c>(&'c mut foo); - 'd: { - Foo::share::<'d>(&'d foo); - } - } + 'b: { + let mut foo: Foo = Foo; + 'c: { + let loan: &'c Foo = Foo::mutate_and_share::<'c>(&'c mut foo); + 'd: { + Foo::share::<'d>(&'d foo); + } + println!("{:?}", loan); + } } } ``` The lifetime system is forced to extend the `&mut foo` to have lifetime `'c`, -due to the lifetime of `loan` and mutate_and_share's signature. Then when we +due to the lifetime of `loan` and `mutate_and_share`'s signature. Then when we try to call `share`, and it sees we're trying to alias that `&'c mut foo` and blows up in our face! @@ -69,9 +71,31 @@ This program is clearly correct according to the reference semantics we actually care about, but the lifetime system is too coarse-grained to handle that. -TODO: other common problems? SEME regions stuff, mostly? - +# Improperly reduced borrows + +This currently fails to compile, because Rust doesn't understand that the borrow +is no longer needed and conservatively falls back to using a whole scope for it. +This will eventually get fixed. + +```rust,edition2018,compile_fail +# use std::collections::HashMap; +# use std::cmp::Eq; +# use std::hash::Hash; +fn get_default<'m, K, V>(map: &'m mut HashMap, key: K) -> &'m mut V +where + K: Clone + Eq + Hash, + V: Default, +{ + match map.get_mut(&key) { + Some(value) => value, + None => { + map.insert(key.clone(), V::default()); + map.get_mut(&key).unwrap() + } + } +} +``` [ex2]: lifetimes.html#example-aliasing-a-mutable-reference diff --git a/src/doc/nomicon/src/lifetimes.md b/src/doc/nomicon/src/lifetimes.md index e2f0cc8677..bc917b14dd 100644 --- a/src/doc/nomicon/src/lifetimes.md +++ b/src/doc/nomicon/src/lifetimes.md @@ -1,9 +1,17 @@ # Lifetimes -Rust enforces these rules through *lifetimes*. Lifetimes are effectively -just names for scopes somewhere in the program. Each reference, -and anything that contains a reference, is tagged with a lifetime specifying -the scope it's valid for. +Rust enforces these rules through *lifetimes*. Lifetimes are named +regions of code that a reference must be valid for. Those regions +may be fairly complex, as they correspond to paths of execution +in the program. There may even be holes in these paths of execution, +as it's possible to invalidate a reference as long as it's reinitialized +before it's used again. Types which contain references (or pretend to) +may also be tagged with lifetimes so that Rust can prevent them from +being invalidated as well. + +In most of our examples, the lifetimes will coincide with scopes. This is +because our examples are simple. The more complex cases where they don't +coincide are described below. Within a function body, Rust generally doesn't let you explicitly name the lifetimes involved. This is because it's generally not really necessary @@ -23,10 +31,10 @@ syrup even -- around scopes and lifetimes, because writing everything out explicitly is *extremely noisy*. All Rust code relies on aggressive inference and elision of "obvious" things. -One particularly interesting piece of sugar is that each `let` statement implicitly -introduces a scope. For the most part, this doesn't really matter. However it -does matter for variables that refer to each other. As a simple example, let's -completely desugar this simple piece of Rust code: +One particularly interesting piece of sugar is that each `let` statement +implicitly introduces a scope. For the most part, this doesn't really matter. +However it does matter for variables that refer to each other. As a simple +example, let's completely desugar this simple piece of Rust code: ```rust let x = 0; @@ -85,7 +93,7 @@ z = y; Alright, let's look at some of those examples from before: -```rust,ignore +```rust,compile_fail fn as_str(data: &u32) -> &str { let s = format!("{}", data); &s @@ -169,7 +177,7 @@ our implementation *just a bit*.) How about the other example: -```rust,ignore +```rust,compile_fail let mut data = vec![1, 2, 3]; let x = &data[0]; data.push(4); @@ -201,7 +209,7 @@ violate the *second* rule of references. However this is *not at all* how Rust reasons that this program is bad. Rust doesn't understand that `x` is a reference to a subpath of `data`. It doesn't -understand Vec at all. What it *does* see is that `x` has to live for `'b` to +understand `Vec` at all. What it *does* see is that `x` has to live for `'b` to be printed. The signature of `Index::index` subsequently demands that the reference we take to `data` has to survive for `'b`. When we try to call `push`, it then sees us try to make an `&'c mut data`. Rust knows that `'c` is contained @@ -213,3 +221,82 @@ totally ok*, because it keeps us from spending all day explaining our program to the compiler. However it does mean that several programs that are totally correct with respect to Rust's *true* semantics are rejected because lifetimes are too dumb. + + + +# The area covered by a lifetime + +The lifetime (sometimes called a *borrow*) is *alive* from the place it is +created to its last use. The borrowed thing needs to outlive only borrows that +are alive. This looks simple, but there are few subtleties. + +The following snippet compiles, because after printing `x`, it is no longer +needed, so it doesn't matter if it is dangling or aliased (even though the +variable `x` *technically* exists to the very end of the scope). + +```rust,edition2018 +let mut data = vec![1, 2, 3]; +let x = &data[0]; +println!("{}", x); +// This is OK, x is no longer needed +data.push(4); +``` + +However, if the value has a destructor, the destructor is run at the end of the +scope. And running the destructor is considered a use ‒ obviously the last one. +So, this will *not* compile. + +```rust,edition2018,compile_fail +#[derive(Debug)] +struct X<'a>(&'a i32); + +impl Drop for X<'_> { + fn drop(&mut self) {} +} + +let mut data = vec![1, 2, 3]; +let x = X(&data[0]); +println!("{:?}", x); +data.push(4); +// Here, the destructor is run and therefore this'll fail to compile. +``` + +Furthermore, there might be multiple possible last uses of the borrow, for +example in each branch of a condition. + +```rust,edition2018 +# fn some_condition() -> bool { true } +let mut data = vec![1, 2, 3]; +let x = &data[0]; + +if some_condition() { + println!("{}", x); // This is the last use of `x` in this branch + data.push(4); // So we can push here +} else { + // There's no use of `x` in here, so effectively the last use is the + // creation of x at the top of the example. + data.push(5); +} +``` + +And a lifetime can have a pause in it. Or you might look at it as two distinct +borrows just being tied to the same local variable. This often happens around +loops (writing a new value of a variable at the end of the loop and using it for +the last time at the top of the next iteration). + +```rust,edition2018 +let mut data = vec![1, 2, 3]; +// This mut allows us to change where the reference points to +let mut x = &data[0]; + +println!("{}", x); // Last use of this borrow +data.push(4); +x = &data[3]; // We start a new borrow here +println!("{}", x); +``` + +Historically, Rust kept the borrow alive until the end of scope, so these +examples might fail to compile with older compilers. Also, there are still some +corner cases where Rust fails to properly shorten the live part of the borrow +and fails to compile even when it looks like it should. These'll be solved over +time. diff --git a/src/doc/nomicon/src/phantom-data.md b/src/doc/nomicon/src/phantom-data.md index c13e3f8c96..fe63606c4a 100644 --- a/src/doc/nomicon/src/phantom-data.md +++ b/src/doc/nomicon/src/phantom-data.md @@ -5,7 +5,7 @@ types or lifetimes are logically associated with a struct, but not actually part of a field. This most commonly occurs with lifetimes. For instance, the `Iter` for `&'a [T]` is (approximately) defined as follows: -```rust,ignore +```rust,compile_fail struct Iter<'a, T: 'a> { ptr: *const T, end: *const T, @@ -22,7 +22,7 @@ We do this using `PhantomData`, which is a special marker type. `PhantomData` consumes no space, but simulates a field of the given type for the purpose of static analysis. This was deemed to be less error-prone than explicitly telling the type-system the kind of variance that you want, while also providing other -useful such as the information needed by drop check. +useful things such as the information needed by drop check. Iter logically contains a bunch of `&'a T`s, so this is exactly what we tell the PhantomData to simulate: diff --git a/src/doc/nomicon/src/subtyping.md b/src/doc/nomicon/src/subtyping.md index ee47d39a64..8fbddd7993 100644 --- a/src/doc/nomicon/src/subtyping.md +++ b/src/doc/nomicon/src/subtyping.md @@ -5,7 +5,7 @@ languages to be a bit more flexible and permissive. Subtyping in Rust is a bit different from subtyping in other languages. This makes it harder to give simple examples, which is a problem since subtyping, -and especially variance, are already hard to understand properly. As in, +and especially variance, is already hard to understand properly. As in, even compiler writers mess it up all the time. To keep things simple, this section will consider a small extension to the diff --git a/src/doc/nomicon/src/transmutes.md b/src/doc/nomicon/src/transmutes.md index 043c8fe462..a17fab0246 100644 --- a/src/doc/nomicon/src/transmutes.md +++ b/src/doc/nomicon/src/transmutes.md @@ -6,9 +6,10 @@ really can't emphasize that you should deeply think about finding Another Way than the operations covered in this section. This is really, truly, the most horribly unsafe thing you can do in Rust. The railguards here are dental floss. -`mem::transmute` takes a value of type `T` and reinterprets it to have -type `U`. The only restriction is that the `T` and `U` are verified to have the -same size. The ways to cause Undefined Behavior with this are mind boggling. +[`mem::transmute`][transmute] takes a value of type `T` and reinterprets +it to have type `U`. The only restriction is that the `T` and `U` are verified +to have the same size. The ways to cause Undefined Behavior with this are mind +boggling. * First and foremost, creating an instance of *any* type with an invalid state is going to cause arbitrary chaos that can't really be predicted. @@ -23,13 +24,16 @@ same size. The ways to cause Undefined Behavior with this are mind boggling. * Transmuting to a reference without an explicitly provided lifetime produces an [unbounded lifetime] -`mem::transmute_copy` somehow manages to be *even more* wildly unsafe than -this. It copies `size_of` bytes out of an `&T` and interprets them as a `U`. -The size check that `mem::transmute` has is gone (as it may be valid to copy -out a prefix), though it is Undefined Behavior for `U` to be larger than `T`. +[`mem::transmute_copy`][transmute_copy] somehow manages to be *even more* +wildly unsafe than this. It copies `size_of` bytes out of an `&T` and +interprets them as a `U`. The size check that `mem::transmute` has is gone (as +it may be valid to copy out a prefix), though it is Undefined Behavior for `U` +to be larger than `T`. Also of course you can get most of the functionality of these functions using pointer casts. [unbounded lifetime]: unbounded-lifetimes.html +[transmute]: ../std/mem/fn.transmute.html +[transmute_copy]: ../std/mem/fn.transmute.html diff --git a/src/doc/nomicon/src/unchecked-uninit.md b/src/doc/nomicon/src/unchecked-uninit.md index ef31a3535d..d094189bd0 100644 --- a/src/doc/nomicon/src/unchecked-uninit.md +++ b/src/doc/nomicon/src/unchecked-uninit.md @@ -8,10 +8,10 @@ Unfortunately this is pretty rigid, especially if you need to initialize your array in a more incremental or dynamic way. Unsafe Rust gives us a powerful tool to handle this problem: -`mem::uninitialized`. This function pretends to return a value when really -it does nothing at all. Using it, we can convince Rust that we have initialized -a variable, allowing us to do trickier things with conditional and incremental -initialization. +[`mem::uninitialized`][uninitialized]. This function pretends to return a value +when really it does nothing at all. Using it, we can convince Rust that we have +initialized a variable, allowing us to do trickier things with conditional and +incremental initialization. Unfortunately, this opens us up to all kinds of problems. Assignment has a different meaning to Rust based on whether it believes that a variable is @@ -24,9 +24,9 @@ longer safely use normal assignment. This is also a problem if you're working with a raw system allocator, which returns a pointer to uninitialized memory. -To handle this, we must use the `ptr` module. In particular, it provides +To handle this, we must use the [`ptr`] module. In particular, it provides three functions that allow us to assign bytes to a location in memory without -dropping the old value: `write`, `copy`, and `copy_nonoverlapping`. +dropping the old value: [`write`], [`copy`], and [`copy_nonoverlapping`]. * `ptr::write(ptr, val)` takes a `val` and moves it into the address pointed to by `ptr`. @@ -56,13 +56,13 @@ const SIZE: usize = 10; let mut x: [Box; SIZE]; unsafe { - // convince Rust that x is Totally Initialized - x = mem::uninitialized(); - for i in 0..SIZE { - // very carefully overwrite each index without reading it - // NOTE: exception safety is not a concern; Box can't panic - ptr::write(&mut x[i], Box::new(i as u32)); - } + // convince Rust that x is Totally Initialized + x = mem::uninitialized(); + for i in 0..SIZE { + // very carefully overwrite each index without reading it + // NOTE: exception safety is not a concern; Box can't panic + ptr::write(&mut x[i], Box::new(i as u32)); + } } println!("{:?}", x); @@ -80,6 +80,19 @@ Every control path through that variable's scope must initialize the value before it ends, if it has a destructor. *[This includes code panicking](unwinding.html)*. +Not being careful about uninitialized memory often leads to bugs and it has been +decided the [`mem::uninitialized`][uninitialized] function should be deprecated. +The [`MaybeUninit`] type is supposed to replace it as its API wraps many common +operations needed to be done around initialized memory. This is nightly only for +now. + And that's about it for working with uninitialized memory! Basically nothing anywhere expects to be handed uninitialized memory, so if you're going to pass it around at all, be sure to be *really* careful. + +[uninitialized]: ../std/mem/fn.uninitialized.html +[`ptr`]: ../std/ptr/index.html +[`write`]: ../std/ptr/fn.write.html +[`copy`]: ../std/ptr/fn.copy.html +[`copy_nonoverlapping`]: ../std/ptr/fn.copy_nonoverlapping.html +[`MaybeUninit`]: ../std/mem/union.MaybeUninit.html diff --git a/src/doc/nomicon/src/vec-alloc.md b/src/doc/nomicon/src/vec-alloc.md index a6f88aa5a8..2889a731dd 100644 --- a/src/doc/nomicon/src/vec-alloc.md +++ b/src/doc/nomicon/src/vec-alloc.md @@ -37,8 +37,8 @@ that, we'll need to use the rest of the heap APIs. These basically allow us to talk directly to Rust's allocator (jemalloc by default). We'll also need a way to handle out-of-memory (OOM) conditions. The standard -library calls `std::alloc::oom()`, which in turn calls the the `oom` langitem. -By default this just aborts the program by executing an illegal cpu instruction. +library calls `std::alloc::oom()`, which in turn calls the the `oom` langitem, +which aborts the program in a platform-specific manner. The reason we abort and don't panic is because unwinding can cause allocations to happen, and that seems like a bad thing to do when your allocator just came back with "hey I don't have any more memory". diff --git a/src/doc/reference/src/attributes-redirect.html b/src/doc/reference/src/attributes-redirect.html index 490db9c297..a0548cc493 100644 --- a/src/doc/reference/src/attributes-redirect.html +++ b/src/doc/reference/src/attributes-redirect.html @@ -1,22 +1,22 @@ \ - \ + \ \ {static_extra_scripts}\ {extra_scripts}\ - \ + \ \ ", css_extension = if css_file_extension { @@ -182,14 +182,14 @@ pub fn render( let p = SlashChecker(&p); if layout.logo.is_empty() { format!("\ - logo", +
\ + logo
", path=p, static_root_path=static_root_path, suffix=page.resource_suffix) } else { format!("\ - logo", +
logo
", p, layout.logo) } diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index a70fe363ca..334b831565 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -8,12 +8,16 @@ //! ``` //! #![feature(rustc_private)] //! +//! extern crate syntax; +//! +//! use syntax::edition::Edition; //! use rustdoc::html::markdown::{IdMap, Markdown, ErrorCodes}; //! use std::cell::RefCell; //! //! let s = "My *markdown* _text_"; //! let mut id_map = IdMap::new(); -//! let html = format!("{}", Markdown(s, &[], RefCell::new(&mut id_map), ErrorCodes::Yes)); +//! let html = format!("{}", Markdown(s, &[], RefCell::new(&mut id_map), +//! ErrorCodes::Yes, Edition::Edition2015)); //! // ... something using html //! ``` @@ -33,20 +37,30 @@ use crate::html::toc::TocBuilder; use crate::html::highlight; use crate::test; -use pulldown_cmark::{html, Event, Tag, Parser}; -use pulldown_cmark::{Options, OPTION_ENABLE_FOOTNOTES, OPTION_ENABLE_TABLES}; +use pulldown_cmark::{html, CowStr, Event, Options, Parser, Tag}; + +fn opts() -> Options { + Options::ENABLE_TABLES | Options::ENABLE_FOOTNOTES +} /// A unit struct which has the `fmt::Display` trait implemented. When /// formatted, this struct will emit the HTML corresponding to the rendered /// version of the contained markdown string. -/// The second parameter is a list of link replacements +/// +/// The second parameter is a list of link replacements. +/// +/// The third is the current list of used header IDs. +/// +/// The fourth is whether to allow the use of explicit error codes in doctest lang strings. +/// +/// The fifth is what default edition to use when parsing doctests (to add a `fn main`). pub struct Markdown<'a>( - pub &'a str, pub &'a [(String, String)], pub RefCell<&'a mut IdMap>, pub ErrorCodes); + pub &'a str, pub &'a [(String, String)], pub RefCell<&'a mut IdMap>, pub ErrorCodes, pub Edition); /// A unit struct like `Markdown`, that renders the markdown with a /// table of contents. -pub struct MarkdownWithToc<'a>(pub &'a str, pub RefCell<&'a mut IdMap>, pub ErrorCodes); +pub struct MarkdownWithToc<'a>(pub &'a str, pub RefCell<&'a mut IdMap>, pub ErrorCodes, pub Edition); /// A unit struct like `Markdown`, that renders the markdown escaping HTML tags. -pub struct MarkdownHtml<'a>(pub &'a str, pub RefCell<&'a mut IdMap>, pub ErrorCodes); +pub struct MarkdownHtml<'a>(pub &'a str, pub RefCell<&'a mut IdMap>, pub ErrorCodes, pub Edition); /// A unit struct like `Markdown`, that renders only the first paragraph. pub struct MarkdownSummaryLine<'a>(pub &'a str, pub &'a [(String, String)]); @@ -143,13 +157,15 @@ thread_local!(pub static PLAYGROUND: RefCell, String)>> = struct CodeBlocks<'a, I: Iterator>> { inner: I, check_error_codes: ErrorCodes, + edition: Edition, } impl<'a, I: Iterator>> CodeBlocks<'a, I> { - fn new(iter: I, error_codes: ErrorCodes) -> Self { + fn new(iter: I, error_codes: ErrorCodes, edition: Edition) -> Self { CodeBlocks { inner: iter, check_error_codes: error_codes, + edition, } } } @@ -174,6 +190,9 @@ impl<'a, I: Iterator>> Iterator for CodeBlocks<'a, I> { return event; } + let explicit_edition = edition.is_some(); + let edition = edition.unwrap_or(self.edition); + let mut origtext = String::new(); for event in &mut self.inner { match event { @@ -199,22 +218,14 @@ impl<'a, I: Iterator>> Iterator for CodeBlocks<'a, I> { .collect::>>().join("\n"); let krate = krate.as_ref().map(|s| &**s); let (test, _) = test::make_test(&test, krate, false, - &Default::default()); + &Default::default(), edition); let channel = if test.contains("#![feature(") { "&version=nightly" } else { "" }; - let edition_string = if let Some(e @ Edition::Edition2018) = edition { - format!("&edition={}{}", e, - if channel == "&version=nightly" { "" } - else { "&version=nightly" }) - } else if let Some(e) = edition { - format!("&edition={}", e) - } else { - "".to_owned() - }; + let edition_string = format!("&edition={}", edition); // These characters don't need to be escaped in a URI. // FIXME: use a library function for percent encoding. @@ -244,8 +255,8 @@ impl<'a, I: Iterator>> Iterator for CodeBlocks<'a, I> { Some(("This example is not tested".to_owned(), "ignore")) } else if compile_fail { Some(("This example deliberately fails to compile".to_owned(), "compile_fail")) - } else if let Some(e) = edition { - Some((format!("This code runs with edition {}", e), "edition")) + } else if explicit_edition { + Some((format!("This code runs with edition {}", edition), "edition")) } else { None }; @@ -256,7 +267,7 @@ impl<'a, I: Iterator>> Iterator for CodeBlocks<'a, I> { Some(&format!("rust-example-rendered{}", if ignore { " ignore" } else if compile_fail { " compile_fail" } - else if edition.is_some() { " edition " } + else if explicit_edition { " edition " } else { "" })), playground_button.as_ref().map(String::as_str), Some((s1.as_str(), s2)))); @@ -267,7 +278,7 @@ impl<'a, I: Iterator>> Iterator for CodeBlocks<'a, I> { Some(&format!("rust-example-rendered{}", if ignore { " ignore" } else if compile_fail { " compile_fail" } - else if edition.is_some() { " edition " } + else if explicit_edition { " edition " } else { "" })), playground_button.as_ref().map(String::as_str), None)); @@ -297,12 +308,11 @@ impl<'a, 'b, I: Iterator>> Iterator for LinkReplacer<'a, 'b, I> fn next(&mut self) -> Option { let event = self.inner.next(); - if let Some(Event::Start(Tag::Link(dest, text))) = event { - if let Some(&(_, ref replace)) = self.links.into_iter().find(|link| &*link.0 == &*dest) - { - Some(Event::Start(Tag::Link(replace.to_owned().into(), text))) + if let Some(Event::Start(Tag::Link(kind, dest, text))) = event { + if let Some(&(_, ref replace)) = self.links.iter().find(|link| link.0 == *dest) { + Some(Event::Start(Tag::Link(kind, replace.to_owned().into(), text))) } else { - Some(Event::Start(Tag::Link(dest, text))) + Some(Event::Start(Tag::Link(kind, dest, text))) } } else { event @@ -341,9 +351,11 @@ impl<'a, 'b, 'ids, I: Iterator>> Iterator for HeadingLinks<'a, if let Some(Event::Start(Tag::Header(level))) = event { let mut id = String::new(); for event in &mut self.inner { - match event { + match &event { Event::End(Tag::Header(..)) => break, - Event::Text(ref text) => id.extend(text.chars().filter_map(slugify)), + Event::Text(text) | Event::Code(text) => { + id.extend(text.chars().filter_map(slugify)); + } _ => {}, } self.buf.push_back(event); @@ -392,8 +404,7 @@ fn check_if_allowed_tag(t: &Tag<'_>) -> bool { | Tag::Item | Tag::Emphasis | Tag::Strong - | Tag::Code - | Tag::Link(_, _) + | Tag::Link(..) | Tag::BlockQuote => true, _ => false, } @@ -520,63 +531,39 @@ impl<'a, I: Iterator>> Iterator for Footnotes<'a, I> { } } -pub struct TestableCodeError(()); - -impl fmt::Display for TestableCodeError { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "invalid start of a new code block") - } -} - -pub fn find_testable_code( - doc: &str, - tests: &mut T, - error_codes: ErrorCodes, -) -> Result<(), TestableCodeError> { +pub fn find_testable_code(doc: &str, tests: &mut T, error_codes: ErrorCodes) { let mut parser = Parser::new(doc); let mut prev_offset = 0; let mut nb_lines = 0; let mut register_header = None; - 'main: while let Some(event) = parser.next() { + while let Some(event) = parser.next() { match event { Event::Start(Tag::CodeBlock(s)) => { + let offset = parser.get_offset(); + let block_info = if s.is_empty() { LangString::all_false() } else { LangString::parse(&*s, error_codes) }; if !block_info.rust { - continue + continue; } let mut test_s = String::new(); - let mut offset = None; - loop { - let event = parser.next(); - if let Some(event) = event { - match event { - Event::End(Tag::CodeBlock(_)) => break, - Event::Text(ref s) => { - test_s.push_str(s); - if offset.is_none() { - offset = Some(parser.get_offset()); - } - } - _ => {} - } - } else { - break 'main; - } - } - if let Some(offset) = offset { - let lines = test_s.lines().map(|l| map_line(l).for_code()); - let text = lines.collect::>>().join("\n"); - nb_lines += doc[prev_offset..offset].lines().count(); - let line = tests.get_line() + (nb_lines - 1); - tests.add_test(text, block_info, line); - prev_offset = offset; - } else { - return Err(TestableCodeError(())); + + while let Some(Event::Text(s)) = parser.next() { + test_s.push_str(&s); } + + let text = test_s + .lines() + .map(|l| map_line(l).for_code()) + .collect::>>() + .join("\n"); + nb_lines += doc[prev_offset..offset].lines().count(); + let line = tests.get_line() + nb_lines; + tests.add_test(text, block_info, line); + prev_offset = offset; } Event::Start(Tag::Header(level)) => { register_header = Some(level as u32); @@ -593,7 +580,6 @@ pub fn find_testable_code( _ => {} } } - Ok(()) } #[derive(Eq, PartialEq, Clone, Debug)] @@ -682,15 +668,11 @@ impl LangString { impl<'a> fmt::Display for Markdown<'a> { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { - let Markdown(md, links, ref ids, codes) = *self; + let Markdown(md, links, ref ids, codes, edition) = *self; let mut ids = ids.borrow_mut(); // This is actually common enough to special-case if md.is_empty() { return Ok(()) } - let mut opts = Options::empty(); - opts.insert(OPTION_ENABLE_TABLES); - opts.insert(OPTION_ENABLE_FOOTNOTES); - let replacer = |_: &str, s: &str| { if let Some(&(_, ref replace)) = links.into_iter().find(|link| &*link.0 == s) { Some((replace.clone(), s.to_owned())) @@ -699,13 +681,13 @@ impl<'a> fmt::Display for Markdown<'a> { } }; - let p = Parser::new_with_broken_link_callback(md, opts, Some(&replacer)); + let p = Parser::new_with_broken_link_callback(md, opts(), Some(&replacer)); let mut s = String::with_capacity(md.len() * 3 / 2); let p = HeadingLinks::new(p, None, &mut ids); let p = LinkReplacer::new(p, links); - let p = CodeBlocks::new(p, codes); + let p = CodeBlocks::new(p, codes, edition); let p = Footnotes::new(p); html::push_html(&mut s, p); @@ -715,14 +697,10 @@ impl<'a> fmt::Display for Markdown<'a> { impl<'a> fmt::Display for MarkdownWithToc<'a> { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { - let MarkdownWithToc(md, ref ids, codes) = *self; + let MarkdownWithToc(md, ref ids, codes, edition) = *self; let mut ids = ids.borrow_mut(); - let mut opts = Options::empty(); - opts.insert(OPTION_ENABLE_TABLES); - opts.insert(OPTION_ENABLE_FOOTNOTES); - - let p = Parser::new_ext(md, opts); + let p = Parser::new_ext(md, opts()); let mut s = String::with_capacity(md.len() * 3 / 2); @@ -730,7 +708,7 @@ impl<'a> fmt::Display for MarkdownWithToc<'a> { { let p = HeadingLinks::new(p, Some(&mut toc), &mut ids); - let p = CodeBlocks::new(p, codes); + let p = CodeBlocks::new(p, codes, edition); let p = Footnotes::new(p); html::push_html(&mut s, p); } @@ -743,16 +721,12 @@ impl<'a> fmt::Display for MarkdownWithToc<'a> { impl<'a> fmt::Display for MarkdownHtml<'a> { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { - let MarkdownHtml(md, ref ids, codes) = *self; + let MarkdownHtml(md, ref ids, codes, edition) = *self; let mut ids = ids.borrow_mut(); // This is actually common enough to special-case if md.is_empty() { return Ok(()) } - let mut opts = Options::empty(); - opts.insert(OPTION_ENABLE_TABLES); - opts.insert(OPTION_ENABLE_FOOTNOTES); - - let p = Parser::new_ext(md, opts); + let p = Parser::new_ext(md, opts()); // Treat inline HTML as plain text. let p = p.map(|event| match event { @@ -763,7 +737,7 @@ impl<'a> fmt::Display for MarkdownHtml<'a> { let mut s = String::with_capacity(md.len() * 3 / 2); let p = HeadingLinks::new(p, None, &mut ids); - let p = CodeBlocks::new(p, codes); + let p = CodeBlocks::new(p, codes, edition); let p = Footnotes::new(p); html::push_html(&mut s, p); @@ -817,9 +791,8 @@ pub fn plain_summary_line_full(md: &str, limit_length: bool) -> String { let next_event = next_event.unwrap(); let (ret, is_in) = match next_event { Event::Start(Tag::Paragraph) => (None, 1), - Event::Start(Tag::Code) => (Some("`".to_owned()), 1), - Event::End(Tag::Code) => (Some("`".to_owned()), -1), Event::Start(Tag::Header(_)) => (None, 1), + Event::Code(code) => (Some(format!("`{}`", code)), 0), Event::Text(ref s) if self.is_in > 0 => (Some(s.as_ref().to_owned()), 0), Event::End(Tag::Paragraph) | Event::End(Tag::Header(_)) => (None, -1), _ => (None, 0), @@ -868,10 +841,6 @@ pub fn markdown_links(md: &str) -> Vec<(String, Option>)> { return vec![]; } - let mut opts = Options::empty(); - opts.insert(OPTION_ENABLE_TABLES); - opts.insert(OPTION_ENABLE_FOOTNOTES); - let mut links = vec![]; let shortcut_links = RefCell::new(vec![]); @@ -894,8 +863,7 @@ pub fn markdown_links(md: &str) -> Vec<(String, Option>)> { shortcut_links.borrow_mut().push((s.to_owned(), locate(s))); None }; - let p = Parser::new_with_broken_link_callback(md, opts, - Some(&push)); + let p = Parser::new_with_broken_link_callback(md, opts(), Some(&push)); // There's no need to thread an IdMap through to here because // the IDs generated aren't going to be emitted anywhere. @@ -903,11 +871,11 @@ pub fn markdown_links(md: &str) -> Vec<(String, Option>)> { let iter = Footnotes::new(HeadingLinks::new(p, None, &mut ids)); for ev in iter { - if let Event::Start(Tag::Link(dest, _)) = ev { + if let Event::Start(Tag::Link(_, dest, _)) = ev { debug!("found link: {}", dest); links.push(match dest { - Cow::Borrowed(s) => (s.to_owned(), locate(s)), - Cow::Owned(s) => (s, None), + CowStr::Borrowed(s) => (s.to_owned(), locate(s)), + s @ CowStr::Boxed(..) | s @ CowStr::Inlined(..) => (s.into_string(), None), }); } } @@ -939,10 +907,7 @@ crate fn rust_code_blocks(md: &str) -> Vec { return code_blocks; } - let mut opts = Options::empty(); - opts.insert(OPTION_ENABLE_TABLES); - opts.insert(OPTION_ENABLE_FOOTNOTES); - let mut p = Parser::new_ext(md, opts); + let mut p = Parser::new_ext(md, opts()); let mut code_block_start = 0; let mut code_start = 0; @@ -1013,7 +978,7 @@ crate fn rust_code_blocks(md: &str) -> Vec { end: code_end, }, syntax: if !syntax.is_empty() { - Some(syntax.into_owned()) + Some(syntax.into_string()) } else { None }, @@ -1089,7 +1054,7 @@ mod tests { use super::{ErrorCodes, LangString, Markdown, MarkdownHtml, IdMap}; use super::plain_summary_line; use std::cell::RefCell; - use syntax::edition::Edition; + use syntax::edition::{Edition, DEFAULT_EDITION}; #[test] fn test_lang_string_parse() { @@ -1141,7 +1106,8 @@ mod tests { fn test_header() { fn t(input: &str, expect: &str) { let mut map = IdMap::new(); - let output = Markdown(input, &[], RefCell::new(&mut map), ErrorCodes::Yes).to_string(); + let output = Markdown(input, &[], RefCell::new(&mut map), + ErrorCodes::Yes, DEFAULT_EDITION).to_string(); assert_eq!(output, expect, "original: {}", input); } @@ -1163,7 +1129,8 @@ mod tests { fn test_header_ids_multiple_blocks() { let mut map = IdMap::new(); fn t(map: &mut IdMap, input: &str, expect: &str) { - let output = Markdown(input, &[], RefCell::new(map), ErrorCodes::Yes).to_string(); + let output = Markdown(input, &[], RefCell::new(map), + ErrorCodes::Yes, DEFAULT_EDITION).to_string(); assert_eq!(output, expect, "original: {}", input); } @@ -1200,7 +1167,8 @@ mod tests { fn test_markdown_html_escape() { fn t(input: &str, expect: &str) { let mut idmap = IdMap::new(); - let output = MarkdownHtml(input, RefCell::new(&mut idmap), ErrorCodes::Yes).to_string(); + let output = MarkdownHtml(input, RefCell::new(&mut idmap), + ErrorCodes::Yes, DEFAULT_EDITION).to_string(); assert_eq!(output, expect, "original: {}", input); } diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index de434e9d2e..b628bd450d 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1,3 +1,5 @@ +// ignore-tidy-filelength + //! Rustdoc's HTML rendering module. //! //! This modules contains the bulk of the logic necessary for rendering a @@ -45,9 +47,11 @@ use std::rc::Rc; use errors; use serialize::json::{ToJson, Json, as_json}; use syntax::ast; +use syntax::edition::Edition; use syntax::ext::base::MacroKind; use syntax::source_map::FileName; use syntax::feature_gate::UnstableFeatures; +use syntax::symbol::{Symbol, sym}; use rustc::hir::def_id::{CrateNum, CRATE_DEF_INDEX, DefId}; use rustc::middle::privacy::AccessLevels; use rustc::middle::stability; @@ -105,6 +109,8 @@ struct Context { /// publicly reused items to redirect to the right location. pub render_redirect_pages: bool, pub codes: ErrorCodes, + /// The default edition used to parse doctests. + pub edition: Edition, /// The map used to ensure all generated 'id=' attributes are unique. id_map: Rc>, pub shared: Arc, @@ -503,7 +509,7 @@ pub fn initial_ids() -> Vec { "methods", "deref-methods", "implementations", - ].into_iter().map(|id| (String::from(*id))).collect() + ].iter().map(|id| (String::from(*id))).collect() } /// Generates the documentation for `crate` into the directory `dst` @@ -511,7 +517,8 @@ pub fn run(mut krate: clean::Crate, options: RenderOptions, passes: FxHashSet, renderinfo: RenderInfo, - diag: &errors::Handler) -> Result<(), Error> { + diag: &errors::Handler, + edition: Edition) -> Result<(), Error> { // need to save a copy of the options for rendering the index page let md_opts = options.clone(); let RenderOptions { @@ -569,24 +576,24 @@ pub fn run(mut krate: clean::Crate, // Crawl the crate attributes looking for attributes which control how we're // going to emit HTML if let Some(attrs) = krate.module.as_ref().map(|m| &m.attrs) { - for attr in attrs.lists("doc") { - match (attr.name_or_empty().get(), attr.value_str()) { - ("html_favicon_url", Some(s)) => { + for attr in attrs.lists(sym::doc) { + match (attr.name_or_empty(), attr.value_str()) { + (sym::html_favicon_url, Some(s)) => { scx.layout.favicon = s.to_string(); } - ("html_logo_url", Some(s)) => { + (sym::html_logo_url, Some(s)) => { scx.layout.logo = s.to_string(); } - ("html_playground_url", Some(s)) => { + (sym::html_playground_url, Some(s)) => { markdown::PLAYGROUND.with(|slot| { let name = krate.name.clone(); *slot.borrow_mut() = Some((Some(name), s.to_string())); }); } - ("issue_tracker_base_url", Some(s)) => { + (sym::issue_tracker_base_url, Some(s)) => { scx.issue_tracker_base_url = Some(s.to_string()); } - ("html_no_source", None) if attr.is_word() => { + (sym::html_no_source, None) if attr.is_word() => { scx.include_sources = false; } _ => {} @@ -601,6 +608,7 @@ pub fn run(mut krate: clean::Crate, dst, render_redirect_pages: false, codes: ErrorCodes::from(UnstableFeatures::from_environment().is_nightly_build()), + edition, id_map: Rc::new(RefCell::new(id_map)), shared: Arc::new(scx), }; @@ -930,7 +938,7 @@ themePicker.onblur = handleThemeButtonsBlur; static_files::source_serif_pro::BOLD)?; write(cx.dst.join("SourceSerifPro-It.ttf.woff"), static_files::source_serif_pro::ITALIC)?; - write(cx.dst.join("SourceSerifPro-LICENSE.txt"), + write(cx.dst.join("SourceSerifPro-LICENSE.md"), static_files::source_serif_pro::LICENSE)?; write(cx.dst.join("SourceCodePro-Regular.woff"), static_files::source_code_pro::REGULAR)?; @@ -951,40 +959,15 @@ themePicker.onblur = handleThemeButtonsBlur; key: &str, for_search_index: bool, ) -> io::Result<(Vec, Vec, Vec)> { - use minifier::js; - let mut ret = Vec::new(); let mut krates = Vec::new(); let mut variables = Vec::new(); - let mut krate = krate.to_owned(); - if path.exists() { for line in BufReader::new(File::open(path)?).lines() { let line = line?; if for_search_index && line.starts_with("var R") { variables.push(line.clone()); - // We need to check if the crate name has been put into a variable as well. - let tokens: js::Tokens<'_> = js::simple_minify(&line) - .into_iter() - .filter(js::clean_token) - .collect::>() - .into(); - let mut pos = 0; - while pos < tokens.len() { - if let Some((var_pos, Some(value_pos))) = - js::get_variable_name_and_value_positions(&tokens, pos) { - if let Some(s) = tokens.0[value_pos].get_string() { - if &s[1..s.len() - 1] == krate { - if let Some(var) = tokens[var_pos].get_other() { - krate = var.to_owned(); - break - } - } - } - } - pos += 1; - } continue; } if !line.starts_with(key) { @@ -1013,7 +996,7 @@ themePicker.onblur = handleThemeButtonsBlur; }) } - let dst = cx.dst.join("aliases.js"); + let dst = cx.dst.join(&format!("aliases{}.js", cx.shared.resource_suffix)); { let (mut all_aliases, _, _) = try_err!(collect(&dst, &krate.name, "ALIASES", false), &dst); let mut w = try_err!(File::create(&dst), &dst); @@ -1064,11 +1047,22 @@ themePicker.onblur = handleThemeButtonsBlur; .expect("invalid osstring conversion"))) .collect::>(); files.sort_unstable_by(|a, b| a.cmp(b)); - // FIXME(imperio): we could avoid to generate "dirs" and "files" if they're empty. - format!("{{\"name\":\"{name}\",\"dirs\":[{subs}],\"files\":[{files}]}}", + let subs = subs.iter().map(|s| s.to_json_string()).collect::>().join(","); + let dirs = if subs.is_empty() { + String::new() + } else { + format!(",\"dirs\":[{}]", subs) + }; + let files = files.join(","); + let files = if files.is_empty() { + String::new() + } else { + format!(",\"files\":[{}]", files) + }; + format!("{{\"name\":\"{name}\"{dirs}{files}}}", name=self.elem.to_str().expect("invalid osstring conversion"), - subs=subs.iter().map(|s| s.to_json_string()).collect::>().join(","), - files=files.join(",")) + dirs=dirs, + files=files) } } @@ -1099,7 +1093,7 @@ themePicker.onblur = handleThemeButtonsBlur; } } - let dst = cx.dst.join("source-files.js"); + let dst = cx.dst.join(&format!("source-files{}.js", cx.shared.resource_suffix)); let (mut all_sources, _krates, _) = try_err!(collect(&dst, &krate.name, "sourcesIndex", false), &dst); @@ -1115,7 +1109,7 @@ themePicker.onblur = handleThemeButtonsBlur; } // Update the search index - let dst = cx.dst.join("search-index.js"); + let dst = cx.dst.join(&format!("search-index{}.js", cx.shared.resource_suffix)); let (mut all_indexes, mut krates, variables) = try_err!(collect(&dst, &krate.name, "searchIndex", @@ -1139,7 +1133,7 @@ themePicker.onblur = handleThemeButtonsBlur; md_opts.output = cx.dst.clone(); md_opts.external_html = (*cx.shared).layout.external_html.clone(); - crate::markdown::render(index_page, md_opts, diag); + crate::markdown::render(index_page, md_opts, diag, cx.edition); } else { let dst = cx.dst.join("index.html"); let mut w = BufWriter::new(try_err!(File::create(&dst), &dst)); @@ -1329,10 +1323,20 @@ fn write_minify_replacer( .into(); tokens.apply(|f| { // We add a backline after the newly created variables. - minifier::js::aggregate_strings_into_array_with_separation( + minifier::js::aggregate_strings_into_array_with_separation_filter( f, "R", Token::Char(ReservedChar::Backline), + // This closure prevents crates' names from being aggregated. + // + // The point here is to check if the string is preceded by '[' and + // "searchIndex". If so, it means this is a crate name and that it + // shouldn't be aggregated. + |tokens, pos| { + pos < 2 || + !tokens[pos - 1].is_char(ReservedChar::OpenBracket) || + tokens[pos - 2].get_other() != Some("searchIndex") + } ) }) .to_string() @@ -1347,7 +1351,8 @@ fn write_minify_replacer( /// static HTML tree. Each component in the cleaned path will be passed as an /// argument to `f`. The very last component of the path (ie the file name) will /// be passed to `f` if `keep_filename` is true, and ignored otherwise. -fn clean_srcpath(src_root: &Path, p: &Path, keep_filename: bool, mut f: F) where +fn clean_srcpath(src_root: &Path, p: &Path, keep_filename: bool, mut f: F) +where F: FnMut(&OsStr), { // make it relative, if possible @@ -1389,8 +1394,8 @@ fn extern_location(e: &clean::ExternalCrate, extern_url: Option<&str>, dst: &Pat // Failing that, see if there's an attribute specifying where to find this // external crate - e.attrs.lists("doc") - .filter(|a| a.check_name("html_root_url")) + e.attrs.lists(sym::doc) + .filter(|a| a.check_name(sym::html_root_url)) .filter_map(|a| a.value_str()) .map(|url| { let mut url = url.to_string(); @@ -1459,11 +1464,11 @@ impl<'a> SourceCollector<'a> { let mut href = String::new(); clean_srcpath(&self.scx.src_root, &p, false, |component| { cur.push(component); - fs::create_dir_all(&cur).unwrap(); root_path.push_str("../"); href.push_str(&component.to_string_lossy()); href.push('/'); }); + fs::create_dir_all(&cur)?; let mut fname = p.file_name() .expect("source has no filename") .to_os_string(); @@ -1472,7 +1477,7 @@ impl<'a> SourceCollector<'a> { href.push_str(&fname.to_string_lossy()); let mut w = BufWriter::new(File::create(&cur)?); - let title = format!("{} -- source", cur.file_name().unwrap() + let title = format!("{} -- source", cur.file_name().expect("failed to get file name") .to_string_lossy()); let desc = format!("Source to the Rust file `{}`.", filename); let page = layout::Page { @@ -1483,7 +1488,7 @@ impl<'a> SourceCollector<'a> { description: &desc, keywords: BASIC_KEYWORDS, resource_suffix: &self.scx.resource_suffix, - extra_scripts: &["source-files"], + extra_scripts: &[&format!("source-files{}", self.scx.resource_suffix)], static_extra_scripts: &[&format!("source-script{}", self.scx.resource_suffix)], }; layout::render(&mut w, &self.scx.layout, @@ -1780,8 +1785,8 @@ impl<'a> Cache { let path = self.paths.get(&item.def_id) .map(|p| p.0[..p.0.len() - 1].join("::")) .unwrap_or("std".to_owned()); - for alias in item.attrs.lists("doc") - .filter(|a| a.check_name("alias")) + for alias in item.attrs.lists(sym::doc) + .filter(|a| a.check_name(sym::alias)) .filter_map(|a| a.value_str() .map(|s| s.to_string().replace("\"", ""))) .filter(|v| !v.is_empty()) @@ -2102,7 +2107,8 @@ impl Context { &final_file); // Generating settings page. - let settings = Settings::new("./", &self.shared.resource_suffix); + let settings = Settings::new(self.shared.static_root_path.deref().unwrap_or("./"), + &self.shared.resource_suffix); page.title = "Rustdoc settings"; page.description = "Settings of Rustdoc"; page.root_path = "./"; @@ -2552,7 +2558,7 @@ fn render_markdown(w: &mut fmt::Formatter<'_>, if is_hidden { " hidden" } else { "" }, prefix, Markdown(md_text, &links, RefCell::new(&mut ids), - cx.codes)) + cx.codes, cx.edition)) } fn document_short( @@ -2917,7 +2923,7 @@ fn short_stability(item: &clean::Item, cx: &Context) -> Vec { if let Some(note) = note { let mut ids = cx.id_map.borrow_mut(); - let html = MarkdownHtml(¬e, RefCell::new(&mut ids), error_codes); + let html = MarkdownHtml(¬e, RefCell::new(&mut ids), error_codes, cx.edition); message.push_str(&format!(": {}", html)); } stability.push(format!("
{}
", message)); @@ -2966,7 +2972,7 @@ fn short_stability(item: &clean::Item, cx: &Context) -> Vec { message = format!( "
{}{}
", message, - MarkdownHtml(&unstable_reason, RefCell::new(&mut ids), error_codes) + MarkdownHtml(&unstable_reason, RefCell::new(&mut ids), error_codes, cx.edition) ); } @@ -2991,7 +2997,7 @@ fn short_stability(item: &clean::Item, cx: &Context) -> Vec { fn item_constant(w: &mut fmt::Formatter<'_>, cx: &Context, it: &clean::Item, c: &clean::Constant) -> fmt::Result { write!(w, "
")?;
-    render_attributes(w, it)?;
+    render_attributes(w, it, false)?;
     write!(w, "{vis}const \
                {name}: {typ}
", vis = VisSpace(&it.visibility), @@ -3003,7 +3009,7 @@ fn item_constant(w: &mut fmt::Formatter<'_>, cx: &Context, it: &clean::Item, fn item_static(w: &mut fmt::Formatter<'_>, cx: &Context, it: &clean::Item, s: &clean::Static) -> fmt::Result { write!(w, "
")?;
-    render_attributes(w, it)?;
+    render_attributes(w, it, false)?;
     write!(w, "{vis}static {mutability}\
                {name}: {typ}
", vis = VisSpace(&it.visibility), @@ -3026,7 +3032,7 @@ fn item_function(w: &mut fmt::Formatter<'_>, cx: &Context, it: &clean::Item, f.generics ).len(); write!(w, "{}
", render_spotlight_traits(it)?)?;
-    render_attributes(w, it)?;
+    render_attributes(w, it, false)?;
     write!(w,
            "{vis}{constness}{unsafety}{asyncness}{abi}fn \
            {name}{generics}{decl}{where_clause}
", @@ -3060,7 +3066,7 @@ fn render_implementor(cx: &Context, implementor: &Impl, w: &mut fmt::Formatter<' _ => false, }; render_impl(w, cx, implementor, AssocItemLink::Anchor(None), RenderMode::Normal, - implementor.impl_item.stable_since(), false, Some(use_absolute))?; + implementor.impl_item.stable_since(), false, Some(use_absolute), false)?; Ok(()) } @@ -3071,7 +3077,7 @@ fn render_impls(cx: &Context, w: &mut fmt::Formatter<'_>, let did = i.trait_did().unwrap(); let assoc_link = AssocItemLink::GotoSource(did, &i.inner_impl().provided_trait_methods); render_impl(w, cx, i, assoc_link, - RenderMode::Normal, containing_item.stable_since(), true, None)?; + RenderMode::Normal, containing_item.stable_since(), true, None, false)?; } Ok(()) } @@ -3115,7 +3121,7 @@ fn item_trait( // Output the trait definition wrap_into_docblock(w, |w| { write!(w, "
")?;
-        render_attributes(w, it)?;
+        render_attributes(w, it, true)?;
         write!(w, "{}{}{}trait {}{}{}",
                VisSpace(&it.visibility),
                UnsafetySpace(t.unsafety),
@@ -3136,7 +3142,6 @@ fn item_trait(
             // FIXME: we should be using a derived_id for the Anchors here
             write!(w, "{{\n")?;
             for t in &types {
-                write!(w, "    ")?;
                 render_assoc_item(w, t, AssocItemLink::Anchor(None), ItemType::Trait)?;
                 write!(w, ";\n")?;
             }
@@ -3144,7 +3149,6 @@ fn item_trait(
                 w.write_str("\n")?;
             }
             for t in &consts {
-                write!(w, "    ")?;
                 render_assoc_item(w, t, AssocItemLink::Anchor(None), ItemType::Trait)?;
                 write!(w, ";\n")?;
             }
@@ -3152,7 +3156,6 @@ fn item_trait(
                 w.write_str("\n")?;
             }
             for (pos, m) in required.iter().enumerate() {
-                write!(w, "    ")?;
                 render_assoc_item(w, m, AssocItemLink::Anchor(None), ItemType::Trait)?;
                 write!(w, ";\n")?;
 
@@ -3164,7 +3167,6 @@ fn item_trait(
                 w.write_str("\n")?;
             }
             for (pos, m) in provided.iter().enumerate() {
-                write!(w, "    ")?;
                 render_assoc_item(w, m, AssocItemLink::Anchor(None), ItemType::Trait)?;
                 match m.inner {
                     clean::MethodItem(ref inner) if !inner.generics.where_predicates.is_empty() => {
@@ -3305,7 +3307,7 @@ fn item_trait(
                 );
                 render_impl(w, cx, &implementor, assoc_link,
                             RenderMode::Normal, implementor.impl_item.stable_since(), false,
-                            None)?;
+                            None, true)?;
             }
             write_loading_content(w, "")?;
         }
@@ -3382,8 +3384,10 @@ fn assoc_const(w: &mut fmt::Formatter<'_>,
                it: &clean::Item,
                ty: &clean::Type,
                _default: Option<&String>,
-               link: AssocItemLink<'_>) -> fmt::Result {
-    write!(w, "{}const {}: {}",
+               link: AssocItemLink<'_>,
+               extra: &str) -> fmt::Result {
+    write!(w, "{}{}const {}: {}",
+           extra,
            VisSpace(&it.visibility),
            naive_assoc_href(it, link),
            it.name.as_ref().unwrap(),
@@ -3394,8 +3398,10 @@ fn assoc_const(w: &mut fmt::Formatter<'_>,
 fn assoc_type(w: &mut W, it: &clean::Item,
                              bounds: &[clean::GenericBound],
                              default: Option<&clean::Type>,
-                             link: AssocItemLink<'_>) -> fmt::Result {
-    write!(w, "type {}",
+                             link: AssocItemLink<'_>,
+                             extra: &str) -> fmt::Result {
+    write!(w, "{}type {}",
+           extra,
            naive_assoc_href(it, link),
            it.name.as_ref().unwrap())?;
     if !bounds.is_empty() {
@@ -3414,7 +3420,7 @@ fn render_stability_since_raw<'a, T: fmt::Write>(
 ) -> fmt::Result {
     if let Some(v) = ver {
         if containing_ver != ver && v.len() > 0 {
-            write!(w, "
{0}
", v)? + write!(w, "{0}", v)? } } Ok(()) @@ -3472,9 +3478,10 @@ fn render_assoc_item(w: &mut fmt::Formatter<'_>, } else { (0, true) }; - render_attributes(w, meth)?; - write!(w, "{}{}{}{}{}{}fn {name}\ + render_attributes(w, meth, false)?; + write!(w, "{}{}{}{}{}{}{}fn {name}\ {generics}{decl}{where_clause}", + if parent == ItemType::Trait { " " } else { "" }, VisSpace(&meth.visibility), ConstnessSpace(header.constness), UnsafetySpace(header.unsafety), @@ -3505,10 +3512,12 @@ fn render_assoc_item(w: &mut fmt::Formatter<'_>, method(w, item, m.header, &m.generics, &m.decl, link, parent) } clean::AssociatedConstItem(ref ty, ref default) => { - assoc_const(w, item, ty, default.as_ref(), link) + assoc_const(w, item, ty, default.as_ref(), link, + if parent == ItemType::Trait { " " } else { "" }) } clean::AssociatedTypeItem(ref bounds, ref default) => { - assoc_type(w, item, bounds, default.as_ref(), link) + assoc_type(w, item, bounds, default.as_ref(), link, + if parent == ItemType::Trait { " " } else { "" }) } _ => panic!("render_assoc_item called on non-associated-item") } @@ -3518,7 +3527,7 @@ fn item_struct(w: &mut fmt::Formatter<'_>, cx: &Context, it: &clean::Item, s: &clean::Struct) -> fmt::Result { wrap_into_docblock(w, |w| { write!(w, "
")?;
-        render_attributes(w, it)?;
+        render_attributes(w, it, true)?;
         render_struct(w,
                       it,
                       Some(&s.generics),
@@ -3569,7 +3578,7 @@ fn item_union(w: &mut fmt::Formatter<'_>, cx: &Context, it: &clean::Item,
                s: &clean::Union) -> fmt::Result {
     wrap_into_docblock(w, |w| {
         write!(w, "
")?;
-        render_attributes(w, it)?;
+        render_attributes(w, it, true)?;
         render_union(w,
                      it,
                      Some(&s.generics),
@@ -3614,7 +3623,7 @@ fn item_enum(w: &mut fmt::Formatter<'_>, cx: &Context, it: &clean::Item,
              e: &clean::Enum) -> fmt::Result {
     wrap_into_docblock(w, |w| {
         write!(w, "
")?;
-        render_attributes(w, it)?;
+        render_attributes(w, it, true)?;
         write!(w, "{}enum {}{}{}",
                VisSpace(&it.visibility),
                it.name.as_ref().unwrap(),
@@ -3764,22 +3773,30 @@ fn render_attribute(attr: &ast::MetaItem) -> Option {
     }
 }
 
-const ATTRIBUTE_WHITELIST: &'static [&'static str] = &[
-    "export_name",
-    "lang",
-    "link_section",
-    "must_use",
-    "no_mangle",
-    "repr",
-    "unsafe_destructor_blind_to_params",
-    "non_exhaustive"
+const ATTRIBUTE_WHITELIST: &'static [Symbol] = &[
+    sym::export_name,
+    sym::lang,
+    sym::link_section,
+    sym::must_use,
+    sym::no_mangle,
+    sym::repr,
+    sym::unsafe_destructor_blind_to_params,
+    sym::non_exhaustive
 ];
 
-fn render_attributes(w: &mut fmt::Formatter<'_>, it: &clean::Item) -> fmt::Result {
+// The `top` parameter is used when generating the item declaration to ensure it doesn't have a
+// left padding. For example:
+//
+// #[foo] <----- "top" attribute
+// struct Foo {
+//     #[bar] <---- not "top" attribute
+//     bar: usize,
+// }
+fn render_attributes(w: &mut dyn fmt::Write, it: &clean::Item, top: bool) -> fmt::Result {
     let mut attrs = String::new();
 
     for attr in &it.attrs.other_attrs {
-        if !ATTRIBUTE_WHITELIST.contains(&attr.name_or_empty().get()) {
+        if !ATTRIBUTE_WHITELIST.contains(&attr.name_or_empty()) {
             continue;
         }
         if let Some(s) = render_attribute(&attr.meta().unwrap()) {
@@ -3787,7 +3804,8 @@ fn render_attributes(w: &mut fmt::Formatter<'_>, it: &clean::Item) -> fmt::Resul
         }
     }
     if attrs.len() > 0 {
-        write!(w, "
{}
", &attrs)?; + write!(w, "
{}
", + if top { " top-attr" } else { "" }, &attrs)?; } Ok(()) } @@ -3961,7 +3979,7 @@ fn render_assoc_items(w: &mut fmt::Formatter<'_>, }; for i in &non_trait { render_impl(w, cx, i, AssocItemLink::Anchor(None), render_mode, - containing_item.stable_since(), true, None)?; + containing_item.stable_since(), true, None, false)?; } } if let AssocItemRender::DerefFor { .. } = what { @@ -4120,7 +4138,8 @@ fn spotlight_decl(decl: &clean::FnDecl) -> Result { out.push_str(" "); assoc_type(&mut out, it, &[], Some(&tydef.type_), - AssocItemLink::GotoSource(t_did, &FxHashSet::default()))?; + AssocItemLink::GotoSource(t_did, &FxHashSet::default()), + "")?; out.push_str(";"); } } @@ -4141,11 +4160,15 @@ fn spotlight_decl(decl: &clean::FnDecl) -> Result { } fn render_impl(w: &mut fmt::Formatter<'_>, cx: &Context, i: &Impl, link: AssocItemLink<'_>, - render_mode: RenderMode, outer_version: Option<&str>, - show_def_docs: bool, use_absolute: Option) -> fmt::Result { + render_mode: RenderMode, outer_version: Option<&str>, show_def_docs: bool, + use_absolute: Option, is_on_foreign_type: bool) -> fmt::Result { if render_mode == RenderMode::Normal { let id = cx.derive_id(match i.inner_impl().trait_ { - Some(ref t) => format!("impl-{}", small_url_encode(&format!("{:#}", t))), + Some(ref t) => if is_on_foreign_type { + get_id_for_impl_on_foreign_type(&i.inner_impl().for_, t) + } else { + format!("impl-{}", small_url_encode(&format!("{:#}", t))) + }, None => "impl".to_string(), }); if let Some(use_absolute) = use_absolute { @@ -4156,7 +4179,8 @@ fn render_impl(w: &mut fmt::Formatter<'_>, cx: &Context, i: &Impl, link: AssocIt if let clean::TypedefItem(ref tydef, _) = it.inner { write!(w, " ")?; assoc_type(w, it, &vec![], Some(&tydef.type_), - AssocItemLink::Anchor(None))?; + AssocItemLink::Anchor(None), + "")?; write!(w, ";")?; } } @@ -4178,7 +4202,8 @@ fn render_impl(w: &mut fmt::Formatter<'_>, cx: &Context, i: &Impl, link: AssocIt if let Some(ref dox) = cx.shared.maybe_collapsed_doc_value(&i.impl_item) { let mut ids = cx.id_map.borrow_mut(); write!(w, "
{}
", - Markdown(&*dox, &i.impl_item.links(), RefCell::new(&mut ids), cx.codes))?; + Markdown(&*dox, &i.impl_item.links(), RefCell::new(&mut ids), + cx.codes, cx.edition))?; } } @@ -4226,7 +4251,7 @@ fn render_impl(w: &mut fmt::Formatter<'_>, cx: &Context, i: &Impl, link: AssocIt let ns_id = cx.derive_id(format!("{}.{}", name, item_type.name_space())); write!(w, "

", id, item_type, extra_class)?; write!(w, "", ns_id)?; - assoc_type(w, item, &Vec::new(), Some(&tydef.type_), link.anchor(&id))?; + assoc_type(w, item, &Vec::new(), Some(&tydef.type_), link.anchor(&id), "")?; write!(w, "

")?; } clean::AssociatedConstItem(ref ty, ref default) => { @@ -4234,7 +4259,7 @@ fn render_impl(w: &mut fmt::Formatter<'_>, cx: &Context, i: &Impl, link: AssocIt let ns_id = cx.derive_id(format!("{}.{}", name, item_type.name_space())); write!(w, "

", id, item_type, extra_class)?; write!(w, "", ns_id)?; - assoc_const(w, item, ty, default.as_ref(), link.anchor(&id))?; + assoc_const(w, item, ty, default.as_ref(), link.anchor(&id), "")?; write!(w, "")?; render_stability_since_raw(w, item.stable_since(), outer_version)?; if let Some(l) = (Item { cx, item }).src_href() { @@ -4248,7 +4273,7 @@ fn render_impl(w: &mut fmt::Formatter<'_>, cx: &Context, i: &Impl, link: AssocIt let ns_id = cx.derive_id(format!("{}.{}", name, item_type.name_space())); write!(w, "

", id, item_type, extra_class)?; write!(w, "", ns_id)?; - assoc_type(w, item, bounds, default.as_ref(), link.anchor(&id))?; + assoc_type(w, item, bounds, default.as_ref(), link.anchor(&id), "")?; write!(w, "

")?; } clean::StrippedItem(..) => return Ok(()), @@ -4336,7 +4361,7 @@ fn item_existential( t: &clean::Existential, ) -> fmt::Result { write!(w, "
")?;
-    render_attributes(w, it)?;
+    render_attributes(w, it, false)?;
     write!(w, "existential type {}{}{where_clause}: {bounds};
", it.name.as_ref().unwrap(), t.generics, @@ -4355,7 +4380,7 @@ fn item_existential( fn item_trait_alias(w: &mut fmt::Formatter<'_>, cx: &Context, it: &clean::Item, t: &clean::TraitAlias) -> fmt::Result { write!(w, "
")?;
-    render_attributes(w, it)?;
+    render_attributes(w, it, false)?;
     write!(w, "trait {}{}{} = {};
", it.name.as_ref().unwrap(), t.generics, @@ -4374,7 +4399,7 @@ fn item_trait_alias(w: &mut fmt::Formatter<'_>, cx: &Context, it: &clean::Item, fn item_typedef(w: &mut fmt::Formatter<'_>, cx: &Context, it: &clean::Item, t: &clean::Typedef) -> fmt::Result { write!(w, "
")?;
-    render_attributes(w, it)?;
+    render_attributes(w, it, false)?;
     write!(w, "type {}{}{where_clause} = {type_};
", it.name.as_ref().unwrap(), t.generics, @@ -4392,7 +4417,7 @@ fn item_typedef(w: &mut fmt::Formatter<'_>, cx: &Context, it: &clean::Item, fn item_foreign_type(w: &mut fmt::Formatter<'_>, cx: &Context, it: &clean::Item) -> fmt::Result { writeln!(w, "
extern {{")?;
-    render_attributes(w, it)?;
+    render_attributes(w, it, false)?;
     write!(
         w,
         "    {}type {};\n}}
", @@ -4691,11 +4716,15 @@ fn sidebar_struct(fmt: &mut fmt::Formatter<'_>, it: &clean::Item, Ok(()) } +fn get_id_for_impl_on_foreign_type(for_: &clean::Type, trait_: &clean::Type) -> String { + small_url_encode(&format!("impl-{:#}-for-{:#}", trait_, for_)) +} + fn extract_for_impl_name(item: &clean::Item) -> Option<(String, String)> { match item.inner { clean::ItemEnum::ImplItem(ref i) => { if let Some(ref trait_) = i.trait_ { - Some((format!("{:#}", i.for_), format!("{:#}", trait_))) + Some((format!("{:#}", i.for_), get_id_for_impl_on_foreign_type(&i.for_, trait_))) } else { None } @@ -4791,9 +4820,9 @@ fn sidebar_trait(fmt: &mut fmt::Formatter<'_>, it: &clean::Item, .map_or(false, |d| !c.paths.contains_key(&d))) .filter_map(|i| { match extract_for_impl_name(&i.impl_item) { - Some((ref name, ref url)) => { - Some(format!("{}", - small_url_encode(url), + Some((ref name, ref id)) => { + Some(format!("{}", + id, Escape(name))) } _ => None, diff --git a/src/librustdoc/html/static/FiraSans-LICENSE.txt b/src/librustdoc/html/static/FiraSans-LICENSE.txt index b4a39671ee..d444ea92b6 100644 --- a/src/librustdoc/html/static/FiraSans-LICENSE.txt +++ b/src/librustdoc/html/static/FiraSans-LICENSE.txt @@ -1,10 +1,5 @@ -Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ -with Reserved Font Name Fira Sans. - -Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ -with Reserved Font Name Fira Mono. - -Copyright (c) 2014, Telefonica S.A. +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: @@ -24,7 +19,7 @@ with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, +fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The diff --git a/src/librustdoc/html/static/FiraSans-Medium.woff b/src/librustdoc/html/static/FiraSans-Medium.woff index 5627227744ae5b2ffb83e632cb32b237428c8962..7d742c5fb7d4597ae140f8418f52ffe03dc75343 100644 GIT binary patch literal 186824 zcmZs=byyrt@F0xK;)KN^I4l|@xGn^DcamU>Yj6!L?iv!@o!~CPCBWkD5Zv95_rBkK z|J?O6)iYgFT~kj_cd5IIv@{$%92^|N!XO;}+Z~1V?ydiSHYp7`nK!zwx0h)D1Mo6Z zpQPd7;FI0}_y%G8WMUs=R8=(I7?#7qd9%R5b32Ch-X6(lXo2D2eCOfdXpG?CIJn^8viaY5>Ab<`FF5ncrgmQ(-*9noa7<5daB8wM3&rfFZmv{t2vg*5G;e(2 zCb55tH(EGa+P&f4XpxKI;4o6R36{<*zqmNQ;RxPn{*QdPmbRW2aBxFWaPVcr!SFd_r>GwyP11$^Qis!CvSK2c6 zdHPlZXG&pOsU18XFCj;ek3!rB&{I#RY$6QwpnqSInZ2Hx5Q_!|pVp20vr}CSm^9VzrlKz=7 z4xL^7xs1r47(u%6Ba-=A4DW;ZtC;~*(sfC!bG**=pL>XY2a($bVt1MvPke5d{1M0? z4F3#mHP^Sr@mM_a#q!bYo4H+Xy*(i!{;*)n+p2(%hbM^-9wed;#>K-;??CrpQQ4M@$fVv!a!7CrNl|`;(W)SEKiPBlz!h$i2APG zE~{G9CT`6Jr*5!W(Qar6(n`97<`3%4%K$Y+6ztf7Q? z^YZAYT{F?y^qpaU_LRTumUcU0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=*bCjb!edaRDF8@+zkBdV1*vslm}~Sl$A!>@CYv}%ek0_N>Q^Chq7yxa0BpUu4fZfZaMS}yIABJv z{nH!=XA_HBm*IPqUTPeBq$D^ZlqB4OP}`U&V*TCNMjXqSsYo=M6FfyEY4s!&Jv}nH zdJ&3j5UEo=3&mcJoUdMiA__&$J#d|P5w%7RR4qd(y&{>b=Ai@+kwsN&P!MV)#Bl;j z5*oSds4Hwclokn*Kd&OTdGB8U1g+|}arbYP7YpFJ#5VjH$$E8ACnL%0I3_l8(T1=`@N`~dR3qEGi)JLV%p5Z{>$lqMBgstXxvUS6(tiYL@()ci@FMh2k^MU2m zJUnTF#90q=sBu@=&Kxc2+v>8`1sxZ0K!H`4oV8_7yrX!wz$&&M0Ogv9caP{I;q% z|9SqJO{(8-zId6Wsr20-TIAXWU2cOQ) zVYJl3eA6^3Y{3h`JtV?06a;^-Gb18=eP39{ntj%b>+AeV7q`nka%8DvblPmdr5|!E z7~&(Pvn`oqCSF6K)&+=PboayNwFSGP$pn|bd*h0n)3f{4Qach$!#zY8UCz?K@FZPu2`l_?tekFT0VlPeIy g2_MHAM`PCBSvjNwzDzG9AsN=ZuT1&MwQz9%4|=Uc$N&HU diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 412029cf37..72a01a49bc 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -930,10 +930,10 @@ if (!DOMTokenList.prototype.remove) { returned = checkReturned(ty, output, true); if (output.name === "*" || returned === true) { in_args = false; - var module = false; + var is_module = false; if (input === "*") { - module = true; + is_module = true; } else { var allFound = true; for (var it = 0; allFound === true && it < inputs.length; it++) { @@ -955,7 +955,7 @@ if (!DOMTokenList.prototype.remove) { dontValidate: true, }; } - if (module === true) { + if (is_module === true) { results[fullId] = { id: i, index: -1, @@ -1073,6 +1073,10 @@ if (!DOMTokenList.prototype.remove) { if (index !== -1 || lev <= MAX_LEV_DISTANCE) { if (index !== -1 && paths.length < 2) { lev = 0; + } else if (searchWords[j] === val) { + // Small trick to fix when you're looking for a one letter type + // and there are other short named types. + lev = -1; } if (results[fullId] === undefined) { results[fullId] = { @@ -2101,7 +2105,7 @@ if (!DOMTokenList.prototype.remove) { } var toggle = createSimpleToggle(false); - var hideMethodDocs = getCurrentValue("rustdoc-method-docs") !== "false"; + var hideMethodDocs = getCurrentValue("rustdoc-method-docs") === "true"; var pageId = getPageId(); var func = function(e) { @@ -2321,7 +2325,11 @@ if (!DOMTokenList.prototype.remove) { } var attributesToggle = createToggleWrapper(createSimpleToggle(false)); onEachLazy(main.getElementsByClassName("attributes"), function(i_e) { - i_e.parentNode.insertBefore(attributesToggle.cloneNode(true), i_e); + var attr_tog = attributesToggle.cloneNode(true); + if (hasClass(i_e, "top-attr") === true) { + addClass(attr_tog, "top-attr"); + } + i_e.parentNode.insertBefore(attr_tog, i_e); itemAttributesFunc(i_e); }); diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 5314255ac3..0493bf7c5c 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -182,12 +182,25 @@ nav.sub { display: none !important; } -.sidebar img { +.logo-container { + height: 100px; + width: 100px; + position: relative; margin: 20px auto; display: block; margin-top: 10px; } +.logo-container > img { + max-width: 100px; + max-height: 100px; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + display: block; +} + .sidebar .location { border: 1px solid; font-size: 17px; @@ -345,7 +358,7 @@ nav.sub { margin: 0; } .docblock-short code { - white-space: nowrap; + white-space: pre-wrap; } .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 { @@ -658,18 +671,18 @@ a { transition: border-color 300ms ease; transition: border-radius 300ms ease-in-out; transition: box-shadow 300ms ease-in-out; - width: calc(100% - 32px); + width: 100%; } #crate-search + .search-input { border-radius: 0 1px 1px 0; + width: calc(100% - 32px); } .search-input:focus { border-radius: 2px; border: 0; outline: 0; - box-shadow: 0 0 8px #078dd8; } .search-results .desc { @@ -914,7 +927,7 @@ h3 > .collapse-toggle, h4 > .collapse-toggle { height: 12px; } -span.since { +.out-of-band > span.since { position: initial; font-size: 20px; margin-right: 5px; @@ -998,6 +1011,195 @@ span.since { opacity: 1; } +.information { + position: absolute; + left: -20px; + margin-top: 7px; + z-index: 1; +} + +.tooltip { + position: relative; + display: inline-block; + cursor: pointer; +} + +.tooltip .tooltiptext { + width: 120px; + display: none; + text-align: center; + padding: 5px 3px; + border-radius: 6px; + margin-left: 5px; + top: -5px; + left: 105%; + z-index: 10; +} + +.tooltip:hover .tooltiptext { + display: inline; +} + +.tooltip .tooltiptext::after { + content: " "; + position: absolute; + top: 50%; + left: 11px; + margin-top: -5px; + border-width: 5px; + border-style: solid; +} + +.important-traits .tooltip .tooltiptext { + border: 1px solid; +} + +pre.rust { + position: relative; + tab-width: 4; + -moz-tab-width: 4; +} + +.search-failed { + text-align: center; + margin-top: 20px; +} + +.search-failed > ul { + text-align: left; + max-width: 570px; + margin-left: auto; + margin-right: auto; +} + +#titles { + height: 35px; +} + +#titles > div { + float: left; + width: 33.3%; + text-align: center; + font-size: 18px; + cursor: pointer; + border-top: 2px solid; +} + +#titles > div:not(:last-child) { + margin-right: 1px; + width: calc(33.3% - 1px); +} + +#titles > div > div.count { + display: inline-block; + font-size: 16px; +} + +.important-traits { + cursor: pointer; + z-index: 2; +} + +h4 > .important-traits { + position: absolute; + left: -44px; + top: 2px; +} + +#all-types { + text-align: center; + border: 1px solid; + margin: 0 10px; + margin-bottom: 10px; + display: block; + border-radius: 7px; +} +#all-types > p { + margin: 5px 0; +} + +#sidebar-toggle { + position: fixed; + top: 30px; + left: 300px; + z-index: 10; + padding: 3px; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + cursor: pointer; + font-weight: bold; + transition: left .5s; + font-size: 1.2em; + border: 1px solid; + border-left: 0; +} +#source-sidebar { + position: fixed; + top: 0; + bottom: 0; + left: 0; + width: 300px; + z-index: 1; + overflow: auto; + transition: left .5s; + border-right: 1px solid; +} +#source-sidebar > .title { + font-size: 1.5em; + text-align: center; + border-bottom: 1px solid; + margin-bottom: 6px; +} + +.theme-picker { + position: absolute; + left: 211px; + top: 19px; +} + +.theme-picker button { + outline: none; +} + +#settings-menu { + position: absolute; + right: 0; + top: 10px; + outline: none; +} + +#theme-picker, #settings-menu { + padding: 4px; + width: 27px; + height: 29px; + border: 1px solid; + border-radius: 3px; + cursor: pointer; +} + +#theme-choices { + display: none; + position: absolute; + left: 0; + top: 28px; + border: 1px solid; + border-radius: 3px; + z-index: 1; + cursor: pointer; +} + +#theme-choices > button { + border: none; + width: 100%; + padding: 4px; + text-align: center; + background: rgba(0,0,0,0); +} + +#theme-choices > button:not(:first-child) { + border-top: 1px solid; +} + /* Media Queries */ @media (max-width: 700px) { @@ -1030,14 +1232,20 @@ span.since { padding: 0; } - .sidebar img { + .sidebar .logo-container { width: 35px; + height: 35px; margin-top: 5px; margin-bottom: 5px; float: left; margin-left: 50px; } + .sidebar .logo-container > img { + max-width: 35px; + max-height: 35px; + } + .sidebar-menu { position: fixed; z-index: 10; @@ -1052,6 +1260,10 @@ span.since { height: 45px; } + .rustdoc.source > .sidebar > .sidebar-menu { + display: none; + } + .sidebar-elems { position: fixed; z-index: 1; @@ -1113,122 +1325,13 @@ span.since { h1.fqn { overflow: initial; } -} -@media print { - nav.sub, .content .out-of-band, .collapse-toggle { - display: none; + .theme-picker { + left: 10px; + top: 54px; + z-index: 1; } -} -.information { - position: absolute; - left: -20px; - margin-top: 7px; - z-index: 1; -} - -.tooltip { - position: relative; - display: inline-block; - cursor: pointer; -} - -.tooltip .tooltiptext { - width: 120px; - display: none; - text-align: center; - padding: 5px 3px; - border-radius: 6px; - margin-left: 5px; - top: -5px; - left: 105%; - z-index: 10; -} - -.tooltip:hover .tooltiptext { - display: inline; -} - -.tooltip .tooltiptext::after { - content: " "; - position: absolute; - top: 50%; - left: 11px; - margin-top: -5px; - border-width: 5px; - border-style: solid; -} - -.important-traits .tooltip .tooltiptext { - border: 1px solid; -} - -pre.rust { - position: relative; - tab-width: 4; - -moz-tab-width: 4; -} - -.search-failed { - text-align: center; - margin-top: 20px; -} - -.search-failed > ul { - text-align: left; - max-width: 570px; - margin-left: auto; - margin-right: auto; -} - -#titles { - height: 35px; -} - -#titles > div { - float: left; - width: 33.3%; - text-align: center; - font-size: 18px; - cursor: pointer; - border-top: 2px solid; -} - -#titles > div:not(:last-child) { - margin-right: 1px; - width: calc(33.3% - 1px); -} - -#titles > div > div.count { - display: inline-block; - font-size: 16px; -} - -.important-traits { - cursor: pointer; - z-index: 2; -} - -h4 > .important-traits { - position: absolute; - left: -44px; - top: 2px; -} - -#all-types { - text-align: center; - border: 1px solid; - margin: 0 10px; - margin-bottom: 10px; - display: block; - border-radius: 7px; -} -#all-types > p { - margin: 5px 0; -} - -@media (max-width: 700px) { h4 > .important-traits { position: absolute; left: -22px; @@ -1303,8 +1406,29 @@ h4 > .important-traits { #all-types { margin: 10px; } + + #sidebar-toggle { + top: 100px; + width: 30px; + font-size: 1.5rem; + text-align: center; + padding: 0; + } + + #source-sidebar { + z-index: 11; + } + + #main > .line-numbers { + margin-top: 0; + } } +@media print { + nav.sub, .content .out-of-band, .collapse-toggle { + display: none; + } +} @media (max-width: 416px) { #titles { @@ -1404,63 +1528,6 @@ kbd { cursor: default; } -.theme-picker { - position: absolute; - left: 211px; - top: 19px; -} - -.theme-picker button { - outline: none; -} - -#settings-menu { - position: absolute; - right: 0; - top: 10px; - outline: none; -} - -#theme-picker, #settings-menu { - padding: 4px; - width: 27px; - height: 29px; - border: 1px solid; - border-radius: 3px; - cursor: pointer; -} - -#theme-choices { - display: none; - position: absolute; - left: 0; - top: 28px; - border: 1px solid; - border-radius: 3px; - z-index: 1; - cursor: pointer; -} - -#theme-choices > button { - border: none; - width: 100%; - padding: 4px; - text-align: center; - background: rgba(0,0,0,0); -} - -#theme-choices > button:not(:first-child) { - border-top: 1px solid; -} - -@media (max-width: 700px) { - .theme-picker { - left: 10px; - top: 54px; - z-index: 1; - } -} - .hidden-by-impl-hider, .hidden-by-usual-hider { /* important because of conflicting rule for small screens */ @@ -1512,39 +1579,6 @@ kbd { margin-bottom: 1em; } -#sidebar-toggle { - position: fixed; - top: 30px; - left: 300px; - z-index: 10; - padding: 3px; - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; - cursor: pointer; - font-weight: bold; - transition: left .5s; - font-size: 1.2em; - border: 1px solid; - border-left: 0; -} -#source-sidebar { - position: fixed; - top: 0; - bottom: 0; - left: 0; - width: 300px; - z-index: 1; - overflow: auto; - transition: left .5s; - border-right: 1px solid; -} -#source-sidebar > .title { - font-size: 1.5em; - text-align: center; - border-bottom: 1px solid; - margin-bottom: 6px; -} - div.children { padding-left: 27px; display: none; @@ -1577,3 +1611,17 @@ div.name.expand::before { left: -15px; top: 2px; } + +/* This part is to fix the "Expand attributes" part in the type declaration. */ +.type-decl > pre > .toggle-wrapper.toggle-attributes.top-attr { + margin-left: 0 !important; +} +.type-decl > pre > .docblock.attributes.top-attr { + margin-left: 1.8em !important; +} +.type-decl > pre > .toggle-attributes { + margin-left: 2.2em; +} +.type-decl > pre > .docblock.attributes { + margin-left: 4em; +} diff --git a/src/librustdoc/html/static/source-script.js b/src/librustdoc/html/static/source-script.js index 509c628ce5..567022b413 100644 --- a/src/librustdoc/html/static/source-script.js +++ b/src/librustdoc/html/static/source-script.js @@ -39,28 +39,32 @@ function createDirEntry(elem, parent, fullPath, currentFile, hasFoundFile) { children.className = "children"; var folders = document.createElement("div"); folders.className = "folders"; - for (var i = 0; i < elem.dirs.length; ++i) { - if (createDirEntry(elem.dirs[i], folders, fullPath, currentFile, - hasFoundFile) === true) { - addClass(name, "expand"); - hasFoundFile = true; + if (elem.dirs) { + for (var i = 0; i < elem.dirs.length; ++i) { + if (createDirEntry(elem.dirs[i], folders, fullPath, currentFile, + hasFoundFile) === true) { + addClass(name, "expand"); + hasFoundFile = true; + } } } children.appendChild(folders); var files = document.createElement("div"); files.className = "files"; - for (i = 0; i < elem.files.length; ++i) { - var file = document.createElement("a"); - file.innerText = elem.files[i]; - file.href = window.rootPath + "src/" + fullPath + elem.files[i] + ".html"; - if (hasFoundFile === false && - currentFile === fullPath + elem.files[i]) { - file.className = "selected"; - addClass(name, "expand"); - hasFoundFile = true; + if (elem.files) { + for (i = 0; i < elem.files.length; ++i) { + var file = document.createElement("a"); + file.innerText = elem.files[i]; + file.href = window.rootPath + "src/" + fullPath + elem.files[i] + ".html"; + if (hasFoundFile === false && + currentFile === fullPath + elem.files[i]) { + file.className = "selected"; + addClass(name, "expand"); + hasFoundFile = true; + } + files.appendChild(file); } - files.appendChild(file); } search.fullPath = fullPath; children.appendChild(files); diff --git a/src/librustdoc/html/static/themes/dark.css b/src/librustdoc/html/static/themes/dark.css index e3bb41ae67..e44ae2ad10 100644 --- a/src/librustdoc/html/static/themes/dark.css +++ b/src/librustdoc/html/static/themes/dark.css @@ -164,32 +164,33 @@ a.test-arrow { color: #111; background-color: #f0f0f0; border-color: #000; + box-shadow: 0 0 0 1px #000, 0 0 0 2px transparent; } .search-input { color: #111; - box-shadow: 0 0 0 1px #000, 0 0 0 2px transparent; background-color: #f0f0f0; + box-shadow: 0 0 0 1px #000, 0 0 0 2px transparent; } .search-input:focus { border-color: #008dfd; } -#crate-search + .search-input { - box-shadow: 1px 0 0 1px #000, 0 0 0 2px transparent; +#crate-search + .search-input:focus { + box-shadow: 0 0 8px 4px #078dd8; } .module-item .stab { color: #ddd; } -.stab.unstable {background: #FFF5D6; border-color: #FFC600; color: #2f2f2f; } +.stab.unstable { background: #FFF5D6; border-color: #FFC600; color: #2f2f2f; } .stab.internal { background: #FFB9B3; border-color: #B71C1C; color: #2f2f2f; } .stab.deprecated { background: #F3DFFF; border-color: #7F0087; color: #2f2f2f; } .stab.portability { background: #C4ECFF; border-color: #7BA5DB; color: #2f2f2f; } -.stab > code { +.stab.portability > code { color: #ddd; } diff --git a/src/librustdoc/html/static/themes/light.css b/src/librustdoc/html/static/themes/light.css index dd4d028c6c..4c37000dde 100644 --- a/src/librustdoc/html/static/themes/light.css +++ b/src/librustdoc/html/static/themes/light.css @@ -164,21 +164,21 @@ a.test-arrow { color: #555; background-color: white; border-color: #e0e0e0; - box-shadow: 0px 0 0 1px #e0e0e0, 0 0 0 2px transparent; + box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent; } .search-input { color: #555; - box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent; background-color: white; + box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent; } .search-input:focus { border-color: #66afe9; } -#crate-search + .search-input { - box-shadow: 1px 0 0 1px #e0e0e0, 0 0 0 2px transparent; +#crate-search + .search-input:focus { + box-shadow: 0 0 8px #078dd8; } .module-item .stab { @@ -190,7 +190,7 @@ a.test-arrow { .stab.deprecated { background: #F3DFFF; border-color: #7F0087; } .stab.portability { background: #C4ECFF; border-color: #7BA5DB; } -.stab > code { +.stab.portability > code { color: #000; } diff --git a/src/librustdoc/html/static_files.rs b/src/librustdoc/html/static_files.rs index a1d8cfacc5..3a2c24b1a9 100644 --- a/src/librustdoc/html/static_files.rs +++ b/src/librustdoc/html/static_files.rs @@ -91,7 +91,7 @@ pub mod source_serif_pro { pub static ITALIC: &'static [u8] = include_bytes!("static/SourceSerifPro-It.ttf.woff"); /// The file `SourceSerifPro-LICENSE.txt`, the license text for the Source Serif Pro font. - pub static LICENSE: &'static [u8] = include_bytes!("static/SourceSerifPro-LICENSE.txt"); + pub static LICENSE: &'static [u8] = include_bytes!("static/SourceSerifPro-LICENSE.md"); } /// Files related to the Source Code Pro font. diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 6cb937d921..f5061b6718 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -1,5 +1,5 @@ #![deny(rust_2018_idioms)] -#![cfg_attr(not(stage0), deny(internal))] +#![deny(internal)] #![doc(html_root_url = "https://doc.rust-lang.org/nightly/", html_playground_url = "https://play.rust-lang.org/")] @@ -391,7 +391,10 @@ fn main_args(args: &[String]) -> i32 { match (options.should_test, options.markdown_input()) { (true, true) => return markdown::test(options, &diag), (true, false) => return test::run(options), - (false, true) => return markdown::render(options.input, options.render_options, &diag), + (false, true) => return markdown::render(options.input, + options.render_options, + &diag, + options.edition), (false, false) => {} } @@ -399,7 +402,8 @@ fn main_args(args: &[String]) -> i32 { // but we can't crates the Handler ahead of time because it's not Send let diag_opts = (options.error_format, options.debugging_options.treat_err_as_bug, - options.debugging_options.ui_testing); + options.debugging_options.ui_testing, + options.edition); let show_coverage = options.show_coverage; rust_input(options, move |out| { if show_coverage { @@ -410,7 +414,7 @@ fn main_args(args: &[String]) -> i32 { let Output { krate, passes, renderinfo, renderopts } = out; info!("going to format"); - let (error_format, treat_err_as_bug, ui_testing) = diag_opts; + let (error_format, treat_err_as_bug, ui_testing, edition) = diag_opts; let diag = core::new_handler(error_format, None, treat_err_as_bug, ui_testing); match html::render::run( krate, @@ -418,6 +422,7 @@ fn main_args(args: &[String]) -> i32 { passes.into_iter().collect(), renderinfo, &diag, + edition, ) { Ok(_) => rustc_driver::EXIT_SUCCESS, Err(e) => { diff --git a/src/librustdoc/markdown.rs b/src/librustdoc/markdown.rs index a2e2303bb2..b0a37ea9c8 100644 --- a/src/librustdoc/markdown.rs +++ b/src/librustdoc/markdown.rs @@ -5,6 +5,7 @@ use std::cell::RefCell; use errors; use testing; +use syntax::edition::Edition; use syntax::source_map::DUMMY_SP; use syntax::feature_gate::UnstableFeatures; @@ -36,7 +37,12 @@ fn extract_leading_metadata<'a>(s: &'a str) -> (Vec<&'a str>, &'a str) { /// Render `input` (e.g., "foo.md") into an HTML file in `output` /// (e.g., output = "bar" => "bar/foo.html"). -pub fn render(input: PathBuf, options: RenderOptions, diag: &errors::Handler) -> i32 { +pub fn render( + input: PathBuf, + options: RenderOptions, + diag: &errors::Handler, + edition: Edition +) -> i32 { let mut output = options.output; output.push(input.file_stem().unwrap()); output.set_extension("html"); @@ -76,9 +82,9 @@ pub fn render(input: PathBuf, options: RenderOptions, diag: &errors::Handler) -> let mut ids = IdMap::new(); let error_codes = ErrorCodes::from(UnstableFeatures::from_environment().is_nightly_build()); let text = if !options.markdown_no_toc { - MarkdownWithToc(text, RefCell::new(&mut ids), error_codes).to_string() + MarkdownWithToc(text, RefCell::new(&mut ids), error_codes, edition).to_string() } else { - Markdown(text, &[], RefCell::new(&mut ids), error_codes).to_string() + Markdown(text, &[], RefCell::new(&mut ids), error_codes, edition).to_string() }; let err = write!( @@ -143,10 +149,9 @@ pub fn test(mut options: Options, diag: &errors::Handler) -> i32 { options.linker, options.edition, options.persist_doctests); collector.set_position(DUMMY_SP); let codes = ErrorCodes::from(UnstableFeatures::from_environment().is_nightly_build()); - let res = find_testable_code(&input_str, &mut collector, codes); - if let Err(err) = res { - diag.span_warn(DUMMY_SP, &err.to_string()); - } + + find_testable_code(&input_str, &mut collector, codes); + options.test_args.insert(0, "rustdoctest".to_string()); testing::test_main(&options.test_args, collector.tests, testing::Options::new().display_output(options.display_warnings)); diff --git a/src/librustdoc/passes/calculate_doc_coverage.rs b/src/librustdoc/passes/calculate_doc_coverage.rs index fe407fa24d..4ee09f7096 100644 --- a/src/librustdoc/passes/calculate_doc_coverage.rs +++ b/src/librustdoc/passes/calculate_doc_coverage.rs @@ -5,6 +5,7 @@ use crate::passes::Pass; use syntax::attr; use syntax_pos::FileName; +use syntax::symbol::sym; use std::collections::BTreeMap; use std::ops; @@ -131,7 +132,7 @@ impl fold::DocFolder for CoverageCalculator { return Some(i); } clean::ImplItem(ref impl_) - if attr::contains_name(&i.attrs.other_attrs, "automatically_derived") + if attr::contains_name(&i.attrs.other_attrs, sym::automatically_derived) || impl_.synthetic || impl_.blanket_impl.is_some() => { // built-in derives get the `#[automatically_derived]` attribute, and diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs index ee182237b4..2c382a1c17 100644 --- a/src/librustdoc/passes/collect_intra_doc_links.rs +++ b/src/librustdoc/passes/collect_intra_doc_links.rs @@ -1,5 +1,5 @@ use errors::Applicability; -use rustc::hir::def::{Def, Namespace::{self, *}, PerNS}; +use rustc::hir::def::{Res, DefKind, Namespace::{self, *}, PerNS}; use rustc::hir::def_id::DefId; use rustc::hir; use rustc::lint as lint; @@ -38,7 +38,7 @@ pub fn collect_intra_doc_links(krate: Crate, cx: &DocContext<'_>) -> Crate { struct LinkCollector<'a, 'tcx> { cx: &'a DocContext<'tcx>, - mod_ids: Vec, + mod_ids: Vec, } impl<'a, 'tcx> LinkCollector<'a, 'tcx> { @@ -55,8 +55,8 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { path_str: &str, ns: Namespace, current_item: &Option, - parent_id: Option) - -> Result<(Def, Option), ()> + parent_id: Option) + -> Result<(Res, Option), ()> { let cx = self.cx; @@ -64,8 +64,9 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { // path. if let Some(id) = parent_id.or(self.mod_ids.last().cloned()) { // FIXME: `with_scope` requires the `NodeId` of a module. + let node_id = cx.tcx.hir().hir_to_node_id(id); let result = cx.enter_resolver(|resolver| { - resolver.with_scope(id, |resolver| { + resolver.with_scope(node_id, |resolver| { resolver.resolve_str_path_error(DUMMY_SP, &path_str, ns == ValueNS) }) }); @@ -73,12 +74,12 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { if let Ok(result) = result { // In case this is a trait item, skip the // early return and try looking for the trait. - let value = match result.def { - Def::Method(_) | Def::AssociatedConst(_) => true, - Def::AssociatedTy(_) => false, - Def::Variant(_) => return handle_variant(cx, result.def), + let value = match result.res { + Res::Def(DefKind::Method, _) | Res::Def(DefKind::AssociatedConst, _) => true, + Res::Def(DefKind::AssociatedTy, _) => false, + Res::Def(DefKind::Variant, _) => return handle_variant(cx, result.res), // Not a trait item; just return what we found. - _ => return Ok((result.def, None)) + _ => return Ok((result.res, None)) }; if value != (ns == ValueNS) { @@ -98,7 +99,7 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { // Try looking for methods and associated items. let mut split = path_str.rsplitn(2, "::"); let item_name = if let Some(first) = split.next() { - first + Symbol::intern(first) } else { return Err(()) }; @@ -127,11 +128,15 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { } // FIXME: `with_scope` requires the `NodeId` of a module. - let ty = cx.enter_resolver(|resolver| resolver.with_scope(id, |resolver| { + let node_id = cx.tcx.hir().hir_to_node_id(id); + let ty = cx.enter_resolver(|resolver| resolver.with_scope(node_id, |resolver| { resolver.resolve_str_path_error(DUMMY_SP, &path, false) }))?; - match ty.def { - Def::Struct(did) | Def::Union(did) | Def::Enum(did) | Def::TyAlias(did) => { + match ty.res { + Res::Def(DefKind::Struct, did) + | Res::Def(DefKind::Union, did) + | Res::Def(DefKind::Enum, did) + | Res::Def(DefKind::TyAlias, did) => { let item = cx.tcx.inherent_impls(did) .iter() .flat_map(|imp| cx.tcx.associated_items(*imp)) @@ -142,7 +147,7 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { ty::AssociatedKind::Const if ns == ValueNS => "associatedconstant", _ => return Err(()) }; - Ok((ty.def, Some(format!("{}.{}", out, item_name)))) + Ok((ty.res, Some(format!("{}.{}", out, item_name)))) } else { match cx.tcx.type_of(did).sty { ty::Adt(def, _) => { @@ -154,7 +159,7 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { .iter() .find(|item| item.ident.name == item_name) } { - Ok((ty.def, + Ok((ty.res, Some(format!("{}.{}", if def.is_enum() { "variant" @@ -170,7 +175,7 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { } } } - Def::Trait(did) => { + Res::Def(DefKind::Trait, did) => { let item = cx.tcx.associated_item_def_ids(did).iter() .map(|item| cx.tcx.associated_item(*item)) .find(|item| item.ident.name == item_name); @@ -188,7 +193,7 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { _ => return Err(()) }; - Ok((ty.def, Some(format!("{}.{}", kind, item_name)))) + Ok((ty.res, Some(format!("{}.{}", kind, item_name)))) } else { Err(()) } @@ -196,6 +201,7 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { _ => Err(()) } } else { + debug!("attempting to resolve item without parent module: {}", path_str); Err(()) } } @@ -215,11 +221,11 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> { }; // FIXME: get the resolver to work with non-local resolve scopes. - let parent_node = self.cx.as_local_node_id(item.def_id).and_then(|node_id| { + let parent_node = self.cx.as_local_hir_id(item.def_id).and_then(|hir_id| { // FIXME: this fails hard for impls in non-module scope, but is necessary for the // current `resolve()` implementation. - match self.cx.tcx.hir().get_module_parent_node(node_id) { - id if id != node_id => Some(id), + match self.cx.tcx.hir().get_module_parent_node(hir_id) { + id if id != hir_id => Some(id), _ => None, } }); @@ -238,9 +244,9 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> { } } else { match parent_node.or(self.mod_ids.last().cloned()) { - Some(parent) if parent != ast::CRATE_NODE_ID => { + Some(parent) if parent != hir::CRATE_HIR_ID => { // FIXME: can we pull the parent module's name from elsewhere? - Some(self.cx.tcx.hir().name(parent).to_string()) + Some(self.cx.tcx.hir().name_by_hir_id(parent).to_string()) } _ => None, } @@ -257,7 +263,7 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> { }; if item.is_mod() && item.attrs.inner_docs { - self.mod_ids.push(self.cx.tcx.hir().hir_to_node_id(item_hir_id.unwrap())); + self.mod_ids.push(item_hir_id.unwrap()); } let cx = self.cx; @@ -277,7 +283,7 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> { } let link = ori_link.replace("`", ""); - let (def, fragment) = { + let (res, fragment) = { let mut kind = None; let path_str = if let Some(prefix) = ["struct@", "enum@", "type@", @@ -312,10 +318,10 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> { match kind { Some(ns @ ValueNS) => { - if let Ok(def) = self.resolve(path_str, ns, ¤t_item, parent_node) { - def + if let Ok(res) = self.resolve(path_str, ns, ¤t_item, parent_node) { + res } else { - resolution_failure(cx, &item.attrs, path_str, &dox, link_range); + resolution_failure(cx, &item, path_str, &dox, link_range); // This could just be a normal link or a broken link // we could potentially check if something is // "intra-doc-link-like" and warn in that case. @@ -323,10 +329,10 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> { } } Some(ns @ TypeNS) => { - if let Ok(def) = self.resolve(path_str, ns, ¤t_item, parent_node) { - def + if let Ok(res) = self.resolve(path_str, ns, ¤t_item, parent_node) { + res } else { - resolution_failure(cx, &item.attrs, path_str, &dox, link_range); + resolution_failure(cx, &item, path_str, &dox, link_range); // This could just be a normal link. continue; } @@ -334,24 +340,24 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> { None => { // Try everything! let candidates = PerNS { - macro_ns: macro_resolve(cx, path_str).map(|def| (def, None)), + macro_ns: macro_resolve(cx, path_str).map(|res| (res, None)), type_ns: self .resolve(path_str, TypeNS, ¤t_item, parent_node) .ok(), value_ns: self .resolve(path_str, ValueNS, ¤t_item, parent_node) .ok() - .and_then(|(def, fragment)| { + .and_then(|(res, fragment)| { // Constructors are picked up in the type namespace. - match def { - Def::Ctor(..) | Def::SelfCtor(..) => None, - _ => Some((def, fragment)) + match res { + Res::Def(DefKind::Ctor(..), _) | Res::SelfCtor(..) => None, + _ => Some((res, fragment)) } }), }; if candidates.is_empty() { - resolution_failure(cx, &item.attrs, path_str, &dox, link_range); + resolution_failure(cx, &item, path_str, &dox, link_range); // this could just be a normal link continue; } @@ -362,36 +368,36 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> { } else { ambiguity_error( cx, - &item.attrs, + &item, path_str, &dox, link_range, - candidates.map(|candidate| candidate.map(|(def, _)| def)), + candidates.map(|candidate| candidate.map(|(res, _)| res)), ); continue; } } Some(MacroNS) => { - if let Some(def) = macro_resolve(cx, path_str) { - (def, None) + if let Some(res) = macro_resolve(cx, path_str) { + (res, None) } else { - resolution_failure(cx, &item.attrs, path_str, &dox, link_range); + resolution_failure(cx, &item, path_str, &dox, link_range); continue } } } }; - if let Def::PrimTy(_) = def { + if let Res::PrimTy(_) = res { item.attrs.links.push((ori_link, None, fragment)); } else { - let id = register_def(cx, def); + let id = register_res(cx, res); item.attrs.links.push((ori_link, Some(id), fragment)); } } if item.is_mod() && !item.attrs.inner_docs { - self.mod_ids.push(self.cx.tcx.hir().hir_to_node_id(item_hir_id.unwrap())); + self.mod_ids.push(item_hir_id.unwrap()); } if item.is_mod() { @@ -404,27 +410,36 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> { self.fold_item_recur(item) } } + + // FIXME: if we can resolve intra-doc links from other crates, we can use the stock + // `fold_crate`, but until then we should avoid scanning `krate.external_traits` since those + // will never resolve properly + fn fold_crate(&mut self, mut c: Crate) -> Crate { + c.module = c.module.take().and_then(|module| self.fold_item(module)); + + c + } } /// Resolves a string as a macro. -fn macro_resolve(cx: &DocContext<'_>, path_str: &str) -> Option { +fn macro_resolve(cx: &DocContext<'_>, path_str: &str) -> Option { use syntax::ext::base::{MacroKind, SyntaxExtension}; let segment = ast::PathSegment::from_ident(Ident::from_str(path_str)); let path = ast::Path { segments: vec![segment], span: DUMMY_SP }; cx.enter_resolver(|resolver| { let parent_scope = resolver.dummy_parent_scope(); - if let Ok(def) = resolver.resolve_macro_to_def_inner(&path, MacroKind::Bang, + if let Ok(res) = resolver.resolve_macro_to_res_inner(&path, MacroKind::Bang, &parent_scope, false, false) { - if let Def::Macro(_, MacroKind::ProcMacroStub) = def { + if let Res::Def(DefKind::Macro(MacroKind::ProcMacroStub), _) = res { // skip proc-macro stubs, they'll cause `get_macro` to crash } else { - if let SyntaxExtension::DeclMacro { .. } = *resolver.get_macro(def) { - return Some(def); + if let SyntaxExtension::DeclMacro { .. } = *resolver.get_macro(res) { + return Some(res.map_id(|_| panic!("unexpected id"))); } } } - if let Some(def) = resolver.all_macros.get(&Symbol::intern(path_str)) { - return Some(*def); + if let Some(res) = resolver.all_macros.get(&Symbol::intern(path_str)) { + return Some(res.map_id(|_| panic!("unexpected id"))); } None }) @@ -437,16 +452,24 @@ fn macro_resolve(cx: &DocContext<'_>, path_str: &str) -> Option { /// line containing the failure as a note as well. fn resolution_failure( cx: &DocContext<'_>, - attrs: &Attributes, + item: &Item, path_str: &str, dox: &str, link_range: Option>, ) { + let hir_id = match cx.as_local_hir_id(item.def_id) { + Some(hir_id) => hir_id, + None => { + // If non-local, no need to check anything. + return; + } + }; + let attrs = &item.attrs; let sp = span_of_attrs(attrs); let mut diag = cx.tcx.struct_span_lint_hir( lint::builtin::INTRA_DOC_LINK_RESOLUTION_FAILURE, - hir::CRATE_HIR_ID, + hir_id, sp, &format!("`[{}]` cannot be resolved, ignoring it...", path_str), ); @@ -480,36 +503,44 @@ fn resolution_failure( fn ambiguity_error( cx: &DocContext<'_>, - attrs: &Attributes, + item: &Item, path_str: &str, dox: &str, link_range: Option>, - candidates: PerNS>, + candidates: PerNS>, ) { + let hir_id = match cx.as_local_hir_id(item.def_id) { + Some(hir_id) => hir_id, + None => { + // If non-local, no need to check anything. + return; + } + }; + let attrs = &item.attrs; let sp = span_of_attrs(attrs); let mut msg = format!("`{}` is ", path_str); let candidates = [TypeNS, ValueNS, MacroNS].iter().filter_map(|&ns| { - candidates[ns].map(|def| (def, ns)) + candidates[ns].map(|res| (res, ns)) }).collect::>(); match candidates.as_slice() { [(first_def, _), (second_def, _)] => { msg += &format!( "both {} {} and {} {}", first_def.article(), - first_def.kind_name(), + first_def.descr(), second_def.article(), - second_def.kind_name(), + second_def.descr(), ); } _ => { let mut candidates = candidates.iter().peekable(); - while let Some((def, _)) = candidates.next() { + while let Some((res, _)) = candidates.next() { if candidates.peek().is_some() { - msg += &format!("{} {}, ", def.article(), def.kind_name()); + msg += &format!("{} {}, ", res.article(), res.descr()); } else { - msg += &format!("and {} {}", def.article(), def.kind_name()); + msg += &format!("and {} {}", res.article(), res.descr()); } } } @@ -517,7 +548,7 @@ fn ambiguity_error( let mut diag = cx.tcx.struct_span_lint_hir( lint::builtin::INTRA_DOC_LINK_RESOLUTION_FAILURE, - hir::CRATE_HIR_ID, + hir_id, sp, &msg, ); @@ -527,23 +558,23 @@ fn ambiguity_error( diag.set_span(sp); diag.span_label(sp, "ambiguous link"); - for (def, ns) in candidates { - let (action, mut suggestion) = match def { - Def::Method(..) | Def::Fn(..) => { + for (res, ns) in candidates { + let (action, mut suggestion) = match res { + Res::Def(DefKind::Method, _) | Res::Def(DefKind::Fn, _) => { ("add parentheses", format!("{}()", path_str)) } - Def::Macro(..) => { + Res::Def(DefKind::Macro(..), _) => { ("add an exclamation mark", format!("{}!", path_str)) } _ => { - let type_ = match (def, ns) { - (Def::Const(..), _) => "const", - (Def::Static(..), _) => "static", - (Def::Struct(..), _) => "struct", - (Def::Enum(..), _) => "enum", - (Def::Union(..), _) => "union", - (Def::Trait(..), _) => "trait", - (Def::Mod(..), _) => "module", + let type_ = match (res, ns) { + (Res::Def(DefKind::Const, _), _) => "const", + (Res::Def(DefKind::Static, _), _) => "static", + (Res::Def(DefKind::Struct, _), _) => "struct", + (Res::Def(DefKind::Enum, _), _) => "enum", + (Res::Def(DefKind::Union, _), _) => "union", + (Res::Def(DefKind::Trait, _), _) => "trait", + (Res::Def(DefKind::Mod, _), _) => "module", (_, TypeNS) => "type", (_, ValueNS) => "value", (_, MacroNS) => "macro", @@ -560,7 +591,7 @@ fn ambiguity_error( diag.span_suggestion( sp, - &format!("to link to the {}, {}", def.kind_name(), action), + &format!("to link to the {}, {}", res.descr(), action), suggestion, Applicability::MaybeIncorrect, ); @@ -588,41 +619,41 @@ fn ambiguity_error( diag.emit(); } -/// Given an enum variant's def, return the def of its enum and the associated fragment. -fn handle_variant(cx: &DocContext<'_>, def: Def) -> Result<(Def, Option), ()> { +/// Given an enum variant's res, return the res of its enum and the associated fragment. +fn handle_variant(cx: &DocContext<'_>, res: Res) -> Result<(Res, Option), ()> { use rustc::ty::DefIdTree; - let parent = if let Some(parent) = cx.tcx.parent(def.def_id()) { + let parent = if let Some(parent) = cx.tcx.parent(res.def_id()) { parent } else { return Err(()) }; - let parent_def = Def::Enum(parent); - let variant = cx.tcx.expect_variant_def(def); + let parent_def = Res::Def(DefKind::Enum, parent); + let variant = cx.tcx.expect_variant_res(res); Ok((parent_def, Some(format!("{}.v", variant.ident.name)))) } -const PRIMITIVES: &[(&str, Def)] = &[ - ("u8", Def::PrimTy(hir::PrimTy::Uint(syntax::ast::UintTy::U8))), - ("u16", Def::PrimTy(hir::PrimTy::Uint(syntax::ast::UintTy::U16))), - ("u32", Def::PrimTy(hir::PrimTy::Uint(syntax::ast::UintTy::U32))), - ("u64", Def::PrimTy(hir::PrimTy::Uint(syntax::ast::UintTy::U64))), - ("u128", Def::PrimTy(hir::PrimTy::Uint(syntax::ast::UintTy::U128))), - ("usize", Def::PrimTy(hir::PrimTy::Uint(syntax::ast::UintTy::Usize))), - ("i8", Def::PrimTy(hir::PrimTy::Int(syntax::ast::IntTy::I8))), - ("i16", Def::PrimTy(hir::PrimTy::Int(syntax::ast::IntTy::I16))), - ("i32", Def::PrimTy(hir::PrimTy::Int(syntax::ast::IntTy::I32))), - ("i64", Def::PrimTy(hir::PrimTy::Int(syntax::ast::IntTy::I64))), - ("i128", Def::PrimTy(hir::PrimTy::Int(syntax::ast::IntTy::I128))), - ("isize", Def::PrimTy(hir::PrimTy::Int(syntax::ast::IntTy::Isize))), - ("f32", Def::PrimTy(hir::PrimTy::Float(syntax::ast::FloatTy::F32))), - ("f64", Def::PrimTy(hir::PrimTy::Float(syntax::ast::FloatTy::F64))), - ("str", Def::PrimTy(hir::PrimTy::Str)), - ("bool", Def::PrimTy(hir::PrimTy::Bool)), - ("char", Def::PrimTy(hir::PrimTy::Char)), +const PRIMITIVES: &[(&str, Res)] = &[ + ("u8", Res::PrimTy(hir::PrimTy::Uint(syntax::ast::UintTy::U8))), + ("u16", Res::PrimTy(hir::PrimTy::Uint(syntax::ast::UintTy::U16))), + ("u32", Res::PrimTy(hir::PrimTy::Uint(syntax::ast::UintTy::U32))), + ("u64", Res::PrimTy(hir::PrimTy::Uint(syntax::ast::UintTy::U64))), + ("u128", Res::PrimTy(hir::PrimTy::Uint(syntax::ast::UintTy::U128))), + ("usize", Res::PrimTy(hir::PrimTy::Uint(syntax::ast::UintTy::Usize))), + ("i8", Res::PrimTy(hir::PrimTy::Int(syntax::ast::IntTy::I8))), + ("i16", Res::PrimTy(hir::PrimTy::Int(syntax::ast::IntTy::I16))), + ("i32", Res::PrimTy(hir::PrimTy::Int(syntax::ast::IntTy::I32))), + ("i64", Res::PrimTy(hir::PrimTy::Int(syntax::ast::IntTy::I64))), + ("i128", Res::PrimTy(hir::PrimTy::Int(syntax::ast::IntTy::I128))), + ("isize", Res::PrimTy(hir::PrimTy::Int(syntax::ast::IntTy::Isize))), + ("f32", Res::PrimTy(hir::PrimTy::Float(syntax::ast::FloatTy::F32))), + ("f64", Res::PrimTy(hir::PrimTy::Float(syntax::ast::FloatTy::F64))), + ("str", Res::PrimTy(hir::PrimTy::Str)), + ("bool", Res::PrimTy(hir::PrimTy::Bool)), + ("char", Res::PrimTy(hir::PrimTy::Char)), ]; -fn is_primitive(path_str: &str, ns: Namespace) -> Option { +fn is_primitive(path_str: &str, ns: Namespace) -> Option { if ns == TypeNS { PRIMITIVES.iter().find(|x| x.0 == path_str).map(|x| x.1) } else { diff --git a/src/librustdoc/passes/collect_trait_impls.rs b/src/librustdoc/passes/collect_trait_impls.rs index 611291c268..70cd4b7219 100644 --- a/src/librustdoc/passes/collect_trait_impls.rs +++ b/src/librustdoc/passes/collect_trait_impls.rs @@ -5,6 +5,7 @@ use super::Pass; use rustc::util::nodemap::FxHashSet; use rustc::hir::def_id::DefId; +use syntax::symbol::sym; pub const COLLECT_TRAIT_IMPLS: Pass = Pass { name: "collect-trait-impls", @@ -67,16 +68,14 @@ pub fn collect_trait_impls(krate: Crate, cx: &DocContext<'_>) -> Crate { if !def_id.is_local() { inline::build_impl(cx, def_id, &mut new_items); - let auto_impls = get_auto_traits_with_def_id(cx, def_id); - let blanket_impls = get_blanket_impls_with_def_id(cx, def_id); - let mut renderinfo = cx.renderinfo.borrow_mut(); + // FIXME(eddyb) is this `doc(hidden)` check needed? + if !cx.tcx.get_attrs(def_id).lists(sym::doc).has_word(sym::hidden) { + let self_ty = cx.tcx.type_of(def_id); + let impls = get_auto_trait_and_blanket_impls(cx, self_ty, def_id); + let mut renderinfo = cx.renderinfo.borrow_mut(); - let new_impls: Vec = auto_impls.into_iter() - .chain(blanket_impls.into_iter()) - .filter(|i| renderinfo.inlined.insert(i.def_id)) - .collect(); - - new_items.extend(new_impls); + new_items.extend(impls.filter(|i| renderinfo.inlined.insert(i.def_id))); + } } } @@ -155,14 +154,13 @@ impl<'a, 'tcx> SyntheticImplCollector<'a, 'tcx> { impl<'a, 'tcx> DocFolder for SyntheticImplCollector<'a, 'tcx> { fn fold_item(&mut self, i: Item) -> Option { if i.is_struct() || i.is_enum() || i.is_union() { - if let (Some(hir_id), Some(name)) = - (self.cx.tcx.hir().as_local_hir_id(i.def_id), i.name.clone()) - { - self.impls.extend(get_auto_traits_with_hir_id(self.cx, hir_id, name.clone())); - self.impls.extend(get_blanket_impls_with_hir_id(self.cx, hir_id, name)); - } else { - self.impls.extend(get_auto_traits_with_def_id(self.cx, i.def_id)); - self.impls.extend(get_blanket_impls_with_def_id(self.cx, i.def_id)); + // FIXME(eddyb) is this `doc(hidden)` check needed? + if !self.cx.tcx.get_attrs(i.def_id).lists(sym::doc).has_word(sym::hidden) { + self.impls.extend(get_auto_trait_and_blanket_impls( + self.cx, + self.cx.tcx.type_of(i.def_id), + i.def_id, + )); } } diff --git a/src/librustdoc/passes/mod.rs b/src/librustdoc/passes/mod.rs index 3c403d421c..d9af33ac5b 100644 --- a/src/librustdoc/passes/mod.rs +++ b/src/librustdoc/passes/mod.rs @@ -1,7 +1,6 @@ //! Contains information about "passes", used to modify crate information during the documentation //! process. -use rustc::hir; use rustc::hir::def_id::DefId; use rustc::lint as lint; use rustc::middle::privacy::AccessLevels; @@ -314,10 +313,13 @@ pub fn look_for_tests<'tcx>( item: &Item, check_missing_code: bool, ) { - if cx.as_local_hir_id(item.def_id).is_none() { - // If non-local, no need to check anything. - return; - } + let hir_id = match cx.as_local_hir_id(item.def_id) { + Some(hir_id) => hir_id, + None => { + // If non-local, no need to check anything. + return; + } + }; struct Tests { found_tests: usize, @@ -333,24 +335,25 @@ pub fn look_for_tests<'tcx>( found_tests: 0, }; - if find_testable_code(&dox, &mut tests, ErrorCodes::No).is_ok() { - if check_missing_code == true && tests.found_tests == 0 { - let mut diag = cx.tcx.struct_span_lint_hir( - lint::builtin::MISSING_DOC_CODE_EXAMPLES, - hir::CRATE_HIR_ID, - span_of_attrs(&item.attrs), - "Missing code example in this documentation"); - diag.emit(); - } else if check_missing_code == false && - tests.found_tests > 0 && - !cx.renderinfo.borrow().access_levels.is_doc_reachable(item.def_id) { - let mut diag = cx.tcx.struct_span_lint_hir( - lint::builtin::PRIVATE_DOC_TESTS, - hir::CRATE_HIR_ID, - span_of_attrs(&item.attrs), - "Documentation test in private item"); - diag.emit(); - } + find_testable_code(&dox, &mut tests, ErrorCodes::No); + + if check_missing_code == true && tests.found_tests == 0 { + let sp = span_of_attrs(&item.attrs).substitute_dummy(item.source.span()); + let mut diag = cx.tcx.struct_span_lint_hir( + lint::builtin::MISSING_DOC_CODE_EXAMPLES, + hir_id, + sp, + "Missing code example in this documentation"); + diag.emit(); + } else if check_missing_code == false && + tests.found_tests > 0 && + !cx.renderinfo.borrow().access_levels.is_doc_reachable(item.def_id) { + let mut diag = cx.tcx.struct_span_lint_hir( + lint::builtin::PRIVATE_DOC_TESTS, + hir_id, + span_of_attrs(&item.attrs), + "Documentation test in private item"); + diag.emit(); } } diff --git a/src/librustdoc/passes/strip_hidden.rs b/src/librustdoc/passes/strip_hidden.rs index 240299c212..da8977544f 100644 --- a/src/librustdoc/passes/strip_hidden.rs +++ b/src/librustdoc/passes/strip_hidden.rs @@ -1,5 +1,6 @@ use rustc::util::nodemap::DefIdSet; use std::mem; +use syntax::symbol::sym; use crate::clean::{self, AttributesExt, NestedAttributesExt}; use crate::clean::Item; @@ -37,7 +38,7 @@ struct Stripper<'a> { impl<'a> DocFolder for Stripper<'a> { fn fold_item(&mut self, i: Item) -> Option { - if i.attrs.lists("doc").has_word("hidden") { + if i.attrs.lists(sym::doc).has_word(sym::hidden) { debug!("strip_hidden: stripping {} {:?}", i.type_(), i.name); // use a dedicated hidden item for given item type if any match i.inner { diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs index 0bbc7c5c4b..0cc99da640 100644 --- a/src/librustdoc/test.rs +++ b/src/librustdoc/test.rs @@ -11,10 +11,6 @@ use syntax::ast; use syntax::source_map::SourceMap; use syntax::edition::Edition; use syntax::feature_gate::UnstableFeatures; -use syntax_pos::{BytePos, DUMMY_SP, Pos, Span, FileName}; -use tempfile::Builder as TempFileBuilder; -use testing; - use std::env; use std::io::prelude::*; use std::io; @@ -23,6 +19,10 @@ use std::path::PathBuf; use std::process::Command; use std::str; use std::sync::{Arc, Mutex}; +use syntax::symbol::sym; +use syntax_pos::{BytePos, DUMMY_SP, Pos, Span, FileName}; +use tempfile::Builder as TempFileBuilder; +use testing; use crate::clean::Attributes; use crate::config::Options; @@ -137,17 +137,17 @@ fn scrape_test_config(krate: &::rustc::hir::Crate) -> TestOptions { }; let test_attrs: Vec<_> = krate.attrs.iter() - .filter(|a| a.check_name("doc")) + .filter(|a| a.check_name(sym::doc)) .flat_map(|a| a.meta_item_list().unwrap_or_else(Vec::new)) - .filter(|a| a.check_name("test")) + .filter(|a| a.check_name(sym::test)) .collect(); let attrs = test_attrs.iter().flat_map(|a| a.meta_item_list().unwrap_or(&[])); for attr in attrs { - if attr.check_name("no_crate_inject") { + if attr.check_name(sym::no_crate_inject) { opts.no_crate_inject = true; } - if attr.check_name("attr") { + if attr.check_name(sym::attr) { if let Some(l) = attr.meta_item_list() { for item in l { opts.attrs.push(pprust::meta_list_item_to_string(item)); @@ -166,9 +166,18 @@ fn run_test(test: &str, cratename: &str, filename: &FileName, line: usize, compile_fail: bool, mut error_codes: Vec, opts: &TestOptions, maybe_sysroot: Option, linker: Option, edition: Edition, persist_doctests: Option) { - // The test harness wants its own `main` and top-level functions, so - // never wrap the test in `fn main() { ... }`. - let (test, line_offset) = make_test(test, Some(cratename), as_test_harness, opts); + let (test, line_offset) = match panic::catch_unwind(|| { + make_test(test, Some(cratename), as_test_harness, opts, edition) + }) { + Ok((test, line_offset)) => (test, line_offset), + Err(cause) if cause.is::() => { + // If the parser used by `make_test` panicked due to a fatal error, pass the test code + // through unchanged. The error will be reported during compilation. + (test.to_owned(), 0) + }, + Err(cause) => panic::resume_unwind(cause), + }; + // FIXME(#44940): if doctests ever support path remapping, then this filename // needs to be the result of `SourceMap::span_to_unmapped_path`. let path = match filename { @@ -337,11 +346,18 @@ fn run_test(test: &str, cratename: &str, filename: &FileName, line: usize, } } -/// Makes the test file. Also returns the number of lines before the code begins +/// Transforms a test into code that can be compiled into a Rust binary, and returns the number of +/// lines before the test code begins. +/// +/// # Panics +/// +/// This function uses the compiler's parser internally. The parser will panic if it encounters a +/// fatal error while parsing the test. pub fn make_test(s: &str, cratename: Option<&str>, dont_insert_main: bool, - opts: &TestOptions) + opts: &TestOptions, + edition: Edition) -> (String, usize) { let (crate_attrs, everything_else, crates) = partition_source(s); let everything_else = everything_else.trim(); @@ -375,13 +391,16 @@ pub fn make_test(s: &str, use errors::emitter::EmitterWriter; use errors::Handler; + syntax::ext::hygiene::set_default_edition(edition); + let filename = FileName::anon_source_code(s); let source = crates + &everything_else; // Any errors in parsing should also appear when the doctest is compiled for real, so just // send all the errors that libsyntax emits directly into a `Sink` instead of stderr. let cm = Lrc::new(SourceMap::new(FilePathMapping::empty())); - let emitter = EmitterWriter::new(box io::sink(), None, false, false); + let emitter = EmitterWriter::new(box io::sink(), None, false, false, false); + // FIXME(misdreavus): pass `-Z treat-err-as-bug` to the doctest parser let handler = Handler::with_emitter(false, None, box emitter); let sess = ParseSess::with_span_handler(handler, cm); @@ -796,11 +815,7 @@ impl<'a, 'hir> HirCollector<'a, 'hir> { // anything else, this will combine them for us. if let Some(doc) = attrs.collapsed_doc_value() { self.collector.set_position(attrs.span.unwrap_or(DUMMY_SP)); - let res = markdown::find_testable_code(&doc, self.collector, self.codes); - if let Err(err) = res { - self.sess.diagnostic().span_warn(attrs.span.unwrap_or(DUMMY_SP), - &err.to_string()); - } + markdown::find_testable_code(&doc, self.collector, self.codes); } nested(self); @@ -869,6 +884,7 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for HirCollector<'a, 'hir> { #[cfg(test)] mod tests { use super::{TestOptions, make_test}; + use syntax::edition::DEFAULT_EDITION; #[test] fn make_test_basic() { @@ -881,7 +897,7 @@ mod tests { fn main() { assert_eq!(2+2, 4); }".to_string(); - let output = make_test(input, None, false, &opts); + let output = make_test(input, None, false, &opts, DEFAULT_EDITION); assert_eq!(output, (expected, 2)); } @@ -897,7 +913,7 @@ assert_eq!(2+2, 4); fn main() { assert_eq!(2+2, 4); }".to_string(); - let output = make_test(input, Some("asdf"), false, &opts); + let output = make_test(input, Some("asdf"), false, &opts, DEFAULT_EDITION); assert_eq!(output, (expected, 2)); } @@ -916,7 +932,7 @@ fn main() { use asdf::qwop; assert_eq!(2+2, 4); }".to_string(); - let output = make_test(input, Some("asdf"), false, &opts); + let output = make_test(input, Some("asdf"), false, &opts, DEFAULT_EDITION); assert_eq!(output, (expected, 3)); } @@ -938,7 +954,7 @@ fn main() { use asdf::qwop; assert_eq!(2+2, 4); }".to_string(); - let output = make_test(input, Some("asdf"), false, &opts); + let output = make_test(input, Some("asdf"), false, &opts, DEFAULT_EDITION); assert_eq!(output, (expected, 2)); } @@ -957,7 +973,7 @@ fn main() { use std::*; assert_eq!(2+2, 4); }".to_string(); - let output = make_test(input, Some("std"), false, &opts); + let output = make_test(input, Some("std"), false, &opts, DEFAULT_EDITION); assert_eq!(output, (expected, 2)); } @@ -977,7 +993,7 @@ fn main() { use asdf::qwop; assert_eq!(2+2, 4); }".to_string(); - let output = make_test(input, Some("asdf"), false, &opts); + let output = make_test(input, Some("asdf"), false, &opts, DEFAULT_EDITION); assert_eq!(output, (expected, 2)); } @@ -995,7 +1011,7 @@ fn main() { use asdf::qwop; assert_eq!(2+2, 4); }".to_string(); - let output = make_test(input, Some("asdf"), false, &opts); + let output = make_test(input, Some("asdf"), false, &opts, DEFAULT_EDITION); assert_eq!(output, (expected, 2)); } @@ -1015,7 +1031,7 @@ fn main() { use asdf::qwop; assert_eq!(2+2, 4); }".to_string(); - let output = make_test(input, Some("asdf"), false, &opts); + let output = make_test(input, Some("asdf"), false, &opts, DEFAULT_EDITION); assert_eq!(output, (expected, 3)); // Adding more will also bump the returned line offset. @@ -1028,7 +1044,7 @@ fn main() { use asdf::qwop; assert_eq!(2+2, 4); }".to_string(); - let output = make_test(input, Some("asdf"), false, &opts); + let output = make_test(input, Some("asdf"), false, &opts, DEFAULT_EDITION); assert_eq!(output, (expected, 4)); } @@ -1046,7 +1062,7 @@ assert_eq!(2+2, 4);"; fn main() { assert_eq!(2+2, 4); }".to_string(); - let output = make_test(input, None, false, &opts); + let output = make_test(input, None, false, &opts, DEFAULT_EDITION); assert_eq!(output, (expected, 2)); } @@ -1063,7 +1079,7 @@ assert_eq!(2+2, 4); fn main() { assert_eq!(2+2, 4); }".to_string(); - let output = make_test(input, None, false, &opts); + let output = make_test(input, None, false, &opts, DEFAULT_EDITION); assert_eq!(output, (expected, 1)); } @@ -1080,7 +1096,7 @@ assert_eq!(2+2, 4);"; fn main() { assert_eq!(2+2, 4); }".to_string(); - let output = make_test(input, None, false, &opts); + let output = make_test(input, None, false, &opts, DEFAULT_EDITION); assert_eq!(output, (expected, 2)); } @@ -1095,7 +1111,7 @@ assert_eq!(2+2, 4);"; "#![allow(unused)] //Ceci n'est pas une `fn main` assert_eq!(2+2, 4);".to_string(); - let output = make_test(input, None, true, &opts); + let output = make_test(input, None, true, &opts, DEFAULT_EDITION); assert_eq!(output, (expected, 1)); } @@ -1110,7 +1126,7 @@ assert_eq!(2+2, 4);".to_string(); "fn main() { assert_eq!(2+2, 4); }".to_string(); - let output = make_test(input, None, false, &opts); + let output = make_test(input, None, false, &opts, DEFAULT_EDITION); assert_eq!(output, (expected, 1)); } @@ -1129,7 +1145,7 @@ fn main() { assert_eq!(2+2, 4); }".to_string(); - let output = make_test(input, None, false, &opts); + let output = make_test(input, None, false, &opts, DEFAULT_EDITION); assert_eq!(output, (expected, 2)); let input = @@ -1144,7 +1160,7 @@ fn main() { assert_eq!(asdf::foo, 4); }".to_string(); - let output = make_test(input, Some("asdf"), false, &opts); + let output = make_test(input, Some("asdf"), false, &opts, DEFAULT_EDITION); assert_eq!(output, (expected, 3)); } @@ -1163,7 +1179,7 @@ test_wrapper! { fn main() {} }".to_string(); - let output = make_test(input, Some("my_crate"), false, &opts); + let output = make_test(input, Some("my_crate"), false, &opts, DEFAULT_EDITION); assert_eq!(output, (expected, 1)); } } diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs index 4991c53ab4..eb9de43e38 100644 --- a/src/librustdoc/visit_ast.rs +++ b/src/librustdoc/visit_ast.rs @@ -2,7 +2,7 @@ //! usable for `clean`. use rustc::hir::{self, Node}; -use rustc::hir::def::Def; +use rustc::hir::def::{Res, DefKind}; use rustc::hir::def_id::{DefId, LOCAL_CRATE}; use rustc::middle::privacy::AccessLevel; use rustc::util::nodemap::{FxHashSet, FxHashMap}; @@ -10,6 +10,7 @@ use syntax::ast; use syntax::attr; use syntax::ext::base::MacroKind; use syntax::source_map::Spanned; +use syntax::symbol::sym; use syntax_pos::{self, Span}; use std::mem; @@ -31,7 +32,7 @@ pub struct RustdocVisitor<'a, 'tcx> { pub module: Module, pub attrs: hir::HirVec, pub cx: &'a core::DocContext<'tcx>, - view_item_stack: FxHashSet, + view_item_stack: FxHashSet, inlining: bool, /// Are the current module and all of its parents public? inside_public_path: bool, @@ -44,7 +45,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { ) -> RustdocVisitor<'a, 'tcx> { // If the root is re-exported, terminate all recursion. let mut stack = FxHashSet::default(); - stack.insert(ast::CRATE_NODE_ID); + stack.insert(hir::CRATE_HIR_ID); RustdocVisitor { module: Module::new(None), attrs: hir::HirVec::new(), @@ -165,11 +166,11 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { body: hir::BodyId) { debug!("Visiting fn"); let macro_kind = item.attrs.iter().filter_map(|a| { - if a.check_name("proc_macro") { + if a.check_name(sym::proc_macro) { Some(MacroKind::Bang) - } else if a.check_name("proc_macro_derive") { + } else if a.check_name(sym::proc_macro_derive) { Some(MacroKind::Derive) - } else if a.check_name("proc_macro_attribute") { + } else if a.check_name(sym::proc_macro_attribute) { Some(MacroKind::Attr) } else { None @@ -178,7 +179,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { match macro_kind { Some(kind) => { let name = if kind == MacroKind::Derive { - item.attrs.lists("proc_macro_derive") + item.attrs.lists(sym::proc_macro_derive) .filter_map(|mi| mi.ident()) .next() .expect("proc-macro derives require a name") @@ -188,8 +189,8 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { }; let mut helpers = Vec::new(); - for mi in item.attrs.lists("proc_macro_derive") { - if !mi.check_name("attributes") { + for mi in item.attrs.lists(sym::proc_macro_derive) { + if !mi.check_name(sym::attributes) { continue; } @@ -265,29 +266,30 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { /// Returns `true` if the target has been inlined. fn maybe_inline_local(&mut self, id: hir::HirId, - def: Def, + res: Res, renamed: Option, glob: bool, om: &mut Module, please_inline: bool) -> bool { - fn inherits_doc_hidden(cx: &core::DocContext<'_>, mut node: ast::NodeId) -> bool { + fn inherits_doc_hidden(cx: &core::DocContext<'_>, mut node: hir::HirId) -> bool { while let Some(id) = cx.tcx.hir().get_enclosing_scope(node) { node = id; - if cx.tcx.hir().attrs(node).lists("doc").has_word("hidden") { + if cx.tcx.hir().attrs_by_hir_id(node) + .lists(sym::doc).has_word(sym::hidden) { return true; } - if node == ast::CRATE_NODE_ID { + if node == hir::CRATE_HIR_ID { break; } } false } - debug!("maybe_inline_local def: {:?}", def); + debug!("maybe_inline_local res: {:?}", res); let tcx = self.cx.tcx; - let def_did = if let Some(did) = def.opt_def_id() { + let res_did = if let Some(did) = res.opt_def_id() { did } else { return false; @@ -295,29 +297,29 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { let use_attrs = tcx.hir().attrs_by_hir_id(id); // Don't inline `doc(hidden)` imports so they can be stripped at a later stage. - let is_no_inline = use_attrs.lists("doc").has_word("no_inline") || - use_attrs.lists("doc").has_word("hidden"); + let is_no_inline = use_attrs.lists(sym::doc).has_word(sym::no_inline) || + use_attrs.lists(sym::doc).has_word(sym::hidden); // For cross-crate impl inlining we need to know whether items are // reachable in documentation -- a previously nonreachable item can be // made reachable by cross-crate inlining which we're checking here. // (this is done here because we need to know this upfront). - if !def_did.is_local() && !is_no_inline { - let attrs = clean::inline::load_attrs(self.cx, def_did); - let self_is_hidden = attrs.lists("doc").has_word("hidden"); - match def { - Def::Trait(did) | - Def::Struct(did) | - Def::Union(did) | - Def::Enum(did) | - Def::ForeignTy(did) | - Def::TyAlias(did) if !self_is_hidden => { + if !res_did.is_local() && !is_no_inline { + let attrs = clean::inline::load_attrs(self.cx, res_did); + let self_is_hidden = attrs.lists(sym::doc).has_word(sym::hidden); + match res { + Res::Def(DefKind::Trait, did) | + Res::Def(DefKind::Struct, did) | + Res::Def(DefKind::Union, did) | + Res::Def(DefKind::Enum, did) | + Res::Def(DefKind::ForeignTy, did) | + Res::Def(DefKind::TyAlias, did) if !self_is_hidden => { self.cx.renderinfo .borrow_mut() .access_levels.map .insert(did, AccessLevel::Public); }, - Def::Mod(did) => if !self_is_hidden { + Res::Def(DefKind::Mod, did) => if !self_is_hidden { crate::visit_lib::LibEmbargoVisitor::new(self.cx).visit_mod(did); }, _ => {}, @@ -326,21 +328,21 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { return false } - let def_node_id = match tcx.hir().as_local_node_id(def_did) { + let res_hir_id = match tcx.hir().as_local_hir_id(res_did) { Some(n) => n, None => return false }; - let is_private = !self.cx.renderinfo.borrow().access_levels.is_public(def_did); - let is_hidden = inherits_doc_hidden(self.cx, def_node_id); + let is_private = !self.cx.renderinfo.borrow().access_levels.is_public(res_did); + let is_hidden = inherits_doc_hidden(self.cx, res_hir_id); // Only inline if requested or if the item would otherwise be stripped. if (!please_inline && !is_private && !is_hidden) || is_no_inline { return false } - if !self.view_item_stack.insert(def_node_id) { return false } + if !self.view_item_stack.insert(res_hir_id) { return false } - let ret = match tcx.hir().get(def_node_id) { + let ret = match tcx.hir().get_by_hir_id(res_hir_id) { Node::Item(&hir::Item { node: hir::ItemKind::Mod(ref m), .. }) if glob => { let prev = mem::replace(&mut self.inlining, true); for i in &m.item_ids { @@ -373,7 +375,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { } _ => false, }; - self.view_item_stack.remove(&def_node_id); + self.view_item_stack.remove(&res_hir_id); ret } @@ -420,9 +422,10 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { // Struct and variant constructors and proc macro stubs always show up alongside // their definitions, we've already processed them so just discard these. - match path.def { - Def::Ctor(..) | Def::SelfCtor(..) | Def::Macro(_, MacroKind::ProcMacroStub) => - return, + match path.res { + Res::Def(DefKind::Ctor(..), _) + | Res::SelfCtor(..) + | Res::Def(DefKind::Macro(MacroKind::ProcMacroStub), _) => return, _ => {} } @@ -431,15 +434,15 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { if item.vis.node.is_pub() && self.inside_public_path { let please_inline = item.attrs.iter().any(|item| { match item.meta_item_list() { - Some(ref list) if item.check_name("doc") => { - list.iter().any(|i| i.check_name("inline")) + Some(ref list) if item.check_name(sym::doc) => { + list.iter().any(|i| i.check_name(sym::inline)) } _ => false, } }); let ident = if is_glob { None } else { Some(ident) }; if self.maybe_inline_local(item.hir_id, - path.def, + path.res, ident, is_glob, om, diff --git a/src/librustdoc/visit_lib.rs b/src/librustdoc/visit_lib.rs index def6f8b557..2547e3a06e 100644 --- a/src/librustdoc/visit_lib.rs +++ b/src/librustdoc/visit_lib.rs @@ -1,8 +1,9 @@ use rustc::middle::privacy::{AccessLevels, AccessLevel}; -use rustc::hir::def::Def; +use rustc::hir::def::{Res, DefKind}; use rustc::hir::def_id::{CrateNum, CRATE_DEF_INDEX, DefId}; use rustc::ty::Visibility; use rustc::util::nodemap::FxHashSet; +use syntax::symbol::sym; use std::cell::RefMut; @@ -42,7 +43,7 @@ impl<'a, 'tcx> LibEmbargoVisitor<'a, 'tcx> { // Updates node level and returns the updated level fn update(&mut self, did: DefId, level: Option) -> Option { - let is_hidden = self.cx.tcx.get_attrs(did).lists("doc").has_word("hidden"); + let is_hidden = self.cx.tcx.get_attrs(did).lists(sym::doc).has_word(sym::hidden); let old_level = self.access_levels.map.get(&did).cloned(); // Accessibility levels can only grow @@ -60,17 +61,17 @@ impl<'a, 'tcx> LibEmbargoVisitor<'a, 'tcx> { } for item in self.cx.tcx.item_children(def_id).iter() { - if let Some(def_id) = item.def.opt_def_id() { + if let Some(def_id) = item.res.opt_def_id() { if self.cx.tcx.def_key(def_id).parent.map_or(false, |d| d == def_id.index) || item.vis == Visibility::Public { - self.visit_item(item.def); + self.visit_item(item.res); } } } } - fn visit_item(&mut self, def: Def) { - let def_id = def.def_id(); + fn visit_item(&mut self, res: Res) { + let def_id = res.def_id(); let vis = self.cx.tcx.visibility(def_id); let inherited_item_level = if vis == Visibility::Public { self.prev_level @@ -80,7 +81,7 @@ impl<'a, 'tcx> LibEmbargoVisitor<'a, 'tcx> { let item_level = self.update(def_id, inherited_item_level); - if let Def::Mod(..) = def { + if let Res::Def(DefKind::Mod, _) = res { let orig_level = self.prev_level; self.prev_level = item_level; diff --git a/src/libserialize/serialize.rs b/src/libserialize/serialize.rs index cf948078b0..36a1628014 100644 --- a/src/libserialize/serialize.rs +++ b/src/libserialize/serialize.rs @@ -764,12 +764,18 @@ macro_rules! tuple { tuple! { T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, } -impl Encodable for path::PathBuf { +impl Encodable for path::Path { fn encode(&self, e: &mut S) -> Result<(), S::Error> { self.to_str().unwrap().encode(e) } } +impl Encodable for path::PathBuf { + fn encode(&self, e: &mut S) -> Result<(), S::Error> { + path::Path::encode(self, e) + } +} + impl Decodable for path::PathBuf { fn decode(d: &mut D) -> Result { let bytes: String = Decodable::decode(d)?; @@ -911,4 +917,5 @@ impl Decodable for T { impl<'a, T: ?Sized + Encodable> UseSpecializedEncodable for &'a T {} impl UseSpecializedEncodable for Box {} impl UseSpecializedDecodable for Box {} - +impl<'a, T: Decodable> UseSpecializedDecodable for &'a T {} +impl<'a, T: Decodable> UseSpecializedDecodable for &'a [T] {} diff --git a/src/libserialize/tests/json.rs b/src/libserialize/tests/json.rs index 3fb6bda679..0fe3d4cfd6 100644 --- a/src/libserialize/tests/json.rs +++ b/src/libserialize/tests/json.rs @@ -1,3 +1,4 @@ +#[allow(unused_extern_crates)] extern crate serialize as rustc_serialize; use rustc_serialize::{Encodable, Decodable}; diff --git a/src/libserialize/tests/opaque.rs b/src/libserialize/tests/opaque.rs index fff6fc69e7..62a8f25124 100644 --- a/src/libserialize/tests/opaque.rs +++ b/src/libserialize/tests/opaque.rs @@ -1,3 +1,4 @@ +#[allow(unused_extern_crates)] extern crate serialize as rustc_serialize; use rustc_serialize::{Encodable, Decodable}; diff --git a/src/libstd/Cargo.toml b/src/libstd/Cargo.toml index 86ad334d88..18c6e6d1fb 100644 --- a/src/libstd/Cargo.toml +++ b/src/libstd/Cargo.toml @@ -3,7 +3,7 @@ authors = ["The Rust Project Developers"] name = "std" version = "0.0.0" build = "build.rs" -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" repository = "https://github.com/rust-lang/rust.git" description = "The Rust Standard Library" edition = "2018" @@ -19,9 +19,10 @@ panic_unwind = { path = "../libpanic_unwind", optional = true } panic_abort = { path = "../libpanic_abort" } core = { path = "../libcore" } libc = { version = "0.2.51", default-features = false, features = ['rustc-dep-of-std'] } -compiler_builtins = { version = "0.1.9" } +compiler_builtins = { version = "0.1.14" } profiler_builtins = { path = "../libprofiler_builtins", optional = true } unwind = { path = "../libunwind" } +hashbrown = { version = "0.4.0", features = ['rustc-dep-of-std'] } rustc-demangle = { version = "0.1.10", features = ['rustc-dep-of-std'] } backtrace-sys = { version = "0.1.24", features = ["rustc-dep-of-std"], optional = true } @@ -53,7 +54,7 @@ default = ["compiler_builtins_c", "std_detect_file_io", "std_detect_dlsym_getaux backtrace = ["backtrace-sys"] panic-unwind = ["panic_unwind"] profiler = ["profiler_builtins"] -compiler_builtins_c = ["compiler_builtins/c"] +compiler_builtins_c = ["alloc/compiler-builtins-c"] llvm-libunwind = ["unwind/llvm-libunwind"] # Make panics and failed asserts immediately abort without formatting any message diff --git a/src/libstd/alloc.rs b/src/libstd/alloc.rs index 4241f47b66..ff52974775 100644 --- a/src/libstd/alloc.rs +++ b/src/libstd/alloc.rs @@ -173,6 +173,9 @@ static HOOK: AtomicPtr<()> = AtomicPtr::new(ptr::null_mut()); /// about the allocation that failed. /// /// The allocation error hook is a global resource. +/// +/// [`set_alloc_error_hook`]: fn.set_alloc_error_hook.html +/// [`take_alloc_error_hook`]: fn.take_alloc_error_hook.html #[unstable(feature = "alloc_error_hook", issue = "51245")] pub fn set_alloc_error_hook(hook: fn(Layout)) { HOOK.store(hook as *mut (), Ordering::SeqCst); @@ -183,6 +186,8 @@ pub fn set_alloc_error_hook(hook: fn(Layout)) { /// *See also the function [`set_alloc_error_hook`].* /// /// If no custom hook is registered, the default hook will be returned. +/// +/// [`set_alloc_error_hook`]: fn.set_alloc_error_hook.html #[unstable(feature = "alloc_error_hook", issue = "51245")] pub fn take_alloc_error_hook() -> fn(Layout) { let hook = HOOK.swap(ptr::null_mut(), Ordering::SeqCst); diff --git a/src/libstd/build.rs b/src/libstd/build.rs index 726c273215..7a6c97ebaa 100644 --- a/src/libstd/build.rs +++ b/src/libstd/build.rs @@ -20,8 +20,7 @@ fn main() { } else if target.contains("netbsd") { println!("cargo:rustc-link-lib=pthread"); println!("cargo:rustc-link-lib=rt"); - } else if target.contains("dragonfly") || target.contains("bitrig") || - target.contains("openbsd") { + } else if target.contains("dragonfly") || target.contains("openbsd") { println!("cargo:rustc-link-lib=pthread"); } else if target.contains("solaris") { println!("cargo:rustc-link-lib=socket"); diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index ac3cfde47b..2925d8362c 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1,222 +1,20 @@ +// ignore-tidy-filelength + use self::Entry::*; -use self::VacantEntryState::*; -use crate::intrinsics::unlikely; -use crate::collections::CollectionAllocErr; -use crate::cell::Cell; +use hashbrown::hash_map as base; + use crate::borrow::Borrow; -use crate::cmp::max; +use crate::cell::Cell; +use crate::collections::CollectionAllocErr; use crate::fmt::{self, Debug}; #[allow(deprecated)] -use crate::hash::{Hash, Hasher, BuildHasher, SipHasher13}; +use crate::hash::{BuildHasher, Hash, Hasher, SipHasher13}; use crate::iter::{FromIterator, FusedIterator}; -use crate::mem::{self, replace}; -use crate::ops::{Deref, DerefMut, Index}; +use crate::ops::Index; use crate::sys; -use super::table::{self, Bucket, EmptyBucket, Fallibility, FullBucket, FullBucketMut, RawTable, - SafeHash}; -use super::table::BucketState::{Empty, Full}; -use super::table::Fallibility::{Fallible, Infallible}; - -const MIN_NONZERO_RAW_CAPACITY: usize = 32; // must be a power of two - -/// The default behavior of HashMap implements a maximum load factor of 90.9%. -#[derive(Clone)] -struct DefaultResizePolicy; - -impl DefaultResizePolicy { - #[inline] - fn new() -> DefaultResizePolicy { - DefaultResizePolicy - } - - /// A hash map's "capacity" is the number of elements it can hold without - /// being resized. Its "raw capacity" is the number of slots required to - /// provide that capacity, accounting for maximum loading. The raw capacity - /// is always zero or a power of two. - #[inline] - fn try_raw_capacity(&self, len: usize) -> Result { - if len == 0 { - Ok(0) - } else { - // 1. Account for loading: `raw_capacity >= len * 1.1`. - // 2. Ensure it is a power of two. - // 3. Ensure it is at least the minimum size. - let mut raw_cap = len.checked_mul(11) - .map(|l| l / 10) - .and_then(|l| l.checked_next_power_of_two()) - .ok_or(CollectionAllocErr::CapacityOverflow)?; - - raw_cap = max(MIN_NONZERO_RAW_CAPACITY, raw_cap); - Ok(raw_cap) - } - } - - #[inline] - fn raw_capacity(&self, len: usize) -> usize { - self.try_raw_capacity(len).expect("raw_capacity overflow") - } - - /// The capacity of the given raw capacity. - #[inline] - fn capacity(&self, raw_cap: usize) -> usize { - // This doesn't have to be checked for overflow since allocation size - // in bytes will overflow earlier than multiplication by 10. - // - // As per https://github.com/rust-lang/rust/pull/30991 this is updated - // to be: (raw_cap * den + den - 1) / num - (raw_cap * 10 + 10 - 1) / 11 - } -} - -// The main performance trick in this hashmap is called Robin Hood Hashing. -// It gains its excellent performance from one essential operation: -// -// If an insertion collides with an existing element, and that element's -// "probe distance" (how far away the element is from its ideal location) -// is higher than how far we've already probed, swap the elements. -// -// This massively lowers variance in probe distance, and allows us to get very -// high load factors with good performance. The 90% load factor I use is rather -// conservative. -// -// > Why a load factor of approximately 90%? -// -// In general, all the distances to initial buckets will converge on the mean. -// At a load factor of α, the odds of finding the target bucket after k -// probes is approximately 1-α^k. If we set this equal to 50% (since we converge -// on the mean) and set k=8 (64-byte cache line / 8-byte hash), α=0.92. I round -// this down to make the math easier on the CPU and avoid its FPU. -// Since on average we start the probing in the middle of a cache line, this -// strategy pulls in two cache lines of hashes on every lookup. I think that's -// pretty good, but if you want to trade off some space, it could go down to one -// cache line on average with an α of 0.84. -// -// > Wait, what? Where did you get 1-α^k from? -// -// On the first probe, your odds of a collision with an existing element is α. -// The odds of doing this twice in a row is approximately α^2. For three times, -// α^3, etc. Therefore, the odds of colliding k times is α^k. The odds of NOT -// colliding after k tries is 1-α^k. -// -// The paper from 1986 cited below mentions an implementation which keeps track -// of the distance-to-initial-bucket histogram. This approach is not suitable -// for modern architectures because it requires maintaining an internal data -// structure. This allows very good first guesses, but we are most concerned -// with guessing entire cache lines, not individual indexes. Furthermore, array -// accesses are no longer linear and in one direction, as we have now. There -// is also memory and cache pressure that this would entail that would be very -// difficult to properly see in a microbenchmark. -// -// ## Future Improvements (FIXME!) -// -// Allow the load factor to be changed dynamically and/or at initialization. -// -// Also, would it be possible for us to reuse storage when growing the -// underlying table? This is exactly the use case for 'realloc', and may -// be worth exploring. -// -// ## Future Optimizations (FIXME!) -// -// Another possible design choice that I made without any real reason is -// parameterizing the raw table over keys and values. Technically, all we need -// is the size and alignment of keys and values, and the code should be just as -// efficient (well, we might need one for power-of-two size and one for not...). -// This has the potential to reduce code bloat in rust executables, without -// really losing anything except 4 words (key size, key alignment, val size, -// val alignment) which can be passed in to every call of a `RawTable` function. -// This would definitely be an avenue worth exploring if people start complaining -// about the size of rust executables. -// -// Annotate exceedingly likely branches in `table::make_hash` -// and `search_hashed` to reduce instruction cache pressure -// and mispredictions once it becomes possible (blocked on issue #11092). -// -// Shrinking the table could simply reallocate in place after moving buckets -// to the first half. -// -// The growth algorithm (fragment of the Proof of Correctness) -// -------------------- -// -// The growth algorithm is basically a fast path of the naive reinsertion- -// during-resize algorithm. Other paths should never be taken. -// -// Consider growing a robin hood hashtable of capacity n. Normally, we do this -// by allocating a new table of capacity `2n`, and then individually reinsert -// each element in the old table into the new one. This guarantees that the -// new table is a valid robin hood hashtable with all the desired statistical -// properties. Remark that the order we reinsert the elements in should not -// matter. For simplicity and efficiency, we will consider only linear -// reinsertions, which consist of reinserting all elements in the old table -// into the new one by increasing order of index. However we will not be -// starting our reinsertions from index 0 in general. If we start from index -// i, for the purpose of reinsertion we will consider all elements with real -// index j < i to have virtual index n + j. -// -// Our hash generation scheme consists of generating a 64-bit hash and -// truncating the most significant bits. When moving to the new table, we -// simply introduce a new bit to the front of the hash. Therefore, if an -// element has ideal index i in the old table, it can have one of two ideal -// locations in the new table. If the new bit is 0, then the new ideal index -// is i. If the new bit is 1, then the new ideal index is n + i. Intuitively, -// we are producing two independent tables of size n, and for each element we -// independently choose which table to insert it into with equal probability. -// However, rather than wrapping around themselves on overflowing their -// indexes, the first table overflows into the second, and the second into the -// first. Visually, our new table will look something like: -// -// [yy_xxx_xxxx_xxx|xx_yyy_yyyy_yyy] -// -// Where x's are elements inserted into the first table, y's are elements -// inserted into the second, and _'s are empty sections. We now define a few -// key concepts that we will use later. Note that this is a very abstract -// perspective of the table. A real resized table would be at least half -// empty. -// -// Theorem: A linear robin hood reinsertion from the first ideal element -// produces identical results to a linear naive reinsertion from the same -// element. -// -// FIXME(Gankro, pczarn): review the proof and put it all in a separate README.md -// -// Adaptive early resizing -// ---------------------- -// To protect against degenerate performance scenarios (including DOS attacks), -// the implementation includes an adaptive behavior that can resize the map -// early (before its capacity is exceeded) when suspiciously long probe sequences -// are encountered. -// -// With this algorithm in place it would be possible to turn a CPU attack into -// a memory attack due to the aggressive resizing. To prevent that the -// adaptive behavior only triggers when the map is at least half full. -// This reduces the effectiveness of the algorithm but also makes it completely safe. -// -// The previous safety measure also prevents degenerate interactions with -// really bad quality hash algorithms that can make normal inputs look like a -// DOS attack. -// -const DISPLACEMENT_THRESHOLD: usize = 128; -// -// The threshold of 128 is chosen to minimize the chance of exceeding it. -// In particular, we want that chance to be less than 10^-8 with a load of 90%. -// For displacement, the smallest constant that fits our needs is 90, -// so we round that up to 128. -// -// At a load factor of α, the odds of finding the target bucket after exactly n -// unsuccessful probes[1] are -// -// Pr_α{displacement = n} = -// (1 - α) / α * ∑_{k≥1} e^(-kα) * (kα)^(k+n) / (k + n)! * (1 - kα / (k + n + 1)) -// -// We use this formula to find the probability of triggering the adaptive behavior -// -// Pr_0.909{displacement > 128} = 1.601 * 10^-11 -// -// 1. Alfredo Viola (2005). Distributional analysis of Robin Hood linear probing -// hashing with buckets. - -/// A hash map implemented with linear probing and Robin Hood bucket stealing. +/// A hash map implemented with quadratic probing and SIMD lookup. /// /// By default, `HashMap` uses a hashing algorithm selected to provide /// resistance against HashDoS attacks. The algorithm is randomly seeded, and a @@ -254,13 +52,13 @@ const DISPLACEMENT_THRESHOLD: usize = 128; /// the [`Eq`] trait, changes while it is in the map. This is normally only /// possible through [`Cell`], [`RefCell`], global state, I/O, or unsafe code. /// -/// Relevant papers/articles: +/// The hash table implementation is a Rust port of Google's [SwissTable]. +/// The original C++ version of SwissTable can be found [here], and this +/// [CppCon talk] gives an overview of how the algorithm works. /// -/// 1. Pedro Celis. ["Robin Hood Hashing"](https://cs.uwaterloo.ca/research/tr/1986/CS-86-14.pdf) -/// 2. Emmanuel Goossaert. ["Robin Hood -/// hashing"](http://codecapsule.com/2013/11/11/robin-hood-hashing/) -/// 3. Emmanuel Goossaert. ["Robin Hood hashing: backward shift -/// deletion"](http://codecapsule.com/2013/11/17/robin-hood-hashing-backward-shift-deletion/) +/// [SwissTable]: https://abseil.io/blog/20180927-swisstables +/// [here]: https://github.com/abseil/abseil-cpp/blob/master/absl/container/internal/raw_hash_set.h +/// [CppCon talk]: https://www.youtube.com/watch?v=ncHmEUmJZf4 /// /// # Examples /// @@ -407,277 +205,7 @@ const DISPLACEMENT_THRESHOLD: usize = 128; #[derive(Clone)] #[stable(feature = "rust1", since = "1.0.0")] pub struct HashMap { - // All hashes are keyed on these values, to prevent hash collision attacks. - hash_builder: S, - - table: RawTable, - - resize_policy: DefaultResizePolicy, -} - -/// Search for a pre-hashed key. -/// If you don't already know the hash, use search or search_mut instead -#[inline] -fn search_hashed(table: M, hash: SafeHash, is_match: F) -> InternalEntry - where M: Deref>, - F: FnMut(&K) -> bool -{ - // This is the only function where capacity can be zero. To avoid - // undefined behavior when Bucket::new gets the raw bucket in this - // case, immediately return the appropriate search result. - if table.capacity() == 0 { - return InternalEntry::TableIsEmpty; - } - - search_hashed_nonempty(table, hash, is_match, true) -} - -/// Search for a pre-hashed key when the hash map is known to be non-empty. -#[inline] -fn search_hashed_nonempty(table: M, hash: SafeHash, mut is_match: F, - compare_hashes: bool) - -> InternalEntry - where M: Deref>, - F: FnMut(&K) -> bool -{ - // Do not check the capacity as an extra branch could slow the lookup. - - let size = table.size(); - let mut probe = Bucket::new(table, hash); - let mut displacement = 0; - - loop { - let full = match probe.peek() { - Empty(bucket) => { - // Found a hole! - return InternalEntry::Vacant { - hash, - elem: NoElem(bucket, displacement), - }; - } - Full(bucket) => bucket, - }; - - let probe_displacement = full.displacement(); - - if probe_displacement < displacement { - // Found a luckier bucket than me. - // We can finish the search early if we hit any bucket - // with a lower distance to initial bucket than we've probed. - return InternalEntry::Vacant { - hash, - elem: NeqElem(full, probe_displacement), - }; - } - - // If the hash doesn't match, it can't be this one.. - if !compare_hashes || hash == full.hash() { - // If the key doesn't match, it can't be this one.. - if is_match(full.read().0) { - return InternalEntry::Occupied { elem: full }; - } - } - displacement += 1; - probe = full.next(); - debug_assert!(displacement <= size); - } -} - -/// Same as `search_hashed_nonempty` but for mutable access. -#[inline] -fn search_hashed_nonempty_mut(table: M, hash: SafeHash, mut is_match: F, - compare_hashes: bool) - -> InternalEntry - where M: DerefMut>, - F: FnMut(&K) -> bool -{ - // Do not check the capacity as an extra branch could slow the lookup. - - let size = table.size(); - let mut probe = Bucket::new(table, hash); - let mut displacement = 0; - - loop { - let mut full = match probe.peek() { - Empty(bucket) => { - // Found a hole! - return InternalEntry::Vacant { - hash, - elem: NoElem(bucket, displacement), - }; - } - Full(bucket) => bucket, - }; - - let probe_displacement = full.displacement(); - - if probe_displacement < displacement { - // Found a luckier bucket than me. - // We can finish the search early if we hit any bucket - // with a lower distance to initial bucket than we've probed. - return InternalEntry::Vacant { - hash, - elem: NeqElem(full, probe_displacement), - }; - } - - // If the hash doesn't match, it can't be this one.. - if hash == full.hash() || !compare_hashes { - // If the key doesn't match, it can't be this one.. - if is_match(full.read_mut().0) { - return InternalEntry::Occupied { elem: full }; - } - } - displacement += 1; - probe = full.next(); - debug_assert!(displacement <= size); - } -} - -fn pop_internal(starting_bucket: FullBucketMut<'_, K, V>) - -> (K, V, &mut RawTable) -{ - let (empty, retkey, retval) = starting_bucket.take(); - let mut gap = match empty.gap_peek() { - Ok(b) => b, - Err(b) => return (retkey, retval, b.into_table()), - }; - - while gap.full().displacement() != 0 { - gap = match gap.shift() { - Ok(b) => b, - Err(b) => { - return (retkey, retval, b.into_table()); - }, - }; - } - - // Now we've done all our shifting. Return the value we grabbed earlier. - (retkey, retval, gap.into_table()) -} - -/// Performs robin hood bucket stealing at the given `bucket`. You must -/// also pass that bucket's displacement so we don't have to recalculate it. -/// -/// `hash`, `key`, and `val` are the elements to "robin hood" into the hashtable. -fn robin_hood<'a, K: 'a, V: 'a>(bucket: FullBucketMut<'a, K, V>, - mut displacement: usize, - mut hash: SafeHash, - mut key: K, - mut val: V) - -> FullBucketMut<'a, K, V> { - let size = bucket.table().size(); - let raw_capacity = bucket.table().capacity(); - // There can be at most `size - dib` buckets to displace, because - // in the worst case, there are `size` elements and we already are - // `displacement` buckets away from the initial one. - let idx_end = (bucket.index() + size - bucket.displacement()) % raw_capacity; - // Save the *starting point*. - let mut bucket = bucket.stash(); - - loop { - let (old_hash, old_key, old_val) = bucket.replace(hash, key, val); - hash = old_hash; - key = old_key; - val = old_val; - - loop { - displacement += 1; - let probe = bucket.next(); - debug_assert!(probe.index() != idx_end); - - let full_bucket = match probe.peek() { - Empty(bucket) => { - // Found a hole! - let bucket = bucket.put(hash, key, val); - // Now that it's stolen, just read the value's pointer - // right out of the table! Go back to the *starting point*. - // - // This use of `into_table` is misleading. It turns the - // bucket, which is a FullBucket on top of a - // FullBucketMut, into just one FullBucketMut. The "table" - // refers to the inner FullBucketMut in this context. - return bucket.into_table(); - } - Full(bucket) => bucket, - }; - - let probe_displacement = full_bucket.displacement(); - - bucket = full_bucket; - - // Robin hood! Steal the spot. - if probe_displacement < displacement { - displacement = probe_displacement; - break; - } - } - } -} - -impl HashMap - where K: Eq + Hash, - S: BuildHasher -{ - fn make_hash(&self, x: &X) -> SafeHash - where X: Hash - { - table::make_hash(&self.hash_builder, x) - } - - /// Search for a key, yielding the index if it's found in the hashtable. - /// If you already have the hash for the key lying around, or if you need an - /// InternalEntry, use search_hashed or search_hashed_nonempty. - #[inline] - fn search<'a, Q: ?Sized>(&'a self, q: &Q) - -> Option>> - where K: Borrow, - Q: Eq + Hash - { - if self.is_empty() { - return None; - } - - let hash = self.make_hash(q); - search_hashed_nonempty(&self.table, hash, |k| q.eq(k.borrow()), true) - .into_occupied_bucket() - } - - #[inline] - fn search_mut<'a, Q: ?Sized>(&'a mut self, q: &Q) - -> Option>> - where K: Borrow, - Q: Eq + Hash - { - if self.is_empty() { - return None; - } - - let hash = self.make_hash(q); - search_hashed_nonempty(&mut self.table, hash, |k| q.eq(k.borrow()), true) - .into_occupied_bucket() - } - - // The caller should ensure that invariants by Robin Hood Hashing hold - // and that there's space in the underlying table. - fn insert_hashed_ordered(&mut self, hash: SafeHash, k: K, v: V) { - let mut buckets = Bucket::new(&mut self.table, hash); - let start_index = buckets.index(); - - loop { - // We don't need to compare hashes for value swap. - // Not even DIBs for Robin Hood. - buckets = match buckets.peek() { - Empty(empty) => { - empty.put(hash, k, v); - return; - } - Full(b) => b.into_bucket(), - }; - buckets.next(); - debug_assert!(buckets.index() != start_index); - } - } + base: base::HashMap, } impl HashMap { @@ -732,13 +260,7 @@ impl HashMap { #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn capacity(&self) -> usize { - self.resize_policy.capacity(self.raw_capacity()) - } - - /// Returns the hash map's raw capacity. - #[inline] - fn raw_capacity(&self) -> usize { - self.table.capacity() + self.base.capacity() } /// An iterator visiting all keys in arbitrary order. @@ -831,7 +353,7 @@ impl HashMap { /// ``` #[stable(feature = "rust1", since = "1.0.0")] pub fn iter(&self) -> Iter<'_, K, V> { - Iter { inner: self.table.iter() } + Iter { base: self.base.iter() } } /// An iterator visiting all key-value pairs in arbitrary order, @@ -859,7 +381,7 @@ impl HashMap { /// ``` #[stable(feature = "rust1", since = "1.0.0")] pub fn iter_mut(&mut self) -> IterMut<'_, K, V> { - IterMut { inner: self.table.iter_mut() } + IterMut { base: self.base.iter_mut() } } /// Returns the number of elements in the map. @@ -876,7 +398,7 @@ impl HashMap { /// ``` #[stable(feature = "rust1", since = "1.0.0")] pub fn len(&self) -> usize { - self.table.size() + self.base.len() } /// Returns `true` if the map contains no elements. @@ -894,7 +416,7 @@ impl HashMap { #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn is_empty(&self) -> bool { - self.len() == 0 + self.base.is_empty() } /// Clears the map, returning all key-value pairs as an iterator. Keeps the @@ -919,7 +441,7 @@ impl HashMap { #[inline] #[stable(feature = "drain", since = "1.6.0")] pub fn drain(&mut self) -> Drain<'_, K, V> { - Drain { inner: self.table.drain() } + Drain { base: self.base.drain() } } /// Clears the map, removing all key-value pairs. Keeps the allocated memory @@ -938,13 +460,14 @@ impl HashMap { #[stable(feature = "rust1", since = "1.0.0")] #[inline] pub fn clear(&mut self) { - self.drain(); + self.base.clear(); } } impl HashMap - where K: Eq + Hash, - S: BuildHasher +where + K: Eq + Hash, + S: BuildHasher, { /// Creates an empty `HashMap` which will use the given hash builder to hash /// keys. @@ -970,9 +493,7 @@ impl HashMap #[stable(feature = "hashmap_build_hasher", since = "1.7.0")] pub fn with_hasher(hash_builder: S) -> HashMap { HashMap { - hash_builder, - resize_policy: DefaultResizePolicy::new(), - table: RawTable::new(0), + base: base::HashMap::with_hasher(hash_builder), } } @@ -1000,12 +521,8 @@ impl HashMap #[inline] #[stable(feature = "hashmap_build_hasher", since = "1.7.0")] pub fn with_capacity_and_hasher(capacity: usize, hash_builder: S) -> HashMap { - let resize_policy = DefaultResizePolicy::new(); - let raw_cap = resize_policy.raw_capacity(capacity); HashMap { - hash_builder, - resize_policy, - table: RawTable::new(raw_cap), + base: base::HashMap::with_capacity_and_hasher(capacity, hash_builder), } } @@ -1023,9 +540,10 @@ impl HashMap /// let map: HashMap = HashMap::with_hasher(hasher); /// let hasher: &RandomState = map.hasher(); /// ``` + #[inline] #[stable(feature = "hashmap_public_hasher", since = "1.9.0")] pub fn hasher(&self) -> &S { - &self.hash_builder + self.base.hasher() } /// Reserves capacity for at least `additional` more elements to be inserted @@ -1048,11 +566,7 @@ impl HashMap #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn reserve(&mut self, additional: usize) { - match self.reserve_internal(additional, Infallible) { - Err(CollectionAllocErr::CapacityOverflow) => panic!("capacity overflow"), - Err(CollectionAllocErr::AllocErr) => unreachable!(), - Ok(()) => { /* yay */ } - } + self.base.reserve(additional) } /// Tries to reserve capacity for at least `additional` more elements to be inserted @@ -1072,92 +586,12 @@ impl HashMap /// let mut map: HashMap<&str, isize> = HashMap::new(); /// map.try_reserve(10).expect("why is the test harness OOMing on 10 bytes?"); /// ``` - #[unstable(feature = "try_reserve", reason = "new API", issue="48043")] - pub fn try_reserve(&mut self, additional: usize) -> Result<(), CollectionAllocErr> { - self.reserve_internal(additional, Fallible) - } - #[inline] - fn reserve_internal(&mut self, additional: usize, fallibility: Fallibility) - -> Result<(), CollectionAllocErr> { - - let remaining = self.capacity() - self.len(); // this can't overflow - if remaining < additional { - let min_cap = self.len() - .checked_add(additional) - .ok_or(CollectionAllocErr::CapacityOverflow)?; - let raw_cap = self.resize_policy.try_raw_capacity(min_cap)?; - self.try_resize(raw_cap, fallibility)?; - } else if self.table.tag() && remaining <= self.len() { - // Probe sequence is too long and table is half full, - // resize early to reduce probing length. - let new_capacity = self.table.capacity() * 2; - self.try_resize(new_capacity, fallibility)?; - } - Ok(()) - } - - /// Resizes the internal vectors to a new capacity. It's your - /// responsibility to: - /// 1) Ensure `new_raw_cap` is enough for all the elements, accounting - /// for the load factor. - /// 2) Ensure `new_raw_cap` is a power of two or zero. - #[inline(never)] - #[cold] - fn try_resize( - &mut self, - new_raw_cap: usize, - fallibility: Fallibility, - ) -> Result<(), CollectionAllocErr> { - assert!(self.table.size() <= new_raw_cap); - assert!(new_raw_cap.is_power_of_two() || new_raw_cap == 0); - - let mut old_table = replace( - &mut self.table, - match fallibility { - Infallible => RawTable::new(new_raw_cap), - Fallible => RawTable::try_new(new_raw_cap)?, - } - ); - let old_size = old_table.size(); - - if old_table.size() == 0 { - return Ok(()); - } - - let mut bucket = Bucket::head_bucket(&mut old_table); - - // This is how the buckets might be laid out in memory: - // ($ marks an initialized bucket) - // ________________ - // |$$$_$$$$$$_$$$$$| - // - // But we've skipped the entire initial cluster of buckets - // and will continue iteration in this order: - // ________________ - // |$$$$$$_$$$$$ - // ^ wrap around once end is reached - // ________________ - // $$$_____________| - // ^ exit once table.size == 0 - loop { - bucket = match bucket.peek() { - Full(bucket) => { - let h = bucket.hash(); - let (b, k, v) = bucket.take(); - self.insert_hashed_ordered(h, k, v); - if b.table().size() == 0 { - break; - } - b.into_bucket() - } - Empty(b) => b.into_bucket(), - }; - bucket.next(); - } - - assert_eq!(self.table.size(), old_size); - Ok(()) + #[unstable(feature = "try_reserve", reason = "new API", issue = "48043")] + pub fn try_reserve(&mut self, additional: usize) -> Result<(), CollectionAllocErr> { + self.base + .try_reserve(additional) + .map_err(map_collection_alloc_err) } /// Shrinks the capacity of the map as much as possible. It will drop @@ -1176,20 +610,10 @@ impl HashMap /// map.shrink_to_fit(); /// assert!(map.capacity() >= 2); /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn shrink_to_fit(&mut self) { - let new_raw_cap = self.resize_policy.raw_capacity(self.len()); - if self.raw_capacity() != new_raw_cap { - let old_table = replace(&mut self.table, RawTable::new(new_raw_cap)); - let old_size = old_table.size(); - - // Shrink the table. Naive algorithm for resizing: - for (h, k, v) in old_table.into_iter() { - self.insert_hashed_nocheck(h, k, v); - } - - debug_assert_eq!(self.table.size(), old_size); - } + self.base.shrink_to_fit(); } /// Shrinks the capacity of the map with a lower limit. It will drop @@ -1214,40 +638,14 @@ impl HashMap /// map.shrink_to(0); /// assert!(map.capacity() >= 2); /// ``` - #[unstable(feature = "shrink_to", reason = "new API", issue="56431")] + #[inline] + #[unstable(feature = "shrink_to", reason = "new API", issue = "56431")] pub fn shrink_to(&mut self, min_capacity: usize) { - assert!(self.capacity() >= min_capacity, "Tried to shrink to a larger capacity"); - - let new_raw_cap = self.resize_policy.raw_capacity(max(self.len(), min_capacity)); - if self.raw_capacity() != new_raw_cap { - let old_table = replace(&mut self.table, RawTable::new(new_raw_cap)); - let old_size = old_table.size(); - - // Shrink the table. Naive algorithm for resizing: - for (h, k, v) in old_table.into_iter() { - self.insert_hashed_nocheck(h, k, v); - } - - debug_assert_eq!(self.table.size(), old_size); - } - } - - /// Insert a pre-hashed key-value pair, without first checking - /// that there's enough room in the buckets. Returns a reference to the - /// newly insert value. - /// - /// If the key already exists, the hashtable will be returned untouched - /// and a reference to the existing element will be returned. - fn insert_hashed_nocheck(&mut self, hash: SafeHash, k: K, v: V) -> Option { - let entry = search_hashed(&mut self.table, hash, |key| *key == k).into_entry(k); - match entry { - Some(Occupied(mut elem)) => Some(elem.insert(v)), - Some(Vacant(elem)) => { - elem.insert(v); - None - } - None => unreachable!(), - } + assert!( + self.capacity() >= min_capacity, + "Tried to shrink to a larger capacity" + ); + self.base.shrink_to(min_capacity); } /// Gets the given key's corresponding entry in the map for in-place manipulation. @@ -1269,13 +667,10 @@ impl HashMap /// assert_eq!(letters[&'u'], 1); /// assert_eq!(letters.get(&'y'), None); /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn entry(&mut self, key: K) -> Entry<'_, K, V> { - // Gotta resize now. - self.reserve(1); - let hash = self.make_hash(&key); - search_hashed(&mut self.table, hash, |q| q.eq(&key)) - .into_entry(key).expect("unreachable") + map_entry(self.base.rustc_entry(key)) } /// Returns a reference to the value corresponding to the key. @@ -1300,10 +695,11 @@ impl HashMap #[stable(feature = "rust1", since = "1.0.0")] #[inline] pub fn get(&self, k: &Q) -> Option<&V> - where K: Borrow, - Q: Hash + Eq + where + K: Borrow, + Q: Hash + Eq, { - self.search(k).map(|bucket| bucket.into_refs().1) + self.base.get(k) } /// Returns the key-value pair corresponding to the supplied key. @@ -1327,11 +723,13 @@ impl HashMap /// assert_eq!(map.get_key_value(&2), None); /// ``` #[unstable(feature = "map_get_key_value", issue = "49347")] + #[inline] pub fn get_key_value(&self, k: &Q) -> Option<(&K, &V)> - where K: Borrow, - Q: Hash + Eq + where + K: Borrow, + Q: Hash + Eq, { - self.search(k).map(|bucket| bucket.into_refs()) + self.base.get_key_value(k) } /// Returns `true` if the map contains a value for the specified key. @@ -1354,11 +752,13 @@ impl HashMap /// assert_eq!(map.contains_key(&2), false); /// ``` #[stable(feature = "rust1", since = "1.0.0")] + #[inline] pub fn contains_key(&self, k: &Q) -> bool - where K: Borrow, - Q: Hash + Eq + where + K: Borrow, + Q: Hash + Eq, { - self.search(k).is_some() + self.base.contains_key(k) } /// Returns a mutable reference to the value corresponding to the key. @@ -1383,11 +783,13 @@ impl HashMap /// assert_eq!(map[&1], "b"); /// ``` #[stable(feature = "rust1", since = "1.0.0")] + #[inline] pub fn get_mut(&mut self, k: &Q) -> Option<&mut V> - where K: Borrow, - Q: Hash + Eq + where + K: Borrow, + Q: Hash + Eq, { - self.search_mut(k).map(|bucket| bucket.into_mut_refs().1) + self.base.get_mut(k) } /// Inserts a key-value pair into the map. @@ -1416,10 +818,9 @@ impl HashMap /// assert_eq!(map[&37], "c"); /// ``` #[stable(feature = "rust1", since = "1.0.0")] + #[inline] pub fn insert(&mut self, k: K, v: V) -> Option { - let hash = self.make_hash(&k); - self.reserve(1); - self.insert_hashed_nocheck(hash, k, v) + self.base.insert(k, v) } /// Removes a key from the map, returning the value at the key if the key @@ -1443,11 +844,13 @@ impl HashMap /// assert_eq!(map.remove(&1), None); /// ``` #[stable(feature = "rust1", since = "1.0.0")] + #[inline] pub fn remove(&mut self, k: &Q) -> Option - where K: Borrow, - Q: Hash + Eq + where + K: Borrow, + Q: Hash + Eq, { - self.search_mut(k).map(|bucket| pop_internal(bucket).1) + self.base.remove(k) } /// Removes a key from the map, returning the stored key and value if the @@ -1473,15 +876,13 @@ impl HashMap /// # } /// ``` #[stable(feature = "hash_map_remove_entry", since = "1.27.0")] + #[inline] pub fn remove_entry(&mut self, k: &Q) -> Option<(K, V)> - where K: Borrow, - Q: Hash + Eq + where + K: Borrow, + Q: Hash + Eq, { - self.search_mut(k) - .map(|bucket| { - let (k, v, _) = pop_internal(bucket); - (k, v) - }) + self.base.remove_entry(k) } /// Retains only the elements specified by the predicate. @@ -1498,45 +899,18 @@ impl HashMap /// assert_eq!(map.len(), 4); /// ``` #[stable(feature = "retain_hash_collection", since = "1.18.0")] - pub fn retain(&mut self, mut f: F) - where F: FnMut(&K, &mut V) -> bool + #[inline] + pub fn retain(&mut self, f: F) + where + F: FnMut(&K, &mut V) -> bool, { - if self.table.size() == 0 { - return; - } - let mut elems_left = self.table.size(); - let mut bucket = Bucket::head_bucket(&mut self.table); - bucket.prev(); - let start_index = bucket.index(); - while elems_left != 0 { - bucket = match bucket.peek() { - Full(mut full) => { - elems_left -= 1; - let should_remove = { - let (k, v) = full.read_mut(); - !f(k, v) - }; - if should_remove { - let prev_raw = full.raw(); - let (_, _, t) = pop_internal(full); - Bucket::new_from(prev_raw, t) - } else { - full.into_bucket() - } - }, - Empty(b) => { - b.into_bucket() - } - }; - bucket.prev(); // reverse iteration - debug_assert!(elems_left == 0 || bucket.index() != start_index); - } + self.base.retain(f) } } impl HashMap - where K: Eq + Hash, - S: BuildHasher +where + S: BuildHasher, { /// Creates a raw entry builder for the HashMap. /// @@ -1569,10 +943,9 @@ impl HashMap /// so that the map now contains keys which compare equal, search may start /// acting erratically, with two keys randomly masking each other. Implementations /// are free to assume this doesn't happen (within the limits of memory-safety). - #[inline(always)] + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn raw_entry_mut(&mut self) -> RawEntryBuilderMut<'_, K, V, S> { - self.reserve(1); RawEntryBuilderMut { map: self } } @@ -1591,6 +964,7 @@ impl HashMap /// `get` should be preferred. /// /// Immutable raw entries have very limited use; you might instead want `raw_entry_mut`. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn raw_entry(&self) -> RawEntryBuilder<'_, K, V, S> { RawEntryBuilder { map: self } @@ -1599,32 +973,36 @@ impl HashMap #[stable(feature = "rust1", since = "1.0.0")] impl PartialEq for HashMap - where K: Eq + Hash, - V: PartialEq, - S: BuildHasher +where + K: Eq + Hash, + V: PartialEq, + S: BuildHasher, { fn eq(&self, other: &HashMap) -> bool { if self.len() != other.len() { return false; } - self.iter().all(|(key, value)| other.get(key).map_or(false, |v| *value == *v)) + self.iter() + .all(|(key, value)| other.get(key).map_or(false, |v| *value == *v)) } } #[stable(feature = "rust1", since = "1.0.0")] impl Eq for HashMap - where K: Eq + Hash, - V: Eq, - S: BuildHasher +where + K: Eq + Hash, + V: Eq, + S: BuildHasher, { } #[stable(feature = "rust1", since = "1.0.0")] impl Debug for HashMap - where K: Eq + Hash + Debug, - V: Debug, - S: BuildHasher +where + K: Eq + Hash + Debug, + V: Debug, + S: BuildHasher, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_map().entries(self.iter()).finish() @@ -1633,10 +1011,12 @@ impl Debug for HashMap #[stable(feature = "rust1", since = "1.0.0")] impl Default for HashMap - where K: Eq + Hash, - S: BuildHasher + Default +where + K: Eq + Hash, + S: BuildHasher + Default, { /// Creates an empty `HashMap`, with the `Default` value for the hasher. + #[inline] fn default() -> HashMap { HashMap::with_hasher(Default::default()) } @@ -1644,9 +1024,10 @@ impl Default for HashMap #[stable(feature = "rust1", since = "1.0.0")] impl Index<&Q> for HashMap - where K: Eq + Hash + Borrow, - Q: Eq + Hash, - S: BuildHasher +where + K: Eq + Hash + Borrow, + Q: Eq + Hash, + S: BuildHasher, { type Output = V; @@ -1670,23 +1051,24 @@ impl Index<&Q> for HashMap /// [`HashMap`]: struct.HashMap.html #[stable(feature = "rust1", since = "1.0.0")] pub struct Iter<'a, K: 'a, V: 'a> { - inner: table::Iter<'a, K, V>, + base: base::Iter<'a, K, V>, } // FIXME(#26925) Remove in favor of `#[derive(Clone)]` #[stable(feature = "rust1", since = "1.0.0")] impl Clone for Iter<'_, K, V> { + #[inline] fn clone(&self) -> Self { - Iter { inner: self.inner.clone() } + Iter { + base: self.base.clone(), + } } } #[stable(feature = "std_debug", since = "1.16.0")] impl fmt::Debug for Iter<'_, K, V> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_list() - .entries(self.clone()) - .finish() + f.debug_list().entries(self.clone()).finish() } } @@ -1699,7 +1081,17 @@ impl fmt::Debug for Iter<'_, K, V> { /// [`HashMap`]: struct.HashMap.html #[stable(feature = "rust1", since = "1.0.0")] pub struct IterMut<'a, K: 'a, V: 'a> { - inner: table::IterMut<'a, K, V>, + base: base::IterMut<'a, K, V>, +} + +impl<'a, K, V> IterMut<'a, K, V> { + /// Returns a iterator of references over the remaining items. + #[inline] + pub(super) fn iter(&self) -> Iter<'_, K, V> { + Iter { + base: self.base.rustc_iter(), + } + } } /// An owning iterator over the entries of a `HashMap`. @@ -1711,7 +1103,17 @@ pub struct IterMut<'a, K: 'a, V: 'a> { /// [`HashMap`]: struct.HashMap.html #[stable(feature = "rust1", since = "1.0.0")] pub struct IntoIter { - pub(super) inner: table::IntoIter, + base: base::IntoIter, +} + +impl IntoIter { + /// Returns a iterator of references over the remaining items. + #[inline] + pub(super) fn iter(&self) -> Iter<'_, K, V> { + Iter { + base: self.base.rustc_iter(), + } + } } /// An iterator over the keys of a `HashMap`. @@ -1729,17 +1131,18 @@ pub struct Keys<'a, K: 'a, V: 'a> { // FIXME(#26925) Remove in favor of `#[derive(Clone)]` #[stable(feature = "rust1", since = "1.0.0")] impl Clone for Keys<'_, K, V> { + #[inline] fn clone(&self) -> Self { - Keys { inner: self.inner.clone() } + Keys { + inner: self.inner.clone(), + } } } #[stable(feature = "std_debug", since = "1.16.0")] impl fmt::Debug for Keys<'_, K, V> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_list() - .entries(self.clone()) - .finish() + f.debug_list().entries(self.clone()).finish() } } @@ -1758,17 +1161,18 @@ pub struct Values<'a, K: 'a, V: 'a> { // FIXME(#26925) Remove in favor of `#[derive(Clone)]` #[stable(feature = "rust1", since = "1.0.0")] impl Clone for Values<'_, K, V> { + #[inline] fn clone(&self) -> Self { - Values { inner: self.inner.clone() } + Values { + inner: self.inner.clone(), + } } } #[stable(feature = "std_debug", since = "1.16.0")] impl fmt::Debug for Values<'_, K, V> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_list() - .entries(self.clone()) - .finish() + f.debug_list().entries(self.clone()).finish() } } @@ -1781,7 +1185,17 @@ impl fmt::Debug for Values<'_, K, V> { /// [`HashMap`]: struct.HashMap.html #[stable(feature = "drain", since = "1.6.0")] pub struct Drain<'a, K: 'a, V: 'a> { - pub(super) inner: table::Drain<'a, K, V>, + base: base::Drain<'a, K, V>, +} + +impl<'a, K, V> Drain<'a, K, V> { + /// Returns a iterator of references over the remaining items. + #[inline] + pub(super) fn iter(&self) -> Iter<'_, K, V> { + Iter { + base: self.base.rustc_iter(), + } + } } /// A mutable iterator over the values of a `HashMap`. @@ -1796,47 +1210,6 @@ pub struct ValuesMut<'a, K: 'a, V: 'a> { inner: IterMut<'a, K, V>, } -enum InternalEntry { - Occupied { elem: FullBucket }, - Vacant { - hash: SafeHash, - elem: VacantEntryState, - }, - TableIsEmpty, -} - -impl InternalEntry { - #[inline] - fn into_occupied_bucket(self) -> Option> { - match self { - InternalEntry::Occupied { elem } => Some(elem), - _ => None, - } - } -} - -impl<'a, K, V> InternalEntry> { - #[inline] - fn into_entry(self, key: K) -> Option> { - match self { - InternalEntry::Occupied { elem } => { - Some(Occupied(OccupiedEntry { - key: Some(key), - elem, - })) - } - InternalEntry::Vacant { hash, elem } => { - Some(Vacant(VacantEntry { - hash, - key, - elem, - })) - } - InternalEntry::TableIsEmpty => None, - } - } -} - /// A builder for computing where in a HashMap a key-value pair would be stored. /// /// See the [`HashMap::raw_entry_mut`] docs for usage examples. @@ -1852,11 +1225,13 @@ pub struct RawEntryBuilderMut<'a, K: 'a, V: 'a, S: 'a> { /// /// This is a lower-level version of [`Entry`]. /// -/// This `enum` is constructed from the [`raw_entry`] method on [`HashMap`]. +/// This `enum` is constructed through the [`raw_entry_mut`] method on [`HashMap`], +/// then calling one of the methods of that [`RawEntryBuilderMut`]. /// /// [`HashMap`]: struct.HashMap.html /// [`Entry`]: enum.Entry.html -/// [`raw_entry`]: struct.HashMap.html#method.raw_entry +/// [`raw_entry_mut`]: struct.HashMap.html#method.raw_entry_mut +/// [`RawEntryBuilderMut`]: struct.RawEntryBuilderMut.html #[unstable(feature = "hash_raw_entry", issue = "56167")] pub enum RawEntryMut<'a, K: 'a, V: 'a, S: 'a> { /// An occupied entry. @@ -1871,7 +1246,7 @@ pub enum RawEntryMut<'a, K: 'a, V: 'a, S: 'a> { /// [`RawEntryMut`]: enum.RawEntryMut.html #[unstable(feature = "hash_raw_entry", issue = "56167")] pub struct RawOccupiedEntryMut<'a, K: 'a, V: 'a> { - elem: FullBucket>, + base: base::RawOccupiedEntryMut<'a, K, V>, } /// A view into a vacant entry in a `HashMap`. @@ -1880,8 +1255,7 @@ pub struct RawOccupiedEntryMut<'a, K: 'a, V: 'a> { /// [`RawEntryMut`]: enum.RawEntryMut.html #[unstable(feature = "hash_raw_entry", issue = "56167")] pub struct RawVacantEntryMut<'a, K: 'a, V: 'a, S: 'a> { - elem: VacantEntryState>, - hash_builder: &'a S, + base: base::RawVacantEntryMut<'a, K, V, S>, } /// A builder for computing where in a HashMap a key-value pair would be stored. @@ -1895,128 +1269,81 @@ pub struct RawEntryBuilder<'a, K: 'a, V: 'a, S: 'a> { } impl<'a, K, V, S> RawEntryBuilderMut<'a, K, V, S> - where S: BuildHasher, - K: Eq + Hash, +where + S: BuildHasher, { /// Creates a `RawEntryMut` from the given key. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn from_key(self, k: &Q) -> RawEntryMut<'a, K, V, S> - where K: Borrow, - Q: Hash + Eq + where + K: Borrow, + Q: Hash + Eq, { - let mut hasher = self.map.hash_builder.build_hasher(); - k.hash(&mut hasher); - self.from_key_hashed_nocheck(hasher.finish(), k) + map_raw_entry(self.map.base.raw_entry_mut().from_key(k)) } /// Creates a `RawEntryMut` from the given key and its hash. #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn from_key_hashed_nocheck(self, hash: u64, k: &Q) -> RawEntryMut<'a, K, V, S> - where K: Borrow, - Q: Eq + where + K: Borrow, + Q: Eq, { - self.from_hash(hash, |q| q.borrow().eq(k)) + map_raw_entry( + self.map + .base + .raw_entry_mut() + .from_key_hashed_nocheck(hash, k), + ) } - #[inline] - fn search(self, hash: u64, is_match: F, compare_hashes: bool) -> RawEntryMut<'a, K, V, S> - where for<'b> F: FnMut(&'b K) -> bool, - { - match search_hashed_nonempty_mut(&mut self.map.table, - SafeHash::new(hash), - is_match, - compare_hashes) { - InternalEntry::Occupied { elem } => { - RawEntryMut::Occupied(RawOccupiedEntryMut { elem }) - } - InternalEntry::Vacant { elem, .. } => { - RawEntryMut::Vacant(RawVacantEntryMut { - elem, - hash_builder: &self.map.hash_builder, - }) - } - InternalEntry::TableIsEmpty => { - unreachable!() - } - } - } /// Creates a `RawEntryMut` from the given hash. #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn from_hash(self, hash: u64, is_match: F) -> RawEntryMut<'a, K, V, S> - where for<'b> F: FnMut(&'b K) -> bool, - { - self.search(hash, is_match, true) - } - - /// Search possible locations for an element with hash `hash` until `is_match` returns true for - /// one of them. There is no guarantee that all keys passed to `is_match` will have the provided - /// hash. - #[unstable(feature = "hash_raw_entry", issue = "56167")] - pub fn search_bucket(self, hash: u64, is_match: F) -> RawEntryMut<'a, K, V, S> - where for<'b> F: FnMut(&'b K) -> bool, + where + for<'b> F: FnMut(&'b K) -> bool, { - self.search(hash, is_match, false) + map_raw_entry(self.map.base.raw_entry_mut().from_hash(hash, is_match)) } } impl<'a, K, V, S> RawEntryBuilder<'a, K, V, S> - where S: BuildHasher, +where + S: BuildHasher, { /// Access an entry by key. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn from_key(self, k: &Q) -> Option<(&'a K, &'a V)> - where K: Borrow, - Q: Hash + Eq + where + K: Borrow, + Q: Hash + Eq, { - let mut hasher = self.map.hash_builder.build_hasher(); - k.hash(&mut hasher); - self.from_key_hashed_nocheck(hasher.finish(), k) + self.map.base.raw_entry().from_key(k) } /// Access an entry by a key and its hash. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn from_key_hashed_nocheck(self, hash: u64, k: &Q) -> Option<(&'a K, &'a V)> - where K: Borrow, - Q: Hash + Eq - - { - self.from_hash(hash, |q| q.borrow().eq(k)) - } - - fn search(self, hash: u64, is_match: F, compare_hashes: bool) -> Option<(&'a K, &'a V)> - where F: FnMut(&K) -> bool + where + K: Borrow, + Q: Hash + Eq, { - if unsafe { unlikely(self.map.table.size() == 0) } { - return None; - } - match search_hashed_nonempty(&self.map.table, - SafeHash::new(hash), - is_match, - compare_hashes) { - InternalEntry::Occupied { elem } => Some(elem.into_refs()), - InternalEntry::Vacant { .. } => None, - InternalEntry::TableIsEmpty => unreachable!(), - } + self.map.base.raw_entry().from_key_hashed_nocheck(hash, k) } /// Access an entry by hash. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn from_hash(self, hash: u64, is_match: F) -> Option<(&'a K, &'a V)> - where F: FnMut(&K) -> bool + where + F: FnMut(&K) -> bool, { - self.search(hash, is_match, true) - } - - /// Search possible locations for an element with hash `hash` until `is_match` returns true for - /// one of them. There is no guarantee that all keys passed to `is_match` will have the provided - /// hash. - #[unstable(feature = "hash_raw_entry", issue = "56167")] - pub fn search_bucket(self, hash: u64, is_match: F) -> Option<(&'a K, &'a V)> - where F: FnMut(&K) -> bool - { - self.search(hash, is_match, false) + self.map.base.raw_entry().from_hash(hash, is_match) } } @@ -2038,10 +1365,12 @@ impl<'a, K, V, S> RawEntryMut<'a, K, V, S> { /// *map.raw_entry_mut().from_key("poneyland").or_insert("poneyland", 10).1 *= 2; /// assert_eq!(map["poneyland"], 6); /// ``` + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn or_insert(self, default_key: K, default_val: V) -> (&'a mut K, &'a mut V) - where K: Hash, - S: BuildHasher, + where + K: Hash, + S: BuildHasher, { match self { RawEntryMut::Occupied(entry) => entry.into_key_value(), @@ -2066,11 +1395,13 @@ impl<'a, K, V, S> RawEntryMut<'a, K, V, S> { /// /// assert_eq!(map["poneyland"], "hoho".to_string()); /// ``` + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn or_insert_with(self, default: F) -> (&'a mut K, &'a mut V) - where F: FnOnce() -> (K, V), - K: Hash, - S: BuildHasher, + where + F: FnOnce() -> (K, V), + K: Hash, + S: BuildHasher, { match self { RawEntryMut::Occupied(entry) => entry.into_key_value(), @@ -2104,9 +1435,11 @@ impl<'a, K, V, S> RawEntryMut<'a, K, V, S> { /// .or_insert("poneyland", 0); /// assert_eq!(map["poneyland"], 43); /// ``` + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn and_modify(self, f: F) -> Self - where F: FnOnce(&mut K, &mut V) + where + F: FnOnce(&mut K, &mut V), { match self { RawEntryMut::Occupied(mut entry) => { @@ -2115,7 +1448,7 @@ impl<'a, K, V, S> RawEntryMut<'a, K, V, S> { f(k, v); } RawEntryMut::Occupied(entry) - }, + } RawEntryMut::Vacant(entry) => RawEntryMut::Vacant(entry), } } @@ -2123,130 +1456,130 @@ impl<'a, K, V, S> RawEntryMut<'a, K, V, S> { impl<'a, K, V> RawOccupiedEntryMut<'a, K, V> { /// Gets a reference to the key in the entry. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn key(&self) -> &K { - self.elem.read().0 + self.base.key() } /// Gets a mutable reference to the key in the entry. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn key_mut(&mut self) -> &mut K { - self.elem.read_mut().0 + self.base.key_mut() } /// Converts the entry into a mutable reference to the key in the entry /// with a lifetime bound to the map itself. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn into_key(self) -> &'a mut K { - self.elem.into_mut_refs().0 + self.base.into_key() } /// Gets a reference to the value in the entry. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn get(&self) -> &V { - self.elem.read().1 + self.base.get() } /// Converts the OccupiedEntry into a mutable reference to the value in the entry /// with a lifetime bound to the map itself. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn into_mut(self) -> &'a mut V { - self.elem.into_mut_refs().1 + self.base.into_mut() } /// Gets a mutable reference to the value in the entry. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn get_mut(&mut self) -> &mut V { - self.elem.read_mut().1 + self.base.get_mut() } /// Gets a reference to the key and value in the entry. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn get_key_value(&mut self) -> (&K, &V) { - self.elem.read() + self.base.get_key_value() } /// Gets a mutable reference to the key and value in the entry. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn get_key_value_mut(&mut self) -> (&mut K, &mut V) { - self.elem.read_mut() + self.base.get_key_value_mut() } /// Converts the OccupiedEntry into a mutable reference to the key and value in the entry /// with a lifetime bound to the map itself. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn into_key_value(self) -> (&'a mut K, &'a mut V) { - self.elem.into_mut_refs() + self.base.into_key_value() } /// Sets the value of the entry, and returns the entry's old value. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn insert(&mut self, value: V) -> V { - mem::replace(self.get_mut(), value) + self.base.insert(value) } /// Sets the value of the entry, and returns the entry's old value. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn insert_key(&mut self, key: K) -> K { - mem::replace(self.key_mut(), key) + self.base.insert_key(key) } /// Takes the value out of the entry, and returns it. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn remove(self) -> V { - pop_internal(self.elem).1 + self.base.remove() } /// Take the ownership of the key and value from the map. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn remove_entry(self) -> (K, V) { - let (k, v, _) = pop_internal(self.elem); - (k, v) + self.base.remove_entry() } } impl<'a, K, V, S> RawVacantEntryMut<'a, K, V, S> { /// Sets the value of the entry with the VacantEntry's key, /// and returns a mutable reference to it. + #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] pub fn insert(self, key: K, value: V) -> (&'a mut K, &'a mut V) - where K: Hash, - S: BuildHasher, + where + K: Hash, + S: BuildHasher, { - let mut hasher = self.hash_builder.build_hasher(); - key.hash(&mut hasher); - self.insert_hashed_nocheck(hasher.finish(), key, value) + self.base.insert(key, value) } /// Sets the value of the entry with the VacantEntry's key, /// and returns a mutable reference to it. #[inline] #[unstable(feature = "hash_raw_entry", issue = "56167")] - pub fn insert_hashed_nocheck(self, hash: u64, key: K, value: V) -> (&'a mut K, &'a mut V) { - let hash = SafeHash::new(hash); - let b = match self.elem { - NeqElem(mut bucket, disp) => { - if disp >= DISPLACEMENT_THRESHOLD { - bucket.table_mut().set_tag(true); - } - robin_hood(bucket, disp, hash, key, value) - }, - NoElem(mut bucket, disp) => { - if disp >= DISPLACEMENT_THRESHOLD { - bucket.table_mut().set_tag(true); - } - bucket.put(hash, key, value) - }, - }; - b.into_mut_refs() + pub fn insert_hashed_nocheck(self, hash: u64, key: K, value: V) -> (&'a mut K, &'a mut V) + where + K: Hash, + S: BuildHasher, + { + self.base.insert_hashed_nocheck(hash, key, value) } } #[unstable(feature = "hash_raw_entry", issue = "56167")] impl Debug for RawEntryBuilderMut<'_, K, V, S> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("RawEntryBuilder") - .finish() + f.debug_struct("RawEntryBuilder").finish() } } @@ -2254,16 +1587,8 @@ impl Debug for RawEntryBuilderMut<'_, K, V, S> { impl Debug for RawEntryMut<'_, K, V, S> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match *self { - RawEntryMut::Vacant(ref v) => { - f.debug_tuple("RawEntry") - .field(v) - .finish() - } - RawEntryMut::Occupied(ref o) => { - f.debug_tuple("RawEntry") - .field(o) - .finish() - } + RawEntryMut::Vacant(ref v) => f.debug_tuple("RawEntry").field(v).finish(), + RawEntryMut::Occupied(ref o) => f.debug_tuple("RawEntry").field(o).finish(), } } } @@ -2272,25 +1597,23 @@ impl Debug for RawEntryMut<'_, K, V, S> { impl Debug for RawOccupiedEntryMut<'_, K, V> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("RawOccupiedEntryMut") - .field("key", self.key()) - .field("value", self.get()) - .finish() + .field("key", self.key()) + .field("value", self.get()) + .finish() } } #[unstable(feature = "hash_raw_entry", issue = "56167")] impl Debug for RawVacantEntryMut<'_, K, V, S> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("RawVacantEntryMut") - .finish() + f.debug_struct("RawVacantEntryMut").finish() } } #[unstable(feature = "hash_raw_entry", issue = "56167")] impl Debug for RawEntryBuilder<'_, K, V, S> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("RawEntryBuilder") - .finish() + f.debug_struct("RawEntryBuilder").finish() } } @@ -2304,29 +1627,19 @@ impl Debug for RawEntryBuilder<'_, K, V, S> { pub enum Entry<'a, K: 'a, V: 'a> { /// An occupied entry. #[stable(feature = "rust1", since = "1.0.0")] - Occupied(#[stable(feature = "rust1", since = "1.0.0")] - OccupiedEntry<'a, K, V>), + Occupied(#[stable(feature = "rust1", since = "1.0.0")] OccupiedEntry<'a, K, V>), /// A vacant entry. #[stable(feature = "rust1", since = "1.0.0")] - Vacant(#[stable(feature = "rust1", since = "1.0.0")] - VacantEntry<'a, K, V>), + Vacant(#[stable(feature = "rust1", since = "1.0.0")] VacantEntry<'a, K, V>), } -#[stable(feature= "debug_hash_map", since = "1.12.0")] +#[stable(feature = "debug_hash_map", since = "1.12.0")] impl Debug for Entry<'_, K, V> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match *self { - Vacant(ref v) => { - f.debug_tuple("Entry") - .field(v) - .finish() - } - Occupied(ref o) => { - f.debug_tuple("Entry") - .field(o) - .finish() - } + Vacant(ref v) => f.debug_tuple("Entry").field(v).finish(), + Occupied(ref o) => f.debug_tuple("Entry").field(o).finish(), } } } @@ -2337,16 +1650,10 @@ impl Debug for Entry<'_, K, V> { /// [`Entry`]: enum.Entry.html #[stable(feature = "rust1", since = "1.0.0")] pub struct OccupiedEntry<'a, K: 'a, V: 'a> { - key: Option, - elem: FullBucket>, + base: base::RustcOccupiedEntry<'a, K, V>, } -#[stable(feature = "rust1", since = "1.0.0")] -unsafe impl<'a, K: 'a + Send, V: 'a + Send> Send for OccupiedEntry<'a, K, V> {} -#[stable(feature = "rust1", since = "1.0.0")] -unsafe impl<'a, K: 'a + Sync, V: 'a + Sync> Sync for OccupiedEntry<'a, K, V> {} - -#[stable(feature= "debug_hash_map", since = "1.12.0")] +#[stable(feature = "debug_hash_map", since = "1.12.0")] impl Debug for OccupiedEntry<'_, K, V> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("OccupiedEntry") @@ -2362,39 +1669,22 @@ impl Debug for OccupiedEntry<'_, K, V> { /// [`Entry`]: enum.Entry.html #[stable(feature = "rust1", since = "1.0.0")] pub struct VacantEntry<'a, K: 'a, V: 'a> { - hash: SafeHash, - key: K, - elem: VacantEntryState>, + base: base::RustcVacantEntry<'a, K, V>, } -#[stable(feature = "rust1", since = "1.0.0")] -unsafe impl<'a, K: 'a + Send, V: 'a + Send> Send for VacantEntry<'a, K, V> {} -#[stable(feature = "rust1", since = "1.0.0")] -unsafe impl<'a, K: 'a + Sync, V: 'a + Sync> Sync for VacantEntry<'a, K, V> {} - -#[stable(feature= "debug_hash_map", since = "1.12.0")] +#[stable(feature = "debug_hash_map", since = "1.12.0")] impl Debug for VacantEntry<'_, K, V> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_tuple("VacantEntry") - .field(self.key()) - .finish() + f.debug_tuple("VacantEntry").field(self.key()).finish() } } -/// Possible states of a VacantEntry. -enum VacantEntryState { - /// The index is occupied, but the key to insert has precedence, - /// and will kick the current one out on insertion. - NeqElem(FullBucket, usize), - /// The index is genuinely vacant. - NoElem(EmptyBucket, usize), -} - #[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, V, S> IntoIterator for &'a HashMap { type Item = (&'a K, &'a V); type IntoIter = Iter<'a, K, V>; + #[inline] fn into_iter(self) -> Iter<'a, K, V> { self.iter() } @@ -2405,6 +1695,7 @@ impl<'a, K, V, S> IntoIterator for &'a mut HashMap { type Item = (&'a K, &'a mut V); type IntoIter = IterMut<'a, K, V>; + #[inline] fn into_iter(self) -> IterMut<'a, K, V> { self.iter_mut() } @@ -2432,8 +1723,11 @@ impl IntoIterator for HashMap { /// // Not possible with .iter() /// let vec: Vec<(&str, i32)> = map.into_iter().collect(); /// ``` + #[inline] fn into_iter(self) -> IntoIter { - IntoIter { inner: self.table.into_iter() } + IntoIter { + base: self.base.into_iter(), + } } } @@ -2443,18 +1737,18 @@ impl<'a, K, V> Iterator for Iter<'a, K, V> { #[inline] fn next(&mut self) -> Option<(&'a K, &'a V)> { - self.inner.next() + self.base.next() } #[inline] fn size_hint(&self) -> (usize, Option) { - self.inner.size_hint() + self.base.size_hint() } } #[stable(feature = "rust1", since = "1.0.0")] impl ExactSizeIterator for Iter<'_, K, V> { #[inline] fn len(&self) -> usize { - self.inner.len() + self.base.len() } } @@ -2467,18 +1761,18 @@ impl<'a, K, V> Iterator for IterMut<'a, K, V> { #[inline] fn next(&mut self) -> Option<(&'a K, &'a mut V)> { - self.inner.next() + self.base.next() } #[inline] fn size_hint(&self) -> (usize, Option) { - self.inner.size_hint() + self.base.size_hint() } } #[stable(feature = "rust1", since = "1.0.0")] impl ExactSizeIterator for IterMut<'_, K, V> { #[inline] fn len(&self) -> usize { - self.inner.len() + self.base.len() } } #[stable(feature = "fused", since = "1.26.0")] @@ -2486,13 +1780,12 @@ impl FusedIterator for IterMut<'_, K, V> {} #[stable(feature = "std_debug", since = "1.16.0")] impl fmt::Debug for IterMut<'_, K, V> - where K: fmt::Debug, - V: fmt::Debug, +where + K: fmt::Debug, + V: fmt::Debug, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_list() - .entries(self.inner.iter()) - .finish() + f.debug_list().entries(self.iter()).finish() } } @@ -2502,18 +1795,18 @@ impl Iterator for IntoIter { #[inline] fn next(&mut self) -> Option<(K, V)> { - self.inner.next().map(|(_, k, v)| (k, v)) + self.base.next() } #[inline] fn size_hint(&self) -> (usize, Option) { - self.inner.size_hint() + self.base.size_hint() } } #[stable(feature = "rust1", since = "1.0.0")] impl ExactSizeIterator for IntoIter { #[inline] fn len(&self) -> usize { - self.inner.len() + self.base.len() } } #[stable(feature = "fused", since = "1.26.0")] @@ -2522,9 +1815,7 @@ impl FusedIterator for IntoIter {} #[stable(feature = "std_debug", since = "1.16.0")] impl fmt::Debug for IntoIter { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_list() - .entries(self.inner.iter()) - .finish() + f.debug_list().entries(self.iter()).finish() } } @@ -2599,13 +1890,12 @@ impl FusedIterator for ValuesMut<'_, K, V> {} #[stable(feature = "std_debug", since = "1.16.0")] impl fmt::Debug for ValuesMut<'_, K, V> - where K: fmt::Debug, - V: fmt::Debug, +where + K: fmt::Debug, + V: fmt::Debug, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_list() - .entries(self.inner.inner.iter()) - .finish() + f.debug_list().entries(self.inner.iter()).finish() } } @@ -2615,18 +1905,18 @@ impl<'a, K, V> Iterator for Drain<'a, K, V> { #[inline] fn next(&mut self) -> Option<(K, V)> { - self.inner.next().map(|(_, k, v)| (k, v)) + self.base.next() } #[inline] fn size_hint(&self) -> (usize, Option) { - self.inner.size_hint() + self.base.size_hint() } } #[stable(feature = "drain", since = "1.6.0")] impl ExactSizeIterator for Drain<'_, K, V> { #[inline] fn len(&self) -> usize { - self.inner.len() + self.base.len() } } #[stable(feature = "fused", since = "1.26.0")] @@ -2634,13 +1924,12 @@ impl FusedIterator for Drain<'_, K, V> {} #[stable(feature = "std_debug", since = "1.16.0")] impl fmt::Debug for Drain<'_, K, V> - where K: fmt::Debug, - V: fmt::Debug, +where + K: fmt::Debug, + V: fmt::Debug, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_list() - .entries(self.inner.iter()) - .finish() + f.debug_list().entries(self.iter()).finish() } } @@ -2662,6 +1951,7 @@ impl<'a, K, V> Entry<'a, K, V> { /// *map.entry("poneyland").or_insert(10) *= 2; /// assert_eq!(map["poneyland"], 6); /// ``` + #[inline] pub fn or_insert(self, default: V) -> &'a mut V { match self { Occupied(entry) => entry.into_mut(), @@ -2685,6 +1975,7 @@ impl<'a, K, V> Entry<'a, K, V> { /// /// assert_eq!(map["poneyland"], "hoho".to_string()); /// ``` + #[inline] pub fn or_insert_with V>(self, default: F) -> &'a mut V { match self { Occupied(entry) => entry.into_mut(), @@ -2702,6 +1993,7 @@ impl<'a, K, V> Entry<'a, K, V> { /// let mut map: HashMap<&str, u32> = HashMap::new(); /// assert_eq!(map.entry("poneyland").key(), &"poneyland"); /// ``` + #[inline] #[stable(feature = "map_entry_keys", since = "1.10.0")] pub fn key(&self) -> &K { match *self { @@ -2730,19 +2022,20 @@ impl<'a, K, V> Entry<'a, K, V> { /// .or_insert(42); /// assert_eq!(map["poneyland"], 43); /// ``` + #[inline] #[stable(feature = "entry_and_modify", since = "1.26.0")] pub fn and_modify(self, f: F) -> Self - where F: FnOnce(&mut V) + where + F: FnOnce(&mut V), { match self { Occupied(mut entry) => { f(entry.get_mut()); Occupied(entry) - }, + } Vacant(entry) => Vacant(entry), } } - } impl<'a, K, V: Default> Entry<'a, K, V> { @@ -2762,6 +2055,7 @@ impl<'a, K, V: Default> Entry<'a, K, V> { /// assert_eq!(map["poneyland"], None); /// # } /// ``` + #[inline] pub fn or_default(self) -> &'a mut V { match self { Occupied(entry) => entry.into_mut(), @@ -2782,9 +2076,10 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> { /// map.entry("poneyland").or_insert(12); /// assert_eq!(map.entry("poneyland").key(), &"poneyland"); /// ``` + #[inline] #[stable(feature = "map_entry_keys", since = "1.10.0")] pub fn key(&self) -> &K { - self.elem.read().0 + self.base.key() } /// Take the ownership of the key and value from the map. @@ -2805,10 +2100,10 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> { /// /// assert_eq!(map.contains_key("poneyland"), false); /// ``` + #[inline] #[stable(feature = "map_entry_recover_keys2", since = "1.12.0")] pub fn remove_entry(self) -> (K, V) { - let (k, v, _) = pop_internal(self.elem); - (k, v) + self.base.remove_entry() } /// Gets a reference to the value in the entry. @@ -2826,9 +2121,10 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> { /// assert_eq!(o.get(), &12); /// } /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn get(&self) -> &V { - self.elem.read().1 + self.base.get() } /// Gets a mutable reference to the value in the entry. @@ -2858,9 +2154,10 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> { /// /// assert_eq!(map["poneyland"], 24); /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn get_mut(&mut self) -> &mut V { - self.elem.read_mut().1 + self.base.get_mut() } /// Converts the OccupiedEntry into a mutable reference to the value in the entry @@ -2886,9 +2183,10 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> { /// /// assert_eq!(map["poneyland"], 22); /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn into_mut(self) -> &'a mut V { - self.elem.into_mut_refs().1 + self.base.into_mut() } /// Sets the value of the entry, and returns the entry's old value. @@ -2908,11 +2206,10 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> { /// /// assert_eq!(map["poneyland"], 15); /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] - pub fn insert(&mut self, mut value: V) -> V { - let old_value = self.get_mut(); - mem::swap(&mut value, old_value); - value + pub fn insert(&mut self, value: V) -> V { + self.base.insert(value) } /// Takes the value out of the entry, and returns it. @@ -2932,16 +2229,10 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> { /// /// assert_eq!(map.contains_key("poneyland"), false); /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn remove(self) -> V { - pop_internal(self.elem).1 - } - - /// Returns a key that was used for search. - /// - /// The key was retained for further use. - fn take_key(&mut self) -> Option { - self.key.take() + self.base.remove() } /// Replaces the entry, returning the old key and value. The new key in the hash map will be @@ -2965,14 +2256,10 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> { /// } /// /// ``` + #[inline] #[unstable(feature = "map_entry_replace", issue = "44286")] - pub fn replace_entry(mut self, value: V) -> (K, V) { - let (old_key, old_value) = self.elem.read_mut(); - - let old_key = mem::replace(old_key, self.key.unwrap()); - let old_value = mem::replace(old_value, value); - - (old_key, old_value) + pub fn replace_entry(self, value: V) -> (K, V) { + self.base.replace_entry(value) } /// Replaces the key in the hash map with the key used to create this entry. @@ -3000,10 +2287,10 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> { /// } /// } /// ``` + #[inline] #[unstable(feature = "map_entry_replace", issue = "44286")] - pub fn replace_key(mut self) -> K { - let (old_key, _) = self.elem.read_mut(); - mem::replace(old_key, self.key.unwrap()) + pub fn replace_key(self) -> K { + self.base.replace_key() } } @@ -3019,9 +2306,10 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> { /// let mut map: HashMap<&str, u32> = HashMap::new(); /// assert_eq!(map.entry("poneyland").key(), &"poneyland"); /// ``` + #[inline] #[stable(feature = "map_entry_keys", since = "1.10.0")] pub fn key(&self) -> &K { - &self.key + self.base.key() } /// Take ownership of the key. @@ -3038,9 +2326,10 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> { /// v.into_key(); /// } /// ``` + #[inline] #[stable(feature = "map_entry_recover_keys2", since = "1.12.0")] pub fn into_key(self) -> K { - self.key + self.base.into_key() } /// Sets the value of the entry with the VacantEntry's key, @@ -3059,30 +2348,18 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> { /// } /// assert_eq!(map["poneyland"], 37); /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn insert(self, value: V) -> &'a mut V { - let b = match self.elem { - NeqElem(mut bucket, disp) => { - if disp >= DISPLACEMENT_THRESHOLD { - bucket.table_mut().set_tag(true); - } - robin_hood(bucket, disp, self.hash, self.key, value) - }, - NoElem(mut bucket, disp) => { - if disp >= DISPLACEMENT_THRESHOLD { - bucket.table_mut().set_tag(true); - } - bucket.put(self.hash, self.key, value) - }, - }; - b.into_mut_refs().1 + self.base.insert(value) } } #[stable(feature = "rust1", since = "1.0.0")] impl FromIterator<(K, V)> for HashMap - where K: Eq + Hash, - S: BuildHasher + Default +where + K: Eq + Hash, + S: BuildHasher + Default, { fn from_iter>(iter: T) -> HashMap { let mut map = HashMap::with_hasher(Default::default()); @@ -3093,35 +2370,26 @@ impl FromIterator<(K, V)> for HashMap #[stable(feature = "rust1", since = "1.0.0")] impl Extend<(K, V)> for HashMap - where K: Eq + Hash, - S: BuildHasher +where + K: Eq + Hash, + S: BuildHasher, { + #[inline] fn extend>(&mut self, iter: T) { - // Keys may be already present or show multiple times in the iterator. - // Reserve the entire hint lower bound if the map is empty. - // Otherwise reserve half the hint (rounded up), so the map - // will only resize twice in the worst case. - let iter = iter.into_iter(); - let reserve = if self.is_empty() { - iter.size_hint().0 - } else { - (iter.size_hint().0 + 1) / 2 - }; - self.reserve(reserve); - for (k, v) in iter { - self.insert(k, v); - } + self.base.extend(iter) } } #[stable(feature = "hash_extend_copy", since = "1.4.0")] impl<'a, K, V, S> Extend<(&'a K, &'a V)> for HashMap - where K: Eq + Hash + Copy, - V: Copy, - S: BuildHasher +where + K: Eq + Hash + Copy, + V: Copy, + S: BuildHasher, { + #[inline] fn extend>(&mut self, iter: T) { - self.extend(iter.into_iter().map(|(&key, &value)| (key, value))); + self.base.extend(iter) } } @@ -3226,7 +2494,10 @@ impl DefaultHasher { #[stable(feature = "hashmap_default_hasher", since = "1.13.0")] impl Default for DefaultHasher { - /// Creates a new `DefaultHasher` using [`new`][DefaultHasher::new]. + // FIXME: here should link `new` to [DefaultHasher::new], but it occurs intra-doc link + // resolution failure when re-exporting libstd items. When #56922 fixed, + // link `new` to [DefaultHasher::new] again. + /// Creates a new `DefaultHasher` using `new`. /// See its documentation for more. fn default() -> DefaultHasher { DefaultHasher::new() @@ -3262,36 +2533,29 @@ impl fmt::Debug for RandomState { } } -impl super::Recover for HashMap - where K: Eq + Hash + Borrow, - S: BuildHasher, - Q: Eq + Hash -{ - type Key = K; - - #[inline] - fn get(&self, key: &Q) -> Option<&K> { - self.search(key).map(|bucket| bucket.into_refs().0) +#[inline] +fn map_entry<'a, K: 'a, V: 'a>(raw: base::RustcEntry<'a, K, V>) -> Entry<'a, K, V> { + match raw { + base::RustcEntry::Occupied(base) => Entry::Occupied(OccupiedEntry { base }), + base::RustcEntry::Vacant(base) => Entry::Vacant(VacantEntry { base }), } +} - fn take(&mut self, key: &Q) -> Option { - self.search_mut(key).map(|bucket| pop_internal(bucket).0) +#[inline] +fn map_collection_alloc_err(err: hashbrown::CollectionAllocErr) -> CollectionAllocErr { + match err { + hashbrown::CollectionAllocErr::CapacityOverflow => CollectionAllocErr::CapacityOverflow, + hashbrown::CollectionAllocErr::AllocErr => CollectionAllocErr::AllocErr, } +} - #[inline] - fn replace(&mut self, key: K) -> Option { - self.reserve(1); - - match self.entry(key) { - Occupied(mut occupied) => { - let key = occupied.take_key().unwrap(); - Some(mem::replace(occupied.elem.read_mut().0, key)) - } - Vacant(vacant) => { - vacant.insert(()); - None - } - } +#[inline] +fn map_raw_entry<'a, K: 'a, V: 'a, S: 'a>( + raw: base::RawEntryMut<'a, K, V, S>, +) -> RawEntryMut<'a, K, V, S> { + match raw { + base::RawEntryMut::Occupied(base) => RawEntryMut::Occupied(RawOccupiedEntryMut { base }), + base::RawEntryMut::Vacant(base) => RawEntryMut::Vacant(RawVacantEntryMut { base }), } } @@ -3327,23 +2591,29 @@ fn assert_covariance() { fn values_val<'a, 'new>(v: Values<'a, u8, &'static str>) -> Values<'a, u8, &'new str> { v } - fn drain<'new>(d: Drain<'static, &'static str, &'static str>) - -> Drain<'new, &'new str, &'new str> { + fn drain<'new>( + d: Drain<'static, &'static str, &'static str>, + ) -> Drain<'new, &'new str, &'new str> { d } } #[cfg(test)] mod test_map { - use super::HashMap; use super::Entry::{Occupied, Vacant}; + use super::HashMap; use super::RandomState; use crate::cell::RefCell; use rand::{thread_rng, Rng}; use realstd::collections::CollectionAllocErr::*; - use realstd::mem::size_of; use realstd::usize; + // https://github.com/rust-lang/rust/issues/62301 + fn _assert_hashmap_is_unwind_safe() { + fn assert_unwind_safe() {} + assert_unwind_safe::>>(); + } + #[test] fn test_zero_capacities() { type HM = HashMap; @@ -3478,19 +2748,19 @@ mod test_map { DROP_VECTOR.with(|v| { assert_eq!(v.borrow()[i], 1); - assert_eq!(v.borrow()[i+100], 1); + assert_eq!(v.borrow()[i + 100], 1); }); } DROP_VECTOR.with(|v| { for i in 0..50 { assert_eq!(v.borrow()[i], 0); - assert_eq!(v.borrow()[i+100], 0); + assert_eq!(v.borrow()[i + 100], 0); } for i in 50..100 { assert_eq!(v.borrow()[i], 1); - assert_eq!(v.borrow()[i+100], 1); + assert_eq!(v.borrow()[i + 100], 1); } }); } @@ -3547,13 +2817,9 @@ mod test_map { for _ in half.by_ref() {} DROP_VECTOR.with(|v| { - let nk = (0..100) - .filter(|&i| v.borrow()[i] == 1) - .count(); + let nk = (0..100).filter(|&i| v.borrow()[i] == 1).count(); - let nv = (0..100) - .filter(|&i| v.borrow()[i + 100] == 1) - .count(); + let nv = (0..100).filter(|&i| v.borrow()[i + 100] == 1).count(); assert_eq!(nk, 50); assert_eq!(nv, 50); @@ -3741,7 +3007,7 @@ mod test_map { fn test_iterate() { let mut m = HashMap::with_capacity(4); for i in 0..32 { - assert!(m.insert(i, i*2).is_none()); + assert!(m.insert(i, i * 2).is_none()); } assert_eq!(m.len(), 32); @@ -3829,85 +3095,10 @@ mod test_map { let map_str = format!("{:?}", map); - assert!(map_str == "{1: 2, 3: 4}" || - map_str == "{3: 4, 1: 2}"); + assert!(map_str == "{1: 2, 3: 4}" || map_str == "{3: 4, 1: 2}"); assert_eq!(format!("{:?}", empty), "{}"); } - #[test] - fn test_expand() { - let mut m = HashMap::new(); - - assert_eq!(m.len(), 0); - assert!(m.is_empty()); - - let mut i = 0; - let old_raw_cap = m.raw_capacity(); - while old_raw_cap == m.raw_capacity() { - m.insert(i, i); - i += 1; - } - - assert_eq!(m.len(), i); - assert!(!m.is_empty()); - } - - #[test] - fn test_behavior_resize_policy() { - let mut m = HashMap::new(); - - assert_eq!(m.len(), 0); - assert_eq!(m.raw_capacity(), 0); - assert!(m.is_empty()); - - m.insert(0, 0); - m.remove(&0); - assert!(m.is_empty()); - let initial_raw_cap = m.raw_capacity(); - m.reserve(initial_raw_cap); - let raw_cap = m.raw_capacity(); - - assert_eq!(raw_cap, initial_raw_cap * 2); - - let mut i = 0; - for _ in 0..raw_cap * 3 / 4 { - m.insert(i, i); - i += 1; - } - // three quarters full - - assert_eq!(m.len(), i); - assert_eq!(m.raw_capacity(), raw_cap); - - for _ in 0..raw_cap / 4 { - m.insert(i, i); - i += 1; - } - // half full - - let new_raw_cap = m.raw_capacity(); - assert_eq!(new_raw_cap, raw_cap * 2); - - for _ in 0..raw_cap / 2 - 1 { - i -= 1; - m.remove(&i); - assert_eq!(m.raw_capacity(), new_raw_cap); - } - // A little more than one quarter full. - m.shrink_to_fit(); - assert_eq!(m.raw_capacity(), raw_cap); - // again, a little more than half full - for _ in 0..raw_cap / 2 - 1 { - i -= 1; - m.remove(&i); - } - m.shrink_to_fit(); - - assert_eq!(m.len(), i); - assert!(!m.is_empty()); - assert_eq!(m.raw_capacity(), initial_raw_cap); - } - #[test] fn test_reserve_shrink_to_fit() { let mut m = HashMap::new(); @@ -4048,7 +3239,6 @@ mod test_map { assert_eq!(map.get(&1).unwrap(), &100); assert_eq!(map.len(), 6); - // Existing key (update) match map.entry(2) { Vacant(_) => unreachable!(), @@ -4071,7 +3261,6 @@ mod test_map { assert_eq!(map.get(&3), None); assert_eq!(map.len(), 5); - // Inexistent key (insert) match map.entry(10) { Occupied(_) => unreachable!(), @@ -4086,11 +3275,10 @@ mod test_map { #[test] fn test_entry_take_doesnt_corrupt() { #![allow(deprecated)] //rand - // Test for #19292 + // Test for #19292 fn check(m: &HashMap) { for k in m.keys() { - assert!(m.contains_key(k), - "{} is in keys() but not in the map?", k); + assert!(m.contains_key(k), "{} is in keys() but not in the map?", k); } } @@ -4195,7 +3383,7 @@ mod test_map { #[test] fn test_retain() { - let mut map: HashMap = (0..100).map(|x|(x, x*10)).collect(); + let mut map: HashMap = (0..100).map(|x| (x, x * 10)).collect(); map.retain(|&k, _| k % 2 == 0); assert_eq!(map.len(), 50); @@ -4204,51 +3392,20 @@ mod test_map { assert_eq!(map[&6], 60); } - #[test] - fn test_adaptive() { - const TEST_LEN: usize = 5000; - // by cloning we get maps with the same hasher seed - let mut first = HashMap::new(); - let mut second = first.clone(); - first.extend((0..TEST_LEN).map(|i| (i, i))); - second.extend((TEST_LEN..TEST_LEN * 2).map(|i| (i, i))); - - for (&k, &v) in &second { - let prev_cap = first.capacity(); - let expect_grow = first.len() == prev_cap; - first.insert(k, v); - if !expect_grow && first.capacity() != prev_cap { - return; - } - } - panic!("Adaptive early resize failed"); - } - #[test] fn test_try_reserve() { - - let mut empty_bytes: HashMap = HashMap::new(); + let mut empty_bytes: HashMap = HashMap::new(); const MAX_USIZE: usize = usize::MAX; - // HashMap and RawTables use complicated size calculations - // hashes_size is sizeof(HashUint) * capacity; - // pairs_size is sizeof((K. V)) * capacity; - // alignment_hashes_size is 8 - // alignment_pairs size is 4 - let size_of_multiplier = (size_of::() + size_of::<(u8, u8)>()).next_power_of_two(); - // The following formula is used to calculate the new capacity - let max_no_ovf = ((MAX_USIZE / 11) * 10) / size_of_multiplier - 1; - if let Err(CapacityOverflow) = empty_bytes.try_reserve(MAX_USIZE) { - } else { panic!("usize::MAX should trigger an overflow!"); } + } else { + panic!("usize::MAX should trigger an overflow!"); + } - if size_of::() < 8 { - if let Err(CapacityOverflow) = empty_bytes.try_reserve(max_no_ovf) { - } else { panic!("isize::MAX + 1 should trigger a CapacityOverflow!") } + if let Err(AllocErr) = empty_bytes.try_reserve(MAX_USIZE / 8) { } else { - if let Err(AllocErr) = empty_bytes.try_reserve(max_no_ovf) { - } else { panic!("isize::MAX + 1 should trigger an OOM!") } + panic!("usize::MAX / 8 should trigger an OOM!") } } @@ -4278,9 +3435,14 @@ mod test_map { } let hash1 = compute_hash(&map, 1); assert_eq!(map.raw_entry().from_key(&1).unwrap(), (&1, &100)); - assert_eq!(map.raw_entry().from_hash(hash1, |k| *k == 1).unwrap(), (&1, &100)); - assert_eq!(map.raw_entry().from_key_hashed_nocheck(hash1, &1).unwrap(), (&1, &100)); - assert_eq!(map.raw_entry().search_bucket(hash1, |k| *k == 1).unwrap(), (&1, &100)); + assert_eq!( + map.raw_entry().from_hash(hash1, |k| *k == 1).unwrap(), + (&1, &100) + ); + assert_eq!( + map.raw_entry().from_key_hashed_nocheck(hash1, &1).unwrap(), + (&1, &100) + ); assert_eq!(map.len(), 6); // Existing key (update) @@ -4294,9 +3456,14 @@ mod test_map { } let hash2 = compute_hash(&map, 2); assert_eq!(map.raw_entry().from_key(&2).unwrap(), (&2, &200)); - assert_eq!(map.raw_entry().from_hash(hash2, |k| *k == 2).unwrap(), (&2, &200)); - assert_eq!(map.raw_entry().from_key_hashed_nocheck(hash2, &2).unwrap(), (&2, &200)); - assert_eq!(map.raw_entry().search_bucket(hash2, |k| *k == 2).unwrap(), (&2, &200)); + assert_eq!( + map.raw_entry().from_hash(hash2, |k| *k == 2).unwrap(), + (&2, &200) + ); + assert_eq!( + map.raw_entry().from_key_hashed_nocheck(hash2, &2).unwrap(), + (&2, &200) + ); assert_eq!(map.len(), 6); // Existing key (take) @@ -4310,10 +3477,8 @@ mod test_map { assert_eq!(map.raw_entry().from_key(&3), None); assert_eq!(map.raw_entry().from_hash(hash3, |k| *k == 3), None); assert_eq!(map.raw_entry().from_key_hashed_nocheck(hash3, &3), None); - assert_eq!(map.raw_entry().search_bucket(hash3, |k| *k == 3), None); assert_eq!(map.len(), 5); - // Nonexistent key (insert) match map.raw_entry_mut().from_key(&10) { Occupied(_) => unreachable!(), @@ -4333,7 +3498,6 @@ mod test_map { assert_eq!(map.raw_entry().from_key(&k), kv); assert_eq!(map.raw_entry().from_hash(hash, |q| *q == k), kv); assert_eq!(map.raw_entry().from_key_hashed_nocheck(hash, &k), kv); - assert_eq!(map.raw_entry().search_bucket(hash, |q| *q == k), kv); match map.raw_entry_mut().from_key(&k) { Occupied(mut o) => assert_eq!(Some(o.get_key_value()), kv), @@ -4347,10 +3511,6 @@ mod test_map { Occupied(mut o) => assert_eq!(Some(o.get_key_value()), kv), Vacant(_) => assert_eq!(v, None), } - match map.raw_entry_mut().search_bucket(hash, |q| *q == k) { - Occupied(mut o) => assert_eq!(Some(o.get_key_value()), kv), - Vacant(_) => assert_eq!(v, None), - } } } diff --git a/src/libstd/collections/hash/mod.rs b/src/libstd/collections/hash/mod.rs index 0d1bbb590d..a6d89a4d32 100644 --- a/src/libstd/collections/hash/mod.rs +++ b/src/libstd/collections/hash/mod.rs @@ -1,14 +1,5 @@ //! Unordered containers, implemented as hash-tables mod bench; -mod table; pub mod map; pub mod set; - -trait Recover { - type Key; - - fn get(&self, key: &Q) -> Option<&Self::Key>; - fn take(&mut self, key: &Q) -> Option; - fn replace(&mut self, key: Self::Key) -> Option; -} diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index b9fcc2365f..403914c070 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -1,10 +1,10 @@ use crate::borrow::Borrow; +use crate::collections::CollectionAllocErr; use crate::fmt; use crate::hash::{Hash, BuildHasher}; use crate::iter::{Chain, FromIterator, FusedIterator}; use crate::ops::{BitOr, BitAnd, BitXor, Sub}; -use super::Recover; use super::map::{self, HashMap, Keys, RandomState}; // Future Optimization (FIXME!) @@ -181,6 +181,7 @@ impl HashSet { /// println!("{}", x); /// } /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn iter(&self) -> Iter<'_, T> { Iter { iter: self.map.keys() } @@ -198,6 +199,7 @@ impl HashSet { /// v.insert(1); /// assert_eq!(v.len(), 1); /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn len(&self) -> usize { self.map.len() @@ -215,6 +217,7 @@ impl HashSet { /// v.insert(1); /// assert!(!v.is_empty()); /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn is_empty(&self) -> bool { self.map.is_empty() @@ -255,6 +258,7 @@ impl HashSet { /// v.clear(); /// assert!(v.is_empty()); /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn clear(&mut self) { self.map.clear() @@ -332,6 +336,7 @@ impl HashSet /// let set: HashSet = HashSet::with_hasher(hasher); /// let hasher: &RandomState = set.hasher(); /// ``` + #[inline] #[stable(feature = "hashmap_public_hasher", since = "1.9.0")] pub fn hasher(&self) -> &S { self.map.hasher() @@ -353,11 +358,35 @@ impl HashSet /// set.reserve(10); /// assert!(set.capacity() >= 10); /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn reserve(&mut self, additional: usize) { self.map.reserve(additional) } + /// Tries to reserve capacity for at least `additional` more elements to be inserted + /// in the given `HashSet`. The collection may reserve more space to avoid + /// frequent reallocations. + /// + /// # Errors + /// + /// If the capacity overflows, or the allocator reports a failure, then an error + /// is returned. + /// + /// # Examples + /// + /// ``` + /// #![feature(try_reserve)] + /// use std::collections::HashSet; + /// let mut set: HashSet = HashSet::new(); + /// set.try_reserve(10).expect("why is the test harness OOMing on 10 bytes?"); + /// ``` + #[inline] + #[unstable(feature = "try_reserve", reason = "new API", issue="48043")] + pub fn try_reserve(&mut self, additional: usize) -> Result<(), CollectionAllocErr> { + self.map.try_reserve(additional) + } + /// Shrinks the capacity of the set as much as possible. It will drop /// down as much as possible while maintaining the internal rules /// and possibly leaving some space in accordance with the resize policy. @@ -374,6 +403,7 @@ impl HashSet /// set.shrink_to_fit(); /// assert!(set.capacity() >= 2); /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn shrink_to_fit(&mut self) { self.map.shrink_to_fit() @@ -430,6 +460,7 @@ impl HashSet /// let diff: HashSet<_> = b.difference(&a).collect(); /// assert_eq!(diff, [4].iter().collect()); /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn difference<'a>(&'a self, other: &'a HashSet) -> Difference<'a, T, S> { Difference { @@ -459,6 +490,7 @@ impl HashSet /// assert_eq!(diff1, diff2); /// assert_eq!(diff1, [1, 4].iter().collect()); /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn symmetric_difference<'a>(&'a self, other: &'a HashSet) @@ -484,6 +516,7 @@ impl HashSet /// let intersection: HashSet<_> = a.intersection(&b).collect(); /// assert_eq!(intersection, [2, 3].iter().collect()); /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn intersection<'a>(&'a self, other: &'a HashSet) -> Intersection<'a, T, S> { if self.len() <= other.len() { @@ -517,6 +550,7 @@ impl HashSet /// let union: HashSet<_> = a.union(&b).collect(); /// assert_eq!(union, [1, 2, 3, 4].iter().collect()); /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn union<'a>(&'a self, other: &'a HashSet) -> Union<'a, T, S> { if self.len() <= other.len() { @@ -548,6 +582,7 @@ impl HashSet /// /// [`Eq`]: ../../std/cmp/trait.Eq.html /// [`Hash`]: ../../std/hash/trait.Hash.html + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn contains(&self, value: &Q) -> bool where T: Borrow, @@ -574,12 +609,69 @@ impl HashSet /// /// [`Eq`]: ../../std/cmp/trait.Eq.html /// [`Hash`]: ../../std/hash/trait.Hash.html + #[inline] #[stable(feature = "set_recovery", since = "1.9.0")] pub fn get(&self, value: &Q) -> Option<&T> where T: Borrow, Q: Hash + Eq { - Recover::get(&self.map, value) + self.map.get_key_value(value).map(|(k, _)| k) + } + + /// Inserts the given `value` into the set if it is not present, then + /// returns a reference to the value in the set. + /// + /// # Examples + /// + /// ``` + /// #![feature(hash_set_entry)] + /// + /// use std::collections::HashSet; + /// + /// let mut set: HashSet<_> = [1, 2, 3].iter().cloned().collect(); + /// assert_eq!(set.len(), 3); + /// assert_eq!(set.get_or_insert(2), &2); + /// assert_eq!(set.get_or_insert(100), &100); + /// assert_eq!(set.len(), 4); // 100 was inserted + /// ``` + #[inline] + #[unstable(feature = "hash_set_entry", issue = "60896")] + pub fn get_or_insert(&mut self, value: T) -> &T { + // Although the raw entry gives us `&mut T`, we only return `&T` to be consistent with + // `get`. Key mutation is "raw" because you're not supposed to affect `Eq` or `Hash`. + self.map.raw_entry_mut().from_key(&value).or_insert(value, ()).0 + } + + /// Inserts a value computed from `f` into the set if the given `value` is + /// not present, then returns a reference to the value in the set. + /// + /// # Examples + /// + /// ``` + /// #![feature(hash_set_entry)] + /// + /// use std::collections::HashSet; + /// + /// let mut set: HashSet = ["cat", "dog", "horse"] + /// .iter().map(|&pet| pet.to_owned()).collect(); + /// + /// assert_eq!(set.len(), 3); + /// for &pet in &["cat", "dog", "fish"] { + /// let value = set.get_or_insert_with(pet, str::to_owned); + /// assert_eq!(value, pet); + /// } + /// assert_eq!(set.len(), 4); // a new "fish" was inserted + /// ``` + #[inline] + #[unstable(feature = "hash_set_entry", issue = "60896")] + pub fn get_or_insert_with(&mut self, value: &Q, f: F) -> &T + where T: Borrow, + Q: Hash + Eq, + F: FnOnce(&Q) -> T + { + // Although the raw entry gives us `&mut T`, we only return `&T` to be consistent with + // `get`. Key mutation is "raw" because you're not supposed to affect `Eq` or `Hash`. + self.map.raw_entry_mut().from_key(value).or_insert_with(|| (f(value), ())).0 } /// Returns `true` if `self` has no elements in common with `other`. @@ -677,6 +769,7 @@ impl HashSet /// assert_eq!(set.insert(2), false); /// assert_eq!(set.len(), 1); /// ``` + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn insert(&mut self, value: T) -> bool { self.map.insert(value, ()).is_none() @@ -697,9 +790,16 @@ impl HashSet /// set.replace(Vec::with_capacity(10)); /// assert_eq!(set.get(&[][..]).unwrap().capacity(), 10); /// ``` + #[inline] #[stable(feature = "set_recovery", since = "1.9.0")] pub fn replace(&mut self, value: T) -> Option { - Recover::replace(&mut self.map, value) + match self.map.entry(value) { + map::Entry::Occupied(occupied) => Some(occupied.replace_key()), + map::Entry::Vacant(vacant) => { + vacant.insert(()); + None + } + } } /// Removes a value from the set. Returns whether the value was @@ -723,6 +823,7 @@ impl HashSet /// /// [`Eq`]: ../../std/cmp/trait.Eq.html /// [`Hash`]: ../../std/hash/trait.Hash.html + #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn remove(&mut self, value: &Q) -> bool where T: Borrow, @@ -749,12 +850,13 @@ impl HashSet /// /// [`Eq`]: ../../std/cmp/trait.Eq.html /// [`Hash`]: ../../std/hash/trait.Hash.html + #[inline] #[stable(feature = "set_recovery", since = "1.9.0")] pub fn take(&mut self, value: &Q) -> Option where T: Borrow, Q: Hash + Eq { - Recover::take(&mut self.map, value) + self.map.remove_entry(value).map(|(k, _)| k) } /// Retains only the elements specified by the predicate. @@ -815,6 +917,7 @@ impl FromIterator for HashSet where T: Eq + Hash, S: BuildHasher + Default { + #[inline] fn from_iter>(iter: I) -> HashSet { let mut set = HashSet::with_hasher(Default::default()); set.extend(iter); @@ -827,6 +930,7 @@ impl Extend for HashSet where T: Eq + Hash, S: BuildHasher { + #[inline] fn extend>(&mut self, iter: I) { self.map.extend(iter.into_iter().map(|k| (k, ()))); } @@ -837,6 +941,7 @@ impl<'a, T, S> Extend<&'a T> for HashSet where T: 'a + Eq + Hash + Copy, S: BuildHasher { + #[inline] fn extend>(&mut self, iter: I) { self.extend(iter.into_iter().cloned()); } @@ -848,6 +953,7 @@ impl Default for HashSet S: BuildHasher + Default { /// Creates an empty `HashSet` with the `Default` value for the hasher. + #[inline] fn default() -> HashSet { HashSet { map: HashMap::default() } } @@ -1076,6 +1182,7 @@ impl<'a, T, S> IntoIterator for &'a HashSet { type Item = &'a T; type IntoIter = Iter<'a, T>; + #[inline] fn into_iter(self) -> Iter<'a, T> { self.iter() } @@ -1106,6 +1213,7 @@ impl IntoIterator for HashSet { /// println!("{}", x); /// } /// ``` + #[inline] fn into_iter(self) -> IntoIter { IntoIter { iter: self.map.into_iter() } } @@ -1113,6 +1221,7 @@ impl IntoIterator for HashSet { #[stable(feature = "rust1", since = "1.0.0")] impl Clone for Iter<'_, K> { + #[inline] fn clone(&self) -> Self { Iter { iter: self.iter.clone() } } @@ -1121,15 +1230,18 @@ impl Clone for Iter<'_, K> { impl<'a, K> Iterator for Iter<'a, K> { type Item = &'a K; + #[inline] fn next(&mut self) -> Option<&'a K> { self.iter.next() } + #[inline] fn size_hint(&self) -> (usize, Option) { self.iter.size_hint() } } #[stable(feature = "rust1", since = "1.0.0")] impl ExactSizeIterator for Iter<'_, K> { + #[inline] fn len(&self) -> usize { self.iter.len() } @@ -1148,15 +1260,18 @@ impl fmt::Debug for Iter<'_, K> { impl Iterator for IntoIter { type Item = K; + #[inline] fn next(&mut self) -> Option { self.iter.next().map(|(k, _)| k) } + #[inline] fn size_hint(&self) -> (usize, Option) { self.iter.size_hint() } } #[stable(feature = "rust1", since = "1.0.0")] impl ExactSizeIterator for IntoIter { + #[inline] fn len(&self) -> usize { self.iter.len() } @@ -1168,7 +1283,6 @@ impl FusedIterator for IntoIter {} impl fmt::Debug for IntoIter { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let entries_iter = self.iter - .inner .iter() .map(|(k, _)| k); f.debug_list().entries(entries_iter).finish() @@ -1179,15 +1293,18 @@ impl fmt::Debug for IntoIter { impl<'a, K> Iterator for Drain<'a, K> { type Item = K; + #[inline] fn next(&mut self) -> Option { self.iter.next().map(|(k, _)| k) } + #[inline] fn size_hint(&self) -> (usize, Option) { self.iter.size_hint() } } #[stable(feature = "rust1", since = "1.0.0")] impl ExactSizeIterator for Drain<'_, K> { + #[inline] fn len(&self) -> usize { self.iter.len() } @@ -1199,7 +1316,6 @@ impl FusedIterator for Drain<'_, K> {} impl fmt::Debug for Drain<'_, K> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let entries_iter = self.iter - .inner .iter() .map(|(k, _)| k); f.debug_list().entries(entries_iter).finish() @@ -1208,6 +1324,7 @@ impl fmt::Debug for Drain<'_, K> { #[stable(feature = "rust1", since = "1.0.0")] impl Clone for Intersection<'_, T, S> { + #[inline] fn clone(&self) -> Self { Intersection { iter: self.iter.clone(), ..*self } } @@ -1220,6 +1337,7 @@ impl<'a, T, S> Iterator for Intersection<'a, T, S> { type Item = &'a T; + #[inline] fn next(&mut self) -> Option<&'a T> { loop { let elt = self.iter.next()?; @@ -1229,6 +1347,7 @@ impl<'a, T, S> Iterator for Intersection<'a, T, S> } } + #[inline] fn size_hint(&self) -> (usize, Option) { let (_, upper) = self.iter.size_hint(); (0, upper) @@ -1254,6 +1373,7 @@ impl FusedIterator for Intersection<'_, T, S> #[stable(feature = "rust1", since = "1.0.0")] impl Clone for Difference<'_, T, S> { + #[inline] fn clone(&self) -> Self { Difference { iter: self.iter.clone(), ..*self } } @@ -1266,6 +1386,7 @@ impl<'a, T, S> Iterator for Difference<'a, T, S> { type Item = &'a T; + #[inline] fn next(&mut self) -> Option<&'a T> { loop { let elt = self.iter.next()?; @@ -1275,6 +1396,7 @@ impl<'a, T, S> Iterator for Difference<'a, T, S> } } + #[inline] fn size_hint(&self) -> (usize, Option) { let (_, upper) = self.iter.size_hint(); (0, upper) @@ -1300,6 +1422,7 @@ impl fmt::Debug for Difference<'_, T, S> #[stable(feature = "rust1", since = "1.0.0")] impl Clone for SymmetricDifference<'_, T, S> { + #[inline] fn clone(&self) -> Self { SymmetricDifference { iter: self.iter.clone() } } @@ -1312,9 +1435,11 @@ impl<'a, T, S> Iterator for SymmetricDifference<'a, T, S> { type Item = &'a T; + #[inline] fn next(&mut self) -> Option<&'a T> { self.iter.next() } + #[inline] fn size_hint(&self) -> (usize, Option) { self.iter.size_hint() } @@ -1339,6 +1464,7 @@ impl fmt::Debug for SymmetricDifference<'_, T, S> #[stable(feature = "rust1", since = "1.0.0")] impl Clone for Union<'_, T, S> { + #[inline] fn clone(&self) -> Self { Union { iter: self.iter.clone() } } @@ -1368,9 +1494,11 @@ impl<'a, T, S> Iterator for Union<'a, T, S> { type Item = &'a T; + #[inline] fn next(&mut self) -> Option<&'a T> { self.iter.next() } + #[inline] fn size_hint(&self) -> (usize, Option) { self.iter.size_hint() } diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs deleted file mode 100644 index 2113b44891..0000000000 --- a/src/libstd/collections/hash/table.rs +++ /dev/null @@ -1,1131 +0,0 @@ -use crate::alloc::{Global, Alloc, Layout, LayoutErr, handle_alloc_error}; -use crate::collections::CollectionAllocErr; -use crate::hash::{BuildHasher, Hash, Hasher}; -use crate::marker; -use crate::mem::{self, size_of, needs_drop}; -use crate::ops::{Deref, DerefMut}; -use crate::ptr::{self, Unique, NonNull}; -use crate::hint; - -use self::BucketState::*; - -/// Integer type used for stored hash values. -/// -/// No more than bit_width(usize) bits are needed to select a bucket. -/// -/// The most significant bit is ours to use for tagging `SafeHash`. -/// -/// (Even if we could have usize::MAX bytes allocated for buckets, -/// each bucket stores at least a `HashUint`, so there can be no more than -/// usize::MAX / size_of(usize) buckets.) -type HashUint = usize; - -const EMPTY_BUCKET: HashUint = 0; -const EMPTY: usize = 1; - -/// Special `Unique` that uses the lower bit of the pointer -/// to expose a boolean tag. -/// Note: when the pointer is initialized to EMPTY `.ptr()` will return -/// null and the tag functions shouldn't be used. -struct TaggedHashUintPtr(Unique); - -impl TaggedHashUintPtr { - #[inline] - unsafe fn new(ptr: *mut HashUint) -> Self { - debug_assert!(ptr as usize & 1 == 0 || ptr as usize == EMPTY as usize); - TaggedHashUintPtr(Unique::new_unchecked(ptr)) - } - - #[inline] - fn set_tag(&mut self, value: bool) { - let mut usize_ptr = self.0.as_ptr() as usize; - unsafe { - if value { - usize_ptr |= 1; - } else { - usize_ptr &= !1; - } - self.0 = Unique::new_unchecked(usize_ptr as *mut HashUint) - } - } - - #[inline] - fn tag(&self) -> bool { - (self.0.as_ptr() as usize) & 1 == 1 - } - - #[inline] - fn ptr(&self) -> *mut HashUint { - (self.0.as_ptr() as usize & !1) as *mut HashUint - } -} - -/// The raw hashtable, providing safe-ish access to the unzipped and highly -/// optimized arrays of hashes, and key-value pairs. -/// -/// This design is a lot faster than the naive -/// `Vec>`, because we don't pay for the overhead of an -/// option on every element, and we get a generally more cache-aware design. -/// -/// Essential invariants of this structure: -/// -/// - if `t.hashes[i] == EMPTY_BUCKET`, then `Bucket::at_index(&t, i).raw` -/// points to 'undefined' contents. Don't read from it. This invariant is -/// enforced outside this module with the `EmptyBucket`, `FullBucket`, -/// and `SafeHash` types. -/// -/// - An `EmptyBucket` is only constructed at an index with -/// a hash of EMPTY_BUCKET. -/// -/// - A `FullBucket` is only constructed at an index with a -/// non-EMPTY_BUCKET hash. -/// -/// - A `SafeHash` is only constructed for non-`EMPTY_BUCKET` hash. We get -/// around hashes of zero by changing them to 0x8000_0000_0000_0000, -/// which will likely map to the same bucket, while not being confused -/// with "empty". -/// -/// - Both "arrays represented by pointers" are the same length: -/// `capacity`. This is set at creation and never changes. The arrays -/// are unzipped and are more cache aware (scanning through 8 hashes -/// brings in at most 2 cache lines, since they're all right beside each -/// other). This layout may waste space in padding such as in a map from -/// u64 to u8, but is a more cache conscious layout as the key-value pairs -/// are only very shortly probed and the desired value will be in the same -/// or next cache line. -/// -/// You can kind of think of this module/data structure as a safe wrapper -/// around just the "table" part of the hashtable. It enforces some -/// invariants at the type level and employs some performance trickery, -/// but in general is just a tricked out `Vec>`. -/// -/// The hashtable also exposes a special boolean tag. The tag defaults to false -/// when the RawTable is created and is accessible with the `tag` and `set_tag` -/// functions. -pub struct RawTable { - capacity_mask: usize, - size: usize, - hashes: TaggedHashUintPtr, - - // Because K/V do not appear directly in any of the types in the struct, - // inform rustc that in fact instances of K and V are reachable from here. - marker: marker::PhantomData<(K, V)>, -} - -// An unsafe view of a RawTable bucket -// Valid indexes are within [0..table_capacity) -pub struct RawBucket { - hash_start: *mut HashUint, - // We use *const to ensure covariance with respect to K and V - pair_start: *const (K, V), - idx: usize, - _marker: marker::PhantomData<(K, V)>, -} - -impl Copy for RawBucket {} -impl Clone for RawBucket { - fn clone(&self) -> RawBucket { - *self - } -} - -pub struct Bucket { - raw: RawBucket, - table: M, -} - -impl Copy for Bucket {} -impl Clone for Bucket { - fn clone(&self) -> Bucket { - *self - } -} - -pub struct EmptyBucket { - raw: RawBucket, - table: M, -} - -pub struct FullBucket { - raw: RawBucket, - table: M, -} - -pub type FullBucketMut<'table, K, V> = FullBucket>; - -pub enum BucketState { - Empty(EmptyBucket), - Full(FullBucket), -} - -// A GapThenFull encapsulates the state of two consecutive buckets at once. -// The first bucket, called the gap, is known to be empty. -// The second bucket is full. -pub struct GapThenFull { - gap: EmptyBucket, - full: FullBucket, -} - -/// A hash that is not zero, since we use a hash of zero to represent empty -/// buckets. -#[derive(PartialEq, Copy, Clone)] -pub struct SafeHash { - hash: HashUint, -} - -impl SafeHash { - /// Peek at the hash value, which is guaranteed to be non-zero. - #[inline(always)] - pub fn inspect(&self) -> HashUint { - self.hash - } - - #[inline(always)] - pub fn new(hash: u64) -> Self { - // We need to avoid 0 in order to prevent collisions with - // EMPTY_HASH. We can maintain our precious uniform distribution - // of initial indexes by unconditionally setting the MSB, - // effectively reducing the hashes by one bit. - // - // Truncate hash to fit in `HashUint`. - let hash_bits = size_of::() * 8; - SafeHash { hash: (1 << (hash_bits - 1)) | (hash as HashUint) } - } -} - -/// We need to remove hashes of 0. That's reserved for empty buckets. -/// This function wraps up `hash_keyed` to be the only way outside this -/// module to generate a SafeHash. -pub fn make_hash(hash_state: &S, t: &T) -> SafeHash - where T: Hash, - S: BuildHasher -{ - let mut state = hash_state.build_hasher(); - t.hash(&mut state); - SafeHash::new(state.finish()) -} - -// `replace` casts a `*HashUint` to a `*SafeHash`. Since we statically -// ensure that a `FullBucket` points to an index with a non-zero hash, -// and a `SafeHash` is just a `HashUint` with a different name, this is -// safe. -// -// This test ensures that a `SafeHash` really IS the same size as a -// `HashUint`. If you need to change the size of `SafeHash` (and -// consequently made this test fail), `replace` needs to be -// modified to no longer assume this. -#[test] -fn can_alias_safehash_as_hash() { - assert_eq!(size_of::(), size_of::()) -} - -// RawBucket methods are unsafe as it's possible to -// make a RawBucket point to invalid memory using safe code. -impl RawBucket { - unsafe fn hash(&self) -> *mut HashUint { - self.hash_start.add(self.idx) - } - unsafe fn pair(&self) -> *mut (K, V) { - self.pair_start.add(self.idx) as *mut (K, V) - } - unsafe fn hash_pair(&self) -> (*mut HashUint, *mut (K, V)) { - (self.hash(), self.pair()) - } -} - -// Buckets hold references to the table. -impl FullBucket { - /// Borrow a reference to the table. - pub fn table(&self) -> &M { - &self.table - } - /// Borrow a mutable reference to the table. - pub fn table_mut(&mut self) -> &mut M { - &mut self.table - } - /// Move out the reference to the table. - pub fn into_table(self) -> M { - self.table - } - /// Gets the raw index. - pub fn index(&self) -> usize { - self.raw.idx - } - /// Gets the raw bucket. - pub fn raw(&self) -> RawBucket { - self.raw - } -} - -impl EmptyBucket { - /// Borrow a reference to the table. - pub fn table(&self) -> &M { - &self.table - } - /// Borrow a mutable reference to the table. - pub fn table_mut(&mut self) -> &mut M { - &mut self.table - } -} - -impl Bucket { - /// Gets the raw index. - pub fn index(&self) -> usize { - self.raw.idx - } - /// get the table. - pub fn into_table(self) -> M { - self.table - } -} - -impl Deref for FullBucket - where M: Deref> -{ - type Target = RawTable; - fn deref(&self) -> &RawTable { - &self.table - } -} - -/// `Put` is implemented for types which provide access to a table and cannot be invalidated -/// by filling a bucket. A similar implementation for `Take` is possible. -pub trait Put { - unsafe fn borrow_table_mut(&mut self) -> &mut RawTable; -} - - -impl Put for &mut RawTable { - unsafe fn borrow_table_mut(&mut self) -> &mut RawTable { - *self - } -} - -impl Put for Bucket - where M: Put -{ - unsafe fn borrow_table_mut(&mut self) -> &mut RawTable { - self.table.borrow_table_mut() - } -} - -impl Put for FullBucket - where M: Put -{ - unsafe fn borrow_table_mut(&mut self) -> &mut RawTable { - self.table.borrow_table_mut() - } -} - -impl>> Bucket { - #[inline] - pub fn new(table: M, hash: SafeHash) -> Bucket { - Bucket::at_index(table, hash.inspect() as usize) - } - - pub fn new_from(r: RawBucket, t: M) - -> Bucket - { - Bucket { - raw: r, - table: t, - } - } - - #[inline] - pub fn at_index(table: M, ib_index: usize) -> Bucket { - // if capacity is 0, then the RawBucket will be populated with bogus pointers. - // This is an uncommon case though, so avoid it in release builds. - debug_assert!(table.capacity() > 0, - "Table should have capacity at this point"); - let ib_index = ib_index & table.capacity_mask; - Bucket { - raw: table.raw_bucket_at(ib_index), - table, - } - } - - pub fn first(table: M) -> Bucket { - Bucket { - raw: table.raw_bucket_at(0), - table, - } - } - - // "So a few of the first shall be last: for many be called, - // but few chosen." - // - // We'll most likely encounter a few buckets at the beginning that - // have their initial buckets near the end of the table. They were - // placed at the beginning as the probe wrapped around the table - // during insertion. We must skip forward to a bucket that won't - // get reinserted too early and won't unfairly steal others spot. - // This eliminates the need for robin hood. - pub fn head_bucket(table: M) -> Bucket { - let mut bucket = Bucket::first(table); - - loop { - bucket = match bucket.peek() { - Full(full) => { - if full.displacement() == 0 { - // This bucket occupies its ideal spot. - // It indicates the start of another "cluster". - bucket = full.into_bucket(); - break; - } - // Leaving this bucket in the last cluster for later. - full.into_bucket() - } - Empty(b) => { - // Encountered a hole between clusters. - b.into_bucket() - } - }; - bucket.next(); - } - bucket - } - - /// Reads a bucket at a given index, returning an enum indicating whether - /// it's initialized or not. You need to match on this enum to get - /// the appropriate types to call most of the other functions in - /// this module. - pub fn peek(self) -> BucketState { - match unsafe { *self.raw.hash() } { - EMPTY_BUCKET => { - Empty(EmptyBucket { - raw: self.raw, - table: self.table, - }) - } - _ => { - Full(FullBucket { - raw: self.raw, - table: self.table, - }) - } - } - } - - /// Modifies the bucket in place to make it point to the next slot. - pub fn next(&mut self) { - self.raw.idx = self.raw.idx.wrapping_add(1) & self.table.capacity_mask; - } - - /// Modifies the bucket in place to make it point to the previous slot. - pub fn prev(&mut self) { - self.raw.idx = self.raw.idx.wrapping_sub(1) & self.table.capacity_mask; - } -} - -impl>> EmptyBucket { - #[inline] - pub fn next(self) -> Bucket { - let mut bucket = self.into_bucket(); - bucket.next(); - bucket - } - - #[inline] - pub fn into_bucket(self) -> Bucket { - Bucket { - raw: self.raw, - table: self.table, - } - } - - pub fn gap_peek(self) -> Result, Bucket> { - let gap = EmptyBucket { - raw: self.raw, - table: (), - }; - - match self.next().peek() { - Full(bucket) => { - Ok(GapThenFull { - gap, - full: bucket, - }) - } - Empty(e) => Err(e.into_bucket()), - } - } -} - -impl EmptyBucket - where M: Put -{ - /// Puts given key and value pair, along with the key's hash, - /// into this bucket in the hashtable. Note how `self` is 'moved' into - /// this function, because this slot will no longer be empty when - /// we return! A `FullBucket` is returned for later use, pointing to - /// the newly-filled slot in the hashtable. - /// - /// Use `make_hash` to construct a `SafeHash` to pass to this function. - pub fn put(mut self, hash: SafeHash, key: K, value: V) -> FullBucket { - unsafe { - *self.raw.hash() = hash.inspect(); - ptr::write(self.raw.pair(), (key, value)); - - self.table.borrow_table_mut().size += 1; - } - - FullBucket { - raw: self.raw, - table: self.table, - } - } -} - -impl>> FullBucket { - #[inline] - pub fn next(self) -> Bucket { - let mut bucket = self.into_bucket(); - bucket.next(); - bucket - } - - #[inline] - pub fn into_bucket(self) -> Bucket { - Bucket { - raw: self.raw, - table: self.table, - } - } - - /// Duplicates the current position. This can be useful for operations - /// on two or more buckets. - pub fn stash(self) -> FullBucket { - FullBucket { - raw: self.raw, - table: self, - } - } - - /// Gets the distance between this bucket and the 'ideal' location - /// as determined by the key's hash stored in it. - /// - /// In the cited blog posts above, this is called the "distance to - /// initial bucket", or DIB. Also known as "probe count". - pub fn displacement(&self) -> usize { - // Calculates the distance one has to travel when going from - // `hash mod capacity` onwards to `idx mod capacity`, wrapping around - // if the destination is not reached before the end of the table. - (self.raw.idx.wrapping_sub(self.hash().inspect() as usize)) & self.table.capacity_mask - } - - #[inline] - pub fn hash(&self) -> SafeHash { - unsafe { SafeHash { hash: *self.raw.hash() } } - } - - /// Gets references to the key and value at a given index. - pub fn read(&self) -> (&K, &V) { - unsafe { - let pair_ptr = self.raw.pair(); - (&(*pair_ptr).0, &(*pair_ptr).1) - } - } -} - -// We take a mutable reference to the table instead of accepting anything that -// implements `DerefMut` to prevent fn `take` from being called on `stash`ed -// buckets. -impl<'t, K, V> FullBucket> { - /// Removes this bucket's key and value from the hashtable. - /// - /// This works similarly to `put`, building an `EmptyBucket` out of the - /// taken bucket. - pub fn take(self) -> (EmptyBucket>, K, V) { - self.table.size -= 1; - - unsafe { - *self.raw.hash() = EMPTY_BUCKET; - let (k, v) = ptr::read(self.raw.pair()); - (EmptyBucket { - raw: self.raw, - table: self.table, - }, - k, - v) - } - } -} - -// This use of `Put` is misleading and restrictive, but safe and sufficient for our use cases -// where `M` is a full bucket or table reference type with mutable access to the table. -impl FullBucket - where M: Put -{ - pub fn replace(&mut self, h: SafeHash, k: K, v: V) -> (SafeHash, K, V) { - unsafe { - let old_hash = ptr::replace(self.raw.hash() as *mut SafeHash, h); - let (old_key, old_val) = ptr::replace(self.raw.pair(), (k, v)); - - (old_hash, old_key, old_val) - } - } -} - -impl FullBucket - where M: Deref> + DerefMut -{ - /// Gets mutable references to the key and value at a given index. - pub fn read_mut(&mut self) -> (&mut K, &mut V) { - unsafe { - let pair_ptr = self.raw.pair(); - (&mut (*pair_ptr).0, &mut (*pair_ptr).1) - } - } -} - -impl<'t, K, V, M> FullBucket - where M: Deref> + 't -{ - /// Exchange a bucket state for immutable references into the table. - /// Because the underlying reference to the table is also consumed, - /// no further changes to the structure of the table are possible; - /// in exchange for this, the returned references have a longer lifetime - /// than the references returned by `read()`. - pub fn into_refs(self) -> (&'t K, &'t V) { - unsafe { - let pair_ptr = self.raw.pair(); - (&(*pair_ptr).0, &(*pair_ptr).1) - } - } -} - -impl<'t, K, V, M> FullBucket - where M: Deref> + DerefMut + 't -{ - /// This works similarly to `into_refs`, exchanging a bucket state - /// for mutable references into the table. - pub fn into_mut_refs(self) -> (&'t mut K, &'t mut V) { - unsafe { - let pair_ptr = self.raw.pair(); - (&mut (*pair_ptr).0, &mut (*pair_ptr).1) - } - } -} - -impl GapThenFull - where M: Deref> -{ - #[inline] - pub fn full(&self) -> &FullBucket { - &self.full - } - - pub fn into_table(self) -> M { - self.full.into_table() - } - - pub fn shift(mut self) -> Result, Bucket> { - unsafe { - let (gap_hash, gap_pair) = self.gap.raw.hash_pair(); - let (full_hash, full_pair) = self.full.raw.hash_pair(); - *gap_hash = mem::replace(&mut *full_hash, EMPTY_BUCKET); - ptr::copy_nonoverlapping(full_pair, gap_pair, 1); - } - - let FullBucket { raw: prev_raw, .. } = self.full; - - match self.full.next().peek() { - Full(bucket) => { - self.gap.raw = prev_raw; - - self.full = bucket; - - Ok(self) - } - Empty(b) => Err(b.into_bucket()), - } - } -} - -// Returns a Layout which describes the allocation required for a hash table, -// and the offset of the array of (key, value) pairs in the allocation. -#[inline(always)] -fn calculate_layout(capacity: usize) -> Result<(Layout, usize), LayoutErr> { - let hashes = Layout::array::(capacity)?; - let pairs = Layout::array::<(K, V)>(capacity)?; - hashes.extend(pairs).map(|(layout, _)| { - // LLVM seems to have trouble properly const-propagating pairs.align(), - // possibly due to the use of NonZeroUsize. This little hack allows it - // to generate optimal code. - // - // See https://github.com/rust-lang/rust/issues/51346 for more details. - ( - layout, - hashes.size() + hashes.padding_needed_for(mem::align_of::<(K, V)>()), - ) - }) -} - -pub(crate) enum Fallibility { - Fallible, - Infallible, -} - -use self::Fallibility::*; - -impl RawTable { - /// Does not initialize the buckets. The caller should ensure they, - /// at the very least, set every hash to EMPTY_BUCKET. - /// Returns an error if it cannot allocate or capacity overflows. - unsafe fn new_uninitialized_internal( - capacity: usize, - fallibility: Fallibility, - ) -> Result, CollectionAllocErr> { - if capacity == 0 { - return Ok(RawTable { - size: 0, - capacity_mask: capacity.wrapping_sub(1), - hashes: TaggedHashUintPtr::new(EMPTY as *mut HashUint), - marker: marker::PhantomData, - }); - } - - // Allocating hashmaps is a little tricky. We need to allocate two - // arrays, but since we know their sizes and alignments up front, - // we just allocate a single array, and then have the subarrays - // point into it. - let (layout, _) = calculate_layout::(capacity)?; - let buffer = Global.alloc(layout).map_err(|e| match fallibility { - Infallible => handle_alloc_error(layout), - Fallible => e, - })?; - - Ok(RawTable { - capacity_mask: capacity.wrapping_sub(1), - size: 0, - hashes: TaggedHashUintPtr::new(buffer.cast().as_ptr()), - marker: marker::PhantomData, - }) - } - - /// Does not initialize the buckets. The caller should ensure they, - /// at the very least, set every hash to EMPTY_BUCKET. - unsafe fn new_uninitialized(capacity: usize) -> RawTable { - match Self::new_uninitialized_internal(capacity, Infallible) { - Err(CollectionAllocErr::CapacityOverflow) => panic!("capacity overflow"), - Err(CollectionAllocErr::AllocErr) => unreachable!(), - Ok(table) => { table } - } - } - - #[inline(always)] - fn raw_bucket_at(&self, index: usize) -> RawBucket { - let (_, pairs_offset) = calculate_layout::(self.capacity()) - .unwrap_or_else(|_| unsafe { hint::unreachable_unchecked() }); - let buffer = self.hashes.ptr() as *mut u8; - unsafe { - RawBucket { - hash_start: buffer as *mut HashUint, - pair_start: buffer.add(pairs_offset) as *const (K, V), - idx: index, - _marker: marker::PhantomData, - } - } - } - - #[inline] - fn new_internal( - capacity: usize, - fallibility: Fallibility, - ) -> Result, CollectionAllocErr> { - unsafe { - let ret = RawTable::new_uninitialized_internal(capacity, fallibility)?; - if capacity > 0 { - ptr::write_bytes(ret.hashes.ptr(), 0, capacity); - } - Ok(ret) - } - } - - /// Tries to create a new raw table from a given capacity. If it cannot allocate, - /// it returns with AllocErr. - #[inline] - pub fn try_new(capacity: usize) -> Result, CollectionAllocErr> { - Self::new_internal(capacity, Fallible) - } - - /// Creates a new raw table from a given capacity. All buckets are - /// initially empty. - #[inline] - pub fn new(capacity: usize) -> RawTable { - match Self::new_internal(capacity, Infallible) { - Err(CollectionAllocErr::CapacityOverflow) => panic!("capacity overflow"), - Err(CollectionAllocErr::AllocErr) => unreachable!(), - Ok(table) => { table } - } - } - - /// The hashtable's capacity, similar to a vector's. - pub fn capacity(&self) -> usize { - self.capacity_mask.wrapping_add(1) - } - - /// The number of elements ever `put` in the hashtable, minus the number - /// of elements ever `take`n. - pub fn size(&self) -> usize { - self.size - } - - fn raw_buckets(&self) -> RawBuckets<'_, K, V> { - RawBuckets { - raw: self.raw_bucket_at(0), - elems_left: self.size, - marker: marker::PhantomData, - } - } - - pub fn iter(&self) -> Iter<'_, K, V> { - Iter { - iter: self.raw_buckets(), - } - } - - pub fn iter_mut(&mut self) -> IterMut<'_, K, V> { - IterMut { - iter: self.raw_buckets(), - _marker: marker::PhantomData, - } - } - - pub fn into_iter(self) -> IntoIter { - let RawBuckets { raw, elems_left, .. } = self.raw_buckets(); - // Replace the marker regardless of lifetime bounds on parameters. - IntoIter { - iter: RawBuckets { - raw, - elems_left, - marker: marker::PhantomData, - }, - table: self, - } - } - - pub fn drain(&mut self) -> Drain<'_, K, V> { - let RawBuckets { raw, elems_left, .. } = self.raw_buckets(); - // Replace the marker regardless of lifetime bounds on parameters. - Drain { - iter: RawBuckets { - raw, - elems_left, - marker: marker::PhantomData, - }, - table: NonNull::from(self), - marker: marker::PhantomData, - } - } - - /// Drops buckets in reverse order. It leaves the table in an inconsistent - /// state and should only be used for dropping the table's remaining - /// entries. It's used in the implementation of Drop. - unsafe fn rev_drop_buckets(&mut self) { - // initialize the raw bucket past the end of the table - let mut raw = self.raw_bucket_at(self.capacity()); - let mut elems_left = self.size; - - while elems_left != 0 { - raw.idx -= 1; - - if *raw.hash() != EMPTY_BUCKET { - elems_left -= 1; - ptr::drop_in_place(raw.pair()); - } - } - } - - /// Sets the table tag. - pub fn set_tag(&mut self, value: bool) { - self.hashes.set_tag(value) - } - - /// Gets the table tag. - pub fn tag(&self) -> bool { - self.hashes.tag() - } -} - -/// A raw iterator. The basis for some other iterators in this module. Although -/// this interface is safe, it's not used outside this module. -struct RawBuckets<'a, K, V> { - raw: RawBucket, - elems_left: usize, - - // Strictly speaking, this should be &'a (K,V), but that would - // require that K:'a, and we often use RawBuckets<'static...> for - // move iterations, so that messes up a lot of other things. So - // just use `&'a (K,V)` as this is not a publicly exposed type - // anyway. - marker: marker::PhantomData<&'a ()>, -} - -// FIXME(#26925) Remove in favor of `#[derive(Clone)]` -impl Clone for RawBuckets<'_, K, V> { - fn clone(&self) -> Self { - RawBuckets { - raw: self.raw, - elems_left: self.elems_left, - marker: marker::PhantomData, - } - } -} - - -impl<'a, K, V> Iterator for RawBuckets<'a, K, V> { - type Item = RawBucket; - - fn next(&mut self) -> Option> { - if self.elems_left == 0 { - return None; - } - - loop { - unsafe { - let item = self.raw; - self.raw.idx += 1; - if *item.hash() != EMPTY_BUCKET { - self.elems_left -= 1; - return Some(item); - } - } - } - } - - fn size_hint(&self) -> (usize, Option) { - (self.elems_left, Some(self.elems_left)) - } -} - -impl ExactSizeIterator for RawBuckets<'_, K, V> { - fn len(&self) -> usize { - self.elems_left - } -} - -/// Iterator over shared references to entries in a table. -pub struct Iter<'a, K: 'a, V: 'a> { - iter: RawBuckets<'a, K, V>, -} - -unsafe impl Sync for Iter<'_, K, V> {} -unsafe impl Send for Iter<'_, K, V> {} - -// FIXME(#26925) Remove in favor of `#[derive(Clone)]` -impl Clone for Iter<'_, K, V> { - fn clone(&self) -> Self { - Iter { - iter: self.iter.clone(), - } - } -} - -/// Iterator over mutable references to entries in a table. -pub struct IterMut<'a, K: 'a, V: 'a> { - iter: RawBuckets<'a, K, V>, - // To ensure invariance with respect to V - _marker: marker::PhantomData<&'a mut V>, -} - -unsafe impl Sync for IterMut<'_, K, V> {} -// Both K: Sync and K: Send are correct for IterMut's Send impl, -// but Send is the more useful bound -unsafe impl Send for IterMut<'_, K, V> {} - -impl<'a, K: 'a, V: 'a> IterMut<'a, K, V> { - pub fn iter(&self) -> Iter<'_, K, V> { - Iter { - iter: self.iter.clone(), - } - } -} - -/// Iterator over the entries in a table, consuming the table. -pub struct IntoIter { - table: RawTable, - iter: RawBuckets<'static, K, V>, -} - -unsafe impl Sync for IntoIter {} -unsafe impl Send for IntoIter {} - -impl IntoIter { - pub fn iter(&self) -> Iter<'_, K, V> { - Iter { - iter: self.iter.clone(), - } - } -} - -/// Iterator over the entries in a table, clearing the table. -pub struct Drain<'a, K: 'a, V: 'a> { - table: NonNull>, - iter: RawBuckets<'static, K, V>, - marker: marker::PhantomData<&'a RawTable>, -} - -unsafe impl Sync for Drain<'_, K, V> {} -unsafe impl Send for Drain<'_, K, V> {} - -impl<'a, K, V> Drain<'a, K, V> { - pub fn iter(&self) -> Iter<'_, K, V> { - Iter { - iter: self.iter.clone(), - } - } -} - -impl<'a, K, V> Iterator for Iter<'a, K, V> { - type Item = (&'a K, &'a V); - - fn next(&mut self) -> Option<(&'a K, &'a V)> { - self.iter.next().map(|raw| unsafe { - let pair_ptr = raw.pair(); - (&(*pair_ptr).0, &(*pair_ptr).1) - }) - } - - fn size_hint(&self) -> (usize, Option) { - self.iter.size_hint() - } -} - -impl ExactSizeIterator for Iter<'_, K, V> { - fn len(&self) -> usize { - self.iter.len() - } -} - -impl<'a, K, V> Iterator for IterMut<'a, K, V> { - type Item = (&'a K, &'a mut V); - - fn next(&mut self) -> Option<(&'a K, &'a mut V)> { - self.iter.next().map(|raw| unsafe { - let pair_ptr = raw.pair(); - (&(*pair_ptr).0, &mut (*pair_ptr).1) - }) - } - - fn size_hint(&self) -> (usize, Option) { - self.iter.size_hint() - } -} - -impl ExactSizeIterator for IterMut<'_, K, V> { - fn len(&self) -> usize { - self.iter.len() - } -} - -impl Iterator for IntoIter { - type Item = (SafeHash, K, V); - - fn next(&mut self) -> Option<(SafeHash, K, V)> { - self.iter.next().map(|raw| { - self.table.size -= 1; - unsafe { - let (k, v) = ptr::read(raw.pair()); - (SafeHash { hash: *raw.hash() }, k, v) - } - }) - } - - fn size_hint(&self) -> (usize, Option) { - self.iter.size_hint() - } -} - -impl ExactSizeIterator for IntoIter { - fn len(&self) -> usize { - self.iter().len() - } -} - -impl<'a, K, V> Iterator for Drain<'a, K, V> { - type Item = (SafeHash, K, V); - - #[inline] - fn next(&mut self) -> Option<(SafeHash, K, V)> { - self.iter.next().map(|raw| { - unsafe { - self.table.as_mut().size -= 1; - let (k, v) = ptr::read(raw.pair()); - (SafeHash { hash: ptr::replace(&mut *raw.hash(), EMPTY_BUCKET) }, k, v) - } - }) - } - - fn size_hint(&self) -> (usize, Option) { - self.iter.size_hint() - } -} - -impl ExactSizeIterator for Drain<'_, K, V> { - fn len(&self) -> usize { - self.iter.len() - } -} - -impl Drop for Drain<'_, K, V> { - fn drop(&mut self) { - self.for_each(drop); - } -} - -impl Clone for RawTable { - fn clone(&self) -> RawTable { - unsafe { - let cap = self.capacity(); - let mut new_ht = RawTable::new_uninitialized(cap); - - let mut new_buckets = new_ht.raw_bucket_at(0); - let mut buckets = self.raw_bucket_at(0); - while buckets.idx < cap { - *new_buckets.hash() = *buckets.hash(); - if *new_buckets.hash() != EMPTY_BUCKET { - let pair_ptr = buckets.pair(); - let kv = ((*pair_ptr).0.clone(), (*pair_ptr).1.clone()); - ptr::write(new_buckets.pair(), kv); - } - buckets.idx += 1; - new_buckets.idx += 1; - } - - new_ht.size = self.size(); - new_ht.set_tag(self.tag()); - - new_ht - } - } -} - -unsafe impl<#[may_dangle] K, #[may_dangle] V> Drop for RawTable { - fn drop(&mut self) { - if self.capacity() == 0 { - return; - } - - // This is done in reverse because we've likely partially taken - // some elements out with `.into_iter()` from the front. - // Check if the size is 0, so we don't do a useless scan when - // dropping empty tables such as on resize. - // Also avoid double drop of elements that have been already moved out. - unsafe { - if needs_drop::<(K, V)>() { - // avoid linear runtime for types that don't need drop - self.rev_drop_buckets(); - } - } - - let (layout, _) = calculate_layout::(self.capacity()) - .unwrap_or_else(|_| unsafe { hint::unreachable_unchecked() }); - unsafe { - Global.dealloc(NonNull::new_unchecked(self.hashes.ptr()).cast(), layout); - // Remember how everything was allocated out of one buffer - // during initialization? We only need one call to free here. - } - } -} diff --git a/src/libstd/collections/mod.rs b/src/libstd/collections/mod.rs index 286ce2d389..15c2532f8b 100644 --- a/src/libstd/collections/mod.rs +++ b/src/libstd/collections/mod.rs @@ -150,10 +150,9 @@ //! Any `with_capacity` constructor will instruct the collection to allocate //! enough space for the specified number of elements. Ideally this will be for //! exactly that many elements, but some implementation details may prevent -//! this. [`Vec`] and [`VecDeque`] can be relied on to allocate exactly the -//! requested amount, though. Use `with_capacity` when you know exactly how many -//! elements will be inserted, or at least have a reasonable upper-bound on that -//! number. +//! this. See collection-specific documentation for details. In general, use +//! `with_capacity` when you know exactly how many elements will be inserted, or +//! at least have a reasonable upper-bound on that number. //! //! When anticipating a large influx of elements, the `reserve` family of //! methods can be used to hint to the collection how much room it should make diff --git a/src/libstd/env.rs b/src/libstd/env.rs index 01b301cb43..9058ea93d6 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -359,9 +359,12 @@ fn _remove_var(k: &OsStr) { /// An iterator that splits an environment variable into paths according to /// platform-specific conventions. /// +/// The iterator element type is [`PathBuf`]. +/// /// This structure is created by the [`std::env::split_paths`] function. See its /// documentation for more. /// +/// [`PathBuf`]: ../../std/path/struct.PathBuf.html /// [`std::env::split_paths`]: fn.split_paths.html #[stable(feature = "env", since = "1.0.0")] pub struct SplitPaths<'a> { inner: os_imp::SplitPaths<'a> } @@ -369,7 +372,8 @@ pub struct SplitPaths<'a> { inner: os_imp::SplitPaths<'a> } /// Parses input according to platform conventions for the `PATH` /// environment variable. /// -/// Returns an iterator over the paths contained in `unparsed`. +/// Returns an iterator over the paths contained in `unparsed`. The iterator +/// element type is [`PathBuf`]. /// /// # Examples /// @@ -386,6 +390,8 @@ pub struct SplitPaths<'a> { inner: os_imp::SplitPaths<'a> } /// None => println!("{} is not defined in the environment.", key) /// } /// ``` +/// +/// [`PathBuf`]: ../../std/path/struct.PathBuf.html #[stable(feature = "env", since = "1.0.0")] pub fn split_paths + ?Sized>(unparsed: &T) -> SplitPaths<'_> { SplitPaths { inner: os_imp::split_paths(unparsed.as_ref()) } @@ -839,7 +845,6 @@ pub mod consts { /// - ios /// - freebsd /// - dragonfly - /// - bitrig /// - netbsd /// - openbsd /// - solaris diff --git a/src/libstd/error.rs b/src/libstd/error.rs index 7cb830e751..aeb822fa99 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -201,15 +201,25 @@ pub trait Error: Debug + Display { #[unstable(feature = "error_type_id", reason = "this is memory unsafe to override in user code", issue = "60784")] - fn type_id(&self) -> TypeId where Self: 'static { + fn type_id(&self, _: private::Internal) -> TypeId where Self: 'static { TypeId::of::() } } +mod private { + // This is a hack to prevent `type_id` from being overridden by `Error` + // implementations, since that can enable unsound downcasting. + #[unstable(feature = "error_type_id", issue = "60784")] + #[derive(Debug)] + pub struct Internal; +} + #[stable(feature = "rust1", since = "1.0.0")] impl<'a, E: Error + 'a> From for Box { /// Converts a type of [`Error`] into a box of dyn [`Error`]. /// + /// [`Error`]: ../error/trait.Error.html + /// /// # Examples /// /// ``` @@ -247,6 +257,8 @@ impl<'a, E: Error + Send + Sync + 'a> From for Box From for Box for Box { /// Converts a [`String`] into a box of dyn [`Error`] + [`Send`] + [`Sync`]. /// + /// [`Error`]: ../error/trait.Error.html + /// /// # Examples /// /// ``` @@ -321,6 +335,8 @@ impl From for Box { impl From for Box { /// Converts a [`String`] into a box of dyn [`Error`]. /// + /// [`Error`]: ../error/trait.Error.html + /// /// # Examples /// /// ``` @@ -342,6 +358,8 @@ impl From for Box { impl<'a> From<&str> for Box { /// Converts a [`str`] into a box of dyn [`Error`] + [`Send`] + [`Sync`]. /// + /// [`Error`]: ../error/trait.Error.html + /// /// # Examples /// /// ``` @@ -362,6 +380,8 @@ impl<'a> From<&str> for Box { impl From<&str> for Box { /// Converts a [`str`] into a box of dyn [`Error`]. /// + /// [`Error`]: ../error/trait.Error.html + /// /// # Examples /// /// ``` @@ -381,6 +401,9 @@ impl From<&str> for Box { impl<'a, 'b> From> for Box { /// Converts a [`Cow`] into a box of dyn [`Error`] + [`Send`] + [`Sync`]. /// + /// [`Cow`]: ../borrow/enum.Cow.html + /// [`Error`]: ../error/trait.Error.html + /// /// # Examples /// /// ``` @@ -402,6 +425,9 @@ impl<'a, 'b> From> for Box { impl<'a> From> for Box { /// Converts a [`Cow`] into a box of dyn [`Error`]. /// + /// [`Cow`]: ../borrow/enum.Cow.html + /// [`Error`]: ../error/trait.Error.html + /// /// # Examples /// /// ``` @@ -575,7 +601,7 @@ impl dyn Error + 'static { let t = TypeId::of::(); // Get TypeId of the type in the trait object - let boxed = self.type_id(); + let boxed = self.type_id(private::Internal); // Compare both TypeIds on equality t == boxed diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index f93583dff8..5c6c43017c 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -43,7 +43,9 @@ use crate::sys; /// `CString` implements a [`as_ptr`] method through the [`Deref`] /// trait. This method will give you a `*const c_char` which you can /// feed directly to extern functions that expect a nul-terminated -/// string, like C's `strdup()`. +/// string, like C's `strdup()`. Notice that [`as_ptr`] returns a +/// read-only pointer; if the C code writes to it, that causes +/// undefined behavior. /// /// # Extracting a slice of the whole C string /// @@ -61,7 +63,7 @@ use crate::sys; /// /// Once you have the kind of slice you need (with or without a nul /// terminator), you can call the slice's own -/// [`as_ptr`][slice.as_ptr] method to get a raw pointer to pass to +/// [`as_ptr`][slice.as_ptr] method to get a read-only raw pointer to pass to /// extern functions. See the documentation for that function for a /// discussion on ensuring the lifetime of the raw pointer. /// @@ -1043,6 +1045,9 @@ impl CStr { /// /// **WARNING** /// + /// The returned pointer is read-only; writing to it (including passing it + /// to C code that writes to it) causes undefined behavior. + /// /// It is your responsibility to make sure that the underlying memory is not /// freed too early. For example, the following code will cause undefined /// behavior when `ptr` is used inside the `unsafe` block: diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs index 13aee78375..c7c5849a00 100644 --- a/src/libstd/ffi/os_str.rs +++ b/src/libstd/ffi/os_str.rs @@ -351,6 +351,8 @@ impl From for OsString { /// Converts a [`String`] into a [`OsString`]. /// /// The conversion copies the data, and includes an allocation on the heap. + /// + /// [`OsString`]: ../../std/ffi/struct.OsString.html fn from(s: String) -> OsString { OsString { inner: Buf::from_string(s) } } diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 14ff4d72f8..616b5eb836 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -1,3 +1,5 @@ +// ignore-tidy-filelength + //! Filesystem manipulation operations. //! //! This module contains basic methods to manipulate the contents of the local @@ -9,7 +11,7 @@ use crate::fmt; use crate::ffi::OsString; -use crate::io::{self, SeekFrom, Seek, Read, Initializer, Write}; +use crate::io::{self, SeekFrom, Seek, Read, Initializer, Write, IoSlice, IoSliceMut}; use crate::path::{Path, PathBuf}; use crate::sys::fs as fs_imp; use crate::sys_common::{AsInnerMut, FromInner, AsInner, IntoInner}; @@ -615,6 +617,10 @@ impl Read for File { self.inner.read(buf) } + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + self.inner.read_vectored(bufs) + } + #[inline] unsafe fn initializer(&self) -> Initializer { Initializer::nop() @@ -625,6 +631,11 @@ impl Write for File { fn write(&mut self, buf: &[u8]) -> io::Result { self.inner.write(buf) } + + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { + self.inner.write_vectored(bufs) + } + fn flush(&mut self) -> io::Result<()> { self.inner.flush() } } #[stable(feature = "rust1", since = "1.0.0")] @@ -639,6 +650,10 @@ impl Read for &File { self.inner.read(buf) } + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + self.inner.read_vectored(bufs) + } + #[inline] unsafe fn initializer(&self) -> Initializer { Initializer::nop() @@ -649,6 +664,11 @@ impl Write for &File { fn write(&mut self, buf: &[u8]) -> io::Result { self.inner.write(buf) } + + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { + self.inner.write_vectored(bufs) + } + fn flush(&mut self) -> io::Result<()> { self.inner.flush() } } #[stable(feature = "rust1", since = "1.0.0")] @@ -883,8 +903,7 @@ impl OpenOptions { } fn _open(&self, path: &Path) -> io::Result { - let inner = fs_imp::File::open(path, &self.0)?; - Ok(File { inner }) + fs_imp::File::open(path, &self.0).map(|inner| File { inner }) } } @@ -1596,8 +1615,8 @@ pub fn rename, Q: AsRef>(from: P, to: Q) -> io::Result<()> /// `O_CLOEXEC` is set for returned file descriptors. /// On Windows, this function currently corresponds to `CopyFileEx`. Alternate /// NTFS streams are copied but only the size of the main stream is returned by -/// this function. On MacOS, this function corresponds to `copyfile` with -/// `COPYFILE_ALL`. +/// this function. On MacOS, this function corresponds to `fclonefileat` and +/// `fcopyfile`. /// Note that, this [may change in the future][changes]. /// /// [changes]: ../io/index.html#platform-specific-behavior @@ -1793,6 +1812,8 @@ pub fn canonicalize>(path: P) -> io::Result { /// function.) /// * `path` already exists. /// +/// [`create_dir_all`]: fn.create_dir_all.html +/// /// # Examples /// /// ```no_run diff --git a/src/libstd/future.rs b/src/libstd/future.rs index 898387cb9f..c18a314116 100644 --- a/src/libstd/future.rs +++ b/src/libstd/future.rs @@ -9,6 +9,7 @@ use core::task::{Context, Poll}; use core::ops::{Drop, Generator, GeneratorState}; #[doc(inline)] +#[stable(feature = "futures_api", since = "1.36.0")] pub use core::future::*; /// Wrap a generator in a future. diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index 3370a447fc..e309f81192 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -5,7 +5,8 @@ use crate::io::prelude::*; use crate::cmp; use crate::error; use crate::fmt; -use crate::io::{self, Initializer, DEFAULT_BUF_SIZE, Error, ErrorKind, SeekFrom, IoVec, IoVecMut}; +use crate::io::{self, Initializer, DEFAULT_BUF_SIZE, Error, ErrorKind, SeekFrom, IoSlice, + IoSliceMut}; use crate::memchr; /// The `BufReader` struct adds buffering to any reader. @@ -92,10 +93,10 @@ impl BufReader { /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] - pub fn with_capacity(cap: usize, inner: R) -> BufReader { + pub fn with_capacity(capacity: usize, inner: R) -> BufReader { unsafe { - let mut buffer = Vec::with_capacity(cap); - buffer.set_len(cap); + let mut buffer = Vec::with_capacity(capacity); + buffer.set_len(capacity); inner.initializer().initialize(&mut buffer); BufReader { inner, @@ -249,7 +250,7 @@ impl Read for BufReader { Ok(nread) } - fn read_vectored(&mut self, bufs: &mut [IoVecMut<'_>]) -> io::Result { + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { let total_len = bufs.iter().map(|b| b.len()).sum::(); if self.pos == self.cap && total_len >= self.buf.len() { self.discard_buffer(); @@ -477,10 +478,10 @@ impl BufWriter { /// let mut buffer = BufWriter::with_capacity(100, stream); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - pub fn with_capacity(cap: usize, inner: W) -> BufWriter { + pub fn with_capacity(capacity: usize, inner: W) -> BufWriter { BufWriter { inner: Some(inner), - buf: Vec::with_capacity(cap), + buf: Vec::with_capacity(capacity), panicked: false, } } @@ -601,7 +602,7 @@ impl Write for BufWriter { } if buf.len() >= self.buf.capacity() { self.panicked = true; - let r = self.inner.as_mut().unwrap().write(buf); + let r = self.get_mut().write(buf); self.panicked = false; r } else { @@ -609,14 +610,14 @@ impl Write for BufWriter { } } - fn write_vectored(&mut self, bufs: &[IoVec<'_>]) -> io::Result { + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { let total_len = bufs.iter().map(|b| b.len()).sum::(); if self.buf.len() + total_len > self.buf.capacity() { self.flush_buf()?; } if total_len >= self.buf.capacity() { self.panicked = true; - let r = self.inner.as_mut().unwrap().write_vectored(bufs); + let r = self.get_mut().write_vectored(bufs); self.panicked = false; r } else { @@ -753,7 +754,7 @@ impl fmt::Display for IntoInnerError { /// completed, rather than the entire buffer at once. Enter `LineWriter`. It /// does exactly that. /// -/// Like [`BufWriter`], a `LineWriter`’s buffer will also be flushed when the +/// Like [`BufWriter`][bufwriter], a `LineWriter`’s buffer will also be flushed when the /// `LineWriter` goes out of scope or when its internal buffer is full. /// /// [bufwriter]: struct.BufWriter.html @@ -851,9 +852,9 @@ impl LineWriter { /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] - pub fn with_capacity(cap: usize, inner: W) -> LineWriter { + pub fn with_capacity(capacity: usize, inner: W) -> LineWriter { LineWriter { - inner: BufWriter::with_capacity(cap, inner), + inner: BufWriter::with_capacity(capacity, inner), need_flush: false, } } diff --git a/src/libstd/io/cursor.rs b/src/libstd/io/cursor.rs index 247d45c3ec..a94176e710 100644 --- a/src/libstd/io/cursor.rs +++ b/src/libstd/io/cursor.rs @@ -1,7 +1,7 @@ use crate::io::prelude::*; use crate::cmp; -use crate::io::{self, Initializer, SeekFrom, Error, ErrorKind, IoVec, IoVecMut}; +use crate::io::{self, Initializer, SeekFrom, Error, ErrorKind, IoSlice, IoSliceMut}; use core::convert::TryInto; @@ -72,7 +72,7 @@ use core::convert::TryInto; /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct Cursor { inner: T, pos: u64, @@ -230,7 +230,7 @@ impl Read for Cursor where T: AsRef<[u8]> { Ok(n) } - fn read_vectored(&mut self, bufs: &mut [IoVecMut<'_>]) -> io::Result { + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { let mut nread = 0; for buf in bufs { let n = self.read(buf)?; @@ -265,6 +265,7 @@ impl BufRead for Cursor where T: AsRef<[u8]> { } // Non-resizing write implementation +#[inline] fn slice_write(pos_mut: &mut u64, slice: &mut [u8], buf: &[u8]) -> io::Result { let pos = cmp::min(*pos_mut, slice.len() as u64); let amt = (&mut slice[(pos as usize)..]).write(buf)?; @@ -272,10 +273,11 @@ fn slice_write(pos_mut: &mut u64, slice: &mut [u8], buf: &[u8]) -> io::Result], + bufs: &[IoSlice<'_>], ) -> io::Result { let mut nwritten = 0; @@ -319,7 +321,7 @@ fn vec_write(pos_mut: &mut u64, vec: &mut Vec, buf: &[u8]) -> io::Result, - bufs: &[IoVec<'_>], + bufs: &[IoSlice<'_>], ) -> io::Result { let mut nwritten = 0; @@ -337,10 +339,11 @@ impl Write for Cursor<&mut [u8]> { } #[inline] - fn write_vectored(&mut self, bufs: &[IoVec<'_>]) -> io::Result { + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { slice_write_vectored(&mut self.pos, self.inner, bufs) } + #[inline] fn flush(&mut self) -> io::Result<()> { Ok(()) } } @@ -350,10 +353,11 @@ impl Write for Cursor<&mut Vec> { vec_write(&mut self.pos, self.inner, buf) } - fn write_vectored(&mut self, bufs: &[IoVec<'_>]) -> io::Result { + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { vec_write_vectored(&mut self.pos, self.inner, bufs) } + #[inline] fn flush(&mut self) -> io::Result<()> { Ok(()) } } @@ -363,10 +367,11 @@ impl Write for Cursor> { vec_write(&mut self.pos, &mut self.inner, buf) } - fn write_vectored(&mut self, bufs: &[IoVec<'_>]) -> io::Result { + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { vec_write_vectored(&mut self.pos, &mut self.inner, bufs) } + #[inline] fn flush(&mut self) -> io::Result<()> { Ok(()) } } @@ -378,17 +383,18 @@ impl Write for Cursor> { } #[inline] - fn write_vectored(&mut self, bufs: &[IoVec<'_>]) -> io::Result { + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { slice_write_vectored(&mut self.pos, &mut self.inner, bufs) } + #[inline] fn flush(&mut self) -> io::Result<()> { Ok(()) } } #[cfg(test)] mod tests { use crate::io::prelude::*; - use crate::io::{Cursor, SeekFrom, IoVec, IoVecMut}; + use crate::io::{Cursor, SeekFrom, IoSlice, IoSliceMut}; #[test] fn test_vec_writer() { @@ -397,7 +403,7 @@ mod tests { assert_eq!(writer.write(&[1, 2, 3]).unwrap(), 3); assert_eq!(writer.write(&[4, 5, 6, 7]).unwrap(), 4); assert_eq!(writer.write_vectored( - &[IoVec::new(&[]), IoVec::new(&[8, 9]), IoVec::new(&[10])], + &[IoSlice::new(&[]), IoSlice::new(&[8, 9]), IoSlice::new(&[10])], ).unwrap(), 3); let b: &[_] = &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; assert_eq!(writer, b); @@ -410,7 +416,7 @@ mod tests { assert_eq!(writer.write(&[1, 2, 3]).unwrap(), 3); assert_eq!(writer.write(&[4, 5, 6, 7]).unwrap(), 4); assert_eq!(writer.write_vectored( - &[IoVec::new(&[]), IoVec::new(&[8, 9]), IoVec::new(&[10])], + &[IoSlice::new(&[]), IoSlice::new(&[8, 9]), IoSlice::new(&[10])], ).unwrap(), 3); let b: &[_] = &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; assert_eq!(&writer.get_ref()[..], b); @@ -424,7 +430,7 @@ mod tests { assert_eq!(writer.write(&[1, 2, 3]).unwrap(), 3); assert_eq!(writer.write(&[4, 5, 6, 7]).unwrap(), 4); assert_eq!(writer.write_vectored( - &[IoVec::new(&[]), IoVec::new(&[8, 9]), IoVec::new(&[10])], + &[IoSlice::new(&[]), IoSlice::new(&[8, 9]), IoSlice::new(&[10])], ).unwrap(), 3); let b: &[_] = &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; assert_eq!(&writer.get_ref()[..], b); @@ -452,18 +458,21 @@ mod tests { fn test_box_slice_writer_vectored() { let mut writer = Cursor::new(vec![0u8; 9].into_boxed_slice()); assert_eq!(writer.position(), 0); - assert_eq!(writer.write_vectored(&[IoVec::new(&[0])]).unwrap(), 1); + assert_eq!(writer.write_vectored(&[IoSlice::new(&[0])]).unwrap(), 1); assert_eq!(writer.position(), 1); assert_eq!( - writer.write_vectored(&[IoVec::new(&[1, 2, 3]), IoVec::new(&[4, 5, 6, 7])]).unwrap(), + writer.write_vectored(&[ + IoSlice::new(&[1, 2, 3]), + IoSlice::new(&[4, 5, 6, 7]), + ]).unwrap(), 7, ); assert_eq!(writer.position(), 8); assert_eq!(writer.write_vectored(&[]).unwrap(), 0); assert_eq!(writer.position(), 8); - assert_eq!(writer.write_vectored(&[IoVec::new(&[8, 9])]).unwrap(), 1); - assert_eq!(writer.write_vectored(&[IoVec::new(&[10])]).unwrap(), 0); + assert_eq!(writer.write_vectored(&[IoSlice::new(&[8, 9])]).unwrap(), 1); + assert_eq!(writer.write_vectored(&[IoSlice::new(&[10])]).unwrap(), 0); let b: &[_] = &[0, 1, 2, 3, 4, 5, 6, 7, 8]; assert_eq!(&**writer.get_ref(), b); } @@ -495,11 +504,11 @@ mod tests { { let mut writer = Cursor::new(&mut buf[..]); assert_eq!(writer.position(), 0); - assert_eq!(writer.write_vectored(&[IoVec::new(&[0])]).unwrap(), 1); + assert_eq!(writer.write_vectored(&[IoSlice::new(&[0])]).unwrap(), 1); assert_eq!(writer.position(), 1); assert_eq!( writer.write_vectored( - &[IoVec::new(&[1, 2, 3]), IoVec::new(&[4, 5, 6, 7])], + &[IoSlice::new(&[1, 2, 3]), IoSlice::new(&[4, 5, 6, 7])], ).unwrap(), 7, ); @@ -507,8 +516,8 @@ mod tests { assert_eq!(writer.write_vectored(&[]).unwrap(), 0); assert_eq!(writer.position(), 8); - assert_eq!(writer.write_vectored(&[IoVec::new(&[8, 9])]).unwrap(), 1); - assert_eq!(writer.write_vectored(&[IoVec::new(&[10])]).unwrap(), 0); + assert_eq!(writer.write_vectored(&[IoSlice::new(&[8, 9])]).unwrap(), 1); + assert_eq!(writer.write_vectored(&[IoSlice::new(&[10])]).unwrap(), 0); } let b: &[_] = &[0, 1, 2, 3, 4, 5, 6, 7, 8]; assert_eq!(buf, b); @@ -578,11 +587,14 @@ mod tests { fn test_mem_reader_vectored() { let mut reader = Cursor::new(vec![0, 1, 2, 3, 4, 5, 6, 7]); let mut buf = []; - assert_eq!(reader.read_vectored(&mut [IoVecMut::new(&mut buf)]).unwrap(), 0); + assert_eq!(reader.read_vectored(&mut [IoSliceMut::new(&mut buf)]).unwrap(), 0); assert_eq!(reader.position(), 0); let mut buf = [0]; assert_eq!( - reader.read_vectored(&mut [IoVecMut::new(&mut []), IoVecMut::new(&mut buf)]).unwrap(), + reader.read_vectored(&mut [ + IoSliceMut::new(&mut []), + IoSliceMut::new(&mut buf), + ]).unwrap(), 1, ); assert_eq!(reader.position(), 1); @@ -591,9 +603,10 @@ mod tests { let mut buf1 = [0; 4]; let mut buf2 = [0; 4]; assert_eq!( - reader.read_vectored( - &mut [IoVecMut::new(&mut buf1), IoVecMut::new(&mut buf2)], - ).unwrap(), + reader.read_vectored(&mut [ + IoSliceMut::new(&mut buf1), + IoSliceMut::new(&mut buf2), + ]).unwrap(), 7, ); let b1: &[_] = &[1, 2, 3, 4]; @@ -629,11 +642,14 @@ mod tests { fn test_boxed_slice_reader_vectored() { let mut reader = Cursor::new(vec![0, 1, 2, 3, 4, 5, 6, 7].into_boxed_slice()); let mut buf = []; - assert_eq!(reader.read_vectored(&mut [IoVecMut::new(&mut buf)]).unwrap(), 0); + assert_eq!(reader.read_vectored(&mut [IoSliceMut::new(&mut buf)]).unwrap(), 0); assert_eq!(reader.position(), 0); let mut buf = [0]; assert_eq!( - reader.read_vectored(&mut [IoVecMut::new(&mut []), IoVecMut::new(&mut buf)]).unwrap(), + reader.read_vectored(&mut [ + IoSliceMut::new(&mut []), + IoSliceMut::new(&mut buf), + ]).unwrap(), 1, ); assert_eq!(reader.position(), 1); @@ -643,7 +659,7 @@ mod tests { let mut buf2 = [0; 4]; assert_eq!( reader.read_vectored( - &mut [IoVecMut::new(&mut buf1), IoVecMut::new(&mut buf2)], + &mut [IoSliceMut::new(&mut buf1), IoSliceMut::new(&mut buf2)], ).unwrap(), 7, ); @@ -689,10 +705,13 @@ mod tests { let in_buf = vec![0, 1, 2, 3, 4, 5, 6, 7]; let reader = &mut &in_buf[..]; let mut buf = []; - assert_eq!(reader.read_vectored(&mut [IoVecMut::new(&mut buf)]).unwrap(), 0); + assert_eq!(reader.read_vectored(&mut [IoSliceMut::new(&mut buf)]).unwrap(), 0); let mut buf = [0]; assert_eq!( - reader.read_vectored(&mut [IoVecMut::new(&mut []), IoVecMut::new(&mut buf)]).unwrap(), + reader.read_vectored(&mut [ + IoSliceMut::new(&mut []), + IoSliceMut::new(&mut buf), + ]).unwrap(), 1, ); assert_eq!(reader.len(), 7); @@ -702,7 +721,7 @@ mod tests { let mut buf2 = [0; 4]; assert_eq!( reader.read_vectored( - &mut [IoVecMut::new(&mut buf1), IoVecMut::new(&mut buf2)], + &mut [IoSliceMut::new(&mut buf1), IoSliceMut::new(&mut buf2)], ).unwrap(), 7, ); diff --git a/src/libstd/io/impls.rs b/src/libstd/io/impls.rs index 0eac96fc39..c959f2d389 100644 --- a/src/libstd/io/impls.rs +++ b/src/libstd/io/impls.rs @@ -1,6 +1,6 @@ use crate::cmp; -use crate::io::{self, SeekFrom, Read, Initializer, Write, Seek, BufRead, Error, ErrorKind, IoVecMut, - IoVec}; +use crate::io::{self, SeekFrom, Read, Initializer, Write, Seek, BufRead, Error, ErrorKind, + IoSliceMut, IoSlice}; use crate::fmt; use crate::mem; @@ -15,7 +15,7 @@ impl Read for &mut R { } #[inline] - fn read_vectored(&mut self, bufs: &mut [IoVecMut<'_>]) -> io::Result { + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { (**self).read_vectored(bufs) } @@ -45,7 +45,7 @@ impl Write for &mut W { fn write(&mut self, buf: &[u8]) -> io::Result { (**self).write(buf) } #[inline] - fn write_vectored(&mut self, bufs: &[IoVec<'_>]) -> io::Result { + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { (**self).write_vectored(bufs) } @@ -94,7 +94,7 @@ impl Read for Box { } #[inline] - fn read_vectored(&mut self, bufs: &mut [IoVecMut<'_>]) -> io::Result { + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { (**self).read_vectored(bufs) } @@ -124,7 +124,7 @@ impl Write for Box { fn write(&mut self, buf: &[u8]) -> io::Result { (**self).write(buf) } #[inline] - fn write_vectored(&mut self, bufs: &[IoVec<'_>]) -> io::Result { + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { (**self).write_vectored(bufs) } @@ -207,7 +207,7 @@ impl Read for &[u8] { } #[inline] - fn read_vectored(&mut self, bufs: &mut [IoVecMut<'_>]) -> io::Result { + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { let mut nread = 0; for buf in bufs { nread += self.read(buf)?; @@ -280,7 +280,7 @@ impl Write for &mut [u8] { } #[inline] - fn write_vectored(&mut self, bufs: &[IoVec<'_>]) -> io::Result { + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { let mut nwritten = 0; for buf in bufs { nwritten += self.write(buf)?; @@ -316,7 +316,7 @@ impl Write for Vec { } #[inline] - fn write_vectored(&mut self, bufs: &[IoVec<'_>]) -> io::Result { + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { let len = bufs.iter().map(|b| b.len()).sum(); self.reserve(len); for buf in bufs { diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 1ce66b931d..917199f8ea 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -390,7 +390,7 @@ fn read_to_end_with_reservation(r: &mut R, ret } -pub(crate) fn default_read_vectored(read: F, bufs: &mut [IoVecMut<'_>]) -> Result +pub(crate) fn default_read_vectored(read: F, bufs: &mut [IoSliceMut<'_>]) -> Result where F: FnOnce(&mut [u8]) -> Result { @@ -401,7 +401,7 @@ where read(buf) } -pub(crate) fn default_write_vectored(write: F, bufs: &[IoVec<'_>]) -> Result +pub(crate) fn default_write_vectored(write: F, bufs: &[IoSlice<'_>]) -> Result where F: FnOnce(&[u8]) -> Result { @@ -554,8 +554,8 @@ pub trait Read { /// /// The default implementation calls `read` with either the first nonempty /// buffer provided, or an empty one if none exists. - #[unstable(feature = "iovec", issue = "58452")] - fn read_vectored(&mut self, bufs: &mut [IoVecMut<'_>]) -> Result { + #[stable(feature = "iovec", since = "1.36.0")] + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result { default_read_vectored(|b| self.read(b), bufs) } @@ -911,32 +911,32 @@ pub trait Read { /// It is semantically a wrapper around an `&mut [u8]`, but is guaranteed to be /// ABI compatible with the `iovec` type on Unix platforms and `WSABUF` on /// Windows. -#[unstable(feature = "iovec", issue = "58452")] +#[stable(feature = "iovec", since = "1.36.0")] #[repr(transparent)] -pub struct IoVecMut<'a>(sys::io::IoVecMut<'a>); +pub struct IoSliceMut<'a>(sys::io::IoSliceMut<'a>); -#[unstable(feature = "iovec", issue = "58452")] -impl<'a> fmt::Debug for IoVecMut<'a> { +#[stable(feature = "iovec", since = "1.36.0")] +impl<'a> fmt::Debug for IoSliceMut<'a> { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { fmt::Debug::fmt(self.0.as_slice(), fmt) } } -impl<'a> IoVecMut<'a> { - /// Creates a new `IoVecMut` wrapping a byte slice. +impl<'a> IoSliceMut<'a> { + /// Creates a new `IoSliceMut` wrapping a byte slice. /// /// # Panics /// /// Panics on Windows if the slice is larger than 4GB. - #[unstable(feature = "iovec", issue = "58452")] + #[stable(feature = "iovec", since = "1.36.0")] #[inline] - pub fn new(buf: &'a mut [u8]) -> IoVecMut<'a> { - IoVecMut(sys::io::IoVecMut::new(buf)) + pub fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { + IoSliceMut(sys::io::IoSliceMut::new(buf)) } } -#[unstable(feature = "iovec", issue = "58452")] -impl<'a> Deref for IoVecMut<'a> { +#[stable(feature = "iovec", since = "1.36.0")] +impl<'a> Deref for IoSliceMut<'a> { type Target = [u8]; #[inline] @@ -945,8 +945,8 @@ impl<'a> Deref for IoVecMut<'a> { } } -#[unstable(feature = "iovec", issue = "58452")] -impl<'a> DerefMut for IoVecMut<'a> { +#[stable(feature = "iovec", since = "1.36.0")] +impl<'a> DerefMut for IoSliceMut<'a> { #[inline] fn deref_mut(&mut self) -> &mut [u8] { self.0.as_mut_slice() @@ -958,32 +958,32 @@ impl<'a> DerefMut for IoVecMut<'a> { /// It is semantically a wrapper around an `&[u8]`, but is guaranteed to be /// ABI compatible with the `iovec` type on Unix platforms and `WSABUF` on /// Windows. -#[unstable(feature = "iovec", issue = "58452")] +#[stable(feature = "iovec", since = "1.36.0")] #[repr(transparent)] -pub struct IoVec<'a>(sys::io::IoVec<'a>); +pub struct IoSlice<'a>(sys::io::IoSlice<'a>); -#[unstable(feature = "iovec", issue = "58452")] -impl<'a> fmt::Debug for IoVec<'a> { +#[stable(feature = "iovec", since = "1.36.0")] +impl<'a> fmt::Debug for IoSlice<'a> { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { fmt::Debug::fmt(self.0.as_slice(), fmt) } } -impl<'a> IoVec<'a> { - /// Creates a new `IoVec` wrapping a byte slice. +impl<'a> IoSlice<'a> { + /// Creates a new `IoSlice` wrapping a byte slice. /// /// # Panics /// /// Panics on Windows if the slice is larger than 4GB. - #[unstable(feature = "iovec", issue = "58452")] + #[stable(feature = "iovec", since = "1.36.0")] #[inline] - pub fn new(buf: &'a [u8]) -> IoVec<'a> { - IoVec(sys::io::IoVec::new(buf)) + pub fn new(buf: &'a [u8]) -> IoSlice<'a> { + IoSlice(sys::io::IoSlice::new(buf)) } } -#[unstable(feature = "iovec", issue = "58452")] -impl<'a> Deref for IoVec<'a> { +#[stable(feature = "iovec", since = "1.36.0")] +impl<'a> Deref for IoSlice<'a> { type Target = [u8]; #[inline] @@ -1141,8 +1141,8 @@ pub trait Write { /// /// The default implementation calls `write` with either the first nonempty /// buffer provided, or an empty one if none exists. - #[unstable(feature = "iovec", issue = "58452")] - fn write_vectored(&mut self, bufs: &[IoVec<'_>]) -> Result { + #[stable(feature = "iovec", since = "1.36.0")] + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result { default_write_vectored(|b| self.write(b), bufs) } @@ -1579,18 +1579,13 @@ pub trait BufRead: Read { /// let stdin = io::stdin(); /// let mut stdin = stdin.lock(); /// - /// // we can't have two `&mut` references to `stdin`, so use a block - /// // to end the borrow early. - /// let length = { - /// let buffer = stdin.fill_buf().unwrap(); + /// let buffer = stdin.fill_buf().unwrap(); /// - /// // work with buffer - /// println!("{:?}", buffer); - /// - /// buffer.len() - /// }; + /// // work with buffer + /// println!("{:?}", buffer); /// /// // ensure the bytes we worked with aren't returned again later + /// let length = buffer.len(); /// stdin.consume(length); /// ``` #[stable(feature = "rust1", since = "1.0.0")] @@ -1926,7 +1921,7 @@ impl Read for Chain { self.second.read(buf) } - fn read_vectored(&mut self, bufs: &mut [IoVecMut<'_>]) -> Result { + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result { if !self.done_first { match self.first.read_vectored(bufs)? { 0 if bufs.iter().any(|b| !b.is_empty()) => self.done_first = true, diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 0bbff5769a..990c0eb895 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -5,7 +5,7 @@ use crate::io::prelude::*; use crate::cell::RefCell; use crate::fmt; use crate::io::lazy::Lazy; -use crate::io::{self, Initializer, BufReader, LineWriter}; +use crate::io::{self, Initializer, BufReader, LineWriter, IoSlice, IoSliceMut}; use crate::sync::{Arc, Mutex, MutexGuard}; use crate::sys::stdio; use crate::sys_common::remutex::{ReentrantMutex, ReentrantMutexGuard}; @@ -75,6 +75,10 @@ fn stderr_raw() -> io::Result { stdio::Stderr::new().map(StderrRaw) } impl Read for StdinRaw { fn read(&mut self, buf: &mut [u8]) -> io::Result { self.0.read(buf) } + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + self.0.read_vectored(bufs) + } + #[inline] unsafe fn initializer(&self) -> Initializer { Initializer::nop() @@ -82,10 +86,20 @@ impl Read for StdinRaw { } impl Write for StdoutRaw { fn write(&mut self, buf: &[u8]) -> io::Result { self.0.write(buf) } + + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { + self.0.write_vectored(bufs) + } + fn flush(&mut self) -> io::Result<()> { self.0.flush() } } impl Write for StderrRaw { fn write(&mut self, buf: &[u8]) -> io::Result { self.0.write(buf) } + + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { + self.0.write_vectored(bufs) + } + fn flush(&mut self) -> io::Result<()> { self.0.flush() } } @@ -102,6 +116,14 @@ impl io::Write for Maybe { } } + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { + let total = bufs.iter().map(|b| b.len()).sum(); + match self { + Maybe::Real(w) => handle_ebadf(w.write_vectored(bufs), total), + Maybe::Fake => Ok(total), + } + } + fn flush(&mut self) -> io::Result<()> { match *self { Maybe::Real(ref mut w) => handle_ebadf(w.flush(), ()), @@ -117,6 +139,13 @@ impl io::Read for Maybe { Maybe::Fake => Ok(0) } } + + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + match self { + Maybe::Real(r) => handle_ebadf(r.read_vectored(bufs), 0), + Maybe::Fake => Ok(0) + } + } } fn handle_ebadf(r: io::Result, default: T) -> io::Result { @@ -305,6 +334,9 @@ impl Read for Stdin { fn read(&mut self, buf: &mut [u8]) -> io::Result { self.lock().read(buf) } + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + self.lock().read_vectored(bufs) + } #[inline] unsafe fn initializer(&self) -> Initializer { Initializer::nop() @@ -325,6 +357,11 @@ impl Read for StdinLock<'_> { fn read(&mut self, buf: &mut [u8]) -> io::Result { self.inner.read(buf) } + + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + self.inner.read_vectored(bufs) + } + #[inline] unsafe fn initializer(&self) -> Initializer { Initializer::nop() @@ -483,6 +520,9 @@ impl Write for Stdout { fn write(&mut self, buf: &[u8]) -> io::Result { self.lock().write(buf) } + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { + self.lock().write_vectored(bufs) + } fn flush(&mut self) -> io::Result<()> { self.lock().flush() } @@ -498,6 +538,9 @@ impl Write for StdoutLock<'_> { fn write(&mut self, buf: &[u8]) -> io::Result { self.inner.borrow_mut().write(buf) } + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { + self.inner.borrow_mut().write_vectored(bufs) + } fn flush(&mut self) -> io::Result<()> { self.inner.borrow_mut().flush() } @@ -636,6 +679,9 @@ impl Write for Stderr { fn write(&mut self, buf: &[u8]) -> io::Result { self.lock().write(buf) } + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { + self.lock().write_vectored(bufs) + } fn flush(&mut self) -> io::Result<()> { self.lock().flush() } @@ -651,6 +697,9 @@ impl Write for StderrLock<'_> { fn write(&mut self, buf: &[u8]) -> io::Result { self.inner.borrow_mut().write(buf) } + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { + self.inner.borrow_mut().write_vectored(bufs) + } fn flush(&mut self) -> io::Result<()> { self.inner.borrow_mut().flush() } diff --git a/src/libstd/io/util.rs b/src/libstd/io/util.rs index d2638be4e2..7c4eae6512 100644 --- a/src/libstd/io/util.rs +++ b/src/libstd/io/util.rs @@ -1,7 +1,7 @@ #![allow(missing_copy_implementations)] use crate::fmt; -use crate::io::{self, Read, Initializer, Write, ErrorKind, BufRead, IoVec, IoVecMut}; +use crate::io::{self, Read, Initializer, Write, ErrorKind, BufRead, IoSlice, IoSliceMut}; use crate::mem; /// Copies the entire contents of a reader into a writer. @@ -153,7 +153,7 @@ impl Read for Repeat { } #[inline] - fn read_vectored(&mut self, bufs: &mut [IoVecMut<'_>]) -> io::Result { + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { let mut nwritten = 0; for buf in bufs { nwritten += self.read(buf)?; @@ -206,7 +206,7 @@ impl Write for Sink { fn write(&mut self, buf: &[u8]) -> io::Result { Ok(buf.len()) } #[inline] - fn write_vectored(&mut self, bufs: &[IoVec<'_>]) -> io::Result { + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { let total_len = bufs.iter().map(|b| b.len()).sum(); Ok(total_len) } diff --git a/src/libstd/keyword_docs.rs b/src/libstd/keyword_docs.rs index 7b0d1549e0..d133c2f5cb 100644 --- a/src/libstd/keyword_docs.rs +++ b/src/libstd/keyword_docs.rs @@ -1,6 +1,6 @@ #[doc(keyword = "as")] // -/// The keyword for casting a value to a type. +/// Cast between types, or rename an import. /// /// `as` is most commonly used to turn primitive types into other primitive types, but it has other /// uses that include turning pointers into addresses, addresses into pointers, and pointers into @@ -25,14 +25,22 @@ /// /// For more information on what `as` is capable of, see the [Reference] /// -/// [Reference]: -/// https://doc.rust-lang.org/reference/expressions/operator-expr.html#type-cast-expressions +/// [Reference]: ../reference/expressions/operator-expr.html#type-cast-expressions /// [`crate`]: keyword.crate.html mod as_keyword { } +#[doc(keyword = "break")] +// +/// Exit early from a loop. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod break_keyword { } + #[doc(keyword = "const")] // -/// The keyword for defining constants. +/// Compile-time constants and deterministic functions. /// /// Sometimes a certain value is used many times throughout a program, and it can become /// inconvenient to copy it over and over. What's more, it's not always possible or desirable to @@ -80,13 +88,22 @@ mod as_keyword { } /// /// [pointer]: primitive.pointer.html /// [Rust Book]: -/// https://doc.rust-lang.org/stable/book/2018-edition/ch03-01-variables-and-mutability.html#differences-between-variables-and-constants -/// [Reference]: https://doc.rust-lang.org/reference/items/constant-items.html +/// ../book/ch03-01-variables-and-mutability.html#differences-between-variables-and-constants +/// [Reference]: ../reference/items/constant-items.html mod const_keyword { } +#[doc(keyword = "continue")] +// +/// Skip to the next iteration of a loop. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod continue_keyword { } + #[doc(keyword = "crate")] // -/// The `crate` keyword. +/// A Rust binary or library. /// /// The primary use of the `crate` keyword is as a part of `extern crate` declarations, which are /// used to specify a dependency on a crate external to the one it's declared in. Crates are the @@ -114,17 +131,27 @@ mod const_keyword { } /// } /// ``` /// -/// [Reference]: https://doc.rust-lang.org/reference/items/extern-crates.html +/// [Reference]: ../reference/items/extern-crates.html mod crate_keyword { } +#[doc(keyword = "else")] +// +/// What to do when an [`if`] condition does not hold. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [`if`]: keyword.if.html +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod else_keyword { } + #[doc(keyword = "enum")] // -/// For defining enumerations. +/// A type that can be any one of several variants. /// /// Enums in Rust are similar to those of other compiled languages like C, but have important /// differences that make them considerably more powerful. What Rust calls enums are more commonly -/// known as [Algebraic Data Types] if you're coming from a functional programming background. The -/// important detail is that each enum variant can have data to go along with it. +/// known as [Algebraic Data Types][ADT] if you're coming from a functional programming background. +/// The important detail is that each enum variant can have data to go along with it. /// /// ```rust /// # struct Coord; @@ -167,15 +194,15 @@ mod crate_keyword { } /// /// For more information, take a look at the [Rust Book] or the [Reference] /// -/// [Algebraic Data Types]: https://en.wikipedia.org/wiki/Algebraic_data_type +/// [ADT]: https://en.wikipedia.org/wiki/Algebraic_data_type /// [`Option`]: option/enum.Option.html -/// [Rust Book]: https://doc.rust-lang.org/book/ch06-01-defining-an-enum.html -/// [Reference]: https://doc.rust-lang.org/reference/items/enumerations.html +/// [Rust Book]: ../book/ch06-01-defining-an-enum.html +/// [Reference]: ../reference/items/enumerations.html mod enum_keyword { } #[doc(keyword = "extern")] // -/// For external connections in Rust code. +/// Link to or import external code. /// /// The `extern` keyword is used in two places in Rust. One is in conjunction with the [`crate`] /// keyword to make your Rust code aware of other Rust crates in your project, i.e., `extern crate @@ -211,13 +238,23 @@ mod enum_keyword { } /// For more information on FFI, check the [Rust book] or the [Reference]. /// /// [Rust book]: -/// https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html#using-extern-functions-to-call-external-code -/// [Reference]: https://doc.rust-lang.org/reference/items/external-blocks.html +/// ../book/ch19-01-unsafe-rust.html#using-extern-functions-to-call-external-code +/// [Reference]: ../reference/items/external-blocks.html mod extern_keyword { } +#[doc(keyword = "false")] +// +/// A value of type [`bool`] representing logical **false**. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [`bool`]: primitive.bool.html +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod false_keyword { } + #[doc(keyword = "fn")] // -/// The keyword for defining functions. +/// A function or function pointer. /// /// Functions are the primary way code is executed within Rust. Function blocks, usually just /// called functions, can be defined in a variety of different places and be assigned many @@ -278,13 +315,14 @@ mod extern_keyword { } /// /// [`impl`]: keyword.impl.html /// [`extern`]: keyword.extern.html -/// [Rust book]: https://doc.rust-lang.org/book/ch03-03-how-functions-work.html -/// [Reference]: https://doc.rust-lang.org/reference/items/functions.html +/// [Rust book]: ../book/ch03-03-how-functions-work.html +/// [Reference]: ../reference/items/functions.html mod fn_keyword { } #[doc(keyword = "for")] // -/// The `for` keyword. +/// Iteration with [`in`], trait implementation with [`impl`], or [higher-ranked trait bounds] +/// (`for<'a>`). /// /// The `for` keyword is used in many syntactic locations: /// @@ -351,18 +389,18 @@ mod fn_keyword { } /// /// For more information on for-loops, see the [Rust book] or the [Reference]. /// +/// [`in`]: keyword.in.html /// [`impl`]: keyword.impl.html -/// [higher-ranked trait bounds]: -/// https://doc.rust-lang.org/nightly/reference/trait-bounds.html#higher-ranked-trait-bounds +/// [higher-ranked trait bounds]: ../reference/trait-bounds.html#higher-ranked-trait-bounds /// [`IntoIterator`]: iter/trait.IntoIterator.html /// [Rust book]: -/// https://doc.rust-lang.org/book/2018-edition/ch03-05-control-flow.html#looping-through-a-collection-with-for -/// [Reference]: https://doc.rust-lang.org/reference/expressions/loop-expr.html#iterator-loops +/// ../book/ch03-05-control-flow.html#looping-through-a-collection-with-for +/// [Reference]: ../reference/expressions/loop-expr.html#iterator-loops mod for_keyword { } #[doc(keyword = "if")] // -/// If statements and expressions. +/// Evaluate a block if a condition holds. /// /// `if` is a familiar construct to most programmers, and is the main way you'll often do logic in /// your code. However, unlike in most languages, `if` blocks can also act as expressions. @@ -430,14 +468,13 @@ mod for_keyword { } /// /// For more information on `if` expressions, see the [Rust book] or the [Reference]. /// -/// [Rust book]: -/// https://doc.rust-lang.org/stable/book/2018-edition/ch03-05-control-flow.html#if-expressions -/// [Reference]: https://doc.rust-lang.org/reference/expressions/if-expr.html +/// [Rust book]: ../book/ch03-05-control-flow.html#if-expressions +/// [Reference]: ../reference/expressions/if-expr.html mod if_keyword { } #[doc(keyword = "impl")] // -/// The implementation-defining keyword. +/// Implement some functionality for a type. /// /// The `impl` keyword is primarily used to define implementations on types. Inherent /// implementations are standalone, while trait implementations are used to implement traits for @@ -493,15 +530,24 @@ mod if_keyword { } /// /// For more information on `impl Trait` syntax, see the [Rust book][book2]. /// -/// [book1]: https://doc.rust-lang.org/stable/book/2018-edition/ch05-03-method-syntax.html -/// [Reference]: https://doc.rust-lang.org/reference/items/implementations.html -/// [book2]: -/// https://doc.rust-lang.org/stable/book/2018-edition/ch10-02-traits.html#returning-traits +/// [book1]: ../book/ch05-03-method-syntax.html +/// [Reference]: ../reference/items/implementations.html +/// [book2]: ../book/ch10-02-traits.html#returning-types-that-implement-traits mod impl_keyword { } +#[doc(keyword = "in")] +// +/// Iterate over a series of values with [`for`]. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [`for`]: keyword.for.html +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod in_keyword { } + #[doc(keyword = "let")] // -/// The variable binding keyword. +/// Bind a value to a variable. /// /// The primary use for the `let` keyword is in `let` statements, which are used to introduce a new /// set of variables into the current scope, as given by a pattern. @@ -554,18 +600,17 @@ mod impl_keyword { } /// enumerations. `while let` also exists, which runs a loop with a pattern matched value until /// that pattern can't be matched. /// -/// For more information on the `let` keyword, see the [Rust book] or the [Reference] +/// For more information on the `let` keyword, see the [Rust book][book2] or the [Reference] /// -/// [book1]: https://doc.rust-lang.org/stable/book/2018-edition/ch06-02-match.html +/// [book1]: ../book/ch06-02-match.html /// [`if`]: keyword.if.html -/// [book2]: -/// https://doc.rust-lang.org/stable/book/2018-edition/ch18-01-all-the-places-for-patterns.html#let-statements -/// [Reference]: https://doc.rust-lang.org/reference/statements.html#let-statements +/// [book2]: ../book/ch18-01-all-the-places-for-patterns.html#let-statements +/// [Reference]: ../reference/statements.html#let-statements mod let_keyword { } #[doc(keyword = "loop")] // -/// The loop-defining keyword. +/// Loop indefinitely. /// /// `loop` is used to define the simplest kind of loop supported in Rust. It runs the code inside /// it until the code uses `break` or the program exits. @@ -605,12 +650,107 @@ mod let_keyword { } /// /// For more information on `loop` and loops in general, see the [Reference]. /// -/// [Reference]: https://doc.rust-lang.org/reference/expressions/loop-expr.html +/// [Reference]: ../reference/expressions/loop-expr.html mod loop_keyword { } +#[doc(keyword = "match")] +// +/// Control flow based on pattern matching. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod match_keyword { } + +#[doc(keyword = "mod")] +// +/// Organize code into [modules]. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [modules]: ../reference/items/modules.html +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod mod_keyword { } + +#[doc(keyword = "move")] +// +/// Capture a [closure]'s environment by value. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [closure]: ../book/second-edition/ch13-01-closures.html +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod move_keyword { } + +#[doc(keyword = "mut")] +// +/// A mutable binding, reference, or pointer. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod mut_keyword { } + +#[doc(keyword = "pub")] +// +/// Make an item visible to others. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod pub_keyword { } + +#[doc(keyword = "ref")] +// +/// Bind by reference during pattern matching. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod ref_keyword { } + +#[doc(keyword = "return")] +// +/// Return a value from a function. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod return_keyword { } + +#[doc(keyword = "self")] +// +/// The receiver of a method, or the current module. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod self_keyword { } + +#[doc(keyword = "Self")] +// +/// The implementing type within a [`trait`] or [`impl`] block, or the current type within a type +/// definition. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [`impl`]: keyword.impl.html +/// [`trait`]: keyword.trait.html +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod self_upper_keyword { } + +#[doc(keyword = "static")] +// +/// A place that is valid for the duration of a program. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod static_keyword { } + #[doc(keyword = "struct")] // -/// The keyword used to define structs. +/// A type that is composed of other types. /// /// Structs in Rust come in three flavors: Structs with named fields, tuple structs, and unit /// structs. @@ -712,6 +852,125 @@ mod loop_keyword { } /// [Reference][reference]. /// /// [`PhantomData`]: marker/struct.PhantomData.html -/// [book]: https://doc.rust-lang.org/book/ch05-01-defining-structs.html -/// [reference]: https://doc.rust-lang.org/reference/items/structs.html +/// [book]: ../book/ch05-01-defining-structs.html +/// [reference]: ../reference/items/structs.html mod struct_keyword { } + +#[doc(keyword = "super")] +// +/// The parent of the current [module]. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [module]: ../reference/items/modules.html +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod super_keyword { } + +#[doc(keyword = "trait")] +// +/// A common interface for a class of types. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod trait_keyword { } + +#[doc(keyword = "true")] +// +/// A value of type [`bool`] representing logical **true**. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [`bool`]: primitive.bool.html +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod true_keyword { } + +#[doc(keyword = "type")] +// +/// Define an alias for an existing type. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod type_keyword { } + +#[doc(keyword = "unsafe")] +// +/// Code or interfaces whose [memory safety] cannot be verified by the type system. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [memory safety]: ../book/ch19-01-unsafe-rust.html +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod unsafe_keyword { } + +#[doc(keyword = "use")] +// +/// Import or rename items from other crates or modules. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod use_keyword { } + +#[doc(keyword = "where")] +// +/// Add constraints that must be upheld to use an item. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod where_keyword { } + +#[doc(keyword = "while")] +// +/// Loop while a condition is upheld. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod while_keyword { } + +// 2018 Edition keywords + +#[unstable(feature = "async_await", issue = "50547")] +#[doc(keyword = "async")] +// +/// Return a [`Future`] instead of blocking the current thread. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [`Future`]: ./future/trait.Future.html +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod async_keyword { } + +#[unstable(feature = "async_await", issue = "50547")] +#[doc(keyword = "await")] +// +/// Suspend execution until the result of a [`Future`] is ready. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [`Future`]: ./future/trait.Future.html +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod await_keyword { } + +#[doc(keyword = "dyn")] +// +/// Name the type of a [trait object]. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [trait object]: ../book/ch17-02-trait-objects.html +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod dyn_keyword { } + +#[doc(keyword = "union")] +// +/// The [Rust equivalent of a C-style union][union]. +/// +/// The documentation for this keyword is [not yet complete]. Pull requests welcome! +/// +/// [union]: ../reference/items/unions.html +/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 +mod union_keyword { } diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 8935245b34..a3356e6be2 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -205,9 +205,10 @@ // Don't link to std. We are std. #![no_std] -#![deny(missing_docs)] -#![deny(intra_doc_link_resolution_failure)] -#![deny(missing_debug_implementations)] +//#![warn(deprecated_in_future)] // FIXME: std still has quite a few uses of `mem::uninitialized` +#![warn(missing_docs)] +#![warn(missing_debug_implementations)] +#![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings #![deny(rust_2018_idioms)] #![allow(explicit_outlives_requirements)] @@ -222,14 +223,14 @@ #![cfg_attr(all(target_vendor = "fortanix", target_env = "sgx"), feature(global_asm, slice_index_methods, decl_macro, coerce_unsized, sgx_platform, ptr_wrapping_offset_from))] +#![cfg_attr(all(test, target_vendor = "fortanix", target_env = "sgx"), + feature(fixed_size_array, maybe_uninit_extra))] // std is implemented with unstable features, many of which are internal // compiler details that will never be stable // NB: the following list is sorted to minimize merge conflicts. -#![feature(align_offset)] #![feature(alloc_error_handler)] #![feature(alloc_layout_extra)] -#![feature(alloc)] #![feature(allocator_api)] #![feature(allocator_internals)] #![feature(allow_internal_unsafe)] @@ -262,17 +263,16 @@ #![feature(external_doc)] #![feature(fn_traits)] #![feature(fnbox)] -#![feature(futures_api)] #![feature(generator_trait)] #![feature(hash_raw_entry)] #![feature(hashmap_internals)] #![feature(int_error_internals)] +#![feature(int_error_matching)] #![feature(integer_atomics)] #![feature(lang_items)] #![feature(libc)] #![feature(link_args)] #![feature(linkage)] -#![feature(maybe_uninit)] #![feature(needs_panic_runtime)] #![feature(never_type)] #![feature(nll)] @@ -459,18 +459,15 @@ pub mod process; pub mod sync; pub mod time; -#[unstable(feature = "futures_api", - reason = "futures in libcore are unstable", - issue = "50547")] +#[stable(feature = "futures_api", since = "1.36.0")] pub mod task { //! Types and Traits for working with asynchronous tasks. #[doc(inline)] + #[stable(feature = "futures_api", since = "1.36.0")] pub use core::task::*; } -#[unstable(feature = "futures_api", - reason = "futures in libcore are unstable", - issue = "50547")] +#[stable(feature = "futures_api", since = "1.36.0")] pub mod future; // Platform-abstraction modules diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 14b266a434..c091434e50 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -56,13 +56,13 @@ #[allow_internal_unstable(__rust_unstable_column, libstd_sys_internals)] macro_rules! panic { () => ({ - panic!("explicit panic") + $crate::panic!("explicit panic") }); ($msg:expr) => ({ $crate::rt::begin_panic($msg, &(file!(), line!(), __rust_unstable_column!())) }); ($msg:expr,) => ({ - panic!($msg) + $crate::panic!($msg) }); ($fmt:expr, $($arg:tt)+) => ({ $crate::rt::begin_panic_fmt(&format_args!($fmt, $($arg)+), @@ -145,7 +145,7 @@ macro_rules! print { #[stable(feature = "rust1", since = "1.0.0")] #[allow_internal_unstable(print_internals, format_args_nl)] macro_rules! println { - () => (print!("\n")); + () => ($crate::print!("\n")); ($($arg:tt)*) => ({ $crate::io::_print(format_args_nl!($($arg)*)); }) @@ -204,7 +204,7 @@ macro_rules! eprint { #[stable(feature = "eprint", since = "1.19.0")] #[allow_internal_unstable(print_internals, format_args_nl)] macro_rules! eprintln { - () => (eprint!("\n")); + () => ($crate::eprint!("\n")); ($($arg:tt)*) => ({ $crate::io::_eprint(format_args_nl!($($arg)*)); }) @@ -314,6 +314,22 @@ macro_rules! eprintln { /// You can also use `dbg!()` without a value to just print the /// file and line whenever it's reached. /// +/// Finally, if you want to `dbg!(..)` multiple values, it will treat them as +/// a tuple (and return it, too): +/// +/// ``` +/// assert_eq!(dbg!(1usize, 2u32), (1, 2)); +/// ``` +/// +/// However, a single argument with a trailing comma will still not be treated +/// as a tuple, following the convention of ignoring trailing commas in macro +/// invocations. You can use a 1-tuple directly if you need one: +/// +/// ``` +/// assert_eq!(1, dbg!(1u32,)); // trailing comma ignored +/// assert_eq!((1,), dbg!((1u32,))); // 1-tuple +/// ``` +/// /// [stderr]: https://en.wikipedia.org/wiki/Standard_streams#Standard_error_(stderr) /// [`debug!`]: https://docs.rs/log/*/log/macro.debug.html /// [`log`]: https://crates.io/crates/log @@ -321,97 +337,24 @@ macro_rules! eprintln { #[stable(feature = "dbg_macro", since = "1.32.0")] macro_rules! dbg { () => { - eprintln!("[{}:{}]", file!(), line!()); + $crate::eprintln!("[{}:{}]", file!(), line!()); }; ($val:expr) => { // Use of `match` here is intentional because it affects the lifetimes // of temporaries - https://stackoverflow.com/a/48732525/1063961 match $val { tmp => { - eprintln!("[{}:{}] {} = {:#?}", + $crate::eprintln!("[{}:{}] {} = {:#?}", file!(), line!(), stringify!($val), &tmp); tmp } } - } -} - -/// Awaits the completion of an async call. -#[macro_export] -#[unstable(feature = "await_macro", issue = "50547")] -#[allow_internal_unstable(gen_future, generators)] -#[allow_internal_unsafe] -macro_rules! r#await { - ($e:expr) => { { - let mut pinned = $e; - loop { - if let $crate::task::Poll::Ready(x) = - $crate::future::poll_with_tls_context(unsafe { - $crate::pin::Pin::new_unchecked(&mut pinned) - }) - { - break x; - } - // FIXME(cramertj) prior to stabilizing await, we have to ensure that this - // can't be used to create a generator on stable via `|| await!()`. - yield - } - } } -} - -/// Selects the first successful receive event from a number of receivers. -/// -/// This macro is used to wait for the first event to occur on a number of -/// receivers. It places no restrictions on the types of receivers given to -/// this macro, this can be viewed as a heterogeneous select. -/// -/// # Examples -/// -/// ``` -/// #![feature(mpsc_select)] -/// -/// use std::thread; -/// use std::sync::mpsc; -/// -/// // two placeholder functions for now -/// fn long_running_thread() {} -/// fn calculate_the_answer() -> u32 { 42 } -/// -/// let (tx1, rx1) = mpsc::channel(); -/// let (tx2, rx2) = mpsc::channel(); -/// -/// thread::spawn(move|| { long_running_thread(); tx1.send(()).unwrap(); }); -/// thread::spawn(move|| { tx2.send(calculate_the_answer()).unwrap(); }); -/// -/// select! { -/// _ = rx1.recv() => println!("the long running thread finished first"), -/// answer = rx2.recv() => { -/// println!("the answer was: {}", answer.unwrap()); -/// } -/// } -/// # drop(rx1.recv()); -/// # drop(rx2.recv()); -/// ``` -/// -/// For more information about select, see the `std::sync::mpsc::Select` structure. -#[macro_export] -#[unstable(feature = "mpsc_select", issue = "27800")] -#[rustc_deprecated(since = "1.32.0", - reason = "channel selection will be removed in a future release")] -macro_rules! select { - ( - $($name:pat = $rx:ident.$meth:ident() => $code:expr),+ - ) => ({ - use $crate::sync::mpsc::Select; - let sel = Select::new(); - $( let mut $rx = sel.handle(&$rx); )+ - unsafe { - $( $rx.add(); )+ - } - let ret = sel.wait(); - $( if ret == $rx.id() { let $name = $rx.$meth(); $code } else )+ - { unreachable!() } - }) + }; + // Trailing comma with single argument is ignored + ($val:expr,) => { $crate::dbg!($val) }; + ($($val:expr),+ $(,)?) => { + ($($crate::dbg!($val)),+,) + }; } #[cfg(test)] diff --git a/src/libstd/net/addr.rs b/src/libstd/net/addr.rs index ec54d8a042..ca86a17505 100644 --- a/src/libstd/net/addr.rs +++ b/src/libstd/net/addr.rs @@ -546,6 +546,9 @@ impl FromInner for SocketAddrV6 { #[stable(feature = "ip_from_ip", since = "1.16.0")] impl From for SocketAddr { /// Converts a [`SocketAddrV4`] into a [`SocketAddr::V4`]. + /// + /// [`SocketAddrV4`]: ../../std/net/struct.SocketAddrV4.html + /// [`SocketAddr::V4`]: ../../std/net/enum.SocketAddr.html#variant.V4 fn from(sock4: SocketAddrV4) -> SocketAddr { SocketAddr::V4(sock4) } @@ -554,6 +557,9 @@ impl From for SocketAddr { #[stable(feature = "ip_from_ip", since = "1.16.0")] impl From for SocketAddr { /// Converts a [`SocketAddrV6`] into a [`SocketAddr::V6`]. + /// + /// [`SocketAddrV6`]: ../../std/net/struct.SocketAddrV6.html + /// [`SocketAddr::V6`]: ../../std/net/enum.SocketAddr.html#variant.V6 fn from(sock6: SocketAddrV6) -> SocketAddr { SocketAddr::V6(sock6) } @@ -567,6 +573,13 @@ impl> From<(I, u16)> for SocketAddr { /// and creates a [`SocketAddr::V6`] for a [`IpAddr::V6`]. /// /// `u16` is treated as port of the newly created [`SocketAddr`]. + /// + /// [`IpAddr`]: ../../std/net/enum.IpAddr.html + /// [`IpAddr::V4`]: ../../std/net/enum.IpAddr.html#variant.V4 + /// [`IpAddr::V6`]: ../../std/net/enum.IpAddr.html#variant.V6 + /// [`SocketAddr`]: ../../std/net/enum.SocketAddr.html + /// [`SocketAddr::V4`]: ../../std/net/enum.SocketAddr.html#variant.V4 + /// [`SocketAddr::V6`]: ../../std/net/enum.SocketAddr.html#variant.V6 fn from(pieces: (I, u16)) -> SocketAddr { SocketAddr::new(pieces.0.into(), pieces.1) } @@ -974,9 +987,9 @@ mod tests { // s has been moved into the tsa call } - // FIXME: figure out why this fails on openbsd and bitrig and fix it + // FIXME: figure out why this fails on openbsd and fix it #[test] - #[cfg(not(any(windows, target_os = "openbsd", target_os = "bitrig")))] + #[cfg(not(any(windows, target_os = "openbsd")))] fn to_socket_addr_str_bad() { assert!(tsa("1200::AB00:1234::2552:7777:1313:34300").is_err()); } diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs index cb8928866c..cdffa39022 100644 --- a/src/libstd/net/tcp.rs +++ b/src/libstd/net/tcp.rs @@ -1,7 +1,7 @@ use crate::io::prelude::*; use crate::fmt; -use crate::io::{self, Initializer, IoVec, IoVecMut}; +use crate::io::{self, Initializer, IoSlice, IoSliceMut}; use crate::net::{ToSocketAddrs, SocketAddr, Shutdown}; use crate::sys_common::net as net_imp; use crate::sys_common::{AsInner, FromInner, IntoInner}; @@ -569,7 +569,7 @@ impl TcpStream { impl Read for TcpStream { fn read(&mut self, buf: &mut [u8]) -> io::Result { self.0.read(buf) } - fn read_vectored(&mut self, bufs: &mut [IoVecMut<'_>]) -> io::Result { + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { self.0.read_vectored(bufs) } @@ -582,7 +582,7 @@ impl Read for TcpStream { impl Write for TcpStream { fn write(&mut self, buf: &[u8]) -> io::Result { self.0.write(buf) } - fn write_vectored(&mut self, bufs: &[IoVec<'_>]) -> io::Result { + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { self.0.write_vectored(bufs) } @@ -592,7 +592,7 @@ impl Write for TcpStream { impl Read for &TcpStream { fn read(&mut self, buf: &mut [u8]) -> io::Result { self.0.read(buf) } - fn read_vectored(&mut self, bufs: &mut [IoVecMut<'_>]) -> io::Result { + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { self.0.read_vectored(bufs) } @@ -605,7 +605,7 @@ impl Read for &TcpStream { impl Write for &TcpStream { fn write(&mut self, buf: &[u8]) -> io::Result { self.0.write(buf) } - fn write_vectored(&mut self, bufs: &[IoVec<'_>]) -> io::Result { + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { self.0.write_vectored(bufs) } @@ -930,7 +930,7 @@ impl fmt::Debug for TcpListener { #[cfg(all(test, not(any(target_os = "cloudabi", target_os = "emscripten"))))] mod tests { use crate::fmt; - use crate::io::{ErrorKind, IoVec, IoVecMut}; + use crate::io::{ErrorKind, IoSlice, IoSliceMut}; use crate::io::prelude::*; use crate::net::*; use crate::net::test::{next_test_ip4, next_test_ip6}; @@ -1216,7 +1216,7 @@ mod tests { let mut b = [0]; let mut c = [0; 3]; let len = t!(s2.read_vectored( - &mut [IoVecMut::new(&mut a), IoVecMut::new(&mut b), IoVecMut::new(&mut c)], + &mut [IoSliceMut::new(&mut a), IoSliceMut::new(&mut b), IoSliceMut::new(&mut c)], )); assert!(len > 0); assert_eq!(b, [10]); @@ -1235,7 +1235,7 @@ mod tests { let a = []; let b = [10]; let c = [11, 12]; - t!(s1.write_vectored(&[IoVec::new(&a), IoVec::new(&b), IoVec::new(&c)])); + t!(s1.write_vectored(&[IoSlice::new(&a), IoSlice::new(&b), IoSlice::new(&c)])); let mut buf = [0; 4]; let len = t!(s2.read(&mut buf)); @@ -1595,9 +1595,9 @@ mod tests { assert_eq!(format!("{:?}", stream), compare); } - // FIXME: re-enabled bitrig/openbsd tests once their socket timeout code + // FIXME: re-enabled openbsd tests once their socket timeout code // no longer has rounding errors. - #[cfg_attr(any(target_os = "bitrig", target_os = "netbsd", target_os = "openbsd"), ignore)] + #[cfg_attr(any(target_os = "netbsd", target_os = "openbsd"), ignore)] #[cfg_attr(target_env = "sgx", ignore)] // FIXME: https://github.com/fortanix/rust-sgx/issues/31 #[test] fn timeouts() { diff --git a/src/libstd/net/udp.rs b/src/libstd/net/udp.rs index d4187d2932..61d9149952 100644 --- a/src/libstd/net/udp.rs +++ b/src/libstd/net/udp.rs @@ -1024,9 +1024,9 @@ mod tests { assert_eq!(format!("{:?}", udpsock), compare); } - // FIXME: re-enabled bitrig/openbsd/netbsd tests once their socket timeout code + // FIXME: re-enabled openbsd/netbsd tests once their socket timeout code // no longer has rounding errors. - #[cfg_attr(any(target_os = "bitrig", target_os = "netbsd", target_os = "openbsd"), ignore)] + #[cfg_attr(any(target_os = "netbsd", target_os = "openbsd"), ignore)] #[test] fn timeouts() { let addr = next_test_ip4(); diff --git a/src/libstd/num.rs b/src/libstd/num.rs index d67d0b55a7..2a2ca0b523 100644 --- a/src/libstd/num.rs +++ b/src/libstd/num.rs @@ -16,6 +16,12 @@ pub use core::num::{NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU128, #[stable(feature = "signed_nonzero", since = "1.34.0")] pub use core::num::{NonZeroI8, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI128, NonZeroIsize}; +#[unstable(feature = "int_error_matching", + reason = "it can be useful to match errors when making error messages \ + for integer parsing", + issue = "22639")] +pub use core::num::IntErrorKind; + #[cfg(test)] use crate::fmt; #[cfg(test)] use crate::ops::{Add, Sub, Mul, Div, Rem}; diff --git a/src/libstd/os/android/fs.rs b/src/libstd/os/android/fs.rs index 9b24f86204..90fdee567a 100644 --- a/src/libstd/os/android/fs.rs +++ b/src/libstd/os/android/fs.rs @@ -116,4 +116,3 @@ impl MetadataExt for Metadata { self.as_inner().as_inner().st_blocks as u64 } } - diff --git a/src/libstd/os/android/raw.rs b/src/libstd/os/android/raw.rs index acf5ca1e42..946a77cbfd 100644 --- a/src/libstd/os/android/raw.rs +++ b/src/libstd/os/android/raw.rs @@ -217,4 +217,3 @@ mod arch { __unused: [c_long; 3], } } - diff --git a/src/libstd/os/bitrig/fs.rs b/src/libstd/os/bitrig/fs.rs deleted file mode 100644 index 849d4aa67f..0000000000 --- a/src/libstd/os/bitrig/fs.rs +++ /dev/null @@ -1,139 +0,0 @@ -#![stable(feature = "metadata_ext", since = "1.1.0")] - -use crate::fs::Metadata; -use crate::sys_common::AsInner; - -#[allow(deprecated)] -use crate::os::bitrig::raw; - -/// OS-specific extensions to [`fs::Metadata`]. -/// -/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html -#[stable(feature = "metadata_ext", since = "1.1.0")] -pub trait MetadataExt { - /// Gain a reference to the underlying `stat` structure which contains - /// the raw information returned by the OS. - /// - /// The contents of the returned `stat` are **not** consistent across - /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the - /// cross-Unix abstractions contained within the raw stat. - #[stable(feature = "metadata_ext", since = "1.1.0")] - #[rustc_deprecated(since = "1.8.0", - reason = "deprecated in favor of the accessor \ - methods of this trait")] - #[allow(deprecated)] - fn as_raw_stat(&self) -> &raw::stat; - - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_dev(&self) -> u64; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_ino(&self) -> u64; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_mode(&self) -> u32; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_nlink(&self) -> u64; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_uid(&self) -> u32; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_gid(&self) -> u32; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_rdev(&self) -> u64; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_size(&self) -> u64; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_atime(&self) -> i64; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_atime_nsec(&self) -> i64; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_mtime(&self) -> i64; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_mtime_nsec(&self) -> i64; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_ctime(&self) -> i64; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_ctime_nsec(&self) -> i64; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_birthtime(&self) -> i64; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_birthtime_nsec(&self) -> i64; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_blksize(&self) -> u64; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_blocks(&self) -> u64; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_flags(&self) -> u32; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_gen(&self) -> u32; -} - -#[stable(feature = "metadata_ext", since = "1.1.0")] -impl MetadataExt for Metadata { - #[allow(deprecated)] - fn as_raw_stat(&self) -> &raw::stat { - unsafe { - &*(self.as_inner().as_inner() as *const libc::stat - as *const raw::stat) - } - } - fn st_dev(&self) -> u64 { - self.as_inner().as_inner().st_dev as u64 - } - fn st_ino(&self) -> u64 { - self.as_inner().as_inner().st_ino as u64 - } - fn st_mode(&self) -> u32 { - self.as_inner().as_inner().st_mode as u32 - } - fn st_nlink(&self) -> u64 { - self.as_inner().as_inner().st_nlink as u64 - } - fn st_uid(&self) -> u32 { - self.as_inner().as_inner().st_uid as u32 - } - fn st_gid(&self) -> u32 { - self.as_inner().as_inner().st_gid as u32 - } - fn st_rdev(&self) -> u64 { - self.as_inner().as_inner().st_rdev as u64 - } - fn st_size(&self) -> u64 { - self.as_inner().as_inner().st_size as u64 - } - fn st_atime(&self) -> i64 { - self.as_inner().as_inner().st_atime as i64 - } - fn st_atime_nsec(&self) -> i64 { - self.as_inner().as_inner().st_atime_nsec as i64 - } - fn st_mtime(&self) -> i64 { - self.as_inner().as_inner().st_mtime as i64 - } - fn st_mtime_nsec(&self) -> i64 { - self.as_inner().as_inner().st_mtime_nsec as i64 - } - fn st_ctime(&self) -> i64 { - self.as_inner().as_inner().st_ctime as i64 - } - fn st_ctime_nsec(&self) -> i64 { - self.as_inner().as_inner().st_ctime_nsec as i64 - } - fn st_birthtime(&self) -> i64 { - self.as_inner().as_inner().st_birthtime as i64 - } - fn st_birthtime_nsec(&self) -> i64 { - self.as_inner().as_inner().st_birthtime_nsec as i64 - } - fn st_blksize(&self) -> u64 { - self.as_inner().as_inner().st_blksize as u64 - } - fn st_blocks(&self) -> u64 { - self.as_inner().as_inner().st_blocks as u64 - } - fn st_gen(&self) -> u32 { - self.as_inner().as_inner().st_gen as u32 - } - fn st_flags(&self) -> u32 { - self.as_inner().as_inner().st_flags as u32 - } -} - diff --git a/src/libstd/os/bitrig/mod.rs b/src/libstd/os/bitrig/mod.rs deleted file mode 100644 index 0bc105bb2b..0000000000 --- a/src/libstd/os/bitrig/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -//! Bitrig-specific definitions - -#![stable(feature = "raw_ext", since = "1.1.0")] - -pub mod raw; -pub mod fs; diff --git a/src/libstd/os/bitrig/raw.rs b/src/libstd/os/bitrig/raw.rs deleted file mode 100644 index c966d5a8e5..0000000000 --- a/src/libstd/os/bitrig/raw.rs +++ /dev/null @@ -1,71 +0,0 @@ -//! Bitrig-specific raw type definitions - -#![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated(since = "1.8.0", - reason = "these type aliases are no longer supported by \ - the standard library, the `libc` crate on \ - crates.io should be used instead for the correct \ - definitions")] -#![allow(deprecated)] - -use crate::os::raw::c_long; -use crate::os::unix::raw::{uid_t, gid_t}; - -#[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64; -#[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64; -#[stable(feature = "raw_ext", since = "1.1.0")] pub type dev_t = u64; -#[stable(feature = "raw_ext", since = "1.1.0")] pub type fflags_t = u32; -#[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64; -#[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = u32; -#[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u64; -#[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64; -#[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64; - -#[stable(feature = "pthread_t", since = "1.8.0")] -pub type pthread_t = usize; - -#[repr(C)] -#[derive(Clone)] -#[stable(feature = "raw_ext", since = "1.1.0")] -pub struct stat { - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_mode: u32, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_dev: i32, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_ino: u64, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_nlink: u32, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_uid: u32, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_gid: u32, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_rdev: i32, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_atime: i64, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_atime_nsec: i64, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_mtime: u64, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_mtime_nsec: i64, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_ctime: i64, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_ctime_nsec: i64, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_size: i64, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_blocks: i64, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_blksize: u32, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_flags: u32, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_gen: u32, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_birthtime: i64, - #[stable(feature = "raw_ext", since = "1.1.0")] - pub st_birthtime_nsec: i64, -} diff --git a/src/libstd/os/dragonfly/fs.rs b/src/libstd/os/dragonfly/fs.rs index ba38660224..ba3d8d7867 100644 --- a/src/libstd/os/dragonfly/fs.rs +++ b/src/libstd/os/dragonfly/fs.rs @@ -131,4 +131,3 @@ impl MetadataExt for Metadata { self.as_inner().as_inner().st_lspare as u32 } } - diff --git a/src/libstd/os/freebsd/fs.rs b/src/libstd/os/freebsd/fs.rs index 4cc3a4b91f..cfe8d575c6 100644 --- a/src/libstd/os/freebsd/fs.rs +++ b/src/libstd/os/freebsd/fs.rs @@ -141,4 +141,3 @@ impl MetadataExt for Metadata { self.as_inner().as_inner().st_lspare as u32 } } - diff --git a/src/libstd/os/ios/fs.rs b/src/libstd/os/ios/fs.rs index 7b625f5e3f..9bdfa8e690 100644 --- a/src/libstd/os/ios/fs.rs +++ b/src/libstd/os/ios/fs.rs @@ -141,4 +141,3 @@ impl MetadataExt for Metadata { self.as_inner().as_inner().st_lspare as u32 } } - diff --git a/src/libstd/os/macos/fs.rs b/src/libstd/os/macos/fs.rs index 1bd66ad4c7..bf951ee18c 100644 --- a/src/libstd/os/macos/fs.rs +++ b/src/libstd/os/macos/fs.rs @@ -147,4 +147,3 @@ impl MetadataExt for Metadata { [qspare[0] as u64, qspare[1] as u64] } } - diff --git a/src/libstd/os/mod.rs b/src/libstd/os/mod.rs index d48b5acffc..44cbc180b8 100644 --- a/src/libstd/os/mod.rs +++ b/src/libstd/os/mod.rs @@ -39,7 +39,6 @@ cfg_if! { } #[cfg(target_os = "android")] pub mod android; -#[cfg(target_os = "bitrig")] pub mod bitrig; #[cfg(target_os = "dragonfly")] pub mod dragonfly; #[cfg(target_os = "freebsd")] pub mod freebsd; #[cfg(target_os = "haiku")] pub mod haiku; @@ -51,7 +50,7 @@ cfg_if! { #[cfg(target_os = "emscripten")] pub mod emscripten; #[cfg(target_os = "fuchsia")] pub mod fuchsia; #[cfg(target_os = "hermit")] pub mod hermit; -#[cfg(target_env = "wasi")] pub mod wasi; +#[cfg(target_os = "wasi")] pub mod wasi; #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] pub mod fortanix_sgx; pub mod raw; diff --git a/src/libstd/os/netbsd/fs.rs b/src/libstd/os/netbsd/fs.rs index 6dffb70b5d..dedfc6390c 100644 --- a/src/libstd/os/netbsd/fs.rs +++ b/src/libstd/os/netbsd/fs.rs @@ -136,4 +136,3 @@ impl MetadataExt for Metadata { self.as_inner().as_inner().st_flags as u32 } } - diff --git a/src/libstd/os/openbsd/fs.rs b/src/libstd/os/openbsd/fs.rs index 73f9757f3b..1c019159be 100644 --- a/src/libstd/os/openbsd/fs.rs +++ b/src/libstd/os/openbsd/fs.rs @@ -136,4 +136,3 @@ impl MetadataExt for Metadata { self.as_inner().as_inner().st_flags as u32 } } - diff --git a/src/libstd/panic.rs b/src/libstd/panic.rs index 5a8101e230..1d4fd98dd7 100644 --- a/src/libstd/panic.rs +++ b/src/libstd/panic.rs @@ -4,6 +4,7 @@ use crate::any::Any; use crate::cell::UnsafeCell; +use crate::collections; use crate::fmt; use crate::future::Future; use crate::pin::Pin; @@ -285,6 +286,11 @@ impl RefUnwindSafe for atomic::AtomicBool {} #[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")] impl RefUnwindSafe for atomic::AtomicPtr {} +// https://github.com/rust-lang/rust/issues/62301 +#[stable(feature = "hashbrown", since = "1.36.0")] +impl UnwindSafe for collections::HashMap + where K: UnwindSafe, V: UnwindSafe, S: UnwindSafe {} + #[stable(feature = "catch_unwind", since = "1.9.0")] impl Deref for AssertUnwindSafe { type Target = T; @@ -319,7 +325,7 @@ impl fmt::Debug for AssertUnwindSafe { } } -#[unstable(feature = "futures_api", issue = "50547")] +#[stable(feature = "futures_api", since = "1.36.0")] impl Future for AssertUnwindSafe { type Output = F::Output; diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 1bbda9b5bc..126bc3754d 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -1,3 +1,5 @@ +// ignore-tidy-filelength + //! Cross-platform path manipulation. //! //! This module provides two types, [`PathBuf`] and [`Path`][`Path`] (akin to [`String`] diff --git a/src/libstd/primitive_docs.rs b/src/libstd/primitive_docs.rs index 94fece10e0..24f728158c 100644 --- a/src/libstd/primitive_docs.rs +++ b/src/libstd/primitive_docs.rs @@ -279,7 +279,7 @@ mod prim_never { } /// /// As always, remember that a human intuition for 'character' may not map to /// Unicode's definitions. For example, despite looking similar, the 'é' -/// character is one Unicode code point while 'é' is two Unicode code points: +/// character is one Unicode code point while 'é' is two Unicode code points: /// /// ``` /// let mut chars = "é".chars(); diff --git a/src/libstd/process.rs b/src/libstd/process.rs index e0c9b7cad8..6e4c6e4c36 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -111,7 +111,7 @@ use crate::io::prelude::*; use crate::ffi::OsStr; use crate::fmt; use crate::fs; -use crate::io::{self, Initializer}; +use crate::io::{self, Initializer, IoSlice, IoSliceMut}; use crate::path::Path; use crate::str; use crate::sys::pipe::{read2, AnonPipe}; @@ -134,6 +134,18 @@ use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner}; /// the parent process wait until the child has actually exited before /// continuing. /// +/// # Warning +/// +/// On some system, calling [`wait`] or similar is necessary for the OS to +/// release resources. A process that terminated but has not been waited on is +/// still around as a "zombie". Leaving too many zombies around may exhaust +/// global resources (for example process IDs). +/// +/// The standard library does *not* automatically wait on child processes (not +/// even if the `Child` is dropped), it is up to the application developer to do +/// so. As a consequence, dropping `Child` handles without waiting on them first +/// is not recommended in long-running applications. +/// /// # Examples /// /// ```should_panic @@ -225,6 +237,10 @@ impl Write for ChildStdin { self.inner.write(buf) } + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { + self.inner.write_vectored(bufs) + } + fn flush(&mut self) -> io::Result<()> { Ok(()) } @@ -271,6 +287,11 @@ impl Read for ChildStdout { fn read(&mut self, buf: &mut [u8]) -> io::Result { self.inner.read(buf) } + + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + self.inner.read_vectored(bufs) + } + #[inline] unsafe fn initializer(&self) -> Initializer { Initializer::nop() @@ -318,6 +339,11 @@ impl Read for ChildStderr { fn read(&mut self, buf: &mut [u8]) -> io::Result { self.inner.read(buf) } + + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + self.inner.read_vectored(bufs) + } + #[inline] unsafe fn initializer(&self) -> Initializer { Initializer::nop() diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs index bc32b8e47b..69ecd20106 100644 --- a/src/libstd/sync/mpsc/mod.rs +++ b/src/libstd/sync/mpsc/mod.rs @@ -1,3 +1,5 @@ +// ignore-tidy-filelength + //! Multi-producer, single-consumer FIFO queue communication primitives. //! //! This module provides message-based communication over channels, concretely @@ -114,7 +116,6 @@ //! ``` #![stable(feature = "rust1", since = "1.0.0")] -#![allow(deprecated)] // for mpsc_select // A description of how Rust's channel implementation works // @@ -261,6 +262,8 @@ // believe that there is anything fundamental that needs to change about these // channels, however, in order to support a more efficient select(). // +// FIXME: Select is now removed, so these factors are ready to be cleaned up! +// // # Conclusion // // And now that you've seen all the races that I found and attempted to fix, @@ -273,18 +276,8 @@ use crate::mem; use crate::cell::UnsafeCell; use crate::time::{Duration, Instant}; -#[unstable(feature = "mpsc_select", issue = "27800")] -pub use self::select::{Select, Handle}; -use self::select::StartResult; -use self::select::StartResult::*; -use self::blocking::SignalToken; - -#[cfg(all(test, not(target_os = "emscripten")))] -mod select_tests; - mod blocking; mod oneshot; -mod select; mod shared; mod stream; mod sync; @@ -1005,7 +998,7 @@ impl SyncSender { /// thread::spawn(move || { /// // This will return an error and send /// // no message if the buffer is full - /// sync_sender2.try_send(3).is_err(); + /// let _ = sync_sender2.try_send(3); /// }); /// /// let mut msg; @@ -1512,78 +1505,6 @@ impl Receiver { } -impl select::Packet for Receiver { - fn can_recv(&self) -> bool { - loop { - let new_port = match *unsafe { self.inner() } { - Flavor::Oneshot(ref p) => { - match p.can_recv() { - Ok(ret) => return ret, - Err(upgrade) => upgrade, - } - } - Flavor::Stream(ref p) => { - match p.can_recv() { - Ok(ret) => return ret, - Err(upgrade) => upgrade, - } - } - Flavor::Shared(ref p) => return p.can_recv(), - Flavor::Sync(ref p) => return p.can_recv(), - }; - unsafe { - mem::swap(self.inner_mut(), - new_port.inner_mut()); - } - } - } - - fn start_selection(&self, mut token: SignalToken) -> StartResult { - loop { - let (t, new_port) = match *unsafe { self.inner() } { - Flavor::Oneshot(ref p) => { - match p.start_selection(token) { - oneshot::SelSuccess => return Installed, - oneshot::SelCanceled => return Abort, - oneshot::SelUpgraded(t, rx) => (t, rx), - } - } - Flavor::Stream(ref p) => { - match p.start_selection(token) { - stream::SelSuccess => return Installed, - stream::SelCanceled => return Abort, - stream::SelUpgraded(t, rx) => (t, rx), - } - } - Flavor::Shared(ref p) => return p.start_selection(token), - Flavor::Sync(ref p) => return p.start_selection(token), - }; - token = t; - unsafe { - mem::swap(self.inner_mut(), new_port.inner_mut()); - } - } - } - - fn abort_selection(&self) -> bool { - let mut was_upgrade = false; - loop { - let result = match *unsafe { self.inner() } { - Flavor::Oneshot(ref p) => p.abort_selection(), - Flavor::Stream(ref p) => p.abort_selection(was_upgrade), - Flavor::Shared(ref p) => return p.abort_selection(was_upgrade), - Flavor::Sync(ref p) => return p.abort_selection(), - }; - let new_port = match result { Ok(b) => return b, Err(p) => p }; - was_upgrade = true; - unsafe { - mem::swap(self.inner_mut(), - new_port.inner_mut()); - } - } - } -} - #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> Iterator for Iter<'a, T> { type Item = T; diff --git a/src/libstd/sync/mpsc/oneshot.rs b/src/libstd/sync/mpsc/oneshot.rs index 5c516d5de0..e7a5cc46b3 100644 --- a/src/libstd/sync/mpsc/oneshot.rs +++ b/src/libstd/sync/mpsc/oneshot.rs @@ -24,7 +24,6 @@ pub use self::Failure::*; pub use self::UpgradeResult::*; -pub use self::SelectionResult::*; use self::MyUpgrade::*; use crate::sync::mpsc::Receiver; @@ -66,12 +65,6 @@ pub enum UpgradeResult { UpWoke(SignalToken), } -pub enum SelectionResult { - SelCanceled, - SelUpgraded(SignalToken, Receiver), - SelSuccess, -} - enum MyUpgrade { NothingSent, SendUsed, @@ -264,71 +257,6 @@ impl Packet { // select implementation //////////////////////////////////////////////////////////////////////////// - // If Ok, the value is whether this port has data, if Err, then the upgraded - // port needs to be checked instead of this one. - pub fn can_recv(&self) -> Result> { - unsafe { - match self.state.load(Ordering::SeqCst) { - EMPTY => Ok(false), // Welp, we tried - DATA => Ok(true), // we have some un-acquired data - DISCONNECTED if (*self.data.get()).is_some() => Ok(true), // we have data - DISCONNECTED => { - match ptr::replace(self.upgrade.get(), SendUsed) { - // The other end sent us an upgrade, so we need to - // propagate upwards whether the upgrade can receive - // data - GoUp(upgrade) => Err(upgrade), - - // If the other end disconnected without sending an - // upgrade, then we have data to receive (the channel is - // disconnected). - up => { ptr::write(self.upgrade.get(), up); Ok(true) } - } - } - _ => unreachable!(), // we're the "one blocker" - } - } - } - - // Attempts to start selection on this port. This can either succeed, fail - // because there is data, or fail because there is an upgrade pending. - pub fn start_selection(&self, token: SignalToken) -> SelectionResult { - unsafe { - let ptr = token.cast_to_usize(); - match self.state.compare_and_swap(EMPTY, ptr, Ordering::SeqCst) { - EMPTY => SelSuccess, - DATA => { - drop(SignalToken::cast_from_usize(ptr)); - SelCanceled - } - DISCONNECTED if (*self.data.get()).is_some() => { - drop(SignalToken::cast_from_usize(ptr)); - SelCanceled - } - DISCONNECTED => { - match ptr::replace(self.upgrade.get(), SendUsed) { - // The other end sent us an upgrade, so we need to - // propagate upwards whether the upgrade can receive - // data - GoUp(upgrade) => { - SelUpgraded(SignalToken::cast_from_usize(ptr), upgrade) - } - - // If the other end disconnected without sending an - // upgrade, then we have data to receive (the channel is - // disconnected). - up => { - ptr::write(self.upgrade.get(), up); - drop(SignalToken::cast_from_usize(ptr)); - SelCanceled - } - } - } - _ => unreachable!(), // we're the "one blocker" - } - } - } - // Remove a previous selecting thread from this port. This ensures that the // blocked thread will no longer be visible to any other threads. // diff --git a/src/libstd/sync/mpsc/select.rs b/src/libstd/sync/mpsc/select.rs deleted file mode 100644 index d1b5f2decc..0000000000 --- a/src/libstd/sync/mpsc/select.rs +++ /dev/null @@ -1,352 +0,0 @@ -//! Selection over an array of receivers -//! -//! This module contains the implementation machinery necessary for selecting -//! over a number of receivers. One large goal of this module is to provide an -//! efficient interface to selecting over any receiver of any type. -//! -//! This is achieved through an architecture of a "receiver set" in which -//! receivers are added to a set and then the entire set is waited on at once. -//! The set can be waited on multiple times to prevent re-adding each receiver -//! to the set. -//! -//! Usage of this module is currently encouraged to go through the use of the -//! `select!` macro. This macro allows naturally binding of variables to the -//! received values of receivers in a much more natural syntax then usage of the -//! `Select` structure directly. -//! -//! # Examples -//! -//! ```rust -//! #![feature(mpsc_select)] -//! -//! use std::sync::mpsc::channel; -//! -//! let (tx1, rx1) = channel(); -//! let (tx2, rx2) = channel(); -//! -//! tx1.send(1).unwrap(); -//! tx2.send(2).unwrap(); -//! -//! select! { -//! val = rx1.recv() => { -//! assert_eq!(val.unwrap(), 1); -//! }, -//! val = rx2.recv() => { -//! assert_eq!(val.unwrap(), 2); -//! } -//! } -//! ``` - -#![allow(dead_code)] -#![unstable(feature = "mpsc_select", - reason = "This implementation, while likely sufficient, is unsafe and \ - likely to be error prone. At some point in the future this \ - module will be removed.", - issue = "27800")] -#![rustc_deprecated(since = "1.32.0", - reason = "channel selection will be removed in a future release")] - -use core::cell::{Cell, UnsafeCell}; -use core::marker; -use core::ptr; -use core::usize; - -use crate::fmt; -use crate::sync::mpsc::{Receiver, RecvError}; -use crate::sync::mpsc::blocking::{self, SignalToken}; - -/// The "receiver set" of the select interface. This structure is used to manage -/// a set of receivers which are being selected over. -pub struct Select { - inner: UnsafeCell, - next_id: Cell, -} - -struct SelectInner { - head: *mut Handle<'static, ()>, - tail: *mut Handle<'static, ()>, -} - -impl !marker::Send for Select {} - -/// A handle to a receiver which is currently a member of a `Select` set of -/// receivers. This handle is used to keep the receiver in the set as well as -/// interact with the underlying receiver. -pub struct Handle<'rx, T:Send+'rx> { - /// The ID of this handle, used to compare against the return value of - /// `Select::wait()`. - id: usize, - selector: *mut SelectInner, - next: *mut Handle<'static, ()>, - prev: *mut Handle<'static, ()>, - added: bool, - packet: &'rx (dyn Packet+'rx), - - // due to our fun transmutes, we be sure to place this at the end. (nothing - // previous relies on T) - rx: &'rx Receiver, -} - -struct Packets { cur: *mut Handle<'static, ()> } - -#[doc(hidden)] -#[derive(PartialEq, Eq)] -pub enum StartResult { - Installed, - Abort, -} - -#[doc(hidden)] -pub trait Packet { - fn can_recv(&self) -> bool; - fn start_selection(&self, token: SignalToken) -> StartResult; - fn abort_selection(&self) -> bool; -} - -impl Select { - /// Creates a new selection structure. This set is initially empty. - /// - /// Usage of this struct directly can sometimes be burdensome, and usage is much easier through - /// the `select!` macro. - /// - /// # Examples - /// - /// ``` - /// #![feature(mpsc_select)] - /// - /// use std::sync::mpsc::Select; - /// - /// let select = Select::new(); - /// ``` - pub fn new() -> Select { - Select { - inner: UnsafeCell::new(SelectInner { - head: ptr::null_mut(), - tail: ptr::null_mut(), - }), - next_id: Cell::new(1), - } - } - - /// Creates a new handle into this receiver set for a new receiver. Note - /// that this does *not* add the receiver to the receiver set, for that you - /// must call the `add` method on the handle itself. - pub fn handle<'a, T: Send>(&'a self, rx: &'a Receiver) -> Handle<'a, T> { - let id = self.next_id.get(); - self.next_id.set(id + 1); - Handle { - id, - selector: self.inner.get(), - next: ptr::null_mut(), - prev: ptr::null_mut(), - added: false, - rx, - packet: rx, - } - } - - /// Waits for an event on this receiver set. The returned value is *not* an - /// index, but rather an ID. This ID can be queried against any active - /// `Handle` structures (each one has an `id` method). The handle with - /// the matching `id` will have some sort of event available on it. The - /// event could either be that data is available or the corresponding - /// channel has been closed. - pub fn wait(&self) -> usize { - self.wait2(true) - } - - /// Helper method for skipping the preflight checks during testing - pub(super) fn wait2(&self, do_preflight_checks: bool) -> usize { - // Note that this is currently an inefficient implementation. We in - // theory have knowledge about all receivers in the set ahead of time, - // so this method shouldn't really have to iterate over all of them yet - // again. The idea with this "receiver set" interface is to get the - // interface right this time around, and later this implementation can - // be optimized. - // - // This implementation can be summarized by: - // - // fn select(receivers) { - // if any receiver ready { return ready index } - // deschedule { - // block on all receivers - // } - // unblock on all receivers - // return ready index - // } - // - // Most notably, the iterations over all of the receivers shouldn't be - // necessary. - unsafe { - // Stage 1: preflight checks. Look for any packets ready to receive - if do_preflight_checks { - for handle in self.iter() { - if (*handle).packet.can_recv() { - return (*handle).id(); - } - } - } - - // Stage 2: begin the blocking process - // - // Create a number of signal tokens, and install each one - // sequentially until one fails. If one fails, then abort the - // selection on the already-installed tokens. - let (wait_token, signal_token) = blocking::tokens(); - for (i, handle) in self.iter().enumerate() { - match (*handle).packet.start_selection(signal_token.clone()) { - StartResult::Installed => {} - StartResult::Abort => { - // Go back and abort the already-begun selections - for handle in self.iter().take(i) { - (*handle).packet.abort_selection(); - } - return (*handle).id; - } - } - } - - // Stage 3: no messages available, actually block - wait_token.wait(); - - // Stage 4: there *must* be message available; find it. - // - // Abort the selection process on each receiver. If the abort - // process returns `true`, then that means that the receiver is - // ready to receive some data. Note that this also means that the - // receiver may have yet to have fully read the `to_wake` field and - // woken us up (although the wakeup is guaranteed to fail). - // - // This situation happens in the window of where a sender invokes - // increment(), sees -1, and then decides to wake up the thread. After - // all this is done, the sending thread will set `selecting` to - // `false`. Until this is done, we cannot return. If we were to - // return, then a sender could wake up a receiver which has gone - // back to sleep after this call to `select`. - // - // Note that it is a "fairly small window" in which an increment() - // views that it should wake a thread up until the `selecting` bit - // is set to false. For now, the implementation currently just spins - // in a yield loop. This is very distasteful, but this - // implementation is already nowhere near what it should ideally be. - // A rewrite should focus on avoiding a yield loop, and for now this - // implementation is tying us over to a more efficient "don't - // iterate over everything every time" implementation. - let mut ready_id = usize::MAX; - for handle in self.iter() { - if (*handle).packet.abort_selection() { - ready_id = (*handle).id; - } - } - - // We must have found a ready receiver - assert!(ready_id != usize::MAX); - return ready_id; - } - } - - fn iter(&self) -> Packets { Packets { cur: unsafe { &*self.inner.get() }.head } } -} - -impl<'rx, T: Send> Handle<'rx, T> { - /// Retrieves the ID of this handle. - #[inline] - pub fn id(&self) -> usize { self.id } - - /// Blocks to receive a value on the underlying receiver, returning `Some` on - /// success or `None` if the channel disconnects. This function has the same - /// semantics as `Receiver.recv` - pub fn recv(&mut self) -> Result { self.rx.recv() } - - /// Adds this handle to the receiver set that the handle was created from. This - /// method can be called multiple times, but it has no effect if `add` was - /// called previously. - /// - /// This method is unsafe because it requires that the `Handle` is not moved - /// while it is added to the `Select` set. - pub unsafe fn add(&mut self) { - if self.added { return } - let selector = &mut *self.selector; - let me = self as *mut Handle<'rx, T> as *mut Handle<'static, ()>; - - if selector.head.is_null() { - selector.head = me; - selector.tail = me; - } else { - (*me).prev = selector.tail; - assert!((*me).next.is_null()); - (*selector.tail).next = me; - selector.tail = me; - } - self.added = true; - } - - /// Removes this handle from the `Select` set. This method is unsafe because - /// it has no guarantee that the `Handle` was not moved since `add` was - /// called. - pub unsafe fn remove(&mut self) { - if !self.added { return } - - let selector = &mut *self.selector; - let me = self as *mut Handle<'rx, T> as *mut Handle<'static, ()>; - - if self.prev.is_null() { - assert_eq!(selector.head, me); - selector.head = self.next; - } else { - (*self.prev).next = self.next; - } - if self.next.is_null() { - assert_eq!(selector.tail, me); - selector.tail = self.prev; - } else { - (*self.next).prev = self.prev; - } - - self.next = ptr::null_mut(); - self.prev = ptr::null_mut(); - - self.added = false; - } -} - -impl Drop for Select { - fn drop(&mut self) { - unsafe { - assert!((&*self.inner.get()).head.is_null()); - assert!((&*self.inner.get()).tail.is_null()); - } - } -} - -impl Drop for Handle<'_, T> { - fn drop(&mut self) { - unsafe { self.remove() } - } -} - -impl Iterator for Packets { - type Item = *mut Handle<'static, ()>; - - fn next(&mut self) -> Option<*mut Handle<'static, ()>> { - if self.cur.is_null() { - None - } else { - let ret = Some(self.cur); - unsafe { self.cur = (*self.cur).next; } - ret - } - } -} - -impl fmt::Debug for Select { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Select").finish() - } -} - -impl fmt::Debug for Handle<'_, T> { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Handle").finish() - } -} diff --git a/src/libstd/sync/mpsc/select_tests.rs b/src/libstd/sync/mpsc/select_tests.rs deleted file mode 100644 index 18d93462c7..0000000000 --- a/src/libstd/sync/mpsc/select_tests.rs +++ /dev/null @@ -1,413 +0,0 @@ -#![allow(unused_imports)] - -/// This file exists to hack around https://github.com/rust-lang/rust/issues/47238 - -use crate::thread; -use crate::sync::mpsc::*; - -// Don't use the libstd version so we can pull in the right Select structure -// (std::comm points at the wrong one) -macro_rules! select { - ( - $($name:pat = $rx:ident.$meth:ident() => $code:expr),+ - ) => ({ - let sel = Select::new(); - $( let mut $rx = sel.handle(&$rx); )+ - unsafe { - $( $rx.add(); )+ - } - let ret = sel.wait(); - $( if ret == $rx.id() { let $name = $rx.$meth(); $code } else )+ - { unreachable!() } - }) -} - -#[test] -fn smoke() { - let (tx1, rx1) = channel::(); - let (tx2, rx2) = channel::(); - tx1.send(1).unwrap(); - select! { - foo = rx1.recv() => { assert_eq!(foo.unwrap(), 1); }, - _bar = rx2.recv() => { panic!() } - } - tx2.send(2).unwrap(); - select! { - _foo = rx1.recv() => { panic!() }, - bar = rx2.recv() => { assert_eq!(bar.unwrap(), 2) } - } - drop(tx1); - select! { - foo = rx1.recv() => { assert!(foo.is_err()); }, - _bar = rx2.recv() => { panic!() } - } - drop(tx2); - select! { - bar = rx2.recv() => { assert!(bar.is_err()); } - } -} - -#[test] -fn smoke2() { - let (_tx1, rx1) = channel::(); - let (_tx2, rx2) = channel::(); - let (_tx3, rx3) = channel::(); - let (_tx4, rx4) = channel::(); - let (tx5, rx5) = channel::(); - tx5.send(4).unwrap(); - select! { - _foo = rx1.recv() => { panic!("1") }, - _foo = rx2.recv() => { panic!("2") }, - _foo = rx3.recv() => { panic!("3") }, - _foo = rx4.recv() => { panic!("4") }, - foo = rx5.recv() => { assert_eq!(foo.unwrap(), 4); } - } -} - -#[test] -fn closed() { - let (_tx1, rx1) = channel::(); - let (tx2, rx2) = channel::(); - drop(tx2); - - select! { - _a1 = rx1.recv() => { panic!() }, - a2 = rx2.recv() => { assert!(a2.is_err()); } - } -} - -#[test] -fn unblocks() { - let (tx1, rx1) = channel::(); - let (_tx2, rx2) = channel::(); - let (tx3, rx3) = channel::(); - - let _t = thread::spawn(move|| { - for _ in 0..20 { thread::yield_now(); } - tx1.send(1).unwrap(); - rx3.recv().unwrap(); - for _ in 0..20 { thread::yield_now(); } - }); - - select! { - a = rx1.recv() => { assert_eq!(a.unwrap(), 1); }, - _b = rx2.recv() => { panic!() } - } - tx3.send(1).unwrap(); - select! { - a = rx1.recv() => { assert!(a.is_err()) }, - _b = rx2.recv() => { panic!() } - } -} - -#[test] -fn both_ready() { - let (tx1, rx1) = channel::(); - let (tx2, rx2) = channel::(); - let (tx3, rx3) = channel::<()>(); - - let _t = thread::spawn(move|| { - for _ in 0..20 { thread::yield_now(); } - tx1.send(1).unwrap(); - tx2.send(2).unwrap(); - rx3.recv().unwrap(); - }); - - select! { - a = rx1.recv() => { assert_eq!(a.unwrap(), 1); }, - a = rx2.recv() => { assert_eq!(a.unwrap(), 2); } - } - select! { - a = rx1.recv() => { assert_eq!(a.unwrap(), 1); }, - a = rx2.recv() => { assert_eq!(a.unwrap(), 2); } - } - assert_eq!(rx1.try_recv(), Err(TryRecvError::Empty)); - assert_eq!(rx2.try_recv(), Err(TryRecvError::Empty)); - tx3.send(()).unwrap(); -} - -#[test] -fn stress() { - const AMT: i32 = 10000; - let (tx1, rx1) = channel::(); - let (tx2, rx2) = channel::(); - let (tx3, rx3) = channel::<()>(); - - let _t = thread::spawn(move|| { - for i in 0..AMT { - if i % 2 == 0 { - tx1.send(i).unwrap(); - } else { - tx2.send(i).unwrap(); - } - rx3.recv().unwrap(); - } - }); - - for i in 0..AMT { - select! { - i1 = rx1.recv() => { assert!(i % 2 == 0 && i == i1.unwrap()); }, - i2 = rx2.recv() => { assert!(i % 2 == 1 && i == i2.unwrap()); } - } - tx3.send(()).unwrap(); - } -} - -#[allow(unused_must_use)] -#[test] -fn cloning() { - let (tx1, rx1) = channel::(); - let (_tx2, rx2) = channel::(); - let (tx3, rx3) = channel::<()>(); - - let _t = thread::spawn(move|| { - rx3.recv().unwrap(); - tx1.clone(); - assert_eq!(rx3.try_recv(), Err(TryRecvError::Empty)); - tx1.send(2).unwrap(); - rx3.recv().unwrap(); - }); - - tx3.send(()).unwrap(); - select! { - _i1 = rx1.recv() => {}, - _i2 = rx2.recv() => panic!() - } - tx3.send(()).unwrap(); -} - -#[allow(unused_must_use)] -#[test] -fn cloning2() { - let (tx1, rx1) = channel::(); - let (_tx2, rx2) = channel::(); - let (tx3, rx3) = channel::<()>(); - - let _t = thread::spawn(move|| { - rx3.recv().unwrap(); - tx1.clone(); - assert_eq!(rx3.try_recv(), Err(TryRecvError::Empty)); - tx1.send(2).unwrap(); - rx3.recv().unwrap(); - }); - - tx3.send(()).unwrap(); - select! { - _i1 = rx1.recv() => {}, - _i2 = rx2.recv() => panic!() - } - tx3.send(()).unwrap(); -} - -#[test] -fn cloning3() { - let (tx1, rx1) = channel::<()>(); - let (tx2, rx2) = channel::<()>(); - let (tx3, rx3) = channel::<()>(); - let _t = thread::spawn(move|| { - let s = Select::new(); - let mut h1 = s.handle(&rx1); - let mut h2 = s.handle(&rx2); - unsafe { h2.add(); } - unsafe { h1.add(); } - assert_eq!(s.wait(), h2.id()); - tx3.send(()).unwrap(); - }); - - for _ in 0..1000 { thread::yield_now(); } - drop(tx1.clone()); - tx2.send(()).unwrap(); - rx3.recv().unwrap(); -} - -#[test] -fn preflight1() { - let (tx, rx) = channel(); - tx.send(()).unwrap(); - select! { - _n = rx.recv() => {} - } -} - -#[test] -fn preflight2() { - let (tx, rx) = channel(); - tx.send(()).unwrap(); - tx.send(()).unwrap(); - select! { - _n = rx.recv() => {} - } -} - -#[test] -fn preflight3() { - let (tx, rx) = channel(); - drop(tx.clone()); - tx.send(()).unwrap(); - select! { - _n = rx.recv() => {} - } -} - -#[test] -fn preflight4() { - let (tx, rx) = channel(); - tx.send(()).unwrap(); - let s = Select::new(); - let mut h = s.handle(&rx); - unsafe { h.add(); } - assert_eq!(s.wait2(false), h.id()); -} - -#[test] -fn preflight5() { - let (tx, rx) = channel(); - tx.send(()).unwrap(); - tx.send(()).unwrap(); - let s = Select::new(); - let mut h = s.handle(&rx); - unsafe { h.add(); } - assert_eq!(s.wait2(false), h.id()); -} - -#[test] -fn preflight6() { - let (tx, rx) = channel(); - drop(tx.clone()); - tx.send(()).unwrap(); - let s = Select::new(); - let mut h = s.handle(&rx); - unsafe { h.add(); } - assert_eq!(s.wait2(false), h.id()); -} - -#[test] -fn preflight7() { - let (tx, rx) = channel::<()>(); - drop(tx); - let s = Select::new(); - let mut h = s.handle(&rx); - unsafe { h.add(); } - assert_eq!(s.wait2(false), h.id()); -} - -#[test] -fn preflight8() { - let (tx, rx) = channel(); - tx.send(()).unwrap(); - drop(tx); - rx.recv().unwrap(); - let s = Select::new(); - let mut h = s.handle(&rx); - unsafe { h.add(); } - assert_eq!(s.wait2(false), h.id()); -} - -#[test] -fn preflight9() { - let (tx, rx) = channel(); - drop(tx.clone()); - tx.send(()).unwrap(); - drop(tx); - rx.recv().unwrap(); - let s = Select::new(); - let mut h = s.handle(&rx); - unsafe { h.add(); } - assert_eq!(s.wait2(false), h.id()); -} - -#[test] -fn oneshot_data_waiting() { - let (tx1, rx1) = channel(); - let (tx2, rx2) = channel(); - let _t = thread::spawn(move|| { - select! { - _n = rx1.recv() => {} - } - tx2.send(()).unwrap(); - }); - - for _ in 0..100 { thread::yield_now() } - tx1.send(()).unwrap(); - rx2.recv().unwrap(); -} - -#[test] -fn stream_data_waiting() { - let (tx1, rx1) = channel(); - let (tx2, rx2) = channel(); - tx1.send(()).unwrap(); - tx1.send(()).unwrap(); - rx1.recv().unwrap(); - rx1.recv().unwrap(); - let _t = thread::spawn(move|| { - select! { - _n = rx1.recv() => {} - } - tx2.send(()).unwrap(); - }); - - for _ in 0..100 { thread::yield_now() } - tx1.send(()).unwrap(); - rx2.recv().unwrap(); -} - -#[test] -fn shared_data_waiting() { - let (tx1, rx1) = channel(); - let (tx2, rx2) = channel(); - drop(tx1.clone()); - tx1.send(()).unwrap(); - rx1.recv().unwrap(); - let _t = thread::spawn(move|| { - select! { - _n = rx1.recv() => {} - } - tx2.send(()).unwrap(); - }); - - for _ in 0..100 { thread::yield_now() } - tx1.send(()).unwrap(); - rx2.recv().unwrap(); -} - -#[test] -fn sync1() { - let (tx, rx) = sync_channel::(1); - tx.send(1).unwrap(); - select! { - n = rx.recv() => { assert_eq!(n.unwrap(), 1); } - } -} - -#[test] -fn sync2() { - let (tx, rx) = sync_channel::(0); - let _t = thread::spawn(move|| { - for _ in 0..100 { thread::yield_now() } - tx.send(1).unwrap(); - }); - select! { - n = rx.recv() => { assert_eq!(n.unwrap(), 1); } - } -} - -#[test] -fn sync3() { - let (tx1, rx1) = sync_channel::(0); - let (tx2, rx2): (Sender, Receiver) = channel(); - let _t = thread::spawn(move|| { tx1.send(1).unwrap(); }); - let _t = thread::spawn(move|| { tx2.send(2).unwrap(); }); - select! { - n = rx1.recv() => { - let n = n.unwrap(); - assert_eq!(n, 1); - assert_eq!(rx2.recv().unwrap(), 2); - }, - n = rx2.recv() => { - let n = n.unwrap(); - assert_eq!(n, 2); - assert_eq!(rx1.recv().unwrap(), 1); - } - } -} diff --git a/src/libstd/sync/mpsc/shared.rs b/src/libstd/sync/mpsc/shared.rs index cc70a62036..dbcdcdac93 100644 --- a/src/libstd/sync/mpsc/shared.rs +++ b/src/libstd/sync/mpsc/shared.rs @@ -9,6 +9,7 @@ /// channels are quite similar, and this is no coincidence! pub use self::Failure::*; +use self::StartResult::*; use core::cmp; use core::intrinsics::abort; @@ -19,8 +20,6 @@ use crate::ptr; use crate::sync::atomic::{AtomicUsize, AtomicIsize, AtomicBool, Ordering}; use crate::sync::mpsc::blocking::{self, SignalToken}; use crate::sync::mpsc::mpsc_queue as mpsc; -use crate::sync::mpsc::select::StartResult::*; -use crate::sync::mpsc::select::StartResult; use crate::sync::{Mutex, MutexGuard}; use crate::thread; use crate::time::Instant; @@ -57,6 +56,12 @@ pub enum Failure { Disconnected, } +#[derive(PartialEq, Eq)] +enum StartResult { + Installed, + Abort, +} + impl Packet { // Creation of a packet *must* be followed by a call to postinit_lock // and later by inherit_blocker @@ -394,16 +399,6 @@ impl Packet { // select implementation //////////////////////////////////////////////////////////////////////////// - // Helper function for select, tests whether this port can receive without - // blocking (obviously not an atomic decision). - // - // This is different than the stream version because there's no need to peek - // at the queue, we can just look at the local count. - pub fn can_recv(&self) -> bool { - let cnt = self.cnt.load(Ordering::SeqCst); - cnt == DISCONNECTED || cnt - unsafe { *self.steals.get() } > 0 - } - // increment the count on the channel (used for selection) fn bump(&self, amt: isize) -> isize { match self.cnt.fetch_add(amt, Ordering::SeqCst) { @@ -415,22 +410,6 @@ impl Packet { } } - // Inserts the signal token for selection on this port, returning true if - // blocking should proceed. - // - // The code here is the same as in stream.rs, except that it doesn't need to - // peek at the channel to see if an upgrade is pending. - pub fn start_selection(&self, token: SignalToken) -> StartResult { - match self.decrement(token) { - Installed => Installed, - Abort => { - let prev = self.bump(1); - assert!(prev == DISCONNECTED || prev >= 0); - Abort - } - } - } - // Cancels a previous thread waiting on this port, returning whether there's // data on the port. // diff --git a/src/libstd/sync/mpsc/stream.rs b/src/libstd/sync/mpsc/stream.rs index 7ae6f68b51..4087728276 100644 --- a/src/libstd/sync/mpsc/stream.rs +++ b/src/libstd/sync/mpsc/stream.rs @@ -9,7 +9,6 @@ pub use self::Failure::*; pub use self::UpgradeResult::*; -pub use self::SelectionResult::*; use self::Message::*; use core::cmp; @@ -60,12 +59,6 @@ pub enum UpgradeResult { UpWoke(SignalToken), } -pub enum SelectionResult { - SelSuccess, - SelCanceled, - SelUpgraded(SignalToken, Receiver), -} - // Any message could contain an "upgrade request" to a new shared port, so the // internal queue it's a queue of T, but rather Message enum Message { @@ -338,27 +331,6 @@ impl Packet { // select implementation //////////////////////////////////////////////////////////////////////////// - // Tests to see whether this port can receive without blocking. If Ok is - // returned, then that's the answer. If Err is returned, then the returned - // port needs to be queried instead (an upgrade happened) - pub fn can_recv(&self) -> Result> { - // We peek at the queue to see if there's anything on it, and we use - // this return value to determine if we should pop from the queue and - // upgrade this channel immediately. If it looks like we've got an - // upgrade pending, then go through the whole recv rigamarole to update - // the internal state. - match self.queue.peek() { - Some(&mut GoUp(..)) => { - match self.recv(None) { - Err(Upgraded(port)) => Err(port), - _ => unreachable!(), - } - } - Some(..) => Ok(true), - None => Ok(false) - } - } - // increment the count on the channel (used for selection) fn bump(&self, amt: isize) -> isize { match self.queue.producer_addition().cnt.fetch_add(amt, Ordering::SeqCst) { @@ -370,31 +342,6 @@ impl Packet { } } - // Attempts to start selecting on this port. Like a oneshot, this can fail - // immediately because of an upgrade. - pub fn start_selection(&self, token: SignalToken) -> SelectionResult { - match self.decrement(token) { - Ok(()) => SelSuccess, - Err(token) => { - let ret = match self.queue.peek() { - Some(&mut GoUp(..)) => { - match self.queue.pop() { - Some(GoUp(port)) => SelUpgraded(token, port), - _ => unreachable!(), - } - } - Some(..) => SelCanceled, - None => SelCanceled, - }; - // Undo our decrement above, and we should be guaranteed that the - // previous value is positive because we're not going to sleep - let prev = self.bump(1); - assert!(prev == DISCONNECTED || prev >= 0); - ret - } - } - } - // Removes a previous thread from being blocked in this port pub fn abort_selection(&self, was_upgrade: bool) -> Result> { diff --git a/src/libstd/sync/mpsc/sync.rs b/src/libstd/sync/mpsc/sync.rs index b2d9f4c649..3c4f8e077c 100644 --- a/src/libstd/sync/mpsc/sync.rs +++ b/src/libstd/sync/mpsc/sync.rs @@ -33,7 +33,6 @@ use core::ptr; use crate::sync::atomic::{Ordering, AtomicUsize}; use crate::sync::mpsc::blocking::{self, WaitToken, SignalToken}; -use crate::sync::mpsc::select::StartResult::{self, Installed, Abort}; use crate::sync::{Mutex, MutexGuard}; use crate::time::Instant; @@ -406,42 +405,6 @@ impl Packet { while let Some(token) = queue.dequeue() { token.signal(); } waiter.map(|t| t.signal()); } - - //////////////////////////////////////////////////////////////////////////// - // select implementation - //////////////////////////////////////////////////////////////////////////// - - // If Ok, the value is whether this port has data, if Err, then the upgraded - // port needs to be checked instead of this one. - pub fn can_recv(&self) -> bool { - let guard = self.lock.lock().unwrap(); - guard.disconnected || guard.buf.size() > 0 - } - - // Attempts to start selection on this port. This can either succeed or fail - // because there is data waiting. - pub fn start_selection(&self, token: SignalToken) -> StartResult { - let mut guard = self.lock.lock().unwrap(); - if guard.disconnected || guard.buf.size() > 0 { - Abort - } else { - match mem::replace(&mut guard.blocker, BlockedReceiver(token)) { - NoneBlocked => {} - BlockedSender(..) => unreachable!(), - BlockedReceiver(..) => unreachable!(), - } - Installed - } - } - - // Remove a previous selecting thread from this port. This ensures that the - // blocked thread will no longer be visible to any other threads. - // - // The return value indicates whether there's data on this port. - pub fn abort_selection(&self) -> bool { - let mut guard = self.lock.lock().unwrap(); - abort_selection(&mut guard) - } } impl Drop for Packet { diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs index 11ac34fcb2..87c2318a93 100644 --- a/src/libstd/sync/mutex.rs +++ b/src/libstd/sync/mutex.rs @@ -376,6 +376,8 @@ unsafe impl<#[may_dangle] T: ?Sized> Drop for Mutex { impl From for Mutex { /// Creates a new mutex in an unlocked state ready for use. /// This is equivalent to [`Mutex::new`]. + /// + /// [`Mutex::new`]: ../../std/sync/struct.Mutex.html#method.new fn from(t: T) -> Self { Mutex::new(t) } diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs index 1299a74409..b1b56f321f 100644 --- a/src/libstd/sync/rwlock.rs +++ b/src/libstd/sync/rwlock.rs @@ -453,6 +453,8 @@ impl Default for RwLock { impl From for RwLock { /// Creates a new instance of an `RwLock` which is unlocked. /// This is equivalent to [`RwLock::new`]. + /// + /// [`RwLock::new`]: ../../std/sync/struct.RwLock.html#method.new fn from(t: T) -> Self { RwLock::new(t) } diff --git a/src/libstd/sys/cloudabi/io.rs b/src/libstd/sys/cloudabi/io.rs index 8b02d3fd19..4b423a5cbc 100644 --- a/src/libstd/sys/cloudabi/io.rs +++ b/src/libstd/sys/cloudabi/io.rs @@ -1,9 +1,9 @@ -pub struct IoVec<'a>(&'a [u8]); +pub struct IoSlice<'a>(&'a [u8]); -impl<'a> IoVec<'a> { +impl<'a> IoSlice<'a> { #[inline] - pub fn new(buf: &'a [u8]) -> IoVec<'a> { - IoVec(buf) + pub fn new(buf: &'a [u8]) -> IoSlice<'a> { + IoSlice(buf) } #[inline] @@ -12,12 +12,12 @@ impl<'a> IoVec<'a> { } } -pub struct IoVecMut<'a>(&'a mut [u8]); +pub struct IoSliceMut<'a>(&'a mut [u8]); -impl<'a> IoVecMut<'a> { +impl<'a> IoSliceMut<'a> { #[inline] - pub fn new(buf: &'a mut [u8]) -> IoVecMut<'a> { - IoVecMut(buf) + pub fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { + IoSliceMut(buf) } #[inline] diff --git a/src/libstd/sys/cloudabi/shims/fs.rs b/src/libstd/sys/cloudabi/shims/fs.rs index ee045b8e51..05f9154101 100644 --- a/src/libstd/sys/cloudabi/shims/fs.rs +++ b/src/libstd/sys/cloudabi/shims/fs.rs @@ -1,7 +1,7 @@ use crate::ffi::OsString; use crate::fmt; use crate::hash::{Hash, Hasher}; -use crate::io::{self, SeekFrom}; +use crate::io::{self, SeekFrom, IoSlice, IoSliceMut}; use crate::path::{Path, PathBuf}; use crate::sys::time::SystemTime; use crate::sys::{unsupported, Void}; @@ -198,10 +198,18 @@ impl File { match self.0 {} } + pub fn read_vectored(&self, _bufs: &mut [IoSliceMut<'_>]) -> io::Result { + match self.0 {} + } + pub fn write(&self, _buf: &[u8]) -> io::Result { match self.0 {} } + pub fn write_vectored(&self, _bufs: &[IoSlice<'_>]) -> io::Result { + match self.0 {} + } + pub fn flush(&self) -> io::Result<()> { match self.0 {} } diff --git a/src/libstd/sys/cloudabi/shims/net.rs b/src/libstd/sys/cloudabi/shims/net.rs index 7cf23748e1..8d609cdfad 100644 --- a/src/libstd/sys/cloudabi/shims/net.rs +++ b/src/libstd/sys/cloudabi/shims/net.rs @@ -1,5 +1,5 @@ use crate::fmt; -use crate::io::{self, IoVec, IoVecMut}; +use crate::io::{self, IoSlice, IoSliceMut}; use crate::net::{Ipv4Addr, Ipv6Addr, Shutdown, SocketAddr}; use crate::time::Duration; use crate::sys::{unsupported, Void}; @@ -43,7 +43,7 @@ impl TcpStream { match self.0 {} } - pub fn read_vectored(&self, _: &mut [IoVecMut<'_>]) -> io::Result { + pub fn read_vectored(&self, _: &mut [IoSliceMut<'_>]) -> io::Result { match self.0 {} } @@ -51,7 +51,7 @@ impl TcpStream { match self.0 {} } - pub fn write_vectored(&self, _: &[IoVec<'_>]) -> io::Result { + pub fn write_vectored(&self, _: &[IoSlice<'_>]) -> io::Result { match self.0 {} } diff --git a/src/libstd/sys/cloudabi/shims/pipe.rs b/src/libstd/sys/cloudabi/shims/pipe.rs index f3debb9504..fb14dc5910 100644 --- a/src/libstd/sys/cloudabi/shims/pipe.rs +++ b/src/libstd/sys/cloudabi/shims/pipe.rs @@ -1,4 +1,4 @@ -use crate::io; +use crate::io::{self, IoSlice, IoSliceMut}; use crate::sys::Void; pub struct AnonPipe(Void); @@ -8,10 +8,18 @@ impl AnonPipe { match self.0 {} } + pub fn read_vectored(&self, _bufs: &mut [IoSliceMut<'_>]) -> io::Result { + match self.0 {} + } + pub fn write(&self, _buf: &[u8]) -> io::Result { match self.0 {} } + pub fn write_vectored(&self, _bufs: &[IoSlice<'_>]) -> io::Result { + match self.0 {} + } + pub fn diverge(&self) -> ! { match self.0 {} } diff --git a/src/libstd/sys/cloudabi/thread.rs b/src/libstd/sys/cloudabi/thread.rs index f853346e0e..7da16c4d24 100644 --- a/src/libstd/sys/cloudabi/thread.rs +++ b/src/libstd/sys/cloudabi/thread.rs @@ -1,4 +1,3 @@ -use crate::boxed::FnBox; use crate::cmp; use crate::ffi::CStr; use crate::io; @@ -22,7 +21,7 @@ unsafe impl Sync for Thread {} impl Thread { // unsafe: see thread::Builder::spawn_unchecked for safety requirements - pub unsafe fn new(stack: usize, p: Box) -> io::Result { + pub unsafe fn new(stack: usize, p: Box) -> io::Result { let p = box p; let mut native: libc::pthread_t = mem::zeroed(); let mut attr: libc::pthread_attr_t = mem::zeroed(); diff --git a/src/libstd/sys/mod.rs b/src/libstd/sys/mod.rs index d7ce6a08e0..3f3cedc53b 100644 --- a/src/libstd/sys/mod.rs +++ b/src/libstd/sys/mod.rs @@ -35,7 +35,7 @@ cfg_if! { } else if #[cfg(target_os = "redox")] { mod redox; pub use self::redox::*; - } else if #[cfg(target_env = "wasi")] { + } else if #[cfg(target_os = "wasi")] { mod wasi; pub use self::wasi::*; } else if #[cfg(target_arch = "wasm32")] { diff --git a/src/libstd/sys/redox/ext/net.rs b/src/libstd/sys/redox/ext/net.rs index 096d068195..b3ef5f3064 100644 --- a/src/libstd/sys/redox/ext/net.rs +++ b/src/libstd/sys/redox/ext/net.rs @@ -1,4 +1,4 @@ -#![stable(feature = "unix_socket_redox", since = "1.29")] +#![stable(feature = "unix_socket_redox", since = "1.29.0")] //! Unix-specific networking functionality @@ -27,7 +27,7 @@ use crate::sys::{cvt, fd::FileDesc, syscall}; /// let addr = socket.local_addr().expect("Couldn't get local address"); /// ``` #[derive(Clone)] -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] pub struct SocketAddr(()); impl SocketAddr { @@ -55,7 +55,7 @@ impl SocketAddr { /// let addr = socket.local_addr().expect("Couldn't get local address"); /// assert_eq!(addr.as_pathname(), None); /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn as_pathname(&self) -> Option<&Path> { None } @@ -83,12 +83,12 @@ impl SocketAddr { /// let addr = socket.local_addr().expect("Couldn't get local address"); /// assert_eq!(addr.is_unnamed(), true); /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn is_unnamed(&self) -> bool { false } } -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] impl fmt::Debug for SocketAddr { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { write!(fmt, "SocketAddr") @@ -109,10 +109,10 @@ impl fmt::Debug for SocketAddr { /// stream.read_to_string(&mut response).unwrap(); /// println!("{}", response); /// ``` -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] pub struct UnixStream(FileDesc); -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] impl fmt::Debug for UnixStream { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { let mut builder = fmt.debug_struct("UnixStream"); @@ -143,7 +143,7 @@ impl UnixStream { /// } /// }; /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn connect>(path: P) -> io::Result { if let Some(s) = path.as_ref().to_str() { cvt(syscall::open(format!("chan:{}", s), syscall::O_CLOEXEC)) @@ -174,7 +174,7 @@ impl UnixStream { /// } /// }; /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn pair() -> io::Result<(UnixStream, UnixStream)> { let server = cvt(syscall::open("chan:", syscall::O_CREAT | syscall::O_CLOEXEC)) .map(FileDesc::new)?; @@ -198,7 +198,7 @@ impl UnixStream { /// let socket = UnixStream::connect("/tmp/sock").unwrap(); /// let sock_copy = socket.try_clone().expect("Couldn't clone socket"); /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn try_clone(&self) -> io::Result { self.0.duplicate().map(UnixStream) } @@ -213,7 +213,7 @@ impl UnixStream { /// let socket = UnixStream::connect("/tmp/sock").unwrap(); /// let addr = socket.local_addr().expect("Couldn't get local address"); /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn local_addr(&self) -> io::Result { Err(Error::new(ErrorKind::Other, "UnixStream::local_addr unimplemented on redox")) } @@ -228,7 +228,7 @@ impl UnixStream { /// let socket = UnixStream::connect("/tmp/sock").unwrap(); /// let addr = socket.peer_addr().expect("Couldn't get peer address"); /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn peer_addr(&self) -> io::Result { Err(Error::new(ErrorKind::Other, "UnixStream::peer_addr unimplemented on redox")) } @@ -267,7 +267,7 @@ impl UnixStream { /// let err = result.unwrap_err(); /// assert_eq!(err.kind(), io::ErrorKind::InvalidInput) /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn set_read_timeout(&self, _timeout: Option) -> io::Result<()> { Err(Error::new(ErrorKind::Other, "UnixStream::set_read_timeout unimplemented on redox")) } @@ -306,7 +306,7 @@ impl UnixStream { /// let err = result.unwrap_err(); /// assert_eq!(err.kind(), io::ErrorKind::InvalidInput) /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn set_write_timeout(&self, _timeout: Option) -> io::Result<()> { Err(Error::new(ErrorKind::Other, "UnixStream::set_write_timeout unimplemented on redox")) } @@ -323,7 +323,7 @@ impl UnixStream { /// socket.set_read_timeout(Some(Duration::new(1, 0))).expect("Couldn't set read timeout"); /// assert_eq!(socket.read_timeout().unwrap(), Some(Duration::new(1, 0))); /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn read_timeout(&self) -> io::Result> { Err(Error::new(ErrorKind::Other, "UnixStream::read_timeout unimplemented on redox")) } @@ -340,7 +340,7 @@ impl UnixStream { /// socket.set_write_timeout(Some(Duration::new(1, 0))).expect("Couldn't set write timeout"); /// assert_eq!(socket.write_timeout().unwrap(), Some(Duration::new(1, 0))); /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn write_timeout(&self) -> io::Result> { Err(Error::new(ErrorKind::Other, "UnixStream::write_timeout unimplemented on redox")) } @@ -355,7 +355,7 @@ impl UnixStream { /// let socket = UnixStream::connect("/tmp/sock").unwrap(); /// socket.set_nonblocking(true).expect("Couldn't set nonblocking"); /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn set_nonblocking(&self, nonblocking: bool) -> io::Result<()> { self.0.set_nonblocking(nonblocking) } @@ -375,7 +375,7 @@ impl UnixStream { /// /// # Platform specific /// On Redox this always returns `None`. - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn take_error(&self) -> io::Result> { Ok(None) } @@ -397,13 +397,13 @@ impl UnixStream { /// let socket = UnixStream::connect("/tmp/sock").unwrap(); /// socket.shutdown(Shutdown::Both).expect("shutdown function failed"); /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn shutdown(&self, _how: Shutdown) -> io::Result<()> { Err(Error::new(ErrorKind::Other, "UnixStream::shutdown unimplemented on redox")) } } -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] impl io::Read for UnixStream { fn read(&mut self, buf: &mut [u8]) -> io::Result { io::Read::read(&mut &*self, buf) @@ -415,7 +415,7 @@ impl io::Read for UnixStream { } } -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] impl<'a> io::Read for &'a UnixStream { fn read(&mut self, buf: &mut [u8]) -> io::Result { self.0.read(buf) @@ -427,7 +427,7 @@ impl<'a> io::Read for &'a UnixStream { } } -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] impl io::Write for UnixStream { fn write(&mut self, buf: &[u8]) -> io::Result { io::Write::write(&mut &*self, buf) @@ -438,7 +438,7 @@ impl io::Write for UnixStream { } } -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] impl<'a> io::Write for &'a UnixStream { fn write(&mut self, buf: &[u8]) -> io::Result { self.0.write(buf) @@ -449,21 +449,21 @@ impl<'a> io::Write for &'a UnixStream { } } -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] impl AsRawFd for UnixStream { fn as_raw_fd(&self) -> RawFd { self.0.raw() } } -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] impl FromRawFd for UnixStream { unsafe fn from_raw_fd(fd: RawFd) -> UnixStream { UnixStream(FileDesc::new(fd)) } } -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] impl IntoRawFd for UnixStream { fn into_raw_fd(self) -> RawFd { self.0.into_raw() @@ -498,10 +498,10 @@ impl IntoRawFd for UnixStream { /// } /// } /// ``` -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] pub struct UnixListener(FileDesc); -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] impl fmt::Debug for UnixListener { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { let mut builder = fmt.debug_struct("UnixListener"); @@ -529,7 +529,7 @@ impl UnixListener { /// } /// }; /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn bind>(path: P) -> io::Result { if let Some(s) = path.as_ref().to_str() { cvt(syscall::open(format!("chan:{}", s), syscall::O_CREAT | syscall::O_CLOEXEC)) @@ -563,7 +563,7 @@ impl UnixListener { /// Err(e) => println!("accept function failed: {:?}", e), /// } /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn accept(&self) -> io::Result<(UnixStream, SocketAddr)> { self.0.duplicate_path(b"listen").map(|fd| (UnixStream(fd), SocketAddr(()))) } @@ -583,7 +583,7 @@ impl UnixListener { /// /// let listener_copy = listener.try_clone().expect("try_clone failed"); /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn try_clone(&self) -> io::Result { self.0.duplicate().map(UnixListener) } @@ -599,7 +599,7 @@ impl UnixListener { /// /// let addr = listener.local_addr().expect("Couldn't get local address"); /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn local_addr(&self) -> io::Result { Err(Error::new(ErrorKind::Other, "UnixListener::local_addr unimplemented on redox")) } @@ -615,7 +615,7 @@ impl UnixListener { /// /// listener.set_nonblocking(true).expect("Couldn't set non blocking"); /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn set_nonblocking(&self, nonblocking: bool) -> io::Result<()> { self.0.set_nonblocking(nonblocking) } @@ -636,7 +636,7 @@ impl UnixListener { /// /// # Platform specific /// On Redox this always returns `None`. - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn take_error(&self) -> io::Result> { Ok(None) } @@ -672,34 +672,34 @@ impl UnixListener { /// } /// } /// ``` - #[stable(feature = "unix_socket_redox", since = "1.29")] + #[stable(feature = "unix_socket_redox", since = "1.29.0")] pub fn incoming<'a>(&'a self) -> Incoming<'a> { Incoming { listener: self } } } -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] impl AsRawFd for UnixListener { fn as_raw_fd(&self) -> RawFd { self.0.raw() } } -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] impl FromRawFd for UnixListener { unsafe fn from_raw_fd(fd: RawFd) -> UnixListener { UnixListener(FileDesc::new(fd)) } } -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] impl IntoRawFd for UnixListener { fn into_raw_fd(self) -> RawFd { self.0.into_raw() } } -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] impl<'a> IntoIterator for &'a UnixListener { type Item = io::Result; type IntoIter = Incoming<'a>; @@ -740,12 +740,12 @@ impl<'a> IntoIterator for &'a UnixListener { /// } /// ``` #[derive(Debug)] -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] pub struct Incoming<'a> { listener: &'a UnixListener, } -#[stable(feature = "unix_socket_redox", since = "1.29")] +#[stable(feature = "unix_socket_redox", since = "1.29.0")] impl<'a> Iterator for Incoming<'a> { type Item = io::Result; diff --git a/src/libstd/sys/redox/fs.rs b/src/libstd/sys/redox/fs.rs index ebefbc9421..b80a1a349e 100644 --- a/src/libstd/sys/redox/fs.rs +++ b/src/libstd/sys/redox/fs.rs @@ -2,7 +2,7 @@ use crate::os::unix::prelude::*; use crate::ffi::{OsString, OsStr}; use crate::fmt; -use crate::io::{self, Error, SeekFrom}; +use crate::io::{self, Error, SeekFrom, IoSlice, IoSliceMut}; use crate::path::{Path, PathBuf}; use crate::sync::Arc; use crate::sys::fd::FileDesc; @@ -278,10 +278,18 @@ impl File { self.0.read(buf) } + pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + crate::io::default_read_vectored(|buf| self.read(buf), bufs) + } + pub fn write(&self, buf: &[u8]) -> io::Result { self.0.write(buf) } + pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result { + crate::io::default_write_vectored(|buf| self.write(buf), bufs) + } + pub fn flush(&self) -> io::Result<()> { Ok(()) } pub fn seek(&self, pos: SeekFrom) -> io::Result { diff --git a/src/libstd/sys/redox/io.rs b/src/libstd/sys/redox/io.rs index 8b02d3fd19..4b423a5cbc 100644 --- a/src/libstd/sys/redox/io.rs +++ b/src/libstd/sys/redox/io.rs @@ -1,9 +1,9 @@ -pub struct IoVec<'a>(&'a [u8]); +pub struct IoSlice<'a>(&'a [u8]); -impl<'a> IoVec<'a> { +impl<'a> IoSlice<'a> { #[inline] - pub fn new(buf: &'a [u8]) -> IoVec<'a> { - IoVec(buf) + pub fn new(buf: &'a [u8]) -> IoSlice<'a> { + IoSlice(buf) } #[inline] @@ -12,12 +12,12 @@ impl<'a> IoVec<'a> { } } -pub struct IoVecMut<'a>(&'a mut [u8]); +pub struct IoSliceMut<'a>(&'a mut [u8]); -impl<'a> IoVecMut<'a> { +impl<'a> IoSliceMut<'a> { #[inline] - pub fn new(buf: &'a mut [u8]) -> IoVecMut<'a> { - IoVecMut(buf) + pub fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { + IoSliceMut(buf) } #[inline] diff --git a/src/libstd/sys/redox/net/tcp.rs b/src/libstd/sys/redox/net/tcp.rs index 3f2f6166a7..494f943c96 100644 --- a/src/libstd/sys/redox/net/tcp.rs +++ b/src/libstd/sys/redox/net/tcp.rs @@ -1,5 +1,5 @@ use crate::cmp; -use crate::io::{self, Error, ErrorKind, Result, IoVec, IoVecMut}; +use crate::io::{self, Error, ErrorKind, Result, IoSlice, IoSliceMut}; use crate::mem; use crate::net::{SocketAddr, Shutdown}; use crate::path::Path; @@ -34,7 +34,7 @@ impl TcpStream { self.0.read(buf) } - pub fn read_vectored(&self, bufs: &mut [IoVecMut<'_>]) -> io::Result { + pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { io::default_read_vectored(|b| self.read(b), bufs) } @@ -42,7 +42,7 @@ impl TcpStream { self.0.write(buf) } - pub fn write_vectored(&self, bufs: &[IoVec<'_>]) -> io::Result { + pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result { io::default_write_vectored(|b| self.write(b), bufs) } diff --git a/src/libstd/sys/redox/pipe.rs b/src/libstd/sys/redox/pipe.rs index 911ba9c3f6..29cacb6d56 100644 --- a/src/libstd/sys/redox/pipe.rs +++ b/src/libstd/sys/redox/pipe.rs @@ -1,4 +1,4 @@ -use crate::io; +use crate::io::{self, IoSlice, IoSliceMut}; use crate::sys::{cvt, syscall}; use crate::sys::fd::FileDesc; @@ -24,10 +24,18 @@ impl AnonPipe { self.0.read(buf) } + pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + crate::io::default_read_vectored(|buf| self.read(buf), bufs) + } + pub fn write(&self, buf: &[u8]) -> io::Result { self.0.write(buf) } + pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result { + crate::io::default_write_vectored(|buf| self.write(buf), bufs) + } + pub fn fd(&self) -> &FileDesc { &self.0 } pub fn into_fd(self) -> FileDesc { self.0 } } diff --git a/src/libstd/sys/redox/thread.rs b/src/libstd/sys/redox/thread.rs index ae0b91b4d6..9d40a7e8bb 100644 --- a/src/libstd/sys/redox/thread.rs +++ b/src/libstd/sys/redox/thread.rs @@ -1,4 +1,3 @@ -use crate::boxed::FnBox; use crate::ffi::CStr; use crate::io; use crate::mem; @@ -19,7 +18,7 @@ unsafe impl Sync for Thread {} impl Thread { // unsafe: see thread::Builder::spawn_unchecked for safety requirements - pub unsafe fn new(_stack: usize, p: Box) -> io::Result { + pub unsafe fn new(_stack: usize, p: Box) -> io::Result { let p = box p; let id = cvt(syscall::clone(syscall::CLONE_VM | syscall::CLONE_FS | syscall::CLONE_FILES))?; diff --git a/src/libstd/sys/sgx/abi/entry.S b/src/libstd/sys/sgx/abi/entry.S index c03e3869aa..c35e49b1dc 100644 --- a/src/libstd/sys/sgx/abi/entry.S +++ b/src/libstd/sys/sgx/abi/entry.S @@ -65,10 +65,6 @@ IMAGE_BASE: /* The size in bytes of enclacve EH_FRM_HDR section */ globvar EH_FRM_HDR_SIZE 8 -.Lreentry_panic_msg: - .asciz "Re-entered aborted enclave!" -.Lreentry_panic_msg_end: - .org .Lxsave_clear+512 .Lxsave_header: .int 0, 0 /* XSTATE_BV */ @@ -210,10 +206,8 @@ sgx_entry: /* end sgx_entry */ .Lreentry_panic: - lea .Lreentry_panic_msg(%rip),%rdi - mov $.Lreentry_panic_msg_end-.Lreentry_panic_msg,%esi orq $8,%rsp - jmp panic_msg + jmp abort_reentry /* This *MUST* be called with 6 parameters, otherwise register information */ /* might leak! */ @@ -279,10 +273,8 @@ usercall: /* The following functions need to be defined externally: ``` -// Called by entry code when it needs to panic -extern "C" fn panic_msg(msg: &'static str) -> ! { - panic!(msg) -} +// Called by entry code on re-entry after exit +extern "C" fn abort_reentry() -> !; // Called once when a TCS is first entered extern "C" fn tcs_init(secondary: bool); diff --git a/src/libstd/sys/sgx/abi/mem.rs b/src/libstd/sys/sgx/abi/mem.rs index 808f1ce3ff..d9051733da 100644 --- a/src/libstd/sys/sgx/abi/mem.rs +++ b/src/libstd/sys/sgx/abi/mem.rs @@ -27,19 +27,23 @@ pub fn image_base() -> u64 { } /// Returns `true` if the specified memory range is in the enclave. +/// +/// `p + len` must not overflow. #[unstable(feature = "sgx_platform", issue = "56975")] pub fn is_enclave_range(p: *const u8, len: usize) -> bool { - let start=p as u64; - let end=start + (len as u64); + let start = p as u64; + let end = start + (len as u64); start >= image_base() && end <= image_base() + (unsafe { ENCLAVE_SIZE } as u64) // unsafe ok: link-time constant } /// Returns `true` if the specified memory range is in userspace. +/// +/// `p + len` must not overflow. #[unstable(feature = "sgx_platform", issue = "56975")] pub fn is_user_range(p: *const u8, len: usize) -> bool { - let start=p as u64; - let end=start + (len as u64); + let start = p as u64; + let end = start + (len as u64); end <= image_base() || start >= image_base() + (unsafe { ENCLAVE_SIZE } as u64) // unsafe ok: link-time constant } diff --git a/src/libstd/sys/sgx/abi/mod.rs b/src/libstd/sys/sgx/abi/mod.rs index 1f433e25ee..0f107de83f 100644 --- a/src/libstd/sys/sgx/abi/mod.rs +++ b/src/libstd/sys/sgx/abi/mod.rs @@ -29,7 +29,7 @@ unsafe extern "C" fn tcs_init(secondary: bool) { static RELOC_STATE: AtomicUsize = AtomicUsize::new(UNINIT); if secondary && RELOC_STATE.load(Ordering::Relaxed) != DONE { - panic::panic_msg("Entered secondary TCS before main TCS!") + rtabort!("Entered secondary TCS before main TCS!") } // Try to atomically swap UNINIT with BUSY. The returned state can be: @@ -92,3 +92,9 @@ pub(super) fn exit_with_code(code: isize) -> ! { } usercalls::exit(code != 0); } + +#[cfg(not(test))] +#[no_mangle] +extern "C" fn abort_reentry() -> ! { + usercalls::exit(false) +} diff --git a/src/libstd/sys/sgx/abi/panic.rs b/src/libstd/sys/sgx/abi/panic.rs index de86394b4b..2401476716 100644 --- a/src/libstd/sys/sgx/abi/panic.rs +++ b/src/libstd/sys/sgx/abi/panic.rs @@ -1,4 +1,4 @@ -use super::usercalls::{alloc::UserRef, self}; +use super::usercalls::alloc::UserRef; use crate::cmp; use crate::io::{self, Write}; use crate::mem; @@ -48,9 +48,3 @@ impl Write for SgxPanicOutput { Ok(()) } } - -#[cfg_attr(not(test), no_mangle)] -pub extern "C" fn panic_msg(msg: &str) -> ! { - let _ = SgxPanicOutput::new().map(|mut out| out.write(msg.as_bytes())); - usercalls::exit(true) -} diff --git a/src/libstd/sys/sgx/abi/usercalls/alloc.rs b/src/libstd/sys/sgx/abi/usercalls/alloc.rs index 22ae2a8e07..c9ff53d0a4 100644 --- a/src/libstd/sys/sgx/abi/usercalls/alloc.rs +++ b/src/libstd/sys/sgx/abi/usercalls/alloc.rs @@ -85,8 +85,10 @@ pub unsafe trait UserSafe { /// /// * the pointer is not aligned. /// * the pointer is null. + /// * the pointed-to range does not fit in the address space. /// * the pointed-to range is not in user memory. unsafe fn from_raw_sized(ptr: *mut u8, size: usize) -> NonNull { + assert!(ptr.wrapping_add(size) >= ptr); let ret = Self::from_raw_sized_unchecked(ptr, size); Self::check_ptr(ret); NonNull::new_unchecked(ret as _) @@ -268,6 +270,7 @@ impl User<[T]> where [T]: UserSafe { /// /// * The pointer is not aligned /// * The pointer is null + /// * The pointed-to range does not fit in the address space /// * The pointed-to range is not in user memory pub unsafe fn from_raw_parts(ptr: *mut T, len: usize) -> Self { User(NonNull::new_userref(<[T]>::from_raw_sized(ptr as _, len * mem::size_of::()))) @@ -372,6 +375,7 @@ impl UserRef<[T]> where [T]: UserSafe { /// /// * The pointer is not aligned /// * The pointer is null + /// * The pointed-to range does not fit in the address space /// * The pointed-to range is not in user memory pub unsafe fn from_raw_parts<'a>(ptr: *const T, len: usize) -> &'a Self { &*(<[T]>::from_raw_sized(ptr as _, len * mem::size_of::()).as_ptr() as *const Self) @@ -389,6 +393,7 @@ impl UserRef<[T]> where [T]: UserSafe { /// /// * The pointer is not aligned /// * The pointer is null + /// * The pointed-to range does not fit in the address space /// * The pointed-to range is not in user memory pub unsafe fn from_raw_parts_mut<'a>(ptr: *mut T, len: usize) -> &'a mut Self { &mut*(<[T]>::from_raw_sized(ptr as _, len * mem::size_of::()).as_ptr() as *mut Self) @@ -523,7 +528,11 @@ impl> Index for UserRef<[T]> where [T]: UserSafe, I::Ou #[inline] fn index(&self, index: I) -> &UserRef { unsafe { - UserRef::from_ptr(index.index(&*self.as_raw_ptr())) + if let Some(slice) = index.get(&*self.as_raw_ptr()) { + UserRef::from_ptr(slice) + } else { + rtabort!("index out of range for user slice"); + } } } } @@ -533,7 +542,11 @@ impl> IndexMut for UserRef<[T]> where [T]: UserSafe, I: #[inline] fn index_mut(&mut self, index: I) -> &mut UserRef { unsafe { - UserRef::from_mut_ptr(index.index_mut(&mut*self.as_raw_mut_ptr())) + if let Some(slice) = index.get_mut(&mut*self.as_raw_mut_ptr()) { + UserRef::from_mut_ptr(slice) + } else { + rtabort!("index out of range for user slice"); + } } } } @@ -544,10 +557,11 @@ impl UserRef { /// enclave memory. /// /// # Panics - /// This function panics if: + /// This function panics if, in the user `ByteBuffer`: /// - /// * The pointer in the user `ByteBuffer` is null - /// * The pointed-to range in the user `ByteBuffer` is not in user memory + /// * The pointer is null + /// * The pointed-to range does not fit in the address space + /// * The pointed-to range is not in user memory pub fn copy_user_buffer(&self) -> Vec { unsafe { let buf = self.to_enclave(); diff --git a/src/libstd/sys/sgx/abi/usercalls/mod.rs b/src/libstd/sys/sgx/abi/usercalls/mod.rs index 0abfc26bce..fca62e028d 100644 --- a/src/libstd/sys/sgx/abi/usercalls/mod.rs +++ b/src/libstd/sys/sgx/abi/usercalls/mod.rs @@ -1,4 +1,5 @@ -use crate::io::{Error as IoError, Result as IoResult}; +use crate::cmp; +use crate::io::{Error as IoError, Result as IoResult, IoSlice, IoSliceMut}; use crate::time::Duration; pub(crate) mod alloc; @@ -8,13 +9,27 @@ pub(crate) mod raw; use self::raw::*; /// Usercall `read`. See the ABI documentation for more information. +/// +/// This will do a single `read` usercall and scatter the read data among +/// `bufs`. To read to a single buffer, just pass a slice of length one. #[unstable(feature = "sgx_platform", issue = "56975")] -pub fn read(fd: Fd, buf: &mut [u8]) -> IoResult { +pub fn read(fd: Fd, bufs: &mut [IoSliceMut<'_>]) -> IoResult { unsafe { - let mut userbuf = alloc::User::<[u8]>::uninitialized(buf.len()); - let len = raw::read(fd, userbuf.as_mut_ptr(), userbuf.len()).from_sgx_result()?; - userbuf[..len].copy_to_enclave(&mut buf[..len]); - Ok(len) + let total_len = bufs.iter().fold(0usize, |sum, buf| sum.saturating_add(buf.len())); + let mut userbuf = alloc::User::<[u8]>::uninitialized(total_len); + let ret_len = raw::read(fd, userbuf.as_mut_ptr(), userbuf.len()).from_sgx_result()?; + let userbuf = &userbuf[..ret_len]; + let mut index = 0; + for buf in bufs { + let end = cmp::min(index + buf.len(), userbuf.len()); + if let Some(buflen) = end.checked_sub(index) { + userbuf[index..end].copy_to_enclave(&mut buf[..buflen]); + index += buf.len(); + } else { + break + } + } + Ok(userbuf.len()) } } @@ -30,10 +45,24 @@ pub fn read_alloc(fd: Fd) -> IoResult> { } /// Usercall `write`. See the ABI documentation for more information. +/// +/// This will do a single `write` usercall and gather the written data from +/// `bufs`. To write from a single buffer, just pass a slice of length one. #[unstable(feature = "sgx_platform", issue = "56975")] -pub fn write(fd: Fd, buf: &[u8]) -> IoResult { +pub fn write(fd: Fd, bufs: &[IoSlice<'_>]) -> IoResult { unsafe { - let userbuf = alloc::User::new_from_enclave(buf); + let total_len = bufs.iter().fold(0usize, |sum, buf| sum.saturating_add(buf.len())); + let mut userbuf = alloc::User::<[u8]>::uninitialized(total_len); + let mut index = 0; + for buf in bufs { + let end = cmp::min(index + buf.len(), userbuf.len()); + if let Some(buflen) = end.checked_sub(index) { + userbuf[index..end].copy_from_enclave(&buf[..buflen]); + index += buf.len(); + } else { + break + } + } raw::write(fd, userbuf.as_ptr(), userbuf.len()).from_sgx_result() } } diff --git a/src/libstd/sys/sgx/alloc.rs b/src/libstd/sys/sgx/alloc.rs index b385d567dd..40daec758a 100644 --- a/src/libstd/sys/sgx/alloc.rs +++ b/src/libstd/sys/sgx/alloc.rs @@ -1,4 +1,4 @@ -use crate::alloc::{self, GlobalAlloc, Layout, System}; +use crate::alloc::{GlobalAlloc, Layout, System}; use super::waitqueue::SpinMutex; @@ -36,11 +36,11 @@ unsafe impl GlobalAlloc for System { #[cfg(not(test))] #[no_mangle] pub unsafe extern "C" fn __rust_c_alloc(size: usize, align: usize) -> *mut u8 { - alloc::alloc(Layout::from_size_align_unchecked(size, align)) + crate::alloc::alloc(Layout::from_size_align_unchecked(size, align)) } #[cfg(not(test))] #[no_mangle] pub unsafe extern "C" fn __rust_c_dealloc(ptr: *mut u8, size: usize, align: usize) { - alloc::dealloc(ptr, Layout::from_size_align_unchecked(size, align)) + crate::alloc::dealloc(ptr, Layout::from_size_align_unchecked(size, align)) } diff --git a/src/libstd/sys/sgx/fd.rs b/src/libstd/sys/sgx/fd.rs index a9924f55f1..a1c4af8196 100644 --- a/src/libstd/sys/sgx/fd.rs +++ b/src/libstd/sys/sgx/fd.rs @@ -1,6 +1,6 @@ use fortanix_sgx_abi::Fd; -use crate::io; +use crate::io::{self, IoSlice, IoSliceMut}; use crate::mem; use crate::sys::{AsInner, FromInner, IntoInner}; use super::abi::usercalls; @@ -25,11 +25,19 @@ impl FileDesc { } pub fn read(&self, buf: &mut [u8]) -> io::Result { - usercalls::read(self.fd, buf) + usercalls::read(self.fd, &mut [IoSliceMut::new(buf)]) + } + + pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + usercalls::read(self.fd, bufs) } pub fn write(&self, buf: &[u8]) -> io::Result { - usercalls::write(self.fd, buf) + usercalls::write(self.fd, &[IoSlice::new(buf)]) + } + + pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result { + usercalls::write(self.fd, bufs) } pub fn flush(&self) -> io::Result<()> { diff --git a/src/libstd/sys/sgx/fs.rs b/src/libstd/sys/sgx/fs.rs index 68c8e9356a..e9095b375f 100644 --- a/src/libstd/sys/sgx/fs.rs +++ b/src/libstd/sys/sgx/fs.rs @@ -1,7 +1,7 @@ use crate::ffi::OsString; use crate::fmt; use crate::hash::{Hash, Hasher}; -use crate::io::{self, SeekFrom}; +use crate::io::{self, SeekFrom, IoSlice, IoSliceMut}; use crate::path::{Path, PathBuf}; use crate::sys::time::SystemTime; use crate::sys::{unsupported, Void}; @@ -200,10 +200,18 @@ impl File { match self.0 {} } + pub fn read_vectored(&self, _bufs: &mut [IoSliceMut<'_>]) -> io::Result { + match self.0 {} + } + pub fn write(&self, _buf: &[u8]) -> io::Result { match self.0 {} } + pub fn write_vectored(&self, _bufs: &[IoSlice<'_>]) -> io::Result { + match self.0 {} + } + pub fn flush(&self) -> io::Result<()> { match self.0 {} } diff --git a/src/libstd/sys/sgx/io.rs b/src/libstd/sys/sgx/io.rs index 8b02d3fd19..4b423a5cbc 100644 --- a/src/libstd/sys/sgx/io.rs +++ b/src/libstd/sys/sgx/io.rs @@ -1,9 +1,9 @@ -pub struct IoVec<'a>(&'a [u8]); +pub struct IoSlice<'a>(&'a [u8]); -impl<'a> IoVec<'a> { +impl<'a> IoSlice<'a> { #[inline] - pub fn new(buf: &'a [u8]) -> IoVec<'a> { - IoVec(buf) + pub fn new(buf: &'a [u8]) -> IoSlice<'a> { + IoSlice(buf) } #[inline] @@ -12,12 +12,12 @@ impl<'a> IoVec<'a> { } } -pub struct IoVecMut<'a>(&'a mut [u8]); +pub struct IoSliceMut<'a>(&'a mut [u8]); -impl<'a> IoVecMut<'a> { +impl<'a> IoSliceMut<'a> { #[inline] - pub fn new(buf: &'a mut [u8]) -> IoVecMut<'a> { - IoVecMut(buf) + pub fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { + IoSliceMut(buf) } #[inline] diff --git a/src/libstd/sys/sgx/net.rs b/src/libstd/sys/sgx/net.rs index 10cc644a55..f9eca9f4cb 100644 --- a/src/libstd/sys/sgx/net.rs +++ b/src/libstd/sys/sgx/net.rs @@ -1,5 +1,5 @@ use crate::fmt; -use crate::io::{self, IoVec, IoVecMut}; +use crate::io::{self, IoSlice, IoSliceMut}; use crate::net::{SocketAddr, Shutdown, Ipv4Addr, Ipv6Addr, ToSocketAddrs}; use crate::time::Duration; use crate::sys::{unsupported, Void, sgx_ineffective, AsInner, FromInner, IntoInner, TryIntoInner}; @@ -136,16 +136,16 @@ impl TcpStream { self.inner.inner.read(buf) } - pub fn read_vectored(&self, bufs: &mut [IoVecMut<'_>]) -> io::Result { - io::default_read_vectored(|b| self.read(b), bufs) + pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + self.inner.inner.read_vectored(bufs) } pub fn write(&self, buf: &[u8]) -> io::Result { self.inner.inner.write(buf) } - pub fn write_vectored(&self, bufs: &[IoVec<'_>]) -> io::Result { - io::default_write_vectored(|b| self.write(b), bufs) + pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result { + self.inner.inner.write_vectored(bufs) } pub fn peer_addr(&self) -> io::Result { diff --git a/src/libstd/sys/sgx/pipe.rs b/src/libstd/sys/sgx/pipe.rs index 2582b993b6..fb14dc5910 100644 --- a/src/libstd/sys/sgx/pipe.rs +++ b/src/libstd/sys/sgx/pipe.rs @@ -1,4 +1,4 @@ -use crate::io; +use crate::io::{self, IoSlice, IoSliceMut}; use crate::sys::Void; pub struct AnonPipe(Void); @@ -8,18 +8,23 @@ impl AnonPipe { match self.0 {} } + pub fn read_vectored(&self, _bufs: &mut [IoSliceMut<'_>]) -> io::Result { + match self.0 {} + } + pub fn write(&self, _buf: &[u8]) -> io::Result { match self.0 {} } + pub fn write_vectored(&self, _bufs: &[IoSlice<'_>]) -> io::Result { + match self.0 {} + } + pub fn diverge(&self) -> ! { match self.0 {} } } -pub fn read2(p1: AnonPipe, - _v1: &mut Vec, - _p2: AnonPipe, - _v2: &mut Vec) -> io::Result<()> { +pub fn read2(p1: AnonPipe, _v1: &mut Vec, _p2: AnonPipe, _v2: &mut Vec) -> io::Result<()> { match p1.0 {} } diff --git a/src/libstd/sys/sgx/thread.rs b/src/libstd/sys/sgx/thread.rs index 565a523ebe..b9f42d4ad1 100644 --- a/src/libstd/sys/sgx/thread.rs +++ b/src/libstd/sys/sgx/thread.rs @@ -1,5 +1,4 @@ #![cfg_attr(test, allow(dead_code))] // why is this necessary? -use crate::boxed::FnBox; use crate::ffi::CStr; use crate::io; use crate::time::Duration; @@ -13,17 +12,16 @@ pub const DEFAULT_MIN_STACK_SIZE: usize = 4096; mod task_queue { use crate::sync::{Mutex, MutexGuard, Once}; use crate::sync::mpsc; - use crate::boxed::FnBox; pub type JoinHandle = mpsc::Receiver<()>; pub(super) struct Task { - p: Box, + p: Box, done: mpsc::Sender<()>, } impl Task { - pub(super) fn new(p: Box) -> (Task, JoinHandle) { + pub(super) fn new(p: Box) -> (Task, JoinHandle) { let (done, recv) = mpsc::channel(); (Task { p, done }, recv) } @@ -51,7 +49,7 @@ mod task_queue { impl Thread { // unsafe: see thread::Builder::spawn_unchecked for safety requirements - pub unsafe fn new(_stack: usize, p: Box) + pub unsafe fn new(_stack: usize, p: Box) -> io::Result { let mut queue_lock = task_queue::lock(); diff --git a/src/libstd/sys/unix/args.rs b/src/libstd/sys/unix/args.rs index 18de1096df..3b4de56f2c 100644 --- a/src/libstd/sys/unix/args.rs +++ b/src/libstd/sys/unix/args.rs @@ -49,7 +49,6 @@ impl DoubleEndedIterator for Args { target_os = "android", target_os = "freebsd", target_os = "dragonfly", - target_os = "bitrig", target_os = "netbsd", target_os = "openbsd", target_os = "solaris", diff --git a/src/libstd/sys/unix/env.rs b/src/libstd/sys/unix/env.rs index f9592d5c45..891013406a 100644 --- a/src/libstd/sys/unix/env.rs +++ b/src/libstd/sys/unix/env.rs @@ -53,17 +53,6 @@ pub mod os { pub const EXE_EXTENSION: &str = ""; } -#[cfg(target_os = "bitrig")] -pub mod os { - pub const FAMILY: &str = "unix"; - pub const OS: &str = "bitrig"; - pub const DLL_PREFIX: &str = "lib"; - pub const DLL_SUFFIX: &str = ".so"; - pub const DLL_EXTENSION: &str = "so"; - pub const EXE_SUFFIX: &str = ""; - pub const EXE_EXTENSION: &str = ""; -} - #[cfg(target_os = "netbsd")] pub mod os { pub const FAMILY: &str = "unix"; diff --git a/src/libstd/sys/unix/ext/net.rs b/src/libstd/sys/unix/ext/net.rs index 406863a6cb..3ccb0a1b1a 100644 --- a/src/libstd/sys/unix/ext/net.rs +++ b/src/libstd/sys/unix/ext/net.rs @@ -18,7 +18,7 @@ mod libc { use crate::ascii; use crate::ffi::OsStr; use crate::fmt; -use crate::io::{self, Initializer, IoVec, IoVecMut}; +use crate::io::{self, Initializer, IoSlice, IoSliceMut}; use crate::mem; use crate::net::{self, Shutdown}; use crate::os::unix::ffi::OsStrExt; @@ -32,12 +32,12 @@ use crate::sys_common::{self, AsInner, FromInner, IntoInner}; #[cfg(any(target_os = "linux", target_os = "android", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd", - target_os = "haiku", target_os = "bitrig"))] + target_os = "haiku"))] use libc::MSG_NOSIGNAL; #[cfg(not(any(target_os = "linux", target_os = "android", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd", - target_os = "haiku", target_os = "bitrig")))] + target_os = "haiku")))] const MSG_NOSIGNAL: libc::c_int = 0x0; fn sun_path_offset() -> usize { @@ -551,7 +551,7 @@ impl io::Read for UnixStream { io::Read::read(&mut &*self, buf) } - fn read_vectored(&mut self, bufs: &mut [IoVecMut<'_>]) -> io::Result { + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { io::Read::read_vectored(&mut &*self, bufs) } @@ -567,7 +567,7 @@ impl<'a> io::Read for &'a UnixStream { self.0.read(buf) } - fn read_vectored(&mut self, bufs: &mut [IoVecMut<'_>]) -> io::Result { + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { self.0.read_vectored(bufs) } @@ -583,7 +583,7 @@ impl io::Write for UnixStream { io::Write::write(&mut &*self, buf) } - fn write_vectored(&mut self, bufs: &[IoVec<'_>]) -> io::Result { + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { io::Write::write_vectored(&mut &*self, bufs) } @@ -598,7 +598,7 @@ impl<'a> io::Write for &'a UnixStream { self.0.write(buf) } - fn write_vectored(&mut self, bufs: &[IoVec<'_>]) -> io::Result { + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { self.0.write_vectored(bufs) } @@ -1531,14 +1531,14 @@ mod test { let (mut s1, mut s2) = or_panic!(UnixStream::pair()); let len = or_panic!(s1.write_vectored( - &[IoVec::new(b"hello"), IoVec::new(b" "), IoVec::new(b"world!")], + &[IoSlice::new(b"hello"), IoSlice::new(b" "), IoSlice::new(b"world!")], )); assert_eq!(len, 12); let mut buf1 = [0; 6]; let mut buf2 = [0; 7]; let len = or_panic!(s2.read_vectored( - &mut [IoVecMut::new(&mut buf1), IoVecMut::new(&mut buf2)], + &mut [IoSliceMut::new(&mut buf1), IoSliceMut::new(&mut buf2)], )); assert_eq!(len, 12); assert_eq!(&buf1, b"hello "); diff --git a/src/libstd/sys/unix/fd.rs b/src/libstd/sys/unix/fd.rs index c274ad26cb..6d23963e14 100644 --- a/src/libstd/sys/unix/fd.rs +++ b/src/libstd/sys/unix/fd.rs @@ -1,7 +1,7 @@ #![unstable(reason = "not public", issue = "0", feature = "fd")] use crate::cmp; -use crate::io::{self, Read, Initializer, IoVec, IoVecMut}; +use crate::io::{self, Read, Initializer, IoSlice, IoSliceMut}; use crate::mem; use crate::sync::atomic::{AtomicBool, Ordering}; use crate::sys::cvt; @@ -53,7 +53,7 @@ impl FileDesc { Ok(ret as usize) } - pub fn read_vectored(&self, bufs: &mut [IoVecMut<'_>]) -> io::Result { + pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { let ret = cvt(unsafe { libc::readv(self.fd, bufs.as_ptr() as *const libc::iovec, @@ -115,7 +115,7 @@ impl FileDesc { Ok(ret as usize) } - pub fn write_vectored(&self, bufs: &[IoVec<'_>]) -> io::Result { + pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result { let ret = cvt(unsafe { libc::writev(self.fd, bufs.as_ptr() as *const libc::iovec, diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs index dc3dcb5817..cc1f0790d4 100644 --- a/src/libstd/sys/unix/fs.rs +++ b/src/libstd/sys/unix/fs.rs @@ -2,7 +2,7 @@ use crate::os::unix::prelude::*; use crate::ffi::{CString, CStr, OsString, OsStr}; use crate::fmt; -use crate::io::{self, Error, ErrorKind, SeekFrom}; +use crate::io::{self, Error, ErrorKind, SeekFrom, IoSlice, IoSliceMut}; use crate::mem; use crate::path::{Path, PathBuf}; use crate::ptr; @@ -147,8 +147,7 @@ impl FileAttr { })) } - #[cfg(any(target_os = "bitrig", - target_os = "freebsd", + #[cfg(any(target_os = "freebsd", target_os = "openbsd", target_os = "macos", target_os = "ios"))] @@ -159,8 +158,7 @@ impl FileAttr { })) } - #[cfg(not(any(target_os = "bitrig", - target_os = "freebsd", + #[cfg(not(any(target_os = "freebsd", target_os = "openbsd", target_os = "macos", target_os = "ios")))] @@ -355,7 +353,6 @@ impl DirEntry { #[cfg(any(target_os = "freebsd", target_os = "openbsd", - target_os = "bitrig", target_os = "netbsd", target_os = "dragonfly"))] pub fn ino(&self) -> u64 { @@ -367,8 +364,7 @@ impl DirEntry { target_os = "netbsd", target_os = "openbsd", target_os = "freebsd", - target_os = "dragonfly", - target_os = "bitrig"))] + target_os = "dragonfly"))] fn name_bytes(&self) -> &[u8] { use crate::slice; unsafe { @@ -526,8 +522,15 @@ impl File { } pub fn fsync(&self) -> io::Result<()> { - cvt_r(|| unsafe { libc::fsync(self.0.raw()) })?; - Ok(()) + cvt_r(|| unsafe { os_fsync(self.0.raw()) })?; + return Ok(()); + + #[cfg(any(target_os = "macos", target_os = "ios"))] + unsafe fn os_fsync(fd: c_int) -> c_int { + libc::fcntl(fd, libc::F_FULLFSYNC) + } + #[cfg(not(any(target_os = "macos", target_os = "ios")))] + unsafe fn os_fsync(fd: c_int) -> c_int { libc::fsync(fd) } } pub fn datasync(&self) -> io::Result<()> { @@ -560,6 +563,10 @@ impl File { self.0.read(buf) } + pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + self.0.read_vectored(bufs) + } + pub fn read_at(&self, buf: &mut [u8], offset: u64) -> io::Result { self.0.read_at(buf, offset) } @@ -568,6 +575,10 @@ impl File { self.0.write(buf) } + pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result { + self.0.write_vectored(bufs) + } + pub fn write_at(&self, buf: &[u8], offset: u64) -> io::Result { self.0.write_at(buf, offset) } @@ -808,24 +819,28 @@ pub fn canonicalize(p: &Path) -> io::Result { Ok(PathBuf::from(OsString::from_vec(buf))) } -fn open_and_set_permissions( - from: &Path, +fn open_from(from: &Path) -> io::Result<(crate::fs::File, crate::fs::Metadata)> { + use crate::fs::File; + + let reader = File::open(from)?; + let metadata = reader.metadata()?; + if !metadata.is_file() { + return Err(Error::new( + ErrorKind::InvalidInput, + "the source path is not an existing regular file", + )); + } + Ok((reader, metadata)) +} + +fn open_to_and_set_permissions( to: &Path, -) -> io::Result<(crate::fs::File, crate::fs::File, u64, crate::fs::Metadata)> { - use crate::fs::{File, OpenOptions}; + reader_metadata: crate::fs::Metadata, +) -> io::Result<(crate::fs::File, crate::fs::Metadata)> { + use crate::fs::OpenOptions; use crate::os::unix::fs::{OpenOptionsExt, PermissionsExt}; - let reader = File::open(from)?; - let (perm, len) = { - let metadata = reader.metadata()?; - if !metadata.is_file() { - return Err(Error::new( - ErrorKind::InvalidInput, - "the source path is not an existing regular file", - )); - } - (metadata.permissions(), metadata.len()) - }; + let perm = reader_metadata.permissions(); let writer = OpenOptions::new() // create the file with the correct mode right away .mode(perm.mode()) @@ -840,7 +855,7 @@ fn open_and_set_permissions( // pipes/FIFOs or device nodes. writer.set_permissions(perm)?; } - Ok((reader, writer, len, writer_metadata)) + Ok((writer, writer_metadata)) } #[cfg(not(any(target_os = "linux", @@ -848,7 +863,8 @@ fn open_and_set_permissions( target_os = "macos", target_os = "ios")))] pub fn copy(from: &Path, to: &Path) -> io::Result { - let (mut reader, mut writer, _, _) = open_and_set_permissions(from, to)?; + let (mut reader, reader_metadata) = open_from(from)?; + let (mut writer, _) = open_to_and_set_permissions(to, reader_metadata)?; io::copy(&mut reader, &mut writer) } @@ -881,7 +897,9 @@ pub fn copy(from: &Path, to: &Path) -> io::Result { ) } - let (mut reader, mut writer, len, _) = open_and_set_permissions(from, to)?; + let (mut reader, reader_metadata) = open_from(from)?; + let len = reader_metadata.len(); + let (mut writer, _) = open_to_and_set_permissions(to, reader_metadata)?; let has_copy_file_range = HAS_COPY_FILE_RANGE.load(Ordering::Relaxed); let mut written = 0u64; @@ -940,6 +958,8 @@ pub fn copy(from: &Path, to: &Path) -> io::Result { #[cfg(any(target_os = "macos", target_os = "ios"))] pub fn copy(from: &Path, to: &Path) -> io::Result { + use crate::sync::atomic::{AtomicBool, Ordering}; + const COPYFILE_ACL: u32 = 1 << 0; const COPYFILE_STAT: u32 = 1 << 1; const COPYFILE_XATTR: u32 = 1 << 2; @@ -985,7 +1005,48 @@ pub fn copy(from: &Path, to: &Path) -> io::Result { } } - let (reader, writer, _, writer_metadata) = open_and_set_permissions(from, to)?; + // MacOS prior to 10.12 don't support `fclonefileat` + // We store the availability in a global to avoid unnecessary syscalls + static HAS_FCLONEFILEAT: AtomicBool = AtomicBool::new(true); + syscall! { + fn fclonefileat( + srcfd: libc::c_int, + dst_dirfd: libc::c_int, + dst: *const libc::c_char, + flags: libc::c_int + ) -> libc::c_int + } + + let (reader, reader_metadata) = open_from(from)?; + + // Opportunistically attempt to create a copy-on-write clone of `from` + // using `fclonefileat`. + if HAS_FCLONEFILEAT.load(Ordering::Relaxed) { + let to = cstr(to)?; + let clonefile_result = cvt(unsafe { + fclonefileat( + reader.as_raw_fd(), + libc::AT_FDCWD, + to.as_ptr(), + 0, + ) + }); + match clonefile_result { + Ok(_) => return Ok(reader_metadata.len()), + Err(err) => match err.raw_os_error() { + // `fclonefileat` will fail on non-APFS volumes, if the + // destination already exists, or if the source and destination + // are on different devices. In all these cases `fcopyfile` + // should succeed. + Some(libc::ENOTSUP) | Some(libc::EEXIST) | Some(libc::EXDEV) => (), + Some(libc::ENOSYS) => HAS_FCLONEFILEAT.store(false, Ordering::Relaxed), + _ => return Err(err), + } + } + } + + // Fall back to using `fcopyfile` if `fclonefileat` does not succeed. + let (writer, writer_metadata) = open_to_and_set_permissions(to, reader_metadata)?; // We ensure that `FreeOnDrop` never contains a null pointer so it is // always safe to call `copyfile_state_free` diff --git a/src/libstd/sys/unix/io.rs b/src/libstd/sys/unix/io.rs index eb3fa470a6..72954ff20e 100644 --- a/src/libstd/sys/unix/io.rs +++ b/src/libstd/sys/unix/io.rs @@ -4,15 +4,15 @@ use crate::slice; use libc::{iovec, c_void}; #[repr(transparent)] -pub struct IoVec<'a> { +pub struct IoSlice<'a> { vec: iovec, _p: PhantomData<&'a [u8]>, } -impl<'a> IoVec<'a> { +impl<'a> IoSlice<'a> { #[inline] - pub fn new(buf: &'a [u8]) -> IoVec<'a> { - IoVec { + pub fn new(buf: &'a [u8]) -> IoSlice<'a> { + IoSlice { vec: iovec { iov_base: buf.as_ptr() as *mut u8 as *mut c_void, iov_len: buf.len() @@ -29,15 +29,15 @@ impl<'a> IoVec<'a> { } } -pub struct IoVecMut<'a> { +pub struct IoSliceMut<'a> { vec: iovec, _p: PhantomData<&'a mut [u8]>, } -impl<'a> IoVecMut<'a> { +impl<'a> IoSliceMut<'a> { #[inline] - pub fn new(buf: &'a mut [u8]) -> IoVecMut<'a> { - IoVecMut { + pub fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { + IoSliceMut { vec: iovec { iov_base: buf.as_mut_ptr() as *mut c_void, iov_len: buf.len() diff --git a/src/libstd/sys/unix/l4re.rs b/src/libstd/sys/unix/l4re.rs index f52fe80709..2c6f21aa21 100644 --- a/src/libstd/sys/unix/l4re.rs +++ b/src/libstd/sys/unix/l4re.rs @@ -5,7 +5,7 @@ macro_rules! unimpl { pub mod net { #![allow(warnings)] use crate::fmt; - use crate::io::{self, IoVec, IoVecMut}; + use crate::io::{self, IoSlice, IoSliceMut}; use crate::net::{SocketAddr, Shutdown, Ipv4Addr, Ipv6Addr}; use crate::sys_common::{AsInner, FromInner, IntoInner}; use crate::sys::fd::FileDesc; @@ -46,7 +46,7 @@ pub mod net { unimpl!(); } - pub fn read_vectored(&self, _: &mut [IoVecMut<'_>]) -> io::Result { + pub fn read_vectored(&self, _: &mut [IoSliceMut<'_>]) -> io::Result { unimpl!(); } @@ -66,7 +66,7 @@ pub mod net { unimpl!(); } - pub fn write_vectored(&self, _: &[IoVec<'_>]) -> io::Result { + pub fn write_vectored(&self, _: &[IoSlice<'_>]) -> io::Result { unimpl!(); } @@ -152,7 +152,7 @@ pub mod net { unimpl!(); } - pub fn read_vectored(&self, _: &mut [IoVecMut<'_>]) -> io::Result { + pub fn read_vectored(&self, _: &mut [IoSliceMut<'_>]) -> io::Result { unimpl!(); } @@ -160,7 +160,7 @@ pub mod net { unimpl!(); } - pub fn write_vectored(&self, _: &[IoVec<'_>]) -> io::Result { + pub fn write_vectored(&self, _: &[IoSlice<'_>]) -> io::Result { unimpl!(); } diff --git a/src/libstd/sys/unix/mod.rs b/src/libstd/sys/unix/mod.rs index 90e26449ae..c2b264ff8d 100644 --- a/src/libstd/sys/unix/mod.rs +++ b/src/libstd/sys/unix/mod.rs @@ -5,7 +5,6 @@ use crate::io::ErrorKind; #[cfg(any(rustdoc, target_os = "linux"))] pub use crate::os::linux as platform; #[cfg(all(not(rustdoc), target_os = "android"))] pub use crate::os::android as platform; -#[cfg(all(not(rustdoc), target_os = "bitrig"))] pub use crate::os::bitrig as platform; #[cfg(all(not(rustdoc), target_os = "dragonfly"))] pub use crate::os::dragonfly as platform; #[cfg(all(not(rustdoc), target_os = "freebsd"))] pub use crate::os::freebsd as platform; #[cfg(all(not(rustdoc), target_os = "haiku"))] pub use crate::os::haiku as platform; diff --git a/src/libstd/sys/unix/net.rs b/src/libstd/sys/unix/net.rs index 7712a41ded..75750b5c4e 100644 --- a/src/libstd/sys/unix/net.rs +++ b/src/libstd/sys/unix/net.rs @@ -1,5 +1,5 @@ use crate::ffi::CStr; -use crate::io::{self, IoVec, IoVecMut}; +use crate::io::{self, IoSlice, IoSliceMut}; use crate::mem; use crate::net::{SocketAddr, Shutdown}; use crate::str; @@ -244,7 +244,7 @@ impl Socket { self.recv_with_flags(buf, MSG_PEEK) } - pub fn read_vectored(&self, bufs: &mut [IoVecMut<'_>]) -> io::Result { + pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { self.0.read_vectored(bufs) } @@ -276,7 +276,7 @@ impl Socket { self.0.write(buf) } - pub fn write_vectored(&self, bufs: &[IoVec<'_>]) -> io::Result { + pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result { self.0.write_vectored(bufs) } diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs index 726b17969b..dad19eabf7 100644 --- a/src/libstd/sys/unix/os.rs +++ b/src/libstd/sys/unix/os.rs @@ -33,8 +33,7 @@ extern { target_os = "fuchsia", target_os = "l4re"), link_name = "__errno_location")] - #[cfg_attr(any(target_os = "bitrig", - target_os = "netbsd", + #[cfg_attr(any(target_os = "netbsd", target_os = "openbsd", target_os = "android", target_os = "hermit", @@ -257,7 +256,7 @@ pub fn current_exe() -> io::Result { sysctl().or_else(|_| procfs()) } -#[cfg(any(target_os = "bitrig", target_os = "openbsd"))] +#[cfg(target_os = "openbsd")] pub fn current_exe() -> io::Result { unsafe { let mut mib = [libc::CTL_KERN, diff --git a/src/libstd/sys/unix/pipe.rs b/src/libstd/sys/unix/pipe.rs index bc3c026ada..d36e94df63 100644 --- a/src/libstd/sys/unix/pipe.rs +++ b/src/libstd/sys/unix/pipe.rs @@ -1,4 +1,4 @@ -use crate::io; +use crate::io::{self, IoSlice, IoSliceMut}; use crate::mem; use crate::sync::atomic::{AtomicBool, Ordering}; use crate::sys::fd::FileDesc; @@ -60,10 +60,18 @@ impl AnonPipe { self.0.read(buf) } + pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + self.0.read_vectored(bufs) + } + pub fn write(&self, buf: &[u8]) -> io::Result { self.0.write(buf) } + pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result { + self.0.write_vectored(bufs) + } + pub fn fd(&self) -> &FileDesc { &self.0 } pub fn into_fd(self) -> FileDesc { self.0 } } diff --git a/src/libstd/sys/unix/rand.rs b/src/libstd/sys/unix/rand.rs index 122f22b37a..71c62461ee 100644 --- a/src/libstd/sys/unix/rand.rs +++ b/src/libstd/sys/unix/rand.rs @@ -47,7 +47,12 @@ mod imp { let err = errno() as libc::c_int; if err == libc::EINTR { continue; - } else if err == libc::ENOSYS { + } else if err == libc::ENOSYS || err == libc::EPERM { + // Fall back to reading /dev/urandom if `getrandom` is not + // supported on the current kernel. + // + // Also fall back in case it is disabled by something like + // seccomp or inside of virtual machines. GETRANDOM_UNAVAILABLE.store(true, Ordering::Relaxed); return false; } else if err == libc::EAGAIN { @@ -99,6 +104,13 @@ mod imp { } } +// On iOS and MacOS `SecRandomCopyBytes` calls `CCRandomCopyBytes` with +// `kCCRandomDefault`. `CCRandomCopyBytes` manages a CSPRNG which is seeded +// from `/dev/random` and which runs on its own thread accessed via GCD. +// This seems needlessly heavyweight for the purposes of generating two u64s +// once per thread in `hashmap_random_keys`. Therefore `SecRandomCopyBytes` is +// only used on iOS where direct access to `/dev/urandom` is blocked by the +// sandbox. #[cfg(target_os = "ios")] mod imp { use crate::io; diff --git a/src/libstd/sys/unix/stack_overflow.rs b/src/libstd/sys/unix/stack_overflow.rs index 561279e827..fe1095fa0c 100644 --- a/src/libstd/sys/unix/stack_overflow.rs +++ b/src/libstd/sys/unix/stack_overflow.rs @@ -25,7 +25,6 @@ impl Drop for Handler { #[cfg(any(target_os = "linux", target_os = "macos", - target_os = "bitrig", target_os = "dragonfly", target_os = "freebsd", target_os = "solaris", @@ -139,7 +138,6 @@ mod imp { #[cfg(any(target_os = "linux", target_os = "macos", - target_os = "bitrig", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", @@ -185,7 +183,6 @@ mod imp { #[cfg(not(any(target_os = "linux", target_os = "macos", - target_os = "bitrig", target_os = "dragonfly", target_os = "freebsd", target_os = "solaris", diff --git a/src/libstd/sys/unix/stdio.rs b/src/libstd/sys/unix/stdio.rs index 35f163bbdb..f9b017df24 100644 --- a/src/libstd/sys/unix/stdio.rs +++ b/src/libstd/sys/unix/stdio.rs @@ -1,5 +1,6 @@ -use crate::io; +use crate::io::{self, IoSlice, IoSliceMut}; use crate::sys::fd::FileDesc; +use crate::mem::ManuallyDrop; pub struct Stdin(()); pub struct Stdout(()); @@ -11,10 +12,11 @@ impl Stdin { impl io::Read for Stdin { fn read(&mut self, buf: &mut [u8]) -> io::Result { - let fd = FileDesc::new(libc::STDIN_FILENO); - let ret = fd.read(buf); - fd.into_raw(); // do not close this FD - ret + ManuallyDrop::new(FileDesc::new(libc::STDIN_FILENO)).read(buf) + } + + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + ManuallyDrop::new(FileDesc::new(libc::STDIN_FILENO)).read_vectored(bufs) } } @@ -24,10 +26,11 @@ impl Stdout { impl io::Write for Stdout { fn write(&mut self, buf: &[u8]) -> io::Result { - let fd = FileDesc::new(libc::STDOUT_FILENO); - let ret = fd.write(buf); - fd.into_raw(); // do not close this FD - ret + ManuallyDrop::new(FileDesc::new(libc::STDOUT_FILENO)).write(buf) + } + + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { + ManuallyDrop::new(FileDesc::new(libc::STDOUT_FILENO)).write_vectored(bufs) } fn flush(&mut self) -> io::Result<()> { @@ -41,10 +44,11 @@ impl Stderr { impl io::Write for Stderr { fn write(&mut self, buf: &[u8]) -> io::Result { - let fd = FileDesc::new(libc::STDERR_FILENO); - let ret = fd.write(buf); - fd.into_raw(); // do not close this FD - ret + ManuallyDrop::new(FileDesc::new(libc::STDERR_FILENO)).write(buf) + } + + fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result { + ManuallyDrop::new(FileDesc::new(libc::STDERR_FILENO)).write_vectored(bufs) } fn flush(&mut self) -> io::Result<()> { diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs index feb15e8f58..f4a1783ce8 100644 --- a/src/libstd/sys/unix/thread.rs +++ b/src/libstd/sys/unix/thread.rs @@ -1,4 +1,3 @@ -use crate::boxed::FnBox; use crate::cmp; use crate::ffi::CStr; use crate::io; @@ -39,7 +38,7 @@ unsafe fn pthread_attr_setstacksize(_attr: *mut libc::pthread_attr_t, impl Thread { // unsafe: see thread::Builder::spawn_unchecked for safety requirements - pub unsafe fn new(stack: usize, p: Box) + pub unsafe fn new(stack: usize, p: Box) -> io::Result { let p = box p; let mut native: libc::pthread_t = mem::zeroed(); @@ -100,7 +99,6 @@ impl Thread { #[cfg(any(target_os = "freebsd", target_os = "dragonfly", - target_os = "bitrig", target_os = "openbsd"))] pub fn set_name(name: &CStr) { unsafe { @@ -190,7 +188,6 @@ impl Drop for Thread { #[cfg(all(not(all(target_os = "linux", not(target_env = "musl"))), not(target_os = "freebsd"), not(target_os = "macos"), - not(target_os = "bitrig"), not(all(target_os = "netbsd", not(target_vendor = "rumprun"))), not(target_os = "openbsd"), not(target_os = "solaris")))] @@ -206,7 +203,6 @@ pub mod guard { #[cfg(any(all(target_os = "linux", not(target_env = "musl")), target_os = "freebsd", target_os = "macos", - target_os = "bitrig", all(target_os = "netbsd", not(target_vendor = "rumprun")), target_os = "openbsd", target_os = "solaris"))] @@ -237,16 +233,15 @@ pub mod guard { Some(stackaddr as *mut libc::c_void) } - #[cfg(any(target_os = "openbsd", target_os = "bitrig"))] + #[cfg(target_os = "openbsd")] unsafe fn get_stack_start() -> Option<*mut libc::c_void> { let mut current_stack: libc::stack_t = crate::mem::zeroed(); assert_eq!(libc::pthread_stackseg_np(libc::pthread_self(), &mut current_stack), 0); - let extra = if cfg!(target_os = "bitrig") {3} else {1} * PAGE_SIZE; let stackaddr = if libc::pthread_main_np() == 1 { // main thread - current_stack.ss_sp as usize - current_stack.ss_size + extra + current_stack.ss_sp as usize - current_stack.ss_size + PAGE_SIZE } else { // new thread current_stack.ss_sp as usize - current_stack.ss_size @@ -344,7 +339,6 @@ pub mod guard { } #[cfg(any(target_os = "macos", - target_os = "bitrig", target_os = "openbsd", target_os = "solaris"))] pub unsafe fn current() -> Option { diff --git a/src/libstd/sys/wasi/ext/fs.rs b/src/libstd/sys/wasi/ext/fs.rs index 53f415c782..0ec4122f38 100644 --- a/src/libstd/sys/wasi/ext/fs.rs +++ b/src/libstd/sys/wasi/ext/fs.rs @@ -3,7 +3,7 @@ #![unstable(feature = "wasi_ext", issue = "0")] use crate::fs::{self, File, Metadata, OpenOptions}; -use crate::io::{self, IoVec, IoVecMut}; +use crate::io::{self, IoSlice, IoSliceMut}; use crate::os::wasi::ffi::OsStrExt; use crate::path::{Path, PathBuf}; use crate::sys_common::{AsInner, AsInnerMut, FromInner}; @@ -25,7 +25,7 @@ pub trait FileExt { /// return with a short read. /// /// [`File::read`]: ../../../../std/fs/struct.File.html#method.read_vectored - fn read_at(&self, bufs: &mut [IoVecMut<'_>], offset: u64) -> io::Result; + fn read_at(&self, bufs: &mut [IoSliceMut<'_>], offset: u64) -> io::Result; /// Writes a number of bytes starting from a given offset. /// @@ -43,7 +43,7 @@ pub trait FileExt { /// short write. /// /// [`File::write`]: ../../../../std/fs/struct.File.html#method.write_vectored - fn write_at(&self, bufs: &[IoVec<'_>], offset: u64) -> io::Result; + fn write_at(&self, bufs: &[IoSlice<'_>], offset: u64) -> io::Result; /// Returns the current position within the file. /// @@ -105,11 +105,11 @@ pub trait FileExt { // FIXME: bind __wasi_random_get maybe? - on crates.io for unix impl FileExt for fs::File { - fn read_at(&self, bufs: &mut [IoVecMut<'_>], offset: u64) -> io::Result { + fn read_at(&self, bufs: &mut [IoSliceMut<'_>], offset: u64) -> io::Result { self.as_inner().fd().pread(bufs, offset) } - fn write_at(&self, bufs: &[IoVec<'_>], offset: u64) -> io::Result { + fn write_at(&self, bufs: &[IoSlice<'_>], offset: u64) -> io::Result { self.as_inner().fd().pwrite(bufs, offset) } diff --git a/src/libstd/sys/wasi/ext/io.rs b/src/libstd/sys/wasi/ext/io.rs index cf75a96d28..12afd1d42d 100644 --- a/src/libstd/sys/wasi/ext/io.rs +++ b/src/libstd/sys/wasi/ext/io.rs @@ -5,6 +5,7 @@ use crate::fs; use crate::io; use crate::sys; +use crate::net; use crate::sys_common::{AsInner, FromInner, IntoInner}; /// Raw file descriptors. @@ -50,6 +51,60 @@ pub trait IntoRawFd { fn into_raw_fd(self) -> RawFd; } +impl AsRawFd for net::TcpStream { + fn as_raw_fd(&self) -> RawFd { + self.as_inner().fd().as_raw() + } +} + +impl FromRawFd for net::TcpStream { + unsafe fn from_raw_fd(fd: RawFd) -> net::TcpStream { + net::TcpStream::from_inner(sys::net::TcpStream::from_inner(fd)) + } +} + +impl IntoRawFd for net::TcpStream { + fn into_raw_fd(self) -> RawFd { + self.into_inner().into_fd().into_raw() + } +} + +impl AsRawFd for net::TcpListener { + fn as_raw_fd(&self) -> RawFd { + self.as_inner().fd().as_raw() + } +} + +impl FromRawFd for net::TcpListener { + unsafe fn from_raw_fd(fd: RawFd) -> net::TcpListener { + net::TcpListener::from_inner(sys::net::TcpListener::from_inner(fd)) + } +} + +impl IntoRawFd for net::TcpListener { + fn into_raw_fd(self) -> RawFd { + self.into_inner().into_fd().into_raw() + } +} + +impl AsRawFd for net::UdpSocket { + fn as_raw_fd(&self) -> RawFd { + self.as_inner().fd().as_raw() + } +} + +impl FromRawFd for net::UdpSocket { + unsafe fn from_raw_fd(fd: RawFd) -> net::UdpSocket { + net::UdpSocket::from_inner(sys::net::UdpSocket::from_inner(fd)) + } +} + +impl IntoRawFd for net::UdpSocket { + fn into_raw_fd(self) -> RawFd { + self.into_inner().into_fd().into_raw() + } +} + impl AsRawFd for fs::File { fn as_raw_fd(&self) -> RawFd { self.as_inner().fd().as_raw() diff --git a/src/libstd/sys/wasi/fd.rs b/src/libstd/sys/wasi/fd.rs index 0b68b6f4d9..25692ec086 100644 --- a/src/libstd/sys/wasi/fd.rs +++ b/src/libstd/sys/wasi/fd.rs @@ -1,6 +1,6 @@ #![allow(dead_code)] -use crate::io::{self, IoVec, IoVecMut, SeekFrom}; +use crate::io::{self, IoSlice, IoSliceMut, SeekFrom}; use crate::mem; use crate::net::Shutdown; use crate::sys::cvt_wasi; @@ -24,25 +24,25 @@ pub type RiFlags = u16; pub type RoFlags = u16; pub type SiFlags = u16; -fn iovec(a: &mut [IoVecMut<'_>]) -> (*const libc::__wasi_iovec_t, usize) { +fn iovec(a: &mut [IoSliceMut<'_>]) -> (*const libc::__wasi_iovec_t, usize) { assert_eq!( - mem::size_of::>(), + mem::size_of::>(), mem::size_of::() ); assert_eq!( - mem::align_of::>(), + mem::align_of::>(), mem::align_of::() ); (a.as_ptr() as *const libc::__wasi_iovec_t, a.len()) } -fn ciovec(a: &[IoVec<'_>]) -> (*const libc::__wasi_ciovec_t, usize) { +fn ciovec(a: &[IoSlice<'_>]) -> (*const libc::__wasi_ciovec_t, usize) { assert_eq!( - mem::size_of::>(), + mem::size_of::>(), mem::size_of::() ); assert_eq!( - mem::align_of::>(), + mem::align_of::>(), mem::align_of::() ); (a.as_ptr() as *const libc::__wasi_ciovec_t, a.len()) @@ -67,28 +67,28 @@ impl WasiFd { cvt_wasi(unsafe { libc::__wasi_fd_datasync(self.fd) }) } - pub fn pread(&self, bufs: &mut [IoVecMut<'_>], offset: u64) -> io::Result { + pub fn pread(&self, bufs: &mut [IoSliceMut<'_>], offset: u64) -> io::Result { let mut read = 0; let (ptr, len) = iovec(bufs); cvt_wasi(unsafe { libc::__wasi_fd_pread(self.fd, ptr, len, offset, &mut read) })?; Ok(read) } - pub fn pwrite(&self, bufs: &[IoVec<'_>], offset: u64) -> io::Result { + pub fn pwrite(&self, bufs: &[IoSlice<'_>], offset: u64) -> io::Result { let mut read = 0; let (ptr, len) = ciovec(bufs); cvt_wasi(unsafe { libc::__wasi_fd_pwrite(self.fd, ptr, len, offset, &mut read) })?; Ok(read) } - pub fn read(&self, bufs: &mut [IoVecMut<'_>]) -> io::Result { + pub fn read(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { let mut read = 0; let (ptr, len) = iovec(bufs); cvt_wasi(unsafe { libc::__wasi_fd_read(self.fd, ptr, len, &mut read) })?; Ok(read) } - pub fn write(&self, bufs: &[IoVec<'_>]) -> io::Result { + pub fn write(&self, bufs: &[IoSlice<'_>]) -> io::Result { let mut read = 0; let (ptr, len) = ciovec(bufs); cvt_wasi(unsafe { libc::__wasi_fd_write(self.fd, ptr, len, &mut read) })?; @@ -309,7 +309,7 @@ impl WasiFd { pub fn sock_recv( &self, - ri_data: &mut [IoVecMut<'_>], + ri_data: &mut [IoSliceMut<'_>], ri_flags: RiFlags, ) -> io::Result<(usize, RoFlags)> { let mut ro_datalen = 0; @@ -321,7 +321,7 @@ impl WasiFd { Ok((ro_datalen, ro_flags)) } - pub fn sock_send(&self, si_data: &[IoVec<'_>], si_flags: SiFlags) -> io::Result { + pub fn sock_send(&self, si_data: &[IoSlice<'_>], si_flags: SiFlags) -> io::Result { let mut so_datalen = 0; let (ptr, len) = ciovec(si_data); cvt_wasi(unsafe { libc::__wasi_sock_send(self.fd, ptr, len, si_flags, &mut so_datalen) })?; diff --git a/src/libstd/sys/wasi/fs.rs b/src/libstd/sys/wasi/fs.rs index 589593299d..172c60385b 100644 --- a/src/libstd/sys/wasi/fs.rs +++ b/src/libstd/sys/wasi/fs.rs @@ -1,6 +1,6 @@ use crate::ffi::{CStr, CString, OsStr, OsString}; use crate::fmt; -use crate::io::{self, IoVec, IoVecMut, SeekFrom}; +use crate::io::{self, IoSlice, IoSliceMut, SeekFrom}; use crate::iter; use crate::mem::{self, ManuallyDrop}; use crate::os::wasi::ffi::{OsStrExt, OsStringExt}; @@ -414,18 +414,18 @@ impl File { } pub fn read(&self, buf: &mut [u8]) -> io::Result { - self.read_vectored(&mut [IoVecMut::new(buf)]) + self.read_vectored(&mut [IoSliceMut::new(buf)]) } - pub fn read_vectored(&self, bufs: &mut [IoVecMut<'_>]) -> io::Result { + pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { self.fd.read(bufs) } pub fn write(&self, buf: &[u8]) -> io::Result { - self.write_vectored(&[IoVec::new(buf)]) + self.write_vectored(&[IoSlice::new(buf)]) } - pub fn write_vectored(&self, bufs: &[IoVec<'_>]) -> io::Result { + pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result { self.fd.write(bufs) } diff --git a/src/libstd/sys/wasi/io.rs b/src/libstd/sys/wasi/io.rs index 5f0315d279..cc8f1e16fa 100644 --- a/src/libstd/sys/wasi/io.rs +++ b/src/libstd/sys/wasi/io.rs @@ -4,15 +4,15 @@ use crate::slice; use libc::{__wasi_ciovec_t, __wasi_iovec_t, c_void}; #[repr(transparent)] -pub struct IoVec<'a> { +pub struct IoSlice<'a> { vec: __wasi_ciovec_t, _p: PhantomData<&'a [u8]>, } -impl<'a> IoVec<'a> { +impl<'a> IoSlice<'a> { #[inline] - pub fn new(buf: &'a [u8]) -> IoVec<'a> { - IoVec { + pub fn new(buf: &'a [u8]) -> IoSlice<'a> { + IoSlice { vec: __wasi_ciovec_t { buf: buf.as_ptr() as *const c_void, buf_len: buf.len(), @@ -29,15 +29,15 @@ impl<'a> IoVec<'a> { } } -pub struct IoVecMut<'a> { +pub struct IoSliceMut<'a> { vec: __wasi_iovec_t, _p: PhantomData<&'a mut [u8]>, } -impl<'a> IoVecMut<'a> { +impl<'a> IoSliceMut<'a> { #[inline] - pub fn new(buf: &'a mut [u8]) -> IoVecMut<'a> { - IoVecMut { + pub fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { + IoSliceMut { vec: __wasi_iovec_t { buf: buf.as_mut_ptr() as *mut c_void, buf_len: buf.len() diff --git a/src/libstd/sys/wasi/net.rs b/src/libstd/sys/wasi/net.rs index 1579aa4b57..80f633a8e1 100644 --- a/src/libstd/sys/wasi/net.rs +++ b/src/libstd/sys/wasi/net.rs @@ -1,11 +1,15 @@ use crate::fmt; -use crate::io::{self, IoVec, IoVecMut}; +use crate::io::{self, IoSlice, IoSliceMut}; use crate::net::{SocketAddr, Shutdown, Ipv4Addr, Ipv6Addr}; use crate::time::Duration; use crate::sys::{unsupported, Void}; use crate::convert::TryFrom; +use crate::sys::fd::{WasiFd}; +use crate::sys_common::FromInner; -pub struct TcpStream(Void); +pub struct TcpStream { + fd: WasiFd, +} impl TcpStream { pub fn connect(_: io::Result<&SocketAddr>) -> io::Result { @@ -17,89 +21,111 @@ impl TcpStream { } pub fn set_read_timeout(&self, _: Option) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn set_write_timeout(&self, _: Option) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn read_timeout(&self) -> io::Result> { - match self.0 {} + unsupported() } pub fn write_timeout(&self) -> io::Result> { - match self.0 {} + unsupported() } pub fn peek(&self, _: &mut [u8]) -> io::Result { - match self.0 {} + unsupported() } pub fn read(&self, _: &mut [u8]) -> io::Result { - match self.0 {} + unsupported() } - pub fn read_vectored(&self, _: &mut [IoVecMut<'_>]) -> io::Result { - match self.0 {} + pub fn read_vectored(&self, _: &mut [IoSliceMut<'_>]) -> io::Result { + unsupported() } pub fn write(&self, _: &[u8]) -> io::Result { - match self.0 {} + unsupported() } - pub fn write_vectored(&self, _: &[IoVec<'_>]) -> io::Result { - match self.0 {} + pub fn write_vectored(&self, _: &[IoSlice<'_>]) -> io::Result { + unsupported() } pub fn peer_addr(&self) -> io::Result { - match self.0 {} + unsupported() } pub fn socket_addr(&self) -> io::Result { - match self.0 {} + unsupported() } pub fn shutdown(&self, _: Shutdown) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn duplicate(&self) -> io::Result { - match self.0 {} + unsupported() } pub fn set_nodelay(&self, _: bool) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn nodelay(&self) -> io::Result { - match self.0 {} + unsupported() } pub fn set_ttl(&self, _: u32) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn ttl(&self) -> io::Result { - match self.0 {} + unsupported() } pub fn take_error(&self) -> io::Result> { - match self.0 {} + unsupported() } pub fn set_nonblocking(&self, _: bool) -> io::Result<()> { - match self.0 {} + unsupported() + } + + pub fn fd(&self) -> &WasiFd { + &self.fd + } + + pub fn into_fd(self) -> WasiFd { + self.fd + } +} + +impl FromInner for TcpStream { + fn from_inner(fd: u32) -> TcpStream { + unsafe { + TcpStream { + fd: WasiFd::from_raw(fd), + } + } } } impl fmt::Debug for TcpStream { - fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self.0 {} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("TcpStream") + .field("fd", &self.fd.as_raw()) + .finish() } } -pub struct TcpListener(Void); +pub struct TcpListener { + fd: WasiFd +} impl TcpListener { pub fn bind(_: io::Result<&SocketAddr>) -> io::Result { @@ -107,49 +133,71 @@ impl TcpListener { } pub fn socket_addr(&self) -> io::Result { - match self.0 {} + unsupported() } pub fn accept(&self) -> io::Result<(TcpStream, SocketAddr)> { - match self.0 {} + unsupported() } pub fn duplicate(&self) -> io::Result { - match self.0 {} + unsupported() } pub fn set_ttl(&self, _: u32) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn ttl(&self) -> io::Result { - match self.0 {} + unsupported() } pub fn set_only_v6(&self, _: bool) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn only_v6(&self) -> io::Result { - match self.0 {} + unsupported() } pub fn take_error(&self) -> io::Result> { - match self.0 {} + unsupported() } pub fn set_nonblocking(&self, _: bool) -> io::Result<()> { - match self.0 {} + unsupported() + } + + pub fn fd(&self) -> &WasiFd { + &self.fd + } + + pub fn into_fd(self) -> WasiFd { + self.fd + } +} + +impl FromInner for TcpListener { + fn from_inner(fd: u32) -> TcpListener { + unsafe { + TcpListener { + fd: WasiFd::from_raw(fd), + } + } } } impl fmt::Debug for TcpListener { - fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self.0 {} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("TcpListener") + .field("fd", &self.fd.as_raw()) + .finish() } } -pub struct UdpSocket(Void); +pub struct UdpSocket { + fd: WasiFd, +} impl UdpSocket { pub fn bind(_: io::Result<&SocketAddr>) -> io::Result { @@ -157,133 +205,153 @@ impl UdpSocket { } pub fn peer_addr(&self) -> io::Result { - match self.0 {} + unsupported() } pub fn socket_addr(&self) -> io::Result { - match self.0 {} + unsupported() } pub fn recv_from(&self, _: &mut [u8]) -> io::Result<(usize, SocketAddr)> { - match self.0 {} + unsupported() } pub fn peek_from(&self, _: &mut [u8]) -> io::Result<(usize, SocketAddr)> { - match self.0 {} + unsupported() } pub fn send_to(&self, _: &[u8], _: &SocketAddr) -> io::Result { - match self.0 {} + unsupported() } pub fn duplicate(&self) -> io::Result { - match self.0 {} + unsupported() } pub fn set_read_timeout(&self, _: Option) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn set_write_timeout(&self, _: Option) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn read_timeout(&self) -> io::Result> { - match self.0 {} + unsupported() } pub fn write_timeout(&self) -> io::Result> { - match self.0 {} + unsupported() } pub fn set_broadcast(&self, _: bool) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn broadcast(&self) -> io::Result { - match self.0 {} + unsupported() } pub fn set_multicast_loop_v4(&self, _: bool) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn multicast_loop_v4(&self) -> io::Result { - match self.0 {} + unsupported() } pub fn set_multicast_ttl_v4(&self, _: u32) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn multicast_ttl_v4(&self) -> io::Result { - match self.0 {} + unsupported() } pub fn set_multicast_loop_v6(&self, _: bool) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn multicast_loop_v6(&self) -> io::Result { - match self.0 {} + unsupported() } pub fn join_multicast_v4(&self, _: &Ipv4Addr, _: &Ipv4Addr) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn join_multicast_v6(&self, _: &Ipv6Addr, _: u32) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn leave_multicast_v4(&self, _: &Ipv4Addr, _: &Ipv4Addr) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn leave_multicast_v6(&self, _: &Ipv6Addr, _: u32) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn set_ttl(&self, _: u32) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn ttl(&self) -> io::Result { - match self.0 {} + unsupported() } pub fn take_error(&self) -> io::Result> { - match self.0 {} + unsupported() } pub fn set_nonblocking(&self, _: bool) -> io::Result<()> { - match self.0 {} + unsupported() } pub fn recv(&self, _: &mut [u8]) -> io::Result { - match self.0 {} + unsupported() } pub fn peek(&self, _: &mut [u8]) -> io::Result { - match self.0 {} + unsupported() } pub fn send(&self, _: &[u8]) -> io::Result { - match self.0 {} + unsupported() } pub fn connect(&self, _: io::Result<&SocketAddr>) -> io::Result<()> { - match self.0 {} + unsupported() + } + + pub fn fd(&self) -> &WasiFd { + &self.fd + } + + pub fn into_fd(self) -> WasiFd { + self.fd + } +} + +impl FromInner for UdpSocket { + fn from_inner(fd: u32) -> UdpSocket { + unsafe { + UdpSocket { + fd: WasiFd::from_raw(fd), + } + } } } impl fmt::Debug for UdpSocket { - fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self.0 {} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("UdpSocket") + .field("fd", &self.fd.as_raw()) + .finish() } } diff --git a/src/libstd/sys/wasi/pipe.rs b/src/libstd/sys/wasi/pipe.rs index 2582b993b6..9f07f05436 100644 --- a/src/libstd/sys/wasi/pipe.rs +++ b/src/libstd/sys/wasi/pipe.rs @@ -1,4 +1,4 @@ -use crate::io; +use crate::io::{self, IoSlice, IoSliceMut}; use crate::sys::Void; pub struct AnonPipe(Void); @@ -8,10 +8,18 @@ impl AnonPipe { match self.0 {} } + pub fn read_vectored(&self, _bufs: &mut [IoSliceMut<'_>]) -> io::Result { + match self.0 {} + } + pub fn write(&self, _buf: &[u8]) -> io::Result { match self.0 {} } + pub fn write_vectored(&self, _bufs: &[IoSlice<'_>]) -> io::Result { + match self.0 {} + } + pub fn diverge(&self) -> ! { match self.0 {} } diff --git a/src/libstd/sys/wasi/stdio.rs b/src/libstd/sys/wasi/stdio.rs index 1929478866..2bf8d803c0 100644 --- a/src/libstd/sys/wasi/stdio.rs +++ b/src/libstd/sys/wasi/stdio.rs @@ -1,4 +1,4 @@ -use crate::io::{self, IoVec, IoVecMut}; +use crate::io::{self, IoSlice, IoSliceMut}; use crate::libc; use crate::mem::ManuallyDrop; use crate::sys::fd::WasiFd; @@ -13,8 +13,12 @@ impl Stdin { } pub fn read(&self, data: &mut [u8]) -> io::Result { + self.read_vectored(&mut [IoSliceMut::new(data)]) + } + + pub fn read_vectored(&self, data: &mut [IoSliceMut<'_>]) -> io::Result { ManuallyDrop::new(unsafe { WasiFd::from_raw(libc::STDIN_FILENO as u32) }) - .read(&mut [IoVecMut::new(data)]) + .read(data) } } @@ -24,8 +28,12 @@ impl Stdout { } pub fn write(&self, data: &[u8]) -> io::Result { + self.write_vectored(&[IoSlice::new(data)]) + } + + pub fn write_vectored(&self, data: &[IoSlice<'_>]) -> io::Result { ManuallyDrop::new(unsafe { WasiFd::from_raw(libc::STDOUT_FILENO as u32) }) - .write(&[IoVec::new(data)]) + .write(data) } pub fn flush(&self) -> io::Result<()> { @@ -39,8 +47,12 @@ impl Stderr { } pub fn write(&self, data: &[u8]) -> io::Result { + self.write_vectored(&[IoSlice::new(data)]) + } + + pub fn write_vectored(&self, data: &[IoSlice<'_>]) -> io::Result { ManuallyDrop::new(unsafe { WasiFd::from_raw(libc::STDERR_FILENO as u32) }) - .write(&[IoVec::new(data)]) + .write(data) } pub fn flush(&self) -> io::Result<()> { diff --git a/src/libstd/sys/wasi/thread.rs b/src/libstd/sys/wasi/thread.rs index 9d3c6ac59d..5e69e4d948 100644 --- a/src/libstd/sys/wasi/thread.rs +++ b/src/libstd/sys/wasi/thread.rs @@ -1,4 +1,3 @@ -use crate::boxed::FnBox; use crate::cmp; use crate::ffi::CStr; use crate::io; @@ -13,7 +12,7 @@ pub const DEFAULT_MIN_STACK_SIZE: usize = 4096; impl Thread { // unsafe: see thread::Builder::spawn_unchecked for safety requirements - pub unsafe fn new(_stack: usize, _p: Box) + pub unsafe fn new(_stack: usize, _p: Box) -> io::Result { unsupported() diff --git a/src/libstd/sys/wasm/fs.rs b/src/libstd/sys/wasm/fs.rs index 68c8e9356a..e9095b375f 100644 --- a/src/libstd/sys/wasm/fs.rs +++ b/src/libstd/sys/wasm/fs.rs @@ -1,7 +1,7 @@ use crate::ffi::OsString; use crate::fmt; use crate::hash::{Hash, Hasher}; -use crate::io::{self, SeekFrom}; +use crate::io::{self, SeekFrom, IoSlice, IoSliceMut}; use crate::path::{Path, PathBuf}; use crate::sys::time::SystemTime; use crate::sys::{unsupported, Void}; @@ -200,10 +200,18 @@ impl File { match self.0 {} } + pub fn read_vectored(&self, _bufs: &mut [IoSliceMut<'_>]) -> io::Result { + match self.0 {} + } + pub fn write(&self, _buf: &[u8]) -> io::Result { match self.0 {} } + pub fn write_vectored(&self, _bufs: &[IoSlice<'_>]) -> io::Result { + match self.0 {} + } + pub fn flush(&self) -> io::Result<()> { match self.0 {} } diff --git a/src/libstd/sys/wasm/io.rs b/src/libstd/sys/wasm/io.rs index 8b02d3fd19..4b423a5cbc 100644 --- a/src/libstd/sys/wasm/io.rs +++ b/src/libstd/sys/wasm/io.rs @@ -1,9 +1,9 @@ -pub struct IoVec<'a>(&'a [u8]); +pub struct IoSlice<'a>(&'a [u8]); -impl<'a> IoVec<'a> { +impl<'a> IoSlice<'a> { #[inline] - pub fn new(buf: &'a [u8]) -> IoVec<'a> { - IoVec(buf) + pub fn new(buf: &'a [u8]) -> IoSlice<'a> { + IoSlice(buf) } #[inline] @@ -12,12 +12,12 @@ impl<'a> IoVec<'a> { } } -pub struct IoVecMut<'a>(&'a mut [u8]); +pub struct IoSliceMut<'a>(&'a mut [u8]); -impl<'a> IoVecMut<'a> { +impl<'a> IoSliceMut<'a> { #[inline] - pub fn new(buf: &'a mut [u8]) -> IoVecMut<'a> { - IoVecMut(buf) + pub fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { + IoSliceMut(buf) } #[inline] diff --git a/src/libstd/sys/wasm/net.rs b/src/libstd/sys/wasm/net.rs index 38552eab0a..d50f989d2b 100644 --- a/src/libstd/sys/wasm/net.rs +++ b/src/libstd/sys/wasm/net.rs @@ -1,5 +1,5 @@ use crate::fmt; -use crate::io::{self, IoVec, IoVecMut}; +use crate::io::{self, IoSlice, IoSliceMut}; use crate::net::{SocketAddr, Shutdown, Ipv4Addr, Ipv6Addr}; use crate::time::Duration; use crate::sys::{unsupported, Void}; @@ -40,7 +40,7 @@ impl TcpStream { match self.0 {} } - pub fn read_vectored(&self, _: &mut [IoVecMut<'_>]) -> io::Result { + pub fn read_vectored(&self, _: &mut [IoSliceMut<'_>]) -> io::Result { match self.0 {} } @@ -48,7 +48,7 @@ impl TcpStream { match self.0 {} } - pub fn write_vectored(&self, _: &[IoVec<'_>]) -> io::Result { + pub fn write_vectored(&self, _: &[IoSlice<'_>]) -> io::Result { match self.0 {} } diff --git a/src/libstd/sys/wasm/pipe.rs b/src/libstd/sys/wasm/pipe.rs index 2582b993b6..9f07f05436 100644 --- a/src/libstd/sys/wasm/pipe.rs +++ b/src/libstd/sys/wasm/pipe.rs @@ -1,4 +1,4 @@ -use crate::io; +use crate::io::{self, IoSlice, IoSliceMut}; use crate::sys::Void; pub struct AnonPipe(Void); @@ -8,10 +8,18 @@ impl AnonPipe { match self.0 {} } + pub fn read_vectored(&self, _bufs: &mut [IoSliceMut<'_>]) -> io::Result { + match self.0 {} + } + pub fn write(&self, _buf: &[u8]) -> io::Result { match self.0 {} } + pub fn write_vectored(&self, _bufs: &[IoSlice<'_>]) -> io::Result { + match self.0 {} + } + pub fn diverge(&self) -> ! { match self.0 {} } diff --git a/src/libstd/sys/wasm/thread.rs b/src/libstd/sys/wasm/thread.rs index a65c413119..1dc786cd5d 100644 --- a/src/libstd/sys/wasm/thread.rs +++ b/src/libstd/sys/wasm/thread.rs @@ -1,4 +1,3 @@ -use crate::boxed::FnBox; use crate::ffi::CStr; use crate::io; use crate::sys::{unsupported, Void}; @@ -10,7 +9,7 @@ pub const DEFAULT_MIN_STACK_SIZE: usize = 4096; impl Thread { // unsafe: see thread::Builder::spawn_unchecked for safety requirements - pub unsafe fn new(_stack: usize, _p: Box) + pub unsafe fn new(_stack: usize, _p: Box) -> io::Result { unsupported() diff --git a/src/libstd/sys/windows/fs.rs b/src/libstd/sys/windows/fs.rs index 4ebbb0707f..d5cb205c85 100644 --- a/src/libstd/sys/windows/fs.rs +++ b/src/libstd/sys/windows/fs.rs @@ -2,7 +2,7 @@ use crate::os::windows::prelude::*; use crate::ffi::OsString; use crate::fmt; -use crate::io::{self, Error, SeekFrom}; +use crate::io::{self, Error, SeekFrom, IoSlice, IoSliceMut}; use crate::mem; use crate::path::{Path, PathBuf}; use crate::ptr; @@ -314,6 +314,10 @@ impl File { self.handle.read(buf) } + pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + self.handle.read_vectored(bufs) + } + pub fn read_at(&self, buf: &mut [u8], offset: u64) -> io::Result { self.handle.read_at(buf, offset) } @@ -322,6 +326,10 @@ impl File { self.handle.write(buf) } + pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result { + self.handle.write_vectored(bufs) + } + pub fn write_at(&self, buf: &[u8], offset: u64) -> io::Result { self.handle.write_at(buf, offset) } diff --git a/src/libstd/sys/windows/handle.rs b/src/libstd/sys/windows/handle.rs index 02549088c8..3e5aa69335 100644 --- a/src/libstd/sys/windows/handle.rs +++ b/src/libstd/sys/windows/handle.rs @@ -1,7 +1,7 @@ #![unstable(issue = "0", feature = "windows_handle")] use crate::cmp; -use crate::io::{self, ErrorKind, Read}; +use crate::io::{self, ErrorKind, Read, IoSlice, IoSliceMut}; use crate::mem; use crate::ops::Deref; use crate::ptr; @@ -89,6 +89,10 @@ impl RawHandle { } } + pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + crate::io::default_read_vectored(|buf| self.read(buf), bufs) + } + pub fn read_at(&self, buf: &mut [u8], offset: u64) -> io::Result { let mut read = 0; let len = cmp::min(buf.len(), ::max_value() as usize) as c::DWORD; @@ -169,6 +173,10 @@ impl RawHandle { Ok(amt as usize) } + pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result { + crate::io::default_write_vectored(|buf| self.write(buf), bufs) + } + pub fn write_at(&self, buf: &[u8], offset: u64) -> io::Result { let mut written = 0; let len = cmp::min(buf.len(), ::max_value() as usize) as c::DWORD; @@ -199,4 +207,8 @@ impl<'a> Read for &'a RawHandle { fn read(&mut self, buf: &mut [u8]) -> io::Result { (**self).read(buf) } + + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + (**self).read_vectored(bufs) + } } diff --git a/src/libstd/sys/windows/io.rs b/src/libstd/sys/windows/io.rs index 54dd271c9d..c045a63e91 100644 --- a/src/libstd/sys/windows/io.rs +++ b/src/libstd/sys/windows/io.rs @@ -3,16 +3,16 @@ use crate::slice; use crate::sys::c; #[repr(transparent)] -pub struct IoVec<'a> { +pub struct IoSlice<'a> { vec: c::WSABUF, _p: PhantomData<&'a [u8]>, } -impl<'a> IoVec<'a> { +impl<'a> IoSlice<'a> { #[inline] - pub fn new(buf: &'a [u8]) -> IoVec<'a> { + pub fn new(buf: &'a [u8]) -> IoSlice<'a> { assert!(buf.len() <= c::ULONG::max_value() as usize); - IoVec { + IoSlice { vec: c::WSABUF { len: buf.len() as c::ULONG, buf: buf.as_ptr() as *mut u8 as *mut c::CHAR, @@ -29,16 +29,16 @@ impl<'a> IoVec<'a> { } } -pub struct IoVecMut<'a> { +pub struct IoSliceMut<'a> { vec: c::WSABUF, _p: PhantomData<&'a mut [u8]>, } -impl<'a> IoVecMut<'a> { +impl<'a> IoSliceMut<'a> { #[inline] - pub fn new(buf: &'a mut [u8]) -> IoVecMut<'a> { + pub fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { assert!(buf.len() <= c::ULONG::max_value() as usize); - IoVecMut { + IoSliceMut { vec: c::WSABUF { len: buf.len() as c::ULONG, buf: buf.as_mut_ptr() as *mut c::CHAR, diff --git a/src/libstd/sys/windows/net.rs b/src/libstd/sys/windows/net.rs index 1231fd55e2..7dd1af5441 100644 --- a/src/libstd/sys/windows/net.rs +++ b/src/libstd/sys/windows/net.rs @@ -1,7 +1,7 @@ #![unstable(issue = "0", feature = "windows_net")] use crate::cmp; -use crate::io::{self, Read, IoVec, IoVecMut}; +use crate::io::{self, Read, IoSlice, IoSliceMut}; use crate::mem; use crate::net::{SocketAddr, Shutdown}; use crate::ptr; @@ -208,7 +208,7 @@ impl Socket { self.recv_with_flags(buf, 0) } - pub fn read_vectored(&self, bufs: &mut [IoVecMut<'_>]) -> io::Result { + pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { // On unix when a socket is shut down all further reads return 0, so we // do the same on windows to map a shut down socket to returning EOF. let len = cmp::min(bufs.len(), c::DWORD::max_value() as usize) as c::DWORD; @@ -268,7 +268,7 @@ impl Socket { self.recv_from_with_flags(buf, c::MSG_PEEK) } - pub fn write_vectored(&self, bufs: &[IoVec<'_>]) -> io::Result { + pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result { let len = cmp::min(bufs.len(), c::DWORD::max_value() as usize) as c::DWORD; let mut nwritten = 0; unsafe { diff --git a/src/libstd/sys/windows/pipe.rs b/src/libstd/sys/windows/pipe.rs index b38727830f..493ee8a9a2 100644 --- a/src/libstd/sys/windows/pipe.rs +++ b/src/libstd/sys/windows/pipe.rs @@ -1,7 +1,7 @@ use crate::os::windows::prelude::*; use crate::ffi::OsStr; -use crate::io; +use crate::io::{self, IoSlice, IoSliceMut}; use crate::mem; use crate::path::Path; use crate::ptr; @@ -166,9 +166,17 @@ impl AnonPipe { self.inner.read(buf) } + pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { + self.inner.read_vectored(bufs) + } + pub fn write(&self, buf: &[u8]) -> io::Result { self.inner.write(buf) } + + pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result { + self.inner.write_vectored(bufs) + } } pub fn read2(p1: AnonPipe, diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs index 1b0a811f13..ebdf3612e0 100644 --- a/src/libstd/sys/windows/thread.rs +++ b/src/libstd/sys/windows/thread.rs @@ -1,4 +1,3 @@ -use crate::boxed::FnBox; use crate::io; use crate::ffi::CStr; use crate::mem; @@ -20,7 +19,7 @@ pub struct Thread { impl Thread { // unsafe: see thread::Builder::spawn_unchecked for safety requirements - pub unsafe fn new(stack: usize, p: Box) + pub unsafe fn new(stack: usize, p: Box) -> io::Result { let p = box p; diff --git a/src/libstd/sys_common/at_exit_imp.rs b/src/libstd/sys_common/at_exit_imp.rs index 1181b86161..cdb72ee872 100644 --- a/src/libstd/sys_common/at_exit_imp.rs +++ b/src/libstd/sys_common/at_exit_imp.rs @@ -2,12 +2,11 @@ //! //! Documentation can be found on the `rt::at_exit` function. -use crate::boxed::FnBox; use crate::ptr; use crate::mem; use crate::sys_common::mutex::Mutex; -type Queue = Vec>; +type Queue = Vec>; // NB these are specifically not types from `std::sync` as they currently rely // on poisoning and this module needs to operate at a lower level than requiring @@ -61,7 +60,7 @@ pub fn cleanup() { } } -pub fn push(f: Box) -> bool { +pub fn push(f: Box) -> bool { unsafe { let _guard = LOCK.lock(); if init() { diff --git a/src/libstd/sys_common/backtrace.rs b/src/libstd/sys_common/backtrace.rs index 1a80908779..8d8d8169b4 100644 --- a/src/libstd/sys_common/backtrace.rs +++ b/src/libstd/sys_common/backtrace.rs @@ -241,4 +241,3 @@ fn output_fileline(w: &mut dyn Write, w.write_all(b"\n") } - diff --git a/src/libstd/sys_common/mod.rs b/src/libstd/sys_common/mod.rs index 6260c3b77f..78e1599426 100644 --- a/src/libstd/sys_common/mod.rs +++ b/src/libstd/sys_common/mod.rs @@ -30,10 +30,12 @@ macro_rules! rtassert { #[allow(unused_macros)] // not used on all platforms macro_rules! rtunwrap { - ($ok:ident, $e:expr) => (if let $ok(v) = $e { - v - } else { - rtabort!(concat!("unwrap failed: ", stringify!($e))); + ($ok:ident, $e:expr) => (match $e { + $ok(v) => v, + ref err => { + let err = err.as_ref().map(|_|()); // map Ok/Some which might not be Debug + rtabort!(concat!("unwrap failed: ", stringify!($e), " = {:?}"), err) + }, }) } diff --git a/src/libstd/sys_common/net.rs b/src/libstd/sys_common/net.rs index 02bd91c438..391f670346 100644 --- a/src/libstd/sys_common/net.rs +++ b/src/libstd/sys_common/net.rs @@ -1,7 +1,7 @@ use crate::cmp; use crate::ffi::CString; use crate::fmt; -use crate::io::{self, Error, ErrorKind, IoVec, IoVecMut}; +use crate::io::{self, Error, ErrorKind, IoSlice, IoSliceMut}; use crate::mem; use crate::net::{SocketAddr, Shutdown, Ipv4Addr, Ipv6Addr}; use crate::ptr; @@ -37,12 +37,12 @@ use crate::sys::net::netc::IPV6_DROP_MEMBERSHIP; #[cfg(any(target_os = "linux", target_os = "android", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd", - target_os = "haiku", target_os = "bitrig"))] + target_os = "haiku"))] use libc::MSG_NOSIGNAL; #[cfg(not(any(target_os = "linux", target_os = "android", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd", - target_os = "haiku", target_os = "bitrig")))] + target_os = "haiku")))] const MSG_NOSIGNAL: c_int = 0x0; //////////////////////////////////////////////////////////////////////////////// @@ -256,7 +256,7 @@ impl TcpStream { self.inner.read(buf) } - pub fn read_vectored(&self, bufs: &mut [IoVecMut<'_>]) -> io::Result { + pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { self.inner.read_vectored(bufs) } @@ -271,7 +271,7 @@ impl TcpStream { Ok(ret as usize) } - pub fn write_vectored(&self, bufs: &[IoVec<'_>]) -> io::Result { + pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> io::Result { self.inner.write_vectored(bufs) } diff --git a/src/libstd/sys_common/thread.rs b/src/libstd/sys_common/thread.rs index b2142e7530..6ab0d5cbe9 100644 --- a/src/libstd/sys_common/thread.rs +++ b/src/libstd/sys_common/thread.rs @@ -1,4 +1,3 @@ -use crate::boxed::FnBox; use crate::env; use crate::sync::atomic::{self, Ordering}; use crate::sys::stack_overflow; @@ -11,7 +10,7 @@ pub unsafe fn start_thread(main: *mut u8) { let _handler = stack_overflow::Handler::new(); // Finally, let's run some code. - Box::from_raw(main as *mut Box)() + Box::from_raw(main as *mut Box)() } pub fn min_stack() -> usize { diff --git a/src/libstd/sys_common/wtf8.rs b/src/libstd/sys_common/wtf8.rs index f17020de44..81e606fc16 100644 --- a/src/libstd/sys_common/wtf8.rs +++ b/src/libstd/sys_common/wtf8.rs @@ -146,10 +146,10 @@ impl Wtf8Buf { Wtf8Buf { bytes: Vec::new() } } - /// Creates a new, empty WTF-8 string with pre-allocated capacity for `n` bytes. + /// Creates a new, empty WTF-8 string with pre-allocated capacity for `capacity` bytes. #[inline] - pub fn with_capacity(n: usize) -> Wtf8Buf { - Wtf8Buf { bytes: Vec::with_capacity(n) } + pub fn with_capacity(capacity: usize) -> Wtf8Buf { + Wtf8Buf { bytes: Vec::with_capacity(capacity) } } /// Creates a WTF-8 string from a UTF-8 `String`. diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index cb50797109..35de4f4008 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -157,7 +157,6 @@ #![stable(feature = "rust1", since = "1.0.0")] use crate::any::Any; -use crate::boxed::FnBox; use crate::cell::UnsafeCell; use crate::ffi::{CStr, CString}; use crate::fmt; @@ -270,7 +269,7 @@ impl Builder { /// /// let builder = thread::Builder::new() /// .name("foo".into()) - /// .stack_size(10); + /// .stack_size(32 * 1024); /// /// let handler = builder.spawn(|| { /// // thread code @@ -444,6 +443,7 @@ impl Builder { /// [`Builder::spawn`]: ../../std/thread/struct.Builder.html#method.spawn /// [`io::Result`]: ../../std/io/type.Result.html /// [`JoinHandle`]: ../../std/thread/struct.JoinHandle.html + /// [`JoinHandle::join`]: ../../std/thread/struct.JoinHandle.html#method.join #[unstable(feature = "thread_spawn_unchecked", issue = "55132")] pub unsafe fn spawn_unchecked<'a, F, T>(self, f: F) -> io::Result> where F: FnOnce() -> T, F: Send + 'a, T: Send + 'a @@ -488,7 +488,9 @@ impl Builder { // returning. native: Some(imp::Thread::new( stack_size, - mem::transmute::, Box>(Box::new(main)) + mem::transmute::, Box>(Box::new( + main, + )), )?), thread: my_thread, packet: Packet(my_packet), diff --git a/src/libsyntax/Cargo.toml b/src/libsyntax/Cargo.toml index 71c2ab82f6..b48f3c9b8b 100644 --- a/src/libsyntax/Cargo.toml +++ b/src/libsyntax/Cargo.toml @@ -14,8 +14,10 @@ bitflags = "1.0" serialize = { path = "../libserialize" } log = "0.4" scoped-tls = "1.0" +lazy_static = "1.0.0" syntax_pos = { path = "../libsyntax_pos" } errors = { path = "../librustc_errors", package = "rustc_errors" } rustc_data_structures = { path = "../librustc_data_structures" } +rustc_macros = { path = "../librustc_macros" } rustc_target = { path = "../librustc_target" } smallvec = { version = "0.6.7", features = ["union", "may_dangle"] } diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index bcc8fdf8cd..b55ca453fb 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -6,6 +6,7 @@ pub use crate::symbol::{Ident, Symbol as Name}; pub use crate::util::parser::ExprPrecedence; use crate::ext::hygiene::{Mark, SyntaxContext}; +use crate::parse::token; use crate::print::pprust; use crate::ptr::P; use crate::source_map::{dummy_spanned, respan, Spanned}; @@ -15,7 +16,7 @@ use crate::ThinVec; use rustc_data_structures::indexed_vec::Idx; #[cfg(target_arch = "x86_64")] -use rustc_data_structures::static_assert; +use rustc_data_structures::static_assert_size; use rustc_target::spec::abi::Abi; use syntax_pos::{Span, DUMMY_SP}; @@ -68,9 +69,15 @@ pub struct Path { pub segments: Vec, } -impl<'a> PartialEq<&'a str> for Path { - fn eq(&self, string: &&'a str) -> bool { - self.segments.len() == 1 && self.segments[0].ident.name == *string +impl PartialEq for Path { + fn eq(&self, symbol: &Symbol) -> bool { + self.segments.len() == 1 && { + let name = self.segments[0].ident.name; + // Make sure these symbols are pure strings + debug_assert!(!symbol.is_gensymed()); + debug_assert!(!name.is_gensymed()); + name == *symbol + } } } @@ -876,6 +883,17 @@ pub struct Local { pub id: NodeId, pub span: Span, pub attrs: ThinVec, + /// Origin of this local variable. + pub source: LocalSource, +} + +#[derive(Clone, Copy, RustcEncodable, RustcDecodable, Debug)] +pub enum LocalSource { + /// Local was parsed from source. + Normal, + /// Within `ast::IsAsync::Async`, a local is generated that will contain the moved arguments + /// of an `async fn`. + AsyncFn, } /// An arm of a 'match'. @@ -946,7 +964,7 @@ pub struct Expr { // `Expr` is used a lot. Make sure it doesn't unintentionally get bigger. #[cfg(target_arch = "x86_64")] -static_assert!(MEM_SIZE_OF_EXPR: std::mem::size_of::() == 88); +static_assert_size!(Expr, 96); impl Expr { /// Whether this expression would be valid somewhere that expects a value; for example, an `if` @@ -1042,6 +1060,7 @@ impl Expr { ExprKind::Block(..) => ExprPrecedence::Block, ExprKind::TryBlock(..) => ExprPrecedence::TryBlock, ExprKind::Async(..) => ExprPrecedence::Async, + ExprKind::Await(..) => ExprPrecedence::Await, ExprKind::Assign(..) => ExprPrecedence::Assign, ExprKind::AssignOp(..) => ExprPrecedence::AssignOp, ExprKind::Field(..) => ExprPrecedence::Field, @@ -1114,6 +1133,7 @@ pub enum ExprKind { Lit(Lit), /// A cast (e.g., `foo as f64`). Cast(P, P), + /// A type ascription (e.g., `42: usize`). Type(P, P), /// An `if` block, with an optional `else` block. /// @@ -1162,6 +1182,9 @@ pub enum ExprKind { /// created during lowering cannot be made the parent of any other /// preexisting defs. Async(CaptureBy, NodeId, P), + /// An await expression (`my_future.await`). + Await(AwaitOrigin, P), + /// A try block (`try { ... }`). TryBlock(P), @@ -1263,6 +1286,15 @@ pub enum Movability { Movable, } +/// Whether an `await` comes from `await!` or `.await` syntax. +/// FIXME: this should be removed when support for legacy `await!` is removed. +/// https://github.com/rust-lang/rust/issues/60610 +#[derive(Clone, PartialEq, RustcEncodable, RustcDecodable, Debug, Copy)] +pub enum AwaitOrigin { + FieldLike, + MacroLike, +} + pub type Mac = Spanned; /// Represents a macro invocation. The `Path` indicates which macro @@ -1313,8 +1345,19 @@ pub enum StrStyle { Raw(u16), } -/// A literal. -pub type Lit = Spanned; +/// An AST literal. +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] +pub struct Lit { + /// The original literal token as written in source code. + pub token: token::Lit, + /// The original literal suffix as written in source code. + pub suffix: Option, + /// The "semantic" representation of the literal lowered from the original tokens. + /// Strings are unescaped, hexadecimal forms are eliminated, etc. + /// FIXME: Remove this and only create the semantic representation during lowering to HIR. + pub node: LitKind, + pub span: Span, +} #[derive(Clone, RustcEncodable, RustcDecodable, Debug, Copy, Hash, PartialEq)] pub enum LitIntType { @@ -1713,6 +1756,16 @@ pub struct Arg { pub ty: P, pub pat: P, pub id: NodeId, + pub source: ArgSource, +} + +/// The source of an argument in a function header. +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] +pub enum ArgSource { + /// Argument as written by the user. + Normal, + /// Argument from `async fn` lowering, contains the original binding pattern. + AsyncFn(P), } /// Alternative representation for `Arg`s describing `self` parameter of methods. @@ -1772,6 +1825,7 @@ impl Arg { }), ty, id: DUMMY_NODE_ID, + source: ArgSource::Normal, }; match eself.node { SelfKind::Explicit(ty, mutbl) => arg(mutbl, ty), @@ -1826,18 +1880,39 @@ pub enum Unsafety { Normal, } -#[derive(Copy, Clone, RustcEncodable, RustcDecodable, Debug)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] +pub struct AsyncArgument { + /// `__arg0` + pub ident: Ident, + /// `__arg0: ` argument to replace existing function argument `: `. Only if + /// argument is not a simple binding. + pub arg: Option, + /// `let __arg0 = __arg0;` statement to be inserted at the start of the block. + pub move_stmt: Stmt, + /// `let = __arg0;` statement to be inserted at the start of the block, after matching + /// move statement. Only if argument is not a simple binding. + pub pat_stmt: Option, +} + +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub enum IsAsync { Async { closure_id: NodeId, return_impl_trait_id: NodeId, + /// This field stores the arguments and statements that are used in HIR lowering to + /// ensure that `async fn` arguments are dropped at the correct time. + /// + /// The argument and statements here are generated at parse time as they are required in + /// both the hir lowering, def collection and name resolution and this stops them needing + /// to be created in each place. + arguments: Vec, }, NotAsync, } impl IsAsync { - pub fn is_async(self) -> bool { - if let IsAsync::Async { .. } = self { + pub fn is_async(&self) -> bool { + if let IsAsync::Async { .. } = *self { true } else { false @@ -1845,12 +1920,12 @@ impl IsAsync { } /// In ths case this is an `async` return, the `NodeId` for the generated `impl Trait` item. - pub fn opt_return_id(self) -> Option { + pub fn opt_return_id(&self) -> Option { match self { IsAsync::Async { return_impl_trait_id, .. - } => Some(return_impl_trait_id), + } => Some(*return_impl_trait_id), IsAsync::NotAsync => None, } } @@ -2190,7 +2265,7 @@ impl Item { /// /// All the information between the visibility and the name of the function is /// included in this struct (e.g., `async unsafe fn` or `const extern "C" fn`). -#[derive(Clone, Copy, RustcEncodable, RustcDecodable, Debug)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] pub struct FnHeader { pub unsafety: Unsafety, pub asyncness: Spanned, @@ -2328,9 +2403,8 @@ pub struct ForeignItem { pub enum ForeignItemKind { /// A foreign function. Fn(P, Generics), - /// A foreign static item (`static ext: u8`), with optional mutability. - /// (The boolean is `true` for mutable items). - Static(P, bool), + /// A foreign static item (`static ext: u8`). + Static(P, Mutability), /// A foreign type. Ty, /// A macro invocation. diff --git a/src/libsyntax/attr/builtin.rs b/src/libsyntax/attr/builtin.rs index 74c952b076..65ca96afab 100644 --- a/src/libsyntax/attr/builtin.rs +++ b/src/libsyntax/attr/builtin.rs @@ -5,7 +5,7 @@ use crate::feature_gate::{Features, GatedCfg}; use crate::parse::ParseSess; use errors::{Applicability, Handler}; -use syntax_pos::{symbol::Symbol, Span}; +use syntax_pos::{symbol::Symbol, symbol::sym, Span}; use super::{mark_used, MetaItemKind}; @@ -80,13 +80,13 @@ pub enum UnwindAttr { /// Determine what `#[unwind]` attribute is present in `attrs`, if any. pub fn find_unwind_attr(diagnostic: Option<&Handler>, attrs: &[Attribute]) -> Option { attrs.iter().fold(None, |ia, attr| { - if attr.check_name("unwind") { + if attr.check_name(sym::unwind) { if let Some(meta) = attr.meta() { if let MetaItemKind::List(items) = meta.node { if items.len() == 1 { - if items[0].check_name("allowed") { + if items[0].check_name(sym::allowed) { return Some(UnwindAttr::Allowed); - } else if items[0].check_name("aborts") { + } else if items[0].check_name(sym::aborts) { return Some(UnwindAttr::Aborts); } } @@ -114,6 +114,8 @@ pub struct Stability { pub const_stability: Option, /// whether the function has a `#[rustc_promotable]` attribute pub promotable: bool, + /// whether the function has a `#[rustc_allow_const_fn_ptr]` attribute + pub allow_const_fn_ptr: bool, } /// The available stability levels. @@ -151,9 +153,9 @@ pub struct RustcDeprecation { /// Checks if `attrs` contains an attribute like `#![feature(feature_name)]`. /// This will not perform any "sanity checks" on the form of the attributes. -pub fn contains_feature_attr(attrs: &[Attribute], feature_name: &str) -> bool { +pub fn contains_feature_attr(attrs: &[Attribute], feature_name: Symbol) -> bool { attrs.iter().any(|item| { - item.check_name("feature") && + item.check_name(sym::feature) && item.meta_item_list().map(|list| { list.iter().any(|mi| mi.is_word() && mi.check_name(feature_name)) }).unwrap_or(false) @@ -178,15 +180,17 @@ fn find_stability_generic<'a, I>(sess: &ParseSess, let mut rustc_depr: Option = None; let mut rustc_const_unstable: Option = None; let mut promotable = false; + let mut allow_const_fn_ptr = false; let diagnostic = &sess.span_diagnostic; 'outer: for attr in attrs_iter { if ![ - "rustc_deprecated", - "rustc_const_unstable", - "unstable", - "stable", - "rustc_promotable", + sym::rustc_deprecated, + sym::rustc_const_unstable, + sym::unstable, + sym::stable, + sym::rustc_promotable, + sym::rustc_allow_const_fn_ptr, ].iter().any(|&s| attr.path == s) { continue // not a stability level } @@ -195,9 +199,12 @@ fn find_stability_generic<'a, I>(sess: &ParseSess, let meta = attr.meta(); - if attr.path == "rustc_promotable" { + if attr.path == sym::rustc_promotable { promotable = true; } + if attr.path == sym::rustc_allow_const_fn_ptr { + allow_const_fn_ptr = true; + } // attributes with data else if let Some(MetaItem { node: MetaItemKind::List(ref metas), .. }) = meta { let meta = meta.as_ref().unwrap(); @@ -222,10 +229,9 @@ fn find_stability_generic<'a, I>(sess: &ParseSess, )+ for meta in metas { if let Some(mi) = meta.meta_item() { - match mi.name_or_empty().get() { + match mi.name_or_empty() { $( - stringify!($name) - => if !get(mi, &mut $name) { continue 'outer }, + sym::$name => if !get(mi, &mut $name) { continue 'outer }, )+ _ => { let expected = &[ $( stringify!($name) ),+ ]; @@ -252,8 +258,8 @@ fn find_stability_generic<'a, I>(sess: &ParseSess, } } - match meta.name_or_empty().get() { - "rustc_deprecated" => { + match meta.name_or_empty() { + sym::rustc_deprecated => { if rustc_depr.is_some() { span_err!(diagnostic, item_sp, E0540, "multiple rustc_deprecated attributes"); @@ -280,7 +286,7 @@ fn find_stability_generic<'a, I>(sess: &ParseSess, } } } - "rustc_const_unstable" => { + sym::rustc_const_unstable => { if rustc_const_unstable.is_some() { span_err!(diagnostic, item_sp, E0553, "multiple rustc_const_unstable attributes"); @@ -295,7 +301,7 @@ fn find_stability_generic<'a, I>(sess: &ParseSess, continue } } - "unstable" => { + sym::unstable => { if stab.is_some() { handle_errors(sess, attr.span, AttrError::MultipleStabilityLevels); break @@ -306,10 +312,10 @@ fn find_stability_generic<'a, I>(sess: &ParseSess, let mut issue = None; for meta in metas { if let Some(mi) = meta.meta_item() { - match mi.name_or_empty().get() { - "feature" => if !get(mi, &mut feature) { continue 'outer }, - "reason" => if !get(mi, &mut reason) { continue 'outer }, - "issue" => if !get(mi, &mut issue) { continue 'outer }, + match mi.name_or_empty() { + sym::feature => if !get(mi, &mut feature) { continue 'outer }, + sym::reason => if !get(mi, &mut reason) { continue 'outer }, + sym::issue => if !get(mi, &mut issue) { continue 'outer }, _ => { handle_errors( sess, @@ -354,6 +360,7 @@ fn find_stability_generic<'a, I>(sess: &ParseSess, rustc_depr: None, const_stability: None, promotable: false, + allow_const_fn_ptr: false, }) } (None, _, _) => { @@ -366,7 +373,7 @@ fn find_stability_generic<'a, I>(sess: &ParseSess, } } } - "stable" => { + sym::stable => { if stab.is_some() { handle_errors(sess, attr.span, AttrError::MultipleStabilityLevels); break @@ -377,11 +384,9 @@ fn find_stability_generic<'a, I>(sess: &ParseSess, for meta in metas { match meta { NestedMetaItem::MetaItem(mi) => { - match mi.name_or_empty().get() { - "feature" => - if !get(mi, &mut feature) { continue 'outer }, - "since" => - if !get(mi, &mut since) { continue 'outer }, + match mi.name_or_empty() { + sym::feature => if !get(mi, &mut feature) { continue 'outer }, + sym::since => if !get(mi, &mut since) { continue 'outer }, _ => { handle_errors( sess, @@ -418,6 +423,7 @@ fn find_stability_generic<'a, I>(sess: &ParseSess, rustc_depr: None, const_stability: None, promotable: false, + allow_const_fn_ptr: false, }) } (None, _) => { @@ -458,13 +464,14 @@ fn find_stability_generic<'a, I>(sess: &ParseSess, } // Merge the const-unstable info into the stability info - if promotable { + if promotable || allow_const_fn_ptr { if let Some(ref mut stab) = stab { - stab.promotable = true; + stab.promotable = promotable; + stab.allow_const_fn_ptr = allow_const_fn_ptr; } else { span_err!(diagnostic, item_sp, E0717, - "rustc_promotable attribute must be paired with \ - either stable or unstable attribute"); + "rustc_promotable and rustc_allow_const_fn_ptr attributes \ + must be paired with either stable or unstable attribute"); } } @@ -472,7 +479,7 @@ fn find_stability_generic<'a, I>(sess: &ParseSess, } pub fn find_crate_name(attrs: &[Attribute]) -> Option { - super::first_attr_value_str_by_name(attrs, "crate_name") + super::first_attr_value_str_by_name(attrs, sym::crate_name) } /// Tests if a cfg-pattern matches the cfg set @@ -532,14 +539,14 @@ pub fn eval_condition(cfg: &ast::MetaItem, sess: &ParseSess, eval: &mut F) // The unwraps below may look dangerous, but we've already asserted // that they won't fail with the loop above. - match cfg.name_or_empty().get() { - "any" => mis.iter().any(|mi| { + match cfg.name_or_empty() { + sym::any => mis.iter().any(|mi| { eval_condition(mi.meta_item().unwrap(), sess, eval) }), - "all" => mis.iter().all(|mi| { + sym::all => mis.iter().all(|mi| { eval_condition(mi.meta_item().unwrap(), sess, eval) }), - "not" => { + sym::not => { if mis.len() != 1 { span_err!(sess.span_diagnostic, cfg.span, E0536, "expected 1 cfg-pattern"); return false; @@ -583,7 +590,7 @@ fn find_deprecation_generic<'a, I>(sess: &ParseSess, let diagnostic = &sess.span_diagnostic; 'outer: for attr in attrs_iter { - if !attr.check_name("deprecated") { + if !attr.check_name(sym::deprecated) { continue; } @@ -635,9 +642,9 @@ fn find_deprecation_generic<'a, I>(sess: &ParseSess, for meta in list { match meta { NestedMetaItem::MetaItem(mi) => { - match mi.name_or_empty().get() { - "since" => if !get(mi, &mut since) { continue 'outer }, - "note" => if !get(mi, &mut note) { continue 'outer }, + match mi.name_or_empty() { + sym::since => if !get(mi, &mut since) { continue 'outer }, + sym::note => if !get(mi, &mut note) { continue 'outer }, _ => { handle_errors( sess, @@ -711,7 +718,7 @@ pub fn find_repr_attrs(sess: &ParseSess, attr: &Attribute) -> Vec { let mut acc = Vec::new(); let diagnostic = &sess.span_diagnostic; - if attr.path == "repr" { + if attr.path == sym::repr { if let Some(items) = attr.meta_item_list() { mark_used(attr); for item in items { @@ -729,11 +736,11 @@ pub fn find_repr_attrs(sess: &ParseSess, attr: &Attribute) -> Vec { let mut recognised = false; if item.is_word() { - let hint = match item.name_or_empty().get() { - "C" => Some(ReprC), - "packed" => Some(ReprPacked(1)), - "simd" => Some(ReprSimd), - "transparent" => Some(ReprTransparent), + let hint = match item.name_or_empty() { + sym::C => Some(ReprC), + sym::packed => Some(ReprPacked(1)), + sym::simd => Some(ReprSimd), + sym::transparent => Some(ReprTransparent), name => int_type_of_word(name).map(ReprInt), }; @@ -760,14 +767,14 @@ pub fn find_repr_attrs(sess: &ParseSess, attr: &Attribute) -> Vec { }; let mut literal_error = None; - if name == "align" { + if name == sym::align { recognised = true; match parse_alignment(&value.node) { Ok(literal) => acc.push(ReprAlign(literal)), Err(message) => literal_error = Some(message) }; } - else if name == "packed" { + else if name == sym::packed { recognised = true; match parse_alignment(&value.node) { Ok(literal) => acc.push(ReprPacked(literal)), @@ -780,7 +787,7 @@ pub fn find_repr_attrs(sess: &ParseSess, attr: &Attribute) -> Vec { } } else { if let Some(meta_item) = item.meta_item() { - if meta_item.check_name("align") { + if meta_item.check_name(sym::align) { if let MetaItemKind::NameValue(ref value) = meta_item.node { recognised = true; let mut err = struct_span_err!(diagnostic, item.span(), E0693, @@ -820,22 +827,22 @@ pub fn find_repr_attrs(sess: &ParseSess, attr: &Attribute) -> Vec { acc } -fn int_type_of_word(s: &str) -> Option { +fn int_type_of_word(s: Symbol) -> Option { use IntType::*; match s { - "i8" => Some(SignedInt(ast::IntTy::I8)), - "u8" => Some(UnsignedInt(ast::UintTy::U8)), - "i16" => Some(SignedInt(ast::IntTy::I16)), - "u16" => Some(UnsignedInt(ast::UintTy::U16)), - "i32" => Some(SignedInt(ast::IntTy::I32)), - "u32" => Some(UnsignedInt(ast::UintTy::U32)), - "i64" => Some(SignedInt(ast::IntTy::I64)), - "u64" => Some(UnsignedInt(ast::UintTy::U64)), - "i128" => Some(SignedInt(ast::IntTy::I128)), - "u128" => Some(UnsignedInt(ast::UintTy::U128)), - "isize" => Some(SignedInt(ast::IntTy::Isize)), - "usize" => Some(UnsignedInt(ast::UintTy::Usize)), + sym::i8 => Some(SignedInt(ast::IntTy::I8)), + sym::u8 => Some(UnsignedInt(ast::UintTy::U8)), + sym::i16 => Some(SignedInt(ast::IntTy::I16)), + sym::u16 => Some(UnsignedInt(ast::UintTy::U16)), + sym::i32 => Some(SignedInt(ast::IntTy::I32)), + sym::u32 => Some(UnsignedInt(ast::UintTy::U32)), + sym::i64 => Some(SignedInt(ast::IntTy::I64)), + sym::u64 => Some(UnsignedInt(ast::UintTy::U64)), + sym::i128 => Some(SignedInt(ast::IntTy::I128)), + sym::u128 => Some(UnsignedInt(ast::UintTy::U128)), + sym::isize => Some(SignedInt(ast::IntTy::Isize)), + sym::usize => Some(UnsignedInt(ast::UintTy::Usize)), _ => None } } diff --git a/src/libsyntax/attr/mod.rs b/src/libsyntax/attr/mod.rs index c0bd5c79b1..592b40df17 100644 --- a/src/libsyntax/attr/mod.rs +++ b/src/libsyntax/attr/mod.rs @@ -14,15 +14,15 @@ pub use StabilityLevel::*; use crate::ast; use crate::ast::{AttrId, Attribute, AttrStyle, Name, Ident, Path, PathSegment}; use crate::ast::{MetaItem, MetaItemKind, NestedMetaItem}; -use crate::ast::{Lit, LitKind, Expr, ExprKind, Item, Local, Stmt, StmtKind, GenericParam}; +use crate::ast::{Lit, LitKind, Expr, Item, Local, Stmt, StmtKind, GenericParam}; use crate::mut_visit::visit_clobber; -use crate::source_map::{BytePos, Spanned, respan, dummy_spanned}; +use crate::source_map::{BytePos, Spanned, dummy_spanned}; use crate::parse::lexer::comments::{doc_comment_style, strip_doc_comment_decoration}; use crate::parse::parser::Parser; use crate::parse::{self, ParseSess, PResult}; use crate::parse::token::{self, Token}; use crate::ptr::P; -use crate::symbol::{keywords, LocalInternedString, Symbol}; +use crate::symbol::{keywords, Symbol, sym}; use crate::ThinVec; use crate::tokenstream::{TokenStream, TokenTree, DelimSpan}; use crate::GLOBALS; @@ -81,7 +81,7 @@ impl NestedMetaItem { } /// Returns `true` if this list item is a MetaItem with a name of `name`. - pub fn check_name(&self, name: &str) -> bool { + pub fn check_name(&self, name: Symbol) -> bool { self.meta_item().map_or(false, |meta_item| meta_item.check_name(name)) } @@ -89,8 +89,8 @@ impl NestedMetaItem { pub fn ident(&self) -> Option { self.meta_item().and_then(|meta_item| meta_item.ident()) } - pub fn name_or_empty(&self) -> LocalInternedString { - self.ident().unwrap_or(keywords::Invalid.ident()).name.as_str() + pub fn name_or_empty(&self) -> Symbol { + self.ident().unwrap_or(keywords::Invalid.ident()).name } /// Gets the string value if self is a MetaItem and the MetaItem is a @@ -151,7 +151,7 @@ impl Attribute { /// attribute is marked as used. /// /// To check the attribute name without marking it used, use the `path` field directly. - pub fn check_name(&self, name: &str) -> bool { + pub fn check_name(&self, name: Symbol) -> bool { let matches = self.path == name; if matches { mark_used(self); @@ -167,8 +167,8 @@ impl Attribute { None } } - pub fn name_or_empty(&self) -> LocalInternedString { - self.ident().unwrap_or(keywords::Invalid.ident()).name.as_str() + pub fn name_or_empty(&self) -> Symbol { + self.ident().unwrap_or(keywords::Invalid.ident()).name } pub fn value_str(&self) -> Option { @@ -205,8 +205,8 @@ impl MetaItem { None } } - pub fn name_or_empty(&self) -> LocalInternedString { - self.ident().unwrap_or(keywords::Invalid.ident()).name.as_str() + pub fn name_or_empty(&self) -> Symbol { + self.ident().unwrap_or(keywords::Invalid.ident()).name } // #[attribute(name = "value")] @@ -244,7 +244,7 @@ impl MetaItem { } } - pub fn check_name(&self, name: &str) -> bool { + pub fn check_name(&self, name: Symbol) -> bool { self.path == name } @@ -323,7 +323,7 @@ impl Attribute { if self.is_sugared_doc { let comment = self.value_str().unwrap(); let meta = mk_name_value_item_str( - Ident::from_str("doc"), + Ident::with_empty_ctxt(sym::doc), dummy_spanned(Symbol::intern(&strip_doc_comment_decoration(&comment.as_str())))); let mut attr = if self.style == ast::AttrStyle::Outer { mk_attr_outer(self.span, self.id, meta) @@ -341,12 +341,13 @@ impl Attribute { /* Constructors */ pub fn mk_name_value_item_str(ident: Ident, value: Spanned) -> MetaItem { - let value = respan(value.span, LitKind::Str(value.node, ast::StrStyle::Cooked)); - mk_name_value_item(ident.span.to(value.span), ident, value) + let lit_kind = LitKind::Str(value.node, ast::StrStyle::Cooked); + mk_name_value_item(ident.span.to(value.span), ident, lit_kind, value.span) } -pub fn mk_name_value_item(span: Span, ident: Ident, value: ast::Lit) -> MetaItem { - MetaItem { path: Path::from_ident(ident), span, node: MetaItemKind::NameValue(value) } +pub fn mk_name_value_item(span: Span, ident: Ident, lit_kind: LitKind, lit_span: Span) -> MetaItem { + let lit = Lit::from_lit_kind(lit_kind, lit_span); + MetaItem { path: Path::from_ident(ident), span, node: MetaItemKind::NameValue(lit) } } pub fn mk_list_item(span: Span, ident: Ident, items: Vec) -> MetaItem { @@ -408,39 +409,40 @@ pub fn mk_spanned_attr_outer(sp: Span, id: AttrId, item: MetaItem) -> Attribute pub fn mk_sugared_doc_attr(id: AttrId, text: Symbol, span: Span) -> Attribute { let style = doc_comment_style(&text.as_str()); - let lit = respan(span, LitKind::Str(text, ast::StrStyle::Cooked)); + let lit_kind = LitKind::Str(text, ast::StrStyle::Cooked); + let lit = Lit::from_lit_kind(lit_kind, span); Attribute { id, style, - path: Path::from_ident(Ident::from_str("doc").with_span_pos(span)), + path: Path::from_ident(Ident::with_empty_ctxt(sym::doc).with_span_pos(span)), tokens: MetaItemKind::NameValue(lit).tokens(span), is_sugared_doc: true, span, } } -pub fn list_contains_name(items: &[NestedMetaItem], name: &str) -> bool { +pub fn list_contains_name(items: &[NestedMetaItem], name: Symbol) -> bool { items.iter().any(|item| { item.check_name(name) }) } -pub fn contains_name(attrs: &[Attribute], name: &str) -> bool { +pub fn contains_name(attrs: &[Attribute], name: Symbol) -> bool { attrs.iter().any(|item| { item.check_name(name) }) } -pub fn find_by_name<'a>(attrs: &'a [Attribute], name: &str) -> Option<&'a Attribute> { +pub fn find_by_name<'a>(attrs: &'a [Attribute], name: Symbol) -> Option<&'a Attribute> { attrs.iter().find(|attr| attr.check_name(name)) } -pub fn filter_by_name<'a>(attrs: &'a [Attribute], name: &'a str) +pub fn filter_by_name<'a>(attrs: &'a [Attribute], name: Symbol) -> impl Iterator { attrs.iter().filter(move |attr| attr.check_name(name)) } -pub fn first_attr_value_str_by_name(attrs: &[Attribute], name: &str) -> Option { +pub fn first_attr_value_str_by_name(attrs: &[Attribute], name: Symbol) -> Option { attrs.iter() .find(|at| at.check_name(name)) .and_then(|at| at.value_str()) @@ -552,8 +554,7 @@ impl MetaItemKind { Some(TokenTree::Token(_, token::Eq)) => { tokens.next(); return if let Some(TokenTree::Token(span, token)) = tokens.next() { - LitKind::from_token(token) - .map(|lit| MetaItemKind::NameValue(Spanned { node: lit, span: span })) + Lit::from_token(&token, span, None).map(MetaItemKind::NameValue) } else { None }; @@ -598,9 +599,9 @@ impl NestedMetaItem { where I: Iterator, { if let Some(TokenTree::Token(span, token)) = tokens.peek().cloned() { - if let Some(node) = LitKind::from_token(token) { + if let Some(lit) = Lit::from_token(&token, span, None) { tokens.next(); - return Some(NestedMetaItem::Literal(respan(span, node))); + return Some(NestedMetaItem::Literal(lit)); } } @@ -608,81 +609,6 @@ impl NestedMetaItem { } } -impl Lit { - crate fn tokens(&self) -> TokenStream { - TokenTree::Token(self.span, self.node.token()).into() - } -} - -impl LitKind { - fn token(&self) -> Token { - use std::ascii; - - match *self { - LitKind::Str(string, ast::StrStyle::Cooked) => { - let escaped = string.as_str().escape_default().to_string(); - Token::Literal(token::Lit::Str_(Symbol::intern(&escaped)), None) - } - LitKind::Str(string, ast::StrStyle::Raw(n)) => { - Token::Literal(token::Lit::StrRaw(string, n), None) - } - LitKind::ByteStr(ref bytes) => { - let string = bytes.iter().cloned().flat_map(ascii::escape_default) - .map(Into::::into).collect::(); - Token::Literal(token::Lit::ByteStr(Symbol::intern(&string)), None) - } - LitKind::Byte(byte) => { - let string: String = ascii::escape_default(byte).map(Into::::into).collect(); - Token::Literal(token::Lit::Byte(Symbol::intern(&string)), None) - } - LitKind::Char(ch) => { - let string: String = ch.escape_default().map(Into::::into).collect(); - Token::Literal(token::Lit::Char(Symbol::intern(&string)), None) - } - LitKind::Int(n, ty) => { - let suffix = match ty { - ast::LitIntType::Unsigned(ty) => Some(Symbol::intern(ty.ty_to_string())), - ast::LitIntType::Signed(ty) => Some(Symbol::intern(ty.ty_to_string())), - ast::LitIntType::Unsuffixed => None, - }; - Token::Literal(token::Lit::Integer(Symbol::intern(&n.to_string())), suffix) - } - LitKind::Float(symbol, ty) => { - Token::Literal(token::Lit::Float(symbol), Some(Symbol::intern(ty.ty_to_string()))) - } - LitKind::FloatUnsuffixed(symbol) => Token::Literal(token::Lit::Float(symbol), None), - LitKind::Bool(value) => Token::Ident(Ident::with_empty_ctxt(Symbol::intern(if value { - "true" - } else { - "false" - })), false), - LitKind::Err(val) => Token::Literal(token::Lit::Err(val), None), - } - } - - fn from_token(token: Token) -> Option { - match token { - Token::Ident(ident, false) if ident.name == "true" => Some(LitKind::Bool(true)), - Token::Ident(ident, false) if ident.name == "false" => Some(LitKind::Bool(false)), - Token::Interpolated(nt) => match *nt { - token::NtExpr(ref v) | token::NtLiteral(ref v) => match v.node { - ExprKind::Lit(ref lit) => Some(lit.node.clone()), - _ => None, - }, - _ => None, - }, - Token::Literal(lit, suf) => { - let (suffix_illegal, result) = parse::lit_token(lit, suf, None); - if suffix_illegal && suf.is_some() { - return None; - } - result - } - _ => None, - } - } -} - pub trait HasAttrs: Sized { fn attrs(&self) -> &[ast::Attribute]; fn visit_attrs)>(&mut self, f: F); diff --git a/src/libsyntax/config.rs b/src/libsyntax/config.rs index 18173628a2..c82936afa3 100644 --- a/src/libsyntax/config.rs +++ b/src/libsyntax/config.rs @@ -12,6 +12,7 @@ use crate::edition::Edition; use crate::mut_visit::*; use crate::parse::{token, ParseSess}; use crate::ptr::P; +use crate::symbol::sym; use crate::util::map_in_place::MapInPlace; use errors::Applicability; @@ -90,7 +91,7 @@ impl<'a> StripUnconfigured<'a> { /// is in the original source file. Gives a compiler error if the syntax of /// the attribute is incorrect. fn process_cfg_attr(&mut self, attr: ast::Attribute) -> Vec { - if !attr.check_name("cfg_attr") { + if !attr.check_name(sym::cfg_attr) { return vec![attr]; } @@ -205,7 +206,7 @@ impl<'a> StripUnconfigured<'a> { pub fn maybe_emit_expr_attr_err(&self, attr: &ast::Attribute) { if !self.features.map(|features| features.stmt_expr_attributes).unwrap_or(true) { let mut err = feature_err(self.sess, - "stmt_expr_attributes", + sym::stmt_expr_attributes, attr.span, GateIssue::Language, EXPLAIN_STMT_ATTR_SYNTAX); @@ -285,9 +286,9 @@ impl<'a> StripUnconfigured<'a> { /// See issue #51279. pub fn disallow_cfg_on_generic_param(&mut self, param: &ast::GenericParam) { for attr in param.attrs() { - let offending_attr = if attr.check_name("cfg") { + let offending_attr = if attr.check_name(sym::cfg) { "cfg" - } else if attr.check_name("cfg_attr") { + } else if attr.check_name(sym::cfg_attr) { "cfg_attr" } else { continue; @@ -350,5 +351,5 @@ impl<'a> MutVisitor for StripUnconfigured<'a> { } fn is_cfg(attr: &ast::Attribute) -> bool { - attr.check_name("cfg") + attr.check_name(sym::cfg) } diff --git a/src/libsyntax/diagnostics/metadata.rs b/src/libsyntax/diagnostics/metadata.rs index 704135fe1d..53f37bb10b 100644 --- a/src/libsyntax/diagnostics/metadata.rs +++ b/src/libsyntax/diagnostics/metadata.rs @@ -36,9 +36,9 @@ pub struct ErrorLocation { impl ErrorLocation { /// Creates an error location from a span. pub fn from_span(ecx: &ExtCtxt<'_>, sp: Span) -> ErrorLocation { - let loc = ecx.source_map().lookup_char_pos_adj(sp.lo()); + let loc = ecx.source_map().lookup_char_pos(sp.lo()); ErrorLocation { - filename: loc.filename, + filename: loc.file.name.clone(), line: loc.line } } diff --git a/src/libsyntax/early_buffered_lints.rs b/src/libsyntax/early_buffered_lints.rs index 29cb9cd7f3..977e6d4587 100644 --- a/src/libsyntax/early_buffered_lints.rs +++ b/src/libsyntax/early_buffered_lints.rs @@ -12,8 +12,6 @@ pub enum BufferedEarlyLintId { /// Usage of `?` as a macro separator is deprecated. QuestionMarkMacroSep, IllFormedAttributeInput, - /// Usage of a duplicate macro matcher binding name. - DuplicateMacroMatcherBindingName, } /// Stores buffered lint info which can later be passed to `librustc`. diff --git a/src/libsyntax/entry.rs b/src/libsyntax/entry.rs index 09e26e29d8..0b6cf30bd2 100644 --- a/src/libsyntax/entry.rs +++ b/src/libsyntax/entry.rs @@ -1,5 +1,6 @@ use crate::attr; use crate::ast::{Item, ItemKind}; +use crate::symbol::sym; pub enum EntryPointType { None, @@ -14,11 +15,11 @@ pub enum EntryPointType { pub fn entry_point_type(item: &Item, depth: usize) -> EntryPointType { match item.node { ItemKind::Fn(..) => { - if attr::contains_name(&item.attrs, "start") { + if attr::contains_name(&item.attrs, sym::start) { EntryPointType::Start - } else if attr::contains_name(&item.attrs, "main") { + } else if attr::contains_name(&item.attrs, sym::main) { EntryPointType::MainAttr - } else if item.ident.name == "main" { + } else if item.ident.name == sym::main { if depth == 1 { // This is a top-level function so can be 'main' EntryPointType::MainNamed diff --git a/src/libsyntax/diagnostic_list.rs b/src/libsyntax/error_codes.rs similarity index 95% rename from src/libsyntax/diagnostic_list.rs rename to src/libsyntax/error_codes.rs index ac24475cab..e2d212eb72 100644 --- a/src/libsyntax/diagnostic_list.rs +++ b/src/libsyntax/error_codes.rs @@ -363,6 +363,35 @@ and likely to change in the future. "##, +E0704: r##" +This error indicates that a incorrect visibility restriction was specified. + +Example of erroneous code: + +```compile_fail,E0704 +mod foo { + pub(foo) struct Bar { + x: i32 + } +} +``` + +To make struct `Bar` only visible in module `foo` the `in` keyword should be +used: +``` +mod foo { + pub(in crate::foo) struct Bar { + x: i32 + } +} +# fn main() {} +``` + +For more information see the Rust Reference on [Visibility]. + +[Visibility]: https://doc.rust-lang.org/reference/visibility-and-privacy.html +"##, + E0705: r##" A `#![feature]` attribute was declared for a feature that is stable in the current edition, but not in all editions. @@ -417,6 +446,5 @@ register_diagnostics! { E0693, // incorrect `repr(align)` attribute format E0694, // an unknown tool name found in scoped attributes E0703, // invalid ABI - E0704, // incorrect visibility restriction E0717, // rustc_promotable without stability attribute } diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index 452cc2f2c6..0a88d2f882 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -10,7 +10,7 @@ use crate::mut_visit::{self, MutVisitor}; use crate::parse::{self, parser, DirectoryOwnership}; use crate::parse::token; use crate::ptr::P; -use crate::symbol::{keywords, Ident, Symbol}; +use crate::symbol::{keywords, Ident, Symbol, sym}; use crate::ThinVec; use crate::tokenstream::{self, TokenStream}; @@ -871,7 +871,7 @@ impl<'a> ExtCtxt<'a> { let mut last_macro = None; loop { if ctxt.outer().expn_info().map_or(None, |info| { - if info.format.name() == "include" { + if info.format.name() == sym::include { // Stop going up the backtrace once include! is encountered return None; } @@ -998,6 +998,7 @@ pub fn expr_to_spanned_string<'a>( Err(match expr.node { ast::ExprKind::Lit(ref l) => match l.node { ast::LitKind::Str(s, style) => return Ok(respan(expr.span, (s, style))), + ast::LitKind::Err(_) => None, _ => Some(cx.struct_span_err(l.span, err_msg)) }, ast::ExprKind::Err => None, diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index 614967bdeb..d24106f697 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -526,6 +526,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> { id: ast::DUMMY_NODE_ID, span: sp, attrs: ThinVec::new(), + source: ast::LocalSource::Normal, }); ast::Stmt { id: ast::DUMMY_NODE_ID, @@ -554,6 +555,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> { id: ast::DUMMY_NODE_ID, span: sp, attrs: ThinVec::new(), + source: ast::LocalSource::Normal, }); ast::Stmt { id: ast::DUMMY_NODE_ID, @@ -571,6 +573,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> { id: ast::DUMMY_NODE_ID, span, attrs: ThinVec::new(), + source: ast::LocalSource::Normal, }); ast::Stmt { id: ast::DUMMY_NODE_ID, @@ -694,8 +697,9 @@ impl<'a> AstBuilder for ExtCtxt<'a> { self.expr_struct(span, self.path_ident(span, id), fields) } - fn expr_lit(&self, sp: Span, lit: ast::LitKind) -> P { - self.expr(sp, ast::ExprKind::Lit(respan(sp, lit))) + fn expr_lit(&self, span: Span, lit_kind: ast::LitKind) -> P { + let lit = ast::Lit::from_lit_kind(lit_kind, span); + self.expr(span, ast::ExprKind::Lit(lit)) } fn expr_usize(&self, span: Span, i: usize) -> P { self.expr_lit(span, ast::LitKind::Int(i as u128, @@ -976,7 +980,8 @@ impl<'a> AstBuilder for ExtCtxt<'a> { ast::Arg { ty, pat: arg_pat, - id: ast::DUMMY_NODE_ID + id: ast::DUMMY_NODE_ID, + source: ast::ArgSource::Normal, } } @@ -1160,10 +1165,10 @@ impl<'a> AstBuilder for ExtCtxt<'a> { attr::mk_list_item(sp, Ident::with_empty_ctxt(name).with_span_pos(sp), mis) } - fn meta_name_value(&self, sp: Span, name: ast::Name, value: ast::LitKind) + fn meta_name_value(&self, span: Span, name: ast::Name, lit_kind: ast::LitKind) -> ast::MetaItem { - attr::mk_name_value_item(sp, Ident::with_empty_ctxt(name).with_span_pos(sp), - respan(sp, value)) + attr::mk_name_value_item(span, Ident::with_empty_ctxt(name).with_span_pos(span), + lit_kind, span) } fn item_use(&self, sp: Span, diff --git a/src/libsyntax/ext/derive.rs b/src/libsyntax/ext/derive.rs index 6df369133d..a24e09f127 100644 --- a/src/libsyntax/ext/derive.rs +++ b/src/libsyntax/ext/derive.rs @@ -4,7 +4,7 @@ use crate::source_map::{hygiene, ExpnInfo, ExpnFormat}; use crate::ext::base::ExtCtxt; use crate::ext::build::AstBuilder; use crate::parse::parser::PathStyle; -use crate::symbol::Symbol; +use crate::symbol::{Symbol, sym}; use syntax_pos::Span; @@ -13,7 +13,7 @@ use rustc_data_structures::fx::FxHashSet; pub fn collect_derives(cx: &mut ExtCtxt<'_>, attrs: &mut Vec) -> Vec { let mut result = Vec::new(); attrs.retain(|attr| { - if attr.path != "derive" { + if attr.path != sym::derive { return true; } if !attr.is_meta_item_list() { diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 82358679c0..019ebc8566 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -14,7 +14,7 @@ use crate::parse::token::{self, Token}; use crate::parse::parser::Parser; use crate::ptr::P; use crate::symbol::Symbol; -use crate::symbol::keywords; +use crate::symbol::{keywords, sym}; use crate::tokenstream::{TokenStream, TokenTree}; use crate::visit::{self, Visitor}; use crate::util::map_in_place::MapInPlace; @@ -356,7 +356,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> { self.collect_invocations(fragment, &[]) } else if let InvocationKind::Attr { attr: None, traits, item, .. } = invoc.kind { if !item.derive_allowed() { - let attr = attr::find_by_name(item.attrs(), "derive") + let attr = attr::find_by_name(item.attrs(), sym::derive) .expect("`derive` attribute should exist"); let span = attr.span; let mut err = self.cx.mut_span_err(span, @@ -376,7 +376,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> { } let mut item = self.fully_configure(item); - item.visit_attrs(|attrs| attrs.retain(|a| a.path != "derive")); + item.visit_attrs(|attrs| attrs.retain(|a| a.path != sym::derive)); let mut item_with_markers = item.clone(); add_derived_markers(&mut self.cx, item.span(), &traits, &mut item_with_markers); let derives = derives.entry(invoc.expansion_data.mark).or_default(); @@ -510,7 +510,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> { if invoc.fragment_kind == AstFragmentKind::ForeignItems && !self.cx.ecfg.macros_in_extern_enabled() { if let SyntaxExtension::NonMacroAttr { .. } = *ext {} else { - emit_feature_err(&self.cx.parse_sess, "macros_in_extern", + emit_feature_err(&self.cx.parse_sess, sym::macros_in_extern, invoc.span(), GateIssue::Language, "macro invocations in `extern {}` blocks are experimental"); } @@ -636,7 +636,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> { Annotatable::Item(ref item) => { match item.node { ItemKind::Mod(_) if self.cx.ecfg.proc_macro_hygiene() => return, - ItemKind::Mod(_) => ("modules", "proc_macro_hygiene"), + ItemKind::Mod(_) => ("modules", sym::proc_macro_hygiene), _ => return, } } @@ -645,8 +645,8 @@ impl<'a, 'b> MacroExpander<'a, 'b> { Annotatable::ForeignItem(_) => return, Annotatable::Stmt(_) | Annotatable::Expr(_) if self.cx.ecfg.proc_macro_hygiene() => return, - Annotatable::Stmt(_) => ("statements", "proc_macro_hygiene"), - Annotatable::Expr(_) => ("expressions", "proc_macro_hygiene"), + Annotatable::Stmt(_) => ("statements", sym::proc_macro_hygiene), + Annotatable::Expr(_) => ("expressions", sym::proc_macro_hygiene), }; emit_feature_err( self.cx.parse_sess, @@ -681,7 +681,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> { if let ast::ItemKind::MacroDef(_) = i.node { emit_feature_err( self.parse_sess, - "proc_macro_hygiene", + sym::proc_macro_hygiene, self.span, GateIssue::Language, "procedural macros cannot expand to macro definitions", @@ -724,13 +724,13 @@ impl<'a, 'b> MacroExpander<'a, 'b> { // don't stability-check macros in the same crate // (the only time this is null is for syntax extensions registered as macros) if def_site_span.map_or(false, |def_span| !crate_span.contains(def_span)) - && !span.allows_unstable(&feature.as_str()) + && !span.allows_unstable(feature) && this.cx.ecfg.features.map_or(true, |feats| { // macro features will count as lib features !feats.declared_lib_features.iter().any(|&(feat, _)| feat == feature) }) { let explain = format!("macro {}! is unstable", path); - emit_feature_err(this.cx.parse_sess, &*feature.as_str(), span, + emit_feature_err(this.cx.parse_sess, feature, span, GateIssue::Library(Some(issue)), &explain); this.cx.trace_macros_diag(); } @@ -885,7 +885,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> { } emit_feature_err( self.cx.parse_sess, - "proc_macro_hygiene", + sym::proc_macro_hygiene, span, GateIssue::Language, &format!("procedural macros cannot be expanded to {}", kind), @@ -1109,7 +1109,7 @@ impl<'a, 'b> InvocationCollector<'a, 'b> { -> Option { let attr = attrs.iter() .position(|a| { - if a.path == "derive" { + if a.path == sym::derive { *after_derive = true; } !attr::is_known(a) && !is_builtin_attr(a) @@ -1117,8 +1117,8 @@ impl<'a, 'b> InvocationCollector<'a, 'b> { .map(|i| attrs.remove(i)); if let Some(attr) = &attr { if !self.cx.ecfg.enable_custom_inner_attributes() && - attr.style == ast::AttrStyle::Inner && attr.path != "test" { - emit_feature_err(&self.cx.parse_sess, "custom_inner_attributes", + attr.style == ast::AttrStyle::Inner && attr.path != sym::test { + emit_feature_err(&self.cx.parse_sess, sym::custom_inner_attributes, attr.span, GateIssue::Language, "non-builtin inner attributes are unstable"); } @@ -1167,7 +1167,7 @@ impl<'a, 'b> InvocationCollector<'a, 'b> { self.check_attribute_inner(attr, features); // macros are expanded before any lint passes so this warning has to be hardcoded - if attr.path == "derive" { + if attr.path == sym::derive { self.cx.struct_span_warn(attr.span, "`#[derive]` does nothing on macro invocations") .note("this may become a hard error in a future release") .emit(); @@ -1352,7 +1352,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> { let inline_module = item.span.contains(inner) || inner.is_dummy(); if inline_module { - if let Some(path) = attr::first_attr_value_str_by_name(&item.attrs, "path") { + if let Some(path) = attr::first_attr_value_str_by_name(&item.attrs, sym::path) { self.cx.current_expansion.directory_ownership = DirectoryOwnership::Owned { relative: None }; module.directory.push(&*path.as_str()); @@ -1485,19 +1485,19 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> { fn visit_attribute(&mut self, at: &mut ast::Attribute) { // turn `#[doc(include="filename")]` attributes into `#[doc(include(file="filename", // contents="file contents")]` attributes - if !at.check_name("doc") { + if !at.check_name(sym::doc) { return noop_visit_attribute(at, self); } if let Some(list) = at.meta_item_list() { - if !list.iter().any(|it| it.check_name("include")) { + if !list.iter().any(|it| it.check_name(sym::include)) { return noop_visit_attribute(at, self); } let mut items = vec![]; for mut it in list { - if !it.check_name("include") { + if !it.check_name(sym::include) { items.push({ noop_visit_meta_list_item(&mut it, self); it }); continue; } @@ -1522,19 +1522,19 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> { let include_info = vec![ ast::NestedMetaItem::MetaItem( attr::mk_name_value_item_str( - Ident::from_str("file"), + Ident::with_empty_ctxt(sym::file), dummy_spanned(file), ), ), ast::NestedMetaItem::MetaItem( attr::mk_name_value_item_str( - Ident::from_str("contents"), + Ident::with_empty_ctxt(sym::contents), dummy_spanned(src_interned), ), ), ]; - let include_ident = Ident::from_str("include"); + let include_ident = Ident::with_empty_ctxt(sym::include); let item = attr::mk_list_item(DUMMY_SP, include_ident, include_info); items.push(ast::NestedMetaItem::MetaItem(item)); } @@ -1600,7 +1600,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> { } } - let meta = attr::mk_list_item(DUMMY_SP, Ident::from_str("doc"), items); + let meta = attr::mk_list_item(DUMMY_SP, Ident::with_empty_ctxt(sym::doc), items); match at.style { ast::AttrStyle::Inner => *at = attr::mk_spanned_attr_inner(at.span, at.id, meta), ast::AttrStyle::Outer => *at = attr::mk_spanned_attr_outer(at.span, at.id, meta), diff --git a/src/libsyntax/ext/placeholders.rs b/src/libsyntax/ext/placeholders.rs index 3e60dd81a3..f5e18e9843 100644 --- a/src/libsyntax/ext/placeholders.rs +++ b/src/libsyntax/ext/placeholders.rs @@ -102,6 +102,13 @@ impl<'a, 'b> PlaceholderExpander<'a, 'b> { fn remove(&mut self, id: ast::NodeId) -> AstFragment { self.expanded_fragments.remove(&id).unwrap() } + + fn next_id(&mut self, id: &mut ast::NodeId) { + if self.monotonic { + assert_eq!(*id, ast::DUMMY_NODE_ID); + *id = self.cx.resolver.next_node_id() + } + } } impl<'a, 'b> MutVisitor for PlaceholderExpander<'a, 'b> { @@ -183,9 +190,19 @@ impl<'a, 'b> MutVisitor for PlaceholderExpander<'a, 'b> { noop_visit_block(block, self); for stmt in block.stmts.iter_mut() { - if self.monotonic { - assert_eq!(stmt.id, ast::DUMMY_NODE_ID); - stmt.id = self.cx.resolver.next_node_id(); + self.next_id(&mut stmt.id); + } + } + + fn visit_asyncness(&mut self, a: &mut ast::IsAsync) { + noop_visit_asyncness(a, self); + + if let ast::IsAsync::Async { ref mut arguments, .. } = a { + for argument in arguments.iter_mut() { + self.next_id(&mut argument.move_stmt.id); + if let Some(ref mut pat_stmt) = &mut argument.pat_stmt { + self.next_id(&mut pat_stmt.id); + } } } } diff --git a/src/libsyntax/ext/source_util.rs b/src/libsyntax/ext/source_util.rs index 549de1628e..e1cb90d9e7 100644 --- a/src/libsyntax/ext/source_util.rs +++ b/src/libsyntax/ext/source_util.rs @@ -4,7 +4,7 @@ use crate::ext::build::AstBuilder; use crate::parse::{self, token, DirectoryOwnership}; use crate::print::pprust; use crate::ptr::P; -use crate::symbol::Symbol; +use crate::symbol::{Symbol, sym}; use crate::tokenstream; use smallvec::SmallVec; @@ -44,7 +44,7 @@ pub fn expand_column(cx: &mut ExtCtxt<'_>, sp: Span, tts: &[tokenstream::TokenTr /* __rust_unstable_column!(): expands to the current column number */ pub fn expand_column_gated(cx: &mut ExtCtxt<'_>, sp: Span, tts: &[tokenstream::TokenTree]) -> Box { - if sp.allows_unstable("__rust_unstable_column") { + if sp.allows_unstable(sym::__rust_unstable_column) { expand_column(cx, sp, tts) } else { cx.span_fatal(sp, "the __rust_unstable_column macro is unstable"); diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index ab5823eaca..084a69f4cd 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -554,7 +554,10 @@ fn inner_parse_loop<'root, 'tt>( match item.top_elts.get_tt(idx) { // Need to descend into a sequence TokenTree::Sequence(sp, seq) => { - // Examine the case where there are 0 matches of this sequence + // Examine the case where there are 0 matches of this sequence. We are + // implicitly disallowing OneOrMore from having 0 matches here. Thus, that will + // result in a "no rules expected token" error by virtue of this matcher not + // working. if seq.op == quoted::KleeneOp::ZeroOrMore || seq.op == quoted::KleeneOp::ZeroOrOne { diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index 12912044e4..06651750de 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -13,7 +13,7 @@ use crate::parse::{Directory, ParseSess}; use crate::parse::parser::Parser; use crate::parse::token::{self, NtTT}; use crate::parse::token::Token::*; -use crate::symbol::Symbol; +use crate::symbol::{Symbol, keywords, sym}; use crate::tokenstream::{DelimSpan, TokenStream, TokenTree}; use errors::FatalError; @@ -151,7 +151,7 @@ fn generic_extension<'cx>(cx: &'cx mut ExtCtxt<'_>, let rhs_spans = rhs.iter().map(|t| t.span()).collect::>(); // rhs has holes ( `$id` and `$(...)` that need filled) - let mut tts = transcribe(cx, Some(named_matches), rhs); + let mut tts = transcribe(cx, &named_matches, rhs); // Replace all the tokens for the corresponding positions in the macro, to maintain // proper positions in error reporting, while maintaining the macro_backtrace. @@ -376,7 +376,7 @@ pub fn compile( }); if body.legacy { - let allow_internal_unstable = attr::find_by_name(&def.attrs, "allow_internal_unstable") + let allow_internal_unstable = attr::find_by_name(&def.attrs, sym::allow_internal_unstable) .map(|attr| attr .meta_item_list() .map(|list| list.iter() @@ -399,11 +399,11 @@ pub fn compile( vec![Symbol::intern("allow_internal_unstable_backcompat_hack")].into() }) ); - let allow_internal_unsafe = attr::contains_name(&def.attrs, "allow_internal_unsafe"); + let allow_internal_unsafe = attr::contains_name(&def.attrs, sym::allow_internal_unsafe); let mut local_inner_macros = false; - if let Some(macro_export) = attr::find_by_name(&def.attrs, "macro_export") { + if let Some(macro_export) = attr::find_by_name(&def.attrs, sym::macro_export) { if let Some(l) = macro_export.meta_item_list() { - local_inner_macros = attr::list_contains_name(&l, "local_inner_macros"); + local_inner_macros = attr::list_contains_name(&l, sym::local_inner_macros); } } @@ -426,7 +426,7 @@ pub fn compile( edition, } } else { - let is_transparent = attr::contains_name(&def.attrs, "rustc_transparent_macro"); + let is_transparent = attr::contains_name(&def.attrs, sym::rustc_transparent_macro); SyntaxExtension::DeclMacro { expander, @@ -467,7 +467,7 @@ fn check_lhs_no_empty_seq(sess: &ParseSess, tts: &[quoted::TokenTree]) -> bool { TokenTree::Sequence(span, ref seq) => { if seq.separator.is_none() && seq.tts.iter().all(|seq_tt| { match *seq_tt { - TokenTree::MetaVarDecl(_, _, id) => id.name == "vis", + TokenTree::MetaVarDecl(_, _, id) => id.name == sym::vis, TokenTree::Sequence(_, ref sub_seq) => sub_seq.op == quoted::KleeneOp::ZeroOrMore || sub_seq.op == quoted::KleeneOp::ZeroOrOne, @@ -497,22 +497,14 @@ fn check_lhs_duplicate_matcher_bindings( node_id: ast::NodeId, ) -> bool { use self::quoted::TokenTree; - use crate::early_buffered_lints::BufferedEarlyLintId; for tt in tts { match *tt { TokenTree::MetaVarDecl(span, name, _kind) => { if let Some(&prev_span) = metavar_names.get(&name) { - // FIXME(mark-i-m): in a few cycles, make this a hard error. - // sess.span_diagnostic - // .struct_span_err(span, "duplicate matcher binding") - // .span_note(prev_span, "previous declaration was here") - // .emit(); - sess.buffer_lint( - BufferedEarlyLintId::DuplicateMacroMatcherBindingName, - crate::source_map::MultiSpan::from(vec![prev_span, span]), - node_id, - "duplicate matcher binding" - ); + sess.span_diagnostic + .struct_span_err(span, "duplicate matcher binding") + .span_note(prev_span, "previous declaration was here") + .emit(); return false; } else { metavar_names.insert(name, span); @@ -1054,7 +1046,8 @@ fn is_in_follow(tok: "ed::TokenTree, frag: &str) -> IsInFollow { match *tok { TokenTree::Token(_, ref tok) => match *tok { FatArrow | Comma | Eq | BinOp(token::Or) => IsInFollow::Yes, - Ident(i, false) if i.name == "if" || i.name == "in" => IsInFollow::Yes, + Ident(i, false) if i.name == keywords::If.name() || + i.name == keywords::In.name() => IsInFollow::Yes, _ => IsInFollow::No(tokens), }, _ => IsInFollow::No(tokens), @@ -1071,10 +1064,12 @@ fn is_in_follow(tok: "ed::TokenTree, frag: &str) -> IsInFollow { OpenDelim(token::DelimToken::Bracket) | Comma | FatArrow | Colon | Eq | Gt | BinOp(token::Shr) | Semi | BinOp(token::Or) => IsInFollow::Yes, - Ident(i, false) if i.name == "as" || i.name == "where" => IsInFollow::Yes, + Ident(i, false) if i.name == keywords::As.name() || + i.name == keywords::Where.name() => IsInFollow::Yes, _ => IsInFollow::No(tokens), }, - TokenTree::MetaVarDecl(_, _, frag) if frag.name == "block" => IsInFollow::Yes, + TokenTree::MetaVarDecl(_, _, frag) if frag.name == sym::block => + IsInFollow::Yes, _ => IsInFollow::No(tokens), } }, @@ -1097,16 +1092,18 @@ fn is_in_follow(tok: "ed::TokenTree, frag: &str) -> IsInFollow { match *tok { TokenTree::Token(_, ref tok) => match *tok { Comma => IsInFollow::Yes, - Ident(i, is_raw) if is_raw || i.name != "priv" => IsInFollow::Yes, + Ident(i, is_raw) if is_raw || i.name != keywords::Priv.name() => + IsInFollow::Yes, ref tok => if tok.can_begin_type() { IsInFollow::Yes } else { IsInFollow::No(tokens) } }, - TokenTree::MetaVarDecl(_, _, frag) if frag.name == "ident" - || frag.name == "ty" - || frag.name == "path" => IsInFollow::Yes, + TokenTree::MetaVarDecl(_, _, frag) if frag.name == sym::ident + || frag.name == sym::ty + || frag.name == sym::path => + IsInFollow::Yes, _ => IsInFollow::No(tokens), } }, diff --git a/src/libsyntax/ext/tt/quoted.rs b/src/libsyntax/ext/tt/quoted.rs index b24edb57e5..ed8395f11a 100644 --- a/src/libsyntax/ext/tt/quoted.rs +++ b/src/libsyntax/ext/tt/quoted.rs @@ -73,6 +73,7 @@ pub enum KleeneOp { ZeroOrMore, /// Kleene plus (`+`) for one or more repetitions OneOrMore, + /// Kleene optional (`?`) for zero or one reptitions ZeroOrOne, } diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs index bd2adb5ac1..e6b49e6193 100644 --- a/src/libsyntax/ext/tt/transcribe.rs +++ b/src/libsyntax/ext/tt/transcribe.rs @@ -1,10 +1,10 @@ use crate::ast::Ident; use crate::ext::base::ExtCtxt; use crate::ext::expand::Marker; -use crate::ext::tt::macro_parser::{NamedMatch, MatchedSeq, MatchedNonterminal}; +use crate::ext::tt::macro_parser::{MatchedNonterminal, MatchedSeq, NamedMatch}; use crate::ext::tt::quoted; use crate::mut_visit::noop_visit_tt; -use crate::parse::token::{self, Token, NtTT}; +use crate::parse::token::{self, NtTT, Token}; use crate::tokenstream::{DelimSpan, TokenStream, TokenTree, TreeAndJoint}; use smallvec::{smallvec, SmallVec}; @@ -13,24 +13,16 @@ use syntax_pos::DUMMY_SP; use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::sync::Lrc; use std::mem; -use std::ops::Add; use std::rc::Rc; -// An iterator over the token trees in a delimited token tree (`{ ... }`) or a sequence (`$(...)`). +/// An iterator over the token trees in a delimited token tree (`{ ... }`) or a sequence (`$(...)`). enum Frame { - Delimited { - forest: Lrc, - idx: usize, - span: DelimSpan, - }, - Sequence { - forest: Lrc, - idx: usize, - sep: Option, - }, + Delimited { forest: Lrc, idx: usize, span: DelimSpan }, + Sequence { forest: Lrc, idx: usize, sep: Option }, } impl Frame { + /// Construct a new frame around the delimited set of tokens. fn new(tts: Vec) -> Frame { let forest = Lrc::new(quoted::Delimited { delim: token::NoDelim, tts: tts }); Frame::Delimited { forest: forest, idx: 0, span: DelimSpan::dummy() } @@ -54,84 +46,162 @@ impl Iterator for Frame { } } -/// This can do Macro-By-Example transcription. On the other hand, if -/// `src` contains no `TokenTree::{Sequence, MetaVar, MetaVarDecl}`s, `interp` can -/// (and should) be None. -pub fn transcribe(cx: &ExtCtxt<'_>, - interp: Option>>, - src: Vec) - -> TokenStream { +/// This can do Macro-By-Example transcription. +/// - `interp` is a map of meta-variables to the tokens (non-terminals) they matched in the +/// invocation. We are assuming we already know there is a match. +/// - `src` is the RHS of the MBE, that is, the "example" we are filling in. +/// +/// For example, +/// +/// ```rust +/// macro_rules! foo { +/// ($id:ident) => { println!("{}", stringify!($id)); } +/// } +/// +/// foo!(bar); +/// ``` +/// +/// `interp` would contain `$id => bar` and `src` would contain `println!("{}", stringify!($id));`. +/// +/// `transcribe` would return a `TokenStream` containing `println!("{}", stringify!(bar));`. +/// +/// Along the way, we do some additional error checking. +pub fn transcribe( + cx: &ExtCtxt<'_>, + interp: &FxHashMap>, + src: Vec, +) -> TokenStream { + // Nothing for us to transcribe... + if src.is_empty() { + return TokenStream::empty(); + } + + // We descend into the RHS (`src`), expanding things as we go. This stack contains the things + // we have yet to expand/are still expanding. We start the stack off with the whole RHS. let mut stack: SmallVec<[Frame; 1]> = smallvec![Frame::new(src)]; - let interpolations = interp.unwrap_or_else(FxHashMap::default); /* just a convenience */ + + // As we descend in the RHS, we will need to be able to match nested sequences of matchers. + // `repeats` keeps track of where we are in matching at each level, with the last element being + // the most deeply nested sequence. This is used as a stack. let mut repeats = Vec::new(); + + // `result` contains resulting token stream from the TokenTree we just finished processing. At + // the end, this will contain the full result of transcription, but at arbitrary points during + // `transcribe`, `result` will contain subsets of the final result. + // + // Specifically, as we descend into each TokenTree, we will push the existing results onto the + // `result_stack` and clear `results`. We will then produce the results of transcribing the + // TokenTree into `results`. Then, as we unwind back out of the `TokenTree`, we will pop the + // `result_stack` and append `results` too it to produce the new `results` up to that point. + // + // Thus, if we try to pop the `result_stack` and it is empty, we have reached the top-level + // again, and we are done transcribing. let mut result: Vec = Vec::new(); let mut result_stack = Vec::new(); loop { + // Look at the last frame on the stack. let tree = if let Some(tree) = stack.last_mut().unwrap().next() { + // If it still has a TokenTree we have not looked at yet, use that tree. tree - } else { + } + // The else-case never produces a value for `tree` (it `continue`s or `return`s). + else { + // Otherwise, if we have just reached the end of a sequence and we can keep repeating, + // go back to the beginning of the sequence. if let Frame::Sequence { ref mut idx, ref sep, .. } = *stack.last_mut().unwrap() { let (ref mut repeat_idx, repeat_len) = *repeats.last_mut().unwrap(); *repeat_idx += 1; if *repeat_idx < repeat_len { *idx = 0; if let Some(sep) = sep.clone() { - // repeat same span, I guess let prev_span = match result.last() { Some((tt, _)) => tt.span(), None => DUMMY_SP, }; result.push(TokenTree::Token(prev_span, sep).into()); } - continue + continue; } } + // We are done with the top of the stack. Pop it. Depending on what it was, we do + // different things. Note that the outermost item must be the delimited, wrapped RHS + // that was passed in originally to `transcribe`. match stack.pop().unwrap() { + // Done with a sequence. Pop from repeats. Frame::Sequence { .. } => { repeats.pop(); } + + // We are done processing a Delimited. If this is the top-level delimited, we are + // done. Otherwise, we unwind the result_stack to append what we have produced to + // any previous results. Frame::Delimited { forest, span, .. } => { if result_stack.is_empty() { + // No results left to compute! We are back at the top-level. return TokenStream::new(result); } - let tree = TokenTree::Delimited( - span, - forest.delim, - TokenStream::new(result).into(), - ); + + // Step back into the parent Delimited. + let tree = + TokenTree::Delimited(span, forest.delim, TokenStream::new(result).into()); result = result_stack.pop().unwrap(); result.push(tree.into()); } } - continue + continue; }; + // At this point, we know we are in the middle of a TokenTree (the last one on `stack`). + // `tree` contains the next `TokenTree` to be processed. match tree { - quoted::TokenTree::Sequence(sp, seq) => { - // FIXME(pcwalton): Bad copy. - match lockstep_iter_size("ed::TokenTree::Sequence(sp, seq.clone()), - &interpolations, - &repeats) { + // We are descending into a sequence. We first make sure that the matchers in the RHS + // and the matches in `interp` have the same shape. Otherwise, either the caller or the + // macro writer has made a mistake. + seq @ quoted::TokenTree::Sequence(..) => { + match lockstep_iter_size(&seq, interp, &repeats) { LockstepIterSize::Unconstrained => { - cx.span_fatal(sp.entire(), /* blame macro writer */ - "attempted to repeat an expression \ - containing no syntax \ - variables matched as repeating at this depth"); + cx.span_fatal( + seq.span(), /* blame macro writer */ + "attempted to repeat an expression containing no syntax variables \ + matched as repeating at this depth", + ); } + LockstepIterSize::Contradiction(ref msg) => { - // FIXME #2887 blame macro invoker instead - cx.span_fatal(sp.entire(), &msg[..]); + // FIXME: this really ought to be caught at macro definition time... It + // happens when two meta-variables are used in the same repetition in a + // sequence, but they come from different sequence matchers and repeat + // different amounts. + cx.span_fatal(seq.span(), &msg[..]); } + LockstepIterSize::Constraint(len, _) => { + // We do this to avoid an extra clone above. We know that this is a + // sequence already. + let (sp, seq) = if let quoted::TokenTree::Sequence(sp, seq) = seq { + (sp, seq) + } else { + unreachable!() + }; + + // Is the repetition empty? if len == 0 { if seq.op == quoted::KleeneOp::OneOrMore { - // FIXME #2887 blame invoker + // FIXME: this really ought to be caught at macro definition + // time... It happens when the Kleene operator in the matcher and + // the body for the same meta-variable do not match. cx.span_fatal(sp.entire(), "this must repeat at least once"); } } else { + // 0 is the initial counter (we have done 0 repretitions so far). `len` + // is the total number of reptitions we should generate. repeats.push((0, len)); + + // The first time we encounter the sequence we push it to the stack. It + // then gets reused (see the beginning of the loop) until we are done + // repeating. stack.push(Frame::Sequence { idx: 0, sep: seq.separator.clone(), @@ -141,10 +211,16 @@ pub fn transcribe(cx: &ExtCtxt<'_>, } } } - // FIXME #2887: think about span stuff here + + // Replace the meta-var with the matched token tree from the invocation. quoted::TokenTree::MetaVar(mut sp, ident) => { - if let Some(cur_matched) = lookup_cur_matched(ident, &interpolations, &repeats) { + // Find the matched nonterminal from the macro invocation, and use it to replace + // the meta-var. + if let Some(cur_matched) = lookup_cur_matched(ident, interp, &repeats) { if let MatchedNonterminal(ref nt) = *cur_matched { + // FIXME #2887: why do we apply a mark when matching a token tree meta-var + // (e.g. `$x:tt`), but not when we are matching any other type of token + // tree? if let NtTT(ref tt) = **nt { result.push(tt.clone().into()); } else { @@ -153,10 +229,15 @@ pub fn transcribe(cx: &ExtCtxt<'_>, result.push(token.into()); } } else { - cx.span_fatal(sp, /* blame the macro writer */ - &format!("variable '{}' is still repeating at this depth", ident)); + // We were unable to descend far enough. This is an error. + cx.span_fatal( + sp, /* blame the macro writer */ + &format!("variable '{}' is still repeating at this depth", ident), + ); } } else { + // If we aren't able to match the meta-var, we push it back into the result but + // with modified syntax context. (I believe this supports nested macros). let ident = Ident::new(ident.name, ident.span.apply_mark(cx.current_expansion.mark)); sp = sp.apply_mark(cx.current_expansion.mark); @@ -164,26 +245,44 @@ pub fn transcribe(cx: &ExtCtxt<'_>, result.push(TokenTree::Token(sp, token::Token::from_ast_ident(ident)).into()); } } + + // If we are entering a new delimiter, we push its contents to the `stack` to be + // processed, and we push all of the currently produced results to the `result_stack`. + // We will produce all of the results of the inside of the `Delimited` and then we will + // jump back out of the Delimited, pop the result_stack and add the new results back to + // the previous results (from outside the Delimited). quoted::TokenTree::Delimited(mut span, delimited) => { span = span.apply_mark(cx.current_expansion.mark); stack.push(Frame::Delimited { forest: delimited, idx: 0, span: span }); result_stack.push(mem::replace(&mut result, Vec::new())); } + + // Nothing much to do here. Just push the token to the result, being careful to + // preserve syntax context. quoted::TokenTree::Token(sp, tok) => { let mut marker = Marker(cx.current_expansion.mark); let mut tt = TokenTree::Token(sp, tok); noop_visit_tt(&mut tt, &mut marker); result.push(tt.into()); } + + // There should be no meta-var declarations in the invocation of a macro. quoted::TokenTree::MetaVarDecl(..) => panic!("unexpected `TokenTree::MetaVarDecl"), } } } -fn lookup_cur_matched(ident: Ident, - interpolations: &FxHashMap>, - repeats: &[(usize, usize)]) - -> Option> { +/// Lookup the meta-var named `ident` and return the matched token tree from the invocation using +/// the set of matches `interpolations`. +/// +/// See the definition of `repeats` in the `transcribe` function. `repeats` is used to descend +/// into the right place in nested matchers. If we attempt to descend too far, the macro writer has +/// made a mistake, and we return `None`. +fn lookup_cur_matched( + ident: Ident, + interpolations: &FxHashMap>, + repeats: &[(usize, usize)], +) -> Option> { interpolations.get(&ident).map(|matched| { let mut matched = matched.clone(); for &(idx, _) in repeats { @@ -198,17 +297,30 @@ fn lookup_cur_matched(ident: Ident, }) } +/// An accumulator over a TokenTree to be used with `fold`. During transcription, we need to make +/// sure that the size of each sequence and all of its nested sequences are the same as the sizes +/// of all the matched (nested) sequences in the macro invocation. If they don't match, somebody +/// has made a mistake (either the macro writer or caller). #[derive(Clone)] enum LockstepIterSize { + /// No constraints on length of matcher. This is true for any TokenTree variants except a + /// `MetaVar` with an actual `MatchedSeq` (as opposed to a `MatchedNonterminal`). Unconstrained, + + /// A `MetaVar` with an actual `MatchedSeq`. The length of the match and the name of the + /// meta-var are returned. Constraint(usize, Ident), + + /// Two `Constraint`s on the same sequence had different lengths. This is an error. Contradiction(String), } -impl Add for LockstepIterSize { - type Output = LockstepIterSize; - - fn add(self, other: LockstepIterSize) -> LockstepIterSize { +impl LockstepIterSize { + /// Find incompatibilities in matcher/invocation sizes. + /// - `Unconstrained` is compatible with everything. + /// - `Contradiction` is incompatible with everything. + /// - `Constraint(len)` is only compatible with other constraints of the same length. + fn with(self, other: LockstepIterSize) -> LockstepIterSize { match self { LockstepIterSize::Unconstrained => other, LockstepIterSize::Contradiction(_) => self, @@ -217,9 +329,10 @@ impl Add for LockstepIterSize { LockstepIterSize::Contradiction(_) => other, LockstepIterSize::Constraint(r_len, _) if l_len == r_len => self, LockstepIterSize::Constraint(r_len, r_id) => { - let msg = format!("inconsistent lockstep iteration: \ - '{}' has {} items, but '{}' has {}", - l_id, l_len, r_id, r_len); + let msg = format!( + "meta-variable `{}` repeats {} times, but `{}` repeats {} times", + l_id, l_len, r_id, r_len + ); LockstepIterSize::Contradiction(msg) } }, @@ -227,30 +340,38 @@ impl Add for LockstepIterSize { } } -fn lockstep_iter_size(tree: "ed::TokenTree, - interpolations: &FxHashMap>, - repeats: &[(usize, usize)]) - -> LockstepIterSize { +/// Given a `tree`, make sure that all sequences have the same length as the matches for the +/// appropriate meta-vars in `interpolations`. +/// +/// Note that if `repeats` does not match the exact correct depth of a meta-var, +/// `lookup_cur_matched` will return `None`, which is why this still works even in the presnece of +/// multiple nested matcher sequences. +fn lockstep_iter_size( + tree: "ed::TokenTree, + interpolations: &FxHashMap>, + repeats: &[(usize, usize)], +) -> LockstepIterSize { use quoted::TokenTree; match *tree { TokenTree::Delimited(_, ref delimed) => { delimed.tts.iter().fold(LockstepIterSize::Unconstrained, |size, tt| { - size + lockstep_iter_size(tt, interpolations, repeats) + size.with(lockstep_iter_size(tt, interpolations, repeats)) }) - }, + } TokenTree::Sequence(_, ref seq) => { seq.tts.iter().fold(LockstepIterSize::Unconstrained, |size, tt| { - size + lockstep_iter_size(tt, interpolations, repeats) + size.with(lockstep_iter_size(tt, interpolations, repeats)) }) - }, - TokenTree::MetaVar(_, name) | TokenTree::MetaVarDecl(_, name, _) => + } + TokenTree::MetaVar(_, name) | TokenTree::MetaVarDecl(_, name, _) => { match lookup_cur_matched(name, interpolations, repeats) { Some(matched) => match *matched { MatchedNonterminal(_) => LockstepIterSize::Unconstrained, MatchedSeq(ref ads, _) => LockstepIterSize::Constraint(ads.len(), name), }, - _ => LockstepIterSize::Unconstrained - }, + _ => LockstepIterSize::Unconstrained, + } + } TokenTree::Token(..) => LockstepIterSize::Unconstrained, } } diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index dcb55fb572..5b1a9bb739 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -22,7 +22,7 @@ use crate::source_map::Spanned; use crate::edition::{ALL_EDITIONS, Edition}; use crate::visit::{self, FnKind, Visitor}; use crate::parse::{token, ParseSess}; -use crate::symbol::Symbol; +use crate::symbol::{Symbol, keywords, sym}; use crate::tokenstream::TokenTree; use errors::{DiagnosticBuilder, Handler}; @@ -30,6 +30,7 @@ use rustc_data_structures::fx::FxHashMap; use rustc_target::spec::abi::Abi; use syntax_pos::{Span, DUMMY_SP}; use log::debug; +use lazy_static::lazy_static; use std::env; @@ -47,8 +48,8 @@ macro_rules! declare_features { /// Represents active features that are currently being implemented or /// currently being considered for addition/removal. const ACTIVE_FEATURES: - &[(&str, &str, Option, Option, fn(&mut Features, Span))] = - &[$((stringify!($feature), $ver, $issue, $edition, set!($feature))),+]; + &[(Symbol, &str, Option, Option, fn(&mut Features, Span))] = + &[$((sym::$feature, $ver, $issue, $edition, set!($feature))),+]; /// A set of features to be used by later passes. #[derive(Clone)] @@ -79,22 +80,22 @@ macro_rules! declare_features { ($((removed, $feature: ident, $ver: expr, $issue: expr, None, $reason: expr),)+) => { /// Represents unstable features which have since been removed (it was once Active) - const REMOVED_FEATURES: &[(&str, &str, Option, Option<&str>)] = &[ - $((stringify!($feature), $ver, $issue, $reason)),+ + const REMOVED_FEATURES: &[(Symbol, &str, Option, Option<&str>)] = &[ + $((sym::$feature, $ver, $issue, $reason)),+ ]; }; ($((stable_removed, $feature: ident, $ver: expr, $issue: expr, None),)+) => { /// Represents stable features which have since been removed (it was once Accepted) - const STABLE_REMOVED_FEATURES: &[(&str, &str, Option, Option<&str>)] = &[ - $((stringify!($feature), $ver, $issue, None)),+ + const STABLE_REMOVED_FEATURES: &[(Symbol, &str, Option, Option<&str>)] = &[ + $((sym::$feature, $ver, $issue, None)),+ ]; }; ($((accepted, $feature: ident, $ver: expr, $issue: expr, None),)+) => { /// Those language feature has since been Accepted (it was once Active) - const ACCEPTED_FEATURES: &[(&str, &str, Option, Option<&str>)] = &[ - $((stringify!($feature), $ver, $issue, None)),+ + const ACCEPTED_FEATURES: &[(Symbol, &str, Option, Option<&str>)] = &[ + $((sym::$feature, $ver, $issue, None)),+ ]; } } @@ -107,124 +108,231 @@ macro_rules! declare_features { // was set. This is most important for knowing when a particular feature became // stable (active). // +// Note that the features are grouped into internal/user-facing and then +// sorted by version inside those groups. This is inforced with tidy. +// // N.B., `tools/tidy/src/features.rs` parses this information directly out of the // source, so take care when modifying it. declare_features! ( - (active, asm, "1.0.0", Some(29722), None), - (active, concat_idents, "1.0.0", Some(29599), None), - (active, link_args, "1.0.0", Some(29596), None), - (active, log_syntax, "1.0.0", Some(29598), None), - (active, non_ascii_idents, "1.0.0", Some(55467), None), - (active, plugin_registrar, "1.0.0", Some(29597), None), - (active, thread_local, "1.0.0", Some(29594), None), - (active, trace_macros, "1.0.0", Some(29598), None), + // ------------------------------------------------------------------------- + // feature-group-start: internal feature gates + // ------------------------------------------------------------------------- + + // no-tracking-issue-start - // rustc internal, for now + // Allows using the `rust-intrinsic`'s "ABI". (active, intrinsics, "1.0.0", None, None), + + // Allows using `#[lang = ".."]` attribute for linking items to special compiler logic. (active, lang_items, "1.0.0", None, None), - (active, format_args_nl, "1.29.0", None, None), - (active, link_llvm_intrinsics, "1.0.0", Some(29602), None), - (active, linkage, "1.0.0", Some(29603), None), + // Allows using the `#[stable]` and `#[unstable]` attributes. + (active, staged_api, "1.0.0", None, None), + + // Allows using `#[allow_internal_unstable]`. This is an + // attribute on `macro_rules!` and can't use the attribute handling + // below (it has to be checked before expansion possibly makes + // macros disappear). + (active, allow_internal_unstable, "1.0.0", None, None), - // rustc internal + // Allows using `#[allow_internal_unsafe]`. This is an + // attribute on `macro_rules!` and can't use the attribute handling + // below (it has to be checked before expansion possibly makes + // macros disappear). + (active, allow_internal_unsafe, "1.0.0", None, None), + + // Allows using the macros: + // + `__diagnostic_used` + // + `__register_diagnostic` + // +`__build_diagnostic_array` (active, rustc_diagnostic_macros, "1.0.0", None, None), + + // Allows using `#[rustc_const_unstable(feature = "foo", ..)]` which + // lets a function to be `const` when opted into with `#![feature(foo)]`. (active, rustc_const_unstable, "1.0.0", None, None), + + // no-tracking-issue-end + + // Allows using `#[link_name="llvm.*"]`. + (active, link_llvm_intrinsics, "1.0.0", Some(29602), None), + + // Allows using `rustc_*` attributes (RFC 572). + (active, rustc_attrs, "1.0.0", Some(29642), None), + + // Allows using `#[on_unimplemented(..)]` on traits. + (active, on_unimplemented, "1.0.0", Some(29628), None), + + // Allows using the `box $expr` syntax. (active, box_syntax, "1.0.0", Some(49733), None), - (active, unboxed_closures, "1.0.0", Some(29625), None), - (active, fundamental, "1.0.0", Some(29635), None), + // Allows using `#[main]` to replace the entrypoint `#[lang = "start"]` calls. (active, main, "1.0.0", Some(29634), None), - (active, needs_allocator, "1.4.0", Some(27389), None), - (active, on_unimplemented, "1.0.0", Some(29628), None), - (active, plugin, "1.0.0", Some(29597), None), - (active, simd_ffi, "1.0.0", Some(27731), None), + + // Allows using `#[start]` on a function indicating that it is the program entrypoint. (active, start, "1.0.0", Some(29633), None), - (active, structural_match, "1.8.0", Some(31434), None), - (active, panic_runtime, "1.10.0", Some(32837), None), - (active, needs_panic_runtime, "1.10.0", Some(32837), None), - // Features specific to OIBIT (auto traits) - (active, optin_builtin_traits, "1.0.0", Some(13231), None), + // Allows using the `#[fundamental]` attribute. + (active, fundamental, "1.0.0", Some(29635), None), - // Allows `#[staged_api]`. - // - // rustc internal - (active, staged_api, "1.0.0", None, None), + // Allows using the `rust-call` ABI. + (active, unboxed_closures, "1.0.0", Some(29625), None), - // Allows `#![no_core]`. - (active, no_core, "1.3.0", Some(29639), None), + // Allows using the `#[linkage = ".."]` attribute. + (active, linkage, "1.0.0", Some(29603), None), - // Allows the use of `box` in patterns (RFC 469). + // Allows features specific to OIBIT (auto traits). + (active, optin_builtin_traits, "1.0.0", Some(13231), None), + + // Allows using `box` in patterns (RFC 469). (active, box_patterns, "1.0.0", Some(29641), None), - // Allows the use of the `unsafe_destructor_blind_to_params` attribute (RFC 1238). + // no-tracking-issue-start + + // Allows using `#[prelude_import]` on glob `use` items. + (active, prelude_import, "1.2.0", None, None), + + // no-tracking-issue-end + + // Allows using `#[unsafe_destructor_blind_to_params]` (RFC 1238). (active, dropck_parametricity, "1.3.0", Some(28498), None), + // no-tracking-issue-start + + // Allows using `#[omit_gdb_pretty_printer_section]`. + (active, omit_gdb_pretty_printer_section, "1.5.0", None, None), + + // Allows using the `vectorcall` ABI. + (active, abi_vectorcall, "1.7.0", None, None), + + // no-tracking-issue-end + + // Allows using `#[structural_match]` which indicates that a type is structurally matchable. + (active, structural_match, "1.8.0", Some(31434), None), + // Allows using the `may_dangle` attribute (RFC 1327). (active, dropck_eyepatch, "1.10.0", Some(34761), None), - // Allows the use of custom attributes (RFC 572). - (active, custom_attribute, "1.0.0", Some(29642), None), + // Allows using the `#![panic_runtime]` attribute. + (active, panic_runtime, "1.10.0", Some(32837), None), - // Allows the use of `rustc_*` attributes (RFC 572). - (active, rustc_attrs, "1.0.0", Some(29642), None), + // Allows declaring with `#![needs_panic_runtime]` that a panic runtime is needed. + (active, needs_panic_runtime, "1.10.0", Some(32837), None), - // Allows the use of non lexical lifetimes (RFC 2094). - (active, nll, "1.0.0", Some(43234), None), + // no-tracking-issue-start - // Allows the use of `#[allow_internal_unstable]`. This is an - // attribute on `macro_rules!` and can't use the attribute handling - // below (it has to be checked before expansion possibly makes - // macros disappear). - // - // rustc internal - (active, allow_internal_unstable, "1.0.0", None, None), + // Allows identifying the `compiler_builtins` crate. + (active, compiler_builtins, "1.13.0", None, None), - // Allows the use of `#[allow_internal_unsafe]`. This is an - // attribute on `macro_rules!` and can't use the attribute handling - // below (it has to be checked before expansion possibly makes - // macros disappear). - // - // rustc internal - (active, allow_internal_unsafe, "1.0.0", None, None), + // Allows using the `unadjusted` ABI; perma-unstable. + (active, abi_unadjusted, "1.16.0", None, None), - // Allows the use of slice patterns (issue #23121). - (active, slice_patterns, "1.0.0", Some(23121), None), + // Allows identifying crates that contain sanitizer runtimes. + (active, sanitizer_runtime, "1.17.0", None, None), - // Allows the definition of `const` functions with some advanced features. - (active, const_fn, "1.2.0", Some(57563), None), + // Used to identify crates that contain the profiler runtime. + (active, profiler_runtime, "1.18.0", None, None), - // Allows accessing fields of unions inside `const` functions. - (active, const_fn_union, "1.27.0", Some(51909), None), + // Allows using the `thiscall` ABI. + (active, abi_thiscall, "1.19.0", None, None), - // Allows casting raw pointers to `usize` during const eval. - (active, const_raw_ptr_to_usize_cast, "1.27.0", Some(51910), None), + // Allows using `#![needs_allocator]`, an implementation detail of `#[global_allocator]`. + (active, allocator_internals, "1.20.0", None, None), - // Allows dereferencing raw pointers during const eval. - (active, const_raw_ptr_deref, "1.27.0", Some(51911), None), + // Allows using the `format_args_nl` macro. + (active, format_args_nl, "1.29.0", None, None), - // Allows reinterpretation of the bits of a value of one type as another type during const eval. - (active, const_transmute, "1.29.0", Some(53605), None), + // no-tracking-issue-end - // Allows comparing raw pointers during const eval. - (active, const_compare_raw_pointers, "1.27.0", Some(53020), None), + // Added for testing E0705; perma-unstable. + (active, test_2018_feature, "1.31.0", Some(0), Some(Edition::Edition2018)), - // Allows panicking during const eval (producing compile-time errors). - (active, const_panic, "1.30.0", Some(51999), None), + // ------------------------------------------------------------------------- + // feature-group-end: internal feature gates + // ------------------------------------------------------------------------- - // Allows using `#[prelude_import]` on glob `use` items. - // - // rustc internal - (active, prelude_import, "1.2.0", None, None), + // ------------------------------------------------------------------------- + // feature-group-start: actual feature gates (target features) + // ------------------------------------------------------------------------- - // Allows default type parameters to influence type inference. - (active, default_type_parameter_fallback, "1.3.0", Some(27336), None), + // FIXME: Document these and merge with the list below. + + // Unstable `#[target_feature]` directives. + (active, arm_target_feature, "1.27.0", Some(44839), None), + (active, aarch64_target_feature, "1.27.0", Some(44839), None), + (active, hexagon_target_feature, "1.27.0", Some(44839), None), + (active, powerpc_target_feature, "1.27.0", Some(44839), None), + (active, mips_target_feature, "1.27.0", Some(44839), None), + (active, avx512_target_feature, "1.27.0", Some(44839), None), + (active, mmx_target_feature, "1.27.0", Some(44839), None), + (active, sse4a_target_feature, "1.27.0", Some(44839), None), + (active, tbm_target_feature, "1.27.0", Some(44839), None), + (active, wasm_target_feature, "1.30.0", Some(44839), None), + (active, adx_target_feature, "1.32.0", Some(44839), None), + (active, cmpxchg16b_target_feature, "1.32.0", Some(44839), None), + (active, movbe_target_feature, "1.34.0", Some(44839), None), + (active, rtm_target_feature, "1.35.0", Some(44839), None), + (active, f16c_target_feature, "1.36.0", Some(44839), None), + + // ------------------------------------------------------------------------- + // feature-group-end: actual feature gates (target features) + // ------------------------------------------------------------------------- + + // ------------------------------------------------------------------------- + // feature-group-start: actual feature gates + // ------------------------------------------------------------------------- + + // Allows using `asm!` macro with which inline assembly can be embedded. + (active, asm, "1.0.0", Some(29722), None), + + // Allows using the `concat_idents!` macro with which identifiers can be concatenated. + (active, concat_idents, "1.0.0", Some(29599), None), + + // Allows using the `#[link_args]` attribute. + (active, link_args, "1.0.0", Some(29596), None), + + // Allows defining identifiers beyond ASCII. + (active, non_ascii_idents, "1.0.0", Some(55467), None), + + // Allows using `#[plugin_registrar]` on functions. + (active, plugin_registrar, "1.0.0", Some(29597), None), + + // Allows using `#![plugin(myplugin)]`. + (active, plugin, "1.0.0", Some(29597), None), + + // Allows using `#[thread_local]` on `static` items. + (active, thread_local, "1.0.0", Some(29594), None), + + // Allows using the `log_syntax!` macro. + (active, log_syntax, "1.0.0", Some(29598), None), + + // Allows using the `trace_macros!` macro. + (active, trace_macros, "1.0.0", Some(29598), None), + + // Allows the use of SIMD types in functions declared in `extern` blocks. + (active, simd_ffi, "1.0.0", Some(27731), None), + + // Allows using custom attributes (RFC 572). + (active, custom_attribute, "1.0.0", Some(29642), None), + + // Allows using non lexical lifetimes (RFC 2094). + (active, nll, "1.0.0", Some(43234), None), + + // Allows using slice patterns. + (active, slice_patterns, "1.0.0", Some(23121), None), + + // Allows the definition of `const` functions with some advanced features. + (active, const_fn, "1.2.0", Some(57563), None), // Allows associated type defaults. (active, associated_type_defaults, "1.2.0", Some(29661), None), + // Allows `#![no_core]`. + (active, no_core, "1.3.0", Some(29639), None), + + // Allows default type parameters to influence type inference. + (active, default_type_parameter_fallback, "1.3.0", Some(27336), None), + // Allows `repr(simd)` and importing the various simd intrinsics. (active, repr_simd, "1.4.0", Some(27731), None), @@ -236,17 +344,9 @@ declare_features! ( // Permits specifying whether a function should permit unwinding or abort on unwind. (active, unwind_attributes, "1.4.0", Some(58760), None), - // Allows the use of `#[naked]` on functions. - (active, naked_functions, "1.9.0", Some(32408), None), - // Allows `#[no_debug]`. (active, no_debug, "1.5.0", Some(29721), None), - // Allows `#[omit_gdb_pretty_printer_section]`. - // - // rustc internal - (active, omit_gdb_pretty_printer_section, "1.5.0", None, None), - // Allows attributes on expressions and non-item statements. (active, stmt_expr_attributes, "1.6.0", Some(15701), None), @@ -256,19 +356,19 @@ declare_features! ( // Allows `cfg(target_thread_local)`. (active, cfg_target_thread_local, "1.7.0", Some(29594), None), - // rustc internal - (active, abi_vectorcall, "1.7.0", None, None), - - // Allows `X..Y` patterns. - (active, exclusive_range_pattern, "1.11.0", Some(37854), None), - - // impl specialization (RFC 1210) + // Allows specialization of implementations (RFC 1210). (active, specialization, "1.7.0", Some(31844), None), + // Allows using `#[naked]` on functions. + (active, naked_functions, "1.9.0", Some(32408), None), + // Allows `cfg(target_has_atomic = "...")`. (active, cfg_target_has_atomic, "1.9.0", Some(32976), None), - // The `!` type. Does not imply 'exhaustive_patterns' (below) any more. + // Allows `X..Y` patterns. + (active, exclusive_range_pattern, "1.11.0", Some(37854), None), + + // Allows the `!` type. Does not imply 'exhaustive_patterns' (below) any more. (active, never_type, "1.13.0", Some(35121), None), // Allows exhaustive pattern matching on types that contain uninhabited types. @@ -277,175 +377,147 @@ declare_features! ( // Allows untagged unions `union U { ... }`. (active, untagged_unions, "1.13.0", Some(32836), None), - // Used to identify the `compiler_builtins` crate. - // - // rustc internal. - (active, compiler_builtins, "1.13.0", None, None), - // Allows `#[link(..., cfg(..))]`. (active, link_cfg, "1.14.0", Some(37406), None), // Allows `extern "ptx-*" fn()`. (active, abi_ptx, "1.15.0", Some(38788), None), - // The `repr(i128)` annotation for enums. + // Allows the `#[repr(i128)]` attribute for enums. (active, repr128, "1.16.0", Some(35118), None), - // Allows the use of `#[ffi_returns_twice]` on foreign functions. - (active, ffi_returns_twice, "1.34.0", Some(58314), None), - - // The `unadjusted` ABI; perma-unstable. - // - // rustc internal - (active, abi_unadjusted, "1.16.0", None, None), - - // Declarative macros 2.0 (`macro`). - (active, decl_macro, "1.17.0", Some(39412), None), - // Allows `#[link(kind="static-nobundle"...)]`. (active, static_nobundle, "1.16.0", Some(37403), None), // Allows `extern "msp430-interrupt" fn()`. (active, abi_msp430_interrupt, "1.16.0", Some(38487), None), - // Used to identify crates that contain sanitizer runtimes. - // - // rustc internal - (active, sanitizer_runtime, "1.17.0", None, None), - - // Used to identify crates that contain the profiler runtime. - // - // rustc internal - (active, profiler_runtime, "1.18.0", None, None), + // Allows declarative macros 2.0 (`macro`). + (active, decl_macro, "1.17.0", Some(39412), None), // Allows `extern "x86-interrupt" fn()`. (active, abi_x86_interrupt, "1.17.0", Some(40180), None), - // Allows the `try {...}` expression. - (active, try_blocks, "1.29.0", Some(31436), None), - // Allows module-level inline assembly by way of `global_asm!()`. (active, global_asm, "1.18.0", Some(35119), None), // Allows overlapping impls of marker traits. (active, overlapping_marker_traits, "1.18.0", Some(29864), None), - // Trait attribute to allow overlapping impls. - (active, marker_trait_attr, "1.30.0", Some(29864), None), - - // rustc internal - (active, abi_thiscall, "1.19.0", None, None), - // Allows a test to fail without failing the whole suite. (active, allow_fail, "1.19.0", Some(46488), None), // Allows unsized tuple coercion. (active, unsized_tuple_coercion, "1.20.0", Some(42877), None), - // Generators + // Allows defining generators. (active, generators, "1.21.0", Some(43122), None), - // Trait aliases - (active, trait_alias, "1.24.0", Some(41517), None), - - // rustc internal - (active, allocator_internals, "1.20.0", None, None), - - // `#[doc(cfg(...))]` + // Allows `#[doc(cfg(...))]`. (active, doc_cfg, "1.21.0", Some(43781), None), - // `#[doc(masked)]` + + // Allows `#[doc(masked)]`. (active, doc_masked, "1.21.0", Some(44027), None), - // `#[doc(spotlight)]` + + // Allows `#[doc(spotlight)]`. (active, doc_spotlight, "1.22.0", Some(45040), None), - // `#[doc(include = "some-file")]` + + // Allows `#[doc(include = "some-file")]`. (active, external_doc, "1.22.0", Some(44732), None), - // Future-proofing enums/structs with `#[non_exhaustive]` attribute (RFC 2008). + // Allows future-proofing enums/structs with the `#[non_exhaustive]` attribute (RFC 2008). (active, non_exhaustive, "1.22.0", Some(44109), None), - // Adds `crate` as visibility modifier, synonymous with `pub(crate)`. + // Allows using `crate` as visibility modifier, synonymous with `pub(crate)`. (active, crate_visibility_modifier, "1.23.0", Some(53120), None), - // extern types + // Allows defining `extern type`s. (active, extern_types, "1.23.0", Some(43467), None), // Allows trait methods with arbitrary self types. (active, arbitrary_self_types, "1.23.0", Some(44874), None), - // In-band lifetime bindings (e.g., `fn foo(x: &'a u8) -> &'a u8`). + // Allows in-band quantification of lifetime bindings (e.g., `fn foo(x: &'a u8) -> &'a u8`). (active, in_band_lifetimes, "1.23.0", Some(44524), None), - // Generic associated types (RFC 1598) + // Allows associated types to be generic, e.g., `type Foo;` (RFC 1598). (active, generic_associated_types, "1.23.0", Some(44265), None), - // Infer static outlives requirements (RFC 2093). + // Allows defining `trait X = A + B;` alias items. + (active, trait_alias, "1.24.0", Some(41517), None), + + // Allows infering `'static` outlives requirements (RFC 2093). (active, infer_static_outlives_requirements, "1.26.0", Some(54185), None), // Allows macro invocations in `extern {}` blocks. (active, macros_in_extern, "1.27.0", Some(49476), None), - // `existential type` - (active, existential_type, "1.28.0", Some(34511), None), + // Allows accessing fields of unions inside `const` functions. + (active, const_fn_union, "1.27.0", Some(51909), None), - // unstable `#[target_feature]` directives - (active, arm_target_feature, "1.27.0", Some(44839), None), - (active, aarch64_target_feature, "1.27.0", Some(44839), None), - (active, hexagon_target_feature, "1.27.0", Some(44839), None), - (active, powerpc_target_feature, "1.27.0", Some(44839), None), - (active, mips_target_feature, "1.27.0", Some(44839), None), - (active, avx512_target_feature, "1.27.0", Some(44839), None), - (active, mmx_target_feature, "1.27.0", Some(44839), None), - (active, sse4a_target_feature, "1.27.0", Some(44839), None), - (active, tbm_target_feature, "1.27.0", Some(44839), None), - (active, wasm_target_feature, "1.30.0", Some(44839), None), - (active, adx_target_feature, "1.32.0", Some(44839), None), - (active, cmpxchg16b_target_feature, "1.32.0", Some(44839), None), - (active, movbe_target_feature, "1.34.0", Some(44839), None), + // Allows casting raw pointers to `usize` during const eval. + (active, const_raw_ptr_to_usize_cast, "1.27.0", Some(51910), None), - // Allows macro invocations on modules expressions and statements and - // procedural macros to expand to non-items. - (active, proc_macro_hygiene, "1.30.0", Some(54727), None), + // Allows dereferencing raw pointers during const eval. + (active, const_raw_ptr_deref, "1.27.0", Some(51911), None), - // `#[doc(alias = "...")]` + // Allows comparing raw pointers during const eval. + (active, const_compare_raw_pointers, "1.27.0", Some(53020), None), + + // Allows `#[doc(alias = "...")]`. (active, doc_alias, "1.27.0", Some(50146), None), - // inconsistent bounds in where clauses + // Allows defining `existential type`s. + (active, existential_type, "1.28.0", Some(34511), None), + + // Allows inconsistent bounds in where clauses. (active, trivial_bounds, "1.28.0", Some(48214), None), - // `'a: { break 'a; }` + // Allows `'a: { break 'a; }`. (active, label_break_value, "1.28.0", Some(48594), None), - // Exhaustive pattern matching on `usize` and `isize`. - (active, precise_pointer_size_matching, "1.32.0", Some(56354), None), - - // `#[doc(keyword = "...")]` + // Allows using `#[doc(keyword = "...")]`. (active, doc_keyword, "1.28.0", Some(51315), None), // Allows async and await syntax. (active, async_await, "1.28.0", Some(50547), None), - // `#[alloc_error_handler]` + // Allows await! macro-like syntax. + // This will likely be removed prior to stabilization of async/await. + (active, await_macro, "1.28.0", Some(50547), None), + + // Allows reinterpretation of the bits of a value of one type as another type during const eval. + (active, const_transmute, "1.29.0", Some(53605), None), + + // Allows using `try {...}` expressions. + (active, try_blocks, "1.29.0", Some(31436), None), + + // Allows defining an `#[alloc_error_handler]`. (active, alloc_error_handler, "1.29.0", Some(51540), None), + // Allows using the `amdgpu-kernel` ABI. (active, abi_amdgpu_kernel, "1.29.0", Some(51575), None), - // Added for testing E0705; perma-unstable. - (active, test_2018_feature, "1.31.0", Some(0), Some(Edition::Edition2018)), + // Allows panicking during const eval (producing compile-time errors). + (active, const_panic, "1.30.0", Some(51999), None), + + // Allows `#[marker]` on certain traits allowing overlapping implementations. + (active, marker_trait_attr, "1.30.0", Some(29864), None), + + // Allows macro invocations on modules expressions and statements and + // procedural macros to expand to non-items. + (active, proc_macro_hygiene, "1.30.0", Some(54727), None), // Allows unsized rvalues at arguments and parameters. (active, unsized_locals, "1.30.0", Some(48055), None), - // `#![test_runner]` - // `#[test_case]` + // Allows custom test frameworks with `#![test_runner]` and `#[test_case]`. (active, custom_test_frameworks, "1.30.0", Some(50297), None), - // non-builtin attributes in inner attribute position + // Allows non-builtin attributes in inner attribute position. (active, custom_inner_attributes, "1.30.0", Some(54726), None), - // Allow mixing of bind-by-move in patterns and references to - // those identifiers in guards, *if* we are using MIR-borrowck - // (aka NLL). Essentially this means you need to be using the - // 2018 edition or later. + // Allows mixing bind-by-move in patterns and references to those identifiers in guards. (active, bind_by_move_pattern_guards, "1.30.0", Some(15287), None), // Allows `impl Trait` in bindings (`let`, `const`, `static`). @@ -454,29 +526,53 @@ declare_features! ( // Allows `const _: TYPE = VALUE`. (active, underscore_const_names, "1.31.0", Some(54912), None), - // Adds `reason` and `expect` lint attributes. + // Allows using `reason` in lint attributes and the `#[expect(lint)]` lint check. (active, lint_reasons, "1.31.0", Some(54503), None), // Allows paths to enum variants on type aliases. (active, type_alias_enum_variants, "1.31.0", Some(49683), None), - // Re-Rebalance coherence + // Allows exhaustive integer pattern matching on `usize` and `isize`. + (active, precise_pointer_size_matching, "1.32.0", Some(56354), None), + + // Allows relaxing the coherence rules such that + // `impl ForeignTrait for ForeignType is permitted. (active, re_rebalance_coherence, "1.32.0", Some(55437), None), - // Const generic types. + // Allows using `#[ffi_returns_twice]` on foreign functions. + (active, ffi_returns_twice, "1.34.0", Some(58314), None), + + // Allows const generic types (e.g. `struct Foo(...);`). (active, const_generics, "1.34.0", Some(44580), None), - // #[optimize(X)] + // Allows using `#[optimize(X)]`. (active, optimize_attribute, "1.34.0", Some(54882), None), - // #[repr(align(X))] on enums + // Allows using `#[repr(align(X))]` on enums. (active, repr_align_enum, "1.34.0", Some(57996), None), - // Allows the use of C-variadics + // Allows using C-variadics. (active, c_variadic, "1.34.0", Some(44930), None), + + // ------------------------------------------------------------------------- + // feature-group-end: actual feature gates + // ------------------------------------------------------------------------- ); +// Some features are known to be incomplete and using them is likely to have +// unanticipated results, such as compiler crashes. We warn the user about these +// to alert them. +const INCOMPLETE_FEATURES: &[Symbol] = &[ + sym::impl_trait_in_bindings, + sym::generic_associated_types, + sym::const_generics +]; + declare_features! ( + // ------------------------------------------------------------------------- + // feature-group-start: removed features + // ------------------------------------------------------------------------- + (removed, import_shadowing, "1.0.0", None, None, None), (removed, managed_boxes, "1.0.0", None, None, None), // Allows use of unary negate on unsigned integers, e.g., -e for e: u8 @@ -490,9 +586,7 @@ declare_features! ( (removed, visible_private_types, "1.0.0", None, None, None), (removed, unsafe_no_drop_flag, "1.0.0", None, None, None), // Allows using items which are missing stability attributes - // rustc internal (removed, unmarked_api, "1.0.0", None, None, None), - (removed, pushpop_unsafe, "1.2.0", None, None, None), (removed, allocator, "1.0.0", None, None, None), (removed, simd, "1.0.0", Some(27731), None, Some("removed in favor of `#[repr(simd)]`")), @@ -500,6 +594,9 @@ declare_features! ( Some("merged into `#![feature(slice_patterns)]`")), (removed, macro_reexport, "1.0.0", Some(29638), None, Some("subsumed by `pub use`")), + (removed, pushpop_unsafe, "1.2.0", None, None, None), + (removed, needs_allocator, "1.4.0", Some(27389), None, + Some("subsumed by `#![feature(allocator_internals)]`")), (removed, proc_macro_mod, "1.27.0", Some(54727), None, Some("subsumed by `#![feature(proc_macro_hygiene)]`")), (removed, proc_macro_expr, "1.27.0", Some(54727), None, @@ -511,12 +608,16 @@ declare_features! ( (removed, panic_implementation, "1.28.0", Some(44489), None, Some("subsumed by `#[panic_handler]`")), // Allows the use of `#[derive(Anything)]` as sugar for `#[derive_Anything]`. - (removed, custom_derive, "1.0.0", Some(29644), None, + (removed, custom_derive, "1.32.0", Some(29644), None, Some("subsumed by `#[proc_macro_derive]`")), // Paths of the form: `extern::foo::bar` (removed, extern_in_paths, "1.33.0", Some(55600), None, Some("subsumed by `::foo::bar` paths")), - (removed, quote, "1.0.0", Some(29601), None, None), + (removed, quote, "1.33.0", Some(29601), None, None), + + // ------------------------------------------------------------------------- + // feature-group-end: removed features + // ------------------------------------------------------------------------- ); declare_features! ( @@ -524,63 +625,85 @@ declare_features! ( ); declare_features! ( - (accepted, associated_types, "1.0.0", None, None), - // Allows overloading augmented assignment operations like `a += b`. - (accepted, augmented_assignments, "1.8.0", Some(28235), None), - // Allows empty structs and enum variants with braces. - (accepted, braced_empty_structs, "1.8.0", Some(29720), None), - // Allows indexing into constant arrays. - (accepted, const_indexing, "1.26.0", Some(29947), None), - (accepted, default_type_params, "1.0.0", None, None), - (accepted, globs, "1.0.0", None, None), - (accepted, if_let, "1.0.0", None, None), + // ------------------------------------------------------------------------- + // feature-group-start: for testing purposes + // ------------------------------------------------------------------------- + // A temporary feature gate used to enable parser extensions needed // to bootstrap fix for #5723. (accepted, issue_5723_bootstrap, "1.0.0", None, None), + // These are used to test this portion of the compiler, + // they don't actually mean anything. + (accepted, test_accepted_feature, "1.0.0", None, None), + + // ------------------------------------------------------------------------- + // feature-group-end: for testing purposes + // ------------------------------------------------------------------------- + + // ------------------------------------------------------------------------- + // feature-group-start: accepted features + // ------------------------------------------------------------------------- + + // Allows using associated `type`s in `trait`s. + (accepted, associated_types, "1.0.0", None, None), + // Allows using assigning a default type to type parameters in algebraic data type definitions. + (accepted, default_type_params, "1.0.0", None, None), + // FIXME: explain `globs`. + (accepted, globs, "1.0.0", None, None), + // Allows `macro_rules!` items. (accepted, macro_rules, "1.0.0", None, None), - // Allows using `#![no_std]`. - (accepted, no_std, "1.6.0", None, None), + // Allows use of `&foo[a..b]` as a slicing syntax. (accepted, slicing_syntax, "1.0.0", None, None), + // Allows struct variants `Foo { baz: u8, .. }` in enums (RFC 418). (accepted, struct_variant, "1.0.0", None, None), - // These are used to test this portion of the compiler, they don't actually - // mean anything. - (accepted, test_accepted_feature, "1.0.0", None, None), + // Allows indexing tuples. (accepted, tuple_indexing, "1.0.0", None, None), - // Allows macros to appear in the type position. - (accepted, type_macros, "1.13.0", Some(27245), None), + // Allows the use of `if let` expressions. + (accepted, if_let, "1.0.0", None, None), + // Allows the use of `while let` expressions. (accepted, while_let, "1.0.0", None, None), + // Allows using `#![no_std]`. + (accepted, no_std, "1.6.0", None, None), + // Allows overloading augmented assignment operations like `a += b`. + (accepted, augmented_assignments, "1.8.0", Some(28235), None), + // Allows empty structs and enum variants with braces. + (accepted, braced_empty_structs, "1.8.0", Some(29720), None), // Allows `#[deprecated]` attribute. (accepted, deprecated, "1.9.0", Some(29935), None), - // `expr?` + // Allows macros to appear in the type position. + (accepted, type_macros, "1.13.0", Some(27245), None), + // Allows use of the postfix `?` operator in expressions. (accepted, question_mark, "1.13.0", Some(31436), None), // Allows `..` in tuple (struct) patterns. (accepted, dotdot_in_tuple_patterns, "1.14.0", Some(33627), None), + // Allows some increased flexibility in the name resolution rules, + // especially around globs and shadowing (RFC 1560). (accepted, item_like_imports, "1.15.0", Some(35120), None), // Allows using `Self` and associated types in struct expressions and patterns. (accepted, more_struct_aliases, "1.16.0", Some(37544), None), - // elide `'static` lifetimes in `static`s and `const`s. + // Allows elision of `'static` lifetimes in `static`s and `const`s. (accepted, static_in_const, "1.17.0", Some(35897), None), // Allows field shorthands (`x` meaning `x: x`) in struct literal expressions. (accepted, field_init_shorthand, "1.17.0", Some(37340), None), // Allows the definition recursive static items. (accepted, static_recursion, "1.17.0", Some(29719), None), - // `pub(restricted)` visibilities (RFC 1422) + // Allows `pub(restricted)` visibilities (RFC 1422). (accepted, pub_restricted, "1.18.0", Some(32409), None), - // `#![windows_subsystem]` + // Allows `#![windows_subsystem]`. (accepted, windows_subsystem, "1.18.0", Some(37499), None), // Allows `break {expr}` with a value inside `loop`s. (accepted, loop_break_value, "1.19.0", Some(37339), None), - // Permits numeric fields in struct expressions and patterns. + // Allows numeric fields in struct expressions and patterns. (accepted, relaxed_adts, "1.19.0", Some(35626), None), - // Coerces non capturing closures to function pointers. + // Allows coercing non capturing closures to function pointers. (accepted, closure_to_fn_coercion, "1.19.0", Some(39817), None), // Allows attributes on struct literal fields. (accepted, struct_field_attributes, "1.20.0", Some(38814), None), // Allows the definition of associated constants in `trait` or `impl` blocks. (accepted, associated_consts, "1.20.0", Some(29646), None), - // Usage of the `compile_error!` macro. + // Allows usage of the `compile_error!` macro. (accepted, compile_error, "1.20.0", Some(40872), None), - // See rust-lang/rfcs#1414. Allows code like `let x: &'static u32 = &42` to work. + // Allows code like `let x: &'static u32 = &42` to work (RFC 1414). (accepted, rvalue_static_promotion, "1.21.0", Some(38865), None), // Allows `Drop` types in constants (RFC 1440). (accepted, drop_types_in_const, "1.22.0", Some(33156), None), @@ -591,24 +714,27 @@ declare_features! ( (accepted, repr_align, "1.25.0", Some(33626), None), // Allows '|' at beginning of match arms (RFC 1925). (accepted, match_beginning_vert, "1.25.0", Some(44101), None), - // Nested groups in `use` (RFC 2128) + // Allows nested groups in `use` items (RFC 2128). (accepted, use_nested_groups, "1.25.0", Some(44494), None), - // `a..=b` and `..=b` + // Allows indexing into constant arrays. + (accepted, const_indexing, "1.26.0", Some(29947), None), + // Allows using `a..=b` and `..=b` as inclusive range syntaxes. (accepted, inclusive_range_syntax, "1.26.0", Some(28237), None), // Allows `..=` in patterns (RFC 1192). (accepted, dotdoteq_in_patterns, "1.26.0", Some(28237), None), - // Termination trait in main (RFC 1937) + // Allows `fn main()` with return types which implements `Termination` (RFC 1937). (accepted, termination_trait, "1.26.0", Some(43301), None), - // `Copy`/`Clone` closures (RFC 2132). + // Allows implementing `Clone` for closures where possible (RFC 2132). (accepted, clone_closures, "1.26.0", Some(44490), None), + // Allows implementing `Copy` for closures where possible (RFC 2132). (accepted, copy_closures, "1.26.0", Some(44490), None), // Allows `impl Trait` in function arguments. (accepted, universal_impl_trait, "1.26.0", Some(34511), None), // Allows `impl Trait` in function return types. (accepted, conservative_impl_trait, "1.26.0", Some(34511), None), - // The `i128` type + // Allows using the `u128` and `i128` types. (accepted, i128_type, "1.26.0", Some(35118), None), - // Default match binding modes (RFC 2005) + // Allows default match binding modes (RFC 2005). (accepted, match_default_bindings, "1.26.0", Some(42640), None), // Allows `'_` placeholder lifetimes. (accepted, underscore_lifetimes, "1.26.0", Some(44524), None), @@ -618,21 +744,21 @@ declare_features! ( (accepted, cfg_target_feature, "1.27.0", Some(29717), None), // Allows `#[target_feature(...)]`. (accepted, target_feature, "1.27.0", None, None), - // Trait object syntax with `dyn` prefix + // Allows using `dyn Trait` as a syntax for trait objects. (accepted, dyn_trait, "1.27.0", Some(44662), None), // Allows `#[must_use]` on functions, and introduces must-use operators (RFC 1940). (accepted, fn_must_use, "1.27.0", Some(43302), None), // Allows use of the `:lifetime` macro fragment specifier. (accepted, macro_lifetime_matcher, "1.27.0", Some(34303), None), - // Termination trait in tests (RFC 1937) + // Allows `#[test]` functions where the return type implements `Termination` (RFC 1937). (accepted, termination_trait_test, "1.27.0", Some(48854), None), - // The `#[global_allocator]` attribute + // Allows the `#[global_allocator]` attribute. (accepted, global_allocator, "1.28.0", Some(27389), None), // Allows `#[repr(transparent)]` attribute on newtype structs. (accepted, repr_transparent, "1.28.0", Some(43036), None), - // Procedural macros in `proc-macro` crates + // Allows procedural macros in `proc-macro` crates. (accepted, proc_macro, "1.29.0", Some(38356), None), - // `foo.rs` as an alternative to `foo/mod.rs` + // Allows `foo.rs` as an alternative to `foo/mod.rs`. (accepted, non_modrs_mods, "1.30.0", Some(44660), None), // Allows use of the `:vis` macro fragment specifier (accepted, macro_vis_matcher, "1.30.0", Some(41022), None), @@ -641,47 +767,50 @@ declare_features! ( (accepted, use_extern_macros, "1.30.0", Some(35896), None), // Allows keywords to be escaped for use as identifiers. (accepted, raw_identifiers, "1.30.0", Some(48589), None), - // Attributes scoped to tools. + // Allows attributes scoped to tools. (accepted, tool_attributes, "1.30.0", Some(44690), None), // Allows multi-segment paths in attributes and derives. (accepted, proc_macro_path_invoc, "1.30.0", Some(38356), None), // Allows all literals in attribute lists and values of key-value pairs. (accepted, attr_literals, "1.30.0", Some(34981), None), - // Infer outlives requirements (RFC 2093). + // Allows inferring outlives requirements (RFC 2093). (accepted, infer_outlives_requirements, "1.30.0", Some(44493), None), + // Allows annotating functions conforming to `fn(&PanicInfo) -> !` with `#[panic_handler]`. + // This defines the behavior of panics. (accepted, panic_handler, "1.30.0", Some(44489), None), - // Used to preserve symbols (see llvm.used). + // Allows `#[used]` to preserve symbols (see llvm.used). (accepted, used, "1.30.0", Some(40289), None), - // `crate` in paths + // Allows `crate` in paths. (accepted, crate_in_paths, "1.30.0", Some(45477), None), - // Resolve absolute paths as paths from other crates. + // Allows resolving absolute paths as paths from other crates. (accepted, extern_absolute_paths, "1.30.0", Some(44660), None), - // Access to crate names passed via `--extern` through prelude. + // Allows access to crate names passed via `--extern` through prelude. (accepted, extern_prelude, "1.30.0", Some(44660), None), - // Parentheses in patterns + // Allows parentheses in patterns. (accepted, pattern_parentheses, "1.31.0", Some(51087), None), // Allows the definition of `const fn` functions. (accepted, min_const_fn, "1.31.0", Some(53555), None), - // Scoped lints + // Allows scoped lints. (accepted, tool_lints, "1.31.0", Some(44690), None), - // `impl Iterator for &mut Iterator` - // `impl Debug for Foo<'_>` + // Allows lifetime elision in `impl` headers. For example: + // + `impl Iterator for &mut Iterator` + // + `impl Debug for Foo<'_>` (accepted, impl_header_lifetime_elision, "1.31.0", Some(15872), None), - // `extern crate foo as bar;` puts `bar` into extern prelude. + // Allows `extern crate foo as bar;`. This puts `bar` into extern prelude. (accepted, extern_crate_item_prelude, "1.31.0", Some(55599), None), // Allows use of the `:literal` macro fragment specifier (RFC 1576). (accepted, macro_literal_matcher, "1.32.0", Some(35625), None), - // Use `?` as the Kleene "at most one" operator. + // Allows use of `?` as the Kleene "at most one" operator in macros. (accepted, macro_at_most_once_rep, "1.32.0", Some(48075), None), - // `Self` struct constructor (RFC 2302) + // Allows `Self` struct constructor (RFC 2302). (accepted, self_struct_ctor, "1.32.0", Some(51994), None), - // `Self` in type definitions (RFC 2300) + // Allows `Self` in type definitions (RFC 2300). (accepted, self_in_typedefs, "1.32.0", Some(49303), None), // Allows `use x::y;` to search `x` in the current scope. (accepted, uniform_paths, "1.32.0", Some(53130), None), - // Integer match exhaustiveness checking (RFC 2591) + // Allows integer match exhaustiveness checking (RFC 2591). (accepted, exhaustive_integer_patterns, "1.33.0", Some(50907), None), - // `use path as _;` and `extern crate c as _;` + // Allows `use path as _;` and `extern crate c as _;`. (accepted, underscore_imports, "1.33.0", Some(48216), None), // Allows `#[repr(packed(N))]` attribute on structs. (accepted, repr_packed, "1.33.0", Some(33158), None), @@ -693,16 +822,21 @@ declare_features! ( // As long as control flow is not implemented in const eval, `&&` and `||` may not be used // at the same time as let bindings. (accepted, const_let, "1.33.0", Some(48821), None), - // `#[cfg_attr(predicate, multiple, attributes, here)]` + // Allows `#[cfg_attr(predicate, multiple, attributes, here)]`. (accepted, cfg_attr_multi, "1.33.0", Some(54881), None), - // Top level or-patterns (`p | q`) in `if let` and `while let`. + // Allows top level or-patterns (`p | q`) in `if let` and `while let`. (accepted, if_while_or_patterns, "1.33.0", Some(48215), None), // Allows `cfg(target_vendor = "...")`. (accepted, cfg_target_vendor, "1.33.0", Some(29718), None), - // `extern crate self as foo;` puts local crate root into extern prelude under name `foo`. + // Allows `extern crate self as foo;`. + // This puts local crate root into extern prelude under name `foo`. (accepted, extern_crate_self, "1.34.0", Some(56409), None), - // support for arbitrary delimited token streams in non-macro attributes + // Allows arbitrary delimited token streams in non-macro attributes. (accepted, unrestricted_attribute_tokens, "1.34.0", Some(55208), None), + + // ------------------------------------------------------------------------- + // feature-group-end: accepted features + // ------------------------------------------------------------------------- ); // If you change this, please modify `src/doc/unstable-book` as well. You must @@ -727,7 +861,7 @@ pub enum AttributeType { pub enum AttributeGate { /// Is gated by a given feature gate, reason /// and function to check if enabled - Gated(Stability, &'static str, &'static str, fn(&Features) -> bool), + Gated(Stability, Symbol, &'static str, fn(&Features) -> bool), /// Ungated attribute, can be used on all release channels Ungated, @@ -811,406 +945,473 @@ macro_rules! cfg_fn { }} } -pub fn deprecated_attributes() -> Vec<&'static (&'static str, AttributeType, +pub fn deprecated_attributes() -> Vec<&'static (Symbol, AttributeType, AttributeTemplate, AttributeGate)> { BUILTIN_ATTRIBUTES.iter().filter(|(.., gate)| gate.is_deprecated()).collect() } pub fn is_builtin_attr_name(name: ast::Name) -> bool { - BUILTIN_ATTRIBUTES.iter().any(|&(builtin_name, ..)| name == builtin_name) + BUILTIN_ATTRIBUTE_MAP.get(&name).is_some() } pub fn is_builtin_attr(attr: &ast::Attribute) -> bool { - BUILTIN_ATTRIBUTES.iter().any(|&(builtin_name, ..)| attr.path == builtin_name) + attr.ident().and_then(|ident| BUILTIN_ATTRIBUTE_MAP.get(&ident.name)).is_some() } -// Attributes that have a special meaning to rustc or rustdoc -pub const BUILTIN_ATTRIBUTES: &[(&str, AttributeType, AttributeTemplate, AttributeGate)] = &[ +/// Attributes that have a special meaning to rustc or rustdoc +pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ // Normal attributes - ("warn", Normal, template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#), Ungated), - ("allow", Normal, template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#), Ungated), - ("forbid", Normal, template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#), Ungated), - ("deny", Normal, template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#), Ungated), - - ("macro_use", Normal, template!(Word, List: "name1, name2, ..."), Ungated), - ("macro_export", Normal, template!(Word, List: "local_inner_macros"), Ungated), - ("plugin_registrar", Normal, template!(Word), Ungated), - - ("cfg", Normal, template!(List: "predicate"), Ungated), - ("cfg_attr", Normal, template!(List: "predicate, attr1, attr2, ..."), Ungated), - ("main", Normal, template!(Word), Ungated), - ("start", Normal, template!(Word), Ungated), - ("repr", Normal, template!(List: "C, packed, ..."), Ungated), - ("path", Normal, template!(NameValueStr: "file"), Ungated), - ("automatically_derived", Normal, template!(Word), Ungated), - ("no_mangle", Normal, template!(Word), Ungated), - ("no_link", Normal, template!(Word), Ungated), - ("derive", Normal, template!(List: "Trait1, Trait2, ..."), Ungated), - ("should_panic", Normal, template!(Word, List: r#"expected = "reason"#, NameValueStr: "reason"), - Ungated), - ("ignore", Normal, template!(Word, NameValueStr: "reason"), Ungated), - ("no_implicit_prelude", Normal, template!(Word), Ungated), - ("reexport_test_harness_main", Normal, template!(NameValueStr: "name"), Ungated), - ("link_args", Normal, template!(NameValueStr: "args"), Gated(Stability::Unstable, - "link_args", + ( + sym::warn, + Normal, + template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#), + Ungated + ), + ( + sym::allow, + Normal, + template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#), + Ungated + ), + ( + sym::forbid, + Normal, + template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#), + Ungated + ), + ( + sym::deny, + Normal, + template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#), + Ungated + ), + + (sym::macro_use, Normal, template!(Word, List: "name1, name2, ..."), Ungated), + (sym::macro_export, Normal, template!(Word, List: "local_inner_macros"), Ungated), + (sym::plugin_registrar, Normal, template!(Word), Ungated), + + (sym::cfg, Normal, template!(List: "predicate"), Ungated), + (sym::cfg_attr, Normal, template!(List: "predicate, attr1, attr2, ..."), Ungated), + (sym::main, Normal, template!(Word), Ungated), + (sym::start, Normal, template!(Word), Ungated), + (sym::repr, Normal, template!(List: "C, packed, ..."), Ungated), + (sym::path, Normal, template!(NameValueStr: "file"), Ungated), + (sym::automatically_derived, Normal, template!(Word), Ungated), + (sym::no_mangle, Whitelisted, template!(Word), Ungated), + (sym::no_link, Normal, template!(Word), Ungated), + (sym::derive, Normal, template!(List: "Trait1, Trait2, ..."), Ungated), + ( + sym::should_panic, + Normal, + template!(Word, List: r#"expected = "reason"#, NameValueStr: "reason"), + Ungated + ), + (sym::ignore, Normal, template!(Word, NameValueStr: "reason"), Ungated), + (sym::no_implicit_prelude, Normal, template!(Word), Ungated), + (sym::reexport_test_harness_main, Normal, template!(NameValueStr: "name"), Ungated), + (sym::link_args, Normal, template!(NameValueStr: "args"), Gated(Stability::Unstable, + sym::link_args, "the `link_args` attribute is experimental and not \ - portable across platforms, it is recommended to \ - use `#[link(name = \"foo\")] instead", + portable across platforms, it is recommended to \ + use `#[link(name = \"foo\")] instead", cfg_fn!(link_args))), - ("macro_escape", Normal, template!(Word), Ungated), + (sym::macro_escape, Normal, template!(Word), Ungated), // RFC #1445. - ("structural_match", Whitelisted, template!(Word), Gated(Stability::Unstable, - "structural_match", + (sym::structural_match, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::structural_match, "the semantics of constant patterns is \ - not yet settled", + not yet settled", cfg_fn!(structural_match))), // RFC #2008 - ("non_exhaustive", Whitelisted, template!(Word), Gated(Stability::Unstable, - "non_exhaustive", - "non exhaustive is an experimental feature", - cfg_fn!(non_exhaustive))), + (sym::non_exhaustive, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::non_exhaustive, + "non exhaustive is an experimental feature", + cfg_fn!(non_exhaustive))), // RFC #1268 - ("marker", Normal, template!(Word), Gated(Stability::Unstable, - "marker_trait_attr", - "marker traits is an experimental feature", - cfg_fn!(marker_trait_attr))), - - ("plugin", CrateLevel, template!(List: "name|name(args)"), Gated(Stability::Unstable, - "plugin", - "compiler plugins are experimental \ - and possibly buggy", - cfg_fn!(plugin))), - - ("no_std", CrateLevel, template!(Word), Ungated), - ("no_core", CrateLevel, template!(Word), Gated(Stability::Unstable, - "no_core", - "no_core is experimental", - cfg_fn!(no_core))), - ("lang", Normal, template!(NameValueStr: "name"), Gated(Stability::Unstable, - "lang_items", - "language items are subject to change", - cfg_fn!(lang_items))), - ("linkage", Whitelisted, template!(NameValueStr: "external|internal|..."), - Gated(Stability::Unstable, - "linkage", - "the `linkage` attribute is experimental \ + (sym::marker, Normal, template!(Word), Gated(Stability::Unstable, + sym::marker_trait_attr, + "marker traits is an experimental feature", + cfg_fn!(marker_trait_attr))), + + (sym::plugin, CrateLevel, template!(List: "name|name(args)"), Gated(Stability::Unstable, + sym::plugin, + "compiler plugins are experimental \ + and possibly buggy", + cfg_fn!(plugin))), + + (sym::no_std, CrateLevel, template!(Word), Ungated), + (sym::no_core, CrateLevel, template!(Word), Gated(Stability::Unstable, + sym::no_core, + "no_core is experimental", + cfg_fn!(no_core))), + (sym::lang, Normal, template!(NameValueStr: "name"), Gated(Stability::Unstable, + sym::lang_items, + "language items are subject to change", + cfg_fn!(lang_items))), + (sym::linkage, Whitelisted, template!(NameValueStr: "external|internal|..."), + Gated(Stability::Unstable, + sym::linkage, + "the `linkage` attribute is experimental \ and not portable across platforms", - cfg_fn!(linkage))), - ("thread_local", Whitelisted, template!(Word), Gated(Stability::Unstable, - "thread_local", + cfg_fn!(linkage))), + (sym::thread_local, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::thread_local, "`#[thread_local]` is an experimental feature, and does \ - not currently handle destructors.", + not currently handle destructors", cfg_fn!(thread_local))), - ("rustc_on_unimplemented", Whitelisted, template!(List: - r#"/*opt*/ message = "...", /*opt*/ label = "...", /*opt*/ note = "...""#, - NameValueStr: "message"), - Gated(Stability::Unstable, - "on_unimplemented", - "the `#[rustc_on_unimplemented]` attribute \ - is an experimental feature", - cfg_fn!(on_unimplemented))), - ("rustc_const_unstable", Normal, template!(List: r#"feature = "name""#), - Gated(Stability::Unstable, - "rustc_const_unstable", - "the `#[rustc_const_unstable]` attribute \ - is an internal feature", - cfg_fn!(rustc_const_unstable))), - ("global_allocator", Normal, template!(Word), Ungated), - ("default_lib_allocator", Whitelisted, template!(Word), Gated(Stability::Unstable, - "allocator_internals", + (sym::rustc_on_unimplemented, Whitelisted, template!(List: + r#"/*opt*/ message = "...", /*opt*/ label = "...", /*opt*/ note = "...""#, + NameValueStr: "message"), + Gated(Stability::Unstable, + sym::on_unimplemented, + "the `#[rustc_on_unimplemented]` attribute \ + is an experimental feature", + cfg_fn!(on_unimplemented))), + (sym::rustc_const_unstable, Normal, template!(List: r#"feature = "name""#), + Gated(Stability::Unstable, + sym::rustc_const_unstable, + "the `#[rustc_const_unstable]` attribute \ + is an internal feature", + cfg_fn!(rustc_const_unstable))), + (sym::global_allocator, Normal, template!(Word), Ungated), + (sym::default_lib_allocator, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::allocator_internals, "the `#[default_lib_allocator]` \ - attribute is an experimental feature", + attribute is an experimental feature", cfg_fn!(allocator_internals))), - ("needs_allocator", Normal, template!(Word), Gated(Stability::Unstable, - "allocator_internals", - "the `#[needs_allocator]` \ - attribute is an experimental \ - feature", - cfg_fn!(allocator_internals))), - ("panic_runtime", Whitelisted, template!(Word), Gated(Stability::Unstable, - "panic_runtime", - "the `#[panic_runtime]` attribute is \ - an experimental feature", - cfg_fn!(panic_runtime))), - ("needs_panic_runtime", Whitelisted, template!(Word), Gated(Stability::Unstable, - "needs_panic_runtime", - "the `#[needs_panic_runtime]` \ + (sym::needs_allocator, Normal, template!(Word), Gated(Stability::Unstable, + sym::allocator_internals, + "the `#[needs_allocator]` \ + attribute is an experimental \ + feature", + cfg_fn!(allocator_internals))), + (sym::panic_runtime, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::panic_runtime, + "the `#[panic_runtime]` attribute is \ + an experimental feature", + cfg_fn!(panic_runtime))), + (sym::needs_panic_runtime, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::needs_panic_runtime, + "the `#[needs_panic_runtime]` \ attribute is an experimental \ feature", - cfg_fn!(needs_panic_runtime))), - ("rustc_outlives", Normal, template!(Word), Gated(Stability::Unstable, - "rustc_attrs", - "the `#[rustc_outlives]` attribute \ - is just used for rustc unit tests \ - and will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_variance", Normal, template!(Word), Gated(Stability::Unstable, - "rustc_attrs", - "the `#[rustc_variance]` attribute \ - is just used for rustc unit tests \ - and will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_layout", Normal, template!(List: "field1, field2, ..."), - Gated(Stability::Unstable, - "rustc_attrs", - "the `#[rustc_layout]` attribute \ + cfg_fn!(needs_panic_runtime))), + (sym::rustc_outlives, Normal, template!(Word), Gated(Stability::Unstable, + sym::rustc_attrs, + "the `#[rustc_outlives]` attribute \ + is just used for rustc unit tests \ + and will never be stable", + cfg_fn!(rustc_attrs))), + (sym::rustc_variance, Normal, template!(Word), Gated(Stability::Unstable, + sym::rustc_attrs, + "the `#[rustc_variance]` attribute \ + is just used for rustc unit tests \ + and will never be stable", + cfg_fn!(rustc_attrs))), + (sym::rustc_layout, Normal, template!(List: "field1, field2, ..."), + Gated(Stability::Unstable, + sym::rustc_attrs, + "the `#[rustc_layout]` attribute \ is just used for rustc unit tests \ and will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_layout_scalar_valid_range_start", Whitelisted, template!(List: "value"), - Gated(Stability::Unstable, - "rustc_attrs", - "the `#[rustc_layout_scalar_valid_range_start]` attribute \ + cfg_fn!(rustc_attrs))), + (sym::rustc_layout_scalar_valid_range_start, Whitelisted, template!(List: "value"), + Gated(Stability::Unstable, + sym::rustc_attrs, + "the `#[rustc_layout_scalar_valid_range_start]` attribute \ is just used to enable niche optimizations in libcore \ and will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_layout_scalar_valid_range_end", Whitelisted, template!(List: "value"), - Gated(Stability::Unstable, - "rustc_attrs", - "the `#[rustc_layout_scalar_valid_range_end]` attribute \ + cfg_fn!(rustc_attrs))), + (sym::rustc_layout_scalar_valid_range_end, Whitelisted, template!(List: "value"), + Gated(Stability::Unstable, + sym::rustc_attrs, + "the `#[rustc_layout_scalar_valid_range_end]` attribute \ is just used to enable niche optimizations in libcore \ and will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_regions", Normal, template!(Word), Gated(Stability::Unstable, - "rustc_attrs", + cfg_fn!(rustc_attrs))), + (sym::rustc_regions, Normal, template!(Word), Gated(Stability::Unstable, + sym::rustc_attrs, "the `#[rustc_regions]` attribute \ - is just used for rustc unit tests \ - and will never be stable", + is just used for rustc unit tests \ + and will never be stable", cfg_fn!(rustc_attrs))), - ("rustc_error", Whitelisted, template!(Word), Gated(Stability::Unstable, - "rustc_attrs", - "the `#[rustc_error]` attribute \ + (sym::rustc_error, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::rustc_attrs, + "the `#[rustc_error]` attribute \ is just used for rustc unit tests \ and will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_dump_user_substs", Whitelisted, template!(Word), Gated(Stability::Unstable, - "rustc_attrs", - "this attribute \ + cfg_fn!(rustc_attrs))), + (sym::rustc_dump_user_substs, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::rustc_attrs, + "this attribute \ is just used for rustc unit tests \ and will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_if_this_changed", Whitelisted, template!(Word, List: "DepNode"), - Gated(Stability::Unstable, - "rustc_attrs", - "the `#[rustc_if_this_changed]` attribute \ - is just used for rustc unit tests \ - and will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_then_this_would_need", Whitelisted, template!(List: "DepNode"), - Gated(Stability::Unstable, - "rustc_attrs", - "the `#[rustc_if_this_changed]` attribute \ - is just used for rustc unit tests \ - and will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_dirty", Whitelisted, template!(List: r#"cfg = "...", /*opt*/ label = "...", + cfg_fn!(rustc_attrs))), + (sym::rustc_if_this_changed, Whitelisted, template!(Word, List: "DepNode"), + Gated(Stability::Unstable, + sym::rustc_attrs, + "the `#[rustc_if_this_changed]` attribute \ + is just used for rustc unit tests \ + and will never be stable", + cfg_fn!(rustc_attrs))), + (sym::rustc_then_this_would_need, Whitelisted, template!(List: "DepNode"), + Gated(Stability::Unstable, + sym::rustc_attrs, + "the `#[rustc_if_this_changed]` attribute \ + is just used for rustc unit tests \ + and will never be stable", + cfg_fn!(rustc_attrs))), + (sym::rustc_dirty, Whitelisted, template!(List: r#"cfg = "...", /*opt*/ label = "...", /*opt*/ except = "...""#), - Gated(Stability::Unstable, - "rustc_attrs", - "the `#[rustc_dirty]` attribute \ + Gated(Stability::Unstable, + sym::rustc_attrs, + "the `#[rustc_dirty]` attribute \ is just used for rustc unit tests \ and will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_clean", Whitelisted, template!(List: r#"cfg = "...", /*opt*/ label = "...", + cfg_fn!(rustc_attrs))), + (sym::rustc_clean, Whitelisted, template!(List: r#"cfg = "...", /*opt*/ label = "...", /*opt*/ except = "...""#), - Gated(Stability::Unstable, - "rustc_attrs", - "the `#[rustc_clean]` attribute \ + Gated(Stability::Unstable, + sym::rustc_attrs, + "the `#[rustc_clean]` attribute \ is just used for rustc unit tests \ and will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_partition_reused", Whitelisted, template!(List: r#"cfg = "...", module = "...""#), - Gated(Stability::Unstable, - "rustc_attrs", - "this attribute \ - is just used for rustc unit tests \ - and will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_partition_codegened", Whitelisted, template!(List: r#"cfg = "...", module = "...""#), - Gated(Stability::Unstable, - "rustc_attrs", - "this attribute \ - is just used for rustc unit tests \ - and will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_expected_cgu_reuse", Whitelisted, template!(List: r#"cfg = "...", module = "...", - kind = "...""#), + cfg_fn!(rustc_attrs))), + ( + sym::rustc_partition_reused, + Whitelisted, + template!(List: r#"cfg = "...", module = "...""#), + Gated( + Stability::Unstable, + sym::rustc_attrs, + "this attribute \ + is just used for rustc unit tests \ + and will never be stable", + cfg_fn!(rustc_attrs) + ) + ), + ( + sym::rustc_partition_codegened, + Whitelisted, + template!(List: r#"cfg = "...", module = "...""#), + Gated( + Stability::Unstable, + sym::rustc_attrs, + "this attribute \ + is just used for rustc unit tests \ + and will never be stable", + cfg_fn!(rustc_attrs), + ) + ), + (sym::rustc_expected_cgu_reuse, Whitelisted, template!(List: r#"cfg = "...", module = "...", + kind = "...""#), Gated(Stability::Unstable, - "rustc_attrs", + sym::rustc_attrs, "this attribute \ - is just used for rustc unit tests \ - and will never be stable", + is just used for rustc unit tests \ + and will never be stable", cfg_fn!(rustc_attrs))), - ("rustc_synthetic", Whitelisted, template!(Word), Gated(Stability::Unstable, - "rustc_attrs", - "this attribute \ - is just used for rustc unit tests \ - and will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_symbol_name", Whitelisted, template!(Word), Gated(Stability::Unstable, - "rustc_attrs", - "internal rustc attributes will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_def_path", Whitelisted, template!(Word), Gated(Stability::Unstable, - "rustc_attrs", - "internal rustc attributes will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_mir", Whitelisted, template!(List: "arg1, arg2, ..."), Gated(Stability::Unstable, - "rustc_attrs", - "the `#[rustc_mir]` attribute \ - is just used for rustc unit tests \ - and will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_inherit_overflow_checks", Whitelisted, template!(Word), Gated(Stability::Unstable, - "rustc_attrs", - "the `#[rustc_inherit_overflow_checks]` \ - attribute is just used to control \ - overflow checking behavior of several \ - libcore functions that are inlined \ - across crates and will never be stable", - cfg_fn!(rustc_attrs))), - - ("rustc_dump_program_clauses", Whitelisted, template!(Word), Gated(Stability::Unstable, - "rustc_attrs", - "the `#[rustc_dump_program_clauses]` \ - attribute is just used for rustc unit \ - tests and will never be stable", - cfg_fn!(rustc_attrs))), - ("rustc_test_marker", Normal, template!(Word), Gated(Stability::Unstable, - "rustc_attrs", - "the `#[rustc_test_marker]` attribute \ - is used internally to track tests", - cfg_fn!(rustc_attrs))), - ("rustc_transparent_macro", Whitelisted, template!(Word), Gated(Stability::Unstable, - "rustc_attrs", - "used internally for testing macro hygiene", + (sym::rustc_synthetic, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::rustc_attrs, + "this attribute \ + is just used for rustc unit tests \ + and will never be stable", + cfg_fn!(rustc_attrs))), + (sym::rustc_symbol_name, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::rustc_attrs, + "internal rustc attributes will never be stable", + cfg_fn!(rustc_attrs))), + (sym::rustc_def_path, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::rustc_attrs, + "internal rustc attributes will never be stable", + cfg_fn!(rustc_attrs))), + (sym::rustc_mir, Whitelisted, template!(List: "arg1, arg2, ..."), Gated(Stability::Unstable, + sym::rustc_attrs, + "the `#[rustc_mir]` attribute \ + is just used for rustc unit tests \ + and will never be stable", + cfg_fn!(rustc_attrs))), + ( + sym::rustc_inherit_overflow_checks, + Whitelisted, + template!(Word), + Gated( + Stability::Unstable, + sym::rustc_attrs, + "the `#[rustc_inherit_overflow_checks]` \ + attribute is just used to control \ + overflow checking behavior of several \ + libcore functions that are inlined \ + across crates and will never be stable", + cfg_fn!(rustc_attrs), + ) + ), + + (sym::rustc_dump_program_clauses, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::rustc_attrs, + "the `#[rustc_dump_program_clauses]` \ + attribute is just used for rustc unit \ + tests and will never be stable", + cfg_fn!(rustc_attrs))), + (sym::rustc_test_marker, Normal, template!(Word), Gated(Stability::Unstable, + sym::rustc_attrs, + "the `#[rustc_test_marker]` attribute \ + is used internally to track tests", + cfg_fn!(rustc_attrs))), + (sym::rustc_transparent_macro, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::rustc_attrs, + "used internally for testing macro hygiene", cfg_fn!(rustc_attrs))), - ("compiler_builtins", Whitelisted, template!(Word), Gated(Stability::Unstable, - "compiler_builtins", - "the `#[compiler_builtins]` attribute is used to \ - identify the `compiler_builtins` crate which \ - contains compiler-rt intrinsics and will never be \ - stable", - cfg_fn!(compiler_builtins))), - ("sanitizer_runtime", Whitelisted, template!(Word), Gated(Stability::Unstable, - "sanitizer_runtime", - "the `#[sanitizer_runtime]` attribute is used to \ - identify crates that contain the runtime of a \ - sanitizer and will never be stable", - cfg_fn!(sanitizer_runtime))), - ("profiler_runtime", Whitelisted, template!(Word), Gated(Stability::Unstable, - "profiler_runtime", - "the `#[profiler_runtime]` attribute is used to \ - identify the `profiler_builtins` crate which \ - contains the profiler runtime and will never be \ - stable", - cfg_fn!(profiler_runtime))), - - ("allow_internal_unstable", Normal, template!(Word, List: "feat1, feat2, ..."), - Gated(Stability::Unstable, - "allow_internal_unstable", - EXPLAIN_ALLOW_INTERNAL_UNSTABLE, - cfg_fn!(allow_internal_unstable))), - - ("allow_internal_unsafe", Normal, template!(Word), Gated(Stability::Unstable, - "allow_internal_unsafe", + (sym::compiler_builtins, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::compiler_builtins, + "the `#[compiler_builtins]` attribute is used to \ + identify the `compiler_builtins` crate which \ + contains compiler-rt intrinsics and will never be \ + stable", + cfg_fn!(compiler_builtins))), + (sym::sanitizer_runtime, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::sanitizer_runtime, + "the `#[sanitizer_runtime]` attribute is used to \ + identify crates that contain the runtime of a \ + sanitizer and will never be stable", + cfg_fn!(sanitizer_runtime))), + (sym::profiler_runtime, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::profiler_runtime, + "the `#[profiler_runtime]` attribute is used to \ + identify the `profiler_builtins` crate which \ + contains the profiler runtime and will never be \ + stable", + cfg_fn!(profiler_runtime))), + + (sym::allow_internal_unstable, Normal, template!(Word, List: "feat1, feat2, ..."), + Gated(Stability::Unstable, + sym::allow_internal_unstable, + EXPLAIN_ALLOW_INTERNAL_UNSTABLE, + cfg_fn!(allow_internal_unstable))), + + (sym::allow_internal_unsafe, Normal, template!(Word), Gated(Stability::Unstable, + sym::allow_internal_unsafe, EXPLAIN_ALLOW_INTERNAL_UNSAFE, cfg_fn!(allow_internal_unsafe))), - ("fundamental", Whitelisted, template!(Word), Gated(Stability::Unstable, - "fundamental", - "the `#[fundamental]` attribute \ + (sym::fundamental, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::fundamental, + "the `#[fundamental]` attribute \ is an experimental feature", - cfg_fn!(fundamental))), + cfg_fn!(fundamental))), - ("proc_macro_derive", Normal, template!(List: "TraitName, \ - /*opt*/ attributes(name1, name2, ...)"), - Ungated), + (sym::proc_macro_derive, Normal, template!(List: "TraitName, \ + /*opt*/ attributes(name1, name2, ...)"), + Ungated), - ("rustc_copy_clone_marker", Whitelisted, template!(Word), Gated(Stability::Unstable, - "rustc_attrs", - "internal implementation detail", - cfg_fn!(rustc_attrs))), + (sym::rustc_copy_clone_marker, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::rustc_attrs, + "internal implementation detail", + cfg_fn!(rustc_attrs))), // FIXME: #14408 whitelist docs since rustdoc looks at them - ("doc", Whitelisted, template!(List: "hidden|inline|...", NameValueStr: "string"), Ungated), + ( + sym::doc, + Whitelisted, + template!(List: "hidden|inline|...", NameValueStr: "string"), + Ungated + ), // FIXME: #14406 these are processed in codegen, which happens after the // lint pass - ("cold", Whitelisted, template!(Word), Ungated), - ("naked", Whitelisted, template!(Word), Gated(Stability::Unstable, - "naked_functions", - "the `#[naked]` attribute \ - is an experimental feature", - cfg_fn!(naked_functions))), - ("ffi_returns_twice", Whitelisted, template!(Word), Gated(Stability::Unstable, - "ffi_returns_twice", - "the `#[ffi_returns_twice]` attribute \ - is an experimental feature", - cfg_fn!(ffi_returns_twice))), - ("target_feature", Whitelisted, template!(List: r#"enable = "name""#), Ungated), - ("export_name", Whitelisted, template!(NameValueStr: "name"), Ungated), - ("inline", Whitelisted, template!(Word, List: "always|never"), Ungated), - ("link", Whitelisted, template!(List: r#"name = "...", /*opt*/ kind = "dylib|static|...", - /*opt*/ cfg = "...""#), Ungated), - ("link_name", Whitelisted, template!(NameValueStr: "name"), Ungated), - ("link_section", Whitelisted, template!(NameValueStr: "name"), Ungated), - ("no_builtins", Whitelisted, template!(Word), Ungated), - ("no_mangle", Whitelisted, template!(Word), Ungated), - ("no_debug", Whitelisted, template!(Word), Gated( + (sym::cold, Whitelisted, template!(Word), Ungated), + (sym::naked, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::naked_functions, + "the `#[naked]` attribute \ + is an experimental feature", + cfg_fn!(naked_functions))), + (sym::ffi_returns_twice, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::ffi_returns_twice, + "the `#[ffi_returns_twice]` attribute \ + is an experimental feature", + cfg_fn!(ffi_returns_twice))), + (sym::target_feature, Whitelisted, template!(List: r#"enable = "name""#), Ungated), + (sym::export_name, Whitelisted, template!(NameValueStr: "name"), Ungated), + (sym::inline, Whitelisted, template!(Word, List: "always|never"), Ungated), + (sym::link, Whitelisted, template!(List: r#"name = "...", /*opt*/ kind = "dylib|static|...", + /*opt*/ cfg = "...""#), Ungated), + (sym::link_name, Whitelisted, template!(NameValueStr: "name"), Ungated), + (sym::link_section, Whitelisted, template!(NameValueStr: "name"), Ungated), + (sym::no_builtins, Whitelisted, template!(Word), Ungated), + (sym::no_debug, Whitelisted, template!(Word), Gated( Stability::Deprecated("https://github.com/rust-lang/rust/issues/29721", None), - "no_debug", + sym::no_debug, "the `#[no_debug]` attribute was an experimental feature that has been \ - deprecated due to lack of demand", + deprecated due to lack of demand", cfg_fn!(no_debug))), - ("omit_gdb_pretty_printer_section", Whitelisted, template!(Word), Gated(Stability::Unstable, - "omit_gdb_pretty_printer_section", - "the `#[omit_gdb_pretty_printer_section]` \ - attribute is just used for the Rust test \ - suite", - cfg_fn!(omit_gdb_pretty_printer_section))), - ("unsafe_destructor_blind_to_params", - Normal, - template!(Word), - Gated(Stability::Deprecated("https://github.com/rust-lang/rust/issues/34761", - Some("replace this attribute with `#[may_dangle]`")), - "dropck_parametricity", - "unsafe_destructor_blind_to_params has been replaced by \ + ( + sym::omit_gdb_pretty_printer_section, + Whitelisted, + template!(Word), + Gated( + Stability::Unstable, + sym::omit_gdb_pretty_printer_section, + "the `#[omit_gdb_pretty_printer_section]` \ + attribute is just used for the Rust test \ + suite", + cfg_fn!(omit_gdb_pretty_printer_section) + ) + ), + (sym::unsafe_destructor_blind_to_params, + Normal, + template!(Word), + Gated(Stability::Deprecated("https://github.com/rust-lang/rust/issues/34761", + Some("replace this attribute with `#[may_dangle]`")), + sym::dropck_parametricity, + "unsafe_destructor_blind_to_params has been replaced by \ may_dangle and will be removed in the future", - cfg_fn!(dropck_parametricity))), - ("may_dangle", - Normal, - template!(Word), - Gated(Stability::Unstable, - "dropck_eyepatch", - "may_dangle has unstable semantics and may be removed in the future", - cfg_fn!(dropck_eyepatch))), - ("unwind", Whitelisted, template!(List: "allowed|aborts"), Gated(Stability::Unstable, - "unwind_attributes", - "#[unwind] is experimental", - cfg_fn!(unwind_attributes))), - ("used", Whitelisted, template!(Word), Ungated), + cfg_fn!(dropck_parametricity))), + (sym::may_dangle, + Normal, + template!(Word), + Gated(Stability::Unstable, + sym::dropck_eyepatch, + "may_dangle has unstable semantics and may be removed in the future", + cfg_fn!(dropck_eyepatch))), + (sym::unwind, Whitelisted, template!(List: "allowed|aborts"), Gated(Stability::Unstable, + sym::unwind_attributes, + "#[unwind] is experimental", + cfg_fn!(unwind_attributes))), + (sym::used, Whitelisted, template!(Word), Ungated), // used in resolve - ("prelude_import", Whitelisted, template!(Word), Gated(Stability::Unstable, - "prelude_import", - "`#[prelude_import]` is for use by rustc only", - cfg_fn!(prelude_import))), + (sym::prelude_import, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::prelude_import, + "`#[prelude_import]` is for use by rustc only", + cfg_fn!(prelude_import))), // FIXME: #14407 these are only looked at on-demand so we can't // guarantee they'll have already been checked - ("rustc_deprecated", Whitelisted, template!(List: r#"since = "version", reason = "...""#), - Ungated), - ("must_use", Whitelisted, template!(Word, NameValueStr: "reason"), Ungated), - ("stable", Whitelisted, template!(List: r#"feature = "name", since = "version""#), Ungated), - ("unstable", Whitelisted, template!(List: r#"feature = "name", reason = "...", issue = "N""#), - Ungated), - ("deprecated", + ( + sym::rustc_deprecated, + Whitelisted, + template!(List: r#"since = "version", reason = "...""#), + Ungated + ), + (sym::must_use, Whitelisted, template!(Word, NameValueStr: "reason"), Ungated), + ( + sym::stable, + Whitelisted, + template!(List: r#"feature = "name", since = "version""#), + Ungated + ), + ( + sym::unstable, + Whitelisted, + template!(List: r#"feature = "name", reason = "...", issue = "N""#), + Ungated + ), + (sym::deprecated, Normal, template!( Word, @@ -1220,79 +1421,95 @@ pub const BUILTIN_ATTRIBUTES: &[(&str, AttributeType, AttributeTemplate, Attribu Ungated ), - ("rustc_paren_sugar", Normal, template!(Word), Gated(Stability::Unstable, - "unboxed_closures", + (sym::rustc_paren_sugar, Normal, template!(Word), Gated(Stability::Unstable, + sym::unboxed_closures, "unboxed_closures are still evolving", cfg_fn!(unboxed_closures))), - ("windows_subsystem", Whitelisted, template!(NameValueStr: "windows|console"), Ungated), + (sym::windows_subsystem, Whitelisted, template!(NameValueStr: "windows|console"), Ungated), - ("proc_macro_attribute", Normal, template!(Word), Ungated), - ("proc_macro", Normal, template!(Word), Ungated), + (sym::proc_macro_attribute, Normal, template!(Word), Ungated), + (sym::proc_macro, Normal, template!(Word), Ungated), - ("rustc_proc_macro_decls", Normal, template!(Word), Gated(Stability::Unstable, - "rustc_attrs", - "used internally by rustc", - cfg_fn!(rustc_attrs))), + (sym::rustc_proc_macro_decls, Normal, template!(Word), Gated(Stability::Unstable, + sym::rustc_attrs, + "used internally by rustc", + cfg_fn!(rustc_attrs))), - ("allow_fail", Normal, template!(Word), Gated(Stability::Unstable, - "allow_fail", - "allow_fail attribute is currently unstable", - cfg_fn!(allow_fail))), + (sym::allow_fail, Normal, template!(Word), Gated(Stability::Unstable, + sym::allow_fail, + "allow_fail attribute is currently unstable", + cfg_fn!(allow_fail))), - ("rustc_std_internal_symbol", Whitelisted, template!(Word), Gated(Stability::Unstable, - "rustc_attrs", - "this is an internal attribute that will \ - never be stable", - cfg_fn!(rustc_attrs))), + (sym::rustc_std_internal_symbol, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::rustc_attrs, + "this is an internal attribute that will \ + never be stable", + cfg_fn!(rustc_attrs))), // whitelists "identity-like" conversion methods to suggest on type mismatch - ("rustc_conversion_suggestion", Whitelisted, template!(Word), Gated(Stability::Unstable, - "rustc_attrs", - "this is an internal attribute that will \ + (sym::rustc_conversion_suggestion, Whitelisted, template!(Word), Gated(Stability::Unstable, + sym::rustc_attrs, + "this is an internal attribute that will \ never be stable", - cfg_fn!(rustc_attrs))), + cfg_fn!(rustc_attrs))), - ("rustc_args_required_const", Whitelisted, template!(List: "N"), Gated(Stability::Unstable, - "rustc_attrs", - "never will be stable", - cfg_fn!(rustc_attrs))), + ( + sym::rustc_args_required_const, + Whitelisted, + template!(List: "N"), + Gated(Stability::Unstable, sym::rustc_attrs, "never will be stable", + cfg_fn!(rustc_attrs)) + ), // RFC 2070 - ("panic_handler", Normal, template!(Word), Ungated), + (sym::panic_handler, Normal, template!(Word), Ungated), - ("alloc_error_handler", Normal, template!(Word), Gated(Stability::Unstable, - "alloc_error_handler", - "#[alloc_error_handler] is an unstable feature", - cfg_fn!(alloc_error_handler))), + (sym::alloc_error_handler, Normal, template!(Word), Gated(Stability::Unstable, + sym::alloc_error_handler, + "#[alloc_error_handler] is an unstable feature", + cfg_fn!(alloc_error_handler))), // RFC 2412 - ("optimize", Whitelisted, template!(List: "size|speed"), Gated(Stability::Unstable, - "optimize_attribute", - "#[optimize] attribute is an unstable feature", - cfg_fn!(optimize_attribute))), + (sym::optimize, Whitelisted, template!(List: "size|speed"), Gated(Stability::Unstable, + sym::optimize_attribute, + "#[optimize] attribute is an unstable feature", + cfg_fn!(optimize_attribute))), // Crate level attributes - ("crate_name", CrateLevel, template!(NameValueStr: "name"), Ungated), - ("crate_type", CrateLevel, template!(NameValueStr: "bin|lib|..."), Ungated), - ("crate_id", CrateLevel, template!(NameValueStr: "ignored"), Ungated), - ("feature", CrateLevel, template!(List: "name1, name1, ..."), Ungated), - ("no_start", CrateLevel, template!(Word), Ungated), - ("no_main", CrateLevel, template!(Word), Ungated), - ("no_builtins", CrateLevel, template!(Word), Ungated), - ("recursion_limit", CrateLevel, template!(NameValueStr: "N"), Ungated), - ("type_length_limit", CrateLevel, template!(NameValueStr: "N"), Ungated), - ("test_runner", CrateLevel, template!(List: "path"), Gated(Stability::Unstable, - "custom_test_frameworks", + (sym::crate_name, CrateLevel, template!(NameValueStr: "name"), Ungated), + (sym::crate_type, CrateLevel, template!(NameValueStr: "bin|lib|..."), Ungated), + (sym::crate_id, CrateLevel, template!(NameValueStr: "ignored"), Ungated), + (sym::feature, CrateLevel, template!(List: "name1, name1, ..."), Ungated), + (sym::no_start, CrateLevel, template!(Word), Ungated), + (sym::no_main, CrateLevel, template!(Word), Ungated), + (sym::recursion_limit, CrateLevel, template!(NameValueStr: "N"), Ungated), + (sym::type_length_limit, CrateLevel, template!(NameValueStr: "N"), Ungated), + (sym::test_runner, CrateLevel, template!(List: "path"), Gated(Stability::Unstable, + sym::custom_test_frameworks, EXPLAIN_CUSTOM_TEST_FRAMEWORKS, cfg_fn!(custom_test_frameworks))), ]; +pub type BuiltinAttribute = (Symbol, AttributeType, AttributeTemplate, AttributeGate); + +lazy_static! { + pub static ref BUILTIN_ATTRIBUTE_MAP: FxHashMap = { + let mut map = FxHashMap::default(); + for attr in BUILTIN_ATTRIBUTES.iter() { + if map.insert(attr.0, attr).is_some() { + panic!("duplicate builtin attribute `{}`", attr.0); + } + } + map + }; +} + // cfg(...)'s that are feature gated -const GATED_CFGS: &[(&str, &str, fn(&Features) -> bool)] = &[ +const GATED_CFGS: &[(Symbol, Symbol, fn(&Features) -> bool)] = &[ // (name in cfg, feature, function to check if the feature is enabled) - ("target_thread_local", "cfg_target_thread_local", cfg_fn!(cfg_target_thread_local)), - ("target_has_atomic", "cfg_target_has_atomic", cfg_fn!(cfg_target_has_atomic)), - ("rustdoc", "doc_cfg", cfg_fn!(doc_cfg)), + (sym::target_thread_local, sym::cfg_target_thread_local, cfg_fn!(cfg_target_thread_local)), + (sym::target_has_atomic, sym::cfg_target_has_atomic, cfg_fn!(cfg_target_has_atomic)), + (sym::rustdoc, sym::doc_cfg, cfg_fn!(doc_cfg)), ]; #[derive(Debug)] @@ -1325,7 +1542,7 @@ impl GatedCfg { struct Context<'a> { features: &'a Features, parse_sess: &'a ParseSess, - plugin_attributes: &'a [(String, AttributeType)], + plugin_attributes: &'a [(Symbol, AttributeType)], } macro_rules! gate_feature_fn { @@ -1344,41 +1561,43 @@ macro_rules! gate_feature_fn { macro_rules! gate_feature { ($cx: expr, $feature: ident, $span: expr, $explain: expr) => { gate_feature_fn!($cx, |x:&Features| x.$feature, $span, - stringify!($feature), $explain, GateStrength::Hard) + sym::$feature, $explain, GateStrength::Hard) }; ($cx: expr, $feature: ident, $span: expr, $explain: expr, $level: expr) => { gate_feature_fn!($cx, |x:&Features| x.$feature, $span, - stringify!($feature), $explain, $level) + sym::$feature, $explain, $level) }; } impl<'a> Context<'a> { - fn check_attribute(&self, attr: &ast::Attribute, is_macro: bool) { + fn check_attribute( + &self, + attr: &ast::Attribute, + attr_info: Option<&BuiltinAttribute>, + is_macro: bool + ) { debug!("check_attribute(attr = {:?})", attr); - let name = attr.name_or_empty(); - for &(n, ty, _template, ref gateage) in BUILTIN_ATTRIBUTES { - if name == n { - if let Gated(_, name, desc, ref has_feature) = *gateage { - if !attr.span.allows_unstable(name) { - gate_feature_fn!( - self, has_feature, attr.span, name, desc, GateStrength::Hard + if let Some(&(name, ty, _template, ref gateage)) = attr_info { + if let Gated(_, name, desc, ref has_feature) = *gateage { + if !attr.span.allows_unstable(name) { + gate_feature_fn!( + self, has_feature, attr.span, name, desc, GateStrength::Hard + ); + } + } else if name == sym::doc { + if let Some(content) = attr.meta_item_list() { + if content.iter().any(|c| c.check_name(sym::include)) { + gate_feature!(self, external_doc, attr.span, + "#[doc(include = \"...\")] is experimental" ); } - } else if n == "doc" { - if let Some(content) = attr.meta_item_list() { - if content.iter().any(|c| c.check_name("include")) { - gate_feature!(self, external_doc, attr.span, - "#[doc(include = \"...\")] is experimental" - ); - } - } } - debug!("check_attribute: {:?} is builtin, {:?}, {:?}", attr.path, ty, gateage); - return; } + debug!("check_attribute: {:?} is builtin, {:?}, {:?}", attr.path, ty, gateage); + return; } - for &(ref n, ref ty) in self.plugin_attributes { - if attr.path == &**n { + for &(n, ty) in self.plugin_attributes { + if attr.path == n { // Plugins can't gate attributes, so we don't check for it // unlike the code above; we only use this loop to // short-circuit to avoid the checks below. @@ -1387,7 +1606,7 @@ impl<'a> Context<'a> { } } if !attr::is_known(attr) { - if name.starts_with("rustc_") { + if attr.name_or_empty().as_str().starts_with("rustc_") { let msg = "unless otherwise specified, attributes with the prefix `rustc_` \ are reserved for internal compiler diagnostics"; gate_feature!(self, rustc_attrs, attr.span, msg); @@ -1405,10 +1624,14 @@ impl<'a> Context<'a> { pub fn check_attribute(attr: &ast::Attribute, parse_sess: &ParseSess, features: &Features) { let cx = Context { features: features, parse_sess: parse_sess, plugin_attributes: &[] }; - cx.check_attribute(attr, true); + cx.check_attribute( + attr, + attr.ident().and_then(|ident| BUILTIN_ATTRIBUTE_MAP.get(&ident.name).map(|a| *a)), + true + ); } -fn find_lang_feature_issue(feature: &str) -> Option { +fn find_lang_feature_issue(feature: Symbol) -> Option { if let Some(info) = ACTIVE_FEATURES.iter().find(|t| t.0 == feature) { let issue = info.2; // FIXME (#28244): enforce that active features have issue numbers @@ -1438,18 +1661,34 @@ pub enum GateStrength { Soft, } -pub fn emit_feature_err(sess: &ParseSess, feature: &str, span: Span, issue: GateIssue, - explain: &str) { +pub fn emit_feature_err( + sess: &ParseSess, + feature: Symbol, + span: Span, + issue: GateIssue, + explain: &str, +) { feature_err(sess, feature, span, issue, explain).emit(); } -pub fn feature_err<'a>(sess: &'a ParseSess, feature: &str, span: Span, issue: GateIssue, - explain: &str) -> DiagnosticBuilder<'a> { +pub fn feature_err<'a>( + sess: &'a ParseSess, + feature: Symbol, + span: Span, + issue: GateIssue, + explain: &str, +) -> DiagnosticBuilder<'a> { leveled_feature_err(sess, feature, span, issue, explain, GateStrength::Hard) } -fn leveled_feature_err<'a>(sess: &'a ParseSess, feature: &str, span: Span, issue: GateIssue, - explain: &str, level: GateStrength) -> DiagnosticBuilder<'a> { +fn leveled_feature_err<'a>( + sess: &'a ParseSess, + feature: Symbol, + span: Span, + issue: GateIssue, + explain: &str, + level: GateStrength, +) -> DiagnosticBuilder<'a> { let diag = &sess.span_diagnostic; let issue = match issue { @@ -1457,23 +1696,26 @@ fn leveled_feature_err<'a>(sess: &'a ParseSess, feature: &str, span: Span, issue GateIssue::Library(lib) => lib, }; - let explanation = match issue { - None | Some(0) => explain.to_owned(), - Some(n) => format!("{} (see issue #{})", explain, n) - }; - let mut err = match level { GateStrength::Hard => { - diag.struct_span_err_with_code(span, &explanation, stringify_error_code!(E0658)) + diag.struct_span_err_with_code(span, explain, stringify_error_code!(E0658)) } - GateStrength::Soft => diag.struct_span_warn(span, &explanation), + GateStrength::Soft => diag.struct_span_warn(span, explain), }; + match issue { + None | Some(0) => {} // We still accept `0` as a stand-in for backwards compatibility + Some(n) => { + err.note(&format!( + "for more information, see https://github.com/rust-lang/rust/issues/{}", + n, + )); + } + } + // #23973: do not suggest `#![feature(...)]` if we are in beta/stable if sess.unstable_features.is_nightly_build() { - err.help(&format!("add #![feature({})] to the \ - crate attributes to enable", - feature)); + err.help(&format!("add #![feature({})] to the crate attributes to enable", feature)); } // If we're on stable and only emitting a "soft" warning, add a note to @@ -1488,10 +1730,10 @@ fn leveled_feature_err<'a>(sess: &'a ParseSess, feature: &str, span: Span, issue } const EXPLAIN_BOX_SYNTAX: &str = - "box expression syntax is experimental; you can call `Box::new` instead."; + "box expression syntax is experimental; you can call `Box::new` instead"; pub const EXPLAIN_STMT_ATTR_SYNTAX: &str = - "attributes on expressions are experimental."; + "attributes on expressions are experimental"; pub const EXPLAIN_ASM: &str = "inline assembly is not stable enough for use and is subject to change"; @@ -1523,18 +1765,19 @@ pub const EXPLAIN_UNSIZED_TUPLE_COERCION: &str = struct PostExpansionVisitor<'a> { context: &'a Context<'a>, + builtin_attributes: &'static FxHashMap, } macro_rules! gate_feature_post { ($cx: expr, $feature: ident, $span: expr, $explain: expr) => {{ let (cx, span) = ($cx, $span); - if !span.allows_unstable(stringify!($feature)) { + if !span.allows_unstable(sym::$feature) { gate_feature!(cx.context, $feature, span, $explain) } }}; ($cx: expr, $feature: ident, $span: expr, $explain: expr, $level: expr) => {{ let (cx, span) = ($cx, $span); - if !span.allows_unstable(stringify!($feature)) { + if !span.allows_unstable(sym::$feature) { gate_feature!(cx.context, $feature, span, $explain, $level) } }} @@ -1596,15 +1839,15 @@ impl<'a> PostExpansionVisitor<'a> { } } - fn check_builtin_attribute(&mut self, attr: &ast::Attribute, name: &str, + fn check_builtin_attribute(&mut self, attr: &ast::Attribute, name: Symbol, template: AttributeTemplate) { // Some special attributes like `cfg` must be checked // before the generic check, so we skip them here. - let should_skip = |name| name == "cfg"; + let should_skip = |name| name == sym::cfg; // Some of previously accepted forms were used in practice, // report them as warnings for now. - let should_warn = |name| name == "doc" || name == "ignore" || - name == "inline" || name == "link"; + let should_warn = |name| name == sym::doc || name == sym::ignore || + name == sym::inline || name == sym::link; match attr.parse_meta(self.context.parse_sess) { Ok(meta) => if !should_skip(name) && !template.compatible(&meta.node) { @@ -1645,28 +1888,32 @@ impl<'a> PostExpansionVisitor<'a> { impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { fn visit_attribute(&mut self, attr: &ast::Attribute) { + let attr_info = attr.ident().and_then(|ident| { + self.builtin_attributes.get(&ident.name).map(|a| *a) + }); + // check for gated attributes - self.context.check_attribute(attr, false); + self.context.check_attribute(attr, attr_info, false); - if attr.check_name("doc") { + if attr.check_name(sym::doc) { if let Some(content) = attr.meta_item_list() { - if content.len() == 1 && content[0].check_name("cfg") { + if content.len() == 1 && content[0].check_name(sym::cfg) { gate_feature_post!(&self, doc_cfg, attr.span, "#[doc(cfg(...))] is experimental" ); - } else if content.iter().any(|c| c.check_name("masked")) { + } else if content.iter().any(|c| c.check_name(sym::masked)) { gate_feature_post!(&self, doc_masked, attr.span, "#[doc(masked)] is experimental" ); - } else if content.iter().any(|c| c.check_name("spotlight")) { + } else if content.iter().any(|c| c.check_name(sym::spotlight)) { gate_feature_post!(&self, doc_spotlight, attr.span, "#[doc(spotlight)] is experimental" ); - } else if content.iter().any(|c| c.check_name("alias")) { + } else if content.iter().any(|c| c.check_name(sym::alias)) { gate_feature_post!(&self, doc_alias, attr.span, "#[doc(alias = \"...\")] is experimental" ); - } else if content.iter().any(|c| c.check_name("keyword")) { + } else if content.iter().any(|c| c.check_name(sym::keyword)) { gate_feature_post!(&self, doc_keyword, attr.span, "#[doc(keyword = \"...\")] is experimental" ); @@ -1674,8 +1921,12 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { } } - match BUILTIN_ATTRIBUTES.iter().find(|(name, ..)| attr.path == name) { - Some(&(name, _, template, _)) => self.check_builtin_attribute(attr, name, template), + match attr_info { + Some(&(name, _, template, _)) => self.check_builtin_attribute( + attr, + name, + template + ), None => if let Some(TokenTree::Token(_, token::Eq)) = attr.tokens.trees().next() { // All key-value attributes are restricted to meta-item syntax. attr.parse_meta(self.context.parse_sess).map_err(|mut err| err.emit()).ok(); @@ -1685,17 +1936,19 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { fn visit_name(&mut self, sp: Span, name: ast::Name) { if !name.as_str().is_ascii() { - gate_feature_post!(&self, - non_ascii_idents, - self.context.parse_sess.source_map().def_span(sp), - "non-ascii idents are not fully supported."); + gate_feature_post!( + &self, + non_ascii_idents, + self.context.parse_sess.source_map().def_span(sp), + "non-ascii idents are not fully supported" + ); } } fn visit_item(&mut self, i: &'a ast::Item) { match i.node { ast::ItemKind::Const(_,_) => { - if i.ident.name == "_" { + if i.ident.name == keywords::Underscore.name() { gate_feature_post!(&self, underscore_const_names, i.span, "naming constants with `_` is unstable"); } @@ -1706,17 +1959,17 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { } ast::ItemKind::Fn(..) => { - if attr::contains_name(&i.attrs[..], "plugin_registrar") { + if attr::contains_name(&i.attrs[..], sym::plugin_registrar) { gate_feature_post!(&self, plugin_registrar, i.span, "compiler plugins are experimental and possibly buggy"); } - if attr::contains_name(&i.attrs[..], "start") { + if attr::contains_name(&i.attrs[..], sym::start) { gate_feature_post!(&self, start, i.span, "a #[start] function is an experimental \ feature whose signature may change \ over time"); } - if attr::contains_name(&i.attrs[..], "main") { + if attr::contains_name(&i.attrs[..], sym::main) { gate_feature_post!(&self, main, i.span, "declaration of a nonstandard #[main] \ function may change over time, for now \ @@ -1725,9 +1978,9 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { } ast::ItemKind::Struct(..) => { - for attr in attr::filter_by_name(&i.attrs[..], "repr") { + for attr in attr::filter_by_name(&i.attrs[..], sym::repr) { for item in attr.meta_item_list().unwrap_or_else(Vec::new) { - if item.check_name("simd") { + if item.check_name(sym::simd) { gate_feature_post!(&self, repr_simd, attr.span, "SIMD types are experimental and possibly buggy"); } @@ -1736,9 +1989,9 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { } ast::ItemKind::Enum(..) => { - for attr in attr::filter_by_name(&i.attrs[..], "repr") { + for attr in attr::filter_by_name(&i.attrs[..], sym::repr) { for item in attr.meta_item_list().unwrap_or_else(Vec::new) { - if item.check_name("align") { + if item.check_name(sym::align) { gate_feature_post!(&self, repr_align_enum, attr.span, "`#[repr(align(x))]` on enums is experimental"); } @@ -1800,7 +2053,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { match i.node { ast::ForeignItemKind::Fn(..) | ast::ForeignItemKind::Static(..) => { - let link_name = attr::first_attr_value_str_by_name(&i.attrs, "link_name"); + let link_name = attr::first_attr_value_str_by_name(&i.attrs, sym::link_name); let links_to_llvm = match link_name { Some(val) => val.as_str().starts_with("llvm."), _ => false @@ -1880,6 +2133,20 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { ast::ExprKind::Async(..) => { gate_feature_post!(&self, async_await, e.span, "async blocks are unstable"); } + ast::ExprKind::Await(origin, _) => { + match origin { + ast::AwaitOrigin::FieldLike => + gate_feature_post!(&self, async_await, e.span, "async/await is unstable"), + ast::AwaitOrigin::MacroLike => + gate_feature_post!( + &self, + await_macro, + e.span, + "`await!()` macro syntax is unstable, and will soon be removed \ + in favor of `.await` syntax." + ), + } + } _ => {} } visit::walk_expr(self, e); @@ -1915,28 +2182,22 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { fn_decl: &'a ast::FnDecl, span: Span, _node_id: NodeId) { - match fn_kind { - FnKind::ItemFn(_, header, _, _) => { - // Check for const fn and async fn declarations. - if header.asyncness.node.is_async() { - gate_feature_post!(&self, async_await, span, "async fn is unstable"); - } + if let Some(header) = fn_kind.header() { + // Check for const fn and async fn declarations. + if header.asyncness.node.is_async() { + gate_feature_post!(&self, async_await, span, "async fn is unstable"); + } - if fn_decl.c_variadic { - gate_feature_post!(&self, c_variadic, span, - "C-varaidic functions are unstable"); - } - // Stability of const fn methods are covered in - // `visit_trait_item` and `visit_impl_item` below; this is - // because default methods don't pass through this point. + // Stability of const fn methods are covered in + // `visit_trait_item` and `visit_impl_item` below; this is + // because default methods don't pass through this point. + self.check_abi(header.abi, span); + } - self.check_abi(header.abi, span); - } - FnKind::Method(_, sig, _, _) => { - self.check_abi(sig.header.abi, span); - } - _ => {} + if fn_decl.c_variadic { + gate_feature_post!(&self, c_variadic, span, "C-variadic functions are unstable"); } + visit::walk_fn(self, fn_kind, fn_decl, span); } @@ -1954,9 +2215,12 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { if block.is_none() { self.check_abi(sig.header.abi, ti.span); } + if sig.header.asyncness.node.is_async() { + gate_feature_post!(&self, async_await, ti.span, "async fn is unstable"); + } if sig.decl.c_variadic { gate_feature_post!(&self, c_variadic, ti.span, - "C-varaidic functions are unstable"); + "C-variadic functions are unstable"); } if sig.header.constness.node == ast::Constness::Const { gate_feature_post!(&self, const_fn, ti.span, "const fn is unstable"); @@ -2034,11 +2298,6 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute], err.emit(); } - // Some features are known to be incomplete and using them is likely to have - // unanticipated results, such as compiler crashes. We warn the user about these - // to alert them. - let incomplete_features = ["generic_associated_types", "const_generics"]; - let mut features = Features::new(); let mut edition_enabled_features = FxHashMap::default(); @@ -2046,7 +2305,7 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute], if edition <= crate_edition { // The `crate_edition` implies its respective umbrella feature-gate // (i.e., `#![feature(rust_20XX_preview)]` isn't needed on edition 20XX). - edition_enabled_features.insert(Symbol::intern(edition.feature_name()), edition); + edition_enabled_features.insert(edition.feature_name(), edition); } } @@ -2054,7 +2313,7 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute], if let Some(f_edition) = f_edition { if f_edition <= crate_edition { set(&mut features, DUMMY_SP); - edition_enabled_features.insert(Symbol::intern(name), crate_edition); + edition_enabled_features.insert(name, crate_edition); } } } @@ -2062,7 +2321,7 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute], // Process the edition umbrella feature-gates first, to ensure // `edition_enabled_features` is completed before it's queried. for attr in krate_attrs { - if !attr.check_name("feature") { + if !attr.check_name(sym::feature) { continue } @@ -2077,7 +2336,7 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute], } let name = mi.name_or_empty(); - if incomplete_features.iter().any(|f| name == *f) { + if INCOMPLETE_FEATURES.iter().any(|f| name == *f) { span_handler.struct_span_warn( mi.span(), &format!( @@ -2098,7 +2357,7 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute], // FIXME(Manishearth) there is currently no way to set // lib features by edition set(&mut features, DUMMY_SP); - edition_enabled_features.insert(Symbol::intern(name), *edition); + edition_enabled_features.insert(name, *edition); } } } @@ -2107,7 +2366,7 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute], } for attr in krate_attrs { - if !attr.check_name("feature") { + if !attr.check_name(sym::feature) { continue } @@ -2143,32 +2402,32 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute], continue; } - if let Some((.., set)) = ACTIVE_FEATURES.iter().find(|f| name == f.0) { - if let Some(allowed) = allow_features.as_ref() { - if allowed.iter().find(|f| *f == name.as_str()).is_none() { - span_err!(span_handler, mi.span(), E0725, - "the feature `{}` is not in the list of allowed features", - name); - continue; - } - } - - set(&mut features, mi.span()); - features.declared_lang_features.push((name, mi.span(), None)); - continue - } - let removed = REMOVED_FEATURES.iter().find(|f| name == f.0); let stable_removed = STABLE_REMOVED_FEATURES.iter().find(|f| name == f.0); if let Some((.., reason)) = removed.or(stable_removed) { feature_removed(span_handler, mi.span(), *reason); - continue + continue; } if let Some((_, since, ..)) = ACCEPTED_FEATURES.iter().find(|f| name == f.0) { let since = Some(Symbol::intern(since)); features.declared_lang_features.push((name, mi.span(), since)); - continue + continue; + } + + if let Some(allowed) = allow_features.as_ref() { + if allowed.iter().find(|f| *f == name.as_str()).is_none() { + span_err!(span_handler, mi.span(), E0725, + "the feature `{}` is not in the list of allowed features", + name); + continue; + } + } + + if let Some((.., set)) = ACTIVE_FEATURES.iter().find(|f| name == f.0) { + set(&mut features, mi.span()); + features.declared_lang_features.push((name, mi.span(), None)); + continue; } features.declared_lib_features.push((name, mi.span())); @@ -2181,7 +2440,7 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute], pub fn check_crate(krate: &ast::Crate, sess: &ParseSess, features: &Features, - plugin_attributes: &[(String, AttributeType)], + plugin_attributes: &[(Symbol, AttributeType)], unstable: UnstableFeatures) { maybe_stage_features(&sess.span_diagnostic, krate, unstable); let ctx = Context { @@ -2189,8 +2448,10 @@ pub fn check_crate(krate: &ast::Crate, parse_sess: sess, plugin_attributes, }; - - let visitor = &mut PostExpansionVisitor { context: &ctx }; + let visitor = &mut PostExpansionVisitor { + context: &ctx, + builtin_attributes: &*BUILTIN_ATTRIBUTE_MAP, + }; visit::walk_crate(visitor, krate); } @@ -2237,7 +2498,7 @@ fn maybe_stage_features(span_handler: &Handler, krate: &ast::Crate, }; if !allow_features { for attr in &krate.attrs { - if attr.check_name("feature") { + if attr.check_name(sym::feature) { let release_channel = option_env!("CFG_RELEASE_CHANNEL").unwrap_or("(unknown)"); span_err!(span_handler, attr.span, E0554, "#![feature] may not be used on the {} release channel", diff --git a/src/libsyntax/json.rs b/src/libsyntax/json.rs index 9acd0d099a..2dd2ecb749 100644 --- a/src/libsyntax/json.rs +++ b/src/libsyntax/json.rs @@ -14,11 +14,12 @@ use crate::source_map::{SourceMap, FilePathMapping}; use errors::registry::Registry; use errors::{DiagnosticBuilder, SubDiagnostic, CodeSuggestion, SourceMapper}; use errors::{DiagnosticId, Applicability}; -use errors::emitter::{Emitter, EmitterWriter}; +use errors::emitter::{Emitter, HumanReadableErrorType}; use syntax_pos::{MacroBacktrace, Span, SpanLabel, MultiSpan}; use rustc_data_structures::sync::{self, Lrc}; use std::io::{self, Write}; +use std::path::Path; use std::vec; use std::sync::{Arc, Mutex}; @@ -30,37 +31,46 @@ pub struct JsonEmitter { sm: Lrc, pretty: bool, ui_testing: bool, + json_rendered: HumanReadableErrorType, } impl JsonEmitter { - pub fn stderr(registry: Option, - source_map: Lrc, - pretty: bool) -> JsonEmitter { + pub fn stderr( + registry: Option, + source_map: Lrc, + pretty: bool, + json_rendered: HumanReadableErrorType, + ) -> JsonEmitter { JsonEmitter { dst: Box::new(io::stderr()), registry, sm: source_map, pretty, ui_testing: false, + json_rendered, } } - pub fn basic(pretty: bool) -> JsonEmitter { + pub fn basic(pretty: bool, json_rendered: HumanReadableErrorType) -> JsonEmitter { let file_path_mapping = FilePathMapping::empty(); JsonEmitter::stderr(None, Lrc::new(SourceMap::new(file_path_mapping)), - pretty) + pretty, json_rendered) } - pub fn new(dst: Box, - registry: Option, - source_map: Lrc, - pretty: bool) -> JsonEmitter { + pub fn new( + dst: Box, + registry: Option, + source_map: Lrc, + pretty: bool, + json_rendered: HumanReadableErrorType, + ) -> JsonEmitter { JsonEmitter { dst, registry, sm: source_map, pretty, ui_testing: false, + json_rendered, } } @@ -70,7 +80,7 @@ impl JsonEmitter { } impl Emitter for JsonEmitter { - fn emit(&mut self, db: &DiagnosticBuilder<'_>) { + fn emit_diagnostic(&mut self, db: &DiagnosticBuilder<'_>) { let data = Diagnostic::from_diagnostic_builder(db, self); let result = if self.pretty { writeln!(&mut self.dst, "{}", as_pretty_json(&data)) @@ -81,6 +91,18 @@ impl Emitter for JsonEmitter { panic!("failed to print diagnostics: {:?}", e); } } + + fn emit_artifact_notification(&mut self, path: &Path) { + let data = ArtifactNotification { artifact: path }; + let result = if self.pretty { + writeln!(&mut self.dst, "{}", as_pretty_json(&data)) + } else { + writeln!(&mut self.dst, "{}", as_json(&data)) + }; + if let Err(e) = result { + panic!("failed to print notification: {:?}", e); + } + } } // The following data types are provided just for serialisation. @@ -159,6 +181,12 @@ struct DiagnosticCode { explanation: Option<&'static str>, } +#[derive(RustcEncodable)] +struct ArtifactNotification<'a> { + /// The path of the artifact. + artifact: &'a Path, +} + impl Diagnostic { fn from_diagnostic_builder(db: &DiagnosticBuilder<'_>, je: &JsonEmitter) @@ -190,8 +218,8 @@ impl Diagnostic { } let buf = BufWriter::default(); let output = buf.clone(); - EmitterWriter::new(Box::new(buf), Some(je.sm.clone()), false, false) - .ui_testing(je.ui_testing).emit(db); + je.json_rendered.new_emitter(Box::new(buf), Some(je.sm.clone()), false) + .ui_testing(je.ui_testing).emit_diagnostic(db); let output = Arc::try_unwrap(output.0).unwrap().into_inner().unwrap(); let output = String::from_utf8(output).unwrap(); @@ -348,19 +376,17 @@ impl DiagnosticSpanLine { /// `span` within the line. fn from_span(span: Span, je: &JsonEmitter) -> Vec { je.sm.span_to_lines(span) - .map(|lines| { - let fm = &*lines.file; - lines.lines - .iter() - .map(|line| { - DiagnosticSpanLine::line_from_source_file(fm, - line.line_index, - line.start_col.0 + 1, - line.end_col.0 + 1) - }) - .collect() - }) - .unwrap_or_else(|_| vec![]) + .map(|lines| { + let fm = &*lines.file; + lines.lines + .iter() + .map(|line| DiagnosticSpanLine::line_from_source_file( + fm, + line.line_index, + line.start_col.0 + 1, + line.end_col.0 + 1, + )).collect() + }).unwrap_or_else(|_| vec![]) } } diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 9905b98139..db10ab7af5 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -8,7 +8,7 @@ test(attr(deny(warnings))))] #![deny(rust_2018_idioms)] -#![cfg_attr(not(stage0), deny(internal))] +#![deny(internal)] #![feature(crate_visibility_modifier)] #![feature(label_break_value)] @@ -114,7 +114,7 @@ pub mod diagnostics { // N.B., this module needs to be declared first so diagnostics are // registered before they are used. -pub mod diagnostic_list; +pub mod error_codes; pub mod util { pub mod lev_distance; diff --git a/src/libsyntax/mut_visit.rs b/src/libsyntax/mut_visit.rs index 784d0049ac..f587e63e12 100644 --- a/src/libsyntax/mut_visit.rs +++ b/src/libsyntax/mut_visit.rs @@ -208,6 +208,10 @@ pub trait MutVisitor: Sized { noop_visit_local(l, self); } + fn visit_local_source(&mut self, l: &mut LocalSource) { + noop_visit_local_source(l, self); + } + fn visit_mac(&mut self, _mac: &mut Mac) { panic!("visit_mac disabled by default"); // N.B., see note about macros above. If you really want a visitor that @@ -231,6 +235,10 @@ pub trait MutVisitor: Sized { noop_visit_arg(a, self); } + fn visit_arg_source(&mut self, a: &mut ArgSource) { + noop_visit_arg_source(a, self); + } + fn visit_generics(&mut self, generics: &mut Generics) { noop_visit_generics(generics, self); } @@ -511,13 +519,17 @@ pub fn noop_visit_parenthesized_parameter_data(args: &mut Parenth } pub fn noop_visit_local(local: &mut P, vis: &mut T) { - let Local { id, pat, ty, init, span, attrs } = local.deref_mut(); + let Local { id, pat, ty, init, span, attrs, source } = local.deref_mut(); vis.visit_id(id); vis.visit_pat(pat); visit_opt(ty, |ty| vis.visit_ty(ty)); visit_opt(init, |init| vis.visit_expr(init)); vis.visit_span(span); visit_thin_attrs(attrs, vis); + vis.visit_local_source(source); +} + +pub fn noop_visit_local_source(_local_source: &mut LocalSource, _vis: &mut T) { } pub fn noop_visit_attribute(attr: &mut Attribute, vis: &mut T) { @@ -556,10 +568,18 @@ pub fn noop_visit_meta_item(mi: &mut MetaItem, vis: &mut T) { vis.visit_span(span); } -pub fn noop_visit_arg(Arg { id, pat, ty }: &mut Arg, vis: &mut T) { +pub fn noop_visit_arg(Arg { id, pat, ty, source }: &mut Arg, vis: &mut T) { vis.visit_id(id); vis.visit_pat(pat); vis.visit_ty(ty); + vis.visit_arg_source(source); +} + +pub fn noop_visit_arg_source(source: &mut ArgSource, vis: &mut T) { + match source { + ArgSource::Normal => {}, + ArgSource::AsyncFn(pat) => vis.visit_pat(pat), + } } pub fn noop_visit_tt(tt: &mut TokenTree, vis: &mut T) { @@ -643,7 +663,6 @@ pub fn noop_visit_interpolated(nt: &mut token::Nonterminal, vis: token::NtMeta(meta) => vis.visit_meta_item(meta), token::NtPath(path) => vis.visit_path(path), token::NtTT(tt) => vis.visit_tt(tt), - token::NtArm(arm) => vis.visit_arm(arm), token::NtImplItem(item) => visit_clobber(item, |item| { // See reasoning above. @@ -656,9 +675,6 @@ pub fn noop_visit_interpolated(nt: &mut token::Nonterminal, vis: vis.flat_map_trait_item(item) .expect_one("expected visitor to produce exactly one item") }), - token::NtGenerics(generics) => vis.visit_generics(generics), - token::NtWhereClause(where_clause) => vis.visit_where_clause(where_clause), - token::NtArg(arg) => vis.visit_arg(arg), token::NtVis(visib) => vis.visit_vis(visib), token::NtForeignItem(item) => visit_clobber(item, |item| { @@ -671,9 +687,25 @@ pub fn noop_visit_interpolated(nt: &mut token::Nonterminal, vis: pub fn noop_visit_asyncness(asyncness: &mut IsAsync, vis: &mut T) { match asyncness { - IsAsync::Async { closure_id, return_impl_trait_id } => { + IsAsync::Async { closure_id, return_impl_trait_id, ref mut arguments } => { vis.visit_id(closure_id); vis.visit_id(return_impl_trait_id); + for AsyncArgument { ident, arg, pat_stmt, move_stmt } in arguments.iter_mut() { + vis.visit_ident(ident); + if let Some(arg) = arg { + vis.visit_arg(arg); + } + visit_clobber(move_stmt, |stmt| { + vis.flat_map_stmt(stmt) + .expect_one("expected visitor to produce exactly one item") + }); + visit_opt(pat_stmt, |stmt| { + visit_clobber(stmt, |stmt| { + vis.flat_map_stmt(stmt) + .expect_one("expected visitor to produce exactly one item") + }) + }); + } } IsAsync::NotAsync => {} } @@ -1149,6 +1181,7 @@ pub fn noop_visit_expr(Expr { node, id, span, attrs }: &mut Expr, vis.visit_id(node_id); vis.visit_block(body); } + ExprKind::Await(_origin, expr) => vis.visit_expr(expr), ExprKind::Assign(el, er) => { vis.visit_expr(el); vis.visit_expr(er); diff --git a/src/libsyntax/parse/classify.rs b/src/libsyntax/parse/classify.rs index b4103440e3..dfd6f451c2 100644 --- a/src/libsyntax/parse/classify.rs +++ b/src/libsyntax/parse/classify.rs @@ -25,16 +25,3 @@ pub fn expr_requires_semi_to_be_stmt(e: &ast::Expr) -> bool { _ => true, } } - -/// this statement requires a semicolon after it. -/// note that in one case (`stmt_semi`), we've already -/// seen the semicolon, and thus don't need another. -pub fn stmt_ends_with_semi(stmt: &ast::StmtKind) -> bool { - match *stmt { - ast::StmtKind::Local(_) => true, - ast::StmtKind::Expr(ref e) => expr_requires_semi_to_be_stmt(e), - ast::StmtKind::Item(_) | - ast::StmtKind::Semi(..) | - ast::StmtKind::Mac(..) => false, - } -} diff --git a/src/libsyntax/parse/diagnostics.rs b/src/libsyntax/parse/diagnostics.rs new file mode 100644 index 0000000000..1a2393be80 --- /dev/null +++ b/src/libsyntax/parse/diagnostics.rs @@ -0,0 +1,524 @@ +use crate::ast; +use crate::ast::{BlockCheckMode, Expr, ExprKind, Item, ItemKind, Pat, PatKind, QSelf, Ty, TyKind}; +use crate::parse::parser::{BlockMode, PathStyle, TokenType, SemiColonMode}; +use crate::parse::token; +use crate::parse::PResult; +use crate::parse::Parser; +use crate::print::pprust; +use crate::ptr::P; +use crate::symbol::keywords; +use crate::ThinVec; +use errors::{Applicability, DiagnosticBuilder}; +use syntax_pos::Span; +use log::debug; + +pub trait RecoverQPath: Sized + 'static { + const PATH_STYLE: PathStyle = PathStyle::Expr; + fn to_ty(&self) -> Option>; + fn recovered(qself: Option, path: ast::Path) -> Self; +} + +impl RecoverQPath for Ty { + const PATH_STYLE: PathStyle = PathStyle::Type; + fn to_ty(&self) -> Option> { + Some(P(self.clone())) + } + fn recovered(qself: Option, path: ast::Path) -> Self { + Self { + span: path.span, + node: TyKind::Path(qself, path), + id: ast::DUMMY_NODE_ID, + } + } +} + +impl RecoverQPath for Pat { + fn to_ty(&self) -> Option> { + self.to_ty() + } + fn recovered(qself: Option, path: ast::Path) -> Self { + Self { + span: path.span, + node: PatKind::Path(qself, path), + id: ast::DUMMY_NODE_ID, + } + } +} + +impl RecoverQPath for Expr { + fn to_ty(&self) -> Option> { + self.to_ty() + } + fn recovered(qself: Option, path: ast::Path) -> Self { + Self { + span: path.span, + node: ExprKind::Path(qself, path), + attrs: ThinVec::new(), + id: ast::DUMMY_NODE_ID, + } + } +} + +impl<'a> Parser<'a> { + crate fn maybe_report_ambiguous_plus( + &mut self, + allow_plus: bool, + impl_dyn_multi: bool, + ty: &Ty, + ) { + if !allow_plus && impl_dyn_multi { + let sum_with_parens = format!("({})", pprust::ty_to_string(&ty)); + self.struct_span_err(ty.span, "ambiguous `+` in a type") + .span_suggestion( + ty.span, + "use parentheses to disambiguate", + sum_with_parens, + Applicability::MachineApplicable, + ) + .emit(); + } + } + + crate fn maybe_recover_from_bad_type_plus( + &mut self, + allow_plus: bool, + ty: &Ty, + ) -> PResult<'a, ()> { + // Do not add `+` to expected tokens. + if !allow_plus || !self.token.is_like_plus() { + return Ok(()); + } + + self.bump(); // `+` + let bounds = self.parse_generic_bounds(None)?; + let sum_span = ty.span.to(self.prev_span); + + let mut err = struct_span_err!( + self.sess.span_diagnostic, + sum_span, + E0178, + "expected a path on the left-hand side of `+`, not `{}`", + pprust::ty_to_string(ty) + ); + + match ty.node { + TyKind::Rptr(ref lifetime, ref mut_ty) => { + let sum_with_parens = pprust::to_string(|s| { + use crate::print::pprust::PrintState; + + s.s.word("&")?; + s.print_opt_lifetime(lifetime)?; + s.print_mutability(mut_ty.mutbl)?; + s.popen()?; + s.print_type(&mut_ty.ty)?; + s.print_type_bounds(" +", &bounds)?; + s.pclose() + }); + err.span_suggestion( + sum_span, + "try adding parentheses", + sum_with_parens, + Applicability::MachineApplicable, + ); + } + TyKind::Ptr(..) | TyKind::BareFn(..) => { + err.span_label(sum_span, "perhaps you forgot parentheses?"); + } + _ => { + err.span_label(sum_span, "expected a path"); + } + } + err.emit(); + Ok(()) + } + + /// Try to recover from associated item paths like `[T]::AssocItem`/`(T, U)::AssocItem`. + /// Attempt to convert the base expression/pattern/type into a type, parse the `::AssocItem` + /// tail, and combine them into a `::AssocItem` expression/pattern/type. + crate fn maybe_recover_from_bad_qpath( + &mut self, + base: P, + allow_recovery: bool, + ) -> PResult<'a, P> { + // Do not add `::` to expected tokens. + if allow_recovery && self.token == token::ModSep { + if let Some(ty) = base.to_ty() { + return self.maybe_recover_from_bad_qpath_stage_2(ty.span, ty); + } + } + Ok(base) + } + + /// Given an already parsed `Ty` parse the `::AssocItem` tail and + /// combine them into a `::AssocItem` expression/pattern/type. + crate fn maybe_recover_from_bad_qpath_stage_2( + &mut self, + ty_span: Span, + ty: P, + ) -> PResult<'a, P> { + self.expect(&token::ModSep)?; + + let mut path = ast::Path { + segments: Vec::new(), + span: syntax_pos::DUMMY_SP, + }; + self.parse_path_segments(&mut path.segments, T::PATH_STYLE)?; + path.span = ty_span.to(self.prev_span); + + let ty_str = self + .sess + .source_map() + .span_to_snippet(ty_span) + .unwrap_or_else(|_| pprust::ty_to_string(&ty)); + self.diagnostic() + .struct_span_err(path.span, "missing angle brackets in associated item path") + .span_suggestion( + // this is a best-effort recovery + path.span, + "try", + format!("<{}>::{}", ty_str, path), + Applicability::MaybeIncorrect, + ) + .emit(); + + let path_span = ty_span.shrink_to_hi(); // use an empty path since `position` == 0 + Ok(P(T::recovered( + Some(QSelf { + ty, + path_span, + position: 0, + }), + path, + ))) + } + + crate fn maybe_consume_incorrect_semicolon(&mut self, items: &[P]) -> bool { + if self.eat(&token::Semi) { + let mut err = self.struct_span_err(self.prev_span, "expected item, found `;`"); + err.span_suggestion_short( + self.prev_span, + "remove this semicolon", + String::new(), + Applicability::MachineApplicable, + ); + if !items.is_empty() { + let previous_item = &items[items.len() - 1]; + let previous_item_kind_name = match previous_item.node { + // say "braced struct" because tuple-structs and + // braceless-empty-struct declarations do take a semicolon + ItemKind::Struct(..) => Some("braced struct"), + ItemKind::Enum(..) => Some("enum"), + ItemKind::Trait(..) => Some("trait"), + ItemKind::Union(..) => Some("union"), + _ => None, + }; + if let Some(name) = previous_item_kind_name { + err.help(&format!( + "{} declarations are not followed by a semicolon", + name + )); + } + } + err.emit(); + true + } else { + false + } + } + + /// Consume alternative await syntaxes like `await `, `await? `, `await()` + /// and `await { }`. + crate fn parse_incorrect_await_syntax( + &mut self, + lo: Span, + await_sp: Span, + ) -> PResult<'a, (Span, ExprKind)> { + let is_question = self.eat(&token::Question); // Handle `await? `. + let expr = if self.token == token::OpenDelim(token::Brace) { + // Handle `await { }`. + // This needs to be handled separatedly from the next arm to avoid + // interpreting `await { }?` as `?.await`. + self.parse_block_expr( + None, + self.span, + BlockCheckMode::Default, + ThinVec::new(), + ) + } else { + self.parse_expr() + }.map_err(|mut err| { + err.span_label(await_sp, "while parsing this incorrect await expression"); + err + })?; + let expr_str = self.sess.source_map().span_to_snippet(expr.span) + .unwrap_or_else(|_| pprust::expr_to_string(&expr)); + let suggestion = format!("{}.await{}", expr_str, if is_question { "?" } else { "" }); + let sp = lo.to(expr.span); + let app = match expr.node { + ExprKind::Try(_) => Applicability::MaybeIncorrect, // `await ?` + _ => Applicability::MachineApplicable, + }; + self.struct_span_err(sp, "incorrect use of `await`") + .span_suggestion(sp, "`await` is a postfix operation", suggestion, app) + .emit(); + Ok((sp, ExprKind::Await(ast::AwaitOrigin::FieldLike, expr))) + } + + /// If encountering `future.await()`, consume and emit error. + crate fn recover_from_await_method_call(&mut self) { + if self.token == token::OpenDelim(token::Paren) && + self.look_ahead(1, |t| t == &token::CloseDelim(token::Paren)) + { + // future.await() + let lo = self.span; + self.bump(); // ( + let sp = lo.to(self.span); + self.bump(); // ) + self.struct_span_err(sp, "incorrect use of `await`") + .span_suggestion( + sp, + "`await` is not a method call, remove the parentheses", + String::new(), + Applicability::MachineApplicable, + ).emit() + } + } + + crate fn could_ascription_be_path(&self, node: &ast::ExprKind) -> bool { + self.token.is_ident() && + if let ast::ExprKind::Path(..) = node { true } else { false } && + !self.token.is_reserved_ident() && // v `foo:bar(baz)` + self.look_ahead(1, |t| t == &token::OpenDelim(token::Paren)) || + self.look_ahead(1, |t| t == &token::Lt) && // `foo:bar, + lhs_span: Span, + cur_op_span: Span, + next_sp: Span, + maybe_path: bool, + ) { + err.span_label(self.span, "expecting a type here because of type ascription"); + let cm = self.sess.source_map(); + let next_pos = cm.lookup_char_pos(next_sp.lo()); + let op_pos = cm.lookup_char_pos(cur_op_span.hi()); + if op_pos.line != next_pos.line { + err.span_suggestion( + cur_op_span, + "try using a semicolon", + ";".to_string(), + Applicability::MaybeIncorrect, + ); + } else { + if maybe_path { + err.span_suggestion( + cur_op_span, + "maybe you meant to write a path separator here", + "::".to_string(), + Applicability::MaybeIncorrect, + ); + } else { + err.note("type ascription is a nightly-only feature that lets \ + you annotate an expression with a type: `: `") + .span_note( + lhs_span, + "this expression expects an ascribed type after the colon", + ) + .help("this might be indicative of a syntax error elsewhere"); + } + } + } + + crate fn recover_seq_parse_error( + &mut self, + delim: token::DelimToken, + lo: Span, + result: PResult<'a, P>, + ) -> P { + match result { + Ok(x) => x, + Err(mut err) => { + err.emit(); + // recover from parse error + self.consume_block(delim); + self.mk_expr(lo.to(self.prev_span), ExprKind::Err, ThinVec::new()) + } + } + } + + crate fn recover_closing_delimiter( + &mut self, + tokens: &[token::Token], + mut err: DiagnosticBuilder<'a>, + ) -> PResult<'a, bool> { + let mut pos = None; + // we want to use the last closing delim that would apply + for (i, unmatched) in self.unclosed_delims.iter().enumerate().rev() { + if tokens.contains(&token::CloseDelim(unmatched.expected_delim)) + && Some(self.span) > unmatched.unclosed_span + { + pos = Some(i); + } + } + match pos { + Some(pos) => { + // Recover and assume that the detected unclosed delimiter was meant for + // this location. Emit the diagnostic and act as if the delimiter was + // present for the parser's sake. + + // Don't attempt to recover from this unclosed delimiter more than once. + let unmatched = self.unclosed_delims.remove(pos); + let delim = TokenType::Token(token::CloseDelim(unmatched.expected_delim)); + + // We want to suggest the inclusion of the closing delimiter where it makes + // the most sense, which is immediately after the last token: + // + // {foo(bar {}} + // - ^ + // | | + // | help: `)` may belong here (FIXME: #58270) + // | + // unclosed delimiter + if let Some(sp) = unmatched.unclosed_span { + err.span_label(sp, "unclosed delimiter"); + } + err.span_suggestion_short( + self.sess.source_map().next_point(self.prev_span), + &format!("{} may belong here", delim.to_string()), + delim.to_string(), + Applicability::MaybeIncorrect, + ); + err.emit(); + self.expected_tokens.clear(); // reduce errors + Ok(true) + } + _ => Err(err), + } + } + + /// Recover from `pub` keyword in places where it seems _reasonable_ but isn't valid. + crate fn eat_bad_pub(&mut self) { + if self.token.is_keyword(keywords::Pub) { + match self.parse_visibility(false) { + Ok(vis) => { + self.diagnostic() + .struct_span_err(vis.span, "unnecessary visibility qualifier") + .span_label(vis.span, "`pub` not permitted here") + .emit(); + } + Err(mut err) => err.emit(), + } + } + } + + // Eat tokens until we can be relatively sure we reached the end of the + // statement. This is something of a best-effort heuristic. + // + // We terminate when we find an unmatched `}` (without consuming it). + crate fn recover_stmt(&mut self) { + self.recover_stmt_(SemiColonMode::Ignore, BlockMode::Ignore) + } + + // If `break_on_semi` is `Break`, then we will stop consuming tokens after + // finding (and consuming) a `;` outside of `{}` or `[]` (note that this is + // approximate - it can mean we break too early due to macros, but that + // should only lead to sub-optimal recovery, not inaccurate parsing). + // + // If `break_on_block` is `Break`, then we will stop consuming tokens + // after finding (and consuming) a brace-delimited block. + crate fn recover_stmt_(&mut self, break_on_semi: SemiColonMode, break_on_block: BlockMode) { + let mut brace_depth = 0; + let mut bracket_depth = 0; + let mut in_block = false; + debug!("recover_stmt_ enter loop (semi={:?}, block={:?})", + break_on_semi, break_on_block); + loop { + debug!("recover_stmt_ loop {:?}", self.token); + match self.token { + token::OpenDelim(token::DelimToken::Brace) => { + brace_depth += 1; + self.bump(); + if break_on_block == BlockMode::Break && + brace_depth == 1 && + bracket_depth == 0 { + in_block = true; + } + } + token::OpenDelim(token::DelimToken::Bracket) => { + bracket_depth += 1; + self.bump(); + } + token::CloseDelim(token::DelimToken::Brace) => { + if brace_depth == 0 { + debug!("recover_stmt_ return - close delim {:?}", self.token); + break; + } + brace_depth -= 1; + self.bump(); + if in_block && bracket_depth == 0 && brace_depth == 0 { + debug!("recover_stmt_ return - block end {:?}", self.token); + break; + } + } + token::CloseDelim(token::DelimToken::Bracket) => { + bracket_depth -= 1; + if bracket_depth < 0 { + bracket_depth = 0; + } + self.bump(); + } + token::Eof => { + debug!("recover_stmt_ return - Eof"); + break; + } + token::Semi => { + self.bump(); + if break_on_semi == SemiColonMode::Break && + brace_depth == 0 && + bracket_depth == 0 { + debug!("recover_stmt_ return - Semi"); + break; + } + } + token::Comma if break_on_semi == SemiColonMode::Comma && + brace_depth == 0 && + bracket_depth == 0 => + { + debug!("recover_stmt_ return - Semi"); + break; + } + _ => { + self.bump() + } + } + } + } + + crate fn consume_block(&mut self, delim: token::DelimToken) { + let mut brace_depth = 0; + loop { + if self.eat(&token::OpenDelim(delim)) { + brace_depth += 1; + } else if self.eat(&token::CloseDelim(delim)) { + if brace_depth == 0 { + return; + } else { + brace_depth -= 1; + continue; + } + } else if self.token == token::Eof || self.eat(&token::CloseDelim(token::NoDelim)) { + return; + } else { + self.bump(); + } + } + } + +} diff --git a/src/libsyntax/parse/lexer/comments.rs b/src/libsyntax/parse/lexer/comments.rs index 74fff3324e..97d3fc002e 100644 --- a/src/libsyntax/parse/lexer/comments.rs +++ b/src/libsyntax/parse/lexer/comments.rs @@ -3,8 +3,7 @@ pub use CommentStyle::*; use crate::ast; use crate::source_map::SourceMap; use crate::parse::lexer::{is_block_doc_comment, is_pattern_whitespace}; -use crate::parse::lexer::{self, ParseSess, StringReader, TokenAndSpan}; -use crate::print::pprust; +use crate::parse::lexer::{self, ParseSess, StringReader}; use syntax_pos::{BytePos, CharPos, Pos, FileName}; use log::debug; @@ -339,16 +338,9 @@ fn consume_comment(rdr: &mut StringReader<'_>, debug!("<<< consume comment"); } -#[derive(Clone)] -pub struct Literal { - pub lit: String, - pub pos: BytePos, -} - // it appears this function is called only from pprust... that's // probably not a good thing. -pub fn gather_comments_and_literals(sess: &ParseSess, path: FileName, srdr: &mut dyn Read) - -> (Vec, Vec) +pub fn gather_comments(sess: &ParseSess, path: FileName, srdr: &mut dyn Read) -> Vec { let mut src = String::new(); srdr.read_to_string(&mut src).unwrap(); @@ -357,7 +349,6 @@ pub fn gather_comments_and_literals(sess: &ParseSess, path: FileName, srdr: &mut let mut rdr = lexer::StringReader::new_raw(sess, source_file, None); let mut comments: Vec = Vec::new(); - let mut literals: Vec = Vec::new(); let mut code_to_the_left = false; // Only code let mut anything_to_the_left = false; // Code or comments @@ -382,26 +373,12 @@ pub fn gather_comments_and_literals(sess: &ParseSess, path: FileName, srdr: &mut } } - let bstart = rdr.pos; rdr.next_token(); - // discard, and look ahead; we're working with internal state - let TokenAndSpan { tok, sp } = rdr.peek(); - if tok.is_lit() { - rdr.with_str_from(bstart, |s| { - debug!("tok lit: {}", s); - literals.push(Literal { - lit: s.to_string(), - pos: sp.lo(), - }); - }) - } else { - debug!("tok: {}", pprust::token_to_string(&tok)); - } code_to_the_left = true; anything_to_the_left = true; } - (comments, literals) + comments } #[cfg(test)] diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 5557e281a6..47da3ee6a6 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -1,8 +1,10 @@ use crate::ast::{self, Ident}; use crate::parse::{token, ParseSess}; use crate::symbol::Symbol; +use crate::parse::unescape; +use crate::parse::unescape_error_reporting::{emit_unescape_error, push_escaped_char}; -use errors::{Applicability, FatalError, Diagnostic, DiagnosticBuilder}; +use errors::{FatalError, Diagnostic, DiagnosticBuilder}; use syntax_pos::{BytePos, Pos, Span, NO_EXPANSION}; use core::unicode::property::Pattern_White_Space; @@ -60,19 +62,7 @@ pub struct StringReader<'a> { // cache a direct reference to the source text, so that we don't have to // retrieve it via `self.source_file.src.as_ref().unwrap()` all the time. src: Lrc, - token: token::Token, - span: Span, - /// The raw source span which *does not* take `override_span` into account - span_src_raw: Span, - /// Stack of open delimiters and their spans. Used for error message. - open_braces: Vec<(token::DelimToken, Span)>, - crate unmatched_braces: Vec, - /// The type and spans for all braces - /// - /// Used only for error recovery when arriving to EOF with mismatched braces. - matching_delim_spans: Vec<(token::DelimToken, Span, Span)>, - crate override_span: Option, - last_unclosed_found_span: Option, + override_span: Option, } impl<'a> StringReader<'a> { @@ -119,8 +109,6 @@ impl<'a> StringReader<'a> { sp: self.peek_span, }; self.advance_token()?; - self.span_src_raw = self.peek_span_src_raw; - Ok(ret_val) } @@ -157,9 +145,6 @@ impl<'a> StringReader<'a> { } } - self.token = t.tok.clone(); - self.span = t.sp; - Ok(t) } @@ -249,27 +234,8 @@ impl<'a> StringReader<'a> { peek_span_src_raw: syntax_pos::DUMMY_SP, src, fatal_errs: Vec::new(), - token: token::Eof, - span: syntax_pos::DUMMY_SP, - span_src_raw: syntax_pos::DUMMY_SP, - open_braces: Vec::new(), - unmatched_braces: Vec::new(), - matching_delim_spans: Vec::new(), override_span, - last_unclosed_found_span: None, - } - } - - pub fn new(sess: &'a ParseSess, - source_file: Lrc, - override_span: Option) -> Self { - let mut sr = StringReader::new_raw(sess, source_file, override_span); - if sr.advance_token().is_err() { - sr.emit_fatal_errors(); - FatalError.raise(); } - - sr } pub fn new_or_buffered_errs(sess: &'a ParseSess, @@ -334,25 +300,12 @@ impl<'a> StringReader<'a> { self.err_span(self.mk_sp(from_pos, to_pos), m) } - /// Pushes a character to a message string for error reporting - fn push_escaped_char_for_msg(m: &mut String, c: char) { - match c { - '\u{20}'..='\u{7e}' => { - // Don't escape \, ' or " for user-facing messages - m.push(c); - } - _ => { - m.extend(c.escape_default()); - } - } - } - /// Report a lexical error spanning [`from_pos`, `to_pos`), appending an /// escaped character to the error message fn fatal_span_char(&self, from_pos: BytePos, to_pos: BytePos, m: &str, c: char) -> FatalError { let mut m = m.to_string(); m.push_str(": "); - Self::push_escaped_char_for_msg(&mut m, c); + push_escaped_char(&mut m, c); self.fatal_span_(from_pos, to_pos, &m[..]) } @@ -368,7 +321,7 @@ impl<'a> StringReader<'a> { { let mut m = m.to_string(); m.push_str(": "); - Self::push_escaped_char_for_msg(&mut m, c); + push_escaped_char(&mut m, c); self.sess.span_diagnostic.struct_span_fatal(self.mk_sp(from_pos, to_pos), &m[..]) } @@ -378,29 +331,10 @@ impl<'a> StringReader<'a> { fn err_span_char(&self, from_pos: BytePos, to_pos: BytePos, m: &str, c: char) { let mut m = m.to_string(); m.push_str(": "); - Self::push_escaped_char_for_msg(&mut m, c); + push_escaped_char(&mut m, c); self.err_span_(from_pos, to_pos, &m[..]); } - fn struct_err_span_char(&self, from_pos: BytePos, to_pos: BytePos, m: &str, c: char) - -> DiagnosticBuilder<'a> - { - let mut m = m.to_string(); - m.push_str(": "); - Self::push_escaped_char_for_msg(&mut m, c); - - self.sess.span_diagnostic.struct_span_err(self.mk_sp(from_pos, to_pos), &m[..]) - } - - /// Report a lexical error spanning [`from_pos`, `to_pos`), appending the - /// offending string to the error message - fn fatal_span_verbose(&self, from_pos: BytePos, to_pos: BytePos, mut m: String) -> FatalError { - m.push_str(": "); - m.push_str(&self.src[self.src_index(from_pos)..self.src_index(to_pos)]); - - self.fatal_span_(from_pos, to_pos, &m[..]) - } - /// Advance peek_tok and peek_span to refer to the next token, and /// possibly update the interner. fn advance_token(&mut self) -> Result<(), ()> { @@ -446,9 +380,7 @@ impl<'a> StringReader<'a> { self.with_str_from_to(start, self.pos, f) } - /// Creates a Name from a given offset to the current offset, each - /// adjusted 1 towards each other (assumes that on either side there is a - /// single-byte delimiter). + /// Creates a Name from a given offset to the current offset. fn name_from(&self, start: BytePos) -> ast::Name { debug!("taking an ident from {:?} to {:?}", start, self.pos); self.with_str_from(start, Symbol::intern) @@ -630,26 +562,14 @@ impl<'a> StringReader<'a> { self.bump(); } - if doc_comment { + let tok = if doc_comment { self.with_str_from(start_bpos, |string| { - // comments with only more "/"s are not doc comments - let tok = if is_doc_comment(string) { - token::DocComment(Symbol::intern(string)) - } else { - token::Comment - }; - - Some(TokenAndSpan { - tok, - sp: self.mk_sp(start_bpos, self.pos), - }) + token::DocComment(Symbol::intern(string)) }) } else { - Some(TokenAndSpan { - tok: token::Comment, - sp: self.mk_sp(start_bpos, self.pos), - }) - } + token::Comment + }; + Some(TokenAndSpan { tok, sp: self.mk_sp(start_bpos, self.pos) }) } Some('*') => { self.bump(); @@ -877,271 +797,6 @@ impl<'a> StringReader<'a> { } } - /// Scan over `n_digits` hex digits, stopping at `delim`, reporting an - /// error if too many or too few digits are encountered. - fn scan_hex_digits(&mut self, n_digits: usize, delim: char, below_0x7f_only: bool) -> bool { - debug!("scanning {} digits until {:?}", n_digits, delim); - let start_bpos = self.pos; - let mut accum_int = 0; - - let mut valid = true; - for _ in 0..n_digits { - if self.is_eof() { - let last_bpos = self.pos; - self.fatal_span_(start_bpos, - last_bpos, - "unterminated numeric character escape").raise(); - } - if self.ch_is(delim) { - let last_bpos = self.pos; - self.err_span_(start_bpos, - last_bpos, - "numeric character escape is too short"); - valid = false; - break; - } - let c = self.ch.unwrap_or('\x00'); - accum_int *= 16; - accum_int += c.to_digit(16).unwrap_or_else(|| { - self.err_span_char(self.pos, - self.next_pos, - "invalid character in numeric character escape", - c); - - valid = false; - 0 - }); - self.bump(); - } - - if below_0x7f_only && accum_int >= 0x80 { - self.err_span_(start_bpos, - self.pos, - "this form of character escape may only be used with characters in \ - the range [\\x00-\\x7f]"); - valid = false; - } - - match char::from_u32(accum_int) { - Some(_) => valid, - None => { - let last_bpos = self.pos; - self.err_span_(start_bpos, last_bpos, "invalid numeric character escape"); - false - } - } - } - - /// Scan for a single (possibly escaped) byte or char - /// in a byte, (non-raw) byte string, char, or (non-raw) string literal. - /// `start` is the position of `first_source_char`, which is already consumed. - /// - /// Returns `true` if there was a valid char/byte. - fn scan_char_or_byte(&mut self, - start: BytePos, - first_source_char: char, - ascii_only: bool, - delim: char) - -> bool - { - match first_source_char { - '\\' => { - // '\X' for some X must be a character constant: - let escaped = self.ch; - let escaped_pos = self.pos; - self.bump(); - match escaped { - None => {} // EOF here is an error that will be checked later. - Some(e) => { - return match e { - 'n' | 'r' | 't' | '\\' | '\'' | '"' | '0' => true, - 'x' => self.scan_byte_escape(delim, !ascii_only), - 'u' => { - let valid = if self.ch_is('{') { - self.scan_unicode_escape(delim) && !ascii_only - } else { - let span = self.mk_sp(start, self.pos); - let mut suggestion = "\\u{".to_owned(); - let msg = "incorrect unicode escape sequence"; - let mut err = self.sess.span_diagnostic.struct_span_err( - span, - msg, - ); - let mut i = 0; - while let (Some(ch), true) = (self.ch, i < 6) { - if ch.is_digit(16) { - suggestion.push(ch); - self.bump(); - i += 1; - } else { - break; - } - } - if i != 0 { - suggestion.push('}'); - err.span_suggestion( - self.mk_sp(start, self.pos), - "format of unicode escape sequences uses braces", - suggestion, - Applicability::MaybeIncorrect, - ); - } else { - err.span_label(span, msg); - err.help( - "format of unicode escape sequences is `\\u{...}`", - ); - } - err.emit(); - false - }; - if ascii_only { - self.err_span_(start, - self.pos, - "unicode escape sequences cannot be used as a \ - byte or in a byte string"); - } - valid - - } - '\n' if delim == '"' => { - self.consume_whitespace(); - true - } - '\r' if delim == '"' && self.ch_is('\n') => { - self.consume_whitespace(); - true - } - c => { - let pos = self.pos; - let msg = if ascii_only { - "unknown byte escape" - } else { - "unknown character escape" - }; - let mut err = self.struct_err_span_char(escaped_pos, pos, msg, c); - err.span_label(self.mk_sp(escaped_pos, pos), msg); - if e == '\r' { - err.help( - "this is an isolated carriage return; consider checking \ - your editor and version control settings", - ); - } - if (e == '{' || e == '}') && !ascii_only { - err.help( - "if used in a formatting string, curly braces are escaped \ - with `{{` and `}}`", - ); - } - err.emit(); - false - } - } - } - } - } - '\t' | '\n' | '\r' | '\'' if delim == '\'' => { - let pos = self.pos; - self.err_span_char(start, - pos, - if ascii_only { - "byte constant must be escaped" - } else { - "character constant must be escaped" - }, - first_source_char); - return false; - } - '\r' => { - if self.ch_is('\n') { - self.bump(); - return true; - } else { - self.err_span_(start, - self.pos, - "bare CR not allowed in string, use \\r instead"); - return false; - } - } - _ => { - if ascii_only && first_source_char > '\x7F' { - let pos = self.pos; - self.err_span_(start, - pos, - "byte constant must be ASCII. Use a \\xHH escape for a \ - non-ASCII byte"); - return false; - } - } - } - true - } - - /// Scan over a `\u{...}` escape - /// - /// At this point, we have already seen the `\` and the `u`, the `{` is the current character. - /// We will read a hex number (with `_` separators), with 1 to 6 actual digits, - /// and pass over the `}`. - fn scan_unicode_escape(&mut self, delim: char) -> bool { - self.bump(); // past the { - let start_bpos = self.pos; - let mut valid = true; - - if let Some('_') = self.ch { - // disallow leading `_` - self.err_span_(self.pos, - self.next_pos, - "invalid start of unicode escape"); - valid = false; - } - - let count = self.scan_digits(16, 16); - - if count > 6 { - self.err_span_(start_bpos, - self.pos, - "overlong unicode escape (must have at most 6 hex digits)"); - valid = false; - } - - loop { - match self.ch { - Some('}') => { - if valid && count == 0 { - self.err_span_(start_bpos, - self.pos, - "empty unicode escape (must have at least 1 hex digit)"); - valid = false; - } - self.bump(); // past the ending `}` - break; - }, - Some(c) => { - if c == delim { - self.err_span_(self.pos, - self.pos, - "unterminated unicode escape (needed a `}`)"); - valid = false; - break; - } else if valid { - self.err_span_char(start_bpos, - self.pos, - "invalid character in unicode escape", - c); - valid = false; - } - }, - None => { - self.fatal_span_(start_bpos, - self.pos, - "unterminated unicode escape (found EOF)").raise(); - } - } - self.bump(); - } - - valid - } - /// Scan over a float exponent. fn scan_float_exponent(&mut self) { if self.ch_is('e') || self.ch_is('E') { @@ -1407,36 +1062,31 @@ impl<'a> StringReader<'a> { self.bump(); let start = self.pos; - // the eof will be picked up by the final `'` check below - let c2 = self.ch.unwrap_or('\x00'); - self.bump(); - // If the character is an ident start not followed by another single // quote, then this is a lifetime name: - if (ident_start(Some(c2)) || c2.is_numeric()) && !self.ch_is('\'') { + let starts_with_number = self.ch.unwrap_or('\x00').is_numeric(); + if (ident_start(self.ch) || starts_with_number) && !self.nextch_is('\'') { + self.bump(); while ident_continue(self.ch) { self.bump(); } // lifetimes shouldn't end with a single quote // if we find one, then this is an invalid character literal if self.ch_is('\'') { - self.err_span_( - start_with_quote, - self.next_pos, - "character literal may only contain one codepoint"); + let id = self.name_from(start); self.bump(); - return Ok(token::Literal(token::Err(Symbol::intern("??")), None)) - + self.validate_char_escape(start_with_quote); + return Ok(token::Literal(token::Char(id), None)) } // Include the leading `'` in the real identifier, for macro // expansion purposes. See #12512 for the gory details of why // this is necessary. - let ident = self.with_str_from(start, |lifetime_name| { - self.mk_ident(&format!("'{}", lifetime_name)) + let ident = self.with_str_from(start_with_quote, |lifetime_name| { + self.mk_ident(lifetime_name) }); - if c2.is_numeric() { + if starts_with_number { // this is a recovered lifetime written `'1`, error but accept it self.err_span_( start_with_quote, @@ -1447,58 +1097,30 @@ impl<'a> StringReader<'a> { return Ok(token::Lifetime(ident)); } - - let valid = self.scan_char_or_byte(start, c2, /* ascii_only */ false, '\''); - - if !self.ch_is('\'') { - let pos = self.pos; - - loop { - self.bump(); - if self.ch_is('\'') { - let start = self.src_index(start); - let end = self.src_index(self.pos); - self.bump(); - let span = self.mk_sp(start_with_quote, self.pos); - self.sess.span_diagnostic - .struct_span_err(span, - "character literal may only contain one codepoint") - .span_suggestion( - span, - "if you meant to write a `str` literal, use double quotes", - format!("\"{}\"", &self.src[start..end]), - Applicability::MachineApplicable - ).emit(); - return Ok(token::Literal(token::Err(Symbol::intern("??")), None)) - } - if self.ch_is('\n') || self.is_eof() || self.ch_is('/') { - // Only attempt to infer single line string literals. If we encounter - // a slash, bail out in order to avoid nonsensical suggestion when - // involving comments. - break; - } - } - - self.fatal_span_verbose(start_with_quote, pos, - String::from("character literal may only contain one codepoint")).raise(); - } - - let id = if valid { - self.name_from(start) - } else { - Symbol::intern("0") - }; - - self.bump(); // advance ch past token + let msg = "unterminated character literal"; + let id = self.scan_single_quoted_string(start_with_quote, msg); + self.validate_char_escape(start_with_quote); let suffix = self.scan_optional_raw_name(); - Ok(token::Literal(token::Char(id), suffix)) } 'b' => { self.bump(); let lit = match self.ch { - Some('\'') => self.scan_byte(), - Some('"') => self.scan_byte_string(), + Some('\'') => { + let start_with_quote = self.pos; + self.bump(); + let msg = "unterminated byte constant"; + let id = self.scan_single_quoted_string(start_with_quote, msg); + self.validate_byte_escape(start_with_quote); + token::Byte(id) + }, + Some('"') => { + let start_with_quote = self.pos; + let msg = "unterminated double quote byte string"; + let id = self.scan_double_quoted_string(msg); + self.validate_byte_str_escape(start_with_quote); + token::ByteStr(id) + }, Some('r') => self.scan_raw_byte_string(), _ => unreachable!(), // Should have been a token::Ident above. }; @@ -1507,32 +1129,11 @@ impl<'a> StringReader<'a> { Ok(token::Literal(lit, suffix)) } '"' => { - let start_bpos = self.pos; - let mut valid = true; - self.bump(); - - while !self.ch_is('"') { - if self.is_eof() { - let last_bpos = self.pos; - self.fatal_span_(start_bpos, - last_bpos, - "unterminated double quote string").raise(); - } - - let ch_start = self.pos; - let ch = self.ch.unwrap(); - self.bump(); - valid &= self.scan_char_or_byte(ch_start, ch, /* ascii_only */ false, '"'); - } - // adjust for the ASCII " at the start of the literal - let id = if valid { - self.name_from(start_bpos + BytePos(1)) - } else { - Symbol::intern("??") - }; - self.bump(); + let start_with_quote = self.pos; + let msg = "unterminated double quote string"; + let id = self.scan_double_quoted_string(msg); + self.validate_str_escape(start_with_quote); let suffix = self.scan_optional_raw_name(); - Ok(token::Literal(token::Str_(id), suffix)) } 'r' => { @@ -1673,12 +1274,6 @@ impl<'a> StringReader<'a> { } } - fn consume_whitespace(&mut self) { - while is_pattern_whitespace(self.ch) && !self.is_eof() { - self.bump(); - } - } - fn read_to_eol(&mut self) -> String { let mut val = String::new(); while !self.ch_is('\n') && !self.is_eof() { @@ -1712,73 +1307,63 @@ impl<'a> StringReader<'a> { (self.ch_is('#') && self.nextch_is('!') && !self.nextnextch_is('[')) } - fn scan_byte(&mut self) -> token::Lit { - self.bump(); + fn scan_single_quoted_string(&mut self, + start_with_quote: BytePos, + unterminated_msg: &str) -> ast::Name { + // assumes that first `'` is consumed let start = self.pos; - - // the eof will be picked up by the final `'` check below - let c2 = self.ch.unwrap_or('\x00'); - self.bump(); - - let valid = self.scan_char_or_byte(start, - c2, - // ascii_only = - true, - '\''); - if !self.ch_is('\'') { - // Byte offsetting here is okay because the - // character before position `start` are an - // ascii single quote and ascii 'b'. - let pos = self.pos; - self.fatal_span_verbose(start - BytePos(2), - pos, - "unterminated byte constant".to_string()).raise(); - } - - let id = if valid { - self.name_from(start) + // lex `'''` as a single char, for recovery + if self.ch_is('\'') && self.nextch_is('\'') { + self.bump(); } else { - Symbol::intern("?") - }; - self.bump(); // advance ch past token - - token::Byte(id) - } + let mut first = true; + loop { + if self.ch_is('\'') { + break; + } + if self.ch_is('\\') && (self.nextch_is('\'') || self.nextch_is('\\')) { + self.bump(); + self.bump(); + } else { + // Only attempt to infer single line string literals. If we encounter + // a slash, bail out in order to avoid nonsensical suggestion when + // involving comments. + if self.is_eof() + || (self.ch_is('/') && !first) + || (self.ch_is('\n') && !self.nextch_is('\'')) { + + self.fatal_span_(start_with_quote, self.pos, unterminated_msg.into()) + .raise() + } + self.bump(); + } + first = false; + } + } - #[inline] - fn scan_byte_escape(&mut self, delim: char, below_0x7f_only: bool) -> bool { - self.scan_hex_digits(2, delim, below_0x7f_only) + let id = self.name_from(start); + self.bump(); + id } - fn scan_byte_string(&mut self) -> token::Lit { + fn scan_double_quoted_string(&mut self, unterminated_msg: &str) -> ast::Name { + debug_assert!(self.ch_is('\"')); + let start_with_quote = self.pos; self.bump(); let start = self.pos; - let mut valid = true; - while !self.ch_is('"') { if self.is_eof() { let pos = self.pos; - self.fatal_span_(start, pos, "unterminated double quote byte string").raise(); + self.fatal_span_(start_with_quote, pos, unterminated_msg).raise(); + } + if self.ch_is('\\') && (self.nextch_is('\\') || self.nextch_is('"')) { + self.bump(); } - - let ch_start = self.pos; - let ch = self.ch.unwrap(); self.bump(); - valid &= self.scan_char_or_byte(ch_start, - ch, - // ascii_only = - true, - '"'); } - - let id = if valid { - self.name_from(start) - } else { - Symbol::intern("??") - }; + let id = self.name_from(start); self.bump(); - - token::ByteStr(id) + id } fn scan_raw_byte_string(&mut self) -> token::Lit { @@ -1840,6 +1425,70 @@ impl<'a> StringReader<'a> { token::ByteStrRaw(self.name_from_to(content_start_bpos, content_end_bpos), hash_count) } + + fn validate_char_escape(&self, start_with_quote: BytePos) { + self.with_str_from_to(start_with_quote + BytePos(1), self.pos - BytePos(1), |lit| { + if let Err((off, err)) = unescape::unescape_char(lit) { + emit_unescape_error( + &self.sess.span_diagnostic, + lit, + self.mk_sp(start_with_quote, self.pos), + unescape::Mode::Char, + 0..off, + err, + ) + } + }); + } + + fn validate_byte_escape(&self, start_with_quote: BytePos) { + self.with_str_from_to(start_with_quote + BytePos(1), self.pos - BytePos(1), |lit| { + if let Err((off, err)) = unescape::unescape_byte(lit) { + emit_unescape_error( + &self.sess.span_diagnostic, + lit, + self.mk_sp(start_with_quote, self.pos), + unescape::Mode::Byte, + 0..off, + err, + ) + } + }); + } + + fn validate_str_escape(&self, start_with_quote: BytePos) { + self.with_str_from_to(start_with_quote + BytePos(1), self.pos - BytePos(1), |lit| { + unescape::unescape_str(lit, &mut |range, c| { + if let Err(err) = c { + emit_unescape_error( + &self.sess.span_diagnostic, + lit, + self.mk_sp(start_with_quote, self.pos), + unescape::Mode::Str, + range, + err, + ) + } + }) + }); + } + + fn validate_byte_str_escape(&self, start_with_quote: BytePos) { + self.with_str_from_to(start_with_quote + BytePos(1), self.pos - BytePos(1), |lit| { + unescape::unescape_byte_str(lit, &mut |range, c| { + if let Err(err) = c { + emit_unescape_error( + &self.sess.span_diagnostic, + lit, + self.mk_sp(start_with_quote, self.pos), + unescape::Mode::ByteStr, + range, + err, + ) + } + }) + }); + } } // This tests the character for the unicode property 'PATTERN_WHITE_SPACE' which @@ -1913,13 +1562,14 @@ mod tests { use std::io; use std::path::PathBuf; use syntax_pos::{BytePos, Span, NO_EXPANSION}; - use rustc_data_structures::fx::FxHashSet; + use rustc_data_structures::fx::{FxHashSet, FxHashMap}; use rustc_data_structures::sync::Lock; fn mk_sess(sm: Lrc) -> ParseSess { let emitter = errors::emitter::EmitterWriter::new(Box::new(io::sink()), Some(sm.clone()), false, + false, false); ParseSess { span_diagnostic: errors::Handler::with_emitter(true, None, Box::new(emitter)), @@ -1931,6 +1581,7 @@ mod tests { raw_identifier_spans: Lock::new(Vec::new()), registered_diagnostics: Lock::new(ErrorMap::new()), buffered_lints: Lock::new(vec![]), + ambiguous_block_expr_parse: Lock::new(FxHashMap::default()), } } @@ -1940,7 +1591,12 @@ mod tests { teststr: String) -> StringReader<'a> { let sf = sm.new_source_file(PathBuf::from(teststr.clone()).into(), teststr); - StringReader::new(sess, sf, None) + let mut sr = StringReader::new_raw(sess, sf, None); + if sr.advance_token().is_err() { + sr.emit_fatal_errors(); + FatalError.raise(); + } + sr } #[test] diff --git a/src/libsyntax/parse/lexer/tokentrees.rs b/src/libsyntax/parse/lexer/tokentrees.rs index 0db36c84cd..4bfc5bb16c 100644 --- a/src/libsyntax/parse/lexer/tokentrees.rs +++ b/src/libsyntax/parse/lexer/tokentrees.rs @@ -1,13 +1,46 @@ +use syntax_pos::Span; + use crate::print::pprust::token_to_string; use crate::parse::lexer::{StringReader, UnmatchedBrace}; use crate::parse::{token, PResult}; use crate::tokenstream::{DelimSpan, IsJoint::*, TokenStream, TokenTree, TreeAndJoint}; impl<'a> StringReader<'a> { + crate fn into_token_trees(self) -> (PResult<'a, TokenStream>, Vec) { + let mut tt_reader = TokenTreesReader { + string_reader: self, + token: token::Eof, + span: syntax_pos::DUMMY_SP, + open_braces: Vec::new(), + unmatched_braces: Vec::new(), + matching_delim_spans: Vec::new(), + last_unclosed_found_span: None, + }; + let res = tt_reader.parse_all_token_trees(); + (res, tt_reader.unmatched_braces) + } +} + +struct TokenTreesReader<'a> { + string_reader: StringReader<'a>, + token: token::Token, + span: Span, + /// Stack of open delimiters and their spans. Used for error message. + open_braces: Vec<(token::DelimToken, Span)>, + unmatched_braces: Vec, + /// The type and spans for all braces + /// + /// Used only for error recovery when arriving to EOF with mismatched braces. + matching_delim_spans: Vec<(token::DelimToken, Span, Span)>, + last_unclosed_found_span: Option, +} + +impl<'a> TokenTreesReader<'a> { // Parse a stream of tokens into a list of `TokenTree`s, up to an `Eof`. - crate fn parse_all_token_trees(&mut self) -> PResult<'a, TokenStream> { + fn parse_all_token_trees(&mut self) -> PResult<'a, TokenStream> { let mut tts = Vec::new(); + self.real_token(); while self.token != token::Eof { tts.push(self.parse_token_tree()?); } @@ -34,11 +67,12 @@ impl<'a> StringReader<'a> { } fn parse_token_tree(&mut self) -> PResult<'a, TreeAndJoint> { - let sm = self.sess.source_map(); + let sm = self.string_reader.sess.source_map(); match self.token { token::Eof => { let msg = "this file contains an un-closed delimiter"; - let mut err = self.sess.span_diagnostic.struct_span_err(self.span, msg); + let mut err = self.string_reader.sess.span_diagnostic + .struct_span_err(self.span, msg); for &(_, sp) in &self.open_braces { err.span_label(sp, "un-closed delimiter"); } @@ -46,13 +80,12 @@ impl<'a> StringReader<'a> { if let Some((delim, _)) = self.open_braces.last() { if let Some((_, open_sp, close_sp)) = self.matching_delim_spans.iter() .filter(|(d, open_sp, close_sp)| { - - if let Some(close_padding) = sm.span_to_margin(*close_sp) { - if let Some(open_padding) = sm.span_to_margin(*open_sp) { - return delim == d && close_padding != open_padding; + if let Some(close_padding) = sm.span_to_margin(*close_sp) { + if let Some(open_padding) = sm.span_to_margin(*open_sp) { + return delim == d && close_padding != open_padding; + } } - } - false + false }).next() // these are in reverse order as they get inserted on close, but { // we want the last open/first close err.span_label( @@ -164,7 +197,8 @@ impl<'a> StringReader<'a> { // matching opening delimiter). let token_str = token_to_string(&self.token); let msg = format!("unexpected close delimiter: `{}`", token_str); - let mut err = self.sess.span_diagnostic.struct_span_err(self.span, &msg); + let mut err = self.string_reader.sess.span_diagnostic + .struct_span_err(self.span, &msg); err.span_label(self.span, "unexpected close delimiter"); Err(err) }, @@ -173,11 +207,20 @@ impl<'a> StringReader<'a> { // Note that testing for joint-ness here is done via the raw // source span as the joint-ness is a property of the raw source // rather than wanting to take `override_span` into account. - let raw = self.span_src_raw; + // Additionally, we actually check if the *next* pair of tokens + // is joint, but this is equivalent to checking the current pair. + let raw = self.string_reader.peek_span_src_raw; self.real_token(); - let is_joint = raw.hi() == self.span_src_raw.lo() && token::is_op(&self.token); + let is_joint = raw.hi() == self.string_reader.peek_span_src_raw.lo() + && token::is_op(&self.token); Ok((tt, if is_joint { Joint } else { NonJoint })) } } } + + fn real_token(&mut self) { + let t = self.string_reader.real_token(); + self.token = t.tok; + self.span = t.sp; + } } diff --git a/src/libsyntax/parse/literal.rs b/src/libsyntax/parse/literal.rs new file mode 100644 index 0000000000..53195421dd --- /dev/null +++ b/src/libsyntax/parse/literal.rs @@ -0,0 +1,487 @@ +//! Code related to parsing literals. + +use crate::ast::{self, Ident, Lit, LitKind}; +use crate::parse::parser::Parser; +use crate::parse::PResult; +use crate::parse::token::{self, Token}; +use crate::parse::unescape::{unescape_str, unescape_char, unescape_byte_str, unescape_byte}; +use crate::print::pprust; +use crate::symbol::{keywords, Symbol}; +use crate::tokenstream::{TokenStream, TokenTree}; + +use errors::{Applicability, Handler}; +use log::debug; +use rustc_data_structures::sync::Lrc; +use syntax_pos::Span; + +use std::ascii; + +macro_rules! err { + ($opt_diag:expr, |$span:ident, $diag:ident| $($body:tt)*) => { + match $opt_diag { + Some(($span, $diag)) => { $($body)* } + None => return None, + } + } +} + +impl LitKind { + /// Converts literal token with a suffix into a semantic literal. + /// Works speculatively and may return `None` if diagnostic handler is not passed. + /// If diagnostic handler is passed, always returns `Some`, + /// possibly after reporting non-fatal errors and recovery. + fn from_lit_token( + lit: token::Lit, + suf: Option, + diag: Option<(Span, &Handler)> + ) -> Option { + if suf.is_some() && !lit.may_have_suffix() { + err!(diag, |span, diag| { + expect_no_suffix(span, diag, &format!("a {}", lit.literal_name()), suf) + }); + } + + Some(match lit { + token::Bool(i) => { + assert!(i == keywords::True.name() || i == keywords::False.name()); + LitKind::Bool(i == keywords::True.name()) + } + token::Byte(i) => { + match unescape_byte(&i.as_str()) { + Ok(c) => LitKind::Byte(c), + Err(_) => LitKind::Err(i), + } + }, + token::Char(i) => { + match unescape_char(&i.as_str()) { + Ok(c) => LitKind::Char(c), + Err(_) => LitKind::Err(i), + } + }, + token::Err(i) => LitKind::Err(i), + + // There are some valid suffixes for integer and float literals, + // so all the handling is done internally. + token::Integer(s) => return integer_lit(&s.as_str(), suf, diag), + token::Float(s) => return float_lit(&s.as_str(), suf, diag), + + token::Str_(mut sym) => { + // If there are no characters requiring special treatment we can + // reuse the symbol from the Token. Otherwise, we must generate a + // new symbol because the string in the LitKind is different to the + // string in the Token. + let mut has_error = false; + let s = &sym.as_str(); + if s.as_bytes().iter().any(|&c| c == b'\\' || c == b'\r') { + let mut buf = String::with_capacity(s.len()); + unescape_str(s, &mut |_, unescaped_char| { + match unescaped_char { + Ok(c) => buf.push(c), + Err(_) => has_error = true, + } + }); + if has_error { + return Some(LitKind::Err(sym)); + } + sym = Symbol::intern(&buf) + } + + LitKind::Str(sym, ast::StrStyle::Cooked) + } + token::StrRaw(mut sym, n) => { + // Ditto. + let s = &sym.as_str(); + if s.contains('\r') { + sym = Symbol::intern(&raw_str_lit(s)); + } + LitKind::Str(sym, ast::StrStyle::Raw(n)) + } + token::ByteStr(i) => { + let s = &i.as_str(); + let mut buf = Vec::with_capacity(s.len()); + let mut has_error = false; + unescape_byte_str(s, &mut |_, unescaped_byte| { + match unescaped_byte { + Ok(c) => buf.push(c), + Err(_) => has_error = true, + } + }); + if has_error { + return Some(LitKind::Err(i)); + } + buf.shrink_to_fit(); + LitKind::ByteStr(Lrc::new(buf)) + } + token::ByteStrRaw(i, _) => { + LitKind::ByteStr(Lrc::new(i.to_string().into_bytes())) + } + }) + } + + /// Attempts to recover a token from semantic literal. + /// This function is used when the original token doesn't exist (e.g. the literal is created + /// by an AST-based macro) or unavailable (e.g. from HIR pretty-printing). + pub fn to_lit_token(&self) -> (token::Lit, Option) { + match *self { + LitKind::Str(string, ast::StrStyle::Cooked) => { + let escaped = string.as_str().escape_default().to_string(); + (token::Lit::Str_(Symbol::intern(&escaped)), None) + } + LitKind::Str(string, ast::StrStyle::Raw(n)) => { + (token::Lit::StrRaw(string, n), None) + } + LitKind::ByteStr(ref bytes) => { + let string = bytes.iter().cloned().flat_map(ascii::escape_default) + .map(Into::::into).collect::(); + (token::Lit::ByteStr(Symbol::intern(&string)), None) + } + LitKind::Byte(byte) => { + let string: String = ascii::escape_default(byte).map(Into::::into).collect(); + (token::Lit::Byte(Symbol::intern(&string)), None) + } + LitKind::Char(ch) => { + let string: String = ch.escape_default().map(Into::::into).collect(); + (token::Lit::Char(Symbol::intern(&string)), None) + } + LitKind::Int(n, ty) => { + let suffix = match ty { + ast::LitIntType::Unsigned(ty) => Some(Symbol::intern(ty.ty_to_string())), + ast::LitIntType::Signed(ty) => Some(Symbol::intern(ty.ty_to_string())), + ast::LitIntType::Unsuffixed => None, + }; + (token::Lit::Integer(Symbol::intern(&n.to_string())), suffix) + } + LitKind::Float(symbol, ty) => { + (token::Lit::Float(symbol), Some(Symbol::intern(ty.ty_to_string()))) + } + LitKind::FloatUnsuffixed(symbol) => (token::Lit::Float(symbol), None), + LitKind::Bool(value) => { + let kw = if value { keywords::True } else { keywords::False }; + (token::Lit::Bool(kw.name()), None) + } + LitKind::Err(val) => (token::Lit::Err(val), None), + } + } +} + +impl Lit { + /// Converts literal token with a suffix into an AST literal. + /// Works speculatively and may return `None` if diagnostic handler is not passed. + /// If diagnostic handler is passed, may return `Some`, + /// possibly after reporting non-fatal errors and recovery, or `None` for irrecoverable errors. + crate fn from_token( + token: &token::Token, + span: Span, + diag: Option<(Span, &Handler)>, + ) -> Option { + let (token, suffix) = match *token { + token::Ident(ident, false) if ident.name == keywords::True.name() || + ident.name == keywords::False.name() => + (token::Bool(ident.name), None), + token::Literal(token, suffix) => + (token, suffix), + token::Interpolated(ref nt) => { + if let token::NtExpr(expr) | token::NtLiteral(expr) = &**nt { + if let ast::ExprKind::Lit(lit) = &expr.node { + return Some(lit.clone()); + } + } + return None; + } + _ => return None, + }; + + let node = LitKind::from_lit_token(token, suffix, diag)?; + Some(Lit { node, token, suffix, span }) + } + + /// Attempts to recover an AST literal from semantic literal. + /// This function is used when the original token doesn't exist (e.g. the literal is created + /// by an AST-based macro) or unavailable (e.g. from HIR pretty-printing). + pub fn from_lit_kind(node: LitKind, span: Span) -> Lit { + let (token, suffix) = node.to_lit_token(); + Lit { node, token, suffix, span } + } + + /// Losslessly convert an AST literal into a token stream. + crate fn tokens(&self) -> TokenStream { + let token = match self.token { + token::Bool(symbol) => Token::Ident(Ident::with_empty_ctxt(symbol), false), + token => Token::Literal(token, self.suffix), + }; + TokenTree::Token(self.span, token).into() + } +} + +impl<'a> Parser<'a> { + /// Matches `lit = true | false | token_lit`. + crate fn parse_lit(&mut self) -> PResult<'a, Lit> { + let diag = Some((self.span, &self.sess.span_diagnostic)); + if let Some(lit) = Lit::from_token(&self.token, self.span, diag) { + self.bump(); + return Ok(lit); + } else if self.token == token::Dot { + // Recover `.4` as `0.4`. + let recovered = self.look_ahead(1, |t| { + if let token::Literal(token::Integer(val), suf) = *t { + let next_span = self.look_ahead_span(1); + if self.span.hi() == next_span.lo() { + let sym = String::from("0.") + &val.as_str(); + let token = token::Literal(token::Float(Symbol::intern(&sym)), suf); + return Some((token, self.span.to(next_span))); + } + } + None + }); + if let Some((token, span)) = recovered { + self.diagnostic() + .struct_span_err(span, "float literals must have an integer part") + .span_suggestion( + span, + "must have an integer part", + pprust::token_to_string(&token), + Applicability::MachineApplicable, + ) + .emit(); + let diag = Some((span, &self.sess.span_diagnostic)); + if let Some(lit) = Lit::from_token(&token, span, diag) { + self.bump(); + self.bump(); + return Ok(lit); + } + } + } + + Err(self.span_fatal(self.span, &format!("unexpected token: {}", self.this_token_descr()))) + } +} + +crate fn expect_no_suffix(sp: Span, diag: &Handler, kind: &str, suffix: Option) { + match suffix { + None => {/* everything ok */} + Some(suf) => { + let text = suf.as_str(); + if text.is_empty() { + diag.span_bug(sp, "found empty literal suffix in Some") + } + let mut err = if kind == "a tuple index" && + ["i32", "u32", "isize", "usize"].contains(&text.to_string().as_str()) + { + // #59553: warn instead of reject out of hand to allow the fix to percolate + // through the ecosystem when people fix their macros + let mut err = diag.struct_span_warn( + sp, + &format!("suffixes on {} are invalid", kind), + ); + err.note(&format!( + "`{}` is *temporarily* accepted on tuple index fields as it was \ + incorrectly accepted on stable for a few releases", + text, + )); + err.help( + "on proc macros, you'll want to use `syn::Index::from` or \ + `proc_macro::Literal::*_unsuffixed` for code that will desugar \ + to tuple field access", + ); + err.note( + "for more context, see https://github.com/rust-lang/rust/issues/60210", + ); + err + } else { + diag.struct_span_err(sp, &format!("suffixes on {} are invalid", kind)) + }; + err.span_label(sp, format!("invalid suffix `{}`", text)); + err.emit(); + } + } +} + +/// Parses a string representing a raw string literal into its final form. The +/// only operation this does is convert embedded CRLF into a single LF. +fn raw_str_lit(lit: &str) -> String { + debug!("raw_str_lit: given {}", lit.escape_default()); + let mut res = String::with_capacity(lit.len()); + + let mut chars = lit.chars().peekable(); + while let Some(c) = chars.next() { + if c == '\r' { + if *chars.peek().unwrap() != '\n' { + panic!("lexer accepted bare CR"); + } + chars.next(); + res.push('\n'); + } else { + res.push(c); + } + } + + res.shrink_to_fit(); + res +} + +// check if `s` looks like i32 or u1234 etc. +fn looks_like_width_suffix(first_chars: &[char], s: &str) -> bool { + s.starts_with(first_chars) && s[1..].chars().all(|c| c.is_ascii_digit()) +} + +fn filtered_float_lit(data: Symbol, suffix: Option, diag: Option<(Span, &Handler)>) + -> Option { + debug!("filtered_float_lit: {}, {:?}", data, suffix); + let suffix = match suffix { + Some(suffix) => suffix, + None => return Some(LitKind::FloatUnsuffixed(data)), + }; + + Some(match &*suffix.as_str() { + "f32" => LitKind::Float(data, ast::FloatTy::F32), + "f64" => LitKind::Float(data, ast::FloatTy::F64), + suf => { + err!(diag, |span, diag| { + if suf.len() >= 2 && looks_like_width_suffix(&['f'], suf) { + // if it looks like a width, lets try to be helpful. + let msg = format!("invalid width `{}` for float literal", &suf[1..]); + diag.struct_span_err(span, &msg).help("valid widths are 32 and 64").emit() + } else { + let msg = format!("invalid suffix `{}` for float literal", suf); + diag.struct_span_err(span, &msg) + .span_label(span, format!("invalid suffix `{}`", suf)) + .help("valid suffixes are `f32` and `f64`") + .emit(); + } + }); + + LitKind::FloatUnsuffixed(data) + } + }) +} +fn float_lit(s: &str, suffix: Option, diag: Option<(Span, &Handler)>) + -> Option { + debug!("float_lit: {:?}, {:?}", s, suffix); + // FIXME #2252: bounds checking float literals is deferred until trans + + // Strip underscores without allocating a new String unless necessary. + let s2; + let s = if s.chars().any(|c| c == '_') { + s2 = s.chars().filter(|&c| c != '_').collect::(); + &s2 + } else { + s + }; + + filtered_float_lit(Symbol::intern(s), suffix, diag) +} + +fn integer_lit(s: &str, suffix: Option, diag: Option<(Span, &Handler)>) + -> Option { + // s can only be ascii, byte indexing is fine + + // Strip underscores without allocating a new String unless necessary. + let s2; + let mut s = if s.chars().any(|c| c == '_') { + s2 = s.chars().filter(|&c| c != '_').collect::(); + &s2 + } else { + s + }; + + debug!("integer_lit: {}, {:?}", s, suffix); + + let mut base = 10; + let orig = s; + let mut ty = ast::LitIntType::Unsuffixed; + + if s.starts_with('0') && s.len() > 1 { + match s.as_bytes()[1] { + b'x' => base = 16, + b'o' => base = 8, + b'b' => base = 2, + _ => { } + } + } + + // 1f64 and 2f32 etc. are valid float literals. + if let Some(suf) = suffix { + if looks_like_width_suffix(&['f'], &suf.as_str()) { + let err = match base { + 16 => Some("hexadecimal float literal is not supported"), + 8 => Some("octal float literal is not supported"), + 2 => Some("binary float literal is not supported"), + _ => None, + }; + if let Some(err) = err { + err!(diag, |span, diag| { + diag.struct_span_err(span, err) + .span_label(span, "not supported") + .emit(); + }); + } + return filtered_float_lit(Symbol::intern(s), Some(suf), diag) + } + } + + if base != 10 { + s = &s[2..]; + } + + if let Some(suf) = suffix { + if suf.as_str().is_empty() { + err!(diag, |span, diag| diag.span_bug(span, "found empty literal suffix in Some")); + } + ty = match &*suf.as_str() { + "isize" => ast::LitIntType::Signed(ast::IntTy::Isize), + "i8" => ast::LitIntType::Signed(ast::IntTy::I8), + "i16" => ast::LitIntType::Signed(ast::IntTy::I16), + "i32" => ast::LitIntType::Signed(ast::IntTy::I32), + "i64" => ast::LitIntType::Signed(ast::IntTy::I64), + "i128" => ast::LitIntType::Signed(ast::IntTy::I128), + "usize" => ast::LitIntType::Unsigned(ast::UintTy::Usize), + "u8" => ast::LitIntType::Unsigned(ast::UintTy::U8), + "u16" => ast::LitIntType::Unsigned(ast::UintTy::U16), + "u32" => ast::LitIntType::Unsigned(ast::UintTy::U32), + "u64" => ast::LitIntType::Unsigned(ast::UintTy::U64), + "u128" => ast::LitIntType::Unsigned(ast::UintTy::U128), + suf => { + // i and u look like widths, so lets + // give an error message along those lines + err!(diag, |span, diag| { + if looks_like_width_suffix(&['i', 'u'], suf) { + let msg = format!("invalid width `{}` for integer literal", &suf[1..]); + diag.struct_span_err(span, &msg) + .help("valid widths are 8, 16, 32, 64 and 128") + .emit(); + } else { + let msg = format!("invalid suffix `{}` for numeric literal", suf); + diag.struct_span_err(span, &msg) + .span_label(span, format!("invalid suffix `{}`", suf)) + .help("the suffix must be one of the integral types \ + (`u32`, `isize`, etc)") + .emit(); + } + }); + + ty + } + } + } + + debug!("integer_lit: the type is {:?}, base {:?}, the new string is {:?}, the original \ + string was {:?}, the original suffix was {:?}", ty, base, s, orig, suffix); + + Some(match u128::from_str_radix(s, base) { + Ok(r) => LitKind::Int(r, ty), + Err(_) => { + // small bases are lexed as if they were base 10, e.g, the string + // might be `0b10201`. This will cause the conversion above to fail, + // but these cases have errors in the lexer: we don't want to emit + // two errors, and we especially don't want to emit this error since + // it isn't necessarily true. + let already_errored = base < 10 && + s.chars().any(|c| c.to_digit(10).map_or(false, |d| d >= base)); + + if !already_errored { + err!(diag, |span, diag| diag.span_err(span, "int literal is too large")); + } + LitKind::Int(0, ty) + } + }) +} diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 371e8fe5cf..0611c1d9b4 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -5,20 +5,17 @@ use crate::early_buffered_lints::{BufferedEarlyLint, BufferedEarlyLintId}; use crate::source_map::{SourceMap, FilePathMapping}; use crate::feature_gate::UnstableFeatures; use crate::parse::parser::Parser; -use crate::symbol::Symbol; use crate::syntax::parse::parser::emit_unclosed_delims; use crate::tokenstream::{TokenStream, TokenTree}; use crate::diagnostics::plugin::ErrorMap; use crate::print::pprust::token_to_string; -use errors::{FatalError, Level, Handler, ColorConfig, Diagnostic, DiagnosticBuilder}; +use errors::{Applicability, FatalError, Level, Handler, ColorConfig, Diagnostic, DiagnosticBuilder}; use rustc_data_structures::sync::{Lrc, Lock}; use syntax_pos::{Span, SourceFile, FileName, MultiSpan}; -use log::debug; -use rustc_data_structures::fx::FxHashSet; +use rustc_data_structures::fx::{FxHashSet, FxHashMap}; use std::borrow::Cow; -use std::iter; use std::path::{Path, PathBuf}; use std::str; @@ -26,12 +23,15 @@ pub type PResult<'a, T> = Result>; #[macro_use] pub mod parser; - +pub mod attr; pub mod lexer; pub mod token; -pub mod attr; -pub mod classify; +crate mod classify; +crate mod diagnostics; +crate mod literal; +crate mod unescape; +crate mod unescape_error_reporting; /// Info about a parsing session. pub struct ParseSess { @@ -47,6 +47,10 @@ pub struct ParseSess { included_mod_stack: Lock>, source_map: Lrc, pub buffered_lints: Lock>, + /// Contains the spans of block expressions that could have been incomplete based on the + /// operation token that followed it, but that the parser cannot identify without further + /// analysis. + pub ambiguous_block_expr_parse: Lock>, } impl ParseSess { @@ -70,6 +74,7 @@ impl ParseSess { included_mod_stack: Lock::new(vec![]), source_map, buffered_lints: Lock::new(vec![]), + ambiguous_block_expr_parse: Lock::new(FxHashMap::default()), } } @@ -93,6 +98,24 @@ impl ParseSess { }); }); } + + /// Extend an error with a suggestion to wrap an expression with parentheses to allow the + /// parser to continue parsing the following operation as part of the same expression. + pub fn expr_parentheses_needed( + &self, + err: &mut DiagnosticBuilder<'_>, + span: Span, + alt_snippet: Option, + ) { + if let Some(snippet) = self.source_map().span_to_snippet(span).ok().or(alt_snippet) { + err.span_suggestion( + span, + "parentheses are required to parse this as an expression", + format!("({})", snippet), + Applicability::MachineApplicable, + ); + } + } } #[derive(Clone)] @@ -267,22 +290,22 @@ pub fn source_file_to_stream( } /// Given a source file, produces a sequence of token trees. Returns any buffered errors from -/// parsing the token tream. +/// parsing the token stream. pub fn maybe_file_to_stream( sess: &ParseSess, source_file: Lrc, override_span: Option, ) -> Result<(TokenStream, Vec), Vec> { - let mut srdr = lexer::StringReader::new_or_buffered_errs(sess, source_file, override_span)?; - srdr.real_token(); + let srdr = lexer::StringReader::new_or_buffered_errs(sess, source_file, override_span)?; + let (token_trees, unmatched_braces) = srdr.into_token_trees(); - match srdr.parse_all_token_trees() { - Ok(stream) => Ok((stream, srdr.unmatched_braces)), + match token_trees { + Ok(stream) => Ok((stream, unmatched_braces)), Err(err) => { let mut buffer = Vec::with_capacity(1); err.buffer(&mut buffer); // Not using `emit_unclosed_delims` to use `db.buffer` - for unmatched in srdr.unmatched_braces { + for unmatched in unmatched_braces { let mut db = sess.span_diagnostic.struct_span_err(unmatched.found_span, &format!( "incorrect close delimiter: `{}`", token_to_string(&token::Token::CloseDelim(unmatched.found_delim)), @@ -306,463 +329,6 @@ pub fn stream_to_parser(sess: &ParseSess, stream: TokenStream) -> Parser<'_> { Parser::new(sess, stream, None, true, false) } -/// Parses a string representing a character literal into its final form. -/// Rather than just accepting/rejecting a given literal, unescapes it as -/// well. Can take any slice prefixed by a character escape. Returns the -/// character and the number of characters consumed. -fn char_lit(lit: &str, diag: Option<(Span, &Handler)>) -> (char, isize) { - use std::char; - - // Handle non-escaped chars first. - if lit.as_bytes()[0] != b'\\' { - // If the first byte isn't '\\' it might part of a multi-byte char, so - // get the char with chars(). - let c = lit.chars().next().unwrap(); - return (c, 1); - } - - // Handle escaped chars. - match lit.as_bytes()[1] as char { - '"' => ('"', 2), - 'n' => ('\n', 2), - 'r' => ('\r', 2), - 't' => ('\t', 2), - '\\' => ('\\', 2), - '\'' => ('\'', 2), - '0' => ('\0', 2), - 'x' => { - let v = u32::from_str_radix(&lit[2..4], 16).unwrap(); - let c = char::from_u32(v).unwrap(); - (c, 4) - } - 'u' => { - assert_eq!(lit.as_bytes()[2], b'{'); - let idx = lit.find('}').unwrap(); - - // All digits and '_' are ascii, so treat each byte as a char. - let mut v: u32 = 0; - for c in lit[3..idx].bytes() { - let c = char::from(c); - if c != '_' { - let x = c.to_digit(16).unwrap(); - v = v.checked_mul(16).unwrap().checked_add(x).unwrap(); - } - } - let c = char::from_u32(v).unwrap_or_else(|| { - if let Some((span, diag)) = diag { - let mut diag = diag.struct_span_err(span, "invalid unicode character escape"); - if v > 0x10FFFF { - diag.help("unicode escape must be at most 10FFFF").emit(); - } else { - diag.help("unicode escape must not be a surrogate").emit(); - } - } - '\u{FFFD}' - }); - (c, (idx + 1) as isize) - } - _ => panic!("lexer should have rejected a bad character escape {}", lit) - } -} - -/// Parses a string representing a string literal into its final form. Does unescaping. -pub fn str_lit(lit: &str, diag: Option<(Span, &Handler)>) -> String { - debug!("str_lit: given {}", lit.escape_default()); - let mut res = String::with_capacity(lit.len()); - - let error = |i| format!("lexer should have rejected {} at {}", lit, i); - - /// Eat everything up to a non-whitespace. - fn eat<'a>(it: &mut iter::Peekable>) { - loop { - match it.peek().map(|x| x.1) { - Some(' ') | Some('\n') | Some('\r') | Some('\t') => { - it.next(); - }, - _ => { break; } - } - } - } - - let mut chars = lit.char_indices().peekable(); - while let Some((i, c)) = chars.next() { - match c { - '\\' => { - let ch = chars.peek().unwrap_or_else(|| { - panic!("{}", error(i)) - }).1; - - if ch == '\n' { - eat(&mut chars); - } else if ch == '\r' { - chars.next(); - let ch = chars.peek().unwrap_or_else(|| { - panic!("{}", error(i)) - }).1; - - if ch != '\n' { - panic!("lexer accepted bare CR"); - } - eat(&mut chars); - } else { - // otherwise, a normal escape - let (c, n) = char_lit(&lit[i..], diag); - for _ in 0..n - 1 { // we don't need to move past the first \ - chars.next(); - } - res.push(c); - } - }, - '\r' => { - let ch = chars.peek().unwrap_or_else(|| { - panic!("{}", error(i)) - }).1; - - if ch != '\n' { - panic!("lexer accepted bare CR"); - } - chars.next(); - res.push('\n'); - } - c => res.push(c), - } - } - - res.shrink_to_fit(); // probably not going to do anything, unless there was an escape. - debug!("parse_str_lit: returning {}", res); - res -} - -/// Parses a string representing a raw string literal into its final form. The -/// only operation this does is convert embedded CRLF into a single LF. -fn raw_str_lit(lit: &str) -> String { - debug!("raw_str_lit: given {}", lit.escape_default()); - let mut res = String::with_capacity(lit.len()); - - let mut chars = lit.chars().peekable(); - while let Some(c) = chars.next() { - if c == '\r' { - if *chars.peek().unwrap() != '\n' { - panic!("lexer accepted bare CR"); - } - chars.next(); - res.push('\n'); - } else { - res.push(c); - } - } - - res.shrink_to_fit(); - res -} - -// check if `s` looks like i32 or u1234 etc. -fn looks_like_width_suffix(first_chars: &[char], s: &str) -> bool { - s.starts_with(first_chars) && s[1..].chars().all(|c| c.is_ascii_digit()) -} - -macro_rules! err { - ($opt_diag:expr, |$span:ident, $diag:ident| $($body:tt)*) => { - match $opt_diag { - Some(($span, $diag)) => { $($body)* } - None => return None, - } - } -} - -crate fn lit_token(lit: token::Lit, suf: Option, diag: Option<(Span, &Handler)>) - -> (bool /* suffix illegal? */, Option) { - use ast::LitKind; - - match lit { - token::Byte(i) => (true, Some(LitKind::Byte(byte_lit(&i.as_str()).0))), - token::Char(i) => (true, Some(LitKind::Char(char_lit(&i.as_str(), diag).0))), - token::Err(i) => (true, Some(LitKind::Err(i))), - - // There are some valid suffixes for integer and float literals, - // so all the handling is done internally. - token::Integer(s) => (false, integer_lit(&s.as_str(), suf, diag)), - token::Float(s) => (false, float_lit(&s.as_str(), suf, diag)), - - token::Str_(mut sym) => { - // If there are no characters requiring special treatment we can - // reuse the symbol from the Token. Otherwise, we must generate a - // new symbol because the string in the LitKind is different to the - // string in the Token. - let s = &sym.as_str(); - if s.as_bytes().iter().any(|&c| c == b'\\' || c == b'\r') { - sym = Symbol::intern(&str_lit(s, diag)); - } - (true, Some(LitKind::Str(sym, ast::StrStyle::Cooked))) - } - token::StrRaw(mut sym, n) => { - // Ditto. - let s = &sym.as_str(); - if s.contains('\r') { - sym = Symbol::intern(&raw_str_lit(s)); - } - (true, Some(LitKind::Str(sym, ast::StrStyle::Raw(n)))) - } - token::ByteStr(i) => { - (true, Some(LitKind::ByteStr(byte_str_lit(&i.as_str())))) - } - token::ByteStrRaw(i, _) => { - (true, Some(LitKind::ByteStr(Lrc::new(i.to_string().into_bytes())))) - } - } -} - -fn filtered_float_lit(data: Symbol, suffix: Option, diag: Option<(Span, &Handler)>) - -> Option { - debug!("filtered_float_lit: {}, {:?}", data, suffix); - let suffix = match suffix { - Some(suffix) => suffix, - None => return Some(ast::LitKind::FloatUnsuffixed(data)), - }; - - Some(match &*suffix.as_str() { - "f32" => ast::LitKind::Float(data, ast::FloatTy::F32), - "f64" => ast::LitKind::Float(data, ast::FloatTy::F64), - suf => { - err!(diag, |span, diag| { - if suf.len() >= 2 && looks_like_width_suffix(&['f'], suf) { - // if it looks like a width, lets try to be helpful. - let msg = format!("invalid width `{}` for float literal", &suf[1..]); - diag.struct_span_err(span, &msg).help("valid widths are 32 and 64").emit() - } else { - let msg = format!("invalid suffix `{}` for float literal", suf); - diag.struct_span_err(span, &msg) - .span_label(span, format!("invalid suffix `{}`", suf)) - .help("valid suffixes are `f32` and `f64`") - .emit(); - } - }); - - ast::LitKind::FloatUnsuffixed(data) - } - }) -} -fn float_lit(s: &str, suffix: Option, diag: Option<(Span, &Handler)>) - -> Option { - debug!("float_lit: {:?}, {:?}", s, suffix); - // FIXME #2252: bounds checking float literals is deferred until trans - - // Strip underscores without allocating a new String unless necessary. - let s2; - let s = if s.chars().any(|c| c == '_') { - s2 = s.chars().filter(|&c| c != '_').collect::(); - &s2 - } else { - s - }; - - filtered_float_lit(Symbol::intern(s), suffix, diag) -} - -/// Parses a string representing a byte literal into its final form. Similar to `char_lit`. -fn byte_lit(lit: &str) -> (u8, usize) { - let err = |i| format!("lexer accepted invalid byte literal {} step {}", lit, i); - - if lit.len() == 1 { - (lit.as_bytes()[0], 1) - } else { - assert_eq!(lit.as_bytes()[0], b'\\', "{}", err(0)); - let b = match lit.as_bytes()[1] { - b'"' => b'"', - b'n' => b'\n', - b'r' => b'\r', - b't' => b'\t', - b'\\' => b'\\', - b'\'' => b'\'', - b'0' => b'\0', - _ => { - match u64::from_str_radix(&lit[2..4], 16).ok() { - Some(c) => - if c > 0xFF { - panic!(err(2)) - } else { - return (c as u8, 4) - }, - None => panic!(err(3)) - } - } - }; - (b, 2) - } -} - -fn byte_str_lit(lit: &str) -> Lrc> { - let mut res = Vec::with_capacity(lit.len()); - - let error = |i| panic!("lexer should have rejected {} at {}", lit, i); - - /// Eat everything up to a non-whitespace. - fn eat>(it: &mut iter::Peekable) { - loop { - match it.peek().map(|x| x.1) { - Some(b' ') | Some(b'\n') | Some(b'\r') | Some(b'\t') => { - it.next(); - }, - _ => { break; } - } - } - } - - // byte string literals *must* be ASCII, but the escapes don't have to be - let mut chars = lit.bytes().enumerate().peekable(); - loop { - match chars.next() { - Some((i, b'\\')) => { - match chars.peek().unwrap_or_else(|| error(i)).1 { - b'\n' => eat(&mut chars), - b'\r' => { - chars.next(); - if chars.peek().unwrap_or_else(|| error(i)).1 != b'\n' { - panic!("lexer accepted bare CR"); - } - eat(&mut chars); - } - _ => { - // otherwise, a normal escape - let (c, n) = byte_lit(&lit[i..]); - // we don't need to move past the first \ - for _ in 0..n - 1 { - chars.next(); - } - res.push(c); - } - } - }, - Some((i, b'\r')) => { - if chars.peek().unwrap_or_else(|| error(i)).1 != b'\n' { - panic!("lexer accepted bare CR"); - } - chars.next(); - res.push(b'\n'); - } - Some((_, c)) => res.push(c), - None => break, - } - } - - Lrc::new(res) -} - -fn integer_lit(s: &str, suffix: Option, diag: Option<(Span, &Handler)>) - -> Option { - // s can only be ascii, byte indexing is fine - - // Strip underscores without allocating a new String unless necessary. - let s2; - let mut s = if s.chars().any(|c| c == '_') { - s2 = s.chars().filter(|&c| c != '_').collect::(); - &s2 - } else { - s - }; - - debug!("integer_lit: {}, {:?}", s, suffix); - - let mut base = 10; - let orig = s; - let mut ty = ast::LitIntType::Unsuffixed; - - if s.starts_with('0') && s.len() > 1 { - match s.as_bytes()[1] { - b'x' => base = 16, - b'o' => base = 8, - b'b' => base = 2, - _ => { } - } - } - - // 1f64 and 2f32 etc. are valid float literals. - if let Some(suf) = suffix { - if looks_like_width_suffix(&['f'], &suf.as_str()) { - let err = match base { - 16 => Some("hexadecimal float literal is not supported"), - 8 => Some("octal float literal is not supported"), - 2 => Some("binary float literal is not supported"), - _ => None, - }; - if let Some(err) = err { - err!(diag, |span, diag| { - diag.struct_span_err(span, err) - .span_label(span, "not supported") - .emit(); - }); - } - return filtered_float_lit(Symbol::intern(s), Some(suf), diag) - } - } - - if base != 10 { - s = &s[2..]; - } - - if let Some(suf) = suffix { - if suf.as_str().is_empty() { - err!(diag, |span, diag| diag.span_bug(span, "found empty literal suffix in Some")); - } - ty = match &*suf.as_str() { - "isize" => ast::LitIntType::Signed(ast::IntTy::Isize), - "i8" => ast::LitIntType::Signed(ast::IntTy::I8), - "i16" => ast::LitIntType::Signed(ast::IntTy::I16), - "i32" => ast::LitIntType::Signed(ast::IntTy::I32), - "i64" => ast::LitIntType::Signed(ast::IntTy::I64), - "i128" => ast::LitIntType::Signed(ast::IntTy::I128), - "usize" => ast::LitIntType::Unsigned(ast::UintTy::Usize), - "u8" => ast::LitIntType::Unsigned(ast::UintTy::U8), - "u16" => ast::LitIntType::Unsigned(ast::UintTy::U16), - "u32" => ast::LitIntType::Unsigned(ast::UintTy::U32), - "u64" => ast::LitIntType::Unsigned(ast::UintTy::U64), - "u128" => ast::LitIntType::Unsigned(ast::UintTy::U128), - suf => { - // i and u look like widths, so lets - // give an error message along those lines - err!(diag, |span, diag| { - if looks_like_width_suffix(&['i', 'u'], suf) { - let msg = format!("invalid width `{}` for integer literal", &suf[1..]); - diag.struct_span_err(span, &msg) - .help("valid widths are 8, 16, 32, 64 and 128") - .emit(); - } else { - let msg = format!("invalid suffix `{}` for numeric literal", suf); - diag.struct_span_err(span, &msg) - .span_label(span, format!("invalid suffix `{}`", suf)) - .help("the suffix must be one of the integral types \ - (`u32`, `isize`, etc)") - .emit(); - } - }); - - ty - } - } - } - - debug!("integer_lit: the type is {:?}, base {:?}, the new string is {:?}, the original \ - string was {:?}, the original suffix was {:?}", ty, base, s, orig, suffix); - - Some(match u128::from_str_radix(s, base) { - Ok(r) => ast::LitKind::Int(r, ty), - Err(_) => { - // small bases are lexed as if they were base 10, e.g, the string - // might be `0b10201`. This will cause the conversion above to fail, - // but these cases have errors in the lexer: we don't want to emit - // two errors, and we especially don't want to emit this error since - // it isn't necessarily true. - let already_errored = base < 10 && - s.chars().any(|c| c.to_digit(10).map_or(false, |d| d >= base)); - - if !already_errored { - err!(diag, |span, diag| diag.span_err(span, "int literal is too large")); - } - ast::LitKind::Int(0, ty) - } - }) -} - /// A sequence separator. pub struct SeqSep { /// The seperator token. @@ -825,6 +391,8 @@ mod tests { #[test] fn string_to_tts_macro () { with_globals(|| { + use crate::symbol::sym; + let tts: Vec<_> = string_to_stream("macro_rules! zip (($a)=>($a))".to_string()).trees().collect(); let tts: &[TokenTree] = &tts[..]; @@ -837,8 +405,8 @@ mod tests { Some(&TokenTree::Token(_, token::Ident(name_zip, false))), Some(&TokenTree::Delimited(_, macro_delim, ref macro_tts)), ) - if name_macro_rules.name == "macro_rules" - && name_zip.name == "zip" => { + if name_macro_rules.name == sym::macro_rules + && name_zip.name.as_str() == "zip" => { let tts = ¯o_tts.trees().collect::>(); match (tts.len(), tts.get(0), tts.get(1), tts.get(2)) { ( @@ -855,7 +423,7 @@ mod tests { Some(&TokenTree::Token(_, token::Dollar)), Some(&TokenTree::Token(_, token::Ident(ident, false))), ) - if first_delim == token::Paren && ident.name == "a" => {}, + if first_delim == token::Paren && ident.name.as_str() == "a" => {}, _ => panic!("value 3: {:?} {:?}", first_delim, first_tts), } let tts = &second_tts.trees().collect::>(); @@ -865,7 +433,7 @@ mod tests { Some(&TokenTree::Token(_, token::Dollar)), Some(&TokenTree::Token(_, token::Ident(ident, false))), ) - if second_delim == token::Paren && ident.name == "a" => {}, + if second_delim == token::Paren && ident.name.as_str() == "a" => {}, _ => panic!("value 4: {:?} {:?}", second_delim, second_tts), } }, @@ -1009,20 +577,22 @@ mod tests { #[test] fn crlf_doc_comments() { with_globals(|| { + use crate::symbol::sym; + let sess = ParseSess::new(FilePathMapping::empty()); let name_1 = FileName::Custom("crlf_source_1".to_string()); let source = "/// doc comment\r\nfn foo() {}".to_string(); let item = parse_item_from_source_str(name_1, source, &sess) .unwrap().unwrap(); - let doc = first_attr_value_str_by_name(&item.attrs, "doc").unwrap(); - assert_eq!(doc, "/// doc comment"); + let doc = first_attr_value_str_by_name(&item.attrs, sym::doc).unwrap(); + assert_eq!(doc.as_str(), "/// doc comment"); let name_2 = FileName::Custom("crlf_source_2".to_string()); let source = "/// doc comment\r\n/// line 2\r\nfn foo() {}".to_string(); let item = parse_item_from_source_str(name_2, source, &sess) .unwrap().unwrap(); - let docs = item.attrs.iter().filter(|a| a.path == "doc") + let docs = item.attrs.iter().filter(|a| a.path == sym::doc) .map(|a| a.value_str().unwrap().to_string()).collect::>(); let b: &[_] = &["/// doc comment".to_string(), "/// line 2".to_string()]; assert_eq!(&docs[..], b); @@ -1030,8 +600,8 @@ mod tests { let name_3 = FileName::Custom("clrf_source_3".to_string()); let source = "/** doc comment\r\n * with CRLF */\r\nfn foo() {}".to_string(); let item = parse_item_from_source_str(name_3, source, &sess).unwrap().unwrap(); - let doc = first_attr_value_str_by_name(&item.attrs, "doc").unwrap(); - assert_eq!(doc, "/** doc comment\n * with CRLF */"); + let doc = first_attr_value_str_by_name(&item.attrs, sym::doc).unwrap(); + assert_eq!(doc.as_str(), "/** doc comment\n * with CRLF */"); }); } diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index f415f769f7..1787061776 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1,7 +1,9 @@ -use crate::ast::{AngleBracketedArgs, ParenthesizedArgs, AttrStyle, BareFnTy}; +// ignore-tidy-filelength + +use crate::ast::{AngleBracketedArgs, AsyncArgument, ParenthesizedArgs, AttrStyle, BareFnTy}; use crate::ast::{GenericBound, TraitBoundModifier}; use crate::ast::Unsafety; -use crate::ast::{Mod, AnonConst, Arg, Arm, Guard, Attribute, BindingMode, TraitItemKind}; +use crate::ast::{Mod, AnonConst, Arg, ArgSource, Arm, Guard, Attribute, BindingMode, TraitItemKind}; use crate::ast::Block; use crate::ast::{BlockCheckMode, CaptureBy, Movability}; use crate::ast::{Constness, Crate}; @@ -13,8 +15,8 @@ use crate::ast::{ForeignItem, ForeignItemKind, FunctionRetTy}; use crate::ast::{GenericParam, GenericParamKind}; use crate::ast::GenericArg; use crate::ast::{Ident, ImplItem, IsAsync, IsAuto, Item, ItemKind}; -use crate::ast::{Label, Lifetime, Lit, LitKind}; -use crate::ast::Local; +use crate::ast::{Label, Lifetime}; +use crate::ast::{Local, LocalSource}; use crate::ast::MacStmtStyle; use crate::ast::{Mac, Mac_, MacDelimiter}; use crate::ast::{MutTy, Mutability}; @@ -33,7 +35,7 @@ use crate::ast::{RangeEnd, RangeSyntax}; use crate::{ast, attr}; use crate::ext::base::DummyResult; use crate::source_map::{self, SourceMap, Spanned, respan}; -use crate::parse::{self, SeqSep, classify, token}; +use crate::parse::{SeqSep, classify, literal, token}; use crate::parse::lexer::{TokenAndSpan, UnmatchedBrace}; use crate::parse::lexer::comments::{doc_comment_style, strip_doc_comment_decoration}; use crate::parse::token::DelimToken; @@ -44,11 +46,14 @@ use crate::ptr::P; use crate::parse::PResult; use crate::ThinVec; use crate::tokenstream::{self, DelimSpan, TokenTree, TokenStream, TreeAndJoint}; -use crate::symbol::{Symbol, keywords}; +use crate::symbol::{keywords, sym, Symbol}; use errors::{Applicability, DiagnosticBuilder, DiagnosticId, FatalError}; use rustc_target::spec::abi::{self, Abi}; -use syntax_pos::{Span, MultiSpan, BytePos, FileName}; +use syntax_pos::{ + Span, MultiSpan, BytePos, FileName, + hygiene::CompilerDesugaringKind, +}; use log::{debug, trace}; use std::borrow::Cow; @@ -99,14 +104,14 @@ pub enum PathStyle { } #[derive(Clone, Copy, PartialEq, Debug)] -enum SemiColonMode { +crate enum SemiColonMode { Break, Ignore, Comma, } #[derive(Clone, Copy, PartialEq, Debug)] -enum BlockMode { +crate enum BlockMode { Break, Ignore, } @@ -184,44 +189,10 @@ enum PrevTokenKind { Interpolated, Eof, Ident, + BitOr, Other, } -trait RecoverQPath: Sized + 'static { - const PATH_STYLE: PathStyle = PathStyle::Expr; - fn to_ty(&self) -> Option>; - fn recovered(qself: Option, path: ast::Path) -> Self; -} - -impl RecoverQPath for Ty { - const PATH_STYLE: PathStyle = PathStyle::Type; - fn to_ty(&self) -> Option> { - Some(P(self.clone())) - } - fn recovered(qself: Option, path: ast::Path) -> Self { - Self { span: path.span, node: TyKind::Path(qself, path), id: ast::DUMMY_NODE_ID } - } -} - -impl RecoverQPath for Pat { - fn to_ty(&self) -> Option> { - self.to_ty() - } - fn recovered(qself: Option, path: ast::Path) -> Self { - Self { span: path.span, node: PatKind::Path(qself, path), id: ast::DUMMY_NODE_ID } - } -} - -impl RecoverQPath for Expr { - fn to_ty(&self) -> Option> { - self.to_ty() - } - fn recovered(qself: Option, path: ast::Path) -> Self { - Self { span: path.span, node: ExprKind::Path(qself, path), - attrs: ThinVec::new(), id: ast::DUMMY_NODE_ID } - } -} - /* ident is handled by common.rs */ #[derive(Clone)] @@ -381,7 +352,7 @@ impl TokenCursor { let body = TokenTree::Delimited( delim_span, token::Bracket, - [TokenTree::Token(sp, token::Ident(ast::Ident::from_str("doc"), false)), + [TokenTree::Token(sp, token::Ident(ast::Ident::with_empty_ctxt(sym::doc), false)), TokenTree::Token(sp, token::Eq), TokenTree::Token(sp, token::Literal( token::StrRaw(Symbol::intern(&stripped), num_of_hashes), None)) @@ -418,7 +389,7 @@ crate enum TokenType { } impl TokenType { - fn to_string(&self) -> String { + crate fn to_string(&self) -> String { match *self { TokenType::Token(ref t) => format!("`{}`", pprust::token_to_string(t)), TokenType::Keyword(kw) => format!("`{}`", kw.name()), @@ -550,7 +521,7 @@ fn dummy_arg(span: Span) -> Arg { span, id: ast::DUMMY_NODE_ID }; - Arg { ty: P(ty), pat: pat, id: ast::DUMMY_NODE_ID } + Arg { ty: P(ty), pat: pat, id: ast::DUMMY_NODE_ID, source: ast::ArgSource::Normal } } #[derive(Copy, Clone, Debug)] @@ -642,7 +613,7 @@ impl<'a> Parser<'a> { }) } - fn this_token_descr(&self) -> String { + crate fn this_token_descr(&self) -> String { if let Some(prefix) = self.token_descr() { format!("{} `{}`", prefix, self.this_token_to_string()) } else { @@ -650,11 +621,6 @@ impl<'a> Parser<'a> { } } - fn unexpected_last(&self, t: &token::Token) -> PResult<'a, T> { - let token_str = pprust::token_to_string(t); - Err(self.span_fatal(self.prev_span, &format!("unexpected token: `{}`", token_str))) - } - crate fn unexpected(&mut self) -> PResult<'a, T> { match self.expect_one_of(&[], &[]) { Err(e) => Err(e), @@ -707,56 +673,6 @@ impl<'a> Parser<'a> { } } - fn recover_closing_delimiter( - &mut self, - tokens: &[token::Token], - mut err: DiagnosticBuilder<'a>, - ) -> PResult<'a, bool> { - let mut pos = None; - // we want to use the last closing delim that would apply - for (i, unmatched) in self.unclosed_delims.iter().enumerate().rev() { - if tokens.contains(&token::CloseDelim(unmatched.expected_delim)) - && Some(self.span) > unmatched.unclosed_span - { - pos = Some(i); - } - } - match pos { - Some(pos) => { - // Recover and assume that the detected unclosed delimiter was meant for - // this location. Emit the diagnostic and act as if the delimiter was - // present for the parser's sake. - - // Don't attempt to recover from this unclosed delimiter more than once. - let unmatched = self.unclosed_delims.remove(pos); - let delim = TokenType::Token(token::CloseDelim(unmatched.expected_delim)); - - // We want to suggest the inclusion of the closing delimiter where it makes - // the most sense, which is immediately after the last token: - // - // {foo(bar {}} - // - ^ - // | | - // | help: `)` may belong here (FIXME: #58270) - // | - // unclosed delimiter - if let Some(sp) = unmatched.unclosed_span { - err.span_label(sp, "unclosed delimiter"); - } - err.span_suggestion_short( - self.sess.source_map().next_point(self.prev_span), - &format!("{} may belong here", delim.to_string()), - delim.to_string(), - Applicability::MaybeIncorrect, - ); - err.emit(); - self.expected_tokens.clear(); // reduce errors - Ok(true) - } - _ => Err(err), - } - } - /// Expect next token to be edible or inedible token. If edible, /// then consume it; if inedible, then return without consuming /// anything. Signal a fatal error if next token is unexpected. @@ -851,8 +767,34 @@ impl<'a> Parser<'a> { } } + let is_semi_suggestable = expected.iter().any(|t| match t { + TokenType::Token(token::Semi) => true, // we expect a `;` here + _ => false, + }) && ( // a `;` would be expected before the current keyword + self.token.is_keyword(keywords::Break) || + self.token.is_keyword(keywords::Continue) || + self.token.is_keyword(keywords::For) || + self.token.is_keyword(keywords::If) || + self.token.is_keyword(keywords::Let) || + self.token.is_keyword(keywords::Loop) || + self.token.is_keyword(keywords::Match) || + self.token.is_keyword(keywords::Return) || + self.token.is_keyword(keywords::While) + ); let cm = self.sess.source_map(); match (cm.lookup_line(self.span.lo()), cm.lookup_line(sp.lo())) { + (Ok(ref a), Ok(ref b)) if a.line != b.line && is_semi_suggestable => { + // The spans are in different lines, expected `;` and found `let` or `return`. + // High likelihood that it is only a missing `;`. + err.span_suggestion_short( + label_sp, + "a semicolon may be missing here", + ";".to_string(), + Applicability::MaybeIncorrect, + ); + err.emit(); + return Ok(true); + } (Ok(ref a), Ok(ref b)) if a.line == b.line => { // When the spans are in the same line, it means that the only content between // them is whitespace, point at the found token in that case: @@ -946,10 +888,10 @@ impl<'a> Parser<'a> { } _ => { Err(if self.prev_token_kind == PrevTokenKind::DocComment { - self.span_fatal_err(self.prev_span, Error::UselessDocComment) - } else { - self.expected_ident_found() - }) + self.span_fatal_err(self.prev_span, Error::UselessDocComment) + } else { + self.expected_ident_found() + }) } } } @@ -1112,43 +1054,7 @@ impl<'a> Parser<'a> { } fn expect_no_suffix(&self, sp: Span, kind: &str, suffix: Option) { - match suffix { - None => {/* everything ok */} - Some(suf) => { - let text = suf.as_str(); - if text.is_empty() { - self.span_bug(sp, "found empty literal suffix in Some") - } - let mut err = if kind == "a tuple index" && - ["i32", "u32", "isize", "usize"].contains(&text.to_string().as_str()) - { - // #59553: warn instead of reject out of hand to allow the fix to percolate - // through the ecosystem when people fix their macros - let mut err = self.struct_span_warn( - sp, - &format!("suffixes on {} are invalid", kind), - ); - err.note(&format!( - "`{}` is *temporarily* accepted on tuple index fields as it was \ - incorrectly accepted on stable for a few releases", - text, - )); - err.help( - "on proc macros, you'll want to use `syn::Index::from` or \ - `proc_macro::Literal::*_unsuffixed` for code that will desugar \ - to tuple field access", - ); - err.note( - "for more context, see https://github.com/rust-lang/rust/issues/60210", - ); - err - } else { - self.struct_span_err(sp, &format!("suffixes on {} are invalid", kind)) - }; - err.span_label(sp, format!("invalid suffix `{}`", text)); - err.emit(); - } - } + literal::expect_no_suffix(sp, &self.sess.span_diagnostic, kind, suffix) } /// Attempts to consume a `<`. If `<<` is seen, replaces it with a single @@ -1382,6 +1288,7 @@ impl<'a> Parser<'a> { token::DocComment(..) => PrevTokenKind::DocComment, token::Comma => PrevTokenKind::Comma, token::BinOp(token::Plus) => PrevTokenKind::Plus, + token::BinOp(token::Or) => PrevTokenKind::BitOr, token::Interpolated(..) => PrevTokenKind::Interpolated, token::Eof => PrevTokenKind::Eof, token::Ident(..) => PrevTokenKind::Ident, @@ -1425,7 +1332,7 @@ impl<'a> Parser<'a> { }) } - fn look_ahead_span(&self, dist: usize) -> Span { + crate fn look_ahead_span(&self, dist: usize) -> Span { if dist == 0 { return self.span } @@ -1451,12 +1358,9 @@ impl<'a> Parser<'a> { fn span_err>(&self, sp: S, m: &str) { self.sess.span_diagnostic.span_err(sp, m) } - fn struct_span_err>(&self, sp: S, m: &str) -> DiagnosticBuilder<'a> { + crate fn struct_span_err>(&self, sp: S, m: &str) -> DiagnosticBuilder<'a> { self.sess.span_diagnostic.struct_span_err(sp, m) } - fn struct_span_warn>(&self, sp: S, m: &str) -> DiagnosticBuilder<'a> { - self.sess.span_diagnostic.struct_span_warn(sp, m) - } crate fn span_bug>(&self, sp: S, m: &str) -> ! { self.sess.span_diagnostic.span_bug(sp, m) } @@ -1519,6 +1423,7 @@ impl<'a> Parser<'a> { IsAsync::Async { closure_id: ast::DUMMY_NODE_ID, return_impl_trait_id: ast::DUMMY_NODE_ID, + arguments: Vec::new(), } } else { IsAsync::NotAsync @@ -1577,12 +1482,12 @@ impl<'a> Parser<'a> { // trait item macro. (keywords::Invalid.ident(), ast::TraitItemKind::Macro(mac), ast::Generics::default()) } else { - let (constness, unsafety, asyncness, abi) = self.parse_fn_front_matter()?; + let (constness, unsafety, mut asyncness, abi) = self.parse_fn_front_matter()?; let ident = self.parse_ident()?; let mut generics = self.parse_generics()?; - let d = self.parse_fn_decl_with_self(|p: &mut Parser<'a>| { + let mut decl = self.parse_fn_decl_with_self(|p: &mut Parser<'a>| { // This is somewhat dubious; We don't want to allow // argument names to be left off if there is a // definition... @@ -1591,6 +1496,7 @@ impl<'a> Parser<'a> { p.parse_arg_general(p.span.rust_2018(), true, false) })?; generics.where_clause = self.parse_where_clause()?; + self.construct_async_arguments(&mut asyncness, &mut decl); let sig = ast::MethodSig { header: FnHeader { @@ -1599,7 +1505,7 @@ impl<'a> Parser<'a> { abi, asyncness, }, - decl: d, + decl, }; let body = match self.token { @@ -1852,99 +1758,6 @@ impl<'a> Parser<'a> { Ok(TyKind::TraitObject(bounds, TraitObjectSyntax::None)) } - fn maybe_report_ambiguous_plus(&mut self, allow_plus: bool, impl_dyn_multi: bool, ty: &Ty) { - if !allow_plus && impl_dyn_multi { - let sum_with_parens = format!("({})", pprust::ty_to_string(&ty)); - self.struct_span_err(ty.span, "ambiguous `+` in a type") - .span_suggestion( - ty.span, - "use parentheses to disambiguate", - sum_with_parens, - Applicability::MachineApplicable - ).emit(); - } - } - - fn maybe_recover_from_bad_type_plus(&mut self, allow_plus: bool, ty: &Ty) -> PResult<'a, ()> { - // Do not add `+` to expected tokens. - if !allow_plus || !self.token.is_like_plus() { - return Ok(()) - } - - self.bump(); // `+` - let bounds = self.parse_generic_bounds(None)?; - let sum_span = ty.span.to(self.prev_span); - - let mut err = struct_span_err!(self.sess.span_diagnostic, sum_span, E0178, - "expected a path on the left-hand side of `+`, not `{}`", pprust::ty_to_string(ty)); - - match ty.node { - TyKind::Rptr(ref lifetime, ref mut_ty) => { - let sum_with_parens = pprust::to_string(|s| { - use crate::print::pprust::PrintState; - - s.s.word("&")?; - s.print_opt_lifetime(lifetime)?; - s.print_mutability(mut_ty.mutbl)?; - s.popen()?; - s.print_type(&mut_ty.ty)?; - s.print_type_bounds(" +", &bounds)?; - s.pclose() - }); - err.span_suggestion( - sum_span, - "try adding parentheses", - sum_with_parens, - Applicability::MachineApplicable - ); - } - TyKind::Ptr(..) | TyKind::BareFn(..) => { - err.span_label(sum_span, "perhaps you forgot parentheses?"); - } - _ => { - err.span_label(sum_span, "expected a path"); - }, - } - err.emit(); - Ok(()) - } - - /// Try to recover from associated item paths like `[T]::AssocItem`/`(T, U)::AssocItem`. - /// Attempt to convert the base expression/pattern/type into a type, parse the `::AssocItem` - /// tail, and combine them into a `::AssocItem` expression/pattern/type. - fn maybe_recover_from_bad_qpath(&mut self, base: P, allow_recovery: bool) - -> PResult<'a, P> { - // Do not add `::` to expected tokens. - if allow_recovery && self.token == token::ModSep { - if let Some(ty) = base.to_ty() { - return self.maybe_recover_from_bad_qpath_stage_2(ty.span, ty); - } - } - Ok(base) - } - - /// Given an already parsed `Ty` parse the `::AssocItem` tail and - /// combine them into a `::AssocItem` expression/pattern/type. - fn maybe_recover_from_bad_qpath_stage_2(&mut self, ty_span: Span, ty: P) - -> PResult<'a, P> { - self.expect(&token::ModSep)?; - - let mut path = ast::Path { segments: Vec::new(), span: syntax_pos::DUMMY_SP }; - self.parse_path_segments(&mut path.segments, T::PATH_STYLE)?; - path.span = ty_span.to(self.prev_span); - - let ty_str = self.sess.source_map().span_to_snippet(ty_span) - .unwrap_or_else(|_| pprust::ty_to_string(&ty)); - self.diagnostic() - .struct_span_err(path.span, "missing angle brackets in associated item path") - .span_suggestion( // this is a best-effort recovery - path.span, "try", format!("<{}>::{}", ty_str, path), Applicability::MaybeIncorrect - ).emit(); - - let path_span = ty_span.shrink_to_hi(); // use an empty path since `position` == 0 - Ok(P(T::recovered(Some(QSelf { ty, path_span, position: 0 }), path))) - } - fn parse_borrowed_pointee(&mut self) -> PResult<'a, TyKind> { let opt_lifetime = if self.check_lifetime() { Some(self.expect_lifetime()) } else { None }; let mutbl = self.parse_mutability(); @@ -1970,7 +1783,7 @@ impl<'a> Parser<'a> { Ok(MutTy { ty: t, mutbl: mutbl }) } - fn is_named_argument(&mut self) -> bool { + fn is_named_argument(&self) -> bool { let offset = match self.token { token::Interpolated(ref nt) => match **nt { token::NtPat(..) => return self.look_ahead(1, |t| t == &token::Colon), @@ -2018,8 +1831,6 @@ impl<'a> Parser<'a> { /// This version of parse arg doesn't necessarily require identifier names. fn parse_arg_general(&mut self, require_name: bool, is_trait_item: bool, allow_c_variadic: bool) -> PResult<'a, Arg> { - maybe_whole!(self, NtArg, |x| x); - if let Ok(Some(_)) = self.parse_self_arg() { let mut err = self.struct_span_err(self.prev_span, "unexpected `self` argument in function"); @@ -2126,7 +1937,7 @@ impl<'a> Parser<'a> { } }; - Ok(Arg { ty, pat, id: ast::DUMMY_NODE_ID }) + Ok(Arg { ty, pat, id: ast::DUMMY_NODE_ID, source: ast::ArgSource::Normal }) } /// Parses a single function argument. @@ -2149,7 +1960,8 @@ impl<'a> Parser<'a> { Ok(Arg { ty: t, pat, - id: ast::DUMMY_NODE_ID + id: ast::DUMMY_NODE_ID, + source: ast::ArgSource::Normal, }) } @@ -2161,86 +1973,6 @@ impl<'a> Parser<'a> { } } - /// Matches `token_lit = LIT_INTEGER | ...`. - fn parse_lit_token(&mut self) -> PResult<'a, LitKind> { - let out = match self.token { - token::Interpolated(ref nt) => match **nt { - token::NtExpr(ref v) | token::NtLiteral(ref v) => match v.node { - ExprKind::Lit(ref lit) => { lit.node.clone() } - _ => { return self.unexpected_last(&self.token); } - }, - _ => { return self.unexpected_last(&self.token); } - }, - token::Literal(lit, suf) => { - let diag = Some((self.span, &self.sess.span_diagnostic)); - let (suffix_illegal, result) = parse::lit_token(lit, suf, diag); - - if suffix_illegal { - let sp = self.span; - self.expect_no_suffix(sp, &format!("a {}", lit.literal_name()), suf) - } - - result.unwrap() - } - token::Dot if self.look_ahead(1, |t| match t { - token::Literal(parse::token::Lit::Integer(_) , _) => true, - _ => false, - }) => { // recover from `let x = .4;` - let lo = self.span; - self.bump(); - if let token::Literal( - parse::token::Lit::Integer(val), - suffix, - ) = self.token { - let suffix = suffix.and_then(|s| { - let s = s.as_str().get(); - if ["f32", "f64"].contains(&s) { - Some(s) - } else { - None - } - }).unwrap_or(""); - self.bump(); - let sp = lo.to(self.prev_span); - let mut err = self.diagnostic() - .struct_span_err(sp, "float literals must have an integer part"); - err.span_suggestion( - sp, - "must have an integer part", - format!("0.{}{}", val, suffix), - Applicability::MachineApplicable, - ); - err.emit(); - return Ok(match suffix { - "f32" => ast::LitKind::Float(val, ast::FloatTy::F32), - "f64" => ast::LitKind::Float(val, ast::FloatTy::F64), - _ => ast::LitKind::FloatUnsuffixed(val), - }); - } else { - unreachable!(); - }; - } - _ => { return self.unexpected_last(&self.token); } - }; - - self.bump(); - Ok(out) - } - - /// Matches `lit = true | false | token_lit`. - crate fn parse_lit(&mut self) -> PResult<'a, Lit> { - let lo = self.span; - let lit = if self.eat_keyword(keywords::True) { - LitKind::Bool(true) - } else if self.eat_keyword(keywords::False) { - LitKind::Bool(false) - } else { - let lit = self.parse_lit_token()?; - lit - }; - Ok(source_map::Spanned { node: lit, span: lo.to(self.prev_span) }) - } - /// Matches `'-' lit | lit` (cf. `ast_validation::AstValidator::check_expr_within_pat`). crate fn parse_literal_maybe_minus(&mut self) -> PResult<'a, P> { maybe_whole_expr!(self); @@ -2307,8 +2039,8 @@ impl<'a> Parser<'a> { path = self.parse_path(PathStyle::Type)?; path_span = path_lo.to(self.prev_span); } else { - path = ast::Path { segments: Vec::new(), span: syntax_pos::DUMMY_SP }; path_span = self.span.to(self.span); + path = ast::Path { segments: Vec::new(), span: path_span }; } // See doc comment for `unmatched_angle_bracket_count`. @@ -2377,7 +2109,7 @@ impl<'a> Parser<'a> { self.parse_path(style) } - fn parse_path_segments(&mut self, + crate fn parse_path_segments(&mut self, segments: &mut Vec, style: PathStyle) -> PResult<'a, ()> { @@ -2414,7 +2146,8 @@ impl<'a> Parser<'a> { let ident = self.parse_path_segment_ident()?; let is_args_start = |token: &token::Token| match *token { - token::Lt | token::BinOp(token::Shl) | token::OpenDelim(token::Paren) => true, + token::Lt | token::BinOp(token::Shl) | token::OpenDelim(token::Paren) + | token::LArrow => true, _ => false, }; let check_args_start = |this: &mut Self| { @@ -2560,27 +2293,27 @@ impl<'a> Parser<'a> { }) } - fn mk_expr(&mut self, span: Span, node: ExprKind, attrs: ThinVec) -> P { + crate fn mk_expr(&self, span: Span, node: ExprKind, attrs: ThinVec) -> P { P(Expr { node, span, attrs, id: ast::DUMMY_NODE_ID }) } - fn mk_unary(&mut self, unop: ast::UnOp, expr: P) -> ast::ExprKind { + fn mk_unary(&self, unop: ast::UnOp, expr: P) -> ast::ExprKind { ExprKind::Unary(unop, expr) } - fn mk_binary(&mut self, binop: ast::BinOp, lhs: P, rhs: P) -> ast::ExprKind { + fn mk_binary(&self, binop: ast::BinOp, lhs: P, rhs: P) -> ast::ExprKind { ExprKind::Binary(binop, lhs, rhs) } - fn mk_call(&mut self, f: P, args: Vec>) -> ast::ExprKind { + fn mk_call(&self, f: P, args: Vec>) -> ast::ExprKind { ExprKind::Call(f, args) } - fn mk_index(&mut self, expr: P, idx: P) -> ast::ExprKind { + fn mk_index(&self, expr: P, idx: P) -> ast::ExprKind { ExprKind::Index(expr, idx) } - fn mk_range(&mut self, + fn mk_range(&self, start: Option>, end: Option>, limits: RangeLimits) @@ -2592,7 +2325,7 @@ impl<'a> Parser<'a> { } } - fn mk_assign_op(&mut self, binop: ast::BinOp, + fn mk_assign_op(&self, binop: ast::BinOp, lhs: P, rhs: P) -> ast::ExprKind { ExprKind::AssignOp(binop, lhs, rhs) } @@ -2732,13 +2465,12 @@ impl<'a> Parser<'a> { hi = path.span; return Ok(self.mk_expr(lo.to(hi), ExprKind::Path(Some(qself), path), attrs)); } - if self.span.rust_2018() && self.check_keyword(keywords::Async) - { - if self.is_async_block() { // check for `async {` and `async move {` - return self.parse_async_block(attrs); + if self.span.rust_2018() && self.check_keyword(keywords::Async) { + return if self.is_async_block() { // check for `async {` and `async move {` + self.parse_async_block(attrs) } else { - return self.parse_lambda_expr(attrs); - } + self.parse_lambda_expr(attrs) + }; } if self.check_keyword(keywords::Move) || self.check_keyword(keywords::Static) { return self.parse_lambda_expr(attrs); @@ -2846,6 +2578,10 @@ impl<'a> Parser<'a> { db.span_label(self.span, "expected expression"); db.note("variable declaration using `let` is a statement"); return Err(db); + } else if self.span.rust_2018() && self.eat_keyword(keywords::Await) { + let (await_hi, e_kind) = self.parse_await_macro_or_alt(lo, self.prev_span)?; + hi = await_hi; + ex = e_kind; } else if self.token.is_path_start() { let path = self.parse_path(PathStyle::Expr)?; @@ -2855,11 +2591,13 @@ impl<'a> Parser<'a> { let (delim, tts) = self.expect_delimited_token_tree()?; hi = self.prev_span; ex = ExprKind::Mac(respan(lo.to(hi), Mac_ { path, tts, delim })); - } else if self.check(&token::OpenDelim(token::Brace)) && - !self.restrictions.contains(Restrictions::NO_STRUCT_LITERAL) { - // This is a struct literal, unless we're prohibited - // from parsing struct literals here. - return self.parse_struct_expr(lo, path, attrs); + } else if self.check(&token::OpenDelim(token::Brace)) { + if let Some(expr) = self.maybe_parse_struct_expr(lo, &path, &attrs) { + return expr; + } else { + hi = path.span; + ex = ExprKind::Path(None, path); + } } else { hi = path.span; ex = ExprKind::Path(None, path); @@ -2890,6 +2628,12 @@ impl<'a> Parser<'a> { let msg = format!("expected expression, found {}", self.this_token_descr()); let mut err = self.fatal(&msg); + let sp = self.sess.source_map().start_point(self.span); + if let Some(sp) = self.sess.ambiguous_block_expr_parse.borrow() + .get(&sp) + { + self.sess.expr_parentheses_needed(&mut err, *sp, None); + } err.span_label(self.span, "expected expression"); return Err(err); } @@ -2902,6 +2646,72 @@ impl<'a> Parser<'a> { self.maybe_recover_from_bad_qpath(expr, true) } + /// Parse `await!()` calls, or alternatively recover from incorrect but reasonable + /// alternative syntaxes `await `, `await? `, `await()` and + /// `await { }`. + fn parse_await_macro_or_alt( + &mut self, + lo: Span, + await_sp: Span, + ) -> PResult<'a, (Span, ExprKind)> { + if self.token == token::Not { + // Handle correct `await!()`. + // FIXME: make this an error when `await!` is no longer supported + // https://github.com/rust-lang/rust/issues/60610 + self.expect(&token::Not)?; + self.expect(&token::OpenDelim(token::Paren))?; + let expr = self.parse_expr().map_err(|mut err| { + err.span_label(await_sp, "while parsing this await macro call"); + err + })?; + self.expect(&token::CloseDelim(token::Paren))?; + Ok((self.prev_span, ExprKind::Await(ast::AwaitOrigin::MacroLike, expr))) + } else { // Handle `await `. + self.parse_incorrect_await_syntax(lo, await_sp) + } + } + + fn maybe_parse_struct_expr( + &mut self, + lo: Span, + path: &ast::Path, + attrs: &ThinVec, + ) -> Option>> { + let struct_allowed = !self.restrictions.contains(Restrictions::NO_STRUCT_LITERAL); + let certainly_not_a_block = || self.look_ahead(1, |t| t.is_ident()) && ( + // `{ ident, ` cannot start a block + self.look_ahead(2, |t| t == &token::Comma) || + self.look_ahead(2, |t| t == &token::Colon) && ( + // `{ ident: token, ` cannot start a block + self.look_ahead(4, |t| t == &token::Comma) || + // `{ ident: ` cannot start a block unless it's a type ascription `ident: Type` + self.look_ahead(3, |t| !t.can_begin_type()) + ) + ); + + if struct_allowed || certainly_not_a_block() { + // This is a struct literal, but we don't can't accept them here + let expr = self.parse_struct_expr(lo, path.clone(), attrs.clone()); + if let (Ok(expr), false) = (&expr, struct_allowed) { + let mut err = self.diagnostic().struct_span_err( + expr.span, + "struct literals are not allowed here", + ); + err.multipart_suggestion( + "surround the struct literal with parentheses", + vec![ + (lo.shrink_to_lo(), "(".to_string()), + (expr.span.shrink_to_hi(), ")".to_string()), + ], + Applicability::MachineApplicable, + ); + err.emit(); + } + return Some(expr); + } + None + } + fn parse_struct_expr(&mut self, lo: Span, pth: ast::Path, mut attrs: ThinVec) -> PResult<'a, P> { let struct_sp = lo.to(self.prev_span); @@ -3009,10 +2819,13 @@ impl<'a> Parser<'a> { } /// Parses a block or unsafe block. - fn parse_block_expr(&mut self, opt_label: Option
for () { + fn from(_: A) {} +} + +fn main() {} diff --git a/src/test/incremental/krate-inherent.rs b/src/test/incremental/krate-inherent.rs index e01ce317a2..3e8d8fb1f9 100644 --- a/src/test/incremental/krate-inherent.rs +++ b/src/test/incremental/krate-inherent.rs @@ -21,4 +21,3 @@ pub mod x { #[cfg(cfail1)] pub fn bar() { } // remove this unrelated fn in cfail2, which should not affect `x::method` - diff --git a/src/test/incremental/krate_reassign_34991/auxiliary/a.rs b/src/test/incremental/krate_reassign_34991/auxiliary/a.rs index 33fa789fca..69be8d3bc0 100644 --- a/src/test/incremental/krate_reassign_34991/auxiliary/a.rs +++ b/src/test/incremental/krate_reassign_34991/auxiliary/a.rs @@ -1,4 +1,3 @@ #![crate_type="rlib"] pub type X = u32; - diff --git a/src/test/incremental/no_mangle.rs b/src/test/incremental/no_mangle.rs new file mode 100644 index 0000000000..1b17886a4f --- /dev/null +++ b/src/test/incremental/no_mangle.rs @@ -0,0 +1,10 @@ +// revisions:rpass1 rpass2 +// compile-flags: --crate-type cdylib +// skip-codegen + +#![deny(unused_attributes)] + +#[no_mangle] +pub extern "C" fn rust_no_mangle() -> i32 { + 42 +} diff --git a/src/test/incremental/remapped_paths_cc/auxiliary/extern_crate.rs b/src/test/incremental/remapped_paths_cc/auxiliary/extern_crate.rs index 52e7f4bd7c..627b99445e 100644 --- a/src/test/incremental/remapped_paths_cc/auxiliary/extern_crate.rs +++ b/src/test/incremental/remapped_paths_cc/auxiliary/extern_crate.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - //[rpass1] compile-flags: -g //[rpass2] compile-flags: -g //[rpass3] compile-flags: -g --remap-path-prefix={{src-base}}=/the/src diff --git a/src/test/incremental/span_hash_stable/main.rs b/src/test/incremental/span_hash_stable/main.rs index f19c99e198..f1d7de1455 100644 --- a/src/test/incremental/span_hash_stable/main.rs +++ b/src/test/incremental/span_hash_stable/main.rs @@ -21,4 +21,3 @@ fn main() { b: 3, }; } - diff --git a/src/test/mir-opt/array-index-is-temporary.rs b/src/test/mir-opt/array-index-is-temporary.rs index 856e1063f6..00a6b26d0c 100644 --- a/src/test/mir-opt/array-index-is-temporary.rs +++ b/src/test/mir-opt/array-index-is-temporary.rs @@ -18,25 +18,24 @@ fn main() { // START rustc.main.EraseRegions.after.mir // bb0: { // ... -// _6 = &mut _2; -// _5 = &mut (*_6); -// _4 = move _5 as *mut usize (Misc); -// _3 = move _4; +// _5 = &mut _2; +// _4 = &mut (*_5); +// _3 = move _4 as *mut usize (Misc); // ... -// _8 = _3; -// _7 = const foo(move _8) -> bb1; +// _7 = _3; +// _6 = const foo(move _7) -> bb1; // } // // bb1: { // ... -// _9 = _2; -// _10 = Len(_1); -// _11 = Lt(_9, _10); -// assert(move _11, "index out of bounds: the len is move _10 but the index is _9") -> bb2; +// _8 = _2; +// _9 = Len(_1); +// _10 = Lt(_8, _9); +// assert(move _10, "index out of bounds: the len is move _9 but the index is _8") -> bb2; // } // // bb2: { -// _1[_9] = move _7; +// _1[_8] = move _6; // ... // return; // } diff --git a/src/test/mir-opt/basic_assignment.rs b/src/test/mir-opt/basic_assignment.rs index c771013f72..ca0e9fa811 100644 --- a/src/test/mir-opt/basic_assignment.rs +++ b/src/test/mir-opt/basic_assignment.rs @@ -5,8 +5,6 @@ // so subtle breakage in them can leave a quite hard-to-find trail of // destruction. -// ignore-tidy-linelength - fn main() { let nodrop_x = false; let nodrop_y; diff --git a/src/test/mir-opt/box_expr.rs b/src/test/mir-opt/box_expr.rs index 14d302f0ee..d4852db6d4 100644 --- a/src/test/mir-opt/box_expr.rs +++ b/src/test/mir-opt/box_expr.rs @@ -22,15 +22,14 @@ impl Drop for S { // END RUST SOURCE // START rustc.main.ElaborateDrops.before.mir // let mut _0: (); +// let mut _2: std::boxed::Box; +// let mut _3: (); +// let mut _4: std::boxed::Box; // scope 1 { +// let _1: std::boxed::Box; // } // scope 2 { -// let _1: std::boxed::Box; // } -// let mut _2: std::boxed::Box; -// let mut _3: (); -// let mut _4: std::boxed::Box; -// // bb0: { // StorageLive(_1); // StorageLive(_2); diff --git a/src/test/mir-opt/const_prop/array_index.rs b/src/test/mir-opt/const_prop/array_index.rs new file mode 100644 index 0000000000..dd22eb5d60 --- /dev/null +++ b/src/test/mir-opt/const_prop/array_index.rs @@ -0,0 +1,33 @@ +fn main() { + let x: u32 = [0, 1, 2, 3][2]; +} + +// END RUST SOURCE +// START rustc.main.ConstProp.before.mir +// bb0: { +// ... +// _2 = [const 0u32, const 1u32, const 2u32, const 3u32]; +// ... +// _3 = const 2usize; +// _4 = const 4usize; +// _5 = Lt(_3, _4); +// assert(move _5, "index out of bounds: the len is move _4 but the index is _3") -> bb1; +// } +// bb1: { +// _1 = _2[_3]; +// ... +// return; +// } +// END rustc.main.ConstProp.before.mir +// START rustc.main.ConstProp.after.mir +// bb0: { +// ... +// _5 = const true; +// assert(const true, "index out of bounds: the len is move _4 but the index is _3") -> bb1; +// } +// bb1: { +// _1 = _2[_3]; +// ... +// return; +// } +// END rustc.main.ConstProp.after.mir diff --git a/src/test/mir-opt/const_prop/checked_add.rs b/src/test/mir-opt/const_prop/checked_add.rs new file mode 100644 index 0000000000..fe98cf24ee --- /dev/null +++ b/src/test/mir-opt/const_prop/checked_add.rs @@ -0,0 +1,21 @@ +// compile-flags: -C overflow-checks=on + +fn main() { + let x: u32 = 1 + 1; +} + +// END RUST SOURCE +// START rustc.main.ConstProp.before.mir +// bb0: { +// ... +// _2 = CheckedAdd(const 1u32, const 1u32); +// assert(!move (_2.1: bool), "attempt to add with overflow") -> bb1; +// } +// END rustc.main.ConstProp.before.mir +// START rustc.main.ConstProp.after.mir +// bb0: { +// ... +// _2 = (const 2u32, const false); +// assert(!const false, "attempt to add with overflow") -> bb1; +// } +// END rustc.main.ConstProp.after.mir diff --git a/src/test/mir-opt/const_prop/const_prop_fails_gracefully.rs b/src/test/mir-opt/const_prop/const_prop_fails_gracefully.rs new file mode 100644 index 0000000000..97d3abdcc6 --- /dev/null +++ b/src/test/mir-opt/const_prop/const_prop_fails_gracefully.rs @@ -0,0 +1,34 @@ +#[inline(never)] +fn read(_: usize) { } + +fn main() { + const FOO: &i32 = &1; + let x = FOO as *const i32 as usize; + read(x); +} + +// END RUST SOURCE +// START rustc.main.ConstProp.before.mir +// bb0: { +// ... +// _3 = _4; +// _2 = move _3 as *const i32 (Misc); +// ... +// _1 = move _2 as usize (Misc); +// ... +// _6 = _1; +// _5 = const read(move _6) -> bb1; +// } +// END rustc.main.ConstProp.before.mir +// START rustc.main.ConstProp.after.mir +// bb0: { +// ... +// _3 = _4; +// _2 = move _3 as *const i32 (Misc); +// ... +// _1 = move _2 as usize (Misc); +// ... +// _6 = _1; +// _5 = const read(move _6) -> bb1; +// } +// END rustc.main.ConstProp.after.mir diff --git a/src/test/mir-opt/const_prop/slice_len.rs b/src/test/mir-opt/const_prop/slice_len.rs new file mode 100644 index 0000000000..3435ca07f4 --- /dev/null +++ b/src/test/mir-opt/const_prop/slice_len.rs @@ -0,0 +1,37 @@ +fn test() -> &'static [u32] { + &[1, 2] +} + +fn main() { + let x = test()[0]; +} + +// END RUST SOURCE +// START rustc.main.ConstProp.before.mir +// bb1: { +// ... +// _3 = const 0usize; +// _4 = Len((*_2)); +// _5 = Lt(_3, _4); +// assert(move _5, "index out of bounds: the len is move _4 but the index is _3") -> bb2; +// } +// bb2: { +// _1 = (*_2)[_3]; +// ... +// return; +// } +// END rustc.main.ConstProp.before.mir +// START rustc.main.ConstProp.after.mir +// bb0: { +// ... +// _3 = const 0usize; +// _4 = Len((*_2)); +// _5 = Lt(_3, _4); +// assert(move _5, "index out of bounds: the len is move _4 but the index is _3") -> bb2; +// } +// bb2: { +// _1 = (*_2)[_3]; +// ... +// return; +// } +// END rustc.main.ConstProp.after.mir diff --git a/src/test/mir-opt/const_prop/switch_int.rs b/src/test/mir-opt/const_prop/switch_int.rs new file mode 100644 index 0000000000..0df1112ec3 --- /dev/null +++ b/src/test/mir-opt/const_prop/switch_int.rs @@ -0,0 +1,38 @@ +#[inline(never)] +fn foo(_: i32) { } + +fn main() { + match 1 { + 1 => foo(0), + _ => foo(-1), + } +} + +// END RUST SOURCE +// START rustc.main.ConstProp.before.mir +// bb0: { +// ... +// _1 = const 1i32; +// switchInt(_1) -> [1i32: bb1, otherwise: bb2]; +// } +// END rustc.main.ConstProp.before.mir +// START rustc.main.ConstProp.after.mir +// bb0: { +// ... +// switchInt(const 1i32) -> [1i32: bb1, otherwise: bb2]; +// } +// END rustc.main.ConstProp.after.mir +// START rustc.main.SimplifyBranches-after-const-prop.before.mir +// bb0: { +// ... +// _1 = const 1i32; +// switchInt(const 1i32) -> [1i32: bb1, otherwise: bb2]; +// } +// END rustc.main.SimplifyBranches-after-const-prop.before.mir +// START rustc.main.SimplifyBranches-after-const-prop.after.mir +// bb0: { +// ... +// _1 = const 1i32; +// goto -> bb1; +// } +// END rustc.main.SimplifyBranches-after-const-prop.after.mir diff --git a/src/test/mir-opt/generator-drop-cleanup.rs b/src/test/mir-opt/generator-drop-cleanup.rs index 4839869127..9cc4272faf 100644 --- a/src/test/mir-opt/generator-drop-cleanup.rs +++ b/src/test/mir-opt/generator-drop-cleanup.rs @@ -13,7 +13,8 @@ fn main() { // START rustc.main-{{closure}}.generator_drop.0.mir // bb0: { -// switchInt(((*_1).0: u32)) -> [0u32: bb4, 3u32: bb7, otherwise: bb8]; +// _5 = discriminant((*_1)); +// switchInt(move _5) -> [0u32: bb4, 3u32: bb7, otherwise: bb8]; // } // bb1: { // goto -> bb5; diff --git a/src/test/mir-opt/graphviz.rs b/src/test/mir-opt/graphviz.rs index 660576996e..67a6d1d263 100644 --- a/src/test/mir-opt/graphviz.rs +++ b/src/test/mir-opt/graphviz.rs @@ -7,7 +7,7 @@ fn main() {} // END RUST SOURCE // START rustc.main.mir_map.0.dot -// digraph Mir_0_0_3 { // The name here MUST be an ASCII identifier. +// digraph Mir_0_12 { // The name here MUST be an ASCII identifier. // graph [fontname="monospace"]; // node [fontname="monospace"]; // edge [fontname="monospace"]; diff --git a/src/test/mir-opt/inline-closure-borrows-arg.rs b/src/test/mir-opt/inline-closure-borrows-arg.rs index d09ddce09c..0e1db68f37 100644 --- a/src/test/mir-opt/inline-closure-borrows-arg.rs +++ b/src/test/mir-opt/inline-closure-borrows-arg.rs @@ -20,7 +20,7 @@ fn foo(_t: T, q: &i32) -> i32 { // ... // bb0: { // ... -// _3 = [closure@HirId { owner: DefIndex(0:4), local_id: 27 }]; +// _3 = [closure@HirId { owner: DefIndex(13), local_id: 31 }]; // ... // _4 = &_3; // ... diff --git a/src/test/mir-opt/inline-closure.rs b/src/test/mir-opt/inline-closure.rs index 436a8c20e2..fa8557f3b3 100644 --- a/src/test/mir-opt/inline-closure.rs +++ b/src/test/mir-opt/inline-closure.rs @@ -16,7 +16,7 @@ fn foo(_t: T, q: i32) -> i32 { // ... // bb0: { // ... -// _3 = [closure@HirId { owner: DefIndex(0:4), local_id: 11 }]; +// _3 = [closure@HirId { owner: DefIndex(13), local_id: 15 }]; // ... // _4 = &_3; // ... diff --git a/src/test/mir-opt/issue-38669.rs b/src/test/mir-opt/issue-38669.rs index 047e623941..e8ab690bb4 100644 --- a/src/test/mir-opt/issue-38669.rs +++ b/src/test/mir-opt/issue-38669.rs @@ -27,15 +27,17 @@ fn main() { // bb3: { // StorageLive(_4); // _4 = _1; -// switchInt(move _4) -> [false: bb5, otherwise: bb4]; +// FakeRead(ForMatchedPlace, _4); +// switchInt(_4) -> [false: bb5, otherwise: bb4]; // } -// bb4: { +// ... +// bb7: { // _0 = (); // StorageDead(_4); // StorageDead(_1); // return; // } -// bb5: { +// bb8: { // _3 = (); // StorageDead(_4); // _1 = const true; diff --git a/src/test/mir-opt/issue-41110.rs b/src/test/mir-opt/issue-41110.rs index 31ad1ebd9f..023440af0e 100644 --- a/src/test/mir-opt/issue-41110.rs +++ b/src/test/mir-opt/issue-41110.rs @@ -29,27 +29,28 @@ impl S { // END RUST SOURCE // START rustc.main.ElaborateDrops.after.mir // let mut _0: (); -// scope 1 { -// } -// scope 2 { -// let _1: (); -// } // let mut _2: S; // let mut _3: S; // let mut _4: S; // let mut _5: bool; +// scope 1 { +// let _1: (); +// } +// scope 2 { +// } +// ... // bb0: { // END rustc.main.ElaborateDrops.after.mir // START rustc.test.ElaborateDrops.after.mir // let mut _0: (); -// ... -// let mut _2: S; -// ... -// let _1: S; -// ... // let mut _3: (); // let mut _4: S; // let mut _5: S; // let mut _6: bool; +// ... +// let _1: S; +// ... +// let mut _2: S; +// ... // bb0: { // END rustc.test.ElaborateDrops.after.mir diff --git a/src/test/mir-opt/issue-49232.rs b/src/test/mir-opt/issue-49232.rs index 5f4f4ab82a..29446d2ecc 100644 --- a/src/test/mir-opt/issue-49232.rs +++ b/src/test/mir-opt/issue-49232.rs @@ -17,16 +17,16 @@ fn main() { // START rustc.main.mir_map.0.mir // fn main() -> (){ // let mut _0: (); -// scope 1 { -// } -// scope 2 { -// let _2: i32; -// } // let mut _1: (); // let mut _3: bool; // let mut _4: !; // let mut _5: (); // let mut _6: &i32; +// scope 1 { +// let _2: i32; +// } +// scope 2 { +// } // bb0: { // goto -> bb1; // } diff --git a/src/test/mir-opt/loop_test.rs b/src/test/mir-opt/loop_test.rs index 34891ee70b..e75955b9b2 100644 --- a/src/test/mir-opt/loop_test.rs +++ b/src/test/mir-opt/loop_test.rs @@ -22,19 +22,20 @@ fn main() { // resume; // } // ... -// bb3: { // Entry into the loop +// bb6: { // Entry into the loop // _1 = (); -// goto -> bb4; +// StorageDead(_2); +// goto -> bb7; // } -// bb4: { // The loop_block -// falseUnwind -> [real: bb5, cleanup: bb1]; +// bb7: { // The loop_block +// falseUnwind -> [real: bb8, cleanup: bb1]; // } -// bb5: { // The loop body (body_block) -// StorageLive(_5); -// _5 = const 1i32; -// FakeRead(ForLet, _5); -// StorageDead(_5); -// goto -> bb4; +// bb8: { // The loop body (body_block) +// StorageLive(_6); +// _6 = const 1i32; +// FakeRead(ForLet, _6); +// StorageDead(_6); +// goto -> bb7; // } // ... // END rustc.main.SimplifyCfg-qualify-consts.after.mir diff --git a/src/test/mir-opt/match_test.rs b/src/test/mir-opt/match_test.rs index 3f248f3d41..a5317f98ef 100644 --- a/src/test/mir-opt/match_test.rs +++ b/src/test/mir-opt/match_test.rs @@ -60,9 +60,11 @@ fn main() { // goto -> bb16; // } // bb12: { -// StorageLive(_8); -// _8 = _2; -// switchInt(move _8) -> [false: bb6, otherwise: bb11]; +// _8 = &shallow _1; +// StorageLive(_9); +// _9 = _2; +// FakeRead(ForMatchGuard, _8); +// switchInt(move _9) -> [false: bb6, otherwise: bb11]; // } // bb13: { // _3 = const 1i32; @@ -77,7 +79,7 @@ fn main() { // goto -> bb16; // } // bb16: { -// StorageDead(_8); +// StorageDead(_9); // _0 = (); // StorageDead(_2); // StorageDead(_1); diff --git a/src/test/mir-opt/nll/named-lifetimes-basic.rs b/src/test/mir-opt/nll/named-lifetimes-basic.rs index 4833ba1955..2a6c2db03b 100644 --- a/src/test/mir-opt/nll/named-lifetimes-basic.rs +++ b/src/test/mir-opt/nll/named-lifetimes-basic.rs @@ -5,7 +5,6 @@ // compile-flags:-Zborrowck=mir -Zverbose // ^^^^^^^^^ force compiler to dump more region information -// ignore-tidy-linelength #![allow(warnings)] diff --git a/src/test/mir-opt/nll/region-subtyping-basic.rs b/src/test/mir-opt/nll/region-subtyping-basic.rs index c2dda680b7..622cc99983 100644 --- a/src/test/mir-opt/nll/region-subtyping-basic.rs +++ b/src/test/mir-opt/nll/region-subtyping-basic.rs @@ -22,15 +22,15 @@ fn main() { // END RUST SOURCE // START rustc.main.nll.0.mir -// | '_#2r | U0 | {bb2[0..=5], bb3[0..=1]} -// | '_#3r | U0 | {bb2[1..=5], bb3[0..=1]} -// | '_#4r | U0 | {bb2[4..=5], bb3[0..=1]} +// | '_#2r | U0 | {bb2[0..=8], bb3[0], bb6[0..=1]} +// | '_#3r | U0 | {bb2[1..=8], bb3[0], bb6[0..=1]} +// | '_#4r | U0 | {bb2[4..=8], bb3[0], bb6[0..=1]} // END rustc.main.nll.0.mir // START rustc.main.nll.0.mir -// let _6: &'_#4r usize; -// ... // let _2: &'_#3r usize; // ... +// let _6: &'_#4r usize; +// ... // _2 = &'_#2r _1[_3]; // ... // _6 = _2; diff --git a/src/test/mir-opt/packed-struct-drop-aligned.rs b/src/test/mir-opt/packed-struct-drop-aligned.rs index 167a6eb349..7e8c58e64c 100644 --- a/src/test/mir-opt/packed-struct-drop-aligned.rs +++ b/src/test/mir-opt/packed-struct-drop-aligned.rs @@ -18,16 +18,16 @@ impl Drop for Droppy { // START rustc.main.EraseRegions.before.mir // fn main() -> () { // let mut _0: (); -// scope 1 { -// } -// scope 2 { -// let mut _1: Packed; -// } // let mut _2: Aligned; // let mut _3: Droppy; // let mut _4: Aligned; // let mut _5: Droppy; // let mut _6: Aligned; +// scope 1 { +// let mut _1: Packed; +// } +// scope 2 { +// } // // bb0: { // StorageLive(_1); diff --git a/src/test/mir-opt/remove_fake_borrows.rs b/src/test/mir-opt/remove_fake_borrows.rs index 144348450a..8348f9a774 100644 --- a/src/test/mir-opt/remove_fake_borrows.rs +++ b/src/test/mir-opt/remove_fake_borrows.rs @@ -2,8 +2,6 @@ // ignore-wasm32-bare -#![feature(nll)] - fn match_guard(x: Option<&&i32>, c: bool) -> i32 { match x { Some(0) if c => 0, diff --git a/src/test/mir-opt/retag.rs b/src/test/mir-opt/retag.rs index 3b333b5431..33ee0fe61b 100644 --- a/src/test/mir-opt/retag.rs +++ b/src/test/mir-opt/retag.rs @@ -75,18 +75,18 @@ fn main() { // _10 = move _8; // Retag(_10); // ... -// _15 = &mut (*_10); -// Retag(_15); -// _14 = move _15 as *mut i32 (Misc); -// Retag([raw] _14); +// _13 = &mut (*_10); +// Retag(_13); +// _12 = move _13 as *mut i32 (Misc); +// Retag([raw] _12); // ... -// _18 = move _19(move _20) -> bb2; +// _16 = move _17(move _18) -> bb2; // } // // bb2: { -// Retag(_18); +// Retag(_16); // ... -// _22 = const Test::foo_shr(move _23, move _25) -> bb3; +// _20 = const Test::foo_shr(move _21, move _23) -> bb3; // } // // bb3: { @@ -98,7 +98,7 @@ fn main() { // } // END rustc.main.EraseRegions.after.mir // START rustc.main-{{closure}}.EraseRegions.after.mir -// fn main::{{closure}}#0(_1: &[closure@HirId { owner: DefIndex(0:7), local_id: 70 }], _2: &i32) -> &i32 { +// fn main::{{closure}}#0(_1: &[closure@HirId { owner: DefIndex(20), local_id: 72 }], _2: &i32) -> &i32 { // ... // bb0: { // Retag([fn entry] _1); diff --git a/src/test/mir-opt/simplify_if.rs b/src/test/mir-opt/simplify_if.rs index f6e6c6baf7..35512b94c0 100644 --- a/src/test/mir-opt/simplify_if.rs +++ b/src/test/mir-opt/simplify_if.rs @@ -5,13 +5,15 @@ fn main() { } // END RUST SOURCE -// START rustc.main.SimplifyBranches-initial.before.mir +// START rustc.main.SimplifyBranches-after-const-prop.before.mir // bb0: { -// switchInt(const false) -> [false: bb3, otherwise: bb2]; +// ... +// switchInt(const false) -> [false: bb3, otherwise: bb1]; // } -// END rustc.main.SimplifyBranches-initial.before.mir -// START rustc.main.SimplifyBranches-initial.after.mir +// END rustc.main.SimplifyBranches-after-const-prop.before.mir +// START rustc.main.SimplifyBranches-after-const-prop.after.mir // bb0: { +// ... // goto -> bb3; // } -// END rustc.main.SimplifyBranches-initial.after.mir +// END rustc.main.SimplifyBranches-after-const-prop.after.mir diff --git a/src/test/mir-opt/slice-drop-shim.rs b/src/test/mir-opt/slice-drop-shim.rs new file mode 100644 index 0000000000..754fad51b2 --- /dev/null +++ b/src/test/mir-opt/slice-drop-shim.rs @@ -0,0 +1,88 @@ +fn main() { + std::ptr::drop_in_place::<[String]> as unsafe fn(_); +} + +// END RUST SOURCE + +// START rustc.ptr-real_drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir +// let mut _2: usize; +// let mut _3: usize; +// let mut _4: usize; +// let mut _5: &mut std::string::String; +// let mut _6: bool; +// let mut _7: &mut std::string::String; +// let mut _8: bool; +// let mut _9: *mut std::string::String; +// let mut _10: *mut std::string::String; +// let mut _11: &mut std::string::String; +// let mut _12: bool; +// let mut _13: &mut std::string::String; +// let mut _14: bool; +// let mut _15: *mut [std::string::String]; +// bb0: { +// goto -> bb15; +// } +// bb1: { +// return; +// } +// bb2 (cleanup): { +// resume; +// } +// bb3 (cleanup): { +// _5 = &mut (*_1)[_4]; +// _4 = Add(move _4, const 1usize); +// drop((*_5)) -> bb4; +// } +// bb4 (cleanup): { +// _6 = Eq(_4, _3); +// switchInt(move _6) -> [false: bb3, otherwise: bb2]; +// } +// bb5: { +// _7 = &mut (*_1)[_4]; +// _4 = Add(move _4, const 1usize); +// drop((*_7)) -> [return: bb6, unwind: bb4]; +// } +// bb6: { +// _8 = Eq(_4, _3); +// switchInt(move _8) -> [false: bb5, otherwise: bb1]; +// } +// bb7: { +// _4 = const 0usize; +// goto -> bb6; +// } +// bb8: { +// goto -> bb7; +// } +// bb9 (cleanup): { +// _11 = &mut (*_9); +// _9 = Offset(move _9, const 1usize); +// drop((*_11)) -> bb10; +// } +// bb10 (cleanup): { +// _12 = Eq(_9, _10); +// switchInt(move _12) -> [false: bb9, otherwise: bb2]; +// } +// bb11: { +// _13 = &mut (*_9); +// _9 = Offset(move _9, const 1usize); +// drop((*_13)) -> [return: bb12, unwind: bb10]; +// } +// bb12: { +// _14 = Eq(_9, _10); +// switchInt(move _14) -> [false: bb11, otherwise: bb1]; +// } +// bb13: { +// _15 = &mut (*_1); +// _9 = move _15 as *mut std::string::String (Misc); +// _10 = Offset(_9, move _3); +// goto -> bb12; +// } +// bb14: { +// goto -> bb13; +// } +// bb15: { +// _2 = SizeOf(std::string::String); +// _3 = Len((*_1)); +// switchInt(move _2) -> [0usize: bb8, otherwise: bb14]; +// } +// END rustc.ptr-real_drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir diff --git a/src/test/mir-opt/storage_live_dead_in_statics.rs b/src/test/mir-opt/storage_live_dead_in_statics.rs index e8ef1d9d3c..10f00cf8b0 100644 --- a/src/test/mir-opt/storage_live_dead_in_statics.rs +++ b/src/test/mir-opt/storage_live_dead_in_statics.rs @@ -178,7 +178,7 @@ fn main() { // _6 = [move _7, move _8, move _9, move _10, move _11, move _12, move _13, move _14, move _15, move _16, move _17, move _18, move _19, move _20, move _21, move _22, move _23, move _24, move _25, move _26, move _27, move _28, move _29, move _30, move _31, move _32, move _33, move _34, move _35, move _36, move _37, move _38, move _39, move _40, move _41, move _42, move _43, move _44, move _45, move _46, move _47, move _48]; // _5 = &_6; // _4 = &(*_5); -// _3 = move _4 as &'static [(u32, u32)] (Unsize); +// _3 = move _4 as &'static [(u32, u32)] (Pointer(Unsize)); // _2 = Foo { tup: const "hi", data: move _3 }; // _1 = &_2; // _0 = &(*_1); diff --git a/src/test/mir-opt/storage_ranges.rs b/src/test/mir-opt/storage_ranges.rs index 9a22f57116..6d22e9cd9f 100644 --- a/src/test/mir-opt/storage_ranges.rs +++ b/src/test/mir-opt/storage_ranges.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - fn main() { let a = 0; { @@ -9,7 +7,7 @@ fn main() { } // END RUST SOURCE -// START rustc.main.TypeckMir.before.mir +// START rustc.main.nll.0.mir // bb0: { // StorageLive(_1); // _1 = const 0i32; @@ -33,4 +31,4 @@ fn main() { // StorageDead(_1); // return; // } -// END rustc.main.TypeckMir.before.mir +// END rustc.main.nll.0.mir diff --git a/src/test/run-fail/borrowck-local-borrow.rs b/src/test/run-fail/borrowck-local-borrow.rs index cb17a63056..d07f76b625 100644 --- a/src/test/run-fail/borrowck-local-borrow.rs +++ b/src/test/run-fail/borrowck-local-borrow.rs @@ -1,6 +1,6 @@ // error-pattern:panic 1 -// revisions: ast mir +// revisions: migrate mir //[mir]compile-flags: -Z borrowck=mir fn main() { diff --git a/src/test/run-fail/call-fn-never-arg.rs b/src/test/run-fail/call-fn-never-arg.rs index d21a43ec5c..f5b2cfaefe 100644 --- a/src/test/run-fail/call-fn-never-arg.rs +++ b/src/test/run-fail/call-fn-never-arg.rs @@ -12,4 +12,3 @@ fn foo(x: !) -> ! { fn main() { foo(panic!("wowzers!")) } - diff --git a/src/test/run-fail/cast-never.rs b/src/test/run-fail/cast-never.rs index 3620ddee47..0b05a4b911 100644 --- a/src/test/run-fail/cast-never.rs +++ b/src/test/run-fail/cast-never.rs @@ -8,4 +8,3 @@ fn main() { let x: ! = panic!(); let y: u32 = x as u32; } - diff --git a/src/test/run-fail/issue-51345.rs b/src/test/run-fail/issue-51345.rs index 3c7f6a68db..c62f98ea78 100644 --- a/src/test/run-fail/issue-51345.rs +++ b/src/test/run-fail/issue-51345.rs @@ -1,7 +1,5 @@ // error-pattern: thread 'main' panicked at 'explicit panic' -#![feature(nll)] - fn main() { let mut vec = vec![]; vec.push((vec.len(), panic!())); diff --git a/src/test/run-fail/never-associated-type.rs b/src/test/run-fail/never-associated-type.rs index ba30b9ea0f..587f0f72d5 100644 --- a/src/test/run-fail/never-associated-type.rs +++ b/src/test/run-fail/never-associated-type.rs @@ -21,4 +21,3 @@ impl Foo for Blah { fn main() { Blah.smeg(); } - diff --git a/src/test/run-fail/never-type-arg.rs b/src/test/run-fail/never-type-arg.rs index fc7f2fc90d..1747e96eef 100644 --- a/src/test/run-fail/never-type-arg.rs +++ b/src/test/run-fail/never-type-arg.rs @@ -15,4 +15,3 @@ impl PartialEq for Wub { fn main() { let _ = Wub == panic!("oh no!"); } - diff --git a/src/test/run-make-fulldeps/cross-lang-lto-clang/Makefile b/src/test/run-make-fulldeps/cross-lang-lto-clang/Makefile index 3f74a17e0b..3ca2a8afad 100644 --- a/src/test/run-make-fulldeps/cross-lang-lto-clang/Makefile +++ b/src/test/run-make-fulldeps/cross-lang-lto-clang/Makefile @@ -9,17 +9,17 @@ all: cpp-executable rust-executable cpp-executable: $(RUSTC) -Clinker-plugin-lto=on -o $(TMPDIR)/librustlib-xlto.a -Copt-level=2 -Ccodegen-units=1 ./rustlib.rs - $(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) $(CLANG) -flto=thin -fuse-ld=lld -L $(TMPDIR) -lrustlib-xlto -o $(TMPDIR)/cmain ./cmain.c -O3 + $(CLANG) -flto=thin -fuse-ld=lld -L $(TMPDIR) -lrustlib-xlto -o $(TMPDIR)/cmain ./cmain.c -O3 # Make sure we don't find a call instruction to the function we expect to # always be inlined. - $(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-objdump -d $(TMPDIR)/cmain | $(CGREP) -v -e "call.*rust_always_inlined" + "$(LLVM_BIN_DIR)"/llvm-objdump -d $(TMPDIR)/cmain | $(CGREP) -v -e "call.*rust_always_inlined" # As a sanity check, make sure we do find a call instruction to a # non-inlined function - $(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-objdump -d $(TMPDIR)/cmain | $(CGREP) -e "call.*rust_never_inlined" + "$(LLVM_BIN_DIR)"/llvm-objdump -d $(TMPDIR)/cmain | $(CGREP) -e "call.*rust_never_inlined" rust-executable: - $(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) $(CLANG) ./clib.c -flto=thin -c -o $(TMPDIR)/clib.o -O2 + $(CLANG) ./clib.c -flto=thin -c -o $(TMPDIR)/clib.o -O2 (cd $(TMPDIR); $(AR) crus ./libxyz.a ./clib.o) $(RUSTC) -Clinker-plugin-lto=on -L$(TMPDIR) -Copt-level=2 -Clinker=$(CLANG) -Clink-arg=-fuse-ld=lld ./main.rs -o $(TMPDIR)/rsmain - $(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-objdump -d $(TMPDIR)/rsmain | $(CGREP) -e "call.*c_never_inlined" - $(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-objdump -d $(TMPDIR)/rsmain | $(CGREP) -v -e "call.*c_always_inlined" + "$(LLVM_BIN_DIR)"/llvm-objdump -d $(TMPDIR)/rsmain | $(CGREP) -e "call.*c_never_inlined" + "$(LLVM_BIN_DIR)"/llvm-objdump -d $(TMPDIR)/rsmain | $(CGREP) -v -e "call.*c_always_inlined" diff --git a/src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs/Makefile b/src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs/Makefile index c9da06ff93..f70b411d74 100644 --- a/src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs/Makefile +++ b/src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs/Makefile @@ -12,7 +12,7 @@ all: staticlib.rs upstream.rs # Check No LTO $(RUSTC) staticlib.rs -C linker-plugin-lto -Ccodegen-units=1 -L. -o $(TMPDIR)/staticlib.a - (cd $(TMPDIR); $(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-ar x ./staticlib.a) + (cd $(TMPDIR); "$(LLVM_BIN_DIR)"/llvm-ar x ./staticlib.a) # Make sure the upstream object file was included ls $(TMPDIR)/upstream.*.rcgu.o @@ -22,7 +22,7 @@ all: staticlib.rs upstream.rs # Check ThinLTO $(RUSTC) upstream.rs -C linker-plugin-lto -Ccodegen-units=1 -Clto=thin $(RUSTC) staticlib.rs -C linker-plugin-lto -Ccodegen-units=1 -Clto=thin -L. -o $(TMPDIR)/staticlib.a - (cd $(TMPDIR); $(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-ar x ./staticlib.a) + (cd $(TMPDIR); "$(LLVM_BIN_DIR)"/llvm-ar x ./staticlib.a) ls $(TMPDIR)/upstream.*.rcgu.o else diff --git a/src/test/run-make-fulldeps/cross-lang-lto/Makefile b/src/test/run-make-fulldeps/cross-lang-lto/Makefile index 43bd05a735..b4394cb5b4 100644 --- a/src/test/run-make-fulldeps/cross-lang-lto/Makefile +++ b/src/test/run-make-fulldeps/cross-lang-lto/Makefile @@ -10,8 +10,8 @@ ifndef IS_WINDOWS # -Clinker-plugin-lto. # this only succeeds for bitcode files -ASSERT_IS_BITCODE_OBJ=($(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-bcanalyzer $(1)) -EXTRACT_OBJS=(cd $(TMPDIR); rm -f ./*.o; $(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-ar x $(1)) +ASSERT_IS_BITCODE_OBJ=("$(LLVM_BIN_DIR)"/llvm-bcanalyzer $(1)) +EXTRACT_OBJS=(cd $(TMPDIR); rm -f ./*.o; "$(LLVM_BIN_DIR)"/llvm-ar x $(1)) BUILD_LIB=$(RUSTC) lib.rs -Copt-level=2 -Clinker-plugin-lto -Ccodegen-units=1 BUILD_EXE=$(RUSTC) main.rs -Copt-level=2 -Clinker-plugin-lto -Ccodegen-units=1 --emit=obj diff --git a/src/test/run-make-fulldeps/hotplug_codegen_backend/the_backend.rs b/src/test/run-make-fulldeps/hotplug_codegen_backend/the_backend.rs index 5330470da1..4e43aa96e1 100644 --- a/src/test/run-make-fulldeps/hotplug_codegen_backend/the_backend.rs +++ b/src/test/run-make-fulldeps/hotplug_codegen_backend/the_backend.rs @@ -15,7 +15,7 @@ use rustc::session::Session; use rustc::session::config::OutputFilenames; use rustc::ty::TyCtxt; use rustc::ty::query::Providers; -use rustc::middle::cstore::MetadataLoader; +use rustc::middle::cstore::{EncodedMetadata, MetadataLoader}; use rustc::dep_graph::DepGraph; use rustc::util::common::ErrorReported; use rustc_codegen_utils::codegen_backend::CodegenBackend; @@ -61,6 +61,8 @@ impl CodegenBackend for TheBackend { fn codegen_crate<'a, 'tcx>( &self, tcx: TyCtxt<'a, 'tcx, 'tcx>, + _metadata: EncodedMetadata, + _need_metadata_module: bool, _rx: mpsc::Receiver> ) -> Box { use rustc::hir::def_id::LOCAL_CRATE; diff --git a/src/test/run-make-fulldeps/issue-14500/Makefile b/src/test/run-make-fulldeps/issue-14500/Makefile index bd94db0952..0c0e331da1 100644 --- a/src/test/run-make-fulldeps/issue-14500/Makefile +++ b/src/test/run-make-fulldeps/issue-14500/Makefile @@ -6,10 +6,6 @@ # is compiled with LTO, it shouldn't strip the symbol from `foo`, and that's the # only way that `foo.c` will successfully compile. -ifeq ($(UNAME),Bitrig) - EXTRACFLAGS := -lc $(EXTRACFLAGS) $(EXTRACXXFLAGS) -endif - all: $(RUSTC) foo.rs --crate-type=rlib $(RUSTC) bar.rs --crate-type=staticlib -C lto -L. -o $(TMPDIR)/libbar.a diff --git a/src/test/run-make-fulldeps/issue-18943/foo.rs b/src/test/run-make-fulldeps/issue-18943/foo.rs index 0b29c87128..d18400dd3a 100644 --- a/src/test/run-make-fulldeps/issue-18943/foo.rs +++ b/src/test/run-make-fulldeps/issue-18943/foo.rs @@ -3,4 +3,3 @@ trait Foo { } trait Bar { } impl<'a> Foo for Bar + 'a { } - diff --git a/src/test/run-make-fulldeps/issue-28595/b.c b/src/test/run-make-fulldeps/issue-28595/b.c index 8343f5b229..6aecb5f9e0 100644 --- a/src/test/run-make-fulldeps/issue-28595/b.c +++ b/src/test/run-make-fulldeps/issue-28595/b.c @@ -3,4 +3,3 @@ extern void a(void); void b(void) { a(); } - diff --git a/src/test/run-make-fulldeps/libs-through-symlinks/Makefile b/src/test/run-make-fulldeps/libs-through-symlinks/Makefile index 7c5ea7e402..8be2e234fe 100644 --- a/src/test/run-make-fulldeps/libs-through-symlinks/Makefile +++ b/src/test/run-make-fulldeps/libs-through-symlinks/Makefile @@ -8,4 +8,4 @@ all: mkdir -p $(TMPDIR)/outdir $(RUSTC) foo.rs -o $(TMPDIR)/outdir/$(NAME) ln -nsf outdir/$(NAME) $(TMPDIR) - RUST_LOG=rustc_metadata::loader $(RUSTC) bar.rs + RUSTC_LOG=rustc_metadata::loader $(RUSTC) bar.rs diff --git a/src/test/run-make-fulldeps/libtest-json/f.rs b/src/test/run-make-fulldeps/libtest-json/f.rs index 29d52ee965..f5e44c2c24 100644 --- a/src/test/run-make-fulldeps/libtest-json/f.rs +++ b/src/test/run-make-fulldeps/libtest-json/f.rs @@ -19,4 +19,3 @@ fn c() { fn d() { assert!(false); } - diff --git a/src/test/run-make-fulldeps/link-cfg/Makefile b/src/test/run-make-fulldeps/link-cfg/Makefile index 188cba5fe4..2701b4a593 100644 --- a/src/test/run-make-fulldeps/link-cfg/Makefile +++ b/src/test/run-make-fulldeps/link-cfg/Makefile @@ -2,7 +2,7 @@ all: $(call DYLIB,return1) $(call DYLIB,return2) $(call NATIVE_STATICLIB,return3) ls $(TMPDIR) - $(RUSTC) --print cfg --target x86_64-unknown-linux-musl | $(CGREP) crt-static + $(BARE_RUSTC) --print cfg --target x86_64-unknown-linux-musl | $(CGREP) crt-static $(RUSTC) no-deps.rs --cfg foo $(call RUN,no-deps) diff --git a/src/test/run-make-fulldeps/linker-output-non-utf8/Makefile b/src/test/run-make-fulldeps/linker-output-non-utf8/Makefile index 3fffd1e7aa..b47ce17ec8 100644 --- a/src/test/run-make-fulldeps/linker-output-non-utf8/Makefile +++ b/src/test/run-make-fulldeps/linker-output-non-utf8/Makefile @@ -20,4 +20,4 @@ all: $(RUSTC) library.rs mkdir $(bad_dir) mv $(TMPDIR)/liblibrary.a $(bad_dir) - LIBRARY_PATH=$(bad_dir) $(RUSTC) exec.rs 2>&1 | $(CGREP) this_symbol_not_defined + $(RUSTC) -L $(bad_dir) exec.rs 2>&1 | $(CGREP) this_symbol_not_defined diff --git a/src/test/run-make-fulldeps/lto-dylib-dep/a_dylib.rs b/src/test/run-make-fulldeps/lto-dylib-dep/a_dylib.rs index c5a35296f8..e63457e6eb 100644 --- a/src/test/run-make-fulldeps/lto-dylib-dep/a_dylib.rs +++ b/src/test/run-make-fulldeps/lto-dylib-dep/a_dylib.rs @@ -1,4 +1,3 @@ - pub fn foo() { println!("bar"); } diff --git a/src/test/run-make-fulldeps/lto-dylib-dep/main.rs b/src/test/run-make-fulldeps/lto-dylib-dep/main.rs index af0955e7f3..4fb3c4730b 100644 --- a/src/test/run-make-fulldeps/lto-dylib-dep/main.rs +++ b/src/test/run-make-fulldeps/lto-dylib-dep/main.rs @@ -1,4 +1,3 @@ - extern crate a_dylib; fn main() { diff --git a/src/test/run-make-fulldeps/lto-no-link-whole-rlib/lib2.rs b/src/test/run-make-fulldeps/lto-no-link-whole-rlib/lib2.rs index 50b7882a05..c9e1baa434 100644 --- a/src/test/run-make-fulldeps/lto-no-link-whole-rlib/lib2.rs +++ b/src/test/run-make-fulldeps/lto-no-link-whole-rlib/lib2.rs @@ -10,4 +10,3 @@ extern { pub fn foo2() -> i32 { unsafe { foo() } } - diff --git a/src/test/run-make-fulldeps/override-aliased-flags/Makefile b/src/test/run-make-fulldeps/override-aliased-flags/Makefile new file mode 100644 index 0000000000..bea610eeb9 --- /dev/null +++ b/src/test/run-make-fulldeps/override-aliased-flags/Makefile @@ -0,0 +1,22 @@ +-include ../tools.mk + +# FIXME: it would be good to check that it's actually the rightmost flags +# that are used when multiple flags are specified, but I can't think of a +# reliable way to check this. + +all: + # Test that `-O` and `-C opt-level` can be specified multiple times. + # The rightmost flag will be used over any previous flags. + $(RUSTC) -O -O main.rs + $(RUSTC) -O -C opt-level=0 main.rs + $(RUSTC) -C opt-level=0 -O main.rs + $(RUSTC) -C opt-level=0 -C opt-level=2 main.rs + $(RUSTC) -C opt-level=2 -C opt-level=0 main.rs + + # Test that `-g` and `-C debuginfo` can be specified multiple times. + # The rightmost flag will be used over any previous flags. + $(RUSTC) -g -g main.rs + $(RUSTC) -g -C debuginfo=0 main.rs + $(RUSTC) -C debuginfo=0 -g main.rs + $(RUSTC) -C debuginfo=0 -C debuginfo=2 main.rs + $(RUSTC) -C debuginfo=2 -C debuginfo=0 main.rs diff --git a/src/test/run-make-fulldeps/override-aliased-flags/main.rs b/src/test/run-make-fulldeps/override-aliased-flags/main.rs new file mode 100644 index 0000000000..f328e4d9d0 --- /dev/null +++ b/src/test/run-make-fulldeps/override-aliased-flags/main.rs @@ -0,0 +1 @@ +fn main() {} diff --git a/src/test/run-make-fulldeps/pgo-gen-lto/Makefile b/src/test/run-make-fulldeps/pgo-gen-lto/Makefile index e358314c0d..48181bcbdc 100644 --- a/src/test/run-make-fulldeps/pgo-gen-lto/Makefile +++ b/src/test/run-make-fulldeps/pgo-gen-lto/Makefile @@ -1,10 +1,8 @@ --include ../tools.mk +# needs-profiler-support -# ignore-windows +-include ../tools.mk all: -ifeq ($(PROFILER_SUPPORT),1) - $(RUSTC) -Copt-level=3 -Clto=fat -Z pgo-gen="$(TMPDIR)/test.profraw" test.rs + $(RUSTC) -Copt-level=3 -Clto=fat -Z pgo-gen="$(TMPDIR)" test.rs $(call RUN,test) || exit 1 - [ -e "$(TMPDIR)/test.profraw" ] || (echo "No .profraw file"; exit 1) -endif + [ -e "$(TMPDIR)"/default_*.profraw ] || (echo "No .profraw file"; exit 1) diff --git a/src/test/run-make-fulldeps/pgo-gen-no-imp-symbols/Makefile b/src/test/run-make-fulldeps/pgo-gen-no-imp-symbols/Makefile new file mode 100644 index 0000000000..20977edb88 --- /dev/null +++ b/src/test/run-make-fulldeps/pgo-gen-no-imp-symbols/Makefile @@ -0,0 +1,11 @@ +# needs-profiler-support + +-include ../tools.mk + +all: + $(RUSTC) -O -Ccodegen-units=1 -Z pgo-gen="$(TMPDIR)" --emit=llvm-ir test.rs + # We expect symbols starting with "__llvm_profile_". + $(CGREP) "__llvm_profile_" < $(TMPDIR)/test.ll + # We do NOT expect the "__imp_" version of these symbols. + $(CGREP) -v "__imp___llvm_profile_" < $(TMPDIR)/test.ll # 64 bit + $(CGREP) -v "__imp____llvm_profile_" < $(TMPDIR)/test.ll # 32 bit diff --git a/src/test/run-make-fulldeps/pgo-gen-no-imp-symbols/test.rs b/src/test/run-make-fulldeps/pgo-gen-no-imp-symbols/test.rs new file mode 100644 index 0000000000..f328e4d9d0 --- /dev/null +++ b/src/test/run-make-fulldeps/pgo-gen-no-imp-symbols/test.rs @@ -0,0 +1 @@ +fn main() {} diff --git a/src/test/run-make-fulldeps/pgo-gen/Makefile b/src/test/run-make-fulldeps/pgo-gen/Makefile index 1961dff8d7..ce44c10a7c 100644 --- a/src/test/run-make-fulldeps/pgo-gen/Makefile +++ b/src/test/run-make-fulldeps/pgo-gen/Makefile @@ -1,10 +1,8 @@ --include ../tools.mk +# needs-profiler-support -# ignore-windows +-include ../tools.mk all: -ifeq ($(PROFILER_SUPPORT),1) - $(RUSTC) -g -Z pgo-gen="$(TMPDIR)/test.profraw" test.rs + $(RUSTC) -g -Z pgo-gen="$(TMPDIR)" test.rs $(call RUN,test) || exit 1 - [ -e "$(TMPDIR)/test.profraw" ] || (echo "No .profraw file"; exit 1) -endif + [ -e "$(TMPDIR)"/default_*.profraw ] || (echo "No .profraw file"; exit 1) diff --git a/src/test/run-make-fulldeps/pgo-use/Makefile b/src/test/run-make-fulldeps/pgo-use/Makefile new file mode 100644 index 0000000000..ababd45d33 --- /dev/null +++ b/src/test/run-make-fulldeps/pgo-use/Makefile @@ -0,0 +1,51 @@ +# needs-profiler-support + +-include ../tools.mk + +# This test makes sure that PGO profiling data leads to cold functions being +# marked as `cold` and hot functions with `inlinehint`. +# The test program contains an `if` were actual execution only ever takes the +# `else` branch. Accordingly, we expect the function that is never called to +# be marked as cold. +# +# The program is compiled with `-Copt-level=s` because this setting disables +# LLVM's pre-inlining pass (i.e. a pass that does some inlining before it adds +# the profiling instrumentation). Disabling this pass leads to rather +# predictable IR which we need for this test to be stable. + +COMMON_FLAGS=-Copt-level=s -Ccodegen-units=1 + +# LLVM doesn't support instrumenting binaries that use SEH: +# https://bugs.llvm.org/show_bug.cgi?id=41279 +# +# Things work fine with -Cpanic=abort though. +ifdef IS_MSVC +COMMON_FLAGS+= -Cpanic=abort +endif + +ifeq ($(UNAME),Darwin) +# macOS does not have the `tac` command, but `tail -r` does the same thing +TAC := tail -r +else +# some other platforms don't support the `-r` flag for `tail`, so use `tac` +TAC := tac +endif + +all: + # Compile the test program with instrumentation + $(RUSTC) $(COMMON_FLAGS) -Z pgo-gen="$(TMPDIR)" main.rs + # Run it in order to generate some profiling data + $(call RUN,main some-argument) || exit 1 + # Postprocess the profiling data so it can be used by the compiler + "$(LLVM_BIN_DIR)"/llvm-profdata merge \ + -o "$(TMPDIR)"/merged.profdata \ + "$(TMPDIR)"/default_*.profraw + # Compile the test program again, making use of the profiling data + $(RUSTC) $(COMMON_FLAGS) -Z pgo-use="$(TMPDIR)"/merged.profdata --emit=llvm-ir main.rs + # Check that the generate IR contains some things that we expect + # + # We feed the file into LLVM FileCheck tool *in reverse* so that we see the + # line with the function name before the line with the function attributes. + # FileCheck only supports checking that something matches on the next line, + # but not if something matches on the previous line. + $(TAC) "$(TMPDIR)"/main.ll | "$(LLVM_FILECHECK)" filecheck-patterns.txt diff --git a/src/test/run-make-fulldeps/pgo-use/filecheck-patterns.txt b/src/test/run-make-fulldeps/pgo-use/filecheck-patterns.txt new file mode 100644 index 0000000000..6da34f88f2 --- /dev/null +++ b/src/test/run-make-fulldeps/pgo-use/filecheck-patterns.txt @@ -0,0 +1,11 @@ +# Add a check that the IR contains some expected metadata +CHECK: !{!"ProfileFormat", !"InstrProf"} +CHECK: !"ProfileSummary" + +# Make sure that the hot function is marked with `inlinehint` +CHECK: define {{.*}} @hot_function +CHECK-NEXT: Function Attrs:{{.*}}inlinehint + +# Make sure that the cold function is marked with `cold` +CHECK: define {{.*}} @cold_function +CHECK-NEXT: Function Attrs:{{.*}}cold diff --git a/src/test/run-make-fulldeps/pgo-use/main.rs b/src/test/run-make-fulldeps/pgo-use/main.rs new file mode 100644 index 0000000000..eb9192c87e --- /dev/null +++ b/src/test/run-make-fulldeps/pgo-use/main.rs @@ -0,0 +1,23 @@ +#[no_mangle] +pub fn cold_function(c: u8) { + println!("cold {}", c); +} + +#[no_mangle] +pub fn hot_function(c: u8) { + std::env::set_var(format!("var{}", c), format!("hot {}", c)); +} + +fn main() { + let arg = std::env::args().skip(1).next().unwrap(); + + for i in 0 .. 1000_000 { + let some_value = arg.as_bytes()[i % arg.len()]; + if some_value == b'!' { + // This branch is never taken at runtime + cold_function(some_value); + } else { + hot_function(some_value); + } + } +} diff --git a/src/test/run-make-fulldeps/profile/Makefile b/src/test/run-make-fulldeps/profile/Makefile index 7300bfc955..c12712590e 100644 --- a/src/test/run-make-fulldeps/profile/Makefile +++ b/src/test/run-make-fulldeps/profile/Makefile @@ -1,9 +1,9 @@ +# needs-profiler-support + -include ../tools.mk all: -ifeq ($(PROFILER_SUPPORT),1) $(RUSTC) -g -Z profile test.rs $(call RUN,test) || exit 1 [ -e "$(TMPDIR)/test.gcno" ] || (echo "No .gcno file"; exit 1) [ -e "$(TMPDIR)/test.gcda" ] || (echo "No .gcda file"; exit 1) -endif diff --git a/src/test/run-make-fulldeps/reproducible-build/Makefile b/src/test/run-make-fulldeps/reproducible-build/Makefile index ca76a5e5d7..a17ec212cf 100644 --- a/src/test/run-make-fulldeps/reproducible-build/Makefile +++ b/src/test/run-make-fulldeps/reproducible-build/Makefile @@ -1,4 +1,8 @@ -include ../tools.mk + +# ignore-musl +# Objects are reproducible but their path is not. + all: \ smoke \ debug \ diff --git a/src/test/run-make-fulldeps/rustdoc-error-lines/Makefile b/src/test/run-make-fulldeps/rustdoc-error-lines/Makefile index e09343aa93..c9d41f0ec3 100644 --- a/src/test/run-make-fulldeps/rustdoc-error-lines/Makefile +++ b/src/test/run-make-fulldeps/rustdoc-error-lines/Makefile @@ -5,4 +5,9 @@ all: $(RUSTDOC) --test input.rs > $(TMPDIR)/output || true + $(CGREP) 'input.rs - foo (line 5)' < $(TMPDIR)/output $(CGREP) 'input.rs:7:15' < $(TMPDIR)/output + $(CGREP) 'input.rs - bar (line 15)' < $(TMPDIR)/output + $(CGREP) 'input.rs:17:15' < $(TMPDIR)/output + $(CGREP) 'input.rs - bar (line 24)' < $(TMPDIR)/output + $(CGREP) 'input.rs:26:15' < $(TMPDIR)/output diff --git a/src/test/run-make-fulldeps/rustdoc-error-lines/input.rs b/src/test/run-make-fulldeps/rustdoc-error-lines/input.rs index 7b07f38f25..2d29fa8911 100644 --- a/src/test/run-make-fulldeps/rustdoc-error-lines/input.rs +++ b/src/test/run-make-fulldeps/rustdoc-error-lines/input.rs @@ -9,3 +9,20 @@ pub fn foo() { } + +/// Add some text around the test... +/// +/// ```rust +/// #![feature(nll)] +/// let x: char = 1; +/// ``` +/// +/// ...to make sure that the line number is still correct. +/// +/// Let's also add a second test in the same doc comment. +/// +/// ```rust +/// #![feature(nll)] +/// let x: char = 1; +/// ``` +pub fn bar() {} diff --git a/src/test/run-make-fulldeps/sanitizer-address/Makefile b/src/test/run-make-fulldeps/sanitizer-address/Makefile index 207615bfbd..51d8a4a947 100644 --- a/src/test/run-make-fulldeps/sanitizer-address/Makefile +++ b/src/test/run-make-fulldeps/sanitizer-address/Makefile @@ -1,3 +1,5 @@ +# needs-sanitizer-support + -include ../tools.mk LOG := $(TMPDIR)/log.txt @@ -5,11 +7,9 @@ LOG := $(TMPDIR)/log.txt # NOTE the address sanitizer only supports x86_64 linux and macOS ifeq ($(TARGET),x86_64-apple-darwin) -ASAN_SUPPORT=$(SANITIZER_SUPPORT) EXTRA_RUSTFLAG=-C rpath else ifeq ($(TARGET),x86_64-unknown-linux-gnu) -ASAN_SUPPORT=$(SANITIZER_SUPPORT) # Apparently there are very specific Linux kernels, notably the one that's # currently on Travis CI, which contain a buggy commit that triggers failures in @@ -23,7 +23,5 @@ endif endif all: -ifeq ($(ASAN_SUPPORT),1) $(RUSTC) -g -Z sanitizer=address -Z print-link-args $(EXTRA_RUSTFLAG) overflow.rs | $(CGREP) librustc_asan $(TMPDIR)/overflow 2>&1 | $(CGREP) stack-buffer-overflow -endif diff --git a/src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile b/src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile index 4b7fece36d..35317dca1e 100644 --- a/src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile +++ b/src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile @@ -1,3 +1,7 @@ +# needs-sanitizer-support +# only-x86_64 +# only-linux + -include ../tools.mk LOG := $(TMPDIR)/log.txt @@ -7,16 +11,10 @@ LOG := $(TMPDIR)/log.txt # are compiled with address sanitizer, and we assert that a fault in the cdylib # is correctly detected. -ifeq ($(TARGET),x86_64-unknown-linux-gnu) -ASAN_SUPPORT=$(SANITIZER_SUPPORT) - # See comment in sanitizer-address/Makefile for why this is here EXTRA_RUSTFLAG=-C relocation-model=dynamic-no-pic -endif all: -ifeq ($(ASAN_SUPPORT),1) $(RUSTC) -g -Z sanitizer=address --crate-type cdylib --target $(TARGET) $(EXTRA_RUSTFLAG) library.rs $(RUSTC) -g -Z sanitizer=address --crate-type bin --target $(TARGET) $(EXTRA_RUSTFLAG) -llibrary program.rs LD_LIBRARY_PATH=$(TMPDIR) $(TMPDIR)/program 2>&1 | $(CGREP) stack-buffer-overflow -endif diff --git a/src/test/run-make-fulldeps/sanitizer-dylib-link/Makefile b/src/test/run-make-fulldeps/sanitizer-dylib-link/Makefile index 97f6172142..24d2ebd8f4 100644 --- a/src/test/run-make-fulldeps/sanitizer-dylib-link/Makefile +++ b/src/test/run-make-fulldeps/sanitizer-dylib-link/Makefile @@ -1,3 +1,7 @@ +# needs-sanitizer-support +# only-x86_64 +# only-linux + -include ../tools.mk LOG := $(TMPDIR)/log.txt @@ -7,16 +11,10 @@ LOG := $(TMPDIR)/log.txt # are compiled with address sanitizer, and we assert that a fault in the dylib # is correctly detected. -ifeq ($(TARGET),x86_64-unknown-linux-gnu) -ASAN_SUPPORT=$(SANITIZER_SUPPORT) - # See comment in sanitizer-address/Makefile for why this is here EXTRA_RUSTFLAG=-C relocation-model=dynamic-no-pic -endif all: -ifeq ($(ASAN_SUPPORT),1) $(RUSTC) -g -Z sanitizer=address --crate-type dylib --target $(TARGET) $(EXTRA_RUSTFLAG) library.rs $(RUSTC) -g -Z sanitizer=address --crate-type bin --target $(TARGET) $(EXTRA_RUSTFLAG) -llibrary program.rs LD_LIBRARY_PATH=$(TMPDIR) $(TMPDIR)/program 2>&1 | $(CGREP) stack-buffer-overflow -endif diff --git a/src/test/run-make-fulldeps/sanitizer-invalid-cratetype/Makefile b/src/test/run-make-fulldeps/sanitizer-invalid-cratetype/Makefile index dc37c0d0bc..9581ac565e 100644 --- a/src/test/run-make-fulldeps/sanitizer-invalid-cratetype/Makefile +++ b/src/test/run-make-fulldeps/sanitizer-invalid-cratetype/Makefile @@ -1,18 +1,16 @@ +# needs-sanitizer-support + -include ../tools.mk # NOTE the address sanitizer only supports x86_64 linux and macOS ifeq ($(TARGET),x86_64-apple-darwin) -ASAN_SUPPORT=$(SANITIZER_SUPPORT) EXTRA_RUSTFLAG=-C rpath else ifeq ($(TARGET),x86_64-unknown-linux-gnu) -ASAN_SUPPORT=$(SANITIZER_SUPPORT) EXTRA_RUSTFLAG= endif endif all: -ifeq ($(ASAN_SUPPORT),1) $(RUSTC) -Z sanitizer=address --crate-type proc-macro --target $(TARGET) hello.rs 2>&1 | $(CGREP) '-Z sanitizer' -endif diff --git a/src/test/run-make-fulldeps/sanitizer-leak/Makefile b/src/test/run-make-fulldeps/sanitizer-leak/Makefile index 0f3c18f929..101e8272ab 100644 --- a/src/test/run-make-fulldeps/sanitizer-leak/Makefile +++ b/src/test/run-make-fulldeps/sanitizer-leak/Makefile @@ -1,12 +1,11 @@ -include ../tools.mk +# needs-sanitizer-support # only-linux # only-x86_64 # ignore-test # FIXME(#46126) ThinLTO for libstd broke this test all: -ifdef SANITIZER_SUPPORT $(RUSTC) -C opt-level=1 -g -Z sanitizer=leak -Z print-link-args leak.rs | $(CGREP) librustc_lsan $(TMPDIR)/leak 2>&1 | $(CGREP) 'detected memory leaks' -endif diff --git a/src/test/run-make-fulldeps/sanitizer-memory/Makefile b/src/test/run-make-fulldeps/sanitizer-memory/Makefile index 718d9637ea..b3376f8a72 100644 --- a/src/test/run-make-fulldeps/sanitizer-memory/Makefile +++ b/src/test/run-make-fulldeps/sanitizer-memory/Makefile @@ -1,10 +1,9 @@ -include ../tools.mk +# needs-sanitizer-support # only-linux # only-x86_64 all: -ifdef SANITIZER_SUPPORT $(RUSTC) -g -Z sanitizer=memory -Z print-link-args uninit.rs | $(CGREP) librustc_msan $(TMPDIR)/uninit 2>&1 | $(CGREP) use-of-uninitialized-value -endif diff --git a/src/test/run-make-fulldeps/sanitizer-staticlib-link/Makefile b/src/test/run-make-fulldeps/sanitizer-staticlib-link/Makefile index 2b444d667b..200dc1be4d 100644 --- a/src/test/run-make-fulldeps/sanitizer-staticlib-link/Makefile +++ b/src/test/run-make-fulldeps/sanitizer-staticlib-link/Makefile @@ -1,18 +1,15 @@ +# needs-sanitizer-support +# only-x86_64 +# only-linux + -include ../tools.mk # This test builds a staticlib, then an executable that links to it. -# The staticlib and executable both are compiled with address sanitizer, +# The staticlib and executable both are compiled with address sanitizer, # and we assert that a fault in the staticlib is correctly detected. -ifeq ($(TARGET),x86_64-unknown-linux-gnu) -ASAN_SUPPORT=$(SANITIZER_SUPPORT) -EXTRA_RUSTFLAG= -endif - all: -ifeq ($(ASAN_SUPPORT),1) $(RUSTC) -g -Z sanitizer=address --crate-type staticlib --target $(TARGET) library.rs $(CC) program.c $(call STATICLIB,library) $(call OUT_EXE,program) $(EXTRACFLAGS) $(EXTRACXXFLAGS) LD_LIBRARY_PATH=$(TMPDIR) $(TMPDIR)/program 2>&1 | $(CGREP) stack-buffer-overflow -endif diff --git a/src/test/run-make-fulldeps/sanitizer-staticlib-link/program.c b/src/test/run-make-fulldeps/sanitizer-staticlib-link/program.c index abd5d508e7..a6d3bcdc5a 100644 --- a/src/test/run-make-fulldeps/sanitizer-staticlib-link/program.c +++ b/src/test/run-make-fulldeps/sanitizer-staticlib-link/program.c @@ -5,4 +5,3 @@ int main() { overflow(); return 0; } - diff --git a/src/test/run-make-fulldeps/stable-symbol-names/stable-symbol-names2.rs b/src/test/run-make-fulldeps/stable-symbol-names/stable-symbol-names2.rs index 6df74d2491..33df9d6c68 100644 --- a/src/test/run-make-fulldeps/stable-symbol-names/stable-symbol-names2.rs +++ b/src/test/run-make-fulldeps/stable-symbol-names/stable-symbol-names2.rs @@ -15,4 +15,3 @@ pub fn trait_impl_test_function() { use stable_symbol_names1::*; Bar::generic_method::(); } - diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/test.py b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/test.py index e0fa4e8f5d..855b6421cf 100644 --- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/test.py +++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/test.py @@ -7,8 +7,8 @@ from subprocess import PIPE, Popen # This is a whitelist of files which are stable crates or simply are not crates, # we don't check for the instability of these crates as they're all stable! -STABLE_CRATES = ['std', 'core', 'proc_macro', 'rsbegin.o', 'rsend.o', 'dllcrt2.o', 'crt2.o', - 'clang_rt'] +STABLE_CRATES = ['std', 'alloc', 'core', 'proc_macro', + 'rsbegin.o', 'rsend.o', 'dllcrt2.o', 'crt2.o', 'clang_rt'] def convert_to_string(s): diff --git a/src/test/run-make-fulldeps/tools.mk b/src/test/run-make-fulldeps/tools.mk index 7939928180..3b4df73cdf 100644 --- a/src/test/run-make-fulldeps/tools.mk +++ b/src/test/run-make-fulldeps/tools.mk @@ -47,6 +47,7 @@ DYLIB = $(TMPDIR)/$(1).dll STATICLIB = $(TMPDIR)/$(1).lib STATICLIB_GLOB = $(1)*.lib BIN = $(1).exe +LLVM_FILECHECK := $(shell cygpath -u "$(LLVM_FILECHECK)") else RUN = $(TARGET_RPATH_ENV) $(RUN_BINFILE) FAIL = $(TARGET_RPATH_ENV) $(RUN_BINFILE) && exit 1 || exit 0 @@ -87,10 +88,6 @@ else ifeq ($(UNAME),FreeBSD) EXTRACFLAGS := -lm -lpthread -lgcc_s else -ifeq ($(UNAME),Bitrig) - EXTRACFLAGS := -lm -lpthread - EXTRACXXFLAGS := -lc++ -lc++abi -else ifeq ($(UNAME),SunOS) EXTRACFLAGS := -lm -lpthread -lposix4 -lsocket -lresolv else @@ -105,7 +102,6 @@ endif endif endif endif -endif REMOVE_DYLIBS = rm $(TMPDIR)/$(call DYLIB_GLOB,$(1)) REMOVE_RLIBS = rm $(TMPDIR)/$(call RLIB_GLOB,$(1)) diff --git a/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile index 3976da3113..838b1a2719 100644 --- a/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile +++ b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile @@ -2,7 +2,6 @@ # ignore-freebsd # ignore-openbsd -# ignore-bitrig # ignore-sunos HOST := $(shell $(RUSTC) -vV | grep 'host:' | sed 's/host: //') diff --git a/src/test/run-make-fulldeps/windows-subsystem/console.rs b/src/test/run-make-fulldeps/windows-subsystem/console.rs index 4a2e9bb3c5..61a92eb6a9 100644 --- a/src/test/run-make-fulldeps/windows-subsystem/console.rs +++ b/src/test/run-make-fulldeps/windows-subsystem/console.rs @@ -1,4 +1,3 @@ #![windows_subsystem = "console"] fn main() {} - diff --git a/src/test/run-make/rustc-macro-dep-files/Makefile b/src/test/run-make/rustc-macro-dep-files/Makefile index 0420a38916..a08a63fb44 100644 --- a/src/test/run-make/rustc-macro-dep-files/Makefile +++ b/src/test/run-make/rustc-macro-dep-files/Makefile @@ -2,7 +2,10 @@ # FIXME(eddyb) provide `HOST_RUSTC` and `TARGET_RUSTC` # instead of hardcoding them everywhere they're needed. +ifeq ($(IS_MUSL_HOST),1) +ADDITIONAL_ARGS := $(RUSTFLAGS) +endif all: - $(BARE_RUSTC) foo.rs --out-dir $(TMPDIR) + $(BARE_RUSTC) $(ADDITIONAL_ARGS) foo.rs --out-dir $(TMPDIR) $(RUSTC) bar.rs --target $(TARGET) --emit dep-info $(CGREP) -v "proc-macro source" < $(TMPDIR)/bar.d diff --git a/src/test/run-make/wasm-export-all-symbols/Makefile b/src/test/run-make/wasm-export-all-symbols/Makefile index 039481215f..15403d8d41 100644 --- a/src/test/run-make/wasm-export-all-symbols/Makefile +++ b/src/test/run-make/wasm-export-all-symbols/Makefile @@ -6,8 +6,14 @@ all: $(RUSTC) bar.rs --target wasm32-unknown-unknown $(RUSTC) foo.rs --target wasm32-unknown-unknown $(NODE) verify.js $(TMPDIR)/foo.wasm + $(RUSTC) main.rs --target wasm32-unknown-unknown + $(NODE) verify.js $(TMPDIR)/main.wasm $(RUSTC) bar.rs --target wasm32-unknown-unknown -O $(RUSTC) foo.rs --target wasm32-unknown-unknown -O $(NODE) verify.js $(TMPDIR)/foo.wasm + $(RUSTC) main.rs --target wasm32-unknown-unknown -O + $(NODE) verify.js $(TMPDIR)/main.wasm $(RUSTC) foo.rs --target wasm32-unknown-unknown -C lto $(NODE) verify.js $(TMPDIR)/foo.wasm + $(RUSTC) main.rs --target wasm32-unknown-unknown -C lto + $(NODE) verify.js $(TMPDIR)/main.wasm diff --git a/src/test/run-make/wasm-export-all-symbols/main.rs b/src/test/run-make/wasm-export-all-symbols/main.rs new file mode 100644 index 0000000000..0edda7d7b8 --- /dev/null +++ b/src/test/run-make/wasm-export-all-symbols/main.rs @@ -0,0 +1,3 @@ +extern crate bar; + +fn main() {} diff --git a/src/test/run-make/wasm-export-all-symbols/verify.js b/src/test/run-make/wasm-export-all-symbols/verify.js index 0f56fa45c2..7b6fc7a456 100644 --- a/src/test/run-make/wasm-export-all-symbols/verify.js +++ b/src/test/run-make/wasm-export-all-symbols/verify.js @@ -16,7 +16,13 @@ for (const entry of list) { nexports += 1; } -if (nexports != 1) - throw new Error("should only have one function export"); if (my_exports.foo === undefined) throw new Error("`foo` wasn't defined"); + +if (my_exports.main === undefined) { + if (nexports != 1) + throw new Error("should only have one function export"); +} else { + if (nexports != 2) + throw new Error("should only have two function exports"); +} diff --git a/src/test/run-pass-fulldeps/auxiliary/custom-derive-plugin-attr.rs b/src/test/run-pass-fulldeps/auxiliary/custom-derive-plugin-attr.rs index 699972c9a8..c6b33fbc75 100644 --- a/src/test/run-pass-fulldeps/auxiliary/custom-derive-plugin-attr.rs +++ b/src/test/run-pass-fulldeps/auxiliary/custom-derive-plugin-attr.rs @@ -14,7 +14,7 @@ use syntax::ast; use syntax::attr; use syntax::ext::base::{MultiDecorator, ExtCtxt, Annotatable}; use syntax::ext::build::AstBuilder; -use syntax::symbol::Symbol; +use syntax::symbol::{Symbol, sym}; use syntax::ptr::P; use syntax_ext::deriving::generic::{TraitDef, MethodDef, combine_substructure}; use syntax_ext::deriving::generic::{Substructure, Struct, EnumMatching}; @@ -71,7 +71,7 @@ fn totalsum_substructure(cx: &mut ExtCtxt, trait_span: Span, }; fields.iter().fold(cx.expr_isize(trait_span, 0), |acc, ref item| { - if attr::contains_name(&item.attrs, "ignore") { + if attr::contains_name(&item.attrs, sym::ignore) { acc } else { cx.expr_binary(item.span, ast::BinOpKind::Add, acc, diff --git a/src/test/run-pass-fulldeps/auxiliary/issue-40001-plugin.rs b/src/test/run-pass-fulldeps/auxiliary/issue-40001-plugin.rs index 76d0906f97..40e0115c62 100644 --- a/src/test/run-pass-fulldeps/auxiliary/issue-40001-plugin.rs +++ b/src/test/run-pass-fulldeps/auxiliary/issue-40001-plugin.rs @@ -23,7 +23,7 @@ use syntax::{ast, source_map}; #[plugin_registrar] pub fn plugin_registrar(reg: &mut Registry) { reg.register_late_lint_pass(box MissingWhitelistedAttrPass); - reg.register_attribute("whitelisted_attr".to_string(), Whitelisted); + reg.register_attribute(Symbol::intern("whitelisted_attr"), Whitelisted); } declare_lint! { @@ -48,7 +48,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingWhitelistedAttrPass { _ => cx.tcx.hir().expect_item_by_hir_id(cx.tcx.hir().get_parent_item(id)), }; - if !attr::contains_name(&item.attrs, "whitelisted_attr") { + if !attr::contains_name(&item.attrs, Symbol::intern("whitelisted_attr")) { cx.span_lint(MISSING_WHITELISTED_ATTR, span, "Missing 'whitelisted_attr' attribute"); } diff --git a/src/test/run-pass-fulldeps/auxiliary/lint-for-crate.rs b/src/test/run-pass-fulldeps/auxiliary/lint-for-crate.rs index f34e10218d..8c7bd7222e 100644 --- a/src/test/run-pass-fulldeps/auxiliary/lint-for-crate.rs +++ b/src/test/run-pass-fulldeps/auxiliary/lint-for-crate.rs @@ -11,6 +11,7 @@ use rustc::lint::{LateContext, LintContext, LintPass, LateLintPass, LateLintPass use rustc_plugin::Registry; use rustc::hir; use syntax::attr; +use syntax::symbol::Symbol; macro_rules! fake_lint_pass { ($struct:ident, $lints:expr, $($attr:expr),*) => { @@ -49,19 +50,19 @@ declare_lint!(CRATE_NOT_GREEN, Warn, "crate not marked with #![crate_green]"); fake_lint_pass! { PassOkay, lint_array!(CRATE_NOT_OKAY), // Single lint - "rustc_crate_okay" + Symbol::intern("rustc_crate_okay") } fake_lint_pass! { PassRedBlue, lint_array!(CRATE_NOT_RED, CRATE_NOT_BLUE), // Multiple lints - "rustc_crate_red", "rustc_crate_blue" + Symbol::intern("rustc_crate_red"), Symbol::intern("rustc_crate_blue") } fake_lint_pass! { PassGreyGreen, lint_array!(CRATE_NOT_GREY, CRATE_NOT_GREEN, ), // Trailing comma - "rustc_crate_grey", "rustc_crate_green" + Symbol::intern("rustc_crate_grey"), Symbol::intern("rustc_crate_green") } #[plugin_registrar] diff --git a/src/test/run-pass-fulldeps/newtype_index.rs b/src/test/run-pass-fulldeps/newtype_index.rs index 3cd622a33b..18b845eeec 100644 --- a/src/test/run-pass-fulldeps/newtype_index.rs +++ b/src/test/run-pass-fulldeps/newtype_index.rs @@ -1,7 +1,7 @@ #![feature(rustc_attrs, rustc_private, step_trait)] #[macro_use] extern crate rustc_data_structures; -extern crate rustc_serialize; +extern crate serialize as rustc_serialize; use rustc_data_structures::indexed_vec::Idx; diff --git a/src/test/run-pass-valgrind/exit-flushes.rs b/src/test/run-pass-valgrind/exit-flushes.rs index c4d23c2938..cd5edb84bd 100644 --- a/src/test/run-pass-valgrind/exit-flushes.rs +++ b/src/test/run-pass-valgrind/exit-flushes.rs @@ -1,6 +1,7 @@ // no-prefer-dynamic // ignore-cloudabi // ignore-emscripten +// ignore-sgx no processes // ignore-macos this needs valgrind 3.11 or higher; see // https://github.com/rust-lang/rust/pull/30365#issuecomment-165763679 diff --git a/src/test/run-pass/abort-on-c-abi.rs b/src/test/run-pass/abort-on-c-abi.rs index c3991bd2e5..263f093c51 100644 --- a/src/test/run-pass/abort-on-c-abi.rs +++ b/src/test/run-pass/abort-on-c-abi.rs @@ -5,6 +5,7 @@ // ignore-cloudabi no env and process // ignore-emscripten no processes +// ignore-sgx no processes use std::{env, panic}; use std::io::prelude::*; diff --git a/src/test/run-pass/array-slice-vec/vec-macro-no-std.rs b/src/test/run-pass/array-slice-vec/vec-macro-no-std.rs index 7f7f1e4331..443895f7c4 100644 --- a/src/test/run-pass/array-slice-vec/vec-macro-no-std.rs +++ b/src/test/run-pass/array-slice-vec/vec-macro-no-std.rs @@ -2,7 +2,7 @@ // ignore-emscripten no no_std executables -#![feature(lang_items, start, rustc_private, alloc)] +#![feature(lang_items, start, rustc_private)] #![no_std] extern crate std as other; diff --git a/src/test/run-pass/asm-concat-src.rs b/src/test/run-pass/asm-concat-src.rs index b24586464d..c629519e8f 100644 --- a/src/test/run-pass/asm-concat-src.rs +++ b/src/test/run-pass/asm-concat-src.rs @@ -6,4 +6,3 @@ pub fn main() { unsafe { asm!(concat!("", "")) }; } - diff --git a/src/test/run-pass/asm-in-moved.rs b/src/test/run-pass/asm-in-moved.rs index dc73f83a94..8726db3555 100644 --- a/src/test/run-pass/asm-in-moved.rs +++ b/src/test/run-pass/asm-in-moved.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - #![feature(asm)] #![allow(dead_code)] diff --git a/src/test/run-pass/asm-out-assign.rs b/src/test/run-pass/asm-out-assign.rs index d0978cc834..5c46cb92c6 100644 --- a/src/test/run-pass/asm-out-assign.rs +++ b/src/test/run-pass/asm-out-assign.rs @@ -1,6 +1,3 @@ -// revisions ast mir -//[mir]compile-flags: -Z borrowck=mir - #![feature(asm)] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] diff --git a/src/test/run-pass/async-await.rs b/src/test/run-pass/async-await.rs index 4f5f7724ad..49fd8b8b1c 100644 --- a/src/test/run-pass/async-await.rs +++ b/src/test/run-pass/async-await.rs @@ -1,7 +1,7 @@ // edition:2018 // aux-build:arc_wake.rs -#![feature(async_await, await_macro, futures_api)] +#![feature(async_await)] extern crate arc_wake; @@ -19,7 +19,10 @@ struct Counter { } impl ArcWake for Counter { - fn wake(arc_self: &Arc) { + fn wake(self: Arc) { + Self::wake_by_ref(&self) + } + fn wake_by_ref(arc_self: &Arc) { arc_self.wakes.fetch_add(1, atomic::Ordering::SeqCst); } } @@ -34,7 +37,7 @@ impl Future for WakeOnceThenComplete { if self.0 { Poll::Ready(()) } else { - cx.waker().wake(); + cx.waker().wake_by_ref(); self.0 = true; Poll::Pending } @@ -43,14 +46,14 @@ impl Future for WakeOnceThenComplete { fn async_block(x: u8) -> impl Future { async move { - await!(wake_and_yield_once()); + wake_and_yield_once().await; x } } fn async_block_with_borrow_named_lifetime<'a>(x: &'a u8) -> impl Future + 'a { async move { - await!(wake_and_yield_once()); + wake_and_yield_once().await; *x } } @@ -58,43 +61,43 @@ fn async_block_with_borrow_named_lifetime<'a>(x: &'a u8) -> impl Future impl Future { async move { let future = async { - await!(wake_and_yield_once()); + wake_and_yield_once().await; x }; - await!(future) + future.await } } fn async_closure(x: u8) -> impl Future { (async move |x: u8| -> u8 { - await!(wake_and_yield_once()); + wake_and_yield_once().await; x })(x) } async fn async_fn(x: u8) -> u8 { - await!(wake_and_yield_once()); + wake_and_yield_once().await; x } async fn generic_async_fn(x: T) -> T { - await!(wake_and_yield_once()); + wake_and_yield_once().await; x } async fn async_fn_with_borrow(x: &u8) -> u8 { - await!(wake_and_yield_once()); + wake_and_yield_once().await; *x } async fn async_fn_with_borrow_named_lifetime<'a>(x: &'a u8) -> u8 { - await!(wake_and_yield_once()); + wake_and_yield_once().await; *x } fn async_fn_with_impl_future_named_lifetime<'a>(x: &'a u8) -> impl Future + 'a { async move { - await!(wake_and_yield_once()); + wake_and_yield_once().await; *x } } @@ -107,18 +110,18 @@ async fn async_fn_multiple_args(x: &u8, _y: &u8) -> u8 { */ async fn async_fn_multiple_args_named_lifetime<'a>(x: &'a u8, _y: &'a u8) -> u8 { - await!(wake_and_yield_once()); + wake_and_yield_once().await; *x } fn async_fn_with_internal_borrow(y: u8) -> impl Future { async move { - await!(async_fn_with_borrow_named_lifetime(&y)) + async_fn_with_borrow_named_lifetime(&y).await } } unsafe async fn unsafe_async_fn(x: u8) -> u8 { - await!(wake_and_yield_once()); + wake_and_yield_once().await; x } @@ -131,7 +134,7 @@ trait Bar { impl Foo { async fn async_method(x: u8) -> u8 { unsafe { - await!(unsafe_async_fn(x)) + unsafe_async_fn(x).await } } } @@ -162,7 +165,7 @@ fn main() { ($($fn_name:expr,)*) => { $( test_future_yields_once_then_returns(|x| { async move { - await!($fn_name(&x)) + $fn_name(&x).await } }); )* } @@ -178,7 +181,7 @@ fn main() { Foo::async_method, |x| { async move { - unsafe { await!(unsafe_async_fn(x)) } + unsafe { unsafe_async_fn(x).await } } }, } @@ -189,7 +192,7 @@ fn main() { async_fn_with_impl_future_named_lifetime, |x| { async move { - await!(async_fn_multiple_args_named_lifetime(x, x)) + async_fn_multiple_args_named_lifetime(x, x).await } }, } diff --git a/src/test/run-pass/atomic-print.rs b/src/test/run-pass/atomic-print.rs index 566aeeb2c3..ee76ef9b25 100644 --- a/src/test/run-pass/atomic-print.rs +++ b/src/test/run-pass/atomic-print.rs @@ -2,6 +2,7 @@ #![allow(deprecated)] // ignore-cloudabi no process support // ignore-emscripten no threads support +// ignore-sgx no processes use std::{env, fmt, process, sync, thread}; diff --git a/src/test/run-pass/auxiliary/arc_wake.rs b/src/test/run-pass/auxiliary/arc_wake.rs index 74ec56f551..c21886f26f 100644 --- a/src/test/run-pass/auxiliary/arc_wake.rs +++ b/src/test/run-pass/auxiliary/arc_wake.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(futures_api)] - use std::sync::Arc; use std::task::{ Waker, RawWaker, RawWakerVTable, @@ -12,25 +10,30 @@ macro_rules! waker_vtable { &RawWakerVTable::new( clone_arc_raw::<$ty>, wake_arc_raw::<$ty>, + wake_by_ref_arc_raw::<$ty>, drop_arc_raw::<$ty>, ) }; } pub trait ArcWake { - fn wake(arc_self: &Arc); + fn wake(self: Arc); + + fn wake_by_ref(arc_self: &Arc) { + arc_self.clone().wake() + } fn into_waker(wake: Arc) -> Waker where Self: Sized { - let ptr = Arc::into_raw(wake) as *const(); + let ptr = Arc::into_raw(wake) as *const (); unsafe { - Waker::new_unchecked(RawWaker::new(ptr, waker_vtable!(Self))) + Waker::from_raw(RawWaker::new(ptr, waker_vtable!(Self))) } } } -unsafe fn increase_refcount(data: *const()) { +unsafe fn increase_refcount(data: *const ()) { // Retain Arc by creating a copy let arc: Arc = Arc::from_raw(data as *const T); let arc_clone = arc.clone(); @@ -39,18 +42,23 @@ unsafe fn increase_refcount(data: *const()) { let _ = Arc::into_raw(arc_clone); } -unsafe fn clone_arc_raw(data: *const()) -> RawWaker { +unsafe fn clone_arc_raw(data: *const ()) -> RawWaker { increase_refcount::(data); RawWaker::new(data, waker_vtable!(T)) } -unsafe fn drop_arc_raw(data: *const()) { +unsafe fn drop_arc_raw(data: *const ()) { // Drop Arc let _: Arc = Arc::from_raw(data as *const T); } -unsafe fn wake_arc_raw(data: *const()) { +unsafe fn wake_arc_raw(data: *const ()) { + let arc: Arc = Arc::from_raw(data as *const T); + ArcWake::wake(arc); +} + +unsafe fn wake_by_ref_arc_raw(data: *const ()) { let arc: Arc = Arc::from_raw(data as *const T); - ArcWake::wake(&arc); + ArcWake::wake_by_ref(&arc); let _ = Arc::into_raw(arc); } diff --git a/src/test/run-pass/await-macro.rs b/src/test/run-pass/await-macro.rs new file mode 100644 index 0000000000..e1b4328deb --- /dev/null +++ b/src/test/run-pass/await-macro.rs @@ -0,0 +1,199 @@ +// edition:2018 +// aux-build:arc_wake.rs + +#![feature(async_await, await_macro)] + +extern crate arc_wake; + +use std::pin::Pin; +use std::future::Future; +use std::sync::{ + Arc, + atomic::{self, AtomicUsize}, +}; +use std::task::{Context, Poll}; +use arc_wake::ArcWake; + +struct Counter { + wakes: AtomicUsize, +} + +impl ArcWake for Counter { + fn wake(self: Arc) { + Self::wake_by_ref(&self) + } + fn wake_by_ref(arc_self: &Arc) { + arc_self.wakes.fetch_add(1, atomic::Ordering::SeqCst); + } +} + +struct WakeOnceThenComplete(bool); + +fn wake_and_yield_once() -> WakeOnceThenComplete { WakeOnceThenComplete(false) } + +impl Future for WakeOnceThenComplete { + type Output = (); + fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()> { + if self.0 { + Poll::Ready(()) + } else { + cx.waker().wake_by_ref(); + self.0 = true; + Poll::Pending + } + } +} + +fn async_block(x: u8) -> impl Future { + async move { + await!(wake_and_yield_once()); + x + } +} + +fn async_block_with_borrow_named_lifetime<'a>(x: &'a u8) -> impl Future + 'a { + async move { + await!(wake_and_yield_once()); + *x + } +} + +fn async_nonmove_block(x: u8) -> impl Future { + async move { + let future = async { + await!(wake_and_yield_once()); + x + }; + await!(future) + } +} + +fn async_closure(x: u8) -> impl Future { + (async move |x: u8| -> u8 { + await!(wake_and_yield_once()); + x + })(x) +} + +async fn async_fn(x: u8) -> u8 { + await!(wake_and_yield_once()); + x +} + +async fn generic_async_fn(x: T) -> T { + await!(wake_and_yield_once()); + x +} + +async fn async_fn_with_borrow(x: &u8) -> u8 { + await!(wake_and_yield_once()); + *x +} + +async fn async_fn_with_borrow_named_lifetime<'a>(x: &'a u8) -> u8 { + await!(wake_and_yield_once()); + *x +} + +fn async_fn_with_impl_future_named_lifetime<'a>(x: &'a u8) -> impl Future + 'a { + async move { + await!(wake_and_yield_once()); + *x + } +} + +/* FIXME(cramertj) support when `existential type T<'a, 'b>:;` works +async fn async_fn_multiple_args(x: &u8, _y: &u8) -> u8 { + await!(wake_and_yield_once()); + *x +} +*/ + +async fn async_fn_multiple_args_named_lifetime<'a>(x: &'a u8, _y: &'a u8) -> u8 { + await!(wake_and_yield_once()); + *x +} + +fn async_fn_with_internal_borrow(y: u8) -> impl Future { + async move { + await!(async_fn_with_borrow_named_lifetime(&y)) + } +} + +unsafe async fn unsafe_async_fn(x: u8) -> u8 { + await!(wake_and_yield_once()); + x +} + +struct Foo; + +trait Bar { + fn foo() {} +} + +impl Foo { + async fn async_method(x: u8) -> u8 { + unsafe { + await!(unsafe_async_fn(x)) + } + } +} + +fn test_future_yields_once_then_returns(f: F) +where + F: FnOnce(u8) -> Fut, + Fut: Future, +{ + let mut fut = Box::pin(f(9)); + let counter = Arc::new(Counter { wakes: AtomicUsize::new(0) }); + let waker = ArcWake::into_waker(counter.clone()); + let mut cx = Context::from_waker(&waker); + assert_eq!(0, counter.wakes.load(atomic::Ordering::SeqCst)); + assert_eq!(Poll::Pending, fut.as_mut().poll(&mut cx)); + assert_eq!(1, counter.wakes.load(atomic::Ordering::SeqCst)); + assert_eq!(Poll::Ready(9), fut.as_mut().poll(&mut cx)); +} + +fn main() { + macro_rules! test { + ($($fn_name:expr,)*) => { $( + test_future_yields_once_then_returns($fn_name); + )* } + } + + macro_rules! test_with_borrow { + ($($fn_name:expr,)*) => { $( + test_future_yields_once_then_returns(|x| { + async move { + await!($fn_name(&x)) + } + }); + )* } + } + + test! { + async_block, + async_nonmove_block, + async_closure, + async_fn, + generic_async_fn, + async_fn_with_internal_borrow, + Foo::async_method, + |x| { + async move { + unsafe { await!(unsafe_async_fn(x)) } + } + }, + } + test_with_borrow! { + async_block_with_borrow_named_lifetime, + async_fn_with_borrow, + async_fn_with_borrow_named_lifetime, + async_fn_with_impl_future_named_lifetime, + |x| { + async move { + await!(async_fn_multiple_args_named_lifetime(x, x)) + } + }, + } +} diff --git a/src/test/run-pass/backtrace-debuginfo.rs b/src/test/run-pass/backtrace-debuginfo.rs index 37c889e9df..69ce1f7032 100644 --- a/src/test/run-pass/backtrace-debuginfo.rs +++ b/src/test/run-pass/backtrace-debuginfo.rs @@ -10,9 +10,12 @@ // ignore-pretty issue #37195 // ignore-cloudabi spawning processes is not supported // ignore-emscripten spawning processes is not supported +// normalize-stderr-test ".*\n" -> "" +// ignore-sgx no processes -// note that above `-opt-bisect-limit=0` is used to basically disable -// optimizations +// Note that above `-opt-bisect-limit=0` is used to basically disable +// optimizations. It creates tons of output on stderr, hence we normalize +// that away entirely. use std::env; @@ -30,7 +33,6 @@ macro_rules! dump_and_die { all(target_os = "linux", target_arch = "arm"), target_os = "freebsd", target_os = "dragonfly", - target_os = "bitrig", target_os = "openbsd")) { // skip these platforms as this support isn't implemented yet. } else { diff --git a/src/test/run-pass/backtrace.rs b/src/test/run-pass/backtrace.rs index da3871aba0..5f6198aff5 100644 --- a/src/test/run-pass/backtrace.rs +++ b/src/test/run-pass/backtrace.rs @@ -2,6 +2,7 @@ // ignore-cloudabi spawning processes is not supported // ignore-emscripten spawning processes is not supported // ignore-openbsd no support for libbacktrace without filename +// ignore-sgx no processes // compile-flags:-g use std::env; diff --git a/src/test/run-pass/binding/empty-types-in-patterns.rs b/src/test/run-pass/binding/empty-types-in-patterns.rs index d9fb176c81..2b8b1b29df 100644 --- a/src/test/run-pass/binding/empty-types-in-patterns.rs +++ b/src/test/run-pass/binding/empty-types-in-patterns.rs @@ -56,4 +56,3 @@ fn main() { bar(&[]); } - diff --git a/src/test/run-pass/binding/match-pipe-binding.rs b/src/test/run-pass/binding/match-pipe-binding.rs index 40dbd24689..7d4a7c708d 100644 --- a/src/test/run-pass/binding/match-pipe-binding.rs +++ b/src/test/run-pass/binding/match-pipe-binding.rs @@ -1,5 +1,4 @@ // run-pass -// compile-flags: -Z borrowck=compare fn test1() { // from issue 6338 diff --git a/src/test/run-pass/borrowck/borrowck-assignment-to-static-mut.rs b/src/test/run-pass/borrowck/borrowck-assignment-to-static-mut.rs index 25ef48d0d5..72bf43da95 100644 --- a/src/test/run-pass/borrowck/borrowck-assignment-to-static-mut.rs +++ b/src/test/run-pass/borrowck/borrowck-assignment-to-static-mut.rs @@ -2,9 +2,6 @@ #![allow(dead_code)] // Test taken from #45641 (https://github.com/rust-lang/rust/issues/45641) -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - static mut Y: u32 = 0; unsafe fn should_ok() { diff --git a/src/test/run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs b/src/test/run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs index c953bed26f..96d2663500 100644 --- a/src/test/run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs +++ b/src/test/run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs @@ -3,8 +3,6 @@ #![allow(unused_variables)] // Test case from #39963. -#![feature(nll)] - #[derive(Clone)] struct Foo(Option>, Option>); diff --git a/src/test/run-pass/borrowck/borrowck-unsafe-static-mutable-borrows.rs b/src/test/run-pass/borrowck/borrowck-unsafe-static-mutable-borrows.rs index 0487c179e3..adc7dfd541 100644 --- a/src/test/run-pass/borrowck/borrowck-unsafe-static-mutable-borrows.rs +++ b/src/test/run-pass/borrowck/borrowck-unsafe-static-mutable-borrows.rs @@ -1,6 +1,4 @@ // run-pass -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir // Test file taken from issue 45129 (https://github.com/rust-lang/rust/issues/45129) diff --git a/src/test/run-pass/borrowck/borrowck-unused-mut-locals.rs b/src/test/run-pass/borrowck/borrowck-unused-mut-locals.rs index 8f0434c0e2..fd0e346e2b 100644 --- a/src/test/run-pass/borrowck/borrowck-unused-mut-locals.rs +++ b/src/test/run-pass/borrowck/borrowck-unused-mut-locals.rs @@ -1,5 +1,4 @@ // run-pass -#![feature(nll)] #![deny(unused_mut)] #[derive(Debug)] diff --git a/src/test/run-pass/borrowck/two-phase-baseline.rs b/src/test/run-pass/borrowck/two-phase-baseline.rs index aa8d183129..994dc823df 100644 --- a/src/test/run-pass/borrowck/two-phase-baseline.rs +++ b/src/test/run-pass/borrowck/two-phase-baseline.rs @@ -1,5 +1,4 @@ // run-pass -// compile-flags: -Z borrowck=mir -Z two-phase-borrows // This is the "goto example" for why we want two phase borrows. diff --git a/src/test/run-pass/borrowck/two-phase-bin-ops.rs b/src/test/run-pass/borrowck/two-phase-bin-ops.rs index 5e1d436e31..1242ae307d 100644 --- a/src/test/run-pass/borrowck/two-phase-bin-ops.rs +++ b/src/test/run-pass/borrowck/two-phase-bin-ops.rs @@ -1,8 +1,4 @@ // run-pass -// revisions: lxl nll - -#![cfg_attr(nll, feature(nll))] - use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign}; use std::ops::{BitAndAssign, BitOrAssign, BitXorAssign, ShlAssign, ShrAssign}; diff --git a/src/test/run-pass/borrowck/two-phase-control-flow-split-before-activation.rs b/src/test/run-pass/borrowck/two-phase-control-flow-split-before-activation.rs index 9759223a1b..0b20e1945e 100644 --- a/src/test/run-pass/borrowck/two-phase-control-flow-split-before-activation.rs +++ b/src/test/run-pass/borrowck/two-phase-control-flow-split-before-activation.rs @@ -1,8 +1,4 @@ // run-pass -// revisions: lxl nll -//[lxl]compile-flags: -Z borrowck=mir -Z two-phase-borrows - -#![cfg_attr(nll, feature(nll))] fn main() { let mut a = 0; diff --git a/src/test/run-pass/c-stack-returning-int64.rs b/src/test/run-pass/c-stack-returning-int64.rs index f376bb7fde..ec162b40bf 100644 --- a/src/test/run-pass/c-stack-returning-int64.rs +++ b/src/test/run-pass/c-stack-returning-int64.rs @@ -1,4 +1,5 @@ // ignore-wasm32-bare no libc to test with +// ignore-sgx no libc #![feature(rustc_private)] diff --git a/src/test/run-pass/cfg/cfg-family.rs b/src/test/run-pass/cfg/cfg-family.rs index 282ac4abce..9fb7c76692 100644 --- a/src/test/run-pass/cfg/cfg-family.rs +++ b/src/test/run-pass/cfg/cfg-family.rs @@ -2,6 +2,7 @@ // pretty-expanded FIXME #23616 // ignore-cloudabi no target_family // ignore-wasm32-bare no target_family +// ignore-sgx #[cfg(windows)] pub fn main() { diff --git a/src/test/run-pass/cfg/cfg-target-family.rs b/src/test/run-pass/cfg/cfg-target-family.rs index 2cd0ba5bf8..ecf802f728 100644 --- a/src/test/run-pass/cfg/cfg-target-family.rs +++ b/src/test/run-pass/cfg/cfg-target-family.rs @@ -1,6 +1,7 @@ // run-pass // ignore-cloudabi no target_family // ignore-wasm32-bare no target_family +// ignore-sgx // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/chalkify/builtin-copy-clone.rs b/src/test/run-pass/chalkify/builtin-copy-clone.rs new file mode 100644 index 0000000000..4f69714bc7 --- /dev/null +++ b/src/test/run-pass/chalkify/builtin-copy-clone.rs @@ -0,0 +1,43 @@ +// compile-flags: -Z chalk + +// Test that `Clone` is correctly implemented for builtin types. + +#[derive(Copy, Clone)] +struct S(i32); + +fn test_clone(arg: T) { + let _ = arg.clone(); +} + +fn test_copy(arg: T) { + let _ = arg; + let _ = arg; +} + +fn test_copy_clone(arg: T) { + test_copy(arg); + test_clone(arg); +} + +fn foo() { } + +fn main() { + test_copy_clone(foo); + let f: fn() = foo; + test_copy_clone(f); + // FIXME: add closures when they're considered WF + test_copy_clone([1; 56]); + test_copy_clone((1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)); + test_copy_clone((1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, true, 'a', 1.1)); + test_copy_clone(()); + test_copy_clone(((1, 1), (1, 1, 1), (1.1, 1, 1, 'a'), ())); + + let a = ( + (S(1), S(0)), + ( + (S(0), S(0), S(1)), + S(0) + ) + ); + test_copy_clone(a); +} diff --git a/src/test/run-pass/coherence/auxiliary/re_rebalance_coherence_lib.rs b/src/test/run-pass/coherence/auxiliary/re_rebalance_coherence_lib.rs index c8d027b25c..41b9d64d5f 100644 --- a/src/test/run-pass/coherence/auxiliary/re_rebalance_coherence_lib.rs +++ b/src/test/run-pass/coherence/auxiliary/re_rebalance_coherence_lib.rs @@ -1,5 +1,4 @@ - -pub trait Backend{} +pub trait Backend {} pub trait SupportsDefaultKeyword {} impl SupportsDefaultKeyword for Postgres {} diff --git a/src/test/run-pass/command-exec.rs b/src/test/run-pass/command-exec.rs index ab3d3ebbaa..aa5a3a3770 100644 --- a/src/test/run-pass/command-exec.rs +++ b/src/test/run-pass/command-exec.rs @@ -3,6 +3,7 @@ // ignore-pretty issue #37199 // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes #![feature(process_exec)] diff --git a/src/test/run-pass/command-pre-exec.rs b/src/test/run-pass/command-pre-exec.rs index 21783fedd3..5c3cc31de5 100644 --- a/src/test/run-pass/command-pre-exec.rs +++ b/src/test/run-pass/command-pre-exec.rs @@ -2,6 +2,7 @@ // ignore-windows - this is a unix-specific test // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes #![feature(process_exec, rustc_private)] extern crate libc; diff --git a/src/test/run-pass/const-needs_drop.rs b/src/test/run-pass/const-needs_drop.rs index 9d9dffb530..871300defa 100644 --- a/src/test/run-pass/const-needs_drop.rs +++ b/src/test/run-pass/const-needs_drop.rs @@ -1,5 +1,3 @@ -#![feature(const_needs_drop)] - use std::mem; struct Trivial(u8, f32); diff --git a/src/test/run-pass/consts/const-fn-feature-flags.rs b/src/test/run-pass/consts/const-fn-feature-flags.rs index 83a98f0f8e..30e7e102b8 100644 --- a/src/test/run-pass/consts/const-fn-feature-flags.rs +++ b/src/test/run-pass/consts/const-fn-feature-flags.rs @@ -11,4 +11,3 @@ fn main() { assert_eq!(CELL.get(), v); } - diff --git a/src/test/run-pass/consts/const-labeled-break.rs b/src/test/run-pass/consts/const-labeled-break.rs new file mode 100644 index 0000000000..9417159e6f --- /dev/null +++ b/src/test/run-pass/consts/const-labeled-break.rs @@ -0,0 +1,10 @@ +// Using labeled break in a while loop has caused an illegal instruction being +// generated, and an ICE later. +// +// See https://github.com/rust-lang/rust/issues/51350 for more information. + +const CRASH: () = 'a: while break 'a {}; + +fn main() { + println!("{:?}", CRASH); +} diff --git a/src/test/run-pass/consts/const-ptr-nonnull.rs b/src/test/run-pass/consts/const-ptr-nonnull.rs index 91624e92fb..c5b9d837b4 100644 --- a/src/test/run-pass/consts/const-ptr-nonnull.rs +++ b/src/test/run-pass/consts/const-ptr-nonnull.rs @@ -1,7 +1,5 @@ // run-pass -#![feature(const_ptr_nonnull)] - use std::ptr::NonNull; const DANGLING: NonNull = NonNull::dangling(); diff --git a/src/test/run-pass/core-run-destroy.rs b/src/test/run-pass/core-run-destroy.rs index 55d389952c..625e517938 100644 --- a/src/test/run-pass/core-run-destroy.rs +++ b/src/test/run-pass/core-run-destroy.rs @@ -5,6 +5,7 @@ // compile-flags:--test // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes // N.B., these tests kill child processes. Valgrind sees these children as leaking // memory, which makes for some *confusing* logs. That's why these are here diff --git a/src/test/run-pass/default-alloc-error-hook.rs b/src/test/run-pass/default-alloc-error-hook.rs index 8dcc8ad543..7d1624320e 100644 --- a/src/test/run-pass/default-alloc-error-hook.rs +++ b/src/test/run-pass/default-alloc-error-hook.rs @@ -1,5 +1,6 @@ // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes use std::alloc::{Layout, handle_alloc_error}; use std::env; diff --git a/src/test/run-pass/deriving/auxiliary/derive-no-std.rs b/src/test/run-pass/deriving/auxiliary/derive-no-std.rs index 21bfd5a290..3893dc1be0 100644 --- a/src/test/run-pass/deriving/auxiliary/derive-no-std.rs +++ b/src/test/run-pass/deriving/auxiliary/derive-no-std.rs @@ -27,4 +27,3 @@ pub struct Empty; #[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord, Debug, Copy)] pub struct AlsoEmpty {} - diff --git a/src/test/run-pass/deriving/derive-no-std.rs b/src/test/run-pass/deriving/derive-no-std.rs index 22edd3eed5..74c73b99cb 100644 --- a/src/test/run-pass/deriving/derive-no-std.rs +++ b/src/test/run-pass/deriving/derive-no-std.rs @@ -10,4 +10,3 @@ fn main() { assert!(Bar::Qux < Bar::Quux(42)); } - diff --git a/src/test/run-pass/discriminant_value-wrapper.rs b/src/test/run-pass/discriminant_value-wrapper.rs index f014cce9dd..1fb0d1eddd 100644 --- a/src/test/run-pass/discriminant_value-wrapper.rs +++ b/src/test/run-pass/discriminant_value-wrapper.rs @@ -13,4 +13,3 @@ pub fn main() { let _ = mem::discriminant(&10); let _ = mem::discriminant(&"test"); } - diff --git a/src/test/run-pass/dispatch_from_dyn_zst.rs b/src/test/run-pass/dispatch_from_dyn_zst.rs new file mode 100644 index 0000000000..a2181336e0 --- /dev/null +++ b/src/test/run-pass/dispatch_from_dyn_zst.rs @@ -0,0 +1,49 @@ +#![feature(unsize, dispatch_from_dyn, never_type)] + +#![allow(dead_code)] + +use std::{ + ops::DispatchFromDyn, + marker::{Unsize, PhantomData}, +}; + +struct Zst; +struct NestedZst(PhantomData<()>, Zst); + + +struct WithUnit(Box, ()); +impl DispatchFromDyn> for WithUnit + where T: Unsize {} + +struct WithPhantom(Box, PhantomData<()>); +impl DispatchFromDyn> for WithPhantom + where T: Unsize {} + +struct WithNever(Box, !); +impl DispatchFromDyn> for WithNever + where T: Unsize {} + +struct WithZst(Box, Zst); +impl DispatchFromDyn> for WithZst + where T: Unsize {} + +struct WithNestedZst(Box, NestedZst); +impl DispatchFromDyn> for WithNestedZst + where T: Unsize {} + + +struct Generic(Box, A); +impl DispatchFromDyn> for Generic + where T: Unsize {} +impl DispatchFromDyn>> + for Generic> + where T: Unsize {} +impl DispatchFromDyn> for Generic + where T: Unsize {} +impl DispatchFromDyn> for Generic + where T: Unsize {} +impl DispatchFromDyn> for Generic + where T: Unsize {} + + +fn main() {} diff --git a/src/test/run-pass/drop/dynamic-drop.rs b/src/test/run-pass/drop/dynamic-drop.rs index 97e4cded80..399b577dcc 100644 --- a/src/test/run-pass/drop/dynamic-drop.rs +++ b/src/test/run-pass/drop/dynamic-drop.rs @@ -1,8 +1,6 @@ // run-pass #![allow(unused_assignments)] #![allow(unused_variables)] -// revisions:lexical nll -#![cfg_attr(nll, feature(nll))] // ignore-wasm32-bare compiled with panic=abort by default diff --git a/src/test/run-pass/dupe-first-attr.rc b/src/test/run-pass/dupe-first-attr.rc index cb6a82a15d..8b7025b7be 100644 --- a/src/test/run-pass/dupe-first-attr.rc +++ b/src/test/run-pass/dupe-first-attr.rc @@ -18,9 +18,6 @@ mod hello; #[cfg(target_os = "dragonfly")] mod hello; -#[cfg(target_os = "bitrig")] -mod hello; - #[cfg(target_os = "android")] mod hello; diff --git a/src/test/run-pass/env-args-reverse-iterator.rs b/src/test/run-pass/env-args-reverse-iterator.rs index 78548fd9bc..d677aa8500 100644 --- a/src/test/run-pass/env-args-reverse-iterator.rs +++ b/src/test/run-pass/env-args-reverse-iterator.rs @@ -1,5 +1,6 @@ // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes use std::env::args; use std::process::Command; diff --git a/src/test/run-pass/env-funky-keys.rs b/src/test/run-pass/env-funky-keys.rs index 79f32bd6c2..3b236e2b3a 100644 --- a/src/test/run-pass/env-funky-keys.rs +++ b/src/test/run-pass/env-funky-keys.rs @@ -4,6 +4,7 @@ // ignore-windows // ignore-cloudabi no execve // ignore-emscripten no execve +// ignore-sgx no execve // no-prefer-dynamic #![feature(rustc_private)] diff --git a/src/test/run-pass/env-home-dir.rs b/src/test/run-pass/env-home-dir.rs index 90b7534473..62f45d0a2e 100644 --- a/src/test/run-pass/env-home-dir.rs +++ b/src/test/run-pass/env-home-dir.rs @@ -2,6 +2,7 @@ #![allow(deprecated)] // ignore-cloudabi no environment variables present // ignore-emscripten env vars don't work? +// ignore-sgx env vars cannot be modified use std::env::*; use std::path::PathBuf; diff --git a/src/test/run-pass/exec-env.rs b/src/test/run-pass/exec-env.rs index 1327b558fc..c1b8e08251 100644 --- a/src/test/run-pass/exec-env.rs +++ b/src/test/run-pass/exec-env.rs @@ -1,6 +1,7 @@ // exec-env:TEST_EXEC_ENV=22 // ignore-cloudabi no env vars // ignore-emscripten FIXME: issue #31622 +// ignore-sgx unsupported use std::env; diff --git a/src/test/run-pass/existential_type.rs b/src/test/run-pass/existential_type.rs index dfb195ec83..b36435cf11 100644 --- a/src/test/run-pass/existential_type.rs +++ b/src/test/run-pass/existential_type.rs @@ -68,14 +68,14 @@ fn my_other_iter(u: U) -> MyOtherIter { } trait Trait {} -existential type GenericBound<'a, T: Trait>: 'a; +existential type GenericBound<'a, T: Trait>: Sized + 'a; fn generic_bound<'a, T: Trait + 'a>(t: T) -> GenericBound<'a, T> { t } mod pass_through { - pub existential type Passthrough: 'static; + pub existential type Passthrough: Sized + 'static; fn define_passthrough(t: T) -> Passthrough { t diff --git a/src/test/run-pass/extern/extern-prelude-core.rs b/src/test/run-pass/extern/extern-prelude-core.rs index a5d31009f9..f0d43404b0 100644 --- a/src/test/run-pass/extern/extern-prelude-core.rs +++ b/src/test/run-pass/extern/extern-prelude-core.rs @@ -1,5 +1,5 @@ // run-pass -#![feature(extern_prelude, lang_items, start, alloc)] +#![feature(extern_prelude, lang_items, start)] #![no_std] extern crate std as other; diff --git a/src/test/run-pass/extern/extern-prelude-core.stderr b/src/test/run-pass/extern/extern-prelude-core.stderr index 417483af70..8d2a0b7425 100644 --- a/src/test/run-pass/extern/extern-prelude-core.stderr +++ b/src/test/run-pass/extern/extern-prelude-core.stderr @@ -1,7 +1,7 @@ warning: the feature `extern_prelude` has been stable since 1.30.0 and no longer requires an attribute to enable --> $DIR/extern-prelude-core.rs:2:12 | -LL | #![feature(extern_prelude, lang_items, start, alloc)] +LL | #![feature(extern_prelude, lang_items, start)] | ^^^^^^^^^^^^^^ | = note: #[warn(stable_features)] on by default diff --git a/src/test/run-pass/fat-lto.rs b/src/test/run-pass/fat-lto.rs index 7e50b44430..fb741200d3 100644 --- a/src/test/run-pass/fat-lto.rs +++ b/src/test/run-pass/fat-lto.rs @@ -4,4 +4,3 @@ fn main() { println!("hello!"); } - diff --git a/src/test/run-pass/fds-are-cloexec.rs b/src/test/run-pass/fds-are-cloexec.rs index 3bc0ceb5cf..c4091f84af 100644 --- a/src/test/run-pass/fds-are-cloexec.rs +++ b/src/test/run-pass/fds-are-cloexec.rs @@ -3,6 +3,7 @@ // ignore-cloudabi no processes // ignore-emscripten no processes // ignore-haiku +// ignore-sgx no processes #![feature(rustc_private)] diff --git a/src/test/run-pass/for-loop-while/for-loop-no-std.rs b/src/test/run-pass/for-loop-while/for-loop-no-std.rs index 877429f5d3..65a33c5f16 100644 --- a/src/test/run-pass/for-loop-while/for-loop-no-std.rs +++ b/src/test/run-pass/for-loop-while/for-loop-no-std.rs @@ -1,6 +1,6 @@ // run-pass #![allow(unused_imports)] -#![feature(lang_items, start, alloc)] +#![feature(lang_items, start)] #![no_std] extern crate std as other; diff --git a/src/test/run-pass/foreign/foreign-fn-linkname.rs b/src/test/run-pass/foreign/foreign-fn-linkname.rs index 5ed8d19bc5..1f04815906 100644 --- a/src/test/run-pass/foreign/foreign-fn-linkname.rs +++ b/src/test/run-pass/foreign/foreign-fn-linkname.rs @@ -1,5 +1,6 @@ // run-pass // ignore-wasm32-bare no libc to test ffi with +// ignore-sgx no libc #![feature(rustc_private)] diff --git a/src/test/run-pass/format-no-std.rs b/src/test/run-pass/format-no-std.rs index 0f3a5c277b..32f7a4a07c 100644 --- a/src/test/run-pass/format-no-std.rs +++ b/src/test/run-pass/format-no-std.rs @@ -1,6 +1,6 @@ // ignore-emscripten no no_std executables -#![feature(lang_items, start, alloc)] +#![feature(lang_items, start)] #![no_std] extern crate std as other; diff --git a/src/test/run-pass/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs b/src/test/run-pass/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs index fb0bc3c436..6d5a9876c3 100644 --- a/src/test/run-pass/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs +++ b/src/test/run-pass/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs @@ -12,7 +12,7 @@ fn expect_free_supply_free<'x>(x: &'x u32) { x.push(22_u32); // ...since we now know the type of `y` and can resolve the method call. - y.wrapping_add(1); + let _ = y.wrapping_add(1); }); } diff --git a/src/test/run-pass/functions-closures/parallel-codegen-closures.rs b/src/test/run-pass/functions-closures/parallel-codegen-closures.rs index 921fbaf494..79759daba5 100644 --- a/src/test/run-pass/functions-closures/parallel-codegen-closures.rs +++ b/src/test/run-pass/functions-closures/parallel-codegen-closures.rs @@ -6,7 +6,6 @@ // Tests parallel codegen - this can fail if the symbol for the anonymous // closure in `sum` pollutes the second codegen unit from the first. -// ignore-bitrig // compile-flags: -C codegen_units=2 #![feature(iter_arith)] diff --git a/src/test/run-pass/futures-api.rs b/src/test/run-pass/futures-api.rs index 5d0b0db510..ee77053fd5 100644 --- a/src/test/run-pass/futures-api.rs +++ b/src/test/run-pass/futures-api.rs @@ -1,7 +1,5 @@ // aux-build:arc_wake.rs -#![feature(futures_api)] - extern crate arc_wake; use std::future::Future; @@ -20,7 +18,10 @@ struct Counter { } impl ArcWake for Counter { - fn wake(arc_self: &Arc) { + fn wake(self: Arc) { + Self::wake_by_ref(&self) + } + fn wake_by_ref(arc_self: &Arc) { arc_self.wakes.fetch_add(1, atomic::Ordering::SeqCst); } } @@ -32,8 +33,8 @@ impl Future for MyFuture { fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { // Wake twice let waker = cx.waker(); - waker.wake(); - waker.wake(); + waker.wake_by_ref(); + waker.wake_by_ref(); Poll::Ready(()) } } diff --git a/src/test/run-pass/generator/issue-59972.rs b/src/test/run-pass/generator/issue-59972.rs new file mode 100644 index 0000000000..995da4fb3f --- /dev/null +++ b/src/test/run-pass/generator/issue-59972.rs @@ -0,0 +1,23 @@ +// compile-flags: --edition=2018 + +#![feature(async_await, await_macro)] + +pub enum Uninhabited { } + +fn uninhabited_async() -> Uninhabited { + unreachable!() +} + +async fn noop() { } + +#[allow(unused)] +async fn contains_never() { + let error = uninhabited_async(); + await!(noop()); + let error2 = error; +} + +#[allow(unused_must_use)] +fn main() { + contains_never(); +} diff --git a/src/test/run-pass/generator/yield-subtype.rs b/src/test/run-pass/generator/yield-subtype.rs index c38524857b..fe88d424dd 100644 --- a/src/test/run-pass/generator/yield-subtype.rs +++ b/src/test/run-pass/generator/yield-subtype.rs @@ -2,9 +2,6 @@ #![allow(dead_code)] #![allow(dead_code)] -// revisions:lexical nll -#![cfg_attr(nll, feature(nll))] - #![feature(generators)] fn bar<'a>() { diff --git a/src/test/run-pass/if-ret.stderr b/src/test/run-pass/if-ret.stderr new file mode 100644 index 0000000000..a64281833e --- /dev/null +++ b/src/test/run-pass/if-ret.stderr @@ -0,0 +1,8 @@ +warning: unreachable block in `if` expression + --> $DIR/if-ret.rs:4:24 + | +LL | fn foo() { if (return) { } } + | ^^^ + | + = note: #[warn(unreachable_code)] on by default + diff --git a/src/test/run-pass/impl-for-never.rs b/src/test/run-pass/impl-for-never.rs index d2dbae6176..a528712300 100644 --- a/src/test/run-pass/impl-for-never.rs +++ b/src/test/run-pass/impl-for-never.rs @@ -23,4 +23,3 @@ fn main() { println!("! is {}", ::stringify_type()); println!("None is {}", maybe_stringify(None::)); } - diff --git a/src/test/run-pass/impl-trait-in-bindings.rs b/src/test/run-pass/impl-trait-in-bindings.rs index 9a1f53b489..1e3a641b7c 100644 --- a/src/test/run-pass/impl-trait-in-bindings.rs +++ b/src/test/run-pass/impl-trait-in-bindings.rs @@ -1,4 +1,5 @@ #![feature(impl_trait_in_bindings)] +//~^ WARN the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash use std::fmt::Debug; diff --git a/src/test/run-pass/impl-trait-in-bindings.stderr b/src/test/run-pass/impl-trait-in-bindings.stderr new file mode 100644 index 0000000000..4896deb9d5 --- /dev/null +++ b/src/test/run-pass/impl-trait-in-bindings.stderr @@ -0,0 +1,6 @@ +warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash + --> $DIR/impl-trait-in-bindings.rs:1:12 + | +LL | #![feature(impl_trait_in_bindings)] + | ^^^^^^^^^^^^^^^^^^^^^^ + diff --git a/src/test/run-pass/impl-trait/example-calendar.rs b/src/test/run-pass/impl-trait/example-calendar.rs index cd3d48f1a0..968e9b7d34 100644 --- a/src/test/run-pass/impl-trait/example-calendar.rs +++ b/src/test/run-pass/impl-trait/example-calendar.rs @@ -1,8 +1,5 @@ // run-pass -// revisions: normal nll -//[nll] compile-flags:-Zborrowck=mir - #![feature(fn_traits, step_trait, unboxed_closures, diff --git a/src/test/run-pass/impl-trait/lifetimes.rs b/src/test/run-pass/impl-trait/lifetimes.rs index 5a21e1dd81..9a9843375e 100644 --- a/src/test/run-pass/impl-trait/lifetimes.rs +++ b/src/test/run-pass/impl-trait/lifetimes.rs @@ -1,6 +1,7 @@ // run-pass #![allow(warnings)] +#![feature(generators)] use std::fmt::Debug; @@ -112,6 +113,11 @@ impl<'unnecessary_lifetime> MyVec { fn iter_doesnt_capture_unnecessary_lifetime<'s>(&'s self) -> impl Iterator { self.0.iter().flat_map(|inner_vec| inner_vec.iter()) } + + fn generator_doesnt_capture_unnecessary_lifetime<'s: 's>() -> impl Sized { + || yield + } } + fn main() {} diff --git a/src/test/run-pass/inc-range-pat.rs b/src/test/run-pass/inc-range-pat.rs index 6b99a9d0a7..6bf857a11f 100644 --- a/src/test/run-pass/inc-range-pat.rs +++ b/src/test/run-pass/inc-range-pat.rs @@ -7,4 +7,3 @@ fn main() { assert!(match 'x' { 'a' ... 'z' => true, _ => false }); assert!(match 'x' { 'a' ..= 'z' => true, _ => false }); } - diff --git a/src/test/run-pass/inherit-env.rs b/src/test/run-pass/inherit-env.rs index 856d3a5f72..229953f1b1 100644 --- a/src/test/run-pass/inherit-env.rs +++ b/src/test/run-pass/inherit-env.rs @@ -1,5 +1,6 @@ // ignore-emscripten // ignore-wasm32 +// ignore-sgx no processes use std::env; use std::process::Command; @@ -22,4 +23,3 @@ fn main() { k, v, output); } } - diff --git a/src/test/run-pass/intrinsics/intrinsic-alignment.rs b/src/test/run-pass/intrinsics/intrinsic-alignment.rs index 19e5671062..6a67d04a54 100644 --- a/src/test/run-pass/intrinsics/intrinsic-alignment.rs +++ b/src/test/run-pass/intrinsics/intrinsic-alignment.rs @@ -40,7 +40,7 @@ mod m { } } -#[cfg(target_os = "bitrig")] +#[cfg(target_env = "sgx")] mod m { #[main] #[cfg(target_arch = "x86_64")] diff --git a/src/test/run-pass/invalid_const_promotion.rs b/src/test/run-pass/invalid_const_promotion.rs index 2775aac015..ddf4dc4242 100644 --- a/src/test/run-pass/invalid_const_promotion.rs +++ b/src/test/run-pass/invalid_const_promotion.rs @@ -1,6 +1,7 @@ #![allow(unused_mut)] // ignore-wasm32 // ignore-emscripten +// ignore-sgx no processes // compile-flags: -C debug_assertions=yes diff --git a/src/test/run-pass/issue-55809.rs b/src/test/run-pass/issue-55809.rs index 86b0977beb..b7e60b773b 100644 --- a/src/test/run-pass/issue-55809.rs +++ b/src/test/run-pass/issue-55809.rs @@ -1,7 +1,7 @@ // edition:2018 // run-pass -#![feature(async_await, await_macro, futures_api)] +#![feature(async_await)] trait Foo { } @@ -14,15 +14,15 @@ async fn foo_async(_v: T) -> u8 where T: Foo { } async fn bad(v: T) -> u8 where T: Foo { - await!(foo_async(v)) + foo_async(v).await } async fn async_main() { let mut v = (); - let _ = await!(bad(&mut v)); - let _ = await!(foo_async(&mut v)); - let _ = await!(bad(v)); + let _ = bad(&mut v).await; + let _ = foo_async(&mut v).await; + let _ = bad(v).await; } fn main() { diff --git a/src/test/run-pass/issue-59020.rs b/src/test/run-pass/issue-59020.rs index a2b11764a2..e7544934da 100644 --- a/src/test/run-pass/issue-59020.rs +++ b/src/test/run-pass/issue-59020.rs @@ -1,6 +1,7 @@ // edition:2018 // run-pass // ignore-emscripten no threads support +// ignore-sgx no thread sleep support use std::thread; use std::time::Duration; diff --git a/src/test/run-pass/issues/auxiliary/issue-17718-aux.rs b/src/test/run-pass/issues/auxiliary/issue-17718-aux.rs index 1cba9709f9..91abdbff86 100644 --- a/src/test/run-pass/issues/auxiliary/issue-17718-aux.rs +++ b/src/test/run-pass/issues/auxiliary/issue-17718-aux.rs @@ -8,4 +8,3 @@ pub const C5: &'static usize = &C4; pub static S1: usize = 3; pub static S2: atomic::AtomicUsize = atomic::AtomicUsize::new(0); - diff --git a/src/test/run-pass/issues/issue-10626.rs b/src/test/run-pass/issues/issue-10626.rs index 9c10fd2cea..78fa8b7c6f 100644 --- a/src/test/run-pass/issues/issue-10626.rs +++ b/src/test/run-pass/issues/issue-10626.rs @@ -1,6 +1,7 @@ // run-pass // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes // Make sure that if a process doesn't have its stdio/stderr descriptors set up // that we don't die in a large ball of fire diff --git a/src/test/run-pass/issues/issue-12133-3.rs b/src/test/run-pass/issues/issue-12133-3.rs index c87a37ab6b..c8aa9bf464 100644 --- a/src/test/run-pass/issues/issue-12133-3.rs +++ b/src/test/run-pass/issues/issue-12133-3.rs @@ -5,6 +5,7 @@ // ignore-cloudabi no dylib support // ignore-emscripten no dylib support // ignore-musl +// ignore-sgx no dylib support // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/issues/issue-12699.rs b/src/test/run-pass/issues/issue-12699.rs index b23853074f..e26c2d7cde 100644 --- a/src/test/run-pass/issues/issue-12699.rs +++ b/src/test/run-pass/issues/issue-12699.rs @@ -1,5 +1,6 @@ // run-pass // ignore-wasm32-bare can't block the thread +// ignore-sgx not supported #![allow(deprecated)] use std::thread; diff --git a/src/test/run-pass/issues/issue-13304.rs b/src/test/run-pass/issues/issue-13304.rs index cd74ce38de..5698536ab5 100644 --- a/src/test/run-pass/issues/issue-13304.rs +++ b/src/test/run-pass/issues/issue-13304.rs @@ -2,6 +2,7 @@ #![allow(unused_mut)] // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes use std::env; use std::io::prelude::*; diff --git a/src/test/run-pass/issues/issue-13494.rs b/src/test/run-pass/issues/issue-13494.rs deleted file mode 100644 index 12be97702a..0000000000 --- a/src/test/run-pass/issues/issue-13494.rs +++ /dev/null @@ -1,35 +0,0 @@ -// run-pass -#![allow(unused_must_use)] -// ignore-emscripten no threads support - -// This test may not always fail, but it can be flaky if the race it used to -// expose is still present. - -#![feature(mpsc_select)] -#![allow(deprecated)] - -use std::sync::mpsc::{channel, Sender, Receiver}; -use std::thread; - -fn helper(rx: Receiver>) { - for tx in rx.iter() { - let _ = tx.send(()); - } -} - -fn main() { - let (tx, rx) = channel(); - let t = thread::spawn(move|| { helper(rx) }); - let (snd, rcv) = channel::(); - for _ in 1..100000 { - snd.send(1).unwrap(); - let (tx2, rx2) = channel(); - tx.send(tx2).unwrap(); - select! { - _ = rx2.recv() => (), - _ = rcv.recv() => () - } - } - drop(tx); - t.join(); -} diff --git a/src/test/run-pass/issues/issue-14456.rs b/src/test/run-pass/issues/issue-14456.rs index 23347d3517..164d7ef8af 100644 --- a/src/test/run-pass/issues/issue-14456.rs +++ b/src/test/run-pass/issues/issue-14456.rs @@ -2,6 +2,7 @@ #![allow(unused_mut)] // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes use std::env; use std::io::prelude::*; diff --git a/src/test/run-pass/issues/issue-14940.rs b/src/test/run-pass/issues/issue-14940.rs index ce47a623f0..785ad6a2c4 100644 --- a/src/test/run-pass/issues/issue-14940.rs +++ b/src/test/run-pass/issues/issue-14940.rs @@ -1,6 +1,7 @@ // run-pass // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes use std::env; use std::process::Command; diff --git a/src/test/run-pass/issues/issue-16272.rs b/src/test/run-pass/issues/issue-16272.rs index a2570e763f..3ba2483f43 100644 --- a/src/test/run-pass/issues/issue-16272.rs +++ b/src/test/run-pass/issues/issue-16272.rs @@ -1,6 +1,7 @@ // run-pass // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes use std::process::Command; use std::env; diff --git a/src/test/run-pass/issues/issue-16278.rs b/src/test/run-pass/issues/issue-16278.rs index a9fa0db44d..2f47b694ae 100644 --- a/src/test/run-pass/issues/issue-16278.rs +++ b/src/test/run-pass/issues/issue-16278.rs @@ -8,4 +8,3 @@ fn main() {assert_eq!(b"", b"\ assert_eq!(b"\n", b" "); } - diff --git a/src/test/run-pass/issues/issue-16671.rs b/src/test/run-pass/issues/issue-16671.rs index 81a6b669b7..eff8e275bb 100644 --- a/src/test/run-pass/issues/issue-16671.rs +++ b/src/test/run-pass/issues/issue-16671.rs @@ -1,5 +1,4 @@ // run-pass -//compile-flags: -Z borrowck=compare #![deny(warnings)] diff --git a/src/test/run-pass/issues/issue-18075.rs b/src/test/run-pass/issues/issue-18075.rs index dcd67d8d15..ee6845c127 100644 --- a/src/test/run-pass/issues/issue-18075.rs +++ b/src/test/run-pass/issues/issue-18075.rs @@ -1,5 +1,5 @@ // run-pass -// exec-env:RUST_LOG=rustc::middle=debug +// exec-env:RUSTC_LOG=rustc::middle=debug fn main() { let b = 1isize; diff --git a/src/test/run-pass/issues/issue-18353.rs b/src/test/run-pass/issues/issue-18353.rs index aaa896b66c..3d15c9980c 100644 --- a/src/test/run-pass/issues/issue-18353.rs +++ b/src/test/run-pass/issues/issue-18353.rs @@ -11,5 +11,5 @@ struct Str { fn main() { let str: Option<&Str> = None; - str.is_some(); + let _ = str.is_some(); } diff --git a/src/test/run-pass/issues/issue-21400.rs b/src/test/run-pass/issues/issue-21400.rs index 0f297e9b8f..4a85158d97 100644 --- a/src/test/run-pass/issues/issue-21400.rs +++ b/src/test/run-pass/issues/issue-21400.rs @@ -54,4 +54,3 @@ impl GitConnect { Ok(out) } } - diff --git a/src/test/run-pass/issues/issue-2214.rs b/src/test/run-pass/issues/issue-2214.rs index 6e538f711d..22f33545cb 100644 --- a/src/test/run-pass/issues/issue-2214.rs +++ b/src/test/run-pass/issues/issue-2214.rs @@ -1,6 +1,6 @@ // run-pass // ignore-wasm32-bare no libc to test ffi with - +// ignore-sgx no libc #![feature(rustc_private)] extern crate libc; diff --git a/src/test/run-pass/issues/issue-23699.rs b/src/test/run-pass/issues/issue-23699.rs index 11b65d7a67..952548837e 100644 --- a/src/test/run-pass/issues/issue-23699.rs +++ b/src/test/run-pass/issues/issue-23699.rs @@ -12,4 +12,3 @@ fn main() { let t = test as fn (i32); t(0i32); } - diff --git a/src/test/run-pass/issues/issue-24313.rs b/src/test/run-pass/issues/issue-24313.rs index d6426361fa..2c420dc056 100644 --- a/src/test/run-pass/issues/issue-24313.rs +++ b/src/test/run-pass/issues/issue-24313.rs @@ -1,6 +1,7 @@ // run-pass // ignore-cloudabi no processes // ignore-emscripten no threads +// ignore-sgx no processes use std::thread; use std::env; @@ -30,4 +31,3 @@ fn main() { }).join().unwrap(); } } - diff --git a/src/test/run-pass/issues/issue-24535-allow-mutable-borrow-in-match-guard.rs b/src/test/run-pass/issues/issue-24535-allow-mutable-borrow-in-match-guard.rs index 68f7dfd38f..48362d0bb6 100644 --- a/src/test/run-pass/issues/issue-24535-allow-mutable-borrow-in-match-guard.rs +++ b/src/test/run-pass/issues/issue-24535-allow-mutable-borrow-in-match-guard.rs @@ -5,7 +5,6 @@ // See further discussion on rust-lang/rust#24535, // rust-lang/rfcs#1006, and rust-lang/rfcs#107 -#![feature(nll)] #![feature(bind_by_move_pattern_guards)] fn main() { diff --git a/src/test/run-pass/issues/issue-24687-embed-debuginfo/auxiliary/issue-24687-lib.rs b/src/test/run-pass/issues/issue-24687-embed-debuginfo/auxiliary/issue-24687-lib.rs index 2275a8da69..5b1b1389ce 100644 --- a/src/test/run-pass/issues/issue-24687-embed-debuginfo/auxiliary/issue-24687-lib.rs +++ b/src/test/run-pass/issues/issue-24687-embed-debuginfo/auxiliary/issue-24687-lib.rs @@ -8,4 +8,3 @@ mod issue_24687_mbcs_in_comments; pub use issue_24687_mbcs_in_comments::D; - diff --git a/src/test/run-pass/issues/issue-26873-multifile/A/B.rs b/src/test/run-pass/issues/issue-26873-multifile/A/B.rs index d1b802ff3c..ab7b0d8160 100644 --- a/src/test/run-pass/issues/issue-26873-multifile/A/B.rs +++ b/src/test/run-pass/issues/issue-26873-multifile/A/B.rs @@ -2,4 +2,3 @@ use super::*; pub struct S; - diff --git a/src/test/run-pass/issues/issue-26873-multifile/A/C.rs b/src/test/run-pass/issues/issue-26873-multifile/A/C.rs index 88f3eb04af..b287283df5 100644 --- a/src/test/run-pass/issues/issue-26873-multifile/A/C.rs +++ b/src/test/run-pass/issues/issue-26873-multifile/A/C.rs @@ -4,4 +4,3 @@ use super::*; use super::B::S; pub struct T { i: i32 } - diff --git a/src/test/run-pass/issues/issue-26873-multifile/A/mod.rs b/src/test/run-pass/issues/issue-26873-multifile/A/mod.rs index 20f40a0678..0f18772bf1 100644 --- a/src/test/run-pass/issues/issue-26873-multifile/A/mod.rs +++ b/src/test/run-pass/issues/issue-26873-multifile/A/mod.rs @@ -3,4 +3,3 @@ pub mod B; pub mod C; pub use self::C::T; - diff --git a/src/test/run-pass/issues/issue-26873-multifile/mod.rs b/src/test/run-pass/issues/issue-26873-multifile/mod.rs index 52deea79a2..a1ba53f919 100644 --- a/src/test/run-pass/issues/issue-26873-multifile/mod.rs +++ b/src/test/run-pass/issues/issue-26873-multifile/mod.rs @@ -2,4 +2,3 @@ mod A; use self::A::*; - diff --git a/src/test/run-pass/issues/issue-26873-onefile.rs b/src/test/run-pass/issues/issue-26873-onefile.rs index 4cfffb08e8..f06c6499eb 100644 --- a/src/test/run-pass/issues/issue-26873-onefile.rs +++ b/src/test/run-pass/issues/issue-26873-onefile.rs @@ -23,4 +23,3 @@ mod A { use A::*; fn main() {} - diff --git a/src/test/run-pass/issues/issue-26905.rs b/src/test/run-pass/issues/issue-26905.rs index 309e2f7e57..2f500d1c0d 100644 --- a/src/test/run-pass/issues/issue-26905.rs +++ b/src/test/run-pass/issues/issue-26905.rs @@ -19,4 +19,3 @@ fn main() { let x = MyRc { _ptr: &iter, _boo: PhantomData }; let _y: MyRc> = x; } - diff --git a/src/test/run-pass/issues/issue-26996.rs b/src/test/run-pass/issues/issue-26996.rs index 8c5d244178..04382be27d 100644 --- a/src/test/run-pass/issues/issue-26996.rs +++ b/src/test/run-pass/issues/issue-26996.rs @@ -2,9 +2,9 @@ // This test is bogus (i.e., should be compile-fail) during the period // where #54986 is implemented and #54987 is *not* implemented. For -// now: just ignore it under nll +// now: just ignore it // -// ignore-compare-mode-nll +// ignore-test // This test is checking that the write to `c.0` (which has been moved out of) // won't overwrite the state in `c2`. diff --git a/src/test/run-pass/issues/issue-27021.rs b/src/test/run-pass/issues/issue-27021.rs index ecb065b196..3055137545 100644 --- a/src/test/run-pass/issues/issue-27021.rs +++ b/src/test/run-pass/issues/issue-27021.rs @@ -2,9 +2,9 @@ // This test is bogus (i.e., should be compile-fail) during the period // where #54986 is implemented and #54987 is *not* implemented. For -// now: just ignore it under nll +// now: just ignore it // -// ignore-compare-mode-nll +// ignore-test // These are variants of issue-26996.rs. In all cases we are writing // into a record field that has been moved out of, and ensuring that diff --git a/src/test/run-pass/issues/issue-28498-must-work-ex2.rs b/src/test/run-pass/issues/issue-28498-must-work-ex2.rs index 1711130855..cadf62461f 100644 --- a/src/test/run-pass/issues/issue-28498-must-work-ex2.rs +++ b/src/test/run-pass/issues/issue-28498-must-work-ex2.rs @@ -18,4 +18,3 @@ fn main() { foo.data[0].1.set(Some(&foo.data[1])); foo.data[1].1.set(Some(&foo.data[0])); } - diff --git a/src/test/run-pass/issues/issue-28498-ugeh-ex1.rs b/src/test/run-pass/issues/issue-28498-ugeh-ex1.rs index 65d5588871..c4f249c45f 100644 --- a/src/test/run-pass/issues/issue-28498-ugeh-ex1.rs +++ b/src/test/run-pass/issues/issue-28498-ugeh-ex1.rs @@ -27,4 +27,3 @@ fn main() { foo.data[0].1.set(Some(&foo.data[1])); foo.data[1].1.set(Some(&foo.data[0])); } - diff --git a/src/test/run-pass/issues/issue-29466.rs b/src/test/run-pass/issues/issue-29466.rs index e28185bc3a..f8785a6321 100644 --- a/src/test/run-pass/issues/issue-29466.rs +++ b/src/test/run-pass/issues/issue-29466.rs @@ -1,5 +1,9 @@ +// ignore-tidy-filelength +// // run-pass + #![allow(unused_variables)] + macro_rules! m( ($e1:expr => $e2:expr) => ({ $e1 }) ); diff --git a/src/test/run-pass/issues/issue-30371.rs b/src/test/run-pass/issues/issue-30371.rs index 093d4b8c11..58521b95cf 100644 --- a/src/test/run-pass/issues/issue-30371.rs +++ b/src/test/run-pass/issues/issue-30371.rs @@ -8,4 +8,3 @@ fn main() { () => Some(0), } {} } - diff --git a/src/test/run-pass/issues/issue-30490.rs b/src/test/run-pass/issues/issue-30490.rs index 231d41cd86..76e7224688 100644 --- a/src/test/run-pass/issues/issue-30490.rs +++ b/src/test/run-pass/issues/issue-30490.rs @@ -1,6 +1,7 @@ // run-pass // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes // Previously libstd would set stdio descriptors of a child process // by `dup`ing the requested descriptors to inherit directly into the diff --git a/src/test/run-pass/issues/issue-33770.rs b/src/test/run-pass/issues/issue-33770.rs index 7962509003..39ae009c99 100644 --- a/src/test/run-pass/issues/issue-33770.rs +++ b/src/test/run-pass/issues/issue-33770.rs @@ -1,6 +1,7 @@ // run-pass // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes use std::process::{Command, Stdio}; use std::env; diff --git a/src/test/run-pass/issues/issue-34784.rs b/src/test/run-pass/issues/issue-34784.rs index 4392637c39..d3206e9943 100644 --- a/src/test/run-pass/issues/issue-34784.rs +++ b/src/test/run-pass/issues/issue-34784.rs @@ -17,4 +17,3 @@ fn main() { _ => {} } } - diff --git a/src/test/run-pass/issues/issue-39709.rs b/src/test/run-pass/issues/issue-39709.rs index 8ea49c2082..69ef2700ef 100644 --- a/src/test/run-pass/issues/issue-39709.rs +++ b/src/test/run-pass/issues/issue-39709.rs @@ -3,4 +3,3 @@ fn main() { println!("{}", { macro_rules! x { ($(t:tt)*) => {} } 33 }); } - diff --git a/src/test/run-pass/issues/issue-42453.rs b/src/test/run-pass/issues/issue-42453.rs index bea441c2be..92fefceabc 100644 --- a/src/test/run-pass/issues/issue-42453.rs +++ b/src/test/run-pass/issues/issue-42453.rs @@ -8,4 +8,3 @@ struct builder; fn main() { } - diff --git a/src/test/run-pass/issues/issue-48962.rs b/src/test/run-pass/issues/issue-48962.rs index 7c64478983..80d815379b 100644 --- a/src/test/run-pass/issues/issue-48962.rs +++ b/src/test/run-pass/issues/issue-48962.rs @@ -1,7 +1,6 @@ // run-pass #![allow(unused_must_use)] // Test that we are able to reinitialize box with moved referent -#![feature(nll)] static mut ORDER: [usize; 3] = [0, 0, 0]; static mut INDEX: usize = 0; diff --git a/src/test/run-pass/issues/issue-49298.rs b/src/test/run-pass/issues/issue-49298.rs index 56443f4102..697a160b4e 100644 --- a/src/test/run-pass/issues/issue-49298.rs +++ b/src/test/run-pass/issues/issue-49298.rs @@ -4,9 +4,9 @@ // This test is bogus (i.e., should be compile-fail) during the period // where #54986 is implemented and #54987 is *not* implemented. For -// now: just ignore it under nll +// now: just ignore it // -// ignore-compare-mode-nll +// ignore-test // This test is checking that the space allocated for `x.1` does not // overlap with `y`. (The reason why such a thing happened at one diff --git a/src/test/run-pass/issues/issue-49955.rs b/src/test/run-pass/issues/issue-49955.rs index aa114ec0c1..f2f3ebff2d 100644 --- a/src/test/run-pass/issues/issue-49955.rs +++ b/src/test/run-pass/issues/issue-49955.rs @@ -1,5 +1,4 @@ // run-pass -// compile-flags: -Z borrowck=compare const ALL_THE_NUMS: [u32; 1] = [ 1 diff --git a/src/test/run-pass/issues/issue-51345.rs b/src/test/run-pass/issues/issue-51345.rs index 29a0a32850..15571e8bf5 100644 --- a/src/test/run-pass/issues/issue-51345.rs +++ b/src/test/run-pass/issues/issue-51345.rs @@ -1,6 +1,5 @@ // run-pass #![allow(unreachable_code)] -#![feature(nll)] fn main() { let mut v = Vec::new(); diff --git a/src/test/run-pass/issues/issue-8860.rs b/src/test/run-pass/issues/issue-8860.rs index 7925ef3b5d..b89a80c130 100644 --- a/src/test/run-pass/issues/issue-8860.rs +++ b/src/test/run-pass/issues/issue-8860.rs @@ -1,6 +1,5 @@ // run-pass #![allow(dead_code)] -// compile-flags: -Z borrowck=compare static mut DROP: isize = 0; static mut DROP_S: isize = 0; diff --git a/src/test/run-pass/issues/issue-9396.rs b/src/test/run-pass/issues/issue-9396.rs index 3e7e9a51cd..27b5185377 100644 --- a/src/test/run-pass/issues/issue-9396.rs +++ b/src/test/run-pass/issues/issue-9396.rs @@ -2,6 +2,7 @@ #![allow(unused_must_use)] #![allow(deprecated)] // ignore-emscripten no threads support +// ignore-sgx no thread sleep support use std::sync::mpsc::{TryRecvError, channel}; use std::thread; diff --git a/src/test/run-pass/link-cfg-works.rs b/src/test/run-pass/link-cfg-works.rs index a4888292c7..d7a248fd4d 100644 --- a/src/test/run-pass/link-cfg-works.rs +++ b/src/test/run-pass/link-cfg-works.rs @@ -10,4 +10,3 @@ extern crate link_cfg_works_transitive_dylib; extern {} fn main() {} - diff --git a/src/test/run-pass/linkage1.rs b/src/test/run-pass/linkage1.rs index 4e404f26ee..da07385ead 100644 --- a/src/test/run-pass/linkage1.rs +++ b/src/test/run-pass/linkage1.rs @@ -1,6 +1,7 @@ // ignore-windows // ignore-macos // ignore-emscripten doesn't support this linkage +// ignore-sgx weak linkage not permitted // aux-build:linkage1.rs #![feature(linkage)] diff --git a/src/test/run-pass/lint-cap.rs b/src/test/run-pass/lint-cap.rs index 0e8bdbdc6a..f03bb69189 100644 --- a/src/test/run-pass/lint-cap.rs +++ b/src/test/run-pass/lint-cap.rs @@ -5,4 +5,3 @@ use std::option; fn main() {} - diff --git a/src/test/run-pass/logging-only-prints-once.rs b/src/test/run-pass/logging-only-prints-once.rs index 7b10560022..1a4c4d89e7 100644 --- a/src/test/run-pass/logging-only-prints-once.rs +++ b/src/test/run-pass/logging-only-prints-once.rs @@ -1,6 +1,6 @@ // ignore-windows // ignore-emscripten no threads support -// exec-env:RUST_LOG=debug +// exec-env:RUSTC_LOG=debug use std::cell::Cell; use std::fmt; diff --git a/src/test/run-pass/logging_before_rt_started.rs b/src/test/run-pass/logging_before_rt_started.rs index 0cba1080de..69cfc54c46 100644 --- a/src/test/run-pass/logging_before_rt_started.rs +++ b/src/test/run-pass/logging_before_rt_started.rs @@ -1,4 +1,4 @@ -// exec-env:RUST_LOG=std::ptr +// exec-env:RUSTC_LOG=std::ptr // In issue #9487, it was realized that std::ptr was invoking the logging // infrastructure, and when std::ptr was used during runtime initialization, diff --git a/src/test/run-pass/macros/macro-comma-support.rs b/src/test/run-pass/macros/macro-comma-support.rs index 904f2e2c7f..12a612c153 100644 --- a/src/test/run-pass/macros/macro-comma-support.rs +++ b/src/test/run-pass/macros/macro-comma-support.rs @@ -233,8 +233,6 @@ fn println() { println!("hello {}", "world",); } -// select! is too troublesome and unlikely to be stabilized - // stringify! is N/A #[cfg(std)] diff --git a/src/test/run-pass/macros/macro-first-set.rs b/src/test/run-pass/macros/macro-first-set.rs index 8b09e72ed2..a21e4cd201 100644 --- a/src/test/run-pass/macros/macro-first-set.rs +++ b/src/test/run-pass/macros/macro-first-set.rs @@ -275,4 +275,3 @@ fn main() { test_24189(); test_51477(); } - diff --git a/src/test/run-pass/macros/macro-follow.rs b/src/test/run-pass/macros/macro-follow.rs index 488339b025..ca93655631 100644 --- a/src/test/run-pass/macros/macro-follow.rs +++ b/src/test/run-pass/macros/macro-follow.rs @@ -181,4 +181,3 @@ macro_rules! follow_meta { } fn main() {} - diff --git a/src/test/run-pass/macros/macro-nested_expr.rs b/src/test/run-pass/macros/macro-nested_expr.rs index 2f93ffec4a..f1433cbf4f 100644 --- a/src/test/run-pass/macros/macro-nested_expr.rs +++ b/src/test/run-pass/macros/macro-nested_expr.rs @@ -20,4 +20,3 @@ fn main() { define_f!(concat!("exported_", "f")); m!(stringify!(foo)); } - diff --git a/src/test/run-pass/macros/macro-pat-neg-lit.rs b/src/test/run-pass/macros/macro-pat-neg-lit.rs index 5345df2e84..79c68fd254 100644 --- a/src/test/run-pass/macros/macro-pat-neg-lit.rs +++ b/src/test/run-pass/macros/macro-pat-neg-lit.rs @@ -23,4 +23,3 @@ enum_number!(Change { fn main() { if let Some(Change::Down) = foo(-1) {} else { panic!() } } - diff --git a/src/test/run-pass/mir/mir_constval_adts.rs b/src/test/run-pass/mir/mir_constval_adts.rs index 3156be3584..ee9d73451f 100644 --- a/src/test/run-pass/mir/mir_constval_adts.rs +++ b/src/test/run-pass/mir/mir_constval_adts.rs @@ -32,4 +32,3 @@ fn main(){ assert_eq!(mir(), (STRUCT, TUPLE1, TUPLE2, PAIR_NEWTYPE)); test_promoted_newtype_str_ref(); } - diff --git a/src/test/run-pass/mir/mir_static_subtype.rs b/src/test/run-pass/mir/mir_static_subtype.rs new file mode 100644 index 0000000000..5b1ccd7ddf --- /dev/null +++ b/src/test/run-pass/mir/mir_static_subtype.rs @@ -0,0 +1,8 @@ +// Test that subtyping the body of a static doesn't cause an ICE. + +fn foo(_ : &()) {} +static X: fn(&'static ()) = foo; + +fn main() { + let _ = X; +} diff --git a/src/test/run-pass/mpsc_stress.rs b/src/test/run-pass/mpsc_stress.rs index cd30dd62bc..cf8d92b227 100644 --- a/src/test/run-pass/mpsc_stress.rs +++ b/src/test/run-pass/mpsc_stress.rs @@ -1,5 +1,6 @@ // compile-flags:--test // ignore-emscripten +// ignore-sgx no thread sleep support use std::sync::mpsc::channel; use std::sync::mpsc::TryRecvError; diff --git a/src/test/run-pass/multi-panic.rs b/src/test/run-pass/multi-panic.rs index 3f24d989c8..900b2b2206 100644 --- a/src/test/run-pass/multi-panic.rs +++ b/src/test/run-pass/multi-panic.rs @@ -1,5 +1,6 @@ // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes fn check_for_no_backtrace(test: std::process::Output) { assert!(!test.status.success()); diff --git a/src/test/run-pass/never-result.rs b/src/test/run-pass/never-result.rs index 2b395aa7f6..808377ffa1 100644 --- a/src/test/run-pass/never-result.rs +++ b/src/test/run-pass/never-result.rs @@ -16,4 +16,3 @@ fn main() { }, } } - diff --git a/src/test/run-pass/never_coercions.rs b/src/test/run-pass/never_coercions.rs index 70f67fd3da..f32e297381 100644 --- a/src/test/run-pass/never_coercions.rs +++ b/src/test/run-pass/never_coercions.rs @@ -9,4 +9,3 @@ fn main() { _ => &v[..], }; } - diff --git a/src/test/run-pass/nll/issue-47153-generic-const.rs b/src/test/run-pass/nll/issue-47153-generic-const.rs index 4f021fda4e..9f4d57111b 100644 --- a/src/test/run-pass/nll/issue-47153-generic-const.rs +++ b/src/test/run-pass/nll/issue-47153-generic-const.rs @@ -3,7 +3,6 @@ // Regression test for #47153: constants in a generic context (such as // a trait) used to ICE. -#![feature(nll)] #![allow(warnings)] trait Foo { diff --git a/src/test/run-pass/nll/issue-47589.rs b/src/test/run-pass/nll/issue-47589.rs index 5bbed3a859..280bf08113 100644 --- a/src/test/run-pass/nll/issue-47589.rs +++ b/src/test/run-pass/nll/issue-47589.rs @@ -1,7 +1,5 @@ // run-pass -#![feature(nll)] - pub struct DescriptorSet<'a> { pub slots: Vec> } diff --git a/src/test/run-pass/nll/issue-48623-closure.rs b/src/test/run-pass/nll/issue-48623-closure.rs index 5a41fff11a..3f8587eed4 100644 --- a/src/test/run-pass/nll/issue-48623-closure.rs +++ b/src/test/run-pass/nll/issue-48623-closure.rs @@ -2,8 +2,6 @@ #![allow(path_statements)] #![allow(dead_code)] -#![feature(nll)] - struct WithDrop; impl Drop for WithDrop { diff --git a/src/test/run-pass/nll/issue-48623-generator.rs b/src/test/run-pass/nll/issue-48623-generator.rs index b404daca72..ba3eccff49 100644 --- a/src/test/run-pass/nll/issue-48623-generator.rs +++ b/src/test/run-pass/nll/issue-48623-generator.rs @@ -2,7 +2,6 @@ #![allow(path_statements)] #![allow(dead_code)] -#![feature(nll)] #![feature(generators, generator_trait)] struct WithDrop; diff --git a/src/test/run-pass/nll/issue-50343.rs b/src/test/run-pass/nll/issue-50343.rs index 8d2992b3b4..55a2d231e1 100644 --- a/src/test/run-pass/nll/issue-50343.rs +++ b/src/test/run-pass/nll/issue-50343.rs @@ -1,6 +1,5 @@ // run-pass -#![feature(nll)] #![deny(unused_mut)] fn main() { diff --git a/src/test/run-pass/nll/issue-50461-used-mut-from-moves.rs b/src/test/run-pass/nll/issue-50461-used-mut-from-moves.rs index dc5257cfb9..69d7cdd83a 100644 --- a/src/test/run-pass/nll/issue-50461-used-mut-from-moves.rs +++ b/src/test/run-pass/nll/issue-50461-used-mut-from-moves.rs @@ -1,6 +1,5 @@ // run-pass -#![feature(nll)] #![deny(unused_mut)] struct Foo { diff --git a/src/test/run-pass/nll/issue-53123-raw-pointer-cast.rs b/src/test/run-pass/nll/issue-53123-raw-pointer-cast.rs index c3f818812a..941c9eeb41 100644 --- a/src/test/run-pass/nll/issue-53123-raw-pointer-cast.rs +++ b/src/test/run-pass/nll/issue-53123-raw-pointer-cast.rs @@ -1,6 +1,5 @@ // run-pass -#![feature(nll)] #![allow(unused_variables)] pub trait TryTransform { diff --git a/src/test/run-pass/nll/mutating_references.rs b/src/test/run-pass/nll/mutating_references.rs index 0af8751494..eb46b30b6b 100644 --- a/src/test/run-pass/nll/mutating_references.rs +++ b/src/test/run-pass/nll/mutating_references.rs @@ -1,7 +1,5 @@ // run-pass -#![feature(nll)] - struct List { value: T, next: Option>>, diff --git a/src/test/run-pass/nll/process_or_insert_default.rs b/src/test/run-pass/nll/process_or_insert_default.rs index e9cd4014bc..84ac9bbd0d 100644 --- a/src/test/run-pass/nll/process_or_insert_default.rs +++ b/src/test/run-pass/nll/process_or_insert_default.rs @@ -1,7 +1,5 @@ // run-pass -#![feature(nll)] - use std::collections::HashMap; fn process_or_insert_default(map: &mut HashMap, key: usize) { diff --git a/src/test/run-pass/nll/rc-loop.rs b/src/test/run-pass/nll/rc-loop.rs index 2c54ee8693..e59303d1f7 100644 --- a/src/test/run-pass/nll/rc-loop.rs +++ b/src/test/run-pass/nll/rc-loop.rs @@ -6,8 +6,6 @@ // `x`. The lexical checker makes this very painful. The NLL checker // does not. -#![feature(nll)] - use std::rc::Rc; #[derive(Debug, PartialEq, Eq)] @@ -28,4 +26,3 @@ fn main() { let base = find_base(chain); assert_eq!(&*base, &Foo::Base(44)); } - diff --git a/src/test/run-pass/no-stdio.rs b/src/test/run-pass/no-stdio.rs index 005781e1d2..aae1d0b7f8 100644 --- a/src/test/run-pass/no-stdio.rs +++ b/src/test/run-pass/no-stdio.rs @@ -1,6 +1,7 @@ // ignore-android // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes #![feature(rustc_private)] diff --git a/src/test/run-pass/numbers-arithmetic/i128.rs b/src/test/run-pass/numbers-arithmetic/i128.rs index f3b5506ae3..ea0ef95e4f 100644 --- a/src/test/run-pass/numbers-arithmetic/i128.rs +++ b/src/test/run-pass/numbers-arithmetic/i128.rs @@ -3,7 +3,6 @@ // ignore-emscripten i128 doesn't work -// compile-flags: -Z borrowck=compare #![feature(test)] diff --git a/src/test/run-pass/numbers-arithmetic/u128.rs b/src/test/run-pass/numbers-arithmetic/u128.rs index 56d1f221d8..9394071632 100644 --- a/src/test/run-pass/numbers-arithmetic/u128.rs +++ b/src/test/run-pass/numbers-arithmetic/u128.rs @@ -1,7 +1,6 @@ // run-pass // ignore-emscripten u128 not supported -// compile-flags: -Z borrowck=compare #![feature(test)] diff --git a/src/test/run-pass/optimization-fuel-0.rs b/src/test/run-pass/optimization-fuel-0.rs index 0920bc9c4b..77f21b3fcc 100644 --- a/src/test/run-pass/optimization-fuel-0.rs +++ b/src/test/run-pass/optimization-fuel-0.rs @@ -12,4 +12,3 @@ fn main() { assert_eq!(size_of::(), 6); assert_eq!(size_of::(), 6); } - diff --git a/src/test/run-pass/out-of-stack.rs b/src/test/run-pass/out-of-stack.rs index 9f868d6e5c..f03935e3d2 100644 --- a/src/test/run-pass/out-of-stack.rs +++ b/src/test/run-pass/out-of-stack.rs @@ -4,6 +4,7 @@ // ignore-musl // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes #![feature(asm)] #![feature(rustc_private)] diff --git a/src/test/run-pass/panic-runtime/abort-link-to-unwinding-crates.rs b/src/test/run-pass/panic-runtime/abort-link-to-unwinding-crates.rs index e2dbb0d175..9c099911ea 100644 --- a/src/test/run-pass/panic-runtime/abort-link-to-unwinding-crates.rs +++ b/src/test/run-pass/panic-runtime/abort-link-to-unwinding-crates.rs @@ -5,6 +5,7 @@ // no-prefer-dynamic // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes // ignore-macos extern crate exit_success_if_unwind; diff --git a/src/test/run-pass/panic-runtime/abort.rs b/src/test/run-pass/panic-runtime/abort.rs index 719034bd11..f625fe35d7 100644 --- a/src/test/run-pass/panic-runtime/abort.rs +++ b/src/test/run-pass/panic-runtime/abort.rs @@ -4,6 +4,7 @@ // no-prefer-dynamic // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes // ignore-macos use std::process::Command; diff --git a/src/test/run-pass/panic-runtime/lto-abort.rs b/src/test/run-pass/panic-runtime/lto-abort.rs index 9015a8f25a..8fff71a629 100644 --- a/src/test/run-pass/panic-runtime/lto-abort.rs +++ b/src/test/run-pass/panic-runtime/lto-abort.rs @@ -4,6 +4,7 @@ // no-prefer-dynamic // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes use std::process::Command; use std::env; diff --git a/src/test/run-pass/panic-runtime/lto-unwind.rs b/src/test/run-pass/panic-runtime/lto-unwind.rs index b14cdfc193..94a0b596e4 100644 --- a/src/test/run-pass/panic-runtime/lto-unwind.rs +++ b/src/test/run-pass/panic-runtime/lto-unwind.rs @@ -5,6 +5,7 @@ // no-prefer-dynamic // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes use std::process::Command; use std::env; diff --git a/src/test/run-pass/panic-uninitialized-zeroed.rs b/src/test/run-pass/panic-uninitialized-zeroed.rs index 3f6e489bb8..4ca4b407bd 100644 --- a/src/test/run-pass/panic-uninitialized-zeroed.rs +++ b/src/test/run-pass/panic-uninitialized-zeroed.rs @@ -2,7 +2,7 @@ // This test checks that instantiating an uninhabited type via `mem::{uninitialized,zeroed}` results // in a runtime panic. -#![feature(never_type, maybe_uninit)] +#![feature(never_type)] use std::{mem, panic}; diff --git a/src/test/run-pass/paths-containing-nul.rs b/src/test/run-pass/paths-containing-nul.rs index dfcef59aa5..64ee7319fd 100644 --- a/src/test/run-pass/paths-containing-nul.rs +++ b/src/test/run-pass/paths-containing-nul.rs @@ -2,6 +2,7 @@ // ignore-cloudabi no files or I/O // ignore-wasm32-bare no files or I/O // ignore-emscripten no files +// ignore-sgx no files use std::fs; use std::io; diff --git a/src/test/run-pass/print-stdout-eprint-stderr.rs b/src/test/run-pass/print-stdout-eprint-stderr.rs index 9c47a734d7..65130a1a9f 100644 --- a/src/test/run-pass/print-stdout-eprint-stderr.rs +++ b/src/test/run-pass/print-stdout-eprint-stderr.rs @@ -1,5 +1,6 @@ // ignore-cloudabi spawning processes is not supported // ignore-emscripten spawning processes is not supported +// ignore-sgx no processes use std::{env, process}; diff --git a/src/test/run-pass/proc-macro/auxiliary/expand-with-a-macro.rs b/src/test/run-pass/proc-macro/auxiliary/expand-with-a-macro.rs index 8580005f4f..5155a4b855 100644 --- a/src/test/run-pass/proc-macro/auxiliary/expand-with-a-macro.rs +++ b/src/test/run-pass/proc-macro/auxiliary/expand-with-a-macro.rs @@ -20,4 +20,3 @@ pub fn derive(input: TokenStream) -> TokenStream { } "#.parse().unwrap() } - diff --git a/src/test/run-pass/proc-macro/auxiliary/external-crate-var.rs b/src/test/run-pass/proc-macro/auxiliary/external-crate-var.rs index 09e5aea9b8..4319e92122 100644 --- a/src/test/run-pass/proc-macro/auxiliary/external-crate-var.rs +++ b/src/test/run-pass/proc-macro/auxiliary/external-crate-var.rs @@ -38,4 +38,3 @@ macro_rules! external { () => { } } } } - diff --git a/src/test/run-pass/proc-macro/auxiliary/span-api-tests.rs b/src/test/run-pass/proc-macro/auxiliary/span-api-tests.rs index 9092e7a49e..ad1e770a4d 100644 --- a/src/test/run-pass/proc-macro/auxiliary/span-api-tests.rs +++ b/src/test/run-pass/proc-macro/auxiliary/span-api-tests.rs @@ -43,4 +43,3 @@ pub fn macro_stringify(input: TokenStream) -> TokenStream { let src = span.source_text().expect("source_text"); TokenTree::Literal(Literal::string(&src)).into() } - diff --git a/src/test/run-pass/proc-macro/expand-with-a-macro.rs b/src/test/run-pass/proc-macro/expand-with-a-macro.rs index 46c8e0ef5e..097520b993 100644 --- a/src/test/run-pass/proc-macro/expand-with-a-macro.rs +++ b/src/test/run-pass/proc-macro/expand-with-a-macro.rs @@ -17,4 +17,3 @@ fn main() { A.a(); }).is_err()); } - diff --git a/src/test/run-pass/process/process-envs.rs b/src/test/run-pass/process/process-envs.rs index 1ff0fbbdd0..a7779c55f1 100644 --- a/src/test/run-pass/process/process-envs.rs +++ b/src/test/run-pass/process/process-envs.rs @@ -1,6 +1,7 @@ // run-pass // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes use std::process::Command; use std::env; diff --git a/src/test/run-pass/process/process-exit.rs b/src/test/run-pass/process/process-exit.rs index ecc7b72c0f..da3b4ca85c 100644 --- a/src/test/run-pass/process/process-exit.rs +++ b/src/test/run-pass/process/process-exit.rs @@ -2,6 +2,7 @@ #![allow(unused_imports)] // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes use std::env; use std::process::{self, Command, Stdio}; diff --git a/src/test/run-pass/process/process-remove-from-env.rs b/src/test/run-pass/process/process-remove-from-env.rs index 9c2aa871e0..32cbb6ac85 100644 --- a/src/test/run-pass/process/process-remove-from-env.rs +++ b/src/test/run-pass/process/process-remove-from-env.rs @@ -1,6 +1,7 @@ // run-pass // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes use std::process::Command; use std::env; diff --git a/src/test/run-pass/process/process-spawn-nonexistent.rs b/src/test/run-pass/process/process-spawn-nonexistent.rs index 2fe9f33de3..182cf1748f 100644 --- a/src/test/run-pass/process/process-spawn-nonexistent.rs +++ b/src/test/run-pass/process/process-spawn-nonexistent.rs @@ -1,6 +1,7 @@ // run-pass // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes use std::io::ErrorKind; use std::process::Command; diff --git a/src/test/run-pass/process/process-spawn-with-unicode-params.rs b/src/test/run-pass/process/process-spawn-with-unicode-params.rs index e3508cb4e8..edd3cb26ec 100644 --- a/src/test/run-pass/process/process-spawn-with-unicode-params.rs +++ b/src/test/run-pass/process/process-spawn-with-unicode-params.rs @@ -9,6 +9,7 @@ // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes use std::io::prelude::*; use std::io; diff --git a/src/test/run-pass/process/process-status-inherits-stdin.rs b/src/test/run-pass/process/process-status-inherits-stdin.rs index e2e17b7fb6..f9b2da7e40 100644 --- a/src/test/run-pass/process/process-status-inherits-stdin.rs +++ b/src/test/run-pass/process/process-status-inherits-stdin.rs @@ -1,6 +1,7 @@ // run-pass // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes use std::env; use std::io; diff --git a/src/test/run-pass/project-cache-issue-31849.rs b/src/test/run-pass/project-cache-issue-31849.rs index 086883e5cb..4920678af1 100644 --- a/src/test/run-pass/project-cache-issue-31849.rs +++ b/src/test/run-pass/project-cache-issue-31849.rs @@ -62,4 +62,3 @@ fn main() { let it = ((((((((((),()),()),()),()),()),()),()),()),()); it.build(); } - diff --git a/src/test/run-pass/range_inclusive_gate.rs b/src/test/run-pass/range_inclusive_gate.rs index 7f72bf5d32..d4d830ef22 100644 --- a/src/test/run-pass/range_inclusive_gate.rs +++ b/src/test/run-pass/range_inclusive_gate.rs @@ -10,4 +10,3 @@ fn main() { } assert_eq!(count, 55); } - diff --git a/src/test/run-pass/rfcs/rfc-1014.rs b/src/test/run-pass/rfcs/rfc-1014.rs index 3b7b96d0d0..41a036958b 100644 --- a/src/test/run-pass/rfcs/rfc-1014.rs +++ b/src/test/run-pass/rfcs/rfc-1014.rs @@ -2,6 +2,7 @@ #![allow(dead_code)] // ignore-cloudabi stdout does not map to file descriptor 1 by default // ignore-wasm32-bare no libc +// ignore-sgx no libc #![feature(rustc_private)] diff --git a/src/test/run-pass/running-with-no-runtime.rs b/src/test/run-pass/running-with-no-runtime.rs index 7f8a0f01dd..ab1bf3a5b9 100644 --- a/src/test/run-pass/running-with-no-runtime.rs +++ b/src/test/run-pass/running-with-no-runtime.rs @@ -1,5 +1,6 @@ // ignore-cloudabi spawning processes is not supported // ignore-emscripten spawning processes is not supported +// ignore-sgx no processes #![feature(start)] diff --git a/src/test/run-pass/rustc-rust-log.rs b/src/test/run-pass/rustc-rust-log.rs index 4360a15401..b664257241 100644 --- a/src/test/run-pass/rustc-rust-log.rs +++ b/src/test/run-pass/rustc-rust-log.rs @@ -8,6 +8,6 @@ // dont-check-compiler-stderr // compile-flags: --error-format human -// rustc-env:RUST_LOG=debug +// rustc-env:RUSTC_LOG=debug fn main() {} diff --git a/src/test/run-pass/segfault-no-out-of-stack.rs b/src/test/run-pass/segfault-no-out-of-stack.rs index ce485d771f..e90efface6 100644 --- a/src/test/run-pass/segfault-no-out-of-stack.rs +++ b/src/test/run-pass/segfault-no-out-of-stack.rs @@ -1,6 +1,7 @@ #![allow(unused_imports)] // ignore-cloudabi can't run commands // ignore-emscripten can't run commands +// ignore-sgx no processes #![feature(rustc_private)] diff --git a/src/test/run-pass/sepcomp/sepcomp-cci.rs b/src/test/run-pass/sepcomp/sepcomp-cci.rs index f5c633d250..02bbab30e9 100644 --- a/src/test/run-pass/sepcomp/sepcomp-cci.rs +++ b/src/test/run-pass/sepcomp/sepcomp-cci.rs @@ -1,5 +1,4 @@ // run-pass -// ignore-bitrig // compile-flags: -C codegen-units=3 // aux-build:sepcomp_cci_lib.rs diff --git a/src/test/run-pass/sepcomp/sepcomp-extern.rs b/src/test/run-pass/sepcomp/sepcomp-extern.rs index 18af785c1b..c4ccf23c47 100644 --- a/src/test/run-pass/sepcomp/sepcomp-extern.rs +++ b/src/test/run-pass/sepcomp/sepcomp-extern.rs @@ -1,5 +1,4 @@ // run-pass -// ignore-bitrig // compile-flags: -C codegen-units=3 // aux-build:sepcomp-extern-lib.rs diff --git a/src/test/run-pass/sepcomp/sepcomp-fns-backwards.rs b/src/test/run-pass/sepcomp/sepcomp-fns-backwards.rs index 96bcc260bd..f56769e2b8 100644 --- a/src/test/run-pass/sepcomp/sepcomp-fns-backwards.rs +++ b/src/test/run-pass/sepcomp/sepcomp-fns-backwards.rs @@ -1,6 +1,5 @@ // run-pass #![allow(dead_code)] -// ignore-bitrig // compile-flags: -C codegen-units=3 // Test references to items that haven't been codegened yet. diff --git a/src/test/run-pass/sepcomp/sepcomp-fns.rs b/src/test/run-pass/sepcomp/sepcomp-fns.rs index c4ea17225b..a432c89606 100644 --- a/src/test/run-pass/sepcomp/sepcomp-fns.rs +++ b/src/test/run-pass/sepcomp/sepcomp-fns.rs @@ -1,5 +1,4 @@ // run-pass -// ignore-bitrig // compile-flags: -C codegen-units=3 // Test basic separate compilation functionality. The functions should be able diff --git a/src/test/run-pass/sepcomp/sepcomp-statics.rs b/src/test/run-pass/sepcomp/sepcomp-statics.rs index e0c6b268b1..5457c8a0ae 100644 --- a/src/test/run-pass/sepcomp/sepcomp-statics.rs +++ b/src/test/run-pass/sepcomp/sepcomp-statics.rs @@ -1,6 +1,5 @@ // run-pass #![allow(dead_code)] -// ignore-bitrig // compile-flags: -C codegen-units=3 // Test references to static items across compilation units. diff --git a/src/test/run-pass/sepcomp/sepcomp-unwind.rs b/src/test/run-pass/sepcomp/sepcomp-unwind.rs index 01dbea0809..50a4e04394 100644 --- a/src/test/run-pass/sepcomp/sepcomp-unwind.rs +++ b/src/test/run-pass/sepcomp/sepcomp-unwind.rs @@ -1,6 +1,5 @@ // run-pass #![allow(dead_code)] -// ignore-bitrig // compile-flags: -C codegen-units=3 // ignore-emscripten no threads support diff --git a/src/test/run-pass/signal-alternate-stack-cleanup.rs b/src/test/run-pass/signal-alternate-stack-cleanup.rs index 3958e72040..6f2fa2a370 100644 --- a/src/test/run-pass/signal-alternate-stack-cleanup.rs +++ b/src/test/run-pass/signal-alternate-stack-cleanup.rs @@ -5,6 +5,7 @@ // ignore-cloudabi no signal handling support // ignore-wasm32-bare no libc // ignore-windows +// ignore-sgx no libc #![feature(rustc_private)] extern crate libc; @@ -33,4 +34,3 @@ fn main() { atexit(send_signal); } } - diff --git a/src/test/run-pass/signal-exit-status.rs b/src/test/run-pass/signal-exit-status.rs index 9e1e55ad54..c22c035228 100644 --- a/src/test/run-pass/signal-exit-status.rs +++ b/src/test/run-pass/signal-exit-status.rs @@ -1,5 +1,6 @@ // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes // ignore-windows use std::env; diff --git a/src/test/run-pass/sigpipe-should-be-ignored.rs b/src/test/run-pass/sigpipe-should-be-ignored.rs index 2ded71670d..6c5bbd45a3 100644 --- a/src/test/run-pass/sigpipe-should-be-ignored.rs +++ b/src/test/run-pass/sigpipe-should-be-ignored.rs @@ -4,6 +4,7 @@ // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes use std::env; use std::io::prelude::*; diff --git a/src/test/run-pass/simd/simd-target-feature-mixup.rs b/src/test/run-pass/simd/simd-target-feature-mixup.rs index 5842a7fcdf..6d7688191b 100644 --- a/src/test/run-pass/simd/simd-target-feature-mixup.rs +++ b/src/test/run-pass/simd/simd-target-feature-mixup.rs @@ -4,6 +4,7 @@ #![allow(overflowing_literals)] // ignore-emscripten +// ignore-sgx no processes #![feature(repr_simd, target_feature, cfg_target_feature)] #![feature(avx512_target_feature)] diff --git a/src/test/run-pass/sleep.rs b/src/test/run-pass/sleep.rs index f0411876c8..7128b3cc7c 100644 --- a/src/test/run-pass/sleep.rs +++ b/src/test/run-pass/sleep.rs @@ -1,4 +1,5 @@ // ignore-emscripten no threads support +// ignore-sgx no thread sleep support use std::thread::{self, sleep}; use std::time::Duration; diff --git a/src/test/run-pass/stack-probes-lto.rs b/src/test/run-pass/stack-probes-lto.rs index 2705950b01..1274f032a3 100644 --- a/src/test/run-pass/stack-probes-lto.rs +++ b/src/test/run-pass/stack-probes-lto.rs @@ -9,6 +9,7 @@ // ignore-wasm // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes // ignore-musl FIXME #31506 // ignore-pretty // compile-flags: -C lto diff --git a/src/test/run-pass/stack-probes.rs b/src/test/run-pass/stack-probes.rs index ff264421cf..92a0cc3a07 100644 --- a/src/test/run-pass/stack-probes.rs +++ b/src/test/run-pass/stack-probes.rs @@ -9,6 +9,7 @@ // ignore-wasm // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes // ignore-musl FIXME #31506 use std::mem; diff --git a/src/test/run-pass/stdio-is-blocking.rs b/src/test/run-pass/stdio-is-blocking.rs index 281c6a17aa..1824162b8b 100644 --- a/src/test/run-pass/stdio-is-blocking.rs +++ b/src/test/run-pass/stdio-is-blocking.rs @@ -1,5 +1,6 @@ // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes use std::env; use std::io::prelude::*; diff --git a/src/test/run-pass/structs-enums/rec-align-u64.rs b/src/test/run-pass/structs-enums/rec-align-u64.rs index d211eed131..c4e9e9ea5e 100644 --- a/src/test/run-pass/structs-enums/rec-align-u64.rs +++ b/src/test/run-pass/structs-enums/rec-align-u64.rs @@ -55,7 +55,7 @@ mod m { } } -#[cfg(target_os = "bitrig")] +#[cfg(target_env = "sgx")] mod m { #[cfg(target_arch = "x86_64")] pub mod m { diff --git a/src/test/run-pass/structs-enums/unit-like-struct-drop-run.rs b/src/test/run-pass/structs-enums/unit-like-struct-drop-run.rs index dfe7387521..980fd97e2c 100644 --- a/src/test/run-pass/structs-enums/unit-like-struct-drop-run.rs +++ b/src/test/run-pass/structs-enums/unit-like-struct-drop-run.rs @@ -3,9 +3,6 @@ // Make sure the destructor is run for unit-like structs. - -#![feature(alloc)] - use std::thread; struct Foo; diff --git a/src/test/run-pass/tcp-stress.rs b/src/test/run-pass/tcp-stress.rs index c90f9024af..391cbbdd42 100644 --- a/src/test/run-pass/tcp-stress.rs +++ b/src/test/run-pass/tcp-stress.rs @@ -1,9 +1,9 @@ // ignore-android needs extra network permissions -// ignore-bitrig system ulimit (Too many open files) // ignore-cloudabi no global network namespace access // ignore-emscripten no threads or sockets support // ignore-netbsd system ulimit (Too many open files) // ignore-openbsd system ulimit (Too many open files) +// ignore-sgx no thread sleep support use std::io::prelude::*; use std::net::{TcpListener, TcpStream}; diff --git a/src/test/run-pass/thinlto/thin-lto-inlines2.rs b/src/test/run-pass/thinlto/thin-lto-inlines2.rs index f053dd35a2..1eb29657c7 100644 --- a/src/test/run-pass/thinlto/thin-lto-inlines2.rs +++ b/src/test/run-pass/thinlto/thin-lto-inlines2.rs @@ -26,4 +26,3 @@ fn main() { assert_eq!(*foo, *bar); } } - diff --git a/src/test/run-pass/threads-sendsync/spawning-with-debug.rs b/src/test/run-pass/threads-sendsync/spawning-with-debug.rs index c78ae78dd1..388d62aa71 100644 --- a/src/test/run-pass/threads-sendsync/spawning-with-debug.rs +++ b/src/test/run-pass/threads-sendsync/spawning-with-debug.rs @@ -2,7 +2,7 @@ #![allow(unused_must_use)] #![allow(unused_mut)] // ignore-windows -// exec-env:RUST_LOG=debug +// exec-env:RUSTC_LOG=debug // ignore-emscripten no threads support // regression test for issue #10405, make sure we don't call println! too soon. diff --git a/src/test/run-pass/threads-sendsync/sync-send-in-std.rs b/src/test/run-pass/threads-sendsync/sync-send-in-std.rs index 981ac16635..15e10dc250 100644 --- a/src/test/run-pass/threads-sendsync/sync-send-in-std.rs +++ b/src/test/run-pass/threads-sendsync/sync-send-in-std.rs @@ -2,6 +2,7 @@ // ignore-cloudabi networking not available // ignore-wasm32-bare networking not available +// ignore-sgx ToSocketAddrs cannot be used for DNS Resolution use std::net::ToSocketAddrs; diff --git a/src/test/run-pass/try-wait.rs b/src/test/run-pass/try-wait.rs index 05871ba7d4..97caddde41 100644 --- a/src/test/run-pass/try-wait.rs +++ b/src/test/run-pass/try-wait.rs @@ -1,6 +1,7 @@ #![allow(stable_features)] // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes #![feature(process_try_wait)] diff --git a/src/test/run-pass/try_from.rs b/src/test/run-pass/try_from.rs index e42f2c3e39..98344491ae 100644 --- a/src/test/run-pass/try_from.rs +++ b/src/test/run-pass/try_from.rs @@ -34,4 +34,3 @@ impl Into> for Foo { pub fn main() { let _: Result, Infallible> = Foo { t: 10 }.try_into(); } - diff --git a/src/test/run-pass/union/union-nonzero.rs b/src/test/run-pass/union/union-nonzero.rs new file mode 100644 index 0000000000..bd84b46bf3 --- /dev/null +++ b/src/test/run-pass/union/union-nonzero.rs @@ -0,0 +1,51 @@ +// run-pass +#![allow(dead_code)] + +// Tests that unions aren't subject to unsafe non-zero/niche-filling optimizations. +// +// For example, if a union `U` can contain both a `&T` and a `*const T`, there's definitely no +// bit-value that an `Option` could reuse as `None`; this test makes sure that isn't done. +// +// Secondly, this tests the status quo (not a guarantee; subject to change!) to not apply such +// optimizations to types containing unions even if they're theoretically possible. (discussion: +// https://github.com/rust-lang/rust/issues/36394) +// +// Notably this nails down part of the behavior that `MaybeUninit` assumes: that a +// `Option>` does not take advantage of non-zero optimization, and thus is a safe +// construct. + +use std::mem::{size_of, transmute}; + +union U1 { + a: A, +} + +union U2 { + a: A, + b: B, +} + +// Option uses a value other than 0 and 1 as None +#[derive(Clone,Copy)] +enum E { + A = 0, + B = 1, +} + +fn main() { + // Unions do not participate in niche-filling/non-zero optimization... + assert!(size_of::>>() > size_of::>()); + assert!(size_of::>>() > size_of::>()); + assert!(size_of::>>() > size_of::>()); + + // ...even when theoretically possible: + assert!(size_of::>>() > size_of::>()); + assert!(size_of::>>() > size_of::>()); + + // The unused bits of the () variant can have any value. + let zeroed: U2<&u8, ()> = unsafe { transmute(std::ptr::null::()) }; + + if let None = Some(zeroed) { + panic!() + } +} diff --git a/src/test/run-pass/wait-forked-but-failed-child.rs b/src/test/run-pass/wait-forked-but-failed-child.rs index e9869866a9..1f32bd00a0 100644 --- a/src/test/run-pass/wait-forked-but-failed-child.rs +++ b/src/test/run-pass/wait-forked-but-failed-child.rs @@ -1,5 +1,6 @@ // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes #![feature(rustc_private)] diff --git a/src/test/run-pass/weird-exprs.rs b/src/test/run-pass/weird-exprs.rs index ae4de92ff7..6b00293b6e 100644 --- a/src/test/run-pass/weird-exprs.rs +++ b/src/test/run-pass/weird-exprs.rs @@ -2,7 +2,6 @@ #![allow(dead_code)] #![allow(unreachable_code)] #![allow(unused_parens)] -// compile-flags: -Z borrowck=compare #![recursion_limit = "256"] diff --git a/src/test/run-pass/x86stdcall.rs b/src/test/run-pass/x86stdcall.rs index 11a45a5889..cd9450a569 100644 --- a/src/test/run-pass/x86stdcall.rs +++ b/src/test/run-pass/x86stdcall.rs @@ -1,5 +1,5 @@ // ignore-wasm32-bare no libc to test ffi with - +// ignore-sgx no libc // GetLastError doesn't seem to work with stack switching #[cfg(windows)] @@ -23,7 +23,6 @@ pub fn main() { } #[cfg(any(target_os = "android", - target_os = "bitrig", target_os = "cloudabi", target_os = "dragonfly", target_os = "emscripten", diff --git a/src/test/rustdoc-js/search-short-types.js b/src/test/rustdoc-js/search-short-types.js new file mode 100644 index 0000000000..0ebf4860cf --- /dev/null +++ b/src/test/rustdoc-js/search-short-types.js @@ -0,0 +1,8 @@ +const QUERY = 'P'; + +const EXPECTED = { + 'others': [ + { 'path': 'search_short_types', 'name': 'P' }, + { 'path': 'search_short_types', 'name': 'Ap' }, + ], +}; diff --git a/src/test/rustdoc-js/search-short-types.rs b/src/test/rustdoc-js/search-short-types.rs new file mode 100644 index 0000000000..2eacc0a358 --- /dev/null +++ b/src/test/rustdoc-js/search-short-types.rs @@ -0,0 +1,68 @@ +macro_rules! imp { + ($name:ident) => { + pub struct $name { + pub op: usize, + } + impl $name { + pub fn op() {} + pub fn cmp() {} + pub fn map() {} + pub fn pop() {} + pub fn ptr() {} + pub fn rpo() {} + pub fn drop() {} + pub fn copy() {} + pub fn zip() {} + pub fn sup() {} + pub fn pa() {} + pub fn pb() {} + pub fn pc() {} + pub fn pd() {} + pub fn pe() {} + pub fn pf() {} + pub fn pg() {} + pub fn ph() {} + pub fn pi() {} + pub fn pj() {} + pub fn pk() {} + pub fn pl() {} + pub fn pm() {} + pub fn pn() {} + pub fn po() {} + } + }; + ($name:ident, $($names:ident),*) => { + imp!($name); + imp!($($names),*); + }; +} +macro_rules! en { + ($name:ident) => { + pub enum $name { + Ptr, + Rp, + Rpo, + Pt, + Drop, + Dr, + Dro, + Sup, + Op, + Cmp, + Map, + Mp, + } + }; + ($name:ident, $($names:ident),*) => { + en!($name); + en!($($names),*); + }; +} + +imp!(Ot, Foo, Cmp, Map, Loc, Lac, Toc, Si, Sig, Sip, Psy, Psi, Py, Pi, Pa, Pb, Pc, Pd); +imp!(Pe, Pf, Pg, Ph, Pj, Pk, Pl, Pm, Pn, Po, Pq, Pr, Ps, Pt, Pu, Pv, Pw, Px, Pz, Ap, Bp, Cp); +imp!(Dp, Ep, Fp, Gp, Hp, Ip, Jp, Kp, Lp, Mp, Np, Op, Pp, Qp, Rp, Sp, Tp, Up, Vp, Wp, Xp, Yp, Zp); + +en!(Place, Plac, Plae, Plce, Pace, Scalar, Scalr, Scaar, Sclar, Salar); + +pub struct P; diff --git a/src/test/rustdoc-js/substring.js b/src/test/rustdoc-js/substring.js new file mode 100644 index 0000000000..af05cd1ad3 --- /dev/null +++ b/src/test/rustdoc-js/substring.js @@ -0,0 +1,8 @@ +const QUERY = 'waker_from'; + +const EXPECTED = { + 'others': [ + { 'path': 'substring::SuperWaker', 'name': 'local_waker_from_nonlocal' }, + { 'path': 'substring::SuperWakerTask', 'name': 'local_waker_from_nonlocal' }, + ], +}; diff --git a/src/test/rustdoc-js/substring.rs b/src/test/rustdoc-js/substring.rs new file mode 100644 index 0000000000..e729c722c7 --- /dev/null +++ b/src/test/rustdoc-js/substring.rs @@ -0,0 +1,21 @@ +pub struct SuperWaker; + +impl SuperWaker { + pub fn local_waker_from_nonlocal() {} + pub fn local_waker_frm_nonlocal() {} + pub fn some_method() {} + pub fn some_other_method() {} + pub fn waker_non_local() {} + pub fn from_non_local() {} +} + +pub struct SuperWakerTask; + +impl SuperWakerTask { + pub fn local_waker_from_nonlocal() {} + pub fn local_waker_frm_nonlocal() {} + pub fn some_method() {} + pub fn some_other_method() {} + pub fn waker_non_local() {} + pub fn from_non_local() {} +} diff --git a/src/test/rustdoc-ui/cfg-test.rs b/src/test/rustdoc-ui/cfg-test.rs new file mode 100644 index 0000000000..6112e9b30e --- /dev/null +++ b/src/test/rustdoc-ui/cfg-test.rs @@ -0,0 +1,22 @@ +// compile-pass +// compile-flags:--test +// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" + +// Crates like core have doctests gated on `cfg(not(test))` so we need to make +// sure `cfg(test)` is not active when running `rustdoc --test`. + +/// this doctest will be ignored: +/// +/// ``` +/// assert!(false); +/// ``` +#[cfg(test)] +pub struct Foo; + +/// this doctest will be tested: +/// +/// ``` +/// assert!(true); +/// ``` +#[cfg(not(test))] +pub struct Foo; diff --git a/src/test/rustdoc-ui/cfg-test.stdout b/src/test/rustdoc-ui/cfg-test.stdout new file mode 100644 index 0000000000..67873870e8 --- /dev/null +++ b/src/test/rustdoc-ui/cfg-test.stdout @@ -0,0 +1,6 @@ + +running 1 test +test $DIR/cfg-test.rs - Foo (line 18) ... ok + +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out + diff --git a/src/test/rustdoc-ui/doc-without-codeblock.rs b/src/test/rustdoc-ui/doc-without-codeblock.rs index aa3f539ba3..4b2a91e9c8 100644 --- a/src/test/rustdoc-ui/doc-without-codeblock.rs +++ b/src/test/rustdoc-ui/doc-without-codeblock.rs @@ -1,6 +1,4 @@ -//~ ERROR Missing code example in this documentation - -#![deny(missing_doc_code_examples)] +#![deny(missing_doc_code_examples)] //~ ERROR Missing code example in this documentation /// Some docs. //~^ ERROR Missing code example in this documentation diff --git a/src/test/rustdoc-ui/doc-without-codeblock.stderr b/src/test/rustdoc-ui/doc-without-codeblock.stderr index 208bdedf24..23c07c4d32 100644 --- a/src/test/rustdoc-ui/doc-without-codeblock.stderr +++ b/src/test/rustdoc-ui/doc-without-codeblock.stderr @@ -1,25 +1,35 @@ error: Missing code example in this documentation + --> $DIR/doc-without-codeblock.rs:1:1 + | +LL | / #![deny(missing_doc_code_examples)] +LL | | +LL | | /// Some docs. +LL | | +... | +LL | | pub fn bar() {} +LL | | } + | |_^ | note: lint level defined here - --> $DIR/doc-without-codeblock.rs:3:9 + --> $DIR/doc-without-codeblock.rs:1:9 | LL | #![deny(missing_doc_code_examples)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: Missing code example in this documentation - --> $DIR/doc-without-codeblock.rs:5:1 + --> $DIR/doc-without-codeblock.rs:3:1 | LL | /// Some docs. | ^^^^^^^^^^^^^^ error: Missing code example in this documentation - --> $DIR/doc-without-codeblock.rs:9:1 + --> $DIR/doc-without-codeblock.rs:7:1 | LL | /// And then, the princess died. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Missing code example in this documentation - --> $DIR/doc-without-codeblock.rs:12:5 + --> $DIR/doc-without-codeblock.rs:10:5 | LL | /// Or maybe not because she saved herself! | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/rustdoc-ui/failed-doctest-output.stdout b/src/test/rustdoc-ui/failed-doctest-output.stdout index c9f59405ce..7b1cd70273 100644 --- a/src/test/rustdoc-ui/failed-doctest-output.stdout +++ b/src/test/rustdoc-ui/failed-doctest-output.stdout @@ -15,7 +15,7 @@ error[E0425]: cannot find value `no` in this scope error: aborting due to previous error For more information about this error, try `rustc --explain E0425`. -thread '$DIR/failed-doctest-output.rs - OtherStruct (line 17)' panicked at 'couldn't compile the test', src/librustdoc/test.rs:310:13 +thread '$DIR/failed-doctest-output.rs - OtherStruct (line 17)' panicked at 'couldn't compile the test', src/librustdoc/test.rs:319:13 note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace. ---- $DIR/failed-doctest-output.rs - SomeStruct (line 11) stdout ---- @@ -24,7 +24,7 @@ thread '$DIR/failed-doctest-output.rs - SomeStruct (line 11)' panicked at 'test thread 'main' panicked at 'oh no', $DIR/failed-doctest-output.rs:3:1 note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace. -', src/librustdoc/test.rs:332:17 +', src/librustdoc/test.rs:341:17 failures: diff --git a/src/test/rustdoc-ui/intra-link-span-ice-55723.rs b/src/test/rustdoc-ui/intra-link-span-ice-55723.rs index 5891a553e3..c7a13bbf60 100644 --- a/src/test/rustdoc-ui/intra-link-span-ice-55723.rs +++ b/src/test/rustdoc-ui/intra-link-span-ice-55723.rs @@ -1,5 +1,3 @@ -// ignore-tidy-end-whitespace - #![deny(intra_doc_link_resolution_failure)] // An error in calculating spans while reporting intra-doc link resolution errors caused rustdoc to diff --git a/src/test/rustdoc-ui/intra-link-span-ice-55723.stderr b/src/test/rustdoc-ui/intra-link-span-ice-55723.stderr index 7ee9ca4792..79702a1a54 100644 --- a/src/test/rustdoc-ui/intra-link-span-ice-55723.stderr +++ b/src/test/rustdoc-ui/intra-link-span-ice-55723.stderr @@ -1,11 +1,11 @@ error: `[i]` cannot be resolved, ignoring it... - --> $DIR/intra-link-span-ice-55723.rs:11:10 + --> $DIR/intra-link-span-ice-55723.rs:9:10 | LL | /// (arr[i]) | ^ cannot be resolved, ignoring | note: lint level defined here - --> $DIR/intra-link-span-ice-55723.rs:3:9 + --> $DIR/intra-link-span-ice-55723.rs:1:9 | LL | #![deny(intra_doc_link_resolution_failure)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/rustdoc-ui/lint-missing-doc-code-example.rs b/src/test/rustdoc-ui/lint-missing-doc-code-example.rs new file mode 100644 index 0000000000..ffe0ddcd8c --- /dev/null +++ b/src/test/rustdoc-ui/lint-missing-doc-code-example.rs @@ -0,0 +1,40 @@ +#![deny(missing_docs)] +#![deny(missing_doc_code_examples)] + +//! crate level doc +//! ``` +//! println!("hello"): +//! ``` + + +/// doc +/// +/// ``` +/// println!("hello"); +/// ``` +fn test() { +} + +#[allow(missing_docs)] +mod module1 { //~ ERROR +} + +#[allow(missing_doc_code_examples)] +/// doc +mod module2 { + + /// doc + pub fn test() {} +} + +/// doc +/// +/// ``` +/// println!("hello"); +/// ``` +pub mod module3 { + + /// doc + //~^ ERROR + pub fn test() {} +} diff --git a/src/test/rustdoc-ui/lint-missing-doc-code-example.stderr b/src/test/rustdoc-ui/lint-missing-doc-code-example.stderr new file mode 100644 index 0000000000..97a52a13e3 --- /dev/null +++ b/src/test/rustdoc-ui/lint-missing-doc-code-example.stderr @@ -0,0 +1,21 @@ +error: Missing code example in this documentation + --> $DIR/lint-missing-doc-code-example.rs:19:1 + | +LL | / mod module1 { +LL | | } + | |_^ + | +note: lint level defined here + --> $DIR/lint-missing-doc-code-example.rs:2:9 + | +LL | #![deny(missing_doc_code_examples)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Missing code example in this documentation + --> $DIR/lint-missing-doc-code-example.rs:37:3 + | +LL | /// doc + | ^^^^^^^ + +error: aborting due to 2 previous errors + diff --git a/src/test/rustdoc-ui/unparseable-doc-test.rs b/src/test/rustdoc-ui/unparseable-doc-test.rs new file mode 100644 index 0000000000..18d6b32bf4 --- /dev/null +++ b/src/test/rustdoc-ui/unparseable-doc-test.rs @@ -0,0 +1,10 @@ +// compile-flags: --test +// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" +// failure-status: 101 +// rustc-env: RUST_BACKTRACE=0 + +/// ```rust +/// let x = 7; +/// "unterminated +/// ``` +pub fn foo() {} diff --git a/src/test/rustdoc-ui/unparseable-doc-test.stdout b/src/test/rustdoc-ui/unparseable-doc-test.stdout new file mode 100644 index 0000000000..7048ef2c58 --- /dev/null +++ b/src/test/rustdoc-ui/unparseable-doc-test.stdout @@ -0,0 +1,24 @@ + +running 1 test +test $DIR/unparseable-doc-test.rs - foo (line 6) ... FAILED + +failures: + +---- $DIR/unparseable-doc-test.rs - foo (line 6) stdout ---- +error: unterminated double quote string + --> $DIR/unparseable-doc-test.rs:8:1 + | +2 | "unterminated + | ^^^^^^^^^^^^^ + +error: aborting due to previous error + +thread '$DIR/unparseable-doc-test.rs - foo (line 6)' panicked at 'couldn't compile the test', src/librustdoc/test.rs:319:13 +note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace. + + +failures: + $DIR/unparseable-doc-test.rs - foo (line 6) + +test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out + diff --git a/src/test/rustdoc/assoc-consts-version.rs b/src/test/rustdoc/assoc-consts-version.rs index c561269cf9..6060bc0a6f 100644 --- a/src/test/rustdoc/assoc-consts-version.rs +++ b/src/test/rustdoc/assoc-consts-version.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![crate_name = "foo"] #![feature(staged_api)] @@ -10,7 +8,8 @@ pub struct SomeStruct; impl SomeStruct { - // @has 'foo/struct.SomeStruct.html' '//*[@id="associatedconstant.SOME_CONST"]//div[@class="since"]' '1.1.2' + // @has 'foo/struct.SomeStruct.html' \ + // '//*[@id="associatedconstant.SOME_CONST"]//span[@class="since"]' '1.1.2' #[stable(since="1.1.2", feature="rust2")] pub const SOME_CONST: usize = 0; } diff --git a/src/test/rustdoc/async-fn.rs b/src/test/rustdoc/async-fn.rs index ba4997a7f9..7384f7027d 100644 --- a/src/test/rustdoc/async-fn.rs +++ b/src/test/rustdoc/async-fn.rs @@ -1,6 +1,6 @@ // edition:2018 -#![feature(async_await, futures_api)] +#![feature(async_await)] // @has async_fn/fn.foo.html '//pre[@class="rust fn"]' 'pub async fn foo() -> Option' pub async fn foo() -> Option { diff --git a/src/test/rustdoc/async-move-doctest.rs b/src/test/rustdoc/async-move-doctest.rs new file mode 100644 index 0000000000..4272313278 --- /dev/null +++ b/src/test/rustdoc/async-move-doctest.rs @@ -0,0 +1,14 @@ +// compile-flags:--test +// edition:2018 + +// prior to setting the default edition for the doctest pre-parser, this doctest would fail due to +// a fatal parsing error +// see https://github.com/rust-lang/rust/issues/59313 + +//! ``` +//! #![feature(async_await)] +//! +//! fn foo() { +//! drop(async move {}); +//! } +//! ``` diff --git a/src/test/rustdoc/attributes.rs b/src/test/rustdoc/attributes.rs index eb0e3f065c..6ecdad3ec0 100644 --- a/src/test/rustdoc/attributes.rs +++ b/src/test/rustdoc/attributes.rs @@ -8,8 +8,8 @@ pub extern "C" fn f() {} #[export_name = "bar"] pub extern "C" fn g() {} -// @has foo/enum.Foo.html '//*[@class="docblock attributes"]' '#[repr(i64)]' -// @has foo/enum.Foo.html '//*[@class="docblock attributes"]' '#[must_use]' +// @has foo/enum.Foo.html '//*[@class="docblock attributes top-attr"]' '#[repr(i64)]' +// @has foo/enum.Foo.html '//*[@class="docblock attributes top-attr"]' '#[must_use]' #[repr(i64)] #[must_use] pub enum Foo { diff --git a/src/test/rustdoc/auxiliary/intra-links-external-traits.rs b/src/test/rustdoc/auxiliary/intra-links-external-traits.rs new file mode 100644 index 0000000000..6142dcda98 --- /dev/null +++ b/src/test/rustdoc/auxiliary/intra-links-external-traits.rs @@ -0,0 +1,6 @@ +pub trait ThisTrait { + fn asdf(&self); + + /// let's link to [`asdf`](ThisTrait::asdf) + fn qwop(&self); +} diff --git a/src/test/rustdoc/auxiliary/issue-23207-2.rs b/src/test/rustdoc/auxiliary/issue-23207-2.rs index e1afb68dc7..b92b166531 100644 --- a/src/test/rustdoc/auxiliary/issue-23207-2.rs +++ b/src/test/rustdoc/auxiliary/issue-23207-2.rs @@ -3,4 +3,3 @@ extern crate issue_23207_1; pub mod fmt { pub use issue_23207_1::fmt::Error; } - diff --git a/src/test/rustdoc/blanket-reexport-item.rs b/src/test/rustdoc/blanket-reexport-item.rs index a1db90d760..f247ee637b 100644 --- a/src/test/rustdoc/blanket-reexport-item.rs +++ b/src/test/rustdoc/blanket-reexport-item.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -// @has foo/struct.S.html '//h3[@id="impl-Into"]//code' 'impl Into for T' +// @has foo/struct.S.html '//h3[@id="impl-Into%3CU%3E"]//code' 'impl Into for T' pub struct S2 {} mod m { pub struct S {} diff --git a/src/test/rustdoc/empty-mod-private.rs b/src/test/rustdoc/empty-mod-private.rs index 12576a1b53..c2a98049a4 100644 --- a/src/test/rustdoc/empty-mod-private.rs +++ b/src/test/rustdoc/empty-mod-private.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // compile-flags: --document-private-items // @has 'empty_mod_private/index.html' '//a[@href="foo/index.html"]' 'foo' diff --git a/src/test/rustdoc/extern-html-root-url.rs b/src/test/rustdoc/extern-html-root-url.rs index 674d0305f2..60b7b28ae4 100644 --- a/src/test/rustdoc/extern-html-root-url.rs +++ b/src/test/rustdoc/extern-html-root-url.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - // compile-flags:-Z unstable-options --extern-html-root-url core=https://example.com/core/0.1.0 // @has extern_html_root_url/index.html diff --git a/src/test/rustdoc/generic-const.rs b/src/test/rustdoc/generic-const.rs new file mode 100644 index 0000000000..d6794ac8f1 --- /dev/null +++ b/src/test/rustdoc/generic-const.rs @@ -0,0 +1,30 @@ +#![feature(const_generics)] +#![crate_name = "foo"] + +// ignore-tidy-linelength + +pub enum Order { + Sorted, + Unsorted, +} + +// @has foo/struct.VSet.html '//pre[@class="rust struct"]' 'pub struct VSet' +// @has foo/struct.VSet.html '//h3[@id="impl-Send"]/code' 'impl Send for VSet' +// @has foo/struct.VSet.html '//h3[@id="impl-Sync"]/code' 'impl Sync for VSet' +pub struct VSet { + inner: Vec, +} + +// @has foo/struct.VSet.html '//h3[@id="impl"]/code' 'impl VSet' +impl VSet { + pub fn new() -> Self { + Self { inner: Vec::new() } + } +} + +// @has foo/struct.VSet.html '//h3[@id="impl-1"]/code' 'impl VSet' +impl VSet { + pub fn new() -> Self { + Self { inner: Vec::new() } + } +} diff --git a/src/test/rustdoc/index-page.rs b/src/test/rustdoc/index-page.rs index 6998e73529..f0476f083b 100644 --- a/src/test/rustdoc/index-page.rs +++ b/src/test/rustdoc/index-page.rs @@ -1,3 +1,5 @@ +// aux-build:all-item-types.rs +// build-aux-docs // compile-flags: -Z unstable-options --enable-index-page #![crate_name = "foo"] @@ -5,4 +7,5 @@ // @has foo/../index.html // @has - '//span[@class="in-band"]' 'List of all crates' // @has - '//ul[@class="mod"]//a[@href="foo/index.html"]' 'foo' +// @has - '//ul[@class="mod"]//a[@href="all_item_types/index.html"]' 'all_item_types' pub struct Foo; diff --git a/src/test/rustdoc/inline_cross/auxiliary/proc_macro.rs b/src/test/rustdoc/inline_cross/auxiliary/proc_macro.rs index 9836b6ba2e..c99ef74433 100644 --- a/src/test/rustdoc/inline_cross/auxiliary/proc_macro.rs +++ b/src/test/rustdoc/inline_cross/auxiliary/proc_macro.rs @@ -25,4 +25,3 @@ pub fn some_proc_attr(_attr: TokenStream, item: TokenStream) -> TokenStream { pub fn some_derive(_item: TokenStream) -> TokenStream { TokenStream::new() } - diff --git a/src/test/rustdoc/inline_cross/auxiliary/rustdoc-trait-object-impl.rs b/src/test/rustdoc/inline_cross/auxiliary/rustdoc-trait-object-impl.rs index 76913f02cf..11d8733c40 100644 --- a/src/test/rustdoc/inline_cross/auxiliary/rustdoc-trait-object-impl.rs +++ b/src/test/rustdoc/inline_cross/auxiliary/rustdoc-trait-object-impl.rs @@ -11,4 +11,3 @@ impl<'a> fmt::Debug for Bar + 'a { Ok(()) } } - diff --git a/src/test/rustdoc/inline_cross/issue-32881.rs b/src/test/rustdoc/inline_cross/issue-32881.rs index f783837d06..5f31e6cd3a 100644 --- a/src/test/rustdoc/inline_cross/issue-32881.rs +++ b/src/test/rustdoc/inline_cross/issue-32881.rs @@ -9,4 +9,3 @@ extern crate rustdoc_trait_object_impl; // @has - '//code' "impl<'a> Debug for dyn Bar" pub use rustdoc_trait_object_impl::Bar; - diff --git a/src/test/rustdoc/intra-link-libstd-re-export.rs b/src/test/rustdoc/intra-link-libstd-re-export.rs new file mode 100644 index 0000000000..6f239292ec --- /dev/null +++ b/src/test/rustdoc/intra-link-libstd-re-export.rs @@ -0,0 +1,3 @@ +#![deny(intra_doc_link_resolution_failure)] + +pub use std::*; diff --git a/src/test/rustdoc/intra-links-external-traits.rs b/src/test/rustdoc/intra-links-external-traits.rs new file mode 100644 index 0000000000..d6b4a8ad58 --- /dev/null +++ b/src/test/rustdoc/intra-links-external-traits.rs @@ -0,0 +1,12 @@ +// aux-build:intra-links-external-traits.rs +// ignore-cross-compile + +#![crate_name = "outer"] +#![deny(intra_doc_link_resolution_failure)] + +// using a trait that has intra-doc links on it from another crate (whether re-exporting or just +// implementing it) used to give spurious resolution failure warnings + +extern crate intra_links_external_traits; + +pub use intra_links_external_traits::ThisTrait; diff --git a/src/test/rustdoc/issue-15318-2.rs b/src/test/rustdoc/issue-15318-2.rs index 1dbfba988e..2af811ad5b 100644 --- a/src/test/rustdoc/issue-15318-2.rs +++ b/src/test/rustdoc/issue-15318-2.rs @@ -9,4 +9,3 @@ pub use issue_15318::ptr; // '//*[@href="primitive.pointer.html"]' \ // '*mut T' pub fn bar(ptr: *mut T) {} - diff --git a/src/test/rustdoc/issue-19190-3.rs b/src/test/rustdoc/issue-19190-3.rs index f7366302a1..4d34ce6509 100644 --- a/src/test/rustdoc/issue-19190-3.rs +++ b/src/test/rustdoc/issue-19190-3.rs @@ -25,4 +25,3 @@ impl Deref for MyBar { type Target = Baz; fn deref(&self) -> &Baz { loop {} } } - diff --git a/src/test/rustdoc/issue-20727-2.rs b/src/test/rustdoc/issue-20727-2.rs index 7c8b82fbe2..022ff290e1 100644 --- a/src/test/rustdoc/issue-20727-2.rs +++ b/src/test/rustdoc/issue-20727-2.rs @@ -20,4 +20,3 @@ pub mod reexport { // @has - '//*[@class="rust trait"]' 'fn add(self, rhs: RHS) -> Self::Output;' pub use issue_20727::Add; } - diff --git a/src/test/rustdoc/issue-23207.rs b/src/test/rustdoc/issue-23207.rs index 747c59bba6..1a4b849ee8 100644 --- a/src/test/rustdoc/issue-23207.rs +++ b/src/test/rustdoc/issue-23207.rs @@ -7,4 +7,3 @@ extern crate issue_23207_2; // @has issue_23207/fmt/index.html // @count - '//*[@class="struct"]' 1 pub use issue_23207_2::fmt; - diff --git a/src/test/rustdoc/issue-34473.rs b/src/test/rustdoc/issue-34473.rs index 3f824e6404..d96301f3ae 100644 --- a/src/test/rustdoc/issue-34473.rs +++ b/src/test/rustdoc/issue-34473.rs @@ -7,6 +7,5 @@ mod second { // @has foo/index.html // @!has - SomeTypeWithLongName // @has foo/struct.SomeType.html -// @!has - SomeTypeWithLongName // @!has foo/struct.SomeTypeWithLongName.html pub use second::{SomeTypeWithLongName as SomeType}; diff --git a/src/test/rustdoc/issue-38129.rs b/src/test/rustdoc/issue-38129.rs index bf9d5e4330..156d50fa52 100644 --- a/src/test/rustdoc/issue-38129.rs +++ b/src/test/rustdoc/issue-38129.rs @@ -97,4 +97,3 @@ pub fn both_attrs() {} /// assert_eq!(1 + 1, 2); /// ``` pub fn both_attrs_reverse() {} - diff --git a/src/test/rustdoc/issue-56701.rs b/src/test/rustdoc/issue-56701.rs index 6fb30a4ff4..ba00743fcd 100644 --- a/src/test/rustdoc/issue-56701.rs +++ b/src/test/rustdoc/issue-56701.rs @@ -31,4 +31,3 @@ impl>> Deref for Unrelated Foo for &'a str" +pub trait Foo {} + +impl Foo for u32 {} + +impl<'a> Foo for &'a str {} diff --git a/src/test/rustdoc/static-root-path.rs b/src/test/rustdoc/static-root-path.rs index 84b32f90c8..2f7c89c5f1 100644 --- a/src/test/rustdoc/static-root-path.rs +++ b/src/test/rustdoc/static-root-path.rs @@ -12,3 +12,7 @@ pub struct SomeStruct; // @!matches - '"\.\./\.\./source-script\.js"' // @matches - '"\.\./\.\./source-files.js"' // @!matches - '"/cache/source-files\.js"' + +// @has settings.html +// @matches - '/cache/settings\.js' +// @!matches - '\./settings\.js' diff --git a/src/test/rustdoc/synthetic_auto/complex.rs b/src/test/rustdoc/synthetic_auto/complex.rs index 609cefc711..80a717718c 100644 --- a/src/test/rustdoc/synthetic_auto/complex.rs +++ b/src/test/rustdoc/synthetic_auto/complex.rs @@ -21,7 +21,7 @@ mod foo { // @has complex/struct.NotOuter.html // @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//code' "impl<'a, T, K: \ -// ?Sized> Send for NotOuter<'a, T, K> where K: for<'b> Fn((&'b bool, &'a u8)) \ +// ?Sized> Send for Outer<'a, T, K> where K: for<'b> Fn((&'b bool, &'a u8)) \ // -> &'b i8, T: MyTrait<'a>, >::MyItem: Copy, 'a: 'static" pub use foo::{Foo, Inner as NotInner, MyTrait as NotMyTrait, Outer as NotOuter}; diff --git a/src/test/rustdoc/synthetic_auto/self-referential.rs b/src/test/rustdoc/synthetic_auto/self-referential.rs index 7d15434afe..905aa20918 100644 --- a/src/test/rustdoc/synthetic_auto/self-referential.rs +++ b/src/test/rustdoc/synthetic_auto/self-referential.rs @@ -27,4 +27,3 @@ impl Pattern for Wrapper { // WriteAndThen where ::Value: Send" pub struct WriteAndThen(pub P1::Value,pub > as Pattern>::Value) where P1: Pattern; - diff --git a/src/test/ui-fulldeps/auxiliary/attr-plugin-test.rs b/src/test/ui-fulldeps/auxiliary/attr-plugin-test.rs index c83e7bdb99..039124f31f 100644 --- a/src/test/ui-fulldeps/auxiliary/attr-plugin-test.rs +++ b/src/test/ui-fulldeps/auxiliary/attr-plugin-test.rs @@ -8,14 +8,14 @@ extern crate syntax; extern crate rustc; extern crate rustc_plugin; +use syntax::symbol::Symbol; use syntax::feature_gate::AttributeType; use rustc_plugin::Registry; - #[plugin_registrar] pub fn plugin_registrar(reg: &mut Registry) { - reg.register_attribute("foo".to_owned(), AttributeType::Normal); - reg.register_attribute("bar".to_owned(), AttributeType::CrateLevel); - reg.register_attribute("baz".to_owned(), AttributeType::Whitelisted); + reg.register_attribute(Symbol::intern("foo"), AttributeType::Normal); + reg.register_attribute(Symbol::intern("bar"), AttributeType::CrateLevel); + reg.register_attribute(Symbol::intern("baz"), AttributeType::Whitelisted); } diff --git a/src/test/ui-fulldeps/auxiliary/lint-for-crate.rs b/src/test/ui-fulldeps/auxiliary/lint-for-crate.rs index e8f1d2eedf..7656b15721 100644 --- a/src/test/ui-fulldeps/auxiliary/lint-for-crate.rs +++ b/src/test/ui-fulldeps/auxiliary/lint-for-crate.rs @@ -11,6 +11,7 @@ use rustc::lint::{LateContext, LintContext, LintPass, LateLintPass, LateLintPass use rustc_plugin::Registry; use rustc::hir; use syntax::attr; +use syntax::symbol::Symbol; declare_lint! { CRATE_NOT_OKAY, @@ -22,7 +23,7 @@ declare_lint_pass!(Pass => [CRATE_NOT_OKAY]); impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass { fn check_crate(&mut self, cx: &LateContext, krate: &hir::Crate) { - if !attr::contains_name(&krate.attrs, "crate_okay") { + if !attr::contains_name(&krate.attrs, Symbol::intern("crate_okay")) { cx.span_lint(CRATE_NOT_OKAY, krate.span, "crate is not marked with #![crate_okay]"); } diff --git a/src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs b/src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs index 1d204e7bfc..0deb1bf091 100644 --- a/src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs +++ b/src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs @@ -20,7 +20,7 @@ declare_lint_pass!(Pass => [TEST_LINT]); impl EarlyLintPass for Pass { fn check_item(&mut self, cx: &EarlyContext, it: &ast::Item) { - if it.ident.name == "lintme" { + if it.ident.name.as_str() == "lintme" { cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'"); } } diff --git a/src/test/ui-fulldeps/auxiliary/lint-tool-test.rs b/src/test/ui-fulldeps/auxiliary/lint-tool-test.rs index 182d2899da..64664377cd 100644 --- a/src/test/ui-fulldeps/auxiliary/lint-tool-test.rs +++ b/src/test/ui-fulldeps/auxiliary/lint-tool-test.rs @@ -23,10 +23,10 @@ declare_lint_pass!(Pass => [TEST_LINT, TEST_GROUP]); impl EarlyLintPass for Pass { fn check_item(&mut self, cx: &EarlyContext, it: &ast::Item) { - if it.ident.name == "lintme" { + if it.ident.name.as_str() == "lintme" { cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'"); } - if it.ident.name == "lintmetoo" { + if it.ident.name.as_str() == "lintmetoo" { cx.span_lint(TEST_GROUP, it.span, "item is named 'lintmetoo'"); } } diff --git a/src/test/ui-fulldeps/dropck-tarena-cycle-checked.stderr b/src/test/ui-fulldeps/dropck-tarena-cycle-checked.stderr index b6d5ee0caf..7009c0bba6 100644 --- a/src/test/ui-fulldeps/dropck-tarena-cycle-checked.stderr +++ b/src/test/ui-fulldeps/dropck-tarena-cycle-checked.stderr @@ -1,12 +1,13 @@ error[E0597]: `arena` does not live long enough - --> $DIR/dropck-tarena-cycle-checked.rs:116:8 + --> $DIR/dropck-tarena-cycle-checked.rs:116:7 | LL | f(&arena); - | ^^^^^ borrowed value does not live long enough + | ^^^^^^ borrowed value does not live long enough LL | } - | - `arena` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + | - + | | + | `arena` dropped here while still borrowed + | borrow might be used here, when `arena` is dropped and runs the `Drop` code for type `arena::TypedArena` error: aborting due to previous error diff --git a/src/test/ui-fulldeps/dropck-tarena-unsound-drop.rs b/src/test/ui-fulldeps/dropck-tarena-unsound-drop.rs index 3103aef36c..e454f44d1a 100644 --- a/src/test/ui-fulldeps/dropck-tarena-unsound-drop.rs +++ b/src/test/ui-fulldeps/dropck-tarena-unsound-drop.rs @@ -40,4 +40,3 @@ fn main() { let arena: TypedArena = TypedArena::default(); f(&arena); } //~^ ERROR `arena` does not live long enough - diff --git a/src/test/ui-fulldeps/dropck-tarena-unsound-drop.stderr b/src/test/ui-fulldeps/dropck-tarena-unsound-drop.stderr index 1e612f0498..319848b989 100644 --- a/src/test/ui-fulldeps/dropck-tarena-unsound-drop.stderr +++ b/src/test/ui-fulldeps/dropck-tarena-unsound-drop.stderr @@ -1,12 +1,13 @@ error[E0597]: `arena` does not live long enough - --> $DIR/dropck-tarena-unsound-drop.rs:41:8 + --> $DIR/dropck-tarena-unsound-drop.rs:41:7 | LL | f(&arena); - | ^^^^^ borrowed value does not live long enough + | ^^^^^^ borrowed value does not live long enough LL | } - | - `arena` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + | - + | | + | `arena` dropped here while still borrowed + | borrow might be used here, when `arena` is dropped and runs the `Drop` code for type `arena::TypedArena` error: aborting due to previous error diff --git a/src/test/ui-fulldeps/gated-plugin.stderr b/src/test/ui-fulldeps/gated-plugin.stderr index 37c2b44324..4f8bcda902 100644 --- a/src/test/ui-fulldeps/gated-plugin.stderr +++ b/src/test/ui-fulldeps/gated-plugin.stderr @@ -1,9 +1,10 @@ -error[E0658]: compiler plugins are experimental and possibly buggy (see issue #29597) +error[E0658]: compiler plugins are experimental and possibly buggy --> $DIR/gated-plugin.rs:3:1 | LL | #![plugin(attr_plugin_test)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29597 = help: add #![feature(plugin)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui-fulldeps/hash-stable-is-unstable.stderr b/src/test/ui-fulldeps/hash-stable-is-unstable.stderr index e7007204d3..2c1aa1f5d8 100644 --- a/src/test/ui-fulldeps/hash-stable-is-unstable.stderr +++ b/src/test/ui-fulldeps/hash-stable-is-unstable.stderr @@ -2,47 +2,52 @@ error[E0601]: `main` function not found in crate `hash_stable_is_unstable` | = note: consider adding a `main` function to `$DIR/hash-stable-is-unstable.rs` -error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? (see issue #27812) +error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? --> $DIR/hash-stable-is-unstable.rs:3:1 | LL | extern crate rustc_data_structures; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/27812 = help: add #![feature(rustc_private)] to the crate attributes to enable -error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? (see issue #27812) +error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? --> $DIR/hash-stable-is-unstable.rs:5:1 | LL | extern crate rustc; | ^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/27812 = help: add #![feature(rustc_private)] to the crate attributes to enable -error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? (see issue #27812) +error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? --> $DIR/hash-stable-is-unstable.rs:7:1 | LL | extern crate rustc_macros; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/27812 = help: add #![feature(rustc_private)] to the crate attributes to enable -error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? (see issue #27812) +error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? --> $DIR/hash-stable-is-unstable.rs:10:5 | LL | use rustc_macros::HashStable; | ^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/27812 = help: add #![feature(rustc_private)] to the crate attributes to enable -error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? (see issue #27812) +error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? --> $DIR/hash-stable-is-unstable.rs:13:10 | LL | #[derive(HashStable)] | ^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/27812 = help: add #![feature(rustc_private)] to the crate attributes to enable error: aborting due to 6 previous errors -Some errors occurred: E0601, E0658. +Some errors have detailed explanations: E0601, E0658. For more information about an error, try `rustc --explain E0601`. diff --git a/src/test/ui-fulldeps/internal-lints/pass_ty_by_ref.rs b/src/test/ui-fulldeps/internal-lints/pass_ty_by_ref.rs new file mode 100644 index 0000000000..075ce8b1a1 --- /dev/null +++ b/src/test/ui-fulldeps/internal-lints/pass_ty_by_ref.rs @@ -0,0 +1,64 @@ +// compile-flags: -Z unstable-options + +#![feature(rustc_private)] +#![deny(ty_pass_by_reference)] +#![allow(unused)] + +extern crate rustc; + +use rustc::ty::{Ty, TyCtxt}; + +fn ty_by_ref( + ty_val: Ty<'_>, + ty_ref: &Ty<'_>, //~ ERROR passing `Ty<'_>` by reference + ty_ctxt_val: TyCtxt<'_, '_, '_>, + ty_ctxt_ref: &TyCtxt<'_, '_, '_>, //~ ERROR passing `TyCtxt<'_, '_, '_>` by reference +) { +} + +fn ty_multi_ref(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_, '_, '_>) {} +//~^ ERROR passing `Ty<'_>` by reference +//~^^ ERROR passing `TyCtxt<'_, '_, '_>` by reference + +trait T { + fn ty_by_ref_in_trait( + ty_val: Ty<'_>, + ty_ref: &Ty<'_>, //~ ERROR passing `Ty<'_>` by reference + ty_ctxt_val: TyCtxt<'_, '_, '_>, + ty_ctxt_ref: &TyCtxt<'_, '_, '_>, //~ ERROR passing `TyCtxt<'_, '_, '_>` by reference + ); + + fn ty_multi_ref_in_trait(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_, '_, '_>); + //~^ ERROR passing `Ty<'_>` by reference + //~^^ ERROR passing `TyCtxt<'_, '_, '_>` by reference +} + +struct Foo; + +impl T for Foo { + fn ty_by_ref_in_trait( + ty_val: Ty<'_>, + ty_ref: &Ty<'_>, + ty_ctxt_val: TyCtxt<'_, '_, '_>, + ty_ctxt_ref: &TyCtxt<'_, '_, '_>, + ) { + } + + fn ty_multi_ref_in_trait(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_, '_, '_>) {} +} + +impl Foo { + fn ty_by_ref_assoc( + ty_val: Ty<'_>, + ty_ref: &Ty<'_>, //~ ERROR passing `Ty<'_>` by reference + ty_ctxt_val: TyCtxt<'_, '_, '_>, + ty_ctxt_ref: &TyCtxt<'_, '_, '_>, //~ ERROR passing `TyCtxt<'_, '_, '_>` by reference + ) { + } + + fn ty_multi_ref_assoc(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_, '_, '_>) {} + //~^ ERROR passing `Ty<'_>` by reference + //~^^ ERROR passing `TyCtxt<'_, '_, '_>` by reference +} + +fn main() {} diff --git a/src/test/ui-fulldeps/internal-lints/pass_ty_by_ref.stderr b/src/test/ui-fulldeps/internal-lints/pass_ty_by_ref.stderr new file mode 100644 index 0000000000..f3e630f3be --- /dev/null +++ b/src/test/ui-fulldeps/internal-lints/pass_ty_by_ref.stderr @@ -0,0 +1,80 @@ +error: passing `Ty<'_>` by reference + --> $DIR/pass_ty_by_ref.rs:13:13 + | +LL | ty_ref: &Ty<'_>, + | ^^^^^^^ help: try passing by value: `Ty<'_>` + | +note: lint level defined here + --> $DIR/pass_ty_by_ref.rs:4:9 + | +LL | #![deny(ty_pass_by_reference)] + | ^^^^^^^^^^^^^^^^^^^^ + +error: passing `TyCtxt<'_, '_, '_>` by reference + --> $DIR/pass_ty_by_ref.rs:15:18 + | +LL | ty_ctxt_ref: &TyCtxt<'_, '_, '_>, + | ^^^^^^^^^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_, '_, '_>` + +error: passing `Ty<'_>` by reference + --> $DIR/pass_ty_by_ref.rs:19:28 + | +LL | fn ty_multi_ref(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_, '_, '_>) {} + | ^^^^^^^ help: try passing by value: `Ty<'_>` + +error: passing `TyCtxt<'_, '_, '_>` by reference + --> $DIR/pass_ty_by_ref.rs:19:55 + | +LL | fn ty_multi_ref(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_, '_, '_>) {} + | ^^^^^^^^^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_, '_, '_>` + +error: passing `Ty<'_>` by reference + --> $DIR/pass_ty_by_ref.rs:26:17 + | +LL | ty_ref: &Ty<'_>, + | ^^^^^^^ help: try passing by value: `Ty<'_>` + +error: passing `TyCtxt<'_, '_, '_>` by reference + --> $DIR/pass_ty_by_ref.rs:28:22 + | +LL | ty_ctxt_ref: &TyCtxt<'_, '_, '_>, + | ^^^^^^^^^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_, '_, '_>` + +error: passing `Ty<'_>` by reference + --> $DIR/pass_ty_by_ref.rs:31:41 + | +LL | fn ty_multi_ref_in_trait(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_, '_, '_>); + | ^^^^^^^ help: try passing by value: `Ty<'_>` + +error: passing `TyCtxt<'_, '_, '_>` by reference + --> $DIR/pass_ty_by_ref.rs:31:68 + | +LL | fn ty_multi_ref_in_trait(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_, '_, '_>); + | ^^^^^^^^^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_, '_, '_>` + +error: passing `Ty<'_>` by reference + --> $DIR/pass_ty_by_ref.rs:53:17 + | +LL | ty_ref: &Ty<'_>, + | ^^^^^^^ help: try passing by value: `Ty<'_>` + +error: passing `TyCtxt<'_, '_, '_>` by reference + --> $DIR/pass_ty_by_ref.rs:55:22 + | +LL | ty_ctxt_ref: &TyCtxt<'_, '_, '_>, + | ^^^^^^^^^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_, '_, '_>` + +error: passing `Ty<'_>` by reference + --> $DIR/pass_ty_by_ref.rs:59:38 + | +LL | fn ty_multi_ref_assoc(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_, '_, '_>) {} + | ^^^^^^^ help: try passing by value: `Ty<'_>` + +error: passing `TyCtxt<'_, '_, '_>` by reference + --> $DIR/pass_ty_by_ref.rs:59:65 + | +LL | fn ty_multi_ref_assoc(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_, '_, '_>) {} + | ^^^^^^^^^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_, '_, '_>` + +error: aborting due to 12 previous errors + diff --git a/src/test/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.rs b/src/test/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.rs new file mode 100644 index 0000000000..5e10697ec6 --- /dev/null +++ b/src/test/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.rs @@ -0,0 +1,35 @@ +// compile-flags: -Z unstable-options + +#![feature(rustc_private)] +#![deny(usage_of_qualified_ty)] +#![allow(unused)] + +extern crate rustc; + +use rustc::ty::{self, Ty, TyCtxt}; + +macro_rules! qualified_macro { + ($a:ident) => { + fn ty_in_macro( + ty_q: ty::Ty<'_>, + ty: Ty<'_>, + ty_ctxt_q: ty::TyCtxt<'_, '_, '_>, + ty_ctxt: TyCtxt<'_, '_, '_>, + ) { + println!("{}", stringify!($a)); + } + }; +} + +fn ty_qualified( + ty_q: ty::Ty<'_>, //~ ERROR usage of qualified `ty::Ty<'_>` + ty: Ty<'_>, + ty_ctxt_q: ty::TyCtxt<'_, '_, '_>, //~ ERROR usage of qualified `ty::TyCtxt<'_, '_, '_>` + ty_ctxt: TyCtxt<'_, '_, '_>, +) { +} + + +fn main() { + qualified_macro!(a); +} diff --git a/src/test/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.stderr b/src/test/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.stderr new file mode 100644 index 0000000000..31d776cd9e --- /dev/null +++ b/src/test/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.stderr @@ -0,0 +1,20 @@ +error: usage of qualified `ty::Ty<'_>` + --> $DIR/qualified_ty_ty_ctxt.rs:25:11 + | +LL | ty_q: ty::Ty<'_>, + | ^^^^^^^^^^ help: try using it unqualified: `Ty<'_>` + | +note: lint level defined here + --> $DIR/qualified_ty_ty_ctxt.rs:4:9 + | +LL | #![deny(usage_of_qualified_ty)] + | ^^^^^^^^^^^^^^^^^^^^^ + +error: usage of qualified `ty::TyCtxt<'_, '_, '_>` + --> $DIR/qualified_ty_ty_ctxt.rs:27:16 + | +LL | ty_ctxt_q: ty::TyCtxt<'_, '_, '_>, + | ^^^^^^^^^^^^^^^^^^^^^^ help: try using it unqualified: `TyCtxt<'_, '_, '_>` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui-fulldeps/internal-lints/ty_tykind_usage.stderr b/src/test/ui-fulldeps/internal-lints/ty_tykind_usage.stderr index 4e94af1245..10229a331c 100644 --- a/src/test/ui-fulldeps/internal-lints/ty_tykind_usage.stderr +++ b/src/test/ui-fulldeps/internal-lints/ty_tykind_usage.stderr @@ -190,7 +190,7 @@ error: usage of `ty::TyKind` LL | fn ty_kind(ty_bad: TyKind<'_>, ty_good: Ty<'_>) {} | ^^^^^^^^^^ | - = help: try using `ty::Ty` instead + = help: try using `Ty` instead error: aborting due to 31 previous errors diff --git a/src/test/ui-fulldeps/macro-crate-rlib.stderr b/src/test/ui-fulldeps/macro-crate-rlib.stderr index 0651cee56f..a5a5456a31 100644 --- a/src/test/ui-fulldeps/macro-crate-rlib.stderr +++ b/src/test/ui-fulldeps/macro-crate-rlib.stderr @@ -6,4 +6,3 @@ LL | #![plugin(rlib_crate_test)] error: aborting due to previous error -For more information about this error, try `rustc --explain E0457`. diff --git a/src/test/ui/E0501.ast.stderr b/src/test/ui/E0501.ast.stderr deleted file mode 100644 index e2f54c6553..0000000000 --- a/src/test/ui/E0501.ast.stderr +++ /dev/null @@ -1,31 +0,0 @@ -error[E0501]: cannot borrow `*a` as mutable because previous closure requires unique access - --> $DIR/E0501.rs:18:23 - | -LL | let bar = || { - | -- closure construction occurs here -LL | inside_closure(a) - | - previous borrow occurs due to use of `a` in closure -LL | }; -LL | outside_closure_1(a); - | ^ borrow occurs here -... -LL | } - | - borrow from closure ends here - -error[E0501]: cannot borrow `*a` as immutable because previous closure requires unique access - --> $DIR/E0501.rs:21:23 - | -LL | let bar = || { - | -- closure construction occurs here -LL | inside_closure(a) - | - previous borrow occurs due to use of `a` in closure -... -LL | outside_closure_2(a); - | ^ borrow occurs here -... -LL | } - | - borrow from closure ends here - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0501`. diff --git a/src/test/ui/E0501.mir.stderr b/src/test/ui/E0501.mir.stderr deleted file mode 100644 index 74f14bebcc..0000000000 --- a/src/test/ui/E0501.mir.stderr +++ /dev/null @@ -1,31 +0,0 @@ -error[E0501]: cannot borrow `*a` as mutable because previous closure requires unique access - --> $DIR/E0501.rs:18:23 - | -LL | let bar = || { - | -- closure construction occurs here -LL | inside_closure(a) - | - first borrow occurs due to use of `a` in closure -LL | }; -LL | outside_closure_1(a); - | ^ second borrow occurs here -... -LL | drop(bar); - | --- first borrow later used here - -error[E0501]: cannot borrow `*a` as immutable because previous closure requires unique access - --> $DIR/E0501.rs:21:23 - | -LL | let bar = || { - | -- closure construction occurs here -LL | inside_closure(a) - | - first borrow occurs due to use of `a` in closure -... -LL | outside_closure_2(a); - | ^ second borrow occurs here -... -LL | drop(bar); - | --- first borrow later used here - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0501`. diff --git a/src/test/ui/E0501.rs b/src/test/ui/E0501.rs index a710e23a67..3e39d9a63c 100644 --- a/src/test/ui/E0501.rs +++ b/src/test/ui/E0501.rs @@ -1,7 +1,3 @@ -// ignore-tidy-linelength -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - fn inside_closure(x: &mut i32) { } @@ -15,11 +11,11 @@ fn foo(a: &mut i32) { let bar = || { inside_closure(a) }; - outside_closure_1(a); //[ast]~ ERROR cannot borrow `*a` as mutable because previous closure requires unique access - //[mir]~^ ERROR cannot borrow `*a` as mutable because previous closure requires unique access + outside_closure_1(a); + //~^ ERROR cannot borrow `*a` as mutable because previous closure requires unique access - outside_closure_2(a); //[ast]~ ERROR cannot borrow `*a` as immutable because previous closure requires unique access - //[mir]~^ ERROR cannot borrow `*a` as immutable because previous closure requires unique access + outside_closure_2(a); + //~^ ERROR cannot borrow `*a` as immutable because previous closure requires unique access drop(bar); } diff --git a/src/test/ui/E0501.ast.nll.stderr b/src/test/ui/E0501.stderr similarity index 95% rename from src/test/ui/E0501.ast.nll.stderr rename to src/test/ui/E0501.stderr index 74f14bebcc..53d98d7e13 100644 --- a/src/test/ui/E0501.ast.nll.stderr +++ b/src/test/ui/E0501.stderr @@ -1,5 +1,5 @@ error[E0501]: cannot borrow `*a` as mutable because previous closure requires unique access - --> $DIR/E0501.rs:18:23 + --> $DIR/E0501.rs:14:23 | LL | let bar = || { | -- closure construction occurs here @@ -13,7 +13,7 @@ LL | drop(bar); | --- first borrow later used here error[E0501]: cannot borrow `*a` as immutable because previous closure requires unique access - --> $DIR/E0501.rs:21:23 + --> $DIR/E0501.rs:17:23 | LL | let bar = || { | -- closure construction occurs here diff --git a/src/test/ui/E0506.ast.nll.stderr b/src/test/ui/E0506.ast.nll.stderr deleted file mode 100644 index 6e2d63441e..0000000000 --- a/src/test/ui/E0506.ast.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0506]: cannot assign to `fancy_num` because it is borrowed - --> $DIR/E0506.rs:11:5 - | -LL | let fancy_ref = &fancy_num; - | ---------- borrow of `fancy_num` occurs here -LL | fancy_num = FancyNum { num: 6 }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `fancy_num` occurs here -... -LL | println!("Num: {}, Ref: {}", fancy_num.num, fancy_ref.num); - | ------------- borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/E0506.ast.stderr b/src/test/ui/E0506.ast.stderr deleted file mode 100644 index 3e3001f232..0000000000 --- a/src/test/ui/E0506.ast.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0506]: cannot assign to `fancy_num` because it is borrowed - --> $DIR/E0506.rs:11:5 - | -LL | let fancy_ref = &fancy_num; - | --------- borrow of `fancy_num` occurs here -LL | fancy_num = FancyNum { num: 6 }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `fancy_num` occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/E0506.rs b/src/test/ui/E0506.rs index 04aaa008b5..062a44a52b 100644 --- a/src/test/ui/E0506.rs +++ b/src/test/ui/E0506.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - struct FancyNum { num: u8, } @@ -8,8 +5,7 @@ struct FancyNum { fn main() { let mut fancy_num = FancyNum { num: 5 }; let fancy_ref = &fancy_num; - fancy_num = FancyNum { num: 6 }; //[ast]~ ERROR E0506 - //[mir]~^ ERROR [E0506] + fancy_num = FancyNum { num: 6 }; //~ ERROR [E0506] println!("Num: {}, Ref: {}", fancy_num.num, fancy_ref.num); } diff --git a/src/test/ui/E0506.mir.stderr b/src/test/ui/E0506.stderr similarity index 95% rename from src/test/ui/E0506.mir.stderr rename to src/test/ui/E0506.stderr index 6e2d63441e..17f883f84b 100644 --- a/src/test/ui/E0506.mir.stderr +++ b/src/test/ui/E0506.stderr @@ -1,11 +1,11 @@ error[E0506]: cannot assign to `fancy_num` because it is borrowed - --> $DIR/E0506.rs:11:5 + --> $DIR/E0506.rs:8:5 | LL | let fancy_ref = &fancy_num; | ---------- borrow of `fancy_num` occurs here LL | fancy_num = FancyNum { num: 6 }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `fancy_num` occurs here -... +LL | LL | println!("Num: {}, Ref: {}", fancy_num.num, fancy_ref.num); | ------------- borrow later used here diff --git a/src/test/ui/E0508-fail.ast.nll.stderr b/src/test/ui/E0508-fail.ast.nll.stderr deleted file mode 100644 index 972b84e37b..0000000000 --- a/src/test/ui/E0508-fail.ast.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array - --> $DIR/E0508-fail.rs:8:18 - | -LL | let _value = array[0]; - | ^^^^^^^^ - | | - | cannot move out of here - | help: consider borrowing here: `&array[0]` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0508`. diff --git a/src/test/ui/E0508-fail.ast.stderr b/src/test/ui/E0508-fail.ast.stderr deleted file mode 100644 index 8b249839f0..0000000000 --- a/src/test/ui/E0508-fail.ast.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array - --> $DIR/E0508-fail.rs:8:18 - | -LL | let _value = array[0]; - | ^^^^^^^^ - | | - | cannot move out of here - | help: consider using a reference instead: `&array[0]` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0508`. diff --git a/src/test/ui/E0508-fail.mir.stderr b/src/test/ui/E0508-fail.mir.stderr deleted file mode 100644 index 972b84e37b..0000000000 --- a/src/test/ui/E0508-fail.mir.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array - --> $DIR/E0508-fail.rs:8:18 - | -LL | let _value = array[0]; - | ^^^^^^^^ - | | - | cannot move out of here - | help: consider borrowing here: `&array[0]` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0508`. diff --git a/src/test/ui/E0508-fail.rs b/src/test/ui/E0508-fail.rs index 20eac6cd35..072c3d6618 100644 --- a/src/test/ui/E0508-fail.rs +++ b/src/test/ui/E0508-fail.rs @@ -1,10 +1,6 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - struct NonCopy; fn main() { let array = [NonCopy; 1]; - let _value = array[0]; //[ast]~ ERROR [E0508] - //[mir]~^ ERROR [E0508] + let _value = array[0]; //~ ERROR [E0508] } diff --git a/src/test/ui/E0508.nll.stderr b/src/test/ui/E0508-fail.stderr similarity index 92% rename from src/test/ui/E0508.nll.stderr rename to src/test/ui/E0508-fail.stderr index 983062e450..63590bec32 100644 --- a/src/test/ui/E0508.nll.stderr +++ b/src/test/ui/E0508-fail.stderr @@ -1,5 +1,5 @@ error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array - --> $DIR/E0508.rs:5:18 + --> $DIR/E0508-fail.rs:5:18 | LL | let _value = array[0]; | ^^^^^^^^ diff --git a/src/test/ui/E0508.stderr b/src/test/ui/E0508.stderr index ba6cff8041..983062e450 100644 --- a/src/test/ui/E0508.stderr +++ b/src/test/ui/E0508.stderr @@ -5,7 +5,7 @@ LL | let _value = array[0]; | ^^^^^^^^ | | | cannot move out of here - | help: consider using a reference instead: `&array[0]` + | help: consider borrowing here: `&array[0]` error: aborting due to previous error diff --git a/src/test/ui/E0594.ast.nll.stderr b/src/test/ui/E0594.ast.nll.stderr deleted file mode 100644 index cc1c968474..0000000000 --- a/src/test/ui/E0594.ast.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0594]: cannot assign to immutable static item `NUM` - --> $DIR/E0594.rs:7:5 - | -LL | NUM = 20; - | ^^^^^^^^ cannot assign - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/E0594.ast.stderr b/src/test/ui/E0594.ast.stderr deleted file mode 100644 index 0c5316da75..0000000000 --- a/src/test/ui/E0594.ast.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0594]: cannot assign to immutable static item - --> $DIR/E0594.rs:7:5 - | -LL | NUM = 20; - | ^^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/E0594.rs b/src/test/ui/E0594.rs index a8ca2fe616..8b0cae7e17 100644 --- a/src/test/ui/E0594.rs +++ b/src/test/ui/E0594.rs @@ -1,9 +1,5 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - static NUM: i32 = 18; fn main() { - NUM = 20; //[ast]~ ERROR E0594 - //[mir]~^ ERROR cannot assign to immutable static item `NUM` + NUM = 20; //~ ERROR cannot assign to immutable static item `NUM` } diff --git a/src/test/ui/E0594.mir.stderr b/src/test/ui/E0594.stderr similarity index 62% rename from src/test/ui/E0594.mir.stderr rename to src/test/ui/E0594.stderr index cc1c968474..c00ec4250a 100644 --- a/src/test/ui/E0594.mir.stderr +++ b/src/test/ui/E0594.stderr @@ -1,9 +1,8 @@ error[E0594]: cannot assign to immutable static item `NUM` - --> $DIR/E0594.rs:7:5 + --> $DIR/E0594.rs:4:5 | LL | NUM = 20; | ^^^^^^^^ cannot assign error: aborting due to previous error -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/E0596.ast.stderr b/src/test/ui/E0596.ast.stderr deleted file mode 100644 index 4b66e49ba8..0000000000 --- a/src/test/ui/E0596.ast.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0596]: cannot borrow immutable local variable `x` as mutable - --> $DIR/E0596.rs:6:18 - | -LL | let x = 1; - | - help: make this binding mutable: `mut x` -LL | let y = &mut x; - | ^ cannot borrow mutably - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/E0596.mir.stderr b/src/test/ui/E0596.mir.stderr deleted file mode 100644 index c89a915cfb..0000000000 --- a/src/test/ui/E0596.mir.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/E0596.rs:6:13 - | -LL | let x = 1; - | - help: consider changing this to be mutable: `mut x` -LL | let y = &mut x; - | ^^^^^^ cannot borrow as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/E0596.rs b/src/test/ui/E0596.rs index 3ea2d64a40..9e2f5ee763 100644 --- a/src/test/ui/E0596.rs +++ b/src/test/ui/E0596.rs @@ -1,8 +1,4 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - fn main() { let x = 1; - let y = &mut x; //[ast]~ ERROR [E0596] - //[mir]~^ ERROR [E0596] + let y = &mut x; //~ ERROR [E0596] } diff --git a/src/test/ui/E0596.ast.nll.stderr b/src/test/ui/E0596.stderr similarity index 93% rename from src/test/ui/E0596.ast.nll.stderr rename to src/test/ui/E0596.stderr index c89a915cfb..79bc258f1f 100644 --- a/src/test/ui/E0596.ast.nll.stderr +++ b/src/test/ui/E0596.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/E0596.rs:6:13 + --> $DIR/E0596.rs:3:13 | LL | let x = 1; | - help: consider changing this to be mutable: `mut x` diff --git a/src/test/ui/E0660.stderr b/src/test/ui/E0660.stderr index d355531ef5..ce34a9b01d 100644 --- a/src/test/ui/E0660.stderr +++ b/src/test/ui/E0660.stderr @@ -12,4 +12,3 @@ LL | asm!("nop" "nop" : "=r"(a)); error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0660`. diff --git a/src/test/ui/E0661.stderr b/src/test/ui/E0661.stderr index 1f41f89608..30a23fd58c 100644 --- a/src/test/ui/E0661.stderr +++ b/src/test/ui/E0661.stderr @@ -6,4 +6,3 @@ LL | asm!("nop" : "r"(a)); error: aborting due to previous error -For more information about this error, try `rustc --explain E0661`. diff --git a/src/test/ui/E0662.stderr b/src/test/ui/E0662.stderr index 5dea744998..0d3701aa95 100644 --- a/src/test/ui/E0662.stderr +++ b/src/test/ui/E0662.stderr @@ -6,4 +6,3 @@ LL | : "=test"("a") error: aborting due to previous error -For more information about this error, try `rustc --explain E0662`. diff --git a/src/test/ui/E0663.stderr b/src/test/ui/E0663.stderr index 01bf89ec79..46a079af15 100644 --- a/src/test/ui/E0663.stderr +++ b/src/test/ui/E0663.stderr @@ -6,4 +6,3 @@ LL | : "+test"("a") error: aborting due to previous error -For more information about this error, try `rustc --explain E0663`. diff --git a/src/test/ui/E0664.stderr b/src/test/ui/E0664.stderr index 9c9f65ee6a..3a99fce6ee 100644 --- a/src/test/ui/E0664.stderr +++ b/src/test/ui/E0664.stderr @@ -6,4 +6,3 @@ LL | : "{eax}" error: aborting due to previous error -For more information about this error, try `rustc --explain E0664`. diff --git a/src/test/ui/E0665.stderr b/src/test/ui/E0665.stderr index 2c2b498e39..84fe3c0139 100644 --- a/src/test/ui/E0665.stderr +++ b/src/test/ui/E0665.stderr @@ -6,4 +6,3 @@ LL | #[derive(Default)] error: aborting due to previous error -For more information about this error, try `rustc --explain E0665`. diff --git a/src/test/ui/access-mode-in-closures.nll.stderr b/src/test/ui/access-mode-in-closures.nll.stderr deleted file mode 100644 index 713eeba545..0000000000 --- a/src/test/ui/access-mode-in-closures.nll.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/access-mode-in-closures.rs:8:15 - | -LL | match *s { S(v) => v } - | ^^ - data moved here - | | - | cannot move out of borrowed content - | help: consider removing the `*`: `s` - | -note: move occurs because `v` has type `std::vec::Vec`, which does not implement the `Copy` trait - --> $DIR/access-mode-in-closures.rs:8:22 - | -LL | match *s { S(v) => v } - | ^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/access-mode-in-closures.stderr b/src/test/ui/access-mode-in-closures.stderr index 9976dfe946..713eeba545 100644 --- a/src/test/ui/access-mode-in-closures.stderr +++ b/src/test/ui/access-mode-in-closures.stderr @@ -2,9 +2,16 @@ error[E0507]: cannot move out of borrowed content --> $DIR/access-mode-in-closures.rs:8:15 | LL | match *s { S(v) => v } - | ^^ - hint: to prevent move, use `ref v` or `ref mut v` + | ^^ - data moved here | | | cannot move out of borrowed content + | help: consider removing the `*`: `s` + | +note: move occurs because `v` has type `std::vec::Vec`, which does not implement the `Copy` trait + --> $DIR/access-mode-in-closures.rs:8:22 + | +LL | match *s { S(v) => v } + | ^ error: aborting due to previous error diff --git a/src/test/ui/allocator-submodule.rs b/src/test/ui/allocator-submodule.rs index a1cca50ba9..7a8d86b8da 100644 --- a/src/test/ui/allocator-submodule.rs +++ b/src/test/ui/allocator-submodule.rs @@ -1,8 +1,6 @@ // Tests that it is possible to create a global allocator in a submodule, rather than in the crate // root. -#![feature(alloc, allocator_api, global_allocator)] - extern crate alloc; use std::{ diff --git a/src/test/ui/allocator-submodule.stderr b/src/test/ui/allocator-submodule.stderr index 26d7aa80ee..91c7c0f6b8 100644 --- a/src/test/ui/allocator-submodule.stderr +++ b/src/test/ui/allocator-submodule.stderr @@ -1,5 +1,5 @@ error: `global_allocator` cannot be used in submodules - --> $DIR/allocator-submodule.rs:27:5 + --> $DIR/allocator-submodule.rs:25:5 | LL | static MY_HEAP: MyAlloc = MyAlloc; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/allocator/two-allocators.rs b/src/test/ui/allocator/two-allocators.rs index c967a45c7b..10fb03c393 100644 --- a/src/test/ui/allocator/two-allocators.rs +++ b/src/test/ui/allocator/two-allocators.rs @@ -7,4 +7,3 @@ static B: System = System; //~^ ERROR: cannot define more than one #[global_allocator] fn main() {} - diff --git a/src/test/ui/allocator/two-allocators2.rs b/src/test/ui/allocator/two-allocators2.rs index b7a07cc274..96da780e4a 100644 --- a/src/test/ui/allocator/two-allocators2.rs +++ b/src/test/ui/allocator/two-allocators2.rs @@ -10,4 +10,3 @@ use std::alloc::System; static A: System = System; fn main() {} - diff --git a/src/test/ui/anonymous-higher-ranked-lifetime.stderr b/src/test/ui/anonymous-higher-ranked-lifetime.stderr index 9e84b14950..8654730397 100644 --- a/src/test/ui/anonymous-higher-ranked-lifetime.stderr +++ b/src/test/ui/anonymous-higher-ranked-lifetime.stderr @@ -308,4 +308,3 @@ LL | fn h2(_: F) where F: for<'t0> Fn(&(), Box, &'t0 (), fn(&(), &() error: aborting due to 22 previous errors -For more information about this error, try `rustc --explain E0631`. diff --git a/src/test/ui/asm/asm-bad-clobber.stderr b/src/test/ui/asm/asm-bad-clobber.stderr index a279421241..15a14e776b 100644 --- a/src/test/ui/asm/asm-bad-clobber.stderr +++ b/src/test/ui/asm/asm-bad-clobber.stderr @@ -6,4 +6,3 @@ LL | asm!("xor %eax, %eax" : : : "{eax}"); error: aborting due to previous error -For more information about this error, try `rustc --explain E0664`. diff --git a/src/test/ui/asm/asm-in-bad-modifier.stderr b/src/test/ui/asm/asm-in-bad-modifier.stderr index 21e80fb980..b71eb8649b 100644 --- a/src/test/ui/asm/asm-in-bad-modifier.stderr +++ b/src/test/ui/asm/asm-in-bad-modifier.stderr @@ -12,5 +12,3 @@ LL | asm!("mov $1, $0" : "=r"(y) : "+r"(5)); error: aborting due to 2 previous errors -Some errors occurred: E0662, E0663. -For more information about an error, try `rustc --explain E0662`. diff --git a/src/test/ui/asm/asm-out-assign-imm.nll.stderr b/src/test/ui/asm/asm-out-assign-imm.nll.stderr deleted file mode 100644 index ac38218b84..0000000000 --- a/src/test/ui/asm/asm-out-assign-imm.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/asm-out-assign-imm.rs:24:34 - | -LL | let x: isize; - | - help: make this binding mutable: `mut x` -LL | x = 1; - | ----- first assignment to `x` -... -LL | asm!("mov $1, $0" : "=r"(x) : "r"(5)); - | ^ cannot assign twice to immutable variable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/asm/asm-out-assign-imm.stderr b/src/test/ui/asm/asm-out-assign-imm.stderr index 98f2f68a8f..ac38218b84 100644 --- a/src/test/ui/asm/asm-out-assign-imm.stderr +++ b/src/test/ui/asm/asm-out-assign-imm.stderr @@ -1,6 +1,8 @@ error[E0384]: cannot assign twice to immutable variable `x` --> $DIR/asm-out-assign-imm.rs:24:34 | +LL | let x: isize; + | - help: make this binding mutable: `mut x` LL | x = 1; | ----- first assignment to `x` ... diff --git a/src/test/ui/asm/asm-out-no-modifier.stderr b/src/test/ui/asm/asm-out-no-modifier.stderr index 99134ceba3..387a603f90 100644 --- a/src/test/ui/asm/asm-out-no-modifier.stderr +++ b/src/test/ui/asm/asm-out-no-modifier.stderr @@ -6,4 +6,3 @@ LL | asm!("mov $1, $0" : "r"(x) : "r"(5)); error: aborting due to previous error -For more information about this error, try `rustc --explain E0661`. diff --git a/src/test/ui/asm/asm-out-read-uninit.mir.stderr b/src/test/ui/asm/asm-out-read-uninit.mir.stderr deleted file mode 100644 index cf74298be4..0000000000 --- a/src/test/ui/asm/asm-out-read-uninit.mir.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0381]: use of possibly uninitialized variable: `x` - --> $DIR/asm-out-read-uninit.rs:25:43 - | -LL | asm!("mov $1, $0" : "=r"(x) : "r"(x)); - | ^ use of possibly uninitialized `x` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/asm/asm-out-read-uninit.rs b/src/test/ui/asm/asm-out-read-uninit.rs index 44dd0503c3..003f1fc5bb 100644 --- a/src/test/ui/asm/asm-out-read-uninit.rs +++ b/src/test/ui/asm/asm-out-read-uninit.rs @@ -8,9 +8,6 @@ // ignore-mips // ignore-mips64 -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - #![feature(asm)] fn foo(x: isize) { println!("{}", x); } @@ -23,8 +20,7 @@ pub fn main() { let x: isize; unsafe { asm!("mov $1, $0" : "=r"(x) : "r"(x)); - //[ast]~^ ERROR use of possibly uninitialized variable: `x` - //[mir]~^^ ERROR use of possibly uninitialized variable: `x` + //~^ ERROR use of possibly uninitialized variable: `x` } foo(x); } diff --git a/src/test/ui/asm/asm-out-read-uninit.ast.stderr b/src/test/ui/asm/asm-out-read-uninit.stderr similarity index 88% rename from src/test/ui/asm/asm-out-read-uninit.ast.stderr rename to src/test/ui/asm/asm-out-read-uninit.stderr index cf74298be4..6d0445d4b7 100644 --- a/src/test/ui/asm/asm-out-read-uninit.ast.stderr +++ b/src/test/ui/asm/asm-out-read-uninit.stderr @@ -1,5 +1,5 @@ error[E0381]: use of possibly uninitialized variable: `x` - --> $DIR/asm-out-read-uninit.rs:25:43 + --> $DIR/asm-out-read-uninit.rs:22:43 | LL | asm!("mov $1, $0" : "=r"(x) : "r"(x)); | ^ use of possibly uninitialized `x` diff --git a/src/test/ui/assign-imm-local-twice.ast.stderr b/src/test/ui/assign-imm-local-twice.ast.stderr deleted file mode 100644 index f16b8e2ebd..0000000000 --- a/src/test/ui/assign-imm-local-twice.ast.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `v` - --> $DIR/assign-imm-local-twice.rs:11:5 - | -LL | v = 1; - | ----- first assignment to `v` -... -LL | v = 2; - | ^^^^^ cannot assign twice to immutable variable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/assign-imm-local-twice.mir.stderr b/src/test/ui/assign-imm-local-twice.mir.stderr deleted file mode 100644 index 2995a139ae..0000000000 --- a/src/test/ui/assign-imm-local-twice.mir.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `v` - --> $DIR/assign-imm-local-twice.rs:11:5 - | -LL | let v: isize; - | - help: make this binding mutable: `mut v` -... -LL | v = 1; - | ----- first assignment to `v` -... -LL | v = 2; - | ^^^^^ cannot assign twice to immutable variable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/assign-imm-local-twice.rs b/src/test/ui/assign-imm-local-twice.rs index de966a1785..c1c9bf6281 100644 --- a/src/test/ui/assign-imm-local-twice.rs +++ b/src/test/ui/assign-imm-local-twice.rs @@ -1,17 +1,11 @@ -// revisions: ast mir -//[mir]compile-flags: -Zborrowck=mir - fn test() { let v: isize; - //[mir]~^ HELP make this binding mutable - //[mir]~| SUGGESTION mut v - v = 1; //[ast]~ NOTE first assignment - //[mir]~^ NOTE first assignment + //~^ HELP make this binding mutable + //~| SUGGESTION mut v + v = 1; //~ NOTE first assignment println!("v={}", v); - v = 2; //[ast]~ ERROR cannot assign twice to immutable variable - //[mir]~^ ERROR cannot assign twice to immutable variable `v` - //[ast]~| NOTE cannot assign twice to immutable - //[mir]~| NOTE cannot assign twice to immutable + v = 2; //~ ERROR cannot assign twice to immutable variable + //~| NOTE cannot assign twice to immutable println!("v={}", v); } diff --git a/src/test/ui/assign-imm-local-twice.ast.nll.stderr b/src/test/ui/assign-imm-local-twice.stderr similarity index 84% rename from src/test/ui/assign-imm-local-twice.ast.nll.stderr rename to src/test/ui/assign-imm-local-twice.stderr index 2995a139ae..df0f4c4d80 100644 --- a/src/test/ui/assign-imm-local-twice.ast.nll.stderr +++ b/src/test/ui/assign-imm-local-twice.stderr @@ -1,12 +1,12 @@ error[E0384]: cannot assign twice to immutable variable `v` - --> $DIR/assign-imm-local-twice.rs:11:5 + --> $DIR/assign-imm-local-twice.rs:7:5 | LL | let v: isize; | - help: make this binding mutable: `mut v` ... LL | v = 1; | ----- first assignment to `v` -... +LL | println!("v={}", v); LL | v = 2; | ^^^^^ cannot assign twice to immutable variable diff --git a/src/test/ui/associated-item/associated-item-enum.rs b/src/test/ui/associated-item/associated-item-enum.rs new file mode 100644 index 0000000000..30ba258155 --- /dev/null +++ b/src/test/ui/associated-item/associated-item-enum.rs @@ -0,0 +1,20 @@ +enum Enum { Variant } + +impl Enum { + const MISSPELLABLE: i32 = 0; + fn misspellable() {} +} + +trait Trait { + fn misspellable_trait() {} +} + +impl Trait for Enum { + fn misspellable_trait() {} +} + +fn main() { + Enum::mispellable(); //~ ERROR no variant or associated item + Enum::mispellable_trait(); //~ ERROR no variant or associated item + Enum::MISPELLABLE; //~ ERROR no variant or associated item +} diff --git a/src/test/ui/associated-item/associated-item-enum.stderr b/src/test/ui/associated-item/associated-item-enum.stderr new file mode 100644 index 0000000000..5a62b9736d --- /dev/null +++ b/src/test/ui/associated-item/associated-item-enum.stderr @@ -0,0 +1,36 @@ +error[E0599]: no variant or associated item named `mispellable` found for type `Enum` in the current scope + --> $DIR/associated-item-enum.rs:17:11 + | +LL | enum Enum { Variant } + | --------- variant or associated item `mispellable` not found here +... +LL | Enum::mispellable(); + | ^^^^^^^^^^^ + | | + | variant or associated item not found in `Enum` + | help: there is a method with a similar name: `misspellable` + +error[E0599]: no variant or associated item named `mispellable_trait` found for type `Enum` in the current scope + --> $DIR/associated-item-enum.rs:18:11 + | +LL | enum Enum { Variant } + | --------- variant or associated item `mispellable_trait` not found here +... +LL | Enum::mispellable_trait(); + | ^^^^^^^^^^^^^^^^^ variant or associated item not found in `Enum` + +error[E0599]: no variant or associated item named `MISPELLABLE` found for type `Enum` in the current scope + --> $DIR/associated-item-enum.rs:19:11 + | +LL | enum Enum { Variant } + | --------- variant or associated item `MISPELLABLE` not found here +... +LL | Enum::MISPELLABLE; + | ^^^^^^^^^^^ + | | + | variant or associated item not found in `Enum` + | help: there is an associated constant with a similar name: `MISSPELLABLE` + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/associated-path-shl.stderr b/src/test/ui/associated-path-shl.stderr index e1a1e63637..23918ed2e3 100644 --- a/src/test/ui/associated-path-shl.stderr +++ b/src/test/ui/associated-path-shl.stderr @@ -39,5 +39,5 @@ LL | let 0 ..= <::B>::C; error: aborting due to 6 previous errors -Some errors occurred: E0029, E0412. +Some errors have detailed explanations: E0029, E0412. For more information about an error, try `rustc --explain E0029`. diff --git a/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr b/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr index 0994dc87c9..dd46ad6469 100644 --- a/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr +++ b/src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr @@ -45,5 +45,5 @@ LL | fn paint(c: C, d: C::Color) { error: aborting due to 4 previous errors -Some errors occurred: E0191, E0221. +Some errors have detailed explanations: E0191, E0221. For more information about an error, try `rustc --explain E0191`. diff --git a/src/test/ui/associated-types/associated-types-eq-3.stderr b/src/test/ui/associated-types/associated-types-eq-3.stderr index 31d2c5f318..66fa4c288c 100644 --- a/src/test/ui/associated-types/associated-types-eq-3.stderr +++ b/src/test/ui/associated-types/associated-types-eq-3.stderr @@ -33,5 +33,5 @@ LL | baz(&a); error: aborting due to 3 previous errors -Some errors occurred: E0271, E0308. +Some errors have detailed explanations: E0271, E0308. For more information about an error, try `rustc --explain E0271`. diff --git a/src/test/ui/associated-types/associated-types-eq-hr.stderr b/src/test/ui/associated-types/associated-types-eq-hr.stderr index 82d15b92b5..353829c2f7 100644 --- a/src/test/ui/associated-types/associated-types-eq-hr.stderr +++ b/src/test/ui/associated-types/associated-types-eq-hr.stderr @@ -122,5 +122,5 @@ LL | | } error: aborting due to 7 previous errors -Some errors occurred: E0271, E0277. +Some errors have detailed explanations: E0271, E0277. For more information about an error, try `rustc --explain E0271`. diff --git a/src/test/ui/associated-types/associated-types-outlives.nll.stderr b/src/test/ui/associated-types/associated-types-outlives.nll.stderr deleted file mode 100644 index 840e33b4b8..0000000000 --- a/src/test/ui/associated-types/associated-types-outlives.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/associated-types-outlives.rs:22:14 - | -LL | 's: loop { y = denormalise(&x); break } - | -- borrow of `x` occurs here -LL | drop(x); - | ^ move out of `x` occurs here -LL | return f(y); - | - borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/associated-types/associated-types-outlives.stderr b/src/test/ui/associated-types/associated-types-outlives.stderr index e35862d718..840e33b4b8 100644 --- a/src/test/ui/associated-types/associated-types-outlives.stderr +++ b/src/test/ui/associated-types/associated-types-outlives.stderr @@ -2,9 +2,11 @@ error[E0505]: cannot move out of `x` because it is borrowed --> $DIR/associated-types-outlives.rs:22:14 | LL | 's: loop { y = denormalise(&x); break } - | - borrow of `x` occurs here + | -- borrow of `x` occurs here LL | drop(x); | ^ move out of `x` occurs here +LL | return f(y); + | - borrow later used here error: aborting due to previous error diff --git a/src/test/ui/associated-types/associated-types-overridden-binding.stderr b/src/test/ui/associated-types/associated-types-overridden-binding.stderr index a26ee23894..fced38caab 100644 --- a/src/test/ui/associated-types/associated-types-overridden-binding.stderr +++ b/src/test/ui/associated-types/associated-types-overridden-binding.stderr @@ -12,4 +12,3 @@ LL | trait Foo: Iterator {} error: aborting due to previous error -For more information about this error, try `rustc --explain E0284`. diff --git a/src/test/ui/associated-types/associated-types-path-1.stderr b/src/test/ui/associated-types/associated-types-path-1.stderr index b6d3b53ba5..a10cf7f890 100644 --- a/src/test/ui/associated-types/associated-types-path-1.stderr +++ b/src/test/ui/associated-types/associated-types-path-1.stderr @@ -18,5 +18,5 @@ LL | pub fn f2(a: T, x: T::A) {} error: aborting due to 2 previous errors -Some errors occurred: E0220, E0221. +Some errors have detailed explanations: E0220, E0221. For more information about an error, try `rustc --explain E0220`. diff --git a/src/test/ui/associated-types/associated-types-path-2.stderr b/src/test/ui/associated-types/associated-types-path-2.stderr index be7097a018..1405cb1b47 100644 --- a/src/test/ui/associated-types/associated-types-path-2.stderr +++ b/src/test/ui/associated-types/associated-types-path-2.stderr @@ -3,6 +3,10 @@ error[E0308]: mismatched types | LL | f1(2i32, 4i32); | ^^^^ expected u32, found i32 +help: change the type of the numeric literal from `i32` to `u32` + | +LL | f1(2i32, 4u32); + | ^^^^ error[E0277]: the trait bound `u32: Foo` is not satisfied --> $DIR/associated-types-path-2.rs:29:5 @@ -45,8 +49,12 @@ error[E0308]: mismatched types | LL | let _: i32 = f2(2i32); | ^^^^^^^^ expected i32, found u32 +help: you can convert an `u32` to `i32` and panic if the converted value wouldn't fit + | +LL | let _: i32 = f2(2i32).try_into().unwrap(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 6 previous errors -Some errors occurred: E0277, E0308. +Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn-body.nll.stderr b/src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn-body.nll.stderr new file mode 100644 index 0000000000..ca99304f9b --- /dev/null +++ b/src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn-body.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/associated-types-project-from-hrtb-in-fn-body.rs:22:29 + | +LL | fn bar<'a, 'b, I : for<'x> Foo<&'x isize>>( + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | let z: I::A = if cond { x } else { y }; + | ^ assignment requires that `'a` must outlive `'b` + +error: lifetime may not live long enough + --> $DIR/associated-types-project-from-hrtb-in-fn-body.rs:22:40 + | +LL | fn bar<'a, 'b, I : for<'x> Foo<&'x isize>>( + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | let z: I::A = if cond { x } else { y }; + | ^ assignment requires that `'b` must outlive `'a` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn-body.stderr b/src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn-body.stderr index d5310c47fc..63d662f446 100644 --- a/src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn-body.stderr +++ b/src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn-body.stderr @@ -11,4 +11,3 @@ LL | let z: I::A = if cond { x } else { y }; error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn.stderr b/src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn.stderr index e06ad64861..09f4f99703 100644 --- a/src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn.stderr +++ b/src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn.stderr @@ -6,4 +6,3 @@ LL | x: I::A) error: aborting due to previous error -For more information about this error, try `rustc --explain E0212`. diff --git a/src/test/ui/associated-types/associated-types-project-from-hrtb-in-struct.stderr b/src/test/ui/associated-types/associated-types-project-from-hrtb-in-struct.stderr index 4c9b795139..189b19461f 100644 --- a/src/test/ui/associated-types/associated-types-project-from-hrtb-in-struct.stderr +++ b/src/test/ui/associated-types/associated-types-project-from-hrtb-in-struct.stderr @@ -6,4 +6,3 @@ LL | field: I::A error: aborting due to previous error -For more information about this error, try `rustc --explain E0212`. diff --git a/src/test/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.stderr b/src/test/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.stderr index 445e1b1902..e1c169028c 100644 --- a/src/test/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.stderr +++ b/src/test/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.stderr @@ -6,4 +6,3 @@ LL | fn some_method(&self, arg: I::A); error: aborting due to previous error -For more information about this error, try `rustc --explain E0212`. diff --git a/src/test/ui/associated-types/associated-types-subtyping-1.nll.stderr b/src/test/ui/associated-types/associated-types-subtyping-1.nll.stderr new file mode 100644 index 0000000000..d8506b9c8c --- /dev/null +++ b/src/test/ui/associated-types/associated-types-subtyping-1.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/associated-types-subtyping-1.rs:24:12 + | +LL | fn method2<'a,'b,T>(x: &'a T, y: &'b T) + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | let a: >::Type = make_any(); + | ^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a` + +error: lifetime may not live long enough + --> $DIR/associated-types-subtyping-1.rs:35:13 + | +LL | fn method3<'a,'b,T>(x: &'a T, y: &'b T) + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | let _c: >::Type = b; + | ^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/associated-types/associated-types-subtyping-1.stderr b/src/test/ui/associated-types/associated-types-subtyping-1.stderr index 58ceec9040..660e5b3928 100644 --- a/src/test/ui/associated-types/associated-types-subtyping-1.stderr +++ b/src/test/ui/associated-types/associated-types-subtyping-1.stderr @@ -18,4 +18,3 @@ LL | let _c: >::Type = b; error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/associated-types/associated-types-unconstrained.stderr b/src/test/ui/associated-types/associated-types-unconstrained.stderr index da14a69ae3..26e5a6a503 100644 --- a/src/test/ui/associated-types/associated-types-unconstrained.stderr +++ b/src/test/ui/associated-types/associated-types-unconstrained.stderr @@ -6,4 +6,3 @@ LL | let x: isize = Foo::bar(); error: aborting due to previous error -For more information about this error, try `rustc --explain E0284`. diff --git a/src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.nll.stderr b/src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.nll.stderr new file mode 100644 index 0000000000..779e6dac92 --- /dev/null +++ b/src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/project-fn-ret-contravariant.rs:45:4 + | +LL | fn transmute<'a,'b>(x: &'a u32, y: &'b u32) -> (&'a u32, &'b u32) { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | (a, b) + | ^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a` + +error: lifetime may not live long enough + --> $DIR/project-fn-ret-contravariant.rs:45:4 + | +LL | fn transmute<'a,'b>(x: &'a u32, y: &'b u32) -> (&'a u32, &'b u32) { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | (a, b) + | ^^^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.stderr b/src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.stderr index fa4c6adb5f..dc9a549586 100644 --- a/src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.stderr +++ b/src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.stderr @@ -22,4 +22,3 @@ LL | (a, b) error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.nll.stderr b/src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.nll.stderr new file mode 100644 index 0000000000..f532c96ed2 --- /dev/null +++ b/src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.nll.stderr @@ -0,0 +1,10 @@ +error: lifetime may not live long enough + --> $DIR/project-fn-ret-contravariant.rs:38:4 + | +LL | fn baz<'a,'b>(x: &'a u32) -> &'static u32 { + | -- lifetime `'a` defined here +LL | bar(foo, x) + | ^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.stderr b/src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.stderr index 4309373f12..15bebce47d 100644 --- a/src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.stderr +++ b/src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.stderr @@ -23,4 +23,3 @@ LL | bar(foo, x) error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/associated-types/cache/project-fn-ret-invariant.krisskross.nll.stderr b/src/test/ui/associated-types/cache/project-fn-ret-invariant.krisskross.nll.stderr new file mode 100644 index 0000000000..c45082fb05 --- /dev/null +++ b/src/test/ui/associated-types/cache/project-fn-ret-invariant.krisskross.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/project-fn-ret-invariant.rs:55:4 + | +LL | fn transmute<'a,'b>(x: Type<'a>, y: Type<'b>) -> (Type<'a>, Type<'b>) { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | (a, b) + | ^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a` + +error: lifetime may not live long enough + --> $DIR/project-fn-ret-invariant.rs:55:4 + | +LL | fn transmute<'a,'b>(x: Type<'a>, y: Type<'b>) -> (Type<'a>, Type<'b>) { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | (a, b) + | ^^^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/associated-types/cache/project-fn-ret-invariant.krisskross.stderr b/src/test/ui/associated-types/cache/project-fn-ret-invariant.krisskross.stderr index 5009e0868a..6accf8110a 100644 --- a/src/test/ui/associated-types/cache/project-fn-ret-invariant.krisskross.stderr +++ b/src/test/ui/associated-types/cache/project-fn-ret-invariant.krisskross.stderr @@ -21,4 +21,3 @@ LL | let b = bar(foo, x); error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/associated-types/cache/project-fn-ret-invariant.oneuse.nll.stderr b/src/test/ui/associated-types/cache/project-fn-ret-invariant.oneuse.nll.stderr new file mode 100644 index 0000000000..2c11e7ffe9 --- /dev/null +++ b/src/test/ui/associated-types/cache/project-fn-ret-invariant.oneuse.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/project-fn-ret-invariant.rs:38:12 + | +LL | fn baz<'a,'b>(x: Type<'a>, y: Type<'b>) -> (Type<'a>, Type<'b>) { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | let f = foo; // <-- No consistent type can be inferred for `f` here. +LL | let a = bar(f, x); + | ^^^^^^^^^ argument requires that `'a` must outlive `'b` + +error: lifetime may not live long enough + --> $DIR/project-fn-ret-invariant.rs:39:12 + | +LL | fn baz<'a,'b>(x: Type<'a>, y: Type<'b>) -> (Type<'a>, Type<'b>) { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | let b = bar(f, y); + | ^^^^^^^^^ argument requires that `'b` must outlive `'a` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/associated-types/cache/project-fn-ret-invariant.oneuse.stderr b/src/test/ui/associated-types/cache/project-fn-ret-invariant.oneuse.stderr index 65d16440ac..ef036bd8fb 100644 --- a/src/test/ui/associated-types/cache/project-fn-ret-invariant.oneuse.stderr +++ b/src/test/ui/associated-types/cache/project-fn-ret-invariant.oneuse.stderr @@ -11,4 +11,3 @@ LL | let b = bar(f, y); error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.nll.stderr b/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.nll.stderr new file mode 100644 index 0000000000..8be0ad6e88 --- /dev/null +++ b/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.nll.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/project-fn-ret-invariant.rs:48:4 + | +LL | fn baz<'a,'b>(x: Type<'a>) -> Type<'static> { + | -- lifetime `'a` defined here +... +LL | bar(foo, x) + | ^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr b/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr index b8b1a979c3..62b4cb1091 100644 --- a/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr +++ b/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr @@ -19,4 +19,3 @@ LL | fn baz<'a,'b>(x: Type<'a>) -> Type<'static> { error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/async-await/argument-patterns.rs b/src/test/ui/async-await/argument-patterns.rs new file mode 100644 index 0000000000..3750c2bcb7 --- /dev/null +++ b/src/test/ui/async-await/argument-patterns.rs @@ -0,0 +1,30 @@ +// edition:2018 +// run-pass + +#![allow(unused_variables)] +#![deny(unused_mut)] +#![feature(async_await)] + +type A = Vec; + +async fn a(n: u32, mut vec: A) { + vec.push(n); +} + +async fn b(n: u32, ref mut vec: A) { + vec.push(n); +} + +async fn c(ref vec: A) { + vec.contains(&0); +} + +async fn d((a, mut b): (A, A)) { + b.push(1); +} + +async fn f((ref mut a, ref b): (A, A)) {} + +async fn g(((ref a, ref mut b), (ref mut c, ref d)): ((A, A), (A, A))) {} + +fn main() {} diff --git a/src/test/ui/async-await/auxiliary/arc_wake.rs b/src/test/ui/async-await/auxiliary/arc_wake.rs new file mode 100644 index 0000000000..c21886f26f --- /dev/null +++ b/src/test/ui/async-await/auxiliary/arc_wake.rs @@ -0,0 +1,64 @@ +// edition:2018 + +use std::sync::Arc; +use std::task::{ + Waker, RawWaker, RawWakerVTable, +}; + +macro_rules! waker_vtable { + ($ty:ident) => { + &RawWakerVTable::new( + clone_arc_raw::<$ty>, + wake_arc_raw::<$ty>, + wake_by_ref_arc_raw::<$ty>, + drop_arc_raw::<$ty>, + ) + }; +} + +pub trait ArcWake { + fn wake(self: Arc); + + fn wake_by_ref(arc_self: &Arc) { + arc_self.clone().wake() + } + + fn into_waker(wake: Arc) -> Waker where Self: Sized + { + let ptr = Arc::into_raw(wake) as *const (); + + unsafe { + Waker::from_raw(RawWaker::new(ptr, waker_vtable!(Self))) + } + } +} + +unsafe fn increase_refcount(data: *const ()) { + // Retain Arc by creating a copy + let arc: Arc = Arc::from_raw(data as *const T); + let arc_clone = arc.clone(); + // Forget the Arcs again, so that the refcount isn't decrased + let _ = Arc::into_raw(arc); + let _ = Arc::into_raw(arc_clone); +} + +unsafe fn clone_arc_raw(data: *const ()) -> RawWaker { + increase_refcount::(data); + RawWaker::new(data, waker_vtable!(T)) +} + +unsafe fn drop_arc_raw(data: *const ()) { + // Drop Arc + let _: Arc = Arc::from_raw(data as *const T); +} + +unsafe fn wake_arc_raw(data: *const ()) { + let arc: Arc = Arc::from_raw(data as *const T); + ArcWake::wake(arc); +} + +unsafe fn wake_by_ref_arc_raw(data: *const ()) { + let arc: Arc = Arc::from_raw(data as *const T); + ArcWake::wake_by_ref(&arc); + let _ = Arc::into_raw(arc); +} diff --git a/src/test/ui/async-await/auxiliary/issue-60674.rs b/src/test/ui/async-await/auxiliary/issue-60674.rs new file mode 100644 index 0000000000..680c6e55e5 --- /dev/null +++ b/src/test/ui/async-await/auxiliary/issue-60674.rs @@ -0,0 +1,12 @@ +// force-host +// no-prefer-dynamic +#![crate_type = "proc-macro"] + +extern crate proc_macro; +use proc_macro::TokenStream; + +#[proc_macro_attribute] +pub fn attr(_args: TokenStream, input: TokenStream) -> TokenStream { + println!("{}", input); + TokenStream::new() +} diff --git a/src/test/ui/async-await/drop-order-for-async-fn-parameters-by-ref-binding.rs b/src/test/ui/async-await/drop-order-for-async-fn-parameters-by-ref-binding.rs new file mode 100644 index 0000000000..c2b59eecb9 --- /dev/null +++ b/src/test/ui/async-await/drop-order-for-async-fn-parameters-by-ref-binding.rs @@ -0,0 +1,271 @@ +// aux-build:arc_wake.rs +// edition:2018 +// run-pass + +#![allow(unused_variables)] +#![feature(async_await, await_macro)] + +// Test that the drop order for parameters in a fn and async fn matches up. Also test that +// parameters (used or unused) are not dropped until the async fn completes execution. +// See also #54716. + +extern crate arc_wake; + +use arc_wake::ArcWake; +use std::cell::RefCell; +use std::future::Future; +use std::marker::PhantomData; +use std::sync::Arc; +use std::rc::Rc; +use std::task::Context; + +struct EmptyWaker; + +impl ArcWake for EmptyWaker { + fn wake(self: Arc) {} +} + +#[derive(Debug, Eq, PartialEq)] +enum DropOrder { + Function, + Val(&'static str), +} + +type DropOrderListPtr = Rc>>; + +struct D(&'static str, DropOrderListPtr); + +impl Drop for D { + fn drop(&mut self) { + self.1.borrow_mut().push(DropOrder::Val(self.0)); + } +} + +/// Check that unused bindings are dropped after the function is polled. +async fn foo_async(ref mut x: D, ref mut _y: D) { + x.1.borrow_mut().push(DropOrder::Function); +} + +fn foo_sync(ref mut x: D, ref mut _y: D) { + x.1.borrow_mut().push(DropOrder::Function); +} + +/// Check that underscore patterns are dropped after the function is polled. +async fn bar_async(ref mut x: D, _: D) { + x.1.borrow_mut().push(DropOrder::Function); +} + +fn bar_sync(ref mut x: D, _: D) { + x.1.borrow_mut().push(DropOrder::Function); +} + +/// Check that underscore patterns within more complex patterns are dropped after the function +/// is polled. +async fn baz_async((ref mut x, _): (D, D)) { + x.1.borrow_mut().push(DropOrder::Function); +} + +fn baz_sync((ref mut x, _): (D, D)) { + x.1.borrow_mut().push(DropOrder::Function); +} + +/// Check that underscore and unused bindings within and outwith more complex patterns are dropped +/// after the function is polled. +async fn foobar_async(ref mut x: D, (ref mut a, _, ref mut _c): (D, D, D), _: D, ref mut _y: D) { + x.1.borrow_mut().push(DropOrder::Function); +} + +fn foobar_sync(ref mut x: D, (ref mut a, _, ref mut _c): (D, D, D), _: D, ref mut _y: D) { + x.1.borrow_mut().push(DropOrder::Function); +} + +struct Foo; + +impl Foo { + /// Check that unused bindings are dropped after the method is polled. + async fn foo_async(ref mut x: D, ref mut _y: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + fn foo_sync(ref mut x: D, ref mut _y: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + /// Check that underscore patterns are dropped after the method is polled. + async fn bar_async(ref mut x: D, _: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + fn bar_sync(ref mut x: D, _: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + /// Check that underscore patterns within more complex patterns are dropped after the method + /// is polled. + async fn baz_async((ref mut x, _): (D, D)) { + x.1.borrow_mut().push(DropOrder::Function); + } + + fn baz_sync((ref mut x, _): (D, D)) { + x.1.borrow_mut().push(DropOrder::Function); + } + + /// Check that underscore and unused bindings within and outwith more complex patterns are + /// dropped after the method is polled. + async fn foobar_async( + ref mut x: D, (ref mut a, _, ref mut _c): (D, D, D), _: D, ref mut _y: D, + ) { + x.1.borrow_mut().push(DropOrder::Function); + } + + fn foobar_sync( + ref mut x: D, (ref mut a, _, ref mut _c): (D, D, D), _: D, ref mut _y: D, + ) { + x.1.borrow_mut().push(DropOrder::Function); + } +} + +struct Bar<'a>(PhantomData<&'a ()>); + +impl<'a> Bar<'a> { + /// Check that unused bindings are dropped after the method with self is polled. + async fn foo_async(&'a self, ref mut x: D, ref mut _y: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + fn foo_sync(&'a self, ref mut x: D, ref mut _y: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + /// Check that underscore patterns are dropped after the method with self is polled. + async fn bar_async(&'a self, ref mut x: D, _: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + fn bar_sync(&'a self, ref mut x: D, _: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + /// Check that underscore patterns within more complex patterns are dropped after the method + /// with self is polled. + async fn baz_async(&'a self, (ref mut x, _): (D, D)) { + x.1.borrow_mut().push(DropOrder::Function); + } + + fn baz_sync(&'a self, (ref mut x, _): (D, D)) { + x.1.borrow_mut().push(DropOrder::Function); + } + + /// Check that underscore and unused bindings within and outwith more complex patterns are + /// dropped after the method with self is polled. + async fn foobar_async( + &'a self, ref mut x: D, (ref mut a, _, ref mut _c): (D, D, D), _: D, ref mut _y: D, + ) { + x.1.borrow_mut().push(DropOrder::Function); + } + + fn foobar_sync( + &'a self, ref mut x: D, (ref mut a, _, ref mut _c): (D, D, D), _: D, ref mut _y: D, + ) { + x.1.borrow_mut().push(DropOrder::Function); + } +} + +fn assert_drop_order_after_poll>( + f: impl FnOnce(DropOrderListPtr) -> Fut, + g: impl FnOnce(DropOrderListPtr), +) { + let empty = Arc::new(EmptyWaker); + let waker = ArcWake::into_waker(empty); + let mut cx = Context::from_waker(&waker); + + let actual_order = Rc::new(RefCell::new(Vec::new())); + let mut fut = Box::pin(f(actual_order.clone())); + let _ = fut.as_mut().poll(&mut cx); + + let expected_order = Rc::new(RefCell::new(Vec::new())); + g(expected_order.clone()); + + assert_eq!(*actual_order.borrow(), *expected_order.borrow()); +} + +fn main() { + // Free functions (see doc comment on function for what it tests). + assert_drop_order_after_poll(|l| foo_async(D("x", l.clone()), D("_y", l.clone())), + |l| foo_sync(D("x", l.clone()), D("_y", l.clone()))); + assert_drop_order_after_poll(|l| bar_async(D("x", l.clone()), D("_", l.clone())), + |l| bar_sync(D("x", l.clone()), D("_", l.clone()))); + assert_drop_order_after_poll(|l| baz_async((D("x", l.clone()), D("_", l.clone()))), + |l| baz_sync((D("x", l.clone()), D("_", l.clone())))); + assert_drop_order_after_poll( + |l| { + foobar_async( + D("x", l.clone()), + (D("a", l.clone()), D("_", l.clone()), D("_c", l.clone())), + D("_", l.clone()), + D("_y", l.clone()), + ) + }, + |l| { + foobar_sync( + D("x", l.clone()), + (D("a", l.clone()), D("_", l.clone()), D("_c", l.clone())), + D("_", l.clone()), + D("_y", l.clone()), + ) + }, + ); + + // Methods w/out self (see doc comment on function for what it tests). + assert_drop_order_after_poll(|l| Foo::foo_async(D("x", l.clone()), D("_y", l.clone())), + |l| Foo::foo_sync(D("x", l.clone()), D("_y", l.clone()))); + assert_drop_order_after_poll(|l| Foo::bar_async(D("x", l.clone()), D("_", l.clone())), + |l| Foo::bar_sync(D("x", l.clone()), D("_", l.clone()))); + assert_drop_order_after_poll(|l| Foo::baz_async((D("x", l.clone()), D("_", l.clone()))), + |l| Foo::baz_sync((D("x", l.clone()), D("_", l.clone())))); + assert_drop_order_after_poll( + |l| { + Foo::foobar_async( + D("x", l.clone()), + (D("a", l.clone()), D("_", l.clone()), D("_c", l.clone())), + D("_", l.clone()), + D("_y", l.clone()), + ) + }, + |l| { + Foo::foobar_sync( + D("x", l.clone()), + (D("a", l.clone()), D("_", l.clone()), D("_c", l.clone())), + D("_", l.clone()), + D("_y", l.clone()), + ) + }, + ); + + // Methods (see doc comment on function for what it tests). + let b = Bar(Default::default()); + assert_drop_order_after_poll(|l| b.foo_async(D("x", l.clone()), D("_y", l.clone())), + |l| b.foo_sync(D("x", l.clone()), D("_y", l.clone()))); + assert_drop_order_after_poll(|l| b.bar_async(D("x", l.clone()), D("_", l.clone())), + |l| b.bar_sync(D("x", l.clone()), D("_", l.clone()))); + assert_drop_order_after_poll(|l| b.baz_async((D("x", l.clone()), D("_", l.clone()))), + |l| b.baz_sync((D("x", l.clone()), D("_", l.clone())))); + assert_drop_order_after_poll( + |l| { + b.foobar_async( + D("x", l.clone()), + (D("a", l.clone()), D("_", l.clone()), D("_c", l.clone())), + D("_", l.clone()), + D("_y", l.clone()), + ) + }, + |l| { + b.foobar_sync( + D("x", l.clone()), + (D("a", l.clone()), D("_", l.clone()), D("_c", l.clone())), + D("_", l.clone()), + D("_y", l.clone()), + ) + }, + ); +} diff --git a/src/test/ui/async-await/drop-order-for-async-fn-parameters.rs b/src/test/ui/async-await/drop-order-for-async-fn-parameters.rs new file mode 100644 index 0000000000..708c570498 --- /dev/null +++ b/src/test/ui/async-await/drop-order-for-async-fn-parameters.rs @@ -0,0 +1,263 @@ +// aux-build:arc_wake.rs +// edition:2018 +// run-pass + +#![allow(unused_variables)] +#![feature(async_await, await_macro)] + +// Test that the drop order for parameters in a fn and async fn matches up. Also test that +// parameters (used or unused) are not dropped until the async fn completes execution. +// See also #54716. + +extern crate arc_wake; + +use arc_wake::ArcWake; +use std::cell::RefCell; +use std::future::Future; +use std::marker::PhantomData; +use std::sync::Arc; +use std::rc::Rc; +use std::task::Context; + +struct EmptyWaker; + +impl ArcWake for EmptyWaker { + fn wake(self: Arc) {} +} + +#[derive(Debug, Eq, PartialEq)] +enum DropOrder { + Function, + Val(&'static str), +} + +type DropOrderListPtr = Rc>>; + +struct D(&'static str, DropOrderListPtr); + +impl Drop for D { + fn drop(&mut self) { + self.1.borrow_mut().push(DropOrder::Val(self.0)); + } +} + +/// Check that unused bindings are dropped after the function is polled. +async fn foo_async(x: D, _y: D) { + x.1.borrow_mut().push(DropOrder::Function); +} + +fn foo_sync(x: D, _y: D) { + x.1.borrow_mut().push(DropOrder::Function); +} + +/// Check that underscore patterns are dropped after the function is polled. +async fn bar_async(x: D, _: D) { + x.1.borrow_mut().push(DropOrder::Function); +} + +fn bar_sync(x: D, _: D) { + x.1.borrow_mut().push(DropOrder::Function); +} + +/// Check that underscore patterns within more complex patterns are dropped after the function +/// is polled. +async fn baz_async((x, _): (D, D)) { + x.1.borrow_mut().push(DropOrder::Function); +} + +fn baz_sync((x, _): (D, D)) { + x.1.borrow_mut().push(DropOrder::Function); +} + +/// Check that underscore and unused bindings within and outwith more complex patterns are dropped +/// after the function is polled. +async fn foobar_async(x: D, (a, _, _c): (D, D, D), _: D, _y: D) { + x.1.borrow_mut().push(DropOrder::Function); +} + +fn foobar_sync(x: D, (a, _, _c): (D, D, D), _: D, _y: D) { + x.1.borrow_mut().push(DropOrder::Function); +} + +struct Foo; + +impl Foo { + /// Check that unused bindings are dropped after the method is polled. + async fn foo_async(x: D, _y: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + fn foo_sync(x: D, _y: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + /// Check that underscore patterns are dropped after the method is polled. + async fn bar_async(x: D, _: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + fn bar_sync(x: D, _: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + /// Check that underscore patterns within more complex patterns are dropped after the method + /// is polled. + async fn baz_async((x, _): (D, D)) { + x.1.borrow_mut().push(DropOrder::Function); + } + + fn baz_sync((x, _): (D, D)) { + x.1.borrow_mut().push(DropOrder::Function); + } + + /// Check that underscore and unused bindings within and outwith more complex patterns are + /// dropped after the method is polled. + async fn foobar_async(x: D, (a, _, _c): (D, D, D), _: D, _y: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + fn foobar_sync(x: D, (a, _, _c): (D, D, D), _: D, _y: D) { + x.1.borrow_mut().push(DropOrder::Function); + } +} + +struct Bar<'a>(PhantomData<&'a ()>); + +impl<'a> Bar<'a> { + /// Check that unused bindings are dropped after the method with self is polled. + async fn foo_async(&'a self, x: D, _y: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + fn foo_sync(&'a self, x: D, _y: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + /// Check that underscore patterns are dropped after the method with self is polled. + async fn bar_async(&'a self, x: D, _: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + fn bar_sync(&'a self, x: D, _: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + /// Check that underscore patterns within more complex patterns are dropped after the method + /// with self is polled. + async fn baz_async(&'a self, (x, _): (D, D)) { + x.1.borrow_mut().push(DropOrder::Function); + } + + fn baz_sync(&'a self, (x, _): (D, D)) { + x.1.borrow_mut().push(DropOrder::Function); + } + + /// Check that underscore and unused bindings within and outwith more complex patterns are + /// dropped after the method with self is polled. + async fn foobar_async(&'a self, x: D, (a, _, _c): (D, D, D), _: D, _y: D) { + x.1.borrow_mut().push(DropOrder::Function); + } + + fn foobar_sync(&'a self, x: D, (a, _, _c): (D, D, D), _: D, _y: D) { + x.1.borrow_mut().push(DropOrder::Function); + } +} + +fn assert_drop_order_after_poll>( + f: impl FnOnce(DropOrderListPtr) -> Fut, + g: impl FnOnce(DropOrderListPtr), +) { + let empty = Arc::new(EmptyWaker); + let waker = ArcWake::into_waker(empty); + let mut cx = Context::from_waker(&waker); + + let actual_order = Rc::new(RefCell::new(Vec::new())); + let mut fut = Box::pin(f(actual_order.clone())); + let _ = fut.as_mut().poll(&mut cx); + + let expected_order = Rc::new(RefCell::new(Vec::new())); + g(expected_order.clone()); + + assert_eq!(*actual_order.borrow(), *expected_order.borrow()); +} + +fn main() { + // Free functions (see doc comment on function for what it tests). + assert_drop_order_after_poll(|l| foo_async(D("x", l.clone()), D("_y", l.clone())), + |l| foo_sync(D("x", l.clone()), D("_y", l.clone()))); + assert_drop_order_after_poll(|l| bar_async(D("x", l.clone()), D("_", l.clone())), + |l| bar_sync(D("x", l.clone()), D("_", l.clone()))); + assert_drop_order_after_poll(|l| baz_async((D("x", l.clone()), D("_", l.clone()))), + |l| baz_sync((D("x", l.clone()), D("_", l.clone())))); + assert_drop_order_after_poll( + |l| { + foobar_async( + D("x", l.clone()), + (D("a", l.clone()), D("_", l.clone()), D("_c", l.clone())), + D("_", l.clone()), + D("_y", l.clone()), + ) + }, + |l| { + foobar_sync( + D("x", l.clone()), + (D("a", l.clone()), D("_", l.clone()), D("_c", l.clone())), + D("_", l.clone()), + D("_y", l.clone()), + ) + }, + ); + + // Methods w/out self (see doc comment on function for what it tests). + assert_drop_order_after_poll(|l| Foo::foo_async(D("x", l.clone()), D("_y", l.clone())), + |l| Foo::foo_sync(D("x", l.clone()), D("_y", l.clone()))); + assert_drop_order_after_poll(|l| Foo::bar_async(D("x", l.clone()), D("_", l.clone())), + |l| Foo::bar_sync(D("x", l.clone()), D("_", l.clone()))); + assert_drop_order_after_poll(|l| Foo::baz_async((D("x", l.clone()), D("_", l.clone()))), + |l| Foo::baz_sync((D("x", l.clone()), D("_", l.clone())))); + assert_drop_order_after_poll( + |l| { + Foo::foobar_async( + D("x", l.clone()), + (D("a", l.clone()), D("_", l.clone()), D("_c", l.clone())), + D("_", l.clone()), + D("_y", l.clone()), + ) + }, + |l| { + Foo::foobar_sync( + D("x", l.clone()), + (D("a", l.clone()), D("_", l.clone()), D("_c", l.clone())), + D("_", l.clone()), + D("_y", l.clone()), + ) + }, + ); + + // Methods (see doc comment on function for what it tests). + let b = Bar(Default::default()); + assert_drop_order_after_poll(|l| b.foo_async(D("x", l.clone()), D("_y", l.clone())), + |l| b.foo_sync(D("x", l.clone()), D("_y", l.clone()))); + assert_drop_order_after_poll(|l| b.bar_async(D("x", l.clone()), D("_", l.clone())), + |l| b.bar_sync(D("x", l.clone()), D("_", l.clone()))); + assert_drop_order_after_poll(|l| b.baz_async((D("x", l.clone()), D("_", l.clone()))), + |l| b.baz_sync((D("x", l.clone()), D("_", l.clone())))); + assert_drop_order_after_poll( + |l| { + b.foobar_async( + D("x", l.clone()), + (D("a", l.clone()), D("_", l.clone()), D("_c", l.clone())), + D("_", l.clone()), + D("_y", l.clone()), + ) + }, + |l| { + b.foobar_sync( + D("x", l.clone()), + (D("a", l.clone()), D("_", l.clone()), D("_c", l.clone())), + D("_", l.clone()), + D("_y", l.clone()), + ) + }, + ); +} diff --git a/src/test/ui/async-await/drop-order-locals-are-hidden.rs b/src/test/ui/async-await/drop-order-locals-are-hidden.rs new file mode 100644 index 0000000000..bcdb8878eb --- /dev/null +++ b/src/test/ui/async-await/drop-order-locals-are-hidden.rs @@ -0,0 +1,16 @@ +// edition:2018 + +#![allow(unused_variables)] +#![feature(async_await)] + +async fn foobar_async(x: u32, (a, _, _c): (u32, u32, u32), _: u32, _y: u32) { + assert_eq!(__arg1, (1, 2, 3)); //~ ERROR cannot find value `__arg1` in this scope [E0425] + assert_eq!(__arg2, 4); //~ ERROR cannot find value `__arg2` in this scope [E0425] +} + +async fn baz_async(ref mut x: u32, ref y: u32) { + assert_eq!(__arg0, 1); //~ ERROR cannot find value `__arg0` in this scope [E0425] + assert_eq!(__arg1, 2); //~ ERROR cannot find value `__arg1` in this scope [E0425] +} + +fn main() {} diff --git a/src/test/ui/async-await/drop-order-locals-are-hidden.stderr b/src/test/ui/async-await/drop-order-locals-are-hidden.stderr new file mode 100644 index 0000000000..484e1f4f42 --- /dev/null +++ b/src/test/ui/async-await/drop-order-locals-are-hidden.stderr @@ -0,0 +1,27 @@ +error[E0425]: cannot find value `__arg1` in this scope + --> $DIR/drop-order-locals-are-hidden.rs:7:16 + | +LL | assert_eq!(__arg1, (1, 2, 3)); + | ^^^^^^ not found in this scope + +error[E0425]: cannot find value `__arg2` in this scope + --> $DIR/drop-order-locals-are-hidden.rs:8:16 + | +LL | assert_eq!(__arg2, 4); + | ^^^^^^ not found in this scope + +error[E0425]: cannot find value `__arg0` in this scope + --> $DIR/drop-order-locals-are-hidden.rs:12:16 + | +LL | assert_eq!(__arg0, 1); + | ^^^^^^ not found in this scope + +error[E0425]: cannot find value `__arg1` in this scope + --> $DIR/drop-order-locals-are-hidden.rs:13:16 + | +LL | assert_eq!(__arg1, 2); + | ^^^^^^ not found in this scope + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0425`. diff --git a/src/test/ui/async-await/issue-60518.rs b/src/test/ui/async-await/issue-60518.rs new file mode 100644 index 0000000000..f603c5bd3f --- /dev/null +++ b/src/test/ui/async-await/issue-60518.rs @@ -0,0 +1,12 @@ +// compile-pass +// edition:2018 + +#![feature(async_await)] + +// This is a regression test to ensure that simple bindings (where replacement arguments aren't +// created during async fn lowering) that have their DefId used during HIR lowering (such as impl +// trait) are visited during def collection and thus have a DefId. + +async fn foo(ws: impl Iterator) {} + +fn main() {} diff --git a/src/test/ui/async-await/issue-60674.rs b/src/test/ui/async-await/issue-60674.rs new file mode 100644 index 0000000000..ecb8080338 --- /dev/null +++ b/src/test/ui/async-await/issue-60674.rs @@ -0,0 +1,20 @@ +// aux-build:issue-60674.rs +// compile-pass +// edition:2018 +#![feature(async_await)] + +// This is a regression test that ensures that `mut` patterns are not lost when provided as input +// to a proc macro. + +extern crate issue_60674; + +#[issue_60674::attr] +async fn f(mut x: u8) {} + +#[issue_60674::attr] +async fn g((mut x, y, mut z): (u8, u8, u8)) {} + +#[issue_60674::attr] +async fn g(mut x: u8, (a, mut b, c): (u8, u8, u8), y: u8) {} + +fn main() {} diff --git a/src/test/ui/async-await/issue-60674.stdout b/src/test/ui/async-await/issue-60674.stdout new file mode 100644 index 0000000000..86c3591b3a --- /dev/null +++ b/src/test/ui/async-await/issue-60674.stdout @@ -0,0 +1,3 @@ +async fn f(mut x: u8) { } +async fn g((mut x, y, mut z): (u8, u8, u8)) { } +async fn g(mut x: u8, (a, mut b, c): (u8, u8, u8), y: u8) { } diff --git a/src/test/ui/async-fn-multiple-lifetimes.rs b/src/test/ui/async-fn-multiple-lifetimes.rs index fccc4fdb91..e3ac817b15 100644 --- a/src/test/ui/async-fn-multiple-lifetimes.rs +++ b/src/test/ui/async-fn-multiple-lifetimes.rs @@ -1,6 +1,6 @@ // edition:2018 -#![feature(arbitrary_self_types, async_await, await_macro, futures_api, pin)] +#![feature(arbitrary_self_types, async_await, await_macro, pin)] use std::ops::Add; diff --git a/src/test/ui/async-fn-path-elision.rs b/src/test/ui/async-fn-path-elision.rs new file mode 100644 index 0000000000..8db7631ef4 --- /dev/null +++ b/src/test/ui/async-fn-path-elision.rs @@ -0,0 +1,16 @@ +// edition:2018 + +#![feature(async_await, await_macro)] +#![allow(dead_code)] + +struct HasLifetime<'a>(&'a bool); + +async fn error(lt: HasLifetime) { //~ ERROR implicit elided lifetime not allowed here + if *lt.0 {} +} + +fn no_error(lt: HasLifetime) { + if *lt.0 {} +} + +fn main() {} diff --git a/src/test/ui/async-fn-path-elision.stderr b/src/test/ui/async-fn-path-elision.stderr new file mode 100644 index 0000000000..3b311baba0 --- /dev/null +++ b/src/test/ui/async-fn-path-elision.stderr @@ -0,0 +1,8 @@ +error[E0726]: implicit elided lifetime not allowed here + --> $DIR/async-fn-path-elision.rs:8:20 + | +LL | async fn error(lt: HasLifetime) { + | ^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>` + +error: aborting due to previous error + diff --git a/src/test/ui/async-with-closure.rs b/src/test/ui/async-with-closure.rs new file mode 100644 index 0000000000..856a778078 --- /dev/null +++ b/src/test/ui/async-with-closure.rs @@ -0,0 +1,26 @@ +// compile-pass +// edition:2018 + +#![feature(async_await, await_macro)] + +trait MyClosure { + type Args; +} + +impl MyClosure for dyn FnMut() -> R +where R: 'static { + type Args = (); +} + +struct MyStream { + x: C::Args, +} + +async fn get_future(_stream: MyStream) {} + +async fn f() { + let messages: MyStream = unimplemented!(); + await!(get_future(messages)); +} + +fn main() {} diff --git a/src/test/ui/attr-eq-token-tree.stderr b/src/test/ui/attr-eq-token-tree.stderr index aae25b2721..571779dfa1 100644 --- a/src/test/ui/attr-eq-token-tree.stderr +++ b/src/test/ui/attr-eq-token-tree.stderr @@ -1,8 +1,8 @@ error: unexpected token: `!` - --> $DIR/attr-eq-token-tree.rs:3:11 + --> $DIR/attr-eq-token-tree.rs:3:13 | LL | #[my_attr = !] - | ^ + | ^ error: aborting due to previous error diff --git a/src/test/ui/augmented-assignments.nll.stderr b/src/test/ui/augmented-assignments.nll.stderr deleted file mode 100644 index e205e2a878..0000000000 --- a/src/test/ui/augmented-assignments.nll.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/augmented-assignments.rs:16:5 - | -LL | x - | - borrow of `x` occurs here -... -LL | x; - | ^ move out of `x` occurs here - -error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable - --> $DIR/augmented-assignments.rs:21:5 - | -LL | let y = Int(2); - | - help: consider changing this to be mutable: `mut y` -... -LL | y - | ^ cannot borrow as mutable - -error: aborting due to 2 previous errors - -Some errors occurred: E0505, E0596. -For more information about an error, try `rustc --explain E0505`. diff --git a/src/test/ui/augmented-assignments.rs b/src/test/ui/augmented-assignments.rs index eea15eae87..1b4ac6edcb 100644 --- a/src/test/ui/augmented-assignments.rs +++ b/src/test/ui/augmented-assignments.rs @@ -10,16 +10,18 @@ impl AddAssign for Int { fn main() { let mut x = Int(1); - x //~ error: use of moved value: `x` - //~^ value used here after move + x + //~^ NOTE borrow of `x` occurs here += - x; //~ value moved here + x; + //~^ ERROR cannot move out of `x` because it is borrowed + //~| move out of `x` occurs here let y = Int(2); - //~^ HELP make this binding mutable + //~^ HELP consider changing this to be mutable //~| SUGGESTION mut y - y //~ error: cannot borrow immutable local variable `y` as mutable - //~| cannot borrow + y //~ ERROR cannot borrow `y` as mutable, as it is not declared as mutable + //~| cannot borrow as mutable += Int(1); } diff --git a/src/test/ui/augmented-assignments.stderr b/src/test/ui/augmented-assignments.stderr index e429bf2a59..ce555da897 100644 --- a/src/test/ui/augmented-assignments.stderr +++ b/src/test/ui/augmented-assignments.stderr @@ -1,24 +1,22 @@ -error[E0596]: cannot borrow immutable local variable `y` as mutable - --> $DIR/augmented-assignments.rs:21:5 - | -LL | let y = Int(2); - | - help: make this binding mutable: `mut y` -... -LL | y - | ^ cannot borrow mutably - -error[E0382]: use of moved value: `x` - --> $DIR/augmented-assignments.rs:13:5 +error[E0505]: cannot move out of `x` because it is borrowed + --> $DIR/augmented-assignments.rs:16:5 | LL | x - | ^ value used here after move + | - borrow of `x` occurs here ... LL | x; - | - value moved here + | ^ move out of `x` occurs here + +error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable + --> $DIR/augmented-assignments.rs:23:5 | - = note: move occurs because `x` has type `Int`, which does not implement the `Copy` trait +LL | let y = Int(2); + | - help: consider changing this to be mutable: `mut y` +... +LL | y + | ^ cannot borrow as mutable error: aborting due to 2 previous errors -Some errors occurred: E0382, E0596. -For more information about an error, try `rustc --explain E0382`. +Some errors have detailed explanations: E0505, E0596. +For more information about an error, try `rustc --explain E0505`. diff --git a/src/test/ui/auto-ref-slice-plus-ref.stderr b/src/test/ui/auto-ref-slice-plus-ref.stderr index 97b9cd961a..f2e0d379d1 100644 --- a/src/test/ui/auto-ref-slice-plus-ref.stderr +++ b/src/test/ui/auto-ref-slice-plus-ref.stderr @@ -2,7 +2,7 @@ error[E0599]: no method named `test_mut` found for type `std::vec::Vec<{integer} --> $DIR/auto-ref-slice-plus-ref.rs:7:7 | LL | a.test_mut(); - | ^^^^^^^^ help: did you mean: `get_mut` + | ^^^^^^^^ help: there is a method with a similar name: `get_mut` | = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `test_mut`, perhaps you need to implement it: diff --git a/src/test/ui/auto-trait-validation.stderr b/src/test/ui/auto-trait-validation.stderr index e077982069..ae21984c06 100644 --- a/src/test/ui/auto-trait-validation.stderr +++ b/src/test/ui/auto-trait-validation.stderr @@ -18,5 +18,4 @@ LL | auto trait MyTrait { fn foo() {} } error: aborting due to 3 previous errors -Some errors occurred: E0380, E0567, E0568. -For more information about an error, try `rustc --explain E0380`. +For more information about this error, try `rustc --explain E0380`. diff --git a/src/test/ui/auxiliary/default-ty-param-cross-crate-crate.rs b/src/test/ui/auxiliary/default-ty-param-cross-crate-crate.rs index 612f99dbcf..d722b78768 100644 --- a/src/test/ui/auxiliary/default-ty-param-cross-crate-crate.rs +++ b/src/test/ui/auxiliary/default-ty-param-cross-crate-crate.rs @@ -7,4 +7,3 @@ use std::marker::PhantomData; pub struct Foo(PhantomData<(A, B)>); pub fn bleh() -> Foo { Foo(PhantomData) } - diff --git a/src/test/ui/auxiliary/issue-59764.rs b/src/test/ui/auxiliary/issue-59764.rs new file mode 100644 index 0000000000..a92eed968d --- /dev/null +++ b/src/test/ui/auxiliary/issue-59764.rs @@ -0,0 +1,18 @@ +pub mod foo { + #[macro_export] + macro_rules! makro { + ($foo:ident) => { + fn $foo() { } + } + } + + pub fn baz() {} + + pub fn foobar() {} + + pub mod barbaz { + pub fn barfoo() {} + } +} + +pub fn foobaz() {} diff --git a/src/test/ui/await-keyword/2015-edition-error-in-non-macro-position.rs b/src/test/ui/await-keyword/2015-edition-error-in-non-macro-position.rs new file mode 100644 index 0000000000..c4f3f3edc4 --- /dev/null +++ b/src/test/ui/await-keyword/2015-edition-error-in-non-macro-position.rs @@ -0,0 +1,36 @@ +#![feature(async_await, await_macro)] +#![allow(non_camel_case_types)] +#![deny(keyword_idents)] + +mod outer_mod { + pub mod await { //~ ERROR `await` is a keyword in the 2018 edition + //~^ WARN this was previously accepted by the compiler + pub struct await; //~ ERROR `await` is a keyword in the 2018 edition + //~^ WARN this was previously accepted by the compiler + } +} +use outer_mod::await::await; //~ ERROR `await` is a keyword in the 2018 edition +//~^ ERROR `await` is a keyword in the 2018 edition +//~^^ WARN this was previously accepted by the compiler +//~^^^ WARN this was previously accepted by the compiler + +struct Foo { await: () } +//~^ ERROR `await` is a keyword in the 2018 edition +//~^^ WARN this was previously accepted by the compiler + +impl Foo { fn await() {} } +//~^ ERROR `await` is a keyword in the 2018 edition +//~^^ WARN this was previously accepted by the compiler + +macro_rules! await { +//~^ ERROR `await` is a keyword in the 2018 edition +//~^^ WARN this was previously accepted by the compiler + () => {} +} + +fn main() { + match await { await => {} } //~ ERROR `await` is a keyword in the 2018 edition + //~^ ERROR `await` is a keyword in the 2018 edition + //~^^ WARN this was previously accepted by the compiler + //~^^^ WARN this was previously accepted by the compiler +} diff --git a/src/test/ui/await-keyword/2015-edition-error-in-non-macro-position.stderr b/src/test/ui/await-keyword/2015-edition-error-in-non-macro-position.stderr new file mode 100644 index 0000000000..067ecd6a51 --- /dev/null +++ b/src/test/ui/await-keyword/2015-edition-error-in-non-macro-position.stderr @@ -0,0 +1,88 @@ +error: `await` is a keyword in the 2018 edition + --> $DIR/2015-edition-error-in-non-macro-position.rs:6:13 + | +LL | pub mod await { + | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` + | +note: lint level defined here + --> $DIR/2015-edition-error-in-non-macro-position.rs:3:9 + | +LL | #![deny(keyword_idents)] + | ^^^^^^^^^^^^^^ + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = note: for more information, see issue #49716 + +error: `await` is a keyword in the 2018 edition + --> $DIR/2015-edition-error-in-non-macro-position.rs:8:20 + | +LL | pub struct await; + | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = note: for more information, see issue #49716 + +error: `await` is a keyword in the 2018 edition + --> $DIR/2015-edition-error-in-non-macro-position.rs:12:16 + | +LL | use outer_mod::await::await; + | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = note: for more information, see issue #49716 + +error: `await` is a keyword in the 2018 edition + --> $DIR/2015-edition-error-in-non-macro-position.rs:12:23 + | +LL | use outer_mod::await::await; + | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = note: for more information, see issue #49716 + +error: `await` is a keyword in the 2018 edition + --> $DIR/2015-edition-error-in-non-macro-position.rs:17:14 + | +LL | struct Foo { await: () } + | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = note: for more information, see issue #49716 + +error: `await` is a keyword in the 2018 edition + --> $DIR/2015-edition-error-in-non-macro-position.rs:21:15 + | +LL | impl Foo { fn await() {} } + | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = note: for more information, see issue #49716 + +error: `await` is a keyword in the 2018 edition + --> $DIR/2015-edition-error-in-non-macro-position.rs:25:14 + | +LL | macro_rules! await { + | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = note: for more information, see issue #49716 + +error: `await` is a keyword in the 2018 edition + --> $DIR/2015-edition-error-in-non-macro-position.rs:32:11 + | +LL | match await { await => {} } + | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = note: for more information, see issue #49716 + +error: `await` is a keyword in the 2018 edition + --> $DIR/2015-edition-error-in-non-macro-position.rs:32:19 + | +LL | match await { await => {} } + | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! + = note: for more information, see issue #49716 + +error: aborting due to 9 previous errors + diff --git a/src/test/ui/await-keyword/2015-edition-no-warnings-with-feature-gate.rs b/src/test/ui/await-keyword/2015-edition-no-warnings-with-feature-gate.rs deleted file mode 100644 index 92c60e7d6e..0000000000 --- a/src/test/ui/await-keyword/2015-edition-no-warnings-with-feature-gate.rs +++ /dev/null @@ -1,16 +0,0 @@ -// compile-pass - -#![feature(async_await)] -#![allow(non_camel_case_types)] -#![deny(keyword_idents)] - -mod outer_mod { - pub mod await { - pub struct await; - } -} -use outer_mod::await::await; - -fn main() { - match await { await => {} } -} diff --git a/src/test/ui/await-keyword/2018-edition-error-in-non-macro-position.rs b/src/test/ui/await-keyword/2018-edition-error-in-non-macro-position.rs new file mode 100644 index 0000000000..f59f1160e7 --- /dev/null +++ b/src/test/ui/await-keyword/2018-edition-error-in-non-macro-position.rs @@ -0,0 +1,25 @@ +// edition:2018 + +#![allow(non_camel_case_types)] +#![feature(async_await, await_macro)] + +mod outer_mod { + pub mod await { //~ ERROR expected identifier, found reserved keyword `await` + pub struct await; //~ ERROR expected identifier, found reserved keyword `await` + } +} +use self::outer_mod::await::await; //~ ERROR expected identifier, found reserved keyword `await` +//~^ ERROR expected identifier, found reserved keyword `await` + +struct Foo { await: () } +//~^ ERROR expected identifier, found reserved keyword `await` + +impl Foo { fn await() {} } +//~^ ERROR expected identifier, found reserved keyword `await` + +macro_rules! await { +//~^ ERROR expected identifier, found reserved keyword `await` + () => {} +} + +fn main() {} diff --git a/src/test/ui/await-keyword/2018-edition-error-in-non-macro-position.stderr b/src/test/ui/await-keyword/2018-edition-error-in-non-macro-position.stderr new file mode 100644 index 0000000000..c4b82b29f0 --- /dev/null +++ b/src/test/ui/await-keyword/2018-edition-error-in-non-macro-position.stderr @@ -0,0 +1,72 @@ +error: expected identifier, found reserved keyword `await` + --> $DIR/2018-edition-error-in-non-macro-position.rs:7:13 + | +LL | pub mod await { + | ^^^^^ expected identifier, found reserved keyword +help: you can escape reserved keywords to use them as identifiers + | +LL | pub mod r#await { + | ^^^^^^^ + +error: expected identifier, found reserved keyword `await` + --> $DIR/2018-edition-error-in-non-macro-position.rs:8:20 + | +LL | pub struct await; + | ^^^^^ expected identifier, found reserved keyword +help: you can escape reserved keywords to use them as identifiers + | +LL | pub struct r#await; + | ^^^^^^^ + +error: expected identifier, found reserved keyword `await` + --> $DIR/2018-edition-error-in-non-macro-position.rs:11:22 + | +LL | use self::outer_mod::await::await; + | ^^^^^ expected identifier, found reserved keyword +help: you can escape reserved keywords to use them as identifiers + | +LL | use self::outer_mod::r#await::await; + | ^^^^^^^ + +error: expected identifier, found reserved keyword `await` + --> $DIR/2018-edition-error-in-non-macro-position.rs:11:29 + | +LL | use self::outer_mod::await::await; + | ^^^^^ expected identifier, found reserved keyword +help: you can escape reserved keywords to use them as identifiers + | +LL | use self::outer_mod::await::r#await; + | ^^^^^^^ + +error: expected identifier, found reserved keyword `await` + --> $DIR/2018-edition-error-in-non-macro-position.rs:14:14 + | +LL | struct Foo { await: () } + | ^^^^^ expected identifier, found reserved keyword +help: you can escape reserved keywords to use them as identifiers + | +LL | struct Foo { r#await: () } + | ^^^^^^^ + +error: expected identifier, found reserved keyword `await` + --> $DIR/2018-edition-error-in-non-macro-position.rs:17:15 + | +LL | impl Foo { fn await() {} } + | ^^^^^ expected identifier, found reserved keyword +help: you can escape reserved keywords to use them as identifiers + | +LL | impl Foo { fn r#await() {} } + | ^^^^^^^ + +error: expected identifier, found reserved keyword `await` + --> $DIR/2018-edition-error-in-non-macro-position.rs:20:14 + | +LL | macro_rules! await { + | ^^^^^ expected identifier, found reserved keyword +help: you can escape reserved keywords to use them as identifiers + | +LL | macro_rules! r#await { + | ^^^^^^^ + +error: aborting due to 7 previous errors + diff --git a/src/test/ui/await-keyword/2018-edition-error.rs b/src/test/ui/await-keyword/2018-edition-error.rs index 7ba3382ddf..d856869684 100644 --- a/src/test/ui/await-keyword/2018-edition-error.rs +++ b/src/test/ui/await-keyword/2018-edition-error.rs @@ -2,14 +2,11 @@ #![allow(non_camel_case_types)] mod outer_mod { - pub mod await { //~ ERROR `await` is a keyword - pub struct await; //~ ERROR `await` is a keyword + pub mod await { //~ ERROR expected identifier + pub struct await; //~ ERROR expected identifier } } -use self::outer_mod::await::await; //~ ERROR `await` is a keyword - //~^ ERROR `await` is a keyword +use self::outer_mod::await::await; //~ ERROR expected identifier + //~^ ERROR expected identifier, found reserved keyword `await` -fn main() { - match await { await => () } //~ ERROR `await` is a keyword - //~^ ERROR `await` is a keyword -} +fn main() {} diff --git a/src/test/ui/await-keyword/2018-edition-error.stderr b/src/test/ui/await-keyword/2018-edition-error.stderr index 19bf11a67d..8afe5c1a36 100644 --- a/src/test/ui/await-keyword/2018-edition-error.stderr +++ b/src/test/ui/await-keyword/2018-edition-error.stderr @@ -1,39 +1,42 @@ -error[E0721]: `await` is a keyword in the 2018 edition +error: expected identifier, found reserved keyword `await` --> $DIR/2018-edition-error.rs:5:13 | LL | pub mod await { - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` + | ^^^^^ expected identifier, found reserved keyword +help: you can escape reserved keywords to use them as identifiers + | +LL | pub mod r#await { + | ^^^^^^^ -error[E0721]: `await` is a keyword in the 2018 edition +error: expected identifier, found reserved keyword `await` --> $DIR/2018-edition-error.rs:6:20 | LL | pub struct await; - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` + | ^^^^^ expected identifier, found reserved keyword +help: you can escape reserved keywords to use them as identifiers + | +LL | pub struct r#await; + | ^^^^^^^ -error[E0721]: `await` is a keyword in the 2018 edition +error: expected identifier, found reserved keyword `await` --> $DIR/2018-edition-error.rs:9:22 | LL | use self::outer_mod::await::await; - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` + | ^^^^^ expected identifier, found reserved keyword +help: you can escape reserved keywords to use them as identifiers + | +LL | use self::outer_mod::r#await::await; + | ^^^^^^^ -error[E0721]: `await` is a keyword in the 2018 edition +error: expected identifier, found reserved keyword `await` --> $DIR/2018-edition-error.rs:9:29 | LL | use self::outer_mod::await::await; - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` - -error[E0721]: `await` is a keyword in the 2018 edition - --> $DIR/2018-edition-error.rs:13:11 - | -LL | match await { await => () } - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` - -error[E0721]: `await` is a keyword in the 2018 edition - --> $DIR/2018-edition-error.rs:13:19 + | ^^^^^ expected identifier, found reserved keyword +help: you can escape reserved keywords to use them as identifiers | -LL | match await { await => () } - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` +LL | use self::outer_mod::await::r#await; + | ^^^^^^^ -error: aborting due to 6 previous errors +error: aborting due to 4 previous errors -For more information about this error, try `rustc --explain E0721`. diff --git a/src/test/ui/await-keyword/2018-edition-no-error-with-feature-gate.rs b/src/test/ui/await-keyword/2018-edition-no-error-with-feature-gate.rs deleted file mode 100644 index 52d32c8351..0000000000 --- a/src/test/ui/await-keyword/2018-edition-no-error-with-feature-gate.rs +++ /dev/null @@ -1,16 +0,0 @@ -// compile-pass -// edition:2018 - -#![allow(non_camel_case_types)] -#![feature(async_await)] - -mod outer_mod { - pub mod await { - pub struct await; - } -} -use self::outer_mod::await::await; - -fn main() { - match await { await => () } -} diff --git a/src/test/ui/await-keyword/incorrect-syntax-suggestions.rs b/src/test/ui/await-keyword/incorrect-syntax-suggestions.rs new file mode 100644 index 0000000000..e1e5bdd3d1 --- /dev/null +++ b/src/test/ui/await-keyword/incorrect-syntax-suggestions.rs @@ -0,0 +1,111 @@ +// edition:2018 + +#![feature(async_await)] + +async fn bar() -> Result<(), ()> { + Ok(()) +} + +async fn foo1() -> Result<(), ()> { + let _ = await bar(); //~ ERROR incorrect use of `await` + Ok(()) +} +async fn foo2() -> Result<(), ()> { + let _ = await? bar(); //~ ERROR incorrect use of `await` + Ok(()) +} +async fn foo3() -> Result<(), ()> { + let _ = await bar()?; //~ ERROR incorrect use of `await` + //~^ ERROR the `?` operator can only be applied to values that implement `std::ops::Try` + Ok(()) +} +async fn foo21() -> Result<(), ()> { + let _ = await { bar() }; //~ ERROR incorrect use of `await` + Ok(()) +} +async fn foo22() -> Result<(), ()> { + let _ = await(bar()); //~ ERROR incorrect use of `await` + Ok(()) +} +async fn foo23() -> Result<(), ()> { + let _ = await { bar() }?; //~ ERROR incorrect use of `await` + Ok(()) +} +async fn foo4() -> Result<(), ()> { + let _ = (await bar())?; //~ ERROR incorrect use of `await` + Ok(()) +} +async fn foo5() -> Result<(), ()> { + let _ = bar().await(); //~ ERROR incorrect use of `await` + Ok(()) +} +async fn foo6() -> Result<(), ()> { + let _ = bar().await()?; //~ ERROR incorrect use of `await` + Ok(()) +} +async fn foo7() -> Result<(), ()> { + let _ = bar().await; // OK + Ok(()) +} +async fn foo8() -> Result<(), ()> { + let _ = bar().await?; // OK + Ok(()) +} +fn foo9() -> Result<(), ()> { + let _ = await bar(); //~ ERROR `await` is only allowed inside `async` functions and blocks + //~^ ERROR incorrect use of `await` + Ok(()) +} +fn foo10() -> Result<(), ()> { + let _ = await? bar(); //~ ERROR `await` is only allowed inside `async` functions and blocks + //~^ ERROR incorrect use of `await` + Ok(()) +} +fn foo11() -> Result<(), ()> { + let _ = await bar()?; //~ ERROR `await` is only allowed inside `async` functions and blocks + //~^ ERROR incorrect use of `await` + Ok(()) +} +fn foo12() -> Result<(), ()> { + let _ = (await bar())?; //~ ERROR `await` is only allowed inside `async` functions and blocks + //~^ ERROR incorrect use of `await` + Ok(()) +} +fn foo13() -> Result<(), ()> { + let _ = bar().await(); //~ ERROR `await` is only allowed inside `async` functions and blocks + //~^ ERROR incorrect use of `await` + Ok(()) +} +fn foo14() -> Result<(), ()> { + let _ = bar().await()?; //~ ERROR `await` is only allowed inside `async` functions and blocks + //~^ ERROR incorrect use of `await` + Ok(()) +} +fn foo15() -> Result<(), ()> { + let _ = bar().await; //~ ERROR `await` is only allowed inside `async` functions and blocks + Ok(()) +} +fn foo16() -> Result<(), ()> { + let _ = bar().await?; //~ ERROR `await` is only allowed inside `async` functions and blocks + Ok(()) +} +fn foo24() -> Result<(), ()> { + fn foo() -> Result<(), ()> { + let _ = bar().await?; //~ ERROR `await` is only allowed inside `async` functions and blocks + Ok(()) + } + foo() +} +fn foo25() -> Result<(), ()> { + let foo = || { + let _ = bar().await?; //~ ERROR `await` is only allowed inside `async` functions and blocks + Ok(()) + }; + foo() +} + +fn main() { + match await { await => () } + //~^ ERROR expected expression, found `=>` + //~| ERROR incorrect use of `await` +} //~ ERROR expected one of `.`, `?`, `{`, or an operator, found `}` diff --git a/src/test/ui/await-keyword/incorrect-syntax-suggestions.stderr b/src/test/ui/await-keyword/incorrect-syntax-suggestions.stderr new file mode 100644 index 0000000000..380da4448a --- /dev/null +++ b/src/test/ui/await-keyword/incorrect-syntax-suggestions.stderr @@ -0,0 +1,207 @@ +error: incorrect use of `await` + --> $DIR/incorrect-syntax-suggestions.rs:10:13 + | +LL | let _ = await bar(); + | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await` + +error: incorrect use of `await` + --> $DIR/incorrect-syntax-suggestions.rs:14:13 + | +LL | let _ = await? bar(); + | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await?` + +error: incorrect use of `await` + --> $DIR/incorrect-syntax-suggestions.rs:18:13 + | +LL | let _ = await bar()?; + | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar()?.await` + +error: incorrect use of `await` + --> $DIR/incorrect-syntax-suggestions.rs:23:13 + | +LL | let _ = await { bar() }; + | ^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ bar() }.await` + +error: incorrect use of `await` + --> $DIR/incorrect-syntax-suggestions.rs:27:13 + | +LL | let _ = await(bar()); + | ^^^^^^^^^^^^ help: `await` is a postfix operation: `(bar()).await` + +error: incorrect use of `await` + --> $DIR/incorrect-syntax-suggestions.rs:31:13 + | +LL | let _ = await { bar() }?; + | ^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ bar() }.await` + +error: incorrect use of `await` + --> $DIR/incorrect-syntax-suggestions.rs:35:14 + | +LL | let _ = (await bar())?; + | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await` + +error: incorrect use of `await` + --> $DIR/incorrect-syntax-suggestions.rs:39:24 + | +LL | let _ = bar().await(); + | ^^ help: `await` is not a method call, remove the parentheses + +error: incorrect use of `await` + --> $DIR/incorrect-syntax-suggestions.rs:43:24 + | +LL | let _ = bar().await()?; + | ^^ help: `await` is not a method call, remove the parentheses + +error: incorrect use of `await` + --> $DIR/incorrect-syntax-suggestions.rs:55:13 + | +LL | let _ = await bar(); + | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await` + +error: incorrect use of `await` + --> $DIR/incorrect-syntax-suggestions.rs:60:13 + | +LL | let _ = await? bar(); + | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await?` + +error: incorrect use of `await` + --> $DIR/incorrect-syntax-suggestions.rs:65:13 + | +LL | let _ = await bar()?; + | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar()?.await` + +error: incorrect use of `await` + --> $DIR/incorrect-syntax-suggestions.rs:70:14 + | +LL | let _ = (await bar())?; + | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await` + +error: incorrect use of `await` + --> $DIR/incorrect-syntax-suggestions.rs:75:24 + | +LL | let _ = bar().await(); + | ^^ help: `await` is not a method call, remove the parentheses + +error: incorrect use of `await` + --> $DIR/incorrect-syntax-suggestions.rs:80:24 + | +LL | let _ = bar().await()?; + | ^^ help: `await` is not a method call, remove the parentheses + +error: expected expression, found `=>` + --> $DIR/incorrect-syntax-suggestions.rs:108:25 + | +LL | match await { await => () } + | ----- ^^ expected expression + | | + | while parsing this incorrect await expression + +error: incorrect use of `await` + --> $DIR/incorrect-syntax-suggestions.rs:108:11 + | +LL | match await { await => () } + | ^^^^^^^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ await => () }.await` + +error: expected one of `.`, `?`, `{`, or an operator, found `}` + --> $DIR/incorrect-syntax-suggestions.rs:111:1 + | +LL | match await { await => () } + | ----- - expected one of `.`, `?`, `{`, or an operator here + | | + | while parsing this match expression +... +LL | } + | ^ unexpected token + +error[E0728]: `await` is only allowed inside `async` functions and blocks + --> $DIR/incorrect-syntax-suggestions.rs:55:13 + | +LL | fn foo9() -> Result<(), ()> { + | ---- this is not `async` +LL | let _ = await bar(); + | ^^^^^^^^^^^ only allowed inside `async` functions and blocks + +error[E0728]: `await` is only allowed inside `async` functions and blocks + --> $DIR/incorrect-syntax-suggestions.rs:60:13 + | +LL | fn foo10() -> Result<(), ()> { + | ----- this is not `async` +LL | let _ = await? bar(); + | ^^^^^^^^^^^^ only allowed inside `async` functions and blocks + +error[E0728]: `await` is only allowed inside `async` functions and blocks + --> $DIR/incorrect-syntax-suggestions.rs:65:13 + | +LL | fn foo11() -> Result<(), ()> { + | ----- this is not `async` +LL | let _ = await bar()?; + | ^^^^^^^^^^^^ only allowed inside `async` functions and blocks + +error[E0728]: `await` is only allowed inside `async` functions and blocks + --> $DIR/incorrect-syntax-suggestions.rs:70:14 + | +LL | fn foo12() -> Result<(), ()> { + | ----- this is not `async` +LL | let _ = (await bar())?; + | ^^^^^^^^^^^ only allowed inside `async` functions and blocks + +error[E0728]: `await` is only allowed inside `async` functions and blocks + --> $DIR/incorrect-syntax-suggestions.rs:75:13 + | +LL | fn foo13() -> Result<(), ()> { + | ----- this is not `async` +LL | let _ = bar().await(); + | ^^^^^^^^^^^ only allowed inside `async` functions and blocks + +error[E0728]: `await` is only allowed inside `async` functions and blocks + --> $DIR/incorrect-syntax-suggestions.rs:80:13 + | +LL | fn foo14() -> Result<(), ()> { + | ----- this is not `async` +LL | let _ = bar().await()?; + | ^^^^^^^^^^^ only allowed inside `async` functions and blocks + +error[E0728]: `await` is only allowed inside `async` functions and blocks + --> $DIR/incorrect-syntax-suggestions.rs:85:13 + | +LL | fn foo15() -> Result<(), ()> { + | ----- this is not `async` +LL | let _ = bar().await; + | ^^^^^^^^^^^ only allowed inside `async` functions and blocks + +error[E0728]: `await` is only allowed inside `async` functions and blocks + --> $DIR/incorrect-syntax-suggestions.rs:89:13 + | +LL | fn foo16() -> Result<(), ()> { + | ----- this is not `async` +LL | let _ = bar().await?; + | ^^^^^^^^^^^ only allowed inside `async` functions and blocks + +error[E0728]: `await` is only allowed inside `async` functions and blocks + --> $DIR/incorrect-syntax-suggestions.rs:94:17 + | +LL | fn foo() -> Result<(), ()> { + | --- this is not `async` +LL | let _ = bar().await?; + | ^^^^^^^^^^^ only allowed inside `async` functions and blocks + +error[E0728]: `await` is only allowed inside `async` functions and blocks + --> $DIR/incorrect-syntax-suggestions.rs:101:17 + | +LL | let foo = || { + | -- this is not `async` +LL | let _ = bar().await?; + | ^^^^^^^^^^^ only allowed inside `async` functions and blocks + +error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` + --> $DIR/incorrect-syntax-suggestions.rs:18:19 + | +LL | let _ = await bar()?; + | ^^^^^^ the `?` operator cannot be applied to type `impl std::future::Future` + | + = help: the trait `std::ops::Try` is not implemented for `impl std::future::Future` + = note: required by `std::ops::Try::into_result` + +error: aborting due to 29 previous errors + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/await-keyword/post_expansion_error.rs b/src/test/ui/await-keyword/post_expansion_error.rs index 96dd48052d..b4c899b0d0 100644 --- a/src/test/ui/await-keyword/post_expansion_error.rs +++ b/src/test/ui/await-keyword/post_expansion_error.rs @@ -6,5 +6,5 @@ macro_rules! r#await { fn main() { await!() - //~^ ERROR `await` is a keyword + //~^ ERROR expected expression, found `)` } diff --git a/src/test/ui/await-keyword/post_expansion_error.stderr b/src/test/ui/await-keyword/post_expansion_error.stderr index 76ae35b751..4e525974c2 100644 --- a/src/test/ui/await-keyword/post_expansion_error.stderr +++ b/src/test/ui/await-keyword/post_expansion_error.stderr @@ -1,9 +1,10 @@ -error[E0721]: `await` is a keyword in the 2018 edition - --> $DIR/post_expansion_error.rs:8:5 +error: expected expression, found `)` + --> $DIR/post_expansion_error.rs:8:12 | LL | await!() - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` + | ----- ^ expected expression + | | + | while parsing this await macro call error: aborting due to previous error -For more information about this error, try `rustc --explain E0721`. diff --git a/src/test/ui/bad/bad-env-capture.stderr b/src/test/ui/bad/bad-env-capture.stderr index 04975b0378..f78a38a3dd 100644 --- a/src/test/ui/bad/bad-env-capture.stderr +++ b/src/test/ui/bad/bad-env-capture.stderr @@ -20,5 +20,5 @@ LL | fn bar() { log(debug, x); } error: aborting due to 3 previous errors -Some errors occurred: E0425, E0434. +Some errors have detailed explanations: E0425, E0434. For more information about an error, try `rustc --explain E0425`. diff --git a/src/test/ui/bad/bad-env-capture2.stderr b/src/test/ui/bad/bad-env-capture2.stderr index f7524c6a09..57c807fd7d 100644 --- a/src/test/ui/bad/bad-env-capture2.stderr +++ b/src/test/ui/bad/bad-env-capture2.stderr @@ -20,5 +20,5 @@ LL | fn bar() { log(debug, x); } error: aborting due to 3 previous errors -Some errors occurred: E0425, E0434. +Some errors have detailed explanations: E0425, E0434. For more information about an error, try `rustc --explain E0425`. diff --git a/src/test/ui/bad/bad-env-capture3.stderr b/src/test/ui/bad/bad-env-capture3.stderr index 137612c979..d6eb4f86e1 100644 --- a/src/test/ui/bad/bad-env-capture3.stderr +++ b/src/test/ui/bad/bad-env-capture3.stderr @@ -20,5 +20,5 @@ LL | fn bar() { log(debug, x); } error: aborting due to 3 previous errors -Some errors occurred: E0425, E0434. +Some errors have detailed explanations: E0425, E0434. For more information about an error, try `rustc --explain E0425`. diff --git a/src/test/ui/bad/bad-expr-lhs.stderr b/src/test/ui/bad/bad-expr-lhs.stderr index 3e41b7e658..a0de6a7379 100644 --- a/src/test/ui/bad/bad-expr-lhs.stderr +++ b/src/test/ui/bad/bad-expr-lhs.stderr @@ -30,5 +30,5 @@ LL | None = Some(3); error: aborting due to 5 previous errors -Some errors occurred: E0067, E0070. +Some errors have detailed explanations: E0067, E0070. For more information about an error, try `rustc --explain E0067`. diff --git a/src/test/ui/bad/bad-expr-path.stderr b/src/test/ui/bad/bad-expr-path.stderr index 6dec74efd7..15ac7f2b86 100644 --- a/src/test/ui/bad/bad-expr-path.stderr +++ b/src/test/ui/bad/bad-expr-path.stderr @@ -27,5 +27,5 @@ LL | fn main(arguments: Vec) { error: aborting due to 4 previous errors -Some errors occurred: E0425, E0580. +Some errors have detailed explanations: E0425, E0580. For more information about an error, try `rustc --explain E0425`. diff --git a/src/test/ui/bad/bad-expr-path2.stderr b/src/test/ui/bad/bad-expr-path2.stderr index 8212b2392c..45723168f1 100644 --- a/src/test/ui/bad/bad-expr-path2.stderr +++ b/src/test/ui/bad/bad-expr-path2.stderr @@ -27,5 +27,5 @@ LL | fn main(arguments: Vec) { error: aborting due to 4 previous errors -Some errors occurred: E0423, E0425, E0580. +Some errors have detailed explanations: E0423, E0425, E0580. For more information about an error, try `rustc --explain E0423`. diff --git a/src/test/ui/bad/bad-extern-link-attrs.stderr b/src/test/ui/bad/bad-extern-link-attrs.stderr index a77f5f9f43..18b0dc9ea3 100644 --- a/src/test/ui/bad/bad-extern-link-attrs.stderr +++ b/src/test/ui/bad/bad-extern-link-attrs.stderr @@ -20,5 +20,5 @@ LL | #[link(name = "foo", kind = "bar")] error: aborting due to 3 previous errors -Some errors occurred: E0454, E0458, E0459. +Some errors have detailed explanations: E0454, E0458, E0459. For more information about an error, try `rustc --explain E0454`. diff --git a/src/test/ui/bad/bad-intrinsic-monomorphization.stderr b/src/test/ui/bad/bad-intrinsic-monomorphization.stderr index dee33f574d..34fdba1136 100644 --- a/src/test/ui/bad/bad-intrinsic-monomorphization.stderr +++ b/src/test/ui/bad/bad-intrinsic-monomorphization.stderr @@ -18,4 +18,3 @@ LL | simd_add(a, b) error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0511`. diff --git a/src/test/ui/bad/bad-lint-cap3.rs b/src/test/ui/bad/bad-lint-cap3.rs index 8aab38ee5e..4cfa0b266c 100644 --- a/src/test/ui/bad/bad-lint-cap3.rs +++ b/src/test/ui/bad/bad-lint-cap3.rs @@ -8,4 +8,3 @@ use std::option; //~ WARN fn main() {} - diff --git a/src/test/ui/bad/bad-sized.stderr b/src/test/ui/bad/bad-sized.stderr index 51b8474555..321f975415 100644 --- a/src/test/ui/bad/bad-sized.stderr +++ b/src/test/ui/bad/bad-sized.stderr @@ -26,5 +26,5 @@ LL | let x: Vec = Vec::new(); error: aborting due to 3 previous errors -Some errors occurred: E0225, E0277. +Some errors have detailed explanations: E0225, E0277. For more information about an error, try `rustc --explain E0225`. diff --git a/src/test/ui/bad/bad-type-env-capture.stderr b/src/test/ui/bad/bad-type-env-capture.stderr index a459c00634..6f24c0d869 100644 --- a/src/test/ui/bad/bad-type-env-capture.stderr +++ b/src/test/ui/bad/bad-type-env-capture.stderr @@ -2,7 +2,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/bad-type-env-capture.rs:2:15 | LL | fn foo() { - | - type variable from outer function + | - type parameter from outer function LL | fn bar(b: T) { } | --- ^ use of generic parameter from outer function | | diff --git a/src/test/ui/bind-by-move/bind-by-move-no-guards.nll.stderr b/src/test/ui/bind-by-move/bind-by-move-no-guards.nll.stderr deleted file mode 100644 index 5f8b7007f3..0000000000 --- a/src/test/ui/bind-by-move/bind-by-move-no-guards.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0008]: cannot bind by-move into a pattern guard - --> $DIR/bind-by-move-no-guards.rs:8:14 - | -LL | Some(z) if z.recv().unwrap() => { panic!() }, - | ^ moves value into pattern guard - | - = help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0008`. diff --git a/src/test/ui/bind-by-move/bind-by-move-no-guards.stderr b/src/test/ui/bind-by-move/bind-by-move-no-guards.stderr index 2af2b0d660..5f8b7007f3 100644 --- a/src/test/ui/bind-by-move/bind-by-move-no-guards.stderr +++ b/src/test/ui/bind-by-move/bind-by-move-no-guards.stderr @@ -3,6 +3,8 @@ error[E0008]: cannot bind by-move into a pattern guard | LL | Some(z) if z.recv().unwrap() => { panic!() }, | ^ moves value into pattern guard + | + = help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/binop/binop-consume-args.nll.stderr b/src/test/ui/binop/binop-consume-args.nll.stderr deleted file mode 100644 index 5751af27fc..0000000000 --- a/src/test/ui/binop/binop-consume-args.nll.stderr +++ /dev/null @@ -1,253 +0,0 @@ -error[E0382]: use of moved value: `lhs` - --> $DIR/binop-consume-args.rs:7:10 - | -LL | fn add, B>(lhs: A, rhs: B) { - | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs + rhs; - | --- value moved here -LL | drop(lhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `rhs` - --> $DIR/binop-consume-args.rs:8:10 - | -LL | fn add, B>(lhs: A, rhs: B) { - | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs + rhs; - | --- value moved here -LL | drop(lhs); -LL | drop(rhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `lhs` - --> $DIR/binop-consume-args.rs:13:10 - | -LL | fn sub, B>(lhs: A, rhs: B) { - | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs - rhs; - | --- value moved here -LL | drop(lhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `rhs` - --> $DIR/binop-consume-args.rs:14:10 - | -LL | fn sub, B>(lhs: A, rhs: B) { - | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs - rhs; - | --- value moved here -LL | drop(lhs); -LL | drop(rhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `lhs` - --> $DIR/binop-consume-args.rs:19:10 - | -LL | fn mul, B>(lhs: A, rhs: B) { - | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs * rhs; - | --- value moved here -LL | drop(lhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `rhs` - --> $DIR/binop-consume-args.rs:20:10 - | -LL | fn mul, B>(lhs: A, rhs: B) { - | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs * rhs; - | --- value moved here -LL | drop(lhs); -LL | drop(rhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `lhs` - --> $DIR/binop-consume-args.rs:25:10 - | -LL | fn div, B>(lhs: A, rhs: B) { - | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs / rhs; - | --- value moved here -LL | drop(lhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `rhs` - --> $DIR/binop-consume-args.rs:26:10 - | -LL | fn div, B>(lhs: A, rhs: B) { - | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs / rhs; - | --- value moved here -LL | drop(lhs); -LL | drop(rhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `lhs` - --> $DIR/binop-consume-args.rs:31:10 - | -LL | fn rem, B>(lhs: A, rhs: B) { - | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs % rhs; - | --- value moved here -LL | drop(lhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `rhs` - --> $DIR/binop-consume-args.rs:32:10 - | -LL | fn rem, B>(lhs: A, rhs: B) { - | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs % rhs; - | --- value moved here -LL | drop(lhs); -LL | drop(rhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `lhs` - --> $DIR/binop-consume-args.rs:37:10 - | -LL | fn bitand, B>(lhs: A, rhs: B) { - | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs & rhs; - | --- value moved here -LL | drop(lhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `rhs` - --> $DIR/binop-consume-args.rs:38:10 - | -LL | fn bitand, B>(lhs: A, rhs: B) { - | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs & rhs; - | --- value moved here -LL | drop(lhs); -LL | drop(rhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `lhs` - --> $DIR/binop-consume-args.rs:43:10 - | -LL | fn bitor, B>(lhs: A, rhs: B) { - | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs | rhs; - | --- value moved here -LL | drop(lhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `rhs` - --> $DIR/binop-consume-args.rs:44:10 - | -LL | fn bitor, B>(lhs: A, rhs: B) { - | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs | rhs; - | --- value moved here -LL | drop(lhs); -LL | drop(rhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `lhs` - --> $DIR/binop-consume-args.rs:49:10 - | -LL | fn bitxor, B>(lhs: A, rhs: B) { - | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs ^ rhs; - | --- value moved here -LL | drop(lhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `rhs` - --> $DIR/binop-consume-args.rs:50:10 - | -LL | fn bitxor, B>(lhs: A, rhs: B) { - | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs ^ rhs; - | --- value moved here -LL | drop(lhs); -LL | drop(rhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `lhs` - --> $DIR/binop-consume-args.rs:55:10 - | -LL | fn shl, B>(lhs: A, rhs: B) { - | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs << rhs; - | --- value moved here -LL | drop(lhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `rhs` - --> $DIR/binop-consume-args.rs:56:10 - | -LL | fn shl, B>(lhs: A, rhs: B) { - | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs << rhs; - | --- value moved here -LL | drop(lhs); -LL | drop(rhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `lhs` - --> $DIR/binop-consume-args.rs:61:10 - | -LL | fn shr, B>(lhs: A, rhs: B) { - | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs >> rhs; - | --- value moved here -LL | drop(lhs); - | ^^^ value used here after move - -error[E0382]: use of moved value: `rhs` - --> $DIR/binop-consume-args.rs:62:10 - | -LL | fn shr, B>(lhs: A, rhs: B) { - | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | lhs >> rhs; - | --- value moved here -LL | drop(lhs); -LL | drop(rhs); - | ^^^ value used here after move - -error: aborting due to 20 previous errors - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/binop/binop-consume-args.stderr b/src/test/ui/binop/binop-consume-args.stderr index 9246c11670..5751af27fc 100644 --- a/src/test/ui/binop/binop-consume-args.stderr +++ b/src/test/ui/binop/binop-consume-args.stderr @@ -1,212 +1,252 @@ error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:7:10 | +LL | fn add, B>(lhs: A, rhs: B) { + | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs + rhs; | --- value moved here LL | drop(lhs); | ^^^ value used here after move - | - = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:8:10 | +LL | fn add, B>(lhs: A, rhs: B) { + | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs + rhs; | --- value moved here LL | drop(lhs); LL | drop(rhs); | ^^^ value used here after move - | - = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:13:10 | +LL | fn sub, B>(lhs: A, rhs: B) { + | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs - rhs; | --- value moved here LL | drop(lhs); | ^^^ value used here after move - | - = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:14:10 | +LL | fn sub, B>(lhs: A, rhs: B) { + | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs - rhs; | --- value moved here LL | drop(lhs); LL | drop(rhs); | ^^^ value used here after move - | - = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:19:10 | +LL | fn mul, B>(lhs: A, rhs: B) { + | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs * rhs; | --- value moved here LL | drop(lhs); | ^^^ value used here after move - | - = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:20:10 | +LL | fn mul, B>(lhs: A, rhs: B) { + | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs * rhs; | --- value moved here LL | drop(lhs); LL | drop(rhs); | ^^^ value used here after move - | - = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:25:10 | +LL | fn div, B>(lhs: A, rhs: B) { + | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs / rhs; | --- value moved here LL | drop(lhs); | ^^^ value used here after move - | - = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:26:10 | +LL | fn div, B>(lhs: A, rhs: B) { + | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs / rhs; | --- value moved here LL | drop(lhs); LL | drop(rhs); | ^^^ value used here after move - | - = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:31:10 | +LL | fn rem, B>(lhs: A, rhs: B) { + | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs % rhs; | --- value moved here LL | drop(lhs); | ^^^ value used here after move - | - = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:32:10 | +LL | fn rem, B>(lhs: A, rhs: B) { + | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs % rhs; | --- value moved here LL | drop(lhs); LL | drop(rhs); | ^^^ value used here after move - | - = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:37:10 | +LL | fn bitand, B>(lhs: A, rhs: B) { + | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs & rhs; | --- value moved here LL | drop(lhs); | ^^^ value used here after move - | - = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:38:10 | +LL | fn bitand, B>(lhs: A, rhs: B) { + | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs & rhs; | --- value moved here LL | drop(lhs); LL | drop(rhs); | ^^^ value used here after move - | - = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:43:10 | +LL | fn bitor, B>(lhs: A, rhs: B) { + | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs | rhs; | --- value moved here LL | drop(lhs); | ^^^ value used here after move - | - = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:44:10 | +LL | fn bitor, B>(lhs: A, rhs: B) { + | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs | rhs; | --- value moved here LL | drop(lhs); LL | drop(rhs); | ^^^ value used here after move - | - = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:49:10 | +LL | fn bitxor, B>(lhs: A, rhs: B) { + | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs ^ rhs; | --- value moved here LL | drop(lhs); | ^^^ value used here after move - | - = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:50:10 | +LL | fn bitxor, B>(lhs: A, rhs: B) { + | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs ^ rhs; | --- value moved here LL | drop(lhs); LL | drop(rhs); | ^^^ value used here after move - | - = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:55:10 | +LL | fn shl, B>(lhs: A, rhs: B) { + | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs << rhs; | --- value moved here LL | drop(lhs); | ^^^ value used here after move - | - = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:56:10 | +LL | fn shl, B>(lhs: A, rhs: B) { + | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs << rhs; | --- value moved here LL | drop(lhs); LL | drop(rhs); | ^^^ value used here after move - | - = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait error[E0382]: use of moved value: `lhs` --> $DIR/binop-consume-args.rs:61:10 | +LL | fn shr, B>(lhs: A, rhs: B) { + | - --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs >> rhs; | --- value moved here LL | drop(lhs); | ^^^ value used here after move - | - = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait error[E0382]: use of moved value: `rhs` --> $DIR/binop-consume-args.rs:62:10 | +LL | fn shr, B>(lhs: A, rhs: B) { + | - --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | lhs >> rhs; | --- value moved here LL | drop(lhs); LL | drop(rhs); | ^^^ value used here after move - | - = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait error: aborting due to 20 previous errors diff --git a/src/test/ui/binop/binop-logic-float.rs b/src/test/ui/binop/binop-logic-float.rs index c95c1d30d1..1750d97ba8 100644 --- a/src/test/ui/binop/binop-logic-float.rs +++ b/src/test/ui/binop/binop-logic-float.rs @@ -1,4 +1,3 @@ fn main() { let x = 1.0_f32 || 2.0_f32; } //~^ ERROR mismatched types //~| ERROR mismatched types - diff --git a/src/test/ui/binop/binop-move-semantics.nll.stderr b/src/test/ui/binop/binop-move-semantics.nll.stderr deleted file mode 100644 index 7d54de655b..0000000000 --- a/src/test/ui/binop/binop-move-semantics.nll.stderr +++ /dev/null @@ -1,95 +0,0 @@ -error[E0382]: use of moved value: `x` - --> $DIR/binop-move-semantics.rs:8:5 - | -LL | fn double_move>(x: T) { - | - - move occurs because `x` has type `T`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | x - | - value moved here -LL | + -LL | x; - | ^ value used here after move - -error[E0382]: borrow of moved value: `x` - --> $DIR/binop-move-semantics.rs:14:5 - | -LL | fn move_then_borrow + Clone>(x: T) { - | - - move occurs because `x` has type `T`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | x - | - value moved here -LL | + -LL | x.clone(); - | ^ value borrowed here after move - -error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/binop-move-semantics.rs:21:5 - | -LL | let m = &x; - | -- borrow of `x` occurs here -... -LL | x - | ^ move out of `x` occurs here -... -LL | use_mut(n); use_imm(m); - | - borrow later used here - -error[E0505]: cannot move out of `y` because it is borrowed - --> $DIR/binop-move-semantics.rs:23:5 - | -LL | let n = &mut y; - | ------ borrow of `y` occurs here -... -LL | y; - | ^ move out of `y` occurs here -LL | use_mut(n); use_imm(m); - | - borrow later used here - -error[E0507]: cannot move out of borrowed content - --> $DIR/binop-move-semantics.rs:30:5 - | -LL | *m - | ^^ cannot move out of borrowed content - -error[E0507]: cannot move out of borrowed content - --> $DIR/binop-move-semantics.rs:32:5 - | -LL | *n; - | ^^ cannot move out of borrowed content - -error[E0502]: cannot borrow `f` as immutable because it is also borrowed as mutable - --> $DIR/binop-move-semantics.rs:54:5 - | -LL | &mut f - | ------ - | | - | _____mutable borrow occurs here - | | -LL | | + -LL | | &f; - | | ^- - | |_____|| - | |mutable borrow later used here - | immutable borrow occurs here - -error[E0502]: cannot borrow `f` as mutable because it is also borrowed as immutable - --> $DIR/binop-move-semantics.rs:62:5 - | -LL | &f - | -- - | | - | _____immutable borrow occurs here - | | -LL | | + -LL | | &mut f; - | | ^^^^^- - | |_____|____| - | | immutable borrow later used here - | mutable borrow occurs here - -error: aborting due to 8 previous errors - -Some errors occurred: E0382, E0502, E0505, E0507. -For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/binop/binop-move-semantics.rs b/src/test/ui/binop/binop-move-semantics.rs index 2bcf16f8ba..17dec59404 100644 --- a/src/test/ui/binop/binop-move-semantics.rs +++ b/src/test/ui/binop/binop-move-semantics.rs @@ -11,7 +11,7 @@ fn double_move>(x: T) { fn move_then_borrow + Clone>(x: T) { x + - x.clone(); //~ ERROR: use of moved value + x.clone(); //~ ERROR: borrow of moved value } fn move_borrowed>(x: T, mut y: T) { diff --git a/src/test/ui/binop/binop-move-semantics.stderr b/src/test/ui/binop/binop-move-semantics.stderr index acc2620681..146e378146 100644 --- a/src/test/ui/binop/binop-move-semantics.stderr +++ b/src/test/ui/binop/binop-move-semantics.stderr @@ -1,42 +1,51 @@ error[E0382]: use of moved value: `x` --> $DIR/binop-move-semantics.rs:8:5 | +LL | fn double_move>(x: T) { + | - - move occurs because `x` has type `T`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | x | - value moved here LL | + LL | x; | ^ value used here after move - | - = note: move occurs because `x` has type `T`, which does not implement the `Copy` trait -error[E0382]: use of moved value: `x` +error[E0382]: borrow of moved value: `x` --> $DIR/binop-move-semantics.rs:14:5 | +LL | fn move_then_borrow + Clone>(x: T) { + | - - move occurs because `x` has type `T`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | x | - value moved here LL | + LL | x.clone(); - | ^ value used here after move - | - = note: move occurs because `x` has type `T`, which does not implement the `Copy` trait + | ^ value borrowed here after move error[E0505]: cannot move out of `x` because it is borrowed --> $DIR/binop-move-semantics.rs:21:5 | LL | let m = &x; - | - borrow of `x` occurs here + | -- borrow of `x` occurs here ... LL | x | ^ move out of `x` occurs here +... +LL | use_mut(n); use_imm(m); + | - borrow later used here error[E0505]: cannot move out of `y` because it is borrowed --> $DIR/binop-move-semantics.rs:23:5 | LL | let n = &mut y; - | - borrow of `y` occurs here + | ------ borrow of `y` occurs here ... LL | y; | ^ move out of `y` occurs here +LL | use_mut(n); use_imm(m); + | - borrow later used here error[E0507]: cannot move out of borrowed content --> $DIR/binop-move-semantics.rs:30:5 @@ -51,30 +60,36 @@ LL | *n; | ^^ cannot move out of borrowed content error[E0502]: cannot borrow `f` as immutable because it is also borrowed as mutable - --> $DIR/binop-move-semantics.rs:54:6 + --> $DIR/binop-move-semantics.rs:54:5 | -LL | &mut f - | - mutable borrow occurs here -LL | + -LL | &f; - | ^ - | | - | immutable borrow occurs here - | mutable borrow ends here +LL | &mut f + | ------ + | | + | _____mutable borrow occurs here + | | +LL | | + +LL | | &f; + | | ^- + | |_____|| + | |mutable borrow later used here + | immutable borrow occurs here error[E0502]: cannot borrow `f` as mutable because it is also borrowed as immutable - --> $DIR/binop-move-semantics.rs:62:10 + --> $DIR/binop-move-semantics.rs:62:5 | -LL | &f - | - immutable borrow occurs here -LL | + -LL | &mut f; - | ^ - | | - | mutable borrow occurs here - | immutable borrow ends here +LL | &f + | -- + | | + | _____immutable borrow occurs here + | | +LL | | + +LL | | &mut f; + | | ^^^^^- + | |_____|____| + | | immutable borrow later used here + | mutable borrow occurs here error: aborting due to 8 previous errors -Some errors occurred: E0382, E0502, E0505, E0507. +Some errors have detailed explanations: E0382, E0502, E0505, E0507. For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/block-result/issue-20862.stderr b/src/test/ui/block-result/issue-20862.stderr index fb4feff371..6dc17815fa 100644 --- a/src/test/ui/block-result/issue-20862.stderr +++ b/src/test/ui/block-result/issue-20862.stderr @@ -25,5 +25,5 @@ LL | let x = foo(5)(2); error: aborting due to 2 previous errors -Some errors occurred: E0308, E0618. +Some errors have detailed explanations: E0308, E0618. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/block-result/issue-22645.stderr b/src/test/ui/block-result/issue-22645.stderr index e1e6428eda..d2ec0dc06b 100644 --- a/src/test/ui/block-result/issue-22645.stderr +++ b/src/test/ui/block-result/issue-22645.stderr @@ -22,5 +22,5 @@ LL | b + 3 error: aborting due to 2 previous errors -Some errors occurred: E0277, E0308. +Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/block-result/issue-3563.stderr b/src/test/ui/block-result/issue-3563.stderr index a6346a5233..237b8c54ce 100644 --- a/src/test/ui/block-result/issue-3563.stderr +++ b/src/test/ui/block-result/issue-3563.stderr @@ -2,7 +2,7 @@ error[E0599]: no method named `b` found for type `&Self` in the current scope --> $DIR/issue-3563.rs:3:17 | LL | || self.b() - | ^ help: did you mean: `a` + | ^ help: there is a method with a similar name: `a` error: aborting due to previous error diff --git a/src/test/ui/bogus-tag.stderr b/src/test/ui/bogus-tag.stderr index 0bf0d4b14e..890f6800c2 100644 --- a/src/test/ui/bogus-tag.stderr +++ b/src/test/ui/bogus-tag.stderr @@ -1,11 +1,11 @@ -error[E0599]: no variant named `Hsl` found for type `Color` in the current scope +error[E0599]: no variant or associated item named `Hsl` found for type `Color` in the current scope --> $DIR/bogus-tag.rs:7:16 | LL | enum Color { Rgb(isize, isize, isize), Rgba(isize, isize, isize, isize), } - | ---------- variant `Hsl` not found here + | ---------- variant or associated item `Hsl` not found here ... LL | Color::Hsl(h, s, l) => { println!("hsl"); } - | ^^^ variant not found in `Color` + | ^^^ variant or associated item not found in `Color` error: aborting due to previous error diff --git a/src/test/ui/borrowck/assign_mutable_fields.nll.stderr b/src/test/ui/borrowck/assign_mutable_fields.nll.stderr deleted file mode 100644 index 35101df4e0..0000000000 --- a/src/test/ui/borrowck/assign_mutable_fields.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0381]: assign to part of possibly uninitialized variable: `x` - --> $DIR/assign_mutable_fields.rs:9:5 - | -LL | x.0 = 1; - | ^^^^^^^ use of possibly uninitialized `x` - -error[E0381]: assign to part of possibly uninitialized variable: `x` - --> $DIR/assign_mutable_fields.rs:17:5 - | -LL | x.0 = 1; - | ^^^^^^^ use of possibly uninitialized `x` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/assign_mutable_fields.rs b/src/test/ui/borrowck/assign_mutable_fields.rs index 85d6f3b74c..b60726d0c8 100644 --- a/src/test/ui/borrowck/assign_mutable_fields.rs +++ b/src/test/ui/borrowck/assign_mutable_fields.rs @@ -1,22 +1,22 @@ -// Currently, we permit you to assign to individual fields of a mut -// var, but we do not permit you to use the complete var afterwards. +// Currently, we do permit you to assign to individual fields of an +// uninitialized var. // We hope to fix this at some point. // // FIXME(#54987) fn assign_both_fields_and_use() { let mut x: (u32, u32); - x.0 = 1; + x.0 = 1; //~ ERROR x.1 = 22; - drop(x.0); //~ ERROR - drop(x.1); //~ ERROR + drop(x.0); + drop(x.1); } fn assign_both_fields_the_use_var() { let mut x: (u32, u32); - x.0 = 1; + x.0 = 1; //~ ERROR x.1 = 22; - drop(x); //~ ERROR + drop(x); } fn main() { } diff --git a/src/test/ui/borrowck/assign_mutable_fields.stderr b/src/test/ui/borrowck/assign_mutable_fields.stderr index 904d2ed97d..35101df4e0 100644 --- a/src/test/ui/borrowck/assign_mutable_fields.stderr +++ b/src/test/ui/borrowck/assign_mutable_fields.stderr @@ -1,21 +1,15 @@ -error[E0381]: use of possibly uninitialized variable: `x.0` - --> $DIR/assign_mutable_fields.rs:11:10 +error[E0381]: assign to part of possibly uninitialized variable: `x` + --> $DIR/assign_mutable_fields.rs:9:5 | -LL | drop(x.0); - | ^^^ use of possibly uninitialized `x.0` +LL | x.0 = 1; + | ^^^^^^^ use of possibly uninitialized `x` -error[E0381]: use of possibly uninitialized variable: `x.1` - --> $DIR/assign_mutable_fields.rs:12:10 +error[E0381]: assign to part of possibly uninitialized variable: `x` + --> $DIR/assign_mutable_fields.rs:17:5 | -LL | drop(x.1); - | ^^^ use of possibly uninitialized `x.1` +LL | x.0 = 1; + | ^^^^^^^ use of possibly uninitialized `x` -error[E0381]: use of possibly uninitialized variable: `x` - --> $DIR/assign_mutable_fields.rs:19:10 - | -LL | drop(x); - | ^ use of possibly uninitialized `x` - -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrow-immutable-upvar-mutation.nll.stderr b/src/test/ui/borrowck/borrow-immutable-upvar-mutation.nll.stderr deleted file mode 100644 index af45c8a980..0000000000 --- a/src/test/ui/borrowck/borrow-immutable-upvar-mutation.nll.stderr +++ /dev/null @@ -1,76 +0,0 @@ -error[E0594]: cannot assign to `x`, as it is a captured variable in a `Fn` closure - --> $DIR/borrow-immutable-upvar-mutation.rs:15:27 - | -LL | let _f = to_fn(|| x = 42); - | ^^^^^^ cannot assign - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/borrow-immutable-upvar-mutation.rs:15:24 - | -LL | let _f = to_fn(|| x = 42); - | ^^^^^^^^^ - -error[E0596]: cannot borrow `y` as mutable, as it is a captured variable in a `Fn` closure - --> $DIR/borrow-immutable-upvar-mutation.rs:18:31 - | -LL | let _g = to_fn(|| set(&mut y)); - | ^^^^^^ cannot borrow as mutable - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/borrow-immutable-upvar-mutation.rs:18:24 - | -LL | let _g = to_fn(|| set(&mut y)); - | ^^^^^^^^^^^^^^ - -error[E0594]: cannot assign to `z`, as it is a captured variable in a `Fn` closure - --> $DIR/borrow-immutable-upvar-mutation.rs:21:55 - | -LL | let _h = to_fn_mut(|| { set(&mut z); to_fn(|| z = 42); }); - | ^^^^^^ cannot assign - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/borrow-immutable-upvar-mutation.rs:21:52 - | -LL | let _h = to_fn_mut(|| { set(&mut z); to_fn(|| z = 42); }); - | ^^^^^^^^^ - -error[E0594]: cannot assign to `x`, as it is a captured variable in a `Fn` closure - --> $DIR/borrow-immutable-upvar-mutation.rs:27:32 - | -LL | let _f = to_fn(move || x = 42); - | ^^^^^^ cannot assign - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/borrow-immutable-upvar-mutation.rs:27:24 - | -LL | let _f = to_fn(move || x = 42); - | ^^^^^^^^^^^^^^ - -error[E0596]: cannot borrow `y` as mutable, as it is a captured variable in a `Fn` closure - --> $DIR/borrow-immutable-upvar-mutation.rs:30:36 - | -LL | let _g = to_fn(move || set(&mut y)); - | ^^^^^^ cannot borrow as mutable - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/borrow-immutable-upvar-mutation.rs:30:24 - | -LL | let _g = to_fn(move || set(&mut y)); - | ^^^^^^^^^^^^^^^^^^^ - -error[E0594]: cannot assign to `z`, as it is a captured variable in a `Fn` closure - --> $DIR/borrow-immutable-upvar-mutation.rs:33:65 - | -LL | let _h = to_fn_mut(move || { set(&mut z); to_fn(move || z = 42); }); - | ^^^^^^ cannot assign - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/borrow-immutable-upvar-mutation.rs:33:57 - | -LL | let _h = to_fn_mut(move || { set(&mut z); to_fn(move || z = 42); }); - | ^^^^^^^^^^^^^^ - -error: aborting due to 6 previous errors - -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. diff --git a/src/test/ui/borrowck/borrow-immutable-upvar-mutation.stderr b/src/test/ui/borrowck/borrow-immutable-upvar-mutation.stderr index 09adb350e0..17969137a9 100644 --- a/src/test/ui/borrowck/borrow-immutable-upvar-mutation.stderr +++ b/src/test/ui/borrowck/borrow-immutable-upvar-mutation.stderr @@ -1,72 +1,70 @@ -error[E0387]: cannot assign to data in a captured outer variable in an `Fn` closure +error[E0594]: cannot assign to `x`, as it is a captured variable in a `Fn` closure --> $DIR/borrow-immutable-upvar-mutation.rs:15:27 | LL | let _f = to_fn(|| x = 42); - | ^^^^^^ + | ^^^^^^ cannot assign | -help: consider changing this closure to take self by mutable reference +help: consider changing this to accept closures that implement `FnMut` --> $DIR/borrow-immutable-upvar-mutation.rs:15:24 | LL | let _f = to_fn(|| x = 42); | ^^^^^^^^^ -error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure - --> $DIR/borrow-immutable-upvar-mutation.rs:18:36 +error[E0596]: cannot borrow `y` as mutable, as it is a captured variable in a `Fn` closure + --> $DIR/borrow-immutable-upvar-mutation.rs:18:31 | LL | let _g = to_fn(|| set(&mut y)); - | ^ + | ^^^^^^ cannot borrow as mutable | -help: consider changing this closure to take self by mutable reference +help: consider changing this to accept closures that implement `FnMut` --> $DIR/borrow-immutable-upvar-mutation.rs:18:24 | LL | let _g = to_fn(|| set(&mut y)); | ^^^^^^^^^^^^^^ -error[E0387]: cannot assign to data in a captured outer variable in an `Fn` closure +error[E0594]: cannot assign to `z`, as it is a captured variable in a `Fn` closure --> $DIR/borrow-immutable-upvar-mutation.rs:21:55 | LL | let _h = to_fn_mut(|| { set(&mut z); to_fn(|| z = 42); }); - | ^^^^^^ + | ^^^^^^ cannot assign | -help: consider changing this closure to take self by mutable reference +help: consider changing this to accept closures that implement `FnMut` --> $DIR/borrow-immutable-upvar-mutation.rs:21:52 | LL | let _h = to_fn_mut(|| { set(&mut z); to_fn(|| z = 42); }); | ^^^^^^^^^ -error[E0594]: cannot assign to captured outer variable in an `Fn` closure +error[E0594]: cannot assign to `x`, as it is a captured variable in a `Fn` closure --> $DIR/borrow-immutable-upvar-mutation.rs:27:32 | LL | let _f = to_fn(move || x = 42); - | ^^^^^^ + | ^^^^^^ cannot assign | - = note: `Fn` closures cannot capture their enclosing environment for modifications -help: consider changing this closure to take self by mutable reference +help: consider changing this to accept closures that implement `FnMut` --> $DIR/borrow-immutable-upvar-mutation.rs:27:24 | LL | let _f = to_fn(move || x = 42); | ^^^^^^^^^^^^^^ -error[E0596]: cannot borrow captured outer variable in an `Fn` closure as mutable - --> $DIR/borrow-immutable-upvar-mutation.rs:30:41 +error[E0596]: cannot borrow `y` as mutable, as it is a captured variable in a `Fn` closure + --> $DIR/borrow-immutable-upvar-mutation.rs:30:36 | LL | let _g = to_fn(move || set(&mut y)); - | ^ + | ^^^^^^ cannot borrow as mutable | -help: consider changing this closure to take self by mutable reference +help: consider changing this to accept closures that implement `FnMut` --> $DIR/borrow-immutable-upvar-mutation.rs:30:24 | LL | let _g = to_fn(move || set(&mut y)); | ^^^^^^^^^^^^^^^^^^^ -error[E0594]: cannot assign to captured outer variable in an `Fn` closure +error[E0594]: cannot assign to `z`, as it is a captured variable in a `Fn` closure --> $DIR/borrow-immutable-upvar-mutation.rs:33:65 | LL | let _h = to_fn_mut(move || { set(&mut z); to_fn(move || z = 42); }); - | ^^^^^^ + | ^^^^^^ cannot assign | - = note: `Fn` closures cannot capture their enclosing environment for modifications -help: consider changing this closure to take self by mutable reference +help: consider changing this to accept closures that implement `FnMut` --> $DIR/borrow-immutable-upvar-mutation.rs:33:57 | LL | let _h = to_fn_mut(move || { set(&mut z); to_fn(move || z = 42); }); @@ -74,5 +72,4 @@ LL | let _h = to_fn_mut(move || { set(&mut z); to_fn(move || z = 42); }) error: aborting due to 6 previous errors -Some errors occurred: E0387, E0594, E0596. -For more information about an error, try `rustc --explain E0387`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/borrowck/borrow-tuple-fields.nll.stderr b/src/test/ui/borrowck/borrow-tuple-fields.nll.stderr deleted file mode 100644 index 5c40555c50..0000000000 --- a/src/test/ui/borrowck/borrow-tuple-fields.nll.stderr +++ /dev/null @@ -1,65 +0,0 @@ -error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/borrow-tuple-fields.rs:12:13 - | -LL | let r = &x.0; - | ---- borrow of `x.0` occurs here -LL | let y = x; - | ^ move out of `x` occurs here -LL | -LL | r.use_ref(); - | - borrow later used here - -error[E0502]: cannot borrow `x.0` as mutable because it is also borrowed as immutable - --> $DIR/borrow-tuple-fields.rs:18:13 - | -LL | let a = &x.0; - | ---- immutable borrow occurs here -LL | let b = &mut x.0; - | ^^^^^^^^ mutable borrow occurs here -LL | a.use_ref(); - | - immutable borrow later used here - -error[E0499]: cannot borrow `x.0` as mutable more than once at a time - --> $DIR/borrow-tuple-fields.rs:23:13 - | -LL | let a = &mut x.0; - | -------- first mutable borrow occurs here -LL | let b = &mut x.0; - | ^^^^^^^^ second mutable borrow occurs here -LL | a.use_ref(); - | - first borrow later used here - -error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/borrow-tuple-fields.rs:28:13 - | -LL | let r = &x.0; - | ---- borrow of `x.0` occurs here -LL | let y = x; - | ^ move out of `x` occurs here -LL | r.use_ref(); - | - borrow later used here - -error[E0502]: cannot borrow `x.0` as mutable because it is also borrowed as immutable - --> $DIR/borrow-tuple-fields.rs:33:13 - | -LL | let a = &x.0; - | ---- immutable borrow occurs here -LL | let b = &mut x.0; - | ^^^^^^^^ mutable borrow occurs here -LL | a.use_ref(); - | - immutable borrow later used here - -error[E0499]: cannot borrow `x.0` as mutable more than once at a time - --> $DIR/borrow-tuple-fields.rs:38:13 - | -LL | let a = &mut x.0; - | -------- first mutable borrow occurs here -LL | let b = &mut x.0; - | ^^^^^^^^ second mutable borrow occurs here -LL | a.use_mut(); - | - first borrow later used here - -error: aborting due to 6 previous errors - -Some errors occurred: E0499, E0502, E0505. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrow-tuple-fields.stderr b/src/test/ui/borrowck/borrow-tuple-fields.stderr index f7fc06e1b4..503ea49d74 100644 --- a/src/test/ui/borrowck/borrow-tuple-fields.stderr +++ b/src/test/ui/borrowck/borrow-tuple-fields.stderr @@ -1,64 +1,65 @@ error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/borrow-tuple-fields.rs:12:9 + --> $DIR/borrow-tuple-fields.rs:12:13 | LL | let r = &x.0; - | --- borrow of `x.0` occurs here + | ---- borrow of `x.0` occurs here LL | let y = x; - | ^ move out of `x` occurs here + | ^ move out of `x` occurs here +LL | +LL | r.use_ref(); + | - borrow later used here error[E0502]: cannot borrow `x.0` as mutable because it is also borrowed as immutable - --> $DIR/borrow-tuple-fields.rs:18:18 + --> $DIR/borrow-tuple-fields.rs:18:13 | LL | let a = &x.0; - | --- immutable borrow occurs here + | ---- immutable borrow occurs here LL | let b = &mut x.0; - | ^^^ mutable borrow occurs here -... -LL | } - | - immutable borrow ends here + | ^^^^^^^^ mutable borrow occurs here +LL | a.use_ref(); + | - immutable borrow later used here error[E0499]: cannot borrow `x.0` as mutable more than once at a time - --> $DIR/borrow-tuple-fields.rs:23:18 + --> $DIR/borrow-tuple-fields.rs:23:13 | LL | let a = &mut x.0; - | --- first mutable borrow occurs here + | -------- first mutable borrow occurs here LL | let b = &mut x.0; - | ^^^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here + | ^^^^^^^^ second mutable borrow occurs here +LL | a.use_ref(); + | - first borrow later used here error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/borrow-tuple-fields.rs:28:9 + --> $DIR/borrow-tuple-fields.rs:28:13 | LL | let r = &x.0; - | --- borrow of `x.0` occurs here + | ---- borrow of `x.0` occurs here LL | let y = x; - | ^ move out of `x` occurs here + | ^ move out of `x` occurs here +LL | r.use_ref(); + | - borrow later used here error[E0502]: cannot borrow `x.0` as mutable because it is also borrowed as immutable - --> $DIR/borrow-tuple-fields.rs:33:18 + --> $DIR/borrow-tuple-fields.rs:33:13 | LL | let a = &x.0; - | --- immutable borrow occurs here + | ---- immutable borrow occurs here LL | let b = &mut x.0; - | ^^^ mutable borrow occurs here -... -LL | } - | - immutable borrow ends here + | ^^^^^^^^ mutable borrow occurs here +LL | a.use_ref(); + | - immutable borrow later used here error[E0499]: cannot borrow `x.0` as mutable more than once at a time - --> $DIR/borrow-tuple-fields.rs:38:18 + --> $DIR/borrow-tuple-fields.rs:38:13 | LL | let a = &mut x.0; - | --- first mutable borrow occurs here + | -------- first mutable borrow occurs here LL | let b = &mut x.0; - | ^^^ second mutable borrow occurs here + | ^^^^^^^^ second mutable borrow occurs here LL | a.use_mut(); -LL | } - | - first borrow ends here + | - first borrow later used here error: aborting due to 6 previous errors -Some errors occurred: E0499, E0502, E0505. +Some errors have detailed explanations: E0499, E0502, E0505. For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-access-permissions.ast.nll.stderr b/src/test/ui/borrowck/borrowck-access-permissions.ast.nll.stderr deleted file mode 100644 index 12f9ad8276..0000000000 --- a/src/test/ui/borrowck/borrowck-access-permissions.ast.nll.stderr +++ /dev/null @@ -1,53 +0,0 @@ -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/borrowck-access-permissions.rs:12:19 - | -LL | let x = 1; - | - help: consider changing this to be mutable: `mut x` -... -LL | let _y1 = &mut x; - | ^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow immutable static item `static_x` as mutable - --> $DIR/borrowck-access-permissions.rs:18:19 - | -LL | let _y1 = &mut static_x; - | ^^^^^^^^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow `*box_x` as mutable, as `box_x` is not declared as mutable - --> $DIR/borrowck-access-permissions.rs:27:19 - | -LL | let box_x = Box::new(1); - | ----- help: consider changing this to be mutable: `mut box_x` -... -LL | let _y1 = &mut *box_x; - | ^^^^^^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow `*ref_x` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-access-permissions.rs:36:19 - | -LL | let ref_x = &x; - | -- help: consider changing this to be a mutable reference: `&mut x` -... -LL | let _y1 = &mut *ref_x; - | ^^^^^^^^^^^ `ref_x` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `*ptr_x` as mutable, as it is behind a `*const` pointer - --> $DIR/borrowck-access-permissions.rs:46:23 - | -LL | let ptr_x : *const _ = &x; - | -- help: consider changing this to be a mutable pointer: `&mut x` -... -LL | let _y1 = &mut *ptr_x; - | ^^^^^^^^^^^ `ptr_x` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `*foo_ref.f` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-access-permissions.rs:56:18 - | -LL | let foo_ref = &foo; - | ---- help: consider changing this to be a mutable reference: `&mut foo` -LL | let _y = &mut *foo_ref.f; - | ^^^^^^^^^^^^^^^ `foo_ref` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error: aborting due to 6 previous errors - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/borrowck/borrowck-access-permissions.ast.stderr b/src/test/ui/borrowck/borrowck-access-permissions.ast.stderr deleted file mode 100644 index a1cc0638af..0000000000 --- a/src/test/ui/borrowck/borrowck-access-permissions.ast.stderr +++ /dev/null @@ -1,46 +0,0 @@ -error[E0596]: cannot borrow immutable local variable `x` as mutable - --> $DIR/borrowck-access-permissions.rs:12:24 - | -LL | let x = 1; - | - help: make this binding mutable: `mut x` -... -LL | let _y1 = &mut x; - | ^ cannot borrow mutably - -error[E0596]: cannot borrow immutable static item as mutable - --> $DIR/borrowck-access-permissions.rs:18:24 - | -LL | let _y1 = &mut static_x; - | ^^^^^^^^ - -error[E0596]: cannot borrow immutable `Box` content `*box_x` as mutable - --> $DIR/borrowck-access-permissions.rs:27:24 - | -LL | let box_x = Box::new(1); - | ----- help: make this binding mutable: `mut box_x` -... -LL | let _y1 = &mut *box_x; - | ^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow immutable borrowed content `*ref_x` as mutable - --> $DIR/borrowck-access-permissions.rs:36:24 - | -LL | let _y1 = &mut *ref_x; - | ^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow immutable dereference of raw pointer `*ptr_x` as mutable - --> $DIR/borrowck-access-permissions.rs:46:28 - | -LL | let _y1 = &mut *ptr_x; - | ^^^^^^ cannot borrow as mutable - -error[E0389]: cannot borrow data mutably in a `&` reference - --> $DIR/borrowck-access-permissions.rs:56:23 - | -LL | let _y = &mut *foo_ref.f; - | ^^^^^^^^^^ assignment into an immutable reference - -error: aborting due to 6 previous errors - -Some errors occurred: E0389, E0596. -For more information about an error, try `rustc --explain E0389`. diff --git a/src/test/ui/borrowck/borrowck-access-permissions.rs b/src/test/ui/borrowck/borrowck-access-permissions.rs index 993742f427..469ad508b0 100644 --- a/src/test/ui/borrowck/borrowck-access-permissions.rs +++ b/src/test/ui/borrowck/borrowck-access-permissions.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - static static_x : i32 = 1; static mut static_x_mut : i32 = 1; @@ -9,14 +6,12 @@ fn main() { let mut x_mut = 1; { // borrow of local - let _y1 = &mut x; //[ast]~ ERROR [E0596] - //[mir]~^ ERROR [E0596] + let _y1 = &mut x; //~ ERROR [E0596] let _y2 = &mut x_mut; // No error } { // borrow of static - let _y1 = &mut static_x; //[ast]~ ERROR [E0596] - //[mir]~^ ERROR [E0596] + let _y1 = &mut static_x; //~ ERROR [E0596] unsafe { let _y2 = &mut static_x_mut; } // No error } @@ -24,8 +19,7 @@ fn main() { let box_x = Box::new(1); let mut box_x_mut = Box::new(1); - let _y1 = &mut *box_x; //[ast]~ ERROR [E0596] - //[mir]~^ ERROR [E0596] + let _y1 = &mut *box_x; //~ ERROR [E0596] let _y2 = &mut *box_x_mut; // No error } @@ -33,8 +27,7 @@ fn main() { let ref_x = &x; let ref_x_mut = &mut x_mut; - let _y1 = &mut *ref_x; //[ast]~ ERROR [E0596] - //[mir]~^ ERROR [E0596] + let _y1 = &mut *ref_x; //~ ERROR [E0596] let _y2 = &mut *ref_x_mut; // No error } @@ -43,8 +36,7 @@ fn main() { let ptr_mut_x : *mut _ = &mut x_mut; unsafe { - let _y1 = &mut *ptr_x; //[ast]~ ERROR [E0596] - //[mir]~^ ERROR [E0596] + let _y1 = &mut *ptr_x; //~ ERROR [E0596] let _y2 = &mut *ptr_mut_x; // No error } } @@ -53,8 +45,6 @@ fn main() { struct Foo<'a> { f: &'a mut i32, g: &'a i32 }; let mut foo = Foo { f: &mut x_mut, g: &x }; let foo_ref = &foo; - let _y = &mut *foo_ref.f; //[ast]~ ERROR [E0389] - //[mir]~^ ERROR [E0596] - // FIXME: Wrong error in MIR + let _y = &mut *foo_ref.f; //~ ERROR [E0596] } } diff --git a/src/test/ui/borrowck/borrowck-access-permissions.mir.stderr b/src/test/ui/borrowck/borrowck-access-permissions.stderr similarity index 87% rename from src/test/ui/borrowck/borrowck-access-permissions.mir.stderr rename to src/test/ui/borrowck/borrowck-access-permissions.stderr index 12f9ad8276..e3a35c38a7 100644 --- a/src/test/ui/borrowck/borrowck-access-permissions.mir.stderr +++ b/src/test/ui/borrowck/borrowck-access-permissions.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/borrowck-access-permissions.rs:12:19 + --> $DIR/borrowck-access-permissions.rs:9:19 | LL | let x = 1; | - help: consider changing this to be mutable: `mut x` @@ -8,13 +8,13 @@ LL | let _y1 = &mut x; | ^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow immutable static item `static_x` as mutable - --> $DIR/borrowck-access-permissions.rs:18:19 + --> $DIR/borrowck-access-permissions.rs:14:19 | LL | let _y1 = &mut static_x; | ^^^^^^^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow `*box_x` as mutable, as `box_x` is not declared as mutable - --> $DIR/borrowck-access-permissions.rs:27:19 + --> $DIR/borrowck-access-permissions.rs:22:19 | LL | let box_x = Box::new(1); | ----- help: consider changing this to be mutable: `mut box_x` @@ -23,7 +23,7 @@ LL | let _y1 = &mut *box_x; | ^^^^^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow `*ref_x` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-access-permissions.rs:36:19 + --> $DIR/borrowck-access-permissions.rs:30:19 | LL | let ref_x = &x; | -- help: consider changing this to be a mutable reference: `&mut x` @@ -32,7 +32,7 @@ LL | let _y1 = &mut *ref_x; | ^^^^^^^^^^^ `ref_x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `*ptr_x` as mutable, as it is behind a `*const` pointer - --> $DIR/borrowck-access-permissions.rs:46:23 + --> $DIR/borrowck-access-permissions.rs:39:23 | LL | let ptr_x : *const _ = &x; | -- help: consider changing this to be a mutable pointer: `&mut x` @@ -41,7 +41,7 @@ LL | let _y1 = &mut *ptr_x; | ^^^^^^^^^^^ `ptr_x` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `*foo_ref.f` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-access-permissions.rs:56:18 + --> $DIR/borrowck-access-permissions.rs:48:18 | LL | let foo_ref = &foo; | ---- help: consider changing this to be a mutable reference: `&mut foo` diff --git a/src/test/ui/borrowck/borrowck-and-init.nll.stderr b/src/test/ui/borrowck/borrowck-and-init.nll.stderr deleted file mode 100644 index 2db0751948..0000000000 --- a/src/test/ui/borrowck/borrowck-and-init.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0381]: borrow of possibly uninitialized variable: `i` - --> $DIR/borrowck-and-init.rs:5:20 - | -LL | println!("{}", i); - | ^ use of possibly uninitialized `i` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-and-init.rs b/src/test/ui/borrowck/borrowck-and-init.rs index ff076c55ca..4427e25186 100644 --- a/src/test/ui/borrowck/borrowck-and-init.rs +++ b/src/test/ui/borrowck/borrowck-and-init.rs @@ -2,5 +2,5 @@ fn main() { let i: isize; println!("{}", false && { i = 5; true }); - println!("{}", i); //~ ERROR use of possibly uninitialized variable: `i` + println!("{}", i); //~ ERROR borrow of possibly uninitialized variable: `i` } diff --git a/src/test/ui/borrowck/borrowck-and-init.stderr b/src/test/ui/borrowck/borrowck-and-init.stderr index 13696ac834..2db0751948 100644 --- a/src/test/ui/borrowck/borrowck-and-init.stderr +++ b/src/test/ui/borrowck/borrowck-and-init.stderr @@ -1,4 +1,4 @@ -error[E0381]: use of possibly uninitialized variable: `i` +error[E0381]: borrow of possibly uninitialized variable: `i` --> $DIR/borrowck-and-init.rs:5:20 | LL | println!("{}", i); diff --git a/src/test/ui/borrowck/borrowck-anon-fields-struct.nll.stderr b/src/test/ui/borrowck/borrowck-anon-fields-struct.nll.stderr deleted file mode 100644 index 7a959fb6ec..0000000000 --- a/src/test/ui/borrowck/borrowck-anon-fields-struct.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0499]: cannot borrow `y.0` as mutable more than once at a time - --> $DIR/borrowck-anon-fields-struct.rs:29:11 - | -LL | Y(ref mut a, _) => a - | --------- first mutable borrow occurs here -... -LL | Y(ref mut b, _) => b - | ^^^^^^^^^ second mutable borrow occurs here -... -LL | *a += 1; - | ------- first borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-anon-fields-struct.stderr b/src/test/ui/borrowck/borrowck-anon-fields-struct.stderr index efe94dee2e..7a959fb6ec 100644 --- a/src/test/ui/borrowck/borrowck-anon-fields-struct.stderr +++ b/src/test/ui/borrowck/borrowck-anon-fields-struct.stderr @@ -7,8 +7,8 @@ LL | Y(ref mut a, _) => a LL | Y(ref mut b, _) => b | ^^^^^^^^^ second mutable borrow occurs here ... -LL | } - | - first borrow ends here +LL | *a += 1; + | ------- first borrow later used here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-anon-fields-tuple.nll.stderr b/src/test/ui/borrowck/borrowck-anon-fields-tuple.nll.stderr deleted file mode 100644 index 88a8867f5e..0000000000 --- a/src/test/ui/borrowck/borrowck-anon-fields-tuple.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0499]: cannot borrow `y.0` as mutable more than once at a time - --> $DIR/borrowck-anon-fields-tuple.rs:27:10 - | -LL | (ref mut a, _) => a - | --------- first mutable borrow occurs here -... -LL | (ref mut b, _) => b - | ^^^^^^^^^ second mutable borrow occurs here -... -LL | *a += 1; - | ------- first borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-anon-fields-tuple.stderr b/src/test/ui/borrowck/borrowck-anon-fields-tuple.stderr index 40f96cb712..88a8867f5e 100644 --- a/src/test/ui/borrowck/borrowck-anon-fields-tuple.stderr +++ b/src/test/ui/borrowck/borrowck-anon-fields-tuple.stderr @@ -7,8 +7,8 @@ LL | (ref mut a, _) => a LL | (ref mut b, _) => b | ^^^^^^^^^ second mutable borrow occurs here ... -LL | } - | - first borrow ends here +LL | *a += 1; + | ------- first borrow later used here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-anon-fields-variant.nll.stderr b/src/test/ui/borrowck/borrowck-anon-fields-variant.nll.stderr index 6c8a32ee39..f66994b3f1 100644 --- a/src/test/ui/borrowck/borrowck-anon-fields-variant.nll.stderr +++ b/src/test/ui/borrowck/borrowck-anon-fields-variant.nll.stderr @@ -1,4 +1,4 @@ -warning[E0503]: cannot use `y` because it was mutably borrowed +error[E0503]: cannot use `y` because it was mutably borrowed --> $DIR/borrowck-anon-fields-variant.rs:17:7 | LL | Foo::Y(ref mut a, _) => a, @@ -9,12 +9,9 @@ LL | Foo::Y(_, ref mut b) => b, ... LL | *a += 1; | ------- borrow later used here - | - = warning: this error has been downgraded to a warning for backwards compatibility with previous releases - = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future error[E0503]: cannot use `y` because it was mutably borrowed - --> $DIR/borrowck-anon-fields-variant.rs:34:7 + --> $DIR/borrowck-anon-fields-variant.rs:37:7 | LL | Foo::Y(ref mut a, _) => a, | --------- borrow of `y.0` occurs here @@ -26,7 +23,7 @@ LL | *a += 1; | ------- borrow later used here error[E0499]: cannot borrow `y.0` as mutable more than once at a time - --> $DIR/borrowck-anon-fields-variant.rs:34:14 + --> $DIR/borrowck-anon-fields-variant.rs:37:14 | LL | Foo::Y(ref mut a, _) => a, | --------- first mutable borrow occurs here @@ -37,7 +34,7 @@ LL | Foo::Y(ref mut b, _) => b, LL | *a += 1; | ------- first borrow later used here -error: aborting due to 2 previous errors +error: aborting due to 3 previous errors -Some errors occurred: E0499, E0503. +Some errors have detailed explanations: E0499, E0503. For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-anon-fields-variant.rs b/src/test/ui/borrowck/borrowck-anon-fields-variant.rs index c27435608c..695809f58c 100644 --- a/src/test/ui/borrowck/borrowck-anon-fields-variant.rs +++ b/src/test/ui/borrowck/borrowck-anon-fields-variant.rs @@ -1,6 +1,3 @@ -// Tests that we are able to distinguish when loans borrow different -// anonymous fields of an enum variant vs the same anonymous field. - enum Foo { X, Y(usize, usize) } @@ -13,8 +10,14 @@ fn distinct_variant() { Foo::X => panic!() }; + // While `a` and `b` are disjoint, borrowck doesn't know that `a` is not + // also used for the discriminant of `Foo`, which it would be if `a` was a + // reference. let b = match y { Foo::Y(_, ref mut b) => b, + //~^ WARNING cannot use `y` + //~| WARNING this error has been downgraded to a warning + //~| WARNING this warning will become a hard error in the future Foo::X => panic!() }; @@ -31,7 +34,8 @@ fn same_variant() { }; let b = match y { - Foo::Y(ref mut b, _) => b, //~ ERROR cannot borrow + Foo::Y(ref mut b, _) => b, //~ ERROR cannot use `y` + //~| ERROR cannot borrow `y.0` as mutable Foo::X => panic!() }; diff --git a/src/test/ui/borrowck/borrowck-anon-fields-variant.stderr b/src/test/ui/borrowck/borrowck-anon-fields-variant.stderr index 2835cab909..5e86dcb123 100644 --- a/src/test/ui/borrowck/borrowck-anon-fields-variant.stderr +++ b/src/test/ui/borrowck/borrowck-anon-fields-variant.stderr @@ -1,5 +1,32 @@ +warning[E0503]: cannot use `y` because it was mutably borrowed + --> $DIR/borrowck-anon-fields-variant.rs:17:7 + | +LL | Foo::Y(ref mut a, _) => a, + | --------- borrow of `y.0` occurs here +... +LL | Foo::Y(_, ref mut b) => b, + | ^^^^^^^^^^^^^^^^^^^^ use of borrowed `y.0` +... +LL | *a += 1; + | ------- borrow later used here + | + = warning: this error has been downgraded to a warning for backwards compatibility with previous releases + = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + +error[E0503]: cannot use `y` because it was mutably borrowed + --> $DIR/borrowck-anon-fields-variant.rs:37:7 + | +LL | Foo::Y(ref mut a, _) => a, + | --------- borrow of `y.0` occurs here +... +LL | Foo::Y(ref mut b, _) => b, + | ^^^^^^^^^^^^^^^^^^^^ use of borrowed `y.0` +... +LL | *a += 1; + | ------- borrow later used here + error[E0499]: cannot borrow `y.0` as mutable more than once at a time - --> $DIR/borrowck-anon-fields-variant.rs:34:14 + --> $DIR/borrowck-anon-fields-variant.rs:37:14 | LL | Foo::Y(ref mut a, _) => a, | --------- first mutable borrow occurs here @@ -7,9 +34,10 @@ LL | Foo::Y(ref mut a, _) => a, LL | Foo::Y(ref mut b, _) => b, | ^^^^^^^^^ second mutable borrow occurs here ... -LL | } - | - first borrow ends here +LL | *a += 1; + | ------- first borrow later used here -error: aborting due to previous error +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0499`. +Some errors have detailed explanations: E0499, E0503. +For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-argument.nll.stderr b/src/test/ui/borrowck/borrowck-argument.nll.stderr deleted file mode 100644 index cf15833140..0000000000 --- a/src/test/ui/borrowck/borrowck-argument.nll.stderr +++ /dev/null @@ -1,35 +0,0 @@ -error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable - --> $DIR/borrowck-argument.rs:10:5 - | -LL | fn func(arg: S) { - | --- help: consider changing this to be mutable: `mut arg` -LL | arg.mutate(); - | ^^^ cannot borrow as mutable - -error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable - --> $DIR/borrowck-argument.rs:15:9 - | -LL | fn method(&self, arg: S) { - | --- help: consider changing this to be mutable: `mut arg` -LL | arg.mutate(); - | ^^^ cannot borrow as mutable - -error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable - --> $DIR/borrowck-argument.rs:21:9 - | -LL | fn default(&self, arg: S) { - | --- help: consider changing this to be mutable: `mut arg` -LL | arg.mutate(); - | ^^^ cannot borrow as mutable - -error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable - --> $DIR/borrowck-argument.rs:32:17 - | -LL | (|arg: S| { arg.mutate() })(s); - | --- ^^^ cannot borrow as mutable - | | - | help: consider changing this to be mutable: `mut arg` - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/borrowck/borrowck-argument.rs b/src/test/ui/borrowck/borrowck-argument.rs index e1f1adec83..5d776d4fca 100644 --- a/src/test/ui/borrowck/borrowck-argument.rs +++ b/src/test/ui/borrowck/borrowck-argument.rs @@ -7,18 +7,18 @@ impl S { } fn func(arg: S) { - arg.mutate(); //~ ERROR: cannot borrow immutable argument + arg.mutate(); //~ ERROR: cannot borrow `arg` as mutable, as it is not declared as mutable } impl S { fn method(&self, arg: S) { - arg.mutate(); //~ ERROR: cannot borrow immutable argument + arg.mutate(); //~ ERROR: cannot borrow `arg` as mutable, as it is not declared as mutable } } trait T { fn default(&self, arg: S) { - arg.mutate(); //~ ERROR: cannot borrow immutable argument + arg.mutate(); //~ ERROR: cannot borrow `arg` as mutable, as it is not declared as mutable } } @@ -29,5 +29,6 @@ fn main() { func(s); s.method(s); s.default(s); - (|arg: S| { arg.mutate() })(s); //~ ERROR: cannot borrow immutable argument + (|arg: S| { arg.mutate() })(s); + //~^ ERROR: cannot borrow `arg` as mutable, as it is not declared as mutable } diff --git a/src/test/ui/borrowck/borrowck-argument.stderr b/src/test/ui/borrowck/borrowck-argument.stderr index 6c9c411cbc..cf15833140 100644 --- a/src/test/ui/borrowck/borrowck-argument.stderr +++ b/src/test/ui/borrowck/borrowck-argument.stderr @@ -1,34 +1,34 @@ -error[E0596]: cannot borrow immutable argument `arg` as mutable +error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable --> $DIR/borrowck-argument.rs:10:5 | LL | fn func(arg: S) { - | --- help: make this binding mutable: `mut arg` + | --- help: consider changing this to be mutable: `mut arg` LL | arg.mutate(); - | ^^^ cannot borrow mutably + | ^^^ cannot borrow as mutable -error[E0596]: cannot borrow immutable argument `arg` as mutable +error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable --> $DIR/borrowck-argument.rs:15:9 | LL | fn method(&self, arg: S) { - | --- help: make this binding mutable: `mut arg` + | --- help: consider changing this to be mutable: `mut arg` LL | arg.mutate(); - | ^^^ cannot borrow mutably + | ^^^ cannot borrow as mutable -error[E0596]: cannot borrow immutable argument `arg` as mutable +error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable --> $DIR/borrowck-argument.rs:21:9 | LL | fn default(&self, arg: S) { - | --- help: make this binding mutable: `mut arg` + | --- help: consider changing this to be mutable: `mut arg` LL | arg.mutate(); - | ^^^ cannot borrow mutably + | ^^^ cannot borrow as mutable -error[E0596]: cannot borrow immutable argument `arg` as mutable +error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable --> $DIR/borrowck-argument.rs:32:17 | LL | (|arg: S| { arg.mutate() })(s); - | --- ^^^ cannot borrow mutably + | --- ^^^ cannot borrow as mutable | | - | help: make this binding mutable: `mut arg` + | help: consider changing this to be mutable: `mut arg` error: aborting due to 4 previous errors diff --git a/src/test/ui/borrowck/borrowck-asm.ast.stderr b/src/test/ui/borrowck/borrowck-asm.ast.stderr deleted file mode 100644 index 8418bb7c5a..0000000000 --- a/src/test/ui/borrowck/borrowck-asm.ast.stderr +++ /dev/null @@ -1,76 +0,0 @@ -error[E0382]: use of moved value: `x` - --> $DIR/borrowck-asm.rs:27:13 - | -LL | asm!("nop" : : "r"(x)); - | - value moved here -LL | } -LL | let z = x; - | ^ value used here after move - | - = note: move occurs because `x` has type `&mut isize`, which does not implement the `Copy` trait - -error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/borrowck-asm.rs:35:32 - | -LL | let y = &mut x; - | - borrow of `x` occurs here -LL | unsafe { -LL | asm!("nop" : : "r"(x)); - | ^ use of borrowed `x` - -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-asm.rs:44:31 - | -LL | let x = 3; - | - first assignment to `x` -LL | unsafe { -LL | asm!("nop" : "=r"(x)); - | ^ cannot assign twice to immutable variable - -error[E0506]: cannot assign to `a` because it is borrowed - --> $DIR/borrowck-asm.rs:50:31 - | -LL | let b = &*a; - | -- borrow of `a` occurs here -LL | unsafe { -LL | asm!("nop" : "=r"(a)); - | ^ assignment to borrowed `a` occurs here - -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-asm.rs:60:31 - | -LL | let x = 3; - | - first assignment to `x` -LL | unsafe { -LL | asm!("nop" : "+r"(x)); - | ^ cannot assign twice to immutable variable - -error[E0381]: use of possibly uninitialized variable: `x` - --> $DIR/borrowck-asm.rs:68:32 - | -LL | asm!("nop" : "=*r"(x)); - | ^ use of possibly uninitialized `x` - -error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/borrowck-asm.rs:77:31 - | -LL | let y = &*x; - | -- borrow of `x` occurs here -LL | unsafe { -LL | asm!("nop" : "+r"(x)); - | ^ assignment to borrowed `x` occurs here - -error[E0382]: use of moved value: `x` - --> $DIR/borrowck-asm.rs:86:40 - | -LL | asm!("nop" : : "r"(x), "r"(x) ); - | - ^ value used here after move - | | - | value moved here - | - = note: move occurs because `x` has type `&mut i32`, which does not implement the `Copy` trait - -error: aborting due to 8 previous errors - -Some errors occurred: E0381, E0382, E0384, E0503, E0506. -For more information about an error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-asm.mir.stderr b/src/test/ui/borrowck/borrowck-asm.mir.stderr deleted file mode 100644 index dd6e5ebe0e..0000000000 --- a/src/test/ui/borrowck/borrowck-asm.mir.stderr +++ /dev/null @@ -1,81 +0,0 @@ -error[E0382]: use of moved value: `x` - --> $DIR/borrowck-asm.rs:27:17 - | -LL | let x = &mut 0isize; - | - move occurs because `x` has type `&mut isize`, which does not implement the `Copy` trait -LL | unsafe { -LL | asm!("nop" : : "r"(x)); - | - value moved here -LL | } -LL | let z = x; - | ^ value used here after move - -error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/borrowck-asm.rs:35:32 - | -LL | let y = &mut x; - | ------ borrow of `x` occurs here -LL | unsafe { -LL | asm!("nop" : : "r"(x)); - | ^ use of borrowed `x` -... -LL | let z = y; - | - borrow later used here - -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-asm.rs:44:31 - | -LL | let x = 3; - | - - | | - | first assignment to `x` - | help: make this binding mutable: `mut x` -LL | unsafe { -LL | asm!("nop" : "=r"(x)); - | ^ cannot assign twice to immutable variable - -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-asm.rs:60:31 - | -LL | let x = 3; - | - - | | - | first assignment to `x` - | help: make this binding mutable: `mut x` -LL | unsafe { -LL | asm!("nop" : "+r"(x)); - | ^ cannot assign twice to immutable variable - -error[E0381]: use of possibly uninitialized variable: `x` - --> $DIR/borrowck-asm.rs:68:32 - | -LL | asm!("nop" : "=*r"(x)); - | ^ use of possibly uninitialized `x` - -error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/borrowck-asm.rs:77:31 - | -LL | let y = &*x; - | --- borrow of `x` occurs here -LL | unsafe { -LL | asm!("nop" : "+r"(x)); - | ^ assignment to borrowed `x` occurs here -... -LL | let z = y; - | - borrow later used here - -error[E0382]: use of moved value: `x` - --> $DIR/borrowck-asm.rs:86:40 - | -LL | let x = &mut 2; - | - move occurs because `x` has type `&mut i32`, which does not implement the `Copy` trait -LL | unsafe { -LL | asm!("nop" : : "r"(x), "r"(x) ); - | - ^ value used here after move - | | - | value moved here - -error: aborting due to 7 previous errors - -Some errors occurred: E0381, E0382, E0384, E0503, E0506. -For more information about an error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-asm.rs b/src/test/ui/borrowck/borrowck-asm.rs index 560c87c8d7..9c9cc04baa 100644 --- a/src/test/ui/borrowck/borrowck-asm.rs +++ b/src/test/ui/borrowck/borrowck-asm.rs @@ -6,9 +6,6 @@ // ignore-sparc // ignore-sparc64 -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - #![feature(asm)] #[cfg(any(target_arch = "x86", @@ -24,16 +21,14 @@ mod test_cases { unsafe { asm!("nop" : : "r"(x)); } - let z = x; //[ast]~ ERROR use of moved value: `x` - //[mir]~^ ERROR use of moved value: `x` + let z = x; //~ ERROR use of moved value: `x` } fn in_is_read() { let mut x = 3; let y = &mut x; unsafe { - asm!("nop" : : "r"(x)); //[ast]~ ERROR cannot use - //[mir]~^ ERROR cannot use + asm!("nop" : : "r"(x)); //~ ERROR cannot use } let z = y; } @@ -41,14 +36,12 @@ mod test_cases { fn out_is_assign() { let x = 3; unsafe { - asm!("nop" : "=r"(x)); //[ast]~ ERROR cannot assign twice - //[mir]~^ ERROR cannot assign twice + asm!("nop" : "=r"(x)); //~ ERROR cannot assign twice } let mut a = &mut 3; let b = &*a; unsafe { - asm!("nop" : "=r"(a)); //[ast]~ ERROR cannot assign to `a` because it is borrowed - // No MIR error, this is a shallow write. + asm!("nop" : "=r"(a)); // OK, Shallow write to `a` } let c = b; let d = *a; @@ -57,16 +50,14 @@ mod test_cases { fn rw_is_assign() { let x = 3; unsafe { - asm!("nop" : "+r"(x)); //[ast]~ ERROR cannot assign twice - //[mir]~^ ERROR cannot assign twice + asm!("nop" : "+r"(x)); //~ ERROR cannot assign twice } } fn indirect_is_not_init() { let x: i32; unsafe { - asm!("nop" : "=*r"(x)); //[ast]~ ERROR use of possibly uninitialized variable - //[mir]~^ ERROR use of possibly uninitialized variable + asm!("nop" : "=*r"(x)); //~ ERROR use of possibly uninitialized variable } } @@ -74,8 +65,7 @@ mod test_cases { let mut x = &mut 3; let y = &*x; unsafe { - asm!("nop" : "+r"(x)); //[ast]~ ERROR cannot assign to `x` because it is borrowed - //[mir]~^ ERROR cannot assign to `x` because it is borrowed + asm!("nop" : "+r"(x)); //~ ERROR cannot assign to `x` because it is borrowed } let z = y; } @@ -83,8 +73,7 @@ mod test_cases { fn two_moves() { let x = &mut 2; unsafe { - asm!("nop" : : "r"(x), "r"(x) ); //[ast]~ ERROR use of moved value - //[mir]~^ ERROR use of moved value + asm!("nop" : : "r"(x), "r"(x) ); //~ ERROR use of moved value } } } diff --git a/src/test/ui/borrowck/borrowck-asm.ast.nll.stderr b/src/test/ui/borrowck/borrowck-asm.stderr similarity index 88% rename from src/test/ui/borrowck/borrowck-asm.ast.nll.stderr rename to src/test/ui/borrowck/borrowck-asm.stderr index dd6e5ebe0e..c771373022 100644 --- a/src/test/ui/borrowck/borrowck-asm.ast.nll.stderr +++ b/src/test/ui/borrowck/borrowck-asm.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `x` - --> $DIR/borrowck-asm.rs:27:17 + --> $DIR/borrowck-asm.rs:24:17 | LL | let x = &mut 0isize; | - move occurs because `x` has type `&mut isize`, which does not implement the `Copy` trait @@ -11,19 +11,19 @@ LL | let z = x; | ^ value used here after move error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/borrowck-asm.rs:35:32 + --> $DIR/borrowck-asm.rs:31:32 | LL | let y = &mut x; | ------ borrow of `x` occurs here LL | unsafe { LL | asm!("nop" : : "r"(x)); | ^ use of borrowed `x` -... +LL | } LL | let z = y; | - borrow later used here error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-asm.rs:44:31 + --> $DIR/borrowck-asm.rs:39:31 | LL | let x = 3; | - @@ -35,7 +35,7 @@ LL | asm!("nop" : "=r"(x)); | ^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-asm.rs:60:31 + --> $DIR/borrowck-asm.rs:53:31 | LL | let x = 3; | - @@ -47,25 +47,25 @@ LL | asm!("nop" : "+r"(x)); | ^ cannot assign twice to immutable variable error[E0381]: use of possibly uninitialized variable: `x` - --> $DIR/borrowck-asm.rs:68:32 + --> $DIR/borrowck-asm.rs:60:32 | LL | asm!("nop" : "=*r"(x)); | ^ use of possibly uninitialized `x` error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/borrowck-asm.rs:77:31 + --> $DIR/borrowck-asm.rs:68:31 | LL | let y = &*x; | --- borrow of `x` occurs here LL | unsafe { LL | asm!("nop" : "+r"(x)); | ^ assignment to borrowed `x` occurs here -... +LL | } LL | let z = y; | - borrow later used here error[E0382]: use of moved value: `x` - --> $DIR/borrowck-asm.rs:86:40 + --> $DIR/borrowck-asm.rs:76:40 | LL | let x = &mut 2; | - move occurs because `x` has type `&mut i32`, which does not implement the `Copy` trait @@ -77,5 +77,5 @@ LL | asm!("nop" : : "r"(x), "r"(x) ); error: aborting due to 7 previous errors -Some errors occurred: E0381, E0382, E0384, E0503, E0506. +Some errors have detailed explanations: E0381, E0382, E0384, E0503, E0506. For more information about an error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-assign-comp-idx.nll.stderr b/src/test/ui/borrowck/borrowck-assign-comp-idx.nll.stderr deleted file mode 100644 index 93f1d8c525..0000000000 --- a/src/test/ui/borrowck/borrowck-assign-comp-idx.nll.stderr +++ /dev/null @@ -1,27 +0,0 @@ -error[E0502]: cannot borrow `p` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-assign-comp-idx.rs:12:5 - | -LL | let q: &isize = &p[0]; - | - immutable borrow occurs here -LL | -LL | p[0] = 5; - | ^ mutable borrow occurs here -LL | -LL | println!("{}", *q); - | -- immutable borrow later used here - -error[E0502]: cannot borrow `p` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-assign-comp-idx.rs:27:9 - | -LL | borrow( - | ------ immutable borrow later used by call -LL | &p, - | -- immutable borrow occurs here -LL | || p[0] = 5); - | ^^ - second borrow occurs due to use of `p` in closure - | | - | mutable borrow occurs here - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-assign-comp-idx.stderr b/src/test/ui/borrowck/borrowck-assign-comp-idx.stderr index 0d092e6812..93f1d8c525 100644 --- a/src/test/ui/borrowck/borrowck-assign-comp-idx.stderr +++ b/src/test/ui/borrowck/borrowck-assign-comp-idx.stderr @@ -6,19 +6,20 @@ LL | let q: &isize = &p[0]; LL | LL | p[0] = 5; | ^ mutable borrow occurs here -... -LL | } - | - immutable borrow ends here +LL | +LL | println!("{}", *q); + | -- immutable borrow later used here error[E0502]: cannot borrow `p` as mutable because it is also borrowed as immutable --> $DIR/borrowck-assign-comp-idx.rs:27:9 | +LL | borrow( + | ------ immutable borrow later used by call LL | &p, - | - immutable borrow occurs here + | -- immutable borrow occurs here LL | || p[0] = 5); - | ^^ - - immutable borrow ends here - | | | - | | borrow occurs due to use of `p` in closure + | ^^ - second borrow occurs due to use of `p` in closure + | | | mutable borrow occurs here error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/borrowck-assign-comp.ast.stderr b/src/test/ui/borrowck/borrowck-assign-comp.ast.stderr deleted file mode 100644 index 4adb19c4c3..0000000000 --- a/src/test/ui/borrowck/borrowck-assign-comp.ast.stderr +++ /dev/null @@ -1,28 +0,0 @@ -error[E0506]: cannot assign to `p.x` because it is borrowed - --> $DIR/borrowck-assign-comp.rs:13:5 - | -LL | let q = &p; - | - borrow of `p.x` occurs here -... -LL | p.x = 5; - | ^^^^^^^ assignment to borrowed `p.x` occurs here - -error[E0506]: cannot assign to `p` because it is borrowed - --> $DIR/borrowck-assign-comp.rs:24:5 - | -LL | let q = &p.y; - | --- borrow of `p` occurs here -LL | p = Point {x: 5, y: 7}; - | ^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `p` occurs here - -error[E0506]: cannot assign to `p.y` because it is borrowed - --> $DIR/borrowck-assign-comp.rs:36:5 - | -LL | let q = &p.y; - | --- borrow of `p.y` occurs here -LL | p.y = 5; - | ^^^^^^^ assignment to borrowed `p.y` occurs here - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/borrowck/borrowck-assign-comp.mir.stderr b/src/test/ui/borrowck/borrowck-assign-comp.mir.stderr deleted file mode 100644 index 53af41cfe3..0000000000 --- a/src/test/ui/borrowck/borrowck-assign-comp.mir.stderr +++ /dev/null @@ -1,37 +0,0 @@ -error[E0506]: cannot assign to `p.x` because it is borrowed - --> $DIR/borrowck-assign-comp.rs:13:5 - | -LL | let q = &p; - | -- borrow of `p.x` occurs here -... -LL | p.x = 5; - | ^^^^^^^ assignment to borrowed `p.x` occurs here -LL | -LL | q.x; - | --- borrow later used here - -error[E0506]: cannot assign to `p` because it is borrowed - --> $DIR/borrowck-assign-comp.rs:24:5 - | -LL | let q = &p.y; - | ---- borrow of `p` occurs here -LL | p = Point {x: 5, y: 7}; - | ^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `p` occurs here -... -LL | *q; // stretch loan - | -- borrow later used here - -error[E0506]: cannot assign to `p.y` because it is borrowed - --> $DIR/borrowck-assign-comp.rs:36:5 - | -LL | let q = &p.y; - | ---- borrow of `p.y` occurs here -LL | p.y = 5; - | ^^^^^^^ assignment to borrowed `p.y` occurs here -LL | -LL | *q; - | -- borrow later used here - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/borrowck/borrowck-assign-comp.rs b/src/test/ui/borrowck/borrowck-assign-comp.rs index 0cacc3882d..98bb2d85ad 100644 --- a/src/test/ui/borrowck/borrowck-assign-comp.rs +++ b/src/test/ui/borrowck/borrowck-assign-comp.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - struct Point { x: isize, y: isize } fn a() { @@ -10,8 +7,7 @@ fn a() { // This assignment is illegal because the field x is not // inherently mutable; since `p` was made immutable, `p.x` is now // immutable. Otherwise the type of &_q.x (&isize) would be wrong. - p.x = 5; //[ast]~ ERROR cannot assign to `p.x` - //[mir]~^ ERROR cannot assign to `p.x` because it is borrowed + p.x = 5; //~ ERROR cannot assign to `p.x` because it is borrowed q.x; } @@ -21,8 +17,7 @@ fn c() { let mut p = Point {x: 3, y: 4}; let q = &p.y; - p = Point {x: 5, y: 7};//[ast]~ ERROR cannot assign to `p` - //[mir]~^ ERROR cannot assign to `p` because it is borrowed + p = Point {x: 5, y: 7};//~ ERROR cannot assign to `p` because it is borrowed p.x; // silence warning *q; // stretch loan } @@ -33,8 +28,7 @@ fn d() { let mut p = Point {x: 3, y: 4}; let q = &p.y; - p.y = 5; //[ast]~ ERROR cannot assign to `p.y` - //[mir]~^ ERROR cannot assign to `p.y` because it is borrowed + p.y = 5; //~ ERROR cannot assign to `p.y` because it is borrowed *q; } diff --git a/src/test/ui/borrowck/borrowck-assign-comp.ast.nll.stderr b/src/test/ui/borrowck/borrowck-assign-comp.stderr similarity index 86% rename from src/test/ui/borrowck/borrowck-assign-comp.ast.nll.stderr rename to src/test/ui/borrowck/borrowck-assign-comp.stderr index 53af41cfe3..2b7cef7b32 100644 --- a/src/test/ui/borrowck/borrowck-assign-comp.ast.nll.stderr +++ b/src/test/ui/borrowck/borrowck-assign-comp.stderr @@ -1,34 +1,32 @@ error[E0506]: cannot assign to `p.x` because it is borrowed - --> $DIR/borrowck-assign-comp.rs:13:5 + --> $DIR/borrowck-assign-comp.rs:10:5 | LL | let q = &p; | -- borrow of `p.x` occurs here ... LL | p.x = 5; | ^^^^^^^ assignment to borrowed `p.x` occurs here -LL | LL | q.x; | --- borrow later used here error[E0506]: cannot assign to `p` because it is borrowed - --> $DIR/borrowck-assign-comp.rs:24:5 + --> $DIR/borrowck-assign-comp.rs:20:5 | LL | let q = &p.y; | ---- borrow of `p` occurs here LL | p = Point {x: 5, y: 7}; | ^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `p` occurs here -... +LL | p.x; // silence warning LL | *q; // stretch loan | -- borrow later used here error[E0506]: cannot assign to `p.y` because it is borrowed - --> $DIR/borrowck-assign-comp.rs:36:5 + --> $DIR/borrowck-assign-comp.rs:31:5 | LL | let q = &p.y; | ---- borrow of `p.y` occurs here LL | p.y = 5; | ^^^^^^^ assignment to borrowed `p.y` occurs here -LL | LL | *q; | -- borrow later used here diff --git a/src/test/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.nll.stderr b/src/test/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.nll.stderr deleted file mode 100644 index d8ccf36852..0000000000 --- a/src/test/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.nll.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0594]: cannot assign to `*s.pointer` which is behind a `&` reference - --> $DIR/borrowck-assign-to-andmut-in-aliasable-loc.rs:9:5 - | -LL | fn a(s: &S) { - | -- help: consider changing this to be a mutable reference: `&mut S<'_>` -LL | *s.pointer += 1; - | ^^^^^^^^^^^^^^^ `s` is a `&` reference, so the data it refers to cannot be written - -error[E0594]: cannot assign to `*s.pointer` which is behind a `&` reference - --> $DIR/borrowck-assign-to-andmut-in-aliasable-loc.rs:17:5 - | -LL | fn c(s: & &mut S) { - | -------- help: consider changing this to be a mutable reference: `&mut &mut S<'_>` -LL | *s.pointer += 1; - | ^^^^^^^^^^^^^^^ `s` is a `&` reference, so the data it refers to cannot be written - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.stderr b/src/test/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.stderr index 5ec1ff2c05..38fcfbfc2a 100644 --- a/src/test/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.stderr +++ b/src/test/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.stderr @@ -1,19 +1,18 @@ -error[E0389]: cannot assign to data in a `&` reference +error[E0594]: cannot assign to `*s.pointer` which is behind a `&` reference --> $DIR/borrowck-assign-to-andmut-in-aliasable-loc.rs:9:5 | LL | fn a(s: &S) { - | -- use `&mut S` here to make mutable + | -- help: consider changing this to be a mutable reference: `&mut S<'_>` LL | *s.pointer += 1; - | ^^^^^^^^^^^^^^^ assignment into an immutable reference + | ^^^^^^^^^^^^^^^ `s` is a `&` reference, so the data it refers to cannot be written -error[E0389]: cannot assign to data in a `&` reference +error[E0594]: cannot assign to `*s.pointer` which is behind a `&` reference --> $DIR/borrowck-assign-to-andmut-in-aliasable-loc.rs:17:5 | LL | fn c(s: & &mut S) { - | -------- use `&mut &mut S` here to make mutable + | -------- help: consider changing this to be a mutable reference: `&mut &mut S<'_>` LL | *s.pointer += 1; - | ^^^^^^^^^^^^^^^ assignment into an immutable reference + | ^^^^^^^^^^^^^^^ `s` is a `&` reference, so the data it refers to cannot be written error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0389`. diff --git a/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.nll.stderr b/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.nll.stderr deleted file mode 100644 index 0aacaf9cf4..0000000000 --- a/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.nll.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error[E0503]: cannot use `*y.pointer` because it was mutably borrowed - --> $DIR/borrowck-assign-to-andmut-in-borrowed-loc.rs:18:9 - | -LL | let z = copy_borrowed_ptr(&mut y); - | ------ borrow of `y` occurs here -LL | *y.pointer += 1; - | ^^^^^^^^^^^^^^^ use of borrowed `y` -LL | *z.pointer += 1; - | --------------- borrow later used here - -error[E0506]: cannot assign to `*y.pointer` because it is borrowed - --> $DIR/borrowck-assign-to-andmut-in-borrowed-loc.rs:18:9 - | -LL | let z = copy_borrowed_ptr(&mut y); - | ------ borrow of `*y.pointer` occurs here -LL | *y.pointer += 1; - | ^^^^^^^^^^^^^^^ assignment to borrowed `*y.pointer` occurs here -LL | *z.pointer += 1; - | --------------- borrow later used here - -error: aborting due to 2 previous errors - -Some errors occurred: E0503, E0506. -For more information about an error, try `rustc --explain E0503`. diff --git a/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.rs b/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.rs index 98080d47c6..f7aee2b8a9 100644 --- a/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.rs +++ b/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.rs @@ -15,7 +15,9 @@ fn main() { { let mut y = S { pointer: &mut x }; let z = copy_borrowed_ptr(&mut y); - *y.pointer += 1; //~ ERROR cannot assign + *y.pointer += 1; + //~^ ERROR cannot use `*y.pointer` + //~| ERROR cannot assign to `*y.pointer` *z.pointer += 1; } } diff --git a/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.stderr b/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.stderr index 10d6ac5464..0b21d113f7 100644 --- a/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.stderr +++ b/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.stderr @@ -1,11 +1,26 @@ +error[E0503]: cannot use `*y.pointer` because it was mutably borrowed + --> $DIR/borrowck-assign-to-andmut-in-borrowed-loc.rs:18:9 + | +LL | let z = copy_borrowed_ptr(&mut y); + | ------ borrow of `y` occurs here +LL | *y.pointer += 1; + | ^^^^^^^^^^^^^^^ use of borrowed `y` +... +LL | *z.pointer += 1; + | --------------- borrow later used here + error[E0506]: cannot assign to `*y.pointer` because it is borrowed --> $DIR/borrowck-assign-to-andmut-in-borrowed-loc.rs:18:9 | LL | let z = copy_borrowed_ptr(&mut y); - | - borrow of `*y.pointer` occurs here + | ------ borrow of `*y.pointer` occurs here LL | *y.pointer += 1; | ^^^^^^^^^^^^^^^ assignment to borrowed `*y.pointer` occurs here +... +LL | *z.pointer += 1; + | --------------- borrow later used here -error: aborting due to previous error +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0506`. +Some errors have detailed explanations: E0503, E0506. +For more information about an error, try `rustc --explain E0503`. diff --git a/src/test/ui/borrowck/borrowck-assign-to-constants.ast.stderr b/src/test/ui/borrowck/borrowck-assign-to-constants.ast.stderr deleted file mode 100644 index e755785ef5..0000000000 --- a/src/test/ui/borrowck/borrowck-assign-to-constants.ast.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0594]: cannot assign to immutable static item - --> $DIR/borrowck-assign-to-constants.rs:8:5 - | -LL | foo = 6; - | ^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/borrowck/borrowck-assign-to-constants.mir.stderr b/src/test/ui/borrowck/borrowck-assign-to-constants.mir.stderr deleted file mode 100644 index 626e1ef8ad..0000000000 --- a/src/test/ui/borrowck/borrowck-assign-to-constants.mir.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0594]: cannot assign to immutable static item `foo` - --> $DIR/borrowck-assign-to-constants.rs:8:5 - | -LL | foo = 6; - | ^^^^^^^ cannot assign - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/borrowck/borrowck-assign-to-constants.rs b/src/test/ui/borrowck/borrowck-assign-to-constants.rs index 768b2a5f74..5881dccf61 100644 --- a/src/test/ui/borrowck/borrowck-assign-to-constants.rs +++ b/src/test/ui/borrowck/borrowck-assign-to-constants.rs @@ -1,10 +1,6 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - static foo: isize = 5; fn main() { // assigning to various global constants - foo = 6; //[ast]~ ERROR cannot assign to immutable static item - //[mir]~^ ERROR cannot assign to immutable static item `foo` + foo = 6; //~ ERROR cannot assign to immutable static item `foo` } diff --git a/src/test/ui/borrowck/borrowck-assign-to-constants.ast.nll.stderr b/src/test/ui/borrowck/borrowck-assign-to-constants.stderr similarity index 57% rename from src/test/ui/borrowck/borrowck-assign-to-constants.ast.nll.stderr rename to src/test/ui/borrowck/borrowck-assign-to-constants.stderr index 626e1ef8ad..800003caa0 100644 --- a/src/test/ui/borrowck/borrowck-assign-to-constants.ast.nll.stderr +++ b/src/test/ui/borrowck/borrowck-assign-to-constants.stderr @@ -1,9 +1,8 @@ error[E0594]: cannot assign to immutable static item `foo` - --> $DIR/borrowck-assign-to-constants.rs:8:5 + --> $DIR/borrowck-assign-to-constants.rs:5:5 | LL | foo = 6; | ^^^^^^^ cannot assign error: aborting due to previous error -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.nll.stderr b/src/test/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.nll.stderr deleted file mode 100644 index 3ed76c13f6..0000000000 --- a/src/test/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/borrowck-auto-mut-ref-to-immut-var.rs:15:5 - | -LL | let x = Foo { x: 3 }; - | - help: consider changing this to be mutable: `mut x` -LL | x.printme(); - | ^ cannot borrow as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.stderr b/src/test/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.stderr index 759b778e35..3ed76c13f6 100644 --- a/src/test/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.stderr +++ b/src/test/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.stderr @@ -1,10 +1,10 @@ -error[E0596]: cannot borrow immutable local variable `x` as mutable +error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable --> $DIR/borrowck-auto-mut-ref-to-immut-var.rs:15:5 | LL | let x = Foo { x: 3 }; - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` LL | x.printme(); - | ^ cannot borrow mutably + | ^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-autoref-3261.nll.stderr b/src/test/ui/borrowck/borrowck-autoref-3261.nll.stderr deleted file mode 100644 index c2dfb687e8..0000000000 --- a/src/test/ui/borrowck/borrowck-autoref-3261.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-autoref-3261.rs:15:9 - | -LL | (&mut x).with( - | -------- ---- first borrow later used by call - | | - | first mutable borrow occurs here -LL | |opt| { - | ^^^^^ second mutable borrow occurs here -... -LL | x = X(Either::Left((0, 0))); - | - second borrow occurs due to use of `x` in closure - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-autoref-3261.stderr b/src/test/ui/borrowck/borrowck-autoref-3261.stderr index 280704a271..c2dfb687e8 100644 --- a/src/test/ui/borrowck/borrowck-autoref-3261.stderr +++ b/src/test/ui/borrowck/borrowck-autoref-3261.stderr @@ -2,15 +2,14 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time --> $DIR/borrowck-autoref-3261.rs:15:9 | LL | (&mut x).with( - | - first mutable borrow occurs here + | -------- ---- first borrow later used by call + | | + | first mutable borrow occurs here LL | |opt| { | ^^^^^ second mutable borrow occurs here ... LL | x = X(Either::Left((0, 0))); - | - borrow occurs due to use of `x` in closure -... -LL | }) - | - first borrow ends here + | - second borrow occurs due to use of `x` in closure error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-bad-nested-calls-free.nll.stderr b/src/test/ui/borrowck/borrowck-bad-nested-calls-free.nll.stderr deleted file mode 100644 index e273a778fd..0000000000 --- a/src/test/ui/borrowck/borrowck-bad-nested-calls-free.nll.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0502]: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-bad-nested-calls-free.rs:25:17 - | -LL | add( - | --- immutable borrow later used by call -LL | &*a, - | --- immutable borrow occurs here -LL | rewrite(&mut a)); - | ^^^^^^ mutable borrow occurs here - -error[E0502]: cannot borrow `a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-bad-nested-calls-free.rs:32:17 - | -LL | add( - | --- immutable borrow later used by call -LL | &*a, - | --- immutable borrow occurs here -LL | rewrite(&mut a)); - | ^^^^^^ mutable borrow occurs here - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-bad-nested-calls-free.stderr b/src/test/ui/borrowck/borrowck-bad-nested-calls-free.stderr index 06ec2bdac7..e273a778fd 100644 --- a/src/test/ui/borrowck/borrowck-bad-nested-calls-free.stderr +++ b/src/test/ui/borrowck/borrowck-bad-nested-calls-free.stderr @@ -1,22 +1,22 @@ -error[E0502]: cannot borrow `a` as mutable because `*a` is also borrowed as immutable - --> $DIR/borrowck-bad-nested-calls-free.rs:25:22 +error[E0502]: cannot borrow `a` as mutable because it is also borrowed as immutable + --> $DIR/borrowck-bad-nested-calls-free.rs:25:17 | +LL | add( + | --- immutable borrow later used by call LL | &*a, - | -- immutable borrow occurs here + | --- immutable borrow occurs here LL | rewrite(&mut a)); - | ^ - immutable borrow ends here - | | - | mutable borrow occurs here + | ^^^^^^ mutable borrow occurs here -error[E0502]: cannot borrow `a` as mutable because `*a` is also borrowed as immutable - --> $DIR/borrowck-bad-nested-calls-free.rs:32:22 +error[E0502]: cannot borrow `a` as mutable because it is also borrowed as immutable + --> $DIR/borrowck-bad-nested-calls-free.rs:32:17 | +LL | add( + | --- immutable borrow later used by call LL | &*a, - | -- immutable borrow occurs here + | --- immutable borrow occurs here LL | rewrite(&mut a)); - | ^ - immutable borrow ends here - | | - | mutable borrow occurs here + | ^^^^^^ mutable borrow occurs here error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/borrowck-bad-nested-calls-move.nll.stderr b/src/test/ui/borrowck/borrowck-bad-nested-calls-move.nll.stderr deleted file mode 100644 index 371bcf2b69..0000000000 --- a/src/test/ui/borrowck/borrowck-bad-nested-calls-move.nll.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0505]: cannot move out of `a` because it is borrowed - --> $DIR/borrowck-bad-nested-calls-move.rs:25:9 - | -LL | add( - | --- borrow later used by call -LL | &*a, - | --- borrow of `*a` occurs here -LL | a); - | ^ move out of `a` occurs here - -error[E0505]: cannot move out of `a` because it is borrowed - --> $DIR/borrowck-bad-nested-calls-move.rs:32:9 - | -LL | add( - | --- borrow later used by call -LL | &*a, - | --- borrow of `*a` occurs here -LL | a); - | ^ move out of `a` occurs here - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/borrowck/borrowck-bad-nested-calls-move.stderr b/src/test/ui/borrowck/borrowck-bad-nested-calls-move.stderr index 3b34a61364..371bcf2b69 100644 --- a/src/test/ui/borrowck/borrowck-bad-nested-calls-move.stderr +++ b/src/test/ui/borrowck/borrowck-bad-nested-calls-move.stderr @@ -1,16 +1,20 @@ error[E0505]: cannot move out of `a` because it is borrowed --> $DIR/borrowck-bad-nested-calls-move.rs:25:9 | +LL | add( + | --- borrow later used by call LL | &*a, - | -- borrow of `*a` occurs here + | --- borrow of `*a` occurs here LL | a); | ^ move out of `a` occurs here error[E0505]: cannot move out of `a` because it is borrowed --> $DIR/borrowck-bad-nested-calls-move.rs:32:9 | +LL | add( + | --- borrow later used by call LL | &*a, - | -- borrow of `*a` occurs here + | --- borrow of `*a` occurs here LL | a); | ^ move out of `a` occurs here diff --git a/src/test/ui/borrowck/borrowck-block-unint.nll.stderr b/src/test/ui/borrowck/borrowck-block-unint.nll.stderr deleted file mode 100644 index d2a49962ba..0000000000 --- a/src/test/ui/borrowck/borrowck-block-unint.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0381]: borrow of possibly uninitialized variable: `x` - --> $DIR/borrowck-block-unint.rs:4:11 - | -LL | force(|| { - | ^^ use of possibly uninitialized `x` -LL | println!("{}", x); - | - borrow occurs due to use in closure - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-block-unint.rs b/src/test/ui/borrowck/borrowck-block-unint.rs index 3c6e9cb557..1fed2d503b 100644 --- a/src/test/ui/borrowck/borrowck-block-unint.rs +++ b/src/test/ui/borrowck/borrowck-block-unint.rs @@ -1,7 +1,7 @@ fn force(f: F) where F: FnOnce() { f(); } fn main() { let x: isize; - force(|| { //~ ERROR capture of possibly uninitialized variable: `x` + force(|| { //~ ERROR borrow of possibly uninitialized variable: `x` println!("{}", x); }); } diff --git a/src/test/ui/borrowck/borrowck-block-unint.stderr b/src/test/ui/borrowck/borrowck-block-unint.stderr index ab55d7994d..d2a49962ba 100644 --- a/src/test/ui/borrowck/borrowck-block-unint.stderr +++ b/src/test/ui/borrowck/borrowck-block-unint.stderr @@ -1,8 +1,10 @@ -error[E0381]: capture of possibly uninitialized variable: `x` +error[E0381]: borrow of possibly uninitialized variable: `x` --> $DIR/borrowck-block-unint.rs:4:11 | LL | force(|| { | ^^ use of possibly uninitialized `x` +LL | println!("{}", x); + | - borrow occurs due to use in closure error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.nll.stderr b/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.nll.stderr deleted file mode 100644 index ad6bd7dc94..0000000000 --- a/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.nll.stderr +++ /dev/null @@ -1,116 +0,0 @@ -error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time - --> $DIR/borrowck-borrow-from-owned-ptr.rs:18:17 - | -LL | let bar1 = &mut foo.bar1; - | ------------- first mutable borrow occurs here -LL | let _bar2 = &mut foo.bar1; - | ^^^^^^^^^^^^^ second mutable borrow occurs here -LL | *bar1; - | ----- first borrow later used here - -error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-borrow-from-owned-ptr.rs:25:17 - | -LL | let bar1 = &mut foo.bar1; - | ------------- mutable borrow occurs here -LL | let _bar2 = &foo.bar1; - | ^^^^^^^^^ immutable borrow occurs here -LL | *bar1; - | ----- mutable borrow later used here - -error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-borrow-from-owned-ptr.rs:32:17 - | -LL | let bar1 = &foo.bar1; - | --------- immutable borrow occurs here -LL | let _bar2 = &mut foo.bar1; - | ^^^^^^^^^^^^^ mutable borrow occurs here -LL | *bar1; - | ----- immutable borrow later used here - -error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time - --> $DIR/borrowck-borrow-from-owned-ptr.rs:62:21 - | -LL | let bar1 = &mut foo.bar1; - | ------------- first mutable borrow occurs here -LL | match *foo { -LL | Foo { bar1: ref mut _bar1, bar2: _ } => {} - | ^^^^^^^^^^^^^ second mutable borrow occurs here -... -LL | *bar1; - | ----- first borrow later used here - -error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-borrow-from-owned-ptr.rs:71:17 - | -LL | let bar1 = &mut foo.bar1.int1; - | ------------------ mutable borrow occurs here -LL | let _foo1 = &foo.bar1; - | ^^^^^^^^^ immutable borrow occurs here -LL | let _foo2 = &*foo; -LL | *bar1; - | ----- mutable borrow later used here - -error[E0502]: cannot borrow `*foo` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-borrow-from-owned-ptr.rs:72:17 - | -LL | let bar1 = &mut foo.bar1.int1; - | ------------------ mutable borrow occurs here -LL | let _foo1 = &foo.bar1; -LL | let _foo2 = &*foo; - | ^^^^^ immutable borrow occurs here -LL | *bar1; - | ----- mutable borrow later used here - -error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time - --> $DIR/borrowck-borrow-from-owned-ptr.rs:79:17 - | -LL | let bar1 = &mut foo.bar1.int1; - | ------------------ first mutable borrow occurs here -LL | let _foo1 = &mut foo.bar1; - | ^^^^^^^^^^^^^ second mutable borrow occurs here -LL | *bar1; - | ----- first borrow later used here - -error[E0499]: cannot borrow `*foo` as mutable more than once at a time - --> $DIR/borrowck-borrow-from-owned-ptr.rs:86:17 - | -LL | let bar1 = &mut foo.bar1.int1; - | ------------------ first mutable borrow occurs here -LL | let _foo2 = &mut *foo; - | ^^^^^^^^^ second mutable borrow occurs here -LL | *bar1; - | ----- first borrow later used here - -error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-borrow-from-owned-ptr.rs:93:17 - | -LL | let bar1 = &foo.bar1.int1; - | -------------- immutable borrow occurs here -LL | let _foo1 = &mut foo.bar1; - | ^^^^^^^^^^^^^ mutable borrow occurs here -LL | *bar1; - | ----- immutable borrow later used here - -error[E0502]: cannot borrow `*foo` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-borrow-from-owned-ptr.rs:100:17 - | -LL | let bar1 = &foo.bar1.int1; - | -------------- immutable borrow occurs here -LL | let _foo2 = &mut *foo; - | ^^^^^^^^^ mutable borrow occurs here -LL | *bar1; - | ----- immutable borrow later used here - -error[E0596]: cannot borrow `foo.bar1` as mutable, as `foo` is not declared as mutable - --> $DIR/borrowck-borrow-from-owned-ptr.rs:121:16 - | -LL | let foo = make_foo(); - | --- help: consider changing this to be mutable: `mut foo` -LL | let bar1 = &mut foo.bar1; - | ^^^^^^^^^^^^^ cannot borrow as mutable - -error: aborting due to 11 previous errors - -Some errors occurred: E0499, E0502, E0596. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.rs b/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.rs index 1435837bf3..353e4e9f75 100644 --- a/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.rs +++ b/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.rs @@ -43,15 +43,17 @@ fn borrow_same_field_twice_imm_imm() { fn borrow_both_fields_mut() { let mut foo = make_foo(); let bar1 = &mut foo.bar1; - let _bar2 = &mut foo.bar2; //~ ERROR cannot borrow + let _bar2 = &mut foo.bar2; *bar1; } fn borrow_both_mut_pattern() { let mut foo = make_foo(); match *foo { - Foo { bar1: ref mut _bar1, bar2: ref mut _bar2 } => {} - //~^ ERROR cannot borrow + Foo { bar1: ref mut _bar1, bar2: ref mut _bar2 } => { + *_bar1; + *_bar2; + } } } @@ -112,8 +114,7 @@ fn borrow_imm_and_base_imm() { fn borrow_mut_and_imm() { let mut foo = make_foo(); let bar1 = &mut foo.bar1; - let _foo1 = &foo.bar2; //~ ERROR cannot borrow - *bar1; + let _foo1 = &foo.bar2; } fn borrow_mut_from_imm() { @@ -125,7 +126,7 @@ fn borrow_mut_from_imm() { fn borrow_long_path_both_mut() { let mut foo = make_foo(); let bar1 = &mut foo.bar1.int1; - let foo1 = &mut foo.bar2.int2; //~ ERROR cannot borrow + let foo1 = &mut foo.bar2.int2; *bar1; *foo1; } diff --git a/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.stderr b/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.stderr index a4fb28d0e8..e00d69f89d 100644 --- a/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.stderr @@ -1,168 +1,116 @@ error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time - --> $DIR/borrowck-borrow-from-owned-ptr.rs:18:22 + --> $DIR/borrowck-borrow-from-owned-ptr.rs:18:17 | LL | let bar1 = &mut foo.bar1; - | -------- first mutable borrow occurs here + | ------------- first mutable borrow occurs here LL | let _bar2 = &mut foo.bar1; - | ^^^^^^^^ second mutable borrow occurs here + | ^^^^^^^^^^^^^ second mutable borrow occurs here LL | *bar1; -LL | } - | - first borrow ends here + | ----- first borrow later used here error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-borrow-from-owned-ptr.rs:25:18 + --> $DIR/borrowck-borrow-from-owned-ptr.rs:25:17 | LL | let bar1 = &mut foo.bar1; - | -------- mutable borrow occurs here + | ------------- mutable borrow occurs here LL | let _bar2 = &foo.bar1; - | ^^^^^^^^ immutable borrow occurs here + | ^^^^^^^^^ immutable borrow occurs here LL | *bar1; -LL | } - | - mutable borrow ends here + | ----- mutable borrow later used here error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-borrow-from-owned-ptr.rs:32:22 + --> $DIR/borrowck-borrow-from-owned-ptr.rs:32:17 | LL | let bar1 = &foo.bar1; - | -------- immutable borrow occurs here + | --------- immutable borrow occurs here LL | let _bar2 = &mut foo.bar1; - | ^^^^^^^^ mutable borrow occurs here + | ^^^^^^^^^^^^^ mutable borrow occurs here LL | *bar1; -LL | } - | - immutable borrow ends here - -error[E0499]: cannot borrow `foo` (via `foo.bar2`) as mutable more than once at a time - --> $DIR/borrowck-borrow-from-owned-ptr.rs:46:22 - | -LL | let bar1 = &mut foo.bar1; - | -------- first mutable borrow occurs here (via `foo.bar1`) -LL | let _bar2 = &mut foo.bar2; - | ^^^^^^^^ second mutable borrow occurs here (via `foo.bar2`) -LL | *bar1; -LL | } - | - first borrow ends here - -error[E0499]: cannot borrow `foo` (via `foo.bar2`) as mutable more than once at a time - --> $DIR/borrowck-borrow-from-owned-ptr.rs:53:42 - | -LL | Foo { bar1: ref mut _bar1, bar2: ref mut _bar2 } => {} - | ------------- ^^^^^^^^^^^^^ second mutable borrow occurs here (via `foo.bar2`) - | | - | first mutable borrow occurs here (via `foo.bar1`) -LL | -LL | } - | - first borrow ends here + | ----- immutable borrow later used here error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time - --> $DIR/borrowck-borrow-from-owned-ptr.rs:62:21 + --> $DIR/borrowck-borrow-from-owned-ptr.rs:64:21 | LL | let bar1 = &mut foo.bar1; - | -------- first mutable borrow occurs here + | ------------- first mutable borrow occurs here LL | match *foo { LL | Foo { bar1: ref mut _bar1, bar2: _ } => {} | ^^^^^^^^^^^^^ second mutable borrow occurs here ... -LL | } - | - first borrow ends here +LL | *bar1; + | ----- first borrow later used here -error[E0502]: cannot borrow `foo.bar1` as immutable because `foo.bar1.int1` is also borrowed as mutable - --> $DIR/borrowck-borrow-from-owned-ptr.rs:71:18 +error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed as mutable + --> $DIR/borrowck-borrow-from-owned-ptr.rs:73:17 | LL | let bar1 = &mut foo.bar1.int1; - | ------------- mutable borrow occurs here + | ------------------ mutable borrow occurs here LL | let _foo1 = &foo.bar1; - | ^^^^^^^^ immutable borrow occurs here -... -LL | } - | - mutable borrow ends here + | ^^^^^^^^^ immutable borrow occurs here +LL | let _foo2 = &*foo; +LL | *bar1; + | ----- mutable borrow later used here -error[E0502]: cannot borrow `*foo` as immutable because `foo.bar1.int1` is also borrowed as mutable - --> $DIR/borrowck-borrow-from-owned-ptr.rs:72:18 +error[E0502]: cannot borrow `*foo` as immutable because it is also borrowed as mutable + --> $DIR/borrowck-borrow-from-owned-ptr.rs:74:17 | LL | let bar1 = &mut foo.bar1.int1; - | ------------- mutable borrow occurs here + | ------------------ mutable borrow occurs here LL | let _foo1 = &foo.bar1; LL | let _foo2 = &*foo; - | ^^^^ immutable borrow occurs here + | ^^^^^ immutable borrow occurs here LL | *bar1; -LL | } - | - mutable borrow ends here + | ----- mutable borrow later used here error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time - --> $DIR/borrowck-borrow-from-owned-ptr.rs:79:22 + --> $DIR/borrowck-borrow-from-owned-ptr.rs:81:17 | LL | let bar1 = &mut foo.bar1.int1; - | ------------- first mutable borrow occurs here + | ------------------ first mutable borrow occurs here LL | let _foo1 = &mut foo.bar1; - | ^^^^^^^^ second mutable borrow occurs here + | ^^^^^^^^^^^^^ second mutable borrow occurs here LL | *bar1; -LL | } - | - first borrow ends here + | ----- first borrow later used here error[E0499]: cannot borrow `*foo` as mutable more than once at a time - --> $DIR/borrowck-borrow-from-owned-ptr.rs:86:22 + --> $DIR/borrowck-borrow-from-owned-ptr.rs:88:17 | LL | let bar1 = &mut foo.bar1.int1; - | ------------- first mutable borrow occurs here + | ------------------ first mutable borrow occurs here LL | let _foo2 = &mut *foo; - | ^^^^ second mutable borrow occurs here + | ^^^^^^^^^ second mutable borrow occurs here LL | *bar1; -LL | } - | - first borrow ends here + | ----- first borrow later used here -error[E0502]: cannot borrow `foo.bar1` as mutable because `foo.bar1.int1` is also borrowed as immutable - --> $DIR/borrowck-borrow-from-owned-ptr.rs:93:22 +error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as immutable + --> $DIR/borrowck-borrow-from-owned-ptr.rs:95:17 | LL | let bar1 = &foo.bar1.int1; - | ------------- immutable borrow occurs here + | -------------- immutable borrow occurs here LL | let _foo1 = &mut foo.bar1; - | ^^^^^^^^ mutable borrow occurs here + | ^^^^^^^^^^^^^ mutable borrow occurs here LL | *bar1; -LL | } - | - immutable borrow ends here + | ----- immutable borrow later used here -error[E0502]: cannot borrow `*foo` as mutable because `foo.bar1.int1` is also borrowed as immutable - --> $DIR/borrowck-borrow-from-owned-ptr.rs:100:22 +error[E0502]: cannot borrow `*foo` as mutable because it is also borrowed as immutable + --> $DIR/borrowck-borrow-from-owned-ptr.rs:102:17 | LL | let bar1 = &foo.bar1.int1; - | ------------- immutable borrow occurs here + | -------------- immutable borrow occurs here LL | let _foo2 = &mut *foo; - | ^^^^ mutable borrow occurs here -LL | *bar1; -LL | } - | - immutable borrow ends here - -error[E0502]: cannot borrow `foo` (via `foo.bar2`) as immutable because `foo` is also borrowed as mutable (via `foo.bar1`) - --> $DIR/borrowck-borrow-from-owned-ptr.rs:115:18 - | -LL | let bar1 = &mut foo.bar1; - | -------- mutable borrow occurs here (via `foo.bar1`) -LL | let _foo1 = &foo.bar2; - | ^^^^^^^^ immutable borrow of `foo.bar2` -- which overlaps with `foo.bar1` -- occurs here + | ^^^^^^^^^ mutable borrow occurs here LL | *bar1; -LL | } - | - mutable borrow ends here + | ----- immutable borrow later used here -error[E0596]: cannot borrow field `foo.bar1` of immutable binding as mutable - --> $DIR/borrowck-borrow-from-owned-ptr.rs:121:21 +error[E0596]: cannot borrow `foo.bar1` as mutable, as `foo` is not declared as mutable + --> $DIR/borrowck-borrow-from-owned-ptr.rs:122:16 | LL | let foo = make_foo(); - | --- help: make this binding mutable: `mut foo` + | --- help: consider changing this to be mutable: `mut foo` LL | let bar1 = &mut foo.bar1; - | ^^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0499]: cannot borrow `foo` (via `foo.bar2.int2`) as mutable more than once at a time - --> $DIR/borrowck-borrow-from-owned-ptr.rs:128:21 - | -LL | let bar1 = &mut foo.bar1.int1; - | ------------- first mutable borrow occurs here (via `foo.bar1.int1`) -LL | let foo1 = &mut foo.bar2.int2; - | ^^^^^^^^^^^^^ second mutable borrow occurs here (via `foo.bar2.int2`) -... -LL | } - | - first borrow ends here + | ^^^^^^^^^^^^^ cannot borrow as mutable -error: aborting due to 15 previous errors +error: aborting due to 11 previous errors -Some errors occurred: E0499, E0502, E0596. +Some errors have detailed explanations: E0499, E0502, E0596. For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-borrow-from-stack-variable.nll.stderr b/src/test/ui/borrowck/borrowck-borrow-from-stack-variable.nll.stderr deleted file mode 100644 index b5c6184791..0000000000 --- a/src/test/ui/borrowck/borrowck-borrow-from-stack-variable.nll.stderr +++ /dev/null @@ -1,116 +0,0 @@ -error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time - --> $DIR/borrowck-borrow-from-stack-variable.rs:18:17 - | -LL | let bar1 = &mut foo.bar1; - | ------------- first mutable borrow occurs here -LL | let _bar2 = &mut foo.bar1; - | ^^^^^^^^^^^^^ second mutable borrow occurs here -LL | *bar1; - | ----- first borrow later used here - -error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-borrow-from-stack-variable.rs:25:17 - | -LL | let bar1 = &mut foo.bar1; - | ------------- mutable borrow occurs here -LL | let _bar2 = &foo.bar1; - | ^^^^^^^^^ immutable borrow occurs here -LL | *bar1; - | ----- mutable borrow later used here - -error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-borrow-from-stack-variable.rs:32:17 - | -LL | let bar1 = &foo.bar1; - | --------- immutable borrow occurs here -LL | let _bar2 = &mut foo.bar1; - | ^^^^^^^^^^^^^ mutable borrow occurs here -LL | *bar1; - | ----- immutable borrow later used here - -error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time - --> $DIR/borrowck-borrow-from-stack-variable.rs:61:21 - | -LL | let bar1 = &mut foo.bar1; - | ------------- first mutable borrow occurs here -LL | match foo { -LL | Foo { bar1: ref mut _bar1, bar2: _ } => {} // - | ^^^^^^^^^^^^^ second mutable borrow occurs here -... -LL | *bar1; - | ----- first borrow later used here - -error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-borrow-from-stack-variable.rs:70:17 - | -LL | let bar1 = &mut foo.bar1.int1; - | ------------------ mutable borrow occurs here -LL | let _foo1 = &foo.bar1; - | ^^^^^^^^^ immutable borrow occurs here -LL | let _foo2 = &foo; -LL | *bar1; - | ----- mutable borrow later used here - -error[E0502]: cannot borrow `foo` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-borrow-from-stack-variable.rs:71:17 - | -LL | let bar1 = &mut foo.bar1.int1; - | ------------------ mutable borrow occurs here -LL | let _foo1 = &foo.bar1; -LL | let _foo2 = &foo; - | ^^^^ immutable borrow occurs here -LL | *bar1; - | ----- mutable borrow later used here - -error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time - --> $DIR/borrowck-borrow-from-stack-variable.rs:78:17 - | -LL | let bar1 = &mut foo.bar1.int1; - | ------------------ first mutable borrow occurs here -LL | let _foo1 = &mut foo.bar1; - | ^^^^^^^^^^^^^ second mutable borrow occurs here -LL | *bar1; - | ----- first borrow later used here - -error[E0499]: cannot borrow `foo` as mutable more than once at a time - --> $DIR/borrowck-borrow-from-stack-variable.rs:85:17 - | -LL | let bar1 = &mut foo.bar1.int1; - | ------------------ first mutable borrow occurs here -LL | let _foo2 = &mut foo; - | ^^^^^^^^ second mutable borrow occurs here -LL | *bar1; - | ----- first borrow later used here - -error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-borrow-from-stack-variable.rs:92:17 - | -LL | let bar1 = &foo.bar1.int1; - | -------------- immutable borrow occurs here -LL | let _foo1 = &mut foo.bar1; - | ^^^^^^^^^^^^^ mutable borrow occurs here -LL | *bar1; - | ----- immutable borrow later used here - -error[E0502]: cannot borrow `foo` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-borrow-from-stack-variable.rs:99:17 - | -LL | let bar1 = &foo.bar1.int1; - | -------------- immutable borrow occurs here -LL | let _foo2 = &mut foo; - | ^^^^^^^^ mutable borrow occurs here -LL | *bar1; - | ----- immutable borrow later used here - -error[E0596]: cannot borrow `foo.bar1` as mutable, as `foo` is not declared as mutable - --> $DIR/borrowck-borrow-from-stack-variable.rs:120:16 - | -LL | let foo = make_foo(); - | --- help: consider changing this to be mutable: `mut foo` -LL | let bar1 = &mut foo.bar1; - | ^^^^^^^^^^^^^ cannot borrow as mutable - -error: aborting due to 11 previous errors - -Some errors occurred: E0499, E0502, E0596. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-borrow-from-stack-variable.stderr b/src/test/ui/borrowck/borrowck-borrow-from-stack-variable.stderr index fe60d944a4..ce5ce56dea 100644 --- a/src/test/ui/borrowck/borrowck-borrow-from-stack-variable.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-from-stack-variable.stderr @@ -1,124 +1,116 @@ error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time - --> $DIR/borrowck-borrow-from-stack-variable.rs:18:22 + --> $DIR/borrowck-borrow-from-stack-variable.rs:18:17 | LL | let bar1 = &mut foo.bar1; - | -------- first mutable borrow occurs here + | ------------- first mutable borrow occurs here LL | let _bar2 = &mut foo.bar1; - | ^^^^^^^^ second mutable borrow occurs here + | ^^^^^^^^^^^^^ second mutable borrow occurs here LL | *bar1; -LL | } - | - first borrow ends here + | ----- first borrow later used here error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-borrow-from-stack-variable.rs:25:18 + --> $DIR/borrowck-borrow-from-stack-variable.rs:25:17 | LL | let bar1 = &mut foo.bar1; - | -------- mutable borrow occurs here + | ------------- mutable borrow occurs here LL | let _bar2 = &foo.bar1; - | ^^^^^^^^ immutable borrow occurs here + | ^^^^^^^^^ immutable borrow occurs here LL | *bar1; -LL | } - | - mutable borrow ends here + | ----- mutable borrow later used here error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-borrow-from-stack-variable.rs:32:22 + --> $DIR/borrowck-borrow-from-stack-variable.rs:32:17 | LL | let bar1 = &foo.bar1; - | -------- immutable borrow occurs here + | --------- immutable borrow occurs here LL | let _bar2 = &mut foo.bar1; - | ^^^^^^^^ mutable borrow occurs here + | ^^^^^^^^^^^^^ mutable borrow occurs here LL | *bar1; -LL | } - | - immutable borrow ends here + | ----- immutable borrow later used here error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time --> $DIR/borrowck-borrow-from-stack-variable.rs:61:21 | LL | let bar1 = &mut foo.bar1; - | -------- first mutable borrow occurs here + | ------------- first mutable borrow occurs here LL | match foo { LL | Foo { bar1: ref mut _bar1, bar2: _ } => {} // | ^^^^^^^^^^^^^ second mutable borrow occurs here ... -LL | } - | - first borrow ends here +LL | *bar1; + | ----- first borrow later used here -error[E0502]: cannot borrow `foo.bar1` as immutable because `foo.bar1.int1` is also borrowed as mutable - --> $DIR/borrowck-borrow-from-stack-variable.rs:70:18 +error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed as mutable + --> $DIR/borrowck-borrow-from-stack-variable.rs:70:17 | LL | let bar1 = &mut foo.bar1.int1; - | ------------- mutable borrow occurs here + | ------------------ mutable borrow occurs here LL | let _foo1 = &foo.bar1; - | ^^^^^^^^ immutable borrow occurs here -... -LL | } - | - mutable borrow ends here + | ^^^^^^^^^ immutable borrow occurs here +LL | let _foo2 = &foo; +LL | *bar1; + | ----- mutable borrow later used here -error[E0502]: cannot borrow `foo` as immutable because `foo.bar1.int1` is also borrowed as mutable - --> $DIR/borrowck-borrow-from-stack-variable.rs:71:18 +error[E0502]: cannot borrow `foo` as immutable because it is also borrowed as mutable + --> $DIR/borrowck-borrow-from-stack-variable.rs:71:17 | LL | let bar1 = &mut foo.bar1.int1; - | ------------- mutable borrow occurs here + | ------------------ mutable borrow occurs here LL | let _foo1 = &foo.bar1; LL | let _foo2 = &foo; - | ^^^ immutable borrow occurs here + | ^^^^ immutable borrow occurs here LL | *bar1; -LL | } - | - mutable borrow ends here + | ----- mutable borrow later used here error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time - --> $DIR/borrowck-borrow-from-stack-variable.rs:78:22 + --> $DIR/borrowck-borrow-from-stack-variable.rs:78:17 | LL | let bar1 = &mut foo.bar1.int1; - | ------------- first mutable borrow occurs here + | ------------------ first mutable borrow occurs here LL | let _foo1 = &mut foo.bar1; - | ^^^^^^^^ second mutable borrow occurs here + | ^^^^^^^^^^^^^ second mutable borrow occurs here LL | *bar1; -LL | } - | - first borrow ends here + | ----- first borrow later used here error[E0499]: cannot borrow `foo` as mutable more than once at a time - --> $DIR/borrowck-borrow-from-stack-variable.rs:85:22 + --> $DIR/borrowck-borrow-from-stack-variable.rs:85:17 | LL | let bar1 = &mut foo.bar1.int1; - | ------------- first mutable borrow occurs here + | ------------------ first mutable borrow occurs here LL | let _foo2 = &mut foo; - | ^^^ second mutable borrow occurs here + | ^^^^^^^^ second mutable borrow occurs here LL | *bar1; -LL | } - | - first borrow ends here + | ----- first borrow later used here -error[E0502]: cannot borrow `foo.bar1` as mutable because `foo.bar1.int1` is also borrowed as immutable - --> $DIR/borrowck-borrow-from-stack-variable.rs:92:22 +error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as immutable + --> $DIR/borrowck-borrow-from-stack-variable.rs:92:17 | LL | let bar1 = &foo.bar1.int1; - | ------------- immutable borrow occurs here + | -------------- immutable borrow occurs here LL | let _foo1 = &mut foo.bar1; - | ^^^^^^^^ mutable borrow occurs here + | ^^^^^^^^^^^^^ mutable borrow occurs here LL | *bar1; -LL | } - | - immutable borrow ends here + | ----- immutable borrow later used here -error[E0502]: cannot borrow `foo` as mutable because `foo.bar1.int1` is also borrowed as immutable - --> $DIR/borrowck-borrow-from-stack-variable.rs:99:22 +error[E0502]: cannot borrow `foo` as mutable because it is also borrowed as immutable + --> $DIR/borrowck-borrow-from-stack-variable.rs:99:17 | LL | let bar1 = &foo.bar1.int1; - | ------------- immutable borrow occurs here + | -------------- immutable borrow occurs here LL | let _foo2 = &mut foo; - | ^^^ mutable borrow occurs here + | ^^^^^^^^ mutable borrow occurs here LL | *bar1; -LL | } - | - immutable borrow ends here + | ----- immutable borrow later used here -error[E0596]: cannot borrow field `foo.bar1` of immutable binding as mutable - --> $DIR/borrowck-borrow-from-stack-variable.rs:120:21 +error[E0596]: cannot borrow `foo.bar1` as mutable, as `foo` is not declared as mutable + --> $DIR/borrowck-borrow-from-stack-variable.rs:120:16 | LL | let foo = make_foo(); - | --- help: make this binding mutable: `mut foo` + | --- help: consider changing this to be mutable: `mut foo` LL | let bar1 = &mut foo.bar1; - | ^^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^^^^^ cannot borrow as mutable error: aborting due to 11 previous errors -Some errors occurred: E0499, E0502, E0596. +Some errors have detailed explanations: E0499, E0502, E0596. For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-borrow-from-temporary.nll.stderr b/src/test/ui/borrowck/borrowck-borrow-from-temporary.nll.stderr deleted file mode 100644 index 71bf052c93..0000000000 --- a/src/test/ui/borrowck/borrowck-borrow-from-temporary.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0515]: cannot return value referencing temporary value - --> $DIR/borrowck-borrow-from-temporary.rs:10:5 - | -LL | let &Foo(ref x) = &id(Foo(3)); - | ---------- temporary value created here -LL | x - | ^ returns a value referencing data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/borrowck/borrowck-borrow-from-temporary.rs b/src/test/ui/borrowck/borrowck-borrow-from-temporary.rs index e7ca1a90f8..92f3ffd57a 100644 --- a/src/test/ui/borrowck/borrowck-borrow-from-temporary.rs +++ b/src/test/ui/borrowck/borrowck-borrow-from-temporary.rs @@ -6,8 +6,8 @@ fn id(x: T) -> T { x } struct Foo(isize); fn foo<'a>() -> &'a isize { - let &Foo(ref x) = &id(Foo(3)); //~ ERROR borrowed value does not live long enough - x + let &Foo(ref x) = &id(Foo(3)); + x //~ ERROR cannot return value referencing temporary value } pub fn main() { diff --git a/src/test/ui/borrowck/borrowck-borrow-from-temporary.stderr b/src/test/ui/borrowck/borrowck-borrow-from-temporary.stderr index 6f101f690c..71bf052c93 100644 --- a/src/test/ui/borrowck/borrowck-borrow-from-temporary.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-from-temporary.stderr @@ -1,18 +1,11 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/borrowck-borrow-from-temporary.rs:9:24 +error[E0515]: cannot return value referencing temporary value + --> $DIR/borrowck-borrow-from-temporary.rs:10:5 | LL | let &Foo(ref x) = &id(Foo(3)); - | ^^^^^^^^^^ temporary value does not live long enough + | ---------- temporary value created here LL | x -LL | } - | - temporary value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 8:8... - --> $DIR/borrowck-borrow-from-temporary.rs:8:8 - | -LL | fn foo<'a>() -> &'a isize { - | ^^ + | ^ returns a value referencing data owned by the current function error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.nll.stderr b/src/test/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.nll.stderr deleted file mode 100644 index 7d7e305a31..0000000000 --- a/src/test/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0596]: cannot borrow `*a` as mutable, as `a` is not declared as mutable - --> $DIR/borrowck-borrow-immut-deref-of-box-as-mut.rs:12:5 - | -LL | let a: Box<_> = box A; - | - help: consider changing this to be mutable: `mut a` -LL | a.foo(); - | ^ cannot borrow as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.rs b/src/test/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.rs index 8d528182c0..bc820ee9f9 100644 --- a/src/test/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.rs +++ b/src/test/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.rs @@ -10,5 +10,5 @@ impl A { pub fn main() { let a: Box<_> = box A; a.foo(); - //~^ ERROR cannot borrow immutable `Box` content `*a` as mutable + //~^ ERROR cannot borrow `*a` as mutable, as `a` is not declared as mutable [E0596] } diff --git a/src/test/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.stderr b/src/test/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.stderr index 2c989b2957..7d7e305a31 100644 --- a/src/test/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.stderr @@ -1,8 +1,8 @@ -error[E0596]: cannot borrow immutable `Box` content `*a` as mutable +error[E0596]: cannot borrow `*a` as mutable, as `a` is not declared as mutable --> $DIR/borrowck-borrow-immut-deref-of-box-as-mut.rs:12:5 | LL | let a: Box<_> = box A; - | - help: make this binding mutable: `mut a` + | - help: consider changing this to be mutable: `mut a` LL | a.foo(); | ^ cannot borrow as mutable diff --git a/src/test/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.nll.stderr b/src/test/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.nll.stderr deleted file mode 100644 index 7c1c063d26..0000000000 --- a/src/test/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.nll.stderr +++ /dev/null @@ -1,31 +0,0 @@ -error[E0594]: cannot assign to `**t1` which is behind a `&` reference - --> $DIR/borrowck-borrow-mut-base-ptr-in-aliasable-loc.rs:9:5 - | -LL | let t1 = t0; - | -- help: consider changing this to be a mutable reference: `&mut &mut isize` -LL | let p: &isize = &**t0; -LL | **t1 = 22; - | ^^^^^^^^^ `t1` is a `&` reference, so the data it refers to cannot be written - -error[E0502]: cannot borrow `**t0` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-borrow-mut-base-ptr-in-aliasable-loc.rs:14:21 - | -LL | let t1 = &mut *t0; - | -------- mutable borrow occurs here -LL | let p: &isize = &**t0; - | ^^^^^ immutable borrow occurs here -LL | **t1 = 22; - | --------- mutable borrow later used here - -error[E0596]: cannot borrow `**t0` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-borrow-mut-base-ptr-in-aliasable-loc.rs:19:26 - | -LL | fn foo4(t0: & &mut isize) { - | ------------ help: consider changing this to be a mutable reference: `&mut &mut isize` -LL | let x: &mut isize = &mut **t0; - | ^^^^^^^^^ `t0` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error: aborting due to 3 previous errors - -Some errors occurred: E0502, E0594, E0596. -For more information about an error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.stderr b/src/test/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.stderr index 709a797edc..8115e3150f 100644 --- a/src/test/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.stderr @@ -1,29 +1,31 @@ -error[E0389]: cannot assign to data in a `&` reference +error[E0594]: cannot assign to `**t1` which is behind a `&` reference --> $DIR/borrowck-borrow-mut-base-ptr-in-aliasable-loc.rs:9:5 | +LL | let t1 = t0; + | -- help: consider changing this to be a mutable reference: `&mut &mut isize` +LL | let p: &isize = &**t0; LL | **t1 = 22; - | ^^^^^^^^^ assignment into an immutable reference + | ^^^^^^^^^ `t1` is a `&` reference, so the data it refers to cannot be written -error[E0502]: cannot borrow `**t0` as immutable because `*t0` is also borrowed as mutable - --> $DIR/borrowck-borrow-mut-base-ptr-in-aliasable-loc.rs:14:22 +error[E0502]: cannot borrow `**t0` as immutable because it is also borrowed as mutable + --> $DIR/borrowck-borrow-mut-base-ptr-in-aliasable-loc.rs:14:21 | LL | let t1 = &mut *t0; - | --- mutable borrow occurs here + | -------- mutable borrow occurs here LL | let p: &isize = &**t0; - | ^^^^ immutable borrow occurs here + | ^^^^^ immutable borrow occurs here LL | **t1 = 22; -LL | } - | - mutable borrow ends here + | --------- mutable borrow later used here -error[E0389]: cannot borrow data mutably in a `&` reference - --> $DIR/borrowck-borrow-mut-base-ptr-in-aliasable-loc.rs:19:31 +error[E0596]: cannot borrow `**t0` as mutable, as it is behind a `&` reference + --> $DIR/borrowck-borrow-mut-base-ptr-in-aliasable-loc.rs:19:26 | LL | fn foo4(t0: & &mut isize) { - | ------------ use `&mut &mut isize` here to make mutable + | ------------ help: consider changing this to be a mutable reference: `&mut &mut isize` LL | let x: &mut isize = &mut **t0; - | ^^^^ assignment into an immutable reference + | ^^^^^^^^^ `t0` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to 3 previous errors -Some errors occurred: E0389, E0502. -For more information about an error, try `rustc --explain E0389`. +Some errors have detailed explanations: E0502, E0596. +For more information about an error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.nll.stderr b/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.nll.stderr deleted file mode 100644 index fa0ae318e7..0000000000 --- a/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0499]: cannot borrow `*x` as mutable more than once at a time - --> $DIR/borrowck-borrow-mut-object-twice.rs:13:5 - | -LL | let y = x.f1(); - | - first mutable borrow occurs here -LL | x.f2(); - | ^ second mutable borrow occurs here -LL | y.use_ref(); - | - first borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.stderr b/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.stderr index 1b64ad5756..fa0ae318e7 100644 --- a/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.stderr @@ -6,8 +6,7 @@ LL | let y = x.f1(); LL | x.f2(); | ^ second mutable borrow occurs here LL | y.use_ref(); -LL | } - | - first borrow ends here + | - first borrow later used here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.nll.stderr b/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.nll.stderr deleted file mode 100644 index 4fc320c505..0000000000 --- a/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.nll.stderr +++ /dev/null @@ -1,88 +0,0 @@ -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:47:19 - | -LL | let __isize = &mut x.y; - | ^^^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:51:19 - | -LL | let __isize = &mut x.y; - | ^^^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:59:5 - | -LL | &mut x.y - | ^^^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:63:5 - | -LL | &mut x.y - | ^^^^^^^^ cannot borrow as mutable - -error[E0594]: cannot assign to data in a `&` reference - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:67:5 - | -LL | x.y = 3; - | ^^^^^^^ cannot assign - -error[E0594]: cannot assign to data in a `&` reference - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:71:5 - | -LL | x.y = 3; - | ^^^^^^^ cannot assign - -error[E0594]: cannot assign to data in a `&` reference - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:75:5 - | -LL | x.y = 3; - | ^^^^^^^ cannot assign - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:83:5 - | -LL | x.set(0, 0); - | ^ cannot borrow as mutable - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:87:5 - | -LL | x.set(0, 0); - | ^ cannot borrow as mutable - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:95:5 - | -LL | x.y_mut() - | ^ cannot borrow as mutable - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:99:5 - | -LL | x.y_mut() - | ^ cannot borrow as mutable - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:103:6 - | -LL | *x.y_mut() = 3; - | ^ cannot borrow as mutable - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:107:6 - | -LL | *x.y_mut() = 3; - | ^ cannot borrow as mutable - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:111:6 - | -LL | *x.y_mut() = 3; - | ^ cannot borrow as mutable - -error: aborting due to 14 previous errors - -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. diff --git a/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.stderr b/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.stderr index 2fe1461a30..dc52685363 100644 --- a/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.stderr @@ -1,82 +1,82 @@ -error[E0596]: cannot borrow field of immutable binding as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:47:24 +error[E0596]: cannot borrow data in a `&` reference as mutable + --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:47:19 | LL | let __isize = &mut x.y; - | ^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^ cannot borrow as mutable -error[E0596]: cannot borrow field of immutable binding as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:51:24 +error[E0596]: cannot borrow data in a `&` reference as mutable + --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:51:19 | LL | let __isize = &mut x.y; - | ^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^ cannot borrow as mutable -error[E0596]: cannot borrow field of immutable binding as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:59:10 +error[E0596]: cannot borrow data in a `&` reference as mutable + --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:59:5 | LL | &mut x.y - | ^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^ cannot borrow as mutable -error[E0596]: cannot borrow field of immutable binding as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:63:10 +error[E0596]: cannot borrow data in a `&` reference as mutable + --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:63:5 | LL | &mut x.y - | ^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^ cannot borrow as mutable -error[E0594]: cannot assign to field of immutable binding +error[E0594]: cannot assign to data in a `&` reference --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:67:5 | LL | x.y = 3; - | ^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^ cannot assign -error[E0594]: cannot assign to field of immutable binding +error[E0594]: cannot assign to data in a `&` reference --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:71:5 | LL | x.y = 3; - | ^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^ cannot assign -error[E0594]: cannot assign to field of immutable binding +error[E0594]: cannot assign to data in a `&` reference --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:75:5 | LL | x.y = 3; - | ^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^ cannot assign -error[E0596]: cannot borrow immutable borrowed content as mutable +error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:83:5 | LL | x.set(0, 0); | ^ cannot borrow as mutable -error[E0596]: cannot borrow immutable borrowed content as mutable +error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:87:5 | LL | x.set(0, 0); | ^ cannot borrow as mutable -error[E0596]: cannot borrow immutable borrowed content as mutable +error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:95:5 | LL | x.y_mut() | ^ cannot borrow as mutable -error[E0596]: cannot borrow immutable borrowed content as mutable +error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:99:5 | LL | x.y_mut() | ^ cannot borrow as mutable -error[E0596]: cannot borrow immutable borrowed content as mutable +error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:103:6 | LL | *x.y_mut() = 3; | ^ cannot borrow as mutable -error[E0596]: cannot borrow immutable borrowed content as mutable +error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:107:6 | LL | *x.y_mut() = 3; | ^ cannot borrow as mutable -error[E0596]: cannot borrow immutable borrowed content as mutable +error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:111:6 | LL | *x.y_mut() = 3; @@ -84,5 +84,4 @@ LL | *x.y_mut() = 3; error: aborting due to 14 previous errors -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.nll.stderr b/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.nll.stderr deleted file mode 100644 index cc4d91a58e..0000000000 --- a/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.nll.stderr +++ /dev/null @@ -1,46 +0,0 @@ -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/borrowck-borrow-overloaded-deref.rs:23:19 - | -LL | let __isize = &mut *x; - | ^^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/borrowck-borrow-overloaded-deref.rs:27:19 - | -LL | let __isize = &mut *x; - | ^^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/borrowck-borrow-overloaded-deref.rs:35:5 - | -LL | &mut **x - | ^^^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/borrowck-borrow-overloaded-deref.rs:39:5 - | -LL | &mut **x - | ^^^^^^^^ cannot borrow as mutable - -error[E0594]: cannot assign to data in a `&` reference - --> $DIR/borrowck-borrow-overloaded-deref.rs:43:5 - | -LL | *x = 3; - | ^^^^^^ cannot assign - -error[E0594]: cannot assign to data in a `&` reference - --> $DIR/borrowck-borrow-overloaded-deref.rs:47:5 - | -LL | **x = 3; - | ^^^^^^^ cannot assign - -error[E0594]: cannot assign to data in a `&` reference - --> $DIR/borrowck-borrow-overloaded-deref.rs:51:5 - | -LL | **x = 3; - | ^^^^^^^ cannot assign - -error: aborting due to 7 previous errors - -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. diff --git a/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.stderr b/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.stderr index fb79ccb701..1755b22f59 100644 --- a/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.stderr @@ -1,46 +1,45 @@ -error[E0596]: cannot borrow immutable borrowed content as mutable - --> $DIR/borrowck-borrow-overloaded-deref.rs:23:24 +error[E0596]: cannot borrow data in a `&` reference as mutable + --> $DIR/borrowck-borrow-overloaded-deref.rs:23:19 | LL | let __isize = &mut *x; - | ^^ cannot borrow as mutable + | ^^^^^^^ cannot borrow as mutable -error[E0596]: cannot borrow immutable borrowed content as mutable - --> $DIR/borrowck-borrow-overloaded-deref.rs:27:24 +error[E0596]: cannot borrow data in a `&` reference as mutable + --> $DIR/borrowck-borrow-overloaded-deref.rs:27:19 | LL | let __isize = &mut *x; - | ^^ cannot borrow as mutable + | ^^^^^^^ cannot borrow as mutable -error[E0596]: cannot borrow immutable borrowed content as mutable - --> $DIR/borrowck-borrow-overloaded-deref.rs:35:10 +error[E0596]: cannot borrow data in a `&` reference as mutable + --> $DIR/borrowck-borrow-overloaded-deref.rs:35:5 | LL | &mut **x - | ^^^ cannot borrow as mutable + | ^^^^^^^^ cannot borrow as mutable -error[E0596]: cannot borrow immutable borrowed content as mutable - --> $DIR/borrowck-borrow-overloaded-deref.rs:39:10 +error[E0596]: cannot borrow data in a `&` reference as mutable + --> $DIR/borrowck-borrow-overloaded-deref.rs:39:5 | LL | &mut **x - | ^^^ cannot borrow as mutable + | ^^^^^^^^ cannot borrow as mutable -error[E0594]: cannot assign to immutable borrowed content +error[E0594]: cannot assign to data in a `&` reference --> $DIR/borrowck-borrow-overloaded-deref.rs:43:5 | LL | *x = 3; - | ^^^^^^ cannot borrow as mutable + | ^^^^^^ cannot assign -error[E0594]: cannot assign to immutable borrowed content +error[E0594]: cannot assign to data in a `&` reference --> $DIR/borrowck-borrow-overloaded-deref.rs:47:5 | LL | **x = 3; - | ^^^^^^^ cannot borrow as mutable + | ^^^^^^^ cannot assign -error[E0594]: cannot assign to immutable borrowed content +error[E0594]: cannot assign to data in a `&` reference --> $DIR/borrowck-borrow-overloaded-deref.rs:51:5 | LL | **x = 3; - | ^^^^^^^ cannot borrow as mutable + | ^^^^^^^ cannot assign error: aborting due to 7 previous errors -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.nll.stderr b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.nll.stderr deleted file mode 100644 index 1dd18c12fc..0000000000 --- a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/borrowck-borrowed-uniq-rvalue-2.rs:20:20 - | -LL | let x = defer(&vec!["Goodbye", "world!"]); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - temporary value is freed at the end of this statement - | | - | creates a temporary which is freed while still in use -LL | x.x[0]; - | ------ borrow later used here - | - = note: consider using a `let` binding to create a longer lived value - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.rs b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.rs index 6e943ffabe..e384aacb71 100644 --- a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.rs +++ b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.rs @@ -17,6 +17,6 @@ fn defer<'r>(x: &'r [&'r str]) -> Defer<'r> { } fn main() { - let x = defer(&vec!["Goodbye", "world!"]); //~ ERROR borrowed value does not live long enough + let x = defer(&vec!["Goodbye", "world!"]); //~ ERROR temporary value dropped while borrowed x.x[0]; } diff --git a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr index d17cf8a6fa..1dd18c12fc 100644 --- a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr +++ b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr @@ -1,17 +1,16 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/borrowck-borrowed-uniq-rvalue-2.rs:20:20 | LL | let x = defer(&vec!["Goodbye", "world!"]); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - temporary value dropped here while still borrowed + | ^^^^^^^^^^^^^^^^^^^^^^^^^ - temporary value is freed at the end of this statement | | - | temporary value does not live long enough + | creates a temporary which is freed while still in use LL | x.x[0]; -LL | } - | - temporary value needs to live until here + | ------ borrow later used here | - = note: consider using a `let` binding to increase its lifetime + = note: consider using a `let` binding to create a longer lived value = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.nll.stderr b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.nll.stderr deleted file mode 100644 index c91a4377b4..0000000000 --- a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/borrowck-borrowed-uniq-rvalue.rs:10:28 - | -LL | buggy_map.insert(42, &*Box::new(1)); - | ^^^^^^^^^^^ - temporary value is freed at the end of this statement - | | - | creates a temporary which is freed while still in use -... -LL | buggy_map.insert(43, &*tmp); - | --------- borrow later used here - | - = note: consider using a `let` binding to create a longer lived value - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.rs b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.rs index 88bd106d6f..a78c66f47c 100644 --- a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.rs +++ b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.rs @@ -7,7 +7,7 @@ use std::collections::HashMap; fn main() { let tmp: Box<_>; let mut buggy_map: HashMap = HashMap::new(); - buggy_map.insert(42, &*Box::new(1)); //~ ERROR borrowed value does not live long enough + buggy_map.insert(42, &*Box::new(1)); //~ ERROR temporary value dropped while borrowed // but it is ok if we use a temporary tmp = box 2; diff --git a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.stderr b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.stderr index 32a86562da..c91a4377b4 100644 --- a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.stderr +++ b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.stderr @@ -1,16 +1,16 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/borrowck-borrowed-uniq-rvalue.rs:10:27 +error[E0716]: temporary value dropped while borrowed + --> $DIR/borrowck-borrowed-uniq-rvalue.rs:10:28 | LL | buggy_map.insert(42, &*Box::new(1)); - | ^^^^^^^^^^^^ - borrowed value dropped here while still borrowed - | | - | borrowed value does not live long enough + | ^^^^^^^^^^^ - temporary value is freed at the end of this statement + | | + | creates a temporary which is freed while still in use ... -LL | } - | - borrowed value needs to live until here +LL | buggy_map.insert(43, &*tmp); + | --------- borrow later used here | - = note: consider using a `let` binding to increase its lifetime + = note: consider using a `let` binding to create a longer lived value error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/borrowck/borrowck-box-insensitivity.ast.stderr b/src/test/ui/borrowck/borrowck-box-insensitivity.ast.stderr deleted file mode 100644 index 60c8b33ba1..0000000000 --- a/src/test/ui/borrowck/borrowck-box-insensitivity.ast.stderr +++ /dev/null @@ -1,165 +0,0 @@ -error[E0382]: use of moved value: `a` - --> $DIR/borrowck-box-insensitivity.rs:37:9 - | -LL | let _x = a.x; - | -- value moved here -LL | -LL | let _y = a.y; - | ^^ value used here after move - | - = note: move occurs because `a.x` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `a` - --> $DIR/borrowck-box-insensitivity.rs:46:9 - | -LL | let _x = a.x; - | -- value moved here -LL | -LL | let _y = a.y; - | ^^ value used here after move - | - = note: move occurs because `a.x` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `a` - --> $DIR/borrowck-box-insensitivity.rs:55:15 - | -LL | let _x = a.x; - | -- value moved here -LL | -LL | let _y = &a.y; - | ^^^ value used here after move - | - = note: move occurs because `a.x` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0505]: cannot move out of `a.y` because it is borrowed - --> $DIR/borrowck-box-insensitivity.rs:63:9 - | -LL | let _x = &a.x; - | --- borrow of `a.x` occurs here -LL | let _y = a.y; - | ^^ move out of `a.y` occurs here - -error[E0503]: cannot use `a.y` because it was mutably borrowed - --> $DIR/borrowck-box-insensitivity.rs:71:9 - | -LL | let _x = &mut a.x; - | --- borrow of `a.x` occurs here -LL | let _y = a.y; - | ^^ use of borrowed `a.x` - -error[E0505]: cannot move out of `a.y` because it is borrowed - --> $DIR/borrowck-box-insensitivity.rs:77:9 - | -LL | let _x = &mut a.x; - | --- borrow of `a.x` occurs here -LL | let _y = a.y; - | ^^ move out of `a.y` occurs here - -error[E0502]: cannot borrow `a` (via `a.y`) as immutable because `a` is also borrowed as mutable (via `a.x`) - --> $DIR/borrowck-box-insensitivity.rs:85:15 - | -LL | let _x = &mut a.x; - | --- mutable borrow occurs here (via `a.x`) -LL | let _y = &a.y; - | ^^^ immutable borrow of `a.y` -- which overlaps with `a.x` -- occurs here -... -LL | } - | - mutable borrow ends here - -error[E0502]: cannot borrow `a` (via `a.y`) as mutable because `a` is also borrowed as immutable (via `a.x`) - --> $DIR/borrowck-box-insensitivity.rs:92:19 - | -LL | let _x = &a.x; - | --- immutable borrow occurs here (via `a.x`) -LL | let _y = &mut a.y; - | ^^^ mutable borrow of `a.y` -- which overlaps with `a.x` -- occurs here -... -LL | } - | - immutable borrow ends here - -error[E0382]: use of collaterally moved value: `a.y` - --> $DIR/borrowck-box-insensitivity.rs:100:9 - | -LL | let _x = a.x.x; - | -- value moved here -LL | -LL | let _y = a.y; - | ^^ value used here after move - | - = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0382]: use of collaterally moved value: `a.y` - --> $DIR/borrowck-box-insensitivity.rs:108:9 - | -LL | let _x = a.x.x; - | -- value moved here -LL | -LL | let _y = a.y; - | ^^ value used here after move - | - = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0382]: use of collaterally moved value: `a.y` - --> $DIR/borrowck-box-insensitivity.rs:116:15 - | -LL | let _x = a.x.x; - | -- value moved here -LL | -LL | let _y = &a.y; - | ^^^ value used here after move - | - = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0505]: cannot move out of `a.y` because it is borrowed - --> $DIR/borrowck-box-insensitivity.rs:124:9 - | -LL | let _x = &a.x.x; - | ----- borrow of `a.x.x` occurs here -LL | -LL | let _y = a.y; - | ^^ move out of `a.y` occurs here - -error[E0503]: cannot use `a.y` because it was mutably borrowed - --> $DIR/borrowck-box-insensitivity.rs:132:9 - | -LL | let _x = &mut a.x.x; - | ----- borrow of `a.x.x` occurs here -LL | let _y = a.y; - | ^^ use of borrowed `a.x.x` - -error[E0505]: cannot move out of `a.y` because it is borrowed - --> $DIR/borrowck-box-insensitivity.rs:138:9 - | -LL | let _x = &mut a.x.x; - | ----- borrow of `a.x.x` occurs here -LL | let _y = a.y; - | ^^ move out of `a.y` occurs here - -error[E0502]: cannot borrow `a.y` as immutable because `a.x.x` is also borrowed as mutable - --> $DIR/borrowck-box-insensitivity.rs:147:15 - | -LL | let _x = &mut a.x.x; - | ----- mutable borrow occurs here -LL | -LL | let _y = &a.y; - | ^^^ immutable borrow occurs here -... -LL | } - | - mutable borrow ends here - -error[E0502]: cannot borrow `a.y` as mutable because `a.x.x` is also borrowed as immutable - --> $DIR/borrowck-box-insensitivity.rs:155:19 - | -LL | let _x = &a.x.x; - | ----- immutable borrow occurs here -LL | -LL | let _y = &mut a.y; - | ^^^ mutable borrow occurs here -... -LL | } - | - immutable borrow ends here - -error: aborting due to 16 previous errors - -Some errors occurred: E0382, E0502, E0503, E0505. -For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-box-insensitivity.mir.stderr b/src/test/ui/borrowck/borrowck-box-insensitivity.mir.stderr deleted file mode 100644 index 0e380e90e7..0000000000 --- a/src/test/ui/borrowck/borrowck-box-insensitivity.mir.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: compilation successful - --> $DIR/borrowck-box-insensitivity.rs:160:1 - | -LL | / fn main() { -LL | | copy_after_move(); -LL | | move_after_move(); -LL | | borrow_after_move(); -... | -LL | | mut_borrow_after_borrow_nested(); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/borrowck/borrowck-box-insensitivity.nll.stderr b/src/test/ui/borrowck/borrowck-box-insensitivity.nll.stderr deleted file mode 100644 index 0e380e90e7..0000000000 --- a/src/test/ui/borrowck/borrowck-box-insensitivity.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: compilation successful - --> $DIR/borrowck-box-insensitivity.rs:160:1 - | -LL | / fn main() { -LL | | copy_after_move(); -LL | | move_after_move(); -LL | | borrow_after_move(); -... | -LL | | mut_borrow_after_borrow_nested(); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/borrowck/borrowck-box-insensitivity.rs b/src/test/ui/borrowck/borrowck-box-sensitivity.rs similarity index 54% rename from src/test/ui/borrowck/borrowck-box-insensitivity.rs rename to src/test/ui/borrowck/borrowck-box-sensitivity.rs index e72048d0ea..e5591f5003 100644 --- a/src/test/ui/borrowck/borrowck-box-insensitivity.rs +++ b/src/test/ui/borrowck/borrowck-box-sensitivity.rs @@ -1,14 +1,9 @@ -// This test is an artifact of the old policy that `Box` should not -// be treated specially by the AST-borrowck. -// -// NLL goes back to treating `Box` specially (namely, knowing that -// it uniquely owns the data it holds). See rust-lang/rfcs#130. - -// revisions: ast mir -//[ast] compile-flags: -Z borrowck=ast -//[mir] compile-flags: -Z borrowck=mir -// ignore-compare-mode-nll -#![feature(box_syntax, rustc_attrs)] +// Test that `Box` is treated specially by borrow checking. This is the case +// because NLL reverted the deicision in rust-lang/rfcs#130. + +// run-pass + +#![feature(box_syntax)] struct A { x: Box, @@ -33,131 +28,101 @@ struct D { fn copy_after_move() { let a: Box<_> = box A { x: box 0, y: 1 }; let _x = a.x; - //[ast]~^ value moved here - let _y = a.y; //[ast]~ ERROR use of moved - //[ast]~^ move occurs because `a.x` has type `std::boxed::Box` - //[ast]~| value used here after move + let _y = a.y; } fn move_after_move() { let a: Box<_> = box B { x: box 0, y: box 1 }; let _x = a.x; - //[ast]~^ value moved here - let _y = a.y; //[ast]~ ERROR use of moved - //[ast]~^ move occurs because `a.x` has type `std::boxed::Box` - //[ast]~| value used here after move + let _y = a.y; } fn borrow_after_move() { let a: Box<_> = box A { x: box 0, y: 1 }; let _x = a.x; - //[ast]~^ value moved here - let _y = &a.y; //[ast]~ ERROR use of moved - //[ast]~^ move occurs because `a.x` has type `std::boxed::Box` - //[ast]~| value used here after move + let _y = &a.y; } fn move_after_borrow() { let a: Box<_> = box B { x: box 0, y: box 1 }; let _x = &a.x; let _y = a.y; - //[ast]~^ ERROR cannot move - //[ast]~| move out of use_imm(_x); } fn copy_after_mut_borrow() { let mut a: Box<_> = box A { x: box 0, y: 1 }; let _x = &mut a.x; - let _y = a.y; //[ast]~ ERROR cannot use + let _y = a.y; use_mut(_x); } fn move_after_mut_borrow() { let mut a: Box<_> = box B { x: box 0, y: box 1 }; let _x = &mut a.x; let _y = a.y; - //[ast]~^ ERROR cannot move - //[ast]~| move out of use_mut(_x); } fn borrow_after_mut_borrow() { let mut a: Box<_> = box A { x: box 0, y: 1 }; let _x = &mut a.x; - let _y = &a.y; //[ast]~ ERROR cannot borrow - //[ast]~^ immutable borrow of `a.y` -- which overlaps with `a.x` -- occurs here + let _y = &a.y; use_mut(_x); } fn mut_borrow_after_borrow() { let mut a: Box<_> = box A { x: box 0, y: 1 }; let _x = &a.x; - let _y = &mut a.y; //[ast]~ ERROR cannot borrow - //[ast]~^ mutable borrow of `a.y` -- which overlaps with `a.x` -- occurs here + let _y = &mut a.y; use_imm(_x); } fn copy_after_move_nested() { let a: Box<_> = box C { x: box A { x: box 0, y: 1 }, y: 2 }; let _x = a.x.x; - //[ast]~^ value moved here - let _y = a.y; //[ast]~ ERROR use of collaterally moved - //[ast]~| value used here after move + let _y = a.y; } fn move_after_move_nested() { let a: Box<_> = box D { x: box A { x: box 0, y: 1 }, y: box 2 }; let _x = a.x.x; - //[ast]~^ value moved here - let _y = a.y; //[ast]~ ERROR use of collaterally moved - //[ast]~| value used here after move + let _y = a.y; } fn borrow_after_move_nested() { let a: Box<_> = box C { x: box A { x: box 0, y: 1 }, y: 2 }; let _x = a.x.x; - //[ast]~^ value moved here - let _y = &a.y; //[ast]~ ERROR use of collaterally moved - //[ast]~| value used here after move + let _y = &a.y; } fn move_after_borrow_nested() { let a: Box<_> = box D { x: box A { x: box 0, y: 1 }, y: box 2 }; let _x = &a.x.x; - //[ast]~^ borrow of `a.x.x` occurs here let _y = a.y; - //[ast]~^ ERROR cannot move - //[ast]~| move out of use_imm(_x); } fn copy_after_mut_borrow_nested() { let mut a: Box<_> = box C { x: box A { x: box 0, y: 1 }, y: 2 }; let _x = &mut a.x.x; - let _y = a.y; //[ast]~ ERROR cannot use + let _y = a.y; use_mut(_x); } fn move_after_mut_borrow_nested() { let mut a: Box<_> = box D { x: box A { x: box 0, y: 1 }, y: box 2 }; let _x = &mut a.x.x; let _y = a.y; - //[ast]~^ ERROR cannot move - //[ast]~| move out of use_mut(_x); } fn borrow_after_mut_borrow_nested() { let mut a: Box<_> = box C { x: box A { x: box 0, y: 1 }, y: 2 }; let _x = &mut a.x.x; - //[ast]~^ mutable borrow occurs here - let _y = &a.y; //[ast]~ ERROR cannot borrow - //[ast]~^ immutable borrow occurs here + let _y = &a.y; use_mut(_x); } fn mut_borrow_after_borrow_nested() { let mut a: Box<_> = box C { x: box A { x: box 0, y: 1 }, y: 2 }; let _x = &a.x.x; - //[ast]~^ immutable borrow occurs here - let _y = &mut a.y; //[ast]~ ERROR cannot borrow - //[ast]~^ mutable borrow occurs here + let _y = &mut a.y; use_imm(_x); } -#[rustc_error] -fn main() { //[mir]~ ERROR compilation successful + +fn main() { copy_after_move(); move_after_move(); borrow_after_move(); diff --git a/src/test/ui/borrowck/borrowck-break-uninit-2.nll.stderr b/src/test/ui/borrowck/borrowck-break-uninit-2.nll.stderr deleted file mode 100644 index e40d8d9dfc..0000000000 --- a/src/test/ui/borrowck/borrowck-break-uninit-2.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0381]: borrow of possibly uninitialized variable: `x` - --> $DIR/borrowck-break-uninit-2.rs:9:20 - | -LL | println!("{}", x); - | ^ use of possibly uninitialized `x` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-break-uninit-2.rs b/src/test/ui/borrowck/borrowck-break-uninit-2.rs index 95ccb2e1b9..dad5325cb8 100644 --- a/src/test/ui/borrowck/borrowck-break-uninit-2.rs +++ b/src/test/ui/borrowck/borrowck-break-uninit-2.rs @@ -6,7 +6,7 @@ fn foo() -> isize { x = 0; } - println!("{}", x); //~ ERROR use of possibly uninitialized variable: `x` + println!("{}", x); //~ ERROR borrow of possibly uninitialized variable: `x` return 17; } diff --git a/src/test/ui/borrowck/borrowck-break-uninit-2.stderr b/src/test/ui/borrowck/borrowck-break-uninit-2.stderr index a6c3dfef9e..e40d8d9dfc 100644 --- a/src/test/ui/borrowck/borrowck-break-uninit-2.stderr +++ b/src/test/ui/borrowck/borrowck-break-uninit-2.stderr @@ -1,4 +1,4 @@ -error[E0381]: use of possibly uninitialized variable: `x` +error[E0381]: borrow of possibly uninitialized variable: `x` --> $DIR/borrowck-break-uninit-2.rs:9:20 | LL | println!("{}", x); diff --git a/src/test/ui/borrowck/borrowck-break-uninit.nll.stderr b/src/test/ui/borrowck/borrowck-break-uninit.nll.stderr deleted file mode 100644 index bbf9b9f124..0000000000 --- a/src/test/ui/borrowck/borrowck-break-uninit.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0381]: borrow of possibly uninitialized variable: `x` - --> $DIR/borrowck-break-uninit.rs:9:20 - | -LL | println!("{}", x); - | ^ use of possibly uninitialized `x` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-break-uninit.rs b/src/test/ui/borrowck/borrowck-break-uninit.rs index 827637cfb9..9af02b387d 100644 --- a/src/test/ui/borrowck/borrowck-break-uninit.rs +++ b/src/test/ui/borrowck/borrowck-break-uninit.rs @@ -6,7 +6,7 @@ fn foo() -> isize { x = 0; } - println!("{}", x); //~ ERROR use of possibly uninitialized variable: `x` + println!("{}", x); //~ ERROR borrow of possibly uninitialized variable: `x` return 17; } diff --git a/src/test/ui/borrowck/borrowck-break-uninit.stderr b/src/test/ui/borrowck/borrowck-break-uninit.stderr index dcb024a3e1..bbf9b9f124 100644 --- a/src/test/ui/borrowck/borrowck-break-uninit.stderr +++ b/src/test/ui/borrowck/borrowck-break-uninit.stderr @@ -1,4 +1,4 @@ -error[E0381]: use of possibly uninitialized variable: `x` +error[E0381]: borrow of possibly uninitialized variable: `x` --> $DIR/borrowck-break-uninit.rs:9:20 | LL | println!("{}", x); diff --git a/src/test/ui/borrowck/borrowck-closures-mut-and-imm.ast.nll.stderr b/src/test/ui/borrowck/borrowck-closures-mut-and-imm.ast.nll.stderr deleted file mode 100644 index aac5fdf62a..0000000000 --- a/src/test/ui/borrowck/borrowck-closures-mut-and-imm.ast.nll.stderr +++ /dev/null @@ -1,116 +0,0 @@ -error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-closures-mut-and-imm.rs:21:14 - | -LL | let c1 = || x = 4; - | -- - first borrow occurs due to use of `x` in closure - | | - | mutable borrow occurs here -LL | let c2 = || x * 5; - | ^^ - second borrow occurs due to use of `x` in closure - | | - | immutable borrow occurs here -LL | -LL | drop(c1); - | -- mutable borrow later used here - -error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-closures-mut-and-imm.rs:29:14 - | -LL | let c1 = || set(&mut x); - | -- - first borrow occurs due to use of `x` in closure - | | - | mutable borrow occurs here -LL | let c2 = || get(&x); - | ^^ - second borrow occurs due to use of `x` in closure - | | - | immutable borrow occurs here -LL | -LL | drop(c1); - | -- mutable borrow later used here - -error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-closures-mut-and-imm.rs:37:14 - | -LL | let c1 = || set(&mut x); - | -- - first borrow occurs due to use of `x` in closure - | | - | mutable borrow occurs here -LL | let c2 = || x * 5; - | ^^ - second borrow occurs due to use of `x` in closure - | | - | immutable borrow occurs here -LL | -LL | drop(c1); - | -- mutable borrow later used here - -error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/borrowck-closures-mut-and-imm.rs:45:5 - | -LL | let c2 = || x * 5; - | -- - borrow occurs due to use in closure - | | - | borrow of `x` occurs here -LL | x = 5; - | ^^^^^ assignment to borrowed `x` occurs here -LL | -LL | drop(c2); - | -- borrow later used here - -error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/borrowck-closures-mut-and-imm.rs:53:5 - | -LL | let c1 = || get(&x); - | -- - borrow occurs due to use in closure - | | - | borrow of `x` occurs here -LL | x = 5; - | ^^^^^ assignment to borrowed `x` occurs here -LL | -LL | drop(c1); - | -- borrow later used here - -error[E0506]: cannot assign to `*x` because it is borrowed - --> $DIR/borrowck-closures-mut-and-imm.rs:61:5 - | -LL | let c1 = || get(&*x); - | -- - borrow occurs due to use in closure - | | - | borrow of `*x` occurs here -LL | *x = 5; - | ^^^^^^ assignment to borrowed `*x` occurs here -LL | -LL | drop(c1); - | -- borrow later used here - -error[E0506]: cannot assign to `*x.f` because it is borrowed - --> $DIR/borrowck-closures-mut-and-imm.rs:73:5 - | -LL | let c1 = || get(&*x.f); - | -- - borrow occurs due to use in closure - | | - | borrow of `*x.f` occurs here -LL | *x.f = 5; - | ^^^^^^^^ assignment to borrowed `*x.f` occurs here -LL | -LL | drop(c1); - | -- borrow later used here - -error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-closures-mut-and-imm.rs:85:14 - | -LL | let c1 = || get(&*x.f); - | -- - first borrow occurs due to use of `x` in closure - | | - | immutable borrow occurs here -LL | let c2 = || *x.f = 5; - | ^^ - second borrow occurs due to use of `x` in closure - | | - | mutable borrow occurs here -LL | -LL | drop(c1); - | -- immutable borrow later used here - -error: aborting due to 8 previous errors - -Some errors occurred: E0502, E0506. -For more information about an error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-closures-mut-and-imm.ast.stderr b/src/test/ui/borrowck/borrowck-closures-mut-and-imm.ast.stderr deleted file mode 100644 index d672d0ce05..0000000000 --- a/src/test/ui/borrowck/borrowck-closures-mut-and-imm.ast.stderr +++ /dev/null @@ -1,96 +0,0 @@ -error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-closures-mut-and-imm.rs:21:14 - | -LL | let c1 = || x = 4; - | -- - previous borrow occurs due to use of `x` in closure - | | - | mutable borrow occurs here -LL | let c2 = || x * 5; - | ^^ - borrow occurs due to use of `x` in closure - | | - | immutable borrow occurs here -... -LL | } - | - mutable borrow ends here - -error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-closures-mut-and-imm.rs:29:14 - | -LL | let c1 = || set(&mut x); - | -- - previous borrow occurs due to use of `x` in closure - | | - | mutable borrow occurs here -LL | let c2 = || get(&x); - | ^^ - borrow occurs due to use of `x` in closure - | | - | immutable borrow occurs here -... -LL | } - | - mutable borrow ends here - -error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-closures-mut-and-imm.rs:37:14 - | -LL | let c1 = || set(&mut x); - | -- - previous borrow occurs due to use of `x` in closure - | | - | mutable borrow occurs here -LL | let c2 = || x * 5; - | ^^ - borrow occurs due to use of `x` in closure - | | - | immutable borrow occurs here -... -LL | } - | - mutable borrow ends here - -error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/borrowck-closures-mut-and-imm.rs:45:5 - | -LL | let c2 = || x * 5; - | -- borrow of `x` occurs here -LL | x = 5; - | ^^^^^ assignment to borrowed `x` occurs here - -error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/borrowck-closures-mut-and-imm.rs:53:5 - | -LL | let c1 = || get(&x); - | -- borrow of `x` occurs here -LL | x = 5; - | ^^^^^ assignment to borrowed `x` occurs here - -error[E0506]: cannot assign to `*x` because it is borrowed - --> $DIR/borrowck-closures-mut-and-imm.rs:61:5 - | -LL | let c1 = || get(&*x); - | -- borrow of `*x` occurs here -LL | *x = 5; - | ^^^^^^ assignment to borrowed `*x` occurs here - -error[E0506]: cannot assign to `*x.f` because it is borrowed - --> $DIR/borrowck-closures-mut-and-imm.rs:73:5 - | -LL | let c1 = || get(&*x.f); - | -- borrow of `*x.f` occurs here -LL | *x.f = 5; - | ^^^^^^^^ assignment to borrowed `*x.f` occurs here - -error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-closures-mut-and-imm.rs:85:14 - | -LL | let c1 = || get(&*x.f); - | -- - previous borrow occurs due to use of `x` in closure - | | - | immutable borrow occurs here -LL | let c2 = || *x.f = 5; - | ^^ - borrow occurs due to use of `x` in closure - | | - | mutable borrow occurs here -... -LL | } - | - immutable borrow ends here - -error: aborting due to 8 previous errors - -Some errors occurred: E0502, E0506. -For more information about an error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-closures-mut-and-imm.rs b/src/test/ui/borrowck/borrowck-closures-mut-and-imm.rs index 3a802bcbb3..2dc405ffcd 100644 --- a/src/test/ui/borrowck/borrowck-closures-mut-and-imm.rs +++ b/src/test/ui/borrowck/borrowck-closures-mut-and-imm.rs @@ -1,10 +1,6 @@ // Tests that two closures cannot simultaneously have mutable // and immutable access to the variable. Issue #6801. -// ignore-tidy-linelength -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - #![feature(box_syntax)] fn get(x: &isize) -> isize { @@ -18,48 +14,48 @@ fn set(x: &mut isize) { fn a() { let mut x = 3; let c1 = || x = 4; - let c2 = || x * 5; //[ast]~ ERROR cannot borrow `x` - //[mir]~^ ERROR cannot borrow `x` as immutable because it is also borrowed as mutable + let c2 = || x * 5; + //~^ ERROR cannot borrow `x` as immutable because it is also borrowed as mutable drop(c1); } fn b() { let mut x = 3; let c1 = || set(&mut x); - let c2 = || get(&x); //[ast]~ ERROR cannot borrow `x` - //[mir]~^ ERROR cannot borrow `x` as immutable because it is also borrowed as mutable + let c2 = || get(&x); + //~^ ERROR cannot borrow `x` as immutable because it is also borrowed as mutable drop(c1); } fn c() { let mut x = 3; let c1 = || set(&mut x); - let c2 = || x * 5; //[ast]~ ERROR cannot borrow `x` - //[mir]~^ ERROR cannot borrow `x` as immutable because it is also borrowed as mutable + let c2 = || x * 5; + //~^ ERROR cannot borrow `x` as immutable because it is also borrowed as mutable drop(c1); } fn d() { let mut x = 3; let c2 = || x * 5; - x = 5; //[ast]~ ERROR cannot assign - //[mir]~^ ERROR cannot assign to `x` because it is borrowed + x = 5; + //~^ ERROR cannot assign to `x` because it is borrowed drop(c2); } fn e() { let mut x = 3; let c1 = || get(&x); - x = 5; //[ast]~ ERROR cannot assign - //[mir]~^ ERROR cannot assign to `x` because it is borrowed + x = 5; + //~^ ERROR cannot assign to `x` because it is borrowed drop(c1); } fn f() { let mut x: Box<_> = box 3; let c1 = || get(&*x); - *x = 5; //[ast]~ ERROR cannot assign to `*x` - //[mir]~^ ERROR cannot assign to `*x` because it is borrowed + *x = 5; + //~^ ERROR cannot assign to `*x` because it is borrowed drop(c1); } @@ -70,8 +66,8 @@ fn g() { let mut x: Box<_> = box Foo { f: box 3 }; let c1 = || get(&*x.f); - *x.f = 5; //[ast]~ ERROR cannot assign to `*x.f` - //[mir]~^ ERROR cannot assign to `*x.f` because it is borrowed + *x.f = 5; + //~^ ERROR cannot assign to `*x.f` because it is borrowed drop(c1); } @@ -82,8 +78,8 @@ fn h() { let mut x: Box<_> = box Foo { f: box 3 }; let c1 = || get(&*x.f); - let c2 = || *x.f = 5; //[ast]~ ERROR cannot borrow `x` as mutable - //[mir]~^ ERROR cannot borrow `x` as mutable because it is also borrowed as immutable + let c2 = || *x.f = 5; + //~^ ERROR cannot borrow `x` as mutable because it is also borrowed as immutable drop(c1); } diff --git a/src/test/ui/borrowck/borrowck-closures-mut-and-imm.mir.stderr b/src/test/ui/borrowck/borrowck-closures-mut-and-imm.stderr similarity index 88% rename from src/test/ui/borrowck/borrowck-closures-mut-and-imm.mir.stderr rename to src/test/ui/borrowck/borrowck-closures-mut-and-imm.stderr index aac5fdf62a..edeb21c16d 100644 --- a/src/test/ui/borrowck/borrowck-closures-mut-and-imm.mir.stderr +++ b/src/test/ui/borrowck/borrowck-closures-mut-and-imm.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-closures-mut-and-imm.rs:21:14 + --> $DIR/borrowck-closures-mut-and-imm.rs:17:14 | LL | let c1 = || x = 4; | -- - first borrow occurs due to use of `x` in closure @@ -14,7 +14,7 @@ LL | drop(c1); | -- mutable borrow later used here error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-closures-mut-and-imm.rs:29:14 + --> $DIR/borrowck-closures-mut-and-imm.rs:25:14 | LL | let c1 = || set(&mut x); | -- - first borrow occurs due to use of `x` in closure @@ -29,7 +29,7 @@ LL | drop(c1); | -- mutable borrow later used here error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-closures-mut-and-imm.rs:37:14 + --> $DIR/borrowck-closures-mut-and-imm.rs:33:14 | LL | let c1 = || set(&mut x); | -- - first borrow occurs due to use of `x` in closure @@ -44,7 +44,7 @@ LL | drop(c1); | -- mutable borrow later used here error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/borrowck-closures-mut-and-imm.rs:45:5 + --> $DIR/borrowck-closures-mut-and-imm.rs:41:5 | LL | let c2 = || x * 5; | -- - borrow occurs due to use in closure @@ -57,7 +57,7 @@ LL | drop(c2); | -- borrow later used here error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/borrowck-closures-mut-and-imm.rs:53:5 + --> $DIR/borrowck-closures-mut-and-imm.rs:49:5 | LL | let c1 = || get(&x); | -- - borrow occurs due to use in closure @@ -70,7 +70,7 @@ LL | drop(c1); | -- borrow later used here error[E0506]: cannot assign to `*x` because it is borrowed - --> $DIR/borrowck-closures-mut-and-imm.rs:61:5 + --> $DIR/borrowck-closures-mut-and-imm.rs:57:5 | LL | let c1 = || get(&*x); | -- - borrow occurs due to use in closure @@ -83,7 +83,7 @@ LL | drop(c1); | -- borrow later used here error[E0506]: cannot assign to `*x.f` because it is borrowed - --> $DIR/borrowck-closures-mut-and-imm.rs:73:5 + --> $DIR/borrowck-closures-mut-and-imm.rs:69:5 | LL | let c1 = || get(&*x.f); | -- - borrow occurs due to use in closure @@ -96,7 +96,7 @@ LL | drop(c1); | -- borrow later used here error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-closures-mut-and-imm.rs:85:14 + --> $DIR/borrowck-closures-mut-and-imm.rs:81:14 | LL | let c1 = || get(&*x.f); | -- - first borrow occurs due to use of `x` in closure @@ -112,5 +112,5 @@ LL | drop(c1); error: aborting due to 8 previous errors -Some errors occurred: E0502, E0506. +Some errors have detailed explanations: E0502, E0506. For more information about an error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-closures-mut-of-imm.nll.stderr b/src/test/ui/borrowck/borrowck-closures-mut-of-imm.nll.stderr deleted file mode 100644 index 0064417c57..0000000000 --- a/src/test/ui/borrowck/borrowck-closures-mut-of-imm.nll.stderr +++ /dev/null @@ -1,32 +0,0 @@ -error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-closures-mut-of-imm.rs:13:25 - | -LL | let mut c1 = || set(&mut *x); - | ^^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-closures-mut-of-imm.rs:15:25 - | -LL | let mut c2 = || set(&mut *x); - | ^^^^^^^ cannot borrow as mutable - -error[E0524]: two closures require unique access to `x` at the same time - --> $DIR/borrowck-closures-mut-of-imm.rs:15:18 - | -LL | let mut c1 = || set(&mut *x); - | -- - first borrow occurs due to use of `x` in closure - | | - | first closure is constructed here -LL | -LL | let mut c2 = || set(&mut *x); - | ^^ - second borrow occurs due to use of `x` in closure - | | - | second closure is constructed here -... -LL | c2(); c1(); - | -- first borrow later used here - -error: aborting due to 3 previous errors - -Some errors occurred: E0524, E0596. -For more information about an error, try `rustc --explain E0524`. diff --git a/src/test/ui/borrowck/borrowck-closures-mut-of-imm.stderr b/src/test/ui/borrowck/borrowck-closures-mut-of-imm.stderr index 2f7c6a1a56..3be7d725ed 100644 --- a/src/test/ui/borrowck/borrowck-closures-mut-of-imm.stderr +++ b/src/test/ui/borrowck/borrowck-closures-mut-of-imm.stderr @@ -1,32 +1,31 @@ +error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference + --> $DIR/borrowck-closures-mut-of-imm.rs:13:25 + | +LL | let mut c1 = || set(&mut *x); + | ^^^^^^^ cannot borrow as mutable + +error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference + --> $DIR/borrowck-closures-mut-of-imm.rs:15:25 + | +LL | let mut c2 = || set(&mut *x); + | ^^^^^^^ cannot borrow as mutable + error[E0524]: two closures require unique access to `x` at the same time --> $DIR/borrowck-closures-mut-of-imm.rs:15:18 | LL | let mut c1 = || set(&mut *x); - | -- - previous borrow occurs due to use of `x` in closure + | -- - first borrow occurs due to use of `x` in closure | | | first closure is constructed here LL | LL | let mut c2 = || set(&mut *x); - | ^^ - borrow occurs due to use of `x` in closure + | ^^ - second borrow occurs due to use of `x` in closure | | | second closure is constructed here ... -LL | } - | - borrow from first closure ends here - -error[E0596]: cannot borrow immutable borrowed content `***x` as mutable - --> $DIR/borrowck-closures-mut-of-imm.rs:13:30 - | -LL | let mut c1 = || set(&mut *x); - | ^^ cannot borrow as mutable - -error[E0596]: cannot borrow immutable borrowed content `***x` as mutable - --> $DIR/borrowck-closures-mut-of-imm.rs:15:30 - | -LL | let mut c2 = || set(&mut *x); - | ^^ cannot borrow as mutable +LL | c2(); c1(); + | -- first borrow later used here error: aborting due to 3 previous errors -Some errors occurred: E0524, E0596. -For more information about an error, try `rustc --explain E0524`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/borrowck/borrowck-closures-mut-of-mut.nll.stderr b/src/test/ui/borrowck/borrowck-closures-mut-of-mut.nll.stderr deleted file mode 100644 index 471173e595..0000000000 --- a/src/test/ui/borrowck/borrowck-closures-mut-of-mut.nll.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0524]: two closures require unique access to `x` at the same time - --> $DIR/borrowck-closures-mut-of-mut.rs:14:18 - | -LL | let mut c1 = || set(&mut *x); - | -- - first borrow occurs due to use of `x` in closure - | | - | first closure is constructed here -LL | let mut c2 = || set(&mut *x); - | ^^ - second borrow occurs due to use of `x` in closure - | | - | second closure is constructed here -LL | -LL | c2(); c1(); - | -- first borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0524`. diff --git a/src/test/ui/borrowck/borrowck-closures-mut-of-mut.stderr b/src/test/ui/borrowck/borrowck-closures-mut-of-mut.stderr index 2c5587710a..a174388712 100644 --- a/src/test/ui/borrowck/borrowck-closures-mut-of-mut.stderr +++ b/src/test/ui/borrowck/borrowck-closures-mut-of-mut.stderr @@ -2,17 +2,16 @@ error[E0524]: two closures require unique access to `x` at the same time --> $DIR/borrowck-closures-mut-of-mut.rs:14:18 | LL | let mut c1 = || set(&mut *x); - | -- - previous borrow occurs due to use of `x` in closure + | -- - first borrow occurs due to use of `x` in closure | | | first closure is constructed here LL | let mut c2 = || set(&mut *x); - | ^^ - borrow occurs due to use of `x` in closure + | ^^ - second borrow occurs due to use of `x` in closure | | | second closure is constructed here -... -LL | } - | - borrow from first closure ends here +LL | +LL | c2(); c1(); + | -- first borrow later used here error: aborting due to previous error -For more information about this error, try `rustc --explain E0524`. diff --git a/src/test/ui/borrowck/borrowck-closures-two-mut-fail.nll.stderr b/src/test/ui/borrowck/borrowck-closures-two-mut-fail.nll.stderr deleted file mode 100644 index 07f477d178..0000000000 --- a/src/test/ui/borrowck/borrowck-closures-two-mut-fail.nll.stderr +++ /dev/null @@ -1,75 +0,0 @@ -error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-closures-two-mut-fail.rs:16:24 - | -LL | let c1 = to_fn_mut(|| x = 4); - | -- - first borrow occurs due to use of `x` in closure - | | - | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| x = 5); - | ^^ - second borrow occurs due to use of `x` in closure - | | - | second mutable borrow occurs here -LL | c1; - | -- first borrow later used here - -error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-closures-two-mut-fail.rs:27:24 - | -LL | let c1 = to_fn_mut(|| set(&mut x)); - | -- - first borrow occurs due to use of `x` in closure - | | - | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| set(&mut x)); - | ^^ - second borrow occurs due to use of `x` in closure - | | - | second mutable borrow occurs here -LL | c1; - | -- first borrow later used here - -error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-closures-two-mut-fail.rs:34:24 - | -LL | let c1 = to_fn_mut(|| x = 5); - | -- - first borrow occurs due to use of `x` in closure - | | - | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| set(&mut x)); - | ^^ - second borrow occurs due to use of `x` in closure - | | - | second mutable borrow occurs here -LL | c1; - | -- first borrow later used here - -error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-closures-two-mut-fail.rs:41:24 - | -LL | let c1 = to_fn_mut(|| x = 5); - | -- - first borrow occurs due to use of `x` in closure - | | - | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nested closure) - | ^^ - second borrow occurs due to use of `x` in closure - | | - | second mutable borrow occurs here -LL | -LL | c1; - | -- first borrow later used here - -error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-closures-two-mut-fail.rs:53:24 - | -LL | let c1 = to_fn_mut(|| set(&mut *x.f)); - | -- - first borrow occurs due to use of `x` in closure - | | - | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| set(&mut *x.f)); - | ^^ - second borrow occurs due to use of `x` in closure - | | - | second mutable borrow occurs here -LL | -LL | c1; - | -- first borrow later used here - -error: aborting due to 5 previous errors - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-closures-two-mut-fail.stderr b/src/test/ui/borrowck/borrowck-closures-two-mut-fail.stderr index 7399f8360d..07f477d178 100644 --- a/src/test/ui/borrowck/borrowck-closures-two-mut-fail.stderr +++ b/src/test/ui/borrowck/borrowck-closures-two-mut-fail.stderr @@ -2,76 +2,73 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time --> $DIR/borrowck-closures-two-mut-fail.rs:16:24 | LL | let c1 = to_fn_mut(|| x = 4); - | -- - previous borrow occurs due to use of `x` in closure + | -- - first borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here LL | let c2 = to_fn_mut(|| x = 5); - | ^^ - borrow occurs due to use of `x` in closure + | ^^ - second borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here LL | c1; -LL | } - | - first borrow ends here + | -- first borrow later used here error[E0499]: cannot borrow `x` as mutable more than once at a time --> $DIR/borrowck-closures-two-mut-fail.rs:27:24 | LL | let c1 = to_fn_mut(|| set(&mut x)); - | -- - previous borrow occurs due to use of `x` in closure + | -- - first borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here LL | let c2 = to_fn_mut(|| set(&mut x)); - | ^^ - borrow occurs due to use of `x` in closure + | ^^ - second borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here LL | c1; -LL | } - | - first borrow ends here + | -- first borrow later used here error[E0499]: cannot borrow `x` as mutable more than once at a time --> $DIR/borrowck-closures-two-mut-fail.rs:34:24 | LL | let c1 = to_fn_mut(|| x = 5); - | -- - previous borrow occurs due to use of `x` in closure + | -- - first borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here LL | let c2 = to_fn_mut(|| set(&mut x)); - | ^^ - borrow occurs due to use of `x` in closure + | ^^ - second borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here LL | c1; -LL | } - | - first borrow ends here + | -- first borrow later used here error[E0499]: cannot borrow `x` as mutable more than once at a time --> $DIR/borrowck-closures-two-mut-fail.rs:41:24 | LL | let c1 = to_fn_mut(|| x = 5); - | -- - previous borrow occurs due to use of `x` in closure + | -- - first borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here LL | let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nested closure) - | ^^ - borrow occurs due to use of `x` in closure + | ^^ - second borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -... -LL | } - | - first borrow ends here +LL | +LL | c1; + | -- first borrow later used here error[E0499]: cannot borrow `x` as mutable more than once at a time --> $DIR/borrowck-closures-two-mut-fail.rs:53:24 | LL | let c1 = to_fn_mut(|| set(&mut *x.f)); - | -- - previous borrow occurs due to use of `x` in closure + | -- - first borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here LL | let c2 = to_fn_mut(|| set(&mut *x.f)); - | ^^ - borrow occurs due to use of `x` in closure + | ^^ - second borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -... -LL | } - | - first borrow ends here +LL | +LL | c1; + | -- first borrow later used here error: aborting due to 5 previous errors diff --git a/src/test/ui/borrowck/borrowck-closures-two-mut.rs b/src/test/ui/borrowck/borrowck-closures-two-mut.rs index 1fced982f8..5fe51654f3 100644 --- a/src/test/ui/borrowck/borrowck-closures-two-mut.rs +++ b/src/test/ui/borrowck/borrowck-closures-two-mut.rs @@ -2,8 +2,6 @@ // access to the variable, whether that mutable access be used // for direct assignment or for taking mutable ref. Issue #6801. -// compile-flags: -Z borrowck=compare - #![feature(box_syntax)] fn to_fn_mut(f: F) -> F { f } @@ -12,7 +10,6 @@ fn a() { let mut x = 3; let c1 = to_fn_mut(|| x = 4); let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable more than once - //~| ERROR cannot borrow `x` as mutable more than once drop((c1, c2)); } @@ -24,7 +21,6 @@ fn b() { let mut x = 3; let c1 = to_fn_mut(|| set(&mut x)); let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once - //~| ERROR cannot borrow `x` as mutable more than once drop((c1, c2)); } @@ -32,7 +28,6 @@ fn c() { let mut x = 3; let c1 = to_fn_mut(|| x = 5); let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once - //~| ERROR cannot borrow `x` as mutable more than once drop((c1, c2)); } @@ -41,7 +36,6 @@ fn d() { let c1 = to_fn_mut(|| x = 5); let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nested closure) //~^ ERROR cannot borrow `x` as mutable more than once - //~| ERROR cannot borrow `x` as mutable more than once drop((c1, c2)); } @@ -54,7 +48,6 @@ fn g() { let c1 = to_fn_mut(|| set(&mut *x.f)); let c2 = to_fn_mut(|| set(&mut *x.f)); //~^ ERROR cannot borrow `x` as mutable more than once - //~| ERROR cannot borrow `x` as mutable more than once drop((c1, c2)); } diff --git a/src/test/ui/borrowck/borrowck-closures-two-mut.stderr b/src/test/ui/borrowck/borrowck-closures-two-mut.stderr index e881201ddf..bffb116407 100644 --- a/src/test/ui/borrowck/borrowck-closures-two-mut.stderr +++ b/src/test/ui/borrowck/borrowck-closures-two-mut.stderr @@ -1,80 +1,5 @@ -error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast) - --> $DIR/borrowck-closures-two-mut.rs:14:24 - | -LL | let c1 = to_fn_mut(|| x = 4); - | -- - previous borrow occurs due to use of `x` in closure - | | - | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| x = 5); - | ^^ - borrow occurs due to use of `x` in closure - | | - | second mutable borrow occurs here -... -LL | } - | - first borrow ends here - -error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast) - --> $DIR/borrowck-closures-two-mut.rs:26:24 - | -LL | let c1 = to_fn_mut(|| set(&mut x)); - | -- - previous borrow occurs due to use of `x` in closure - | | - | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| set(&mut x)); - | ^^ - borrow occurs due to use of `x` in closure - | | - | second mutable borrow occurs here -... -LL | } - | - first borrow ends here - -error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast) - --> $DIR/borrowck-closures-two-mut.rs:34:24 - | -LL | let c1 = to_fn_mut(|| x = 5); - | -- - previous borrow occurs due to use of `x` in closure - | | - | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| set(&mut x)); - | ^^ - borrow occurs due to use of `x` in closure - | | - | second mutable borrow occurs here -... -LL | } - | - first borrow ends here - -error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast) - --> $DIR/borrowck-closures-two-mut.rs:42:24 - | -LL | let c1 = to_fn_mut(|| x = 5); - | -- - previous borrow occurs due to use of `x` in closure - | | - | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nested closure) - | ^^ - borrow occurs due to use of `x` in closure - | | - | second mutable borrow occurs here -... -LL | } - | - first borrow ends here - -error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast) - --> $DIR/borrowck-closures-two-mut.rs:55:24 - | -LL | let c1 = to_fn_mut(|| set(&mut *x.f)); - | -- - previous borrow occurs due to use of `x` in closure - | | - | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| set(&mut *x.f)); - | ^^ - borrow occurs due to use of `x` in closure - | | - | second mutable borrow occurs here -... -LL | } - | - first borrow ends here - -error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) - --> $DIR/borrowck-closures-two-mut.rs:14:24 +error[E0499]: cannot borrow `x` as mutable more than once at a time + --> $DIR/borrowck-closures-two-mut.rs:12:24 | LL | let c1 = to_fn_mut(|| x = 4); | -- - first borrow occurs due to use of `x` in closure @@ -84,12 +9,11 @@ LL | let c2 = to_fn_mut(|| x = 5); | ^^ - second borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -LL | LL | drop((c1, c2)); | -- first borrow later used here -error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) - --> $DIR/borrowck-closures-two-mut.rs:26:24 +error[E0499]: cannot borrow `x` as mutable more than once at a time + --> $DIR/borrowck-closures-two-mut.rs:23:24 | LL | let c1 = to_fn_mut(|| set(&mut x)); | -- - first borrow occurs due to use of `x` in closure @@ -99,12 +23,11 @@ LL | let c2 = to_fn_mut(|| set(&mut x)); | ^^ - second borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -LL | LL | drop((c1, c2)); | -- first borrow later used here -error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) - --> $DIR/borrowck-closures-two-mut.rs:34:24 +error[E0499]: cannot borrow `x` as mutable more than once at a time + --> $DIR/borrowck-closures-two-mut.rs:30:24 | LL | let c1 = to_fn_mut(|| x = 5); | -- - first borrow occurs due to use of `x` in closure @@ -114,12 +37,11 @@ LL | let c2 = to_fn_mut(|| set(&mut x)); | ^^ - second borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -LL | LL | drop((c1, c2)); | -- first borrow later used here -error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) - --> $DIR/borrowck-closures-two-mut.rs:42:24 +error[E0499]: cannot borrow `x` as mutable more than once at a time + --> $DIR/borrowck-closures-two-mut.rs:37:24 | LL | let c1 = to_fn_mut(|| x = 5); | -- - first borrow occurs due to use of `x` in closure @@ -129,12 +51,12 @@ LL | let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nes | ^^ - second borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -... +LL | LL | drop((c1, c2)); | -- first borrow later used here -error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir) - --> $DIR/borrowck-closures-two-mut.rs:55:24 +error[E0499]: cannot borrow `x` as mutable more than once at a time + --> $DIR/borrowck-closures-two-mut.rs:49:24 | LL | let c1 = to_fn_mut(|| set(&mut *x.f)); | -- - first borrow occurs due to use of `x` in closure @@ -144,10 +66,10 @@ LL | let c2 = to_fn_mut(|| set(&mut *x.f)); | ^^ - second borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -... +LL | LL | drop((c1, c2)); | -- first borrow later used here -error: aborting due to 10 previous errors +error: aborting due to 5 previous errors For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-closures-unique-imm.nll.stderr b/src/test/ui/borrowck/borrowck-closures-unique-imm.nll.stderr deleted file mode 100644 index b8bbb31a35..0000000000 --- a/src/test/ui/borrowck/borrowck-closures-unique-imm.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0502]: cannot borrow `this.x` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-closures-unique-imm.rs:11:9 - | -LL | let p = &this.x; - | ------- immutable borrow occurs here -LL | &mut this.x; - | ^^^^^^^^^^^ mutable borrow occurs here -LL | p.use_ref(); - | - immutable borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-closures-unique-imm.stderr b/src/test/ui/borrowck/borrowck-closures-unique-imm.stderr index 3cdc9b9d4f..b8bbb31a35 100644 --- a/src/test/ui/borrowck/borrowck-closures-unique-imm.stderr +++ b/src/test/ui/borrowck/borrowck-closures-unique-imm.stderr @@ -1,13 +1,12 @@ error[E0502]: cannot borrow `this.x` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-closures-unique-imm.rs:11:14 + --> $DIR/borrowck-closures-unique-imm.rs:11:9 | LL | let p = &this.x; - | ------ immutable borrow occurs here + | ------- immutable borrow occurs here LL | &mut this.x; - | ^^^^^^ mutable borrow occurs here + | ^^^^^^^^^^^ mutable borrow occurs here LL | p.use_ref(); -LL | }; - | - immutable borrow ends here + | - immutable borrow later used here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-closures-unique.nll.stderr b/src/test/ui/borrowck/borrowck-closures-unique.nll.stderr deleted file mode 100644 index 3106f36ac8..0000000000 --- a/src/test/ui/borrowck/borrowck-closures-unique.nll.stderr +++ /dev/null @@ -1,54 +0,0 @@ -error[E0500]: closure requires unique access to `x` but it is already borrowed - --> $DIR/borrowck-closures-unique.rs:26:14 - | -LL | let c1 = || get(x); - | -- - first borrow occurs due to use of `x` in closure - | | - | borrow occurs here -LL | let c2 = || set(x); - | ^^ - second borrow occurs due to use of `x` in closure - | | - | closure construction occurs here -LL | c1; - | -- first borrow later used here - -error[E0500]: closure requires unique access to `x` but it is already borrowed - --> $DIR/borrowck-closures-unique.rs:32:14 - | -LL | let c1 = || get(x); - | -- - first borrow occurs due to use of `x` in closure - | | - | borrow occurs here -LL | let c2 = || { get(x); set(x); }; - | ^^ - second borrow occurs due to use of `x` in closure - | | - | closure construction occurs here -LL | c1; - | -- first borrow later used here - -error[E0524]: two closures require unique access to `x` at the same time - --> $DIR/borrowck-closures-unique.rs:38:14 - | -LL | let c1 = || set(x); - | -- - first borrow occurs due to use of `x` in closure - | | - | first closure is constructed here -LL | let c2 = || set(x); - | ^^ - second borrow occurs due to use of `x` in closure - | | - | second closure is constructed here -LL | c1; - | -- first borrow later used here - -error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/borrowck-closures-unique.rs:47:38 - | -LL | fn e(x: &'static mut isize) { - | - help: consider changing this to be mutable: `mut x` -LL | let c1 = |y: &'static mut isize| x = y; - | ^^^^^ cannot assign - -error: aborting due to 4 previous errors - -Some errors occurred: E0500, E0524, E0594. -For more information about an error, try `rustc --explain E0500`. diff --git a/src/test/ui/borrowck/borrowck-closures-unique.rs b/src/test/ui/borrowck/borrowck-closures-unique.rs index a4655ebba1..67f91dfa84 100644 --- a/src/test/ui/borrowck/borrowck-closures-unique.rs +++ b/src/test/ui/borrowck/borrowck-closures-unique.rs @@ -39,17 +39,14 @@ fn d(x: &mut isize) { c1; } -// This test was originally encoded in the form shown as `fn f` below. -// However, since MIR-borrowck and thus NLL takes more control-flow information -// into account, it was necessary to change the test in order to witness the -// same (expected) error under both AST-borrowck and NLL. fn e(x: &'static mut isize) { - let c1 = |y: &'static mut isize| x = y; //~ ERROR closure cannot assign to immutable argument + let c1 = |y: &'static mut isize| x = y; + //~^ ERROR cannot assign to `x`, as it is not declared as mutable c1; } fn f(x: &'static mut isize) { - let c1 = || x = panic!(); //~ ERROR closure cannot assign to immutable argument + let c1 = || x = panic!(); // OK assignment is unreachable. c1; } diff --git a/src/test/ui/borrowck/borrowck-closures-unique.stderr b/src/test/ui/borrowck/borrowck-closures-unique.stderr index 238b16f654..9b53af4c01 100644 --- a/src/test/ui/borrowck/borrowck-closures-unique.stderr +++ b/src/test/ui/borrowck/borrowck-closures-unique.stderr @@ -2,68 +2,52 @@ error[E0500]: closure requires unique access to `x` but it is already borrowed --> $DIR/borrowck-closures-unique.rs:26:14 | LL | let c1 = || get(x); - | -- - previous borrow occurs due to use of `x` in closure + | -- - first borrow occurs due to use of `x` in closure | | | borrow occurs here LL | let c2 = || set(x); - | ^^ - borrow occurs due to use of `x` in closure + | ^^ - second borrow occurs due to use of `x` in closure | | | closure construction occurs here LL | c1; -LL | } - | - borrow ends here + | -- first borrow later used here error[E0500]: closure requires unique access to `x` but it is already borrowed --> $DIR/borrowck-closures-unique.rs:32:14 | LL | let c1 = || get(x); - | -- - previous borrow occurs due to use of `x` in closure + | -- - first borrow occurs due to use of `x` in closure | | | borrow occurs here LL | let c2 = || { get(x); set(x); }; - | ^^ - borrow occurs due to use of `x` in closure + | ^^ - second borrow occurs due to use of `x` in closure | | | closure construction occurs here LL | c1; -LL | } - | - borrow ends here + | -- first borrow later used here error[E0524]: two closures require unique access to `x` at the same time --> $DIR/borrowck-closures-unique.rs:38:14 | LL | let c1 = || set(x); - | -- - previous borrow occurs due to use of `x` in closure + | -- - first borrow occurs due to use of `x` in closure | | | first closure is constructed here LL | let c2 = || set(x); - | ^^ - borrow occurs due to use of `x` in closure + | ^^ - second borrow occurs due to use of `x` in closure | | | second closure is constructed here LL | c1; -LL | } - | - borrow from first closure ends here + | -- first borrow later used here -error[E0595]: closure cannot assign to immutable argument `x` - --> $DIR/borrowck-closures-unique.rs:47:14 +error[E0594]: cannot assign to `x`, as it is not declared as mutable + --> $DIR/borrowck-closures-unique.rs:43:38 | +LL | fn e(x: &'static mut isize) { + | - help: consider changing this to be mutable: `mut x` LL | let c1 = |y: &'static mut isize| x = y; - | ^^^^^^^^^^^^^^^^^^^^^^^ cannot borrow mutably -help: consider removing the `&mut`, as it is an immutable binding to a mutable reference - | -LL | x - | ^ - -error[E0595]: closure cannot assign to immutable argument `x` - --> $DIR/borrowck-closures-unique.rs:52:14 - | -LL | let c1 = || x = panic!(); - | ^^ cannot borrow mutably -help: consider removing the `&mut`, as it is an immutable binding to a mutable reference - | -LL | x - | ^ + | ^^^^^ cannot assign -error: aborting due to 5 previous errors +error: aborting due to 4 previous errors -Some errors occurred: E0500, E0524, E0595. -For more information about an error, try `rustc --explain E0500`. +For more information about this error, try `rustc --explain E0500`. diff --git a/src/test/ui/borrowck/borrowck-closures-use-after-free.nll.stderr b/src/test/ui/borrowck/borrowck-closures-use-after-free.nll.stderr deleted file mode 100644 index a6dbcf3607..0000000000 --- a/src/test/ui/borrowck/borrowck-closures-use-after-free.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0502]: cannot borrow `*ptr` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-closures-use-after-free.rs:22:8 - | -LL | let mut test = |foo: &Foo| { - | ----------- mutable borrow occurs here -LL | ptr = box Foo { x: ptr.x + 1 }; - | --- first borrow occurs due to use of `ptr` in closure -LL | }; -LL | test(&*ptr); - | ---- ^^^^^ immutable borrow occurs here - | | - | mutable borrow later used by call - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-closures-use-after-free.stderr b/src/test/ui/borrowck/borrowck-closures-use-after-free.stderr index 9e77d8ce18..a6dbcf3607 100644 --- a/src/test/ui/borrowck/borrowck-closures-use-after-free.stderr +++ b/src/test/ui/borrowck/borrowck-closures-use-after-free.stderr @@ -1,15 +1,15 @@ -error[E0502]: cannot borrow `*ptr` as immutable because `ptr` is also borrowed as mutable - --> $DIR/borrowck-closures-use-after-free.rs:22:9 +error[E0502]: cannot borrow `*ptr` as immutable because it is also borrowed as mutable + --> $DIR/borrowck-closures-use-after-free.rs:22:8 | LL | let mut test = |foo: &Foo| { | ----------- mutable borrow occurs here LL | ptr = box Foo { x: ptr.x + 1 }; - | --- previous borrow occurs due to use of `ptr` in closure + | --- first borrow occurs due to use of `ptr` in closure LL | }; LL | test(&*ptr); - | ^^^^ immutable borrow occurs here -LL | } - | - mutable borrow ends here + | ---- ^^^^^ immutable borrow occurs here + | | + | mutable borrow later used by call error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-consume-unsize-vec.nll.stderr b/src/test/ui/borrowck/borrowck-consume-unsize-vec.nll.stderr deleted file mode 100644 index c69237fa95..0000000000 --- a/src/test/ui/borrowck/borrowck-consume-unsize-vec.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: use of moved value: `b` - --> $DIR/borrowck-consume-unsize-vec.rs:8:13 - | -LL | fn foo(b: Box<[i32;5]>) { - | - move occurs because `b` has type `std::boxed::Box<[i32; 5]>`, which does not implement the `Copy` trait -LL | consume(b); - | - value moved here -LL | consume(b); - | ^ value used here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr b/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr index 02644b82f5..c69237fa95 100644 --- a/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr +++ b/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr @@ -1,12 +1,12 @@ error[E0382]: use of moved value: `b` --> $DIR/borrowck-consume-unsize-vec.rs:8:13 | +LL | fn foo(b: Box<[i32;5]>) { + | - move occurs because `b` has type `std::boxed::Box<[i32; 5]>`, which does not implement the `Copy` trait LL | consume(b); | - value moved here LL | consume(b); | ^ value used here after move - | - = note: move occurs because `b` has type `std::boxed::Box<[i32; 5]>`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-consume-upcast-box.nll.stderr b/src/test/ui/borrowck/borrowck-consume-upcast-box.nll.stderr deleted file mode 100644 index e8194ad694..0000000000 --- a/src/test/ui/borrowck/borrowck-consume-upcast-box.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: use of moved value: `b` - --> $DIR/borrowck-consume-upcast-box.rs:10:13 - | -LL | fn foo(b: Box) { - | - move occurs because `b` has type `std::boxed::Box`, which does not implement the `Copy` trait -LL | consume(b); - | - value moved here -LL | consume(b); - | ^ value used here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr b/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr index 7267a99b86..e8194ad694 100644 --- a/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr +++ b/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr @@ -1,12 +1,12 @@ error[E0382]: use of moved value: `b` --> $DIR/borrowck-consume-upcast-box.rs:10:13 | +LL | fn foo(b: Box) { + | - move occurs because `b` has type `std::boxed::Box`, which does not implement the `Copy` trait LL | consume(b); | - value moved here LL | consume(b); | ^ value used here after move - | - = note: move occurs because `b` has type `std::boxed::Box<(dyn Foo + std::marker::Send + 'static)>`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-describe-lvalue.ast.stderr b/src/test/ui/borrowck/borrowck-describe-lvalue.ast.stderr deleted file mode 100644 index d892db8811..0000000000 --- a/src/test/ui/borrowck/borrowck-describe-lvalue.ast.stderr +++ /dev/null @@ -1,246 +0,0 @@ -error[E0503]: cannot use `f.x` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:43:9 - | -LL | let x = f.x(); - | - borrow of `f` occurs here -LL | f.x; - | ^^^ use of borrowed `f` - -error[E0503]: cannot use `g.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:51:9 - | -LL | let x = g.x(); - | - borrow of `g` occurs here -LL | g.0; - | ^^^ use of borrowed `g` - -error[E0503]: cannot use `h.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:59:9 - | -LL | let x = &mut h.0; - | --- borrow of `h.0` occurs here -LL | h.0; - | ^^^ use of borrowed `h.0` - -error[E0503]: cannot use `e.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:68:20 - | -LL | let x = e.x(); - | - borrow of `e` occurs here -LL | match e { -LL | Baz::X(value) => value - | ^^^^^ use of borrowed `e` - -error[E0503]: cannot use `u.a` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:78:9 - | -LL | let x = &mut u.a; - | --- borrow of `u.a` occurs here -LL | u.a; - | ^^^ use of borrowed `u.a` - -error[E0503]: cannot use `f.x` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:86:9 - | -LL | let x = f.x(); - | - borrow of `*f` occurs here -LL | f.x; - | ^^^ use of borrowed `*f` - -error[E0503]: cannot use `g.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:94:9 - | -LL | let x = g.x(); - | - borrow of `*g` occurs here -LL | g.0; - | ^^^ use of borrowed `*g` - -error[E0503]: cannot use `h.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:102:9 - | -LL | let x = &mut h.0; - | --- borrow of `h.0` occurs here -LL | h.0; - | ^^^ use of borrowed `h.0` - -error[E0503]: cannot use `e.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:111:20 - | -LL | let x = e.x(); - | - borrow of `*e` occurs here -LL | match *e { -LL | Baz::X(value) => value - | ^^^^^ use of borrowed `*e` - -error[E0503]: cannot use `u.a` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:121:9 - | -LL | let x = &mut u.a; - | --- borrow of `u.a` occurs here -LL | u.a; - | ^^^ use of borrowed `u.a` - -error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:130:15 - | -LL | let x = &mut v; - | - borrow of `v` occurs here -LL | match v { -LL | &[x, _, .., _, _] => println!("{}", x), - | ^ use of borrowed `v` - -error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:136:18 - | -LL | let x = &mut v; - | - borrow of `v` occurs here -... -LL | &[_, x, .., _, _] => println!("{}", x), - | ^ use of borrowed `v` - -error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:142:25 - | -LL | let x = &mut v; - | - borrow of `v` occurs here -... -LL | &[_, _, .., x, _] => println!("{}", x), - | ^ use of borrowed `v` - -error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:148:28 - | -LL | let x = &mut v; - | - borrow of `v` occurs here -... -LL | &[_, _, .., _, x] => println!("{}", x), - | ^ use of borrowed `v` - -error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:160:15 - | -LL | let x = &mut v; - | - borrow of `v` occurs here -LL | match v { -LL | &[x..] => println!("{:?}", x), - | ^ use of borrowed `v` - -error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:166:18 - | -LL | let x = &mut v; - | - borrow of `v` occurs here -... -LL | &[_, x..] => println!("{:?}", x), - | ^ use of borrowed `v` - -error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:172:15 - | -LL | let x = &mut v; - | - borrow of `v` occurs here -... -LL | &[x.., _] => println!("{:?}", x), - | ^ use of borrowed `v` - -error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:178:18 - | -LL | let x = &mut v; - | - borrow of `v` occurs here -... -LL | &[_, x.., _] => println!("{:?}", x), - | ^ use of borrowed `v` - -error[E0502]: cannot borrow `e.0` as immutable because `e` is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:192:18 - | -LL | let x = &mut e; - | - mutable borrow occurs here -LL | match e { -LL | E::A(ref ax) => - | ^^^^^^ immutable borrow occurs here -... -LL | } - | - mutable borrow ends here - -error[E0502]: cannot borrow `e.x` as immutable because `e` is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:197:23 - | -LL | let x = &mut e; - | - mutable borrow occurs here -... -LL | E::B { x: ref bx } => - | ^^^^^^ immutable borrow occurs here -... -LL | } - | - mutable borrow ends here - -error[E0502]: cannot borrow `s.y.0` as immutable because `s` is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:211:22 - | -LL | let x = &mut s; - | - mutable borrow occurs here -LL | match s { -LL | S { y: (ref y0, _), .. } => - | ^^^^^^ immutable borrow occurs here -... -LL | } - | - mutable borrow ends here - -error[E0502]: cannot borrow `s.x.y` as immutable because `s` is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:218:28 - | -LL | let x = &mut s; - | - mutable borrow occurs here -... -LL | S { x: F { y: ref x0, .. }, .. } => - | ^^^^^^ immutable borrow occurs here -... -LL | } - | - mutable borrow ends here - -error[E0503]: cannot use `v[..].y` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:261:9 - | -LL | let x = &mut v; - | - borrow of `v` occurs here -LL | v[0].y; - | ^^^^^^ use of borrowed `v` - -error[E0499]: cannot borrow `**x` as mutable more than once at a time - --> $DIR/borrowck-describe-lvalue.rs:285:18 - | -LL | let y = &mut x; - | - first mutable borrow occurs here -LL | &mut x; - | ^ second mutable borrow occurs here -... -LL | }; - | - first borrow ends here - -error[E0499]: cannot borrow `**x` as mutable more than once at a time - --> $DIR/borrowck-describe-lvalue.rs:296:25 - | -LL | let y = &mut x; - | - first mutable borrow occurs here -LL | &mut x; - | ^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here - -error[E0382]: use of moved value: `x` - --> $DIR/borrowck-describe-lvalue.rs:307:22 - | -LL | drop(x); - | - value moved here -LL | drop(x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait - -error: aborting due to 26 previous errors - -Some errors occurred: E0382, E0499, E0502, E0503. -For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-describe-lvalue.mir.stderr b/src/test/ui/borrowck/borrowck-describe-lvalue.nll.stderr similarity index 87% rename from src/test/ui/borrowck/borrowck-describe-lvalue.mir.stderr rename to src/test/ui/borrowck/borrowck-describe-lvalue.nll.stderr index af78340ffd..f1e1ae1883 100644 --- a/src/test/ui/borrowck/borrowck-describe-lvalue.mir.stderr +++ b/src/test/ui/borrowck/borrowck-describe-lvalue.nll.stderr @@ -1,34 +1,31 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-describe-lvalue.rs:285:13 + --> $DIR/borrowck-describe-lvalue.rs:262:13 | LL | let y = &mut x; | ------ first mutable borrow occurs here LL | &mut x; | ^^^^^^ second mutable borrow occurs here -LL | LL | *y = 1; | ------ first borrow later used here error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-describe-lvalue.rs:296:20 + --> $DIR/borrowck-describe-lvalue.rs:272:20 | LL | let y = &mut x; | ------ first mutable borrow occurs here LL | &mut x; | ^^^^^^ second mutable borrow occurs here -LL | LL | *y = 1; | ------ first borrow later used here error: captured variable cannot escape `FnMut` closure body - --> $DIR/borrowck-describe-lvalue.rs:294:16 + --> $DIR/borrowck-describe-lvalue.rs:270:16 | LL | || { | - inferred to be a `FnMut` closure LL | / || { LL | | let y = &mut x; LL | | &mut x; -LL | | LL | | *y = 1; LL | | drop(y); LL | | } @@ -38,96 +35,89 @@ LL | | } = note: ...therefore, they cannot allow references to captured variables to escape error[E0503]: cannot use `f.x` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:43:9 + --> $DIR/borrowck-describe-lvalue.rs:41:9 | LL | let x = f.x(); | - borrow of `f` occurs here LL | f.x; | ^^^ use of borrowed `f` -LL | LL | drop(x); | - borrow later used here error[E0503]: cannot use `g.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:51:9 + --> $DIR/borrowck-describe-lvalue.rs:48:9 | LL | let x = g.x(); | - borrow of `g` occurs here LL | g.0; | ^^^ use of borrowed `g` -LL | LL | drop(x); | - borrow later used here error[E0503]: cannot use `h.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:59:9 + --> $DIR/borrowck-describe-lvalue.rs:55:9 | LL | let x = &mut h.0; | -------- borrow of `h.0` occurs here LL | h.0; | ^^^ use of borrowed `h.0` -LL | LL | drop(x); | - borrow later used here error[E0503]: cannot use `e.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:68:20 + --> $DIR/borrowck-describe-lvalue.rs:63:20 | LL | let x = e.x(); | - borrow of `e` occurs here LL | match e { LL | Baz::X(value) => value | ^^^^^ use of borrowed `e` -... +LL | }; LL | drop(x); | - borrow later used here error[E0503]: cannot use `u.a` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:78:9 + --> $DIR/borrowck-describe-lvalue.rs:71:9 | LL | let x = &mut u.a; | -------- borrow of `u.a` occurs here LL | u.a; | ^^^ use of borrowed `u.a` -LL | LL | drop(x); | - borrow later used here error[E0503]: cannot use `f.x` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:86:9 + --> $DIR/borrowck-describe-lvalue.rs:78:9 | LL | let x = f.x(); | - borrow of `*f` occurs here LL | f.x; | ^^^ use of borrowed `*f` -LL | LL | drop(x); | - borrow later used here error[E0503]: cannot use `g.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:94:9 + --> $DIR/borrowck-describe-lvalue.rs:85:9 | LL | let x = g.x(); | - borrow of `*g` occurs here LL | g.0; | ^^^ use of borrowed `*g` -LL | LL | drop(x); | - borrow later used here error[E0503]: cannot use `h.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:102:9 + --> $DIR/borrowck-describe-lvalue.rs:92:9 | LL | let x = &mut h.0; | -------- borrow of `h.0` occurs here LL | h.0; | ^^^ use of borrowed `h.0` -LL | LL | drop(x); | - borrow later used here error[E0503]: cannot use `e.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:111:20 + --> $DIR/borrowck-describe-lvalue.rs:100:20 | LL | let x = e.x(); | - borrow of `*e` occurs here @@ -139,18 +129,17 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `u.a` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:121:9 + --> $DIR/borrowck-describe-lvalue.rs:109:9 | LL | let x = &mut u.a; | -------- borrow of `u.a` occurs here LL | u.a; | ^^^ use of borrowed `u.a` -LL | LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:130:15 + --> $DIR/borrowck-describe-lvalue.rs:117:15 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -162,7 +151,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:136:18 + --> $DIR/borrowck-describe-lvalue.rs:122:18 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -174,7 +163,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:142:25 + --> $DIR/borrowck-describe-lvalue.rs:127:25 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -186,7 +175,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:148:28 + --> $DIR/borrowck-describe-lvalue.rs:132:28 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -198,7 +187,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:160:15 + --> $DIR/borrowck-describe-lvalue.rs:143:15 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -210,7 +199,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:166:18 + --> $DIR/borrowck-describe-lvalue.rs:148:18 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -222,7 +211,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:172:15 + --> $DIR/borrowck-describe-lvalue.rs:153:15 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -234,7 +223,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:178:18 + --> $DIR/borrowck-describe-lvalue.rs:158:18 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -246,7 +235,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `e` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:192:13 + --> $DIR/borrowck-describe-lvalue.rs:171:13 | LL | let x = &mut e; | ------ borrow of `e` occurs here @@ -258,7 +247,7 @@ LL | drop(x); | - borrow later used here error[E0502]: cannot borrow `e.0` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:192:18 + --> $DIR/borrowck-describe-lvalue.rs:171:18 | LL | let x = &mut e; | ------ mutable borrow occurs here @@ -270,7 +259,7 @@ LL | drop(x); | - mutable borrow later used here error[E0502]: cannot borrow `e.x` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:197:23 + --> $DIR/borrowck-describe-lvalue.rs:175:23 | LL | let x = &mut e; | ------ mutable borrow occurs here @@ -282,7 +271,7 @@ LL | drop(x); | - mutable borrow later used here error[E0502]: cannot borrow `s.y.0` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:211:22 + --> $DIR/borrowck-describe-lvalue.rs:188:22 | LL | let x = &mut s; | ------ mutable borrow occurs here @@ -294,7 +283,7 @@ LL | drop(x); | - mutable borrow later used here error[E0502]: cannot borrow `s.x.y` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:218:28 + --> $DIR/borrowck-describe-lvalue.rs:194:28 | LL | let x = &mut s; | ------ mutable borrow occurs here @@ -306,7 +295,7 @@ LL | drop(x); | - mutable borrow later used here error[E0503]: cannot use `*v` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:261:9 + --> $DIR/borrowck-describe-lvalue.rs:240:9 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -317,7 +306,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[_].y` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:261:9 + --> $DIR/borrowck-describe-lvalue.rs:240:9 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -328,7 +317,7 @@ LL | drop(x); | - borrow later used here error[E0502]: cannot borrow `v[..].x` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:273:24 + --> $DIR/borrowck-describe-lvalue.rs:251:24 | LL | let x = &mut v; | ------ mutable borrow occurs here @@ -340,7 +329,7 @@ LL | drop(x); | - mutable borrow later used here error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:235:29 + --> $DIR/borrowck-describe-lvalue.rs:210:29 | LL | let x = &mut block; | ---------- mutable borrow occurs here @@ -351,7 +340,7 @@ LL | drop(x); | - mutable borrow later used here error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:250:33 + --> $DIR/borrowck-describe-lvalue.rs:227:33 | LL | let x = &mut block; | ---------- mutable borrow occurs here @@ -362,7 +351,7 @@ LL | drop(x); | - mutable borrow later used here error[E0382]: use of moved value: `x` - --> $DIR/borrowck-describe-lvalue.rs:307:22 + --> $DIR/borrowck-describe-lvalue.rs:282:22 | LL | drop(x); | - value moved here @@ -373,5 +362,5 @@ LL | drop(x); error: aborting due to 32 previous errors -Some errors occurred: E0382, E0499, E0502, E0503. +Some errors have detailed explanations: E0382, E0499, E0502, E0503. For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-describe-lvalue.rs b/src/test/ui/borrowck/borrowck-describe-lvalue.rs index eb622ac10a..c8dbf4e691 100644 --- a/src/test/ui/borrowck/borrowck-describe-lvalue.rs +++ b/src/test/ui/borrowck/borrowck-describe-lvalue.rs @@ -1,6 +1,4 @@ // ignore-tidy-linelength -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir #![feature(slice_patterns)] @@ -40,24 +38,21 @@ fn main() { { let mut f = Foo { x: 22 }; let x = f.x(); - f.x; //[ast]~ ERROR cannot use `f.x` because it was mutably borrowed - //[mir]~^ ERROR cannot use `f.x` because it was mutably borrowed + f.x; //~ ERROR cannot use `f.x` because it was mutably borrowed drop(x); } // Local and field from tuple-struct { let mut g = Bar(22); let x = g.x(); - g.0; //[ast]~ ERROR cannot use `g.0` because it was mutably borrowed - //[mir]~^ ERROR cannot use `g.0` because it was mutably borrowed + g.0; //~ ERROR cannot use `g.0` because it was mutably borrowed drop(x); } // Local and field from tuple { let mut h = (22, 23); let x = &mut h.0; - h.0; //[ast]~ ERROR cannot use `h.0` because it was mutably borrowed - //[mir]~^ ERROR cannot use `h.0` because it was mutably borrowed + h.0; //~ ERROR cannot use `h.0` because it was mutably borrowed drop(x); } // Local and field from enum @@ -65,9 +60,7 @@ fn main() { let mut e = Baz::X(2); let x = e.x(); match e { - Baz::X(value) => value - //[ast]~^ ERROR cannot use `e.0` because it was mutably borrowed - //[mir]~^^ ERROR cannot use `e.0` because it was mutably borrowed + Baz::X(value) => value //~ ERROR cannot use `e.0` because it was mutably borrowed }; drop(x); } @@ -75,32 +68,28 @@ fn main() { unsafe { let mut u = U { b: 0 }; let x = &mut u.a; - u.a; //[ast]~ ERROR cannot use `u.a` because it was mutably borrowed - //[mir]~^ ERROR cannot use `u.a` because it was mutably borrowed + u.a; //~ ERROR cannot use `u.a` because it was mutably borrowed drop(x); } // Deref and field from struct { let mut f = Box::new(Foo { x: 22 }); let x = f.x(); - f.x; //[ast]~ ERROR cannot use `f.x` because it was mutably borrowed - //[mir]~^ ERROR cannot use `f.x` because it was mutably borrowed + f.x; //~ ERROR cannot use `f.x` because it was mutably borrowed drop(x); } // Deref and field from tuple-struct { let mut g = Box::new(Bar(22)); let x = g.x(); - g.0; //[ast]~ ERROR cannot use `g.0` because it was mutably borrowed - //[mir]~^ ERROR cannot use `g.0` because it was mutably borrowed + g.0; //~ ERROR cannot use `g.0` because it was mutably borrowed drop(x); } // Deref and field from tuple { let mut h = Box::new((22, 23)); let x = &mut h.0; - h.0; //[ast]~ ERROR cannot use `h.0` because it was mutably borrowed - //[mir]~^ ERROR cannot use `h.0` because it was mutably borrowed + h.0; //~ ERROR cannot use `h.0` because it was mutably borrowed drop(x); } // Deref and field from enum @@ -109,8 +98,7 @@ fn main() { let x = e.x(); match *e { Baz::X(value) => value - //[ast]~^ ERROR cannot use `e.0` because it was mutably borrowed - //[mir]~^^ ERROR cannot use `e.0` because it was mutably borrowed + //~^ ERROR cannot use `e.0` because it was mutably borrowed }; drop(x); } @@ -118,8 +106,7 @@ fn main() { unsafe { let mut u = Box::new(U { b: 0 }); let x = &mut u.a; - u.a; //[ast]~ ERROR cannot use `u.a` because it was mutably borrowed - //[mir]~^ ERROR cannot use `u.a` because it was mutably borrowed + u.a; //~ ERROR cannot use `u.a` because it was mutably borrowed drop(x); } // Constant index @@ -128,26 +115,22 @@ fn main() { let x = &mut v; match v { &[x, _, .., _, _] => println!("{}", x), - //[ast]~^ ERROR cannot use `v[..]` because it was mutably borrowed - //[mir]~^^ ERROR cannot use `v[..]` because it was mutably borrowed + //~^ ERROR cannot use `v[..]` because it was mutably borrowed _ => panic!("other case"), } match v { &[_, x, .., _, _] => println!("{}", x), - //[ast]~^ ERROR cannot use `v[..]` because it was mutably borrowed - //[mir]~^^ ERROR cannot use `v[..]` because it was mutably borrowed + //~^ ERROR cannot use `v[..]` because it was mutably borrowed _ => panic!("other case"), } match v { &[_, _, .., x, _] => println!("{}", x), - //[ast]~^ ERROR cannot use `v[..]` because it was mutably borrowed - //[mir]~^^ ERROR cannot use `v[..]` because it was mutably borrowed + //~^ ERROR cannot use `v[..]` because it was mutably borrowed _ => panic!("other case"), } match v { &[_, _, .., _, x] => println!("{}", x), - //[ast]~^ ERROR cannot use `v[..]` because it was mutably borrowed - //[mir]~^^ ERROR cannot use `v[..]` because it was mutably borrowed + //~^ ERROR cannot use `v[..]` because it was mutably borrowed _ => panic!("other case"), } drop(x); @@ -158,26 +141,22 @@ fn main() { let x = &mut v; match v { &[x..] => println!("{:?}", x), - //[ast]~^ ERROR cannot use `v[..]` because it was mutably borrowed - //[mir]~^^ ERROR cannot use `v[..]` because it was mutably borrowed + //~^ ERROR cannot use `v[..]` because it was mutably borrowed _ => panic!("other case"), } match v { &[_, x..] => println!("{:?}", x), - //[ast]~^ ERROR cannot use `v[..]` because it was mutably borrowed - //[mir]~^^ ERROR cannot use `v[..]` because it was mutably borrowed + //~^ ERROR cannot use `v[..]` because it was mutably borrowed _ => panic!("other case"), } match v { &[x.., _] => println!("{:?}", x), - //[ast]~^ ERROR cannot use `v[..]` because it was mutably borrowed - //[mir]~^^ ERROR cannot use `v[..]` because it was mutably borrowed + //~^ ERROR cannot use `v[..]` because it was mutably borrowed _ => panic!("other case"), } match v { &[_, x.., _] => println!("{:?}", x), - //[ast]~^ ERROR cannot use `v[..]` because it was mutably borrowed - //[mir]~^^ ERROR cannot use `v[..]` because it was mutably borrowed + //~^ ERROR cannot use `v[..]` because it was mutably borrowed _ => panic!("other case"), } drop(x); @@ -190,13 +169,11 @@ fn main() { let x = &mut e; match e { E::A(ref ax) => - //[ast]~^ ERROR cannot borrow `e.0` as immutable because `e` is also borrowed as mutable - //[mir]~^^ ERROR cannot borrow `e.0` as immutable because it is also borrowed as mutable - //[mir]~| ERROR cannot use `e` because it was mutably borrowed + //~^ ERROR cannot borrow `e.0` as immutable because it is also borrowed as mutable + //~| ERROR cannot use `e` because it was mutably borrowed println!("e.ax: {:?}", ax), E::B { x: ref bx } => - //[ast]~^ ERROR cannot borrow `e.x` as immutable because `e` is also borrowed as mutable - //[mir]~^^ ERROR cannot borrow `e.x` as immutable because it is also borrowed as mutable + //~^ ERROR cannot borrow `e.x` as immutable because it is also borrowed as mutable println!("e.bx: {:?}", bx), } drop(x); @@ -209,15 +186,13 @@ fn main() { let x = &mut s; match s { S { y: (ref y0, _), .. } => - //[ast]~^ ERROR cannot borrow `s.y.0` as immutable because `s` is also borrowed as mutable - //[mir]~^^ ERROR cannot borrow `s.y.0` as immutable because it is also borrowed as mutable + //~^ ERROR cannot borrow `s.y.0` as immutable because it is also borrowed as mutable println!("y0: {:?}", y0), _ => panic!("other case"), } match s { S { x: F { y: ref x0, .. }, .. } => - //[ast]~^ ERROR cannot borrow `s.x.y` as immutable because `s` is also borrowed as mutable - //[mir]~^^ ERROR cannot borrow `s.x.y` as immutable because it is also borrowed as mutable + //~^ ERROR cannot borrow `s.x.y` as immutable because it is also borrowed as mutable println!("x0: {:?}", x0), _ => panic!("other case"), } @@ -233,8 +208,10 @@ fn main() { fn bump<'a>(mut block: &mut Block<'a>) { let x = &mut block; let p: &'a u8 = &*block.current; - //[mir]~^ ERROR cannot borrow `*block.current` as immutable because it is also borrowed as mutable - // No errors in AST because of issue rust#38899 + //~^ WARNING cannot borrow `*block.current` as immutable because it is also borrowed as mutable + //~| this error has been downgraded + //~| this warning will become a hard error in the future + // Warning because of issue rust#38899 drop(x); } } @@ -248,8 +225,10 @@ fn main() { unsafe fn bump2(mut block: *mut Block2) { let x = &mut block; let p : *const u8 = &*(*block).current; - //[mir]~^ ERROR cannot borrow `*block.current` as immutable because it is also borrowed as mutable - // No errors in AST because of issue rust#38899 + //~^ WARNING cannot borrow `*block.current` as immutable because it is also borrowed as mutable + //~| this error has been downgraded + //~| this warning will become a hard error in the future + // Warning because of issue rust#38899 drop(x); } } @@ -259,9 +238,8 @@ fn main() { let mut v = &[F{x: 1, y: 2}, F{x: 3, y: 4}]; let x = &mut v; v[0].y; - //[ast]~^ ERROR cannot use `v[..].y` because it was mutably borrowed - //[mir]~^^ ERROR cannot use `v[_].y` because it was mutably borrowed - //[mir]~| ERROR cannot use `*v` because it was mutably borrowed + //~^ ERROR cannot use `v[_].y` because it was mutably borrowed + //~| ERROR cannot use `*v` because it was mutably borrowed drop(x); } // Field of constant index @@ -271,8 +249,7 @@ fn main() { let x = &mut v; match v { &[_, F {x: ref xf, ..}] => println!("{}", xf), - //[mir]~^ ERROR cannot borrow `v[..].x` as immutable because it is also borrowed as mutable - // No errors in AST + //~^ ERROR cannot borrow `v[..].x` as immutable because it is also borrowed as mutable _ => panic!("other case") } drop(x); @@ -282,8 +259,7 @@ fn main() { let mut x = 0; || { let y = &mut x; - &mut x; //[ast]~ ERROR cannot borrow `**x` as mutable more than once at a time - //[mir]~^ ERROR cannot borrow `x` as mutable more than once at a time + &mut x; //~ ERROR cannot borrow `x` as mutable more than once at a time *y = 1; }; } @@ -291,10 +267,9 @@ fn main() { { let mut x = 0; || { - || { //[mir]~ ERROR captured variable cannot escape `FnMut` closure body + || { //~ ERROR captured variable cannot escape `FnMut` closure body let y = &mut x; - &mut x; //[ast]~ ERROR cannot borrow `**x` as mutable more than once at a time - //[mir]~^ ERROR cannot borrow `x` as mutable more than once at a time + &mut x; //~ ERROR cannot borrow `x` as mutable more than once at a time *y = 1; drop(y); } @@ -304,8 +279,7 @@ fn main() { fn foo(x: Vec) { let c = || { drop(x); - drop(x); //[ast]~ ERROR use of moved value: `x` - //[mir]~^ ERROR use of moved value: `x` + drop(x); //~ ERROR use of moved value: `x` }; c(); } diff --git a/src/test/ui/borrowck/borrowck-describe-lvalue.ast.nll.stderr b/src/test/ui/borrowck/borrowck-describe-lvalue.stderr similarity index 88% rename from src/test/ui/borrowck/borrowck-describe-lvalue.ast.nll.stderr rename to src/test/ui/borrowck/borrowck-describe-lvalue.stderr index c6144695f7..fb42e5fbca 100644 --- a/src/test/ui/borrowck/borrowck-describe-lvalue.ast.nll.stderr +++ b/src/test/ui/borrowck/borrowck-describe-lvalue.stderr @@ -1,34 +1,31 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-describe-lvalue.rs:285:13 + --> $DIR/borrowck-describe-lvalue.rs:262:13 | LL | let y = &mut x; | ------ first mutable borrow occurs here LL | &mut x; | ^^^^^^ second mutable borrow occurs here -LL | LL | *y = 1; | ------ first borrow later used here error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-describe-lvalue.rs:296:20 + --> $DIR/borrowck-describe-lvalue.rs:272:20 | LL | let y = &mut x; | ------ first mutable borrow occurs here LL | &mut x; | ^^^^^^ second mutable borrow occurs here -LL | LL | *y = 1; | ------ first borrow later used here error: captured variable cannot escape `FnMut` closure body - --> $DIR/borrowck-describe-lvalue.rs:294:16 + --> $DIR/borrowck-describe-lvalue.rs:270:16 | LL | || { | - inferred to be a `FnMut` closure LL | / || { LL | | let y = &mut x; LL | | &mut x; -LL | | LL | | *y = 1; LL | | drop(y); LL | | } @@ -38,96 +35,89 @@ LL | | } = note: ...therefore, they cannot allow references to captured variables to escape error[E0503]: cannot use `f.x` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:43:9 + --> $DIR/borrowck-describe-lvalue.rs:41:9 | LL | let x = f.x(); | - borrow of `f` occurs here LL | f.x; | ^^^ use of borrowed `f` -LL | LL | drop(x); | - borrow later used here error[E0503]: cannot use `g.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:51:9 + --> $DIR/borrowck-describe-lvalue.rs:48:9 | LL | let x = g.x(); | - borrow of `g` occurs here LL | g.0; | ^^^ use of borrowed `g` -LL | LL | drop(x); | - borrow later used here error[E0503]: cannot use `h.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:59:9 + --> $DIR/borrowck-describe-lvalue.rs:55:9 | LL | let x = &mut h.0; | -------- borrow of `h.0` occurs here LL | h.0; | ^^^ use of borrowed `h.0` -LL | LL | drop(x); | - borrow later used here error[E0503]: cannot use `e.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:68:20 + --> $DIR/borrowck-describe-lvalue.rs:63:20 | LL | let x = e.x(); | - borrow of `e` occurs here LL | match e { LL | Baz::X(value) => value | ^^^^^ use of borrowed `e` -... +LL | }; LL | drop(x); | - borrow later used here error[E0503]: cannot use `u.a` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:78:9 + --> $DIR/borrowck-describe-lvalue.rs:71:9 | LL | let x = &mut u.a; | -------- borrow of `u.a` occurs here LL | u.a; | ^^^ use of borrowed `u.a` -LL | LL | drop(x); | - borrow later used here error[E0503]: cannot use `f.x` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:86:9 + --> $DIR/borrowck-describe-lvalue.rs:78:9 | LL | let x = f.x(); | - borrow of `*f` occurs here LL | f.x; | ^^^ use of borrowed `*f` -LL | LL | drop(x); | - borrow later used here error[E0503]: cannot use `g.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:94:9 + --> $DIR/borrowck-describe-lvalue.rs:85:9 | LL | let x = g.x(); | - borrow of `*g` occurs here LL | g.0; | ^^^ use of borrowed `*g` -LL | LL | drop(x); | - borrow later used here error[E0503]: cannot use `h.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:102:9 + --> $DIR/borrowck-describe-lvalue.rs:92:9 | LL | let x = &mut h.0; | -------- borrow of `h.0` occurs here LL | h.0; | ^^^ use of borrowed `h.0` -LL | LL | drop(x); | - borrow later used here error[E0503]: cannot use `e.0` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:111:20 + --> $DIR/borrowck-describe-lvalue.rs:100:20 | LL | let x = e.x(); | - borrow of `*e` occurs here @@ -139,18 +129,17 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `u.a` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:121:9 + --> $DIR/borrowck-describe-lvalue.rs:109:9 | LL | let x = &mut u.a; | -------- borrow of `u.a` occurs here LL | u.a; | ^^^ use of borrowed `u.a` -LL | LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:130:15 + --> $DIR/borrowck-describe-lvalue.rs:117:15 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -162,7 +151,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:136:18 + --> $DIR/borrowck-describe-lvalue.rs:122:18 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -174,7 +163,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:142:25 + --> $DIR/borrowck-describe-lvalue.rs:127:25 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -186,7 +175,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:148:28 + --> $DIR/borrowck-describe-lvalue.rs:132:28 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -198,7 +187,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:160:15 + --> $DIR/borrowck-describe-lvalue.rs:143:15 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -210,7 +199,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:166:18 + --> $DIR/borrowck-describe-lvalue.rs:148:18 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -222,7 +211,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:172:15 + --> $DIR/borrowck-describe-lvalue.rs:153:15 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -234,7 +223,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[..]` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:178:18 + --> $DIR/borrowck-describe-lvalue.rs:158:18 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -246,7 +235,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `e` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:192:13 + --> $DIR/borrowck-describe-lvalue.rs:171:13 | LL | let x = &mut e; | ------ borrow of `e` occurs here @@ -258,7 +247,7 @@ LL | drop(x); | - borrow later used here error[E0502]: cannot borrow `e.0` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:192:18 + --> $DIR/borrowck-describe-lvalue.rs:171:18 | LL | let x = &mut e; | ------ mutable borrow occurs here @@ -270,7 +259,7 @@ LL | drop(x); | - mutable borrow later used here error[E0502]: cannot borrow `e.x` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:197:23 + --> $DIR/borrowck-describe-lvalue.rs:175:23 | LL | let x = &mut e; | ------ mutable borrow occurs here @@ -282,7 +271,7 @@ LL | drop(x); | - mutable borrow later used here error[E0502]: cannot borrow `s.y.0` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:211:22 + --> $DIR/borrowck-describe-lvalue.rs:188:22 | LL | let x = &mut s; | ------ mutable borrow occurs here @@ -294,7 +283,7 @@ LL | drop(x); | - mutable borrow later used here error[E0502]: cannot borrow `s.x.y` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:218:28 + --> $DIR/borrowck-describe-lvalue.rs:194:28 | LL | let x = &mut s; | ------ mutable borrow occurs here @@ -306,7 +295,7 @@ LL | drop(x); | - mutable borrow later used here error[E0503]: cannot use `*v` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:261:9 + --> $DIR/borrowck-describe-lvalue.rs:240:9 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -317,7 +306,7 @@ LL | drop(x); | - borrow later used here error[E0503]: cannot use `v[_].y` because it was mutably borrowed - --> $DIR/borrowck-describe-lvalue.rs:261:9 + --> $DIR/borrowck-describe-lvalue.rs:240:9 | LL | let x = &mut v; | ------ borrow of `v` occurs here @@ -328,7 +317,7 @@ LL | drop(x); | - borrow later used here error[E0502]: cannot borrow `v[..].x` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:273:24 + --> $DIR/borrowck-describe-lvalue.rs:251:24 | LL | let x = &mut v; | ------ mutable borrow occurs here @@ -340,7 +329,7 @@ LL | drop(x); | - mutable borrow later used here warning[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:235:29 + --> $DIR/borrowck-describe-lvalue.rs:210:29 | LL | let x = &mut block; | ---------- mutable borrow occurs here @@ -354,7 +343,7 @@ LL | drop(x); = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future warning[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-describe-lvalue.rs:250:33 + --> $DIR/borrowck-describe-lvalue.rs:227:33 | LL | let x = &mut block; | ---------- mutable borrow occurs here @@ -368,7 +357,7 @@ LL | drop(x); = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future error[E0382]: use of moved value: `x` - --> $DIR/borrowck-describe-lvalue.rs:307:22 + --> $DIR/borrowck-describe-lvalue.rs:282:22 | LL | drop(x); | - value moved here @@ -379,5 +368,5 @@ LL | drop(x); error: aborting due to 30 previous errors -Some errors occurred: E0382, E0499, E0502, E0503. +Some errors have detailed explanations: E0382, E0499, E0502, E0503. For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-escaping-closure-error-1.nll.stderr b/src/test/ui/borrowck/borrowck-escaping-closure-error-1.nll.stderr deleted file mode 100644 index 3195120cba..0000000000 --- a/src/test/ui/borrowck/borrowck-escaping-closure-error-1.nll.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0373]: closure may outlive the current function, but it borrows `books`, which is owned by the current function - --> $DIR/borrowck-escaping-closure-error-1.rs:13:11 - | -LL | spawn(|| books.push(4)); - | ^^ ----- `books` is borrowed here - | | - | may outlive borrowed value `books` - | -note: function requires argument type to outlive `'static` - --> $DIR/borrowck-escaping-closure-error-1.rs:13:5 - | -LL | spawn(|| books.push(4)); - | ^^^^^^^^^^^^^^^^^^^^^^^ -help: to force the closure to take ownership of `books` (and any other referenced variables), use the `move` keyword - | -LL | spawn(move || books.push(4)); - | ^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0373`. diff --git a/src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr b/src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr index 16ba61d997..3195120cba 100644 --- a/src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr +++ b/src/test/ui/borrowck/borrowck-escaping-closure-error-1.stderr @@ -5,6 +5,12 @@ LL | spawn(|| books.push(4)); | ^^ ----- `books` is borrowed here | | | may outlive borrowed value `books` + | +note: function requires argument type to outlive `'static` + --> $DIR/borrowck-escaping-closure-error-1.rs:13:5 + | +LL | spawn(|| books.push(4)); + | ^^^^^^^^^^^^^^^^^^^^^^^ help: to force the closure to take ownership of `books` (and any other referenced variables), use the `move` keyword | LL | spawn(move || books.push(4)); diff --git a/src/test/ui/borrowck/borrowck-escaping-closure-error-2.nll.stderr b/src/test/ui/borrowck/borrowck-escaping-closure-error-2.nll.stderr deleted file mode 100644 index 3227aa9bb6..0000000000 --- a/src/test/ui/borrowck/borrowck-escaping-closure-error-2.nll.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0373]: closure may outlive the current function, but it borrows `books`, which is owned by the current function - --> $DIR/borrowck-escaping-closure-error-2.rs:11:14 - | -LL | Box::new(|| books.push(4)) - | ^^ ----- `books` is borrowed here - | | - | may outlive borrowed value `books` - | -note: closure is returned here - --> $DIR/borrowck-escaping-closure-error-2.rs:11:5 - | -LL | Box::new(|| books.push(4)) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: to force the closure to take ownership of `books` (and any other referenced variables), use the `move` keyword - | -LL | Box::new(move || books.push(4)) - | ^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0373`. diff --git a/src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr b/src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr index 960f65da5f..3227aa9bb6 100644 --- a/src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr +++ b/src/test/ui/borrowck/borrowck-escaping-closure-error-2.stderr @@ -5,6 +5,12 @@ LL | Box::new(|| books.push(4)) | ^^ ----- `books` is borrowed here | | | may outlive borrowed value `books` + | +note: closure is returned here + --> $DIR/borrowck-escaping-closure-error-2.rs:11:5 + | +LL | Box::new(|| books.push(4)) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: to force the closure to take ownership of `books` (and any other referenced variables), use the `move` keyword | LL | Box::new(move || books.push(4)) diff --git a/src/test/ui/borrowck/borrowck-field-sensitivity.nll.stderr b/src/test/ui/borrowck/borrowck-field-sensitivity.nll.stderr deleted file mode 100644 index b3451659be..0000000000 --- a/src/test/ui/borrowck/borrowck-field-sensitivity.nll.stderr +++ /dev/null @@ -1,132 +0,0 @@ -error[E0382]: use of moved value: `x.b` - --> $DIR/borrowck-field-sensitivity.rs:8:10 - | -LL | drop(x.b); - | --- value moved here -LL | drop(*x.b); - | ^^^^ value used here after move - | - = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `x.b` - --> $DIR/borrowck-field-sensitivity.rs:14:10 - | -LL | let y = A { a: 3, .. x }; - | ---------------- value moved here -LL | drop(*x.b); - | ^^^^ value used here after move - | - = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0382]: borrow of moved value: `x.b` - --> $DIR/borrowck-field-sensitivity.rs:20:13 - | -LL | drop(x.b); - | --- value moved here -LL | let p = &x.b; - | ^^^^ value borrowed here after move - | - = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0382]: borrow of moved value: `x.b` - --> $DIR/borrowck-field-sensitivity.rs:27:13 - | -LL | let _y = A { a: 3, .. x }; - | ---------------- value moved here -LL | let p = &x.b; - | ^^^^ value borrowed here after move - | - = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0505]: cannot move out of `x.b` because it is borrowed - --> $DIR/borrowck-field-sensitivity.rs:34:10 - | -LL | let p = &x.b; - | ---- borrow of `x.b` occurs here -LL | drop(x.b); - | ^^^ move out of `x.b` occurs here -LL | drop(**p); - | --- borrow later used here - -error[E0505]: cannot move out of `x.b` because it is borrowed - --> $DIR/borrowck-field-sensitivity.rs:41:14 - | -LL | let p = &x.b; - | ---- borrow of `x.b` occurs here -LL | let _y = A { a: 3, .. x }; - | ^^^^^^^^^^^^^^^^ move out of `x.b` occurs here -LL | drop(**p); - | --- borrow later used here - -error[E0499]: cannot borrow `x.a` as mutable more than once at a time - --> $DIR/borrowck-field-sensitivity.rs:48:13 - | -LL | let p = &mut x.a; - | -------- first mutable borrow occurs here -LL | let q = &mut x.a; - | ^^^^^^^^ second mutable borrow occurs here -LL | drop(*p); - | -- first borrow later used here - -error[E0382]: use of moved value: `x.b` - --> $DIR/borrowck-field-sensitivity.rs:56:10 - | -LL | drop(x.b); - | --- value moved here -LL | drop(x.b); - | ^^^ value used here after move - | - = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `x.b` - --> $DIR/borrowck-field-sensitivity.rs:62:10 - | -LL | let _y = A { a: 3, .. x }; - | ---------------- value moved here -LL | drop(x.b); - | ^^^ value used here after move - | - = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `x.b` - --> $DIR/borrowck-field-sensitivity.rs:68:14 - | -LL | drop(x.b); - | --- value moved here -LL | let _z = A { a: 3, .. x }; - | ^^^^^^^^^^^^^^^^ value used here after move - | - = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `x.b` - --> $DIR/borrowck-field-sensitivity.rs:74:14 - | -LL | let _y = A { a: 3, .. x }; - | ---------------- value moved here -LL | let _z = A { a: 4, .. x }; - | ^^^^^^^^^^^^^^^^ value used here after move - | - = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0381]: assign to part of possibly uninitialized variable: `x` - --> $DIR/borrowck-field-sensitivity.rs:81:5 - | -LL | x.a = 1; - | ^^^^^^^ use of possibly uninitialized `x` - -error[E0381]: assign to part of possibly uninitialized variable: `x` - --> $DIR/borrowck-field-sensitivity.rs:87:5 - | -LL | x.a = 1; - | ^^^^^^^ use of possibly uninitialized `x` - -error[E0381]: assign to part of possibly uninitialized variable: `x` - --> $DIR/borrowck-field-sensitivity.rs:94:5 - | -LL | x.b = box 1; - | ^^^ use of possibly uninitialized `x` - -error: aborting due to 14 previous errors - -Some errors occurred: E0381, E0382, E0499, E0505. -For more information about an error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-field-sensitivity.rs b/src/test/ui/borrowck/borrowck-field-sensitivity.rs index 1e9e6d68a5..88f74d1ed3 100644 --- a/src/test/ui/borrowck/borrowck-field-sensitivity.rs +++ b/src/test/ui/borrowck/borrowck-field-sensitivity.rs @@ -5,26 +5,26 @@ struct A { a: isize, b: Box } fn deref_after_move() { let x = A { a: 1, b: box 2 }; drop(x.b); - drop(*x.b); //~ ERROR use of moved value: `*x.b` + drop(*x.b); //~ ERROR use of moved value: `x.b` } fn deref_after_fu_move() { let x = A { a: 1, b: box 2 }; let y = A { a: 3, .. x }; - drop(*x.b); //~ ERROR use of moved value: `*x.b` + drop(*x.b); //~ ERROR use of moved value: `x.b` } fn borrow_after_move() { let x = A { a: 1, b: box 2 }; drop(x.b); - let p = &x.b; //~ ERROR use of moved value: `x.b` + let p = &x.b; //~ ERROR borrow of moved value: `x.b` drop(**p); } fn borrow_after_fu_move() { let x = A { a: 1, b: box 2 }; let _y = A { a: 3, .. x }; - let p = &x.b; //~ ERROR use of moved value: `x.b` + let p = &x.b; //~ ERROR borrow of moved value: `x.b` drop(**p); } @@ -78,21 +78,21 @@ fn fu_move_after_fu_move() { fn copy_after_field_assign_after_uninit() { let mut x: A; - x.a = 1; - drop(x.a); //~ ERROR use of possibly uninitialized variable: `x.a` + x.a = 1; //~ ERROR assign to part of possibly uninitialized variable: `x` + drop(x.a); } fn borrow_after_field_assign_after_uninit() { let mut x: A; - x.a = 1; - let p = &x.a; //~ ERROR use of possibly uninitialized variable: `x.a` + x.a = 1; //~ ERROR assign to part of possibly uninitialized variable: `x` + let p = &x.a; drop(*p); } fn move_after_field_assign_after_uninit() { let mut x: A; - x.b = box 1; - drop(x.b); //~ ERROR use of possibly uninitialized variable: `x.b` + x.b = box 1; //~ ERROR assign to part of possibly uninitialized variable: `x` + drop(x.b); } fn main() { diff --git a/src/test/ui/borrowck/borrowck-field-sensitivity.stderr b/src/test/ui/borrowck/borrowck-field-sensitivity.stderr index 0cf6f3f218..8952323548 100644 --- a/src/test/ui/borrowck/borrowck-field-sensitivity.stderr +++ b/src/test/ui/borrowck/borrowck-field-sensitivity.stderr @@ -1,4 +1,4 @@ -error[E0382]: use of moved value: `*x.b` +error[E0382]: use of moved value: `x.b` --> $DIR/borrowck-field-sensitivity.rs:8:10 | LL | drop(x.b); @@ -8,33 +8,33 @@ LL | drop(*x.b); | = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait -error[E0382]: use of moved value: `*x.b` +error[E0382]: use of moved value: `x.b` --> $DIR/borrowck-field-sensitivity.rs:14:10 | LL | let y = A { a: 3, .. x }; - | - value moved here + | ---------------- value moved here LL | drop(*x.b); | ^^^^ value used here after move | = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait -error[E0382]: use of moved value: `x.b` - --> $DIR/borrowck-field-sensitivity.rs:20:14 +error[E0382]: borrow of moved value: `x.b` + --> $DIR/borrowck-field-sensitivity.rs:20:13 | LL | drop(x.b); | --- value moved here LL | let p = &x.b; - | ^^^ value used here after move + | ^^^^ value borrowed here after move | = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait -error[E0382]: use of moved value: `x.b` - --> $DIR/borrowck-field-sensitivity.rs:27:14 +error[E0382]: borrow of moved value: `x.b` + --> $DIR/borrowck-field-sensitivity.rs:27:13 | LL | let _y = A { a: 3, .. x }; - | - value moved here + | ---------------- value moved here LL | let p = &x.b; - | ^^^ value used here after move + | ^^^^ value borrowed here after move | = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -42,28 +42,31 @@ error[E0505]: cannot move out of `x.b` because it is borrowed --> $DIR/borrowck-field-sensitivity.rs:34:10 | LL | let p = &x.b; - | --- borrow of `x.b` occurs here + | ---- borrow of `x.b` occurs here LL | drop(x.b); | ^^^ move out of `x.b` occurs here +LL | drop(**p); + | --- borrow later used here error[E0505]: cannot move out of `x.b` because it is borrowed - --> $DIR/borrowck-field-sensitivity.rs:41:27 + --> $DIR/borrowck-field-sensitivity.rs:41:14 | LL | let p = &x.b; - | --- borrow of `x.b` occurs here + | ---- borrow of `x.b` occurs here LL | let _y = A { a: 3, .. x }; - | ^ move out of `x.b` occurs here + | ^^^^^^^^^^^^^^^^ move out of `x.b` occurs here +LL | drop(**p); + | --- borrow later used here error[E0499]: cannot borrow `x.a` as mutable more than once at a time - --> $DIR/borrowck-field-sensitivity.rs:48:18 + --> $DIR/borrowck-field-sensitivity.rs:48:13 | LL | let p = &mut x.a; - | --- first mutable borrow occurs here + | -------- first mutable borrow occurs here LL | let q = &mut x.a; - | ^^^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here + | ^^^^^^^^ second mutable borrow occurs here +LL | drop(*p); + | -- first borrow later used here error[E0382]: use of moved value: `x.b` --> $DIR/borrowck-field-sensitivity.rs:56:10 @@ -79,51 +82,51 @@ error[E0382]: use of moved value: `x.b` --> $DIR/borrowck-field-sensitivity.rs:62:10 | LL | let _y = A { a: 3, .. x }; - | - value moved here + | ---------------- value moved here LL | drop(x.b); | ^^^ value used here after move | = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0382]: use of moved value: `x.b` - --> $DIR/borrowck-field-sensitivity.rs:68:27 + --> $DIR/borrowck-field-sensitivity.rs:68:14 | LL | drop(x.b); | --- value moved here LL | let _z = A { a: 3, .. x }; - | ^ value used here after move + | ^^^^^^^^^^^^^^^^ value used here after move | = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0382]: use of moved value: `x.b` - --> $DIR/borrowck-field-sensitivity.rs:74:27 + --> $DIR/borrowck-field-sensitivity.rs:74:14 | LL | let _y = A { a: 3, .. x }; - | - value moved here + | ---------------- value moved here LL | let _z = A { a: 4, .. x }; - | ^ value used here after move + | ^^^^^^^^^^^^^^^^ value used here after move | = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait -error[E0381]: use of possibly uninitialized variable: `x.a` - --> $DIR/borrowck-field-sensitivity.rs:82:10 +error[E0381]: assign to part of possibly uninitialized variable: `x` + --> $DIR/borrowck-field-sensitivity.rs:81:5 | -LL | drop(x.a); - | ^^^ use of possibly uninitialized `x.a` +LL | x.a = 1; + | ^^^^^^^ use of possibly uninitialized `x` -error[E0381]: use of possibly uninitialized variable: `x.a` - --> $DIR/borrowck-field-sensitivity.rs:88:14 +error[E0381]: assign to part of possibly uninitialized variable: `x` + --> $DIR/borrowck-field-sensitivity.rs:87:5 | -LL | let p = &x.a; - | ^^^ use of possibly uninitialized `x.a` +LL | x.a = 1; + | ^^^^^^^ use of possibly uninitialized `x` -error[E0381]: use of possibly uninitialized variable: `x.b` - --> $DIR/borrowck-field-sensitivity.rs:95:10 +error[E0381]: assign to part of possibly uninitialized variable: `x` + --> $DIR/borrowck-field-sensitivity.rs:94:5 | -LL | drop(x.b); - | ^^^ use of possibly uninitialized `x.b` +LL | x.b = box 1; + | ^^^ use of possibly uninitialized `x` error: aborting due to 14 previous errors -Some errors occurred: E0381, E0382, E0499, E0505. +Some errors have detailed explanations: E0381, E0382, E0499, E0505. For more information about an error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-fn-in-const-a.mir.stderr b/src/test/ui/borrowck/borrowck-fn-in-const-a.mir.stderr deleted file mode 100644 index 16c62fc1c7..0000000000 --- a/src/test/ui/borrowck/borrowck-fn-in-const-a.mir.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-fn-in-const-a.rs:9:16 - | -LL | return *x - | ^^ cannot move out of borrowed content - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/borrowck-fn-in-const-a.rs b/src/test/ui/borrowck/borrowck-fn-in-const-a.rs index 17663a30ca..faa56cc7f2 100644 --- a/src/test/ui/borrowck/borrowck-fn-in-const-a.rs +++ b/src/test/ui/borrowck/borrowck-fn-in-const-a.rs @@ -1,13 +1,9 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - // Check that we check fns appearing in constant declarations. // Issue #22382. const MOVE: fn(&String) -> String = { fn broken(x: &String) -> String { - return *x //[ast]~ ERROR cannot move out of borrowed content [E0507] - //[mir]~^ ERROR [E0507] + return *x //~ ERROR cannot move out of borrowed content [E0507] } broken }; diff --git a/src/test/ui/borrowck/borrowck-fn-in-const-a.ast.stderr b/src/test/ui/borrowck/borrowck-fn-in-const-a.stderr similarity index 85% rename from src/test/ui/borrowck/borrowck-fn-in-const-a.ast.stderr rename to src/test/ui/borrowck/borrowck-fn-in-const-a.stderr index 16c62fc1c7..fff28359c1 100644 --- a/src/test/ui/borrowck/borrowck-fn-in-const-a.ast.stderr +++ b/src/test/ui/borrowck/borrowck-fn-in-const-a.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-fn-in-const-a.rs:9:16 + --> $DIR/borrowck-fn-in-const-a.rs:6:16 | LL | return *x | ^^ cannot move out of borrowed content diff --git a/src/test/ui/borrowck/borrowck-fn-in-const-c.nll.stderr b/src/test/ui/borrowck/borrowck-fn-in-const-c.nll.stderr deleted file mode 100644 index d48866dce0..0000000000 --- a/src/test/ui/borrowck/borrowck-fn-in-const-c.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0713]: borrow may still be in use when destructor runs - --> $DIR/borrowck-fn-in-const-c.rs:17:16 - | -LL | return &local.inner; - | ^^^^^^^^^^^^ returning this value requires that `local.inner` is borrowed for `'static` -LL | } - | - here, drop of `local` needs exclusive access to `local.inner`, because the type `DropString` implements the `Drop` trait - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0713`. diff --git a/src/test/ui/borrowck/borrowck-fn-in-const-c.rs b/src/test/ui/borrowck/borrowck-fn-in-const-c.rs index d0a2e5b037..c638cd08bc 100644 --- a/src/test/ui/borrowck/borrowck-fn-in-const-c.rs +++ b/src/test/ui/borrowck/borrowck-fn-in-const-c.rs @@ -14,7 +14,7 @@ impl Drop for DropString { const LOCAL_REF: fn() -> &'static str = { fn broken() -> &'static str { let local = DropString { inner: format!("Some local string") }; - return &local.inner; //~ ERROR does not live long enough + return &local.inner; //~ borrow may still be in use when destructor runs } broken }; diff --git a/src/test/ui/borrowck/borrowck-fn-in-const-c.stderr b/src/test/ui/borrowck/borrowck-fn-in-const-c.stderr index d2ddf808d1..d48866dce0 100644 --- a/src/test/ui/borrowck/borrowck-fn-in-const-c.stderr +++ b/src/test/ui/borrowck/borrowck-fn-in-const-c.stderr @@ -1,13 +1,11 @@ -error[E0597]: `local.inner` does not live long enough - --> $DIR/borrowck-fn-in-const-c.rs:17:17 +error[E0713]: borrow may still be in use when destructor runs + --> $DIR/borrowck-fn-in-const-c.rs:17:16 | LL | return &local.inner; - | ^^^^^^^^^^^ borrowed value does not live long enough + | ^^^^^^^^^^^^ returning this value requires that `local.inner` is borrowed for `'static` LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - here, drop of `local` needs exclusive access to `local.inner`, because the type `DropString` implements the `Drop` trait error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0713`. diff --git a/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.nll.stderr b/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.nll.stderr deleted file mode 100644 index 08cafa7da7..0000000000 --- a/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.nll.stderr +++ /dev/null @@ -1,48 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:12:15 - | -LL | for &a in x.iter() { - | -- ^^^^^^^^ cannot move out of borrowed content - | || - | |data moved here - | help: consider removing the `&`: `a` - | -note: move occurs because `a` has type `&mut i32`, which does not implement the `Copy` trait - --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:12:10 - | -LL | for &a in x.iter() { - | ^ - -error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:18:15 - | -LL | for &a in &f.a { - | -- ^^^^ cannot move out of borrowed content - | || - | |data moved here - | help: consider removing the `&`: `a` - | -note: move occurs because `a` has type `std::boxed::Box`, which does not implement the `Copy` trait - --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:18:10 - | -LL | for &a in &f.a { - | ^ - -error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:22:15 - | -LL | for &a in x.iter() { - | -- ^^^^^^^^ cannot move out of borrowed content - | || - | |data moved here - | help: consider removing the `&`: `a` - | -note: move occurs because `a` has type `std::boxed::Box`, which does not implement the `Copy` trait - --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:22:10 - | -LL | for &a in x.iter() { - | ^ - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.stderr b/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.stderr index fb53b13a58..08cafa7da7 100644 --- a/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.stderr +++ b/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.stderr @@ -1,29 +1,47 @@ error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:12:9 + --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:12:15 | LL | for &a in x.iter() { - | ^- + | -- ^^^^^^^^ cannot move out of borrowed content | || - | |hint: to prevent move, use `ref a` or `ref mut a` - | cannot move out of borrowed content + | |data moved here + | help: consider removing the `&`: `a` + | +note: move occurs because `a` has type `&mut i32`, which does not implement the `Copy` trait + --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:12:10 + | +LL | for &a in x.iter() { + | ^ error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:18:9 + --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:18:15 | LL | for &a in &f.a { - | ^- + | -- ^^^^ cannot move out of borrowed content | || - | |hint: to prevent move, use `ref a` or `ref mut a` - | cannot move out of borrowed content + | |data moved here + | help: consider removing the `&`: `a` + | +note: move occurs because `a` has type `std::boxed::Box`, which does not implement the `Copy` trait + --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:18:10 + | +LL | for &a in &f.a { + | ^ error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:22:9 + --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:22:15 | LL | for &a in x.iter() { - | ^- + | -- ^^^^^^^^ cannot move out of borrowed content | || - | |hint: to prevent move, use `ref a` or `ref mut a` - | cannot move out of borrowed content + | |data moved here + | help: consider removing the `&`: `a` + | +note: move occurs because `a` has type `std::boxed::Box`, which does not implement the `Copy` trait + --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:22:10 + | +LL | for &a in x.iter() { + | ^ error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/borrowck-for-loop-head-linkage.nll.stderr b/src/test/ui/borrowck/borrowck-for-loop-head-linkage.nll.stderr index f47dce4536..3468f29fb1 100644 --- a/src/test/ui/borrowck/borrowck-for-loop-head-linkage.nll.stderr +++ b/src/test/ui/borrowck/borrowck-for-loop-head-linkage.nll.stderr @@ -8,7 +8,7 @@ LL | for &x in &vector { | immutable borrow later used here LL | let cap = vector.capacity(); LL | vector.extend(repeat(0)); - | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here + | ^^^^^^ mutable borrow occurs here error[E0502]: cannot borrow `vector` as mutable because it is also borrowed as immutable --> $DIR/borrowck-for-loop-head-linkage.rs:8:9 diff --git a/src/test/ui/borrowck/borrowck-for-loop-head-linkage.stderr b/src/test/ui/borrowck/borrowck-for-loop-head-linkage.stderr index a2d8908c4d..f47dce4536 100644 --- a/src/test/ui/borrowck/borrowck-for-loop-head-linkage.stderr +++ b/src/test/ui/borrowck/borrowck-for-loop-head-linkage.stderr @@ -2,22 +2,22 @@ error[E0502]: cannot borrow `vector` as mutable because it is also borrowed as i --> $DIR/borrowck-for-loop-head-linkage.rs:7:9 | LL | for &x in &vector { - | ------ - | | | - | | immutable borrow ends here - | immutable borrow occurs here + | ------- + | | + | immutable borrow occurs here + | immutable borrow later used here LL | let cap = vector.capacity(); LL | vector.extend(repeat(0)); - | ^^^^^^ mutable borrow occurs here + | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here error[E0502]: cannot borrow `vector` as mutable because it is also borrowed as immutable --> $DIR/borrowck-for-loop-head-linkage.rs:8:9 | LL | for &x in &vector { - | ------ - | | | - | | immutable borrow ends here - | immutable borrow occurs here + | ------- + | | + | immutable borrow occurs here + | immutable borrow later used here ... LL | vector[1] = 5; | ^^^^^^ mutable borrow occurs here diff --git a/src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.ast.stderr b/src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.ast.stderr deleted file mode 100644 index 43c3c3371f..0000000000 --- a/src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.ast.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0506]: cannot assign to `_a` because it is borrowed - --> $DIR/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.rs:9:9 - | -LL | let b = &mut _a; - | -- borrow of `_a` occurs here -... -LL | _a = 4; - | ^^^^^^ assignment to borrowed `_a` occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.mir.stderr b/src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.mir.stderr deleted file mode 100644 index 88b43c1350..0000000000 --- a/src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.mir.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0506]: cannot assign to `_a` because it is borrowed - --> $DIR/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.rs:9:9 - | -LL | let b = &mut _a; - | ------- borrow of `_a` occurs here -... -LL | _a = 4; - | ^^^^^^ assignment to borrowed `_a` occurs here -... -LL | drop(b); - | - borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.rs b/src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.rs index 334d2e008b..97107c2e30 100644 --- a/src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.rs +++ b/src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.rs @@ -1,13 +1,9 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - fn main() { let mut _a = 3; let b = &mut _a; { let c = &*b; - _a = 4; //[ast]~ ERROR cannot assign to `_a` - //[mir]~^ ERROR cannot assign to `_a` because it is borrowed + _a = 4; //~ ERROR cannot assign to `_a` because it is borrowed drop(c); } drop(b); diff --git a/src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.ast.nll.stderr b/src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.stderr similarity index 86% rename from src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.ast.nll.stderr rename to src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.stderr index 88b43c1350..a66db05ccc 100644 --- a/src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.ast.nll.stderr +++ b/src/test/ui/borrowck/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.stderr @@ -1,5 +1,5 @@ error[E0506]: cannot assign to `_a` because it is borrowed - --> $DIR/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.rs:9:9 + --> $DIR/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.rs:6:9 | LL | let b = &mut _a; | ------- borrow of `_a` occurs here diff --git a/src/test/ui/borrowck/borrowck-in-static.nll.stderr b/src/test/ui/borrowck/borrowck-in-static.nll.stderr deleted file mode 100644 index da639a837a..0000000000 --- a/src/test/ui/borrowck/borrowck-in-static.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0507]: cannot move out of captured variable in an `Fn` closure - --> $DIR/borrowck-in-static.rs:5:17 - | -LL | let x = Box::new(0); - | - captured outer variable -LL | Box::new(|| x) - | ^ cannot move out of captured variable in an `Fn` closure - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/borrowck-in-static.rs b/src/test/ui/borrowck/borrowck-in-static.rs index c08f4138bf..43bb652a02 100644 --- a/src/test/ui/borrowck/borrowck-in-static.rs +++ b/src/test/ui/borrowck/borrowck-in-static.rs @@ -2,7 +2,7 @@ static FN : &'static (Fn() -> (BoxBox>) + Sync) = &|| { let x = Box::new(0); - Box::new(|| x) //~ ERROR cannot move out of captured outer variable + Box::new(|| x) //~ ERROR cannot move out of captured variable in an `Fn` closure }; fn main() { diff --git a/src/test/ui/borrowck/borrowck-in-static.stderr b/src/test/ui/borrowck/borrowck-in-static.stderr index 6eeaf428c5..da639a837a 100644 --- a/src/test/ui/borrowck/borrowck-in-static.stderr +++ b/src/test/ui/borrowck/borrowck-in-static.stderr @@ -1,10 +1,10 @@ -error[E0507]: cannot move out of captured outer variable in an `Fn` closure +error[E0507]: cannot move out of captured variable in an `Fn` closure --> $DIR/borrowck-in-static.rs:5:17 | LL | let x = Box::new(0); | - captured outer variable LL | Box::new(|| x) - | ^ cannot move out of captured outer variable in an `Fn` closure + | ^ cannot move out of captured variable in an `Fn` closure error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-init-in-fru.ast.nll.stderr b/src/test/ui/borrowck/borrowck-init-in-fru.ast.nll.stderr deleted file mode 100644 index 35649b1bb2..0000000000 --- a/src/test/ui/borrowck/borrowck-init-in-fru.ast.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0381]: use of possibly uninitialized variable: `origin` - --> $DIR/borrowck-init-in-fru.rs:12:5 - | -LL | origin = Point { x: 10, ..origin }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of possibly uninitialized `origin.y` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-init-in-fru.ast.stderr b/src/test/ui/borrowck/borrowck-init-in-fru.ast.stderr deleted file mode 100644 index 3ba0109876..0000000000 --- a/src/test/ui/borrowck/borrowck-init-in-fru.ast.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0381]: use of possibly uninitialized variable: `origin.y` - --> $DIR/borrowck-init-in-fru.rs:12:31 - | -LL | origin = Point { x: 10, ..origin }; - | ^^^^^^ use of possibly uninitialized `origin.y` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-init-in-fru.rs b/src/test/ui/borrowck/borrowck-init-in-fru.rs index 9a06c7ab77..6da3098dc9 100644 --- a/src/test/ui/borrowck/borrowck-init-in-fru.rs +++ b/src/test/ui/borrowck/borrowck-init-in-fru.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - #[derive(Clone)] struct Point { x: isize, @@ -10,7 +7,6 @@ struct Point { fn main() { let mut origin: Point; origin = Point { x: 10, ..origin }; - //[ast]~^ ERROR use of possibly uninitialized variable: `origin.y` [E0381] - //[mir]~^^ ERROR [E0381] + //~^ ERROR use of possibly uninitialized variable: `origin` [E0381] origin.clone(); } diff --git a/src/test/ui/borrowck/borrowck-init-in-fru.mir.stderr b/src/test/ui/borrowck/borrowck-init-in-fru.stderr similarity index 88% rename from src/test/ui/borrowck/borrowck-init-in-fru.mir.stderr rename to src/test/ui/borrowck/borrowck-init-in-fru.stderr index 35649b1bb2..fe55bc2fd9 100644 --- a/src/test/ui/borrowck/borrowck-init-in-fru.mir.stderr +++ b/src/test/ui/borrowck/borrowck-init-in-fru.stderr @@ -1,5 +1,5 @@ error[E0381]: use of possibly uninitialized variable: `origin` - --> $DIR/borrowck-init-in-fru.rs:12:5 + --> $DIR/borrowck-init-in-fru.rs:9:5 | LL | origin = Point { x: 10, ..origin }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of possibly uninitialized `origin.y` diff --git a/src/test/ui/borrowck/borrowck-insert-during-each.nll.stderr b/src/test/ui/borrowck/borrowck-insert-during-each.nll.stderr deleted file mode 100644 index b004447bf4..0000000000 --- a/src/test/ui/borrowck/borrowck-insert-during-each.nll.stderr +++ /dev/null @@ -1,30 +0,0 @@ -error[E0501]: cannot borrow `*f` as mutable because previous closure requires unique access - --> $DIR/borrowck-insert-during-each.rs:16:3 - | -LL | f.foo( - | ^ --- first borrow later used by call - | ___| - | | -LL | | |a| { - | | --- closure construction occurs here -LL | | f.n.insert(*a); - | | - first borrow occurs due to use of `f` in closure -LL | | }) - | |__________^ second borrow occurs here - -error[E0500]: closure requires unique access to `f` but it is already borrowed - --> $DIR/borrowck-insert-during-each.rs:17:9 - | -LL | f.foo( - | - --- first borrow later used by call - | | - | borrow occurs here -LL | |a| { - | ^^^ closure construction occurs here -LL | f.n.insert(*a); - | - second borrow occurs due to use of `f` in closure - -error: aborting due to 2 previous errors - -Some errors occurred: E0500, E0501. -For more information about an error, try `rustc --explain E0500`. diff --git a/src/test/ui/borrowck/borrowck-insert-during-each.rs b/src/test/ui/borrowck/borrowck-insert-during-each.rs index 025da4d613..df967e6118 100644 --- a/src/test/ui/borrowck/borrowck-insert-during-each.rs +++ b/src/test/ui/borrowck/borrowck-insert-during-each.rs @@ -13,7 +13,8 @@ impl Foo { } fn bar(f: &mut Foo) { - f.foo( + f.foo( + //~^ ERROR cannot borrow `*f` as mutable |a| { //~ ERROR closure requires unique access to `f` f.n.insert(*a); }) diff --git a/src/test/ui/borrowck/borrowck-insert-during-each.stderr b/src/test/ui/borrowck/borrowck-insert-during-each.stderr index 3b6339757c..796390c093 100644 --- a/src/test/ui/borrowck/borrowck-insert-during-each.stderr +++ b/src/test/ui/borrowck/borrowck-insert-during-each.stderr @@ -1,15 +1,32 @@ -error[E0500]: closure requires unique access to `f` but `*f` is already borrowed - --> $DIR/borrowck-insert-during-each.rs:17:9 +error[E0501]: cannot borrow `*f` as mutable because previous closure requires unique access + --> $DIR/borrowck-insert-during-each.rs:16:5 | -LL | f.foo( - | - borrow occurs here +LL | f.foo( + | ^ --- first borrow later used by call + | _____| + | | +LL | | +LL | | |a| { + | | --- closure construction occurs here +LL | | f.n.insert(*a); + | | - first borrow occurs due to use of `f` in closure +LL | | }) + | |__________^ second borrow occurs here + +error[E0500]: closure requires unique access to `f` but it is already borrowed + --> $DIR/borrowck-insert-during-each.rs:18:9 + | +LL | f.foo( + | - --- first borrow later used by call + | | + | borrow occurs here +LL | LL | |a| { | ^^^ closure construction occurs here LL | f.n.insert(*a); - | - borrow occurs due to use of `f` in closure -LL | }) - | - borrow ends here + | - second borrow occurs due to use of `f` in closure -error: aborting due to previous error +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0500`. +Some errors have detailed explanations: E0500, E0501. +For more information about an error, try `rustc --explain E0500`. diff --git a/src/test/ui/borrowck/borrowck-issue-14498.ast.nll.stderr b/src/test/ui/borrowck/borrowck-issue-14498.ast.nll.stderr deleted file mode 100644 index b53cfddbe9..0000000000 --- a/src/test/ui/borrowck/borrowck-issue-14498.ast.nll.stderr +++ /dev/null @@ -1,108 +0,0 @@ -error[E0594]: cannot assign to `***p` which is behind a `&` reference - --> $DIR/borrowck-issue-14498.rs:19:5 - | -LL | let p = &y; - | -- help: consider changing this to be a mutable reference: `&mut y` -LL | ***p = 2; - | ^^^^^^^^ `p` is a `&` reference, so the data it refers to cannot be written - -error[E0506]: cannot assign to `**y` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:29:5 - | -LL | let p = &y; - | -- borrow of `**y` occurs here -LL | let q = &***p; -LL | **y = 2; - | ^^^^^^^ assignment to borrowed `**y` occurs here -LL | -LL | drop(p); - | - borrow later used here - -error[E0506]: cannot assign to `**y` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:40:5 - | -LL | let p = &y; - | -- borrow of `**y` occurs here -LL | let q = &***p; -LL | **y = 2; - | ^^^^^^^ assignment to borrowed `**y` occurs here -LL | -LL | drop(p); - | - borrow later used here - -error[E0506]: cannot assign to `**y` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:51:5 - | -LL | let p = &y; - | -- borrow of `**y` occurs here -LL | let q = &***p; -LL | **y = 2; - | ^^^^^^^ assignment to borrowed `**y` occurs here -LL | -LL | drop(p); - | - borrow later used here - -error[E0506]: cannot assign to `**y` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:62:5 - | -LL | let p = &y; - | -- borrow of `**y` occurs here -LL | let q = &***p; -LL | **y = 2; - | ^^^^^^^ assignment to borrowed `**y` occurs here -LL | -LL | drop(p); - | - borrow later used here - -error[E0506]: cannot assign to `**y.a` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:73:5 - | -LL | let p = &y.a; - | ---- borrow of `**y.a` occurs here -LL | let q = &***p; -LL | **y.a = 2; - | ^^^^^^^^^ assignment to borrowed `**y.a` occurs here -LL | -LL | drop(p); - | - borrow later used here - -error[E0506]: cannot assign to `**y.a` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:84:5 - | -LL | let p = &y.a; - | ---- borrow of `**y.a` occurs here -LL | let q = &***p; -LL | **y.a = 2; - | ^^^^^^^^^ assignment to borrowed `**y.a` occurs here -LL | -LL | drop(p); - | - borrow later used here - -error[E0506]: cannot assign to `**y.a` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:95:5 - | -LL | let p = &y.a; - | ---- borrow of `**y.a` occurs here -LL | let q = &***p; -LL | **y.a = 2; - | ^^^^^^^^^ assignment to borrowed `**y.a` occurs here -LL | -LL | drop(p); - | - borrow later used here - -error[E0506]: cannot assign to `**y.a` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:106:5 - | -LL | let p = &y.a; - | ---- borrow of `**y.a` occurs here -LL | let q = &***p; -LL | **y.a = 2; - | ^^^^^^^^^ assignment to borrowed `**y.a` occurs here -LL | -LL | drop(p); - | - borrow later used here - -error: aborting due to 9 previous errors - -Some errors occurred: E0506, E0594. -For more information about an error, try `rustc --explain E0506`. diff --git a/src/test/ui/borrowck/borrowck-issue-14498.ast.stderr b/src/test/ui/borrowck/borrowck-issue-14498.ast.stderr deleted file mode 100644 index b002ee7908..0000000000 --- a/src/test/ui/borrowck/borrowck-issue-14498.ast.stderr +++ /dev/null @@ -1,82 +0,0 @@ -error[E0389]: cannot assign to data in a `&` reference - --> $DIR/borrowck-issue-14498.rs:19:5 - | -LL | ***p = 2; - | ^^^^^^^^ assignment into an immutable reference - -error[E0506]: cannot assign to `**y` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:29:5 - | -LL | let p = &y; - | - borrow of `**y` occurs here -LL | let q = &***p; -LL | **y = 2; - | ^^^^^^^ assignment to borrowed `**y` occurs here - -error[E0506]: cannot assign to `**y` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:40:5 - | -LL | let p = &y; - | - borrow of `**y` occurs here -LL | let q = &***p; -LL | **y = 2; - | ^^^^^^^ assignment to borrowed `**y` occurs here - -error[E0506]: cannot assign to `**y` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:51:5 - | -LL | let p = &y; - | - borrow of `**y` occurs here -LL | let q = &***p; -LL | **y = 2; - | ^^^^^^^ assignment to borrowed `**y` occurs here - -error[E0506]: cannot assign to `**y` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:62:5 - | -LL | let p = &y; - | - borrow of `**y` occurs here -LL | let q = &***p; -LL | **y = 2; - | ^^^^^^^ assignment to borrowed `**y` occurs here - -error[E0506]: cannot assign to `**y.a` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:73:5 - | -LL | let p = &y.a; - | --- borrow of `**y.a` occurs here -LL | let q = &***p; -LL | **y.a = 2; - | ^^^^^^^^^ assignment to borrowed `**y.a` occurs here - -error[E0506]: cannot assign to `**y.a` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:84:5 - | -LL | let p = &y.a; - | --- borrow of `**y.a` occurs here -LL | let q = &***p; -LL | **y.a = 2; - | ^^^^^^^^^ assignment to borrowed `**y.a` occurs here - -error[E0506]: cannot assign to `**y.a` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:95:5 - | -LL | let p = &y.a; - | --- borrow of `**y.a` occurs here -LL | let q = &***p; -LL | **y.a = 2; - | ^^^^^^^^^ assignment to borrowed `**y.a` occurs here - -error[E0506]: cannot assign to `**y.a` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:106:5 - | -LL | let p = &y.a; - | --- borrow of `**y.a` occurs here -LL | let q = &***p; -LL | **y.a = 2; - | ^^^^^^^^^ assignment to borrowed `**y.a` occurs here - -error: aborting due to 9 previous errors - -Some errors occurred: E0389, E0506. -For more information about an error, try `rustc --explain E0389`. diff --git a/src/test/ui/borrowck/borrowck-issue-14498.rs b/src/test/ui/borrowck/borrowck-issue-14498.rs index da62c5a950..e8c9019264 100644 --- a/src/test/ui/borrowck/borrowck-issue-14498.rs +++ b/src/test/ui/borrowck/borrowck-issue-14498.rs @@ -4,9 +4,6 @@ // Also includes tests of the errors reported when the Box in question // is immutable (#14270). -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - #![feature(box_syntax)] struct A { a: isize } @@ -16,8 +13,7 @@ fn indirect_write_to_imm_box() { let mut x: isize = 1; let y: Box<_> = box &mut x; let p = &y; - ***p = 2; //[ast]~ ERROR cannot assign to data in a `&` reference - //[mir]~^ ERROR cannot assign to `***p` + ***p = 2; //~ ERROR cannot assign to `***p` drop(p); } @@ -26,8 +22,7 @@ fn borrow_in_var_from_var() { let mut y: Box<_> = box &mut x; let p = &y; let q = &***p; - **y = 2; //[ast]~ ERROR cannot assign to `**y` because it is borrowed - //[mir]~^ ERROR cannot assign to `**y` because it is borrowed + **y = 2; //~ ERROR cannot assign to `**y` because it is borrowed drop(p); drop(q); } @@ -37,8 +32,7 @@ fn borrow_in_var_from_var_via_imm_box() { let y: Box<_> = box &mut x; let p = &y; let q = &***p; - **y = 2; //[ast]~ ERROR cannot assign to `**y` because it is borrowed - //[mir]~^ ERROR cannot assign to `**y` because it is borrowed + **y = 2; //~ ERROR cannot assign to `**y` because it is borrowed drop(p); drop(q); } @@ -48,8 +42,7 @@ fn borrow_in_var_from_field() { let mut y: Box<_> = box &mut x.a; let p = &y; let q = &***p; - **y = 2; //[ast]~ ERROR cannot assign to `**y` because it is borrowed - //[mir]~^ ERROR cannot assign to `**y` because it is borrowed + **y = 2; //~ ERROR cannot assign to `**y` because it is borrowed drop(p); drop(q); } @@ -59,8 +52,7 @@ fn borrow_in_var_from_field_via_imm_box() { let y: Box<_> = box &mut x.a; let p = &y; let q = &***p; - **y = 2; //[ast]~ ERROR cannot assign to `**y` because it is borrowed - //[mir]~^ ERROR cannot assign to `**y` because it is borrowed + **y = 2; //~ ERROR cannot assign to `**y` because it is borrowed drop(p); drop(q); } @@ -70,8 +62,7 @@ fn borrow_in_field_from_var() { let mut y = B { a: box &mut x }; let p = &y.a; let q = &***p; - **y.a = 2; //[ast]~ ERROR cannot assign to `**y.a` because it is borrowed - //[mir]~^ ERROR cannot assign to `**y.a` because it is borrowed + **y.a = 2; //~ ERROR cannot assign to `**y.a` because it is borrowed drop(p); drop(q); } @@ -81,8 +72,7 @@ fn borrow_in_field_from_var_via_imm_box() { let y = B { a: box &mut x }; let p = &y.a; let q = &***p; - **y.a = 2; //[ast]~ ERROR cannot assign to `**y.a` because it is borrowed - //[mir]~^ ERROR cannot assign to `**y.a` because it is borrowed + **y.a = 2; //~ ERROR cannot assign to `**y.a` because it is borrowed drop(p); drop(q); } @@ -92,8 +82,7 @@ fn borrow_in_field_from_field() { let mut y = B { a: box &mut x.a }; let p = &y.a; let q = &***p; - **y.a = 2; //[ast]~ ERROR cannot assign to `**y.a` because it is borrowed - //[mir]~^ ERROR cannot assign to `**y.a` because it is borrowed + **y.a = 2; //~ ERROR cannot assign to `**y.a` because it is borrowed drop(p); drop(q); } @@ -103,8 +92,7 @@ fn borrow_in_field_from_field_via_imm_box() { let y = B { a: box &mut x.a }; let p = &y.a; let q = &***p; - **y.a = 2; //[ast]~ ERROR cannot assign to `**y.a` because it is borrowed - //[mir]~^ ERROR cannot assign to `**y.a` because it is borrowed + **y.a = 2; //~ ERROR cannot assign to `**y.a` because it is borrowed drop(p); drop(q); } diff --git a/src/test/ui/borrowck/borrowck-issue-14498.mir.stderr b/src/test/ui/borrowck/borrowck-issue-14498.stderr similarity index 85% rename from src/test/ui/borrowck/borrowck-issue-14498.mir.stderr rename to src/test/ui/borrowck/borrowck-issue-14498.stderr index b53cfddbe9..fec4c27520 100644 --- a/src/test/ui/borrowck/borrowck-issue-14498.mir.stderr +++ b/src/test/ui/borrowck/borrowck-issue-14498.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to `***p` which is behind a `&` reference - --> $DIR/borrowck-issue-14498.rs:19:5 + --> $DIR/borrowck-issue-14498.rs:16:5 | LL | let p = &y; | -- help: consider changing this to be a mutable reference: `&mut y` @@ -7,102 +7,93 @@ LL | ***p = 2; | ^^^^^^^^ `p` is a `&` reference, so the data it refers to cannot be written error[E0506]: cannot assign to `**y` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:29:5 + --> $DIR/borrowck-issue-14498.rs:25:5 | LL | let p = &y; | -- borrow of `**y` occurs here LL | let q = &***p; LL | **y = 2; | ^^^^^^^ assignment to borrowed `**y` occurs here -LL | LL | drop(p); | - borrow later used here error[E0506]: cannot assign to `**y` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:40:5 + --> $DIR/borrowck-issue-14498.rs:35:5 | LL | let p = &y; | -- borrow of `**y` occurs here LL | let q = &***p; LL | **y = 2; | ^^^^^^^ assignment to borrowed `**y` occurs here -LL | LL | drop(p); | - borrow later used here error[E0506]: cannot assign to `**y` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:51:5 + --> $DIR/borrowck-issue-14498.rs:45:5 | LL | let p = &y; | -- borrow of `**y` occurs here LL | let q = &***p; LL | **y = 2; | ^^^^^^^ assignment to borrowed `**y` occurs here -LL | LL | drop(p); | - borrow later used here error[E0506]: cannot assign to `**y` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:62:5 + --> $DIR/borrowck-issue-14498.rs:55:5 | LL | let p = &y; | -- borrow of `**y` occurs here LL | let q = &***p; LL | **y = 2; | ^^^^^^^ assignment to borrowed `**y` occurs here -LL | LL | drop(p); | - borrow later used here error[E0506]: cannot assign to `**y.a` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:73:5 + --> $DIR/borrowck-issue-14498.rs:65:5 | LL | let p = &y.a; | ---- borrow of `**y.a` occurs here LL | let q = &***p; LL | **y.a = 2; | ^^^^^^^^^ assignment to borrowed `**y.a` occurs here -LL | LL | drop(p); | - borrow later used here error[E0506]: cannot assign to `**y.a` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:84:5 + --> $DIR/borrowck-issue-14498.rs:75:5 | LL | let p = &y.a; | ---- borrow of `**y.a` occurs here LL | let q = &***p; LL | **y.a = 2; | ^^^^^^^^^ assignment to borrowed `**y.a` occurs here -LL | LL | drop(p); | - borrow later used here error[E0506]: cannot assign to `**y.a` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:95:5 + --> $DIR/borrowck-issue-14498.rs:85:5 | LL | let p = &y.a; | ---- borrow of `**y.a` occurs here LL | let q = &***p; LL | **y.a = 2; | ^^^^^^^^^ assignment to borrowed `**y.a` occurs here -LL | LL | drop(p); | - borrow later used here error[E0506]: cannot assign to `**y.a` because it is borrowed - --> $DIR/borrowck-issue-14498.rs:106:5 + --> $DIR/borrowck-issue-14498.rs:95:5 | LL | let p = &y.a; | ---- borrow of `**y.a` occurs here LL | let q = &***p; LL | **y.a = 2; | ^^^^^^^^^ assignment to borrowed `**y.a` occurs here -LL | LL | drop(p); | - borrow later used here error: aborting due to 9 previous errors -Some errors occurred: E0506, E0594. -For more information about an error, try `rustc --explain E0506`. +For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/borrowck/borrowck-issue-2657-1.nll.stderr b/src/test/ui/borrowck/borrowck-issue-2657-1.nll.stderr deleted file mode 100644 index 4ea4eb8f00..0000000000 --- a/src/test/ui/borrowck/borrowck-issue-2657-1.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/borrowck-issue-2657-1.rs:9:18 - | -LL | Some(ref _y) => { - | ------ borrow of `x.0` occurs here -LL | let _a = x; - | ^ move out of `x` occurs here -LL | _y.use_ref(); - | -- borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/borrowck/borrowck-issue-2657-1.stderr b/src/test/ui/borrowck/borrowck-issue-2657-1.stderr index d9ad86b4f8..4ea4eb8f00 100644 --- a/src/test/ui/borrowck/borrowck-issue-2657-1.stderr +++ b/src/test/ui/borrowck/borrowck-issue-2657-1.stderr @@ -1,10 +1,12 @@ error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/borrowck-issue-2657-1.rs:9:13 + --> $DIR/borrowck-issue-2657-1.rs:9:18 | LL | Some(ref _y) => { | ------ borrow of `x.0` occurs here LL | let _a = x; - | ^^ move out of `x` occurs here + | ^ move out of `x` occurs here +LL | _y.use_ref(); + | -- borrow later used here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-issue-2657-2.nll.stderr b/src/test/ui/borrowck/borrowck-issue-2657-2.nll.stderr deleted file mode 100644 index 4ef36df52d..0000000000 --- a/src/test/ui/borrowck/borrowck-issue-2657-2.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-issue-2657-2.rs:7:18 - | -LL | let _b = *y; - | ^^ - | | - | cannot move out of borrowed content - | help: consider removing the `*`: `y` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/borrowck-issue-2657-2.stderr b/src/test/ui/borrowck/borrowck-issue-2657-2.stderr index 1314b1a14f..4ef36df52d 100644 --- a/src/test/ui/borrowck/borrowck-issue-2657-2.stderr +++ b/src/test/ui/borrowck/borrowck-issue-2657-2.stderr @@ -5,7 +5,7 @@ LL | let _b = *y; | ^^ | | | cannot move out of borrowed content - | help: consider using a reference instead: `&*y` + | help: consider removing the `*`: `y` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-issue-48962.rs b/src/test/ui/borrowck/borrowck-issue-48962.rs index e7df319a0b..86061c8cd6 100644 --- a/src/test/ui/borrowck/borrowck-issue-48962.rs +++ b/src/test/ui/borrowck/borrowck-issue-48962.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - struct Node { elem: i32, next: Option>, diff --git a/src/test/ui/borrowck/borrowck-issue-48962.stderr b/src/test/ui/borrowck/borrowck-issue-48962.stderr index a5462b4139..ee174f6736 100644 --- a/src/test/ui/borrowck/borrowck-issue-48962.stderr +++ b/src/test/ui/borrowck/borrowck-issue-48962.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `src` - --> $DIR/borrowck-issue-48962.rs:16:5 + --> $DIR/borrowck-issue-48962.rs:14:5 | LL | let mut src = &mut node; | ------- move occurs because `src` has type `&mut Node`, which does not implement the `Copy` trait @@ -9,7 +9,7 @@ LL | src.next = None; | ^^^^^^^^ value used here after move error[E0382]: use of moved value: `src` - --> $DIR/borrowck-issue-48962.rs:22:5 + --> $DIR/borrowck-issue-48962.rs:20:5 | LL | let mut src = &mut (22, 44); | ------- move occurs because `src` has type `&mut (i32, i32)`, which does not implement the `Copy` trait diff --git a/src/test/ui/borrowck/borrowck-lend-flow-if.nll.stderr b/src/test/ui/borrowck/borrowck-lend-flow-if.nll.stderr deleted file mode 100644 index 68a82bdb57..0000000000 --- a/src/test/ui/borrowck/borrowck-lend-flow-if.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0502]: cannot borrow `*v` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-lend-flow-if.rs:29:16 - | -LL | _w = &v; - | -- immutable borrow occurs here -LL | } -LL | borrow_mut(&mut *v); - | ^^^^^^^ mutable borrow occurs here -LL | _w.use_ref(); - | -- immutable borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-lend-flow-if.stderr b/src/test/ui/borrowck/borrowck-lend-flow-if.stderr index 1acd47ce58..68a82bdb57 100644 --- a/src/test/ui/borrowck/borrowck-lend-flow-if.stderr +++ b/src/test/ui/borrowck/borrowck-lend-flow-if.stderr @@ -1,14 +1,13 @@ -error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immutable - --> $DIR/borrowck-lend-flow-if.rs:29:21 +error[E0502]: cannot borrow `*v` as mutable because it is also borrowed as immutable + --> $DIR/borrowck-lend-flow-if.rs:29:16 | LL | _w = &v; - | - immutable borrow occurs here + | -- immutable borrow occurs here LL | } LL | borrow_mut(&mut *v); - | ^^ mutable borrow occurs here + | ^^^^^^^ mutable borrow occurs here LL | _w.use_ref(); -LL | } - | - immutable borrow ends here + | -- immutable borrow later used here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-lend-flow-loop.ast.stderr b/src/test/ui/borrowck/borrowck-lend-flow-loop.ast.stderr deleted file mode 100644 index ab10caa8e3..0000000000 --- a/src/test/ui/borrowck/borrowck-lend-flow-loop.ast.stderr +++ /dev/null @@ -1,93 +0,0 @@ -error[E0502]: cannot borrow `*v` as immutable because `v` is also borrowed as mutable - --> $DIR/borrowck-lend-flow-loop.rs:35:17 - | -LL | let mut x = &mut v; - | - mutable borrow occurs here -... -LL | borrow(&*v); - | ^^ immutable borrow occurs here -LL | } -LL | } - | - mutable borrow ends here - -error[E0502]: cannot borrow `*v` as immutable because `v` is also borrowed as mutable - --> $DIR/borrowck-lend-flow-loop.rs:45:17 - | -LL | let mut x = &mut v; - | - mutable borrow occurs here -LL | for _ in 0..3 { -LL | borrow(&*v); - | ^^ immutable borrow occurs here -... -LL | } - | - mutable borrow ends here - -error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immutable - --> $DIR/borrowck-lend-flow-loop.rs:57:25 - | -LL | borrow_mut(&mut *v); - | ^^ mutable borrow occurs here -LL | _x = &v; - | - immutable borrow occurs here -LL | } -LL | } - | - immutable borrow ends here - -error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immutable - --> $DIR/borrowck-lend-flow-loop.rs:69:25 - | -LL | borrow_mut(&mut *v); - | ^^ mutable borrow occurs here -LL | _x = &v; - | - immutable borrow occurs here -LL | } -LL | } - | - immutable borrow ends here - -error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immutable - --> $DIR/borrowck-lend-flow-loop.rs:86:21 - | -LL | _x = &v; - | - immutable borrow occurs here -... -LL | borrow_mut(&mut *v); - | ^^ mutable borrow occurs here -LL | } - | - immutable borrow ends here - -error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immutable - --> $DIR/borrowck-lend-flow-loop.rs:100:21 - | -LL | _x = &v; - | - immutable borrow occurs here -... -LL | borrow_mut(&mut *v); - | ^^ mutable borrow occurs here -LL | } - | - immutable borrow ends here - -error[E0502]: cannot borrow `*v` as immutable because `v` is also borrowed as mutable - --> $DIR/borrowck-lend-flow-loop.rs:109:17 - | -LL | borrow(&*v); - | ^^ immutable borrow occurs here -... -LL | x = &mut v; - | - mutable borrow occurs here -... -LL | } - | - mutable borrow ends here - -error[E0499]: cannot borrow `v` as mutable more than once at a time - --> $DIR/borrowck-lend-flow-loop.rs:112:22 - | -LL | x = &mut v; - | ^ mutable borrow starts here in previous iteration of loop -... -LL | } - | - mutable borrow ends here - -error: aborting due to 8 previous errors - -Some errors occurred: E0499, E0502. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-lend-flow-loop.rs b/src/test/ui/borrowck/borrowck-lend-flow-loop.rs index 7008e5cef4..b650df91ca 100644 --- a/src/test/ui/borrowck/borrowck-lend-flow-loop.rs +++ b/src/test/ui/borrowck/borrowck-lend-flow-loop.rs @@ -1,19 +1,3 @@ -// revisions: ast nll - -// Since we are testing nll migration explicitly as a separate -// revision, don't worry about the --compare-mode=nll on this test. - -// ignore-compare-mode-nll - -//[ast]compile-flags: -Z borrowck=ast -//[nll]compile-flags: -Z borrowck=migrate -Z two-phase-borrows - -// Note: the borrowck analysis was originally a flow-insensitive pass -// over the AST. Therefore, some of these (AST) errors are marked as -// spurious and are corrected by the flow-sensitive (NLL) analysis. -// The others are either genuine or would require more advanced -// changes. The latter cases are noted. - #![feature(box_syntax)] fn borrow(_v: &isize) {} @@ -26,13 +10,13 @@ fn inc(v: &mut Box) { } fn loop_overarching_alias_mut() { - // In this instance, the borrow encompasses the entire loop. + // In this instance, the borrow ends on the line before the loop let mut v: Box<_> = box 3; let mut x = &mut v; **x += 1; loop { - borrow(&*v); //[ast]~ ERROR cannot borrow + borrow(&*v); // OK } } @@ -42,38 +26,37 @@ fn block_overarching_alias_mut() { let mut v: Box<_> = box 3; let mut x = &mut v; for _ in 0..3 { - borrow(&*v); //[ast]~ ERROR cannot borrow - //[nll]~^ ERROR cannot borrow + borrow(&*v); //~ ERROR cannot borrow } *x = box 5; } fn loop_aliased_mut() { - // In this instance, the borrow is carried through the loop. + // In this instance, the borrow ends right after each assignment to _x let mut v: Box<_> = box 3; let mut w: Box<_> = box 4; let mut _x = &w; loop { - borrow_mut(&mut *v); //[ast]~ ERROR cannot borrow + borrow_mut(&mut *v); // OK _x = &v; } } fn while_aliased_mut() { - // In this instance, the borrow is carried through the loop. + // In this instance, the borrow ends right after each assignment to _x let mut v: Box<_> = box 3; let mut w: Box<_> = box 4; let mut _x = &w; while cond() { - borrow_mut(&mut *v); //[ast]~ ERROR cannot borrow + borrow_mut(&mut *v); // OK _x = &v; } } fn loop_aliased_mut_break() { - // In this instance, the borrow is carried through the loop. + // In this instance, the borrow ends right after each assignment to _x let mut v: Box<_> = box 3; let mut w: Box<_> = box 4; @@ -83,11 +66,11 @@ fn loop_aliased_mut_break() { _x = &v; break; } - borrow_mut(&mut *v); //[ast]~ ERROR cannot borrow + borrow_mut(&mut *v); // OK } fn while_aliased_mut_break() { - // In this instance, the borrow is carried through the loop. + // In this instance, the borrow ends right after each assignment to _x let mut v: Box<_> = box 3; let mut w: Box<_> = box 4; @@ -97,7 +80,7 @@ fn while_aliased_mut_break() { _x = &v; break; } - borrow_mut(&mut *v); //[ast]~ ERROR cannot borrow + borrow_mut(&mut *v); // OK } fn while_aliased_mut_cond(cond: bool, cond2: bool) { @@ -106,10 +89,9 @@ fn while_aliased_mut_cond(cond: bool, cond2: bool) { let mut x = &mut w; while cond { **x += 1; - borrow(&*v); //[ast]~ ERROR cannot borrow - //[nll]~^ ERROR cannot borrow + borrow(&*v); //~ ERROR cannot borrow if cond2 { - x = &mut v; //[ast]~ ERROR cannot borrow + x = &mut v; // OK } } } diff --git a/src/test/ui/borrowck/borrowck-lend-flow-loop.nll.stderr b/src/test/ui/borrowck/borrowck-lend-flow-loop.stderr similarity index 82% rename from src/test/ui/borrowck/borrowck-lend-flow-loop.nll.stderr rename to src/test/ui/borrowck/borrowck-lend-flow-loop.stderr index 6dd6c1fc26..f02c357f48 100644 --- a/src/test/ui/borrowck/borrowck-lend-flow-loop.nll.stderr +++ b/src/test/ui/borrowck/borrowck-lend-flow-loop.stderr @@ -1,24 +1,24 @@ error[E0502]: cannot borrow `*v` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-lend-flow-loop.rs:45:16 + --> $DIR/borrowck-lend-flow-loop.rs:29:16 | LL | let mut x = &mut v; | ------ mutable borrow occurs here LL | for _ in 0..3 { LL | borrow(&*v); | ^^^ immutable borrow occurs here -... +LL | } LL | *x = box 5; | -- mutable borrow later used here error[E0502]: cannot borrow `*v` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-lend-flow-loop.rs:109:16 + --> $DIR/borrowck-lend-flow-loop.rs:92:16 | LL | **x += 1; | -------- mutable borrow later used here LL | borrow(&*v); | ^^^ immutable borrow occurs here -... -LL | x = &mut v; +LL | if cond2 { +LL | x = &mut v; // OK | ------ mutable borrow occurs here error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/borrowck-lend-flow-match.ast.stderr b/src/test/ui/borrowck/borrowck-lend-flow-match.ast.stderr deleted file mode 100644 index 236bc11f2b..0000000000 --- a/src/test/ui/borrowck/borrowck-lend-flow-match.ast.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/borrowck-lend-flow-match.rs:18:13 - | -LL | Some(ref r) => { - | ----- borrow of `x` occurs here -LL | x = Some(1); - | ^^^^^^^^^^^ assignment to borrowed `x` occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/borrowck/borrowck-lend-flow-match.mir.stderr b/src/test/ui/borrowck/borrowck-lend-flow-match.mir.stderr deleted file mode 100644 index 734f965195..0000000000 --- a/src/test/ui/borrowck/borrowck-lend-flow-match.mir.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/borrowck-lend-flow-match.rs:18:13 - | -LL | Some(ref r) => { - | ----- borrow of `x` occurs here -LL | x = Some(1); - | ^^^^^^^^^^^ assignment to borrowed `x` occurs here -LL | -LL | drop(r); - | - borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/borrowck/borrowck-lend-flow-match.rs b/src/test/ui/borrowck/borrowck-lend-flow-match.rs index 4cd2a239b4..9737bc7695 100644 --- a/src/test/ui/borrowck/borrowck-lend-flow-match.rs +++ b/src/test/ui/borrowck/borrowck-lend-flow-match.rs @@ -1,11 +1,5 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - -#![allow(unused_variables)] -#![allow(unused_assignments)] - fn separate_arms() { - // Here both arms perform assignments, but only is illegal. + // Here both arms perform assignments, but only one is illegal. let mut x = None; match x { @@ -15,12 +9,10 @@ fn separate_arms() { x = Some(0); } Some(ref r) => { - x = Some(1); //[ast]~ ERROR cannot assign - //[mir]~^ ERROR cannot assign to `x` because it is borrowed + x = Some(1); //~ ERROR cannot assign to `x` because it is borrowed drop(r); } } - x.clone(); // just to prevent liveness warnings } fn main() {} diff --git a/src/test/ui/borrowck/borrowck-lend-flow-match.ast.nll.stderr b/src/test/ui/borrowck/borrowck-lend-flow-match.stderr similarity index 89% rename from src/test/ui/borrowck/borrowck-lend-flow-match.ast.nll.stderr rename to src/test/ui/borrowck/borrowck-lend-flow-match.stderr index 734f965195..66f1cd9bd5 100644 --- a/src/test/ui/borrowck/borrowck-lend-flow-match.ast.nll.stderr +++ b/src/test/ui/borrowck/borrowck-lend-flow-match.stderr @@ -1,11 +1,10 @@ error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/borrowck-lend-flow-match.rs:18:13 + --> $DIR/borrowck-lend-flow-match.rs:12:13 | LL | Some(ref r) => { | ----- borrow of `x` occurs here LL | x = Some(1); | ^^^^^^^^^^^ assignment to borrowed `x` occurs here -LL | LL | drop(r); | - borrow later used here diff --git a/src/test/ui/borrowck/borrowck-lend-flow.nll.stderr b/src/test/ui/borrowck/borrowck-lend-flow.nll.stderr deleted file mode 100644 index 07b11b3e72..0000000000 --- a/src/test/ui/borrowck/borrowck-lend-flow.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0502]: cannot borrow `*v` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-lend-flow.rs:24:16 - | -LL | let _w = &v; - | -- immutable borrow occurs here -LL | borrow_mut(&mut *v); - | ^^^^^^^ mutable borrow occurs here -LL | _w.use_ref(); - | -- immutable borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-lend-flow.stderr b/src/test/ui/borrowck/borrowck-lend-flow.stderr index e39fb6c860..07b11b3e72 100644 --- a/src/test/ui/borrowck/borrowck-lend-flow.stderr +++ b/src/test/ui/borrowck/borrowck-lend-flow.stderr @@ -1,13 +1,12 @@ -error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immutable - --> $DIR/borrowck-lend-flow.rs:24:21 +error[E0502]: cannot borrow `*v` as mutable because it is also borrowed as immutable + --> $DIR/borrowck-lend-flow.rs:24:16 | LL | let _w = &v; - | - immutable borrow occurs here + | -- immutable borrow occurs here LL | borrow_mut(&mut *v); - | ^^ mutable borrow occurs here + | ^^^^^^^ mutable borrow occurs here LL | _w.use_ref(); -LL | } - | - immutable borrow ends here + | -- immutable borrow later used here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-loan-blocks-move-cc.nll.stderr b/src/test/ui/borrowck/borrowck-loan-blocks-move-cc.nll.stderr deleted file mode 100644 index 4497cfb71d..0000000000 --- a/src/test/ui/borrowck/borrowck-loan-blocks-move-cc.nll.stderr +++ /dev/null @@ -1,29 +0,0 @@ -error[E0505]: cannot move out of `v` because it is borrowed - --> $DIR/borrowck-loan-blocks-move-cc.rs:14:19 - | -LL | let w = &v; - | -- borrow of `v` occurs here -LL | thread::spawn(move|| { - | ^^^^^^ move out of `v` occurs here -LL | println!("v={}", *v); - | - move occurs due to use in closure -... -LL | w.use_ref(); - | - borrow later used here - -error[E0505]: cannot move out of `v` because it is borrowed - --> $DIR/borrowck-loan-blocks-move-cc.rs:24:19 - | -LL | let w = &v; - | -- borrow of `v` occurs here -LL | thread::spawn(move|| { - | ^^^^^^ move out of `v` occurs here -LL | println!("v={}", *v); - | - move occurs due to use in closure -... -LL | w.use_ref(); - | - borrow later used here - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/borrowck/borrowck-loan-blocks-move-cc.rs b/src/test/ui/borrowck/borrowck-loan-blocks-move-cc.rs index 29a20473f4..9fa46563fd 100644 --- a/src/test/ui/borrowck/borrowck-loan-blocks-move-cc.rs +++ b/src/test/ui/borrowck/borrowck-loan-blocks-move-cc.rs @@ -12,8 +12,8 @@ fn box_imm() { let v: Box<_> = box 3; let w = &v; thread::spawn(move|| { + //~^ ERROR cannot move out of `v` because it is borrowed println!("v={}", *v); - //~^ ERROR cannot move `v` into closure }); w.use_ref(); } @@ -22,8 +22,8 @@ fn box_imm_explicit() { let v: Box<_> = box 3; let w = &v; thread::spawn(move|| { + //~^ ERROR cannot move println!("v={}", *v); - //~^ ERROR cannot move }); w.use_ref(); } diff --git a/src/test/ui/borrowck/borrowck-loan-blocks-move-cc.stderr b/src/test/ui/borrowck/borrowck-loan-blocks-move-cc.stderr index b170635b4b..2acbcd94f8 100644 --- a/src/test/ui/borrowck/borrowck-loan-blocks-move-cc.stderr +++ b/src/test/ui/borrowck/borrowck-loan-blocks-move-cc.stderr @@ -1,21 +1,31 @@ -error[E0504]: cannot move `v` into closure because it is borrowed - --> $DIR/borrowck-loan-blocks-move-cc.rs:15:27 +error[E0505]: cannot move out of `v` because it is borrowed + --> $DIR/borrowck-loan-blocks-move-cc.rs:14:19 | LL | let w = &v; - | - borrow of `v` occurs here + | -- borrow of `v` occurs here LL | thread::spawn(move|| { + | ^^^^^^ move out of `v` occurs here +LL | LL | println!("v={}", *v); - | ^ move into closure occurs here + | - move occurs due to use in closure +LL | }); +LL | w.use_ref(); + | - borrow later used here -error[E0504]: cannot move `v` into closure because it is borrowed - --> $DIR/borrowck-loan-blocks-move-cc.rs:25:27 +error[E0505]: cannot move out of `v` because it is borrowed + --> $DIR/borrowck-loan-blocks-move-cc.rs:24:19 | LL | let w = &v; - | - borrow of `v` occurs here + | -- borrow of `v` occurs here LL | thread::spawn(move|| { + | ^^^^^^ move out of `v` occurs here +LL | LL | println!("v={}", *v); - | ^ move into closure occurs here + | - move occurs due to use in closure +LL | }); +LL | w.use_ref(); + | - borrow later used here error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0504`. +For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/borrowck/borrowck-loan-blocks-move.nll.stderr b/src/test/ui/borrowck/borrowck-loan-blocks-move.nll.stderr deleted file mode 100644 index 615660febb..0000000000 --- a/src/test/ui/borrowck/borrowck-loan-blocks-move.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0505]: cannot move out of `v` because it is borrowed - --> $DIR/borrowck-loan-blocks-move.rs:11:10 - | -LL | let w = &v; - | -- borrow of `v` occurs here -LL | take(v); - | ^ move out of `v` occurs here -LL | w.use_ref(); - | - borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/borrowck/borrowck-loan-blocks-move.stderr b/src/test/ui/borrowck/borrowck-loan-blocks-move.stderr index e6f0a691ec..615660febb 100644 --- a/src/test/ui/borrowck/borrowck-loan-blocks-move.stderr +++ b/src/test/ui/borrowck/borrowck-loan-blocks-move.stderr @@ -2,9 +2,11 @@ error[E0505]: cannot move out of `v` because it is borrowed --> $DIR/borrowck-loan-blocks-move.rs:11:10 | LL | let w = &v; - | - borrow of `v` occurs here + | -- borrow of `v` occurs here LL | take(v); | ^ move out of `v` occurs here +LL | w.use_ref(); + | - borrow later used here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.nll.stderr b/src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.nll.stderr deleted file mode 100644 index 1d1522a15b..0000000000 --- a/src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-loan-blocks-mut-uniq.rs:10:12 - | -LL | borrow(&*v, - | ------ --- immutable borrow occurs here - | | - | immutable borrow later used by call -LL | |w| { - | ^^^ mutable borrow occurs here -LL | v = box 4; - | - second borrow occurs due to use of `v` in closure - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.stderr b/src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.stderr index c916b7efc0..1d1522a15b 100644 --- a/src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.stderr +++ b/src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.stderr @@ -1,15 +1,14 @@ -error[E0502]: cannot borrow `v` as mutable because `*v` is also borrowed as immutable +error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable --> $DIR/borrowck-loan-blocks-mut-uniq.rs:10:12 | LL | borrow(&*v, - | -- immutable borrow occurs here + | ------ --- immutable borrow occurs here + | | + | immutable borrow later used by call LL | |w| { | ^^^ mutable borrow occurs here LL | v = box 4; - | - borrow occurs due to use of `v` in closure -... -LL | }) - | - immutable borrow ends here + | - second borrow occurs due to use of `v` in closure error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-loan-in-overloaded-op.nll.stderr b/src/test/ui/borrowck/borrowck-loan-in-overloaded-op.nll.stderr deleted file mode 100644 index 095ae7f56b..0000000000 --- a/src/test/ui/borrowck/borrowck-loan-in-overloaded-op.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: borrow of moved value: `x` - --> $DIR/borrowck-loan-in-overloaded-op.rs:21:20 - | -LL | let x = Foo(box 3); - | - move occurs because `x` has type `Foo`, which does not implement the `Copy` trait -LL | let _y = {x} + x.clone(); // the `{x}` forces a move to occur - | - ^ value borrowed here after move - | | - | value moved here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-loan-in-overloaded-op.rs b/src/test/ui/borrowck/borrowck-loan-in-overloaded-op.rs index 464f01ca74..1baa94edfb 100644 --- a/src/test/ui/borrowck/borrowck-loan-in-overloaded-op.rs +++ b/src/test/ui/borrowck/borrowck-loan-in-overloaded-op.rs @@ -19,5 +19,5 @@ impl Add for Foo { fn main() { let x = Foo(box 3); let _y = {x} + x.clone(); // the `{x}` forces a move to occur - //~^ ERROR use of moved value: `x` + //~^ ERROR borrow of moved value: `x` } diff --git a/src/test/ui/borrowck/borrowck-loan-in-overloaded-op.stderr b/src/test/ui/borrowck/borrowck-loan-in-overloaded-op.stderr index b6147aae8d..095ae7f56b 100644 --- a/src/test/ui/borrowck/borrowck-loan-in-overloaded-op.stderr +++ b/src/test/ui/borrowck/borrowck-loan-in-overloaded-op.stderr @@ -1,12 +1,12 @@ -error[E0382]: use of moved value: `x` +error[E0382]: borrow of moved value: `x` --> $DIR/borrowck-loan-in-overloaded-op.rs:21:20 | +LL | let x = Foo(box 3); + | - move occurs because `x` has type `Foo`, which does not implement the `Copy` trait LL | let _y = {x} + x.clone(); // the `{x}` forces a move to occur - | - ^ value used here after move + | - ^ value borrowed here after move | | | value moved here - | - = note: move occurs because `x` has type `Foo`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-loan-of-static-data-issue-27616.nll.stderr b/src/test/ui/borrowck/borrowck-loan-of-static-data-issue-27616.nll.stderr deleted file mode 100644 index 6994c837df..0000000000 --- a/src/test/ui/borrowck/borrowck-loan-of-static-data-issue-27616.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0506]: cannot assign to `*s` because it is borrowed - --> $DIR/borrowck-loan-of-static-data-issue-27616.rs:16:5 - | -LL | let alias: &'static mut String = s; - | ------------------- - borrow of `*s` occurs here - | | - | type annotation requires that `*s` is borrowed for `'static` -... -LL | *s = String::new(); - | ^^ assignment to borrowed `*s` occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/borrowck/borrowck-loan-of-static-data-issue-27616.stderr b/src/test/ui/borrowck/borrowck-loan-of-static-data-issue-27616.stderr index c9d36a7f93..6994c837df 100644 --- a/src/test/ui/borrowck/borrowck-loan-of-static-data-issue-27616.stderr +++ b/src/test/ui/borrowck/borrowck-loan-of-static-data-issue-27616.stderr @@ -2,10 +2,12 @@ error[E0506]: cannot assign to `*s` because it is borrowed --> $DIR/borrowck-loan-of-static-data-issue-27616.rs:16:5 | LL | let alias: &'static mut String = s; - | - borrow of `*s` occurs here + | ------------------- - borrow of `*s` occurs here + | | + | type annotation requires that `*s` is borrowed for `'static` ... LL | *s = String::new(); - | ^^^^^^^^^^^^^^^^^^ assignment to borrowed `*s` occurs here + | ^^ assignment to borrowed `*s` occurs here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-loan-rcvr-overloaded-op.nll.stderr b/src/test/ui/borrowck/borrowck-loan-rcvr-overloaded-op.nll.stderr deleted file mode 100644 index ad74a89f66..0000000000 --- a/src/test/ui/borrowck/borrowck-loan-rcvr-overloaded-op.nll.stderr +++ /dev/null @@ -1,28 +0,0 @@ -error[E0503]: cannot use `p` because it was mutably borrowed - --> $DIR/borrowck-loan-rcvr-overloaded-op.rs:38:5 - | -LL | let q = &mut p; - | ------ borrow of `p` occurs here -LL | -LL | p + 3; - | ^ use of borrowed `p` -... -LL | *q + 3; // OK to use the new alias `q` - | -- borrow later used here - -error[E0502]: cannot borrow `p` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-loan-rcvr-overloaded-op.rs:39:5 - | -LL | let q = &mut p; - | ------ mutable borrow occurs here -... -LL | p.times(3); - | ^ immutable borrow occurs here -LL | -LL | *q + 3; // OK to use the new alias `q` - | -- mutable borrow later used here - -error: aborting due to 2 previous errors - -Some errors occurred: E0502, E0503. -For more information about an error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-loan-rcvr-overloaded-op.stderr b/src/test/ui/borrowck/borrowck-loan-rcvr-overloaded-op.stderr index d180e3e701..aa874c34a2 100644 --- a/src/test/ui/borrowck/borrowck-loan-rcvr-overloaded-op.stderr +++ b/src/test/ui/borrowck/borrowck-loan-rcvr-overloaded-op.stderr @@ -2,24 +2,27 @@ error[E0503]: cannot use `p` because it was mutably borrowed --> $DIR/borrowck-loan-rcvr-overloaded-op.rs:38:5 | LL | let q = &mut p; - | - borrow of `p` occurs here + | ------ borrow of `p` occurs here LL | LL | p + 3; | ^ use of borrowed `p` +... +LL | *q + 3; // OK to use the new alias `q` + | -- borrow later used here error[E0502]: cannot borrow `p` as immutable because it is also borrowed as mutable --> $DIR/borrowck-loan-rcvr-overloaded-op.rs:39:5 | LL | let q = &mut p; - | - mutable borrow occurs here + | ------ mutable borrow occurs here ... LL | p.times(3); | ^ immutable borrow occurs here -... -LL | } - | - mutable borrow ends here +LL | +LL | *q + 3; // OK to use the new alias `q` + | -- mutable borrow later used here error: aborting due to 2 previous errors -Some errors occurred: E0502, E0503. +Some errors have detailed explanations: E0502, E0503. For more information about an error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-loan-rcvr.nll.stderr b/src/test/ui/borrowck/borrowck-loan-rcvr.nll.stderr deleted file mode 100644 index ec3edc8032..0000000000 --- a/src/test/ui/borrowck/borrowck-loan-rcvr.nll.stderr +++ /dev/null @@ -1,25 +0,0 @@ -error[E0502]: cannot borrow `p` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-loan-rcvr.rs:23:14 - | -LL | p.blockm(|| { - | - ------ ^^ mutable borrow occurs here - | | | - | | immutable borrow later used by call - | immutable borrow occurs here -LL | p.x = 10; - | - second borrow occurs due to use of `p` in closure - -error[E0502]: cannot borrow `p` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-loan-rcvr.rs:34:5 - | -LL | let l = &mut p; - | ------ mutable borrow occurs here -LL | p.impurem(); - | ^ immutable borrow occurs here -LL | -LL | l.x += 1; - | -------- mutable borrow later used here - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-loan-rcvr.stderr b/src/test/ui/borrowck/borrowck-loan-rcvr.stderr index 56d33eff73..ec3edc8032 100644 --- a/src/test/ui/borrowck/borrowck-loan-rcvr.stderr +++ b/src/test/ui/borrowck/borrowck-loan-rcvr.stderr @@ -2,24 +2,23 @@ error[E0502]: cannot borrow `p` as mutable because it is also borrowed as immuta --> $DIR/borrowck-loan-rcvr.rs:23:14 | LL | p.blockm(|| { - | - ^^ mutable borrow occurs here - | | + | - ------ ^^ mutable borrow occurs here + | | | + | | immutable borrow later used by call | immutable borrow occurs here LL | p.x = 10; - | - borrow occurs due to use of `p` in closure -LL | }) - | - immutable borrow ends here + | - second borrow occurs due to use of `p` in closure error[E0502]: cannot borrow `p` as immutable because it is also borrowed as mutable --> $DIR/borrowck-loan-rcvr.rs:34:5 | LL | let l = &mut p; - | - mutable borrow occurs here + | ------ mutable borrow occurs here LL | p.impurem(); | ^ immutable borrow occurs here -... -LL | } - | - mutable borrow ends here +LL | +LL | l.x += 1; + | -------- mutable borrow later used here error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/borrowck-loan-vec-content.nll.stderr b/src/test/ui/borrowck/borrowck-loan-vec-content.nll.stderr deleted file mode 100644 index 6691a2396a..0000000000 --- a/src/test/ui/borrowck/borrowck-loan-vec-content.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-loan-vec-content.rs:18:9 - | -LL | takes_imm_elt( - | ------------- immutable borrow later used by call -LL | &v[0], - | - immutable borrow occurs here -LL | || { - | ^^ mutable borrow occurs here -LL | v[1] = 4; - | - second borrow occurs due to use of `v` in closure - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-loan-vec-content.stderr b/src/test/ui/borrowck/borrowck-loan-vec-content.stderr index eea6a09f0f..6691a2396a 100644 --- a/src/test/ui/borrowck/borrowck-loan-vec-content.stderr +++ b/src/test/ui/borrowck/borrowck-loan-vec-content.stderr @@ -1,14 +1,14 @@ error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable --> $DIR/borrowck-loan-vec-content.rs:18:9 | +LL | takes_imm_elt( + | ------------- immutable borrow later used by call LL | &v[0], | - immutable borrow occurs here LL | || { | ^^ mutable borrow occurs here LL | v[1] = 4; - | - borrow occurs due to use of `v` in closure -LL | }) - | - immutable borrow ends here + | - second borrow occurs due to use of `v` in closure error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.ast.stderr b/src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.ast.stderr deleted file mode 100644 index 6eda8a439b..0000000000 --- a/src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.ast.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0597]: `x` does not live long enough - --> $DIR/borrowck-local-borrow-outlives-fn.rs:5:6 - | -LL | &x - | ^ borrowed value does not live long enough -... -LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.mir.stderr b/src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.mir.stderr deleted file mode 100644 index df89e85ebe..0000000000 --- a/src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.mir.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0515]: cannot return reference to function parameter `x` - --> $DIR/borrowck-local-borrow-outlives-fn.rs:5:5 - | -LL | &x - | ^^ returns a reference to data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.rs b/src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.rs index 6137ac914d..b6eebd4e32 100644 --- a/src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.rs +++ b/src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.rs @@ -1,10 +1,6 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - fn cplusplus_mode(x: isize) -> &'static isize { &x - //[ast]~^ ERROR `x` does not live long enough [E0597] - //[mir]~^^ ERROR cannot return reference to function parameter `x` [E0515] + //~^ ERROR cannot return reference to function parameter `x` [E0515] } fn main() {} diff --git a/src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.ast.nll.stderr b/src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.stderr similarity index 83% rename from src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.ast.nll.stderr rename to src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.stderr index df89e85ebe..9d19de211a 100644 --- a/src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.ast.nll.stderr +++ b/src/test/ui/borrowck/borrowck-local-borrow-outlives-fn.stderr @@ -1,5 +1,5 @@ error[E0515]: cannot return reference to function parameter `x` - --> $DIR/borrowck-local-borrow-outlives-fn.rs:5:5 + --> $DIR/borrowck-local-borrow-outlives-fn.rs:2:5 | LL | &x | ^^ returns a reference to data owned by the current function diff --git a/src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.ast.stderr b/src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.ast.stderr deleted file mode 100644 index 89a0e6cd82..0000000000 --- a/src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.ast.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0597]: `z.1` does not live long enough - --> $DIR/borrowck-local-borrow-with-panic-outlives-fn.rs:6:20 - | -LL | *x = Some(&mut z.1); - | ^^^ borrowed value does not live long enough -... -LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.mir.stderr b/src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.mir.stderr deleted file mode 100644 index ac9e73fade..0000000000 --- a/src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.mir.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0597]: `z.1` does not live long enough - --> $DIR/borrowck-local-borrow-with-panic-outlives-fn.rs:6:15 - | -LL | *x = Some(&mut z.1); - | ----------^^^^^^^^- - | | | - | | borrowed value does not live long enough - | assignment requires that `z.1` is borrowed for `'static` -... -LL | } - | - `z.1` dropped here while still borrowed - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.rs b/src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.rs index 9ead465ead..ffb2da2802 100644 --- a/src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.rs +++ b/src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.rs @@ -1,11 +1,7 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - fn cplusplus_mode_exceptionally_unsafe(x: &mut Option<&'static mut isize>) { let mut z = (0, 0); *x = Some(&mut z.1); - //[ast]~^ ERROR `z.1` does not live long enough [E0597] - //[mir]~^^ ERROR `z.1` does not live long enough [E0597] + //~^ ERROR `z.1` does not live long enough [E0597] panic!("catch me for a dangling pointer!") } diff --git a/src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.ast.nll.stderr b/src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.stderr similarity index 86% rename from src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.ast.nll.stderr rename to src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.stderr index ac9e73fade..6ea6951ad9 100644 --- a/src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.ast.nll.stderr +++ b/src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.stderr @@ -1,5 +1,5 @@ error[E0597]: `z.1` does not live long enough - --> $DIR/borrowck-local-borrow-with-panic-outlives-fn.rs:6:15 + --> $DIR/borrowck-local-borrow-with-panic-outlives-fn.rs:3:15 | LL | *x = Some(&mut z.1); | ----------^^^^^^^^- diff --git a/src/test/ui/borrowck/borrowck-match-already-borrowed.ast.nll.stderr b/src/test/ui/borrowck/borrowck-match-already-borrowed.ast.nll.stderr deleted file mode 100644 index ecbfeec822..0000000000 --- a/src/test/ui/borrowck/borrowck-match-already-borrowed.ast.nll.stderr +++ /dev/null @@ -1,51 +0,0 @@ -error[E0503]: cannot use `foo` because it was mutably borrowed - --> $DIR/borrowck-match-already-borrowed.rs:13:9 - | -LL | let p = &mut foo; - | -------- borrow of `foo` occurs here -LL | let _ = match foo { -LL | Foo::B => 1, - | ^^^^^^ use of borrowed `foo` -... -LL | drop(p); - | - borrow later used here - -error[E0503]: cannot use `foo.0` because it was mutably borrowed - --> $DIR/borrowck-match-already-borrowed.rs:15:16 - | -LL | let p = &mut foo; - | -------- borrow of `foo` occurs here -... -LL | Foo::A(x) => x - | ^ use of borrowed `foo` -... -LL | drop(p); - | - borrow later used here - -error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/borrowck-match-already-borrowed.rs:26:9 - | -LL | let r = &mut x; - | ------ borrow of `x` occurs here -LL | let _ = match x { -LL | x => x + 1, - | ^ use of borrowed `x` -... -LL | drop(r); - | - borrow later used here - -error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/borrowck-match-already-borrowed.rs:28:9 - | -LL | let r = &mut x; - | ------ borrow of `x` occurs here -... -LL | y => y + 2, - | ^ use of borrowed `x` -... -LL | drop(r); - | - borrow later used here - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0503`. diff --git a/src/test/ui/borrowck/borrowck-match-already-borrowed.ast.stderr b/src/test/ui/borrowck/borrowck-match-already-borrowed.ast.stderr deleted file mode 100644 index a5da1fc5b2..0000000000 --- a/src/test/ui/borrowck/borrowck-match-already-borrowed.ast.stderr +++ /dev/null @@ -1,30 +0,0 @@ -error[E0503]: cannot use `(foo as Foo::A).0` because it was mutably borrowed - --> $DIR/borrowck-match-already-borrowed.rs:15:16 - | -LL | let p = &mut foo; - | --- borrow of `foo` occurs here -... -LL | Foo::A(x) => x - | ^ use of borrowed `foo` - -error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/borrowck-match-already-borrowed.rs:26:9 - | -LL | let r = &mut x; - | - borrow of `x` occurs here -LL | let _ = match x { -LL | x => x + 1, - | ^ use of borrowed `x` - -error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/borrowck-match-already-borrowed.rs:28:9 - | -LL | let r = &mut x; - | - borrow of `x` occurs here -... -LL | y => y + 2, - | ^ use of borrowed `x` - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0503`. diff --git a/src/test/ui/borrowck/borrowck-match-already-borrowed.rs b/src/test/ui/borrowck/borrowck-match-already-borrowed.rs index 7f4cdbd0e7..c766e6c108 100644 --- a/src/test/ui/borrowck/borrowck-match-already-borrowed.rs +++ b/src/test/ui/borrowck/borrowck-match-already-borrowed.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - enum Foo { A(i32), B @@ -10,10 +7,9 @@ fn match_enum() { let mut foo = Foo::B; let p = &mut foo; let _ = match foo { - Foo::B => 1, //[mir]~ ERROR [E0503] + Foo::B => 1, //~ ERROR [E0503] _ => 2, - Foo::A(x) => x //[ast]~ ERROR [E0503] - //[mir]~^ ERROR [E0503] + Foo::A(x) => x //~ ERROR [E0503] }; drop(p); } @@ -23,10 +19,8 @@ fn main() { let mut x = 1; let r = &mut x; let _ = match x { - x => x + 1, //[ast]~ ERROR [E0503] - //[mir]~^ ERROR [E0503] - y => y + 2, //[ast]~ ERROR [E0503] - //[mir]~^ ERROR [E0503] + x => x + 1, //~ ERROR [E0503] + y => y + 2, //~ ERROR [E0503] }; drop(r); } diff --git a/src/test/ui/borrowck/borrowck-match-already-borrowed.mir.stderr b/src/test/ui/borrowck/borrowck-match-already-borrowed.stderr similarity index 84% rename from src/test/ui/borrowck/borrowck-match-already-borrowed.mir.stderr rename to src/test/ui/borrowck/borrowck-match-already-borrowed.stderr index ecbfeec822..286a925bb7 100644 --- a/src/test/ui/borrowck/borrowck-match-already-borrowed.mir.stderr +++ b/src/test/ui/borrowck/borrowck-match-already-borrowed.stderr @@ -1,5 +1,5 @@ error[E0503]: cannot use `foo` because it was mutably borrowed - --> $DIR/borrowck-match-already-borrowed.rs:13:9 + --> $DIR/borrowck-match-already-borrowed.rs:10:9 | LL | let p = &mut foo; | -------- borrow of `foo` occurs here @@ -11,19 +11,19 @@ LL | drop(p); | - borrow later used here error[E0503]: cannot use `foo.0` because it was mutably borrowed - --> $DIR/borrowck-match-already-borrowed.rs:15:16 + --> $DIR/borrowck-match-already-borrowed.rs:12:16 | LL | let p = &mut foo; | -------- borrow of `foo` occurs here ... LL | Foo::A(x) => x | ^ use of borrowed `foo` -... +LL | }; LL | drop(p); | - borrow later used here error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/borrowck-match-already-borrowed.rs:26:9 + --> $DIR/borrowck-match-already-borrowed.rs:22:9 | LL | let r = &mut x; | ------ borrow of `x` occurs here @@ -35,14 +35,14 @@ LL | drop(r); | - borrow later used here error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/borrowck-match-already-borrowed.rs:28:9 + --> $DIR/borrowck-match-already-borrowed.rs:23:9 | LL | let r = &mut x; | ------ borrow of `x` occurs here ... LL | y => y + 2, | ^ use of borrowed `x` -... +LL | }; LL | drop(r); | - borrow later used here diff --git a/src/test/ui/borrowck/borrowck-match-binding-is-assignment.ast.nll.stderr b/src/test/ui/borrowck/borrowck-match-binding-is-assignment.ast.nll.stderr deleted file mode 100644 index 2ac05393e0..0000000000 --- a/src/test/ui/borrowck/borrowck-match-binding-is-assignment.ast.nll.stderr +++ /dev/null @@ -1,58 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-match-binding-is-assignment.rs:17:13 - | -LL | x => { - | - - | | - | first assignment to `x` - | help: make this binding mutable: `mut x` -LL | x += 1; - | ^^^^^^ cannot assign twice to immutable variable - -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-match-binding-is-assignment.rs:24:13 - | -LL | E::Foo(x) => { - | - - | | - | first assignment to `x` - | help: make this binding mutable: `mut x` -LL | x += 1; - | ^^^^^^ cannot assign twice to immutable variable - -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-match-binding-is-assignment.rs:31:13 - | -LL | S { bar: x } => { - | - - | | - | first assignment to `x` - | help: make this binding mutable: `mut x` -LL | x += 1; - | ^^^^^^ cannot assign twice to immutable variable - -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-match-binding-is-assignment.rs:38:13 - | -LL | (x,) => { - | - - | | - | first assignment to `x` - | help: make this binding mutable: `mut x` -LL | x += 1; - | ^^^^^^ cannot assign twice to immutable variable - -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-match-binding-is-assignment.rs:45:13 - | -LL | [x,_,_] => { - | - - | | - | first assignment to `x` - | help: make this binding mutable: `mut x` -LL | x += 1; - | ^^^^^^ cannot assign twice to immutable variable - -error: aborting due to 5 previous errors - -For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/borrowck/borrowck-match-binding-is-assignment.ast.stderr b/src/test/ui/borrowck/borrowck-match-binding-is-assignment.ast.stderr deleted file mode 100644 index 5f43302e0e..0000000000 --- a/src/test/ui/borrowck/borrowck-match-binding-is-assignment.ast.stderr +++ /dev/null @@ -1,43 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-match-binding-is-assignment.rs:17:13 - | -LL | x => { - | - first assignment to `x` -LL | x += 1; - | ^^^^^^ cannot assign twice to immutable variable - -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-match-binding-is-assignment.rs:24:13 - | -LL | E::Foo(x) => { - | - first assignment to `x` -LL | x += 1; - | ^^^^^^ cannot assign twice to immutable variable - -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-match-binding-is-assignment.rs:31:13 - | -LL | S { bar: x } => { - | - first assignment to `x` -LL | x += 1; - | ^^^^^^ cannot assign twice to immutable variable - -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-match-binding-is-assignment.rs:38:13 - | -LL | (x,) => { - | - first assignment to `x` -LL | x += 1; - | ^^^^^^ cannot assign twice to immutable variable - -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-match-binding-is-assignment.rs:45:13 - | -LL | [x,_,_] => { - | - first assignment to `x` -LL | x += 1; - | ^^^^^^ cannot assign twice to immutable variable - -error: aborting due to 5 previous errors - -For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/borrowck/borrowck-match-binding-is-assignment.rs b/src/test/ui/borrowck/borrowck-match-binding-is-assignment.rs index 2c9c41ca10..064bf69ae7 100644 --- a/src/test/ui/borrowck/borrowck-match-binding-is-assignment.rs +++ b/src/test/ui/borrowck/borrowck-match-binding-is-assignment.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - // Test that immutable pattern bindings cannot be reassigned. enum E { @@ -14,36 +11,31 @@ struct S { pub fn main() { match 1 { x => { - x += 1; //[ast]~ ERROR cannot assign twice to immutable variable `x` - //[mir]~^ ERROR [E0384] + x += 1; //~ ERROR [E0384] } } match E::Foo(1) { E::Foo(x) => { - x += 1; //[ast]~ ERROR cannot assign twice to immutable variable `x` - //[mir]~^ ERROR [E0384] + x += 1; //~ ERROR [E0384] } } match (S { bar: 1 }) { S { bar: x } => { - x += 1; //[ast]~ ERROR cannot assign twice to immutable variable `x` - //[mir]~^ ERROR [E0384] + x += 1; //~ ERROR [E0384] } } match (1,) { (x,) => { - x += 1; //[ast]~ ERROR cannot assign twice to immutable variable `x` - //[mir]~^ ERROR [E0384] + x += 1; //~ ERROR [E0384] } } match [1,2,3] { [x,_,_] => { - x += 1; //[ast]~ ERROR cannot assign twice to immutable variable `x` - //[mir]~^ ERROR [E0384] + x += 1; //~ ERROR [E0384] } } } diff --git a/src/test/ui/borrowck/borrowck-match-binding-is-assignment.mir.stderr b/src/test/ui/borrowck/borrowck-match-binding-is-assignment.stderr similarity index 88% rename from src/test/ui/borrowck/borrowck-match-binding-is-assignment.mir.stderr rename to src/test/ui/borrowck/borrowck-match-binding-is-assignment.stderr index 2ac05393e0..5661ca52cb 100644 --- a/src/test/ui/borrowck/borrowck-match-binding-is-assignment.mir.stderr +++ b/src/test/ui/borrowck/borrowck-match-binding-is-assignment.stderr @@ -1,5 +1,5 @@ error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-match-binding-is-assignment.rs:17:13 + --> $DIR/borrowck-match-binding-is-assignment.rs:14:13 | LL | x => { | - @@ -10,7 +10,7 @@ LL | x += 1; | ^^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-match-binding-is-assignment.rs:24:13 + --> $DIR/borrowck-match-binding-is-assignment.rs:20:13 | LL | E::Foo(x) => { | - @@ -21,7 +21,7 @@ LL | x += 1; | ^^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-match-binding-is-assignment.rs:31:13 + --> $DIR/borrowck-match-binding-is-assignment.rs:26:13 | LL | S { bar: x } => { | - @@ -32,7 +32,7 @@ LL | x += 1; | ^^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-match-binding-is-assignment.rs:38:13 + --> $DIR/borrowck-match-binding-is-assignment.rs:32:13 | LL | (x,) => { | - @@ -43,7 +43,7 @@ LL | x += 1; | ^^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/borrowck-match-binding-is-assignment.rs:45:13 + --> $DIR/borrowck-match-binding-is-assignment.rs:38:13 | LL | [x,_,_] => { | - diff --git a/src/test/ui/borrowck/borrowck-move-by-capture.nll.stderr b/src/test/ui/borrowck/borrowck-move-by-capture.nll.stderr deleted file mode 100644 index 38f6ca7be7..0000000000 --- a/src/test/ui/borrowck/borrowck-move-by-capture.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0507]: cannot move out of captured variable in an `FnMut` closure - --> $DIR/borrowck-move-by-capture.rs:9:29 - | -LL | let bar: Box<_> = box 3; - | --- captured outer variable -LL | let _g = to_fn_mut(|| { -LL | let _h = to_fn_once(move || -> isize { *bar }); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of captured variable in an `FnMut` closure - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/borrowck-move-by-capture.stderr b/src/test/ui/borrowck/borrowck-move-by-capture.stderr index d845a576b3..38f6ca7be7 100644 --- a/src/test/ui/borrowck/borrowck-move-by-capture.stderr +++ b/src/test/ui/borrowck/borrowck-move-by-capture.stderr @@ -1,11 +1,11 @@ -error[E0507]: cannot move out of captured outer variable in an `FnMut` closure +error[E0507]: cannot move out of captured variable in an `FnMut` closure --> $DIR/borrowck-move-by-capture.rs:9:29 | LL | let bar: Box<_> = box 3; | --- captured outer variable LL | let _g = to_fn_mut(|| { LL | let _h = to_fn_once(move || -> isize { *bar }); - | ^^^^^^^^^^^^^^^^ cannot move out of captured outer variable in an `FnMut` closure + | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of captured variable in an `FnMut` closure error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-error-with-note.nll.stderr b/src/test/ui/borrowck/borrowck-move-error-with-note.nll.stderr deleted file mode 100644 index 25eb8d0134..0000000000 --- a/src/test/ui/borrowck/borrowck-move-error-with-note.nll.stderr +++ /dev/null @@ -1,67 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-move-error-with-note.rs:11:11 - | -LL | match *f { - | ^^ - | | - | cannot move out of borrowed content - | help: consider removing the `*`: `f` -LL | -LL | Foo::Foo1(num1, - | ---- data moved here -LL | num2) => (), - | ---- ...and here -LL | Foo::Foo2(num) => (), - | --- ...and here - | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/borrowck-move-error-with-note.rs:13:19 - | -LL | Foo::Foo1(num1, - | ^^^^ -LL | num2) => (), - | ^^^^ -LL | Foo::Foo2(num) => (), - | ^^^ - -error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-move-error-with-note.rs:29:11 - | -LL | match (S {f: "foo".to_string(), g: "bar".to_string()}) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here -... -LL | f: _s, - | -- data moved here -LL | g: _t - | -- ...and here - | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/borrowck-move-error-with-note.rs:32:16 - | -LL | f: _s, - | ^^ -LL | g: _t - | ^^ - -error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-move-error-with-note.rs:47:11 - | -LL | match a.a { - | ^^^ - | | - | cannot move out of borrowed content - | help: consider borrowing here: `&a.a` -LL | -LL | n => { - | - data moved here - | -note: move occurs because `n` has type `std::boxed::Box`, which does not implement the `Copy` trait - --> $DIR/borrowck-move-error-with-note.rs:49:9 - | -LL | n => { - | ^ - -error: aborting due to 3 previous errors - -Some errors occurred: E0507, E0509. -For more information about an error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/borrowck-move-error-with-note.rs b/src/test/ui/borrowck/borrowck-move-error-with-note.rs index d2dab2eacc..b21f13a983 100644 --- a/src/test/ui/borrowck/borrowck-move-error-with-note.rs +++ b/src/test/ui/borrowck/borrowck-move-error-with-note.rs @@ -27,8 +27,9 @@ impl Drop for S { fn move_in_match() { match (S {f: "foo".to_string(), g: "bar".to_string()}) { - S { //~ ERROR cannot move out of type `S`, which implements the `Drop` trait + //~^ ERROR cannot move out of type `S`, which implements the `Drop` trait //~| cannot move out of here + S { f: _s, g: _t } => {} diff --git a/src/test/ui/borrowck/borrowck-move-error-with-note.stderr b/src/test/ui/borrowck/borrowck-move-error-with-note.stderr index 8b0722916d..8438320891 100644 --- a/src/test/ui/borrowck/borrowck-move-error-with-note.stderr +++ b/src/test/ui/borrowck/borrowck-move-error-with-note.stderr @@ -2,37 +2,66 @@ error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-move-error-with-note.rs:11:11 | LL | match *f { - | ^^ cannot move out of borrowed content + | ^^ + | | + | cannot move out of borrowed content + | help: consider removing the `*`: `f` LL | LL | Foo::Foo1(num1, - | ---- hint: to prevent move, use `ref num1` or `ref mut num1` + | ---- data moved here LL | num2) => (), - | ---- ...and here (use `ref num2` or `ref mut num2`) + | ---- ...and here LL | Foo::Foo2(num) => (), - | --- ...and here (use `ref num` or `ref mut num`) + | --- ...and here + | +note: move occurs because these variables have types that don't implement the `Copy` trait + --> $DIR/borrowck-move-error-with-note.rs:13:19 + | +LL | Foo::Foo1(num1, + | ^^^^ +LL | num2) => (), + | ^^^^ +LL | Foo::Foo2(num) => (), + | ^^^ error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-move-error-with-note.rs:30:9 - | -LL | / S { -LL | | -LL | | f: _s, - | | -- hint: to prevent move, use `ref _s` or `ref mut _s` -LL | | g: _t - | | -- ...and here (use `ref _t` or `ref mut _t`) -LL | | } => {} - | |_________^ cannot move out of here + --> $DIR/borrowck-move-error-with-note.rs:29:11 + | +LL | match (S {f: "foo".to_string(), g: "bar".to_string()}) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here +... +LL | f: _s, + | -- data moved here +LL | g: _t + | -- ...and here + | +note: move occurs because these variables have types that don't implement the `Copy` trait + --> $DIR/borrowck-move-error-with-note.rs:33:16 + | +LL | f: _s, + | ^^ +LL | g: _t + | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-move-error-with-note.rs:47:11 + --> $DIR/borrowck-move-error-with-note.rs:48:11 | LL | match a.a { - | ^ cannot move out of borrowed content + | ^^^ + | | + | cannot move out of borrowed content + | help: consider borrowing here: `&a.a` LL | LL | n => { - | - hint: to prevent move, use `ref n` or `ref mut n` + | - data moved here + | +note: move occurs because `n` has type `std::boxed::Box`, which does not implement the `Copy` trait + --> $DIR/borrowck-move-error-with-note.rs:50:9 + | +LL | n => { + | ^ error: aborting due to 3 previous errors -Some errors occurred: E0507, E0509. +Some errors have detailed explanations: E0507, E0509. For more information about an error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.nll.stderr b/src/test/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.nll.stderr deleted file mode 100644 index e4840fba67..0000000000 --- a/src/test/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0505]: cannot move out of `*a` because it is borrowed - --> $DIR/borrowck-move-from-subpath-of-borrowed-path.rs:12:13 - | -LL | let b = &a; - | -- borrow of `a` occurs here -LL | -LL | let z = *a; - | ^^ move out of `*a` occurs here -LL | b.use_ref(); - | - borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.stderr b/src/test/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.stderr index 5e2428ef4a..e4840fba67 100644 --- a/src/test/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.stderr +++ b/src/test/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.stderr @@ -1,11 +1,13 @@ error[E0505]: cannot move out of `*a` because it is borrowed - --> $DIR/borrowck-move-from-subpath-of-borrowed-path.rs:12:9 + --> $DIR/borrowck-move-from-subpath-of-borrowed-path.rs:12:13 | LL | let b = &a; - | - borrow of `a` occurs here + | -- borrow of `a` occurs here LL | LL | let z = *a; - | ^ move out of `*a` occurs here + | ^^ move out of `*a` occurs here +LL | b.use_ref(); + | - borrow later used here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.nll.stderr b/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.nll.stderr deleted file mode 100644 index 615e3fd180..0000000000 --- a/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0507]: cannot move out of dereference of raw pointer - --> $DIR/borrowck-move-from-unsafe-ptr.rs:2:13 - | -LL | let y = *x; - | ^^ - | | - | cannot move out of dereference of raw pointer - | help: consider removing the `*`: `x` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr b/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr index c23c5bb9c4..615e3fd180 100644 --- a/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr +++ b/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr @@ -5,7 +5,7 @@ LL | let y = *x; | ^^ | | | cannot move out of dereference of raw pointer - | help: consider using a reference instead: `&*x` + | help: consider removing the `*`: `x` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.ast.nll.stderr b/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.ast.nll.stderr deleted file mode 100644 index c18fce9f4f..0000000000 --- a/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.ast.nll.stderr +++ /dev/null @@ -1,50 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-move-in-irrefut-pat.rs:6:13 - | -LL | fn arg_item(&_x: &String) {} - | ^-- - | || - | |data moved here - | cannot move out of borrowed content - | help: consider removing the `&`: `_x` - | -note: move occurs because `_x` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/borrowck-move-in-irrefut-pat.rs:6:14 - | -LL | fn arg_item(&_x: &String) {} - | ^^ - -error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-move-in-irrefut-pat.rs:11:11 - | -LL | with(|&_x| ()) - | ^-- - | || - | |data moved here - | cannot move out of borrowed content - | help: consider removing the `&`: `_x` - | -note: move occurs because `_x` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/borrowck-move-in-irrefut-pat.rs:11:12 - | -LL | with(|&_x| ()) - | ^^ - -error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-move-in-irrefut-pat.rs:17:15 - | -LL | let &_x = &"hi".to_string(); - | --- ^^^^^^^^^^^^^^^^^ cannot move out of borrowed content - | || - | |data moved here - | help: consider removing the `&`: `_x` - | -note: move occurs because `_x` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/borrowck-move-in-irrefut-pat.rs:17:10 - | -LL | let &_x = &"hi".to_string(); - | ^^ - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.ast.stderr b/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.ast.stderr deleted file mode 100644 index 019ed96661..0000000000 --- a/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.ast.stderr +++ /dev/null @@ -1,30 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-move-in-irrefut-pat.rs:6:13 - | -LL | fn arg_item(&_x: &String) {} - | ^-- - | || - | |hint: to prevent move, use `ref _x` or `ref mut _x` - | cannot move out of borrowed content - -error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-move-in-irrefut-pat.rs:11:11 - | -LL | with(|&_x| ()) - | ^-- - | || - | |hint: to prevent move, use `ref _x` or `ref mut _x` - | cannot move out of borrowed content - -error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-move-in-irrefut-pat.rs:17:9 - | -LL | let &_x = &"hi".to_string(); - | ^-- - | || - | |hint: to prevent move, use `ref _x` or `ref mut _x` - | cannot move out of borrowed content - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.rs b/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.rs index c63f4f60be..f4f402dd96 100644 --- a/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.rs +++ b/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.rs @@ -1,22 +1,16 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - fn with(f: F) where F: FnOnce(&String) {} fn arg_item(&_x: &String) {} - //[ast]~^ ERROR cannot move out of borrowed content [E0507] - //[mir]~^^ ERROR [E0507] + //~^ ERROR [E0507] fn arg_closure() { with(|&_x| ()) - //[ast]~^ ERROR cannot move out of borrowed content [E0507] - //[mir]~^^ ERROR [E0507] + //~^ ERROR [E0507] } fn let_pat() { let &_x = &"hi".to_string(); - //[ast]~^ ERROR cannot move out of borrowed content [E0507] - //[mir]~^^ ERROR [E0507] + //~^ ERROR [E0507] } pub fn main() {} diff --git a/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.mir.stderr b/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.stderr similarity index 82% rename from src/test/ui/borrowck/borrowck-move-in-irrefut-pat.mir.stderr rename to src/test/ui/borrowck/borrowck-move-in-irrefut-pat.stderr index c18fce9f4f..d38c05ca36 100644 --- a/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.mir.stderr +++ b/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-move-in-irrefut-pat.rs:6:13 + --> $DIR/borrowck-move-in-irrefut-pat.rs:3:13 | LL | fn arg_item(&_x: &String) {} | ^-- @@ -9,13 +9,13 @@ LL | fn arg_item(&_x: &String) {} | help: consider removing the `&`: `_x` | note: move occurs because `_x` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/borrowck-move-in-irrefut-pat.rs:6:14 + --> $DIR/borrowck-move-in-irrefut-pat.rs:3:14 | LL | fn arg_item(&_x: &String) {} | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-move-in-irrefut-pat.rs:11:11 + --> $DIR/borrowck-move-in-irrefut-pat.rs:7:11 | LL | with(|&_x| ()) | ^-- @@ -25,13 +25,13 @@ LL | with(|&_x| ()) | help: consider removing the `&`: `_x` | note: move occurs because `_x` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/borrowck-move-in-irrefut-pat.rs:11:12 + --> $DIR/borrowck-move-in-irrefut-pat.rs:7:12 | LL | with(|&_x| ()) | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-move-in-irrefut-pat.rs:17:15 + --> $DIR/borrowck-move-in-irrefut-pat.rs:12:15 | LL | let &_x = &"hi".to_string(); | --- ^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -40,7 +40,7 @@ LL | let &_x = &"hi".to_string(); | help: consider removing the `&`: `_x` | note: move occurs because `_x` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/borrowck-move-in-irrefut-pat.rs:17:10 + --> $DIR/borrowck-move-in-irrefut-pat.rs:12:10 | LL | let &_x = &"hi".to_string(); | ^^ diff --git a/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.ast.nll.stderr b/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.ast.nll.stderr deleted file mode 100644 index 874c38cb78..0000000000 --- a/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.ast.nll.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0382]: use of moved value: `t` - --> $DIR/borrowck-move-moved-value-into-closure.rs:14:12 - | -LL | let t: Box<_> = box 3; - | - move occurs because `t` has type `std::boxed::Box`, which does not implement the `Copy` trait -LL | -LL | call_f(move|| { *t + 1 }); - | ------ - variable moved due to use in closure - | | - | value moved into closure here -LL | call_f(move|| { *t + 1 }); - | ^^^^^^ - use occurs due to use in closure - | | - | value used here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.ast.stderr b/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.ast.stderr deleted file mode 100644 index 48651eeae2..0000000000 --- a/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.ast.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: capture of moved value: `t` - --> $DIR/borrowck-move-moved-value-into-closure.rs:14:22 - | -LL | call_f(move|| { *t + 1 }); - | ------ value moved (into closure) here -LL | call_f(move|| { *t + 1 }); - | ^ value captured here after move - | - = note: move occurs because `t` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.rs b/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.rs index 271553370e..233d0a733e 100644 --- a/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.rs +++ b/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - #![feature(box_syntax)] fn call_f isize>(f: F) -> isize { @@ -11,6 +8,5 @@ fn main() { let t: Box<_> = box 3; call_f(move|| { *t + 1 }); - call_f(move|| { *t + 1 }); //[ast]~ ERROR capture of moved value - //[mir]~^ ERROR use of moved value + call_f(move|| { *t + 1 }); //~ ERROR use of moved value } diff --git a/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.mir.stderr b/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.stderr similarity index 91% rename from src/test/ui/borrowck/borrowck-move-moved-value-into-closure.mir.stderr rename to src/test/ui/borrowck/borrowck-move-moved-value-into-closure.stderr index 874c38cb78..557e27aae5 100644 --- a/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.mir.stderr +++ b/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `t` - --> $DIR/borrowck-move-moved-value-into-closure.rs:14:12 + --> $DIR/borrowck-move-moved-value-into-closure.rs:11:12 | LL | let t: Box<_> = box 3; | - move occurs because `t` has type `std::boxed::Box`, which does not implement the `Copy` trait diff --git a/src/test/ui/borrowck/borrowck-move-mut-base-ptr.nll.stderr b/src/test/ui/borrowck/borrowck-move-mut-base-ptr.nll.stderr deleted file mode 100644 index 77f5b72e51..0000000000 --- a/src/test/ui/borrowck/borrowck-move-mut-base-ptr.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0505]: cannot move out of `t0` because it is borrowed - --> $DIR/borrowck-move-mut-base-ptr.rs:10:14 - | -LL | let p: &isize = &*t0; // Freezes `*t0` - | ---- borrow of `*t0` occurs here -LL | let t1 = t0; - | ^^ move out of `t0` occurs here -LL | *t1 = 22; -LL | p.use_ref(); - | - borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/borrowck/borrowck-move-mut-base-ptr.stderr b/src/test/ui/borrowck/borrowck-move-mut-base-ptr.stderr index d3853832c9..77f5b72e51 100644 --- a/src/test/ui/borrowck/borrowck-move-mut-base-ptr.stderr +++ b/src/test/ui/borrowck/borrowck-move-mut-base-ptr.stderr @@ -1,10 +1,13 @@ error[E0505]: cannot move out of `t0` because it is borrowed - --> $DIR/borrowck-move-mut-base-ptr.rs:10:9 + --> $DIR/borrowck-move-mut-base-ptr.rs:10:14 | LL | let p: &isize = &*t0; // Freezes `*t0` - | --- borrow of `*t0` occurs here + | ---- borrow of `*t0` occurs here LL | let t1 = t0; - | ^^ move out of `t0` occurs here + | ^^ move out of `t0` occurs here +LL | *t1 = 22; +LL | p.use_ref(); + | - borrow later used here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-out-from-array.mir.stderr b/src/test/ui/borrowck/borrowck-move-out-from-array.mir.stderr deleted file mode 100644 index 88a1ab2f90..0000000000 --- a/src/test/ui/borrowck/borrowck-move-out-from-array.mir.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0382]: use of moved value: `a[..]` - --> $DIR/borrowck-move-out-from-array.rs:10:14 - | -LL | let [_, _x] = a; - | -- value moved here -LL | let [.., _y] = a; - | ^^ value used here after move - | - = note: move occurs because `a[..]` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `a[..]` - --> $DIR/borrowck-move-out-from-array.rs:17:10 - | -LL | let [_x, _] = a; - | -- value moved here -LL | let [_y..] = a; - | ^^ value used here after move - | - = note: move occurs because `a[..]` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-move-out-from-array.rs b/src/test/ui/borrowck/borrowck-move-out-from-array.rs index 503e7b9952..856b03edd2 100644 --- a/src/test/ui/borrowck/borrowck-move-out-from-array.rs +++ b/src/test/ui/borrowck/borrowck-move-out-from-array.rs @@ -1,21 +1,16 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - #![feature(box_syntax)] #![feature(slice_patterns)] fn move_out_from_begin_and_end() { let a = [box 1, box 2]; let [_, _x] = a; - let [.., _y] = a; //[ast]~ ERROR [E0382] - //[mir]~^ ERROR [E0382] + let [.., _y] = a; //~ ERROR [E0382] } fn move_out_by_const_index_and_subslice() { let a = [box 1, box 2]; let [_x, _] = a; - let [_y..] = a; //[ast]~ ERROR [E0382] - //[mir]~^ ERROR [E0382] + let [_y..] = a; //~ ERROR [E0382] } fn main() {} diff --git a/src/test/ui/borrowck/borrowck-move-out-from-array.ast.stderr b/src/test/ui/borrowck/borrowck-move-out-from-array.stderr similarity index 87% rename from src/test/ui/borrowck/borrowck-move-out-from-array.ast.stderr rename to src/test/ui/borrowck/borrowck-move-out-from-array.stderr index 88a1ab2f90..16722a456d 100644 --- a/src/test/ui/borrowck/borrowck-move-out-from-array.ast.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-from-array.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `a[..]` - --> $DIR/borrowck-move-out-from-array.rs:10:14 + --> $DIR/borrowck-move-out-from-array.rs:7:14 | LL | let [_, _x] = a; | -- value moved here @@ -9,7 +9,7 @@ LL | let [.., _y] = a; = note: move occurs because `a[..]` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0382]: use of moved value: `a[..]` - --> $DIR/borrowck-move-out-from-array.rs:17:10 + --> $DIR/borrowck-move-out-from-array.rs:13:10 | LL | let [_x, _] = a; | -- value moved here diff --git a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.ast.nll.stderr b/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.ast.nll.stderr deleted file mode 100644 index 81afb104c9..0000000000 --- a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.ast.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0507]: cannot move out of an `Rc` - --> $DIR/borrowck-move-out-of-overloaded-auto-deref.rs:7:14 - | -LL | let _x = Rc::new(vec![1, 2]).into_iter(); - | ^^^^^^^^^^^^^^^^^^^ cannot move out of an `Rc` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.ast.stderr b/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.ast.stderr deleted file mode 100644 index e55898aca5..0000000000 --- a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.ast.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-move-out-of-overloaded-auto-deref.rs:7:14 - | -LL | let _x = Rc::new(vec![1, 2]).into_iter(); - | ^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs b/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs index 5ced89478d..0b9e7102cd 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs +++ b/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs @@ -1,10 +1,6 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - use std::rc::Rc; pub fn main() { let _x = Rc::new(vec![1, 2]).into_iter(); - //[ast]~^ ERROR cannot move out of borrowed content [E0507] - //[mir]~^^ ERROR [E0507] + //~^ ERROR [E0507] } diff --git a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.mir.stderr b/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.stderr similarity index 81% rename from src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.mir.stderr rename to src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.stderr index 81afb104c9..7dc8e1749b 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.mir.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of an `Rc` - --> $DIR/borrowck-move-out-of-overloaded-auto-deref.rs:7:14 + --> $DIR/borrowck-move-out-of-overloaded-auto-deref.rs:4:14 | LL | let _x = Rc::new(vec![1, 2]).into_iter(); | ^^^^^^^^^^^^^^^^^^^ cannot move out of an `Rc` diff --git a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.nll.stderr b/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.nll.stderr deleted file mode 100644 index e6af992c4d..0000000000 --- a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0507]: cannot move out of an `Rc` - --> $DIR/borrowck-move-out-of-overloaded-deref.rs:4:14 - | -LL | let _x = *Rc::new("hi".to_string()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | cannot move out of an `Rc` - | help: consider removing the `*`: `Rc::new("hi".to_string())` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.rs b/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.rs index d5b60139fa..ecb135f68d 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.rs +++ b/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.rs @@ -2,5 +2,5 @@ use std::rc::Rc; pub fn main() { let _x = *Rc::new("hi".to_string()); - //~^ ERROR cannot move out of borrowed content + //~^ ERROR cannot move out of an `Rc` } diff --git a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.stderr b/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.stderr index cd8d146ab1..e6af992c4d 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.stderr @@ -1,11 +1,11 @@ -error[E0507]: cannot move out of borrowed content +error[E0507]: cannot move out of an `Rc` --> $DIR/borrowck-move-out-of-overloaded-deref.rs:4:14 | LL | let _x = *Rc::new("hi".to_string()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | cannot move out of borrowed content - | help: consider using a reference instead: `&*Rc::new("hi".to_string())` + | cannot move out of an `Rc` + | help: consider removing the `*`: `Rc::new("hi".to_string())` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-out-of-static-item.mir.stderr b/src/test/ui/borrowck/borrowck-move-out-of-static-item.mir.stderr deleted file mode 100644 index 26d06c081d..0000000000 --- a/src/test/ui/borrowck/borrowck-move-out-of-static-item.mir.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0507]: cannot move out of static item - --> $DIR/borrowck-move-out-of-static-item.rs:18:10 - | -LL | test(BAR); - | ^^^ cannot move out of static item - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/borrowck-move-out-of-static-item.rs b/src/test/ui/borrowck/borrowck-move-out-of-static-item.rs index d68d5de5c0..8bb48a1d45 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-static-item.rs +++ b/src/test/ui/borrowck/borrowck-move-out-of-static-item.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - // Ensure that moves out of static items is forbidden struct Foo { @@ -15,6 +12,5 @@ fn test(f: Foo) { } fn main() { - test(BAR); //[ast]~ ERROR cannot move out of static item [E0507] - //[mir]~^ ERROR [E0507] + test(BAR); //~ ERROR cannot move out of static item [E0507] } diff --git a/src/test/ui/borrowck/borrowck-move-out-of-static-item.ast.stderr b/src/test/ui/borrowck/borrowck-move-out-of-static-item.stderr similarity index 81% rename from src/test/ui/borrowck/borrowck-move-out-of-static-item.ast.stderr rename to src/test/ui/borrowck/borrowck-move-out-of-static-item.stderr index 26d06c081d..5b38c1e3e1 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-static-item.ast.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-of-static-item.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of static item - --> $DIR/borrowck-move-out-of-static-item.rs:18:10 + --> $DIR/borrowck-move-out-of-static-item.rs:15:10 | LL | test(BAR); | ^^^ cannot move out of static item diff --git a/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.ast.nll.stderr b/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.ast.nll.stderr deleted file mode 100644 index c1c04ca914..0000000000 --- a/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.ast.nll.stderr +++ /dev/null @@ -1,47 +0,0 @@ -error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:10:11 - | -LL | match (S {f:"foo".to_string()}) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here -LL | -LL | S {f:_s} => {} - | -- data moved here - | -note: move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:12:14 - | -LL | S {f:_s} => {} - | ^^ - -error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:18:20 - | -LL | let S {f:_s} = S {f:"foo".to_string()}; - | -- ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here - | | - | data moved here - | -note: move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:18:14 - | -LL | let S {f:_s} = S {f:"foo".to_string()}; - | ^^ - -error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:23:19 - | -LL | fn move_in_fn_arg(S {f:_s}: S) { - | ^^^^^--^ - | | | - | | data moved here - | cannot move out of here - | -note: move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:23:24 - | -LL | fn move_in_fn_arg(S {f:_s}: S) { - | ^^ - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0509`. diff --git a/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.ast.stderr b/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.ast.stderr deleted file mode 100644 index 0b025fa175..0000000000 --- a/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.ast.stderr +++ /dev/null @@ -1,30 +0,0 @@ -error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:12:9 - | -LL | S {f:_s} => {} - | ^^^^^--^ - | | | - | | hint: to prevent move, use `ref _s` or `ref mut _s` - | cannot move out of here - -error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:18:9 - | -LL | let S {f:_s} = S {f:"foo".to_string()}; - | ^^^^^--^ - | | | - | | hint: to prevent move, use `ref _s` or `ref mut _s` - | cannot move out of here - -error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:23:19 - | -LL | fn move_in_fn_arg(S {f:_s}: S) { - | ^^^^^--^ - | | | - | | hint: to prevent move, use `ref _s` or `ref mut _s` - | cannot move out of here - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0509`. diff --git a/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.rs b/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.rs index cdd71d889a..a429f4bc33 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.rs +++ b/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - struct S {f:String} impl Drop for S { fn drop(&mut self) { println!("{}", self.f); } @@ -8,21 +5,18 @@ impl Drop for S { fn move_in_match() { match (S {f:"foo".to_string()}) { - //[mir]~^ ERROR [E0509] + //~^ ERROR [E0509] S {f:_s} => {} - //[ast]~^ ERROR cannot move out of type `S`, which implements the `Drop` trait [E0509] } } fn move_in_let() { let S {f:_s} = S {f:"foo".to_string()}; - //[ast]~^ ERROR cannot move out of type `S`, which implements the `Drop` trait [E0509] - //[mir]~^^ ERROR [E0509] + //~^ ERROR [E0509] } fn move_in_fn_arg(S {f:_s}: S) { - //[ast]~^ ERROR cannot move out of type `S`, which implements the `Drop` trait [E0509] - //[mir]~^^ ERROR [E0509] + //~^ ERROR [E0509] } fn main() {} diff --git a/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.mir.stderr b/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.stderr similarity index 80% rename from src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.mir.stderr rename to src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.stderr index c1c04ca914..059aa3081f 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.mir.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.stderr @@ -1,5 +1,5 @@ error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:10:11 + --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:7:11 | LL | match (S {f:"foo".to_string()}) { | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here @@ -8,13 +8,13 @@ LL | S {f:_s} => {} | -- data moved here | note: move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:12:14 + --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:9:14 | LL | S {f:_s} => {} | ^^ error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:18:20 + --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:14:20 | LL | let S {f:_s} = S {f:"foo".to_string()}; | -- ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here @@ -22,13 +22,13 @@ LL | let S {f:_s} = S {f:"foo".to_string()}; | data moved here | note: move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:18:14 + --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:14:14 | LL | let S {f:_s} = S {f:"foo".to_string()}; | ^^ error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:23:19 + --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:18:19 | LL | fn move_in_fn_arg(S {f:_s}: S) { | ^^^^^--^ @@ -37,7 +37,7 @@ LL | fn move_in_fn_arg(S {f:_s}: S) { | cannot move out of here | note: move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:23:24 + --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:18:24 | LL | fn move_in_fn_arg(S {f:_s}: S) { | ^^ diff --git a/src/test/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.nll.stderr b/src/test/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.nll.stderr deleted file mode 100644 index cecba15acc..0000000000 --- a/src/test/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.nll.stderr +++ /dev/null @@ -1,46 +0,0 @@ -error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-move-out-of-tuple-struct-with-dtor.rs:7:11 - | -LL | match S("foo".to_string()) { - | ^^^^^^^^^^^^^^^^^^^^ cannot move out of here -LL | S(_s) => {} - | -- data moved here - | -note: move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/borrowck-move-out-of-tuple-struct-with-dtor.rs:8:11 - | -LL | S(_s) => {} - | ^^ - -error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-move-out-of-tuple-struct-with-dtor.rs:14:17 - | -LL | let S(_s) = S("foo".to_string()); - | -- ^^^^^^^^^^^^^^^^^^^^ cannot move out of here - | | - | data moved here - | -note: move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/borrowck-move-out-of-tuple-struct-with-dtor.rs:14:11 - | -LL | let S(_s) = S("foo".to_string()); - | ^^ - -error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-move-out-of-tuple-struct-with-dtor.rs:18:19 - | -LL | fn move_in_fn_arg(S(_s): S) { - | ^^--^ - | | | - | | data moved here - | cannot move out of here - | -note: move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/borrowck-move-out-of-tuple-struct-with-dtor.rs:18:21 - | -LL | fn move_in_fn_arg(S(_s): S) { - | ^^ - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0509`. diff --git a/src/test/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.rs b/src/test/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.rs index bb294111ad..5bd32f82eb 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.rs +++ b/src/test/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.rs @@ -5,8 +5,8 @@ impl Drop for S { fn move_in_match() { match S("foo".to_string()) { - S(_s) => {} //~^ ERROR cannot move out of type `S`, which implements the `Drop` trait + S(_s) => {} } } diff --git a/src/test/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.stderr b/src/test/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.stderr index 134b5e3481..a11bda0a00 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.stderr @@ -1,20 +1,31 @@ error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-move-out-of-tuple-struct-with-dtor.rs:8:9 + --> $DIR/borrowck-move-out-of-tuple-struct-with-dtor.rs:7:11 | +LL | match S("foo".to_string()) { + | ^^^^^^^^^^^^^^^^^^^^ cannot move out of here +LL | LL | S(_s) => {} - | ^^--^ - | | | - | | hint: to prevent move, use `ref _s` or `ref mut _s` - | cannot move out of here + | -- data moved here + | +note: move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait + --> $DIR/borrowck-move-out-of-tuple-struct-with-dtor.rs:9:11 + | +LL | S(_s) => {} + | ^^ error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-move-out-of-tuple-struct-with-dtor.rs:14:9 + --> $DIR/borrowck-move-out-of-tuple-struct-with-dtor.rs:14:17 | LL | let S(_s) = S("foo".to_string()); - | ^^--^ - | | | - | | hint: to prevent move, use `ref _s` or `ref mut _s` - | cannot move out of here + | -- ^^^^^^^^^^^^^^^^^^^^ cannot move out of here + | | + | data moved here + | +note: move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait + --> $DIR/borrowck-move-out-of-tuple-struct-with-dtor.rs:14:11 + | +LL | let S(_s) = S("foo".to_string()); + | ^^ error[E0509]: cannot move out of type `S`, which implements the `Drop` trait --> $DIR/borrowck-move-out-of-tuple-struct-with-dtor.rs:18:19 @@ -22,8 +33,14 @@ error[E0509]: cannot move out of type `S`, which implements the `Drop` trait LL | fn move_in_fn_arg(S(_s): S) { | ^^--^ | | | - | | hint: to prevent move, use `ref _s` or `ref mut _s` + | | data moved here | cannot move out of here + | +note: move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait + --> $DIR/borrowck-move-out-of-tuple-struct-with-dtor.rs:18:21 + | +LL | fn move_in_fn_arg(S(_s): S) { + | ^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.nll.stderr b/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.nll.stderr deleted file mode 100644 index 51caf60da6..0000000000 --- a/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.nll.stderr +++ /dev/null @@ -1,31 +0,0 @@ -error[E0508]: cannot move out of type `[Foo]`, a non-copy slice - --> $DIR/borrowck-move-out-of-vec-tail.rs:19:19 - | -LL | match tail { - | ^^^^ cannot move out of here -LL | &[Foo { string: a }, - | - data moved here -... -LL | Foo { string: b }] => { - | - ...and here - | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/borrowck-move-out-of-vec-tail.rs:20:33 - | -LL | &[Foo { string: a }, - | ^ -... -LL | Foo { string: b }] => { - | ^ -help: consider removing the `&` - | -LL | [Foo { string: a }, -LL | -LL | -LL | -LL | Foo { string: b }] => { - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0508`. diff --git a/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.rs b/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.rs index 5f6e01f2df..cc524c1ac3 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.rs +++ b/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.rs @@ -17,10 +17,8 @@ pub fn main() { match *x { [_, ref tail..] => { match tail { + //~^ ERROR cannot move out of type `[Foo]` &[Foo { string: a }, - //~^ ERROR cannot move out of type `[Foo]` - //~| cannot move out - //~| to prevent move Foo { string: b }] => { } _ => { diff --git a/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr b/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr index 5ec0dabfde..9f0670c6bc 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr @@ -1,17 +1,26 @@ error[E0508]: cannot move out of type `[Foo]`, a non-copy slice - --> $DIR/borrowck-move-out-of-vec-tail.rs:20:18 + --> $DIR/borrowck-move-out-of-vec-tail.rs:19:19 + | +LL | match tail { + | ^^^^ cannot move out of here +LL | +LL | &[Foo { string: a }, + | - data moved here +LL | Foo { string: b }] => { + | - ...and here + | +note: move occurs because these variables have types that don't implement the `Copy` trait + --> $DIR/borrowck-move-out-of-vec-tail.rs:21:33 + | +LL | &[Foo { string: a }, + | ^ +LL | Foo { string: b }] => { + | ^ +help: consider removing the `&` + | +LL | [Foo { string: a }, +LL | Foo { string: b }] => { | -LL | &[Foo { string: a }, - | ^ - hint: to prevent move, use `ref a` or `ref mut a` - | __________________| - | | -LL | | -LL | | -LL | | -LL | | Foo { string: b }] => { - | |_________________________________-__^ cannot move out of here - | | - | ...and here (use `ref b` or `ref mut b`) error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-subcomponent.nll.stderr b/src/test/ui/borrowck/borrowck-move-subcomponent.nll.stderr deleted file mode 100644 index 8c9083fcf1..0000000000 --- a/src/test/ui/borrowck/borrowck-move-subcomponent.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0505]: cannot move out of `a.x` because it is borrowed - --> $DIR/borrowck-move-subcomponent.rs:15:14 - | -LL | let pb = &a; - | -- borrow of `a` occurs here -LL | let S { x: ax } = a; - | ^^ move out of `a.x` occurs here -LL | f(pb); - | -- borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/borrowck/borrowck-move-subcomponent.stderr b/src/test/ui/borrowck/borrowck-move-subcomponent.stderr index fd3deef6df..8c9083fcf1 100644 --- a/src/test/ui/borrowck/borrowck-move-subcomponent.stderr +++ b/src/test/ui/borrowck/borrowck-move-subcomponent.stderr @@ -2,9 +2,11 @@ error[E0505]: cannot move out of `a.x` because it is borrowed --> $DIR/borrowck-move-subcomponent.rs:15:14 | LL | let pb = &a; - | - borrow of `a` occurs here + | -- borrow of `a` occurs here LL | let S { x: ax } = a; | ^^ move out of `a.x` occurs here +LL | f(pb); + | -- borrow later used here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-multiple-captures.nll.stderr b/src/test/ui/borrowck/borrowck-multiple-captures.nll.stderr deleted file mode 100644 index 32c7067acc..0000000000 --- a/src/test/ui/borrowck/borrowck-multiple-captures.nll.stderr +++ /dev/null @@ -1,103 +0,0 @@ -error[E0505]: cannot move out of `x1` because it is borrowed - --> $DIR/borrowck-multiple-captures.rs:12:19 - | -LL | let p1 = &x1; - | --- borrow of `x1` occurs here -... -LL | thread::spawn(move|| { - | ^^^^^^ move out of `x1` occurs here -LL | drop(x1); - | -- move occurs due to use in closure -... -LL | borrow(&*p1); - | ---- borrow later used here - -error[E0505]: cannot move out of `x2` because it is borrowed - --> $DIR/borrowck-multiple-captures.rs:12:19 - | -LL | let p2 = &x2; - | --- borrow of `x2` occurs here -LL | thread::spawn(move|| { - | ^^^^^^ move out of `x2` occurs here -LL | drop(x1); -LL | drop(x2); - | -- move occurs due to use in closure -... -LL | borrow(&*p2); - | ---- borrow later used here - -error[E0382]: use of moved value: `x1` - --> $DIR/borrowck-multiple-captures.rs:25:19 - | -LL | let x1: Box<_> = box 1; - | -- move occurs because `x1` has type `std::boxed::Box`, which does not implement the `Copy` trait -LL | drop(x1); - | -- value moved here -... -LL | thread::spawn(move|| { - | ^^^^^^ value used here after move -LL | drop(x1); - | -- use occurs due to use in closure - -error[E0382]: use of moved value: `x2` - --> $DIR/borrowck-multiple-captures.rs:25:19 - | -LL | let x2: Box<_> = box 2; - | -- move occurs because `x2` has type `std::boxed::Box`, which does not implement the `Copy` trait -LL | drop(x2); - | -- value moved here -LL | thread::spawn(move|| { - | ^^^^^^ value used here after move -LL | drop(x1); -LL | drop(x2); - | -- use occurs due to use in closure - -error[E0382]: use of moved value: `x` - --> $DIR/borrowck-multiple-captures.rs:36:14 - | -LL | drop(x); - | - value moved here -LL | drop(x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/borrowck-multiple-captures.rs:34:19 - | -LL | let p = &x; - | -- borrow of `x` occurs here -LL | thread::spawn(move|| { - | ^^^^^^ move out of `x` occurs here -LL | drop(x); - | - move occurs due to use in closure -... -LL | borrow(&*p); - | --- borrow later used here - -error[E0382]: use of moved value: `x` - --> $DIR/borrowck-multiple-captures.rs:46:14 - | -LL | drop(x); - | - value moved here -LL | drop(x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `x` - --> $DIR/borrowck-multiple-captures.rs:44:19 - | -LL | let x: Box<_> = box 1; - | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait -LL | drop(x); - | - value moved here -LL | thread::spawn(move|| { - | ^^^^^^ value used here after move -LL | drop(x); - | - use occurs due to use in closure - -error: aborting due to 8 previous errors - -Some errors occurred: E0382, E0505. -For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-multiple-captures.rs b/src/test/ui/borrowck/borrowck-multiple-captures.rs index ad753781cd..9f09f8442c 100644 --- a/src/test/ui/borrowck/borrowck-multiple-captures.rs +++ b/src/test/ui/borrowck/borrowck-multiple-captures.rs @@ -10,8 +10,10 @@ fn different_vars_after_borrows() { let x2: Box<_> = box 2; let p2 = &x2; thread::spawn(move|| { - drop(x1); //~ ERROR cannot move `x1` into closure because it is borrowed - drop(x2); //~ ERROR cannot move `x2` into closure because it is borrowed + //~^ ERROR cannot move out of `x1` because it is borrowed + //~| ERROR cannot move out of `x2` because it is borrowed + drop(x1); + drop(x2); }); borrow(&*p1); borrow(&*p2); @@ -23,8 +25,10 @@ fn different_vars_after_moves() { let x2: Box<_> = box 2; drop(x2); thread::spawn(move|| { - drop(x1); //~ ERROR capture of moved value: `x1` - drop(x2); //~ ERROR capture of moved value: `x2` + //~^ ERROR use of moved value: `x1` + //~| ERROR use of moved value: `x2` + drop(x1); + drop(x2); }); } @@ -32,7 +36,8 @@ fn same_var_after_borrow() { let x: Box<_> = box 1; let p = &x; thread::spawn(move|| { - drop(x); //~ ERROR cannot move `x` into closure because it is borrowed + //~^ ERROR cannot move out of `x` because it is borrowed + drop(x); drop(x); //~ ERROR use of moved value: `x` }); borrow(&*p); @@ -42,7 +47,8 @@ fn same_var_after_move() { let x: Box<_> = box 1; drop(x); thread::spawn(move|| { - drop(x); //~ ERROR capture of moved value: `x` + //~^ ERROR use of moved value: `x` + drop(x); drop(x); //~ ERROR use of moved value: `x` }); } diff --git a/src/test/ui/borrowck/borrowck-multiple-captures.stderr b/src/test/ui/borrowck/borrowck-multiple-captures.stderr index f25b19e3d2..298482b3c5 100644 --- a/src/test/ui/borrowck/borrowck-multiple-captures.stderr +++ b/src/test/ui/borrowck/borrowck-multiple-captures.stderr @@ -1,54 +1,61 @@ -error[E0504]: cannot move `x1` into closure because it is borrowed - --> $DIR/borrowck-multiple-captures.rs:13:14 +error[E0505]: cannot move out of `x1` because it is borrowed + --> $DIR/borrowck-multiple-captures.rs:12:19 | LL | let p1 = &x1; - | -- borrow of `x1` occurs here + | --- borrow of `x1` occurs here +... +LL | thread::spawn(move|| { + | ^^^^^^ move out of `x1` occurs here ... LL | drop(x1); - | ^^ move into closure occurs here + | -- move occurs due to use in closure +... +LL | borrow(&*p1); + | ---- borrow later used here -error[E0504]: cannot move `x2` into closure because it is borrowed - --> $DIR/borrowck-multiple-captures.rs:14:14 +error[E0505]: cannot move out of `x2` because it is borrowed + --> $DIR/borrowck-multiple-captures.rs:12:19 | LL | let p2 = &x2; - | -- borrow of `x2` occurs here + | --- borrow of `x2` occurs here +LL | thread::spawn(move|| { + | ^^^^^^ move out of `x2` occurs here ... LL | drop(x2); - | ^^ move into closure occurs here + | -- move occurs due to use in closure +... +LL | borrow(&*p2); + | ---- borrow later used here -error[E0382]: capture of moved value: `x1` - --> $DIR/borrowck-multiple-captures.rs:26:14 +error[E0382]: use of moved value: `x1` + --> $DIR/borrowck-multiple-captures.rs:27:19 | +LL | let x1: Box<_> = box 1; + | -- move occurs because `x1` has type `std::boxed::Box`, which does not implement the `Copy` trait LL | drop(x1); | -- value moved here ... +LL | thread::spawn(move|| { + | ^^^^^^ value used here after move +... LL | drop(x1); - | ^^ value captured here after move - | - = note: move occurs because `x1` has type `std::boxed::Box`, which does not implement the `Copy` trait + | -- use occurs due to use in closure -error[E0382]: capture of moved value: `x2` - --> $DIR/borrowck-multiple-captures.rs:27:14 +error[E0382]: use of moved value: `x2` + --> $DIR/borrowck-multiple-captures.rs:27:19 | +LL | let x2: Box<_> = box 2; + | -- move occurs because `x2` has type `std::boxed::Box`, which does not implement the `Copy` trait LL | drop(x2); | -- value moved here +LL | thread::spawn(move|| { + | ^^^^^^ value used here after move ... LL | drop(x2); - | ^^ value captured here after move - | - = note: move occurs because `x2` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0504]: cannot move `x` into closure because it is borrowed - --> $DIR/borrowck-multiple-captures.rs:35:14 - | -LL | let p = &x; - | - borrow of `x` occurs here -LL | thread::spawn(move|| { -LL | drop(x); - | ^ move into closure occurs here + | -- use occurs due to use in closure error[E0382]: use of moved value: `x` - --> $DIR/borrowck-multiple-captures.rs:36:14 + --> $DIR/borrowck-multiple-captures.rs:41:14 | LL | drop(x); | - value moved here @@ -57,19 +64,22 @@ LL | drop(x); | = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait -error[E0382]: capture of moved value: `x` - --> $DIR/borrowck-multiple-captures.rs:45:14 +error[E0505]: cannot move out of `x` because it is borrowed + --> $DIR/borrowck-multiple-captures.rs:38:19 | -LL | drop(x); - | - value moved here +LL | let p = &x; + | -- borrow of `x` occurs here LL | thread::spawn(move|| { + | ^^^^^^ move out of `x` occurs here +LL | LL | drop(x); - | ^ value captured here after move - | - = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs due to use in closure +... +LL | borrow(&*p); + | --- borrow later used here error[E0382]: use of moved value: `x` - --> $DIR/borrowck-multiple-captures.rs:46:14 + --> $DIR/borrowck-multiple-captures.rs:52:14 | LL | drop(x); | - value moved here @@ -78,7 +88,20 @@ LL | drop(x); | = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait +error[E0382]: use of moved value: `x` + --> $DIR/borrowck-multiple-captures.rs:49:19 + | +LL | let x: Box<_> = box 1; + | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait +LL | drop(x); + | - value moved here +LL | thread::spawn(move|| { + | ^^^^^^ value used here after move +LL | +LL | drop(x); + | - use occurs due to use in closure + error: aborting due to 8 previous errors -Some errors occurred: E0382, E0504. +Some errors have detailed explanations: E0382, E0505. For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-mut-addr-of-imm-var.nll.stderr b/src/test/ui/borrowck/borrowck-mut-addr-of-imm-var.nll.stderr deleted file mode 100644 index d58548f220..0000000000 --- a/src/test/ui/borrowck/borrowck-mut-addr-of-imm-var.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/borrowck-mut-addr-of-imm-var.rs:3:25 - | -LL | let x: isize = 3; - | - help: consider changing this to be mutable: `mut x` -LL | let y: &mut isize = &mut x; - | ^^^^^^ cannot borrow as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/borrowck/borrowck-mut-addr-of-imm-var.stderr b/src/test/ui/borrowck/borrowck-mut-addr-of-imm-var.stderr index aa3b39c395..d58548f220 100644 --- a/src/test/ui/borrowck/borrowck-mut-addr-of-imm-var.stderr +++ b/src/test/ui/borrowck/borrowck-mut-addr-of-imm-var.stderr @@ -1,10 +1,10 @@ -error[E0596]: cannot borrow immutable local variable `x` as mutable - --> $DIR/borrowck-mut-addr-of-imm-var.rs:3:30 +error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable + --> $DIR/borrowck-mut-addr-of-imm-var.rs:3:25 | LL | let x: isize = 3; - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` LL | let y: &mut isize = &mut x; - | ^ cannot borrow mutably + | ^^^^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.ast.stderr b/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.ast.stderr deleted file mode 100644 index cee61db38f..0000000000 --- a/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.ast.stderr +++ /dev/null @@ -1,36 +0,0 @@ -error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-mut-borrow-linear-errors.rs:13:35 - | -LL | 1 => { addr.push(&mut x); } - | ^ mutable borrow starts here in previous iteration of loop -... -LL | } - | - mutable borrow ends here - -error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-mut-borrow-linear-errors.rs:15:35 - | -LL | 1 => { addr.push(&mut x); } - | - first mutable borrow occurs here -LL | -LL | 2 => { addr.push(&mut x); } - | ^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here - -error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-mut-borrow-linear-errors.rs:17:35 - | -LL | 1 => { addr.push(&mut x); } - | - first mutable borrow occurs here -... -LL | _ => { addr.push(&mut x); } - | ^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.mir.stderr b/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.mir.stderr deleted file mode 100644 index a6e7d74af1..0000000000 --- a/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.mir.stderr +++ /dev/null @@ -1,32 +0,0 @@ -error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-mut-borrow-linear-errors.rs:13:30 - | -LL | 1 => { addr.push(&mut x); } - | ---- ^^^^^^ second mutable borrow occurs here - | | - | first borrow later used here -... -LL | _ => { addr.push(&mut x); } - | ------ first mutable borrow occurs here - -error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-mut-borrow-linear-errors.rs:15:30 - | -LL | 1 => { addr.push(&mut x); } - | ---- first borrow later used here -LL | -LL | 2 => { addr.push(&mut x); } - | ^^^^^^ second mutable borrow occurs here -LL | -LL | _ => { addr.push(&mut x); } - | ------ first mutable borrow occurs here - -error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-mut-borrow-linear-errors.rs:17:30 - | -LL | _ => { addr.push(&mut x); } - | ^^^^^^ mutable borrow starts here in previous iteration of loop - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.rs b/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.rs index bb0b26ecf0..e3d76398bc 100644 --- a/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.rs +++ b/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.rs @@ -2,20 +2,14 @@ // conflicts with a new loan, as opposed to every issued loan. This keeps us // down to O(n) errors (for n problem lines), instead of O(n^2) errors. -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - fn main() { let mut x = 1; let mut addr = vec![]; loop { match 1 { - 1 => { addr.push(&mut x); } //[ast]~ ERROR [E0499] - //[mir]~^ ERROR [E0499] - 2 => { addr.push(&mut x); } //[ast]~ ERROR [E0499] - //[mir]~^ ERROR [E0499] - _ => { addr.push(&mut x); } //[ast]~ ERROR [E0499] - //[mir]~^ ERROR [E0499] + 1 => { addr.push(&mut x); } //~ ERROR [E0499] + 2 => { addr.push(&mut x); } //~ ERROR [E0499] + _ => { addr.push(&mut x); } //~ ERROR [E0499] } } } diff --git a/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.ast.nll.stderr b/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.stderr similarity index 84% rename from src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.ast.nll.stderr rename to src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.stderr index a6e7d74af1..a8d00d1523 100644 --- a/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.ast.nll.stderr +++ b/src/test/ui/borrowck/borrowck-mut-borrow-linear-errors.stderr @@ -1,28 +1,26 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-mut-borrow-linear-errors.rs:13:30 + --> $DIR/borrowck-mut-borrow-linear-errors.rs:10:30 | LL | 1 => { addr.push(&mut x); } | ---- ^^^^^^ second mutable borrow occurs here | | | first borrow later used here -... +LL | 2 => { addr.push(&mut x); } LL | _ => { addr.push(&mut x); } | ------ first mutable borrow occurs here error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-mut-borrow-linear-errors.rs:15:30 + --> $DIR/borrowck-mut-borrow-linear-errors.rs:11:30 | LL | 1 => { addr.push(&mut x); } | ---- first borrow later used here -LL | LL | 2 => { addr.push(&mut x); } | ^^^^^^ second mutable borrow occurs here -LL | LL | _ => { addr.push(&mut x); } | ------ first mutable borrow occurs here error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-mut-borrow-linear-errors.rs:17:30 + --> $DIR/borrowck-mut-borrow-linear-errors.rs:12:30 | LL | _ => { addr.push(&mut x); } | ^^^^^^ mutable borrow starts here in previous iteration of loop diff --git a/src/test/ui/borrowck/borrowck-mut-borrow-of-mut-base-ptr.nll.stderr b/src/test/ui/borrowck/borrowck-mut-borrow-of-mut-base-ptr.nll.stderr deleted file mode 100644 index 925930acf8..0000000000 --- a/src/test/ui/borrowck/borrowck-mut-borrow-of-mut-base-ptr.nll.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error[E0502]: cannot borrow `t0` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-mut-borrow-of-mut-base-ptr.rs:11:18 - | -LL | let p: &isize = &*t0; // Freezes `*t0` - | ---- immutable borrow occurs here -LL | let mut t2 = &mut t0; - | ^^^^^^^ mutable borrow occurs here -LL | **t2 += 1; // Mutates `*t0` -LL | p.use_ref(); - | - immutable borrow later used here - -error[E0499]: cannot borrow `t0` as mutable more than once at a time - --> $DIR/borrowck-mut-borrow-of-mut-base-ptr.rs:19:18 - | -LL | let p: &mut isize = &mut *t0; // Claims `*t0` - | -------- first mutable borrow occurs here -LL | let mut t2 = &mut t0; - | ^^^^^^^ second mutable borrow occurs here -LL | **t2 += 1; // Mutates `*t0` but not through `*p` -LL | p.use_mut(); - | - first borrow later used here - -error: aborting due to 2 previous errors - -Some errors occurred: E0499, E0502. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-mut-borrow-of-mut-base-ptr.stderr b/src/test/ui/borrowck/borrowck-mut-borrow-of-mut-base-ptr.stderr index fb73dbd451..f2baee0937 100644 --- a/src/test/ui/borrowck/borrowck-mut-borrow-of-mut-base-ptr.stderr +++ b/src/test/ui/borrowck/borrowck-mut-borrow-of-mut-base-ptr.stderr @@ -1,26 +1,26 @@ -error[E0502]: cannot borrow `t0` as mutable because `*t0` is also borrowed as immutable - --> $DIR/borrowck-mut-borrow-of-mut-base-ptr.rs:11:23 +error[E0502]: cannot borrow `t0` as mutable because it is also borrowed as immutable + --> $DIR/borrowck-mut-borrow-of-mut-base-ptr.rs:11:18 | LL | let p: &isize = &*t0; // Freezes `*t0` - | --- immutable borrow occurs here + | ---- immutable borrow occurs here LL | let mut t2 = &mut t0; - | ^^ mutable borrow occurs here -... -LL | } - | - immutable borrow ends here + | ^^^^^^^ mutable borrow occurs here +LL | **t2 += 1; // Mutates `*t0` +LL | p.use_ref(); + | - immutable borrow later used here error[E0499]: cannot borrow `t0` as mutable more than once at a time - --> $DIR/borrowck-mut-borrow-of-mut-base-ptr.rs:19:23 + --> $DIR/borrowck-mut-borrow-of-mut-base-ptr.rs:19:18 | LL | let p: &mut isize = &mut *t0; // Claims `*t0` - | --- first mutable borrow occurs here + | -------- first mutable borrow occurs here LL | let mut t2 = &mut t0; - | ^^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here + | ^^^^^^^ second mutable borrow occurs here +LL | **t2 += 1; // Mutates `*t0` but not through `*p` +LL | p.use_mut(); + | - first borrow later used here error: aborting due to 2 previous errors -Some errors occurred: E0499, E0502. +Some errors have detailed explanations: E0499, E0502. For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-mut-slice-of-imm-vec.nll.stderr b/src/test/ui/borrowck/borrowck-mut-slice-of-imm-vec.nll.stderr deleted file mode 100644 index 8e7ffdc681..0000000000 --- a/src/test/ui/borrowck/borrowck-mut-slice-of-imm-vec.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable - --> $DIR/borrowck-mut-slice-of-imm-vec.rs:7:11 - | -LL | let v = vec![1, 2, 3]; - | - help: consider changing this to be mutable: `mut v` -LL | write(&mut v); - | ^^^^^^ cannot borrow as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/borrowck/borrowck-mut-slice-of-imm-vec.stderr b/src/test/ui/borrowck/borrowck-mut-slice-of-imm-vec.stderr index 416091920a..8e7ffdc681 100644 --- a/src/test/ui/borrowck/borrowck-mut-slice-of-imm-vec.stderr +++ b/src/test/ui/borrowck/borrowck-mut-slice-of-imm-vec.stderr @@ -1,10 +1,10 @@ -error[E0596]: cannot borrow immutable local variable `v` as mutable - --> $DIR/borrowck-mut-slice-of-imm-vec.rs:7:16 +error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable + --> $DIR/borrowck-mut-slice-of-imm-vec.rs:7:11 | LL | let v = vec![1, 2, 3]; - | - help: make this binding mutable: `mut v` + | - help: consider changing this to be mutable: `mut v` LL | write(&mut v); - | ^ cannot borrow mutably + | ^^^^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-mutate-in-guard.nll.stderr b/src/test/ui/borrowck/borrowck-mutate-in-guard.nll.stderr index c1b794fc86..7e4a6322d5 100644 --- a/src/test/ui/borrowck/borrowck-mutate-in-guard.nll.stderr +++ b/src/test/ui/borrowck/borrowck-mutate-in-guard.nll.stderr @@ -5,7 +5,7 @@ LL | Enum::A(_) if { x = Enum::B(false); false } => 1, | ^^^^^^^^^^^^^^^^^^ assignment in pattern guard error[E0301]: cannot mutably borrow in a pattern guard - --> $DIR/borrowck-mutate-in-guard.rs:12:38 + --> $DIR/borrowck-mutate-in-guard.rs:15:38 | LL | Enum::A(_) if { let y = &mut x; *y = Enum::B(false); false } => 1, | ^ borrowed mutably in pattern guard @@ -13,12 +13,29 @@ LL | Enum::A(_) if { let y = &mut x; *y = Enum::B(false); false } => 1, = help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable error[E0302]: cannot assign in a pattern guard - --> $DIR/borrowck-mutate-in-guard.rs:12:41 + --> $DIR/borrowck-mutate-in-guard.rs:15:41 | LL | Enum::A(_) if { let y = &mut x; *y = Enum::B(false); false } => 1, | ^^^^^^^^^^^^^^^^^^^ assignment in pattern guard -error: aborting due to 3 previous errors +error[E0510]: cannot assign `x` in match guard + --> $DIR/borrowck-mutate-in-guard.rs:10:25 + | +LL | match x { + | - value is immutable in match guard +LL | Enum::A(_) if { x = Enum::B(false); false } => 1, + | ^^^^^^^^^^^^^^^^^^ cannot assign + +error[E0510]: cannot mutably borrow `x` in match guard + --> $DIR/borrowck-mutate-in-guard.rs:15:33 + | +LL | match x { + | - value is immutable in match guard +... +LL | Enum::A(_) if { let y = &mut x; *y = Enum::B(false); false } => 1, + | ^^^^^^ cannot mutably borrow + +error: aborting due to 5 previous errors -Some errors occurred: E0301, E0302. +Some errors have detailed explanations: E0301, E0302, E0510. For more information about an error, try `rustc --explain E0301`. diff --git a/src/test/ui/borrowck/borrowck-mutate-in-guard.rs b/src/test/ui/borrowck/borrowck-mutate-in-guard.rs index 2bda3deee1..9ea5e5cd14 100644 --- a/src/test/ui/borrowck/borrowck-mutate-in-guard.rs +++ b/src/test/ui/borrowck/borrowck-mutate-in-guard.rs @@ -9,9 +9,15 @@ fn foo() -> isize { match x { Enum::A(_) if { x = Enum::B(false); false } => 1, //~^ ERROR cannot assign in a pattern guard + //~| WARN cannot assign `x` in match guard + //~| WARN this error has been downgraded to a warning for backwards compatibility + //~| WARN this represents potential undefined behavior in your code and this warning will Enum::A(_) if { let y = &mut x; *y = Enum::B(false); false } => 1, //~^ ERROR cannot mutably borrow in a pattern guard - //~^^ ERROR cannot assign in a pattern guard + //~| ERROR cannot assign in a pattern guard + //~| WARN cannot mutably borrow `x` in match guard + //~| WARN this error has been downgraded to a warning for backwards compatibility + //~| WARN this represents potential undefined behavior in your code and this warning will Enum::A(p) => *p, Enum::B(_) => 2, } diff --git a/src/test/ui/borrowck/borrowck-mutate-in-guard.stderr b/src/test/ui/borrowck/borrowck-mutate-in-guard.stderr index 9e40856deb..d12d751d89 100644 --- a/src/test/ui/borrowck/borrowck-mutate-in-guard.stderr +++ b/src/test/ui/borrowck/borrowck-mutate-in-guard.stderr @@ -5,18 +5,43 @@ LL | Enum::A(_) if { x = Enum::B(false); false } => 1, | ^^^^^^^^^^^^^^^^^^ assignment in pattern guard error[E0301]: cannot mutably borrow in a pattern guard - --> $DIR/borrowck-mutate-in-guard.rs:12:38 + --> $DIR/borrowck-mutate-in-guard.rs:15:38 | LL | Enum::A(_) if { let y = &mut x; *y = Enum::B(false); false } => 1, | ^ borrowed mutably in pattern guard + | + = help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable error[E0302]: cannot assign in a pattern guard - --> $DIR/borrowck-mutate-in-guard.rs:12:41 + --> $DIR/borrowck-mutate-in-guard.rs:15:41 | LL | Enum::A(_) if { let y = &mut x; *y = Enum::B(false); false } => 1, | ^^^^^^^^^^^^^^^^^^^ assignment in pattern guard +warning[E0510]: cannot assign `x` in match guard + --> $DIR/borrowck-mutate-in-guard.rs:10:25 + | +LL | match x { + | - value is immutable in match guard +LL | Enum::A(_) if { x = Enum::B(false); false } => 1, + | ^^^^^^^^^^^^^^^^^^ cannot assign + | + = warning: this error has been downgraded to a warning for backwards compatibility with previous releases + = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + +warning[E0510]: cannot mutably borrow `x` in match guard + --> $DIR/borrowck-mutate-in-guard.rs:15:33 + | +LL | match x { + | - value is immutable in match guard +... +LL | Enum::A(_) if { let y = &mut x; *y = Enum::B(false); false } => 1, + | ^^^^^^ cannot mutably borrow + | + = warning: this error has been downgraded to a warning for backwards compatibility with previous releases + = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + error: aborting due to 3 previous errors -Some errors occurred: E0301, E0302. +Some errors have detailed explanations: E0301, E0302, E0510. For more information about an error, try `rustc --explain E0301`. diff --git a/src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.nll.stderr b/src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.nll.stderr deleted file mode 100644 index 3462b7610d..0000000000 --- a/src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/borrowck-no-cycle-in-exchange-heap.rs:16:15 - | -LL | Cycle::Node(ref mut y) => { - | --------- borrow of `x.0` occurs here -LL | y.a = x; - | --- ^ move out of `x` occurs here - | | - | borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.stderr b/src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.stderr index 5fc169490c..3462b7610d 100644 --- a/src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.stderr +++ b/src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.stderr @@ -4,7 +4,9 @@ error[E0505]: cannot move out of `x` because it is borrowed LL | Cycle::Node(ref mut y) => { | --------- borrow of `x.0` occurs here LL | y.a = x; - | ^ move out of `x` occurs here + | --- ^ move out of `x` occurs here + | | + | borrow later used here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-object-lifetime.nll.stderr b/src/test/ui/borrowck/borrowck-object-lifetime.nll.stderr index cf94c74dec..49c3f861ea 100644 --- a/src/test/ui/borrowck/borrowck-object-lifetime.nll.stderr +++ b/src/test/ui/borrowck/borrowck-object-lifetime.nll.stderr @@ -4,7 +4,7 @@ error[E0502]: cannot borrow `*x` as mutable because it is also borrowed as immut LL | let y = x.borrowed(); | - immutable borrow occurs here LL | let z = x.mut_borrowed(); - | ^^^^^^^^^^^^^^^^ mutable borrow occurs here + | ^ mutable borrow occurs here LL | y.use_ref(); | - immutable borrow later used here diff --git a/src/test/ui/borrowck/borrowck-object-lifetime.stderr b/src/test/ui/borrowck/borrowck-object-lifetime.stderr index 8f6c8e072e..cf94c74dec 100644 --- a/src/test/ui/borrowck/borrowck-object-lifetime.stderr +++ b/src/test/ui/borrowck/borrowck-object-lifetime.stderr @@ -4,21 +4,19 @@ error[E0502]: cannot borrow `*x` as mutable because it is also borrowed as immut LL | let y = x.borrowed(); | - immutable borrow occurs here LL | let z = x.mut_borrowed(); - | ^ mutable borrow occurs here + | ^^^^^^^^^^^^^^^^ mutable borrow occurs here LL | y.use_ref(); -LL | } - | - immutable borrow ends here + | - immutable borrow later used here -error[E0502]: cannot borrow `x` as mutable because `*x` is also borrowed as immutable - --> $DIR/borrowck-object-lifetime.rs:26:18 +error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable + --> $DIR/borrowck-object-lifetime.rs:26:13 | LL | let y = x.borrowed(); | - immutable borrow occurs here LL | let z = &mut x; - | ^ mutable borrow occurs here + | ^^^^^^ mutable borrow occurs here LL | y.use_ref(); -LL | } - | - immutable borrow ends here + | - immutable borrow later used here error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/borrowck-or-init.nll.stderr b/src/test/ui/borrowck/borrowck-or-init.nll.stderr deleted file mode 100644 index 122f519272..0000000000 --- a/src/test/ui/borrowck/borrowck-or-init.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0381]: borrow of possibly uninitialized variable: `i` - --> $DIR/borrowck-or-init.rs:5:20 - | -LL | println!("{}", i); - | ^ use of possibly uninitialized `i` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-or-init.rs b/src/test/ui/borrowck/borrowck-or-init.rs index 5b1487831a..c0d6c9c273 100644 --- a/src/test/ui/borrowck/borrowck-or-init.rs +++ b/src/test/ui/borrowck/borrowck-or-init.rs @@ -2,5 +2,5 @@ fn main() { let i: isize; println!("{}", false || { i = 5; true }); - println!("{}", i); //~ ERROR use of possibly uninitialized variable: `i` + println!("{}", i); //~ ERROR borrow of possibly uninitialized variable: `i` } diff --git a/src/test/ui/borrowck/borrowck-or-init.stderr b/src/test/ui/borrowck/borrowck-or-init.stderr index a2b69b187b..122f519272 100644 --- a/src/test/ui/borrowck/borrowck-or-init.stderr +++ b/src/test/ui/borrowck/borrowck-or-init.stderr @@ -1,4 +1,4 @@ -error[E0381]: use of possibly uninitialized variable: `i` +error[E0381]: borrow of possibly uninitialized variable: `i` --> $DIR/borrowck-or-init.rs:5:20 | LL | println!("{}", i); diff --git a/src/test/ui/borrowck/borrowck-overloaded-call.nll.stderr b/src/test/ui/borrowck/borrowck-overloaded-call.nll.stderr deleted file mode 100644 index b7fcaa645a..0000000000 --- a/src/test/ui/borrowck/borrowck-overloaded-call.nll.stderr +++ /dev/null @@ -1,34 +0,0 @@ -error[E0502]: cannot borrow `s` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-overloaded-call.rs:59:5 - | -LL | let sp = &mut s; - | ------ mutable borrow occurs here -LL | s(3); - | ^ immutable borrow occurs here -LL | use_mut(sp); - | -- mutable borrow later used here - -error[E0596]: cannot borrow `s` as mutable, as it is not declared as mutable - --> $DIR/borrowck-overloaded-call.rs:67:5 - | -LL | let s = SFnMut { - | - help: consider changing this to be mutable: `mut s` -... -LL | s(3); - | ^ cannot borrow as mutable - -error[E0382]: use of moved value: `s` - --> $DIR/borrowck-overloaded-call.rs:75:5 - | -LL | let s = SFnOnce { - | - move occurs because `s` has type `SFnOnce`, which does not implement the `Copy` trait -... -LL | s(" world".to_string()); - | - value moved here -LL | s(" world".to_string()); - | ^ value used here after move - -error: aborting due to 3 previous errors - -Some errors occurred: E0382, E0502, E0596. -For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-overloaded-call.rs b/src/test/ui/borrowck/borrowck-overloaded-call.rs index 8601449b33..7b16bf666d 100644 --- a/src/test/ui/borrowck/borrowck-overloaded-call.rs +++ b/src/test/ui/borrowck/borrowck-overloaded-call.rs @@ -64,7 +64,7 @@ fn g() { x: 1, y: 2, }; - s(3); //~ ERROR cannot borrow immutable local variable `s` as mutable + s(3); //~ ERROR cannot borrow `s` as mutable, as it is not declared as mutable } fn h() { diff --git a/src/test/ui/borrowck/borrowck-overloaded-call.stderr b/src/test/ui/borrowck/borrowck-overloaded-call.stderr index 97223a2307..ddb63b5ec0 100644 --- a/src/test/ui/borrowck/borrowck-overloaded-call.stderr +++ b/src/test/ui/borrowck/borrowck-overloaded-call.stderr @@ -2,33 +2,33 @@ error[E0502]: cannot borrow `s` as immutable because it is also borrowed as muta --> $DIR/borrowck-overloaded-call.rs:59:5 | LL | let sp = &mut s; - | - mutable borrow occurs here + | ------ mutable borrow occurs here LL | s(3); | ^ immutable borrow occurs here LL | use_mut(sp); -LL | } - | - mutable borrow ends here + | -- mutable borrow later used here -error[E0596]: cannot borrow immutable local variable `s` as mutable +error[E0596]: cannot borrow `s` as mutable, as it is not declared as mutable --> $DIR/borrowck-overloaded-call.rs:67:5 | LL | let s = SFnMut { - | - help: make this binding mutable: `mut s` + | - help: consider changing this to be mutable: `mut s` ... LL | s(3); - | ^ cannot borrow mutably + | ^ cannot borrow as mutable error[E0382]: use of moved value: `s` --> $DIR/borrowck-overloaded-call.rs:75:5 | +LL | let s = SFnOnce { + | - move occurs because `s` has type `SFnOnce`, which does not implement the `Copy` trait +... LL | s(" world".to_string()); | - value moved here LL | s(" world".to_string()); | ^ value used here after move - | - = note: move occurs because `s` has type `SFnOnce`, which does not implement the `Copy` trait error: aborting due to 3 previous errors -Some errors occurred: E0382, E0502, E0596. +Some errors have detailed explanations: E0382, E0502, E0596. For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.ast.nll.stderr b/src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.ast.nll.stderr deleted file mode 100644 index f33fb55f9c..0000000000 --- a/src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.ast.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0506]: cannot assign to `v` because it is borrowed - --> $DIR/borrowck-overloaded-index-and-overloaded-deref.rs:34:5 - | -LL | let i = &v[0].f; - | - borrow of `v` occurs here -LL | v = MyVec { x: MyPtr { x: Foo { f: 23 } } }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `v` occurs here -... -LL | read(*i); - | -- borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.ast.stderr b/src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.ast.stderr deleted file mode 100644 index 59841ee2db..0000000000 --- a/src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.ast.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0506]: cannot assign to `v` because it is borrowed - --> $DIR/borrowck-overloaded-index-and-overloaded-deref.rs:34:5 - | -LL | let i = &v[0].f; - | - borrow of `v` occurs here -LL | v = MyVec { x: MyPtr { x: Foo { f: 23 } } }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `v` occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.rs b/src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.rs index 348d99f4f9..0e3e01a933 100644 --- a/src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.rs +++ b/src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.rs @@ -3,9 +3,6 @@ // operator. The accounting of the all the implicit things going on // here is rather subtle. Issue #20232. -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - use std::ops::{Deref, Index}; struct MyVec { x: T } @@ -32,8 +29,7 @@ fn main() { let mut v = MyVec { x: MyPtr { x: Foo { f: 22 } } }; let i = &v[0].f; v = MyVec { x: MyPtr { x: Foo { f: 23 } } }; - //[ast]~^ ERROR cannot assign to `v` - //[mir]~^^ ERROR cannot assign to `v` because it is borrowed + //~^ ERROR cannot assign to `v` because it is borrowed read(*i); } diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.mir.stderr b/src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.stderr similarity index 86% rename from src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.mir.stderr rename to src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.stderr index f33fb55f9c..5d52e49191 100644 --- a/src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.mir.stderr +++ b/src/test/ui/borrowck/borrowck-overloaded-index-and-overloaded-deref.stderr @@ -1,11 +1,11 @@ error[E0506]: cannot assign to `v` because it is borrowed - --> $DIR/borrowck-overloaded-index-and-overloaded-deref.rs:34:5 + --> $DIR/borrowck-overloaded-index-and-overloaded-deref.rs:31:5 | LL | let i = &v[0].f; | - borrow of `v` occurs here LL | v = MyVec { x: MyPtr { x: Foo { f: 23 } } }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `v` occurs here -... +LL | LL | read(*i); | -- borrow later used here diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-autoderef.nll.stderr b/src/test/ui/borrowck/borrowck-overloaded-index-autoderef.nll.stderr deleted file mode 100644 index 5f34749ca8..0000000000 --- a/src/test/ui/borrowck/borrowck-overloaded-index-autoderef.nll.stderr +++ /dev/null @@ -1,84 +0,0 @@ -error[E0502]: cannot borrow `*f` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-overloaded-index-autoderef.rs:37:14 - | -LL | let p = &mut f[&s]; - | - mutable borrow occurs here -LL | let q = &f[&s]; - | ^ immutable borrow occurs here -LL | p.use_mut(); - | - mutable borrow later used here - -error[E0499]: cannot borrow `*f` as mutable more than once at a time - --> $DIR/borrowck-overloaded-index-autoderef.rs:43:18 - | -LL | let p = &mut f[&s]; - | - first mutable borrow occurs here -LL | let q = &mut f[&s]; - | ^ second mutable borrow occurs here -LL | p.use_mut(); - | - first borrow later used here - -error[E0499]: cannot borrow `f.foo` as mutable more than once at a time - --> $DIR/borrowck-overloaded-index-autoderef.rs:53:18 - | -LL | let p = &mut f.foo[&s]; - | ----- first mutable borrow occurs here -LL | let q = &mut f.foo[&s]; - | ^^^^^ second mutable borrow occurs here -LL | p.use_mut(); - | - first borrow later used here - -error[E0502]: cannot borrow `f.foo` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-overloaded-index-autoderef.rs:65:18 - | -LL | let p = &f.foo[&s]; - | ----- immutable borrow occurs here -LL | let q = &mut f.foo[&s]; - | ^^^^^ mutable borrow occurs here -LL | p.use_ref(); - | - immutable borrow later used here - -error[E0506]: cannot assign to `f.foo` because it is borrowed - --> $DIR/borrowck-overloaded-index-autoderef.rs:71:5 - | -LL | let p = &f.foo[&s]; - | ----- borrow of `f.foo` occurs here -LL | f.foo = g; - | ^^^^^^^^^ assignment to borrowed `f.foo` occurs here -LL | p.use_ref(); - | - borrow later used here - -error[E0506]: cannot assign to `*f` because it is borrowed - --> $DIR/borrowck-overloaded-index-autoderef.rs:77:5 - | -LL | let p = &f.foo[&s]; - | ----- borrow of `*f` occurs here -LL | *f = g; - | ^^^^^^ assignment to borrowed `*f` occurs here -LL | p.use_ref(); - | - borrow later used here - -error[E0506]: cannot assign to `f.foo` because it is borrowed - --> $DIR/borrowck-overloaded-index-autoderef.rs:83:5 - | -LL | let p = &mut f.foo[&s]; - | ----- borrow of `f.foo` occurs here -LL | f.foo = g; - | ^^^^^^^^^ assignment to borrowed `f.foo` occurs here -LL | p.use_mut(); - | - borrow later used here - -error[E0506]: cannot assign to `*f` because it is borrowed - --> $DIR/borrowck-overloaded-index-autoderef.rs:89:5 - | -LL | let p = &mut f.foo[&s]; - | ----- borrow of `*f` occurs here -LL | *f = g; - | ^^^^^^ assignment to borrowed `*f` occurs here -LL | p.use_mut(); - | - borrow later used here - -error: aborting due to 8 previous errors - -Some errors occurred: E0499, E0502, E0506. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-autoderef.stderr b/src/test/ui/borrowck/borrowck-overloaded-index-autoderef.stderr index 73cab8868e..978e129172 100644 --- a/src/test/ui/borrowck/borrowck-overloaded-index-autoderef.stderr +++ b/src/test/ui/borrowck/borrowck-overloaded-index-autoderef.stderr @@ -6,8 +6,7 @@ LL | let p = &mut f[&s]; LL | let q = &f[&s]; | ^ immutable borrow occurs here LL | p.use_mut(); -LL | } - | - mutable borrow ends here + | - mutable borrow later used here error[E0499]: cannot borrow `*f` as mutable more than once at a time --> $DIR/borrowck-overloaded-index-autoderef.rs:43:18 @@ -17,8 +16,7 @@ LL | let p = &mut f[&s]; LL | let q = &mut f[&s]; | ^ second mutable borrow occurs here LL | p.use_mut(); -LL | } - | - first borrow ends here + | - first borrow later used here error[E0499]: cannot borrow `f.foo` as mutable more than once at a time --> $DIR/borrowck-overloaded-index-autoderef.rs:53:18 @@ -28,8 +26,7 @@ LL | let p = &mut f.foo[&s]; LL | let q = &mut f.foo[&s]; | ^^^^^ second mutable borrow occurs here LL | p.use_mut(); -LL | } - | - first borrow ends here + | - first borrow later used here error[E0502]: cannot borrow `f.foo` as mutable because it is also borrowed as immutable --> $DIR/borrowck-overloaded-index-autoderef.rs:65:18 @@ -39,8 +36,7 @@ LL | let p = &f.foo[&s]; LL | let q = &mut f.foo[&s]; | ^^^^^ mutable borrow occurs here LL | p.use_ref(); -LL | } - | - immutable borrow ends here + | - immutable borrow later used here error[E0506]: cannot assign to `f.foo` because it is borrowed --> $DIR/borrowck-overloaded-index-autoderef.rs:71:5 @@ -49,6 +45,8 @@ LL | let p = &f.foo[&s]; | ----- borrow of `f.foo` occurs here LL | f.foo = g; | ^^^^^^^^^ assignment to borrowed `f.foo` occurs here +LL | p.use_ref(); + | - borrow later used here error[E0506]: cannot assign to `*f` because it is borrowed --> $DIR/borrowck-overloaded-index-autoderef.rs:77:5 @@ -57,6 +55,8 @@ LL | let p = &f.foo[&s]; | ----- borrow of `*f` occurs here LL | *f = g; | ^^^^^^ assignment to borrowed `*f` occurs here +LL | p.use_ref(); + | - borrow later used here error[E0506]: cannot assign to `f.foo` because it is borrowed --> $DIR/borrowck-overloaded-index-autoderef.rs:83:5 @@ -65,6 +65,8 @@ LL | let p = &mut f.foo[&s]; | ----- borrow of `f.foo` occurs here LL | f.foo = g; | ^^^^^^^^^ assignment to borrowed `f.foo` occurs here +LL | p.use_mut(); + | - borrow later used here error[E0506]: cannot assign to `*f` because it is borrowed --> $DIR/borrowck-overloaded-index-autoderef.rs:89:5 @@ -73,8 +75,10 @@ LL | let p = &mut f.foo[&s]; | ----- borrow of `*f` occurs here LL | *f = g; | ^^^^^^ assignment to borrowed `*f` occurs here +LL | p.use_mut(); + | - borrow later used here error: aborting due to 8 previous errors -Some errors occurred: E0499, E0502, E0506. +Some errors have detailed explanations: E0499, E0502, E0506. For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.nll.stderr b/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.nll.stderr deleted file mode 100644 index dbd805f1d2..0000000000 --- a/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/borrowck-overloaded-index-move-from-vec.rs:20:15 - | -LL | let bad = v[0]; - | ^^^^ - | | - | cannot move out of borrowed content - | help: consider borrowing here: `&v[0]` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.rs b/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.rs index 76dd97ea24..b3060824f8 100644 --- a/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.rs +++ b/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.rs @@ -18,5 +18,5 @@ fn main() { let v = MyVec::> { data: vec![box 1, box 2, box 3] }; let good = &v[0]; // Shouldn't fail here let bad = v[0]; - //~^ ERROR cannot move out of indexed content + //~^ ERROR cannot move out of borrowed content } diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.stderr b/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.stderr index fe655dc8b1..dbd805f1d2 100644 --- a/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.stderr +++ b/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.stderr @@ -1,11 +1,11 @@ -error[E0507]: cannot move out of indexed content +error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-overloaded-index-move-from-vec.rs:20:15 | LL | let bad = v[0]; | ^^^^ | | - | cannot move out of indexed content - | help: consider using a reference instead: `&v[0]` + | cannot move out of borrowed content + | help: consider borrowing here: `&v[0]` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-move-index.nll.stderr b/src/test/ui/borrowck/borrowck-overloaded-index-move-index.nll.stderr deleted file mode 100644 index de60067f1a..0000000000 --- a/src/test/ui/borrowck/borrowck-overloaded-index-move-index.nll.stderr +++ /dev/null @@ -1,40 +0,0 @@ -error[E0505]: cannot move out of `s` because it is borrowed - --> $DIR/borrowck-overloaded-index-move-index.rs:50:22 - | -LL | let rs = &mut s; - | ------ borrow of `s` occurs here -LL | -LL | println!("{}", f[s]); - | ^ move out of `s` occurs here -... -LL | use_mut(rs); - | -- borrow later used here - -error[E0505]: cannot move out of `s` because it is borrowed - --> $DIR/borrowck-overloaded-index-move-index.rs:53:7 - | -LL | let rs = &mut s; - | ------ borrow of `s` occurs here -... -LL | f[s] = 10; - | ^ move out of `s` occurs here -... -LL | use_mut(rs); - | -- borrow later used here - -error[E0382]: use of moved value: `s` - --> $DIR/borrowck-overloaded-index-move-index.rs:53:7 - | -LL | let mut s = "hello".to_string(); - | ----- move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait -... -LL | println!("{}", f[s]); - | - value moved here -... -LL | f[s] = 10; - | ^ value used here after move - -error: aborting due to 3 previous errors - -Some errors occurred: E0382, E0505. -For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-move-index.stderr b/src/test/ui/borrowck/borrowck-overloaded-index-move-index.stderr index 7ea311f3e7..5414b01cb0 100644 --- a/src/test/ui/borrowck/borrowck-overloaded-index-move-index.stderr +++ b/src/test/ui/borrowck/borrowck-overloaded-index-move-index.stderr @@ -2,32 +2,39 @@ error[E0505]: cannot move out of `s` because it is borrowed --> $DIR/borrowck-overloaded-index-move-index.rs:50:22 | LL | let rs = &mut s; - | - borrow of `s` occurs here + | ------ borrow of `s` occurs here LL | LL | println!("{}", f[s]); | ^ move out of `s` occurs here +... +LL | use_mut(rs); + | -- borrow later used here error[E0505]: cannot move out of `s` because it is borrowed --> $DIR/borrowck-overloaded-index-move-index.rs:53:7 | LL | let rs = &mut s; - | - borrow of `s` occurs here + | ------ borrow of `s` occurs here ... LL | f[s] = 10; | ^ move out of `s` occurs here +... +LL | use_mut(rs); + | -- borrow later used here error[E0382]: use of moved value: `s` --> $DIR/borrowck-overloaded-index-move-index.rs:53:7 | +LL | let mut s = "hello".to_string(); + | ----- move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait +... LL | println!("{}", f[s]); | - value moved here ... LL | f[s] = 10; | ^ value used here after move - | - = note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait error: aborting due to 3 previous errors -Some errors occurred: E0382, E0505. +Some errors have detailed explanations: E0382, E0505. For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-ref-index.ast.nll.stderr b/src/test/ui/borrowck/borrowck-overloaded-index-ref-index.ast.nll.stderr deleted file mode 100644 index 2010e8f496..0000000000 --- a/src/test/ui/borrowck/borrowck-overloaded-index-ref-index.ast.nll.stderr +++ /dev/null @@ -1,33 +0,0 @@ -error[E0502]: cannot borrow `s` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-overloaded-index-ref-index.rs:52:22 - | -LL | let rs = &mut s; - | ------ mutable borrow occurs here -LL | println!("{}", f[&s]); - | ^^ immutable borrow occurs here -... -LL | drop(rs); - | -- mutable borrow later used here - -error[E0502]: cannot borrow `s` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-overloaded-index-ref-index.rs:55:7 - | -LL | let rs = &mut s; - | ------ mutable borrow occurs here -... -LL | f[&s] = 10; - | ^^ immutable borrow occurs here -... -LL | drop(rs); - | -- mutable borrow later used here - -error[E0594]: cannot assign to data in a `&` reference - --> $DIR/borrowck-overloaded-index-ref-index.rs:61:5 - | -LL | s[2] = 20; - | ^^^^^^^^^ cannot assign - -error: aborting due to 3 previous errors - -Some errors occurred: E0502, E0594. -For more information about an error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-ref-index.ast.stderr b/src/test/ui/borrowck/borrowck-overloaded-index-ref-index.ast.stderr deleted file mode 100644 index f97f0464fc..0000000000 --- a/src/test/ui/borrowck/borrowck-overloaded-index-ref-index.ast.stderr +++ /dev/null @@ -1,35 +0,0 @@ -error[E0594]: cannot assign to immutable indexed content - --> $DIR/borrowck-overloaded-index-ref-index.rs:61:5 - | -LL | s[2] = 20; - | ^^^^^^^^^ cannot borrow as mutable - | - = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `Bar` - -error[E0502]: cannot borrow `s` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-overloaded-index-ref-index.rs:52:23 - | -LL | let rs = &mut s; - | - mutable borrow occurs here -LL | println!("{}", f[&s]); - | ^ immutable borrow occurs here -... -LL | } - | - mutable borrow ends here - -error[E0502]: cannot borrow `s` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-overloaded-index-ref-index.rs:55:8 - | -LL | let rs = &mut s; - | - mutable borrow occurs here -... -LL | f[&s] = 10; - | ^ immutable borrow occurs here -... -LL | } - | - mutable borrow ends here - -error: aborting due to 3 previous errors - -Some errors occurred: E0502, E0594. -For more information about an error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-ref-index.rs b/src/test/ui/borrowck/borrowck-overloaded-index-ref-index.rs index 53cab520e4..cb20873432 100644 --- a/src/test/ui/borrowck/borrowck-overloaded-index-ref-index.rs +++ b/src/test/ui/borrowck/borrowck-overloaded-index-ref-index.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - use std::ops::{Index, IndexMut}; struct Foo { @@ -50,16 +47,13 @@ fn main() { let mut s = "hello".to_string(); let rs = &mut s; println!("{}", f[&s]); - //[ast]~^ ERROR cannot borrow `s` as immutable because it is also borrowed as mutable - //[mir]~^^ ERROR cannot borrow `s` as immutable because it is also borrowed as mutable + //~^ ERROR cannot borrow `s` as immutable because it is also borrowed as mutable f[&s] = 10; - //[ast]~^ ERROR cannot borrow `s` as immutable because it is also borrowed as mutable - //[mir]~^^ ERROR cannot borrow `s` as immutable because it is also borrowed as mutable + //~^ ERROR cannot borrow `s` as immutable because it is also borrowed as mutable let s = Bar { x: 1, }; s[2] = 20; - //[ast]~^ ERROR cannot assign to immutable indexed content - //[mir]~^^ ERROR cannot assign to data in a `&` reference + //~^ ERROR cannot assign to data in a `&` reference drop(rs); } diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-ref-index.mir.stderr b/src/test/ui/borrowck/borrowck-overloaded-index-ref-index.stderr similarity index 74% rename from src/test/ui/borrowck/borrowck-overloaded-index-ref-index.mir.stderr rename to src/test/ui/borrowck/borrowck-overloaded-index-ref-index.stderr index 2010e8f496..fcbfe72a34 100644 --- a/src/test/ui/borrowck/borrowck-overloaded-index-ref-index.mir.stderr +++ b/src/test/ui/borrowck/borrowck-overloaded-index-ref-index.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `s` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-overloaded-index-ref-index.rs:52:22 + --> $DIR/borrowck-overloaded-index-ref-index.rs:49:22 | LL | let rs = &mut s; | ------ mutable borrow occurs here @@ -10,7 +10,7 @@ LL | drop(rs); | -- mutable borrow later used here error[E0502]: cannot borrow `s` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-overloaded-index-ref-index.rs:55:7 + --> $DIR/borrowck-overloaded-index-ref-index.rs:51:7 | LL | let rs = &mut s; | ------ mutable borrow occurs here @@ -22,12 +22,11 @@ LL | drop(rs); | -- mutable borrow later used here error[E0594]: cannot assign to data in a `&` reference - --> $DIR/borrowck-overloaded-index-ref-index.rs:61:5 + --> $DIR/borrowck-overloaded-index-ref-index.rs:56:5 | LL | s[2] = 20; | ^^^^^^^^^ cannot assign error: aborting due to 3 previous errors -Some errors occurred: E0502, E0594. -For more information about an error, try `rustc --explain E0502`. +For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-partial-reinit-1.nll.stderr b/src/test/ui/borrowck/borrowck-partial-reinit-1.nll.stderr deleted file mode 100644 index 65f2bd6cfb..0000000000 --- a/src/test/ui/borrowck/borrowck-partial-reinit-1.nll.stderr +++ /dev/null @@ -1,25 +0,0 @@ -error[E0382]: assign of moved value: `t` - --> $DIR/borrowck-partial-reinit-1.rs:27:5 - | -LL | let mut t = Test2 { b: None }; - | ----- move occurs because `t` has type `Test2`, which does not implement the `Copy` trait -LL | let u = Test; -LL | drop(t); - | - value moved here -LL | t.b = Some(u); - | ^^^ value assigned here after move - -error[E0382]: assign of moved value: `t` - --> $DIR/borrowck-partial-reinit-1.rs:33:5 - | -LL | let mut t = Test3(None); - | ----- move occurs because `t` has type `Test3`, which does not implement the `Copy` trait -LL | let u = Test; -LL | drop(t); - | - value moved here -LL | t.0 = Some(u); - | ^^^ value assigned here after move - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-partial-reinit-1.rs b/src/test/ui/borrowck/borrowck-partial-reinit-1.rs index f763759152..4e69515815 100644 --- a/src/test/ui/borrowck/borrowck-partial-reinit-1.rs +++ b/src/test/ui/borrowck/borrowck-partial-reinit-1.rs @@ -25,13 +25,13 @@ fn stuff() { let u = Test; drop(t); t.b = Some(u); - //~^ ERROR partial reinitialization of uninitialized structure `t` + //~^ ERROR assign of moved value: `t` let mut t = Test3(None); let u = Test; drop(t); t.0 = Some(u); - //~^ ERROR partial reinitialization of uninitialized structure `t` + //~^ ERROR assign of moved value: `t` } fn main() { diff --git a/src/test/ui/borrowck/borrowck-partial-reinit-1.stderr b/src/test/ui/borrowck/borrowck-partial-reinit-1.stderr index 23f5035369..65f2bd6cfb 100644 --- a/src/test/ui/borrowck/borrowck-partial-reinit-1.stderr +++ b/src/test/ui/borrowck/borrowck-partial-reinit-1.stderr @@ -1,15 +1,25 @@ -error[E0383]: partial reinitialization of uninitialized structure `t` +error[E0382]: assign of moved value: `t` --> $DIR/borrowck-partial-reinit-1.rs:27:5 | +LL | let mut t = Test2 { b: None }; + | ----- move occurs because `t` has type `Test2`, which does not implement the `Copy` trait +LL | let u = Test; +LL | drop(t); + | - value moved here LL | t.b = Some(u); - | ^^^^^^^^^^^^^ + | ^^^ value assigned here after move -error[E0383]: partial reinitialization of uninitialized structure `t` +error[E0382]: assign of moved value: `t` --> $DIR/borrowck-partial-reinit-1.rs:33:5 | +LL | let mut t = Test3(None); + | ----- move occurs because `t` has type `Test3`, which does not implement the `Copy` trait +LL | let u = Test; +LL | drop(t); + | - value moved here LL | t.0 = Some(u); - | ^^^^^^^^^^^^^ + | ^^^ value assigned here after move error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0383`. +For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-partial-reinit-2.nll.stderr b/src/test/ui/borrowck/borrowck-partial-reinit-2.nll.stderr deleted file mode 100644 index 36a871fbb1..0000000000 --- a/src/test/ui/borrowck/borrowck-partial-reinit-2.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: assign of moved value: `t` - --> $DIR/borrowck-partial-reinit-2.rs:15:5 - | -LL | let mut t = Test { a: 1, b: None}; - | ----- move occurs because `t` has type `Test`, which does not implement the `Copy` trait -LL | let mut u = Test { a: 2, b: Some(Box::new(t))}; - | - value moved here -LL | t.b = Some(Box::new(u)); - | ^^^ value assigned here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-partial-reinit-2.rs b/src/test/ui/borrowck/borrowck-partial-reinit-2.rs index 986c20e361..06cd322e77 100644 --- a/src/test/ui/borrowck/borrowck-partial-reinit-2.rs +++ b/src/test/ui/borrowck/borrowck-partial-reinit-2.rs @@ -13,7 +13,7 @@ fn stuff() { let mut t = Test { a: 1, b: None}; let mut u = Test { a: 2, b: Some(Box::new(t))}; t.b = Some(Box::new(u)); - //~^ ERROR partial reinitialization of uninitialized structure `t` + //~^ ERROR assign of moved value: `t` println!("done"); } diff --git a/src/test/ui/borrowck/borrowck-partial-reinit-2.stderr b/src/test/ui/borrowck/borrowck-partial-reinit-2.stderr index 891f608850..36a871fbb1 100644 --- a/src/test/ui/borrowck/borrowck-partial-reinit-2.stderr +++ b/src/test/ui/borrowck/borrowck-partial-reinit-2.stderr @@ -1,9 +1,13 @@ -error[E0383]: partial reinitialization of uninitialized structure `t` +error[E0382]: assign of moved value: `t` --> $DIR/borrowck-partial-reinit-2.rs:15:5 | +LL | let mut t = Test { a: 1, b: None}; + | ----- move occurs because `t` has type `Test`, which does not implement the `Copy` trait +LL | let mut u = Test { a: 2, b: Some(Box::new(t))}; + | - value moved here LL | t.b = Some(Box::new(u)); - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^ value assigned here after move error: aborting due to previous error -For more information about this error, try `rustc --explain E0383`. +For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-partial-reinit-3.nll.stderr b/src/test/ui/borrowck/borrowck-partial-reinit-3.nll.stderr deleted file mode 100644 index 05f5411eed..0000000000 --- a/src/test/ui/borrowck/borrowck-partial-reinit-3.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: assign of moved value: `x.0` - --> $DIR/borrowck-partial-reinit-3.rs:11:5 - | -LL | mem::drop(x.0); - | --- value moved here -LL | x.0.f = 3; - | ^^^^^^^^^ value assigned here after move - | - = note: move occurs because `x.0` has type `Test`, which does not implement the `Copy` trait - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-partial-reinit-3.rs b/src/test/ui/borrowck/borrowck-partial-reinit-3.rs index c7fbd7fc88..ca484315ba 100644 --- a/src/test/ui/borrowck/borrowck-partial-reinit-3.rs +++ b/src/test/ui/borrowck/borrowck-partial-reinit-3.rs @@ -9,5 +9,5 @@ fn main() { let mut x = (Test { f: 2 }, Test { f: 4 }); mem::drop(x.0); x.0.f = 3; - //~^ ERROR partial reinitialization of uninitialized structure `x.0` + //~^ ERROR assign of moved value: `x.0` } diff --git a/src/test/ui/borrowck/borrowck-partial-reinit-3.stderr b/src/test/ui/borrowck/borrowck-partial-reinit-3.stderr index 262317444c..05f5411eed 100644 --- a/src/test/ui/borrowck/borrowck-partial-reinit-3.stderr +++ b/src/test/ui/borrowck/borrowck-partial-reinit-3.stderr @@ -1,9 +1,13 @@ -error[E0383]: partial reinitialization of uninitialized structure `x.0` +error[E0382]: assign of moved value: `x.0` --> $DIR/borrowck-partial-reinit-3.rs:11:5 | +LL | mem::drop(x.0); + | --- value moved here LL | x.0.f = 3; - | ^^^^^^^^^ + | ^^^^^^^^^ value assigned here after move + | + = note: move occurs because `x.0` has type `Test`, which does not implement the `Copy` trait error: aborting due to previous error -For more information about this error, try `rustc --explain E0383`. +For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-partial-reinit-4.nll.stderr b/src/test/ui/borrowck/borrowck-partial-reinit-4.nll.stderr deleted file mode 100644 index f0a9a7dd5e..0000000000 --- a/src/test/ui/borrowck/borrowck-partial-reinit-4.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0381]: assign of possibly uninitialized variable: `x.0` - --> $DIR/borrowck-partial-reinit-4.rs:17:5 - | -LL | (x.0).0 = Some(Test); - | ^^^^^^^ use of possibly uninitialized `x.0` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-partial-reinit-4.rs b/src/test/ui/borrowck/borrowck-partial-reinit-4.rs index ffa6b11b6f..0fb955d201 100644 --- a/src/test/ui/borrowck/borrowck-partial-reinit-4.rs +++ b/src/test/ui/borrowck/borrowck-partial-reinit-4.rs @@ -15,7 +15,7 @@ impl Drop for Test2 { fn stuff() { let mut x : (Test2, Test2); (x.0).0 = Some(Test); - //~^ ERROR partial reinitialization of uninitialized structure `x.0` + //~^ ERROR assign of possibly uninitialized variable: `x.0` } fn main() { diff --git a/src/test/ui/borrowck/borrowck-partial-reinit-4.stderr b/src/test/ui/borrowck/borrowck-partial-reinit-4.stderr index 8ca8e7e13c..f0a9a7dd5e 100644 --- a/src/test/ui/borrowck/borrowck-partial-reinit-4.stderr +++ b/src/test/ui/borrowck/borrowck-partial-reinit-4.stderr @@ -1,9 +1,9 @@ -error[E0383]: partial reinitialization of uninitialized structure `x.0` +error[E0381]: assign of possibly uninitialized variable: `x.0` --> $DIR/borrowck-partial-reinit-4.rs:17:5 | LL | (x.0).0 = Some(Test); - | ^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^ use of possibly uninitialized `x.0` error: aborting due to previous error -For more information about this error, try `rustc --explain E0383`. +For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-pat-reassign-binding.ast.stderr b/src/test/ui/borrowck/borrowck-pat-reassign-binding.ast.stderr deleted file mode 100644 index d7bce40edc..0000000000 --- a/src/test/ui/borrowck/borrowck-pat-reassign-binding.ast.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/borrowck-pat-reassign-binding.rs:13:11 - | -LL | Some(ref i) => { - | ----- borrow of `x` occurs here -LL | // But on this branch, `i` is an outstanding borrow -LL | x = Some(*i+1); - | ^^^^^^^^^^^^^^ assignment to borrowed `x` occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/borrowck/borrowck-pat-reassign-binding.mir.stderr b/src/test/ui/borrowck/borrowck-pat-reassign-binding.mir.stderr deleted file mode 100644 index f0e16838c8..0000000000 --- a/src/test/ui/borrowck/borrowck-pat-reassign-binding.mir.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/borrowck-pat-reassign-binding.rs:13:11 - | -LL | Some(ref i) => { - | ----- borrow of `x` occurs here -LL | // But on this branch, `i` is an outstanding borrow -LL | x = Some(*i+1); - | ^^^^^^^^^^^^^^ assignment to borrowed `x` occurs here -LL | -LL | drop(i); - | - borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/borrowck/borrowck-pat-reassign-binding.rs b/src/test/ui/borrowck/borrowck-pat-reassign-binding.rs index 9befa9162d..f02c46fb8f 100644 --- a/src/test/ui/borrowck/borrowck-pat-reassign-binding.rs +++ b/src/test/ui/borrowck/borrowck-pat-reassign-binding.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - fn main() { let mut x: Option = None; match x { @@ -10,8 +7,7 @@ fn main() { } Some(ref i) => { // But on this branch, `i` is an outstanding borrow - x = Some(*i+1); //[ast]~ ERROR cannot assign to `x` - //[mir]~^ ERROR cannot assign to `x` because it is borrowed + x = Some(*i+1); //~ ERROR cannot assign to `x` because it is borrowed drop(i); } } diff --git a/src/test/ui/borrowck/borrowck-pat-reassign-binding.ast.nll.stderr b/src/test/ui/borrowck/borrowck-pat-reassign-binding.stderr similarity index 89% rename from src/test/ui/borrowck/borrowck-pat-reassign-binding.ast.nll.stderr rename to src/test/ui/borrowck/borrowck-pat-reassign-binding.stderr index f0e16838c8..9e65ccf5a1 100644 --- a/src/test/ui/borrowck/borrowck-pat-reassign-binding.ast.nll.stderr +++ b/src/test/ui/borrowck/borrowck-pat-reassign-binding.stderr @@ -1,12 +1,11 @@ error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/borrowck-pat-reassign-binding.rs:13:11 + --> $DIR/borrowck-pat-reassign-binding.rs:10:11 | LL | Some(ref i) => { | ----- borrow of `x` occurs here LL | // But on this branch, `i` is an outstanding borrow LL | x = Some(*i+1); | ^^^^^^^^^^^^^^ assignment to borrowed `x` occurs here -LL | LL | drop(i); | - borrow later used here diff --git a/src/test/ui/borrowck/borrowck-reborrow-from-mut.nll.stderr b/src/test/ui/borrowck/borrowck-reborrow-from-mut.nll.stderr deleted file mode 100644 index 21bc8bb06c..0000000000 --- a/src/test/ui/borrowck/borrowck-reborrow-from-mut.nll.stderr +++ /dev/null @@ -1,116 +0,0 @@ -error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time - --> $DIR/borrowck-reborrow-from-mut.rs:13:17 - | -LL | let _bar1 = &mut foo.bar1; - | ------------- first mutable borrow occurs here -LL | let _bar2 = &mut foo.bar1; - | ^^^^^^^^^^^^^ second mutable borrow occurs here -LL | use_mut(_bar1); - | ----- first borrow later used here - -error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-reborrow-from-mut.rs:18:17 - | -LL | let _bar1 = &mut foo.bar1; - | ------------- mutable borrow occurs here -LL | let _bar2 = &foo.bar1; - | ^^^^^^^^^ immutable borrow occurs here -LL | use_mut(_bar1); - | ----- mutable borrow later used here - -error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-reborrow-from-mut.rs:23:17 - | -LL | let _bar1 = &foo.bar1; - | --------- immutable borrow occurs here -LL | let _bar2 = &mut foo.bar1; - | ^^^^^^^^^^^^^ mutable borrow occurs here -LL | use_imm(_bar1); - | ----- immutable borrow later used here - -error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time - --> $DIR/borrowck-reborrow-from-mut.rs:45:21 - | -LL | let _bar1 = &mut foo.bar1; - | ------------- first mutable borrow occurs here -LL | match *foo { -LL | Foo { bar1: ref mut _bar1, bar2: _ } => {} - | ^^^^^^^^^^^^^ second mutable borrow occurs here -... -LL | use_mut(_bar1); - | ----- first borrow later used here - -error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-reborrow-from-mut.rs:52:17 - | -LL | let _bar1 = &mut foo.bar1.int1; - | ------------------ mutable borrow occurs here -LL | let _foo1 = &foo.bar1; - | ^^^^^^^^^ immutable borrow occurs here -LL | let _foo2 = &*foo; -LL | use_mut(_bar1); - | ----- mutable borrow later used here - -error[E0502]: cannot borrow `*foo` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-reborrow-from-mut.rs:53:17 - | -LL | let _bar1 = &mut foo.bar1.int1; - | ------------------ mutable borrow occurs here -LL | let _foo1 = &foo.bar1; -LL | let _foo2 = &*foo; - | ^^^^^ immutable borrow occurs here -LL | use_mut(_bar1); - | ----- mutable borrow later used here - -error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time - --> $DIR/borrowck-reborrow-from-mut.rs:58:17 - | -LL | let _bar1 = &mut foo.bar1.int1; - | ------------------ first mutable borrow occurs here -LL | let _foo1 = &mut foo.bar1; - | ^^^^^^^^^^^^^ second mutable borrow occurs here -LL | use_mut(_bar1); - | ----- first borrow later used here - -error[E0499]: cannot borrow `*foo` as mutable more than once at a time - --> $DIR/borrowck-reborrow-from-mut.rs:63:17 - | -LL | let _bar1 = &mut foo.bar1.int1; - | ------------------ first mutable borrow occurs here -LL | let _foo2 = &mut *foo; - | ^^^^^^^^^ second mutable borrow occurs here -LL | use_mut(_bar1); - | ----- first borrow later used here - -error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-reborrow-from-mut.rs:68:17 - | -LL | let _bar1 = &foo.bar1.int1; - | -------------- immutable borrow occurs here -LL | let _foo1 = &mut foo.bar1; - | ^^^^^^^^^^^^^ mutable borrow occurs here -LL | use_imm(_bar1); - | ----- immutable borrow later used here - -error[E0502]: cannot borrow `*foo` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-reborrow-from-mut.rs:73:17 - | -LL | let _bar1 = &foo.bar1.int1; - | -------------- immutable borrow occurs here -LL | let _foo2 = &mut *foo; - | ^^^^^^^^^ mutable borrow occurs here -LL | use_imm(_bar1); - | ----- immutable borrow later used here - -error[E0596]: cannot borrow `foo.bar1` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-reborrow-from-mut.rs:88:17 - | -LL | fn borrow_mut_from_imm(foo: &Foo) { - | ---- help: consider changing this to be a mutable reference: `&mut Foo` -LL | let _bar1 = &mut foo.bar1; - | ^^^^^^^^^^^^^ `foo` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error: aborting due to 11 previous errors - -Some errors occurred: E0499, E0502, E0596. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-reborrow-from-mut.stderr b/src/test/ui/borrowck/borrowck-reborrow-from-mut.stderr index ea624018ad..284cab2960 100644 --- a/src/test/ui/borrowck/borrowck-reborrow-from-mut.stderr +++ b/src/test/ui/borrowck/borrowck-reborrow-from-mut.stderr @@ -1,124 +1,116 @@ error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time - --> $DIR/borrowck-reborrow-from-mut.rs:13:22 + --> $DIR/borrowck-reborrow-from-mut.rs:13:17 | LL | let _bar1 = &mut foo.bar1; - | -------- first mutable borrow occurs here + | ------------- first mutable borrow occurs here LL | let _bar2 = &mut foo.bar1; - | ^^^^^^^^ second mutable borrow occurs here + | ^^^^^^^^^^^^^ second mutable borrow occurs here LL | use_mut(_bar1); -LL | } - | - first borrow ends here + | ----- first borrow later used here error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-reborrow-from-mut.rs:18:18 + --> $DIR/borrowck-reborrow-from-mut.rs:18:17 | LL | let _bar1 = &mut foo.bar1; - | -------- mutable borrow occurs here + | ------------- mutable borrow occurs here LL | let _bar2 = &foo.bar1; - | ^^^^^^^^ immutable borrow occurs here + | ^^^^^^^^^ immutable borrow occurs here LL | use_mut(_bar1); -LL | } - | - mutable borrow ends here + | ----- mutable borrow later used here error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-reborrow-from-mut.rs:23:22 + --> $DIR/borrowck-reborrow-from-mut.rs:23:17 | LL | let _bar1 = &foo.bar1; - | -------- immutable borrow occurs here + | --------- immutable borrow occurs here LL | let _bar2 = &mut foo.bar1; - | ^^^^^^^^ mutable borrow occurs here + | ^^^^^^^^^^^^^ mutable borrow occurs here LL | use_imm(_bar1); -LL | } - | - immutable borrow ends here + | ----- immutable borrow later used here error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time --> $DIR/borrowck-reborrow-from-mut.rs:45:21 | LL | let _bar1 = &mut foo.bar1; - | -------- first mutable borrow occurs here + | ------------- first mutable borrow occurs here LL | match *foo { LL | Foo { bar1: ref mut _bar1, bar2: _ } => {} | ^^^^^^^^^^^^^ second mutable borrow occurs here ... -LL | } - | - first borrow ends here +LL | use_mut(_bar1); + | ----- first borrow later used here -error[E0502]: cannot borrow `foo.bar1` as immutable because `foo.bar1.int1` is also borrowed as mutable - --> $DIR/borrowck-reborrow-from-mut.rs:52:18 +error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed as mutable + --> $DIR/borrowck-reborrow-from-mut.rs:52:17 | LL | let _bar1 = &mut foo.bar1.int1; - | ------------- mutable borrow occurs here + | ------------------ mutable borrow occurs here LL | let _foo1 = &foo.bar1; - | ^^^^^^^^ immutable borrow occurs here -... -LL | } - | - mutable borrow ends here + | ^^^^^^^^^ immutable borrow occurs here +LL | let _foo2 = &*foo; +LL | use_mut(_bar1); + | ----- mutable borrow later used here -error[E0502]: cannot borrow `*foo` as immutable because `foo.bar1.int1` is also borrowed as mutable - --> $DIR/borrowck-reborrow-from-mut.rs:53:18 +error[E0502]: cannot borrow `*foo` as immutable because it is also borrowed as mutable + --> $DIR/borrowck-reborrow-from-mut.rs:53:17 | LL | let _bar1 = &mut foo.bar1.int1; - | ------------- mutable borrow occurs here + | ------------------ mutable borrow occurs here LL | let _foo1 = &foo.bar1; LL | let _foo2 = &*foo; - | ^^^^ immutable borrow occurs here + | ^^^^^ immutable borrow occurs here LL | use_mut(_bar1); -LL | } - | - mutable borrow ends here + | ----- mutable borrow later used here error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time - --> $DIR/borrowck-reborrow-from-mut.rs:58:22 + --> $DIR/borrowck-reborrow-from-mut.rs:58:17 | LL | let _bar1 = &mut foo.bar1.int1; - | ------------- first mutable borrow occurs here + | ------------------ first mutable borrow occurs here LL | let _foo1 = &mut foo.bar1; - | ^^^^^^^^ second mutable borrow occurs here + | ^^^^^^^^^^^^^ second mutable borrow occurs here LL | use_mut(_bar1); -LL | } - | - first borrow ends here + | ----- first borrow later used here error[E0499]: cannot borrow `*foo` as mutable more than once at a time - --> $DIR/borrowck-reborrow-from-mut.rs:63:22 + --> $DIR/borrowck-reborrow-from-mut.rs:63:17 | LL | let _bar1 = &mut foo.bar1.int1; - | ------------- first mutable borrow occurs here + | ------------------ first mutable borrow occurs here LL | let _foo2 = &mut *foo; - | ^^^^ second mutable borrow occurs here + | ^^^^^^^^^ second mutable borrow occurs here LL | use_mut(_bar1); -LL | } - | - first borrow ends here + | ----- first borrow later used here -error[E0502]: cannot borrow `foo.bar1` as mutable because `foo.bar1.int1` is also borrowed as immutable - --> $DIR/borrowck-reborrow-from-mut.rs:68:22 +error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as immutable + --> $DIR/borrowck-reborrow-from-mut.rs:68:17 | LL | let _bar1 = &foo.bar1.int1; - | ------------- immutable borrow occurs here + | -------------- immutable borrow occurs here LL | let _foo1 = &mut foo.bar1; - | ^^^^^^^^ mutable borrow occurs here + | ^^^^^^^^^^^^^ mutable borrow occurs here LL | use_imm(_bar1); -LL | } - | - immutable borrow ends here + | ----- immutable borrow later used here -error[E0502]: cannot borrow `*foo` as mutable because `foo.bar1.int1` is also borrowed as immutable - --> $DIR/borrowck-reborrow-from-mut.rs:73:22 +error[E0502]: cannot borrow `*foo` as mutable because it is also borrowed as immutable + --> $DIR/borrowck-reborrow-from-mut.rs:73:17 | LL | let _bar1 = &foo.bar1.int1; - | ------------- immutable borrow occurs here + | -------------- immutable borrow occurs here LL | let _foo2 = &mut *foo; - | ^^^^ mutable borrow occurs here + | ^^^^^^^^^ mutable borrow occurs here LL | use_imm(_bar1); -LL | } - | - immutable borrow ends here + | ----- immutable borrow later used here -error[E0596]: cannot borrow field `foo.bar1` of immutable binding as mutable - --> $DIR/borrowck-reborrow-from-mut.rs:88:22 +error[E0596]: cannot borrow `foo.bar1` as mutable, as it is behind a `&` reference + --> $DIR/borrowck-reborrow-from-mut.rs:88:17 | LL | fn borrow_mut_from_imm(foo: &Foo) { - | ---- use `&mut Foo` here to make mutable + | ---- help: consider changing this to be a mutable reference: `&mut Foo` LL | let _bar1 = &mut foo.bar1; - | ^^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^^^^^ `foo` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to 11 previous errors -Some errors occurred: E0499, E0502, E0596. +Some errors have detailed explanations: E0499, E0502, E0596. For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.nll.stderr b/src/test/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.nll.stderr new file mode 100644 index 0000000000..e6d0f88e3e --- /dev/null +++ b/src/test/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/borrowck-reborrow-from-shorter-lived-andmut.rs:9:5 + | +LL | fn copy_borrowed_ptr<'a,'b>(p: &'a mut S<'b>) -> S<'b> { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | S { pointer: &mut *p.pointer } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a` + +error: aborting due to previous error + diff --git a/src/test/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.stderr b/src/test/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.stderr index 67b6f64eaa..4142fc488c 100644 --- a/src/test/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.stderr +++ b/src/test/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.stderr @@ -10,4 +10,3 @@ LL | S { pointer: &mut *p.pointer } error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/borrowck/borrowck-ref-mut-of-imm.nll.stderr b/src/test/ui/borrowck/borrowck-ref-mut-of-imm.nll.stderr deleted file mode 100644 index e744fc6b54..0000000000 --- a/src/test/ui/borrowck/borrowck-ref-mut-of-imm.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable - --> $DIR/borrowck-ref-mut-of-imm.rs:4:12 - | -LL | fn destructure(x: Option) -> isize { - | - help: consider changing this to be mutable: `mut x` -... -LL | Some(ref mut v) => *v - | ^^^^^^^^^ cannot borrow as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/borrowck/borrowck-ref-mut-of-imm.stderr b/src/test/ui/borrowck/borrowck-ref-mut-of-imm.stderr index 6e0d2f6994..e744fc6b54 100644 --- a/src/test/ui/borrowck/borrowck-ref-mut-of-imm.stderr +++ b/src/test/ui/borrowck/borrowck-ref-mut-of-imm.stderr @@ -1,11 +1,11 @@ -error[E0596]: cannot borrow field `(x as std::prelude::v1::Some).0` of immutable binding as mutable +error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable --> $DIR/borrowck-ref-mut-of-imm.rs:4:12 | LL | fn destructure(x: Option) -> isize { - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` ... LL | Some(ref mut v) => *v - | ^^^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-reinit.rs b/src/test/ui/borrowck/borrowck-reinit.rs index e8e38a92c8..866b3a2a8a 100644 --- a/src/test/ui/borrowck/borrowck-reinit.rs +++ b/src/test/ui/borrowck/borrowck-reinit.rs @@ -1,10 +1,7 @@ -// compile-flags: -Z borrowck=compare - fn main() { let mut x = Box::new(0); let _u = x; // error shouldn't note this move x = Box::new(1); drop(x); - let _ = (1,x); //~ ERROR use of moved value: `x` (Ast) - //~^ ERROR use of moved value: `x` (Mir) + let _ = (1,x); //~ ERROR use of moved value: `x` } diff --git a/src/test/ui/borrowck/borrowck-reinit.stderr b/src/test/ui/borrowck/borrowck-reinit.stderr index 3618a7cb2c..f8f14b6435 100644 --- a/src/test/ui/borrowck/borrowck-reinit.stderr +++ b/src/test/ui/borrowck/borrowck-reinit.stderr @@ -1,15 +1,5 @@ -error[E0382]: use of moved value: `x` (Ast) - --> $DIR/borrowck-reinit.rs:8:16 - | -LL | drop(x); - | - value moved here -LL | let _ = (1,x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `x` (Mir) - --> $DIR/borrowck-reinit.rs:8:16 +error[E0382]: use of moved value: `x` + --> $DIR/borrowck-reinit.rs:6:16 | LL | let mut x = Box::new(0); | ----- move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -19,6 +9,6 @@ LL | drop(x); LL | let _ = (1,x); | ^ value used here after move -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.nll.stderr b/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.nll.stderr deleted file mode 100644 index ee8f90edcd..0000000000 --- a/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.nll.stderr +++ /dev/null @@ -1,40 +0,0 @@ -error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-report-with-custom-diagnostic.rs:8:13 - | -LL | let y = &mut x; - | ------ mutable borrow occurs here -LL | -LL | let z = &x; - | ^^ immutable borrow occurs here -... -LL | y.use_mut(); - | - mutable borrow later used here - -error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-report-with-custom-diagnostic.rs:21:21 - | -LL | let y = &x; - | -- immutable borrow occurs here -LL | -LL | let z = &mut x; - | ^^^^^^ mutable borrow occurs here -... -LL | y.use_ref(); - | - immutable borrow later used here - -error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-report-with-custom-diagnostic.rs:36:17 - | -LL | let y = &mut x; - | ------ first mutable borrow occurs here -LL | -LL | let z = &mut x; - | ^^^^^^ second mutable borrow occurs here -... -LL | y.use_mut(); - | - first borrow later used here - -error: aborting due to 3 previous errors - -Some errors occurred: E0499, E0502. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr b/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr index 79aec6c2ed..db73d4c04a 100644 --- a/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr +++ b/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr @@ -1,40 +1,40 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-report-with-custom-diagnostic.rs:8:14 + --> $DIR/borrowck-report-with-custom-diagnostic.rs:8:13 | LL | let y = &mut x; - | - mutable borrow occurs here + | ------ mutable borrow occurs here LL | LL | let z = &x; - | ^ immutable borrow occurs here + | ^^ immutable borrow occurs here ... -LL | } - | - mutable borrow ends here +LL | y.use_mut(); + | - mutable borrow later used here error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-report-with-custom-diagnostic.rs:21:26 + --> $DIR/borrowck-report-with-custom-diagnostic.rs:21:21 | LL | let y = &x; - | - immutable borrow occurs here + | -- immutable borrow occurs here LL | LL | let z = &mut x; - | ^ mutable borrow occurs here + | ^^^^^^ mutable borrow occurs here ... -LL | } - | - immutable borrow ends here +LL | y.use_ref(); + | - immutable borrow later used here error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/borrowck-report-with-custom-diagnostic.rs:36:22 + --> $DIR/borrowck-report-with-custom-diagnostic.rs:36:17 | LL | let y = &mut x; - | - first mutable borrow occurs here + | ------ first mutable borrow occurs here LL | LL | let z = &mut x; - | ^ second mutable borrow occurs here + | ^^^^^^ second mutable borrow occurs here ... -LL | }; - | - first borrow ends here +LL | y.use_mut(); + | - first borrow later used here error: aborting due to 3 previous errors -Some errors occurred: E0499, E0502. +Some errors have detailed explanations: E0499, E0502. For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.nll.stderr b/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.nll.stderr deleted file mode 100644 index d54449ac4a..0000000000 --- a/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0515]: cannot return value referencing function parameter `x` - --> $DIR/borrowck-return-variable-on-stack-via-clone.rs:7:5 - | -LL | (&x).clone() - | ----^^^^^^^^ - | | - | returns a value referencing data owned by the current function - | `x` is borrowed here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.rs b/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.rs index f8cdc3ed97..75e5e7fd42 100644 --- a/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.rs +++ b/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.rs @@ -4,7 +4,7 @@ // Issue #19261. fn leak<'a, T>(x: T) -> &'a T { - (&x).clone() //~ ERROR `x` does not live long enough + (&x).clone() //~ ERROR cannot return value referencing function parameter `x` } fn main() { } diff --git a/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.stderr b/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.stderr index 4d4244ba5e..d54449ac4a 100644 --- a/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.stderr +++ b/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.stderr @@ -1,17 +1,12 @@ -error[E0597]: `x` does not live long enough - --> $DIR/borrowck-return-variable-on-stack-via-clone.rs:7:7 +error[E0515]: cannot return value referencing function parameter `x` + --> $DIR/borrowck-return-variable-on-stack-via-clone.rs:7:5 | LL | (&x).clone() - | ^ borrowed value does not live long enough -LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 6:9... - --> $DIR/borrowck-return-variable-on-stack-via-clone.rs:6:9 - | -LL | fn leak<'a, T>(x: T) -> &'a T { - | ^^ + | ----^^^^^^^^ + | | + | returns a value referencing data owned by the current function + | `x` is borrowed here error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/borrowck/borrowck-storage-dead.rs b/src/test/ui/borrowck/borrowck-storage-dead.rs index 72c3bc1371..fe98446104 100644 --- a/src/test/ui/borrowck/borrowck-storage-dead.rs +++ b/src/test/ui/borrowck/borrowck-storage-dead.rs @@ -1,5 +1,3 @@ -// compile-flags: -Z borrowck=compare - fn ok() { loop { let _x = 1; @@ -15,8 +13,7 @@ fn also_ok() { fn fail() { loop { let x: i32; - let _ = x + 1; //~ERROR (Ast) [E0381] - //~^ ERROR (Mir) [E0381] + let _ = x + 1; //~ERROR [E0381] } } diff --git a/src/test/ui/borrowck/borrowck-storage-dead.stderr b/src/test/ui/borrowck/borrowck-storage-dead.stderr index c291ed224e..5b9f49c2e7 100644 --- a/src/test/ui/borrowck/borrowck-storage-dead.stderr +++ b/src/test/ui/borrowck/borrowck-storage-dead.stderr @@ -1,15 +1,9 @@ -error[E0381]: use of possibly uninitialized variable: `x` (Ast) - --> $DIR/borrowck-storage-dead.rs:18:17 +error[E0381]: use of possibly uninitialized variable: `x` + --> $DIR/borrowck-storage-dead.rs:16:17 | LL | let _ = x + 1; | ^ use of possibly uninitialized `x` -error[E0381]: use of possibly uninitialized variable: `x` (Mir) - --> $DIR/borrowck-storage-dead.rs:18:17 - | -LL | let _ = x + 1; - | ^ use of possibly uninitialized `x` - -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-struct-update-with-dtor.ast.nll.stderr b/src/test/ui/borrowck/borrowck-struct-update-with-dtor.ast.nll.stderr deleted file mode 100644 index dbc9ece0c8..0000000000 --- a/src/test/ui/borrowck/borrowck-struct-update-with-dtor.ast.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-struct-update-with-dtor.rs:15:15 - | -LL | let _s2 = S{a: 2, ..s0}; - | ^^^^^^^^^^^^^ cannot move out of here - -error[E0509]: cannot move out of type `T`, which implements the `Drop` trait - --> $DIR/borrowck-struct-update-with-dtor.rs:21:15 - | -LL | let _s2 = T{a: 2, ..s0}; - | ^^^^^^^^^^^^^ cannot move out of here - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0509`. diff --git a/src/test/ui/borrowck/borrowck-struct-update-with-dtor.ast.stderr b/src/test/ui/borrowck/borrowck-struct-update-with-dtor.ast.stderr deleted file mode 100644 index bc0a954b46..0000000000 --- a/src/test/ui/borrowck/borrowck-struct-update-with-dtor.ast.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-struct-update-with-dtor.rs:15:25 - | -LL | let _s2 = S{a: 2, ..s0}; - | ^^ cannot move out of here - -error[E0509]: cannot move out of type `T`, which implements the `Drop` trait - --> $DIR/borrowck-struct-update-with-dtor.rs:21:25 - | -LL | let _s2 = T{a: 2, ..s0}; - | ^^ cannot move out of here - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0509`. diff --git a/src/test/ui/borrowck/borrowck-struct-update-with-dtor.rs b/src/test/ui/borrowck/borrowck-struct-update-with-dtor.rs index da5bb63663..1f6ed6d46a 100644 --- a/src/test/ui/borrowck/borrowck-struct-update-with-dtor.rs +++ b/src/test/ui/borrowck/borrowck-struct-update-with-dtor.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - // Issue 4691: Ensure that functional-struct-update can only copy, not // move, when the struct implements Drop. @@ -13,14 +10,12 @@ impl Drop for T { fn drop(&mut self) { } } fn f(s0:S) { let _s2 = S{a: 2, ..s0}; - //[ast]~^ error: cannot move out of type `S`, which implements the `Drop` trait - //[mir]~^^ ERROR [E0509] + //~^ ERROR [E0509] } fn g(s0:T) { let _s2 = T{a: 2, ..s0}; - //[ast]~^ error: cannot move out of type `T`, which implements the `Drop` trait - //[mir]~^^ ERROR [E0509] + //~^ ERROR [E0509] } fn main() { } diff --git a/src/test/ui/borrowck/borrowck-struct-update-with-dtor.mir.stderr b/src/test/ui/borrowck/borrowck-struct-update-with-dtor.stderr similarity index 81% rename from src/test/ui/borrowck/borrowck-struct-update-with-dtor.mir.stderr rename to src/test/ui/borrowck/borrowck-struct-update-with-dtor.stderr index dbc9ece0c8..ea16502ebe 100644 --- a/src/test/ui/borrowck/borrowck-struct-update-with-dtor.mir.stderr +++ b/src/test/ui/borrowck/borrowck-struct-update-with-dtor.stderr @@ -1,11 +1,11 @@ error[E0509]: cannot move out of type `S`, which implements the `Drop` trait - --> $DIR/borrowck-struct-update-with-dtor.rs:15:15 + --> $DIR/borrowck-struct-update-with-dtor.rs:12:15 | LL | let _s2 = S{a: 2, ..s0}; | ^^^^^^^^^^^^^ cannot move out of here error[E0509]: cannot move out of type `T`, which implements the `Drop` trait - --> $DIR/borrowck-struct-update-with-dtor.rs:21:15 + --> $DIR/borrowck-struct-update-with-dtor.rs:17:15 | LL | let _s2 = T{a: 2, ..s0}; | ^^^^^^^^^^^^^ cannot move out of here diff --git a/src/test/ui/borrowck/borrowck-swap-mut-base-ptr.nll.stderr b/src/test/ui/borrowck/borrowck-swap-mut-base-ptr.nll.stderr deleted file mode 100644 index 1c55953c91..0000000000 --- a/src/test/ui/borrowck/borrowck-swap-mut-base-ptr.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0502]: cannot borrow `t0` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-swap-mut-base-ptr.rs:13:10 - | -LL | let p: &isize = &*t0; // Freezes `*t0` - | ---- immutable borrow occurs here -LL | swap(&mut t0, &mut t1); - | ^^^^^^^ mutable borrow occurs here -LL | *t1 = 22; -LL | p.use_ref(); - | - immutable borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-swap-mut-base-ptr.stderr b/src/test/ui/borrowck/borrowck-swap-mut-base-ptr.stderr index 9efd249caf..1c55953c91 100644 --- a/src/test/ui/borrowck/borrowck-swap-mut-base-ptr.stderr +++ b/src/test/ui/borrowck/borrowck-swap-mut-base-ptr.stderr @@ -1,13 +1,13 @@ -error[E0502]: cannot borrow `t0` as mutable because `*t0` is also borrowed as immutable - --> $DIR/borrowck-swap-mut-base-ptr.rs:13:15 +error[E0502]: cannot borrow `t0` as mutable because it is also borrowed as immutable + --> $DIR/borrowck-swap-mut-base-ptr.rs:13:10 | LL | let p: &isize = &*t0; // Freezes `*t0` - | --- immutable borrow occurs here + | ---- immutable borrow occurs here LL | swap(&mut t0, &mut t1); - | ^^ mutable borrow occurs here -... -LL | } - | - immutable borrow ends here + | ^^^^^^^ mutable borrow occurs here +LL | *t1 = 22; +LL | p.use_ref(); + | - immutable borrow later used here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.ast.nll.stderr b/src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.ast.nll.stderr deleted file mode 100644 index d2b6e06056..0000000000 --- a/src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.ast.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0712]: thread-local variable borrowed past end of function - --> $DIR/borrowck-thread-local-static-borrow-outlives-fn.rs:11:20 - | -LL | assert_static(&FOO); - | ^^^^ thread-local variables cannot be borrowed beyond the end of the function -LL | -LL | } - | - end of enclosing function is here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0712`. diff --git a/src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.ast.stderr b/src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.ast.stderr deleted file mode 100644 index ce7b5e681c..0000000000 --- a/src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.ast.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/borrowck-thread-local-static-borrow-outlives-fn.rs:11:21 - | -LL | assert_static(&FOO); - | ^^^ - borrowed value only lives until here - | | - | borrowed value does not live long enough - | - = note: borrowed value must be valid for the static lifetime... - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.rs b/src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.rs index 6fd6acc834..1cf8d187c2 100644 --- a/src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.rs +++ b/src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - #![feature(thread_local)] #[thread_local] @@ -8,6 +5,5 @@ static FOO: u8 = 3; fn assert_static(_t: &'static u8) {} fn main() { - assert_static(&FOO); //[ast]~ ERROR [E0597] - //[mir]~^ ERROR [E0712] + assert_static(&FOO); //~ ERROR [E0712] } diff --git a/src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.mir.stderr b/src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.stderr similarity index 83% rename from src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.mir.stderr rename to src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.stderr index d2b6e06056..26453b42fa 100644 --- a/src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.mir.stderr +++ b/src/test/ui/borrowck/borrowck-thread-local-static-borrow-outlives-fn.stderr @@ -1,9 +1,8 @@ error[E0712]: thread-local variable borrowed past end of function - --> $DIR/borrowck-thread-local-static-borrow-outlives-fn.rs:11:20 + --> $DIR/borrowck-thread-local-static-borrow-outlives-fn.rs:8:20 | LL | assert_static(&FOO); | ^^^^ thread-local variables cannot be borrowed beyond the end of the function -LL | LL | } | - end of enclosing function is here diff --git a/src/test/ui/borrowck/borrowck-unary-move.ast.nll.stderr b/src/test/ui/borrowck/borrowck-unary-move.ast.nll.stderr deleted file mode 100644 index c29ff53830..0000000000 --- a/src/test/ui/borrowck/borrowck-unary-move.ast.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/borrowck-unary-move.rs:7:10 - | -LL | let y = &*x; - | --- borrow of `*x` occurs here -LL | free(x); - | ^ move out of `x` occurs here -LL | -LL | *y - | -- borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/borrowck/borrowck-unary-move.ast.stderr b/src/test/ui/borrowck/borrowck-unary-move.ast.stderr deleted file mode 100644 index e05b110a2c..0000000000 --- a/src/test/ui/borrowck/borrowck-unary-move.ast.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/borrowck-unary-move.rs:7:10 - | -LL | let y = &*x; - | -- borrow of `*x` occurs here -LL | free(x); - | ^ move out of `x` occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/borrowck/borrowck-unary-move.rs b/src/test/ui/borrowck/borrowck-unary-move.rs index 4e023ac859..3b4c0731fc 100644 --- a/src/test/ui/borrowck/borrowck-unary-move.rs +++ b/src/test/ui/borrowck/borrowck-unary-move.rs @@ -1,11 +1,6 @@ -// ignore-tidy-linelength -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - fn foo(x: Box) -> isize { let y = &*x; - free(x); //[ast]~ ERROR cannot move out of `x` because it is borrowed - //[mir]~^ ERROR cannot move out of `x` because it is borrowed + free(x); //~ ERROR cannot move out of `x` because it is borrowed *y } diff --git a/src/test/ui/borrowck/borrowck-unary-move.mir.stderr b/src/test/ui/borrowck/borrowck-unary-move.stderr similarity index 88% rename from src/test/ui/borrowck/borrowck-unary-move.mir.stderr rename to src/test/ui/borrowck/borrowck-unary-move.stderr index c29ff53830..aab225ed4a 100644 --- a/src/test/ui/borrowck/borrowck-unary-move.mir.stderr +++ b/src/test/ui/borrowck/borrowck-unary-move.stderr @@ -1,11 +1,10 @@ error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/borrowck-unary-move.rs:7:10 + --> $DIR/borrowck-unary-move.rs:3:10 | LL | let y = &*x; | --- borrow of `*x` occurs here LL | free(x); | ^ move out of `x` occurs here -LL | LL | *y | -- borrow later used here diff --git a/src/test/ui/borrowck/borrowck-unboxed-closures.nll.stderr b/src/test/ui/borrowck/borrowck-unboxed-closures.nll.stderr deleted file mode 100644 index ec1cf4a4e2..0000000000 --- a/src/test/ui/borrowck/borrowck-unboxed-closures.nll.stderr +++ /dev/null @@ -1,34 +0,0 @@ -error[E0502]: cannot borrow `f` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-unboxed-closures.rs:3:5 - | -LL | let g = &mut f; - | ------ mutable borrow occurs here -LL | f(1, 2); - | ^ immutable borrow occurs here -LL | use_mut(g); - | - mutable borrow later used here - -error[E0596]: cannot borrow `f` as mutable, as it is not declared as mutable - --> $DIR/borrowck-unboxed-closures.rs:7:5 - | -LL | fn b isize>(f: F) { - | - help: consider changing this to be mutable: `mut f` -LL | f(1, 2); - | ^ cannot borrow as mutable - -error[E0382]: use of moved value: `f` - --> $DIR/borrowck-unboxed-closures.rs:12:5 - | -LL | fn c isize>(f: F) { - | - - move occurs because `f` has type `F`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | f(1, 2); - | - value moved here -LL | f(1, 2); - | ^ value used here after move - -error: aborting due to 3 previous errors - -Some errors occurred: E0382, E0502, E0596. -For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-unboxed-closures.rs b/src/test/ui/borrowck/borrowck-unboxed-closures.rs index bfd0fbb305..f0048dd7de 100644 --- a/src/test/ui/borrowck/borrowck-unboxed-closures.rs +++ b/src/test/ui/borrowck/borrowck-unboxed-closures.rs @@ -4,7 +4,7 @@ fn a isize>(mut f: F) { use_mut(g); } fn b isize>(f: F) { - f(1, 2); //~ ERROR cannot borrow immutable argument + f(1, 2); //~ ERROR cannot borrow `f` as mutable, as it is not declared as mutable } fn c isize>(f: F) { diff --git a/src/test/ui/borrowck/borrowck-unboxed-closures.stderr b/src/test/ui/borrowck/borrowck-unboxed-closures.stderr index 2e0773aebc..40b8e31348 100644 --- a/src/test/ui/borrowck/borrowck-unboxed-closures.stderr +++ b/src/test/ui/borrowck/borrowck-unboxed-closures.stderr @@ -2,32 +2,33 @@ error[E0502]: cannot borrow `f` as immutable because it is also borrowed as muta --> $DIR/borrowck-unboxed-closures.rs:3:5 | LL | let g = &mut f; - | - mutable borrow occurs here + | ------ mutable borrow occurs here LL | f(1, 2); | ^ immutable borrow occurs here LL | use_mut(g); -LL | } - | - mutable borrow ends here + | - mutable borrow later used here -error[E0596]: cannot borrow immutable argument `f` as mutable +error[E0596]: cannot borrow `f` as mutable, as it is not declared as mutable --> $DIR/borrowck-unboxed-closures.rs:7:5 | LL | fn b isize>(f: F) { - | - help: make this binding mutable: `mut f` + | - help: consider changing this to be mutable: `mut f` LL | f(1, 2); - | ^ cannot borrow mutably + | ^ cannot borrow as mutable error[E0382]: use of moved value: `f` --> $DIR/borrowck-unboxed-closures.rs:12:5 | +LL | fn c isize>(f: F) { + | - - move occurs because `f` has type `F`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | f(1, 2); | - value moved here LL | f(1, 2); | ^ value used here after move - | - = note: move occurs because `f` has type `F`, which does not implement the `Copy` trait error: aborting due to 3 previous errors -Some errors occurred: E0382, E0502, E0596. +Some errors have detailed explanations: E0382, E0502, E0596. For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-uninit-field-access.ast.stderr b/src/test/ui/borrowck/borrowck-uninit-field-access.ast.stderr deleted file mode 100644 index 58fc1d4b62..0000000000 --- a/src/test/ui/borrowck/borrowck-uninit-field-access.ast.stderr +++ /dev/null @@ -1,30 +0,0 @@ -error[E0381]: use of possibly uninitialized variable: `a.x` - --> $DIR/borrowck-uninit-field-access.rs:24:13 - | -LL | let _ = a.x + 1; - | ^^^ use of possibly uninitialized `a.x` - -error[E0382]: use of moved value: `line1.origin.x` - --> $DIR/borrowck-uninit-field-access.rs:29:13 - | -LL | let _moved = line1.origin; - | ------ value moved here -LL | let _ = line1.origin.x + 1; - | ^^^^^^^^^^^^^^ value used here after move - | - = note: move occurs because `line1.origin` has type `Point`, which does not implement the `Copy` trait - -error[E0382]: use of partially moved value: `line2` - --> $DIR/borrowck-uninit-field-access.rs:34:5 - | -LL | let _moved = (line2.origin, line2.middle); - | ------------ value moved here -LL | line2.consume(); - | ^^^^^ value used here after move - | - = note: move occurs because `line2.origin` has type `Point`, which does not implement the `Copy` trait - -error: aborting due to 3 previous errors - -Some errors occurred: E0381, E0382. -For more information about an error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-uninit-field-access.mir.stderr b/src/test/ui/borrowck/borrowck-uninit-field-access.mir.stderr deleted file mode 100644 index a6e5f0b0e9..0000000000 --- a/src/test/ui/borrowck/borrowck-uninit-field-access.mir.stderr +++ /dev/null @@ -1,30 +0,0 @@ -error[E0381]: use of possibly uninitialized variable: `a` - --> $DIR/borrowck-uninit-field-access.rs:24:13 - | -LL | let _ = a.x + 1; - | ^^^ use of possibly uninitialized `a.x` - -error[E0382]: use of moved value: `line1.origin` - --> $DIR/borrowck-uninit-field-access.rs:29:13 - | -LL | let _moved = line1.origin; - | ------------ value moved here -LL | let _ = line1.origin.x + 1; - | ^^^^^^^^^^^^^^ value used here after move - | - = note: move occurs because `line1.origin` has type `Point`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `line2` - --> $DIR/borrowck-uninit-field-access.rs:34:5 - | -LL | let _moved = (line2.origin, line2.middle); - | ------------ value moved here -LL | line2.consume(); - | ^^^^^ value used here after partial move - | - = note: move occurs because `line2.middle` has type `Point`, which does not implement the `Copy` trait - -error: aborting due to 3 previous errors - -Some errors occurred: E0381, E0382. -For more information about an error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-uninit-field-access.rs b/src/test/ui/borrowck/borrowck-uninit-field-access.rs index ab19b2d773..bc931eef93 100644 --- a/src/test/ui/borrowck/borrowck-uninit-field-access.rs +++ b/src/test/ui/borrowck/borrowck-uninit-field-access.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - // Check that do not allow access to fields of uninitialized or moved // structs. @@ -21,16 +18,13 @@ impl Line { fn consume(self) { } } fn main() { let mut a: Point; - let _ = a.x + 1; //[ast]~ ERROR use of possibly uninitialized variable: `a.x` - //[mir]~^ ERROR [E0381] + let _ = a.x + 1; //~ ERROR [E0381] let mut line1 = Line::default(); let _moved = line1.origin; - let _ = line1.origin.x + 1; //[ast]~ ERROR use of moved value: `line1.origin.x` - //[mir]~^ [E0382] + let _ = line1.origin.x + 1; //~ ERROR [E0382] let mut line2 = Line::default(); let _moved = (line2.origin, line2.middle); - line2.consume(); //[ast]~ ERROR use of partially moved value: `line2` [E0382] - //[mir]~^ [E0382] + line2.consume(); //~ ERROR [E0382] } diff --git a/src/test/ui/borrowck/borrowck-uninit-field-access.ast.nll.stderr b/src/test/ui/borrowck/borrowck-uninit-field-access.stderr similarity index 82% rename from src/test/ui/borrowck/borrowck-uninit-field-access.ast.nll.stderr rename to src/test/ui/borrowck/borrowck-uninit-field-access.stderr index a6e5f0b0e9..aa214f9c2f 100644 --- a/src/test/ui/borrowck/borrowck-uninit-field-access.ast.nll.stderr +++ b/src/test/ui/borrowck/borrowck-uninit-field-access.stderr @@ -1,11 +1,11 @@ error[E0381]: use of possibly uninitialized variable: `a` - --> $DIR/borrowck-uninit-field-access.rs:24:13 + --> $DIR/borrowck-uninit-field-access.rs:21:13 | LL | let _ = a.x + 1; | ^^^ use of possibly uninitialized `a.x` error[E0382]: use of moved value: `line1.origin` - --> $DIR/borrowck-uninit-field-access.rs:29:13 + --> $DIR/borrowck-uninit-field-access.rs:25:13 | LL | let _moved = line1.origin; | ------------ value moved here @@ -15,7 +15,7 @@ LL | let _ = line1.origin.x + 1; = note: move occurs because `line1.origin` has type `Point`, which does not implement the `Copy` trait error[E0382]: use of moved value: `line2` - --> $DIR/borrowck-uninit-field-access.rs:34:5 + --> $DIR/borrowck-uninit-field-access.rs:29:5 | LL | let _moved = (line2.origin, line2.middle); | ------------ value moved here @@ -26,5 +26,5 @@ LL | line2.consume(); error: aborting due to 3 previous errors -Some errors occurred: E0381, E0382. +Some errors have detailed explanations: E0381, E0382. For more information about an error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-uninit-ref-chain.ast.stderr b/src/test/ui/borrowck/borrowck-uninit-ref-chain.ast.stderr deleted file mode 100644 index 8cb3f3bf89..0000000000 --- a/src/test/ui/borrowck/borrowck-uninit-ref-chain.ast.stderr +++ /dev/null @@ -1,45 +0,0 @@ -error[E0381]: use of possibly uninitialized variable: `**x` - --> $DIR/borrowck-uninit-ref-chain.rs:11:15 - | -LL | let _y = &**x; - | ^^^ use of possibly uninitialized `**x` - -error[E0381]: use of possibly uninitialized variable: `**x` - --> $DIR/borrowck-uninit-ref-chain.rs:15:15 - | -LL | let _y = &**x; - | ^^^ use of possibly uninitialized `**x` - -error[E0381]: use of possibly uninitialized variable: `**x` - --> $DIR/borrowck-uninit-ref-chain.rs:19:15 - | -LL | let _y = &**x; - | ^^^ use of possibly uninitialized `**x` - -error[E0381]: use of possibly uninitialized variable: `a.x` - --> $DIR/borrowck-uninit-ref-chain.rs:25:15 - | -LL | let _b = &a.x; - | ^^^ use of possibly uninitialized `a.x` - -error[E0381]: use of possibly uninitialized variable: `**a.x` - --> $DIR/borrowck-uninit-ref-chain.rs:30:15 - | -LL | let _b = &**a.x; - | ^^^^^ use of possibly uninitialized `**a.x` - -error[E0381]: use of possibly uninitialized variable: `a.y` - --> $DIR/borrowck-uninit-ref-chain.rs:36:15 - | -LL | let _b = &a.y; - | ^^^ use of possibly uninitialized `a.y` - -error[E0381]: use of possibly uninitialized variable: `**a.y` - --> $DIR/borrowck-uninit-ref-chain.rs:41:15 - | -LL | let _b = &**a.y; - | ^^^^^ use of possibly uninitialized `**a.y` - -error: aborting due to 7 previous errors - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-uninit-ref-chain.mir.stderr b/src/test/ui/borrowck/borrowck-uninit-ref-chain.mir.stderr deleted file mode 100644 index a5cf59c945..0000000000 --- a/src/test/ui/borrowck/borrowck-uninit-ref-chain.mir.stderr +++ /dev/null @@ -1,45 +0,0 @@ -error[E0381]: borrow of possibly uninitialized variable: `x` - --> $DIR/borrowck-uninit-ref-chain.rs:11:14 - | -LL | let _y = &**x; - | ^^^^ use of possibly uninitialized `**x` - -error[E0381]: borrow of possibly uninitialized variable: `x` - --> $DIR/borrowck-uninit-ref-chain.rs:15:14 - | -LL | let _y = &**x; - | ^^^^ use of possibly uninitialized `**x` - -error[E0381]: borrow of possibly uninitialized variable: `x` - --> $DIR/borrowck-uninit-ref-chain.rs:19:14 - | -LL | let _y = &**x; - | ^^^^ use of possibly uninitialized `**x` - -error[E0381]: assign to part of possibly uninitialized variable: `a` - --> $DIR/borrowck-uninit-ref-chain.rs:24:5 - | -LL | a.x = 0; - | ^^^^^^^ use of possibly uninitialized `a` - -error[E0381]: assign to part of possibly uninitialized variable: `a` - --> $DIR/borrowck-uninit-ref-chain.rs:29:5 - | -LL | a.x = &&0; - | ^^^^^^^^^ use of possibly uninitialized `a` - -error[E0381]: assign to part of possibly uninitialized variable: `a` - --> $DIR/borrowck-uninit-ref-chain.rs:35:5 - | -LL | a.x = 0; - | ^^^^^^^ use of possibly uninitialized `a` - -error[E0381]: assign to part of possibly uninitialized variable: `a` - --> $DIR/borrowck-uninit-ref-chain.rs:40:5 - | -LL | a.x = &&0; - | ^^^^^^^^^ use of possibly uninitialized `a` - -error: aborting due to 7 previous errors - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-uninit-ref-chain.rs b/src/test/ui/borrowck/borrowck-uninit-ref-chain.rs index 562012a23d..fa9148f984 100644 --- a/src/test/ui/borrowck/borrowck-uninit-ref-chain.rs +++ b/src/test/ui/borrowck/borrowck-uninit-ref-chain.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - struct S { x: X, y: Y, @@ -8,36 +5,29 @@ struct S { fn main() { let x: &&Box; - let _y = &**x; //[ast]~ ERROR use of possibly uninitialized variable: `**x` [E0381] - //[mir]~^ [E0381] + let _y = &**x; //~ [E0381] let x: &&S; - let _y = &**x; //[ast]~ ERROR use of possibly uninitialized variable: `**x` [E0381] - //[mir]~^ [E0381] + let _y = &**x; //~ [E0381] let x: &&i32; - let _y = &**x; //[ast]~ ERROR use of possibly uninitialized variable: `**x` [E0381] - //[mir]~^ [E0381] + let _y = &**x; //~ [E0381] let mut a: S; - a.x = 0; //[mir]~ ERROR assign to part of possibly uninitialized variable: `a` [E0381] - let _b = &a.x; //[ast]~ ERROR use of possibly uninitialized variable: `a.x` [E0381] - + a.x = 0; //~ ERROR assign to part of possibly uninitialized variable: `a` [E0381] + let _b = &a.x; let mut a: S<&&i32, &&i32>; - a.x = &&0; //[mir]~ ERROR assign to part of possibly uninitialized variable: `a` [E0381] - let _b = &**a.x; //[ast]~ ERROR use of possibly uninitialized variable: `**a.x` [E0381] - + a.x = &&0; //~ ERROR assign to part of possibly uninitialized variable: `a` [E0381] + let _b = &**a.x; let mut a: S; - a.x = 0; //[mir]~ ERROR assign to part of possibly uninitialized variable: `a` [E0381] - let _b = &a.y; //[ast]~ ERROR use of possibly uninitialized variable: `a.y` [E0381] - + a.x = 0; //~ ERROR assign to part of possibly uninitialized variable: `a` [E0381] + let _b = &a.y; let mut a: S<&&i32, &&i32>; - a.x = &&0; //[mir]~ assign to part of possibly uninitialized variable: `a` [E0381] - let _b = &**a.y; //[ast]~ ERROR use of possibly uninitialized variable: `**a.y` [E0381] - + a.x = &&0; //~ assign to part of possibly uninitialized variable: `a` [E0381] + let _b = &**a.y; } diff --git a/src/test/ui/borrowck/borrowck-uninit-ref-chain.ast.nll.stderr b/src/test/ui/borrowck/borrowck-uninit-ref-chain.stderr similarity index 81% rename from src/test/ui/borrowck/borrowck-uninit-ref-chain.ast.nll.stderr rename to src/test/ui/borrowck/borrowck-uninit-ref-chain.stderr index a5cf59c945..d87621f04d 100644 --- a/src/test/ui/borrowck/borrowck-uninit-ref-chain.ast.nll.stderr +++ b/src/test/ui/borrowck/borrowck-uninit-ref-chain.stderr @@ -1,41 +1,41 @@ error[E0381]: borrow of possibly uninitialized variable: `x` - --> $DIR/borrowck-uninit-ref-chain.rs:11:14 + --> $DIR/borrowck-uninit-ref-chain.rs:8:14 | LL | let _y = &**x; | ^^^^ use of possibly uninitialized `**x` error[E0381]: borrow of possibly uninitialized variable: `x` - --> $DIR/borrowck-uninit-ref-chain.rs:15:14 + --> $DIR/borrowck-uninit-ref-chain.rs:11:14 | LL | let _y = &**x; | ^^^^ use of possibly uninitialized `**x` error[E0381]: borrow of possibly uninitialized variable: `x` - --> $DIR/borrowck-uninit-ref-chain.rs:19:14 + --> $DIR/borrowck-uninit-ref-chain.rs:14:14 | LL | let _y = &**x; | ^^^^ use of possibly uninitialized `**x` error[E0381]: assign to part of possibly uninitialized variable: `a` - --> $DIR/borrowck-uninit-ref-chain.rs:24:5 + --> $DIR/borrowck-uninit-ref-chain.rs:18:5 | LL | a.x = 0; | ^^^^^^^ use of possibly uninitialized `a` error[E0381]: assign to part of possibly uninitialized variable: `a` - --> $DIR/borrowck-uninit-ref-chain.rs:29:5 + --> $DIR/borrowck-uninit-ref-chain.rs:22:5 | LL | a.x = &&0; | ^^^^^^^^^ use of possibly uninitialized `a` error[E0381]: assign to part of possibly uninitialized variable: `a` - --> $DIR/borrowck-uninit-ref-chain.rs:35:5 + --> $DIR/borrowck-uninit-ref-chain.rs:27:5 | LL | a.x = 0; | ^^^^^^^ use of possibly uninitialized `a` error[E0381]: assign to part of possibly uninitialized variable: `a` - --> $DIR/borrowck-uninit-ref-chain.rs:40:5 + --> $DIR/borrowck-uninit-ref-chain.rs:31:5 | LL | a.x = &&0; | ^^^^^^^^^ use of possibly uninitialized `a` diff --git a/src/test/ui/borrowck/borrowck-union-borrow-nested.nll.stderr b/src/test/ui/borrowck/borrowck-union-borrow-nested.nll.stderr deleted file mode 100644 index 61569b9cac..0000000000 --- a/src/test/ui/borrowck/borrowck-union-borrow-nested.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0503]: cannot use `u.c` because it was mutably borrowed - --> $DIR/borrowck-union-borrow-nested.rs:24:21 - | -LL | let ra = &mut u.s.a; - | ---------- borrow of `u.s.a` occurs here -LL | let b = u.c; - | ^^^ use of borrowed `u.s.a` -LL | ra.use_mut(); - | -- borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0503`. diff --git a/src/test/ui/borrowck/borrowck-union-borrow-nested.stderr b/src/test/ui/borrowck/borrowck-union-borrow-nested.stderr index 71fae6f8d6..61569b9cac 100644 --- a/src/test/ui/borrowck/borrowck-union-borrow-nested.stderr +++ b/src/test/ui/borrowck/borrowck-union-borrow-nested.stderr @@ -1,10 +1,12 @@ error[E0503]: cannot use `u.c` because it was mutably borrowed - --> $DIR/borrowck-union-borrow-nested.rs:24:17 + --> $DIR/borrowck-union-borrow-nested.rs:24:21 | LL | let ra = &mut u.s.a; - | ----- borrow of `u.s.a` occurs here + | ---------- borrow of `u.s.a` occurs here LL | let b = u.c; - | ^ use of borrowed `u.s.a` + | ^^^ use of borrowed `u.s.a` +LL | ra.use_mut(); + | -- borrow later used here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-union-borrow.nll.stderr b/src/test/ui/borrowck/borrowck-union-borrow.nll.stderr deleted file mode 100644 index 518f062ba1..0000000000 --- a/src/test/ui/borrowck/borrowck-union-borrow.nll.stderr +++ /dev/null @@ -1,131 +0,0 @@ -error[E0502]: cannot borrow `u.a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-union-borrow.rs:25:23 - | -LL | let ra = &u.a; - | ---- immutable borrow occurs here -LL | let rma = &mut u.a; - | ^^^^^^^^ mutable borrow occurs here -LL | drop(ra); - | -- immutable borrow later used here - -error[E0506]: cannot assign to `u.a` because it is borrowed - --> $DIR/borrowck-union-borrow.rs:30:13 - | -LL | let ra = &u.a; - | ---- borrow of `u.a` occurs here -LL | u.a = 1; - | ^^^^^^^ assignment to borrowed `u.a` occurs here -LL | drop(ra); - | -- borrow later used here - -error[E0502]: cannot borrow `u` (via `u.b`) as mutable because it is also borrowed as immutable (via `u.a`) - --> $DIR/borrowck-union-borrow.rs:46:23 - | -LL | let ra = &u.a; - | ---- immutable borrow occurs here (via `u.a`) -LL | let rmb = &mut u.b; - | ^^^^^^^^ mutable borrow of `u.b` -- which overlaps with `u.a` -- occurs here -LL | drop(ra); - | -- immutable borrow later used here - | - = note: `u.b` is a field of the union `U`, so it overlaps the field `u.a` - -error[E0506]: cannot assign to `u.b` because it is borrowed - --> $DIR/borrowck-union-borrow.rs:51:13 - | -LL | let ra = &u.a; - | ---- borrow of `u.b` occurs here -LL | u.b = 1; - | ^^^^^^^ assignment to borrowed `u.b` occurs here -LL | drop(ra); - | -- borrow later used here - -error[E0502]: cannot borrow `u.a` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-union-borrow.rs:57:22 - | -LL | let rma = &mut u.a; - | -------- mutable borrow occurs here -LL | let ra = &u.a; - | ^^^^ immutable borrow occurs here -LL | drop(rma); - | --- mutable borrow later used here - -error[E0503]: cannot use `u.a` because it was mutably borrowed - --> $DIR/borrowck-union-borrow.rs:62:21 - | -LL | let ra = &mut u.a; - | -------- borrow of `u.a` occurs here -LL | let a = u.a; - | ^^^ use of borrowed `u.a` -LL | drop(ra); - | -- borrow later used here - -error[E0499]: cannot borrow `u.a` as mutable more than once at a time - --> $DIR/borrowck-union-borrow.rs:67:24 - | -LL | let rma = &mut u.a; - | -------- first mutable borrow occurs here -LL | let rma2 = &mut u.a; - | ^^^^^^^^ second mutable borrow occurs here -LL | drop(rma); - | --- first borrow later used here - -error[E0506]: cannot assign to `u.a` because it is borrowed - --> $DIR/borrowck-union-borrow.rs:72:13 - | -LL | let rma = &mut u.a; - | -------- borrow of `u.a` occurs here -LL | u.a = 1; - | ^^^^^^^ assignment to borrowed `u.a` occurs here -LL | drop(rma); - | --- borrow later used here - -error[E0502]: cannot borrow `u` (via `u.b`) as immutable because it is also borrowed as mutable (via `u.a`) - --> $DIR/borrowck-union-borrow.rs:78:22 - | -LL | let rma = &mut u.a; - | -------- mutable borrow occurs here (via `u.a`) -LL | let rb = &u.b; - | ^^^^ immutable borrow of `u.b` -- which overlaps with `u.a` -- occurs here -LL | drop(rma); - | --- mutable borrow later used here - | - = note: `u.b` is a field of the union `U`, so it overlaps the field `u.a` - -error[E0503]: cannot use `u.b` because it was mutably borrowed - --> $DIR/borrowck-union-borrow.rs:83:21 - | -LL | let ra = &mut u.a; - | -------- borrow of `u.a` occurs here -LL | let b = u.b; - | ^^^ use of borrowed `u.a` -LL | -LL | drop(ra); - | -- borrow later used here - -error[E0499]: cannot borrow `u` (via `u.b`) as mutable more than once at a time - --> $DIR/borrowck-union-borrow.rs:89:24 - | -LL | let rma = &mut u.a; - | -------- first mutable borrow occurs here (via `u.a`) -LL | let rmb2 = &mut u.b; - | ^^^^^^^^ second mutable borrow occurs here (via `u.b`) -LL | drop(rma); - | --- first borrow later used here - | - = note: `u.b` is a field of the union `U`, so it overlaps the field `u.a` - -error[E0506]: cannot assign to `u.b` because it is borrowed - --> $DIR/borrowck-union-borrow.rs:94:13 - | -LL | let rma = &mut u.a; - | -------- borrow of `u.b` occurs here -LL | u.b = 1; - | ^^^^^^^ assignment to borrowed `u.b` occurs here -LL | drop(rma); - | --- borrow later used here - -error: aborting due to 12 previous errors - -Some errors occurred: E0499, E0502, E0503, E0506. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-union-borrow.rs b/src/test/ui/borrowck/borrowck-union-borrow.rs index 8afc0be8b5..63901680bd 100644 --- a/src/test/ui/borrowck/borrowck-union-borrow.rs +++ b/src/test/ui/borrowck/borrowck-union-borrow.rs @@ -43,7 +43,7 @@ fn main() { } { let ra = &u.a; - let rmb = &mut u.b; //~ ERROR cannot borrow `u` (via `u.b`) as mutable because `u` is also borrowed as immutable (via `u.a`) + let rmb = &mut u.b; //~ ERROR cannot borrow `u` (via `u.b`) as mutable because it is also borrowed as immutable (via `u.a`) drop(ra); } { @@ -75,7 +75,7 @@ fn main() { // Mut borrow, other field { let rma = &mut u.a; - let rb = &u.b; //~ ERROR cannot borrow `u` (via `u.b`) as immutable because `u` is also borrowed as mutable (via `u.a`) + let rb = &u.b; //~ ERROR cannot borrow `u` (via `u.b`) as immutable because it is also borrowed as mutable (via `u.a`) drop(rma); } { diff --git a/src/test/ui/borrowck/borrowck-union-borrow.stderr b/src/test/ui/borrowck/borrowck-union-borrow.stderr index 1cda7e4992..ca10e299c5 100644 --- a/src/test/ui/borrowck/borrowck-union-borrow.stderr +++ b/src/test/ui/borrowck/borrowck-union-borrow.stderr @@ -1,118 +1,131 @@ error[E0502]: cannot borrow `u.a` as mutable because it is also borrowed as immutable - --> $DIR/borrowck-union-borrow.rs:25:28 + --> $DIR/borrowck-union-borrow.rs:25:23 | LL | let ra = &u.a; - | --- immutable borrow occurs here + | ---- immutable borrow occurs here LL | let rma = &mut u.a; - | ^^^ mutable borrow occurs here + | ^^^^^^^^ mutable borrow occurs here LL | drop(ra); -LL | } - | - immutable borrow ends here + | -- immutable borrow later used here error[E0506]: cannot assign to `u.a` because it is borrowed --> $DIR/borrowck-union-borrow.rs:30:13 | LL | let ra = &u.a; - | --- borrow of `u.a` occurs here + | ---- borrow of `u.a` occurs here LL | u.a = 1; | ^^^^^^^ assignment to borrowed `u.a` occurs here +LL | drop(ra); + | -- borrow later used here -error[E0502]: cannot borrow `u` (via `u.b`) as mutable because `u` is also borrowed as immutable (via `u.a`) - --> $DIR/borrowck-union-borrow.rs:46:28 +error[E0502]: cannot borrow `u` (via `u.b`) as mutable because it is also borrowed as immutable (via `u.a`) + --> $DIR/borrowck-union-borrow.rs:46:23 | LL | let ra = &u.a; - | --- immutable borrow occurs here (via `u.a`) + | ---- immutable borrow occurs here (via `u.a`) LL | let rmb = &mut u.b; - | ^^^ mutable borrow of `u.b` -- which overlaps with `u.a` -- occurs here + | ^^^^^^^^ mutable borrow of `u.b` -- which overlaps with `u.a` -- occurs here LL | drop(ra); -LL | } - | - immutable borrow ends here + | -- immutable borrow later used here + | + = note: `u.b` is a field of the union `U`, so it overlaps the field `u.a` error[E0506]: cannot assign to `u.b` because it is borrowed --> $DIR/borrowck-union-borrow.rs:51:13 | LL | let ra = &u.a; - | --- borrow of `u.b` occurs here + | ---- borrow of `u.b` occurs here LL | u.b = 1; | ^^^^^^^ assignment to borrowed `u.b` occurs here +LL | drop(ra); + | -- borrow later used here error[E0502]: cannot borrow `u.a` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-union-borrow.rs:57:23 + --> $DIR/borrowck-union-borrow.rs:57:22 | LL | let rma = &mut u.a; - | --- mutable borrow occurs here + | -------- mutable borrow occurs here LL | let ra = &u.a; - | ^^^ immutable borrow occurs here + | ^^^^ immutable borrow occurs here LL | drop(rma); -LL | } - | - mutable borrow ends here + | --- mutable borrow later used here error[E0503]: cannot use `u.a` because it was mutably borrowed - --> $DIR/borrowck-union-borrow.rs:62:17 + --> $DIR/borrowck-union-borrow.rs:62:21 | LL | let ra = &mut u.a; - | --- borrow of `u.a` occurs here + | -------- borrow of `u.a` occurs here LL | let a = u.a; - | ^ use of borrowed `u.a` + | ^^^ use of borrowed `u.a` +LL | drop(ra); + | -- borrow later used here error[E0499]: cannot borrow `u.a` as mutable more than once at a time - --> $DIR/borrowck-union-borrow.rs:67:29 + --> $DIR/borrowck-union-borrow.rs:67:24 | LL | let rma = &mut u.a; - | --- first mutable borrow occurs here + | -------- first mutable borrow occurs here LL | let rma2 = &mut u.a; - | ^^^ second mutable borrow occurs here + | ^^^^^^^^ second mutable borrow occurs here LL | drop(rma); -LL | } - | - first borrow ends here + | --- first borrow later used here error[E0506]: cannot assign to `u.a` because it is borrowed --> $DIR/borrowck-union-borrow.rs:72:13 | LL | let rma = &mut u.a; - | --- borrow of `u.a` occurs here + | -------- borrow of `u.a` occurs here LL | u.a = 1; | ^^^^^^^ assignment to borrowed `u.a` occurs here +LL | drop(rma); + | --- borrow later used here -error[E0502]: cannot borrow `u` (via `u.b`) as immutable because `u` is also borrowed as mutable (via `u.a`) - --> $DIR/borrowck-union-borrow.rs:78:23 +error[E0502]: cannot borrow `u` (via `u.b`) as immutable because it is also borrowed as mutable (via `u.a`) + --> $DIR/borrowck-union-borrow.rs:78:22 | LL | let rma = &mut u.a; - | --- mutable borrow occurs here (via `u.a`) + | -------- mutable borrow occurs here (via `u.a`) LL | let rb = &u.b; - | ^^^ immutable borrow of `u.b` -- which overlaps with `u.a` -- occurs here + | ^^^^ immutable borrow of `u.b` -- which overlaps with `u.a` -- occurs here LL | drop(rma); -LL | } - | - mutable borrow ends here + | --- mutable borrow later used here + | + = note: `u.b` is a field of the union `U`, so it overlaps the field `u.a` error[E0503]: cannot use `u.b` because it was mutably borrowed - --> $DIR/borrowck-union-borrow.rs:83:17 + --> $DIR/borrowck-union-borrow.rs:83:21 | LL | let ra = &mut u.a; - | --- borrow of `u.a` occurs here + | -------- borrow of `u.a` occurs here LL | let b = u.b; - | ^ use of borrowed `u.a` + | ^^^ use of borrowed `u.a` +LL | +LL | drop(ra); + | -- borrow later used here error[E0499]: cannot borrow `u` (via `u.b`) as mutable more than once at a time - --> $DIR/borrowck-union-borrow.rs:89:29 + --> $DIR/borrowck-union-borrow.rs:89:24 | LL | let rma = &mut u.a; - | --- first mutable borrow occurs here (via `u.a`) + | -------- first mutable borrow occurs here (via `u.a`) LL | let rmb2 = &mut u.b; - | ^^^ second mutable borrow occurs here (via `u.b`) + | ^^^^^^^^ second mutable borrow occurs here (via `u.b`) LL | drop(rma); -LL | } - | - first borrow ends here + | --- first borrow later used here + | + = note: `u.b` is a field of the union `U`, so it overlaps the field `u.a` error[E0506]: cannot assign to `u.b` because it is borrowed --> $DIR/borrowck-union-borrow.rs:94:13 | LL | let rma = &mut u.a; - | --- borrow of `u.b` occurs here + | -------- borrow of `u.b` occurs here LL | u.b = 1; | ^^^^^^^ assignment to borrowed `u.b` occurs here +LL | drop(rma); + | --- borrow later used here error: aborting due to 12 previous errors -Some errors occurred: E0499, E0502, E0503, E0506. +Some errors have detailed explanations: E0499, E0502, E0503, E0506. For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-union-move-assign.nll.stderr b/src/test/ui/borrowck/borrowck-union-move-assign.nll.stderr deleted file mode 100644 index 0b1714fd75..0000000000 --- a/src/test/ui/borrowck/borrowck-union-move-assign.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: use of moved value: `u` - --> $DIR/borrowck-union-move-assign.rs:17:21 - | -LL | let mut u = U { a: A }; - | ----- move occurs because `u` has type `U`, which does not implement the `Copy` trait -LL | let a = u.a; - | --- value moved here -LL | let a = u.a; - | ^^^ value used here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-union-move-assign.rs b/src/test/ui/borrowck/borrowck-union-move-assign.rs index 1bb4325203..a24f42d2dd 100644 --- a/src/test/ui/borrowck/borrowck-union-move-assign.rs +++ b/src/test/ui/borrowck/borrowck-union-move-assign.rs @@ -14,7 +14,7 @@ fn main() { { let mut u = U { a: A }; let a = u.a; - let a = u.a; //~ ERROR use of moved value: `u.a` + let a = u.a; //~ ERROR use of moved value: `u` } { let mut u = U { a: A }; diff --git a/src/test/ui/borrowck/borrowck-union-move-assign.stderr b/src/test/ui/borrowck/borrowck-union-move-assign.stderr index 04e67fcb92..0b1714fd75 100644 --- a/src/test/ui/borrowck/borrowck-union-move-assign.stderr +++ b/src/test/ui/borrowck/borrowck-union-move-assign.stderr @@ -1,12 +1,12 @@ -error[E0382]: use of moved value: `u.a` - --> $DIR/borrowck-union-move-assign.rs:17:17 +error[E0382]: use of moved value: `u` + --> $DIR/borrowck-union-move-assign.rs:17:21 | +LL | let mut u = U { a: A }; + | ----- move occurs because `u` has type `U`, which does not implement the `Copy` trait LL | let a = u.a; - | - value moved here + | --- value moved here LL | let a = u.a; - | ^ value used here after move - | - = note: move occurs because `u.a` has type `A`, which does not implement the `Copy` trait + | ^^^ value used here after move error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-union-move.nll.stderr b/src/test/ui/borrowck/borrowck-union-move.nll.stderr deleted file mode 100644 index abbb0142a9..0000000000 --- a/src/test/ui/borrowck/borrowck-union-move.nll.stderr +++ /dev/null @@ -1,63 +0,0 @@ -error[E0382]: use of moved value: `u` - --> $DIR/borrowck-union-move.rs:26:21 - | -LL | let mut u = Unn { n1: NonCopy }; - | ----- move occurs because `u` has type `Unn`, which does not implement the `Copy` trait -LL | let a = u.n1; - | ---- value moved here -LL | let a = u.n1; - | ^^^^ value used here after move - -error[E0382]: use of moved value: `u` - --> $DIR/borrowck-union-move.rs:31:21 - | -LL | let mut u = Unn { n1: NonCopy }; - | ----- move occurs because `u` has type `Unn`, which does not implement the `Copy` trait -LL | let a = u.n1; - | ---- value moved here -LL | let a = u; - | ^ value used here after move - -error[E0382]: use of moved value: `u` - --> $DIR/borrowck-union-move.rs:36:21 - | -LL | let mut u = Unn { n1: NonCopy }; - | ----- move occurs because `u` has type `Unn`, which does not implement the `Copy` trait -LL | let a = u.n1; - | ---- value moved here -LL | let a = u.n2; - | ^^^^ value used here after move - -error[E0382]: use of moved value: `u` - --> $DIR/borrowck-union-move.rs:63:21 - | -LL | let mut u = Ucn { c: Copy }; - | ----- move occurs because `u` has type `Ucn`, which does not implement the `Copy` trait -LL | let a = u.n; - | --- value moved here -LL | let a = u.n; - | ^^^ value used here after move - -error[E0382]: use of moved value: `u` - --> $DIR/borrowck-union-move.rs:68:21 - | -LL | let mut u = Ucn { c: Copy }; - | ----- move occurs because `u` has type `Ucn`, which does not implement the `Copy` trait -LL | let a = u.n; - | --- value moved here -LL | let a = u.c; - | ^^^ value used here after move - -error[E0382]: use of moved value: `u` - --> $DIR/borrowck-union-move.rs:83:21 - | -LL | let mut u = Ucn { c: Copy }; - | ----- move occurs because `u` has type `Ucn`, which does not implement the `Copy` trait -LL | let a = u.n; - | --- value moved here -LL | let a = u; - | ^ value used here after move - -error: aborting due to 6 previous errors - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/borrowck-union-move.rs b/src/test/ui/borrowck/borrowck-union-move.rs index e2480604f2..d0aa6dff74 100644 --- a/src/test/ui/borrowck/borrowck-union-move.rs +++ b/src/test/ui/borrowck/borrowck-union-move.rs @@ -23,17 +23,17 @@ fn main() { { let mut u = Unn { n1: NonCopy }; let a = u.n1; - let a = u.n1; //~ ERROR use of moved value: `u.n1` + let a = u.n1; //~ ERROR use of moved value: `u` } { let mut u = Unn { n1: NonCopy }; let a = u.n1; - let a = u; //~ ERROR use of partially moved value: `u` + let a = u; //~ ERROR use of moved value: `u` } { let mut u = Unn { n1: NonCopy }; let a = u.n1; - let a = u.n2; //~ ERROR use of moved value: `u.n2` + let a = u.n2; //~ ERROR use of moved value: `u` } // 2 Copy { @@ -60,12 +60,12 @@ fn main() { { let mut u = Ucn { c: Copy }; let a = u.n; - let a = u.n; //~ ERROR use of moved value: `u.n` + let a = u.n; //~ ERROR use of moved value: `u` } { let mut u = Ucn { c: Copy }; let a = u.n; - let a = u.c; //~ ERROR use of moved value: `u.c` + let a = u.c; //~ ERROR use of moved value: `u` } { let mut u = Ucn { c: Copy }; @@ -80,7 +80,7 @@ fn main() { { let mut u = Ucn { c: Copy }; let a = u.n; - let a = u; //~ ERROR use of partially moved value: `u` + let a = u; //~ ERROR use of moved value: `u` } } } diff --git a/src/test/ui/borrowck/borrowck-union-move.stderr b/src/test/ui/borrowck/borrowck-union-move.stderr index 4ce372aedc..abbb0142a9 100644 --- a/src/test/ui/borrowck/borrowck-union-move.stderr +++ b/src/test/ui/borrowck/borrowck-union-move.stderr @@ -1,62 +1,62 @@ -error[E0382]: use of moved value: `u.n1` - --> $DIR/borrowck-union-move.rs:26:17 +error[E0382]: use of moved value: `u` + --> $DIR/borrowck-union-move.rs:26:21 | +LL | let mut u = Unn { n1: NonCopy }; + | ----- move occurs because `u` has type `Unn`, which does not implement the `Copy` trait LL | let a = u.n1; - | - value moved here + | ---- value moved here LL | let a = u.n1; - | ^ value used here after move - | - = note: move occurs because `u.n1` has type `NonCopy`, which does not implement the `Copy` trait + | ^^^^ value used here after move -error[E0382]: use of partially moved value: `u` - --> $DIR/borrowck-union-move.rs:31:17 +error[E0382]: use of moved value: `u` + --> $DIR/borrowck-union-move.rs:31:21 | +LL | let mut u = Unn { n1: NonCopy }; + | ----- move occurs because `u` has type `Unn`, which does not implement the `Copy` trait LL | let a = u.n1; - | - value moved here + | ---- value moved here LL | let a = u; - | ^ value used here after move - | - = note: move occurs because `u.n2` has type `[type error]`, which does not implement the `Copy` trait + | ^ value used here after move -error[E0382]: use of moved value: `u.n2` - --> $DIR/borrowck-union-move.rs:36:17 +error[E0382]: use of moved value: `u` + --> $DIR/borrowck-union-move.rs:36:21 | +LL | let mut u = Unn { n1: NonCopy }; + | ----- move occurs because `u` has type `Unn`, which does not implement the `Copy` trait LL | let a = u.n1; - | - value moved here + | ---- value moved here LL | let a = u.n2; - | ^ value used here after move - | - = note: move occurs because `u.n2` has type `[type error]`, which does not implement the `Copy` trait + | ^^^^ value used here after move -error[E0382]: use of moved value: `u.n` - --> $DIR/borrowck-union-move.rs:63:17 +error[E0382]: use of moved value: `u` + --> $DIR/borrowck-union-move.rs:63:21 | +LL | let mut u = Ucn { c: Copy }; + | ----- move occurs because `u` has type `Ucn`, which does not implement the `Copy` trait LL | let a = u.n; - | - value moved here + | --- value moved here LL | let a = u.n; - | ^ value used here after move - | - = note: move occurs because `u.n` has type `NonCopy`, which does not implement the `Copy` trait + | ^^^ value used here after move -error[E0382]: use of moved value: `u.c` - --> $DIR/borrowck-union-move.rs:68:17 +error[E0382]: use of moved value: `u` + --> $DIR/borrowck-union-move.rs:68:21 | +LL | let mut u = Ucn { c: Copy }; + | ----- move occurs because `u` has type `Ucn`, which does not implement the `Copy` trait LL | let a = u.n; - | - value moved here + | --- value moved here LL | let a = u.c; - | ^ value used here after move - | - = note: move occurs because `u.c` has type `[type error]`, which does not implement the `Copy` trait + | ^^^ value used here after move -error[E0382]: use of partially moved value: `u` - --> $DIR/borrowck-union-move.rs:83:17 +error[E0382]: use of moved value: `u` + --> $DIR/borrowck-union-move.rs:83:21 | +LL | let mut u = Ucn { c: Copy }; + | ----- move occurs because `u` has type `Ucn`, which does not implement the `Copy` trait LL | let a = u.n; - | - value moved here + | --- value moved here LL | let a = u; - | ^ value used here after move - | - = note: move occurs because `u.c` has type `[type error]`, which does not implement the `Copy` trait + | ^ value used here after move error: aborting due to 6 previous errors diff --git a/src/test/ui/borrowck/borrowck-union-uninitialized.nll.stderr b/src/test/ui/borrowck/borrowck-union-uninitialized.nll.stderr deleted file mode 100644 index 06c884e244..0000000000 --- a/src/test/ui/borrowck/borrowck-union-uninitialized.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0381]: assign to part of possibly uninitialized variable: `s` - --> $DIR/borrowck-union-uninitialized.rs:13:9 - | -LL | s.a = 0; - | ^^^^^^^ use of possibly uninitialized `s` - -error[E0381]: assign to part of possibly uninitialized variable: `u` - --> $DIR/borrowck-union-uninitialized.rs:14:9 - | -LL | u.a = 0; - | ^^^^^^^ use of possibly uninitialized `u` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-union-uninitialized.rs b/src/test/ui/borrowck/borrowck-union-uninitialized.rs index e7d456ea74..9cab0b1920 100644 --- a/src/test/ui/borrowck/borrowck-union-uninitialized.rs +++ b/src/test/ui/borrowck/borrowck-union-uninitialized.rs @@ -10,9 +10,9 @@ fn main() { unsafe { let mut s: S; let mut u: U; - s.a = 0; - u.a = 0; - let sa = s.a; //~ ERROR use of possibly uninitialized variable: `s.a` - let ua = u.a; //~ ERROR use of possibly uninitialized variable: `u.a` + s.a = 0; //~ ERROR assign to part of possibly uninitialized variable: `s` + u.a = 0; //~ ERROR assign to part of possibly uninitialized variable: `u` + let sa = s.a; + let ua = u.a; } } diff --git a/src/test/ui/borrowck/borrowck-union-uninitialized.stderr b/src/test/ui/borrowck/borrowck-union-uninitialized.stderr index 6a1401ff32..06c884e244 100644 --- a/src/test/ui/borrowck/borrowck-union-uninitialized.stderr +++ b/src/test/ui/borrowck/borrowck-union-uninitialized.stderr @@ -1,14 +1,14 @@ -error[E0381]: use of possibly uninitialized variable: `s.a` - --> $DIR/borrowck-union-uninitialized.rs:15:13 +error[E0381]: assign to part of possibly uninitialized variable: `s` + --> $DIR/borrowck-union-uninitialized.rs:13:9 | -LL | let sa = s.a; - | ^^ use of possibly uninitialized `s.a` +LL | s.a = 0; + | ^^^^^^^ use of possibly uninitialized `s` -error[E0381]: use of possibly uninitialized variable: `u.a` - --> $DIR/borrowck-union-uninitialized.rs:16:13 +error[E0381]: assign to part of possibly uninitialized variable: `u` + --> $DIR/borrowck-union-uninitialized.rs:14:9 | -LL | let ua = u.a; - | ^^ use of possibly uninitialized `u.a` +LL | u.a = 0; + | ^^^^^^^ use of possibly uninitialized `u` error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/borrowck-uniq-via-lend.nll.stderr b/src/test/ui/borrowck/borrowck-uniq-via-lend.nll.stderr deleted file mode 100644 index 923edc8eda..0000000000 --- a/src/test/ui/borrowck/borrowck-uniq-via-lend.nll.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0502]: cannot borrow `*v` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-uniq-via-lend.rs:36:12 - | -LL | let w = &mut v; - | ------ mutable borrow occurs here -LL | borrow(&*v); - | ^^^ immutable borrow occurs here -LL | w.use_mut(); - | - mutable borrow later used here - -error[E0502]: cannot borrow `*v` as immutable because it is also borrowed as mutable - --> $DIR/borrowck-uniq-via-lend.rs:53:12 - | -LL | x = &mut v; - | ------ mutable borrow occurs here -LL | borrow(&*v); - | ^^^ immutable borrow occurs here -LL | x.use_mut(); - | - mutable borrow later used here - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/borrowck-uniq-via-lend.stderr b/src/test/ui/borrowck/borrowck-uniq-via-lend.stderr index 00fd77ed71..923edc8eda 100644 --- a/src/test/ui/borrowck/borrowck-uniq-via-lend.stderr +++ b/src/test/ui/borrowck/borrowck-uniq-via-lend.stderr @@ -1,24 +1,22 @@ -error[E0502]: cannot borrow `*v` as immutable because `v` is also borrowed as mutable - --> $DIR/borrowck-uniq-via-lend.rs:36:13 +error[E0502]: cannot borrow `*v` as immutable because it is also borrowed as mutable + --> $DIR/borrowck-uniq-via-lend.rs:36:12 | LL | let w = &mut v; - | - mutable borrow occurs here + | ------ mutable borrow occurs here LL | borrow(&*v); - | ^^ immutable borrow occurs here + | ^^^ immutable borrow occurs here LL | w.use_mut(); -LL | } - | - mutable borrow ends here + | - mutable borrow later used here -error[E0502]: cannot borrow `*v` as immutable because `v` is also borrowed as mutable - --> $DIR/borrowck-uniq-via-lend.rs:53:13 +error[E0502]: cannot borrow `*v` as immutable because it is also borrowed as mutable + --> $DIR/borrowck-uniq-via-lend.rs:53:12 | LL | x = &mut v; - | - mutable borrow occurs here + | ------ mutable borrow occurs here LL | borrow(&*v); - | ^^ immutable borrow occurs here + | ^^^ immutable borrow occurs here LL | x.use_mut(); -LL | } - | - mutable borrow ends here + | - mutable borrow later used here error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/borrowck-use-in-index-lvalue.ast.stderr b/src/test/ui/borrowck/borrowck-use-in-index-lvalue.ast.stderr deleted file mode 100644 index e235bdfa8a..0000000000 --- a/src/test/ui/borrowck/borrowck-use-in-index-lvalue.ast.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0381]: use of possibly uninitialized variable: `*w` - --> $DIR/borrowck-use-in-index-lvalue.rs:6:5 - | -LL | w[5] = 0; - | ^^^^^^^^ use of possibly uninitialized `*w` - -error[E0381]: use of possibly uninitialized variable: `*w` - --> $DIR/borrowck-use-in-index-lvalue.rs:10:5 - | -LL | w[5] = 0; - | ^^^^^^^^ use of possibly uninitialized `*w` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-use-in-index-lvalue.mir.stderr b/src/test/ui/borrowck/borrowck-use-in-index-lvalue.mir.stderr deleted file mode 100644 index c5e4f89f77..0000000000 --- a/src/test/ui/borrowck/borrowck-use-in-index-lvalue.mir.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0381]: use of possibly uninitialized variable: `w` - --> $DIR/borrowck-use-in-index-lvalue.rs:6:5 - | -LL | w[5] = 0; - | ^^^^ use of possibly uninitialized `*w` - -error[E0381]: use of possibly uninitialized variable: `w` - --> $DIR/borrowck-use-in-index-lvalue.rs:10:5 - | -LL | w[5] = 0; - | ^^^^ use of possibly uninitialized `*w` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-use-in-index-lvalue.rs b/src/test/ui/borrowck/borrowck-use-in-index-lvalue.rs index f953dec444..d30b1de5cd 100644 --- a/src/test/ui/borrowck/borrowck-use-in-index-lvalue.rs +++ b/src/test/ui/borrowck/borrowck-use-in-index-lvalue.rs @@ -1,14 +1,9 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - fn test() { let w: &mut [isize]; - w[5] = 0; //[ast]~ ERROR use of possibly uninitialized variable: `*w` [E0381] - //[mir]~^ ERROR [E0381] + w[5] = 0; //~ ERROR [E0381] let mut w: &mut [isize]; - w[5] = 0; //[ast]~ ERROR use of possibly uninitialized variable: `*w` [E0381] - //[mir]~^ ERROR [E0381] + w[5] = 0; //~ ERROR [E0381] } fn main() { test(); } diff --git a/src/test/ui/borrowck/borrowck-use-in-index-lvalue.ast.nll.stderr b/src/test/ui/borrowck/borrowck-use-in-index-lvalue.stderr similarity index 89% rename from src/test/ui/borrowck/borrowck-use-in-index-lvalue.ast.nll.stderr rename to src/test/ui/borrowck/borrowck-use-in-index-lvalue.stderr index c5e4f89f77..c03ef759f5 100644 --- a/src/test/ui/borrowck/borrowck-use-in-index-lvalue.ast.nll.stderr +++ b/src/test/ui/borrowck/borrowck-use-in-index-lvalue.stderr @@ -1,11 +1,11 @@ error[E0381]: use of possibly uninitialized variable: `w` - --> $DIR/borrowck-use-in-index-lvalue.rs:6:5 + --> $DIR/borrowck-use-in-index-lvalue.rs:3:5 | LL | w[5] = 0; | ^^^^ use of possibly uninitialized `*w` error[E0381]: use of possibly uninitialized variable: `w` - --> $DIR/borrowck-use-in-index-lvalue.rs:10:5 + --> $DIR/borrowck-use-in-index-lvalue.rs:6:5 | LL | w[5] = 0; | ^^^^ use of possibly uninitialized `*w` diff --git a/src/test/ui/borrowck/borrowck-use-mut-borrow.nll.stderr b/src/test/ui/borrowck/borrowck-use-mut-borrow.nll.stderr deleted file mode 100644 index 91d69c51e8..0000000000 --- a/src/test/ui/borrowck/borrowck-use-mut-borrow.nll.stderr +++ /dev/null @@ -1,95 +0,0 @@ -error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/borrowck-use-mut-borrow.rs:11:10 - | -LL | let p = &mut x; - | ------ borrow of `x` occurs here -LL | drop(x); - | ^ use of borrowed `x` -LL | *p = 2; - | ------ borrow later used here - -error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/borrowck-use-mut-borrow.rs:18:10 - | -LL | let p = &mut x.a; - | -------- borrow of `x.a` occurs here -LL | drop(x); - | ^ use of borrowed `x.a` -LL | *p = 3; - | ------ borrow later used here - -error[E0503]: cannot use `x.a` because it was mutably borrowed - --> $DIR/borrowck-use-mut-borrow.rs:25:10 - | -LL | let p = &mut x; - | ------ borrow of `x` occurs here -LL | drop(x.a); - | ^^^ use of borrowed `x` -LL | p.a = 3; - | ------- borrow later used here - -error[E0503]: cannot use `x.a` because it was mutably borrowed - --> $DIR/borrowck-use-mut-borrow.rs:32:10 - | -LL | let p = &mut x.a; - | -------- borrow of `x.a` occurs here -LL | drop(x.a); - | ^^^ use of borrowed `x.a` -LL | *p = 3; - | ------ borrow later used here - -error[E0503]: cannot use `x.a` because it was mutably borrowed - --> $DIR/borrowck-use-mut-borrow.rs:39:13 - | -LL | let p = &mut x; - | ------ borrow of `x` occurs here -LL | let y = A { b: 3, .. x }; - | ^^^^^^^^^^^^^^^^ use of borrowed `x` -LL | drop(y); -LL | p.a = 4; - | ------- borrow later used here - -error[E0503]: cannot use `x.a` because it was mutably borrowed - --> $DIR/borrowck-use-mut-borrow.rs:47:13 - | -LL | let p = &mut x.a; - | -------- borrow of `x.a` occurs here -LL | let y = A { b: 3, .. x }; - | ^^^^^^^^^^^^^^^^ use of borrowed `x.a` -LL | drop(y); -LL | *p = 4; - | ------ borrow later used here - -error[E0503]: cannot use `*x` because it was mutably borrowed - --> $DIR/borrowck-use-mut-borrow.rs:55:10 - | -LL | let p = &mut x; - | ------ borrow of `x` occurs here -LL | drop(*x); - | ^^ use of borrowed `x` -LL | **p = 2; - | ------- borrow later used here - -error[E0503]: cannot use `*x.b` because it was mutably borrowed - --> $DIR/borrowck-use-mut-borrow.rs:62:10 - | -LL | let p = &mut x; - | ------ borrow of `x` occurs here -LL | drop(*x.b); - | ^^^^ use of borrowed `x` -LL | p.a = 3; - | ------- borrow later used here - -error[E0503]: cannot use `*x.b` because it was mutably borrowed - --> $DIR/borrowck-use-mut-borrow.rs:69:10 - | -LL | let p = &mut x.b; - | -------- borrow of `x.b` occurs here -LL | drop(*x.b); - | ^^^^ use of borrowed `x.b` -LL | **p = 3; - | ------- borrow later used here - -error: aborting due to 9 previous errors - -For more information about this error, try `rustc --explain E0503`. diff --git a/src/test/ui/borrowck/borrowck-use-mut-borrow.stderr b/src/test/ui/borrowck/borrowck-use-mut-borrow.stderr index 5c1d726917..91d69c51e8 100644 --- a/src/test/ui/borrowck/borrowck-use-mut-borrow.stderr +++ b/src/test/ui/borrowck/borrowck-use-mut-borrow.stderr @@ -2,73 +2,93 @@ error[E0503]: cannot use `x` because it was mutably borrowed --> $DIR/borrowck-use-mut-borrow.rs:11:10 | LL | let p = &mut x; - | - borrow of `x` occurs here + | ------ borrow of `x` occurs here LL | drop(x); | ^ use of borrowed `x` +LL | *p = 2; + | ------ borrow later used here error[E0503]: cannot use `x` because it was mutably borrowed --> $DIR/borrowck-use-mut-borrow.rs:18:10 | LL | let p = &mut x.a; - | --- borrow of `x.a` occurs here + | -------- borrow of `x.a` occurs here LL | drop(x); | ^ use of borrowed `x.a` +LL | *p = 3; + | ------ borrow later used here error[E0503]: cannot use `x.a` because it was mutably borrowed --> $DIR/borrowck-use-mut-borrow.rs:25:10 | LL | let p = &mut x; - | - borrow of `x` occurs here + | ------ borrow of `x` occurs here LL | drop(x.a); | ^^^ use of borrowed `x` +LL | p.a = 3; + | ------- borrow later used here error[E0503]: cannot use `x.a` because it was mutably borrowed --> $DIR/borrowck-use-mut-borrow.rs:32:10 | LL | let p = &mut x.a; - | --- borrow of `x.a` occurs here + | -------- borrow of `x.a` occurs here LL | drop(x.a); | ^^^ use of borrowed `x.a` +LL | *p = 3; + | ------ borrow later used here error[E0503]: cannot use `x.a` because it was mutably borrowed - --> $DIR/borrowck-use-mut-borrow.rs:39:26 + --> $DIR/borrowck-use-mut-borrow.rs:39:13 | LL | let p = &mut x; - | - borrow of `x` occurs here + | ------ borrow of `x` occurs here LL | let y = A { b: 3, .. x }; - | ^ use of borrowed `x` + | ^^^^^^^^^^^^^^^^ use of borrowed `x` +LL | drop(y); +LL | p.a = 4; + | ------- borrow later used here error[E0503]: cannot use `x.a` because it was mutably borrowed - --> $DIR/borrowck-use-mut-borrow.rs:47:26 + --> $DIR/borrowck-use-mut-borrow.rs:47:13 | LL | let p = &mut x.a; - | --- borrow of `x.a` occurs here + | -------- borrow of `x.a` occurs here LL | let y = A { b: 3, .. x }; - | ^ use of borrowed `x.a` + | ^^^^^^^^^^^^^^^^ use of borrowed `x.a` +LL | drop(y); +LL | *p = 4; + | ------ borrow later used here error[E0503]: cannot use `*x` because it was mutably borrowed --> $DIR/borrowck-use-mut-borrow.rs:55:10 | LL | let p = &mut x; - | - borrow of `x` occurs here + | ------ borrow of `x` occurs here LL | drop(*x); | ^^ use of borrowed `x` +LL | **p = 2; + | ------- borrow later used here error[E0503]: cannot use `*x.b` because it was mutably borrowed --> $DIR/borrowck-use-mut-borrow.rs:62:10 | LL | let p = &mut x; - | - borrow of `x` occurs here + | ------ borrow of `x` occurs here LL | drop(*x.b); | ^^^^ use of borrowed `x` +LL | p.a = 3; + | ------- borrow later used here error[E0503]: cannot use `*x.b` because it was mutably borrowed --> $DIR/borrowck-use-mut-borrow.rs:69:10 | LL | let p = &mut x.b; - | --- borrow of `x.b` occurs here + | -------- borrow of `x.b` occurs here LL | drop(*x.b); | ^^^^ use of borrowed `x.b` +LL | **p = 3; + | ------- borrow later used here error: aborting due to 9 previous errors diff --git a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.ast.nll.stderr b/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.ast.nll.stderr deleted file mode 100644 index a208dc486e..0000000000 --- a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.ast.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0381]: borrow of possibly uninitialized variable: `x` - --> $DIR/borrowck-use-uninitialized-in-cast-trait.rs:12:13 - | -LL | let y = x as *const Foo; - | ^ use of possibly uninitialized `*x` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.ast.stderr b/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.ast.stderr deleted file mode 100644 index 49a43003f6..0000000000 --- a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.ast.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0381]: use of possibly uninitialized variable: `*x` - --> $DIR/borrowck-use-uninitialized-in-cast-trait.rs:12:13 - | -LL | let y = x as *const Foo; - | ^ use of possibly uninitialized `*x` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.rs b/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.rs index 518228a50f..1e272372f6 100644 --- a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.rs +++ b/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - // Variation on `borrowck-use-uninitialized-in-cast` in which we do a // trait cast from an uninitialized source. Issue #20791. @@ -9,6 +6,5 @@ impl Foo for i32 { } fn main() { let x: &i32; - let y = x as *const Foo; //[ast]~ ERROR use of possibly uninitialized variable: `*x` - //[mir]~^ ERROR [E0381] + let y = x as *const Foo; //~ ERROR [E0381] } diff --git a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.mir.stderr b/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.stderr similarity index 81% rename from src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.mir.stderr rename to src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.stderr index a208dc486e..df610cbb56 100644 --- a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.mir.stderr +++ b/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast-trait.stderr @@ -1,5 +1,5 @@ error[E0381]: borrow of possibly uninitialized variable: `x` - --> $DIR/borrowck-use-uninitialized-in-cast-trait.rs:12:13 + --> $DIR/borrowck-use-uninitialized-in-cast-trait.rs:9:13 | LL | let y = x as *const Foo; | ^ use of possibly uninitialized `*x` diff --git a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.ast.stderr b/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.ast.stderr deleted file mode 100644 index d813738786..0000000000 --- a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.ast.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0381]: use of possibly uninitialized variable: `*x` - --> $DIR/borrowck-use-uninitialized-in-cast.rs:10:13 - | -LL | let y = x as *const i32; - | ^ use of possibly uninitialized `*x` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.mir.stderr b/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.mir.stderr deleted file mode 100644 index 0f62c3ae2c..0000000000 --- a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.mir.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0381]: borrow of possibly uninitialized variable: `x` - --> $DIR/borrowck-use-uninitialized-in-cast.rs:10:13 - | -LL | let y = x as *const i32; - | ^ use of possibly uninitialized `*x` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.rs b/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.rs index e15479bde2..a355a546dc 100644 --- a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.rs +++ b/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.rs @@ -1,12 +1,8 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - // Check that we detect unused values that are cast to other things. // The problem was specified to casting to `*`, as creating unsafe // pointers was not being fully checked. Issue #20791. fn main() { let x: &i32; - let y = x as *const i32; //[ast]~ ERROR use of possibly uninitialized variable: `*x` [E0381] - //[mir]~^ ERROR [E0381] + let y = x as *const i32; //~ ERROR [E0381] } diff --git a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.ast.nll.stderr b/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.stderr similarity index 82% rename from src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.ast.nll.stderr rename to src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.stderr index 0f62c3ae2c..84e717a463 100644 --- a/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.ast.nll.stderr +++ b/src/test/ui/borrowck/borrowck-use-uninitialized-in-cast.stderr @@ -1,5 +1,5 @@ error[E0381]: borrow of possibly uninitialized variable: `x` - --> $DIR/borrowck-use-uninitialized-in-cast.rs:10:13 + --> $DIR/borrowck-use-uninitialized-in-cast.rs:7:13 | LL | let y = x as *const i32; | ^ use of possibly uninitialized `*x` diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.nll.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.nll.stderr deleted file mode 100644 index da6d9293b4..0000000000 --- a/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.nll.stderr +++ /dev/null @@ -1,30 +0,0 @@ -error[E0515]: cannot return value referencing local variable `vec` - --> $DIR/borrowck-vec-pattern-element-loan.rs:10:5 - | -LL | let vec: &[isize] = &vec; - | ---- `vec` is borrowed here -... -LL | tail - | ^^^^ returns a value referencing data owned by the current function - -error[E0515]: cannot return value referencing local variable `vec` - --> $DIR/borrowck-vec-pattern-element-loan.rs:20:5 - | -LL | let vec: &[isize] = &vec; - | ---- `vec` is borrowed here -... -LL | init - | ^^^^ returns a value referencing data owned by the current function - -error[E0515]: cannot return value referencing local variable `vec` - --> $DIR/borrowck-vec-pattern-element-loan.rs:30:5 - | -LL | let vec: &[isize] = &vec; - | ---- `vec` is borrowed here -... -LL | slice - | ^^^^^ returns a value referencing data owned by the current function - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.rs b/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.rs index 0de5132466..100384d78c 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.rs +++ b/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.rs @@ -2,32 +2,32 @@ fn a<'a>() -> &'a [isize] { let vec = vec![1, 2, 3, 4]; - let vec: &[isize] = &vec; //~ ERROR does not live long enough + let vec: &[isize] = &vec; let tail = match vec { &[_, ref tail..] => tail, _ => panic!("a") }; - tail + tail //~ ERROR cannot return value referencing local variable `vec` } fn b<'a>() -> &'a [isize] { let vec = vec![1, 2, 3, 4]; - let vec: &[isize] = &vec; //~ ERROR does not live long enough + let vec: &[isize] = &vec; let init = match vec { &[ref init.., _] => init, _ => panic!("b") }; - init + init //~ ERROR cannot return value referencing local variable `vec` } fn c<'a>() -> &'a [isize] { let vec = vec![1, 2, 3, 4]; - let vec: &[isize] = &vec; //~ ERROR does not live long enough + let vec: &[isize] = &vec; let slice = match vec { &[_, ref slice.., _] => slice, _ => panic!("c") }; - slice + slice //~ ERROR cannot return value referencing local variable `vec` } fn main() {} diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.stderr index b0eaee7907..da6d9293b4 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.stderr @@ -1,48 +1,30 @@ -error[E0597]: `vec` does not live long enough - --> $DIR/borrowck-vec-pattern-element-loan.rs:5:26 +error[E0515]: cannot return value referencing local variable `vec` + --> $DIR/borrowck-vec-pattern-element-loan.rs:10:5 | LL | let vec: &[isize] = &vec; - | ^^^ borrowed value does not live long enough + | ---- `vec` is borrowed here ... -LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 3:6... - --> $DIR/borrowck-vec-pattern-element-loan.rs:3:6 - | -LL | fn a<'a>() -> &'a [isize] { - | ^^ +LL | tail + | ^^^^ returns a value referencing data owned by the current function -error[E0597]: `vec` does not live long enough - --> $DIR/borrowck-vec-pattern-element-loan.rs:15:26 +error[E0515]: cannot return value referencing local variable `vec` + --> $DIR/borrowck-vec-pattern-element-loan.rs:20:5 | LL | let vec: &[isize] = &vec; - | ^^^ borrowed value does not live long enough + | ---- `vec` is borrowed here ... -LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:6... - --> $DIR/borrowck-vec-pattern-element-loan.rs:13:6 - | -LL | fn b<'a>() -> &'a [isize] { - | ^^ +LL | init + | ^^^^ returns a value referencing data owned by the current function -error[E0597]: `vec` does not live long enough - --> $DIR/borrowck-vec-pattern-element-loan.rs:25:26 +error[E0515]: cannot return value referencing local variable `vec` + --> $DIR/borrowck-vec-pattern-element-loan.rs:30:5 | LL | let vec: &[isize] = &vec; - | ^^^ borrowed value does not live long enough + | ---- `vec` is borrowed here ... -LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 23:6... - --> $DIR/borrowck-vec-pattern-element-loan.rs:23:6 - | -LL | fn c<'a>() -> &'a [isize] { - | ^^ +LL | slice + | ^^^^^ returns a value referencing data owned by the current function error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-loan-from-mut.nll.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-loan-from-mut.nll.stderr deleted file mode 100644 index 251f445929..0000000000 --- a/src/test/ui/borrowck/borrowck-vec-pattern-loan-from-mut.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0499]: cannot borrow `v` as mutable more than once at a time - --> $DIR/borrowck-vec-pattern-loan-from-mut.rs:8:13 - | -LL | let vb: &mut [isize] = &mut v; - | ------ first mutable borrow occurs here -... -LL | v.push(tail[0] + tail[1]); - | ^ ------- first borrow later used here - | | - | second mutable borrow occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-loan-from-mut.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-loan-from-mut.stderr index 1ce6a3bddc..251f445929 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-loan-from-mut.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-loan-from-mut.stderr @@ -2,13 +2,12 @@ error[E0499]: cannot borrow `v` as mutable more than once at a time --> $DIR/borrowck-vec-pattern-loan-from-mut.rs:8:13 | LL | let vb: &mut [isize] = &mut v; - | - first mutable borrow occurs here + | ------ first mutable borrow occurs here ... LL | v.push(tail[0] + tail[1]); - | ^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here + | ^ ------- first borrow later used here + | | + | second mutable borrow occurs here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-move-tail.ast.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-move-tail.ast.stderr deleted file mode 100644 index 1207d4a109..0000000000 --- a/src/test/ui/borrowck/borrowck-vec-pattern-move-tail.ast.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0506]: cannot assign to `a[..]` because it is borrowed - --> $DIR/borrowck-vec-pattern-move-tail.rs:16:5 - | -LL | [1, 2, ref tail..] => tail, - | -------- borrow of `a[..]` occurs here -... -LL | a[2] = 0; - | ^^^^^^^^ assignment to borrowed `a[..]` occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-move-tail.cmp.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-move-tail.cmp.stderr deleted file mode 100644 index f764d5fb52..0000000000 --- a/src/test/ui/borrowck/borrowck-vec-pattern-move-tail.cmp.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error[E0506]: cannot assign to `a[..]` because it is borrowed (Ast) - --> $DIR/borrowck-vec-pattern-move-tail.rs:16:5 - | -LL | [1, 2, ref tail..] => tail, - | -------- borrow of `a[..]` occurs here -... -LL | a[2] = 0; - | ^^^^^^^^ assignment to borrowed `a[..]` occurs here - -error[E0506]: cannot assign to `a[_]` because it is borrowed (Mir) - --> $DIR/borrowck-vec-pattern-move-tail.rs:16:5 - | -LL | [1, 2, ref tail..] => tail, - | -------- borrow of `a[_]` occurs here -... -LL | a[2] = 0; - | ^^^^^^^^ assignment to borrowed `a[_]` occurs here -... -LL | println!("t[0]: {}", t[0]); - | ---- borrow later used here - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-move-tail.rs b/src/test/ui/borrowck/borrowck-vec-pattern-move-tail.rs index e14ecd90d5..efc5253071 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-move-tail.rs +++ b/src/test/ui/borrowck/borrowck-vec-pattern-move-tail.rs @@ -1,8 +1,4 @@ // http://rust-lang.org/COPYRIGHT. -// - -// revisions: ast cmp -//[cmp]compile-flags: -Z borrowck=compare #![feature(slice_patterns)] @@ -13,9 +9,7 @@ fn main() { _ => unreachable!() }; println!("t[0]: {}", t[0]); - a[2] = 0; //[ast]~ ERROR cannot assign to `a[..]` because it is borrowed - //[cmp]~^ ERROR cannot assign to `a[..]` because it is borrowed (Ast) - //[cmp]~| ERROR cannot assign to `a[_]` because it is borrowed (Mir) + a[2] = 0; //~ ERROR cannot assign to `a[_]` because it is borrowed println!("t[0]: {}", t[0]); t[0]; } diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-move-tail.ast.nll.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-move-tail.stderr similarity index 89% rename from src/test/ui/borrowck/borrowck-vec-pattern-move-tail.ast.nll.stderr rename to src/test/ui/borrowck/borrowck-vec-pattern-move-tail.stderr index 7d0d8882de..b2f553ba49 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-move-tail.ast.nll.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-move-tail.stderr @@ -1,12 +1,11 @@ error[E0506]: cannot assign to `a[_]` because it is borrowed - --> $DIR/borrowck-vec-pattern-move-tail.rs:16:5 + --> $DIR/borrowck-vec-pattern-move-tail.rs:12:5 | LL | [1, 2, ref tail..] => tail, | -------- borrow of `a[_]` occurs here ... LL | a[2] = 0; | ^^^^^^^^ assignment to borrowed `a[_]` occurs here -... LL | println!("t[0]: {}", t[0]); | ---- borrow later used here diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.nll.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.nll.stderr deleted file mode 100644 index aafcb3160d..0000000000 --- a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.nll.stderr +++ /dev/null @@ -1,117 +0,0 @@ -error[E0506]: cannot assign to `vec[_]` because it is borrowed - --> $DIR/borrowck-vec-pattern-nesting.rs:10:13 - | -LL | [box ref _a, _, _] => { - | ------ borrow of `vec[_]` occurs here -LL | -LL | vec[0] = box 4; - | ^^^^^^ assignment to borrowed `vec[_]` occurs here -LL | -LL | _a.use_ref(); - | -- borrow later used here - -error[E0506]: cannot assign to `vec[_]` because it is borrowed - --> $DIR/borrowck-vec-pattern-nesting.rs:23:13 - | -LL | &mut [ref _b..] => { - | ------ borrow of `vec[_]` occurs here -LL | -LL | vec[0] = box 4; - | ^^^^^^ assignment to borrowed `vec[_]` occurs here -LL | -LL | _b.use_ref(); - | -- borrow later used here - -error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice - --> $DIR/borrowck-vec-pattern-nesting.rs:33:11 - | -LL | match vec { - | ^^^ cannot move out of here -LL | &mut [_a, - | -- data moved here - | -note: move occurs because `_a` has type `std::boxed::Box`, which does not implement the `Copy` trait - --> $DIR/borrowck-vec-pattern-nesting.rs:34:15 - | -LL | &mut [_a, - | ^^ -help: consider removing the `&mut` - | -LL | [_a, -LL | -LL | -LL | .. -LL | ] => { - | - -error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice - --> $DIR/borrowck-vec-pattern-nesting.rs:47:13 - | -LL | let a = vec[0]; - | ^^^^^^ - | | - | cannot move out of here - | help: consider borrowing here: `&vec[0]` - -error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice - --> $DIR/borrowck-vec-pattern-nesting.rs:54:11 - | -LL | match vec { - | ^^^ cannot move out of here -... -LL | _b] => {} - | -- data moved here - | -note: move occurs because `_b` has type `std::boxed::Box`, which does not implement the `Copy` trait - --> $DIR/borrowck-vec-pattern-nesting.rs:57:10 - | -LL | _b] => {} - | ^^ -help: consider removing the `&mut` - | -LL | [ -LL | -LL | _b] => {} - | - -error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice - --> $DIR/borrowck-vec-pattern-nesting.rs:60:13 - | -LL | let a = vec[0]; - | ^^^^^^ - | | - | cannot move out of here - | help: consider borrowing here: `&vec[0]` - -error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice - --> $DIR/borrowck-vec-pattern-nesting.rs:67:11 - | -LL | match vec { - | ^^^ cannot move out of here -LL | &mut [_a, _b, _c] => {} - | ----------------- - | | | | | - | | | | ...and here - | | | ...and here - | | data moved here - | help: consider removing the `&mut`: `[_a, _b, _c]` - | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/borrowck-vec-pattern-nesting.rs:68:15 - | -LL | &mut [_a, _b, _c] => {} - | ^^ ^^ ^^ - -error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice - --> $DIR/borrowck-vec-pattern-nesting.rs:72:13 - | -LL | let a = vec[0]; - | ^^^^^^ - | | - | cannot move out of here - | help: consider borrowing here: `&vec[0]` - -error: aborting due to 8 previous errors - -Some errors occurred: E0506, E0508. -For more information about an error, try `rustc --explain E0506`. diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.rs b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.rs index 46203b7a3d..3e2935f6df 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.rs +++ b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.rs @@ -6,10 +6,11 @@ fn a() { let mut vec = [box 1, box 2, box 3]; match vec { [box ref _a, _, _] => { - //~^ borrow of `vec[..]` occurs here + //~^ NOTE borrow of `vec[_]` occurs here vec[0] = box 4; //~ ERROR cannot assign - //~^ assignment to borrowed `vec[..]` occurs here + //~^ NOTE assignment to borrowed `vec[_]` occurs here _a.use_ref(); + //~^ NOTE borrow later used here } } } @@ -19,10 +20,11 @@ fn b() { let vec: &mut [Box] = &mut vec; match vec { &mut [ref _b..] => { - //~^ borrow of `vec[..]` occurs here + //~^ borrow of `vec[_]` occurs here vec[0] = box 4; //~ ERROR cannot assign - //~^ assignment to borrowed `vec[..]` occurs here + //~^ NOTE assignment to borrowed `vec[_]` occurs here _b.use_ref(); + //~^ NOTE borrow later used here } } } @@ -31,46 +33,57 @@ fn c() { let mut vec = vec![box 1, box 2, box 3]; let vec: &mut [Box] = &mut vec; match vec { - &mut [_a, //~ ERROR cannot move out - //~| cannot move out - //~| to prevent move + //~^ ERROR cannot move out + //~| NOTE cannot move out + &mut [_a, + //~^ NOTE data moved here + //~| NOTE move occurs because `_a` has type + //~| HELP consider removing the `&mut` .. ] => { - // Note: `_a` is *moved* here, but `b` is borrowing, - // hence illegal. - // - // See comment in middle/borrowck/gather_loans/mod.rs - // in the case covering these sorts of vectors. } _ => {} } let a = vec[0]; //~ ERROR cannot move out - //~| cannot move out of here + //~| NOTE cannot move out of here + //~| HELP consider borrowing here } fn d() { let mut vec = vec![box 1, box 2, box 3]; let vec: &mut [Box] = &mut vec; match vec { - &mut [ //~ ERROR cannot move out - //~^ cannot move out + //~^ ERROR cannot move out + //~| NOTE cannot move out + &mut [ + //~^ HELP consider removing the `&mut` _b] => {} + //~^ NOTE data moved here + //~| NOTE move occurs because `_b` has type _ => {} } let a = vec[0]; //~ ERROR cannot move out - //~| cannot move out of here + //~| NOTE cannot move out of here + //~| HELP consider borrowing here } fn e() { let mut vec = vec![box 1, box 2, box 3]; let vec: &mut [Box] = &mut vec; match vec { - &mut [_a, _b, _c] => {} //~ ERROR cannot move out - //~| cannot move out + //~^ ERROR cannot move out + //~| NOTE cannot move out + &mut [_a, _b, _c] => {} + //~^ NOTE data moved here + //~| NOTE and here + //~| NOTE and here + //~| HELP consider removing the `&mut` + //~| NOTE move occurs because these variables have types _ => {} } let a = vec[0]; //~ ERROR cannot move out - //~| cannot move out of here + //~| NOTE cannot move out of here + //~| HELP consider borrowing here } fn main() {} diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr index 0e3f514c66..78c26cac9c 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr @@ -1,33 +1,50 @@ -error[E0506]: cannot assign to `vec[..]` because it is borrowed +error[E0506]: cannot assign to `vec[_]` because it is borrowed --> $DIR/borrowck-vec-pattern-nesting.rs:10:13 | LL | [box ref _a, _, _] => { - | ------ borrow of `vec[..]` occurs here + | ------ borrow of `vec[_]` occurs here LL | LL | vec[0] = box 4; - | ^^^^^^^^^^^^^^ assignment to borrowed `vec[..]` occurs here + | ^^^^^^ assignment to borrowed `vec[_]` occurs here +LL | +LL | _a.use_ref(); + | -- borrow later used here -error[E0506]: cannot assign to `vec[..]` because it is borrowed - --> $DIR/borrowck-vec-pattern-nesting.rs:23:13 +error[E0506]: cannot assign to `vec[_]` because it is borrowed + --> $DIR/borrowck-vec-pattern-nesting.rs:24:13 | LL | &mut [ref _b..] => { - | ------ borrow of `vec[..]` occurs here + | ------ borrow of `vec[_]` occurs here LL | LL | vec[0] = box 4; - | ^^^^^^^^^^^^^^ assignment to borrowed `vec[..]` occurs here + | ^^^^^^ assignment to borrowed `vec[_]` occurs here +LL | +LL | _b.use_ref(); + | -- borrow later used here error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice - --> $DIR/borrowck-vec-pattern-nesting.rs:34:14 - | -LL | &mut [_a, - | ^-- hint: to prevent move, use `ref _a` or `ref mut _a` - | ______________| - | | -LL | | -LL | | -LL | | .. -LL | | ] => { - | |_________^ cannot move out of here + --> $DIR/borrowck-vec-pattern-nesting.rs:35:11 + | +LL | match vec { + | ^^^ cannot move out of here +... +LL | &mut [_a, + | -- data moved here + | +note: move occurs because `_a` has type `std::boxed::Box`, which does not implement the `Copy` trait + --> $DIR/borrowck-vec-pattern-nesting.rs:38:15 + | +LL | &mut [_a, + | ^^ +help: consider removing the `&mut` + | +LL | [_a, +LL | +LL | +LL | +LL | .. +LL | ] => { + | error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:47:13 @@ -36,49 +53,68 @@ LL | let a = vec[0]; | ^^^^^^ | | | cannot move out of here - | help: consider using a reference instead: `&vec[0]` + | help: consider borrowing here: `&vec[0]` error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice - --> $DIR/borrowck-vec-pattern-nesting.rs:55:14 - | -LL | &mut [ - | ______________^ -LL | | -LL | | _b] => {} - | |__________--^ cannot move out of here - | | - | hint: to prevent move, use `ref _b` or `ref mut _b` + --> $DIR/borrowck-vec-pattern-nesting.rs:55:11 + | +LL | match vec { + | ^^^ cannot move out of here +... +LL | _b] => {} + | -- data moved here + | +note: move occurs because `_b` has type `std::boxed::Box`, which does not implement the `Copy` trait + --> $DIR/borrowck-vec-pattern-nesting.rs:60:10 + | +LL | _b] => {} + | ^^ +help: consider removing the `&mut` + | +LL | [ +LL | +LL | _b] => {} + | error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice - --> $DIR/borrowck-vec-pattern-nesting.rs:60:13 + --> $DIR/borrowck-vec-pattern-nesting.rs:65:13 | LL | let a = vec[0]; | ^^^^^^ | | | cannot move out of here - | help: consider using a reference instead: `&vec[0]` + | help: consider borrowing here: `&vec[0]` error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice - --> $DIR/borrowck-vec-pattern-nesting.rs:68:14 + --> $DIR/borrowck-vec-pattern-nesting.rs:73:11 + | +LL | match vec { + | ^^^ cannot move out of here +... +LL | &mut [_a, _b, _c] => {} + | ----------------- + | | | | | + | | | | ...and here + | | | ...and here + | | data moved here + | help: consider removing the `&mut`: `[_a, _b, _c]` + | +note: move occurs because these variables have types that don't implement the `Copy` trait + --> $DIR/borrowck-vec-pattern-nesting.rs:76:15 | LL | &mut [_a, _b, _c] => {} - | ^--^^--^^--^ - | || | | - | || | ...and here (use `ref _c` or `ref mut _c`) - | || ...and here (use `ref _b` or `ref mut _b`) - | |hint: to prevent move, use `ref _a` or `ref mut _a` - | cannot move out of here + | ^^ ^^ ^^ error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice - --> $DIR/borrowck-vec-pattern-nesting.rs:72:13 + --> $DIR/borrowck-vec-pattern-nesting.rs:84:13 | LL | let a = vec[0]; | ^^^^^^ | | | cannot move out of here - | help: consider using a reference instead: `&vec[0]` + | help: consider borrowing here: `&vec[0]` error: aborting due to 8 previous errors -Some errors occurred: E0506, E0508. +Some errors have detailed explanations: E0506, E0508. For more information about an error, try `rustc --explain E0506`. diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.nll.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.nll.stderr deleted file mode 100644 index c1290a6f63..0000000000 --- a/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0515]: cannot return value referencing local variable `vec` - --> $DIR/borrowck-vec-pattern-tail-element-loan.rs:10:5 - | -LL | let vec: &[isize] = &vec; - | ---- `vec` is borrowed here -... -LL | tail - | ^^^^ returns a value referencing data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.rs b/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.rs index b18052a689..e602e75886 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.rs +++ b/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.rs @@ -2,12 +2,12 @@ fn a<'a>() -> &'a isize { let vec = vec![1, 2, 3, 4]; - let vec: &[isize] = &vec; //~ ERROR `vec` does not live long enough + let vec: &[isize] = &vec; let tail = match vec { &[_a, ref tail..] => &tail[0], _ => panic!("foo") }; - tail + tail //~ ERROR cannot return value referencing local variable `vec` } fn main() { diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.stderr index 0a5f773159..c1290a6f63 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.stderr @@ -1,18 +1,12 @@ -error[E0597]: `vec` does not live long enough - --> $DIR/borrowck-vec-pattern-tail-element-loan.rs:5:26 +error[E0515]: cannot return value referencing local variable `vec` + --> $DIR/borrowck-vec-pattern-tail-element-loan.rs:10:5 | LL | let vec: &[isize] = &vec; - | ^^^ borrowed value does not live long enough + | ---- `vec` is borrowed here ... -LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 3:6... - --> $DIR/borrowck-vec-pattern-tail-element-loan.rs:3:6 - | -LL | fn a<'a>() -> &'a isize { - | ^^ +LL | tail + | ^^^^ returns a value referencing data owned by the current function error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/borrowck/borrowck-while-break.nll.stderr b/src/test/ui/borrowck/borrowck-while-break.nll.stderr deleted file mode 100644 index 0fe3cdc96a..0000000000 --- a/src/test/ui/borrowck/borrowck-while-break.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0381]: borrow of possibly uninitialized variable: `v` - --> $DIR/borrowck-while-break.rs:7:20 - | -LL | println!("{}", v); - | ^ use of possibly uninitialized `v` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/borrowck-while-break.rs b/src/test/ui/borrowck/borrowck-while-break.rs index 293760efba..e16bc58656 100644 --- a/src/test/ui/borrowck/borrowck-while-break.rs +++ b/src/test/ui/borrowck/borrowck-while-break.rs @@ -4,7 +4,7 @@ fn test(cond: bool) { v = 3; break; } - println!("{}", v); //~ ERROR use of possibly uninitialized variable: `v` + println!("{}", v); //~ ERROR borrow of possibly uninitialized variable: `v` } fn main() { diff --git a/src/test/ui/borrowck/borrowck-while-break.stderr b/src/test/ui/borrowck/borrowck-while-break.stderr index 55969b8fb1..0fe3cdc96a 100644 --- a/src/test/ui/borrowck/borrowck-while-break.stderr +++ b/src/test/ui/borrowck/borrowck-while-break.stderr @@ -1,4 +1,4 @@ -error[E0381]: use of possibly uninitialized variable: `v` +error[E0381]: borrow of possibly uninitialized variable: `v` --> $DIR/borrowck-while-break.rs:7:20 | LL | println!("{}", v); diff --git a/src/test/ui/borrowck/immutable-arg.rs b/src/test/ui/borrowck/immutable-arg.rs index 5a5e619ef3..2352d1bbe6 100644 --- a/src/test/ui/borrowck/immutable-arg.rs +++ b/src/test/ui/borrowck/immutable-arg.rs @@ -1,10 +1,6 @@ -//compile-flags: -Z borrowck=compare - fn foo(_x: u32) { _x = 4; - //~^ ERROR cannot assign to immutable argument `_x` (Mir) - //~^^ ERROR cannot assign twice to immutable variable `_x` (Ast) + //~^ ERROR cannot assign to immutable argument `_x` } fn main() {} - diff --git a/src/test/ui/borrowck/immutable-arg.stderr b/src/test/ui/borrowck/immutable-arg.stderr index 8b21e92666..7255ca327e 100644 --- a/src/test/ui/borrowck/immutable-arg.stderr +++ b/src/test/ui/borrowck/immutable-arg.stderr @@ -1,19 +1,11 @@ -error[E0384]: cannot assign twice to immutable variable `_x` (Ast) - --> $DIR/immutable-arg.rs:4:5 - | -LL | fn foo(_x: u32) { - | -- first assignment to `_x` -LL | _x = 4; - | ^^^^^^ cannot assign twice to immutable variable - -error[E0384]: cannot assign to immutable argument `_x` (Mir) - --> $DIR/immutable-arg.rs:4:5 +error[E0384]: cannot assign to immutable argument `_x` + --> $DIR/immutable-arg.rs:2:5 | LL | fn foo(_x: u32) { | -- help: make this binding mutable: `mut _x` LL | _x = 4; | ^^^^^^ cannot assign to immutable argument -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/borrowck/index-mut-help-with-impl.nll.stderr b/src/test/ui/borrowck/index-mut-help-with-impl.nll.stderr deleted file mode 100644 index 4b29beb02b..0000000000 --- a/src/test/ui/borrowck/index-mut-help-with-impl.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/index-mut-help-with-impl.rs:9:5 - | -LL | Index::index(&v, 1..2).make_ascii_uppercase(); - | ^^^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable - | - = help: trait `IndexMut` is required to modify indexed content - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/borrowck/index-mut-help-with-impl.stderr b/src/test/ui/borrowck/index-mut-help-with-impl.stderr index 6e6efc6706..4b29beb02b 100644 --- a/src/test/ui/borrowck/index-mut-help-with-impl.stderr +++ b/src/test/ui/borrowck/index-mut-help-with-impl.stderr @@ -1,8 +1,10 @@ -error[E0596]: cannot borrow immutable borrowed content as mutable +error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/index-mut-help-with-impl.rs:9:5 | LL | Index::index(&v, 1..2).make_ascii_uppercase(); | ^^^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable + | + = help: trait `IndexMut` is required to modify indexed content error: aborting due to previous error diff --git a/src/test/ui/borrowck/index-mut-help.nll.stderr b/src/test/ui/borrowck/index-mut-help.nll.stderr deleted file mode 100644 index 92b94209c4..0000000000 --- a/src/test/ui/borrowck/index-mut-help.nll.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/index-mut-help.rs:11:5 - | -LL | map["peter"].clear(); - | ^^^^^^^^^^^^ cannot borrow as mutable - | - = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `std::collections::HashMap<&str, std::string::String>` - -error[E0594]: cannot assign to data in a `&` reference - --> $DIR/index-mut-help.rs:12:5 - | -LL | map["peter"] = "0".to_string(); - | ^^^^^^^^^^^^ cannot assign - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/index-mut-help.rs:13:13 - | -LL | let _ = &mut map["peter"]; - | ^^^^^^^^^^^^^^^^^ cannot borrow as mutable - | - = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `std::collections::HashMap<&str, std::string::String>` - -error: aborting due to 3 previous errors - -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. diff --git a/src/test/ui/borrowck/index-mut-help.stderr b/src/test/ui/borrowck/index-mut-help.stderr index 434dd11eea..fbc427a6e6 100644 --- a/src/test/ui/borrowck/index-mut-help.stderr +++ b/src/test/ui/borrowck/index-mut-help.stderr @@ -1,4 +1,4 @@ -error[E0596]: cannot borrow immutable indexed content as mutable +error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/index-mut-help.rs:11:5 | LL | map["peter"].clear(); @@ -6,23 +6,20 @@ LL | map["peter"].clear(); | = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `std::collections::HashMap<&str, std::string::String>` -error[E0594]: cannot assign to immutable indexed content +error[E0594]: cannot assign to data in a `&` reference --> $DIR/index-mut-help.rs:12:5 | LL | map["peter"] = "0".to_string(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable - | - = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `std::collections::HashMap<&str, std::string::String>` + | ^^^^^^^^^^^^ cannot assign -error[E0596]: cannot borrow immutable indexed content as mutable - --> $DIR/index-mut-help.rs:13:18 +error[E0596]: cannot borrow data in a `&` reference as mutable + --> $DIR/index-mut-help.rs:13:13 | LL | let _ = &mut map["peter"]; - | ^^^^^^^^^^^^ cannot borrow as mutable + | ^^^^^^^^^^^^^^^^^ cannot borrow as mutable | = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `std::collections::HashMap<&str, std::string::String>` error: aborting due to 3 previous errors -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/borrowck/issue-10876.rs b/src/test/ui/borrowck/issue-10876.rs index d8fff5f177..20ab905fec 100644 --- a/src/test/ui/borrowck/issue-10876.rs +++ b/src/test/ui/borrowck/issue-10876.rs @@ -1,7 +1,5 @@ // run-pass -#![feature(nll)] - enum Nat { S(Box), Z diff --git a/src/test/ui/borrowck/issue-41962.rs b/src/test/ui/borrowck/issue-41962.rs index 2bcc074542..38a01b138e 100644 --- a/src/test/ui/borrowck/issue-41962.rs +++ b/src/test/ui/borrowck/issue-41962.rs @@ -1,13 +1,9 @@ -// compile-flags: -Z borrowck=compare - pub fn main(){ let maybe = Some(vec![true, true]); loop { if let Some(thing) = maybe { } - //~^^ ERROR use of partially moved value: `maybe` (Ast) [E0382] - //~| ERROR use of moved value: `(maybe as std::prelude::v1::Some).0` (Ast) [E0382] - //~| ERROR use of moved value (Mir) [E0382] + //~^^ ERROR use of moved value [E0382] } } diff --git a/src/test/ui/borrowck/issue-41962.stderr b/src/test/ui/borrowck/issue-41962.stderr index fd4d318b5d..422d1605aa 100644 --- a/src/test/ui/borrowck/issue-41962.stderr +++ b/src/test/ui/borrowck/issue-41962.stderr @@ -1,29 +1,11 @@ -error[E0382]: use of partially moved value: `maybe` (Ast) - --> $DIR/issue-41962.rs:7:30 - | -LL | if let Some(thing) = maybe { - | ----- ^^^^^ value used here after move - | | - | value moved here - | - = note: move occurs because the value has type `std::vec::Vec`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `(maybe as std::prelude::v1::Some).0` (Ast) - --> $DIR/issue-41962.rs:7:21 - | -LL | if let Some(thing) = maybe { - | ^^^^^ value moved here in previous iteration of loop - | - = note: move occurs because the value has type `std::vec::Vec`, which does not implement the `Copy` trait - -error[E0382]: use of moved value (Mir) - --> $DIR/issue-41962.rs:7:21 +error[E0382]: use of moved value + --> $DIR/issue-41962.rs:5:21 | LL | if let Some(thing) = maybe { | ^^^^^ value moved here, in previous iteration of loop | = note: move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait -error: aborting due to 3 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/issue-45983.ast.stderr b/src/test/ui/borrowck/issue-45983.ast.stderr deleted file mode 100644 index 9cb83c92ca..0000000000 --- a/src/test/ui/borrowck/issue-45983.ast.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: borrowed data cannot be stored outside of its closure - --> $DIR/issue-45983.rs:26:27 - | -LL | let x = None; - | - borrowed data cannot be stored into here... -LL | give_any(|y| x = Some(y)); - | --- ^ cannot be stored outside of its closure - | | - | ...because it cannot outlive this closure - -error: aborting due to previous error - diff --git a/src/test/ui/borrowck/issue-45983.migrate.stderr b/src/test/ui/borrowck/issue-45983.migrate.stderr index 9cb83c92ca..3a6b2f69a1 100644 --- a/src/test/ui/borrowck/issue-45983.migrate.stderr +++ b/src/test/ui/borrowck/issue-45983.migrate.stderr @@ -1,5 +1,5 @@ error: borrowed data cannot be stored outside of its closure - --> $DIR/issue-45983.rs:26:27 + --> $DIR/issue-45983.rs:19:27 | LL | let x = None; | - borrowed data cannot be stored into here... diff --git a/src/test/ui/borrowck/issue-45983.nll.stderr b/src/test/ui/borrowck/issue-45983.nll.stderr index 0a03858d56..94360b65ff 100644 --- a/src/test/ui/borrowck/issue-45983.nll.stderr +++ b/src/test/ui/borrowck/issue-45983.nll.stderr @@ -1,5 +1,5 @@ error[E0521]: borrowed data escapes outside of closure - --> $DIR/issue-45983.rs:26:18 + --> $DIR/issue-45983.rs:19:18 | LL | let x = None; | - `x` is declared here, outside of the closure body @@ -9,7 +9,7 @@ LL | give_any(|y| x = Some(y)); | `y` is a reference that is only valid in the closure body error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/issue-45983.rs:26:18 + --> $DIR/issue-45983.rs:19:18 | LL | let x = None; | - help: consider changing this to be mutable: `mut x` @@ -18,5 +18,3 @@ LL | give_any(|y| x = Some(y)); error: aborting due to 2 previous errors -Some errors occurred: E0521, E0594. -For more information about an error, try `rustc --explain E0521`. diff --git a/src/test/ui/borrowck/issue-45983.rs b/src/test/ui/borrowck/issue-45983.rs index 4dac67d9ae..a2656f5939 100644 --- a/src/test/ui/borrowck/issue-45983.rs +++ b/src/test/ui/borrowck/issue-45983.rs @@ -1,21 +1,14 @@ // As documented in Issue #45983, this test is evaluating the quality // of our diagnostics on erroneous code using higher-ranked closures. -// -// However, as documented on Issue #53026, this test also became a -// prime example of our need to test the NLL migration mode -// *separately* from the existing test suites that focus solely on -// AST-borrwock and NLL. -// revisions: ast migrate nll +// revisions: migrate nll // Since we are testing nll (and migration) explicitly as a separate // revisions, don't worry about the --compare-mode=nll on this test. // ignore-compare-mode-nll -//[ast]compile-flags: -Z borrowck=ast -//[migrate]compile-flags: -Z borrowck=migrate -Z two-phase-borrows -//[nll]compile-flags: -Z borrowck=mir -Z two-phase-borrows +//[nll]compile-flags: -Z borrowck=mir fn give_any FnOnce(&'r ())>(f: F) { f(&()); @@ -24,8 +17,7 @@ fn give_any FnOnce(&'r ())>(f: F) { fn main() { let x = None; give_any(|y| x = Some(y)); - //[ast]~^ ERROR borrowed data cannot be stored outside of its closure - //[migrate]~^^ ERROR borrowed data cannot be stored outside of its closure - //[nll]~^^^ ERROR borrowed data escapes outside of closure + //[migrate]~^ ERROR borrowed data cannot be stored outside of its closure + //[nll]~^^ ERROR borrowed data escapes outside of closure //[nll]~| ERROR cannot assign to `x`, as it is not declared as mutable } diff --git a/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.nll.stderr b/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.nll.stderr deleted file mode 100644 index eb71ab0b7e..0000000000 --- a/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0507]: cannot move out of static item - --> $DIR/issue-47215-ice-from-drop-elab.rs:17:21 - | -LL | let mut x = X; - | ^ - | | - | cannot move out of static item - | help: consider borrowing here: `&X` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.rs b/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.rs index 7477947b89..48dd14c497 100644 --- a/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.rs +++ b/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.rs @@ -14,7 +14,7 @@ static mut X: ::std::sync::atomic::AtomicUsize = ::std::sync::atomic::AtomicUsiz fn main() { unsafe { - let mut x = X; //~ ERROR cannot move out of thread-local static item [E0507] + let mut x = X; //~ ERROR cannot move out of static item [E0507] let _y = x.get_mut(); } } diff --git a/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.stderr b/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.stderr index b09028e6c7..eb71ab0b7e 100644 --- a/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.stderr +++ b/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.stderr @@ -1,11 +1,11 @@ -error[E0507]: cannot move out of thread-local static item +error[E0507]: cannot move out of static item --> $DIR/issue-47215-ice-from-drop-elab.rs:17:21 | LL | let mut x = X; | ^ | | - | cannot move out of thread-local static item - | help: consider using a reference instead: `&X` + | cannot move out of static item + | help: consider borrowing here: `&X` error: aborting due to previous error diff --git a/src/test/ui/borrowck/issue-51117.nll.stderr b/src/test/ui/borrowck/issue-51117.nll.stderr deleted file mode 100644 index f8a9608ad3..0000000000 --- a/src/test/ui/borrowck/issue-51117.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0499]: cannot borrow `*bar` as mutable more than once at a time - --> $DIR/issue-51117.rs:10:13 - | -LL | Some(baz) => { - | --- first mutable borrow occurs here -LL | bar.take(); - | ^^^ second mutable borrow occurs here -LL | drop(baz); - | --- first borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/issue-51117.stderr b/src/test/ui/borrowck/issue-51117.stderr index 8f2a78672c..f8a9608ad3 100644 --- a/src/test/ui/borrowck/issue-51117.stderr +++ b/src/test/ui/borrowck/issue-51117.stderr @@ -5,9 +5,8 @@ LL | Some(baz) => { | --- first mutable borrow occurs here LL | bar.take(); | ^^^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here +LL | drop(baz); + | --- first borrow later used here error: aborting due to previous error diff --git a/src/test/ui/borrowck/issue-51348-multi-ref-mut-in-guard.rs b/src/test/ui/borrowck/issue-51348-multi-ref-mut-in-guard.rs index a8bfdbad38..7d5acb9575 100644 --- a/src/test/ui/borrowck/issue-51348-multi-ref-mut-in-guard.rs +++ b/src/test/ui/borrowck/issue-51348-multi-ref-mut-in-guard.rs @@ -8,8 +8,6 @@ // run-pass -#![feature(nll)] - fn foo(x: &mut Result<(u32, u32), (u32, u32)>) -> u32 { match *x { Ok((ref mut v, _)) | Err((_, ref mut v)) if *v > 0 => { *v } diff --git a/src/test/ui/borrowck/issue-51415.nll.stderr b/src/test/ui/borrowck/issue-51415.nll.stderr deleted file mode 100644 index b025374257..0000000000 --- a/src/test/ui/borrowck/issue-51415.nll.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/issue-51415.rs:6:42 - | -LL | let opt = a.iter().enumerate().find(|(_, &s)| { - | ^^^^^-^ - | | | - | | data moved here - | cannot move out of borrowed content - | -note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/issue-51415.rs:6:47 - | -LL | let opt = a.iter().enumerate().find(|(_, &s)| { - | ^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/issue-51415.stderr b/src/test/ui/borrowck/issue-51415.stderr index 895c35e4e7..b025374257 100644 --- a/src/test/ui/borrowck/issue-51415.stderr +++ b/src/test/ui/borrowck/issue-51415.stderr @@ -1,11 +1,17 @@ error[E0507]: cannot move out of borrowed content - --> $DIR/issue-51415.rs:6:46 + --> $DIR/issue-51415.rs:6:42 | LL | let opt = a.iter().enumerate().find(|(_, &s)| { - | ^- - | || - | |hint: to prevent move, use `ref s` or `ref mut s` - | cannot move out of borrowed content + | ^^^^^-^ + | | | + | | data moved here + | cannot move out of borrowed content + | +note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait + --> $DIR/issue-51415.rs:6:47 + | +LL | let opt = a.iter().enumerate().find(|(_, &s)| { + | ^ error: aborting due to previous error diff --git a/src/test/ui/borrowck/issue-52713-bug.rs b/src/test/ui/borrowck/issue-52713-bug.rs index 460e6b4bba..671e83dfad 100644 --- a/src/test/ui/borrowck/issue-52713-bug.rs +++ b/src/test/ui/borrowck/issue-52713-bug.rs @@ -2,8 +2,6 @@ // computing liveness that wound up accidentally causing the program // below to be accepted. -#![feature(nll)] - fn foo<'a>(x: &'a mut u32) -> u32 { let mut x = 22; let y = &x; diff --git a/src/test/ui/borrowck/issue-52713-bug.stderr b/src/test/ui/borrowck/issue-52713-bug.stderr index e3216f5d33..4abb6fb2c7 100644 --- a/src/test/ui/borrowck/issue-52713-bug.stderr +++ b/src/test/ui/borrowck/issue-52713-bug.stderr @@ -1,5 +1,5 @@ error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/issue-52713-bug.rs:14:5 + --> $DIR/issue-52713-bug.rs:12:5 | LL | let y = &x; | -- borrow of `x` occurs here diff --git a/src/test/ui/borrowck/issue-52967-edition-2018-needs-two-phase-borrows.rs b/src/test/ui/borrowck/issue-52967-edition-2018-needs-two-phase-borrows.rs index dcf047c545..fc8a075540 100644 --- a/src/test/ui/borrowck/issue-52967-edition-2018-needs-two-phase-borrows.rs +++ b/src/test/ui/borrowck/issue-52967-edition-2018-needs-two-phase-borrows.rs @@ -2,9 +2,8 @@ // the initial deployment of NLL for the 2018 edition, I forgot to // turn on two-phase-borrows in addition to `-Z borrowck=migrate`. -// revisions: ast zflags edition -//[zflags]compile-flags: -Z borrowck=migrate -Z two-phase-borrows -//[edition]edition:2018 +// revisions: edition2015 edition2018 +//[edition2018]edition:2018 // run-pass diff --git a/src/test/ui/borrowck/issue-54499-field-mutation-marks-mut-as-used.ast.stderr b/src/test/ui/borrowck/issue-54499-field-mutation-marks-mut-as-used.ast.stderr deleted file mode 100644 index d72cc20971..0000000000 --- a/src/test/ui/borrowck/issue-54499-field-mutation-marks-mut-as-used.ast.stderr +++ /dev/null @@ -1,39 +0,0 @@ -error[E0381]: use of possibly uninitialized variable: `t.0` - --> $DIR/issue-54499-field-mutation-marks-mut-as-used.rs:25:31 - | -LL | println!("{:?} {:?}", t.0, t.1); - | ^^^ use of possibly uninitialized `t.0` - -error[E0381]: use of possibly uninitialized variable: `t.1` - --> $DIR/issue-54499-field-mutation-marks-mut-as-used.rs:25:36 - | -LL | println!("{:?} {:?}", t.0, t.1); - | ^^^ use of possibly uninitialized `t.1` - -error[E0381]: use of possibly uninitialized variable: `u.0` - --> $DIR/issue-54499-field-mutation-marks-mut-as-used.rs:35:31 - | -LL | println!("{:?} {:?}", u.0, u.1); - | ^^^ use of possibly uninitialized `u.0` - -error[E0381]: use of possibly uninitialized variable: `u.1` - --> $DIR/issue-54499-field-mutation-marks-mut-as-used.rs:35:36 - | -LL | println!("{:?} {:?}", u.0, u.1); - | ^^^ use of possibly uninitialized `u.1` - -error[E0381]: use of possibly uninitialized variable: `v.x` - --> $DIR/issue-54499-field-mutation-marks-mut-as-used.rs:45:31 - | -LL | println!("{:?} {:?}", v.x, v.y); - | ^^^ use of possibly uninitialized `v.x` - -error[E0381]: use of possibly uninitialized variable: `v.y` - --> $DIR/issue-54499-field-mutation-marks-mut-as-used.rs:45:36 - | -LL | println!("{:?} {:?}", v.x, v.y); - | ^^^ use of possibly uninitialized `v.y` - -error: aborting due to 6 previous errors - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/issue-54499-field-mutation-marks-mut-as-used.rs b/src/test/ui/borrowck/issue-54499-field-mutation-marks-mut-as-used.rs index 4358e8e440..8d8ac279b2 100644 --- a/src/test/ui/borrowck/issue-54499-field-mutation-marks-mut-as-used.rs +++ b/src/test/ui/borrowck/issue-54499-field-mutation-marks-mut-as-used.rs @@ -1,13 +1,3 @@ -// revisions: ast nll - -// Since we are testing nll migration explicitly as a separate -// revision, don't worry about the --compare-mode=nll on this test. - -// ignore-compare-mode-nll - -//[ast]compile-flags: -Z borrowck=ast -//[nll]compile-flags: -Z borrowck=migrate -Z two-phase-borrows - #![warn(unused)] #[derive(Debug)] struct S(i32); @@ -20,30 +10,24 @@ fn main() { { let mut t: Tuple; t.0 = S(1); - //[nll]~^ ERROR assign to part of possibly uninitialized variable: `t` [E0381] + //~^ ERROR assign to part of possibly uninitialized variable: `t` [E0381] t.1 = 2; println!("{:?} {:?}", t.0, t.1); - //[ast]~^ ERROR use of possibly uninitialized variable: `t.0` [E0381] - //[ast]~| ERROR use of possibly uninitialized variable: `t.1` [E0381] } { let mut u: Tpair; u.0 = S(1); - //[nll]~^ ERROR assign to part of possibly uninitialized variable: `u` [E0381] + //~^ ERROR assign to part of possibly uninitialized variable: `u` [E0381] u.1 = 2; println!("{:?} {:?}", u.0, u.1); - //[ast]~^ ERROR use of possibly uninitialized variable: `u.0` [E0381] - //[ast]~| ERROR use of possibly uninitialized variable: `u.1` [E0381] } { let mut v: Spair; v.x = S(1); - //[nll]~^ ERROR assign to part of possibly uninitialized variable: `v` [E0381] + //~^ ERROR assign to part of possibly uninitialized variable: `v` [E0381] v.y = 2; println!("{:?} {:?}", v.x, v.y); - //[ast]~^ ERROR use of possibly uninitialized variable: `v.x` [E0381] - //[ast]~| ERROR use of possibly uninitialized variable: `v.y` [E0381] } } diff --git a/src/test/ui/borrowck/issue-54499-field-mutation-marks-mut-as-used.nll.stderr b/src/test/ui/borrowck/issue-54499-field-mutation-marks-mut-as-used.stderr similarity index 75% rename from src/test/ui/borrowck/issue-54499-field-mutation-marks-mut-as-used.nll.stderr rename to src/test/ui/borrowck/issue-54499-field-mutation-marks-mut-as-used.stderr index ebc6c7fca6..6f18ff1613 100644 --- a/src/test/ui/borrowck/issue-54499-field-mutation-marks-mut-as-used.nll.stderr +++ b/src/test/ui/borrowck/issue-54499-field-mutation-marks-mut-as-used.stderr @@ -1,17 +1,17 @@ error[E0381]: assign to part of possibly uninitialized variable: `t` - --> $DIR/issue-54499-field-mutation-marks-mut-as-used.rs:22:9 + --> $DIR/issue-54499-field-mutation-marks-mut-as-used.rs:12:9 | LL | t.0 = S(1); | ^^^^^^^^^^ use of possibly uninitialized `t` error[E0381]: assign to part of possibly uninitialized variable: `u` - --> $DIR/issue-54499-field-mutation-marks-mut-as-used.rs:32:9 + --> $DIR/issue-54499-field-mutation-marks-mut-as-used.rs:20:9 | LL | u.0 = S(1); | ^^^^^^^^^^ use of possibly uninitialized `u` error[E0381]: assign to part of possibly uninitialized variable: `v` - --> $DIR/issue-54499-field-mutation-marks-mut-as-used.rs:42:9 + --> $DIR/issue-54499-field-mutation-marks-mut-as-used.rs:28:9 | LL | v.x = S(1); | ^^^^^^^^^^ use of possibly uninitialized `v` diff --git a/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out-with-mut.ast.stderr b/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out-with-mut.ast.stderr deleted file mode 100644 index 4f845d87aa..0000000000 --- a/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out-with-mut.ast.stderr +++ /dev/null @@ -1,69 +0,0 @@ -error[E0382]: use of moved value: `t.0` - --> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:26:31 - | -LL | drop(t); - | - value moved here -... -LL | println!("{:?} {:?}", t.0, t.1); - | ^^^ value used here after move - | - = note: move occurs because `t` has type `(S, i32)`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `t.1` - --> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:26:36 - | -LL | drop(t); - | - value moved here -... -LL | println!("{:?} {:?}", t.0, t.1); - | ^^^ value used here after move - | - = note: move occurs because `t` has type `(S, i32)`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `u.0` - --> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:37:31 - | -LL | drop(u); - | - value moved here -... -LL | println!("{:?} {:?}", u.0, u.1); - | ^^^ value used here after move - | - = note: move occurs because `u` has type `Tpair`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `u.1` - --> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:37:36 - | -LL | drop(u); - | - value moved here -... -LL | println!("{:?} {:?}", u.0, u.1); - | ^^^ value used here after move - | - = note: move occurs because `u` has type `Tpair`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `v.x` - --> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:48:31 - | -LL | drop(v); - | - value moved here -... -LL | println!("{:?} {:?}", v.x, v.y); - | ^^^ value used here after move - | - = note: move occurs because `v` has type `Spair`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `v.y` - --> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:48:36 - | -LL | drop(v); - | - value moved here -... -LL | println!("{:?} {:?}", v.x, v.y); - | ^^^ value used here after move - | - = note: move occurs because `v` has type `Spair`, which does not implement the `Copy` trait - -error: aborting due to 6 previous errors - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out-with-mut.rs b/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out-with-mut.rs index 358a5dd1cb..f7fb2fd4da 100644 --- a/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out-with-mut.rs +++ b/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out-with-mut.rs @@ -1,13 +1,3 @@ -// revisions: ast nll - -// Since we are testing nll migration explicitly as a separate -// revision, don't worry about the --compare-mode=nll on this test. - -// ignore-compare-mode-nll - -//[ast]compile-flags: -Z borrowck=ast -//[nll]compile-flags: -Z borrowck=migrate -Z two-phase-borrows - #![warn(unused)] #[derive(Debug)] struct S(i32); @@ -21,32 +11,26 @@ fn main() { let mut t: Tuple = (S(0), 0); drop(t); t.0 = S(1); - //[nll]~^ ERROR assign to part of moved value + //~^ ERROR assign to part of moved value t.1 = 2; println!("{:?} {:?}", t.0, t.1); - //[ast]~^ ERROR use of moved value - //[ast]~^^ ERROR use of moved value } { let mut u: Tpair = Tpair(S(0), 0); drop(u); u.0 = S(1); - //[nll]~^ ERROR assign to part of moved value + //~^ ERROR assign to part of moved value u.1 = 2; println!("{:?} {:?}", u.0, u.1); - //[ast]~^ ERROR use of moved value - //[ast]~^^ ERROR use of moved value } { let mut v: Spair = Spair { x: S(0), y: 0 }; drop(v); v.x = S(1); - //[nll]~^ ERROR assign to part of moved value + //~^ ERROR assign to part of moved value v.y = 2; println!("{:?} {:?}", v.x, v.y); - //[ast]~^ ERROR use of moved value - //[ast]~^^ ERROR use of moved value } } diff --git a/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out-with-mut.nll.stderr b/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out-with-mut.stderr similarity index 94% rename from src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out-with-mut.nll.stderr rename to src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out-with-mut.stderr index 42aa038170..b188766e22 100644 --- a/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out-with-mut.nll.stderr +++ b/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out-with-mut.stderr @@ -1,5 +1,5 @@ error[E0382]: assign to part of moved value: `t` - --> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:23:9 + --> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:13:9 | LL | let mut t: Tuple = (S(0), 0); | ----- move occurs because `t` has type `(S, i32)`, which does not implement the `Copy` trait @@ -9,7 +9,7 @@ LL | t.0 = S(1); | ^^^^^^^^^^ value partially assigned here after move error[E0382]: assign to part of moved value: `u` - --> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:34:9 + --> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:22:9 | LL | let mut u: Tpair = Tpair(S(0), 0); | ----- move occurs because `u` has type `Tpair`, which does not implement the `Copy` trait @@ -19,7 +19,7 @@ LL | u.0 = S(1); | ^^^^^^^^^^ value partially assigned here after move error[E0382]: assign to part of moved value: `v` - --> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:45:9 + --> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:31:9 | LL | let mut v: Spair = Spair { x: S(0), y: 0 }; | ----- move occurs because `v` has type `Spair`, which does not implement the `Copy` trait diff --git a/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.ast.stderr b/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.ast.stderr deleted file mode 100644 index 565272af39..0000000000 --- a/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.ast.stderr +++ /dev/null @@ -1,124 +0,0 @@ -error[E0594]: cannot assign to field `t.0` of immutable binding - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:23:9 - | -LL | let t: Tuple = (S(0), 0); - | - help: make this binding mutable: `mut t` -LL | drop(t); -LL | t.0 = S(1); - | ^^^^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0594]: cannot assign to field `t.1` of immutable binding - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:27:9 - | -LL | let t: Tuple = (S(0), 0); - | - help: make this binding mutable: `mut t` -... -LL | t.1 = 2; - | ^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0594]: cannot assign to field `u.0` of immutable binding - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:38:9 - | -LL | let u: Tpair = Tpair(S(0), 0); - | - help: make this binding mutable: `mut u` -LL | drop(u); -LL | u.0 = S(1); - | ^^^^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0594]: cannot assign to field `u.1` of immutable binding - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:42:9 - | -LL | let u: Tpair = Tpair(S(0), 0); - | - help: make this binding mutable: `mut u` -... -LL | u.1 = 2; - | ^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0594]: cannot assign to field `v.x` of immutable binding - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:53:9 - | -LL | let v: Spair = Spair { x: S(0), y: 0 }; - | - help: make this binding mutable: `mut v` -LL | drop(v); -LL | v.x = S(1); - | ^^^^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0594]: cannot assign to field `v.y` of immutable binding - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:57:9 - | -LL | let v: Spair = Spair { x: S(0), y: 0 }; - | - help: make this binding mutable: `mut v` -... -LL | v.y = 2; - | ^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0382]: use of moved value: `t.0` - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:30:31 - | -LL | drop(t); - | - value moved here -... -LL | println!("{:?} {:?}", t.0, t.1); - | ^^^ value used here after move - | - = note: move occurs because `t` has type `(S, i32)`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `t.1` - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:30:36 - | -LL | drop(t); - | - value moved here -... -LL | println!("{:?} {:?}", t.0, t.1); - | ^^^ value used here after move - | - = note: move occurs because `t` has type `(S, i32)`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `u.0` - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:45:31 - | -LL | drop(u); - | - value moved here -... -LL | println!("{:?} {:?}", u.0, u.1); - | ^^^ value used here after move - | - = note: move occurs because `u` has type `Tpair`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `u.1` - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:45:36 - | -LL | drop(u); - | - value moved here -... -LL | println!("{:?} {:?}", u.0, u.1); - | ^^^ value used here after move - | - = note: move occurs because `u` has type `Tpair`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `v.x` - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:60:31 - | -LL | drop(v); - | - value moved here -... -LL | println!("{:?} {:?}", v.x, v.y); - | ^^^ value used here after move - | - = note: move occurs because `v` has type `Spair`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `v.y` - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:60:36 - | -LL | drop(v); - | - value moved here -... -LL | println!("{:?} {:?}", v.x, v.y); - | ^^^ value used here after move - | - = note: move occurs because `v` has type `Spair`, which does not implement the `Copy` trait - -error: aborting due to 12 previous errors - -Some errors occurred: E0382, E0594. -For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.rs b/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.rs index b19dcd65a6..498ca01e97 100644 --- a/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.rs +++ b/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.rs @@ -1,13 +1,3 @@ -// revisions: ast nll - -// Since we are testing nll migration explicitly as a separate -// revision, don't worry about the --compare-mode=nll on this test. - -// ignore-compare-mode-nll - -//[ast]compile-flags: -Z borrowck=ast -//[nll]compile-flags: -Z borrowck=migrate -Z two-phase-borrows - #![warn(unused)] #[derive(Debug)] struct S(i32); @@ -21,44 +11,32 @@ fn main() { let t: Tuple = (S(0), 0); drop(t); t.0 = S(1); - //[ast]~^ ERROR cannot assign to field `t.0` of immutable binding [E0594] - //[nll]~^^ ERROR assign to part of moved value: `t` [E0382] - //[nll]~| ERROR cannot assign to `t.0`, as `t` is not declared as mutable [E0594] + //~^ ERROR assign to part of moved value: `t` [E0382] + //~| ERROR cannot assign to `t.0`, as `t` is not declared as mutable [E0594] t.1 = 2; - //[ast]~^ ERROR cannot assign to field `t.1` of immutable binding [E0594] - //[nll]~^^ ERROR cannot assign to `t.1`, as `t` is not declared as mutable [E0594] + //~^ ERROR cannot assign to `t.1`, as `t` is not declared as mutable [E0594] println!("{:?} {:?}", t.0, t.1); - //[ast]~^ ERROR use of moved value: `t.0` [E0382] - //[ast]~| ERROR use of moved value: `t.1` [E0382] } { let u: Tpair = Tpair(S(0), 0); drop(u); u.0 = S(1); - //[ast]~^ ERROR cannot assign to field `u.0` of immutable binding [E0594] - //[nll]~^^ ERROR assign to part of moved value: `u` [E0382] - //[nll]~| ERROR cannot assign to `u.0`, as `u` is not declared as mutable [E0594] + //~^ ERROR assign to part of moved value: `u` [E0382] + //~| ERROR cannot assign to `u.0`, as `u` is not declared as mutable [E0594] u.1 = 2; - //[ast]~^ ERROR cannot assign to field `u.1` of immutable binding [E0594] - //[nll]~^^ ERROR cannot assign to `u.1`, as `u` is not declared as mutable [E0594] + //~^ ERROR cannot assign to `u.1`, as `u` is not declared as mutable [E0594] println!("{:?} {:?}", u.0, u.1); - //[ast]~^ ERROR use of moved value: `u.0` [E0382] - //[ast]~| ERROR use of moved value: `u.1` [E0382] } { let v: Spair = Spair { x: S(0), y: 0 }; drop(v); v.x = S(1); - //[ast]~^ ERROR cannot assign to field `v.x` of immutable binding [E0594] - //[nll]~^^ ERROR assign to part of moved value: `v` [E0382] - //[nll]~| ERROR cannot assign to `v.x`, as `v` is not declared as mutable [E0594] + //~^ ERROR assign to part of moved value: `v` [E0382] + //~| ERROR cannot assign to `v.x`, as `v` is not declared as mutable [E0594] v.y = 2; - //[ast]~^ ERROR cannot assign to field `v.y` of immutable binding [E0594] - //[nll]~^^ ERROR cannot assign to `v.y`, as `v` is not declared as mutable [E0594] + //~^ ERROR cannot assign to `v.y`, as `v` is not declared as mutable [E0594] println!("{:?} {:?}", v.x, v.y); - //[ast]~^ ERROR use of moved value: `v.x` [E0382] - //[ast]~| ERROR use of moved value: `v.y` [E0382] } } diff --git a/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.nll.stderr b/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.stderr similarity index 84% rename from src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.nll.stderr rename to src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.stderr index 1184907f30..7dfd71c81c 100644 --- a/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.nll.stderr +++ b/src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to `t.0`, as `t` is not declared as mutable - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:23:9 + --> $DIR/issue-54499-field-mutation-of-moved-out.rs:13:9 | LL | let t: Tuple = (S(0), 0); | - help: consider changing this to be mutable: `mut t` @@ -8,7 +8,7 @@ LL | t.0 = S(1); | ^^^^^^^^^^ cannot assign error[E0382]: assign to part of moved value: `t` - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:23:9 + --> $DIR/issue-54499-field-mutation-of-moved-out.rs:13:9 | LL | let t: Tuple = (S(0), 0); | - move occurs because `t` has type `(S, i32)`, which does not implement the `Copy` trait @@ -18,7 +18,7 @@ LL | t.0 = S(1); | ^^^^^^^^^^ value partially assigned here after move error[E0594]: cannot assign to `t.1`, as `t` is not declared as mutable - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:27:9 + --> $DIR/issue-54499-field-mutation-of-moved-out.rs:16:9 | LL | let t: Tuple = (S(0), 0); | - help: consider changing this to be mutable: `mut t` @@ -27,7 +27,7 @@ LL | t.1 = 2; | ^^^^^^^ cannot assign error[E0594]: cannot assign to `u.0`, as `u` is not declared as mutable - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:38:9 + --> $DIR/issue-54499-field-mutation-of-moved-out.rs:24:9 | LL | let u: Tpair = Tpair(S(0), 0); | - help: consider changing this to be mutable: `mut u` @@ -36,7 +36,7 @@ LL | u.0 = S(1); | ^^^^^^^^^^ cannot assign error[E0382]: assign to part of moved value: `u` - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:38:9 + --> $DIR/issue-54499-field-mutation-of-moved-out.rs:24:9 | LL | let u: Tpair = Tpair(S(0), 0); | - move occurs because `u` has type `Tpair`, which does not implement the `Copy` trait @@ -46,7 +46,7 @@ LL | u.0 = S(1); | ^^^^^^^^^^ value partially assigned here after move error[E0594]: cannot assign to `u.1`, as `u` is not declared as mutable - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:42:9 + --> $DIR/issue-54499-field-mutation-of-moved-out.rs:27:9 | LL | let u: Tpair = Tpair(S(0), 0); | - help: consider changing this to be mutable: `mut u` @@ -55,7 +55,7 @@ LL | u.1 = 2; | ^^^^^^^ cannot assign error[E0594]: cannot assign to `v.x`, as `v` is not declared as mutable - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:53:9 + --> $DIR/issue-54499-field-mutation-of-moved-out.rs:35:9 | LL | let v: Spair = Spair { x: S(0), y: 0 }; | - help: consider changing this to be mutable: `mut v` @@ -64,7 +64,7 @@ LL | v.x = S(1); | ^^^^^^^^^^ cannot assign error[E0382]: assign to part of moved value: `v` - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:53:9 + --> $DIR/issue-54499-field-mutation-of-moved-out.rs:35:9 | LL | let v: Spair = Spair { x: S(0), y: 0 }; | - move occurs because `v` has type `Spair`, which does not implement the `Copy` trait @@ -74,7 +74,7 @@ LL | v.x = S(1); | ^^^^^^^^^^ value partially assigned here after move error[E0594]: cannot assign to `v.y`, as `v` is not declared as mutable - --> $DIR/issue-54499-field-mutation-of-moved-out.rs:57:9 + --> $DIR/issue-54499-field-mutation-of-moved-out.rs:38:9 | LL | let v: Spair = Spair { x: S(0), y: 0 }; | - help: consider changing this to be mutable: `mut v` @@ -84,5 +84,4 @@ LL | v.y = 2; error: aborting due to 9 previous errors -Some errors occurred: E0382, E0594. -For more information about an error, try `rustc --explain E0382`. +For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/issue-54499-field-mutation-of-never-init.ast.stderr b/src/test/ui/borrowck/issue-54499-field-mutation-of-never-init.ast.stderr deleted file mode 100644 index ea6b63b7a2..0000000000 --- a/src/test/ui/borrowck/issue-54499-field-mutation-of-never-init.ast.stderr +++ /dev/null @@ -1,91 +0,0 @@ -error[E0594]: cannot assign to field `t.0` of immutable binding - --> $DIR/issue-54499-field-mutation-of-never-init.rs:22:9 - | -LL | let t: Tuple; - | - help: make this binding mutable: `mut t` -LL | t.0 = S(1); - | ^^^^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0594]: cannot assign to field `t.1` of immutable binding - --> $DIR/issue-54499-field-mutation-of-never-init.rs:25:9 - | -LL | let t: Tuple; - | - help: make this binding mutable: `mut t` -... -LL | t.1 = 2; - | ^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0594]: cannot assign to field `u.0` of immutable binding - --> $DIR/issue-54499-field-mutation-of-never-init.rs:34:9 - | -LL | let u: Tpair; - | - help: make this binding mutable: `mut u` -LL | u.0 = S(1); - | ^^^^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0594]: cannot assign to field `u.1` of immutable binding - --> $DIR/issue-54499-field-mutation-of-never-init.rs:37:9 - | -LL | let u: Tpair; - | - help: make this binding mutable: `mut u` -... -LL | u.1 = 2; - | ^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0594]: cannot assign to field `v.x` of immutable binding - --> $DIR/issue-54499-field-mutation-of-never-init.rs:46:9 - | -LL | let v: Spair; - | - help: make this binding mutable: `mut v` -LL | v.x = S(1); - | ^^^^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0594]: cannot assign to field `v.y` of immutable binding - --> $DIR/issue-54499-field-mutation-of-never-init.rs:49:9 - | -LL | let v: Spair; - | - help: make this binding mutable: `mut v` -... -LL | v.y = 2; - | ^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0381]: use of possibly uninitialized variable: `t.0` - --> $DIR/issue-54499-field-mutation-of-never-init.rs:27:31 - | -LL | println!("{:?} {:?}", t.0, t.1); - | ^^^ use of possibly uninitialized `t.0` - -error[E0381]: use of possibly uninitialized variable: `t.1` - --> $DIR/issue-54499-field-mutation-of-never-init.rs:27:36 - | -LL | println!("{:?} {:?}", t.0, t.1); - | ^^^ use of possibly uninitialized `t.1` - -error[E0381]: use of possibly uninitialized variable: `u.0` - --> $DIR/issue-54499-field-mutation-of-never-init.rs:39:31 - | -LL | println!("{:?} {:?}", u.0, u.1); - | ^^^ use of possibly uninitialized `u.0` - -error[E0381]: use of possibly uninitialized variable: `u.1` - --> $DIR/issue-54499-field-mutation-of-never-init.rs:39:36 - | -LL | println!("{:?} {:?}", u.0, u.1); - | ^^^ use of possibly uninitialized `u.1` - -error[E0381]: use of possibly uninitialized variable: `v.x` - --> $DIR/issue-54499-field-mutation-of-never-init.rs:51:31 - | -LL | println!("{:?} {:?}", v.x, v.y); - | ^^^ use of possibly uninitialized `v.x` - -error[E0381]: use of possibly uninitialized variable: `v.y` - --> $DIR/issue-54499-field-mutation-of-never-init.rs:51:36 - | -LL | println!("{:?} {:?}", v.x, v.y); - | ^^^ use of possibly uninitialized `v.y` - -error: aborting due to 12 previous errors - -Some errors occurred: E0381, E0594. -For more information about an error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/issue-54499-field-mutation-of-never-init.rs b/src/test/ui/borrowck/issue-54499-field-mutation-of-never-init.rs index 03eb9621ee..1a1b376bf9 100644 --- a/src/test/ui/borrowck/issue-54499-field-mutation-of-never-init.rs +++ b/src/test/ui/borrowck/issue-54499-field-mutation-of-never-init.rs @@ -1,13 +1,3 @@ -// revisions: ast nll - -// Since we are testing nll migration explicitly as a separate -// revision, don't worry about the --compare-mode=nll on this test. - -// ignore-compare-mode-nll - -//[ast]compile-flags: -Z borrowck=ast -//[nll]compile-flags: -Z borrowck=migrate -Z two-phase-borrows - #![warn(unused)] #[derive(Debug)] struct S(i32); @@ -20,36 +10,24 @@ fn main() { { let t: Tuple; t.0 = S(1); - //[ast]~^ ERROR cannot assign to field `t.0` of immutable binding [E0594] - //[nll]~^^ ERROR assign to part of possibly uninitialized variable: `t` [E0381] + //~^ ERROR assign to part of possibly uninitialized variable: `t` [E0381] t.1 = 2; - //[ast]~^ ERROR cannot assign to field `t.1` of immutable binding [E0594] println!("{:?} {:?}", t.0, t.1); - //[ast]~^ ERROR use of possibly uninitialized variable: `t.0` [E0381] - //[ast]~| ERROR use of possibly uninitialized variable: `t.1` [E0381] } { let u: Tpair; u.0 = S(1); - //[ast]~^ ERROR cannot assign to field `u.0` of immutable binding [E0594] - //[nll]~^^ ERROR assign to part of possibly uninitialized variable: `u` [E0381] + //~^ ERROR assign to part of possibly uninitialized variable: `u` [E0381] u.1 = 2; - //[ast]~^ ERROR cannot assign to field `u.1` of immutable binding [E0594] println!("{:?} {:?}", u.0, u.1); - //[ast]~^ ERROR use of possibly uninitialized variable: `u.0` [E0381] - //[ast]~| ERROR use of possibly uninitialized variable: `u.1` [E0381] } { let v: Spair; v.x = S(1); - //[ast]~^ ERROR cannot assign to field `v.x` of immutable binding [E0594] - //[nll]~^^ ERROR assign to part of possibly uninitialized variable: `v` [E0381] + //~^ ERROR assign to part of possibly uninitialized variable: `v` [E0381] v.y = 2; - //[ast]~^ ERROR cannot assign to field `v.y` of immutable binding [E0594] println!("{:?} {:?}", v.x, v.y); - //[ast]~^ ERROR use of possibly uninitialized variable: `v.x` [E0381] - //[ast]~| ERROR use of possibly uninitialized variable: `v.y` [E0381] } } diff --git a/src/test/ui/borrowck/issue-54499-field-mutation-of-never-init.nll.stderr b/src/test/ui/borrowck/issue-54499-field-mutation-of-never-init.stderr similarity index 76% rename from src/test/ui/borrowck/issue-54499-field-mutation-of-never-init.nll.stderr rename to src/test/ui/borrowck/issue-54499-field-mutation-of-never-init.stderr index 3dc2b5b3b8..68873ac5c0 100644 --- a/src/test/ui/borrowck/issue-54499-field-mutation-of-never-init.nll.stderr +++ b/src/test/ui/borrowck/issue-54499-field-mutation-of-never-init.stderr @@ -1,17 +1,17 @@ error[E0381]: assign to part of possibly uninitialized variable: `t` - --> $DIR/issue-54499-field-mutation-of-never-init.rs:22:9 + --> $DIR/issue-54499-field-mutation-of-never-init.rs:12:9 | LL | t.0 = S(1); | ^^^^^^^^^^ use of possibly uninitialized `t` error[E0381]: assign to part of possibly uninitialized variable: `u` - --> $DIR/issue-54499-field-mutation-of-never-init.rs:34:9 + --> $DIR/issue-54499-field-mutation-of-never-init.rs:20:9 | LL | u.0 = S(1); | ^^^^^^^^^^ use of possibly uninitialized `u` error[E0381]: assign to part of possibly uninitialized variable: `v` - --> $DIR/issue-54499-field-mutation-of-never-init.rs:46:9 + --> $DIR/issue-54499-field-mutation-of-never-init.rs:28:9 | LL | v.x = S(1); | ^^^^^^^^^^ use of possibly uninitialized `v` diff --git a/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.rs b/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.rs index ad4accbbee..51df40016d 100644 --- a/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.rs +++ b/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - #![allow(dead_code)] #[derive(Debug)] diff --git a/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr b/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr index 6a12016b2a..519f1d6fb2 100644 --- a/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr +++ b/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of borrowed content - --> $DIR/issue-54597-reject-move-out-of-borrow-via-pat.rs:16:13 + --> $DIR/issue-54597-reject-move-out-of-borrow-via-pat.rs:14:13 | LL | *array | ^^^^^^ diff --git a/src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.ast.stderr b/src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.ast.stderr deleted file mode 100644 index f3e9ce364d..0000000000 --- a/src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.ast.stderr +++ /dev/null @@ -1,55 +0,0 @@ -error[E0595]: closure cannot assign to immutable argument `x` - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:21:22 - | -LL | let mut c1 = |y: &'static mut isize| x = y; - | ^^^^^^^^^^^^^^^^^^^^^^^ cannot borrow mutably -help: consider removing the `&mut`, as it is an immutable binding to a mutable reference - | -LL | x - | - -error[E0595]: closure cannot assign to immutable argument `x` - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:32:22 - | -LL | let mut c1 = |z: &'static mut isize| { - | ^^^^^^^^^^^^^^^^^^^^^^^ cannot borrow mutably -help: consider removing the `&mut`, as it is an immutable binding to a mutable reference - | -LL | x - | - -error[E0595]: closure cannot assign to immutable argument `x` - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:46:9 - | -LL | pub fn capture_assign_whole(x: (i32,)) { - | - help: make this binding mutable: `mut x` -LL | || { x = (1,); }; - | ^^ cannot borrow mutably - -error[E0595]: closure cannot assign to immutable argument `x` - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:52:9 - | -LL | pub fn capture_assign_part(x: (i32,)) { - | - help: make this binding mutable: `mut x` -LL | || { x.0 = 1; }; - | ^^ cannot borrow mutably - -error[E0595]: closure cannot assign to immutable argument `x` - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:58:9 - | -LL | pub fn capture_reborrow_whole(x: (i32,)) { - | - help: make this binding mutable: `mut x` -LL | || { &mut x; }; - | ^^ cannot borrow mutably - -error[E0595]: closure cannot assign to immutable argument `x` - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:64:9 - | -LL | pub fn capture_reborrow_part(x: (i32,)) { - | - help: make this binding mutable: `mut x` -LL | || { &mut x.0; }; - | ^^ cannot borrow mutably - -error: aborting due to 6 previous errors - -For more information about this error, try `rustc --explain E0595`. diff --git a/src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.migrate.stderr b/src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.migrate.stderr index 434f318ad1..f1d28eed92 100644 --- a/src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.migrate.stderr +++ b/src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.migrate.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:21:46 + --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:19:46 | LL | pub fn e(x: &'static mut isize) { | - help: consider changing this to be mutable: `mut x` @@ -8,7 +8,7 @@ LL | let mut c1 = |y: &'static mut isize| x = y; | ^^^^^ cannot assign error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:34:50 + --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:30:50 | LL | pub fn ee(x: &'static mut isize) { | - help: consider changing this to be mutable: `mut x` @@ -17,7 +17,7 @@ LL | let mut c2 = |y: &'static mut isize| x = y; | ^^^^^ cannot assign error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:46:14 + --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:42:14 | LL | pub fn capture_assign_whole(x: (i32,)) { | - help: consider changing this to be mutable: `mut x` @@ -25,7 +25,7 @@ LL | || { x = (1,); }; | ^^^^^^^^ cannot assign error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:52:14 + --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:47:14 | LL | pub fn capture_assign_part(x: (i32,)) { | - help: consider changing this to be mutable: `mut x` @@ -33,7 +33,7 @@ LL | || { x.0 = 1; }; | ^^^^^^^ cannot assign error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:58:14 + --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:52:14 | LL | pub fn capture_reborrow_whole(x: (i32,)) { | - help: consider changing this to be mutable: `mut x` @@ -41,7 +41,7 @@ LL | || { &mut x; }; | ^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:64:14 + --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:57:14 | LL | pub fn capture_reborrow_part(x: (i32,)) { | - help: consider changing this to be mutable: `mut x` @@ -50,5 +50,4 @@ LL | || { &mut x.0; }; error: aborting due to 6 previous errors -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.nll.stderr b/src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.nll.stderr index 434f318ad1..f1d28eed92 100644 --- a/src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.nll.stderr +++ b/src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.nll.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:21:46 + --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:19:46 | LL | pub fn e(x: &'static mut isize) { | - help: consider changing this to be mutable: `mut x` @@ -8,7 +8,7 @@ LL | let mut c1 = |y: &'static mut isize| x = y; | ^^^^^ cannot assign error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:34:50 + --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:30:50 | LL | pub fn ee(x: &'static mut isize) { | - help: consider changing this to be mutable: `mut x` @@ -17,7 +17,7 @@ LL | let mut c2 = |y: &'static mut isize| x = y; | ^^^^^ cannot assign error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:46:14 + --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:42:14 | LL | pub fn capture_assign_whole(x: (i32,)) { | - help: consider changing this to be mutable: `mut x` @@ -25,7 +25,7 @@ LL | || { x = (1,); }; | ^^^^^^^^ cannot assign error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:52:14 + --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:47:14 | LL | pub fn capture_assign_part(x: (i32,)) { | - help: consider changing this to be mutable: `mut x` @@ -33,7 +33,7 @@ LL | || { x.0 = 1; }; | ^^^^^^^ cannot assign error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:58:14 + --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:52:14 | LL | pub fn capture_reborrow_whole(x: (i32,)) { | - help: consider changing this to be mutable: `mut x` @@ -41,7 +41,7 @@ LL | || { &mut x; }; | ^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable - --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:64:14 + --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:57:14 | LL | pub fn capture_reborrow_part(x: (i32,)) { | - help: consider changing this to be mutable: `mut x` @@ -50,5 +50,4 @@ LL | || { &mut x.0; }; error: aborting due to 6 previous errors -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.rs b/src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.rs index 2bd71ec25f..751a911a6b 100644 --- a/src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.rs +++ b/src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.rs @@ -2,16 +2,14 @@ // analysis of a closure body may only be caught when AST-borrowck // looks at some parent. -// revisions: ast migrate nll +// revisions: migrate nll // Since we are testing nll (and migration) explicitly as a separate // revisions, don't worry about the --compare-mode=nll on this test. // ignore-compare-mode-nll -//[ast]compile-flags: -Z borrowck=ast -//[migrate]compile-flags: -Z borrowck=migrate -Z two-phase-borrows -//[nll]compile-flags: -Z borrowck=mir -Z two-phase-borrows +//[nll]compile-flags: -Z borrowck=mir // transcribed from borrowck-closures-unique.rs @@ -21,7 +19,6 @@ mod borrowck_closures_unique { let mut c1 = |y: &'static mut isize| x = y; //[migrate]~^ ERROR is not declared as mutable //[nll]~^^ ERROR is not declared as mutable - //[ast]~^^^ closure cannot assign to immutable unsafe { c1(&mut Y); } } } @@ -30,7 +27,6 @@ mod borrowck_closures_unique_grandparent { pub fn ee(x: &'static mut isize) { static mut Z: isize = 3; let mut c1 = |z: &'static mut isize| { - //[ast]~^ closure cannot assign to immutable let mut c2 = |y: &'static mut isize| x = y; //[migrate]~^ ERROR is not declared as mutable //[nll]~^^ ERROR is not declared as mutable @@ -44,27 +40,23 @@ mod borrowck_closures_unique_grandparent { mod mutability_errors { pub fn capture_assign_whole(x: (i32,)) { || { x = (1,); }; - //[ast]~^ ERROR immutable argument - //[migrate]~^^ ERROR is not declared as mutable - //[nll]~^^^ ERROR is not declared as mutable + //[migrate]~^ ERROR is not declared as mutable + //[nll]~^^ ERROR is not declared as mutable } pub fn capture_assign_part(x: (i32,)) { || { x.0 = 1; }; - //[ast]~^ ERROR immutable argument - //[migrate]~^^ ERROR is not declared as mutable - //[nll]~^^^ ERROR is not declared as mutable + //[migrate]~^ ERROR is not declared as mutable + //[nll]~^^ ERROR is not declared as mutable } pub fn capture_reborrow_whole(x: (i32,)) { || { &mut x; }; - //[ast]~^ ERROR immutable argument - //[migrate]~^^ ERROR is not declared as mutable - //[nll]~^^^ ERROR is not declared as mutable + //[migrate]~^ ERROR is not declared as mutable + //[nll]~^^ ERROR is not declared as mutable } pub fn capture_reborrow_part(x: (i32,)) { || { &mut x.0; }; - //[ast]~^ ERROR immutable argument - //[migrate]~^^ ERROR is not declared as mutable - //[nll]~^^^ ERROR is not declared as mutable + //[migrate]~^ ERROR is not declared as mutable + //[nll]~^^ ERROR is not declared as mutable } } diff --git a/src/test/ui/borrowck/issue-58776-borrowck-scans-children.ast.stderr b/src/test/ui/borrowck/issue-58776-borrowck-scans-children.ast.stderr deleted file mode 100644 index 9e0b0aac1e..0000000000 --- a/src/test/ui/borrowck/issue-58776-borrowck-scans-children.ast.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0597]: `**greeting` does not live long enough - --> $DIR/issue-58776-borrowck-scans-children.rs:10:24 - | -LL | let res = (|| (|| &greeting)())(); - | -- ^^^^^^^^ - borrowed value only lives until here - | | | - | | borrowed value does not live long enough - | capture occurs here -... -LL | } - | - borrowed value needs to live until here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/borrowck/issue-58776-borrowck-scans-children.migrate.stderr b/src/test/ui/borrowck/issue-58776-borrowck-scans-children.migrate.stderr index bd8f2286f1..efd4e1a171 100644 --- a/src/test/ui/borrowck/issue-58776-borrowck-scans-children.migrate.stderr +++ b/src/test/ui/borrowck/issue-58776-borrowck-scans-children.migrate.stderr @@ -1,11 +1,11 @@ error[E0506]: cannot assign to `greeting` because it is borrowed - --> $DIR/issue-58776-borrowck-scans-children.rs:13:5 + --> $DIR/issue-58776-borrowck-scans-children.rs:11:5 | LL | let res = (|| (|| &greeting)())(); | -- -------- borrow occurs due to use in closure | | | borrow of `greeting` occurs here -... +LL | LL | greeting = "DEALLOCATED".to_string(); | ^^^^^^^^ assignment to borrowed `greeting` occurs here ... @@ -13,7 +13,7 @@ LL | println!("thread result: {:?}", res); | --- borrow later used here error[E0505]: cannot move out of `greeting` because it is borrowed - --> $DIR/issue-58776-borrowck-scans-children.rs:16:10 + --> $DIR/issue-58776-borrowck-scans-children.rs:14:10 | LL | let res = (|| (|| &greeting)())(); | -- -------- borrow occurs due to use in closure @@ -28,5 +28,5 @@ LL | println!("thread result: {:?}", res); error: aborting due to 2 previous errors -Some errors occurred: E0505, E0506. +Some errors have detailed explanations: E0505, E0506. For more information about an error, try `rustc --explain E0505`. diff --git a/src/test/ui/borrowck/issue-58776-borrowck-scans-children.rs b/src/test/ui/borrowck/issue-58776-borrowck-scans-children.rs index 378969f9a1..efa313a9d2 100644 --- a/src/test/ui/borrowck/issue-58776-borrowck-scans-children.rs +++ b/src/test/ui/borrowck/issue-58776-borrowck-scans-children.rs @@ -1,21 +1,11 @@ -// ignore-compare-mode-nll - -// revisions: ast migrate nll - -//[migrate]compile-flags: -Z borrowck=migrate -#![cfg_attr(nll, feature(nll))] - fn main() { let mut greeting = "Hello world!".to_string(); let res = (|| (|| &greeting)())(); - //[ast]~^ ERROR does not live long enough greeting = "DEALLOCATED".to_string(); - //[migrate]~^ ERROR cannot assign - //[nll]~^^ ERROR cannot assign + //~^ ERROR cannot assign drop(greeting); - //[migrate]~^ ERROR cannot move - //[nll]~^^ ERROR cannot move + //~^ ERROR cannot move println!("thread result: {:?}", res); } diff --git a/src/test/ui/borrowck/issue-58776-borrowck-scans-children.nll.stderr b/src/test/ui/borrowck/issue-58776-borrowck-scans-children.stderr similarity index 86% rename from src/test/ui/borrowck/issue-58776-borrowck-scans-children.nll.stderr rename to src/test/ui/borrowck/issue-58776-borrowck-scans-children.stderr index bd8f2286f1..9b1d6fa7d3 100644 --- a/src/test/ui/borrowck/issue-58776-borrowck-scans-children.nll.stderr +++ b/src/test/ui/borrowck/issue-58776-borrowck-scans-children.stderr @@ -1,11 +1,11 @@ error[E0506]: cannot assign to `greeting` because it is borrowed - --> $DIR/issue-58776-borrowck-scans-children.rs:13:5 + --> $DIR/issue-58776-borrowck-scans-children.rs:5:5 | LL | let res = (|| (|| &greeting)())(); | -- -------- borrow occurs due to use in closure | | | borrow of `greeting` occurs here -... +LL | LL | greeting = "DEALLOCATED".to_string(); | ^^^^^^^^ assignment to borrowed `greeting` occurs here ... @@ -13,7 +13,7 @@ LL | println!("thread result: {:?}", res); | --- borrow later used here error[E0505]: cannot move out of `greeting` because it is borrowed - --> $DIR/issue-58776-borrowck-scans-children.rs:16:10 + --> $DIR/issue-58776-borrowck-scans-children.rs:7:10 | LL | let res = (|| (|| &greeting)())(); | -- -------- borrow occurs due to use in closure @@ -28,5 +28,5 @@ LL | println!("thread result: {:?}", res); error: aborting due to 2 previous errors -Some errors occurred: E0505, E0506. +Some errors have detailed explanations: E0505, E0506. For more information about an error, try `rustc --explain E0505`. diff --git a/src/test/ui/borrowck/issue-7573.nll.stderr b/src/test/ui/borrowck/issue-7573.nll.stderr new file mode 100644 index 0000000000..0da715bbdb --- /dev/null +++ b/src/test/ui/borrowck/issue-7573.nll.stderr @@ -0,0 +1,14 @@ +error[E0521]: borrowed data escapes outside of closure + --> $DIR/issue-7573.rs:21:9 + | +LL | let mut lines_to_use: Vec<&CrateId> = Vec::new(); + | ---------------- `lines_to_use` is declared here, outside of the closure body +LL | +LL | let push_id = |installed_id: &CrateId| { + | ------------ `installed_id` is a reference that is only valid in the closure body +... +LL | lines_to_use.push(installed_id); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `installed_id` escapes the closure body here + +error: aborting due to previous error + diff --git a/src/test/ui/borrowck/move-in-static-initializer-issue-38520.mir.stderr b/src/test/ui/borrowck/move-in-static-initializer-issue-38520.mir.stderr deleted file mode 100644 index 14078b7689..0000000000 --- a/src/test/ui/borrowck/move-in-static-initializer-issue-38520.mir.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/move-in-static-initializer-issue-38520.rs:15:23 - | -LL | static Y: usize = get(*&X); - | ^^^ cannot move out of borrowed content - -error[E0507]: cannot move out of borrowed content - --> $DIR/move-in-static-initializer-issue-38520.rs:17:22 - | -LL | const Z: usize = get(*&X); - | ^^^ cannot move out of borrowed content - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/move-in-static-initializer-issue-38520.rs b/src/test/ui/borrowck/move-in-static-initializer-issue-38520.rs index a7b17f7d65..c2a59a1054 100644 --- a/src/test/ui/borrowck/move-in-static-initializer-issue-38520.rs +++ b/src/test/ui/borrowck/move-in-static-initializer-issue-38520.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - // Regression test for #38520. Check that moves of `Foo` are not // permitted as `Foo` is not copy (even in a static/const // initializer). @@ -12,10 +9,8 @@ const fn get(x: Foo) -> usize { } const X: Foo = Foo(22); -static Y: usize = get(*&X); //[ast]~ ERROR E0507 - //[mir]~^ ERROR [E0507] -const Z: usize = get(*&X); //[ast]~ ERROR E0507 - //[mir]~^ ERROR [E0507] +static Y: usize = get(*&X); //~ ERROR [E0507] +const Z: usize = get(*&X); //~ ERROR [E0507] fn main() { } diff --git a/src/test/ui/borrowck/move-in-static-initializer-issue-38520.ast.stderr b/src/test/ui/borrowck/move-in-static-initializer-issue-38520.stderr similarity index 78% rename from src/test/ui/borrowck/move-in-static-initializer-issue-38520.ast.stderr rename to src/test/ui/borrowck/move-in-static-initializer-issue-38520.stderr index 14078b7689..9dcefac1b7 100644 --- a/src/test/ui/borrowck/move-in-static-initializer-issue-38520.ast.stderr +++ b/src/test/ui/borrowck/move-in-static-initializer-issue-38520.stderr @@ -1,11 +1,11 @@ error[E0507]: cannot move out of borrowed content - --> $DIR/move-in-static-initializer-issue-38520.rs:15:23 + --> $DIR/move-in-static-initializer-issue-38520.rs:12:23 | LL | static Y: usize = get(*&X); | ^^^ cannot move out of borrowed content error[E0507]: cannot move out of borrowed content - --> $DIR/move-in-static-initializer-issue-38520.rs:17:22 + --> $DIR/move-in-static-initializer-issue-38520.rs:13:22 | LL | const Z: usize = get(*&X); | ^^^ cannot move out of borrowed content diff --git a/src/test/ui/borrowck/mut-borrow-in-loop.nll.stderr b/src/test/ui/borrowck/mut-borrow-in-loop.nll.stderr deleted file mode 100644 index eda2f518f9..0000000000 --- a/src/test/ui/borrowck/mut-borrow-in-loop.nll.stderr +++ /dev/null @@ -1,39 +0,0 @@ -error[E0499]: cannot borrow `*arg` as mutable more than once at a time - --> $DIR/mut-borrow-in-loop.rs:10:25 - | -LL | impl<'a, T : 'a> FuncWrapper<'a, T> { - | -- lifetime `'a` defined here -... -LL | (self.func)(arg) - | ------------^^^- - | | | - | | mutable borrow starts here in previous iteration of loop - | argument requires that `*arg` is borrowed for `'a` - -error[E0499]: cannot borrow `*arg` as mutable more than once at a time - --> $DIR/mut-borrow-in-loop.rs:16:25 - | -LL | impl<'a, T : 'a> FuncWrapper<'a, T> { - | -- lifetime `'a` defined here -... -LL | (self.func)(arg) - | ------------^^^- - | | | - | | mutable borrow starts here in previous iteration of loop - | argument requires that `*arg` is borrowed for `'a` - -error[E0499]: cannot borrow `*arg` as mutable more than once at a time - --> $DIR/mut-borrow-in-loop.rs:23:25 - | -LL | impl<'a, T : 'a> FuncWrapper<'a, T> { - | -- lifetime `'a` defined here -... -LL | (self.func)(arg) - | ------------^^^- - | | | - | | mutable borrow starts here in previous iteration of loop - | argument requires that `*arg` is borrowed for `'a` - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/mut-borrow-in-loop.rs b/src/test/ui/borrowck/mut-borrow-in-loop.rs index 6b65b90375..09f3e4f9b7 100644 --- a/src/test/ui/borrowck/mut-borrow-in-loop.rs +++ b/src/test/ui/borrowck/mut-borrow-in-loop.rs @@ -27,4 +27,3 @@ impl<'a, T : 'a> FuncWrapper<'a, T> { fn main() { } - diff --git a/src/test/ui/borrowck/mut-borrow-in-loop.stderr b/src/test/ui/borrowck/mut-borrow-in-loop.stderr index 478d586d03..eda2f518f9 100644 --- a/src/test/ui/borrowck/mut-borrow-in-loop.stderr +++ b/src/test/ui/borrowck/mut-borrow-in-loop.stderr @@ -1,29 +1,38 @@ error[E0499]: cannot borrow `*arg` as mutable more than once at a time --> $DIR/mut-borrow-in-loop.rs:10:25 | +LL | impl<'a, T : 'a> FuncWrapper<'a, T> { + | -- lifetime `'a` defined here +... LL | (self.func)(arg) - | ^^^ mutable borrow starts here in previous iteration of loop -LL | } -LL | } - | - mutable borrow ends here + | ------------^^^- + | | | + | | mutable borrow starts here in previous iteration of loop + | argument requires that `*arg` is borrowed for `'a` error[E0499]: cannot borrow `*arg` as mutable more than once at a time --> $DIR/mut-borrow-in-loop.rs:16:25 | +LL | impl<'a, T : 'a> FuncWrapper<'a, T> { + | -- lifetime `'a` defined here +... LL | (self.func)(arg) - | ^^^ mutable borrow starts here in previous iteration of loop -LL | } -LL | } - | - mutable borrow ends here + | ------------^^^- + | | | + | | mutable borrow starts here in previous iteration of loop + | argument requires that `*arg` is borrowed for `'a` error[E0499]: cannot borrow `*arg` as mutable more than once at a time --> $DIR/mut-borrow-in-loop.rs:23:25 | +LL | impl<'a, T : 'a> FuncWrapper<'a, T> { + | -- lifetime `'a` defined here +... LL | (self.func)(arg) - | ^^^ mutable borrow starts here in previous iteration of loop -LL | } -LL | } - | - mutable borrow ends here + | ------------^^^- + | | | + | | mutable borrow starts here in previous iteration of loop + | argument requires that `*arg` is borrowed for `'a` error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/mut-borrow-of-mut-ref.nll.stderr b/src/test/ui/borrowck/mut-borrow-of-mut-ref.nll.stderr deleted file mode 100644 index 09dabbc89b..0000000000 --- a/src/test/ui/borrowck/mut-borrow-of-mut-ref.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable - --> $DIR/mut-borrow-of-mut-ref.rs:8:7 - | -LL | fn f(b: &mut i32) { - | - help: consider changing this to be mutable: `mut b` -LL | g(&mut b) - | ^^^^^^ cannot borrow as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr b/src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr index 4653c353ca..09dabbc89b 100644 --- a/src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr +++ b/src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr @@ -1,12 +1,10 @@ -error[E0596]: cannot borrow immutable argument `b` as mutable - --> $DIR/mut-borrow-of-mut-ref.rs:8:12 +error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable + --> $DIR/mut-borrow-of-mut-ref.rs:8:7 | +LL | fn f(b: &mut i32) { + | - help: consider changing this to be mutable: `mut b` LL | g(&mut b) - | ^ cannot borrow mutably -help: consider removing the `&mut`, as it is an immutable binding to a mutable reference - | -LL | g(b) - | ^ + | ^^^^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/borrowck/mut-borrow-outside-loop.nll.stderr b/src/test/ui/borrowck/mut-borrow-outside-loop.nll.stderr deleted file mode 100644 index 4fcb693f1b..0000000000 --- a/src/test/ui/borrowck/mut-borrow-outside-loop.nll.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error[E0499]: cannot borrow `void` as mutable more than once at a time - --> $DIR/mut-borrow-outside-loop.rs:7:18 - | -LL | let first = &mut void; - | --------- first mutable borrow occurs here -LL | let second = &mut void; - | ^^^^^^^^^ second mutable borrow occurs here -LL | first.use_mut(); - | ----- first borrow later used here - -error[E0499]: cannot borrow `inner_void` as mutable more than once at a time - --> $DIR/mut-borrow-outside-loop.rs:15:28 - | -LL | let inner_first = &mut inner_void; - | --------------- first mutable borrow occurs here -LL | let inner_second = &mut inner_void; - | ^^^^^^^^^^^^^^^ second mutable borrow occurs here -LL | inner_second.use_mut(); -LL | inner_first.use_mut(); - | ----------- first borrow later used here - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/mut-borrow-outside-loop.stderr b/src/test/ui/borrowck/mut-borrow-outside-loop.stderr index 45db962fbd..4fcb693f1b 100644 --- a/src/test/ui/borrowck/mut-borrow-outside-loop.stderr +++ b/src/test/ui/borrowck/mut-borrow-outside-loop.stderr @@ -1,24 +1,23 @@ error[E0499]: cannot borrow `void` as mutable more than once at a time - --> $DIR/mut-borrow-outside-loop.rs:7:23 + --> $DIR/mut-borrow-outside-loop.rs:7:18 | LL | let first = &mut void; - | ---- first mutable borrow occurs here + | --------- first mutable borrow occurs here LL | let second = &mut void; - | ^^^^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here + | ^^^^^^^^^ second mutable borrow occurs here +LL | first.use_mut(); + | ----- first borrow later used here error[E0499]: cannot borrow `inner_void` as mutable more than once at a time - --> $DIR/mut-borrow-outside-loop.rs:15:33 + --> $DIR/mut-borrow-outside-loop.rs:15:28 | LL | let inner_first = &mut inner_void; - | ---------- first mutable borrow occurs here + | --------------- first mutable borrow occurs here LL | let inner_second = &mut inner_void; - | ^^^^^^^^^^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here + | ^^^^^^^^^^^^^^^ second mutable borrow occurs here +LL | inner_second.use_mut(); +LL | inner_first.use_mut(); + | ----------- first borrow later used here error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/mutability-errors.nll.stderr b/src/test/ui/borrowck/mutability-errors.nll.stderr deleted file mode 100644 index 11bc788944..0000000000 --- a/src/test/ui/borrowck/mutability-errors.nll.stderr +++ /dev/null @@ -1,379 +0,0 @@ -error[E0594]: cannot assign to `*x` which is behind a `&` reference - --> $DIR/mutability-errors.rs:9:5 - | -LL | fn named_ref(x: &(i32,)) { - | ------- help: consider changing this to be a mutable reference: `&mut (i32,)` -LL | *x = (1,); - | ^^^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written - -error[E0594]: cannot assign to `x.0` which is behind a `&` reference - --> $DIR/mutability-errors.rs:10:5 - | -LL | fn named_ref(x: &(i32,)) { - | ------- help: consider changing this to be a mutable reference: `&mut (i32,)` -LL | *x = (1,); -LL | x.0 = 1; - | ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written - -error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference - --> $DIR/mutability-errors.rs:11:5 - | -LL | fn named_ref(x: &(i32,)) { - | ------- help: consider changing this to be a mutable reference: `&mut (i32,)` -... -LL | &mut *x; - | ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `x.0` as mutable, as it is behind a `&` reference - --> $DIR/mutability-errors.rs:12:5 - | -LL | fn named_ref(x: &(i32,)) { - | ------- help: consider changing this to be a mutable reference: `&mut (i32,)` -... -LL | &mut x.0; - | ^^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0594]: cannot assign to data in a `&` reference - --> $DIR/mutability-errors.rs:16:5 - | -LL | *f() = (1,); - | ^^^^^^^^^^^ cannot assign - -error[E0594]: cannot assign to data in a `&` reference - --> $DIR/mutability-errors.rs:17:5 - | -LL | f().0 = 1; - | ^^^^^^^^^ cannot assign - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/mutability-errors.rs:18:5 - | -LL | &mut *f(); - | ^^^^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/mutability-errors.rs:19:5 - | -LL | &mut f().0; - | ^^^^^^^^^^ cannot borrow as mutable - -error[E0594]: cannot assign to `*x` which is behind a `*const` pointer - --> $DIR/mutability-errors.rs:23:5 - | -LL | unsafe fn named_ptr(x: *const (i32,)) { - | ------------- help: consider changing this to be a mutable pointer: `*mut (i32,)` -LL | *x = (1,); - | ^^^^^^^^^ `x` is a `*const` pointer, so the data it refers to cannot be written - -error[E0594]: cannot assign to `x.0` which is behind a `*const` pointer - --> $DIR/mutability-errors.rs:24:5 - | -LL | unsafe fn named_ptr(x: *const (i32,)) { - | ------------- help: consider changing this to be a mutable pointer: `*mut (i32,)` -LL | *x = (1,); -LL | (*x).0 = 1; - | ^^^^^^^^^^ `x` is a `*const` pointer, so the data it refers to cannot be written - -error[E0596]: cannot borrow `*x` as mutable, as it is behind a `*const` pointer - --> $DIR/mutability-errors.rs:25:5 - | -LL | unsafe fn named_ptr(x: *const (i32,)) { - | ------------- help: consider changing this to be a mutable pointer: `*mut (i32,)` -... -LL | &mut *x; - | ^^^^^^^ `x` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `x.0` as mutable, as it is behind a `*const` pointer - --> $DIR/mutability-errors.rs:26:5 - | -LL | unsafe fn named_ptr(x: *const (i32,)) { - | ------------- help: consider changing this to be a mutable pointer: `*mut (i32,)` -... -LL | &mut (*x).0; - | ^^^^^^^^^^^ `x` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable - -error[E0594]: cannot assign to data in a `*const` pointer - --> $DIR/mutability-errors.rs:30:5 - | -LL | *f() = (1,); - | ^^^^^^^^^^^ cannot assign - -error[E0594]: cannot assign to data in a `*const` pointer - --> $DIR/mutability-errors.rs:31:5 - | -LL | (*f()).0 = 1; - | ^^^^^^^^^^^^ cannot assign - -error[E0596]: cannot borrow data in a `*const` pointer as mutable - --> $DIR/mutability-errors.rs:32:5 - | -LL | &mut *f(); - | ^^^^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow data in a `*const` pointer as mutable - --> $DIR/mutability-errors.rs:33:5 - | -LL | &mut (*f()).0; - | ^^^^^^^^^^^^^ cannot borrow as mutable - -error[E0594]: cannot assign to `x`, as it is a captured variable in a `Fn` closure - --> $DIR/mutability-errors.rs:40:9 - | -LL | x = (1,); - | ^^^^^^^^ cannot assign - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/mutability-errors.rs:39:12 - | -LL | fn_ref(|| { - | ____________^ -LL | | x = (1,); -LL | | x.0 = 1; -LL | | &mut x; -LL | | &mut x.0; -LL | | }); - | |_____^ - -error[E0594]: cannot assign to `x.0`, as `Fn` closures cannot mutate their captured variables - --> $DIR/mutability-errors.rs:41:9 - | -LL | x.0 = 1; - | ^^^^^^^ cannot assign - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/mutability-errors.rs:39:12 - | -LL | fn_ref(|| { - | ____________^ -LL | | x = (1,); -LL | | x.0 = 1; -LL | | &mut x; -LL | | &mut x.0; -LL | | }); - | |_____^ - -error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure - --> $DIR/mutability-errors.rs:42:9 - | -LL | &mut x; - | ^^^^^^ cannot borrow as mutable - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/mutability-errors.rs:39:12 - | -LL | fn_ref(|| { - | ____________^ -LL | | x = (1,); -LL | | x.0 = 1; -LL | | &mut x; -LL | | &mut x.0; -LL | | }); - | |_____^ - -error[E0596]: cannot borrow `x.0` as mutable, as `Fn` closures cannot mutate their captured variables - --> $DIR/mutability-errors.rs:43:9 - | -LL | &mut x.0; - | ^^^^^^^^ cannot borrow as mutable - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/mutability-errors.rs:39:12 - | -LL | fn_ref(|| { - | ____________^ -LL | | x = (1,); -LL | | x.0 = 1; -LL | | &mut x; -LL | | &mut x.0; -LL | | }); - | |_____^ - -error[E0594]: cannot assign to `x`, as it is a captured variable in a `Fn` closure - --> $DIR/mutability-errors.rs:46:9 - | -LL | x = (1,); - | ^^^^^^^^ cannot assign - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/mutability-errors.rs:45:12 - | -LL | fn_ref(move || { - | ____________^ -LL | | x = (1,); -LL | | x.0 = 1; -LL | | &mut x; -LL | | &mut x.0; -LL | | }); - | |_____^ - -error[E0594]: cannot assign to `x.0`, as `Fn` closures cannot mutate their captured variables - --> $DIR/mutability-errors.rs:47:9 - | -LL | x.0 = 1; - | ^^^^^^^ cannot assign - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/mutability-errors.rs:45:12 - | -LL | fn_ref(move || { - | ____________^ -LL | | x = (1,); -LL | | x.0 = 1; -LL | | &mut x; -LL | | &mut x.0; -LL | | }); - | |_____^ - -error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure - --> $DIR/mutability-errors.rs:48:9 - | -LL | &mut x; - | ^^^^^^ cannot borrow as mutable - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/mutability-errors.rs:45:12 - | -LL | fn_ref(move || { - | ____________^ -LL | | x = (1,); -LL | | x.0 = 1; -LL | | &mut x; -LL | | &mut x.0; -LL | | }); - | |_____^ - -error[E0596]: cannot borrow `x.0` as mutable, as `Fn` closures cannot mutate their captured variables - --> $DIR/mutability-errors.rs:49:9 - | -LL | &mut x.0; - | ^^^^^^^^ cannot borrow as mutable - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/mutability-errors.rs:45:12 - | -LL | fn_ref(move || { - | ____________^ -LL | | x = (1,); -LL | | x.0 = 1; -LL | | &mut x; -LL | | &mut x.0; -LL | | }); - | |_____^ - -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/mutability-errors.rs:54:5 - | -LL | fn imm_local(x: (i32,)) { - | - help: consider changing this to be mutable: `mut x` -LL | &mut x; - | ^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable - --> $DIR/mutability-errors.rs:55:5 - | -LL | fn imm_local(x: (i32,)) { - | - help: consider changing this to be mutable: `mut x` -LL | &mut x; -LL | &mut x.0; - | ^^^^^^^^ cannot borrow as mutable - -error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/mutability-errors.rs:60:9 - | -LL | fn imm_capture(x: (i32,)) { - | - help: consider changing this to be mutable: `mut x` -LL | || { -LL | x = (1,); - | ^^^^^^^^ cannot assign - -error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable - --> $DIR/mutability-errors.rs:61:9 - | -LL | fn imm_capture(x: (i32,)) { - | - help: consider changing this to be mutable: `mut x` -... -LL | x.0 = 1; - | ^^^^^^^ cannot assign - -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/mutability-errors.rs:62:9 - | -LL | fn imm_capture(x: (i32,)) { - | - help: consider changing this to be mutable: `mut x` -... -LL | &mut x; - | ^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable - --> $DIR/mutability-errors.rs:63:9 - | -LL | fn imm_capture(x: (i32,)) { - | - help: consider changing this to be mutable: `mut x` -... -LL | &mut x.0; - | ^^^^^^^^ cannot borrow as mutable - -error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/mutability-errors.rs:66:9 - | -LL | fn imm_capture(x: (i32,)) { - | - help: consider changing this to be mutable: `mut x` -... -LL | x = (1,); - | ^^^^^^^^ cannot assign - -error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable - --> $DIR/mutability-errors.rs:67:9 - | -LL | fn imm_capture(x: (i32,)) { - | - help: consider changing this to be mutable: `mut x` -... -LL | x.0 = 1; - | ^^^^^^^ cannot assign - -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/mutability-errors.rs:68:9 - | -LL | fn imm_capture(x: (i32,)) { - | - help: consider changing this to be mutable: `mut x` -... -LL | &mut x; - | ^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable - --> $DIR/mutability-errors.rs:69:9 - | -LL | fn imm_capture(x: (i32,)) { - | - help: consider changing this to be mutable: `mut x` -... -LL | &mut x.0; - | ^^^^^^^^ cannot borrow as mutable - -error[E0594]: cannot assign to immutable static item `X` - --> $DIR/mutability-errors.rs:76:5 - | -LL | X = (1,); - | ^^^^^^^^ cannot assign - -error[E0594]: cannot assign to `X.0`, as `X` is an immutable static item - --> $DIR/mutability-errors.rs:77:5 - | -LL | X.0 = 1; - | ^^^^^^^ cannot assign - -error[E0596]: cannot borrow immutable static item `X` as mutable - --> $DIR/mutability-errors.rs:78:5 - | -LL | &mut X; - | ^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow `X.0` as mutable, as `X` is an immutable static item - --> $DIR/mutability-errors.rs:79:5 - | -LL | &mut X.0; - | ^^^^^^^^ cannot borrow as mutable - -error: aborting due to 38 previous errors - -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. diff --git a/src/test/ui/borrowck/mutability-errors.rs b/src/test/ui/borrowck/mutability-errors.rs index 26f7f605eb..5be0df1376 100644 --- a/src/test/ui/borrowck/mutability-errors.rs +++ b/src/test/ui/borrowck/mutability-errors.rs @@ -56,11 +56,11 @@ fn imm_local(x: (i32,)) { } fn imm_capture(x: (i32,)) { - || { //~ ERROR - x = (1,); - x.0 = 1; - &mut x; - &mut x.0; + || { + x = (1,); //~ ERROR + x.0 = 1; //~ ERROR + &mut x; //~ ERROR + &mut x.0; //~ ERROR }; move || { x = (1,); //~ ERROR diff --git a/src/test/ui/borrowck/mutability-errors.stderr b/src/test/ui/borrowck/mutability-errors.stderr index cf4f37edde..545de5d0e7 100644 --- a/src/test/ui/borrowck/mutability-errors.stderr +++ b/src/test/ui/borrowck/mutability-errors.stderr @@ -1,117 +1,128 @@ -error[E0594]: cannot assign to immutable borrowed content `*x` +error[E0594]: cannot assign to `*x` which is behind a `&` reference --> $DIR/mutability-errors.rs:9:5 | LL | fn named_ref(x: &(i32,)) { - | ------- use `&mut (i32,)` here to make mutable + | ------- help: consider changing this to be a mutable reference: `&mut (i32,)` LL | *x = (1,); - | ^^^^^^^^^ cannot borrow as mutable + | ^^^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written -error[E0594]: cannot assign to field `x.0` of immutable binding +error[E0594]: cannot assign to `x.0` which is behind a `&` reference --> $DIR/mutability-errors.rs:10:5 | LL | fn named_ref(x: &(i32,)) { - | ------- use `&mut (i32,)` here to make mutable + | ------- help: consider changing this to be a mutable reference: `&mut (i32,)` LL | *x = (1,); LL | x.0 = 1; - | ^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written -error[E0596]: cannot borrow immutable borrowed content `*x` as mutable - --> $DIR/mutability-errors.rs:11:10 +error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference + --> $DIR/mutability-errors.rs:11:5 | LL | fn named_ref(x: &(i32,)) { - | ------- use `&mut (i32,)` here to make mutable + | ------- help: consider changing this to be a mutable reference: `&mut (i32,)` ... LL | &mut *x; - | ^^ cannot borrow as mutable + | ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0596]: cannot borrow field `x.0` of immutable binding as mutable - --> $DIR/mutability-errors.rs:12:10 +error[E0596]: cannot borrow `x.0` as mutable, as it is behind a `&` reference + --> $DIR/mutability-errors.rs:12:5 | LL | fn named_ref(x: &(i32,)) { - | ------- use `&mut (i32,)` here to make mutable + | ------- help: consider changing this to be a mutable reference: `&mut (i32,)` ... LL | &mut x.0; - | ^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0594]: cannot assign to immutable borrowed content +error[E0594]: cannot assign to data in a `&` reference --> $DIR/mutability-errors.rs:16:5 | LL | *f() = (1,); - | ^^^^^^^^^^^ cannot borrow as mutable + | ^^^^^^^^^^^ cannot assign -error[E0594]: cannot assign to field of immutable binding +error[E0594]: cannot assign to data in a `&` reference --> $DIR/mutability-errors.rs:17:5 | LL | f().0 = 1; - | ^^^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^ cannot assign -error[E0596]: cannot borrow immutable borrowed content as mutable - --> $DIR/mutability-errors.rs:18:10 +error[E0596]: cannot borrow data in a `&` reference as mutable + --> $DIR/mutability-errors.rs:18:5 | LL | &mut *f(); - | ^^^^ cannot borrow as mutable + | ^^^^^^^^^ cannot borrow as mutable -error[E0596]: cannot borrow field of immutable binding as mutable - --> $DIR/mutability-errors.rs:19:10 +error[E0596]: cannot borrow data in a `&` reference as mutable + --> $DIR/mutability-errors.rs:19:5 | LL | &mut f().0; - | ^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^^ cannot borrow as mutable -error[E0594]: cannot assign to immutable dereference of raw pointer `*x` +error[E0594]: cannot assign to `*x` which is behind a `*const` pointer --> $DIR/mutability-errors.rs:23:5 | +LL | unsafe fn named_ptr(x: *const (i32,)) { + | ------------- help: consider changing this to be a mutable pointer: `*mut (i32,)` LL | *x = (1,); - | ^^^^^^^^^ cannot borrow as mutable + | ^^^^^^^^^ `x` is a `*const` pointer, so the data it refers to cannot be written -error[E0594]: cannot assign to field `x.0` of immutable binding +error[E0594]: cannot assign to `x.0` which is behind a `*const` pointer --> $DIR/mutability-errors.rs:24:5 | +LL | unsafe fn named_ptr(x: *const (i32,)) { + | ------------- help: consider changing this to be a mutable pointer: `*mut (i32,)` +LL | *x = (1,); LL | (*x).0 = 1; - | ^^^^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^^ `x` is a `*const` pointer, so the data it refers to cannot be written -error[E0596]: cannot borrow immutable dereference of raw pointer `*x` as mutable - --> $DIR/mutability-errors.rs:25:10 +error[E0596]: cannot borrow `*x` as mutable, as it is behind a `*const` pointer + --> $DIR/mutability-errors.rs:25:5 | +LL | unsafe fn named_ptr(x: *const (i32,)) { + | ------------- help: consider changing this to be a mutable pointer: `*mut (i32,)` +... LL | &mut *x; - | ^^ cannot borrow as mutable + | ^^^^^^^ `x` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable -error[E0596]: cannot borrow field `x.0` of immutable binding as mutable - --> $DIR/mutability-errors.rs:26:10 +error[E0596]: cannot borrow `x.0` as mutable, as it is behind a `*const` pointer + --> $DIR/mutability-errors.rs:26:5 | +LL | unsafe fn named_ptr(x: *const (i32,)) { + | ------------- help: consider changing this to be a mutable pointer: `*mut (i32,)` +... LL | &mut (*x).0; - | ^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^^^ `x` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable -error[E0594]: cannot assign to immutable dereference of raw pointer +error[E0594]: cannot assign to data in a `*const` pointer --> $DIR/mutability-errors.rs:30:5 | LL | *f() = (1,); - | ^^^^^^^^^^^ cannot borrow as mutable + | ^^^^^^^^^^^ cannot assign -error[E0594]: cannot assign to field of immutable binding +error[E0594]: cannot assign to data in a `*const` pointer --> $DIR/mutability-errors.rs:31:5 | LL | (*f()).0 = 1; - | ^^^^^^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^^^^ cannot assign -error[E0596]: cannot borrow immutable dereference of raw pointer as mutable - --> $DIR/mutability-errors.rs:32:10 +error[E0596]: cannot borrow data in a `*const` pointer as mutable + --> $DIR/mutability-errors.rs:32:5 | LL | &mut *f(); - | ^^^^ cannot borrow as mutable + | ^^^^^^^^^ cannot borrow as mutable -error[E0596]: cannot borrow field of immutable binding as mutable - --> $DIR/mutability-errors.rs:33:10 +error[E0596]: cannot borrow data in a `*const` pointer as mutable + --> $DIR/mutability-errors.rs:33:5 | LL | &mut (*f()).0; - | ^^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^^^^^ cannot borrow as mutable -error[E0387]: cannot assign to data in a captured outer variable in an `Fn` closure +error[E0594]: cannot assign to `x`, as it is a captured variable in a `Fn` closure --> $DIR/mutability-errors.rs:40:9 | LL | x = (1,); - | ^^^^^^^^ + | ^^^^^^^^ cannot assign | -help: consider changing this closure to take self by mutable reference +help: consider changing this to accept closures that implement `FnMut` --> $DIR/mutability-errors.rs:39:12 | LL | fn_ref(|| { @@ -123,13 +134,13 @@ LL | | &mut x.0; LL | | }); | |_____^ -error[E0387]: cannot assign to data in a captured outer variable in an `Fn` closure +error[E0594]: cannot assign to `x.0`, as `Fn` closures cannot mutate their captured variables --> $DIR/mutability-errors.rs:41:9 | LL | x.0 = 1; - | ^^^^^^^ + | ^^^^^^^ cannot assign | -help: consider changing this closure to take self by mutable reference +help: consider changing this to accept closures that implement `FnMut` --> $DIR/mutability-errors.rs:39:12 | LL | fn_ref(|| { @@ -141,13 +152,13 @@ LL | | &mut x.0; LL | | }); | |_____^ -error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure - --> $DIR/mutability-errors.rs:42:14 +error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure + --> $DIR/mutability-errors.rs:42:9 | LL | &mut x; - | ^ + | ^^^^^^ cannot borrow as mutable | -help: consider changing this closure to take self by mutable reference +help: consider changing this to accept closures that implement `FnMut` --> $DIR/mutability-errors.rs:39:12 | LL | fn_ref(|| { @@ -159,13 +170,13 @@ LL | | &mut x.0; LL | | }); | |_____^ -error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure - --> $DIR/mutability-errors.rs:43:14 +error[E0596]: cannot borrow `x.0` as mutable, as `Fn` closures cannot mutate their captured variables + --> $DIR/mutability-errors.rs:43:9 | LL | &mut x.0; - | ^^^ + | ^^^^^^^^ cannot borrow as mutable | -help: consider changing this closure to take self by mutable reference +help: consider changing this to accept closures that implement `FnMut` --> $DIR/mutability-errors.rs:39:12 | LL | fn_ref(|| { @@ -177,14 +188,13 @@ LL | | &mut x.0; LL | | }); | |_____^ -error[E0594]: cannot assign to captured outer variable in an `Fn` closure +error[E0594]: cannot assign to `x`, as it is a captured variable in a `Fn` closure --> $DIR/mutability-errors.rs:46:9 | LL | x = (1,); - | ^^^^^^^^ + | ^^^^^^^^ cannot assign | - = note: `Fn` closures cannot capture their enclosing environment for modifications -help: consider changing this closure to take self by mutable reference +help: consider changing this to accept closures that implement `FnMut` --> $DIR/mutability-errors.rs:45:12 | LL | fn_ref(move || { @@ -196,19 +206,31 @@ LL | | &mut x.0; LL | | }); | |_____^ -error[E0594]: cannot assign to field `x.0` of immutable binding +error[E0594]: cannot assign to `x.0`, as `Fn` closures cannot mutate their captured variables --> $DIR/mutability-errors.rs:47:9 | LL | x.0 = 1; - | ^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^ cannot assign + | +help: consider changing this to accept closures that implement `FnMut` + --> $DIR/mutability-errors.rs:45:12 + | +LL | fn_ref(move || { + | ____________^ +LL | | x = (1,); +LL | | x.0 = 1; +LL | | &mut x; +LL | | &mut x.0; +LL | | }); + | |_____^ -error[E0596]: cannot borrow captured outer variable in an `Fn` closure as mutable - --> $DIR/mutability-errors.rs:48:14 +error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure + --> $DIR/mutability-errors.rs:48:9 | LL | &mut x; - | ^ + | ^^^^^^ cannot borrow as mutable | -help: consider changing this closure to take self by mutable reference +help: consider changing this to accept closures that implement `FnMut` --> $DIR/mutability-errors.rs:45:12 | LL | fn_ref(move || { @@ -220,89 +242,137 @@ LL | | &mut x.0; LL | | }); | |_____^ -error[E0596]: cannot borrow field `x.0` of immutable binding as mutable - --> $DIR/mutability-errors.rs:49:14 +error[E0596]: cannot borrow `x.0` as mutable, as `Fn` closures cannot mutate their captured variables + --> $DIR/mutability-errors.rs:49:9 | LL | &mut x.0; - | ^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^ cannot borrow as mutable + | +help: consider changing this to accept closures that implement `FnMut` + --> $DIR/mutability-errors.rs:45:12 + | +LL | fn_ref(move || { + | ____________^ +LL | | x = (1,); +LL | | x.0 = 1; +LL | | &mut x; +LL | | &mut x.0; +LL | | }); + | |_____^ -error[E0596]: cannot borrow immutable argument `x` as mutable - --> $DIR/mutability-errors.rs:54:10 +error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable + --> $DIR/mutability-errors.rs:54:5 | LL | fn imm_local(x: (i32,)) { - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` LL | &mut x; - | ^ cannot borrow mutably + | ^^^^^^ cannot borrow as mutable -error[E0596]: cannot borrow field `x.0` of immutable binding as mutable - --> $DIR/mutability-errors.rs:55:10 +error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable + --> $DIR/mutability-errors.rs:55:5 | LL | fn imm_local(x: (i32,)) { - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` LL | &mut x; LL | &mut x.0; - | ^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^ cannot borrow as mutable -error[E0595]: closure cannot assign to immutable argument `x` - --> $DIR/mutability-errors.rs:59:5 +error[E0594]: cannot assign to `x`, as it is not declared as mutable + --> $DIR/mutability-errors.rs:60:9 | LL | fn imm_capture(x: (i32,)) { - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` LL | || { - | ^^ cannot borrow mutably +LL | x = (1,); + | ^^^^^^^^ cannot assign -error[E0594]: cannot assign to captured outer variable in an `FnMut` closure +error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable + --> $DIR/mutability-errors.rs:61:9 + | +LL | fn imm_capture(x: (i32,)) { + | - help: consider changing this to be mutable: `mut x` +... +LL | x.0 = 1; + | ^^^^^^^ cannot assign + +error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable + --> $DIR/mutability-errors.rs:62:9 + | +LL | fn imm_capture(x: (i32,)) { + | - help: consider changing this to be mutable: `mut x` +... +LL | &mut x; + | ^^^^^^ cannot borrow as mutable + +error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable + --> $DIR/mutability-errors.rs:63:9 + | +LL | fn imm_capture(x: (i32,)) { + | - help: consider changing this to be mutable: `mut x` +... +LL | &mut x.0; + | ^^^^^^^^ cannot borrow as mutable + +error[E0594]: cannot assign to `x`, as it is not declared as mutable --> $DIR/mutability-errors.rs:66:9 | LL | fn imm_capture(x: (i32,)) { - | - help: consider making `x` mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` ... LL | x = (1,); - | ^^^^^^^^ + | ^^^^^^^^ cannot assign -error[E0594]: cannot assign to field `x.0` of immutable binding +error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable --> $DIR/mutability-errors.rs:67:9 | +LL | fn imm_capture(x: (i32,)) { + | - help: consider changing this to be mutable: `mut x` +... LL | x.0 = 1; - | ^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^ cannot assign -error[E0596]: cannot borrow captured outer variable in an `FnMut` closure as mutable - --> $DIR/mutability-errors.rs:68:14 +error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable + --> $DIR/mutability-errors.rs:68:9 | +LL | fn imm_capture(x: (i32,)) { + | - help: consider changing this to be mutable: `mut x` +... LL | &mut x; - | ^ + | ^^^^^^ cannot borrow as mutable -error[E0596]: cannot borrow field `x.0` of immutable binding as mutable - --> $DIR/mutability-errors.rs:69:14 +error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable + --> $DIR/mutability-errors.rs:69:9 | +LL | fn imm_capture(x: (i32,)) { + | - help: consider changing this to be mutable: `mut x` +... LL | &mut x.0; - | ^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^ cannot borrow as mutable -error[E0594]: cannot assign to immutable static item +error[E0594]: cannot assign to immutable static item `X` --> $DIR/mutability-errors.rs:76:5 | LL | X = (1,); - | ^^^^^^^^ + | ^^^^^^^^ cannot assign -error[E0594]: cannot assign to field of immutable binding +error[E0594]: cannot assign to `X.0`, as `X` is an immutable static item --> $DIR/mutability-errors.rs:77:5 | LL | X.0 = 1; - | ^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^ cannot assign -error[E0596]: cannot borrow immutable static item as mutable - --> $DIR/mutability-errors.rs:78:10 +error[E0596]: cannot borrow immutable static item `X` as mutable + --> $DIR/mutability-errors.rs:78:5 | LL | &mut X; - | ^ + | ^^^^^^ cannot borrow as mutable -error[E0596]: cannot borrow field of immutable binding as mutable - --> $DIR/mutability-errors.rs:79:10 +error[E0596]: cannot borrow `X.0` as mutable, as `X` is an immutable static item + --> $DIR/mutability-errors.rs:79:5 | LL | &mut X.0; - | ^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^ cannot borrow as mutable -error: aborting due to 35 previous errors +error: aborting due to 38 previous errors -Some errors occurred: E0387, E0594, E0595, E0596. -For more information about an error, try `rustc --explain E0387`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.nll.stderr b/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.nll.stderr deleted file mode 100644 index 60af412373..0000000000 --- a/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.nll.stderr +++ /dev/null @@ -1,50 +0,0 @@ -error[E0515]: cannot return value referencing temporary value - --> $DIR/promote-ref-mut-in-let-issue-46557.rs:6:5 - | -LL | let ref mut x = 1234543; - | ------- temporary value created here -LL | x - | ^ returns a value referencing data owned by the current function - -error[E0515]: cannot return value referencing temporary value - --> $DIR/promote-ref-mut-in-let-issue-46557.rs:11:5 - | -LL | let (ref mut x, ) = (1234543, ); - | ----------- temporary value created here -LL | x - | ^ returns a value referencing data owned by the current function - -error[E0515]: cannot return value referencing temporary value - --> $DIR/promote-ref-mut-in-let-issue-46557.rs:15:5 - | -LL | match 1234543 { - | ^ ------- temporary value created here - | _____| - | | -LL | | ref mut x => x -LL | | } - | |_____^ returns a value referencing data owned by the current function - -error[E0515]: cannot return value referencing temporary value - --> $DIR/promote-ref-mut-in-let-issue-46557.rs:21:5 - | -LL | match (123443,) { - | ^ --------- temporary value created here - | _____| - | | -LL | | (ref mut x,) => x, -LL | | } - | |_____^ returns a value referencing data owned by the current function - -error[E0515]: cannot return reference to temporary value - --> $DIR/promote-ref-mut-in-let-issue-46557.rs:27:5 - | -LL | &mut 1234543 - | ^^^^^------- - | | | - | | temporary value created here - | returns a reference to data owned by the current function - -error: aborting due to 5 previous errors - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs b/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs index ae305b6894..3576734de3 100644 --- a/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs +++ b/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.rs @@ -2,24 +2,24 @@ // mut` borrow. fn gimme_static_mut_let() -> &'static mut u32 { - let ref mut x = 1234543; //~ ERROR - x + let ref mut x = 1234543; + x //~ ERROR } fn gimme_static_mut_let_nested() -> &'static mut u32 { - let (ref mut x, ) = (1234543, ); //~ ERROR - x + let (ref mut x, ) = (1234543, ); + x //~ ERROR } fn gimme_static_mut_match() -> &'static mut u32 { - match 1234543 { - ref mut x => x //~ ERROR + match 1234543 { //~ ERROR + ref mut x => x } } fn gimme_static_mut_match_nested() -> &'static mut u32 { - match (123443,) { - (ref mut x,) => x, //~ ERROR + match (123443,) { //~ ERROR + (ref mut x,) => x, } } diff --git a/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.stderr b/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.stderr index ae68df72aa..60af412373 100644 --- a/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.stderr +++ b/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.stderr @@ -1,57 +1,50 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/promote-ref-mut-in-let-issue-46557.rs:5:9 +error[E0515]: cannot return value referencing temporary value + --> $DIR/promote-ref-mut-in-let-issue-46557.rs:6:5 | LL | let ref mut x = 1234543; - | ^^^^^^^^^ temporary value does not live long enough + | ------- temporary value created here LL | x -LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | ^ returns a value referencing data owned by the current function -error[E0597]: borrowed value does not live long enough - --> $DIR/promote-ref-mut-in-let-issue-46557.rs:10:10 +error[E0515]: cannot return value referencing temporary value + --> $DIR/promote-ref-mut-in-let-issue-46557.rs:11:5 | LL | let (ref mut x, ) = (1234543, ); - | ^^^^^^^^^ borrowed value does not live long enough + | ----------- temporary value created here LL | x -LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | ^ returns a value referencing data owned by the current function -error[E0597]: borrowed value does not live long enough - --> $DIR/promote-ref-mut-in-let-issue-46557.rs:16:9 - | -LL | ref mut x => x - | ^^^^^^^^^ temporary value does not live long enough -LL | } -LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... +error[E0515]: cannot return value referencing temporary value + --> $DIR/promote-ref-mut-in-let-issue-46557.rs:15:5 + | +LL | match 1234543 { + | ^ ------- temporary value created here + | _____| + | | +LL | | ref mut x => x +LL | | } + | |_____^ returns a value referencing data owned by the current function -error[E0597]: borrowed value does not live long enough - --> $DIR/promote-ref-mut-in-let-issue-46557.rs:22:10 - | -LL | (ref mut x,) => x, - | ^^^^^^^^^ borrowed value does not live long enough -LL | } -LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... +error[E0515]: cannot return value referencing temporary value + --> $DIR/promote-ref-mut-in-let-issue-46557.rs:21:5 + | +LL | match (123443,) { + | ^ --------- temporary value created here + | _____| + | | +LL | | (ref mut x,) => x, +LL | | } + | |_____^ returns a value referencing data owned by the current function -error[E0597]: borrowed value does not live long enough - --> $DIR/promote-ref-mut-in-let-issue-46557.rs:27:10 +error[E0515]: cannot return reference to temporary value + --> $DIR/promote-ref-mut-in-let-issue-46557.rs:27:5 | LL | &mut 1234543 - | ^^^^^^^ temporary value does not live long enough -LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | ^^^^^------- + | | | + | | temporary value created here + | returns a reference to data owned by the current function error: aborting due to 5 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/borrowck/reassignment_immutable_fields.nll.stderr b/src/test/ui/borrowck/reassignment_immutable_fields.nll.stderr deleted file mode 100644 index d455a8f078..0000000000 --- a/src/test/ui/borrowck/reassignment_immutable_fields.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0381]: assign to part of possibly uninitialized variable: `x` - --> $DIR/reassignment_immutable_fields.rs:7:5 - | -LL | x.0 = 1; - | ^^^^^^^ use of possibly uninitialized `x` - -error[E0381]: assign to part of possibly uninitialized variable: `x` - --> $DIR/reassignment_immutable_fields.rs:15:5 - | -LL | x.0 = 1; - | ^^^^^^^ use of possibly uninitialized `x` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/reassignment_immutable_fields.rs b/src/test/ui/borrowck/reassignment_immutable_fields.rs index 4529e32a69..fd2ab62a40 100644 --- a/src/test/ui/borrowck/reassignment_immutable_fields.rs +++ b/src/test/ui/borrowck/reassignment_immutable_fields.rs @@ -5,16 +5,16 @@ fn assign_both_fields_and_use() { let x: (u32, u32); x.0 = 1; //~ ERROR - x.1 = 22; //~ ERROR - drop(x.0); //~ ERROR - drop(x.1); //~ ERROR + x.1 = 22; + drop(x.0); + drop(x.1); } fn assign_both_fields_the_use_var() { let x: (u32, u32); x.0 = 1; //~ ERROR - x.1 = 22; //~ ERROR - drop(x); //~ ERROR + x.1 = 22; + drop(x); } fn main() { } diff --git a/src/test/ui/borrowck/reassignment_immutable_fields.stderr b/src/test/ui/borrowck/reassignment_immutable_fields.stderr index 74f0217ef8..d455a8f078 100644 --- a/src/test/ui/borrowck/reassignment_immutable_fields.stderr +++ b/src/test/ui/borrowck/reassignment_immutable_fields.stderr @@ -1,56 +1,15 @@ -error[E0594]: cannot assign to field `x.0` of immutable binding +error[E0381]: assign to part of possibly uninitialized variable: `x` --> $DIR/reassignment_immutable_fields.rs:7:5 | -LL | let x: (u32, u32); - | - help: make this binding mutable: `mut x` LL | x.0 = 1; - | ^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^ use of possibly uninitialized `x` -error[E0594]: cannot assign to field `x.1` of immutable binding - --> $DIR/reassignment_immutable_fields.rs:8:5 - | -LL | let x: (u32, u32); - | - help: make this binding mutable: `mut x` -LL | x.0 = 1; -LL | x.1 = 22; - | ^^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0381]: use of possibly uninitialized variable: `x.0` - --> $DIR/reassignment_immutable_fields.rs:9:10 - | -LL | drop(x.0); - | ^^^ use of possibly uninitialized `x.0` - -error[E0381]: use of possibly uninitialized variable: `x.1` - --> $DIR/reassignment_immutable_fields.rs:10:10 - | -LL | drop(x.1); - | ^^^ use of possibly uninitialized `x.1` - -error[E0594]: cannot assign to field `x.0` of immutable binding +error[E0381]: assign to part of possibly uninitialized variable: `x` --> $DIR/reassignment_immutable_fields.rs:15:5 | -LL | let x: (u32, u32); - | - help: make this binding mutable: `mut x` -LL | x.0 = 1; - | ^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0594]: cannot assign to field `x.1` of immutable binding - --> $DIR/reassignment_immutable_fields.rs:16:5 - | -LL | let x: (u32, u32); - | - help: make this binding mutable: `mut x` LL | x.0 = 1; -LL | x.1 = 22; - | ^^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0381]: use of possibly uninitialized variable: `x` - --> $DIR/reassignment_immutable_fields.rs:17:10 - | -LL | drop(x); - | ^ use of possibly uninitialized `x` + | ^^^^^^^ use of possibly uninitialized `x` -error: aborting due to 7 previous errors +error: aborting due to 2 previous errors -Some errors occurred: E0381, E0594. -For more information about an error, try `rustc --explain E0381`. +For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/reassignment_immutable_fields_overlapping.nll.stderr b/src/test/ui/borrowck/reassignment_immutable_fields_overlapping.nll.stderr deleted file mode 100644 index 5f1313f286..0000000000 --- a/src/test/ui/borrowck/reassignment_immutable_fields_overlapping.nll.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0381]: assign to part of possibly uninitialized variable: `x` - --> $DIR/reassignment_immutable_fields_overlapping.rs:12:5 - | -LL | x.a = 1; - | ^^^^^^^ use of possibly uninitialized `x` - -error[E0594]: cannot assign to `x.b`, as `x` is not declared as mutable - --> $DIR/reassignment_immutable_fields_overlapping.rs:13:5 - | -LL | let x: Foo; - | - help: consider changing this to be mutable: `mut x` -LL | x.a = 1; -LL | x.b = 22; - | ^^^^^^^^ cannot assign - -error: aborting due to 2 previous errors - -Some errors occurred: E0381, E0594. -For more information about an error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/reassignment_immutable_fields_overlapping.stderr b/src/test/ui/borrowck/reassignment_immutable_fields_overlapping.stderr index 673c1572ca..649c127dcc 100644 --- a/src/test/ui/borrowck/reassignment_immutable_fields_overlapping.stderr +++ b/src/test/ui/borrowck/reassignment_immutable_fields_overlapping.stderr @@ -1,20 +1,18 @@ -error[E0594]: cannot assign to field `x.a` of immutable binding +error[E0381]: assign to part of possibly uninitialized variable: `x` --> $DIR/reassignment_immutable_fields_overlapping.rs:12:5 | -LL | let x: Foo; - | - help: make this binding mutable: `mut x` LL | x.a = 1; - | ^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^ use of possibly uninitialized `x` -error[E0594]: cannot assign to field `x.b` of immutable binding +error[E0594]: cannot assign to `x.b`, as `x` is not declared as mutable --> $DIR/reassignment_immutable_fields_overlapping.rs:13:5 | LL | let x: Foo; - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` LL | x.a = 1; LL | x.b = 22; - | ^^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^ cannot assign error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0594`. +For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/reassignment_immutable_fields_twice.nll.stderr b/src/test/ui/borrowck/reassignment_immutable_fields_twice.nll.stderr deleted file mode 100644 index 553ee24cca..0000000000 --- a/src/test/ui/borrowck/reassignment_immutable_fields_twice.nll.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable - --> $DIR/reassignment_immutable_fields_twice.rs:7:5 - | -LL | let x: (u32, u32); - | - help: consider changing this to be mutable: `mut x` -LL | x = (22, 44); -LL | x.0 = 1; - | ^^^^^^^ cannot assign - -error[E0381]: assign to part of possibly uninitialized variable: `x` - --> $DIR/reassignment_immutable_fields_twice.rs:12:5 - | -LL | x.0 = 1; - | ^^^^^^^ use of possibly uninitialized `x` - -error: aborting due to 2 previous errors - -Some errors occurred: E0381, E0594. -For more information about an error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/reassignment_immutable_fields_twice.rs b/src/test/ui/borrowck/reassignment_immutable_fields_twice.rs index a10baf627f..2775a54c83 100644 --- a/src/test/ui/borrowck/reassignment_immutable_fields_twice.rs +++ b/src/test/ui/borrowck/reassignment_immutable_fields_twice.rs @@ -10,8 +10,8 @@ fn var_then_field() { fn same_field_twice() { let x: (u32, u32); x.0 = 1; //~ ERROR - x.0 = 22; //~ ERROR - x.1 = 44; //~ ERROR + x.0 = 22; + x.1 = 44; } fn main() { } diff --git a/src/test/ui/borrowck/reassignment_immutable_fields_twice.stderr b/src/test/ui/borrowck/reassignment_immutable_fields_twice.stderr index db1c74d94a..9a2824ccb3 100644 --- a/src/test/ui/borrowck/reassignment_immutable_fields_twice.stderr +++ b/src/test/ui/borrowck/reassignment_immutable_fields_twice.stderr @@ -1,38 +1,18 @@ -error[E0594]: cannot assign to field `x.0` of immutable binding +error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable --> $DIR/reassignment_immutable_fields_twice.rs:7:5 | LL | let x: (u32, u32); - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` LL | x = (22, 44); LL | x.0 = 1; - | ^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^ cannot assign -error[E0594]: cannot assign to field `x.0` of immutable binding +error[E0381]: assign to part of possibly uninitialized variable: `x` --> $DIR/reassignment_immutable_fields_twice.rs:12:5 | -LL | let x: (u32, u32); - | - help: make this binding mutable: `mut x` -LL | x.0 = 1; - | ^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0594]: cannot assign to field `x.0` of immutable binding - --> $DIR/reassignment_immutable_fields_twice.rs:13:5 - | -LL | let x: (u32, u32); - | - help: make this binding mutable: `mut x` LL | x.0 = 1; -LL | x.0 = 22; - | ^^^^^^^^ cannot mutably borrow field of immutable binding - -error[E0594]: cannot assign to field `x.1` of immutable binding - --> $DIR/reassignment_immutable_fields_twice.rs:14:5 - | -LL | let x: (u32, u32); - | - help: make this binding mutable: `mut x` -... -LL | x.1 = 44; - | ^^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^ use of possibly uninitialized `x` -error: aborting due to 4 previous errors +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0594`. +For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr b/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr index 8d6ac62750..cc6d5c55bd 100644 --- a/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr +++ b/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr @@ -55,5 +55,5 @@ LL | fn another_bound<'x: 't>(self, x: Inv<'x>, y: Inv<'t>) { error: aborting due to 5 previous errors -Some errors occurred: E0195, E0276, E0308. +Some errors have detailed explanations: E0195, E0276, E0308. For more information about an error, try `rustc --explain E0195`. diff --git a/src/test/ui/borrowck/regions-escape-bound-fn-2.nll.stderr b/src/test/ui/borrowck/regions-escape-bound-fn-2.nll.stderr new file mode 100644 index 0000000000..4797a9d456 --- /dev/null +++ b/src/test/ui/borrowck/regions-escape-bound-fn-2.nll.stderr @@ -0,0 +1,12 @@ +error[E0521]: borrowed data escapes outside of closure + --> $DIR/regions-escape-bound-fn-2.rs:8:18 + | +LL | let mut x = None; + | ----- `x` is declared here, outside of the closure body +LL | with_int(|y| x = Some(y)); + | - ^^^^^^^^^^^ `y` escapes the closure body here + | | + | `y` is a reference that is only valid in the closure body + +error: aborting due to previous error + diff --git a/src/test/ui/borrowck/regions-escape-bound-fn.nll.stderr b/src/test/ui/borrowck/regions-escape-bound-fn.nll.stderr new file mode 100644 index 0000000000..2b3a9816e4 --- /dev/null +++ b/src/test/ui/borrowck/regions-escape-bound-fn.nll.stderr @@ -0,0 +1,12 @@ +error[E0521]: borrowed data escapes outside of closure + --> $DIR/regions-escape-bound-fn.rs:8:18 + | +LL | let mut x: Option<&isize> = None; + | ----- `x` is declared here, outside of the closure body +LL | with_int(|y| x = Some(y)); + | - ^^^^^^^^^^^ `y` escapes the closure body here + | | + | `y` is a reference that is only valid in the closure body + +error: aborting due to previous error + diff --git a/src/test/ui/borrowck/regions-escape-unboxed-closure.nll.stderr b/src/test/ui/borrowck/regions-escape-unboxed-closure.nll.stderr new file mode 100644 index 0000000000..8ceefd2534 --- /dev/null +++ b/src/test/ui/borrowck/regions-escape-unboxed-closure.nll.stderr @@ -0,0 +1,12 @@ +error[E0521]: borrowed data escapes outside of closure + --> $DIR/regions-escape-unboxed-closure.rs:6:23 + | +LL | let mut x: Option<&isize> = None; + | ----- `x` is declared here, outside of the closure body +LL | with_int(&mut |y| x = Some(y)); + | - ^^^^^^^^^^^ `y` escapes the closure body here + | | + | `y` is a reference that is only valid in the closure body + +error: aborting due to previous error + diff --git a/src/test/ui/borrowck/two-phase-across-loop.rs b/src/test/ui/borrowck/two-phase-across-loop.rs index b1a4c54f49..12222342c9 100644 --- a/src/test/ui/borrowck/two-phase-across-loop.rs +++ b/src/test/ui/borrowck/two-phase-across-loop.rs @@ -1,8 +1,6 @@ // Test that a borrow which starts as a 2-phase borrow and gets // carried around a loop winds up conflicting with itself. -#![feature(nll)] - struct Foo { x: String } impl Foo { diff --git a/src/test/ui/borrowck/two-phase-across-loop.stderr b/src/test/ui/borrowck/two-phase-across-loop.stderr index 933d3eb711..38993a50bf 100644 --- a/src/test/ui/borrowck/two-phase-across-loop.stderr +++ b/src/test/ui/borrowck/two-phase-across-loop.stderr @@ -1,5 +1,5 @@ error[E0499]: cannot borrow `foo` as mutable more than once at a time - --> $DIR/two-phase-across-loop.rs:19:22 + --> $DIR/two-phase-across-loop.rs:17:22 | LL | strings.push(foo.get_string()); | ^^^ mutable borrow starts here in previous iteration of loop diff --git a/src/test/ui/borrowck/two-phase-activation-sharing-interference.nll_target.stderr b/src/test/ui/borrowck/two-phase-activation-sharing-interference.nll_target.stderr index 8370aad6f3..40786c032b 100644 --- a/src/test/ui/borrowck/two-phase-activation-sharing-interference.nll_target.stderr +++ b/src/test/ui/borrowck/two-phase-activation-sharing-interference.nll_target.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-activation-sharing-interference.rs:32:15 + --> $DIR/two-phase-activation-sharing-interference.rs:30:15 | LL | let y = &mut x; | ------ mutable borrow occurs here @@ -10,7 +10,7 @@ LL | *y += 1; | ------- mutable borrow later used here error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-activation-sharing-interference.rs:40:13 + --> $DIR/two-phase-activation-sharing-interference.rs:38:13 | LL | let y = &mut x; | ------ mutable borrow occurs here @@ -21,7 +21,7 @@ LL | *y += 1; | ------- mutable borrow later used here error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-activation-sharing-interference.rs:51:13 + --> $DIR/two-phase-activation-sharing-interference.rs:49:13 | LL | let y = &mut x; | ------ mutable borrow occurs here @@ -32,7 +32,7 @@ LL | *y += 1; | ------- mutable borrow later used here error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-activation-sharing-interference.rs:62:14 + --> $DIR/two-phase-activation-sharing-interference.rs:60:14 | LL | let y = &mut x; | ------ mutable borrow occurs here diff --git a/src/test/ui/borrowck/two-phase-activation-sharing-interference.rs b/src/test/ui/borrowck/two-phase-activation-sharing-interference.rs index 5754220e82..4d77ac915b 100644 --- a/src/test/ui/borrowck/two-phase-activation-sharing-interference.rs +++ b/src/test/ui/borrowck/two-phase-activation-sharing-interference.rs @@ -1,11 +1,9 @@ -// ignore-tidy-linelength - // revisions: nll_target // The following revisions are disabled due to missing support from two-phase beyond autorefs -//[nll_beyond] compile-flags: -Z borrowck=mir -Z two-phase-borrows -Z two-phase-beyond-autoref +//[nll_beyond] compile-flags: -Z borrowck=mir -Z two-phase-beyond-autoref -//[nll_target] compile-flags: -Z borrowck=mir -Z two-phase-borrows +//[nll_target] compile-flags: -Z borrowck=mir // This is an important corner case pointed out by Niko: one is // allowed to initiate a shared borrow during a reservation, but it diff --git a/src/test/ui/borrowck/two-phase-allow-access-during-reservation.rs b/src/test/ui/borrowck/two-phase-allow-access-during-reservation.rs index e428964939..07169afefc 100644 --- a/src/test/ui/borrowck/two-phase-allow-access-during-reservation.rs +++ b/src/test/ui/borrowck/two-phase-allow-access-during-reservation.rs @@ -3,9 +3,9 @@ // revisions: nll_target // The following revisions are disabled due to missing support for two_phase_beyond_autoref -//[nll_beyond] compile-flags: -Z borrowck=mir -Z two-phase-borrows -Z two_phase_beyond_autoref +//[nll_beyond] compile-flags: -Z borrowck=mir -Z two_phase_beyond_autoref -//[nll_target] compile-flags: -Z borrowck=mir -Z two-phase-borrows +//[nll_target] compile-flags: -Z borrowck=mir // This is the second counter-example from Niko's blog post // smallcultfollowing.com/babysteps/blog/2017/03/01/nested-method-calls-via-two-phase-borrowing/ diff --git a/src/test/ui/borrowck/two-phase-cannot-nest-mut-self-calls.rs b/src/test/ui/borrowck/two-phase-cannot-nest-mut-self-calls.rs index fd1b8841b4..f2097fdf82 100644 --- a/src/test/ui/borrowck/two-phase-cannot-nest-mut-self-calls.rs +++ b/src/test/ui/borrowck/two-phase-cannot-nest-mut-self-calls.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z borrowck=mir -Z two-phase-borrows +// compile-flags: -Z borrowck=mir // This is the third counter-example from Niko's blog post // smallcultfollowing.com/babysteps/blog/2017/03/01/nested-method-calls-via-two-phase-borrowing/ diff --git a/src/test/ui/borrowck/two-phase-method-receivers.rs b/src/test/ui/borrowck/two-phase-method-receivers.rs index f1df1a6a2c..6838f6c7ef 100644 --- a/src/test/ui/borrowck/two-phase-method-receivers.rs +++ b/src/test/ui/borrowck/two-phase-method-receivers.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z borrowck=mir -Z two-phase-borrows +// compile-flags: -Z borrowck=mir // run-pass diff --git a/src/test/ui/borrowck/two-phase-multi-mut.rs b/src/test/ui/borrowck/two-phase-multi-mut.rs index ed3d257da9..bb646d7caf 100644 --- a/src/test/ui/borrowck/two-phase-multi-mut.rs +++ b/src/test/ui/borrowck/two-phase-multi-mut.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - struct Foo { } diff --git a/src/test/ui/borrowck/two-phase-multi-mut.stderr b/src/test/ui/borrowck/two-phase-multi-mut.stderr index c4168503e4..33fa4a3a15 100644 --- a/src/test/ui/borrowck/two-phase-multi-mut.stderr +++ b/src/test/ui/borrowck/two-phase-multi-mut.stderr @@ -1,5 +1,5 @@ error[E0499]: cannot borrow `foo` as mutable more than once at a time - --> $DIR/two-phase-multi-mut.rs:13:5 + --> $DIR/two-phase-multi-mut.rs:11:5 | LL | foo.method(&mut foo); | ^^^^------^--------^ @@ -9,7 +9,7 @@ LL | foo.method(&mut foo); | second mutable borrow occurs here error[E0499]: cannot borrow `foo` as mutable more than once at a time - --> $DIR/two-phase-multi-mut.rs:13:16 + --> $DIR/two-phase-multi-mut.rs:11:16 | LL | foo.method(&mut foo); | --- ------ ^^^^^^^^ second mutable borrow occurs here diff --git a/src/test/ui/borrowck/two-phase-multiple-activations.rs b/src/test/ui/borrowck/two-phase-multiple-activations.rs index 38ba094864..a7fa7fac13 100644 --- a/src/test/ui/borrowck/two-phase-multiple-activations.rs +++ b/src/test/ui/borrowck/two-phase-multiple-activations.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z borrowck=mir -Z two-phase-borrows +// compile-flags: -Z borrowck=mir // run-pass diff --git a/src/test/ui/borrowck/two-phase-nonrecv-autoref.ast.nll.stderr b/src/test/ui/borrowck/two-phase-nonrecv-autoref.ast.nll.stderr deleted file mode 100644 index 223de36f0d..0000000000 --- a/src/test/ui/borrowck/two-phase-nonrecv-autoref.ast.nll.stderr +++ /dev/null @@ -1,71 +0,0 @@ -error[E0499]: cannot borrow `*f` as mutable more than once at a time - --> $DIR/two-phase-nonrecv-autoref.rs:60:11 - | -LL | f(f(10)); - | - ^ second mutable borrow occurs here - | | - | first mutable borrow occurs here - | first borrow later used by call - -error[E0382]: use of moved value: `f` - --> $DIR/two-phase-nonrecv-autoref.rs:69:11 - | -LL | fn twice_ten_so i32>(f: Box) { - | - move occurs because `f` has type `std::boxed::Box`, which does not implement the `Copy` trait -LL | f(f(10)); - | - ^ value used here after move - | | - | value moved here - -error[E0499]: cannot borrow `*f` as mutable more than once at a time - --> $DIR/two-phase-nonrecv-autoref.rs:76:11 - | -LL | f(f(10)); - | - ^ second mutable borrow occurs here - | | - | first mutable borrow occurs here - | first borrow later used by call - -error[E0382]: use of moved value: `f` - --> $DIR/two-phase-nonrecv-autoref.rs:85:11 - | -LL | fn twice_ten_oo(f: Box i32>) { - | - move occurs because `f` has type `std::boxed::Box i32>`, which does not implement the `Copy` trait -LL | f(f(10)); - | - ^ value used here after move - | | - | value moved here - -error[E0502]: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-nonrecv-autoref.rs:125:27 - | -LL | double_access(&mut a, &a); - | ------------- ------ ^^ immutable borrow occurs here - | | | - | | mutable borrow occurs here - | mutable borrow later used by call - -error[E0502]: cannot borrow `i` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-nonrecv-autoref.rs:153:7 - | -LL | i[i[3]] = 4; - | --^---- - | | | - | | immutable borrow occurs here - | mutable borrow occurs here - | mutable borrow later used here - -error[E0502]: cannot borrow `i` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-nonrecv-autoref.rs:159:7 - | -LL | i[i[3]] = i[4]; - | --^---- - | | | - | | immutable borrow occurs here - | mutable borrow occurs here - | mutable borrow later used here - -error: aborting due to 7 previous errors - -Some errors occurred: E0382, E0499, E0502. -For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/two-phase-nonrecv-autoref.ast.stderr b/src/test/ui/borrowck/two-phase-nonrecv-autoref.ast.stderr deleted file mode 100644 index d98b272944..0000000000 --- a/src/test/ui/borrowck/two-phase-nonrecv-autoref.ast.stderr +++ /dev/null @@ -1,113 +0,0 @@ -error[E0503]: cannot use `*x` because it was mutably borrowed - --> $DIR/two-phase-nonrecv-autoref.rs:31:12 - | -LL | foo(x, *x); - | - ^^ use of borrowed `*x` - | | - | borrow of `*x` occurs here - -error[E0499]: cannot borrow `*f` as mutable more than once at a time - --> $DIR/two-phase-nonrecv-autoref.rs:60:11 - | -LL | f(f(10)); - | - ^ - first borrow ends here - | | | - | | second mutable borrow occurs here - | first mutable borrow occurs here - -error[E0382]: use of moved value: `f` - --> $DIR/two-phase-nonrecv-autoref.rs:69:11 - | -LL | f(f(10)); - | - ^ value used here after move - | | - | value moved here - | - = note: move occurs because `f` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0499]: cannot borrow `*f` as mutable more than once at a time - --> $DIR/two-phase-nonrecv-autoref.rs:76:11 - | -LL | f(f(10)); - | - ^ - first borrow ends here - | | | - | | second mutable borrow occurs here - | first mutable borrow occurs here - -error[E0382]: use of moved value: `f` - --> $DIR/two-phase-nonrecv-autoref.rs:85:11 - | -LL | f(f(10)); - | - ^ value used here after move - | | - | value moved here - | - = note: move occurs because `f` has type `std::boxed::Box<(dyn std::ops::FnOnce(i32) -> i32 + 'static)>`, which does not implement the `Copy` trait - -error[E0502]: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-nonrecv-autoref.rs:125:28 - | -LL | double_access(&mut a, &a); - | - ^- mutable borrow ends here - | | | - | | immutable borrow occurs here - | mutable borrow occurs here - -error[E0502]: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-nonrecv-autoref.rs:131:9 - | -LL | a.m(a.i(10)); - | - ^ - mutable borrow ends here - | | | - | | immutable borrow occurs here - | mutable borrow occurs here - -error[E0502]: cannot borrow `i` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-nonrecv-autoref.rs:153:7 - | -LL | i[i[3]] = 4; - | - ^ - mutable borrow ends here - | | | - | | immutable borrow occurs here - | mutable borrow occurs here - -error[E0502]: cannot borrow `i` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-nonrecv-autoref.rs:159:7 - | -LL | i[i[3]] = i[4]; - | - ^ - mutable borrow ends here - | | | - | | immutable borrow occurs here - | mutable borrow occurs here - -error[E0502]: cannot borrow `v` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-nonrecv-autoref.rs:168:12 - | -LL | v.push(v.len()); - | - ^ - mutable borrow ends here - | | | - | | immutable borrow occurs here - | mutable borrow occurs here - -error[E0502]: cannot borrow `s` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-nonrecv-autoref.rs:179:9 - | -LL | s.m(s.i(10)); - | - ^ - mutable borrow ends here - | | | - | | immutable borrow occurs here - | mutable borrow occurs here - -error[E0502]: cannot borrow `t` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-nonrecv-autoref.rs:184:9 - | -LL | t.m(t.i(10)); - | - ^ - mutable borrow ends here - | | | - | | immutable borrow occurs here - | mutable borrow occurs here - -error: aborting due to 12 previous errors - -Some errors occurred: E0382, E0499, E0502, E0503. -For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/two-phase-nonrecv-autoref.nll.stderr b/src/test/ui/borrowck/two-phase-nonrecv-autoref.nll.stderr index 223de36f0d..fca425da34 100644 --- a/src/test/ui/borrowck/two-phase-nonrecv-autoref.nll.stderr +++ b/src/test/ui/borrowck/two-phase-nonrecv-autoref.nll.stderr @@ -1,5 +1,5 @@ error[E0499]: cannot borrow `*f` as mutable more than once at a time - --> $DIR/two-phase-nonrecv-autoref.rs:60:11 + --> $DIR/two-phase-nonrecv-autoref.rs:58:11 | LL | f(f(10)); | - ^ second mutable borrow occurs here @@ -8,7 +8,7 @@ LL | f(f(10)); | first borrow later used by call error[E0382]: use of moved value: `f` - --> $DIR/two-phase-nonrecv-autoref.rs:69:11 + --> $DIR/two-phase-nonrecv-autoref.rs:66:11 | LL | fn twice_ten_so i32>(f: Box) { | - move occurs because `f` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -18,7 +18,7 @@ LL | f(f(10)); | value moved here error[E0499]: cannot borrow `*f` as mutable more than once at a time - --> $DIR/two-phase-nonrecv-autoref.rs:76:11 + --> $DIR/two-phase-nonrecv-autoref.rs:72:11 | LL | f(f(10)); | - ^ second mutable borrow occurs here @@ -27,7 +27,7 @@ LL | f(f(10)); | first borrow later used by call error[E0382]: use of moved value: `f` - --> $DIR/two-phase-nonrecv-autoref.rs:85:11 + --> $DIR/two-phase-nonrecv-autoref.rs:80:11 | LL | fn twice_ten_oo(f: Box i32>) { | - move occurs because `f` has type `std::boxed::Box i32>`, which does not implement the `Copy` trait @@ -37,7 +37,7 @@ LL | f(f(10)); | value moved here error[E0502]: cannot borrow `a` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-nonrecv-autoref.rs:125:27 + --> $DIR/two-phase-nonrecv-autoref.rs:119:27 | LL | double_access(&mut a, &a); | ------------- ------ ^^ immutable borrow occurs here @@ -46,7 +46,7 @@ LL | double_access(&mut a, &a); | mutable borrow later used by call error[E0502]: cannot borrow `i` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-nonrecv-autoref.rs:153:7 + --> $DIR/two-phase-nonrecv-autoref.rs:145:7 | LL | i[i[3]] = 4; | --^---- @@ -56,7 +56,7 @@ LL | i[i[3]] = 4; | mutable borrow later used here error[E0502]: cannot borrow `i` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-nonrecv-autoref.rs:159:7 + --> $DIR/two-phase-nonrecv-autoref.rs:150:7 | LL | i[i[3]] = i[4]; | --^---- @@ -67,5 +67,5 @@ LL | i[i[3]] = i[4]; error: aborting due to 7 previous errors -Some errors occurred: E0382, E0499, E0502. +Some errors have detailed explanations: E0382, E0499, E0502. For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/two-phase-nonrecv-autoref.rs b/src/test/ui/borrowck/two-phase-nonrecv-autoref.rs index 1005da0529..c0a117d676 100644 --- a/src/test/ui/borrowck/two-phase-nonrecv-autoref.rs +++ b/src/test/ui/borrowck/two-phase-nonrecv-autoref.rs @@ -1,8 +1,7 @@ -// revisions: ast nll -//[ast]compile-flags: -//[nll]compile-flags: -Z borrowck=mir -Z two-phase-borrows +// revisions: nll +//[nll]compile-flags: -Z borrowck=mir -//[g2p]compile-flags: -Z borrowck=mir -Z two-phase-borrows -Z two-phase-beyond-autoref +//[g2p]compile-flags: -Z borrowck=mir -Z two-phase-beyond-autoref // the above revision is disabled until two-phase-beyond-autoref support is better // This is a test checking that when we limit two-phase borrows to @@ -29,7 +28,6 @@ fn foo(x: &mut u32, y: u32) { fn deref_coercion(x: &mut u32) { foo(x, *x); - //[ast]~^ ERROR cannot use `*x` because it was mutably borrowed [E0503] // Above error is a known limitation of AST borrowck } @@ -60,7 +58,6 @@ fn overloaded_call_traits() { f(f(10)); //[nll]~^ ERROR cannot borrow `*f` as mutable more than once at a time //[g2p]~^^ ERROR cannot borrow `*f` as mutable more than once at a time - //[ast]~^^^ ERROR cannot borrow `*f` as mutable more than once at a time } fn twice_ten_si i32>(f: &mut F) { f(f(10)); @@ -69,14 +66,12 @@ fn overloaded_call_traits() { f(f(10)); //[nll]~^ ERROR use of moved value: `f` //[g2p]~^^ ERROR use of moved value: `f` - //[ast]~^^^ ERROR use of moved value: `f` } fn twice_ten_om(f: &mut FnMut(i32) -> i32) { f(f(10)); //[nll]~^ ERROR cannot borrow `*f` as mutable more than once at a time //[g2p]~^^ ERROR cannot borrow `*f` as mutable more than once at a time - //[ast]~^^^ ERROR cannot borrow `*f` as mutable more than once at a time } fn twice_ten_oi(f: &mut Fn(i32) -> i32) { f(f(10)); @@ -85,7 +80,6 @@ fn overloaded_call_traits() { f(f(10)); //[nll]~^ ERROR use of moved value: `f` //[g2p]~^^ ERROR use of moved value: `f` - //[ast]~^^^ ERROR use of moved value: `f` } twice_ten_sm(&mut |x| x + 1); @@ -125,11 +119,9 @@ fn coerce_unsized() { double_access(&mut a, &a); //[nll]~^ ERROR cannot borrow `a` as immutable because it is also borrowed as mutable [E0502] //[g2p]~^^ ERROR cannot borrow `a` as immutable because it is also borrowed as mutable [E0502] - //[ast]~^^^ ERROR cannot borrow `a` as immutable because it is also borrowed as mutable [E0502] // But this is okay. a.m(a.i(10)); - //[ast]~^ ERROR cannot borrow `a` as immutable because it is also borrowed as mutable [E0502] // Above error is an expected limitation of AST borrowck } @@ -152,13 +144,11 @@ fn coerce_index_op() { let mut i = I(10); i[i[3]] = 4; //[nll]~^ ERROR cannot borrow `i` as immutable because it is also borrowed as mutable [E0502] - //[ast]~^^ ERROR cannot borrow `i` as immutable because it is also borrowed as mutable [E0502] i[3] = i[4]; i[i[3]] = i[4]; //[nll]~^ ERROR cannot borrow `i` as immutable because it is also borrowed as mutable [E0502] - //[ast]~^^ ERROR cannot borrow `i` as immutable because it is also borrowed as mutable [E0502] } fn main() { @@ -166,7 +156,6 @@ fn main() { // As a reminder, this is the basic case we want to ensure we handle. let mut v = vec![1, 2, 3]; v.push(v.len()); - //[ast]~^ ERROR cannot borrow `v` as immutable because it is also borrowed as mutable [E0502] // Error above is an expected limitation of AST borrowck // (as a rule, pnkfelix does not like to write tests with dead code.) @@ -177,12 +166,10 @@ fn main() { let mut s = S; s.m(s.i(10)); - //[ast]~^ ERROR cannot borrow `s` as immutable because it is also borrowed as mutable [E0502] // Error above is an expected limitation of AST borrowck let mut t = T; t.m(t.i(10)); - //[ast]~^ ERROR cannot borrow `t` as immutable because it is also borrowed as mutable [E0502] // Error above is an expected limitation of AST borrowck coerce_unsized(); diff --git a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.ast.stderr b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.ast.stderr deleted file mode 100644 index 28c997efc8..0000000000 --- a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.ast.stderr +++ /dev/null @@ -1,36 +0,0 @@ -error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-reservation-sharing-interference-2.rs:19:5 - | -LL | let shared = &v; - | - immutable borrow occurs here -LL | -LL | v.extend(shared); - | ^ mutable borrow occurs here -... -LL | } - | - immutable borrow ends here - -error[E0502]: cannot borrow `v` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-reservation-sharing-interference-2.rs:30:15 - | -LL | v.extend(&v); - | - ^- mutable borrow ends here - | | | - | | immutable borrow occurs here - | mutable borrow occurs here - -error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-reservation-sharing-interference-2.rs:42:5 - | -LL | let shared = &v; - | - immutable borrow occurs here -LL | -LL | v.push(shared.len()); - | ^ mutable borrow occurs here -... -LL | } - | - immutable borrow ends here - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2015.stderr b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2015.stderr index bb11b2e4f0..8eb468892f 100644 --- a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2015.stderr +++ b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2015.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-reservation-sharing-interference-2.rs:19:5 + --> $DIR/two-phase-reservation-sharing-interference-2.rs:18:5 | LL | let shared = &v; | -- immutable borrow occurs here @@ -11,7 +11,7 @@ LL | v.extend(shared); | mutable borrow occurs here error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-reservation-sharing-interference-2.rs:30:5 + --> $DIR/two-phase-reservation-sharing-interference-2.rs:28:5 | LL | v.extend(&v); | ^^------^--^ @@ -21,7 +21,7 @@ LL | v.extend(&v); | mutable borrow occurs here warning: cannot borrow `v` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-reservation-sharing-interference-2.rs:42:5 + --> $DIR/two-phase-reservation-sharing-interference-2.rs:39:5 | LL | let shared = &v; | -- immutable borrow occurs here diff --git a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2018.stderr b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2018.stderr index bb11b2e4f0..8eb468892f 100644 --- a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2018.stderr +++ b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2018.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-reservation-sharing-interference-2.rs:19:5 + --> $DIR/two-phase-reservation-sharing-interference-2.rs:18:5 | LL | let shared = &v; | -- immutable borrow occurs here @@ -11,7 +11,7 @@ LL | v.extend(shared); | mutable borrow occurs here error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-reservation-sharing-interference-2.rs:30:5 + --> $DIR/two-phase-reservation-sharing-interference-2.rs:28:5 | LL | v.extend(&v); | ^^------^--^ @@ -21,7 +21,7 @@ LL | v.extend(&v); | mutable borrow occurs here warning: cannot borrow `v` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-reservation-sharing-interference-2.rs:42:5 + --> $DIR/two-phase-reservation-sharing-interference-2.rs:39:5 | LL | let shared = &v; | -- immutable borrow occurs here diff --git a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.nll2015.stderr b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.nll2015.stderr index fb3a1fda63..730741c7a9 100644 --- a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.nll2015.stderr +++ b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.nll2015.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-reservation-sharing-interference-2.rs:19:5 + --> $DIR/two-phase-reservation-sharing-interference-2.rs:18:5 | LL | let shared = &v; | -- immutable borrow occurs here @@ -10,7 +10,7 @@ LL | v.extend(shared); | mutable borrow occurs here error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-reservation-sharing-interference-2.rs:30:5 + --> $DIR/two-phase-reservation-sharing-interference-2.rs:28:5 | LL | v.extend(&v); | ^^------^--^ @@ -20,7 +20,7 @@ LL | v.extend(&v); | mutable borrow occurs here error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-reservation-sharing-interference-2.rs:42:5 + --> $DIR/two-phase-reservation-sharing-interference-2.rs:39:5 | LL | let shared = &v; | -- immutable borrow occurs here diff --git a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.nll2018.stderr b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.nll2018.stderr index fb3a1fda63..730741c7a9 100644 --- a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.nll2018.stderr +++ b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.nll2018.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-reservation-sharing-interference-2.rs:19:5 + --> $DIR/two-phase-reservation-sharing-interference-2.rs:18:5 | LL | let shared = &v; | -- immutable borrow occurs here @@ -10,7 +10,7 @@ LL | v.extend(shared); | mutable borrow occurs here error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-reservation-sharing-interference-2.rs:30:5 + --> $DIR/two-phase-reservation-sharing-interference-2.rs:28:5 | LL | v.extend(&v); | ^^------^--^ @@ -20,7 +20,7 @@ LL | v.extend(&v); | mutable borrow occurs here error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-reservation-sharing-interference-2.rs:42:5 + --> $DIR/two-phase-reservation-sharing-interference-2.rs:39:5 | LL | let shared = &v; | -- immutable borrow occurs here diff --git a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.rs b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.rs index 54fad9f66b..de1af3aaa0 100644 --- a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.rs +++ b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.rs @@ -1,12 +1,11 @@ // Test for #56254, we previously allowed the last example on the 2018 -// editiion. Make sure that we now emit a warning in that case and an error for +// edition. Make sure that we now emit a warning in that case and an error for // everyone else. //ignore-compare-mode-nll -//revisions: ast migrate2015 migrate2018 nll2015 nll2018 +//revisions: migrate2015 migrate2018 nll2015 nll2018 -//[migrate2015] compile-flags: -Zborrowck=migrate -Ztwo-phase-borrows //[migrate2018] edition:2018 //[nll2018] edition:2018 @@ -21,7 +20,6 @@ fn double_conflicts() { //[nll2015]~^^ ERROR cannot borrow `v` as mutable //[migrate2018]~^^^ ERROR cannot borrow `v` as mutable //[nll2018]~^^^^ ERROR cannot borrow `v` as mutable - //[ast]~^^^^^ ERROR cannot borrow `v` as mutable } fn activation_conflict() { @@ -32,7 +30,6 @@ fn activation_conflict() { //[nll2015]~^^ ERROR cannot borrow `v` as mutable //[migrate2018]~^^^ ERROR cannot borrow `v` as mutable //[nll2018]~^^^^ ERROR cannot borrow `v` as mutable - //[ast]~^^^^^ ERROR cannot borrow `v` as immutable } fn reservation_conflict() { @@ -47,8 +44,6 @@ fn reservation_conflict() { //[migrate2018]~^^^^^^ WARNING cannot borrow `v` as mutable //[migrate2018]~| WARNING may become a hard error in the future - - //[ast]~^^^^^^^^^ ERROR cannot borrow `v` as mutable } fn main() {} diff --git a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-future-compat-lint.nll.stderr b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-future-compat-lint.nll.stderr new file mode 100644 index 0000000000..d2ea5ab207 --- /dev/null +++ b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-future-compat-lint.nll.stderr @@ -0,0 +1,36 @@ +error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable + --> $DIR/two-phase-reservation-sharing-interference-future-compat-lint.rs:13:9 + | +LL | let shared = &v; + | -- immutable borrow occurs here +LL | +LL | v.push(shared.len()); + | ^ ------ immutable borrow later used here + | | + | mutable borrow occurs here + +error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable + --> $DIR/two-phase-reservation-sharing-interference-future-compat-lint.rs:24:9 + | +LL | let shared = &v; + | -- immutable borrow occurs here +LL | +LL | v.push(shared.len()); + | ^ ------ immutable borrow later used here + | | + | mutable borrow occurs here + +error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immutable + --> $DIR/two-phase-reservation-sharing-interference-future-compat-lint.rs:37:9 + | +LL | let shared = &v; + | -- immutable borrow occurs here +LL | +LL | v.push(shared.len()); + | ^ ------ immutable borrow later used here + | | + | mutable borrow occurs here + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/borrowck/two-phase-reservation-sharing-interference.rs b/src/test/ui/borrowck/two-phase-reservation-sharing-interference.rs index f5fa8218ed..de6f66c1c3 100644 --- a/src/test/ui/borrowck/two-phase-reservation-sharing-interference.rs +++ b/src/test/ui/borrowck/two-phase-reservation-sharing-interference.rs @@ -3,10 +3,10 @@ // revisions: nll_target // The following revisions are disabled due to missing support from two-phase beyond autorefs -//[nll_beyond]compile-flags: -Z borrowck=mir -Z two-phase-borrows -Z two-phase-beyond-autoref +//[nll_beyond]compile-flags: -Z borrowck=mir -Z two-phase-beyond-autoref //[nll_beyond] should-fail -//[nll_target]compile-flags: -Z borrowck=mir -Z two-phase-borrows +//[nll_target]compile-flags: -Z borrowck=mir // This is a corner case that the current implementation is (probably) // treating more conservatively than is necessary. But it also does @@ -47,4 +47,3 @@ fn main() { // flummoxes our attmpt to delay the activation point here.) delay.push(2); } - diff --git a/src/test/ui/borrowck/two-phase-sneaky.nll.stderr b/src/test/ui/borrowck/two-phase-sneaky.nll.stderr deleted file mode 100644 index c66f3cbed9..0000000000 --- a/src/test/ui/borrowck/two-phase-sneaky.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0499]: cannot borrow `v` as mutable more than once at a time - --> $DIR/two-phase-sneaky.rs:12:9 - | -LL | v[0].push_str({ - | - -------- first borrow later used by call - | | - | first mutable borrow occurs here -LL | -LL | v.push(format!("foo")); - | ^ second mutable borrow occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/two-phase-sneaky.rs b/src/test/ui/borrowck/two-phase-sneaky.rs index abfa13da6a..b6e33d5d1b 100644 --- a/src/test/ui/borrowck/two-phase-sneaky.rs +++ b/src/test/ui/borrowck/two-phase-sneaky.rs @@ -1,4 +1,4 @@ -// cmpile-flags: -Z borrowck=mir -Z two-phase-borrows +// cmpile-flags: -Z borrowck=mir // This is the first counter-example from Niko's blog post // smallcultfollowing.com/babysteps/blog/2017/03/01/nested-method-calls-via-two-phase-borrowing/ diff --git a/src/test/ui/borrowck/two-phase-sneaky.stderr b/src/test/ui/borrowck/two-phase-sneaky.stderr index 38f24ccd60..c66f3cbed9 100644 --- a/src/test/ui/borrowck/two-phase-sneaky.stderr +++ b/src/test/ui/borrowck/two-phase-sneaky.stderr @@ -2,13 +2,12 @@ error[E0499]: cannot borrow `v` as mutable more than once at a time --> $DIR/two-phase-sneaky.rs:12:9 | LL | v[0].push_str({ - | - first mutable borrow occurs here + | - -------- first borrow later used by call + | | + | first mutable borrow occurs here LL | LL | v.push(format!("foo")); | ^ second mutable borrow occurs here -... -LL | }); - | - first borrow ends here error: aborting due to previous error diff --git a/src/test/ui/borrowck/two-phase-surprise-no-conflict.ast.stderr b/src/test/ui/borrowck/two-phase-surprise-no-conflict.ast.stderr deleted file mode 100644 index a2e5c7e88e..0000000000 --- a/src/test/ui/borrowck/two-phase-surprise-no-conflict.ast.stderr +++ /dev/null @@ -1,133 +0,0 @@ -error[E0503]: cannot use `self.cx` because it was mutably borrowed - --> $DIR/two-phase-surprise-no-conflict.rs:30:13 - | -LL | let _mut_borrow = &mut *self; - | ----- borrow of `*self` occurs here -LL | let _access = self.cx; - | ^^^^^^^ use of borrowed `*self` - -error[E0502]: cannot borrow `*self.cx_mut` as immutable because `*self` is also borrowed as mutable - --> $DIR/two-phase-surprise-no-conflict.rs:69:33 - | -LL | self.hash_expr(&self.cx_mut.body(eid).value); - | ---- ^^^^^^^^^^^ - mutable borrow ends here - | | | - | | immutable borrow occurs here - | mutable borrow occurs here - -error[E0502]: cannot borrow `reg.sess_mut` as immutable because `*reg` is also borrowed as mutable - --> $DIR/two-phase-surprise-no-conflict.rs:121:52 - | -LL | reg.register_static(Box::new(TrivialPass::new(®.sess_mut))); - | --- ^^^^^^^^^^^^ - mutable borrow ends here - | | | - | mutable borrow occurs here immutable borrow occurs here - -error[E0502]: cannot borrow `reg.sess_mut` as immutable because `*reg` is also borrowed as mutable - --> $DIR/two-phase-surprise-no-conflict.rs:125:51 - | -LL | reg.register_bound(Box::new(TrivialPass::new(®.sess_mut))); - | --- ^^^^^^^^^^^^ - mutable borrow ends here - | | | - | mutable borrow occurs here immutable borrow occurs here - -error[E0502]: cannot borrow `reg.sess_mut` as immutable because `*reg` is also borrowed as mutable - --> $DIR/two-phase-surprise-no-conflict.rs:129:50 - | -LL | reg.register_univ(Box::new(TrivialPass::new(®.sess_mut))); - | --- ^^^^^^^^^^^^ - mutable borrow ends here - | | | - | mutable borrow occurs here immutable borrow occurs here - -error[E0502]: cannot borrow `reg.sess_mut` as immutable because `*reg` is also borrowed as mutable - --> $DIR/two-phase-surprise-no-conflict.rs:133:41 - | -LL | reg.register_ref(&TrivialPass::new(®.sess_mut)); - | --- ^^^^^^^^^^^^ - mutable borrow ends here - | | | - | mutable borrow occurs here immutable borrow occurs here - -error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:141:56 - | -LL | reg.register_static(Box::new(TrivialPass::new(&mut reg.sess_mut))); - | --- ^^^^^^^^^^^^ - first borrow ends here - | | | - | first mutable borrow occurs here second mutable borrow occurs here - -error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:146:59 - | -LL | reg.register_bound(Box::new(TrivialPass::new_mut(&mut reg.sess_mut))); - | --- ^^^^^^^^^^^^ - first borrow ends here - | | | - | first mutable borrow occurs here second mutable borrow occurs here - -error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:151:58 - | -LL | reg.register_univ(Box::new(TrivialPass::new_mut(&mut reg.sess_mut))); - | --- ^^^^^^^^^^^^ - first borrow ends here - | | | - | first mutable borrow occurs here second mutable borrow occurs here - -error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:156:49 - | -LL | reg.register_ref(&TrivialPass::new_mut(&mut reg.sess_mut)); - | --- ^^^^^^^^^^^^ - first borrow ends here - | | | - | first mutable borrow occurs here second mutable borrow occurs here - -error[E0502]: cannot borrow `reg.sess_mut` as immutable because `*reg` is also borrowed as mutable - --> $DIR/two-phase-surprise-no-conflict.rs:168:51 - | -LL | reg.register_bound(Box::new(CapturePass::new(®.sess_mut))); - | --- ^^^^^^^^^^^^ - mutable borrow ends here - | | | - | mutable borrow occurs here immutable borrow occurs here - -error[E0502]: cannot borrow `reg.sess_mut` as immutable because `*reg` is also borrowed as mutable - --> $DIR/two-phase-surprise-no-conflict.rs:173:50 - | -LL | reg.register_univ(Box::new(CapturePass::new(®.sess_mut))); - | --- ^^^^^^^^^^^^ - mutable borrow ends here - | | | - | mutable borrow occurs here immutable borrow occurs here - -error[E0502]: cannot borrow `reg.sess_mut` as immutable because `*reg` is also borrowed as mutable - --> $DIR/two-phase-surprise-no-conflict.rs:178:41 - | -LL | reg.register_ref(&CapturePass::new(®.sess_mut)); - | --- ^^^^^^^^^^^^ - mutable borrow ends here - | | | - | mutable borrow occurs here immutable borrow occurs here - -error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:190:59 - | -LL | reg.register_bound(Box::new(CapturePass::new_mut(&mut reg.sess_mut))); - | --- ^^^^^^^^^^^^ - first borrow ends here - | | | - | first mutable borrow occurs here second mutable borrow occurs here - -error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:196:58 - | -LL | reg.register_univ(Box::new(CapturePass::new_mut(&mut reg.sess_mut))); - | --- ^^^^^^^^^^^^ - first borrow ends here - | | | - | first mutable borrow occurs here second mutable borrow occurs here - -error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:202:49 - | -LL | reg.register_ref(&CapturePass::new_mut(&mut reg.sess_mut)); - | --- ^^^^^^^^^^^^ - first borrow ends here - | | | - | first mutable borrow occurs here second mutable borrow occurs here - -error: aborting due to 16 previous errors - -Some errors occurred: E0499, E0502, E0503. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/two-phase-surprise-no-conflict.no2pb.stderr b/src/test/ui/borrowck/two-phase-surprise-no-conflict.no2pb.stderr deleted file mode 100644 index 9b46567318..0000000000 --- a/src/test/ui/borrowck/two-phase-surprise-no-conflict.no2pb.stderr +++ /dev/null @@ -1,159 +0,0 @@ -error[E0503]: cannot use `self.cx` because it was mutably borrowed - --> $DIR/two-phase-surprise-no-conflict.rs:30:23 - | -LL | let _mut_borrow = &mut *self; - | ---------- borrow of `*self` occurs here -LL | let _access = self.cx; - | ^^^^^^^ use of borrowed `*self` -... -LL | _mut_borrow; - | ----------- borrow later used here - -error[E0502]: cannot borrow `*self.cx` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-surprise-no-conflict.rs:54:33 - | -LL | self.hash_expr(&self.cx.body(eid).value); - | ---- --------- ^^^^^^^ immutable borrow occurs here - | | | - | | mutable borrow later used by call - | mutable borrow occurs here - -error[E0502]: cannot borrow `*self.cx_mut` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-surprise-no-conflict.rs:69:33 - | -LL | self.hash_expr(&self.cx_mut.body(eid).value); - | ---- --------- ^^^^^^^^^^^ immutable borrow occurs here - | | | - | | mutable borrow later used by call - | mutable borrow occurs here - -error[E0502]: cannot borrow `reg.sess_mut` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-surprise-no-conflict.rs:121:51 - | -LL | reg.register_static(Box::new(TrivialPass::new(®.sess_mut))); - | --- --------------- ^^^^^^^^^^^^^ immutable borrow occurs here - | | | - | | mutable borrow later used by call - | mutable borrow occurs here - -error[E0502]: cannot borrow `reg.sess_mut` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-surprise-no-conflict.rs:125:50 - | -LL | reg.register_bound(Box::new(TrivialPass::new(®.sess_mut))); - | --- -------------- ^^^^^^^^^^^^^ immutable borrow occurs here - | | | - | | mutable borrow later used by call - | mutable borrow occurs here - -error[E0502]: cannot borrow `reg.sess_mut` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-surprise-no-conflict.rs:129:49 - | -LL | reg.register_univ(Box::new(TrivialPass::new(®.sess_mut))); - | --- ------------- ^^^^^^^^^^^^^ immutable borrow occurs here - | | | - | | mutable borrow later used by call - | mutable borrow occurs here - -error[E0502]: cannot borrow `reg.sess_mut` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-surprise-no-conflict.rs:133:40 - | -LL | reg.register_ref(&TrivialPass::new(®.sess_mut)); - | --- ------------ ^^^^^^^^^^^^^ immutable borrow occurs here - | | | - | | mutable borrow later used by call - | mutable borrow occurs here - -error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:141:51 - | -LL | reg.register_static(Box::new(TrivialPass::new(&mut reg.sess_mut))); - | --- --------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here - | | | - | | first borrow later used by call - | first mutable borrow occurs here - -error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:146:54 - | -LL | reg.register_bound(Box::new(TrivialPass::new_mut(&mut reg.sess_mut))); - | --- -------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here - | | | - | | first borrow later used by call - | first mutable borrow occurs here - -error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:151:53 - | -LL | reg.register_univ(Box::new(TrivialPass::new_mut(&mut reg.sess_mut))); - | --- ------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here - | | | - | | first borrow later used by call - | first mutable borrow occurs here - -error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:156:44 - | -LL | reg.register_ref(&TrivialPass::new_mut(&mut reg.sess_mut)); - | --- ------------ ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here - | | | - | | first borrow later used by call - | first mutable borrow occurs here - -error[E0502]: cannot borrow `reg.sess_mut` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-surprise-no-conflict.rs:168:50 - | -LL | reg.register_bound(Box::new(CapturePass::new(®.sess_mut))); - | --- -------------- ^^^^^^^^^^^^^ immutable borrow occurs here - | | | - | | mutable borrow later used by call - | mutable borrow occurs here - -error[E0502]: cannot borrow `reg.sess_mut` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-surprise-no-conflict.rs:173:49 - | -LL | reg.register_univ(Box::new(CapturePass::new(®.sess_mut))); - | --- ------------- ^^^^^^^^^^^^^ immutable borrow occurs here - | | | - | | mutable borrow later used by call - | mutable borrow occurs here - -error[E0502]: cannot borrow `reg.sess_mut` as immutable because it is also borrowed as mutable - --> $DIR/two-phase-surprise-no-conflict.rs:178:40 - | -LL | reg.register_ref(&CapturePass::new(®.sess_mut)); - | --- ------------ ^^^^^^^^^^^^^ immutable borrow occurs here - | | | - | | mutable borrow later used by call - | mutable borrow occurs here - -error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:190:54 - | -LL | reg.register_bound(Box::new(CapturePass::new_mut(&mut reg.sess_mut))); - | --- -------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here - | | | - | | first borrow later used by call - | first mutable borrow occurs here - -error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:196:53 - | -LL | reg.register_univ(Box::new(CapturePass::new_mut(&mut reg.sess_mut))); - | --- ------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here - | | | - | | first borrow later used by call - | first mutable borrow occurs here - -error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:202:44 - | -LL | reg.register_ref(&CapturePass::new_mut(&mut reg.sess_mut)); - | --- ------------ ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here - | | | - | | first borrow later used by call - | first mutable borrow occurs here - -error: aborting due to 17 previous errors - -Some errors occurred: E0499, E0502, E0503. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/two-phase-surprise-no-conflict.rs b/src/test/ui/borrowck/two-phase-surprise-no-conflict.rs index f097defa22..3fd24bbf29 100644 --- a/src/test/ui/borrowck/two-phase-surprise-no-conflict.rs +++ b/src/test/ui/borrowck/two-phase-surprise-no-conflict.rs @@ -5,15 +5,6 @@ // that we decided it warranted its own unit test, and pnkfelix // decided to use that test as an opportunity to illustrate the cases. -// revisions: ast no2pb nll -//[ast]compile-flags: -Z borrowck=ast -//[no2pb]compile-flags: -Z borrowck=mir -//[nll]compile-flags: -Z borrowck=mir -Z two-phase-borrows - -// (Since we are manually toggling NLL variations on and off, don't -// bother with compare-mode=nll) -// ignore-compare-mode-nll - #[derive(Copy, Clone)] struct BodyId; enum Expr { Closure(BodyId), Others } @@ -28,9 +19,7 @@ impl <'a> SpanlessHash<'a> { fn demo(&mut self) { let _mut_borrow = &mut *self; let _access = self.cx; - //[ast]~^ ERROR cannot use `self.cx` because it was mutably borrowed [E0503] - //[no2pb]~^^ ERROR cannot use `self.cx` because it was mutably borrowed [E0503] - //[nll]~^^^ ERROR cannot use `self.cx` because it was mutably borrowed [E0503] + //~^ ERROR cannot use `self.cx` because it was mutably borrowed [E0503] _mut_borrow; } @@ -52,7 +41,6 @@ impl <'a> SpanlessHash<'a> { // nothing in the activation for `self.hash_expr(..)` // can interfere with that immutable borrow. self.hash_expr(&self.cx.body(eid).value); - //[no2pb]~^ ERROR cannot borrow `*self.cx` }, _ => {} } @@ -67,9 +55,7 @@ impl <'a> SpanlessHash<'a> { // eventual activation of the `self` mutable borrow // for `self.hash_expr(..)` self.hash_expr(&self.cx_mut.body(eid).value); - //[ast]~^ ERROR cannot borrow `*self.cx_mut` - //[no2pb]~^^ ERROR cannot borrow `*self.cx_mut` - //[nll]~^^^ ERROR cannot borrow `*self` + //~^ ERROR cannot borrow `*self` }, _ => {} } @@ -119,44 +105,28 @@ fn register_plugins<'a>(mk_reg: impl Fn() -> &'a mut Registry<'a>) { // cannot (according to its type) keep them alive. let reg = mk_reg(); reg.register_static(Box::new(TrivialPass::new(®.sess_mut))); - //[ast]~^ ERROR cannot borrow `reg.sess_mut` - //[no2pb]~^^ ERROR cannot borrow `reg.sess_mut` let reg = mk_reg(); reg.register_bound(Box::new(TrivialPass::new(®.sess_mut))); - //[ast]~^ ERROR cannot borrow `reg.sess_mut` - //[no2pb]~^^ ERROR cannot borrow `reg.sess_mut` let reg = mk_reg(); reg.register_univ(Box::new(TrivialPass::new(®.sess_mut))); - //[ast]~^ ERROR cannot borrow `reg.sess_mut` - //[no2pb]~^^ ERROR cannot borrow `reg.sess_mut` let reg = mk_reg(); reg.register_ref(&TrivialPass::new(®.sess_mut)); - //[ast]~^ ERROR cannot borrow `reg.sess_mut` - //[no2pb]~^^ ERROR cannot borrow `reg.sess_mut` // These are not okay: the inner mutable borrows immediately // conflict with the outer borrow/reservation, even with support // for two-phase borrows. let reg = mk_reg(); reg.register_static(Box::new(TrivialPass::new(&mut reg.sess_mut))); - //[ast]~^ ERROR cannot borrow `reg.sess_mut` - //[no2pb]~^^ ERROR cannot borrow `reg.sess_mut` - //[nll]~^^^ ERROR cannot borrow `reg.sess_mut` + //~^ ERROR cannot borrow `reg.sess_mut` let reg = mk_reg(); reg.register_bound(Box::new(TrivialPass::new_mut(&mut reg.sess_mut))); - //[ast]~^ ERROR cannot borrow `reg.sess_mut` - //[no2pb]~^^ ERROR cannot borrow `reg.sess_mut` - //[nll]~^^^ ERROR cannot borrow `reg.sess_mut` + //~^ ERROR cannot borrow `reg.sess_mut` let reg = mk_reg(); reg.register_univ(Box::new(TrivialPass::new_mut(&mut reg.sess_mut))); - //[ast]~^ ERROR cannot borrow `reg.sess_mut` - //[no2pb]~^^ ERROR cannot borrow `reg.sess_mut` - //[nll]~^^^ ERROR cannot borrow `reg.sess_mut` + //~^ ERROR cannot borrow `reg.sess_mut` let reg = mk_reg(); reg.register_ref(&TrivialPass::new_mut(&mut reg.sess_mut)); - //[ast]~^ ERROR cannot borrow `reg.sess_mut` - //[no2pb]~^^ ERROR cannot borrow `reg.sess_mut` - //[nll]~^^^ ERROR cannot borrow `reg.sess_mut` + //~^ ERROR cannot borrow `reg.sess_mut` // These are not okay: the inner borrows may reach the actual // method invocation, because `CapturePass::new` might (according @@ -166,19 +136,13 @@ fn register_plugins<'a>(mk_reg: impl Fn() -> &'a mut Registry<'a>) { // that will fail to get past lifetime inference.) let reg = mk_reg(); reg.register_bound(Box::new(CapturePass::new(®.sess_mut))); - //[ast]~^ ERROR cannot borrow `reg.sess_mut` - //[no2pb]~^^ ERROR cannot borrow `reg.sess_mut` - //[nll]~^^^ ERROR cannot borrow `*reg` as mutable + //~^ ERROR cannot borrow `*reg` as mutable let reg = mk_reg(); reg.register_univ(Box::new(CapturePass::new(®.sess_mut))); - //[ast]~^ ERROR cannot borrow `reg.sess_mut` - //[no2pb]~^^ ERROR cannot borrow `reg.sess_mut` - //[nll]~^^^ ERROR cannot borrow `*reg` as mutable + //~^ ERROR cannot borrow `*reg` as mutable let reg = mk_reg(); reg.register_ref(&CapturePass::new(®.sess_mut)); - //[ast]~^ ERROR cannot borrow `reg.sess_mut` - //[no2pb]~^^ ERROR cannot borrow `reg.sess_mut` - //[nll]~^^^ ERROR cannot borrow `*reg` as mutable + //~^ ERROR cannot borrow `*reg` as mutable // These are not okay: the inner mutable borrows immediately // conflict with the outer borrow/reservation, even with support @@ -188,22 +152,16 @@ fn register_plugins<'a>(mk_reg: impl Fn() -> &'a mut Registry<'a>) { // that will fail to get past lifetime inference.) let reg = mk_reg(); reg.register_bound(Box::new(CapturePass::new_mut(&mut reg.sess_mut))); - //[ast]~^ ERROR cannot borrow `reg.sess_mut` - //[no2pb]~^^ ERROR cannot borrow `reg.sess_mut` - //[nll]~^^^ ERROR cannot borrow `reg.sess_mut` as mutable more than once at a time - //[nll]~^^^^ ERROR cannot borrow `*reg` as mutable more than once at a time + //~^ ERROR cannot borrow `reg.sess_mut` as mutable more than once at a time + //~^^ ERROR cannot borrow `*reg` as mutable more than once at a time let reg = mk_reg(); reg.register_univ(Box::new(CapturePass::new_mut(&mut reg.sess_mut))); - //[ast]~^ ERROR cannot borrow `reg.sess_mut` - //[no2pb]~^^ ERROR cannot borrow `reg.sess_mut` - //[nll]~^^^ ERROR cannot borrow `reg.sess_mut` as mutable more than once at a time - //[nll]~^^^^ ERROR cannot borrow `*reg` as mutable more than once at a time + //~^ ERROR cannot borrow `reg.sess_mut` as mutable more than once at a time + //~^^ ERROR cannot borrow `*reg` as mutable more than once at a time let reg = mk_reg(); reg.register_ref(&CapturePass::new_mut(&mut reg.sess_mut)); - //[ast]~^ ERROR cannot borrow `reg.sess_mut` - //[no2pb]~^^ ERROR cannot borrow `reg.sess_mut` - //[nll]~^^^ ERROR cannot borrow `reg.sess_mut` as mutable more than once at a time - //[nll]~^^^^ ERROR cannot borrow `*reg` as mutable more than once at a time + //~^ ERROR cannot borrow `reg.sess_mut` as mutable more than once at a time + //~^^ ERROR cannot borrow `*reg` as mutable more than once at a time } fn main() { } diff --git a/src/test/ui/borrowck/two-phase-surprise-no-conflict.nll.stderr b/src/test/ui/borrowck/two-phase-surprise-no-conflict.stderr similarity index 88% rename from src/test/ui/borrowck/two-phase-surprise-no-conflict.nll.stderr rename to src/test/ui/borrowck/two-phase-surprise-no-conflict.stderr index 1ac3a69670..7d0e156675 100644 --- a/src/test/ui/borrowck/two-phase-surprise-no-conflict.nll.stderr +++ b/src/test/ui/borrowck/two-phase-surprise-no-conflict.stderr @@ -1,16 +1,16 @@ error[E0503]: cannot use `self.cx` because it was mutably borrowed - --> $DIR/two-phase-surprise-no-conflict.rs:30:23 + --> $DIR/two-phase-surprise-no-conflict.rs:21:23 | LL | let _mut_borrow = &mut *self; | ---------- borrow of `*self` occurs here LL | let _access = self.cx; | ^^^^^^^ use of borrowed `*self` -... +LL | LL | _mut_borrow; | ----------- borrow later used here error[E0502]: cannot borrow `*self` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-surprise-no-conflict.rs:69:17 + --> $DIR/two-phase-surprise-no-conflict.rs:57:17 | LL | self.hash_expr(&self.cx_mut.body(eid).value); | ^^^^^---------^^-----------^^^^^^^^^^^^^^^^^ @@ -20,7 +20,7 @@ LL | self.hash_expr(&self.cx_mut.body(eid).value); | mutable borrow occurs here error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:141:51 + --> $DIR/two-phase-surprise-no-conflict.rs:119:51 | LL | reg.register_static(Box::new(TrivialPass::new(&mut reg.sess_mut))); | --- --------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here @@ -29,7 +29,7 @@ LL | reg.register_static(Box::new(TrivialPass::new(&mut reg.sess_mut))); | first mutable borrow occurs here error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:146:54 + --> $DIR/two-phase-surprise-no-conflict.rs:122:54 | LL | reg.register_bound(Box::new(TrivialPass::new_mut(&mut reg.sess_mut))); | --- -------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here @@ -38,7 +38,7 @@ LL | reg.register_bound(Box::new(TrivialPass::new_mut(&mut reg.sess_mut))); | first mutable borrow occurs here error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:151:53 + --> $DIR/two-phase-surprise-no-conflict.rs:125:53 | LL | reg.register_univ(Box::new(TrivialPass::new_mut(&mut reg.sess_mut))); | --- ------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here @@ -47,7 +47,7 @@ LL | reg.register_univ(Box::new(TrivialPass::new_mut(&mut reg.sess_mut))); | first mutable borrow occurs here error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:156:44 + --> $DIR/two-phase-surprise-no-conflict.rs:128:44 | LL | reg.register_ref(&TrivialPass::new_mut(&mut reg.sess_mut)); | --- ------------ ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here @@ -56,7 +56,7 @@ LL | reg.register_ref(&TrivialPass::new_mut(&mut reg.sess_mut)); | first mutable borrow occurs here error[E0502]: cannot borrow `*reg` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-surprise-no-conflict.rs:168:5 + --> $DIR/two-phase-surprise-no-conflict.rs:138:5 | LL | reg.register_bound(Box::new(CapturePass::new(®.sess_mut))); | ^^^^--------------^^^^^^^^^^^^^^^^^^^^^^^^^^^-------------^^^ @@ -66,7 +66,7 @@ LL | reg.register_bound(Box::new(CapturePass::new(®.sess_mut))); | mutable borrow occurs here error[E0502]: cannot borrow `*reg` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-surprise-no-conflict.rs:173:5 + --> $DIR/two-phase-surprise-no-conflict.rs:141:5 | LL | fn register_plugins<'a>(mk_reg: impl Fn() -> &'a mut Registry<'a>) { | -- lifetime `'a` defined here @@ -79,7 +79,7 @@ LL | reg.register_univ(Box::new(CapturePass::new(®.sess_mut))); | mutable borrow occurs here error[E0502]: cannot borrow `*reg` as mutable because it is also borrowed as immutable - --> $DIR/two-phase-surprise-no-conflict.rs:178:5 + --> $DIR/two-phase-surprise-no-conflict.rs:144:5 | LL | reg.register_ref(&CapturePass::new(®.sess_mut)); | ^^^^------------^^^^^^^^^^^^^^^^^^^-------------^^ @@ -89,7 +89,7 @@ LL | reg.register_ref(&CapturePass::new(®.sess_mut)); | mutable borrow occurs here error[E0499]: cannot borrow `*reg` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:190:5 + --> $DIR/two-phase-surprise-no-conflict.rs:154:5 | LL | reg.register_bound(Box::new(CapturePass::new_mut(&mut reg.sess_mut))); | ^^^^--------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------------^^^ @@ -99,7 +99,7 @@ LL | reg.register_bound(Box::new(CapturePass::new_mut(&mut reg.sess_mut))); | second mutable borrow occurs here error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:190:54 + --> $DIR/two-phase-surprise-no-conflict.rs:154:54 | LL | reg.register_bound(Box::new(CapturePass::new_mut(&mut reg.sess_mut))); | --- -------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here @@ -108,7 +108,7 @@ LL | reg.register_bound(Box::new(CapturePass::new_mut(&mut reg.sess_mut))); | first mutable borrow occurs here error[E0499]: cannot borrow `*reg` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:196:5 + --> $DIR/two-phase-surprise-no-conflict.rs:158:5 | LL | fn register_plugins<'a>(mk_reg: impl Fn() -> &'a mut Registry<'a>) { | -- lifetime `'a` defined here @@ -121,7 +121,7 @@ LL | reg.register_univ(Box::new(CapturePass::new_mut(&mut reg.sess_mut))); | second mutable borrow occurs here error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:196:53 + --> $DIR/two-phase-surprise-no-conflict.rs:158:53 | LL | reg.register_univ(Box::new(CapturePass::new_mut(&mut reg.sess_mut))); | --- ------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here @@ -130,7 +130,7 @@ LL | reg.register_univ(Box::new(CapturePass::new_mut(&mut reg.sess_mut))); | first mutable borrow occurs here error[E0499]: cannot borrow `*reg` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:202:5 + --> $DIR/two-phase-surprise-no-conflict.rs:162:5 | LL | reg.register_ref(&CapturePass::new_mut(&mut reg.sess_mut)); | ^^^^------------^^^^^^^^^^^^^^^^^^^^^^^-----------------^^ @@ -140,7 +140,7 @@ LL | reg.register_ref(&CapturePass::new_mut(&mut reg.sess_mut)); | second mutable borrow occurs here error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time - --> $DIR/two-phase-surprise-no-conflict.rs:202:44 + --> $DIR/two-phase-surprise-no-conflict.rs:162:44 | LL | reg.register_ref(&CapturePass::new_mut(&mut reg.sess_mut)); | --- ------------ ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here @@ -150,5 +150,5 @@ LL | reg.register_ref(&CapturePass::new_mut(&mut reg.sess_mut)); error: aborting due to 15 previous errors -Some errors occurred: E0499, E0502, E0503. +Some errors have detailed explanations: E0499, E0502, E0503. For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.nll.stderr b/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.nll.stderr deleted file mode 100644 index d6125cfd72..0000000000 --- a/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0507]: cannot move out of captured variable in an `Fn` closure - --> $DIR/unboxed-closures-move-upvar-from-non-once-ref-closure.rs:11:9 - | -LL | let y = vec![format!("World")]; - | - captured outer variable -LL | call(|| { -LL | y.into_iter(); - | ^ cannot move out of captured variable in an `Fn` closure - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs b/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs index 4c6a05338a..f45aa90b60 100644 --- a/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs +++ b/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs @@ -9,6 +9,6 @@ fn main() { let y = vec![format!("World")]; call(|| { y.into_iter(); - //~^ ERROR cannot move out of captured outer variable in an `Fn` closure + //~^ ERROR cannot move out of captured variable in an `Fn` closure }); } diff --git a/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr b/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr index bdfd6fb7e5..d6125cfd72 100644 --- a/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr +++ b/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr @@ -1,11 +1,11 @@ -error[E0507]: cannot move out of captured outer variable in an `Fn` closure +error[E0507]: cannot move out of captured variable in an `Fn` closure --> $DIR/unboxed-closures-move-upvar-from-non-once-ref-closure.rs:11:9 | LL | let y = vec![format!("World")]; | - captured outer variable LL | call(|| { LL | y.into_iter(); - | ^ cannot move out of captured outer variable in an `Fn` closure + | ^ cannot move out of captured variable in an `Fn` closure error: aborting due to previous error diff --git a/src/test/ui/break-outside-loop.stderr b/src/test/ui/break-outside-loop.stderr index c1aa580f89..8f4656ab39 100644 --- a/src/test/ui/break-outside-loop.stderr +++ b/src/test/ui/break-outside-loop.stderr @@ -30,5 +30,5 @@ LL | let unconstrained = break; error: aborting due to 5 previous errors -Some errors occurred: E0267, E0268. +Some errors have detailed explanations: E0267, E0268. For more information about an error, try `rustc --explain E0267`. diff --git a/src/test/ui/by-move-pattern-binding.nll.stderr b/src/test/ui/by-move-pattern-binding.nll.stderr deleted file mode 100644 index 8b53147455..0000000000 --- a/src/test/ui/by-move-pattern-binding.nll.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/by-move-pattern-binding.rs:14:11 - | -LL | match &s.x { - | ^^^^ cannot move out of borrowed content -LL | &E::Foo => {} -LL | &E::Bar(identifier) => f(identifier.clone()) - | ------------------- - | | | - | | data moved here - | help: consider removing the `&`: `E::Bar(identifier)` - | -note: move occurs because `identifier` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/by-move-pattern-binding.rs:16:17 - | -LL | &E::Bar(identifier) => f(identifier.clone()) - | ^^^^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/by-move-pattern-binding.rs b/src/test/ui/by-move-pattern-binding.rs index 455b206e53..d4c9f23164 100644 --- a/src/test/ui/by-move-pattern-binding.rs +++ b/src/test/ui/by-move-pattern-binding.rs @@ -11,9 +11,9 @@ fn f(x: String) {} fn main() { let s = S { x: E::Bar("hello".to_string()) }; - match &s.x { + match &s.x { //~ ERROR cannot move &E::Foo => {} - &E::Bar(identifier) => f(identifier.clone()) //~ ERROR cannot move + &E::Bar(identifier) => f(identifier.clone()) }; match &s.x { &E::Foo => {} diff --git a/src/test/ui/by-move-pattern-binding.stderr b/src/test/ui/by-move-pattern-binding.stderr index 5135e0dada..8b53147455 100644 --- a/src/test/ui/by-move-pattern-binding.stderr +++ b/src/test/ui/by-move-pattern-binding.stderr @@ -1,11 +1,20 @@ error[E0507]: cannot move out of borrowed content - --> $DIR/by-move-pattern-binding.rs:16:9 + --> $DIR/by-move-pattern-binding.rs:14:11 | +LL | match &s.x { + | ^^^^ cannot move out of borrowed content +LL | &E::Foo => {} LL | &E::Bar(identifier) => f(identifier.clone()) - | ^^^^^^^^----------^ + | ------------------- | | | - | | hint: to prevent move, use `ref identifier` or `ref mut identifier` - | cannot move out of borrowed content + | | data moved here + | help: consider removing the `&`: `E::Bar(identifier)` + | +note: move occurs because `identifier` has type `std::string::String`, which does not implement the `Copy` trait + --> $DIR/by-move-pattern-binding.rs:16:17 + | +LL | &E::Bar(identifier) => f(identifier.clone()) + | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/c-variadic/variadic-ffi-1.rs b/src/test/ui/c-variadic/variadic-ffi-1.rs index 61b2ad4bed..6a3ff24b67 100644 --- a/src/test/ui/c-variadic/variadic-ffi-1.rs +++ b/src/test/ui/c-variadic/variadic-ffi-1.rs @@ -12,20 +12,18 @@ extern { extern "C" fn bar(f: isize, x: u8) {} fn main() { - // errors below are no longer checked because error above aborts - // compilation; see variadic-ffi-3.rs for corresponding test. unsafe { - foo(); - foo(1); + foo(); //~ ERROR this function takes at least 2 parameters but 0 parameters were supplied + foo(1); //~ ERROR this function takes at least 2 parameters but 1 parameter was supplied - let x: unsafe extern "C" fn(f: isize, x: u8) = foo; - let y: extern "C" fn(f: isize, x: u8, ...) = bar; + let x: unsafe extern "C" fn(f: isize, x: u8) = foo; //~ ERROR mismatched types + let y: extern "C" fn(f: isize, x: u8, ...) = bar; //~ ERROR mismatched types - foo(1, 2, 3f32); - foo(1, 2, true); - foo(1, 2, 1i8); - foo(1, 2, 1u8); - foo(1, 2, 1i16); - foo(1, 2, 1u16); + foo(1, 2, 3f32); //~ ERROR can't pass + foo(1, 2, true); //~ ERROR can't pass + foo(1, 2, 1i8); //~ ERROR can't pass + foo(1, 2, 1u8); //~ ERROR can't pass + foo(1, 2, 1i16); //~ ERROR can't pass + foo(1, 2, 1u16); //~ ERROR can't pass } } diff --git a/src/test/ui/c-variadic/variadic-ffi-1.stderr b/src/test/ui/c-variadic/variadic-ffi-1.stderr index 1a2bb4419b..e16d15a98b 100644 --- a/src/test/ui/c-variadic/variadic-ffi-1.stderr +++ b/src/test/ui/c-variadic/variadic-ffi-1.stderr @@ -4,6 +4,79 @@ error[E0045]: C-variadic function must have C or cdecl calling convention LL | fn printf(_: *const u8, ...); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadics require C or cdecl calling convention -error: aborting due to previous error +error[E0060]: this function takes at least 2 parameters but 0 parameters were supplied + --> $DIR/variadic-ffi-1.rs:16:9 + | +LL | fn foo(f: isize, x: u8, ...); + | ----------------------------- defined here +... +LL | foo(); + | ^^^^^ expected at least 2 parameters + +error[E0060]: this function takes at least 2 parameters but 1 parameter was supplied + --> $DIR/variadic-ffi-1.rs:17:9 + | +LL | fn foo(f: isize, x: u8, ...); + | ----------------------------- defined here +... +LL | foo(1); + | ^^^^^^ expected at least 2 parameters + +error[E0308]: mismatched types + --> $DIR/variadic-ffi-1.rs:19:56 + | +LL | let x: unsafe extern "C" fn(f: isize, x: u8) = foo; + | ^^^ expected non-variadic fn, found variadic function + | + = note: expected type `unsafe extern "C" fn(isize, u8)` + found type `for<'r> unsafe extern "C" fn(isize, u8, std::ffi::VaList<'r>, ...) {foo}` + +error[E0308]: mismatched types + --> $DIR/variadic-ffi-1.rs:20:54 + | +LL | let y: extern "C" fn(f: isize, x: u8, ...) = bar; + | ^^^ expected variadic fn, found non-variadic function + | + = note: expected type `for<'r> extern "C" fn(isize, u8, std::ffi::VaList<'r>, ...)` + found type `extern "C" fn(isize, u8) {bar}` + +error[E0617]: can't pass `f32` to variadic function + --> $DIR/variadic-ffi-1.rs:22:19 + | +LL | foo(1, 2, 3f32); + | ^^^^ help: cast the value to `c_double`: `3f32 as c_double` + +error[E0617]: can't pass `bool` to variadic function + --> $DIR/variadic-ffi-1.rs:23:19 + | +LL | foo(1, 2, true); + | ^^^^ help: cast the value to `c_int`: `true as c_int` + +error[E0617]: can't pass `i8` to variadic function + --> $DIR/variadic-ffi-1.rs:24:19 + | +LL | foo(1, 2, 1i8); + | ^^^ help: cast the value to `c_int`: `1i8 as c_int` + +error[E0617]: can't pass `u8` to variadic function + --> $DIR/variadic-ffi-1.rs:25:19 + | +LL | foo(1, 2, 1u8); + | ^^^ help: cast the value to `c_uint`: `1u8 as c_uint` + +error[E0617]: can't pass `i16` to variadic function + --> $DIR/variadic-ffi-1.rs:26:19 + | +LL | foo(1, 2, 1i16); + | ^^^^ help: cast the value to `c_int`: `1i16 as c_int` + +error[E0617]: can't pass `u16` to variadic function + --> $DIR/variadic-ffi-1.rs:27:19 + | +LL | foo(1, 2, 1u16); + | ^^^^ help: cast the value to `c_uint`: `1u16 as c_uint` + +error: aborting due to 11 previous errors -For more information about this error, try `rustc --explain E0045`. +Some errors have detailed explanations: E0045, E0060, E0308, E0617. +For more information about an error, try `rustc --explain E0045`. diff --git a/src/test/ui/c-variadic/variadic-ffi-3.rs b/src/test/ui/c-variadic/variadic-ffi-3.rs deleted file mode 100644 index c02d1f54e5..0000000000 --- a/src/test/ui/c-variadic/variadic-ffi-3.rs +++ /dev/null @@ -1,29 +0,0 @@ -extern { - fn foo(f: isize, x: u8, ...); - //~^ defined here - //~| defined here -} - -extern "C" fn bar(f: isize, x: u8) {} - -fn main() { - unsafe { - foo(); //~ ERROR: this function takes at least 2 parameters but 0 parameters were supplied - foo(1); //~ ERROR: this function takes at least 2 parameters but 1 parameter was supplied - - let x: unsafe extern "C" fn(f: isize, x: u8) = foo; - //~^ ERROR: mismatched types - //~| expected type `unsafe extern "C" fn(isize, u8)` - - let y: extern "C" fn(f: isize, x: u8, ...) = bar; - //~^ ERROR: mismatched types - //~| expected type `for<'r> extern "C" fn(isize, u8, std::ffi::VaList<'r>, ...)` - - foo(1, 2, 3f32); //~ ERROR can't pass `f32` to variadic function - foo(1, 2, true); //~ ERROR can't pass `bool` to variadic function - foo(1, 2, 1i8); //~ ERROR can't pass `i8` to variadic function - foo(1, 2, 1u8); //~ ERROR can't pass `u8` to variadic function - foo(1, 2, 1i16); //~ ERROR can't pass `i16` to variadic function - foo(1, 2, 1u16); //~ ERROR can't pass `u16` to variadic function - } -} diff --git a/src/test/ui/c-variadic/variadic-ffi-3.stderr b/src/test/ui/c-variadic/variadic-ffi-3.stderr deleted file mode 100644 index 6e19fc1262..0000000000 --- a/src/test/ui/c-variadic/variadic-ffi-3.stderr +++ /dev/null @@ -1,76 +0,0 @@ -error[E0060]: this function takes at least 2 parameters but 0 parameters were supplied - --> $DIR/variadic-ffi-3.rs:11:9 - | -LL | fn foo(f: isize, x: u8, ...); - | ----------------------------- defined here -... -LL | foo(); - | ^^^^^ expected at least 2 parameters - -error[E0060]: this function takes at least 2 parameters but 1 parameter was supplied - --> $DIR/variadic-ffi-3.rs:12:9 - | -LL | fn foo(f: isize, x: u8, ...); - | ----------------------------- defined here -... -LL | foo(1); - | ^^^^^^ expected at least 2 parameters - -error[E0308]: mismatched types - --> $DIR/variadic-ffi-3.rs:14:56 - | -LL | let x: unsafe extern "C" fn(f: isize, x: u8) = foo; - | ^^^ expected non-variadic fn, found variadic function - | - = note: expected type `unsafe extern "C" fn(isize, u8)` - found type `for<'r> unsafe extern "C" fn(isize, u8, std::ffi::VaList<'r>, ...) {foo}` - -error[E0308]: mismatched types - --> $DIR/variadic-ffi-3.rs:18:54 - | -LL | let y: extern "C" fn(f: isize, x: u8, ...) = bar; - | ^^^ expected variadic fn, found non-variadic function - | - = note: expected type `for<'r> extern "C" fn(isize, u8, std::ffi::VaList<'r>, ...)` - found type `extern "C" fn(isize, u8) {bar}` - -error[E0617]: can't pass `f32` to variadic function - --> $DIR/variadic-ffi-3.rs:22:19 - | -LL | foo(1, 2, 3f32); - | ^^^^ help: cast the value to `c_double`: `3f32 as c_double` - -error[E0617]: can't pass `bool` to variadic function - --> $DIR/variadic-ffi-3.rs:23:19 - | -LL | foo(1, 2, true); - | ^^^^ help: cast the value to `c_int`: `true as c_int` - -error[E0617]: can't pass `i8` to variadic function - --> $DIR/variadic-ffi-3.rs:24:19 - | -LL | foo(1, 2, 1i8); - | ^^^ help: cast the value to `c_int`: `1i8 as c_int` - -error[E0617]: can't pass `u8` to variadic function - --> $DIR/variadic-ffi-3.rs:25:19 - | -LL | foo(1, 2, 1u8); - | ^^^ help: cast the value to `c_uint`: `1u8 as c_uint` - -error[E0617]: can't pass `i16` to variadic function - --> $DIR/variadic-ffi-3.rs:26:19 - | -LL | foo(1, 2, 1i16); - | ^^^^ help: cast the value to `c_int`: `1i16 as c_int` - -error[E0617]: can't pass `u16` to variadic function - --> $DIR/variadic-ffi-3.rs:27:19 - | -LL | foo(1, 2, 1u16); - | ^^^^ help: cast the value to `c_uint`: `1u16 as c_uint` - -error: aborting due to 10 previous errors - -Some errors occurred: E0060, E0308, E0617. -For more information about an error, try `rustc --explain E0060`. diff --git a/src/test/ui/c-variadic/variadic-ffi-5.stderr b/src/test/ui/c-variadic/variadic-ffi-4.nll.stderr similarity index 65% rename from src/test/ui/c-variadic/variadic-ffi-5.stderr rename to src/test/ui/c-variadic/variadic-ffi-4.nll.stderr index 8f1dfe8ba9..a1afbb0639 100644 --- a/src/test/ui/c-variadic/variadic-ffi-5.stderr +++ b/src/test/ui/c-variadic/variadic-ffi-4.nll.stderr @@ -1,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `ap` - --> $DIR/variadic-ffi-5.rs:11:5 + --> $DIR/variadic-ffi-4.rs:8:5 | LL | pub unsafe extern "C" fn no_escape0<'a>(_: usize, ap: ...) -> VaList<'a> { | --- help: add explicit lifetime `'a` to the type of `ap`: `core::ffi::VaList<'a>` @@ -7,7 +7,7 @@ LL | ap | ^^ lifetime `'a` required error[E0621]: explicit lifetime required in the type of `ap` - --> $DIR/variadic-ffi-5.rs:15:5 + --> $DIR/variadic-ffi-4.rs:12:5 | LL | pub unsafe extern "C" fn no_escape1(_: usize, ap: ...) -> VaList<'static> { | --- help: add explicit lifetime `'static` to the type of `ap`: `core::ffi::VaList<'static>` @@ -15,7 +15,7 @@ LL | ap | ^^ lifetime `'static` required error: lifetime may not live long enough - --> $DIR/variadic-ffi-5.rs:19:33 + --> $DIR/variadic-ffi-4.rs:16:33 | LL | let _ = ap.with_copy(|ap| { ap }); | --- ^^ returning this value requires that `'1` must outlive `'2` @@ -24,40 +24,48 @@ LL | let _ = ap.with_copy(|ap| { ap }); | has type `core::ffi::VaList<'1>` error: lifetime may not live long enough - --> $DIR/variadic-ffi-5.rs:23:5 + --> $DIR/variadic-ffi-4.rs:20:5 | -LL | pub unsafe extern "C" fn no_escape3(_: usize, ap0: &mut VaList, mut ap1: ...) { - | --- ------- has type `core::ffi::VaList<'1>` +LL | pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaList, mut ap1: ...) { + | ------- ------- has type `core::ffi::VaList<'1>` | | | has type `&mut core::ffi::VaList<'2>` LL | *ap0 = ap1; | ^^^^^^^^^^ assignment requires that `'1` must outlive `'2` error: lifetime may not live long enough - --> $DIR/variadic-ffi-5.rs:27:5 + --> $DIR/variadic-ffi-4.rs:24:5 | -LL | pub unsafe extern "C" fn no_escape4(_: usize, mut ap0: &mut VaList, mut ap1: ...) { - | ------- ------- has type `core::ffi::VaList<'2>` +LL | pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaList, mut ap1: ...) { + | --- ------- has type `core::ffi::VaList<'2>` | | | has type `&mut core::ffi::VaList<'1>` LL | ap0 = &mut ap1; | ^^^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2` error: lifetime may not live long enough - --> $DIR/variadic-ffi-5.rs:27:5 + --> $DIR/variadic-ffi-4.rs:24:5 | -LL | pub unsafe extern "C" fn no_escape4(_: usize, mut ap0: &mut VaList, mut ap1: ...) { - | ------- ------- has type `core::ffi::VaList<'1>` +LL | pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaList, mut ap1: ...) { + | --- ------- has type `core::ffi::VaList<'1>` | | | has type `&mut core::ffi::VaList<'2>` LL | ap0 = &mut ap1; | ^^^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2` +error[E0384]: cannot assign to immutable argument `ap0` + --> $DIR/variadic-ffi-4.rs:24:5 + | +LL | pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaList, mut ap1: ...) { + | --- help: make this binding mutable: `mut ap0` +LL | ap0 = &mut ap1; + | ^^^^^^^^^^^^^^ cannot assign to immutable argument + error[E0597]: `ap1` does not live long enough - --> $DIR/variadic-ffi-5.rs:27:11 + --> $DIR/variadic-ffi-4.rs:24:11 | -LL | pub unsafe extern "C" fn no_escape4(_: usize, mut ap0: &mut VaList, mut ap1: ...) { - | - let's call the lifetime of this reference `'1` +LL | pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaList, mut ap1: ...) { + | - let's call the lifetime of this reference `'1` LL | ap0 = &mut ap1; | ------^^^^^^^^ | | | @@ -67,7 +75,7 @@ LL | ap0 = &mut ap1; LL | } | - `ap1` dropped here while still borrowed -error: aborting due to 7 previous errors +error: aborting due to 8 previous errors -Some errors occurred: E0597, E0621. -For more information about an error, try `rustc --explain E0597`. +Some errors have detailed explanations: E0384, E0597, E0621. +For more information about an error, try `rustc --explain E0384`. diff --git a/src/test/ui/c-variadic/variadic-ffi-4.stderr b/src/test/ui/c-variadic/variadic-ffi-4.stderr index 311e217370..80b765671c 100644 --- a/src/test/ui/c-variadic/variadic-ffi-4.stderr +++ b/src/test/ui/c-variadic/variadic-ffi-4.stderr @@ -194,5 +194,5 @@ LL | ap0 = &mut ap1; error: aborting due to 8 previous errors -Some errors occurred: E0308, E0490, E0495, E0621. +Some errors have detailed explanations: E0308, E0621. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/c-variadic/variadic-ffi-5.rs b/src/test/ui/c-variadic/variadic-ffi-5.rs deleted file mode 100644 index fcc80d9b0c..0000000000 --- a/src/test/ui/c-variadic/variadic-ffi-5.rs +++ /dev/null @@ -1,31 +0,0 @@ -#![crate_type="lib"] -#![no_std] -#![feature(c_variadic)] -// The tests in this file are similar to that of variadic-ffi-4, but this -// one enables nll. -#![feature(nll)] - -use core::ffi::VaList; - -pub unsafe extern "C" fn no_escape0<'a>(_: usize, ap: ...) -> VaList<'a> { - ap //~ ERROR: explicit lifetime required -} - -pub unsafe extern "C" fn no_escape1(_: usize, ap: ...) -> VaList<'static> { - ap //~ ERROR: explicit lifetime required -} - -pub unsafe extern "C" fn no_escape2(_: usize, ap: ...) { - let _ = ap.with_copy(|ap| { ap }); //~ ERROR: lifetime may not live long enough -} - -pub unsafe extern "C" fn no_escape3(_: usize, ap0: &mut VaList, mut ap1: ...) { - *ap0 = ap1; //~ ERROR: lifetime may not live long enough -} - -pub unsafe extern "C" fn no_escape4(_: usize, mut ap0: &mut VaList, mut ap1: ...) { - ap0 = &mut ap1; - //~^ ERROR: lifetime may not live long enough - //~^^ ERROR: lifetime may not live long enough - //~^^^ ERROR: `ap1` does not live long enough -} diff --git a/src/test/ui/call-fn-never-arg-wrong-type.rs b/src/test/ui/call-fn-never-arg-wrong-type.rs index 7ed1162171..d06637e74a 100644 --- a/src/test/ui/call-fn-never-arg-wrong-type.rs +++ b/src/test/ui/call-fn-never-arg-wrong-type.rs @@ -9,4 +9,3 @@ fn foo(x: !) -> ! { fn main() { foo("wow"); //~ ERROR mismatched types } - diff --git a/src/test/ui/cannot-mutate-captured-non-mut-var.ast.stderr b/src/test/ui/cannot-mutate-captured-non-mut-var.ast.stderr deleted file mode 100644 index 1098c16aaf..0000000000 --- a/src/test/ui/cannot-mutate-captured-non-mut-var.ast.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0594]: cannot assign to immutable captured outer variable in an `FnOnce` closure `x` - --> $DIR/cannot-mutate-captured-non-mut-var.rs:13:25 - | -LL | to_fn_once(move|| { x = 2; }); - | ^^^^^ - -error[E0596]: cannot borrow immutable captured outer variable in an `FnOnce` closure `s` as mutable - --> $DIR/cannot-mutate-captured-non-mut-var.rs:18:25 - | -LL | to_fn_once(move|| { s.read_to_end(&mut Vec::new()); }); - | ^ - -error: aborting due to 2 previous errors - -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. diff --git a/src/test/ui/cannot-mutate-captured-non-mut-var.mir.stderr b/src/test/ui/cannot-mutate-captured-non-mut-var.mir.stderr deleted file mode 100644 index 581dcde59f..0000000000 --- a/src/test/ui/cannot-mutate-captured-non-mut-var.mir.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/cannot-mutate-captured-non-mut-var.rs:13:25 - | -LL | let x = 1; - | - help: consider changing this to be mutable: `mut x` -LL | to_fn_once(move|| { x = 2; }); - | ^^^^^ cannot assign - -error[E0596]: cannot borrow `s` as mutable, as it is not declared as mutable - --> $DIR/cannot-mutate-captured-non-mut-var.rs:18:25 - | -LL | let s = std::io::stdin(); - | - help: consider changing this to be mutable: `mut s` -LL | to_fn_once(move|| { s.read_to_end(&mut Vec::new()); }); - | ^ cannot borrow as mutable - -error: aborting due to 2 previous errors - -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. diff --git a/src/test/ui/cannot-mutate-captured-non-mut-var.rs b/src/test/ui/cannot-mutate-captured-non-mut-var.rs index 18257d09fa..a83884acb1 100644 --- a/src/test/ui/cannot-mutate-captured-non-mut-var.rs +++ b/src/test/ui/cannot-mutate-captured-non-mut-var.rs @@ -1,7 +1,3 @@ -// ignore-tidy-linelength -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - #![feature(unboxed_closures)] use std::io::Read; @@ -11,11 +7,9 @@ fn to_fn_once>(f: F) -> F { f } fn main() { let x = 1; to_fn_once(move|| { x = 2; }); - //[ast]~^ ERROR: cannot assign to immutable captured outer variable - //[mir]~^^ ERROR: cannot assign to `x`, as it is not declared as mutable + //~^ ERROR: cannot assign to `x`, as it is not declared as mutable let s = std::io::stdin(); to_fn_once(move|| { s.read_to_end(&mut Vec::new()); }); - //[ast]~^ ERROR: cannot borrow immutable captured outer variable - //[mir]~^^ ERROR: cannot borrow `s` as mutable, as it is not declared as mutable + //~^ ERROR: cannot borrow `s` as mutable, as it is not declared as mutable } diff --git a/src/test/ui/cannot-mutate-captured-non-mut-var.ast.nll.stderr b/src/test/ui/cannot-mutate-captured-non-mut-var.stderr similarity index 80% rename from src/test/ui/cannot-mutate-captured-non-mut-var.ast.nll.stderr rename to src/test/ui/cannot-mutate-captured-non-mut-var.stderr index 581dcde59f..2961497ef9 100644 --- a/src/test/ui/cannot-mutate-captured-non-mut-var.ast.nll.stderr +++ b/src/test/ui/cannot-mutate-captured-non-mut-var.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/cannot-mutate-captured-non-mut-var.rs:13:25 + --> $DIR/cannot-mutate-captured-non-mut-var.rs:9:25 | LL | let x = 1; | - help: consider changing this to be mutable: `mut x` @@ -7,7 +7,7 @@ LL | to_fn_once(move|| { x = 2; }); | ^^^^^ cannot assign error[E0596]: cannot borrow `s` as mutable, as it is not declared as mutable - --> $DIR/cannot-mutate-captured-non-mut-var.rs:18:25 + --> $DIR/cannot-mutate-captured-non-mut-var.rs:13:25 | LL | let s = std::io::stdin(); | - help: consider changing this to be mutable: `mut s` @@ -16,5 +16,4 @@ LL | to_fn_once(move|| { s.read_to_end(&mut Vec::new()); }); error: aborting due to 2 previous errors -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/cast/cast-ptr-to-int-const.stderr b/src/test/ui/cast/cast-ptr-to-int-const.stderr index 0d4397c2e2..c40accfd7c 100644 --- a/src/test/ui/cast/cast-ptr-to-int-const.stderr +++ b/src/test/ui/cast/cast-ptr-to-int-const.stderr @@ -1,17 +1,19 @@ -error[E0658]: casting pointers to integers in constants is unstable (see issue #51910) +error[E0658]: casting pointers to integers in constants is unstable --> $DIR/cast-ptr-to-int-const.rs:5:9 | LL | main as u32 | ^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51910 = help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable -error[E0658]: casting pointers to integers in constants is unstable (see issue #51910) +error[E0658]: casting pointers to integers in constants is unstable --> $DIR/cast-ptr-to-int-const.rs:9:9 | LL | &Y as *const u32 as u32 | ^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51910 = help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/cast_char.rs b/src/test/ui/cast_char.rs index 8c319af9c9..9634ed56f7 100644 --- a/src/test/ui/cast_char.rs +++ b/src/test/ui/cast_char.rs @@ -2,9 +2,9 @@ fn main() { const XYZ: char = 0x1F888 as char; - //~^ ERROR only u8 can be cast into char + //~^ ERROR only `u8` can be cast into `char` const XY: char = 129160 as char; - //~^ ERROR only u8 can be cast into char + //~^ ERROR only `u8` can be cast into `char` const ZYX: char = '\u{01F888}'; println!("{}", XYZ); } diff --git a/src/test/ui/cast_char.stderr b/src/test/ui/cast_char.stderr index f0c9b89889..37ef98bcb5 100644 --- a/src/test/ui/cast_char.stderr +++ b/src/test/ui/cast_char.stderr @@ -1,8 +1,8 @@ -error: only u8 can be cast into char +error: only `u8` can be cast into `char` --> $DIR/cast_char.rs:4:23 | LL | const XYZ: char = 0x1F888 as char; - | ^^^^^^^^^^^^^^^ help: use a char literal instead: `'\u{1F888}'` + | ^^^^^^^^^^^^^^^ help: use a `char` literal instead: `'\u{1F888}'` | note: lint level defined here --> $DIR/cast_char.rs:1:9 @@ -10,11 +10,11 @@ note: lint level defined here LL | #![deny(overflowing_literals)] | ^^^^^^^^^^^^^^^^^^^^ -error: only u8 can be cast into char +error: only `u8` can be cast into `char` --> $DIR/cast_char.rs:6:22 | LL | const XY: char = 129160 as char; - | ^^^^^^^^^^^^^^ help: use a char literal instead: `'\u{1F888}'` + | ^^^^^^^^^^^^^^ help: use a `char` literal instead: `'\u{1F888}'` error: aborting due to 2 previous errors diff --git a/src/test/ui/cdylib-deps-must-be-static.rs b/src/test/ui/cdylib-deps-must-be-static.rs index 241cc96fec..8530c9e24b 100644 --- a/src/test/ui/cdylib-deps-must-be-static.rs +++ b/src/test/ui/cdylib-deps-must-be-static.rs @@ -3,7 +3,7 @@ // ignore-musl // ignore-cloudabi // ignore-emscripten - +// ignore-sgx no dynamic libraries #![crate_type = "cdylib"] extern crate cdylib_dep; diff --git a/src/test/ui/chalkify/type_inference.stderr b/src/test/ui/chalkify/type_inference.stderr index d1d56d3d4a..6cb33f2f2c 100644 --- a/src/test/ui/chalkify/type_inference.stderr +++ b/src/test/ui/chalkify/type_inference.stderr @@ -24,5 +24,5 @@ LL | fn only_bar(_x: T) { } error: aborting due to 2 previous errors -Some errors occurred: E0277, E0308. +Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/changing-crates.stderr b/src/test/ui/changing-crates.stderr index 6339309049..cc62a4d4d9 100644 --- a/src/test/ui/changing-crates.stderr +++ b/src/test/ui/changing-crates.stderr @@ -11,4 +11,3 @@ LL | extern crate b; error: aborting due to previous error -For more information about this error, try `rustc --explain E0460`. diff --git a/src/test/ui/check-static-values-constraints.nll.stderr b/src/test/ui/check-static-values-constraints.nll.stderr deleted file mode 100644 index fe014fa105..0000000000 --- a/src/test/ui/check-static-values-constraints.nll.stderr +++ /dev/null @@ -1,112 +0,0 @@ -error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/check-static-values-constraints.rs:65:43 - | -LL | ..SafeStruct{field1: SafeEnum::Variant3(WithDtor), - | ___________________________________________^ -LL | | -LL | | field2: SafeEnum::Variant1}}; - | |________________________________________________________________________________^ statics cannot evaluate destructors - -error[E0010]: allocations are not allowed in statics - --> $DIR/check-static-values-constraints.rs:79:33 - | -LL | static STATIC11: Box = box MyOwned; - | ^^^^^^^^^^^ allocation not allowed in statics - -error[E0019]: static contains unimplemented expression type - --> $DIR/check-static-values-constraints.rs:79:37 - | -LL | static STATIC11: Box = box MyOwned; - | ^^^^^^^ - -error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants - --> $DIR/check-static-values-constraints.rs:90:32 - | -LL | field2: SafeEnum::Variant4("str".to_string()) - | ^^^^^^^^^^^^^^^^^ - -error[E0010]: allocations are not allowed in statics - --> $DIR/check-static-values-constraints.rs:95:5 - | -LL | box MyOwned, - | ^^^^^^^^^^^ allocation not allowed in statics - -error[E0019]: static contains unimplemented expression type - --> $DIR/check-static-values-constraints.rs:95:9 - | -LL | box MyOwned, - | ^^^^^^^ - -error[E0010]: allocations are not allowed in statics - --> $DIR/check-static-values-constraints.rs:97:5 - | -LL | box MyOwned, - | ^^^^^^^^^^^ allocation not allowed in statics - -error[E0019]: static contains unimplemented expression type - --> $DIR/check-static-values-constraints.rs:97:9 - | -LL | box MyOwned, - | ^^^^^^^ - -error[E0010]: allocations are not allowed in statics - --> $DIR/check-static-values-constraints.rs:102:6 - | -LL | &box MyOwned, - | ^^^^^^^^^^^ allocation not allowed in statics - -error[E0019]: static contains unimplemented expression type - --> $DIR/check-static-values-constraints.rs:102:10 - | -LL | &box MyOwned, - | ^^^^^^^ - -error[E0010]: allocations are not allowed in statics - --> $DIR/check-static-values-constraints.rs:104:6 - | -LL | &box MyOwned, - | ^^^^^^^^^^^ allocation not allowed in statics - -error[E0019]: static contains unimplemented expression type - --> $DIR/check-static-values-constraints.rs:104:10 - | -LL | &box MyOwned, - | ^^^^^^^ - -error[E0010]: allocations are not allowed in statics - --> $DIR/check-static-values-constraints.rs:111:5 - | -LL | box 3; - | ^^^^^ allocation not allowed in statics - -error[E0019]: static contains unimplemented expression type - --> $DIR/check-static-values-constraints.rs:111:9 - | -LL | box 3; - | ^ - -error[E0507]: cannot move out of static item - --> $DIR/check-static-values-constraints.rs:116:45 - | -LL | let y = { static x: Box = box 3; x }; - | ^ - | | - | cannot move out of static item - | help: consider borrowing here: `&x` - -error[E0010]: allocations are not allowed in statics - --> $DIR/check-static-values-constraints.rs:116:38 - | -LL | let y = { static x: Box = box 3; x }; - | ^^^^^ allocation not allowed in statics - -error[E0019]: static contains unimplemented expression type - --> $DIR/check-static-values-constraints.rs:116:42 - | -LL | let y = { static x: Box = box 3; x }; - | ^ - -error: aborting due to 17 previous errors - -Some errors occurred: E0010, E0015, E0019, E0493, E0507. -For more information about an error, try `rustc --explain E0010`. diff --git a/src/test/ui/check-static-values-constraints.stderr b/src/test/ui/check-static-values-constraints.stderr index 91fe0feb1b..f35703a306 100644 --- a/src/test/ui/check-static-values-constraints.stderr +++ b/src/test/ui/check-static-values-constraints.stderr @@ -89,7 +89,10 @@ error[E0507]: cannot move out of static item --> $DIR/check-static-values-constraints.rs:116:45 | LL | let y = { static x: Box = box 3; x }; - | ^ cannot move out of static item + | ^ + | | + | cannot move out of static item + | help: consider borrowing here: `&x` error[E0010]: allocations are not allowed in statics --> $DIR/check-static-values-constraints.rs:116:38 @@ -105,5 +108,5 @@ LL | let y = { static x: Box = box 3; x }; error: aborting due to 17 previous errors -Some errors occurred: E0010, E0015, E0019, E0493, E0507. +Some errors have detailed explanations: E0010, E0015, E0019, E0507. For more information about an error, try `rustc --explain E0010`. diff --git a/src/test/ui/class-missing-self.stderr b/src/test/ui/class-missing-self.stderr index ec11f12539..25cb85dadb 100644 --- a/src/test/ui/class-missing-self.stderr +++ b/src/test/ui/class-missing-self.stderr @@ -2,7 +2,7 @@ error[E0425]: cannot find value `meows` in this scope --> $DIR/class-missing-self.rs:9:7 | LL | meows += 1; - | ^^^^^ help: try: `self.meows` + | ^^^^^ help: you might have meant to use the available field: `self.meows` error[E0425]: cannot find function `sleep` in this scope --> $DIR/class-missing-self.rs:10:7 diff --git a/src/test/ui/cleanup-rvalue-scopes-cf.rs b/src/test/ui/cleanup-rvalue-scopes-cf.rs index 106dbd324f..e3cecb1bff 100644 --- a/src/test/ui/cleanup-rvalue-scopes-cf.rs +++ b/src/test/ui/cleanup-rvalue-scopes-cf.rs @@ -1,5 +1,3 @@ -// ignore-compare-mode-nll - // Test that the borrow checker prevents pointers to temporaries // with statement lifetimes from escaping. @@ -7,7 +5,7 @@ use std::ops::Drop; static mut FLAGS: u64 = 0; -struct Box { f: T } +struct StackBox { f: T } struct AddFlags { bits: u64 } fn AddFlags(bits: u64) -> AddFlags { @@ -25,11 +23,13 @@ impl AddFlags { } pub fn main() { - let _x = arg(&AddFlags(1)); //~ ERROR value does not live long enough - let _x = AddFlags(1).get(); //~ ERROR value does not live long enough - let _x = &*arg(&AddFlags(1)); //~ ERROR value does not live long enough - let ref _x = *arg(&AddFlags(1)); //~ ERROR value does not live long enough - let &ref _x = arg(&AddFlags(1)); //~ ERROR value does not live long enough - let _x = AddFlags(1).get(); //~ ERROR value does not live long enough - let Box { f: _x } = Box { f: AddFlags(1).get() }; //~ ERROR value does not live long enough + let x1 = arg(&AddFlags(1)); //~ ERROR temporary value dropped while borrowed + let x2 = AddFlags(1).get(); //~ ERROR temporary value dropped while borrowed + let x3 = &*arg(&AddFlags(1)); //~ ERROR temporary value dropped while borrowed + let ref x4 = *arg(&AddFlags(1)); //~ ERROR temporary value dropped while borrowed + let &ref x5 = arg(&AddFlags(1)); //~ ERROR temporary value dropped while borrowed + let x6 = AddFlags(1).get(); //~ ERROR temporary value dropped while borrowed + let StackBox { f: x7 } = StackBox { f: AddFlags(1).get() }; + //~^ ERROR temporary value dropped while borrowed + (x1, x2, x3, x4, x5, x6, x7); } diff --git a/src/test/ui/cleanup-rvalue-scopes-cf.stderr b/src/test/ui/cleanup-rvalue-scopes-cf.stderr index e35e71ce6e..04e599755f 100644 --- a/src/test/ui/cleanup-rvalue-scopes-cf.stderr +++ b/src/test/ui/cleanup-rvalue-scopes-cf.stderr @@ -1,93 +1,94 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/cleanup-rvalue-scopes-cf.rs:28:19 +error[E0716]: temporary value dropped while borrowed + --> $DIR/cleanup-rvalue-scopes-cf.rs:26:19 | -LL | let _x = arg(&AddFlags(1)); - | ^^^^^^^^^^^ - temporary value dropped here while still borrowed +LL | let x1 = arg(&AddFlags(1)); + | ^^^^^^^^^^^ - temporary value is freed at the end of this statement | | - | temporary value does not live long enough + | creates a temporary which is freed while still in use ... -LL | } - | - temporary value needs to live until here +LL | (x1, x2, x3, x4, x5, x6, x7); + | -- borrow later used here | - = note: consider using a `let` binding to increase its lifetime + = note: consider using a `let` binding to create a longer lived value -error[E0597]: borrowed value does not live long enough - --> $DIR/cleanup-rvalue-scopes-cf.rs:29:14 +error[E0716]: temporary value dropped while borrowed + --> $DIR/cleanup-rvalue-scopes-cf.rs:27:14 | -LL | let _x = AddFlags(1).get(); - | ^^^^^^^^^^^ - temporary value dropped here while still borrowed +LL | let x2 = AddFlags(1).get(); + | ^^^^^^^^^^^ - temporary value is freed at the end of this statement | | - | temporary value does not live long enough + | creates a temporary which is freed while still in use ... -LL | } - | - temporary value needs to live until here +LL | (x1, x2, x3, x4, x5, x6, x7); + | -- borrow later used here | - = note: consider using a `let` binding to increase its lifetime + = note: consider using a `let` binding to create a longer lived value -error[E0597]: borrowed value does not live long enough - --> $DIR/cleanup-rvalue-scopes-cf.rs:30:21 +error[E0716]: temporary value dropped while borrowed + --> $DIR/cleanup-rvalue-scopes-cf.rs:28:21 | -LL | let _x = &*arg(&AddFlags(1)); - | ^^^^^^^^^^^ - temporary value dropped here while still borrowed +LL | let x3 = &*arg(&AddFlags(1)); + | ^^^^^^^^^^^ - temporary value is freed at the end of this statement | | - | temporary value does not live long enough + | creates a temporary which is freed while still in use ... -LL | } - | - temporary value needs to live until here +LL | (x1, x2, x3, x4, x5, x6, x7); + | -- borrow later used here | - = note: consider using a `let` binding to increase its lifetime + = note: consider using a `let` binding to create a longer lived value -error[E0597]: borrowed value does not live long enough - --> $DIR/cleanup-rvalue-scopes-cf.rs:31:24 +error[E0716]: temporary value dropped while borrowed + --> $DIR/cleanup-rvalue-scopes-cf.rs:29:24 | -LL | let ref _x = *arg(&AddFlags(1)); - | ^^^^^^^^^^^ - temporary value dropped here while still borrowed +LL | let ref x4 = *arg(&AddFlags(1)); + | ^^^^^^^^^^^ - temporary value is freed at the end of this statement | | - | temporary value does not live long enough + | creates a temporary which is freed while still in use ... -LL | } - | - temporary value needs to live until here +LL | (x1, x2, x3, x4, x5, x6, x7); + | -- borrow later used here | - = note: consider using a `let` binding to increase its lifetime + = note: consider using a `let` binding to create a longer lived value -error[E0597]: borrowed value does not live long enough - --> $DIR/cleanup-rvalue-scopes-cf.rs:32:24 +error[E0716]: temporary value dropped while borrowed + --> $DIR/cleanup-rvalue-scopes-cf.rs:30:24 | -LL | let &ref _x = arg(&AddFlags(1)); - | ^^^^^^^^^^^ - temporary value dropped here while still borrowed +LL | let &ref x5 = arg(&AddFlags(1)); + | ^^^^^^^^^^^ - temporary value is freed at the end of this statement | | - | temporary value does not live long enough + | creates a temporary which is freed while still in use ... -LL | } - | - temporary value needs to live until here +LL | (x1, x2, x3, x4, x5, x6, x7); + | -- borrow later used here | - = note: consider using a `let` binding to increase its lifetime + = note: consider using a `let` binding to create a longer lived value -error[E0597]: borrowed value does not live long enough - --> $DIR/cleanup-rvalue-scopes-cf.rs:33:14 +error[E0716]: temporary value dropped while borrowed + --> $DIR/cleanup-rvalue-scopes-cf.rs:31:14 | -LL | let _x = AddFlags(1).get(); - | ^^^^^^^^^^^ - temporary value dropped here while still borrowed +LL | let x6 = AddFlags(1).get(); + | ^^^^^^^^^^^ - temporary value is freed at the end of this statement | | - | temporary value does not live long enough -LL | let Box { f: _x } = Box { f: AddFlags(1).get() }; -LL | } - | - temporary value needs to live until here + | creates a temporary which is freed while still in use +... +LL | (x1, x2, x3, x4, x5, x6, x7); + | -- borrow later used here | - = note: consider using a `let` binding to increase its lifetime + = note: consider using a `let` binding to create a longer lived value -error[E0597]: borrowed value does not live long enough - --> $DIR/cleanup-rvalue-scopes-cf.rs:34:34 +error[E0716]: temporary value dropped while borrowed + --> $DIR/cleanup-rvalue-scopes-cf.rs:32:44 | -LL | let Box { f: _x } = Box { f: AddFlags(1).get() }; - | ^^^^^^^^^^^ - temporary value dropped here while still borrowed - | | - | temporary value does not live long enough -LL | } - | - temporary value needs to live until here +LL | let StackBox { f: x7 } = StackBox { f: AddFlags(1).get() }; + | ^^^^^^^^^^^ - temporary value is freed at the end of this statement + | | + | creates a temporary which is freed while still in use +LL | +LL | (x1, x2, x3, x4, x5, x6, x7); + | -- borrow later used here | - = note: consider using a `let` binding to increase its lifetime + = note: consider using a `let` binding to create a longer lived value error: aborting due to 7 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr b/src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr new file mode 100644 index 0000000000..7e4ac4e8ce --- /dev/null +++ b/src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr @@ -0,0 +1,53 @@ +error[E0631]: type mismatch in closure arguments + --> $DIR/expect-fn-supply-fn.rs:30:5 + | +LL | with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {}); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------- found signature of `fn(for<'r> fn(&'r u32), _) -> _` + | | + | expected signature of `fn(fn(&'a u32), &i32) -> _` + | +note: required by `with_closure_expecting_fn_with_free_region` + --> $DIR/expect-fn-supply-fn.rs:1:1 + | +LL | / fn with_closure_expecting_fn_with_free_region(_: F) +LL | | where F: for<'a> FnOnce(fn(&'a u32), &i32) +LL | | { +LL | | } + | |_^ + +error[E0631]: type mismatch in closure arguments + --> $DIR/expect-fn-supply-fn.rs:37:5 + | +LL | with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {}); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------- found signature of `fn(fn(&'x u32), _) -> _` + | | + | expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _` + | +note: required by `with_closure_expecting_fn_with_bound_region` + --> $DIR/expect-fn-supply-fn.rs:6:1 + | +LL | / fn with_closure_expecting_fn_with_bound_region(_: F) +LL | | where F: FnOnce(fn(&u32), &i32) +LL | | { +LL | | } + | |_^ + +error[E0631]: type mismatch in closure arguments + --> $DIR/expect-fn-supply-fn.rs:46:5 + | +LL | with_closure_expecting_fn_with_bound_region(|x: Foo<'_>, y| { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --------------- found signature of `for<'r> fn(fn(&'r u32), _) -> _` + | | + | expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _` + | +note: required by `with_closure_expecting_fn_with_bound_region` + --> $DIR/expect-fn-supply-fn.rs:6:1 + | +LL | / fn with_closure_expecting_fn_with_bound_region(_: F) +LL | | where F: FnOnce(fn(&u32), &i32) +LL | | { +LL | | } + | |_^ + +error: aborting due to 3 previous errors + diff --git a/src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr b/src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr index ab35aeff69..40fab4d4ed 100644 --- a/src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr +++ b/src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr @@ -89,5 +89,4 @@ LL | | } error: aborting due to 5 previous errors -Some errors occurred: E0308, E0631. -For more information about an error, try `rustc --explain E0308`. +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/closure-expected-type/expect-infer-var-appearing-twice.stderr b/src/test/ui/closure-expected-type/expect-infer-var-appearing-twice.stderr index 7a0938e9f7..c9a697496d 100644 --- a/src/test/ui/closure-expected-type/expect-infer-var-appearing-twice.stderr +++ b/src/test/ui/closure-expected-type/expect-infer-var-appearing-twice.stderr @@ -17,4 +17,3 @@ LL | | } error: aborting due to previous error -For more information about this error, try `rustc --explain E0631`. diff --git a/src/test/ui/closure_promotion.rs b/src/test/ui/closure_promotion.rs index a80745e8bc..db9c0a6ef3 100644 --- a/src/test/ui/closure_promotion.rs +++ b/src/test/ui/closure_promotion.rs @@ -1,8 +1,7 @@ -// ignore-compare-mode-nll +// compile-pass #![allow(const_err)] -// nll successfully compiles this. fn main() { - let x: &'static _ = &|| { let z = 3; z }; //~ ERROR does not live long enough + let x: &'static _ = &|| { let z = 3; z }; } diff --git a/src/test/ui/closure_promotion.stderr b/src/test/ui/closure_promotion.stderr deleted file mode 100644 index 475e28309c..0000000000 --- a/src/test/ui/closure_promotion.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/closure_promotion.rs:7:26 - | -LL | let x: &'static _ = &|| { let z = 3; z }; - | ^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.nll.stderr b/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.nll.stderr new file mode 100644 index 0000000000..1d12e2f585 --- /dev/null +++ b/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.nll.stderr @@ -0,0 +1,37 @@ +error[E0621]: explicit lifetime required in the type of `x` + --> $DIR/closure-bounds-static-cant-capture-borrowed.rs:5:5 + | +LL | fn foo(x: &()) { + | --- help: add explicit lifetime `'static` to the type of `x`: `&'static ()` +LL | / bar(|| { +LL | | +LL | | let _ = x; +LL | | }) + | |______^ lifetime `'static` required + +error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function + --> $DIR/closure-bounds-static-cant-capture-borrowed.rs:5:9 + | +LL | bar(|| { + | ^^ may outlive borrowed value `x` +LL | +LL | let _ = x; + | - `x` is borrowed here + | +note: function requires argument type to outlive `'static` + --> $DIR/closure-bounds-static-cant-capture-borrowed.rs:5:5 + | +LL | / bar(|| { +LL | | +LL | | let _ = x; +LL | | }) + | |______^ +help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword + | +LL | bar(move || { + | ^^^^^^^ + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0373, E0621. +For more information about an error, try `rustc --explain E0373`. diff --git a/src/test/ui/closures/closure-expected-type/expect-region-supply-region.nll.stderr b/src/test/ui/closures/closure-expected-type/expect-region-supply-region.nll.stderr new file mode 100644 index 0000000000..bbf75302d5 --- /dev/null +++ b/src/test/ui/closures/closure-expected-type/expect-region-supply-region.nll.stderr @@ -0,0 +1,42 @@ +error[E0521]: borrowed data escapes outside of closure + --> $DIR/expect-region-supply-region.rs:18:9 + | +LL | let mut f: Option<&u32> = None; + | ----- `f` is declared here, outside of the closure body +LL | closure_expecting_bound(|x| { + | - `x` is a reference that is only valid in the closure body +LL | f = Some(x); + | ^^^^^^^^^^^ `x` escapes the closure body here + +error[E0521]: borrowed data escapes outside of closure + --> $DIR/expect-region-supply-region.rs:28:9 + | +LL | let mut f: Option<&u32> = None; + | ----- `f` is declared here, outside of the closure body +LL | closure_expecting_bound(|x: &u32| { + | - `x` is a reference that is only valid in the closure body +LL | f = Some(x); + | ^^^^^^^^^^^ `x` escapes the closure body here + +error: lifetime may not live long enough + --> $DIR/expect-region-supply-region.rs:37:30 + | +LL | fn expect_bound_supply_named<'x>() { + | -- lifetime `'x` defined here +... +LL | closure_expecting_bound(|x: &'x u32| { + | ^ - let's call the lifetime of this reference `'1` + | | + | requires that `'1` must outlive `'x` + +error: lifetime may not live long enough + --> $DIR/expect-region-supply-region.rs:37:30 + | +LL | fn expect_bound_supply_named<'x>() { + | -- lifetime `'x` defined here +... +LL | closure_expecting_bound(|x: &'x u32| { + | ^ requires that `'x` must outlive `'static` + +error: aborting due to 4 previous errors + diff --git a/src/test/ui/closures/closure-immutable-outer-variable.fixed b/src/test/ui/closures/closure-immutable-outer-variable.fixed index 22164a24d8..03240d4857 100644 --- a/src/test/ui/closures/closure-immutable-outer-variable.fixed +++ b/src/test/ui/closures/closure-immutable-outer-variable.fixed @@ -8,5 +8,6 @@ fn foo(mut f: Box) { fn main() { let mut y = true; - foo(Box::new(move || y = false) as Box<_>); //~ ERROR cannot assign to captured outer variable + foo(Box::new(move || y = false) as Box<_>); + //~^ ERROR cannot assign to `y`, as it is not declared as mutable } diff --git a/src/test/ui/closures/closure-immutable-outer-variable.nll.stderr b/src/test/ui/closures/closure-immutable-outer-variable.nll.stderr deleted file mode 100644 index 7e60f3cd8f..0000000000 --- a/src/test/ui/closures/closure-immutable-outer-variable.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0594]: cannot assign to `y`, as it is not declared as mutable - --> $DIR/closure-immutable-outer-variable.rs:11:26 - | -LL | let y = true; - | - help: consider changing this to be mutable: `mut y` -LL | foo(Box::new(move || y = false) as Box<_>); - | ^^^^^^^^^ cannot assign - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/closures/closure-immutable-outer-variable.rs b/src/test/ui/closures/closure-immutable-outer-variable.rs index fc4e385726..8fa9e44845 100644 --- a/src/test/ui/closures/closure-immutable-outer-variable.rs +++ b/src/test/ui/closures/closure-immutable-outer-variable.rs @@ -8,5 +8,6 @@ fn foo(mut f: Box) { fn main() { let y = true; - foo(Box::new(move || y = false) as Box<_>); //~ ERROR cannot assign to captured outer variable + foo(Box::new(move || y = false) as Box<_>); + //~^ ERROR cannot assign to `y`, as it is not declared as mutable } diff --git a/src/test/ui/closures/closure-immutable-outer-variable.stderr b/src/test/ui/closures/closure-immutable-outer-variable.stderr index 332320791d..558c9caeff 100644 --- a/src/test/ui/closures/closure-immutable-outer-variable.stderr +++ b/src/test/ui/closures/closure-immutable-outer-variable.stderr @@ -1,11 +1,10 @@ -error[E0594]: cannot assign to captured outer variable in an `FnMut` closure +error[E0594]: cannot assign to `y`, as it is not declared as mutable --> $DIR/closure-immutable-outer-variable.rs:11:26 | LL | let y = true; - | - help: consider making `y` mutable: `mut y` + | - help: consider changing this to be mutable: `mut y` LL | foo(Box::new(move || y = false) as Box<_>); - | ^^^^^^^^^ + | ^^^^^^^^^ cannot assign error: aborting due to previous error -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr index 087084ae5d..16cdca774b 100644 --- a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr +++ b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr @@ -8,4 +8,3 @@ LL | impl C { fn f() {} } error: aborting due to previous error -For more information about this error, try `rustc --explain E0592`. diff --git a/src/test/ui/codemap_tests/huge_multispan_highlight.nll.stderr b/src/test/ui/codemap_tests/huge_multispan_highlight.nll.stderr deleted file mode 100644 index a60f1c77a5..0000000000 --- a/src/test/ui/codemap_tests/huge_multispan_highlight.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/huge_multispan_highlight.rs:90:13 - | -LL | let x = "foo"; - | - help: consider changing this to be mutable: `mut x` -... -LL | let y = &mut x; - | ^^^^^^ cannot borrow as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/codemap_tests/huge_multispan_highlight.stderr b/src/test/ui/codemap_tests/huge_multispan_highlight.stderr index 13bd666a50..a60f1c77a5 100644 --- a/src/test/ui/codemap_tests/huge_multispan_highlight.stderr +++ b/src/test/ui/codemap_tests/huge_multispan_highlight.stderr @@ -1,11 +1,11 @@ -error[E0596]: cannot borrow immutable local variable `x` as mutable - --> $DIR/huge_multispan_highlight.rs:90:18 +error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable + --> $DIR/huge_multispan_highlight.rs:90:13 | LL | let x = "foo"; - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` ... LL | let y = &mut x; - | ^ cannot borrow mutably + | ^^^^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/issue-11715.nll.stderr b/src/test/ui/codemap_tests/issue-11715.nll.stderr deleted file mode 100644 index d0c29c768e..0000000000 --- a/src/test/ui/codemap_tests/issue-11715.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/issue-11715.rs:5:13 - | -LL | let y = &mut x; - | ------ first mutable borrow occurs here -LL | let z = &mut x; - | ^^^^^^ second mutable borrow occurs here -LL | z.use_mut(); -LL | y.use_mut(); - | - first borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/codemap_tests/issue-11715.stderr b/src/test/ui/codemap_tests/issue-11715.stderr index c37e6b3472..d0c29c768e 100644 --- a/src/test/ui/codemap_tests/issue-11715.stderr +++ b/src/test/ui/codemap_tests/issue-11715.stderr @@ -1,13 +1,13 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/issue-11715.rs:5:18 + --> $DIR/issue-11715.rs:5:13 | LL | let y = &mut x; - | - first mutable borrow occurs here + | ------ first mutable borrow occurs here LL | let z = &mut x; - | ^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here + | ^^^^^^ second mutable borrow occurs here +LL | z.use_mut(); +LL | y.use_mut(); + | - first borrow later used here error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/one_line.nll.stderr b/src/test/ui/codemap_tests/one_line.nll.stderr deleted file mode 100644 index eddbd29c0e..0000000000 --- a/src/test/ui/codemap_tests/one_line.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0499]: cannot borrow `v` as mutable more than once at a time - --> $DIR/one_line.rs:3:12 - | -LL | v.push(v.pop().unwrap()); - | - ---- ^ second mutable borrow occurs here - | | | - | | first borrow later used by call - | first mutable borrow occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/codemap_tests/one_line.stderr b/src/test/ui/codemap_tests/one_line.stderr index 9dcaba8748..eddbd29c0e 100644 --- a/src/test/ui/codemap_tests/one_line.stderr +++ b/src/test/ui/codemap_tests/one_line.stderr @@ -2,9 +2,9 @@ error[E0499]: cannot borrow `v` as mutable more than once at a time --> $DIR/one_line.rs:3:12 | LL | v.push(v.pop().unwrap()); - | - ^ - first borrow ends here - | | | - | | second mutable borrow occurs here + | - ---- ^ second mutable borrow occurs here + | | | + | | first borrow later used by call | first mutable borrow occurs here error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr b/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr index 70c1093e9e..b16d2849f1 100644 --- a/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr +++ b/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr @@ -29,4 +29,3 @@ LL | fn baz(&self) {} error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0592`. diff --git a/src/test/ui/codemap_tests/tab.stderr b/src/test/ui/codemap_tests/tab.stderr index bcc21e9c7a..7b3f959c1c 100644 --- a/src/test/ui/codemap_tests/tab.stderr +++ b/src/test/ui/codemap_tests/tab.stderr @@ -17,5 +17,5 @@ LL | "bar boo" error: aborting due to 2 previous errors -Some errors occurred: E0308, E0425. +Some errors have detailed explanations: E0308, E0425. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/codemap_tests/tab_3.nll.stderr b/src/test/ui/codemap_tests/tab_3.nll.stderr deleted file mode 100644 index 97816a7600..0000000000 --- a/src/test/ui/codemap_tests/tab_3.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0382]: borrow of moved value: `some_vec` - --> $DIR/tab_3.rs:7:20 - | -LL | let some_vec = vec!["hi"]; - | -------- move occurs because `some_vec` has type `std::vec::Vec<&str>`, which does not implement the `Copy` trait -LL | some_vec.into_iter(); - | -------- value moved here -LL | { -LL | println!("{:?}", some_vec); - | ^^^^^^^^ value borrowed here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/codemap_tests/tab_3.rs b/src/test/ui/codemap_tests/tab_3.rs index 4fd5b70f7a..58b034d0fc 100644 --- a/src/test/ui/codemap_tests/tab_3.rs +++ b/src/test/ui/codemap_tests/tab_3.rs @@ -4,6 +4,6 @@ fn main() { let some_vec = vec!["hi"]; some_vec.into_iter(); { - println!("{:?}", some_vec); //~ ERROR use of moved + println!("{:?}", some_vec); //~ ERROR borrow of moved } } diff --git a/src/test/ui/codemap_tests/tab_3.stderr b/src/test/ui/codemap_tests/tab_3.stderr index 4b550dbf9e..97816a7600 100644 --- a/src/test/ui/codemap_tests/tab_3.stderr +++ b/src/test/ui/codemap_tests/tab_3.stderr @@ -1,13 +1,13 @@ -error[E0382]: use of moved value: `some_vec` +error[E0382]: borrow of moved value: `some_vec` --> $DIR/tab_3.rs:7:20 | +LL | let some_vec = vec!["hi"]; + | -------- move occurs because `some_vec` has type `std::vec::Vec<&str>`, which does not implement the `Copy` trait LL | some_vec.into_iter(); | -------- value moved here LL | { LL | println!("{:?}", some_vec); - | ^^^^^^^^ value used here after move - | - = note: move occurs because `some_vec` has type `std::vec::Vec<&str>`, which does not implement the `Copy` trait + | ^^^^^^^^ value borrowed here after move error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/unicode.stderr b/src/test/ui/codemap_tests/unicode.stderr index 7aadeb7dfc..1ba578b0c0 100644 --- a/src/test/ui/codemap_tests/unicode.stderr +++ b/src/test/ui/codemap_tests/unicode.stderr @@ -8,4 +8,3 @@ LL | extern "路濫狼á́́" fn foo() {} error: aborting due to previous error -For more information about this error, try `rustc --explain E0703`. diff --git a/src/test/ui/coercion/coerce-overloaded-autoderef.ast.stderr b/src/test/ui/coercion/coerce-overloaded-autoderef.ast.stderr deleted file mode 100644 index 54215f56bc..0000000000 --- a/src/test/ui/coercion/coerce-overloaded-autoderef.ast.stderr +++ /dev/null @@ -1,42 +0,0 @@ -error[E0499]: cannot borrow `*x` as mutable more than once at a time - --> $DIR/coerce-overloaded-autoderef.rs:12:24 - | -LL | let y = borrow_mut(x); - | - first mutable borrow occurs here -LL | let z = borrow_mut(x); - | ^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here - -error[E0506]: cannot assign to `**x` because it is borrowed - --> $DIR/coerce-overloaded-autoderef.rs:21:5 - | -LL | let y = borrow(x); - | - borrow of `**x` occurs here -LL | let z = borrow(x); -LL | **x += 1; - | ^^^^^^^^ assignment to borrowed `**x` occurs here - -error[E0499]: cannot borrow `*x` as mutable more than once at a time - --> $DIR/coerce-overloaded-autoderef.rs:28:20 - | -LL | borrow_mut2(x, x); - | - ^- first borrow ends here - | | | - | | second mutable borrow occurs here - | first mutable borrow occurs here - -error[E0502]: cannot borrow `*x` as immutable because it is also borrowed as mutable - --> $DIR/coerce-overloaded-autoderef.rs:34:16 - | -LL | borrow2(x, x); - | - ^- mutable borrow ends here - | | | - | | immutable borrow occurs here - | mutable borrow occurs here - -error: aborting due to 4 previous errors - -Some errors occurred: E0499, E0502, E0506. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/coercion/coerce-overloaded-autoderef.mir.nll.stderr b/src/test/ui/coercion/coerce-overloaded-autoderef.mir.nll.stderr deleted file mode 100644 index 5b9249cffa..0000000000 --- a/src/test/ui/coercion/coerce-overloaded-autoderef.mir.nll.stderr +++ /dev/null @@ -1,46 +0,0 @@ -error[E0499]: cannot borrow `*x` as mutable more than once at a time - --> $DIR/coerce-overloaded-autoderef.rs:12:24 - | -LL | let y = borrow_mut(x); - | - first mutable borrow occurs here -LL | let z = borrow_mut(x); - | ^ second mutable borrow occurs here -... -LL | drop((y, z)); - | - first borrow later used here - -error[E0506]: cannot assign to `**x` because it is borrowed - --> $DIR/coerce-overloaded-autoderef.rs:21:5 - | -LL | let y = borrow(x); - | - borrow of `**x` occurs here -LL | let z = borrow(x); -LL | **x += 1; - | ^^^^^^^^ assignment to borrowed `**x` occurs here -... -LL | drop((y, z)); - | - borrow later used here - -error[E0499]: cannot borrow `*x` as mutable more than once at a time - --> $DIR/coerce-overloaded-autoderef.rs:28:20 - | -LL | borrow_mut2(x, x); - | ----------- - ^ second mutable borrow occurs here - | | | - | | first mutable borrow occurs here - | first borrow later used by call - -error[E0502]: cannot borrow `*x` as mutable because it is also borrowed as immutable - --> $DIR/coerce-overloaded-autoderef.rs:34:5 - | -LL | borrow2(x, x); - | -------^^^^-^ - | | | - | | immutable borrow occurs here - | mutable borrow occurs here - | immutable borrow later used by call - -error: aborting due to 4 previous errors - -Some errors occurred: E0499, E0502, E0506. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/coercion/coerce-overloaded-autoderef.mir.stderr b/src/test/ui/coercion/coerce-overloaded-autoderef.mir.stderr deleted file mode 100644 index 8dc6fe50af..0000000000 --- a/src/test/ui/coercion/coerce-overloaded-autoderef.mir.stderr +++ /dev/null @@ -1,45 +0,0 @@ -error[E0499]: cannot borrow `*x` as mutable more than once at a time - --> $DIR/coerce-overloaded-autoderef.rs:12:24 - | -LL | let y = borrow_mut(x); - | - first mutable borrow occurs here -LL | let z = borrow_mut(x); - | ^ second mutable borrow occurs here -... -LL | drop((y, z)); - | - first borrow later used here - -error[E0506]: cannot assign to `**x` because it is borrowed - --> $DIR/coerce-overloaded-autoderef.rs:21:5 - | -LL | let y = borrow(x); - | - borrow of `**x` occurs here -LL | let z = borrow(x); -LL | **x += 1; - | ^^^^^^^^ assignment to borrowed `**x` occurs here -... -LL | drop((y, z)); - | - borrow later used here - -error[E0499]: cannot borrow `*x` as mutable more than once at a time - --> $DIR/coerce-overloaded-autoderef.rs:28:20 - | -LL | borrow_mut2(x, x); - | ----------- - ^ second mutable borrow occurs here - | | | - | | first mutable borrow occurs here - | first borrow later used by call - -error[E0502]: cannot borrow `*x` as immutable because it is also borrowed as mutable - --> $DIR/coerce-overloaded-autoderef.rs:34:16 - | -LL | borrow2(x, x); - | ------- - ^ immutable borrow occurs here - | | | - | | mutable borrow occurs here - | mutable borrow later used by call - -error: aborting due to 4 previous errors - -Some errors occurred: E0499, E0502, E0506. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/coercion/coerce-overloaded-autoderef.rs b/src/test/ui/coercion/coerce-overloaded-autoderef.rs index ec72745cd7..01d9c1e486 100644 --- a/src/test/ui/coercion/coerce-overloaded-autoderef.rs +++ b/src/test/ui/coercion/coerce-overloaded-autoderef.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - fn borrow_mut(x: &mut T) -> &mut T { x } fn borrow(x: &T) -> &T { x } @@ -10,8 +7,7 @@ fn borrow2(_: &mut T, _: &T) {} fn double_mut_borrow(x: &mut Box) { let y = borrow_mut(x); let z = borrow_mut(x); - //[ast]~^ ERROR cannot borrow `*x` as mutable more than once at a time - //[mir]~^^ ERROR cannot borrow `*x` as mutable more than once at a time + //~^ ERROR cannot borrow `*x` as mutable more than once at a time drop((y, z)); } @@ -19,21 +15,18 @@ fn double_imm_borrow(x: &mut Box) { let y = borrow(x); let z = borrow(x); **x += 1; - //[ast]~^ ERROR cannot assign to `**x` because it is borrowed - //[mir]~^^ ERROR cannot assign to `**x` because it is borrowed + //~^ ERROR cannot assign to `**x` because it is borrowed drop((y, z)); } fn double_mut_borrow2(x: &mut Box) { borrow_mut2(x, x); - //[ast]~^ ERROR cannot borrow `*x` as mutable more than once at a time - //[mir]~^^ ERROR cannot borrow `*x` as mutable more than once at a time + //~^ ERROR cannot borrow `*x` as mutable more than once at a time } fn double_borrow2(x: &mut Box) { borrow2(x, x); - //[ast]~^ ERROR cannot borrow `*x` as immutable because it is also borrowed as mutable - //[mir]~^^ ERROR cannot borrow `*x` as immutable because it is also borrowed as mutable + //~^ ERROR cannot borrow `*x` as mutable because it is also borrowed as immutable } pub fn main() {} diff --git a/src/test/ui/coercion/coerce-overloaded-autoderef.ast.nll.stderr b/src/test/ui/coercion/coerce-overloaded-autoderef.stderr similarity index 83% rename from src/test/ui/coercion/coerce-overloaded-autoderef.ast.nll.stderr rename to src/test/ui/coercion/coerce-overloaded-autoderef.stderr index 5b9249cffa..7cdfcb5f4f 100644 --- a/src/test/ui/coercion/coerce-overloaded-autoderef.ast.nll.stderr +++ b/src/test/ui/coercion/coerce-overloaded-autoderef.stderr @@ -1,28 +1,28 @@ error[E0499]: cannot borrow `*x` as mutable more than once at a time - --> $DIR/coerce-overloaded-autoderef.rs:12:24 + --> $DIR/coerce-overloaded-autoderef.rs:9:24 | LL | let y = borrow_mut(x); | - first mutable borrow occurs here LL | let z = borrow_mut(x); | ^ second mutable borrow occurs here -... +LL | LL | drop((y, z)); | - first borrow later used here error[E0506]: cannot assign to `**x` because it is borrowed - --> $DIR/coerce-overloaded-autoderef.rs:21:5 + --> $DIR/coerce-overloaded-autoderef.rs:17:5 | LL | let y = borrow(x); | - borrow of `**x` occurs here LL | let z = borrow(x); LL | **x += 1; | ^^^^^^^^ assignment to borrowed `**x` occurs here -... +LL | LL | drop((y, z)); | - borrow later used here error[E0499]: cannot borrow `*x` as mutable more than once at a time - --> $DIR/coerce-overloaded-autoderef.rs:28:20 + --> $DIR/coerce-overloaded-autoderef.rs:23:20 | LL | borrow_mut2(x, x); | ----------- - ^ second mutable borrow occurs here @@ -31,7 +31,7 @@ LL | borrow_mut2(x, x); | first borrow later used by call error[E0502]: cannot borrow `*x` as mutable because it is also borrowed as immutable - --> $DIR/coerce-overloaded-autoderef.rs:34:5 + --> $DIR/coerce-overloaded-autoderef.rs:28:5 | LL | borrow2(x, x); | -------^^^^-^ @@ -42,5 +42,5 @@ LL | borrow2(x, x); error: aborting due to 4 previous errors -Some errors occurred: E0499, E0502, E0506. +Some errors have detailed explanations: E0499, E0502, E0506. For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/coherence/auxiliary/re_rebalance_coherence_lib.rs b/src/test/ui/coherence/auxiliary/re_rebalance_coherence_lib.rs index c8d027b25c..41b9d64d5f 100644 --- a/src/test/ui/coherence/auxiliary/re_rebalance_coherence_lib.rs +++ b/src/test/ui/coherence/auxiliary/re_rebalance_coherence_lib.rs @@ -1,5 +1,4 @@ - -pub trait Backend{} +pub trait Backend {} pub trait SupportsDefaultKeyword {} impl SupportsDefaultKeyword for Postgres {} diff --git a/src/test/ui/coherence/coherence-cross-crate-conflict.old.stderr b/src/test/ui/coherence/coherence-cross-crate-conflict.old.stderr index 3ba32a5283..93be257028 100644 --- a/src/test/ui/coherence/coherence-cross-crate-conflict.old.stderr +++ b/src/test/ui/coherence/coherence-cross-crate-conflict.old.stderr @@ -17,5 +17,5 @@ LL | impl Foo for A { error: aborting due to 2 previous errors -Some errors occurred: E0119, E0210. +Some errors have detailed explanations: E0119, E0210. For more information about an error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-cross-crate-conflict.re.stderr b/src/test/ui/coherence/coherence-cross-crate-conflict.re.stderr index 3ba32a5283..93be257028 100644 --- a/src/test/ui/coherence/coherence-cross-crate-conflict.re.stderr +++ b/src/test/ui/coherence/coherence-cross-crate-conflict.re.stderr @@ -17,5 +17,5 @@ LL | impl Foo for A { error: aborting due to 2 previous errors -Some errors occurred: E0119, E0210. +Some errors have detailed explanations: E0119, E0210. For more information about an error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-default-trait-impl.old.stderr b/src/test/ui/coherence/coherence-default-trait-impl.old.stderr index 534f4b0dcd..3f644e3a6e 100644 --- a/src/test/ui/coherence/coherence-default-trait-impl.old.stderr +++ b/src/test/ui/coherence/coherence-default-trait-impl.old.stderr @@ -12,5 +12,5 @@ LL | impl MyUnsafeTrait for Foo {} error: aborting due to 2 previous errors -Some errors occurred: E0199, E0200. +Some errors have detailed explanations: E0199, E0200. For more information about an error, try `rustc --explain E0199`. diff --git a/src/test/ui/coherence/coherence-default-trait-impl.re.stderr b/src/test/ui/coherence/coherence-default-trait-impl.re.stderr index 534f4b0dcd..3f644e3a6e 100644 --- a/src/test/ui/coherence/coherence-default-trait-impl.re.stderr +++ b/src/test/ui/coherence/coherence-default-trait-impl.re.stderr @@ -12,5 +12,5 @@ LL | impl MyUnsafeTrait for Foo {} error: aborting due to 2 previous errors -Some errors occurred: E0199, E0200. +Some errors have detailed explanations: E0199, E0200. For more information about an error, try `rustc --explain E0199`. diff --git a/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-negative.stderr b/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-negative.stderr index 86a63eb569..edadb9b93d 100644 --- a/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-negative.stderr +++ b/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-negative.stderr @@ -33,5 +33,5 @@ LL | impl !Send for dyn Object + Marker2 {} error: aborting due to 5 previous errors -Some errors occurred: E0117, E0321, E0371. +Some errors have detailed explanations: E0117, E0321, E0371. For more information about an error, try `rustc --explain E0117`. diff --git a/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-positive.stderr b/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-positive.stderr index 536b4625ae..322e7a5af2 100644 --- a/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-positive.stderr +++ b/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-positive.stderr @@ -33,5 +33,5 @@ LL | unsafe impl Send for dyn Object + Marker2 {} error: aborting due to 5 previous errors -Some errors occurred: E0117, E0321, E0371. +Some errors have detailed explanations: E0117, E0321, E0371. For more information about an error, try `rustc --explain E0117`. diff --git a/src/test/ui/coherence/coherence-impls-copy.old.stderr b/src/test/ui/coherence/coherence-impls-copy.old.stderr index e870c267ce..5c95cc173f 100644 --- a/src/test/ui/coherence/coherence-impls-copy.old.stderr +++ b/src/test/ui/coherence/coherence-impls-copy.old.stderr @@ -83,5 +83,5 @@ LL | impl Copy for &'static [NotSync] {} error: aborting due to 10 previous errors -Some errors occurred: E0117, E0119, E0206. +Some errors have detailed explanations: E0117, E0119, E0206. For more information about an error, try `rustc --explain E0117`. diff --git a/src/test/ui/coherence/coherence-impls-copy.re.stderr b/src/test/ui/coherence/coherence-impls-copy.re.stderr index e870c267ce..5c95cc173f 100644 --- a/src/test/ui/coherence/coherence-impls-copy.re.stderr +++ b/src/test/ui/coherence/coherence-impls-copy.re.stderr @@ -83,5 +83,5 @@ LL | impl Copy for &'static [NotSync] {} error: aborting due to 10 previous errors -Some errors occurred: E0117, E0119, E0206. +Some errors have detailed explanations: E0117, E0119, E0206. For more information about an error, try `rustc --explain E0117`. diff --git a/src/test/ui/coherence/coherence-impls-send.old.stderr b/src/test/ui/coherence/coherence-impls-send.old.stderr index 3ede8363d1..b67f4d517b 100644 --- a/src/test/ui/coherence/coherence-impls-send.old.stderr +++ b/src/test/ui/coherence/coherence-impls-send.old.stderr @@ -33,5 +33,5 @@ LL | unsafe impl Send for &'static [NotSync] {} error: aborting due to 4 previous errors -Some errors occurred: E0117, E0321. +Some errors have detailed explanations: E0117, E0321. For more information about an error, try `rustc --explain E0117`. diff --git a/src/test/ui/coherence/coherence-impls-send.re.stderr b/src/test/ui/coherence/coherence-impls-send.re.stderr index 3ede8363d1..b67f4d517b 100644 --- a/src/test/ui/coherence/coherence-impls-send.re.stderr +++ b/src/test/ui/coherence/coherence-impls-send.re.stderr @@ -33,5 +33,5 @@ LL | unsafe impl Send for &'static [NotSync] {} error: aborting due to 4 previous errors -Some errors occurred: E0117, E0321. +Some errors have detailed explanations: E0117, E0321. For more information about an error, try `rustc --explain E0117`. diff --git a/src/test/ui/coherence/coherence-impls-sized.old.stderr b/src/test/ui/coherence/coherence-impls-sized.old.stderr index 86a0996554..a19ecfdc3c 100644 --- a/src/test/ui/coherence/coherence-impls-sized.old.stderr +++ b/src/test/ui/coherence/coherence-impls-sized.old.stderr @@ -63,5 +63,5 @@ LL | impl Sized for &'static [NotSync] {} error: aborting due to 9 previous errors -Some errors occurred: E0117, E0322. +Some errors have detailed explanations: E0117, E0322. For more information about an error, try `rustc --explain E0117`. diff --git a/src/test/ui/coherence/coherence-impls-sized.re.stderr b/src/test/ui/coherence/coherence-impls-sized.re.stderr index 86a0996554..a19ecfdc3c 100644 --- a/src/test/ui/coherence/coherence-impls-sized.re.stderr +++ b/src/test/ui/coherence/coherence-impls-sized.re.stderr @@ -63,5 +63,5 @@ LL | impl Sized for &'static [NotSync] {} error: aborting due to 9 previous errors -Some errors occurred: E0117, E0322. +Some errors have detailed explanations: E0117, E0322. For more information about an error, try `rustc --explain E0117`. diff --git a/src/test/ui/coherence/coherence-overlap-downstream-inherent.old.stderr b/src/test/ui/coherence/coherence-overlap-downstream-inherent.old.stderr index dcfc017f1b..283d7a04d9 100644 --- a/src/test/ui/coherence/coherence-overlap-downstream-inherent.old.stderr +++ b/src/test/ui/coherence/coherence-overlap-downstream-inherent.old.stderr @@ -20,4 +20,3 @@ LL | impl A { fn f(&self) {} } error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0592`. diff --git a/src/test/ui/coherence/coherence-overlap-downstream-inherent.re.stderr b/src/test/ui/coherence/coherence-overlap-downstream-inherent.re.stderr index dcfc017f1b..283d7a04d9 100644 --- a/src/test/ui/coherence/coherence-overlap-downstream-inherent.re.stderr +++ b/src/test/ui/coherence/coherence-overlap-downstream-inherent.re.stderr @@ -20,4 +20,3 @@ LL | impl A { fn f(&self) {} } error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0592`. diff --git a/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr b/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr index 6fd9307754..38df106cc8 100644 --- a/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr +++ b/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr @@ -11,4 +11,3 @@ LL | impl Cake> { fn dummy(&self) { } } error: aborting due to previous error -For more information about this error, try `rustc --explain E0592`. diff --git a/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.re.stderr b/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.re.stderr index 6fd9307754..38df106cc8 100644 --- a/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.re.stderr +++ b/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.re.stderr @@ -11,4 +11,3 @@ LL | impl Cake> { fn dummy(&self) { } } error: aborting due to previous error -For more information about this error, try `rustc --explain E0592`. diff --git a/src/test/ui/coherence/coherence-overlap-upstream-inherent.old.stderr b/src/test/ui/coherence/coherence-overlap-upstream-inherent.old.stderr index 928b65e003..6716b71b25 100644 --- a/src/test/ui/coherence/coherence-overlap-upstream-inherent.old.stderr +++ b/src/test/ui/coherence/coherence-overlap-upstream-inherent.old.stderr @@ -11,4 +11,3 @@ LL | impl A { fn dummy(&self) { } } error: aborting due to previous error -For more information about this error, try `rustc --explain E0592`. diff --git a/src/test/ui/coherence/coherence-overlap-upstream-inherent.re.stderr b/src/test/ui/coherence/coherence-overlap-upstream-inherent.re.stderr index 928b65e003..6716b71b25 100644 --- a/src/test/ui/coherence/coherence-overlap-upstream-inherent.re.stderr +++ b/src/test/ui/coherence/coherence-overlap-upstream-inherent.re.stderr @@ -11,4 +11,3 @@ LL | impl A { fn dummy(&self) { } } error: aborting due to previous error -For more information about this error, try `rustc --explain E0592`. diff --git a/src/test/ui/command-line-diagnostics.nll.stderr b/src/test/ui/command-line-diagnostics.nll.stderr deleted file mode 100644 index b3f8d8a643..0000000000 --- a/src/test/ui/command-line-diagnostics.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/command-line-diagnostics.rs:6:5 - | -LL | let x = 42; - | - - | | - | first assignment to `x` - | help: make this binding mutable: `mut x` -LL | x = 43; - | ^^^^^^ cannot assign twice to immutable variable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/command-line-diagnostics.stderr b/src/test/ui/command-line-diagnostics.stderr index 6f1156e0d3..b3f8d8a643 100644 --- a/src/test/ui/command-line-diagnostics.stderr +++ b/src/test/ui/command-line-diagnostics.stderr @@ -2,7 +2,10 @@ error[E0384]: cannot assign twice to immutable variable `x` --> $DIR/command-line-diagnostics.rs:6:5 | LL | let x = 42; - | - first assignment to `x` + | - + | | + | first assignment to `x` + | help: make this binding mutable: `mut x` LL | x = 43; | ^^^^^^ cannot assign twice to immutable variable diff --git a/src/test/ui/conditional-compilation/cfg-arg-invalid-1.stderr b/src/test/ui/conditional-compilation/cfg-arg-invalid-1.stderr new file mode 100644 index 0000000000..1e7922a9ff --- /dev/null +++ b/src/test/ui/conditional-compilation/cfg-arg-invalid-1.stderr @@ -0,0 +1,2 @@ +error: invalid `--cfg` argument: `a(b=c)` (expected `key` or `key="value"`) + diff --git a/src/test/ui/conditional-compilation/cfg-arg-invalid-2.stderr b/src/test/ui/conditional-compilation/cfg-arg-invalid-2.stderr new file mode 100644 index 0000000000..b92e1fd3d9 --- /dev/null +++ b/src/test/ui/conditional-compilation/cfg-arg-invalid-2.stderr @@ -0,0 +1,2 @@ +error: invalid `--cfg` argument: `a{b}` (expected `key` or `key="value"`) + diff --git a/src/test/ui/conditional-compilation/cfg-arg-invalid-3.stderr b/src/test/ui/conditional-compilation/cfg-arg-invalid-3.stderr new file mode 100644 index 0000000000..5412f7ffd5 --- /dev/null +++ b/src/test/ui/conditional-compilation/cfg-arg-invalid-3.stderr @@ -0,0 +1,2 @@ +error: invalid `--cfg` argument: `a::b` (argument key must be an identifier) + diff --git a/src/test/ui/conditional-compilation/cfg-arg-invalid-4.stderr b/src/test/ui/conditional-compilation/cfg-arg-invalid-4.stderr new file mode 100644 index 0000000000..6853a69b9e --- /dev/null +++ b/src/test/ui/conditional-compilation/cfg-arg-invalid-4.stderr @@ -0,0 +1,2 @@ +error: invalid `--cfg` argument: `a(b)` (expected `key` or `key="value"`) + diff --git a/src/test/ui/conditional-compilation/cfg-arg-invalid-5.stderr b/src/test/ui/conditional-compilation/cfg-arg-invalid-5.stderr new file mode 100644 index 0000000000..aafc4e8980 --- /dev/null +++ b/src/test/ui/conditional-compilation/cfg-arg-invalid-5.stderr @@ -0,0 +1,2 @@ +error: invalid `--cfg` argument: `a=10` (argument value must be a string) + diff --git a/src/test/ui/conditional-compilation/cfg-attr-crate-2.stderr b/src/test/ui/conditional-compilation/cfg-attr-crate-2.stderr index 8d308f0c96..ec77789449 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-crate-2.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-crate-2.stderr @@ -1,9 +1,10 @@ -error[E0658]: no_core is experimental (see issue #29639) +error[E0658]: no_core is experimental --> $DIR/cfg-attr-crate-2.rs:6:21 | LL | #![cfg_attr(broken, no_core)] | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29639 = help: add #![feature(no_core)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/conditional-compilation/cfg-attr-multi-invalid-1.stderr b/src/test/ui/conditional-compilation/cfg-attr-multi-invalid-1.stderr index 8485459ca6..ad5177dc9c 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-multi-invalid-1.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-multi-invalid-1.stderr @@ -1,9 +1,10 @@ -error[E0658]: no_core is experimental (see issue #29639) +error[E0658]: no_core is experimental --> $DIR/cfg-attr-multi-invalid-1.rs:4:21 | LL | #![cfg_attr(broken, no_core, no_std)] | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29639 = help: add #![feature(no_core)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/conditional-compilation/cfg-attr-multi-invalid-2.stderr b/src/test/ui/conditional-compilation/cfg-attr-multi-invalid-2.stderr index 2a673ea813..675997758e 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-multi-invalid-2.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-multi-invalid-2.stderr @@ -1,9 +1,10 @@ -error[E0658]: no_core is experimental (see issue #29639) +error[E0658]: no_core is experimental --> $DIR/cfg-attr-multi-invalid-2.rs:4:29 | LL | #![cfg_attr(broken, no_std, no_core)] | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29639 = help: add #![feature(no_core)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr b/src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr index ae37461cab..5bfe9e902d 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr @@ -63,5 +63,5 @@ LL | generate_s10!(concat!("nonexistent")); error: aborting due to 10 previous errors -Some errors occurred: E0537, E0565. +Some errors have detailed explanations: E0537, E0565. For more information about an error, try `rustc --explain E0537`. diff --git a/src/test/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr b/src/test/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr index d0b59c3994..ca3e3d9eff 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr @@ -1,4 +1,4 @@ -error[E0658]: The attribute `unknown` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `unknown` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/cfg-attr-unknown-attribute-macro-expansion.rs:3:27 | LL | #[cfg_attr(all(), unknown)] @@ -7,6 +7,7 @@ LL | #[cfg_attr(all(), unknown)] LL | foo!(); | ------- in this macro invocation | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/conditional-compilation/cfg-empty-codemap.stderr b/src/test/ui/conditional-compilation/cfg-empty-codemap.stderr new file mode 100644 index 0000000000..128e3cd730 --- /dev/null +++ b/src/test/ui/conditional-compilation/cfg-empty-codemap.stderr @@ -0,0 +1,2 @@ +error: invalid `--cfg` argument: `""` (expected `key` or `key="value"`) + diff --git a/src/test/ui/conflicting-repr-hints.stderr b/src/test/ui/conflicting-repr-hints.stderr index c39055f017..6b15b7ebbe 100644 --- a/src/test/ui/conflicting-repr-hints.stderr +++ b/src/test/ui/conflicting-repr-hints.stderr @@ -66,5 +66,3 @@ LL | | } error: aborting due to 8 previous errors -Some errors occurred: E0566, E0587, E0634. -For more information about an error, try `rustc --explain E0566`. diff --git a/src/test/ui/const-generics/cannot-infer-const-args.rs b/src/test/ui/const-generics/cannot-infer-const-args.rs new file mode 100644 index 0000000000..e1061c6d1a --- /dev/null +++ b/src/test/ui/const-generics/cannot-infer-const-args.rs @@ -0,0 +1,10 @@ +#![feature(const_generics)] +//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash + +fn foo() -> usize { + 0 +} + +fn main() { + foo(); //~ ERROR type annotations needed +} diff --git a/src/test/ui/const-generics/cannot-infer-const-args.stderr b/src/test/ui/const-generics/cannot-infer-const-args.stderr new file mode 100644 index 0000000000..5528c2fca6 --- /dev/null +++ b/src/test/ui/const-generics/cannot-infer-const-args.stderr @@ -0,0 +1,15 @@ +warning: the feature `const_generics` is incomplete and may cause the compiler to crash + --> $DIR/cannot-infer-const-args.rs:1:12 + | +LL | #![feature(const_generics)] + | ^^^^^^^^^^^^^^ + +error[E0282]: type annotations needed + --> $DIR/cannot-infer-const-args.rs:9:5 + | +LL | foo(); + | ^^^ cannot infer type for `fn() -> usize {foo::<_>}` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0282`. diff --git a/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs b/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs index 7d546827c9..c3f5e360fe 100644 --- a/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs +++ b/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs @@ -1,9 +1,3 @@ -// The test is failing on 1.35.0 stable but that's not important since the ICE happens only with -// the feature gate enabled, thus it doesn't affect stable. -// https://github.com/rust-lang/rust/pull/60710#issuecomment-493662676 -// -// ignore-test - #![feature(const_generics)] //~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash diff --git a/src/test/ui/const-generics/concrete-const-as-fn-arg.rs b/src/test/ui/const-generics/concrete-const-as-fn-arg.rs new file mode 100644 index 0000000000..54981b77a2 --- /dev/null +++ b/src/test/ui/const-generics/concrete-const-as-fn-arg.rs @@ -0,0 +1,14 @@ +// Test that a concrete const type i.e. A<2>, can be used as an argument type in a function +// run-pass + +#![feature(const_generics)] +//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash + +struct A; // ok + +fn with_concrete_const_arg(_: A<2>) -> u32 { 17 } + +fn main() { + let val: A<2> = A; + assert_eq!(with_concrete_const_arg(val), 17); +} diff --git a/src/test/ui/const-generics/concrete-const-as-fn-arg.stderr b/src/test/ui/const-generics/concrete-const-as-fn-arg.stderr new file mode 100644 index 0000000000..955b319d70 --- /dev/null +++ b/src/test/ui/const-generics/concrete-const-as-fn-arg.stderr @@ -0,0 +1,6 @@ +warning: the feature `const_generics` is incomplete and may cause the compiler to crash + --> $DIR/concrete-const-as-fn-arg.rs:4:12 + | +LL | #![feature(const_generics)] + | ^^^^^^^^^^^^^^ + diff --git a/src/test/ui/const-generics/concrete-const-impl-method.rs b/src/test/ui/const-generics/concrete-const-impl-method.rs new file mode 100644 index 0000000000..226ea41518 --- /dev/null +++ b/src/test/ui/const-generics/concrete-const-impl-method.rs @@ -0,0 +1,24 @@ +// Test that a method/associated non-method within an impl block of a concrete const type i.e. A<2>, +// is callable. +// run-pass + +#![feature(const_generics)] +//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash + +pub struct A; + +impl A<2> { + fn impl_method(&self) -> u32 { + 17 + } + + fn associated_non_method() -> u32 { + 17 + } +} + +fn main() { + let val: A<2> = A; + assert_eq!(val.impl_method(), 17); + assert_eq!(A::<2>::associated_non_method(), 17); +} diff --git a/src/test/ui/const-generics/concrete-const-impl-method.stderr b/src/test/ui/const-generics/concrete-const-impl-method.stderr new file mode 100644 index 0000000000..3ce488c627 --- /dev/null +++ b/src/test/ui/const-generics/concrete-const-impl-method.stderr @@ -0,0 +1,6 @@ +warning: the feature `const_generics` is incomplete and may cause the compiler to crash + --> $DIR/concrete-const-impl-method.rs:5:12 + | +LL | #![feature(const_generics)] + | ^^^^^^^^^^^^^^ + diff --git a/src/test/ui/const-generics/const-arg-in-fn.rs b/src/test/ui/const-generics/const-arg-in-fn.rs new file mode 100644 index 0000000000..3f86782838 --- /dev/null +++ b/src/test/ui/const-generics/const-arg-in-fn.rs @@ -0,0 +1,13 @@ +// run-pass + +#![feature(const_generics)] +//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash + +fn const_u32_identity() -> u32 { + X +} + + fn main() { + let val = const_u32_identity::<18>(); + assert_eq!(val, 18); +} diff --git a/src/test/ui/const-generics/const-arg-in-fn.stderr b/src/test/ui/const-generics/const-arg-in-fn.stderr new file mode 100644 index 0000000000..e32b714b25 --- /dev/null +++ b/src/test/ui/const-generics/const-arg-in-fn.stderr @@ -0,0 +1,6 @@ +warning: the feature `const_generics` is incomplete and may cause the compiler to crash + --> $DIR/const-arg-in-fn.rs:3:12 + | +LL | #![feature(const_generics)] + | ^^^^^^^^^^^^^^ + diff --git a/src/test/ui/const-generics/const-expression-parameter.rs b/src/test/ui/const-generics/const-expression-parameter.rs index 662c7b767b..22c6c35162 100644 --- a/src/test/ui/const-generics/const-expression-parameter.rs +++ b/src/test/ui/const-generics/const-expression-parameter.rs @@ -6,7 +6,7 @@ fn i32_identity() -> i32 { } fn foo_a() { - i32_identity::<-1>(); //~ ERROR expected identifier, found `<-` + i32_identity::<-1>(); // ok } fn foo_b() { diff --git a/src/test/ui/const-generics/const-expression-parameter.stderr b/src/test/ui/const-generics/const-expression-parameter.stderr index 2f7a80f0c8..c255127c28 100644 --- a/src/test/ui/const-generics/const-expression-parameter.stderr +++ b/src/test/ui/const-generics/const-expression-parameter.stderr @@ -1,9 +1,3 @@ -error: expected identifier, found `<-` - --> $DIR/const-expression-parameter.rs:9:19 - | -LL | i32_identity::<-1>(); - | ^^ expected identifier - error: expected one of `,` or `>`, found `+` --> $DIR/const-expression-parameter.rs:13:22 | @@ -16,5 +10,5 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t LL | #![feature(const_generics)] | ^^^^^^^^^^^^^^ -error: aborting due to 2 previous errors +error: aborting due to previous error diff --git a/src/test/ui/const-generics/const-param-before-other-params.rs b/src/test/ui/const-generics/const-param-before-other-params.rs index 188b5dce31..2c81681b85 100644 --- a/src/test/ui/const-generics/const-param-before-other-params.rs +++ b/src/test/ui/const-generics/const-param-before-other-params.rs @@ -1,12 +1,12 @@ #![feature(const_generics)] //~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash -fn foo(_: &T) { - //~^ ERROR type parameters must be declared prior to const parameters -} - fn bar(_: &'a ()) { //~^ ERROR lifetime parameters must be declared prior to const parameters } +fn foo(_: &T) { + //~^ ERROR type parameters must be declared prior to const parameters +} + fn main() {} diff --git a/src/test/ui/const-generics/const-param-before-other-params.stderr b/src/test/ui/const-generics/const-param-before-other-params.stderr index 78f129e79e..33f981d1eb 100644 --- a/src/test/ui/const-generics/const-param-before-other-params.stderr +++ b/src/test/ui/const-generics/const-param-before-other-params.stderr @@ -4,17 +4,17 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t LL | #![feature(const_generics)] | ^^^^^^^^^^^^^^ -error: type parameters must be declared prior to const parameters +error: lifetime parameters must be declared prior to const parameters --> $DIR/const-param-before-other-params.rs:4:21 | -LL | fn foo(_: &T) { - | --------------^- help: reorder the parameters: lifetimes, then types, then consts: `` +LL | fn bar(_: &'a ()) { + | --------------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, const X: ()>` -error: lifetime parameters must be declared prior to const parameters +error: type parameters must be declared prior to const parameters --> $DIR/const-param-before-other-params.rs:8:21 | -LL | fn bar(_: &'a ()) { - | --------------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, const X: ()>` +LL | fn foo(_: &T) { + | --------------^- help: reorder the parameters: lifetimes, then types, then consts: `` error: aborting due to 2 previous errors diff --git a/src/test/ui/const-generics/const-param-from-outer-fn.stderr b/src/test/ui/const-generics/const-param-from-outer-fn.stderr index e37b34fac3..f0b7562f62 100644 --- a/src/test/ui/const-generics/const-param-from-outer-fn.stderr +++ b/src/test/ui/const-generics/const-param-from-outer-fn.stderr @@ -8,7 +8,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/const-param-from-outer-fn.rs:6:9 | LL | fn foo() { - | - const variable from outer function + | - const parameter from outer function LL | fn bar() -> u32 { | --- try adding a local generic parameter in this method instead LL | X diff --git a/src/test/ui/const-generics/const-param-in-trait-ungated.rs b/src/test/ui/const-generics/const-param-in-trait-ungated.rs new file mode 100644 index 0000000000..8a81bcc1a8 --- /dev/null +++ b/src/test/ui/const-generics/const-param-in-trait-ungated.rs @@ -0,0 +1,3 @@ +trait Trait {} //~ ERROR const generics are unstable + +fn main() {} diff --git a/src/test/ui/const-generics/const-param-in-trait-ungated.stderr b/src/test/ui/const-generics/const-param-in-trait-ungated.stderr new file mode 100644 index 0000000000..53bc973841 --- /dev/null +++ b/src/test/ui/const-generics/const-param-in-trait-ungated.stderr @@ -0,0 +1,12 @@ +error[E0658]: const generics are unstable + --> $DIR/const-param-in-trait-ungated.rs:1:19 + | +LL | trait Trait {} + | ^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/44580 + = help: add #![feature(const_generics)] to the crate attributes to enable + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/const-generics/const-param-in-trait.rs b/src/test/ui/const-generics/const-param-in-trait.rs new file mode 100644 index 0000000000..6e4f65fe6c --- /dev/null +++ b/src/test/ui/const-generics/const-param-in-trait.rs @@ -0,0 +1,8 @@ +// run-pass + +#![feature(const_generics)] +//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash + +trait Trait {} + +fn main() {} diff --git a/src/test/ui/const-generics/const-param-in-trait.stderr b/src/test/ui/const-generics/const-param-in-trait.stderr new file mode 100644 index 0000000000..a48eefddaa --- /dev/null +++ b/src/test/ui/const-generics/const-param-in-trait.stderr @@ -0,0 +1,6 @@ +warning: the feature `const_generics` is incomplete and may cause the compiler to crash + --> $DIR/const-param-in-trait.rs:3:12 + | +LL | #![feature(const_generics)] + | ^^^^^^^^^^^^^^ + diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs b/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs new file mode 100644 index 0000000000..af5e8f4975 --- /dev/null +++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs @@ -0,0 +1,6 @@ +use std::marker::PhantomData; + +struct B(PhantomData<[T; N]>); //~ ERROR const generics are unstable +//~^ ERROR const parameters cannot depend on type parameters + +fn main() {} diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr b/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr new file mode 100644 index 0000000000..e3adbcfe60 --- /dev/null +++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr @@ -0,0 +1,19 @@ +error[E0671]: const parameters cannot depend on type parameters + --> $DIR/const-param-type-depends-on-type-param-ungated.rs:3:22 + | +LL | struct B(PhantomData<[T; N]>); + | ^ const parameter depends on type parameter + +error[E0658]: const generics are unstable + --> $DIR/const-param-type-depends-on-type-param-ungated.rs:3:19 + | +LL | struct B(PhantomData<[T; N]>); + | ^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/44580 + = help: add #![feature(const_generics)] to the crate attributes to enable + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0658, E0671. +For more information about an error, try `rustc --explain E0658`. diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param.rs b/src/test/ui/const-generics/const-param-type-depends-on-type-param.rs new file mode 100644 index 0000000000..28e0d6c2bb --- /dev/null +++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param.rs @@ -0,0 +1,13 @@ +#![feature(const_generics)] +//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash + +// Currently, const parameters cannot depend on type parameters, because there is no way to +// enforce the `structural_match` property on an arbitrary type parameter. This restriction +// may be relaxed in the future. See https://github.com/rust-lang/rfcs/pull/2000 for more +// details. + +pub struct Dependent([(); X]); +//~^ ERROR const parameters cannot depend on type parameters +//~^^ ERROR parameter `T` is never used + +fn main() {} diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr b/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr new file mode 100644 index 0000000000..c7dcbe1354 --- /dev/null +++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr @@ -0,0 +1,24 @@ +warning: the feature `const_generics` is incomplete and may cause the compiler to crash + --> $DIR/const-param-type-depends-on-type-param.rs:1:12 + | +LL | #![feature(const_generics)] + | ^^^^^^^^^^^^^^ + +error[E0671]: const parameters cannot depend on type parameters + --> $DIR/const-param-type-depends-on-type-param.rs:9:34 + | +LL | pub struct Dependent([(); X]); + | ^ const parameter depends on type parameter + +error[E0392]: parameter `T` is never used + --> $DIR/const-param-type-depends-on-type-param.rs:9:22 + | +LL | pub struct Dependent([(); X]); + | ^ unused parameter + | + = help: consider removing `T` or using a marker such as `std::marker::PhantomData` + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0392, E0671. +For more information about an error, try `rustc --explain E0392`. diff --git a/src/test/ui/const-generics/const-types.rs b/src/test/ui/const-generics/const-types.rs new file mode 100644 index 0000000000..11757cd588 --- /dev/null +++ b/src/test/ui/const-generics/const-types.rs @@ -0,0 +1,16 @@ +// run-pass + +#![feature(const_generics)] +//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash + +#[allow(dead_code)] + +struct ConstArray { + array: [T; LEN], +} + +fn main() { + let arr = ConstArray:: { + array: [0; 8], + }; +} diff --git a/src/test/ui/const-generics/const-types.stderr b/src/test/ui/const-generics/const-types.stderr new file mode 100644 index 0000000000..fbf5d53754 --- /dev/null +++ b/src/test/ui/const-generics/const-types.stderr @@ -0,0 +1,6 @@ +warning: the feature `const_generics` is incomplete and may cause the compiler to crash + --> $DIR/const-types.rs:3:12 + | +LL | #![feature(const_generics)] + | ^^^^^^^^^^^^^^ + diff --git a/src/test/ui/const-generics/impl-const-generic-struct.rs b/src/test/ui/const-generics/impl-const-generic-struct.rs new file mode 100644 index 0000000000..7a0c0f2be5 --- /dev/null +++ b/src/test/ui/const-generics/impl-const-generic-struct.rs @@ -0,0 +1,16 @@ +// run-pass + +#![feature(const_generics)] +//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash + +struct S; + +impl S<{X}> { + fn x() -> u32 { + X + } +} + +fn main() { + assert_eq!(S::<19>::x(), 19); +} diff --git a/src/test/ui/const-generics/impl-const-generic-struct.stderr b/src/test/ui/const-generics/impl-const-generic-struct.stderr new file mode 100644 index 0000000000..d443e060a9 --- /dev/null +++ b/src/test/ui/const-generics/impl-const-generic-struct.stderr @@ -0,0 +1,6 @@ +warning: the feature `const_generics` is incomplete and may cause the compiler to crash + --> $DIR/impl-const-generic-struct.rs:3:12 + | +LL | #![feature(const_generics)] + | ^^^^^^^^^^^^^^ + diff --git a/src/test/ui/const-generics/incorrect-number-of-const-args.rs b/src/test/ui/const-generics/incorrect-number-of-const-args.rs new file mode 100644 index 0000000000..7059e9d834 --- /dev/null +++ b/src/test/ui/const-generics/incorrect-number-of-const-args.rs @@ -0,0 +1,11 @@ +#![feature(const_generics)] +//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash + +fn foo() -> usize { + 0 +} + +fn main() { + foo::<0>(); //~ ERROR wrong number of const arguments: expected 2, found 1 + foo::<0, 0, 0>(); //~ ERROR wrong number of const arguments: expected 2, found 3 +} diff --git a/src/test/ui/const-generics/incorrect-number-of-const-args.stderr b/src/test/ui/const-generics/incorrect-number-of-const-args.stderr new file mode 100644 index 0000000000..11727733eb --- /dev/null +++ b/src/test/ui/const-generics/incorrect-number-of-const-args.stderr @@ -0,0 +1,21 @@ +warning: the feature `const_generics` is incomplete and may cause the compiler to crash + --> $DIR/incorrect-number-of-const-args.rs:1:12 + | +LL | #![feature(const_generics)] + | ^^^^^^^^^^^^^^ + +error[E0107]: wrong number of const arguments: expected 2, found 1 + --> $DIR/incorrect-number-of-const-args.rs:9:5 + | +LL | foo::<0>(); + | ^^^^^^^^ expected 2 const arguments + +error[E0107]: wrong number of const arguments: expected 2, found 3 + --> $DIR/incorrect-number-of-const-args.rs:10:17 + | +LL | foo::<0, 0, 0>(); + | ^ unexpected const argument + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0107`. diff --git a/src/test/ui/const-generics/invalid-const-arg-for-type-param.stderr b/src/test/ui/const-generics/invalid-const-arg-for-type-param.stderr index 1bd9865369..8f3f91651e 100644 --- a/src/test/ui/const-generics/invalid-const-arg-for-type-param.stderr +++ b/src/test/ui/const-generics/invalid-const-arg-for-type-param.stderr @@ -21,5 +21,5 @@ LL | S::<0>; error: aborting due to 3 previous errors -Some errors occurred: E0107, E0599. +Some errors have detailed explanations: E0107, E0599. For more information about an error, try `rustc --explain E0107`. diff --git a/src/test/ui/const-generics/issue-60263.rs b/src/test/ui/const-generics/issue-60263.rs new file mode 100644 index 0000000000..70cbc242c4 --- /dev/null +++ b/src/test/ui/const-generics/issue-60263.rs @@ -0,0 +1,9 @@ +struct B; //~ ERROR const generics are unstable + +impl B<0> { + fn bug() -> Self { + panic!() + } +} + +fn main() {} diff --git a/src/test/ui/const-generics/issue-60263.stderr b/src/test/ui/const-generics/issue-60263.stderr new file mode 100644 index 0000000000..ab1b9e4a7c --- /dev/null +++ b/src/test/ui/const-generics/issue-60263.stderr @@ -0,0 +1,12 @@ +error[E0658]: const generics are unstable + --> $DIR/issue-60263.rs:1:16 + | +LL | struct B; + | ^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/44580 + = help: add #![feature(const_generics)] to the crate attributes to enable + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/const-generics/struct-with-invalid-const-param.stderr b/src/test/ui/const-generics/struct-with-invalid-const-param.stderr index 561464b21c..64354752fd 100644 --- a/src/test/ui/const-generics/struct-with-invalid-const-param.stderr +++ b/src/test/ui/const-generics/struct-with-invalid-const-param.stderr @@ -12,4 +12,3 @@ LL | struct S(C); error: aborting due to previous error -For more information about this error, try `rustc --explain E0573`. diff --git a/src/test/ui/const-generics/unused-const-param.rs b/src/test/ui/const-generics/unused-const-param.rs new file mode 100644 index 0000000000..ee98e5eb4a --- /dev/null +++ b/src/test/ui/const-generics/unused-const-param.rs @@ -0,0 +1,8 @@ +// run-pass + +#![feature(const_generics)] +//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash + +struct A; // ok + +fn main() {} diff --git a/src/test/ui/const-generics/unused-const-param.stderr b/src/test/ui/const-generics/unused-const-param.stderr new file mode 100644 index 0000000000..0e7acfb673 --- /dev/null +++ b/src/test/ui/const-generics/unused-const-param.stderr @@ -0,0 +1,6 @@ +warning: the feature `const_generics` is incomplete and may cause the compiler to crash + --> $DIR/unused-const-param.rs:3:12 + | +LL | #![feature(const_generics)] + | ^^^^^^^^^^^^^^ + diff --git a/src/test/ui/consts/array-literal-index-oob.rs b/src/test/ui/consts/array-literal-index-oob.rs new file mode 100644 index 0000000000..492182921b --- /dev/null +++ b/src/test/ui/consts/array-literal-index-oob.rs @@ -0,0 +1,5 @@ +fn main() { + &{[1, 2, 3][4]}; + //~^ ERROR index out of bounds + //~| ERROR reaching this expression at runtime will panic or abort +} diff --git a/src/test/ui/consts/array-literal-index-oob.stderr b/src/test/ui/consts/array-literal-index-oob.stderr new file mode 100644 index 0000000000..a928fe5fe0 --- /dev/null +++ b/src/test/ui/consts/array-literal-index-oob.stderr @@ -0,0 +1,18 @@ +error: index out of bounds: the len is 3 but the index is 4 + --> $DIR/array-literal-index-oob.rs:2:7 + | +LL | &{[1, 2, 3][4]}; + | ^^^^^^^^^^^^ + | + = note: #[deny(const_err)] on by default + +error: reaching this expression at runtime will panic or abort + --> $DIR/array-literal-index-oob.rs:2:7 + | +LL | &{[1, 2, 3][4]}; + | --^^^^^^^^^^^^- + | | + | index out of bounds: the len is 3 but the index is 4 + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/consts/const-array-oob.rs b/src/test/ui/consts/const-array-oob.rs index 39ef45175f..1174a76ada 100644 --- a/src/test/ui/consts/const-array-oob.rs +++ b/src/test/ui/consts/const-array-oob.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![feature(const_indexing)] const FOO: [usize; 3] = [1, 2, 3]; diff --git a/src/test/ui/consts/const-array-oob.stderr b/src/test/ui/consts/const-array-oob.stderr index 2d9a4fd0de..f25cac5cdd 100644 --- a/src/test/ui/consts/const-array-oob.stderr +++ b/src/test/ui/consts/const-array-oob.stderr @@ -1,5 +1,5 @@ error[E0080]: evaluation of constant value failed - --> $DIR/const-array-oob.rs:8:19 + --> $DIR/const-array-oob.rs:6:19 | LL | const BLUB: [u32; FOO[4]] = [5, 6]; | ^^^^^^ index out of bounds: the len is 3 but the index is 4 diff --git a/src/test/ui/consts/const-call.stderr b/src/test/ui/consts/const-call.stderr index 12a6983ba1..d11add818d 100644 --- a/src/test/ui/consts/const-call.stderr +++ b/src/test/ui/consts/const-call.stderr @@ -12,5 +12,5 @@ LL | let _ = [0; f(2)]; error: aborting due to 2 previous errors -Some errors occurred: E0015, E0080. +Some errors have detailed explanations: E0015, E0080. For more information about an error, try `rustc --explain E0015`. diff --git a/src/test/ui/consts/const-deref-ptr.stderr b/src/test/ui/consts/const-deref-ptr.stderr index 8de0f6c151..23ac3b85ee 100644 --- a/src/test/ui/consts/const-deref-ptr.stderr +++ b/src/test/ui/consts/const-deref-ptr.stderr @@ -1,9 +1,10 @@ -error[E0658]: dereferencing raw pointers in statics is unstable (see issue #51911) +error[E0658]: dereferencing raw pointers in statics is unstable --> $DIR/const-deref-ptr.rs:4:29 | LL | static C: u64 = unsafe {*(0xdeadbeef as *const u64)}; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51911 = help: add #![feature(const_raw_ptr_deref)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/consts/const-err.rs b/src/test/ui/consts/const-err.rs index 8cc3dc7f58..7dfcda6905 100644 --- a/src/test/ui/consts/const-err.rs +++ b/src/test/ui/consts/const-err.rs @@ -13,4 +13,5 @@ const FOO: u8 = [5u8][1]; fn main() { black_box((FOO, FOO)); //~^ ERROR erroneous constant used + //~| ERROR erroneous constant } diff --git a/src/test/ui/consts/const-err.stderr b/src/test/ui/consts/const-err.stderr index 0ee9ecdef4..429e2ae760 100644 --- a/src/test/ui/consts/const-err.stderr +++ b/src/test/ui/consts/const-err.stderr @@ -13,11 +13,17 @@ LL | #![warn(const_err)] | ^^^^^^^^^ error[E0080]: erroneous constant used - --> $DIR/const-err.rs:14:15 + --> $DIR/const-err.rs:14:16 | LL | black_box((FOO, FOO)); - | ^^^^^^^^^^ referenced constant has errors + | ^^^ referenced constant has errors -error: aborting due to previous error +error[E0080]: erroneous constant used + --> $DIR/const-err.rs:14:21 + | +LL | black_box((FOO, FOO)); + | ^^^ referenced constant has errors + +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0080`. diff --git a/src/test/ui/consts/const-eval/const-eval-overflow-3b.rs b/src/test/ui/consts/const-eval/const-eval-overflow-3b.rs index d9b06370df..db6f17a671 100644 --- a/src/test/ui/consts/const-eval/const-eval-overflow-3b.rs +++ b/src/test/ui/consts/const-eval/const-eval-overflow-3b.rs @@ -7,12 +7,6 @@ // types for the left- and right-hand sides of the addition do not // match (as well as overflow). - - - - - - #![allow(unused_imports)] use std::fmt; @@ -32,4 +26,3 @@ fn main() { fn foo(x: T) { println!("{:?}", x); } - diff --git a/src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr b/src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr index 59a9d25c71..f6b6b5882b 100644 --- a/src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr +++ b/src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr @@ -1,11 +1,11 @@ error[E0308]: mismatched types - --> $DIR/const-eval-overflow-3b.rs:24:22 + --> $DIR/const-eval-overflow-3b.rs:18:22 | LL | = [0; (i8::MAX + 1u8) as usize]; | ^^^ expected i8, found u8 error[E0277]: cannot add `u8` to `i8` - --> $DIR/const-eval-overflow-3b.rs:24:20 + --> $DIR/const-eval-overflow-3b.rs:18:20 | LL | = [0; (i8::MAX + 1u8) as usize]; | ^ no implementation for `i8 + u8` @@ -14,5 +14,5 @@ LL | = [0; (i8::MAX + 1u8) as usize]; error: aborting due to 2 previous errors -Some errors occurred: E0277, E0308. +Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr b/src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr index 0c2f76a558..3735b2fd5f 100644 --- a/src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr +++ b/src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr @@ -20,5 +20,5 @@ LL | : [u32; 5i8 as char as usize] error: aborting due to 3 previous errors -Some errors occurred: E0277, E0308, E0604. +Some errors have detailed explanations: E0277, E0308, E0604. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.nll.stderr b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.nll.stderr deleted file mode 100644 index ca80a9ab39..0000000000 --- a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.nll.stderr +++ /dev/null @@ -1,43 +0,0 @@ -error: `foo` is not yet stable as a const fn - --> $DIR/dont_promote_unstable_const_fn.rs:15:25 - | -LL | const fn bar() -> u32 { foo() } - | ^^^^^ - | - = help: add `#![feature(foo)]` to the crate attributes to enable - -error[E0716]: temporary value dropped while borrowed - --> $DIR/dont_promote_unstable_const_fn.rs:18:28 - | -LL | let _: &'static u32 = &foo(); - | ------------ ^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/dont_promote_unstable_const_fn.rs:22:28 - | -LL | let _: &'static u32 = &meh(); - | ------------ ^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/dont_promote_unstable_const_fn.rs:23:26 - | -LL | let x: &'static _ = &std::time::Duration::from_millis(42).subsec_millis(); - | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.rs b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.rs index 7170be1b88..9002869099 100644 --- a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.rs +++ b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.rs @@ -15,11 +15,11 @@ fn meh() -> u32 { 42 } const fn bar() -> u32 { foo() } //~ ERROR `foo` is not yet stable as a const fn fn a() { - let _: &'static u32 = &foo(); //~ ERROR does not live long enough + let _: &'static u32 = &foo(); //~ ERROR temporary value dropped while borrowed } fn main() { - let _: &'static u32 = &meh(); //~ ERROR does not live long enough + let _: &'static u32 = &meh(); //~ ERROR temporary value dropped while borrowed let x: &'static _ = &std::time::Duration::from_millis(42).subsec_millis(); - //~^ ERROR does not live long enough + //~^ ERROR temporary value dropped while borrowed } diff --git a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr index d79666688f..ca80a9ab39 100644 --- a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr +++ b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr @@ -6,38 +6,38 @@ LL | const fn bar() -> u32 { foo() } | = help: add `#![feature(foo)]` to the crate attributes to enable -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/dont_promote_unstable_const_fn.rs:18:28 | LL | let _: &'static u32 = &foo(); - | ^^^^^ temporary value does not live long enough + | ------------ ^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/dont_promote_unstable_const_fn.rs:22:28 | LL | let _: &'static u32 = &meh(); - | ^^^^^ temporary value does not live long enough + | ------------ ^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/dont_promote_unstable_const_fn.rs:23:26 | LL | let x: &'static _ = &std::time::Duration::from_millis(42).subsec_millis(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` LL | LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to 4 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.nll.stderr b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.nll.stderr deleted file mode 100644 index 129f061510..0000000000 --- a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.nll.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/dont_promote_unstable_const_fn_cross_crate.rs:8:28 - | -LL | let _: &'static u32 = &foo(); - | ------------ ^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | let _x: &'static u32 = &foo(); -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/dont_promote_unstable_const_fn_cross_crate.rs:9:29 - | -LL | let _x: &'static u32 = &foo(); - | ------------ ^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.rs b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.rs index 6dcfcfe678..ea35f46807 100644 --- a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.rs +++ b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.rs @@ -5,6 +5,6 @@ extern crate stability; use stability::foo; fn main() { - let _: &'static u32 = &foo(); //~ ERROR does not live long enough - let _x: &'static u32 = &foo(); //~ ERROR does not live long enough + let _: &'static u32 = &foo(); //~ ERROR temporary value dropped while borrowed + let _x: &'static u32 = &foo(); //~ ERROR temporary value dropped while borrowed } diff --git a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.stderr b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.stderr index 516c008e72..129f061510 100644 --- a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.stderr +++ b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.stderr @@ -1,24 +1,24 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/dont_promote_unstable_const_fn_cross_crate.rs:8:28 | LL | let _: &'static u32 = &foo(); - | ^^^^^ temporary value does not live long enough + | ------------ ^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` LL | let _x: &'static u32 = &foo(); LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/dont_promote_unstable_const_fn_cross_crate.rs:9:29 | LL | let _x: &'static u32 = &foo(); - | ^^^^^ temporary value does not live long enough + | ------------ ^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-eval/feature-gate-const_fn_union.stderr b/src/test/ui/consts/const-eval/feature-gate-const_fn_union.stderr index 5a72c8205b..069a8bfd4e 100644 --- a/src/test/ui/consts/const-eval/feature-gate-const_fn_union.stderr +++ b/src/test/ui/consts/const-eval/feature-gate-const_fn_union.stderr @@ -1,9 +1,10 @@ -error[E0658]: unions in const fn are unstable (see issue #51909) +error[E0658]: unions in const fn are unstable --> $DIR/feature-gate-const_fn_union.rs:11:5 | LL | Foo { u }.i | ^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51909 = help: add #![feature(const_fn_union)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/consts/const-eval/feature-gate-const_panic.stderr b/src/test/ui/consts/const-eval/feature-gate-const_panic.stderr index 0810341355..5d3e88e4e5 100644 --- a/src/test/ui/consts/const-eval/feature-gate-const_panic.stderr +++ b/src/test/ui/consts/const-eval/feature-gate-const_panic.stderr @@ -1,27 +1,30 @@ -error[E0658]: panicking in constants is unstable (see issue #51999) +error[E0658]: panicking in constants is unstable --> $DIR/feature-gate-const_panic.rs:3:15 | LL | const Z: () = panic!("cheese"); | ^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51999 = help: add #![feature(const_panic)] to the crate attributes to enable = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) -error[E0658]: panicking in constants is unstable (see issue #51999) +error[E0658]: panicking in constants is unstable --> $DIR/feature-gate-const_panic.rs:9:15 | LL | const X: () = unimplemented!(); | ^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51999 = help: add #![feature(const_panic)] to the crate attributes to enable = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) -error[E0658]: panicking in constants is unstable (see issue #51999) +error[E0658]: panicking in constants is unstable --> $DIR/feature-gate-const_panic.rs:6:15 | LL | const Y: () = unreachable!(); | ^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51999 = help: add #![feature(const_panic)] to the crate attributes to enable = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/consts/const-eval/infinite_loop.stderr b/src/test/ui/consts/const-eval/infinite_loop.stderr index ee696c5439..3a7da9ff2c 100644 --- a/src/test/ui/consts/const-eval/infinite_loop.stderr +++ b/src/test/ui/consts/const-eval/infinite_loop.stderr @@ -28,5 +28,5 @@ LL | n = if n % 2 == 0 { n/2 } else { 3*n + 1 }; error: aborting due to 2 previous errors -Some errors occurred: E0019, E0080. +Some errors have detailed explanations: E0019, E0080. For more information about an error, try `rustc --explain E0019`. diff --git a/src/test/ui/consts/const-eval/issue-52442.stderr b/src/test/ui/consts/const-eval/issue-52442.stderr index 2352ecba68..e9afec5766 100644 --- a/src/test/ui/consts/const-eval/issue-52442.stderr +++ b/src/test/ui/consts/const-eval/issue-52442.stderr @@ -14,5 +14,5 @@ LL | [(); { &loop { break } as *const _ as usize } ]; error: aborting due to 2 previous errors -Some errors occurred: E0019, E0080. +Some errors have detailed explanations: E0019, E0080. For more information about an error, try `rustc --explain E0019`. diff --git a/src/test/ui/consts/const-eval/issue-52475.stderr b/src/test/ui/consts/const-eval/issue-52475.stderr index 605c71d5a6..7a52a38d76 100644 --- a/src/test/ui/consts/const-eval/issue-52475.stderr +++ b/src/test/ui/consts/const-eval/issue-52475.stderr @@ -28,5 +28,5 @@ LL | n = (n + 1) % 5; error: aborting due to 2 previous errors -Some errors occurred: E0019, E0080. +Some errors have detailed explanations: E0019, E0080. For more information about an error, try `rustc --explain E0019`. diff --git a/src/test/ui/consts/const-eval/match-test-ptr-null.rs b/src/test/ui/consts/const-eval/match-test-ptr-null.rs index b27b816cf5..e0af01aeef 100644 --- a/src/test/ui/consts/const-eval/match-test-ptr-null.rs +++ b/src/test/ui/consts/const-eval/match-test-ptr-null.rs @@ -3,7 +3,9 @@ fn main() { // that pointer comparison is disallowed, not that parts of a pointer are accessed as raw // bytes. let _: [u8; 0] = [4; { - match &1 as *const i32 as usize { //~ ERROR casting pointers to integers in constants + match &1 as *const i32 as usize { + //~^ ERROR casting pointers to integers in constants + //~| NOTE for more information, see 0 => 42, //~ ERROR constant contains unimplemented expression type //~^ NOTE "pointer arithmetic or comparison" needs an rfc before being allowed //~| ERROR evaluation of constant value failed diff --git a/src/test/ui/consts/const-eval/match-test-ptr-null.stderr b/src/test/ui/consts/const-eval/match-test-ptr-null.stderr index fd5647c9af..d005e09b28 100644 --- a/src/test/ui/consts/const-eval/match-test-ptr-null.stderr +++ b/src/test/ui/consts/const-eval/match-test-ptr-null.stderr @@ -1,24 +1,25 @@ -error[E0658]: casting pointers to integers in constants is unstable (see issue #51910) +error[E0658]: casting pointers to integers in constants is unstable --> $DIR/match-test-ptr-null.rs:6:15 | LL | match &1 as *const i32 as usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51910 = help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable error[E0019]: constant contains unimplemented expression type - --> $DIR/match-test-ptr-null.rs:7:13 + --> $DIR/match-test-ptr-null.rs:9:13 | LL | 0 => 42, | ^ error[E0080]: evaluation of constant value failed - --> $DIR/match-test-ptr-null.rs:7:13 + --> $DIR/match-test-ptr-null.rs:9:13 | LL | 0 => 42, | ^ "pointer arithmetic or comparison" needs an rfc before being allowed inside constants error: aborting due to 3 previous errors -Some errors occurred: E0019, E0080, E0658. +Some errors have detailed explanations: E0019, E0080, E0658. For more information about an error, try `rustc --explain E0019`. diff --git a/src/test/ui/consts/const-eval/mod-static-with-const-fn.stderr b/src/test/ui/consts/const-eval/mod-static-with-const-fn.stderr index 9fad6868d2..50cd321450 100644 --- a/src/test/ui/consts/const-eval/mod-static-with-const-fn.stderr +++ b/src/test/ui/consts/const-eval/mod-static-with-const-fn.stderr @@ -12,5 +12,5 @@ LL | foo(); error: aborting due to 2 previous errors -Some errors occurred: E0015, E0019. +Some errors have detailed explanations: E0015, E0019. For more information about an error, try `rustc --explain E0015`. diff --git a/src/test/ui/consts/const-eval/promote_mutable_zst_mir_borrowck.rs b/src/test/ui/consts/const-eval/promote_mutable_zst_mir_borrowck.rs index 06b1727258..34f61ed5a3 100644 --- a/src/test/ui/consts/const-eval/promote_mutable_zst_mir_borrowck.rs +++ b/src/test/ui/consts/const-eval/promote_mutable_zst_mir_borrowck.rs @@ -1,7 +1,5 @@ // compile-pass -#![feature(nll)] - pub fn main() { let y: &'static mut [u8; 0] = &mut []; } diff --git a/src/test/ui/consts/const-eval/promoted_const_fn_fail.nll.stderr b/src/test/ui/consts/const-eval/promoted_const_fn_fail.nll.stderr deleted file mode 100644 index 519ba7d84b..0000000000 --- a/src/test/ui/consts/const-eval/promoted_const_fn_fail.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/promoted_const_fn_fail.rs:20:27 - | -LL | let x: &'static u8 = &(bar() + 1); - | ----------- ^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-eval/promoted_const_fn_fail.rs b/src/test/ui/consts/const-eval/promoted_const_fn_fail.rs index 80562b0ee8..88181cb861 100644 --- a/src/test/ui/consts/const-eval/promoted_const_fn_fail.rs +++ b/src/test/ui/consts/const-eval/promoted_const_fn_fail.rs @@ -17,7 +17,7 @@ const fn bar() -> u8 { } fn main() { - let x: &'static u8 = &(bar() + 1); //~ ERROR does not live long enough + let x: &'static u8 = &(bar() + 1); //~ ERROR temporary value dropped while borrowed let y = *x; unreachable!(); } diff --git a/src/test/ui/consts/const-eval/promoted_const_fn_fail.stderr b/src/test/ui/consts/const-eval/promoted_const_fn_fail.stderr index c9a357d0f1..519ba7d84b 100644 --- a/src/test/ui/consts/const-eval/promoted_const_fn_fail.stderr +++ b/src/test/ui/consts/const-eval/promoted_const_fn_fail.stderr @@ -1,14 +1,14 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/promoted_const_fn_fail.rs:20:27 | LL | let x: &'static u8 = &(bar() + 1); - | ^^^^^^^^^^^ temporary value does not live long enough + | ----------- ^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.nll.stderr b/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.nll.stderr deleted file mode 100644 index 987d2304ae..0000000000 --- a/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/promoted_const_fn_fail_deny_const_err.rs:21:27 - | -LL | let x: &'static u8 = &(bar() + 1); - | ----------- ^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.rs b/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.rs index f331e44de1..061ab7eeb0 100644 --- a/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.rs +++ b/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.rs @@ -19,7 +19,7 @@ fn main() { // This will compile, but then hard-abort at runtime. // FIXME(oli-obk): this should instead panic (not hard-abort) at runtime. let x: &'static u8 = &(bar() + 1); - //~^ ERROR does not live long enough + //~^ ERROR temporary value dropped while borrowed let y = *x; unreachable!(); } diff --git a/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.stderr b/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.stderr index 9c786b0864..987d2304ae 100644 --- a/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.stderr +++ b/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.stderr @@ -1,14 +1,14 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/promoted_const_fn_fail_deny_const_err.rs:21:27 | LL | let x: &'static u8 = &(bar() + 1); - | ^^^^^^^^^^^ temporary value does not live long enough + | ----------- ^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.nll.stderr b/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.nll.stderr deleted file mode 100644 index a8bb6976da..0000000000 --- a/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.nll.stderr +++ /dev/null @@ -1,46 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/promoted_raw_ptr_ops.rs:4:29 - | -LL | let x: &'static bool = &(42 as *const i32 == 43 as *const i32); - | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/promoted_raw_ptr_ops.rs:6:30 - | -LL | let y: &'static usize = &(&1 as *const i32 as usize + 1); - | -------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/promoted_raw_ptr_ops.rs:7:28 - | -LL | let z: &'static i32 = &(unsafe { *(42 as *const i32) }); - | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | let a: &'static bool = &(main as fn() == main as fn()); -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/promoted_raw_ptr_ops.rs:8:29 - | -LL | let a: &'static bool = &(main as fn() == main as fn()); - | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.rs b/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.rs index ef7e5506f2..c6fb5eeab5 100644 --- a/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.rs +++ b/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.rs @@ -2,8 +2,11 @@ fn main() { let x: &'static bool = &(42 as *const i32 == 43 as *const i32); - //~^ ERROR does not live long enough - let y: &'static usize = &(&1 as *const i32 as usize + 1); //~ ERROR does not live long enough - let z: &'static i32 = &(unsafe { *(42 as *const i32) }); //~ ERROR does not live long enough - let a: &'static bool = &(main as fn() == main as fn()); //~ ERROR does not live long enough + //~^ ERROR temporary value dropped while borrowed + let y: &'static usize = &(&1 as *const i32 as usize + 1); + //~^ ERROR temporary value dropped while borrowed + let z: &'static i32 = &(unsafe { *(42 as *const i32) }); + //~^ ERROR temporary value dropped while borrowed + let a: &'static bool = &(main as fn() == main as fn()); + //~^ ERROR temporary value dropped while borrowed } diff --git a/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.stderr b/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.stderr index 5a0654cc0c..7f2e489918 100644 --- a/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.stderr +++ b/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.stderr @@ -1,46 +1,47 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/promoted_raw_ptr_ops.rs:4:29 | LL | let x: &'static bool = &(42 as *const i32 == 43 as *const i32); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/promoted_raw_ptr_ops.rs:6:30 | LL | let y: &'static usize = &(&1 as *const i32 as usize + 1); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | -------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough - --> $DIR/promoted_raw_ptr_ops.rs:7:28 +error[E0716]: temporary value dropped while borrowed + --> $DIR/promoted_raw_ptr_ops.rs:8:28 | LL | let z: &'static i32 = &(unsafe { *(42 as *const i32) }); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | let a: &'static bool = &(main as fn() == main as fn()); + | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` +... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough - --> $DIR/promoted_raw_ptr_ops.rs:8:29 +error[E0716]: temporary value dropped while borrowed + --> $DIR/promoted_raw_ptr_ops.rs:10:29 | LL | let a: &'static bool = &(main as fn() == main as fn()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` +LL | LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to 4 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-eval/transmute-const-promotion.nll.stderr b/src/test/ui/consts/const-eval/transmute-const-promotion.nll.stderr deleted file mode 100644 index 5aae8c12d1..0000000000 --- a/src/test/ui/consts/const-eval/transmute-const-promotion.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/transmute-const-promotion.rs:6:37 - | -LL | let x: &'static u32 = unsafe { &mem::transmute(3.0f32) }; - | ------------ ^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-eval/transmute-const-promotion.rs b/src/test/ui/consts/const-eval/transmute-const-promotion.rs index a1da350397..8bd1b341e6 100644 --- a/src/test/ui/consts/const-eval/transmute-const-promotion.rs +++ b/src/test/ui/consts/const-eval/transmute-const-promotion.rs @@ -4,5 +4,5 @@ use std::mem; fn main() { let x: &'static u32 = unsafe { &mem::transmute(3.0f32) }; - //~^ ERROR value does not live long enough + //~^ ERROR temporary value dropped while borrowed } diff --git a/src/test/ui/consts/const-eval/transmute-const-promotion.stderr b/src/test/ui/consts/const-eval/transmute-const-promotion.stderr index 5829a1772d..5aae8c12d1 100644 --- a/src/test/ui/consts/const-eval/transmute-const-promotion.stderr +++ b/src/test/ui/consts/const-eval/transmute-const-promotion.stderr @@ -1,14 +1,14 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/transmute-const-promotion.rs:6:37 | LL | let x: &'static u32 = unsafe { &mem::transmute(3.0f32) }; - | ^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ------------ ^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` LL | LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-eval/union_promotion.nll.stderr b/src/test/ui/consts/const-eval/union_promotion.nll.stderr deleted file mode 100644 index b530c02f2f..0000000000 --- a/src/test/ui/consts/const-eval/union_promotion.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/union_promotion.rs:9:29 - | -LL | let x: &'static bool = &unsafe { - | ____________-------------____^ - | | | - | | type annotation requires that borrow lasts for `'static` -LL | | Foo { a: &1 }.b == Foo { a: &2 }.b -LL | | }; - | |_____^ creates a temporary which is freed while still in use -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-eval/union_promotion.rs b/src/test/ui/consts/const-eval/union_promotion.rs index c308c81cf6..d3566511ef 100644 --- a/src/test/ui/consts/const-eval/union_promotion.rs +++ b/src/test/ui/consts/const-eval/union_promotion.rs @@ -6,7 +6,7 @@ union Foo { } fn main() { - let x: &'static bool = &unsafe { //~ borrowed value does not live long enough + let x: &'static bool = &unsafe { //~ temporary value dropped while borrowed Foo { a: &1 }.b == Foo { a: &2 }.b }; } diff --git a/src/test/ui/consts/const-eval/union_promotion.stderr b/src/test/ui/consts/const-eval/union_promotion.stderr index c60f671818..b530c02f2f 100644 --- a/src/test/ui/consts/const-eval/union_promotion.stderr +++ b/src/test/ui/consts/const-eval/union_promotion.stderr @@ -1,16 +1,16 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/union_promotion.rs:9:29 | LL | let x: &'static bool = &unsafe { - | _____________________________^ + | ____________-------------____^ + | | | + | | type annotation requires that borrow lasts for `'static` LL | | Foo { a: &1 }.b == Foo { a: &2 }.b LL | | }; - | |_____^ temporary value does not live long enough + | |_____^ creates a temporary which is freed while still in use LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-eval/unused-broken-const.stderr b/src/test/ui/consts/const-eval/unused-broken-const.stderr index 603efe449f..e45ce65d8b 100644 --- a/src/test/ui/consts/const-eval/unused-broken-const.stderr +++ b/src/test/ui/consts/const-eval/unused-broken-const.stderr @@ -1,5 +1,3 @@ -warning: due to multiple output types requested, the explicitly specified output file name will be adapted for each output type - error: any use of this value will cause an error --> $DIR/unused-broken-const.rs:5:18 | diff --git a/src/test/ui/consts/const-fn-not-safe-for-const.stderr b/src/test/ui/consts/const-fn-not-safe-for-const.stderr index a5e48074f7..ba5d58a51d 100644 --- a/src/test/ui/consts/const-fn-not-safe-for-const.stderr +++ b/src/test/ui/consts/const-fn-not-safe-for-const.stderr @@ -18,5 +18,5 @@ LL | &Y error: aborting due to 3 previous errors -Some errors occurred: E0013, E0015. +Some errors have detailed explanations: E0013, E0015. For more information about an error, try `rustc --explain E0013`. diff --git a/src/test/ui/consts/const-int-conversion.nll.stderr b/src/test/ui/consts/const-int-conversion.nll.stderr deleted file mode 100644 index 65330e282c..0000000000 --- a/src/test/ui/consts/const-int-conversion.nll.stderr +++ /dev/null @@ -1,80 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-conversion.rs:4:28 - | -LL | let x: &'static i32 = &(5_i32.reverse_bits()); - | ------------ ^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-conversion.rs:6:28 - | -LL | let y: &'static i32 = &(i32::from_be_bytes([0x12, 0x34, 0x56, 0x78])); - | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-conversion.rs:8:28 - | -LL | let z: &'static i32 = &(i32::from_le_bytes([0x12, 0x34, 0x56, 0x78])); - | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-conversion.rs:10:28 - | -LL | let a: &'static i32 = &(i32::from_be(i32::from_ne_bytes([0x80, 0, 0, 0]))); - | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-conversion.rs:12:29 - | -LL | let b: &'static [u8] = &(0x12_34_56_78_i32.to_be_bytes()); - | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-conversion.rs:14:29 - | -LL | let c: &'static [u8] = &(0x12_34_56_78_i32.to_le_bytes()); - | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-conversion.rs:16:29 - | -LL | let d: &'static [u8] = &(i32::min_value().to_be().to_ne_bytes()); - | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to 7 previous errors - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-int-conversion.rs b/src/test/ui/consts/const-int-conversion.rs index 8f0aa141a9..ea409439ed 100644 --- a/src/test/ui/consts/const-int-conversion.rs +++ b/src/test/ui/consts/const-int-conversion.rs @@ -2,17 +2,17 @@ fn main() { let x: &'static i32 = &(5_i32.reverse_bits()); - //~^ ERROR does not live long enough + //~^ ERROR temporary value dropped while borrowed let y: &'static i32 = &(i32::from_be_bytes([0x12, 0x34, 0x56, 0x78])); - //~^ ERROR does not live long enough + //~^ ERROR temporary value dropped while borrowed let z: &'static i32 = &(i32::from_le_bytes([0x12, 0x34, 0x56, 0x78])); - //~^ ERROR does not live long enough + //~^ ERROR temporary value dropped while borrowed let a: &'static i32 = &(i32::from_be(i32::from_ne_bytes([0x80, 0, 0, 0]))); - //~^ ERROR does not live long enough + //~^ ERROR temporary value dropped while borrowed let b: &'static [u8] = &(0x12_34_56_78_i32.to_be_bytes()); - //~^ ERROR does not live long enough + //~^ ERROR temporary value dropped while borrowed let c: &'static [u8] = &(0x12_34_56_78_i32.to_le_bytes()); - //~^ ERROR does not live long enough + //~^ ERROR temporary value dropped while borrowed let d: &'static [u8] = &(i32::min_value().to_be().to_ne_bytes()); - //~^ ERROR does not live long enough + //~^ ERROR temporary value dropped while borrowed } diff --git a/src/test/ui/consts/const-int-conversion.stderr b/src/test/ui/consts/const-int-conversion.stderr index ddb1a75f1b..65330e282c 100644 --- a/src/test/ui/consts/const-int-conversion.stderr +++ b/src/test/ui/consts/const-int-conversion.stderr @@ -1,80 +1,80 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/const-int-conversion.rs:4:28 | LL | let x: &'static i32 = &(5_i32.reverse_bits()); - | ^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ------------ ^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/const-int-conversion.rs:6:28 | LL | let y: &'static i32 = &(i32::from_be_bytes([0x12, 0x34, 0x56, 0x78])); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/const-int-conversion.rs:8:28 | LL | let z: &'static i32 = &(i32::from_le_bytes([0x12, 0x34, 0x56, 0x78])); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/const-int-conversion.rs:10:28 | LL | let a: &'static i32 = &(i32::from_be(i32::from_ne_bytes([0x80, 0, 0, 0]))); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/const-int-conversion.rs:12:29 | LL | let b: &'static [u8] = &(0x12_34_56_78_i32.to_be_bytes()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/const-int-conversion.rs:14:29 | LL | let c: &'static [u8] = &(0x12_34_56_78_i32.to_le_bytes()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/const-int-conversion.rs:16:29 | LL | let d: &'static [u8] = &(i32::min_value().to_be().to_ne_bytes()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` LL | LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to 7 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-int-overflowing.nll.stderr b/src/test/ui/consts/const-int-overflowing.nll.stderr deleted file mode 100644 index bd061ab333..0000000000 --- a/src/test/ui/consts/const-int-overflowing.nll.stderr +++ /dev/null @@ -1,35 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-overflowing.rs:2:36 - | -LL | let x: &'static (i32, bool) = &(5_i32.overflowing_add(3)); - | -------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-overflowing.rs:3:36 - | -LL | let y: &'static (i32, bool) = &(5_i32.overflowing_sub(3)); - | -------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | let z: &'static (i32, bool) = &(5_i32.overflowing_mul(3)); -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-overflowing.rs:4:36 - | -LL | let z: &'static (i32, bool) = &(5_i32.overflowing_mul(3)); - | -------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-int-overflowing.rs b/src/test/ui/consts/const-int-overflowing.rs index 4e69e85780..cd74c99909 100644 --- a/src/test/ui/consts/const-int-overflowing.rs +++ b/src/test/ui/consts/const-int-overflowing.rs @@ -1,5 +1,8 @@ fn main() { - let x: &'static (i32, bool) = &(5_i32.overflowing_add(3)); //~ ERROR does not live long enough - let y: &'static (i32, bool) = &(5_i32.overflowing_sub(3)); //~ ERROR does not live long enough - let z: &'static (i32, bool) = &(5_i32.overflowing_mul(3)); //~ ERROR does not live long enough + let x: &'static (i32, bool) = &(5_i32.overflowing_add(3)); + //~^ ERROR temporary value dropped while borrowed + let y: &'static (i32, bool) = &(5_i32.overflowing_sub(3)); + //~^ ERROR temporary value dropped while borrowed + let z: &'static (i32, bool) = &(5_i32.overflowing_mul(3)); + //~^ ERROR temporary value dropped while borrowed } diff --git a/src/test/ui/consts/const-int-overflowing.stderr b/src/test/ui/consts/const-int-overflowing.stderr index 7228b5dbd4..56c7f7f092 100644 --- a/src/test/ui/consts/const-int-overflowing.stderr +++ b/src/test/ui/consts/const-int-overflowing.stderr @@ -1,35 +1,36 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/const-int-overflowing.rs:2:36 | LL | let x: &'static (i32, bool) = &(5_i32.overflowing_add(3)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | -------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough - --> $DIR/const-int-overflowing.rs:3:36 +error[E0716]: temporary value dropped while borrowed + --> $DIR/const-int-overflowing.rs:4:36 | LL | let y: &'static (i32, bool) = &(5_i32.overflowing_sub(3)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | let z: &'static (i32, bool) = &(5_i32.overflowing_mul(3)); + | -------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` +... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough - --> $DIR/const-int-overflowing.rs:4:36 +error[E0716]: temporary value dropped while borrowed + --> $DIR/const-int-overflowing.rs:6:36 | LL | let z: &'static (i32, bool) = &(5_i32.overflowing_mul(3)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | -------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` +LL | LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-int-rotate.nll.stderr b/src/test/ui/consts/const-int-rotate.nll.stderr deleted file mode 100644 index 2b7cdf5746..0000000000 --- a/src/test/ui/consts/const-int-rotate.nll.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-rotate.rs:2:28 - | -LL | let x: &'static i32 = &(5_i32.rotate_left(3)); - | ------------ ^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | let y: &'static i32 = &(5_i32.rotate_right(3)); -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-rotate.rs:3:28 - | -LL | let y: &'static i32 = &(5_i32.rotate_right(3)); - | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-int-rotate.rs b/src/test/ui/consts/const-int-rotate.rs index d07c00e011..3aacf854db 100644 --- a/src/test/ui/consts/const-int-rotate.rs +++ b/src/test/ui/consts/const-int-rotate.rs @@ -1,4 +1,6 @@ fn main() { - let x: &'static i32 = &(5_i32.rotate_left(3)); //~ ERROR does not live long enough - let y: &'static i32 = &(5_i32.rotate_right(3)); //~ ERROR does not live long enough + let x: &'static i32 = &(5_i32.rotate_left(3)); + //~^ ERROR temporary value dropped while borrowed + let y: &'static i32 = &(5_i32.rotate_right(3)); + //~^ ERROR temporary value dropped while borrowed } diff --git a/src/test/ui/consts/const-int-rotate.stderr b/src/test/ui/consts/const-int-rotate.stderr index ec08e0a3f5..ed265804bb 100644 --- a/src/test/ui/consts/const-int-rotate.stderr +++ b/src/test/ui/consts/const-int-rotate.stderr @@ -1,24 +1,25 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/const-int-rotate.rs:2:28 | LL | let x: &'static i32 = &(5_i32.rotate_left(3)); - | ^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | let y: &'static i32 = &(5_i32.rotate_right(3)); + | ------------ ^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` +... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough - --> $DIR/const-int-rotate.rs:3:28 +error[E0716]: temporary value dropped while borrowed + --> $DIR/const-int-rotate.rs:4:28 | LL | let y: &'static i32 = &(5_i32.rotate_right(3)); - | ^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` +LL | LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-int-sign.nll.stderr b/src/test/ui/consts/const-int-sign.nll.stderr deleted file mode 100644 index 0ad7a39d59..0000000000 --- a/src/test/ui/consts/const-int-sign.nll.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-sign.rs:2:29 - | -LL | let x: &'static bool = &(5_i32.is_negative()); - | ------------- ^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | let y: &'static bool = &(5_i32.is_positive()); -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-sign.rs:3:29 - | -LL | let y: &'static bool = &(5_i32.is_positive()); - | ------------- ^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-int-sign.rs b/src/test/ui/consts/const-int-sign.rs index a21797c5ce..c3111ddf56 100644 --- a/src/test/ui/consts/const-int-sign.rs +++ b/src/test/ui/consts/const-int-sign.rs @@ -1,4 +1,6 @@ fn main() { - let x: &'static bool = &(5_i32.is_negative()); //~ ERROR does not live long enough - let y: &'static bool = &(5_i32.is_positive()); //~ ERROR does not live long enough + let x: &'static bool = &(5_i32.is_negative()); + //~^ ERROR temporary value dropped while borrowed + let y: &'static bool = &(5_i32.is_positive()); + //~^ ERROR temporary value dropped while borrowed } diff --git a/src/test/ui/consts/const-int-sign.stderr b/src/test/ui/consts/const-int-sign.stderr index ffe09a0cfe..5f8fd41418 100644 --- a/src/test/ui/consts/const-int-sign.stderr +++ b/src/test/ui/consts/const-int-sign.stderr @@ -1,24 +1,25 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/const-int-sign.rs:2:29 | LL | let x: &'static bool = &(5_i32.is_negative()); - | ^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | let y: &'static bool = &(5_i32.is_positive()); + | ------------- ^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` +... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough - --> $DIR/const-int-sign.rs:3:29 +error[E0716]: temporary value dropped while borrowed + --> $DIR/const-int-sign.rs:4:29 | LL | let y: &'static bool = &(5_i32.is_positive()); - | ^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ------------- ^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` +LL | LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-int-wrapping.nll.stderr b/src/test/ui/consts/const-int-wrapping.nll.stderr deleted file mode 100644 index a186854ce0..0000000000 --- a/src/test/ui/consts/const-int-wrapping.nll.stderr +++ /dev/null @@ -1,57 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-wrapping.rs:2:28 - | -LL | let x: &'static i32 = &(5_i32.wrapping_add(3)); - | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-wrapping.rs:3:28 - | -LL | let y: &'static i32 = &(5_i32.wrapping_sub(3)); - | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-wrapping.rs:4:28 - | -LL | let z: &'static i32 = &(5_i32.wrapping_mul(3)); - | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-wrapping.rs:5:28 - | -LL | let a: &'static i32 = &(5_i32.wrapping_shl(3)); - | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | let b: &'static i32 = &(5_i32.wrapping_shr(3)); -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-int-wrapping.rs:6:28 - | -LL | let b: &'static i32 = &(5_i32.wrapping_shr(3)); - | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to 5 previous errors - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-int-wrapping.rs b/src/test/ui/consts/const-int-wrapping.rs index 720e40b6eb..50d04f9641 100644 --- a/src/test/ui/consts/const-int-wrapping.rs +++ b/src/test/ui/consts/const-int-wrapping.rs @@ -1,7 +1,12 @@ fn main() { - let x: &'static i32 = &(5_i32.wrapping_add(3)); //~ ERROR does not live long enough - let y: &'static i32 = &(5_i32.wrapping_sub(3)); //~ ERROR does not live long enough - let z: &'static i32 = &(5_i32.wrapping_mul(3)); //~ ERROR does not live long enough - let a: &'static i32 = &(5_i32.wrapping_shl(3)); //~ ERROR does not live long enough - let b: &'static i32 = &(5_i32.wrapping_shr(3)); //~ ERROR does not live long enough + let x: &'static i32 = &(5_i32.wrapping_add(3)); + //~^ ERROR temporary value dropped while borrowed + let y: &'static i32 = &(5_i32.wrapping_sub(3)); + //~^ ERROR temporary value dropped while borrowed + let z: &'static i32 = &(5_i32.wrapping_mul(3)); + //~^ ERROR temporary value dropped while borrowed + let a: &'static i32 = &(5_i32.wrapping_shl(3)); + //~^ ERROR temporary value dropped while borrowed + let b: &'static i32 = &(5_i32.wrapping_shr(3)); + //~^ ERROR temporary value dropped while borrowed } diff --git a/src/test/ui/consts/const-int-wrapping.stderr b/src/test/ui/consts/const-int-wrapping.stderr index 478a6d8083..5174b72659 100644 --- a/src/test/ui/consts/const-int-wrapping.stderr +++ b/src/test/ui/consts/const-int-wrapping.stderr @@ -1,57 +1,58 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/const-int-wrapping.rs:2:28 | LL | let x: &'static i32 = &(5_i32.wrapping_add(3)); - | ^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough - --> $DIR/const-int-wrapping.rs:3:28 +error[E0716]: temporary value dropped while borrowed + --> $DIR/const-int-wrapping.rs:4:28 | LL | let y: &'static i32 = &(5_i32.wrapping_sub(3)); - | ^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough - --> $DIR/const-int-wrapping.rs:4:28 +error[E0716]: temporary value dropped while borrowed + --> $DIR/const-int-wrapping.rs:6:28 | LL | let z: &'static i32 = &(5_i32.wrapping_mul(3)); - | ^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough - --> $DIR/const-int-wrapping.rs:5:28 +error[E0716]: temporary value dropped while borrowed + --> $DIR/const-int-wrapping.rs:8:28 | LL | let a: &'static i32 = &(5_i32.wrapping_shl(3)); - | ^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | let b: &'static i32 = &(5_i32.wrapping_shr(3)); + | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` +... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough - --> $DIR/const-int-wrapping.rs:6:28 +error[E0716]: temporary value dropped while borrowed + --> $DIR/const-int-wrapping.rs:10:28 | LL | let b: &'static i32 = &(5_i32.wrapping_shr(3)); - | ^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` +LL | LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to 5 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-integer-bool-ops.stderr b/src/test/ui/consts/const-integer-bool-ops.stderr index 7885eb446f..7fd973786d 100644 --- a/src/test/ui/consts/const-integer-bool-ops.stderr +++ b/src/test/ui/consts/const-integer-bool-ops.stderr @@ -192,5 +192,5 @@ LL | const ARRR5: [i32; Y5] = [99; 0]; error: aborting due to 28 previous errors -Some errors occurred: E0080, E0308. +Some errors have detailed explanations: E0080, E0308. For more information about an error, try `rustc --explain E0080`. diff --git a/src/test/ui/consts/const-ptr-nonnull.nll.stderr b/src/test/ui/consts/const-ptr-nonnull.nll.stderr deleted file mode 100644 index 26946fb990..0000000000 --- a/src/test/ui/consts/const-ptr-nonnull.nll.stderr +++ /dev/null @@ -1,25 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-ptr-nonnull.rs:4:37 - | -LL | let x: &'static NonNull = &(NonNull::dangling()); - | --------------------- ^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-ptr-nonnull.rs:9:37 - | -LL | let x: &'static NonNull = &(non_null.cast()); - | --------------------- ^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-ptr-nonnull.rs b/src/test/ui/consts/const-ptr-nonnull.rs index 54e743aa32..25cf6cf4aa 100644 --- a/src/test/ui/consts/const-ptr-nonnull.rs +++ b/src/test/ui/consts/const-ptr-nonnull.rs @@ -2,10 +2,10 @@ use std::ptr::NonNull; fn main() { let x: &'static NonNull = &(NonNull::dangling()); - //~^ ERROR borrowed value does not live long enough + //~^ ERROR temporary value dropped while borrowed let mut i: i32 = 10; let non_null = NonNull::new(&mut i).unwrap(); let x: &'static NonNull = &(non_null.cast()); - //~^ ERROR borrowed value does not live long enough + //~^ ERROR temporary value dropped while borrowed } diff --git a/src/test/ui/consts/const-ptr-nonnull.stderr b/src/test/ui/consts/const-ptr-nonnull.stderr index a606bed178..26946fb990 100644 --- a/src/test/ui/consts/const-ptr-nonnull.stderr +++ b/src/test/ui/consts/const-ptr-nonnull.stderr @@ -1,25 +1,25 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/const-ptr-nonnull.rs:4:37 | LL | let x: &'static NonNull = &(NonNull::dangling()); - | ^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | --------------------- ^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/const-ptr-nonnull.rs:9:37 | LL | let x: &'static NonNull = &(non_null.cast()); - | ^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | --------------------- ^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` LL | LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-ptr-unique.nll.stderr b/src/test/ui/consts/const-ptr-unique.nll.stderr deleted file mode 100644 index 3644cf4cec..0000000000 --- a/src/test/ui/consts/const-ptr-unique.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/const-ptr-unique.rs:8:33 - | -LL | let x: &'static *mut u32 = &(unique.as_ptr()); - | ----------------- ^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-ptr-unique.rs b/src/test/ui/consts/const-ptr-unique.rs index be44a24181..252c5d1a9c 100644 --- a/src/test/ui/consts/const-ptr-unique.rs +++ b/src/test/ui/consts/const-ptr-unique.rs @@ -6,5 +6,5 @@ fn main() { let mut i: u32 = 10; let unique = Unique::new(&mut i).unwrap(); let x: &'static *mut u32 = &(unique.as_ptr()); - //~^ ERROR borrowed value does not live long enough + //~^ ERROR temporary value dropped while borrowed } diff --git a/src/test/ui/consts/const-ptr-unique.stderr b/src/test/ui/consts/const-ptr-unique.stderr index 482b78b238..3644cf4cec 100644 --- a/src/test/ui/consts/const-ptr-unique.stderr +++ b/src/test/ui/consts/const-ptr-unique.stderr @@ -1,14 +1,14 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/const-ptr-unique.rs:8:33 | LL | let x: &'static *mut u32 = &(unique.as_ptr()); - | ^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ----------------- ^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` LL | LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/const-tup-index-span.stderr b/src/test/ui/consts/const-tup-index-span.stderr index ed631b824d..2c4e273004 100644 --- a/src/test/ui/consts/const-tup-index-span.stderr +++ b/src/test/ui/consts/const-tup-index-span.stderr @@ -15,5 +15,5 @@ LL | const ARR: [i32; TUP.0] = []; error: aborting due to 2 previous errors -Some errors occurred: E0080, E0308. +Some errors have detailed explanations: E0080, E0308. For more information about an error, try `rustc --explain E0080`. diff --git a/src/test/ui/consts/const_let_assign3.stderr b/src/test/ui/consts/const_let_assign3.stderr index c0e978a0ab..53b960b4ec 100644 --- a/src/test/ui/consts/const_let_assign3.stderr +++ b/src/test/ui/consts/const_let_assign3.stderr @@ -24,5 +24,5 @@ LL | *y = 42; error: aborting due to 4 previous errors -Some errors occurred: E0017, E0019. +Some errors have detailed explanations: E0017, E0019. For more information about an error, try `rustc --explain E0017`. diff --git a/src/test/ui/consts/const_let_refutable.nll.stderr b/src/test/ui/consts/const_let_refutable.nll.stderr new file mode 100644 index 0000000000..30ab1f4d5e --- /dev/null +++ b/src/test/ui/consts/const_let_refutable.nll.stderr @@ -0,0 +1,31 @@ +error[E0005]: refutable pattern in function argument: `&[]` not covered + --> $DIR/const_let_refutable.rs:3:16 + | +LL | const fn slice([a, b]: &[i32]) -> i32 { + | ^^^^^^ pattern `&[]` not covered + +error[E0723]: can only call other `const fn` within a `const fn`, but `const std::ops::Add::add` is not stable as `const fn` + --> $DIR/const_let_refutable.rs:4:5 + | +LL | a + b + | ^^^^^ + | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 + = help: add #![feature(const_fn)] to the crate attributes to enable + +error[E0381]: use of possibly uninitialized variable: `a` + --> $DIR/const_let_refutable.rs:4:5 + | +LL | a + b + | ^ use of possibly uninitialized `a` + +error[E0381]: use of possibly uninitialized variable: `b` + --> $DIR/const_let_refutable.rs:4:9 + | +LL | a + b + | ^ use of possibly uninitialized `b` + +error: aborting due to 4 previous errors + +Some errors have detailed explanations: E0005, E0381, E0723. +For more information about an error, try `rustc --explain E0005`. diff --git a/src/test/ui/consts/const_let_refutable.rs b/src/test/ui/consts/const_let_refutable.rs index 345f682868..322048c7fb 100644 --- a/src/test/ui/consts/const_let_refutable.rs +++ b/src/test/ui/consts/const_let_refutable.rs @@ -1,5 +1,11 @@ fn main() {} const fn slice([a, b]: &[i32]) -> i32 { //~ ERROR refutable pattern in function argument - a + b + a + b //~ ERROR can only call other `const fn` within a `const fn` + //~^ WARN use of possibly uninitialized variable: `a` + //~| WARN this error has been downgraded to a warning for backwards compatibility + //~| WARN this represents potential undefined behavior in your code and this warning will + //~| WARN use of possibly uninitialized variable: `b` + //~| WARN this error has been downgraded to a warning for backwards compatibility + //~| WARN this represents potential undefined behavior in your code and this warning will } diff --git a/src/test/ui/consts/const_let_refutable.stderr b/src/test/ui/consts/const_let_refutable.stderr index 155c858af3..20433bbf8b 100644 --- a/src/test/ui/consts/const_let_refutable.stderr +++ b/src/test/ui/consts/const_let_refutable.stderr @@ -4,6 +4,34 @@ error[E0005]: refutable pattern in function argument: `&[]` not covered LL | const fn slice([a, b]: &[i32]) -> i32 { | ^^^^^^ pattern `&[]` not covered -error: aborting due to previous error +error[E0723]: can only call other `const fn` within a `const fn`, but `const std::ops::Add::add` is not stable as `const fn` + --> $DIR/const_let_refutable.rs:4:5 + | +LL | a + b + | ^^^^^ + | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 + = help: add #![feature(const_fn)] to the crate attributes to enable + +warning[E0381]: use of possibly uninitialized variable: `a` + --> $DIR/const_let_refutable.rs:4:5 + | +LL | a + b + | ^ use of possibly uninitialized `a` + | + = warning: this error has been downgraded to a warning for backwards compatibility with previous releases + = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + +warning[E0381]: use of possibly uninitialized variable: `b` + --> $DIR/const_let_refutable.rs:4:9 + | +LL | a + b + | ^ use of possibly uninitialized `b` + | + = warning: this error has been downgraded to a warning for backwards compatibility with previous releases + = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0005`. +Some errors have detailed explanations: E0005, E0381, E0723. +For more information about an error, try `rustc --explain E0005`. diff --git a/src/test/ui/consts/issue-54224.rs b/src/test/ui/consts/issue-54224.rs index b5a8fe8819..f1947933d6 100644 --- a/src/test/ui/consts/issue-54224.rs +++ b/src/test/ui/consts/issue-54224.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - const FOO: Option<&[[u8; 3]]> = Some(&[*b"foo"]); //~ ERROR temporary value dropped while borrowed use std::borrow::Cow; diff --git a/src/test/ui/consts/issue-54224.stderr b/src/test/ui/consts/issue-54224.stderr index 9b6638b228..8dcb4daca3 100644 --- a/src/test/ui/consts/issue-54224.stderr +++ b/src/test/ui/consts/issue-54224.stderr @@ -1,5 +1,5 @@ error[E0716]: temporary value dropped while borrowed - --> $DIR/issue-54224.rs:3:39 + --> $DIR/issue-54224.rs:1:39 | LL | const FOO: Option<&[[u8; 3]]> = Some(&[*b"foo"]); | ------^^^^^^^^^- @@ -9,7 +9,7 @@ LL | const FOO: Option<&[[u8; 3]]> = Some(&[*b"foo"]); | using this value as a constant requires that borrow lasts for `'static` error[E0716]: temporary value dropped while borrowed - --> $DIR/issue-54224.rs:11:57 + --> $DIR/issue-54224.rs:9:57 | LL | pub const Z: Cow<'static, [ [u8; 3] ]> = Cow::Borrowed(&[*b"ABC"]); | ---------------^^^^^^^^^- diff --git a/src/test/ui/consts/match_ice.rs b/src/test/ui/consts/match_ice.rs index 53c5782a4c..1c13bfceb6 100644 --- a/src/test/ui/consts/match_ice.rs +++ b/src/test/ui/consts/match_ice.rs @@ -2,9 +2,17 @@ struct S; +#[derive(PartialEq, Eq)] +struct T; + fn main() { const C: &S = &S; - match C { //~ ERROR non-exhaustive - C => {} // this is a common bug around constants and references in patterns + match C { + C => {} + //~^ ERROR to use a constant of type `S` in a pattern, `S` must be annotated with + } + const K: &T = &T; + match K { //~ ERROR non-exhaustive patterns: `&T` not covered + K => {} } } diff --git a/src/test/ui/consts/match_ice.stderr b/src/test/ui/consts/match_ice.stderr index e238fad431..158581fcb1 100644 --- a/src/test/ui/consts/match_ice.stderr +++ b/src/test/ui/consts/match_ice.stderr @@ -1,11 +1,17 @@ -error[E0004]: non-exhaustive patterns: `&S` not covered - --> $DIR/match_ice.rs:7:11 +error: to use a constant of type `S` in a pattern, `S` must be annotated with `#[derive(PartialEq, Eq)]` + --> $DIR/match_ice.rs:11:9 | -LL | match C { - | ^ pattern `&S` not covered +LL | C => {} + | ^ + +error[E0004]: non-exhaustive patterns: `&T` not covered + --> $DIR/match_ice.rs:15:11 + | +LL | match K { + | ^ pattern `&T` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms -error: aborting due to previous error +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0004`. diff --git a/src/test/ui/consts/min_const_fn/allow_const_fn_ptr.rs b/src/test/ui/consts/min_const_fn/allow_const_fn_ptr.rs new file mode 100644 index 0000000000..3992607c38 --- /dev/null +++ b/src/test/ui/consts/min_const_fn/allow_const_fn_ptr.rs @@ -0,0 +1,10 @@ +#![feature(rustc_attrs, staged_api)] + +#[stable(feature = "rust1", since = "1.0.0")] +const fn error(_: fn()) {} //~ ERROR function pointers in const fn are unstable + +#[stable(feature = "rust1", since = "1.0.0")] +#[rustc_allow_const_fn_ptr] +const fn compiles(_: fn()) {} + +fn main() {} diff --git a/src/test/ui/consts/min_const_fn/allow_const_fn_ptr.stderr b/src/test/ui/consts/min_const_fn/allow_const_fn_ptr.stderr new file mode 100644 index 0000000000..e6e1ced659 --- /dev/null +++ b/src/test/ui/consts/min_const_fn/allow_const_fn_ptr.stderr @@ -0,0 +1,12 @@ +error[E0723]: function pointers in const fn are unstable + --> $DIR/allow_const_fn_ptr.rs:4:16 + | +LL | const fn error(_: fn()) {} + | ^ + | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 + = help: add #![feature(const_fn)] to the crate attributes to enable + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0723`. diff --git a/src/test/ui/consts/min_const_fn/allow_const_fn_ptr_feature_gate.rs b/src/test/ui/consts/min_const_fn/allow_const_fn_ptr_feature_gate.rs new file mode 100644 index 0000000000..0395795ef7 --- /dev/null +++ b/src/test/ui/consts/min_const_fn/allow_const_fn_ptr_feature_gate.rs @@ -0,0 +1,11 @@ +#![feature(staged_api)] + +#[stable(feature = "rust1", since = "1.0.0")] +const fn error(_: fn()) {} + +#[stable(feature = "rust1", since = "1.0.0")] +#[rustc_allow_const_fn_ptr] +//~^ ERROR unless otherwise specified, attributes with the prefix `rustc_` are reserved +const fn compiles(_: fn()) {} + +fn main() {} diff --git a/src/test/ui/consts/min_const_fn/allow_const_fn_ptr_feature_gate.stderr b/src/test/ui/consts/min_const_fn/allow_const_fn_ptr_feature_gate.stderr new file mode 100644 index 0000000000..c934307e91 --- /dev/null +++ b/src/test/ui/consts/min_const_fn/allow_const_fn_ptr_feature_gate.stderr @@ -0,0 +1,12 @@ +error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics + --> $DIR/allow_const_fn_ptr_feature_gate.rs:7:3 + | +LL | #[rustc_allow_const_fn_ptr] + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 + = help: add #![feature(rustc_attrs)] to the crate attributes to enable + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/consts/min_const_fn/allow_const_fn_ptr_run_pass.rs b/src/test/ui/consts/min_const_fn/allow_const_fn_ptr_run_pass.rs new file mode 100644 index 0000000000..1d8b95ab1a --- /dev/null +++ b/src/test/ui/consts/min_const_fn/allow_const_fn_ptr_run_pass.rs @@ -0,0 +1,18 @@ +// run-pass + +#![feature(rustc_attrs, staged_api)] +#![stable(feature = "rust1", since = "1.0.0")] + +#[stable(feature = "rust1", since = "1.0.0")] +#[rustc_allow_const_fn_ptr] +const fn takes_fn_ptr(_: fn()) {} + +const FN: fn() = || (); + +const fn gives_fn_ptr() { + takes_fn_ptr(FN) +} + +fn main() { + gives_fn_ptr(); +} diff --git a/src/test/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr b/src/test/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr index b0cd57ba2e..ac8d082fc1 100644 --- a/src/test/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr +++ b/src/test/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr @@ -1,9 +1,10 @@ -error[E0723]: heap allocations are not allowed in const fn (see issue #57563) +error[E0723]: heap allocations are not allowed in const fn --> $DIR/bad_const_fn_body_ice.rs:2:5 | LL | vec![1, 2, 3] | ^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/consts/min_const_fn/cast_errors.stderr b/src/test/ui/consts/min_const_fn/cast_errors.stderr index b5af3e7ee4..b1a50be998 100644 --- a/src/test/ui/consts/min_const_fn/cast_errors.stderr +++ b/src/test/ui/consts/min_const_fn/cast_errors.stderr @@ -1,41 +1,46 @@ -error[E0723]: unsizing casts are not allowed in const fn (see issue #57563) +error[E0723]: unsizing casts are not allowed in const fn --> $DIR/cast_errors.rs:3:41 | LL | const fn unsize(x: &[u8; 3]) -> &[u8] { x } | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: function pointers in const fn are unstable (see issue #57563) +error[E0723]: function pointers in const fn are unstable --> $DIR/cast_errors.rs:5:23 | LL | const fn closure() -> fn() { || {} } | ^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: function pointers in const fn are unstable (see issue #57563) +error[E0723]: function pointers in const fn are unstable --> $DIR/cast_errors.rs:8:5 | LL | (|| {}) as fn(); | ^^^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: function pointers in const fn are unstable (see issue #57563) +error[E0723]: function pointers in const fn are unstable --> $DIR/cast_errors.rs:11:28 | LL | const fn reify(f: fn()) -> unsafe fn() { f } | ^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: function pointers in const fn are unstable (see issue #57563) +error[E0723]: function pointers in const fn are unstable --> $DIR/cast_errors.rs:13:21 | LL | const fn reify2() { main as unsafe fn(); } | ^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error: aborting due to 5 previous errors diff --git a/src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr b/src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr index 0de41c65be..7f6132ce9c 100644 --- a/src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr +++ b/src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr @@ -1,9 +1,10 @@ -error[E0723]: function pointers in const fn are unstable (see issue #57563) +error[E0723]: function pointers in const fn are unstable --> $DIR/cmp_fn_pointers.rs:1:14 | LL | const fn cmp(x: fn(), y: fn()) -> bool { | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/consts/min_const_fn/loop_ice.stderr b/src/test/ui/consts/min_const_fn/loop_ice.stderr index 0d35e36354..cb85956266 100644 --- a/src/test/ui/consts/min_const_fn/loop_ice.stderr +++ b/src/test/ui/consts/min_const_fn/loop_ice.stderr @@ -1,9 +1,10 @@ -error[E0723]: loops are not allowed in const fn (see issue #57563) +error[E0723]: loops are not allowed in const fn --> $DIR/loop_ice.rs:2:5 | LL | loop {} | ^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/consts/min_const_fn/min_const_fn.nll.stderr b/src/test/ui/consts/min_const_fn/min_const_fn.nll.stderr index 95b809712f..8d962384a1 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn.nll.stderr +++ b/src/test/ui/consts/min_const_fn/min_const_fn.nll.stderr @@ -4,12 +4,13 @@ error[E0493]: destructors cannot be evaluated at compile-time LL | const fn into_inner(self) -> T { self.0 } | ^^^^ constant functions cannot evaluate destructors -error[E0723]: mutable references in const fn are unstable (see issue #57563) +error[E0723]: mutable references in const fn are unstable --> $DIR/min_const_fn.rs:39:36 | LL | const fn get_mut(&mut self) -> &mut T { &mut self.0 } | ^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error[E0493]: destructors cannot be evaluated at compile-time @@ -18,12 +19,13 @@ error[E0493]: destructors cannot be evaluated at compile-time LL | const fn into_inner_lt(self) -> T { self.0 } | ^^^^ constant functions cannot evaluate destructors -error[E0723]: mutable references in const fn are unstable (see issue #57563) +error[E0723]: mutable references in const fn are unstable --> $DIR/min_const_fn.rs:46:42 | LL | const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 } | ^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error[E0493]: destructors cannot be evaluated at compile-time @@ -32,231 +34,259 @@ error[E0493]: destructors cannot be evaluated at compile-time LL | const fn into_inner_s(self) -> T { self.0 } | ^^^^ constant functions cannot evaluate destructors -error[E0723]: mutable references in const fn are unstable (see issue #57563) +error[E0723]: mutable references in const fn are unstable --> $DIR/min_const_fn.rs:53:38 | LL | const fn get_mut_s(&mut self) -> &mut T { &mut self.0 } | ^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: mutable references in const fn are unstable (see issue #57563) +error[E0723]: mutable references in const fn are unstable --> $DIR/min_const_fn.rs:58:39 | LL | const fn get_mut_sq(&mut self) -> &mut T { &mut self.0 } | ^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:76:16 | LL | const fn foo11(t: T) -> T { t } | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:78:18 | LL | const fn foo11_2(t: T) -> T { t } | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: only int, `bool` and `char` operations are stable in const fn (see issue #57563) +error[E0723]: only int, `bool` and `char` operations are stable in const fn --> $DIR/min_const_fn.rs:80:33 | LL | const fn foo19(f: f32) -> f32 { f * 2.0 } | ^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: only int, `bool` and `char` operations are stable in const fn (see issue #57563) +error[E0723]: only int, `bool` and `char` operations are stable in const fn --> $DIR/min_const_fn.rs:82:35 | LL | const fn foo19_2(f: f32) -> f32 { 2.0 - f } | ^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: only int and `bool` operations are stable in const fn (see issue #57563) +error[E0723]: only int and `bool` operations are stable in const fn --> $DIR/min_const_fn.rs:84:35 | LL | const fn foo19_3(f: f32) -> f32 { -f } | ^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: only int, `bool` and `char` operations are stable in const fn (see issue #57563) +error[E0723]: only int, `bool` and `char` operations are stable in const fn --> $DIR/min_const_fn.rs:86:43 | LL | const fn foo19_4(f: f32, g: f32) -> f32 { f / g } | ^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: cannot access `static` items in const fn (see issue #57563) +error[E0723]: cannot access `static` items in const fn --> $DIR/min_const_fn.rs:90:27 | LL | const fn foo25() -> u32 { BAR } | ^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: cannot access `static` items in const fn (see issue #57563) +error[E0723]: cannot access `static` items in const fn --> $DIR/min_const_fn.rs:91:36 | LL | const fn foo26() -> &'static u32 { &BAR } | ^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: casting pointers to ints is unstable in const fn (see issue #57563) +error[E0723]: casting pointers to ints is unstable in const fn --> $DIR/min_const_fn.rs:92:42 | LL | const fn foo30(x: *const u32) -> usize { x as usize } | ^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: casting pointers to ints is unstable in const fn (see issue #57563) +error[E0723]: casting pointers to ints is unstable in const fn --> $DIR/min_const_fn.rs:94:63 | LL | const fn foo30_with_unsafe(x: *const u32) -> usize { unsafe { x as usize } } | ^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: casting pointers to ints is unstable in const fn (see issue #57563) +error[E0723]: casting pointers to ints is unstable in const fn --> $DIR/min_const_fn.rs:96:42 | LL | const fn foo30_2(x: *mut u32) -> usize { x as usize } | ^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: casting pointers to ints is unstable in const fn (see issue #57563) +error[E0723]: casting pointers to ints is unstable in const fn --> $DIR/min_const_fn.rs:98:63 | LL | const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize } } | ^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn (see issue #57563) +error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn --> $DIR/min_const_fn.rs:100:38 | LL | const fn foo30_4(b: bool) -> usize { if b { 1 } else { 42 } } | ^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn (see issue #57563) +error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn --> $DIR/min_const_fn.rs:102:29 | LL | const fn foo30_5(b: bool) { while b { } } | ^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn (see issue #57563) +error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn --> $DIR/min_const_fn.rs:104:44 | LL | const fn foo36(a: bool, b: bool) -> bool { a && b } | ^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn (see issue #57563) +error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn --> $DIR/min_const_fn.rs:106:44 | LL | const fn foo37(a: bool, b: bool) -> bool { a || b } | ^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: mutable references in const fn are unstable (see issue #57563) +error[E0723]: mutable references in const fn are unstable --> $DIR/min_const_fn.rs:108:14 | LL | const fn inc(x: &mut i32) { *x += 1 } | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:113:6 | LL | impl Foo { | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:118:6 | LL | impl Foo { | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:123:6 | LL | impl Foo { | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: `impl Trait` in const fn is unstable (see issue #57563) +error[E0723]: `impl Trait` in const fn is unstable --> $DIR/min_const_fn.rs:129:24 | LL | const fn no_rpit2() -> AlanTuring { AlanTuring(0) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:131:34 | LL | const fn no_apit2(_x: AlanTuring) {} | ^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:133:22 | LL | const fn no_apit(_x: impl std::fmt::Debug) {} | ^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: `impl Trait` in const fn is unstable (see issue #57563) +error[E0723]: `impl Trait` in const fn is unstable --> $DIR/min_const_fn.rs:134:23 | LL | const fn no_rpit() -> impl std::fmt::Debug {} | ^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:135:23 | LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {} | ^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:136:32 | LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -warning[E0515]: cannot return reference to temporary value +error[E0515]: cannot return reference to temporary value --> $DIR/min_const_fn.rs:136:63 | LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() } @@ -264,35 +294,35 @@ LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() } | || | |temporary value created here | returns a reference to data owned by the current function - | - = warning: this error has been downgraded to a warning for backwards compatibility with previous releases - = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) - --> $DIR/min_const_fn.rs:141:41 +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable + --> $DIR/min_const_fn.rs:144:41 | LL | const fn really_no_traits_i_mean_it() { (&() as &std::fmt::Debug, ()).1 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: function pointers in const fn are unstable (see issue #57563) - --> $DIR/min_const_fn.rs:144:21 +error[E0723]: function pointers in const fn are unstable + --> $DIR/min_const_fn.rs:147:21 | LL | const fn no_fn_ptrs(_x: fn()) {} | ^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: function pointers in const fn are unstable (see issue #57563) - --> $DIR/min_const_fn.rs:146:27 +error[E0723]: function pointers in const fn are unstable + --> $DIR/min_const_fn.rs:149:27 | LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo } | ^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error: aborting due to 36 previous errors +error: aborting due to 37 previous errors -Some errors occurred: E0493, E0515, E0723. -For more information about an error, try `rustc --explain E0493`. +Some errors have detailed explanations: E0515, E0723. +For more information about an error, try `rustc --explain E0515`. diff --git a/src/test/ui/consts/min_const_fn/min_const_fn.rs b/src/test/ui/consts/min_const_fn/min_const_fn.rs index ee3ffcd402..783c79005a 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn.rs +++ b/src/test/ui/consts/min_const_fn/min_const_fn.rs @@ -135,6 +135,9 @@ const fn no_rpit() -> impl std::fmt::Debug {} //~ ERROR `impl Trait` in const fn const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {} //~ ERROR trait bounds other than `Sized` const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() } //~^ ERROR trait bounds other than `Sized` +//~| WARNING cannot return reference to temporary value +//~| WARNING this error has been downgraded to a warning +//~| WARNING this warning will become a hard error in the future const fn no_unsafe() { unsafe {} } @@ -145,4 +148,3 @@ const fn no_fn_ptrs(_x: fn()) {} //~^ ERROR function pointers in const fn are unstable const fn no_fn_ptrs2() -> fn() { fn foo() {} foo } //~^ ERROR function pointers in const fn are unstable - diff --git a/src/test/ui/consts/min_const_fn/min_const_fn.stderr b/src/test/ui/consts/min_const_fn/min_const_fn.stderr index cdf6b1016b..7af3799246 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn.stderr +++ b/src/test/ui/consts/min_const_fn/min_const_fn.stderr @@ -4,12 +4,13 @@ error[E0493]: destructors cannot be evaluated at compile-time LL | const fn into_inner(self) -> T { self.0 } | ^^^^ constant functions cannot evaluate destructors -error[E0723]: mutable references in const fn are unstable (see issue #57563) +error[E0723]: mutable references in const fn are unstable --> $DIR/min_const_fn.rs:39:36 | LL | const fn get_mut(&mut self) -> &mut T { &mut self.0 } | ^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error[E0493]: destructors cannot be evaluated at compile-time @@ -18,12 +19,13 @@ error[E0493]: destructors cannot be evaluated at compile-time LL | const fn into_inner_lt(self) -> T { self.0 } | ^^^^ constant functions cannot evaluate destructors -error[E0723]: mutable references in const fn are unstable (see issue #57563) +error[E0723]: mutable references in const fn are unstable --> $DIR/min_const_fn.rs:46:42 | LL | const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 } | ^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error[E0493]: destructors cannot be evaluated at compile-time @@ -32,255 +34,298 @@ error[E0493]: destructors cannot be evaluated at compile-time LL | const fn into_inner_s(self) -> T { self.0 } | ^^^^ constant functions cannot evaluate destructors -error[E0723]: mutable references in const fn are unstable (see issue #57563) +error[E0723]: mutable references in const fn are unstable --> $DIR/min_const_fn.rs:53:38 | LL | const fn get_mut_s(&mut self) -> &mut T { &mut self.0 } | ^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: mutable references in const fn are unstable (see issue #57563) +error[E0723]: mutable references in const fn are unstable --> $DIR/min_const_fn.rs:58:39 | LL | const fn get_mut_sq(&mut self) -> &mut T { &mut self.0 } | ^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:76:16 | LL | const fn foo11(t: T) -> T { t } | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:78:18 | LL | const fn foo11_2(t: T) -> T { t } | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: only int, `bool` and `char` operations are stable in const fn (see issue #57563) +error[E0723]: only int, `bool` and `char` operations are stable in const fn --> $DIR/min_const_fn.rs:80:33 | LL | const fn foo19(f: f32) -> f32 { f * 2.0 } | ^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: only int, `bool` and `char` operations are stable in const fn (see issue #57563) +error[E0723]: only int, `bool` and `char` operations are stable in const fn --> $DIR/min_const_fn.rs:82:35 | LL | const fn foo19_2(f: f32) -> f32 { 2.0 - f } | ^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: only int and `bool` operations are stable in const fn (see issue #57563) +error[E0723]: only int and `bool` operations are stable in const fn --> $DIR/min_const_fn.rs:84:35 | LL | const fn foo19_3(f: f32) -> f32 { -f } | ^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: only int, `bool` and `char` operations are stable in const fn (see issue #57563) +error[E0723]: only int, `bool` and `char` operations are stable in const fn --> $DIR/min_const_fn.rs:86:43 | LL | const fn foo19_4(f: f32, g: f32) -> f32 { f / g } | ^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: cannot access `static` items in const fn (see issue #57563) +error[E0723]: cannot access `static` items in const fn --> $DIR/min_const_fn.rs:90:27 | LL | const fn foo25() -> u32 { BAR } | ^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: cannot access `static` items in const fn (see issue #57563) +error[E0723]: cannot access `static` items in const fn --> $DIR/min_const_fn.rs:91:36 | LL | const fn foo26() -> &'static u32 { &BAR } | ^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: casting pointers to ints is unstable in const fn (see issue #57563) +error[E0723]: casting pointers to ints is unstable in const fn --> $DIR/min_const_fn.rs:92:42 | LL | const fn foo30(x: *const u32) -> usize { x as usize } | ^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: casting pointers to ints is unstable in const fn (see issue #57563) +error[E0723]: casting pointers to ints is unstable in const fn --> $DIR/min_const_fn.rs:94:63 | LL | const fn foo30_with_unsafe(x: *const u32) -> usize { unsafe { x as usize } } | ^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: casting pointers to ints is unstable in const fn (see issue #57563) +error[E0723]: casting pointers to ints is unstable in const fn --> $DIR/min_const_fn.rs:96:42 | LL | const fn foo30_2(x: *mut u32) -> usize { x as usize } | ^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: casting pointers to ints is unstable in const fn (see issue #57563) +error[E0723]: casting pointers to ints is unstable in const fn --> $DIR/min_const_fn.rs:98:63 | LL | const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize } } | ^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn (see issue #57563) +error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn --> $DIR/min_const_fn.rs:100:38 | LL | const fn foo30_4(b: bool) -> usize { if b { 1 } else { 42 } } | ^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn (see issue #57563) +error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn --> $DIR/min_const_fn.rs:102:29 | LL | const fn foo30_5(b: bool) { while b { } } | ^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn (see issue #57563) +error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn --> $DIR/min_const_fn.rs:104:44 | LL | const fn foo36(a: bool, b: bool) -> bool { a && b } | ^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn (see issue #57563) +error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn --> $DIR/min_const_fn.rs:106:44 | LL | const fn foo37(a: bool, b: bool) -> bool { a || b } | ^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: mutable references in const fn are unstable (see issue #57563) +error[E0723]: mutable references in const fn are unstable --> $DIR/min_const_fn.rs:108:14 | LL | const fn inc(x: &mut i32) { *x += 1 } | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:113:6 | LL | impl Foo { | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:118:6 | LL | impl Foo { | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:123:6 | LL | impl Foo { | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: `impl Trait` in const fn is unstable (see issue #57563) +error[E0723]: `impl Trait` in const fn is unstable --> $DIR/min_const_fn.rs:129:24 | LL | const fn no_rpit2() -> AlanTuring { AlanTuring(0) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:131:34 | LL | const fn no_apit2(_x: AlanTuring) {} | ^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:133:22 | LL | const fn no_apit(_x: impl std::fmt::Debug) {} | ^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: `impl Trait` in const fn is unstable (see issue #57563) +error[E0723]: `impl Trait` in const fn is unstable --> $DIR/min_const_fn.rs:134:23 | LL | const fn no_rpit() -> impl std::fmt::Debug {} | ^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:135:23 | LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {} | ^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn.rs:136:32 | LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) - --> $DIR/min_const_fn.rs:141:41 +warning[E0515]: cannot return reference to temporary value + --> $DIR/min_const_fn.rs:136:63 + | +LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() } + | ^-- + | || + | |temporary value created here + | returns a reference to data owned by the current function + | + = warning: this error has been downgraded to a warning for backwards compatibility with previous releases + = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable + --> $DIR/min_const_fn.rs:144:41 | LL | const fn really_no_traits_i_mean_it() { (&() as &std::fmt::Debug, ()).1 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: function pointers in const fn are unstable (see issue #57563) - --> $DIR/min_const_fn.rs:144:21 +error[E0723]: function pointers in const fn are unstable + --> $DIR/min_const_fn.rs:147:21 | LL | const fn no_fn_ptrs(_x: fn()) {} | ^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: function pointers in const fn are unstable (see issue #57563) - --> $DIR/min_const_fn.rs:146:27 +error[E0723]: function pointers in const fn are unstable + --> $DIR/min_const_fn.rs:149:27 | LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo } | ^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error: aborting due to 36 previous errors -Some errors occurred: E0493, E0723. -For more information about an error, try `rustc --explain E0493`. +Some errors have detailed explanations: E0515, E0723. +For more information about an error, try `rustc --explain E0515`. diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_dyn.nll.stderr b/src/test/ui/consts/min_const_fn/min_const_fn_dyn.nll.stderr index 2800d622f5..9ffb549057 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn_dyn.nll.stderr +++ b/src/test/ui/consts/min_const_fn/min_const_fn_dyn.nll.stderr @@ -1,20 +1,22 @@ -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn_dyn.rs:9:5 | LL | x.0.field; | ^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn_dyn.rs:12:66 | LL | const fn no_inner_dyn_trait_ret() -> Hide { Hide(HasDyn { field: &0 }) } | ^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -warning[E0716]: temporary value dropped while borrowed +error[E0716]: temporary value dropped while borrowed --> $DIR/min_const_fn_dyn.rs:12:67 | LL | const fn no_inner_dyn_trait_ret() -> Hide { Hide(HasDyn { field: &0 }) } @@ -22,11 +24,8 @@ LL | const fn no_inner_dyn_trait_ret() -> Hide { Hide(HasDyn { field: &0 }) } | || | |creates a temporary which is freed while still in use | cast requires that borrow lasts for `'static` - | - = warning: this error has been downgraded to a warning for backwards compatibility with previous releases - = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future -error: aborting due to 2 previous errors +error: aborting due to 3 previous errors -Some errors occurred: E0716, E0723. +Some errors have detailed explanations: E0716, E0723. For more information about an error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_dyn.rs b/src/test/ui/consts/min_const_fn/min_const_fn_dyn.rs index 6ca1e59b3a..75b67192f0 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn_dyn.rs +++ b/src/test/ui/consts/min_const_fn/min_const_fn_dyn.rs @@ -11,5 +11,8 @@ const fn no_inner_dyn_trait2(x: Hide) { } const fn no_inner_dyn_trait_ret() -> Hide { Hide(HasDyn { field: &0 }) } //~^ ERROR trait bounds other than `Sized` +//~| WARNING temporary value dropped while borrowed +//~| WARNING this error has been downgraded to a warning +//~| WARNING this warning will become a hard error in the future fn main() {} diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_dyn.stderr b/src/test/ui/consts/min_const_fn/min_const_fn_dyn.stderr index 8ff963722c..b6445329db 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn_dyn.stderr +++ b/src/test/ui/consts/min_const_fn/min_const_fn_dyn.stderr @@ -1,19 +1,34 @@ -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn_dyn.rs:9:5 | LL | x.0.field; | ^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) +error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable --> $DIR/min_const_fn_dyn.rs:12:66 | LL | const fn no_inner_dyn_trait_ret() -> Hide { Hide(HasDyn { field: &0 }) } | ^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable +warning[E0716]: temporary value dropped while borrowed + --> $DIR/min_const_fn_dyn.rs:12:67 + | +LL | const fn no_inner_dyn_trait_ret() -> Hide { Hide(HasDyn { field: &0 }) } + | -^ - temporary value is freed at the end of this statement + | || + | |creates a temporary which is freed while still in use + | cast requires that borrow lasts for `'static` + | + = warning: this error has been downgraded to a warning for backwards compatibility with previous releases + = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0723`. +Some errors have detailed explanations: E0716, E0723. +For more information about an error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_fn_ptr.stderr b/src/test/ui/consts/min_const_fn/min_const_fn_fn_ptr.stderr index 8838ababe2..5316d07afa 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn_fn_ptr.stderr +++ b/src/test/ui/consts/min_const_fn/min_const_fn_fn_ptr.stderr @@ -1,17 +1,19 @@ -error[E0723]: function pointers in const fn are unstable (see issue #57563) +error[E0723]: function pointers in const fn are unstable --> $DIR/min_const_fn_fn_ptr.rs:11:5 | LL | x.0.field; | ^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: function pointers in const fn are unstable (see issue #57563) +error[E0723]: function pointers in const fn are unstable --> $DIR/min_const_fn_fn_ptr.rs:14:59 | LL | const fn no_inner_dyn_trait_ret() -> Hide { Hide(HasPtr { field }) } | ^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.rs b/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.rs index db416e7eb0..759d9ab6a4 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.rs +++ b/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.rs @@ -12,14 +12,14 @@ const fn foo() -> u32 { 42 } #[stable(feature = "rust1", since = "1.0.0")] // can't call non-min_const_fn -const fn bar() -> u32 { foo() } //~ ERROR can only call other `min_const_fn` +const fn bar() -> u32 { foo() } //~ ERROR can only call other `const fn` #[unstable(feature = "rust1", issue="0")] const fn foo2() -> u32 { 42 } #[stable(feature = "rust1", since = "1.0.0")] // can't call non-min_const_fn -const fn bar2() -> u32 { foo2() } //~ ERROR can only call other `min_const_fn` +const fn bar2() -> u32 { foo2() } //~ ERROR can only call other `const fn` #[stable(feature = "rust1", since = "1.0.0")] // conformity is required, even with `const_fn` feature gate @@ -31,6 +31,6 @@ const fn foo2_gated() -> u32 { 42 } #[stable(feature = "rust1", since = "1.0.0")] // can't call non-min_const_fn -const fn bar2_gated() -> u32 { foo2_gated() } //~ ERROR can only call other `min_const_fn` +const fn bar2_gated() -> u32 { foo2_gated() } //~ ERROR can only call other `const fn` fn main() {} diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr b/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr index a8d0dc37e4..c52d7c8511 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr +++ b/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr @@ -1,33 +1,37 @@ -error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) +error[E0723]: can only call other `const fn` within a `const fn`, but `const foo` is not stable as `const fn` --> $DIR/min_const_fn_libstd_stability.rs:15:25 | LL | const fn bar() -> u32 { foo() } | ^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) +error[E0723]: can only call other `const fn` within a `const fn`, but `const foo2` is not stable as `const fn` --> $DIR/min_const_fn_libstd_stability.rs:22:26 | LL | const fn bar2() -> u32 { foo2() } | ^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: only int, `bool` and `char` operations are stable in const fn (see issue #57563) +error[E0723]: only int, `bool` and `char` operations are stable in const fn --> $DIR/min_const_fn_libstd_stability.rs:26:26 | LL | const fn bar3() -> u32 { (5f32 + 6f32) as u32 } | ^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) +error[E0723]: can only call other `const fn` within a `const fn`, but `const foo2_gated` is not stable as `const fn` --> $DIR/min_const_fn_libstd_stability.rs:34:32 | LL | const fn bar2_gated() -> u32 { foo2_gated() } | ^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error: aborting due to 4 previous errors diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_unsafe.stderr b/src/test/ui/consts/min_const_fn/min_const_fn_unsafe.stderr index 48c260644a..d1de5daa74 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn_unsafe.stderr +++ b/src/test/ui/consts/min_const_fn/min_const_fn_unsafe.stderr @@ -1,33 +1,37 @@ -error[E0658]: dereferencing raw pointers in constant functions is unstable (see issue #51911) +error[E0658]: dereferencing raw pointers in constant functions is unstable --> $DIR/min_const_fn_unsafe.rs:50:77 | LL | const fn bad_const_fn_deref_raw(x: *mut usize) -> &'static usize { unsafe { &*x } } | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51911 = help: add #![feature(const_raw_ptr_deref)] to the crate attributes to enable -error[E0658]: dereferencing raw pointers in constant functions is unstable (see issue #51911) +error[E0658]: dereferencing raw pointers in constant functions is unstable --> $DIR/min_const_fn_unsafe.rs:53:70 | LL | const unsafe fn bad_const_unsafe_deref_raw(x: *mut usize) -> usize { *x } | ^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51911 = help: add #![feature(const_raw_ptr_deref)] to the crate attributes to enable -error[E0658]: dereferencing raw pointers in constant functions is unstable (see issue #51911) +error[E0658]: dereferencing raw pointers in constant functions is unstable --> $DIR/min_const_fn_unsafe.rs:56:83 | LL | const unsafe fn bad_const_unsafe_deref_raw_ref(x: *mut usize) -> &'static usize { &*x } | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51911 = help: add #![feature(const_raw_ptr_deref)] to the crate attributes to enable -error[E0658]: unions in const fn are unstable (see issue #51909) +error[E0658]: unions in const fn are unstable --> $DIR/min_const_fn_unsafe.rs:63:5 | LL | Foo { x: () }.y | ^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51909 = help: add #![feature(const_fn_union)] to the crate attributes to enable error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block @@ -40,5 +44,5 @@ LL | const fn bad_const_fn_deref_raw(x: *mut usize) -> &'static usize { unsafe { error: aborting due to 5 previous errors -Some errors occurred: E0133, E0658. +Some errors have detailed explanations: E0133, E0658. For more information about an error, try `rustc --explain E0133`. diff --git a/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.rs b/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.rs index 7faba480a2..64057b012b 100644 --- a/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.rs +++ b/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.rs @@ -12,14 +12,14 @@ const unsafe fn foo() -> u32 { 42 } #[stable(feature = "rust1", since = "1.0.0")] // can't call non-min_const_fn -const unsafe fn bar() -> u32 { unsafe { foo() } } //~ ERROR can only call other `min_const_fn` +const unsafe fn bar() -> u32 { unsafe { foo() } } //~ ERROR can only call other `const fn` #[unstable(feature = "rust1", issue="0")] const unsafe fn foo2() -> u32 { 42 } #[stable(feature = "rust1", since = "1.0.0")] // can't call non-min_const_fn -const unsafe fn bar2() -> u32 { unsafe { foo2() } } //~ ERROR can only call other `min_const_fn` +const unsafe fn bar2() -> u32 { unsafe { foo2() } } //~ ERROR can only call other `const fn` #[stable(feature = "rust1", since = "1.0.0")] // conformity is required, even with `const_fn` feature gate @@ -31,6 +31,7 @@ const unsafe fn foo2_gated() -> u32 { 42 } #[stable(feature = "rust1", since = "1.0.0")] // can't call non-min_const_fn -const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } } //~ ERROR can only call other +const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } } +//~^ ERROR can only call other `const fn` fn main() {} diff --git a/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr b/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr index 5b2bee19ac..af39b99e90 100644 --- a/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr +++ b/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr @@ -1,33 +1,37 @@ -error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) +error[E0723]: can only call other `const fn` within a `const fn`, but `const foo` is not stable as `const fn` --> $DIR/min_const_unsafe_fn_libstd_stability.rs:15:41 | LL | const unsafe fn bar() -> u32 { unsafe { foo() } } | ^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) +error[E0723]: can only call other `const fn` within a `const fn`, but `const foo2` is not stable as `const fn` --> $DIR/min_const_unsafe_fn_libstd_stability.rs:22:42 | LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } } | ^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: only int, `bool` and `char` operations are stable in const fn (see issue #57563) +error[E0723]: only int, `bool` and `char` operations are stable in const fn --> $DIR/min_const_unsafe_fn_libstd_stability.rs:26:33 | LL | const unsafe fn bar3() -> u32 { (5f32 + 6f32) as u32 } | ^^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) +error[E0723]: can only call other `const fn` within a `const fn`, but `const foo2_gated` is not stable as `const fn` --> $DIR/min_const_unsafe_fn_libstd_stability.rs:34:48 | LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } } | ^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error: aborting due to 4 previous errors diff --git a/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.rs b/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.rs index bc1d5091f3..deb2cb6b61 100644 --- a/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.rs +++ b/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.rs @@ -12,14 +12,14 @@ const fn foo() -> u32 { 42 } #[stable(feature = "rust1", since = "1.0.0")] // can't call non-min_const_fn -const unsafe fn bar() -> u32 { foo() } //~ ERROR can only call other `min_const_fn` +const unsafe fn bar() -> u32 { foo() } //~ ERROR can only call other `const fn` #[unstable(feature = "rust1", issue="0")] const fn foo2() -> u32 { 42 } #[stable(feature = "rust1", since = "1.0.0")] // can't call non-min_const_fn -const unsafe fn bar2() -> u32 { foo2() } //~ ERROR can only call other `min_const_fn` +const unsafe fn bar2() -> u32 { foo2() } //~ ERROR can only call other `const fn` // check whether this function cannot be called even with the feature gate active #[unstable(feature = "foo2", issue="0")] @@ -27,6 +27,6 @@ const fn foo2_gated() -> u32 { 42 } #[stable(feature = "rust1", since = "1.0.0")] // can't call non-min_const_fn -const unsafe fn bar2_gated() -> u32 { foo2_gated() } //~ ERROR can only call other `min_const_fn` +const unsafe fn bar2_gated() -> u32 { foo2_gated() } //~ ERROR can only call other `const fn` fn main() {} diff --git a/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr b/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr index f7f630c9ae..e4534d9ab9 100644 --- a/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr +++ b/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr @@ -1,25 +1,28 @@ -error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) +error[E0723]: can only call other `const fn` within a `const fn`, but `const foo` is not stable as `const fn` --> $DIR/min_const_unsafe_fn_libstd_stability2.rs:15:32 | LL | const unsafe fn bar() -> u32 { foo() } | ^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) +error[E0723]: can only call other `const fn` within a `const fn`, but `const foo2` is not stable as `const fn` --> $DIR/min_const_unsafe_fn_libstd_stability2.rs:22:33 | LL | const unsafe fn bar2() -> u32 { foo2() } | ^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) +error[E0723]: can only call other `const fn` within a `const fn`, but `const foo2_gated` is not stable as `const fn` --> $DIR/min_const_unsafe_fn_libstd_stability2.rs:30:39 | LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() } | ^^^^^^^^^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error: aborting due to 3 previous errors diff --git a/src/test/ui/consts/min_const_fn/mutable_borrow.stderr b/src/test/ui/consts/min_const_fn/mutable_borrow.stderr index a2d67a0417..ed55849124 100644 --- a/src/test/ui/consts/min_const_fn/mutable_borrow.stderr +++ b/src/test/ui/consts/min_const_fn/mutable_borrow.stderr @@ -1,17 +1,19 @@ -error[E0723]: mutable references in const fn are unstable (see issue #57563) +error[E0723]: mutable references in const fn are unstable --> $DIR/mutable_borrow.rs:3:9 | LL | let b = &mut a; | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: mutable references in const fn are unstable (see issue #57563) +error[E0723]: mutable references in const fn are unstable --> $DIR/mutable_borrow.rs:12:13 | LL | let b = &mut a; | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/min_const_fn/promotion.nll.stderr b/src/test/ui/consts/min_const_fn/promotion.nll.stderr deleted file mode 100644 index 550423c2d9..0000000000 --- a/src/test/ui/consts/min_const_fn/promotion.nll.stderr +++ /dev/null @@ -1,68 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/promotion.rs:11:27 - | -LL | let x: &'static () = &foo1(); - | ----------- ^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/promotion.rs:12:28 - | -LL | let y: &'static i32 = &foo2(42); - | ------------ ^^^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/promotion.rs:13:28 - | -LL | let z: &'static i32 = &foo3(); - | ------------ ^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/promotion.rs:14:34 - | -LL | let a: &'static Cell = &foo4(); - | ------------------ ^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/promotion.rs:15:42 - | -LL | let a: &'static Option> = &foo5(); - | -------------------------- ^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | let a: &'static Option> = &foo6(); -LL | } - | - temporary value is freed at the end of this statement - -error[E0716]: temporary value dropped while borrowed - --> $DIR/promotion.rs:16:42 - | -LL | let a: &'static Option> = &foo6(); - | -------------------------- ^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to 6 previous errors - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/min_const_fn/promotion.rs b/src/test/ui/consts/min_const_fn/promotion.rs index 969bf40a93..fbe535c714 100644 --- a/src/test/ui/consts/min_const_fn/promotion.rs +++ b/src/test/ui/consts/min_const_fn/promotion.rs @@ -8,10 +8,10 @@ const fn foo5() -> Option> { Some(Cell::new(42)) } const fn foo6() -> Option> { None } fn main() { - let x: &'static () = &foo1(); //~ ERROR does not live long enough - let y: &'static i32 = &foo2(42); //~ ERROR does not live long enough - let z: &'static i32 = &foo3(); //~ ERROR does not live long enough - let a: &'static Cell = &foo4(); //~ ERROR does not live long enough - let a: &'static Option> = &foo5(); //~ ERROR does not live long enough - let a: &'static Option> = &foo6(); //~ ERROR does not live long enough + let x: &'static () = &foo1(); //~ ERROR temporary value dropped while borrowed + let y: &'static i32 = &foo2(42); //~ ERROR temporary value dropped while borrowed + let z: &'static i32 = &foo3(); //~ ERROR temporary value dropped while borrowed + let a: &'static Cell = &foo4(); //~ ERROR temporary value dropped while borrowed + let a: &'static Option> = &foo5(); //~ ERROR temporary value dropped while borrowed + let a: &'static Option> = &foo6(); //~ ERROR temporary value dropped while borrowed } diff --git a/src/test/ui/consts/min_const_fn/promotion.stderr b/src/test/ui/consts/min_const_fn/promotion.stderr index 92d60f0c58..550423c2d9 100644 --- a/src/test/ui/consts/min_const_fn/promotion.stderr +++ b/src/test/ui/consts/min_const_fn/promotion.stderr @@ -1,68 +1,68 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/promotion.rs:11:27 | LL | let x: &'static () = &foo1(); - | ^^^^^^ temporary value does not live long enough + | ----------- ^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/promotion.rs:12:28 | LL | let y: &'static i32 = &foo2(42); - | ^^^^^^^^ temporary value does not live long enough + | ------------ ^^^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/promotion.rs:13:28 | LL | let z: &'static i32 = &foo3(); - | ^^^^^^ temporary value does not live long enough + | ------------ ^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/promotion.rs:14:34 | LL | let a: &'static Cell = &foo4(); - | ^^^^^^ temporary value does not live long enough + | ------------------ ^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` ... LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/promotion.rs:15:42 | LL | let a: &'static Option> = &foo5(); - | ^^^^^^ temporary value does not live long enough + | -------------------------- ^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` LL | let a: &'static Option> = &foo6(); LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/promotion.rs:16:42 | LL | let a: &'static Option> = &foo6(); - | ^^^^^^ temporary value does not live long enough + | -------------------------- ^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to 6 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/consts/miri_unleashed/feature-gate-unleash_the_miri_inside_of_you.stderr b/src/test/ui/consts/miri_unleashed/feature-gate-unleash_the_miri_inside_of_you.stderr index 7ede44c65b..c56ebf60df 100644 --- a/src/test/ui/consts/miri_unleashed/feature-gate-unleash_the_miri_inside_of_you.stderr +++ b/src/test/ui/consts/miri_unleashed/feature-gate-unleash_the_miri_inside_of_you.stderr @@ -14,4 +14,3 @@ LL | const X: Vec = Vec::new(); error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0493`. diff --git a/src/test/ui/consts/projection_qualif.stderr b/src/test/ui/consts/projection_qualif.stderr index 45679e3b96..c270296ac8 100644 --- a/src/test/ui/consts/projection_qualif.stderr +++ b/src/test/ui/consts/projection_qualif.stderr @@ -10,15 +10,16 @@ error[E0019]: constant contains unimplemented expression type LL | unsafe { *b = 5; } | ^^^^^^ -error[E0658]: dereferencing raw pointers in constants is unstable (see issue #51911) +error[E0658]: dereferencing raw pointers in constants is unstable --> $DIR/projection_qualif.rs:7:18 | LL | unsafe { *b = 5; } | ^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51911 = help: add #![feature(const_raw_ptr_deref)] to the crate attributes to enable error: aborting due to 3 previous errors -Some errors occurred: E0017, E0019, E0658. +Some errors have detailed explanations: E0017, E0019, E0658. For more information about an error, try `rustc --explain E0017`. diff --git a/src/test/ui/consts/promote_const_let.nll.stderr b/src/test/ui/consts/promote_const_let.nll.stderr deleted file mode 100644 index a0af949bf7..0000000000 --- a/src/test/ui/consts/promote_const_let.nll.stderr +++ /dev/null @@ -1,29 +0,0 @@ -error[E0597]: `y` does not live long enough - --> $DIR/promote_const_let.rs:4:9 - | -LL | let x: &'static u32 = { - | ------------ type annotation requires that `y` is borrowed for `'static` -LL | let y = 42; -LL | &y - | ^^ borrowed value does not live long enough -LL | }; - | - `y` dropped here while still borrowed - -error[E0716]: temporary value dropped while borrowed - --> $DIR/promote_const_let.rs:6:28 - | -LL | let x: &'static u32 = &{ - | ____________------------____^ - | | | - | | type annotation requires that borrow lasts for `'static` -LL | | let y = 42; -LL | | y -LL | | }; - | |_____^ creates a temporary which is freed while still in use -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to 2 previous errors - -Some errors occurred: E0597, E0716. -For more information about an error, try `rustc --explain E0597`. diff --git a/src/test/ui/consts/promote_const_let.rs b/src/test/ui/consts/promote_const_let.rs index a8a6d4d99c..51a0fec2e7 100644 --- a/src/test/ui/consts/promote_const_let.rs +++ b/src/test/ui/consts/promote_const_let.rs @@ -3,7 +3,7 @@ fn main() { let y = 42; &y //~ ERROR does not live long enough }; - let x: &'static u32 = &{ //~ ERROR does not live long enough + let x: &'static u32 = &{ //~ ERROR temporary value dropped while borrowed let y = 42; y }; diff --git a/src/test/ui/consts/promote_const_let.stderr b/src/test/ui/consts/promote_const_let.stderr index c4295776d0..c47d297c90 100644 --- a/src/test/ui/consts/promote_const_let.stderr +++ b/src/test/ui/consts/promote_const_let.stderr @@ -1,27 +1,29 @@ error[E0597]: `y` does not live long enough - --> $DIR/promote_const_let.rs:4:10 + --> $DIR/promote_const_let.rs:4:9 | +LL | let x: &'static u32 = { + | ------------ type annotation requires that `y` is borrowed for `'static` +LL | let y = 42; LL | &y - | ^ borrowed value does not live long enough + | ^^ borrowed value does not live long enough LL | }; - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - `y` dropped here while still borrowed -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/promote_const_let.rs:6:28 | LL | let x: &'static u32 = &{ - | ____________________________^ + | ____________------------____^ + | | | + | | type annotation requires that borrow lasts for `'static` LL | | let y = 42; LL | | y LL | | }; - | |_____^ temporary value does not live long enough + | |_____^ creates a temporary which is freed while still in use LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0597`. +Some errors have detailed explanations: E0597, E0716. +For more information about an error, try `rustc --explain E0597`. diff --git a/src/test/ui/consts/promote_evaluation_unused_result.rs b/src/test/ui/consts/promote_evaluation_unused_result.rs index d199e34775..dc21b9fe8c 100644 --- a/src/test/ui/consts/promote_evaluation_unused_result.rs +++ b/src/test/ui/consts/promote_evaluation_unused_result.rs @@ -1,7 +1,5 @@ //compile-pass -#![feature(nll)] - fn main() { let _: &'static usize = &(loop {}, 1).1; diff --git a/src/test/ui/consts/promote_fn_calls.rs b/src/test/ui/consts/promote_fn_calls.rs index 045322de34..6b6eea3636 100644 --- a/src/test/ui/consts/promote_fn_calls.rs +++ b/src/test/ui/consts/promote_fn_calls.rs @@ -1,8 +1,6 @@ // compile-pass // aux-build:promotable_const_fn_lib.rs -#![feature(nll)] - extern crate promotable_const_fn_lib; use promotable_const_fn_lib::{foo, Foo}; diff --git a/src/test/ui/consts/promote_fn_calls_std.rs b/src/test/ui/consts/promote_fn_calls_std.rs index 0350708d67..d982f35020 100644 --- a/src/test/ui/consts/promote_fn_calls_std.rs +++ b/src/test/ui/consts/promote_fn_calls_std.rs @@ -1,7 +1,5 @@ // compile-pass -#![feature(nll)] - fn main() { let x: &'static u8 = &u8::max_value(); let x: &'static u16 = &u16::max_value(); diff --git a/src/test/ui/consts/single_variant_match_ice.stderr b/src/test/ui/consts/single_variant_match_ice.stderr index bc80de4ce0..b8ad775f1c 100644 --- a/src/test/ui/consts/single_variant_match_ice.stderr +++ b/src/test/ui/consts/single_variant_match_ice.stderr @@ -10,15 +10,16 @@ error[E0019]: constant contains unimplemented expression type LL | x => 42, | ^ -error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn (see issue #57563) +error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn --> $DIR/single_variant_match_ice.rs:18:13 | LL | Prob => 0x1, | ^^^^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error: aborting due to 3 previous errors -Some errors occurred: E0019, E0723. +Some errors have detailed explanations: E0019, E0723. For more information about an error, try `rustc --explain E0019`. diff --git a/src/test/ui/consts/static_mut_containing_mut_ref2.stderr b/src/test/ui/consts/static_mut_containing_mut_ref2.stderr index 72186571d6..ca691b07be 100644 --- a/src/test/ui/consts/static_mut_containing_mut_ref2.stderr +++ b/src/test/ui/consts/static_mut_containing_mut_ref2.stderr @@ -12,5 +12,5 @@ LL | pub static mut STDERR_BUFFER: () = unsafe { *(&mut STDERR_BUFFER_SPACE) = 4 error: aborting due to 2 previous errors -Some errors occurred: E0017, E0019. +Some errors have detailed explanations: E0017, E0019. For more information about an error, try `rustc --explain E0017`. diff --git a/src/test/ui/consts/std/alloc.rs b/src/test/ui/consts/std/alloc.rs new file mode 100644 index 0000000000..65ac7e4492 --- /dev/null +++ b/src/test/ui/consts/std/alloc.rs @@ -0,0 +1,10 @@ +use std::alloc::Layout; + +// ok +const LAYOUT_VALID: Layout = unsafe { Layout::from_size_align_unchecked(0x1000, 0x08) }; + +// not ok, since alignment needs to be non-zero. +const LAYOUT_INVALID: Layout = unsafe { Layout::from_size_align_unchecked(0x1000, 0x00) }; +//~^ ERROR it is undefined behavior to use this value + +fn main() {} diff --git a/src/test/ui/consts/std/alloc.stderr b/src/test/ui/consts/std/alloc.stderr new file mode 100644 index 0000000000..74a8f3daf6 --- /dev/null +++ b/src/test/ui/consts/std/alloc.stderr @@ -0,0 +1,11 @@ +error[E0080]: it is undefined behavior to use this value + --> $DIR/alloc.rs:7:1 + | +LL | const LAYOUT_INVALID: Layout = unsafe { Layout::from_size_align_unchecked(0x1000, 0x00) }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered 0 at .align_, but expected something greater or equal to 1 + | + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0080`. diff --git a/src/test/ui/consts/union_constant.rs b/src/test/ui/consts/union_constant.rs index 074014908b..6b6042194b 100644 --- a/src/test/ui/consts/union_constant.rs +++ b/src/test/ui/consts/union_constant.rs @@ -8,4 +8,3 @@ union Uninit { const UNINIT: Uninit = Uninit { uninit: () }; fn main() {} - diff --git a/src/test/ui/continue-after-missing-main.nll.stderr b/src/test/ui/continue-after-missing-main.nll.stderr new file mode 100644 index 0000000000..aceabf3316 --- /dev/null +++ b/src/test/ui/continue-after-missing-main.nll.stderr @@ -0,0 +1,7 @@ +error[E0601]: `main` function not found in crate `continue_after_missing_main` + | + = note: consider adding a `main` function to `$DIR/continue-after-missing-main.rs` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0601`. diff --git a/src/test/ui/continue-after-missing-main.rs b/src/test/ui/continue-after-missing-main.rs new file mode 100644 index 0000000000..7455c2a431 --- /dev/null +++ b/src/test/ui/continue-after-missing-main.rs @@ -0,0 +1,32 @@ +#![allow(dead_code)] + +// error-pattern:`main` function not found in crate + +struct Tableau<'a, MP> { + provider: &'a MP, +} + +impl<'adapted_matrix_provider, 'original_data, MP> + Tableau<'adapted_matrix_provider, AdaptedMatrixProvider<'original_data, MP>> +{ + fn provider(&self) -> &'adapted_matrix_provider AdaptedMatrixProvider { + self.provider + } +} + +struct AdaptedMatrixProvider<'a, T> { + original_problem: &'a T, +} + +impl<'a, T> AdaptedMatrixProvider<'a, T> { + fn clone_with_extra_bound(&self) -> Self { + AdaptedMatrixProvider { original_problem: self.original_problem } + } +} + +fn create_and_solve_subproblems<'data_provider, 'original_data, MP>( + tableau: Tableau<'data_provider, AdaptedMatrixProvider<'original_data, MP>>, +) { + let _: AdaptedMatrixProvider<'original_data, MP> = tableau.provider().clone_with_extra_bound(); + //~^ ERROR lifetime mismatch +} diff --git a/src/test/ui/continue-after-missing-main.stderr b/src/test/ui/continue-after-missing-main.stderr new file mode 100644 index 0000000000..cc5f876590 --- /dev/null +++ b/src/test/ui/continue-after-missing-main.stderr @@ -0,0 +1,16 @@ +error[E0601]: `main` function not found in crate `continue_after_missing_main` + | + = note: consider adding a `main` function to `$DIR/continue-after-missing-main.rs` + +error[E0623]: lifetime mismatch + --> $DIR/continue-after-missing-main.rs:30:56 + | +LL | tableau: Tableau<'data_provider, AdaptedMatrixProvider<'original_data, MP>>, + | ------------------------------------------------------------------ these two types are declared with different lifetimes... +LL | ) { +LL | let _: AdaptedMatrixProvider<'original_data, MP> = tableau.provider().clone_with_extra_bound(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...but data from `tableau` flows into `tableau` here + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0601`. diff --git a/src/test/ui/custom_attribute.stderr b/src/test/ui/custom_attribute.stderr index 6608fb53c3..adb05e3fb2 100644 --- a/src/test/ui/custom_attribute.stderr +++ b/src/test/ui/custom_attribute.stderr @@ -1,25 +1,28 @@ -error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/custom_attribute.rs:3:3 | LL | #[foo] | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/custom_attribute.rs:5:7 | LL | #[foo] | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/custom_attribute.rs:7:7 | LL | #[foo] | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable error: aborting due to 3 previous errors diff --git a/src/test/ui/cycle-projection-based-on-where-clause.stderr b/src/test/ui/cycle-projection-based-on-where-clause.stderr index b11a8bda9b..e5a5e2897c 100644 --- a/src/test/ui/cycle-projection-based-on-where-clause.stderr +++ b/src/test/ui/cycle-projection-based-on-where-clause.stderr @@ -19,5 +19,5 @@ LL | T : Add error: aborting due to 2 previous errors -Some errors occurred: E0220, E0391. +Some errors have detailed explanations: E0220, E0391. For more information about an error, try `rustc --explain E0220`. diff --git a/src/test/ui/defaulted-never-note.rs b/src/test/ui/defaulted-never-note.rs index acda4b42f1..cf1922ecc7 100644 --- a/src/test/ui/defaulted-never-note.rs +++ b/src/test/ui/defaulted-never-note.rs @@ -32,4 +32,3 @@ fn smeg() { fn main() { smeg(); } - diff --git a/src/test/ui/deprecation/deprecation-in-future.rs b/src/test/ui/deprecation/deprecation-in-future.rs index 138d902621..c4f9fdce74 100644 --- a/src/test/ui/deprecation/deprecation-in-future.rs +++ b/src/test/ui/deprecation/deprecation-in-future.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - // run-pass #![deny(deprecated_in_future)] diff --git a/src/test/ui/deprecation/deprecation-in-future.stderr b/src/test/ui/deprecation/deprecation-in-future.stderr index 81d2461c1b..2284cfa8d6 100644 --- a/src/test/ui/deprecation/deprecation-in-future.stderr +++ b/src/test/ui/deprecation/deprecation-in-future.stderr @@ -1,5 +1,5 @@ warning: use of deprecated item 'deprecated_future': text - --> $DIR/deprecation-in-future.rs:11:5 + --> $DIR/deprecation-in-future.rs:9:5 | LL | deprecated_future(); // ok; deprecated_in_future only applies to rustc_deprecated | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/deprecation/deprecation-sanity.stderr b/src/test/ui/deprecation/deprecation-sanity.stderr index 6d5e3d5136..7ff68a1038 100644 --- a/src/test/ui/deprecation/deprecation-sanity.stderr +++ b/src/test/ui/deprecation/deprecation-sanity.stderr @@ -54,5 +54,5 @@ LL | #[deprecated(since = "a", since = "b", note = "c")] error: aborting due to 9 previous errors -Some errors occurred: E0538, E0541, E0550, E0551, E0565. +Some errors have detailed explanations: E0538, E0541, E0565. For more information about an error, try `rustc --explain E0538`. diff --git a/src/test/ui/derive-uninhabited-enum-38885.rs b/src/test/ui/derive-uninhabited-enum-38885.rs index c0279d60e2..b314eacc92 100644 --- a/src/test/ui/derive-uninhabited-enum-38885.rs +++ b/src/test/ui/derive-uninhabited-enum-38885.rs @@ -14,4 +14,3 @@ enum Foo { //~ WARN never used } fn main() {} - diff --git a/src/test/ui/derives/deriving-copyclone.rs b/src/test/ui/derives/deriving-copyclone.rs index afe6196907..4565412bff 100644 --- a/src/test/ui/derives/deriving-copyclone.rs +++ b/src/test/ui/derives/deriving-copyclone.rs @@ -35,4 +35,3 @@ fn main() { is_copy(B { a: 1, b: D }); //~ERROR Copy is_clone(B { a: 1, b: D }); } - diff --git a/src/test/ui/derives/deriving-meta-unknown-trait.rs b/src/test/ui/derives/deriving-meta-unknown-trait.rs index 2b29f10150..f4a6f3fd62 100644 --- a/src/test/ui/derives/deriving-meta-unknown-trait.rs +++ b/src/test/ui/derives/deriving-meta-unknown-trait.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #[derive(Eqr)] //~^ ERROR cannot find derive macro `Eqr` in this scope struct Foo; diff --git a/src/test/ui/derives/deriving-meta-unknown-trait.stderr b/src/test/ui/derives/deriving-meta-unknown-trait.stderr index 2b121ac679..cf0173dfad 100644 --- a/src/test/ui/derives/deriving-meta-unknown-trait.stderr +++ b/src/test/ui/derives/deriving-meta-unknown-trait.stderr @@ -1,5 +1,5 @@ error: cannot find derive macro `Eqr` in this scope - --> $DIR/deriving-meta-unknown-trait.rs:3:10 + --> $DIR/deriving-meta-unknown-trait.rs:1:10 | LL | #[derive(Eqr)] | ^^^ help: try: `Eq` diff --git a/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr b/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr index 3206eecbe3..3b480f00df 100644 --- a/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr +++ b/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr @@ -24,5 +24,5 @@ LL | x: NoCloneOrEq error: aborting due to 3 previous errors -Some errors occurred: E0277, E0369. +Some errors have detailed explanations: E0277, E0369. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/derives/deriving-primitive.rs b/src/test/ui/derives/deriving-primitive.rs index 53acf6164d..c7098d4b56 100644 --- a/src/test/ui/derives/deriving-primitive.rs +++ b/src/test/ui/derives/deriving-primitive.rs @@ -2,4 +2,3 @@ enum Foo {} fn main() {} - diff --git a/src/test/ui/destructure-trait-ref.stderr b/src/test/ui/destructure-trait-ref.stderr index 8fc2b76eb1..bc3013b78b 100644 --- a/src/test/ui/destructure-trait-ref.stderr +++ b/src/test/ui/destructure-trait-ref.stderr @@ -20,21 +20,25 @@ error[E0308]: mismatched types --> $DIR/destructure-trait-ref.rs:31:10 | LL | let &&x = &1isize as &T; - | ^^ expected trait T, found reference + | ^^ + | | + | expected trait T, found reference + | help: you can probably remove the explicit borrow: `x` | = note: expected type `dyn T` found type `&_` - = help: did you mean `x: &dyn T`? error[E0308]: mismatched types --> $DIR/destructure-trait-ref.rs:36:11 | LL | let &&&x = &(&1isize as &T); - | ^^ expected trait T, found reference + | ^^ + | | + | expected trait T, found reference + | help: you can probably remove the explicit borrow: `x` | = note: expected type `dyn T` found type `&_` - = help: did you mean `x: &dyn T`? error[E0308]: mismatched types --> $DIR/destructure-trait-ref.rs:41:13 @@ -47,5 +51,5 @@ LL | let box box x = box 1isize as Box; error: aborting due to 6 previous errors -Some errors occurred: E0033, E0308. +Some errors have detailed explanations: E0033, E0308. For more information about an error, try `rustc --explain E0033`. diff --git a/src/test/ui/did_you_mean/bad-assoc-ty.stderr b/src/test/ui/did_you_mean/bad-assoc-ty.stderr index 7e7f18f2d6..8c694f9d42 100644 --- a/src/test/ui/did_you_mean/bad-assoc-ty.stderr +++ b/src/test/ui/did_you_mean/bad-assoc-ty.stderr @@ -120,5 +120,5 @@ LL | type I = ty!()::AssocTy; error: aborting due to 19 previous errors -Some errors occurred: E0121, E0223. +Some errors have detailed explanations: E0121, E0223. For more information about an error, try `rustc --explain E0121`. diff --git a/src/test/ui/did_you_mean/issue-31424.nll.stderr b/src/test/ui/did_you_mean/issue-31424.nll.stderr deleted file mode 100644 index 147225f1be..0000000000 --- a/src/test/ui/did_you_mean/issue-31424.nll.stderr +++ /dev/null @@ -1,33 +0,0 @@ -error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable - --> $DIR/issue-31424.rs:7:9 - | -LL | (&mut self).bar(); - | ^^^^^^^^^^^ - | | - | cannot borrow as mutable - | try removing `&mut` here - -warning: function cannot return without recursing - --> $DIR/issue-31424.rs:12:5 - | -LL | fn bar(self: &mut Self) { - | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing -LL | -LL | (&mut self).bar(); - | ----------------- recursive call site - | - = note: #[warn(unconditional_recursion)] on by default - = help: a `loop` may express intention better if this is on purpose - -error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable - --> $DIR/issue-31424.rs:14:9 - | -LL | (&mut self).bar(); - | ^^^^^^^^^^^ - | | - | cannot borrow as mutable - | try removing `&mut` here - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/did_you_mean/issue-31424.stderr b/src/test/ui/did_you_mean/issue-31424.stderr index 7c351ea9bf..147225f1be 100644 --- a/src/test/ui/did_you_mean/issue-31424.stderr +++ b/src/test/ui/did_you_mean/issue-31424.stderr @@ -1,11 +1,11 @@ -error[E0596]: cannot borrow immutable argument `self` as mutable - --> $DIR/issue-31424.rs:7:15 +error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable + --> $DIR/issue-31424.rs:7:9 | LL | (&mut self).bar(); - | ^^^^ - | | - | cannot reborrow mutably - | try removing `&mut` here + | ^^^^^^^^^^^ + | | + | cannot borrow as mutable + | try removing `&mut` here warning: function cannot return without recursing --> $DIR/issue-31424.rs:12:5 @@ -19,15 +19,14 @@ LL | (&mut self).bar(); = note: #[warn(unconditional_recursion)] on by default = help: a `loop` may express intention better if this is on purpose -error[E0596]: cannot borrow immutable argument `self` as mutable - --> $DIR/issue-31424.rs:14:15 +error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable + --> $DIR/issue-31424.rs:14:9 | LL | (&mut self).bar(); - | ^^^^ cannot borrow mutably -help: consider removing the `&mut`, as it is an immutable binding to a mutable reference - | -LL | self.bar(); - | ^^^^ + | ^^^^^^^^^^^ + | | + | cannot borrow as mutable + | try removing `&mut` here error: aborting due to 2 previous errors diff --git a/src/test/ui/did_you_mean/issue-34126.nll.stderr b/src/test/ui/did_you_mean/issue-34126.nll.stderr deleted file mode 100644 index e738df1b73..0000000000 --- a/src/test/ui/did_you_mean/issue-34126.nll.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable - --> $DIR/issue-34126.rs:6:18 - | -LL | self.run(&mut self); - | ^^^^^^^^^ - | | - | cannot borrow as mutable - | try removing `&mut` here - -error[E0502]: cannot borrow `self` as mutable because it is also borrowed as immutable - --> $DIR/issue-34126.rs:6:18 - | -LL | self.run(&mut self); - | ---- --- ^^^^^^^^^ mutable borrow occurs here - | | | - | | immutable borrow later used by call - | immutable borrow occurs here - -error: aborting due to 2 previous errors - -Some errors occurred: E0502, E0596. -For more information about an error, try `rustc --explain E0502`. diff --git a/src/test/ui/did_you_mean/issue-34126.rs b/src/test/ui/did_you_mean/issue-34126.rs index 15bef1ef81..4989577dbb 100644 --- a/src/test/ui/did_you_mean/issue-34126.rs +++ b/src/test/ui/did_you_mean/issue-34126.rs @@ -4,6 +4,7 @@ impl Z { fn run(&self, z: &mut Z) { } fn start(&mut self) { self.run(&mut self); //~ ERROR cannot borrow + //~| ERROR cannot borrow } } diff --git a/src/test/ui/did_you_mean/issue-34126.stderr b/src/test/ui/did_you_mean/issue-34126.stderr index 536e295181..0843df29b5 100644 --- a/src/test/ui/did_you_mean/issue-34126.stderr +++ b/src/test/ui/did_you_mean/issue-34126.stderr @@ -1,12 +1,22 @@ -error[E0596]: cannot borrow immutable argument `self` as mutable - --> $DIR/issue-34126.rs:6:23 +error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable + --> $DIR/issue-34126.rs:6:18 | LL | self.run(&mut self); - | ^^^^ - | | - | cannot reborrow mutably - | try removing `&mut` here + | ^^^^^^^^^ + | | + | cannot borrow as mutable + | try removing `&mut` here -error: aborting due to previous error +error[E0502]: cannot borrow `self` as mutable because it is also borrowed as immutable + --> $DIR/issue-34126.rs:6:18 + | +LL | self.run(&mut self); + | ---- --- ^^^^^^^^^ mutable borrow occurs here + | | | + | | immutable borrow later used by call + | immutable borrow occurs here + +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0596`. +Some errors have detailed explanations: E0502, E0596. +For more information about an error, try `rustc --explain E0502`. diff --git a/src/test/ui/did_you_mean/issue-34337.nll.stderr b/src/test/ui/did_you_mean/issue-34337.nll.stderr deleted file mode 100644 index 81f7b6dbf1..0000000000 --- a/src/test/ui/did_you_mean/issue-34337.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0596]: cannot borrow `key` as mutable, as it is not declared as mutable - --> $DIR/issue-34337.rs:6:9 - | -LL | get(&mut key); - | ^^^^^^^^ - | | - | cannot borrow as mutable - | try removing `&mut` here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/did_you_mean/issue-34337.stderr b/src/test/ui/did_you_mean/issue-34337.stderr index 353f409b07..81f7b6dbf1 100644 --- a/src/test/ui/did_you_mean/issue-34337.stderr +++ b/src/test/ui/did_you_mean/issue-34337.stderr @@ -1,11 +1,11 @@ -error[E0596]: cannot borrow immutable local variable `key` as mutable - --> $DIR/issue-34337.rs:6:14 +error[E0596]: cannot borrow `key` as mutable, as it is not declared as mutable + --> $DIR/issue-34337.rs:6:9 | LL | get(&mut key); - | ^^^ - | | - | cannot reborrow mutably - | try removing `&mut` here + | ^^^^^^^^ + | | + | cannot borrow as mutable + | try removing `&mut` here error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-35937.nll.stderr b/src/test/ui/did_you_mean/issue-35937.nll.stderr deleted file mode 100644 index 216cb14dcf..0000000000 --- a/src/test/ui/did_you_mean/issue-35937.nll.stderr +++ /dev/null @@ -1,28 +0,0 @@ -error[E0596]: cannot borrow `f.v` as mutable, as `f` is not declared as mutable - --> $DIR/issue-35937.rs:7:5 - | -LL | let f = Foo { v: Vec::new() }; - | - help: consider changing this to be mutable: `mut f` -LL | f.v.push("cat".to_string()); - | ^^^ cannot borrow as mutable - -error[E0594]: cannot assign to `s.x`, as `s` is not declared as mutable - --> $DIR/issue-35937.rs:16:5 - | -LL | let s = S { x: 42 }; - | - help: consider changing this to be mutable: `mut s` -LL | s.x += 1; - | ^^^^^^^^ cannot assign - -error[E0594]: cannot assign to `s.x`, as `s` is not declared as mutable - --> $DIR/issue-35937.rs:20:5 - | -LL | fn bar(s: S) { - | - help: consider changing this to be mutable: `mut s` -LL | s.x += 1; - | ^^^^^^^^ cannot assign - -error: aborting due to 3 previous errors - -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. diff --git a/src/test/ui/did_you_mean/issue-35937.stderr b/src/test/ui/did_you_mean/issue-35937.stderr index 1e70f986e8..4f9b6a6134 100644 --- a/src/test/ui/did_you_mean/issue-35937.stderr +++ b/src/test/ui/did_you_mean/issue-35937.stderr @@ -1,28 +1,27 @@ -error[E0596]: cannot borrow field `f.v` of immutable binding as mutable +error[E0596]: cannot borrow `f.v` as mutable, as `f` is not declared as mutable --> $DIR/issue-35937.rs:7:5 | LL | let f = Foo { v: Vec::new() }; - | - help: make this binding mutable: `mut f` + | - help: consider changing this to be mutable: `mut f` LL | f.v.push("cat".to_string()); - | ^^^ cannot mutably borrow field of immutable binding + | ^^^ cannot borrow as mutable -error[E0594]: cannot assign to field `s.x` of immutable binding +error[E0594]: cannot assign to `s.x`, as `s` is not declared as mutable --> $DIR/issue-35937.rs:16:5 | LL | let s = S { x: 42 }; - | - help: make this binding mutable: `mut s` + | - help: consider changing this to be mutable: `mut s` LL | s.x += 1; - | ^^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^ cannot assign -error[E0594]: cannot assign to field `s.x` of immutable binding +error[E0594]: cannot assign to `s.x`, as `s` is not declared as mutable --> $DIR/issue-35937.rs:20:5 | LL | fn bar(s: S) { - | - help: make this binding mutable: `mut s` + | - help: consider changing this to be mutable: `mut s` LL | s.x += 1; - | ^^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^ cannot assign error: aborting due to 3 previous errors -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/did_you_mean/issue-37139.nll.stderr b/src/test/ui/did_you_mean/issue-37139.nll.stderr deleted file mode 100644 index 163817dd9b..0000000000 --- a/src/test/ui/did_you_mean/issue-37139.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/issue-37139.rs:12:18 - | -LL | test(&mut x); - | ^^^^^^ - | | - | cannot borrow as mutable - | try removing `&mut` here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/did_you_mean/issue-37139.rs b/src/test/ui/did_you_mean/issue-37139.rs index b7f419ae4a..07d855d096 100644 --- a/src/test/ui/did_you_mean/issue-37139.rs +++ b/src/test/ui/did_you_mean/issue-37139.rs @@ -9,7 +9,7 @@ fn main() { let mut x = TestEnum::Item(10); match x { TestEnum::Item(ref mut x) => { - test(&mut x); //~ ERROR cannot borrow immutable + test(&mut x); //~ ERROR cannot borrow `x` as mutable, as it is not declared as mutable } } } diff --git a/src/test/ui/did_you_mean/issue-37139.stderr b/src/test/ui/did_you_mean/issue-37139.stderr index cd42ee8001..163817dd9b 100644 --- a/src/test/ui/did_you_mean/issue-37139.stderr +++ b/src/test/ui/did_you_mean/issue-37139.stderr @@ -1,11 +1,11 @@ -error[E0596]: cannot borrow immutable local variable `x` as mutable - --> $DIR/issue-37139.rs:12:23 +error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable + --> $DIR/issue-37139.rs:12:18 | LL | test(&mut x); - | ^ - | | - | cannot reborrow mutably - | try removing `&mut` here + | ^^^^^^ + | | + | cannot borrow as mutable + | try removing `&mut` here error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-38147-1.nll.stderr b/src/test/ui/did_you_mean/issue-38147-1.nll.stderr deleted file mode 100644 index 6efac371c0..0000000000 --- a/src/test/ui/did_you_mean/issue-38147-1.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0596]: cannot borrow `*self.s` as mutable, as it is behind a `&` reference - --> $DIR/issue-38147-1.rs:17:9 - | -LL | fn f(&self) { - | ----- help: consider changing this to be a mutable reference: `&mut self` -LL | self.s.push('x'); - | ^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/did_you_mean/issue-38147-1.rs b/src/test/ui/did_you_mean/issue-38147-1.rs index b67239619d..c068a1834f 100644 --- a/src/test/ui/did_you_mean/issue-38147-1.rs +++ b/src/test/ui/did_you_mean/issue-38147-1.rs @@ -14,7 +14,7 @@ struct Foo<'a> { impl<'a> Foo<'a> { fn f(&self) { - self.s.push('x'); //~ ERROR cannot borrow data mutably + self.s.push('x'); //~ cannot borrow `*self.s` as mutable, as it is behind a `&` reference } } diff --git a/src/test/ui/did_you_mean/issue-38147-1.stderr b/src/test/ui/did_you_mean/issue-38147-1.stderr index 4311836be3..6efac371c0 100644 --- a/src/test/ui/did_you_mean/issue-38147-1.stderr +++ b/src/test/ui/did_you_mean/issue-38147-1.stderr @@ -1,11 +1,11 @@ -error[E0389]: cannot borrow data mutably in a `&` reference +error[E0596]: cannot borrow `*self.s` as mutable, as it is behind a `&` reference --> $DIR/issue-38147-1.rs:17:9 | LL | fn f(&self) { - | ----- use `&mut self` here to make mutable + | ----- help: consider changing this to be a mutable reference: `&mut self` LL | self.s.push('x'); - | ^^^^^^ assignment into an immutable reference + | ^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to previous error -For more information about this error, try `rustc --explain E0389`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/did_you_mean/issue-38147-2.nll.stderr b/src/test/ui/did_you_mean/issue-38147-2.nll.stderr deleted file mode 100644 index cb49810893..0000000000 --- a/src/test/ui/did_you_mean/issue-38147-2.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0596]: cannot borrow `*self.s` as mutable, as it is behind a `&` reference - --> $DIR/issue-38147-2.rs:7:9 - | -LL | s: &'a String - | ---------- help: consider changing this to be mutable: `&'a mut String` -... -LL | self.s.push('x'); - | ^^^^^^ cannot borrow as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/did_you_mean/issue-38147-2.rs b/src/test/ui/did_you_mean/issue-38147-2.rs index e43ebf9d26..fe2634d88a 100644 --- a/src/test/ui/did_you_mean/issue-38147-2.rs +++ b/src/test/ui/did_you_mean/issue-38147-2.rs @@ -5,7 +5,7 @@ struct Bar<'a> { impl<'a> Bar<'a> { fn f(&mut self) { self.s.push('x'); - //~^ ERROR cannot borrow borrowed content `*self.s` of immutable binding as mutable + //~^ ERROR cannot borrow `*self.s` as mutable, as it is behind a `&` reference } } diff --git a/src/test/ui/did_you_mean/issue-38147-2.stderr b/src/test/ui/did_you_mean/issue-38147-2.stderr index fa4fccb8d2..cb49810893 100644 --- a/src/test/ui/did_you_mean/issue-38147-2.stderr +++ b/src/test/ui/did_you_mean/issue-38147-2.stderr @@ -1,8 +1,8 @@ -error[E0596]: cannot borrow borrowed content `*self.s` of immutable binding as mutable +error[E0596]: cannot borrow `*self.s` as mutable, as it is behind a `&` reference --> $DIR/issue-38147-2.rs:7:9 | LL | s: &'a String - | ---------- use `&'a mut String` here to make mutable + | ---------- help: consider changing this to be mutable: `&'a mut String` ... LL | self.s.push('x'); | ^^^^^^ cannot borrow as mutable diff --git a/src/test/ui/did_you_mean/issue-38147-3.nll.stderr b/src/test/ui/did_you_mean/issue-38147-3.nll.stderr deleted file mode 100644 index 67782578a2..0000000000 --- a/src/test/ui/did_you_mean/issue-38147-3.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0596]: cannot borrow `*self.s` as mutable, as it is behind a `&` reference - --> $DIR/issue-38147-3.rs:7:9 - | -LL | s: &'a String - | ---------- help: consider changing this to be mutable: `&'a mut String` -... -LL | self.s.push('x'); - | ^^^^^^ cannot borrow as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/did_you_mean/issue-38147-3.rs b/src/test/ui/did_you_mean/issue-38147-3.rs index 4cd703f2f6..40b8e0dba2 100644 --- a/src/test/ui/did_you_mean/issue-38147-3.rs +++ b/src/test/ui/did_you_mean/issue-38147-3.rs @@ -5,7 +5,7 @@ struct Qux<'a> { impl<'a> Qux<'a> { fn f(&self) { self.s.push('x'); - //~^ ERROR cannot borrow borrowed content `*self.s` of immutable binding as mutable + //~^ ERROR cannot borrow `*self.s` as mutable, as it is behind a `&` reference } } diff --git a/src/test/ui/did_you_mean/issue-38147-3.stderr b/src/test/ui/did_you_mean/issue-38147-3.stderr index 2cb9835278..67782578a2 100644 --- a/src/test/ui/did_you_mean/issue-38147-3.stderr +++ b/src/test/ui/did_you_mean/issue-38147-3.stderr @@ -1,8 +1,8 @@ -error[E0596]: cannot borrow borrowed content `*self.s` of immutable binding as mutable +error[E0596]: cannot borrow `*self.s` as mutable, as it is behind a `&` reference --> $DIR/issue-38147-3.rs:7:9 | LL | s: &'a String - | ---------- use `&'a mut String` here to make mutable + | ---------- help: consider changing this to be mutable: `&'a mut String` ... LL | self.s.push('x'); | ^^^^^^ cannot borrow as mutable diff --git a/src/test/ui/did_you_mean/issue-38147-4.nll.stderr b/src/test/ui/did_you_mean/issue-38147-4.nll.stderr deleted file mode 100644 index db3e6b8942..0000000000 --- a/src/test/ui/did_you_mean/issue-38147-4.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0596]: cannot borrow `*f.s` as mutable, as it is behind a `&` reference - --> $DIR/issue-38147-4.rs:6:5 - | -LL | fn f(x: usize, f: &Foo) { - | ---- help: consider changing this to be a mutable reference: `&mut Foo<'_>` -LL | f.s.push('x'); - | ^^^ `f` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/did_you_mean/issue-38147-4.rs b/src/test/ui/did_you_mean/issue-38147-4.rs index 26573d4fdd..e2028a9e67 100644 --- a/src/test/ui/did_you_mean/issue-38147-4.rs +++ b/src/test/ui/did_you_mean/issue-38147-4.rs @@ -3,7 +3,7 @@ struct Foo<'a> { } fn f(x: usize, f: &Foo) { - f.s.push('x'); //~ ERROR cannot borrow data mutably + f.s.push('x'); //~ ERROR cannot borrow `*f.s` as mutable, as it is behind a `&` reference } fn main() {} diff --git a/src/test/ui/did_you_mean/issue-38147-4.stderr b/src/test/ui/did_you_mean/issue-38147-4.stderr index 71d44f9aba..db3e6b8942 100644 --- a/src/test/ui/did_you_mean/issue-38147-4.stderr +++ b/src/test/ui/did_you_mean/issue-38147-4.stderr @@ -1,11 +1,11 @@ -error[E0389]: cannot borrow data mutably in a `&` reference +error[E0596]: cannot borrow `*f.s` as mutable, as it is behind a `&` reference --> $DIR/issue-38147-4.rs:6:5 | LL | fn f(x: usize, f: &Foo) { - | ---- use `&mut Foo` here to make mutable + | ---- help: consider changing this to be a mutable reference: `&mut Foo<'_>` LL | f.s.push('x'); - | ^^^ assignment into an immutable reference + | ^^^ `f` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to previous error -For more information about this error, try `rustc --explain E0389`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/did_you_mean/issue-39544.nll.stderr b/src/test/ui/did_you_mean/issue-39544.nll.stderr deleted file mode 100644 index 899a42b54e..0000000000 --- a/src/test/ui/did_you_mean/issue-39544.nll.stderr +++ /dev/null @@ -1,102 +0,0 @@ -error[E0596]: cannot borrow `z.x` as mutable, as `z` is not declared as mutable - --> $DIR/issue-39544.rs:11:13 - | -LL | let z = Z { x: X::Y }; - | - help: consider changing this to be mutable: `mut z` -LL | let _ = &mut z.x; - | ^^^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference - --> $DIR/issue-39544.rs:16:17 - | -LL | fn foo<'z>(&'z self) { - | -------- help: consider changing this to be a mutable reference: `&'z mut self` -LL | let _ = &mut self.x; - | ^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference - --> $DIR/issue-39544.rs:20:17 - | -LL | fn foo1(&self, other: &Z) { - | ----- help: consider changing this to be a mutable reference: `&mut self` -LL | let _ = &mut self.x; - | ^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` reference - --> $DIR/issue-39544.rs:21:17 - | -LL | fn foo1(&self, other: &Z) { - | -- help: consider changing this to be a mutable reference: `&mut Z` -LL | let _ = &mut self.x; -LL | let _ = &mut other.x; - | ^^^^^^^^^^^^ `other` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference - --> $DIR/issue-39544.rs:25:17 - | -LL | fn foo2<'a>(&'a self, other: &Z) { - | -------- help: consider changing this to be a mutable reference: `&'a mut self` -LL | let _ = &mut self.x; - | ^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` reference - --> $DIR/issue-39544.rs:26:17 - | -LL | fn foo2<'a>(&'a self, other: &Z) { - | -- help: consider changing this to be a mutable reference: `&mut Z` -LL | let _ = &mut self.x; -LL | let _ = &mut other.x; - | ^^^^^^^^^^^^ `other` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference - --> $DIR/issue-39544.rs:30:17 - | -LL | fn foo3<'a>(self: &'a Self, other: &Z) { - | -------- help: consider changing this to be a mutable reference: `&'a mut Self` -LL | let _ = &mut self.x; - | ^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` reference - --> $DIR/issue-39544.rs:31:17 - | -LL | fn foo3<'a>(self: &'a Self, other: &Z) { - | -- help: consider changing this to be a mutable reference: `&mut Z` -LL | let _ = &mut self.x; -LL | let _ = &mut other.x; - | ^^^^^^^^^^^^ `other` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` reference - --> $DIR/issue-39544.rs:35:17 - | -LL | fn foo4(other: &Z) { - | -- help: consider changing this to be a mutable reference: `&mut Z` -LL | let _ = &mut other.x; - | ^^^^^^^^^^^^ `other` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `z.x` as mutable, as `z` is not declared as mutable - --> $DIR/issue-39544.rs:41:13 - | -LL | pub fn with_arg(z: Z, w: &Z) { - | - help: consider changing this to be mutable: `mut z` -LL | let _ = &mut z.x; - | ^^^^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow `w.x` as mutable, as it is behind a `&` reference - --> $DIR/issue-39544.rs:42:13 - | -LL | pub fn with_arg(z: Z, w: &Z) { - | -- help: consider changing this to be a mutable reference: `&mut Z` -LL | let _ = &mut z.x; -LL | let _ = &mut w.x; - | ^^^^^^^^ `w` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0594]: cannot assign to `*x.0` which is behind a `&` reference - --> $DIR/issue-39544.rs:48:5 - | -LL | *x.0 = 1; - | ^^^^^^^^ cannot assign - -error: aborting due to 12 previous errors - -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. diff --git a/src/test/ui/did_you_mean/issue-39544.rs b/src/test/ui/did_you_mean/issue-39544.rs index 89696a06aa..3c86f29a89 100644 --- a/src/test/ui/did_you_mean/issue-39544.rs +++ b/src/test/ui/did_you_mean/issue-39544.rs @@ -46,5 +46,5 @@ pub fn with_tuple() { let mut y = 0; let x = (&y,); *x.0 = 1; - //~^ ERROR cannot assign to borrowed content `*x.0` of immutable binding + //~^ ERROR cannot assign to `*x.0` which is behind a `&` reference } diff --git a/src/test/ui/did_you_mean/issue-39544.stderr b/src/test/ui/did_you_mean/issue-39544.stderr index d86ea896a1..dfaaf6b17d 100644 --- a/src/test/ui/did_you_mean/issue-39544.stderr +++ b/src/test/ui/did_you_mean/issue-39544.stderr @@ -1,102 +1,101 @@ -error[E0596]: cannot borrow field `z.x` of immutable binding as mutable - --> $DIR/issue-39544.rs:11:18 +error[E0596]: cannot borrow `z.x` as mutable, as `z` is not declared as mutable + --> $DIR/issue-39544.rs:11:13 | LL | let z = Z { x: X::Y }; - | - help: make this binding mutable: `mut z` + | - help: consider changing this to be mutable: `mut z` LL | let _ = &mut z.x; - | ^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^ cannot borrow as mutable -error[E0596]: cannot borrow field `self.x` of immutable binding as mutable - --> $DIR/issue-39544.rs:16:22 +error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference + --> $DIR/issue-39544.rs:16:17 | LL | fn foo<'z>(&'z self) { - | -------- use `&'z mut self` here to make mutable + | -------- help: consider changing this to be a mutable reference: `&'z mut self` LL | let _ = &mut self.x; - | ^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0596]: cannot borrow field `self.x` of immutable binding as mutable - --> $DIR/issue-39544.rs:20:22 +error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference + --> $DIR/issue-39544.rs:20:17 | LL | fn foo1(&self, other: &Z) { - | ----- use `&mut self` here to make mutable + | ----- help: consider changing this to be a mutable reference: `&mut self` LL | let _ = &mut self.x; - | ^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0596]: cannot borrow field `other.x` of immutable binding as mutable - --> $DIR/issue-39544.rs:21:22 +error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` reference + --> $DIR/issue-39544.rs:21:17 | LL | fn foo1(&self, other: &Z) { - | -- use `&mut Z` here to make mutable + | -- help: consider changing this to be a mutable reference: `&mut Z` LL | let _ = &mut self.x; LL | let _ = &mut other.x; - | ^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^^^^ `other` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0596]: cannot borrow field `self.x` of immutable binding as mutable - --> $DIR/issue-39544.rs:25:22 +error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference + --> $DIR/issue-39544.rs:25:17 | LL | fn foo2<'a>(&'a self, other: &Z) { - | -------- use `&'a mut self` here to make mutable + | -------- help: consider changing this to be a mutable reference: `&'a mut self` LL | let _ = &mut self.x; - | ^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0596]: cannot borrow field `other.x` of immutable binding as mutable - --> $DIR/issue-39544.rs:26:22 +error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` reference + --> $DIR/issue-39544.rs:26:17 | LL | fn foo2<'a>(&'a self, other: &Z) { - | -- use `&mut Z` here to make mutable + | -- help: consider changing this to be a mutable reference: `&mut Z` LL | let _ = &mut self.x; LL | let _ = &mut other.x; - | ^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^^^^ `other` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0596]: cannot borrow field `self.x` of immutable binding as mutable - --> $DIR/issue-39544.rs:30:22 +error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference + --> $DIR/issue-39544.rs:30:17 | LL | fn foo3<'a>(self: &'a Self, other: &Z) { - | -------- use `&'a mut Self` here to make mutable + | -------- help: consider changing this to be a mutable reference: `&'a mut Self` LL | let _ = &mut self.x; - | ^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0596]: cannot borrow field `other.x` of immutable binding as mutable - --> $DIR/issue-39544.rs:31:22 +error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` reference + --> $DIR/issue-39544.rs:31:17 | LL | fn foo3<'a>(self: &'a Self, other: &Z) { - | -- use `&mut Z` here to make mutable + | -- help: consider changing this to be a mutable reference: `&mut Z` LL | let _ = &mut self.x; LL | let _ = &mut other.x; - | ^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^^^^ `other` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0596]: cannot borrow field `other.x` of immutable binding as mutable - --> $DIR/issue-39544.rs:35:22 +error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` reference + --> $DIR/issue-39544.rs:35:17 | LL | fn foo4(other: &Z) { - | -- use `&mut Z` here to make mutable + | -- help: consider changing this to be a mutable reference: `&mut Z` LL | let _ = &mut other.x; - | ^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^^^^ `other` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0596]: cannot borrow field `z.x` of immutable binding as mutable - --> $DIR/issue-39544.rs:41:18 +error[E0596]: cannot borrow `z.x` as mutable, as `z` is not declared as mutable + --> $DIR/issue-39544.rs:41:13 | LL | pub fn with_arg(z: Z, w: &Z) { - | - help: make this binding mutable: `mut z` + | - help: consider changing this to be mutable: `mut z` LL | let _ = &mut z.x; - | ^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^ cannot borrow as mutable -error[E0596]: cannot borrow field `w.x` of immutable binding as mutable - --> $DIR/issue-39544.rs:42:18 +error[E0596]: cannot borrow `w.x` as mutable, as it is behind a `&` reference + --> $DIR/issue-39544.rs:42:13 | LL | pub fn with_arg(z: Z, w: &Z) { - | -- use `&mut Z` here to make mutable + | -- help: consider changing this to be a mutable reference: `&mut Z` LL | let _ = &mut z.x; LL | let _ = &mut w.x; - | ^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^ `w` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0594]: cannot assign to borrowed content `*x.0` of immutable binding +error[E0594]: cannot assign to `*x.0` which is behind a `&` reference --> $DIR/issue-39544.rs:48:5 | LL | *x.0 = 1; - | ^^^^^^^^ cannot borrow as mutable + | ^^^^^^^^ cannot assign error: aborting due to 12 previous errors -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/did_you_mean/issue-40396.stderr b/src/test/ui/did_you_mean/issue-40396.stderr index 86bbf2bf27..fe517ee349 100644 --- a/src/test/ui/did_you_mean/issue-40396.stderr +++ b/src/test/ui/did_you_mean/issue-40396.stderr @@ -99,5 +99,5 @@ LL | (0..13).collect(); error: aborting due to 14 previous errors -Some errors occurred: E0308, E0423, E0425, E0615. +Some errors have detailed explanations: E0308, E0423, E0425, E0615. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/did_you_mean/issue-40823.nll.stderr b/src/test/ui/did_you_mean/issue-40823.nll.stderr deleted file mode 100644 index 73473406a9..0000000000 --- a/src/test/ui/did_you_mean/issue-40823.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0596]: cannot borrow `*buf` as mutable, as it is behind a `&` reference - --> $DIR/issue-40823.rs:3:5 - | -LL | let mut buf = &[1, 2, 3, 4]; - | ------------- help: consider changing this to be a mutable reference: `&mut [1, 2, 3, 4]` -LL | buf.iter_mut(); - | ^^^ `buf` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/did_you_mean/issue-40823.rs b/src/test/ui/did_you_mean/issue-40823.rs index 7e456a354b..0f8c745546 100644 --- a/src/test/ui/did_you_mean/issue-40823.rs +++ b/src/test/ui/did_you_mean/issue-40823.rs @@ -1,4 +1,4 @@ fn main() { let mut buf = &[1, 2, 3, 4]; - buf.iter_mut(); //~ ERROR cannot borrow immutable borrowed content + buf.iter_mut(); //~ ERROR cannot borrow `*buf` as mutable, as it is behind a `&` reference } diff --git a/src/test/ui/did_you_mean/issue-40823.stderr b/src/test/ui/did_you_mean/issue-40823.stderr index fa2150a8d7..73473406a9 100644 --- a/src/test/ui/did_you_mean/issue-40823.stderr +++ b/src/test/ui/did_you_mean/issue-40823.stderr @@ -1,8 +1,10 @@ -error[E0596]: cannot borrow immutable borrowed content `*buf` as mutable +error[E0596]: cannot borrow `*buf` as mutable, as it is behind a `&` reference --> $DIR/issue-40823.rs:3:5 | +LL | let mut buf = &[1, 2, 3, 4]; + | ------------- help: consider changing this to be a mutable reference: `&mut [1, 2, 3, 4]` LL | buf.iter_mut(); - | ^^^ cannot borrow as mutable + | ^^^ `buf` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-42599_available_fields_note.stderr b/src/test/ui/did_you_mean/issue-42599_available_fields_note.stderr index e5dd61c45d..143d7f695c 100644 --- a/src/test/ui/did_you_mean/issue-42599_available_fields_note.stderr +++ b/src/test/ui/did_you_mean/issue-42599_available_fields_note.stderr @@ -28,5 +28,5 @@ LL | let egregious_field_misaccess = demo.egregiously_nonexistent_field; error: aborting due to 4 previous errors -Some errors occurred: E0560, E0609. +Some errors have detailed explanations: E0560, E0609. For more information about an error, try `rustc --explain E0560`. diff --git a/src/test/ui/did_you_mean/issue-43871-enum-instead-of-variant.stderr b/src/test/ui/did_you_mean/issue-43871-enum-instead-of-variant.stderr index 4210b4e057..d02f30152d 100644 --- a/src/test/ui/did_you_mean/issue-43871-enum-instead-of-variant.stderr +++ b/src/test/ui/did_you_mean/issue-43871-enum-instead-of-variant.stderr @@ -59,5 +59,5 @@ and 6 other candidates error: aborting due to 5 previous errors -Some errors occurred: E0423, E0532. +Some errors have detailed explanations: E0423, E0532. For more information about an error, try `rustc --explain E0423`. diff --git a/src/test/ui/did_you_mean/issue-56028-there-is-an-enum-variant.stderr b/src/test/ui/did_you_mean/issue-56028-there-is-an-enum-variant.stderr index 6107ca32a5..8d3a86df02 100644 --- a/src/test/ui/did_you_mean/issue-56028-there-is-an-enum-variant.stderr +++ b/src/test/ui/did_you_mean/issue-56028-there-is-an-enum-variant.stderr @@ -34,5 +34,5 @@ and 3 other candidates error: aborting due to 2 previous errors -Some errors occurred: E0412, E0425. +Some errors have detailed explanations: E0412, E0425. For more information about an error, try `rustc --explain E0412`. diff --git a/src/test/ui/did_you_mean/recursion_limit_deref.rs b/src/test/ui/did_you_mean/recursion_limit_deref.rs index 76e555e5aa..613843801d 100644 --- a/src/test/ui/did_you_mean/recursion_limit_deref.rs +++ b/src/test/ui/did_you_mean/recursion_limit_deref.rs @@ -50,4 +50,3 @@ fn main() { let x: &Bottom = &t; //~ ERROR mismatched types //~^ error recursion limit } - diff --git a/src/test/ui/did_you_mean/recursion_limit_deref.stderr b/src/test/ui/did_you_mean/recursion_limit_deref.stderr index 08e32ade3b..c76efb1d00 100644 --- a/src/test/ui/did_you_mean/recursion_limit_deref.stderr +++ b/src/test/ui/did_you_mean/recursion_limit_deref.stderr @@ -17,5 +17,5 @@ LL | let x: &Bottom = &t; error: aborting due to 2 previous errors -Some errors occurred: E0055, E0308. +Some errors have detailed explanations: E0055, E0308. For more information about an error, try `rustc --explain E0055`. diff --git a/src/test/ui/did_you_mean/recursion_limit_macro.rs b/src/test/ui/did_you_mean/recursion_limit_macro.rs index c9415361cf..a68a5ece7c 100644 --- a/src/test/ui/did_you_mean/recursion_limit_macro.rs +++ b/src/test/ui/did_you_mean/recursion_limit_macro.rs @@ -13,4 +13,3 @@ macro_rules! recurse { fn main() { recurse!(0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9); } - diff --git a/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr b/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr index a94260dc42..de1efcd7e0 100644 --- a/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr +++ b/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr @@ -20,5 +20,5 @@ LL | let _: &Copy + 'static; error: aborting due to 3 previous errors -Some errors occurred: E0038, E0178. +Some errors have detailed explanations: E0038, E0178. For more information about an error, try `rustc --explain E0038`. diff --git a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.nll.stderr b/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.nll.stderr deleted file mode 100644 index fff3a64ff2..0000000000 --- a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0509]: cannot move out of type `X`, which implements the `Drop` trait - --> $DIR/disallowed-deconstructing-destructing-struct-let.rs:12:22 - | -LL | let X { x: y } = x; - | - ^ cannot move out of here - | | - | data moved here - | -note: move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/disallowed-deconstructing-destructing-struct-let.rs:12:16 - | -LL | let X { x: y } = x; - | ^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0509`. diff --git a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.stderr b/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.stderr index 9984cac7a4..fff3a64ff2 100644 --- a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.stderr +++ b/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.stderr @@ -1,11 +1,16 @@ error[E0509]: cannot move out of type `X`, which implements the `Drop` trait - --> $DIR/disallowed-deconstructing-destructing-struct-let.rs:12:9 + --> $DIR/disallowed-deconstructing-destructing-struct-let.rs:12:22 | LL | let X { x: y } = x; - | ^^^^^^^-^^ - | | | - | | hint: to prevent move, use `ref y` or `ref mut y` - | cannot move out of here + | - ^ cannot move out of here + | | + | data moved here + | +note: move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait + --> $DIR/disallowed-deconstructing-destructing-struct-let.rs:12:16 + | +LL | let X { x: y } = x; + | ^ error: aborting due to previous error diff --git a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.nll.stderr b/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.nll.stderr deleted file mode 100644 index 2143c2f9b2..0000000000 --- a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0509]: cannot move out of type `X`, which implements the `Drop` trait - --> $DIR/disallowed-deconstructing-destructing-struct-match.rs:14:11 - | -LL | match x { - | ^ cannot move out of here -LL | X { x: y } => println!("contents: {}", y) - | - data moved here - | -note: move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/disallowed-deconstructing-destructing-struct-match.rs:15:16 - | -LL | X { x: y } => println!("contents: {}", y) - | ^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0509`. diff --git a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs b/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs index 3a5ed6e3b3..9c996a93b9 100644 --- a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs +++ b/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs @@ -12,7 +12,7 @@ fn main() { let x = X { x: "hello".to_string() }; match x { + //~^ ERROR cannot move out of type `X`, which implements the `Drop` trait X { x: y } => println!("contents: {}", y) - //~^ ERROR cannot move out of type `X`, which implements the `Drop` trait } } diff --git a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr b/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr index 8be1b385af..762f64b8b2 100644 --- a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr +++ b/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr @@ -1,11 +1,17 @@ error[E0509]: cannot move out of type `X`, which implements the `Drop` trait - --> $DIR/disallowed-deconstructing-destructing-struct-match.rs:15:9 + --> $DIR/disallowed-deconstructing-destructing-struct-match.rs:14:11 | +LL | match x { + | ^ cannot move out of here +LL | LL | X { x: y } => println!("contents: {}", y) - | ^^^^^^^-^^ - | | | - | | hint: to prevent move, use `ref y` or `ref mut y` - | cannot move out of here + | - data moved here + | +note: move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait + --> $DIR/disallowed-deconstructing-destructing-struct-match.rs:16:16 + | +LL | X { x: y } => println!("contents: {}", y) + | ^ error: aborting due to previous error diff --git a/src/test/ui/discrim/discrim-ill-typed.stderr b/src/test/ui/discrim/discrim-ill-typed.stderr index 14cdb9e07f..543fecb249 100644 --- a/src/test/ui/discrim/discrim-ill-typed.stderr +++ b/src/test/ui/discrim/discrim-ill-typed.stderr @@ -3,48 +3,80 @@ error[E0308]: mismatched types | LL | OhNo = 0_u8, | ^^^^ expected i8, found u8 +help: change the type of the numeric literal from `u8` to `i8` + | +LL | OhNo = 0_i8, + | ^^^^ error[E0308]: mismatched types --> $DIR/discrim-ill-typed.rs:30:16 | LL | OhNo = 0_i8, | ^^^^ expected u8, found i8 +help: change the type of the numeric literal from `i8` to `u8` + | +LL | OhNo = 0_u8, + | ^^^^ error[E0308]: mismatched types --> $DIR/discrim-ill-typed.rs:43:16 | LL | OhNo = 0_u16, | ^^^^^ expected i16, found u16 +help: change the type of the numeric literal from `u16` to `i16` + | +LL | OhNo = 0_i16, + | ^^^^^ error[E0308]: mismatched types --> $DIR/discrim-ill-typed.rs:56:16 | LL | OhNo = 0_i16, | ^^^^^ expected u16, found i16 +help: change the type of the numeric literal from `i16` to `u16` + | +LL | OhNo = 0_u16, + | ^^^^^ error[E0308]: mismatched types --> $DIR/discrim-ill-typed.rs:69:16 | LL | OhNo = 0_u32, | ^^^^^ expected i32, found u32 +help: change the type of the numeric literal from `u32` to `i32` + | +LL | OhNo = 0_i32, + | ^^^^^ error[E0308]: mismatched types --> $DIR/discrim-ill-typed.rs:82:16 | LL | OhNo = 0_i32, | ^^^^^ expected u32, found i32 +help: change the type of the numeric literal from `i32` to `u32` + | +LL | OhNo = 0_u32, + | ^^^^^ error[E0308]: mismatched types --> $DIR/discrim-ill-typed.rs:95:16 | LL | OhNo = 0_u64, | ^^^^^ expected i64, found u64 +help: change the type of the numeric literal from `u64` to `i64` + | +LL | OhNo = 0_i64, + | ^^^^^ error[E0308]: mismatched types --> $DIR/discrim-ill-typed.rs:108:16 | LL | OhNo = 0_i64, | ^^^^^ expected u64, found i64 +help: change the type of the numeric literal from `i64` to `u64` + | +LL | OhNo = 0_u64, + | ^^^^^ error: aborting due to 8 previous errors diff --git a/src/test/ui/discrim/discrim-overflow-2.rs b/src/test/ui/discrim/discrim-overflow-2.rs index 9ff39cd048..f8f565f4d9 100644 --- a/src/test/ui/discrim/discrim-overflow-2.rs +++ b/src/test/ui/discrim/discrim-overflow-2.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - // Issue 23030: Detect overflowing discriminant // // Check that we detect the overflow even if enum is not used. diff --git a/src/test/ui/discrim/discrim-overflow-2.stderr b/src/test/ui/discrim/discrim-overflow-2.stderr index 744324d1f0..198ebe9eb5 100644 --- a/src/test/ui/discrim/discrim-overflow-2.stderr +++ b/src/test/ui/discrim/discrim-overflow-2.stderr @@ -1,5 +1,5 @@ error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:17:9 + --> $DIR/discrim-overflow-2.rs:15:9 | LL | OhNo, | ^^^^ overflowed on value after 127 @@ -7,7 +7,7 @@ LL | OhNo, = note: explicitly set `OhNo = -128` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:26:9 + --> $DIR/discrim-overflow-2.rs:24:9 | LL | OhNo, | ^^^^ overflowed on value after 255 @@ -15,7 +15,7 @@ LL | OhNo, = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:35:9 + --> $DIR/discrim-overflow-2.rs:33:9 | LL | OhNo, | ^^^^ overflowed on value after 32767 @@ -23,7 +23,7 @@ LL | OhNo, = note: explicitly set `OhNo = -32768` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:44:9 + --> $DIR/discrim-overflow-2.rs:42:9 | LL | OhNo, | ^^^^ overflowed on value after 65535 @@ -31,7 +31,7 @@ LL | OhNo, = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:53:9 + --> $DIR/discrim-overflow-2.rs:51:9 | LL | OhNo, | ^^^^ overflowed on value after 2147483647 @@ -39,7 +39,7 @@ LL | OhNo, = note: explicitly set `OhNo = -2147483648` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:62:9 + --> $DIR/discrim-overflow-2.rs:60:9 | LL | OhNo, | ^^^^ overflowed on value after 4294967295 @@ -47,7 +47,7 @@ LL | OhNo, = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:71:9 + --> $DIR/discrim-overflow-2.rs:69:9 | LL | OhNo, | ^^^^ overflowed on value after 9223372036854775807 @@ -55,7 +55,7 @@ LL | OhNo, = note: explicitly set `OhNo = -9223372036854775808` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow-2.rs:80:9 + --> $DIR/discrim-overflow-2.rs:78:9 | LL | OhNo, | ^^^^ overflowed on value after 18446744073709551615 diff --git a/src/test/ui/discrim/discrim-overflow.rs b/src/test/ui/discrim/discrim-overflow.rs index c612661178..d8a9dacfa5 100644 --- a/src/test/ui/discrim/discrim-overflow.rs +++ b/src/test/ui/discrim/discrim-overflow.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - // Issue 23030: Detect overflowing discriminant // See also run-pass/discrim-explicit-23030.rs where the suggested diff --git a/src/test/ui/discrim/discrim-overflow.stderr b/src/test/ui/discrim/discrim-overflow.stderr index c831fdfe1a..a2ae4863f9 100644 --- a/src/test/ui/discrim/discrim-overflow.stderr +++ b/src/test/ui/discrim/discrim-overflow.stderr @@ -1,5 +1,5 @@ error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:15:9 + --> $DIR/discrim-overflow.rs:13:9 | LL | OhNo, | ^^^^ overflowed on value after 127 @@ -7,7 +7,7 @@ LL | OhNo, = note: explicitly set `OhNo = -128` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:26:9 + --> $DIR/discrim-overflow.rs:24:9 | LL | OhNo, | ^^^^ overflowed on value after 255 @@ -15,7 +15,7 @@ LL | OhNo, = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:37:9 + --> $DIR/discrim-overflow.rs:35:9 | LL | OhNo, | ^^^^ overflowed on value after 32767 @@ -23,7 +23,7 @@ LL | OhNo, = note: explicitly set `OhNo = -32768` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:48:9 + --> $DIR/discrim-overflow.rs:46:9 | LL | OhNo, | ^^^^ overflowed on value after 65535 @@ -31,7 +31,7 @@ LL | OhNo, = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:60:9 + --> $DIR/discrim-overflow.rs:58:9 | LL | OhNo, | ^^^^ overflowed on value after 2147483647 @@ -39,7 +39,7 @@ LL | OhNo, = note: explicitly set `OhNo = -2147483648` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:72:9 + --> $DIR/discrim-overflow.rs:70:9 | LL | OhNo, | ^^^^ overflowed on value after 4294967295 @@ -47,7 +47,7 @@ LL | OhNo, = note: explicitly set `OhNo = 0` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:84:9 + --> $DIR/discrim-overflow.rs:82:9 | LL | OhNo, | ^^^^ overflowed on value after 9223372036854775807 @@ -55,7 +55,7 @@ LL | OhNo, = note: explicitly set `OhNo = -9223372036854775808` if that is desired outcome error[E0370]: enum discriminant overflowed - --> $DIR/discrim-overflow.rs:96:9 + --> $DIR/discrim-overflow.rs:94:9 | LL | OhNo, | ^^^^ overflowed on value after 18446744073709551615 diff --git a/src/test/ui/dollar-crate/dollar-crate-is-keyword-2.stderr b/src/test/ui/dollar-crate/dollar-crate-is-keyword-2.stderr index f9de5e14e5..55261a5e6a 100644 --- a/src/test/ui/dollar-crate/dollar-crate-is-keyword-2.stderr +++ b/src/test/ui/dollar-crate/dollar-crate-is-keyword-2.stderr @@ -27,5 +27,5 @@ LL | m!(); error: aborting due to 3 previous errors -Some errors occurred: E0432, E0433. +Some errors have detailed explanations: E0432, E0433. For more information about an error, try `rustc --explain E0432`. diff --git a/src/test/ui/dropck/drop-on-non-struct.stderr b/src/test/ui/dropck/drop-on-non-struct.stderr index 6b670d5d43..6ff16402b0 100644 --- a/src/test/ui/dropck/drop-on-non-struct.stderr +++ b/src/test/ui/dropck/drop-on-non-struct.stderr @@ -15,5 +15,5 @@ LL | impl<'a> Drop for &'a mut isize { error: aborting due to 2 previous errors -Some errors occurred: E0117, E0120. +Some errors have detailed explanations: E0117, E0120. For more information about an error, try `rustc --explain E0117`. diff --git a/src/test/ui/dropck/drop-with-active-borrows-1.nll.stderr b/src/test/ui/dropck/drop-with-active-borrows-1.nll.stderr deleted file mode 100644 index 7fed27adaf..0000000000 --- a/src/test/ui/dropck/drop-with-active-borrows-1.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0505]: cannot move out of `a` because it is borrowed - --> $DIR/drop-with-active-borrows-1.rs:4:10 - | -LL | let b: Vec<&str> = a.lines().collect(); - | - borrow of `a` occurs here -LL | drop(a); - | ^ move out of `a` occurs here -LL | for s in &b { - | -- borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/dropck/drop-with-active-borrows-1.stderr b/src/test/ui/dropck/drop-with-active-borrows-1.stderr index 71960fcecb..7fed27adaf 100644 --- a/src/test/ui/dropck/drop-with-active-borrows-1.stderr +++ b/src/test/ui/dropck/drop-with-active-borrows-1.stderr @@ -5,6 +5,8 @@ LL | let b: Vec<&str> = a.lines().collect(); | - borrow of `a` occurs here LL | drop(a); | ^ move out of `a` occurs here +LL | for s in &b { + | -- borrow later used here error: aborting due to previous error diff --git a/src/test/ui/dropck/drop-with-active-borrows-2.nll.stderr b/src/test/ui/dropck/drop-with-active-borrows-2.nll.stderr deleted file mode 100644 index ffec9306b7..0000000000 --- a/src/test/ui/dropck/drop-with-active-borrows-2.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0515]: cannot return value referencing local variable `raw_lines` - --> $DIR/drop-with-active-borrows-2.rs:3:5 - | -LL | raw_lines.iter().map(|l| l.trim()).collect() - | ---------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | returns a value referencing data owned by the current function - | `raw_lines` is borrowed here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/dropck/drop-with-active-borrows-2.rs b/src/test/ui/dropck/drop-with-active-borrows-2.rs index 4e45633a28..cf4cb3dbe7 100644 --- a/src/test/ui/dropck/drop-with-active-borrows-2.rs +++ b/src/test/ui/dropck/drop-with-active-borrows-2.rs @@ -1,7 +1,7 @@ fn read_lines_borrowed<'a>() -> Vec<&'a str> { let raw_lines: Vec = vec!["foo ".to_string(), " bar".to_string()]; raw_lines.iter().map(|l| l.trim()).collect() - //~^ ERROR `raw_lines` does not live long enough + //~^ ERROR cannot return value referencing local variable `raw_lines` } fn main() { diff --git a/src/test/ui/dropck/drop-with-active-borrows-2.stderr b/src/test/ui/dropck/drop-with-active-borrows-2.stderr index ef46c9276b..ffec9306b7 100644 --- a/src/test/ui/dropck/drop-with-active-borrows-2.stderr +++ b/src/test/ui/dropck/drop-with-active-borrows-2.stderr @@ -1,18 +1,12 @@ -error[E0597]: `raw_lines` does not live long enough +error[E0515]: cannot return value referencing local variable `raw_lines` --> $DIR/drop-with-active-borrows-2.rs:3:5 | LL | raw_lines.iter().map(|l| l.trim()).collect() - | ^^^^^^^^^ borrowed value does not live long enough -LL | -LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 1:24... - --> $DIR/drop-with-active-borrows-2.rs:1:24 - | -LL | fn read_lines_borrowed<'a>() -> Vec<&'a str> { - | ^^ + | ---------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | | + | returns a value referencing data owned by the current function + | `raw_lines` is borrowed here error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/dropck/dropck-eyepatch-extern-crate.ast.stderr b/src/test/ui/dropck/dropck-eyepatch-extern-crate.ast.stderr deleted file mode 100644 index 31adb2f3f1..0000000000 --- a/src/test/ui/dropck/dropck-eyepatch-extern-crate.ast.stderr +++ /dev/null @@ -1,69 +0,0 @@ -error[E0597]: `c` does not live long enough - --> $DIR/dropck-eyepatch-extern-crate.rs:41:20 - | -LL | dt = Dt("dt", &c); - | ^ borrowed value does not live long enough -... -LL | } - | - `c` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c` does not live long enough - --> $DIR/dropck-eyepatch-extern-crate.rs:43:20 - | -LL | dr = Dr("dr", &c); - | ^ borrowed value does not live long enough -... -LL | } - | - `c` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c_shortest` does not live long enough - --> $DIR/dropck-eyepatch-extern-crate.rs:47:20 - | -LL | dt = Dt("dt", &c_shortest); - | ^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - `c_shortest` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c_shortest` does not live long enough - --> $DIR/dropck-eyepatch-extern-crate.rs:50:20 - | -LL | dr = Dr("dr", &c_shortest); - | ^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - `c_shortest` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c_shortest` does not live long enough - --> $DIR/dropck-eyepatch-extern-crate.rs:57:29 - | -LL | pt = Pt("pt", &c_long, &c_shortest); - | ^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - `c_shortest` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c_shortest` does not live long enough - --> $DIR/dropck-eyepatch-extern-crate.rs:59:29 - | -LL | pr = Pr("pr", &c_long, &c_shortest); - | ^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - `c_shortest` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error: aborting due to 6 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/dropck/dropck-eyepatch-extern-crate.nll.stderr b/src/test/ui/dropck/dropck-eyepatch-extern-crate.nll.stderr deleted file mode 100644 index e0b7fc4eb9..0000000000 --- a/src/test/ui/dropck/dropck-eyepatch-extern-crate.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0597]: `c_shortest` does not live long enough - --> $DIR/dropck-eyepatch-extern-crate.rs:47:19 - | -LL | dt = Dt("dt", &c_shortest); - | ^^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `c_shortest` dropped here while still borrowed - | borrow might be used here, when `dt` is dropped and runs the `Drop` code for type `other::Dt` - | - = note: values in a scope are dropped in the opposite order they are defined - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/dropck/dropck-eyepatch-extern-crate.rs b/src/test/ui/dropck/dropck-eyepatch-extern-crate.rs index 6806563939..b8f3035541 100644 --- a/src/test/ui/dropck/dropck-eyepatch-extern-crate.rs +++ b/src/test/ui/dropck/dropck-eyepatch-extern-crate.rs @@ -1,13 +1,3 @@ -// The behavior of AST-borrowck and NLL explcitly differ here due to -// NLL's increased precision; so we use revisions and do not worry -// about the --compare-mode=nll on this test. - -// revisions: ast nll -//[ast]compile-flags: -Z borrowck=ast -//[nll]compile-flags: -Z borrowck=migrate -Z two-phase-borrows - -// ignore-compare-mode-nll - // aux-build:dropck_eyepatch_extern_crate.rs // The point of this test is to illustrate that the `#[may_dangle]` @@ -19,52 +9,74 @@ // // See also dropck-eyepatch.rs for more information about the general // structure of the test. -#![feature(rustc_attrs)] extern crate dropck_eyepatch_extern_crate as other; use other::{Dt,Dr,Pt,Pr,St,Sr}; -fn main() { #![rustc_error] // rust-lang/rust#49855 +fn main() { use std::cell::Cell; - let c_long; - let (c, mut dt, mut dr, mut pt, mut pr, st, sr, c_shortest) - : (Cell<_>, Dt<_>, Dr<_>, Pt<_, _>, Pr<_>, St<_>, Sr<_>, Cell<_>); - c_long = Cell::new(1); - c = Cell::new(1); - c_shortest = Cell::new(1); - // No error: sufficiently long-lived state can be referenced in dtors - dt = Dt("dt", &c_long); - dr = Dr("dr", &c_long); + // We use separate blocks with separate variable to prevent the error + // messages from being deduplicated. + + { + let c_long; + let (mut dt, mut dr): (Dt<_>, Dr<_>); + c_long = Cell::new(1); + + // No error: sufficiently long-lived state can be referenced in dtors + dt = Dt("dt", &c_long); + dr = Dr("dr", &c_long); + } + + { + let (c, mut dt, mut dr): (Cell<_>, Dt<_>, Dr<_>); + c = Cell::new(1); + + // No Error: destructor order precisely modelled + dt = Dt("dt", &c); + dr = Dr("dr", &c); + } + + { + let (mut dt, mut dr, c_shortest): (Dt<_>, Dr<_>, Cell<_>); + c_shortest = Cell::new(1); - // Error: destructor order imprecisely modelled - dt = Dt("dt", &c); - //[ast]~^ ERROR `c` does not live long enough - dr = Dr("dr", &c); - //[ast]~^ ERROR `c` does not live long enough + // Error: `c_shortest` dies too soon for the references in dtors to be valid. + dt = Dt("dt", &c_shortest); + //~^ ERROR `c_shortest` does not live long enough + dr = Dr("dr", &c_shortest); + } - // Error: `c_shortest` dies too soon for the references in dtors to be valid. - dt = Dt("dt", &c_shortest); - //[ast]~^ ERROR `c_shortest` does not live long enough - //[nll]~^^ ERROR `c_shortest` does not live long enough - dr = Dr("dr", &c_shortest); - //[ast]~^ ERROR `c_shortest` does not live long enough - // No error: Drop impl asserts .1 (A and &'a _) are not accessed - pt = Pt("pt", &c_shortest, &c_long); - pr = Pr("pr", &c_shortest, &c_long); + { + let c_long; + let (mut pt, mut pr, c_shortest): (Pt<_, _>, Pr<_>, Cell<_>); + c_long = Cell::new(1); + c_shortest = Cell::new(1); - // Error: Drop impl's assertion does not apply to `B` nor `&'b _` - pt = Pt("pt", &c_long, &c_shortest); - //[ast]~^ ERROR `c_shortest` does not live long enough - pr = Pr("pr", &c_long, &c_shortest); - //[ast]~^ ERROR `c_shortest` does not live long enough + // No error: Drop impl asserts .1 (A and &'a _) are not accessed + pt = Pt("pt", &c_shortest, &c_long); + pr = Pr("pr", &c_shortest, &c_long); + } - // No error: St and Sr have no destructor. - st = St("st", &c_shortest); - sr = Sr("sr", &c_shortest); + { + let c_long; + let (mut pt, mut pr, c_shortest): (Pt<_, _>, Pr<_>, Cell<_>); + c_long = Cell::new(1); + c_shortest = Cell::new(1); + // Error: Drop impl's assertion does not apply to `B` nor `&'b _` + pt = Pt("pt", &c_long, &c_shortest); + //~^ ERROR `c_shortest` does not live long enough + pr = Pr("pr", &c_long, &c_shortest); + } - println!("{:?}", (dt.0, dr.0, pt.0, pr.0, st.0, sr.0)); - use_imm(sr.1); use_imm(st.1); use_imm(pr.1); use_imm(pt.1); use_imm(dr.1); use_imm(dt.1); + { + let (st, sr, c_shortest): (St<_>, Sr<_>, Cell<_>); + c_shortest = Cell::new(1); + // No error: St and Sr have no destructor. + st = St("st", &c_shortest); + sr = Sr("sr", &c_shortest); + } } fn use_imm(_: &T) { } diff --git a/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr b/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr new file mode 100644 index 0000000000..c10232107e --- /dev/null +++ b/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr @@ -0,0 +1,31 @@ +error[E0597]: `c_shortest` does not live long enough + --> $DIR/dropck-eyepatch-extern-crate.rs:46:23 + | +LL | dt = Dt("dt", &c_shortest); + | ^^^^^^^^^^^ borrowed value does not live long enough +... +LL | } + | - + | | + | `c_shortest` dropped here while still borrowed + | borrow might be used here, when `dt` is dropped and runs the `Drop` code for type `other::Dt` + | + = note: values in a scope are dropped in the opposite order they are defined + +error[E0597]: `c_shortest` does not live long enough + --> $DIR/dropck-eyepatch-extern-crate.rs:68:32 + | +LL | pt = Pt("pt", &c_long, &c_shortest); + | ^^^^^^^^^^^ borrowed value does not live long enough +... +LL | } + | - + | | + | `c_shortest` dropped here while still borrowed + | borrow might be used here, when `pt` is dropped and runs the `Drop` code for type `other::Pt` + | + = note: values in a scope are dropped in the opposite order they are defined + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/dropck/dropck-eyepatch-reorder.ast.stderr b/src/test/ui/dropck/dropck-eyepatch-reorder.ast.stderr deleted file mode 100644 index ddd47e9743..0000000000 --- a/src/test/ui/dropck/dropck-eyepatch-reorder.ast.stderr +++ /dev/null @@ -1,69 +0,0 @@ -error[E0597]: `c` does not live long enough - --> $DIR/dropck-eyepatch-reorder.rs:58:20 - | -LL | dt = Dt("dt", &c); - | ^ borrowed value does not live long enough -... -LL | } - | - `c` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c` does not live long enough - --> $DIR/dropck-eyepatch-reorder.rs:60:20 - | -LL | dr = Dr("dr", &c); - | ^ borrowed value does not live long enough -... -LL | } - | - `c` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c_shortest` does not live long enough - --> $DIR/dropck-eyepatch-reorder.rs:64:20 - | -LL | dt = Dt("dt", &c_shortest); - | ^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - `c_shortest` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c_shortest` does not live long enough - --> $DIR/dropck-eyepatch-reorder.rs:67:20 - | -LL | dr = Dr("dr", &c_shortest); - | ^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - `c_shortest` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c_shortest` does not live long enough - --> $DIR/dropck-eyepatch-reorder.rs:74:29 - | -LL | pt = Pt("pt", &c_long, &c_shortest); - | ^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - `c_shortest` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c_shortest` does not live long enough - --> $DIR/dropck-eyepatch-reorder.rs:76:29 - | -LL | pr = Pr("pr", &c_long, &c_shortest); - | ^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - `c_shortest` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error: aborting due to 6 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/dropck/dropck-eyepatch-reorder.nll.stderr b/src/test/ui/dropck/dropck-eyepatch-reorder.nll.stderr deleted file mode 100644 index 97c1caa87f..0000000000 --- a/src/test/ui/dropck/dropck-eyepatch-reorder.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0597]: `c_shortest` does not live long enough - --> $DIR/dropck-eyepatch-reorder.rs:64:19 - | -LL | dt = Dt("dt", &c_shortest); - | ^^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `c_shortest` dropped here while still borrowed - | borrow might be used here, when `dt` is dropped and runs the `Drop` code for type `Dt` - | - = note: values in a scope are dropped in the opposite order they are defined - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/dropck/dropck-eyepatch-reorder.rs b/src/test/ui/dropck/dropck-eyepatch-reorder.rs index 16aaa26125..44552b3fc1 100644 --- a/src/test/ui/dropck/dropck-eyepatch-reorder.rs +++ b/src/test/ui/dropck/dropck-eyepatch-reorder.rs @@ -1,14 +1,4 @@ -// The behavior of AST-borrowck and NLL explcitly differ here due to -// NLL's increased precision; so we use revisions and do not worry -// about the --compare-mode=nll on this test. - -// revisions: ast nll -//[ast]compile-flags: -Z borrowck=ast -//[nll]compile-flags: -Z borrowck=migrate -Z two-phase-borrows - -// ignore-compare-mode-nll - -#![feature(dropck_eyepatch, rustc_attrs)] +#![feature(dropck_eyepatch)] // The point of this test is to test uses of `#[may_dangle]` attribute // where the formal declaration order (in the impl generics) does not @@ -41,47 +31,70 @@ unsafe impl<'b, #[may_dangle] 'a, B: fmt::Debug> Drop for Pr<'a, 'b, B> { fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); } } -fn main() { #![rustc_error] // rust-lang/rust#49855 +fn main() { use std::cell::Cell; - let c_long; - let (c, mut dt, mut dr, mut pt, mut pr, st, sr, c_shortest) - : (Cell<_>, Dt<_>, Dr<_>, Pt<_, _>, Pr<_>, St<_>, Sr<_>, Cell<_>); - c_long = Cell::new(1); - c = Cell::new(1); - c_shortest = Cell::new(1); - - // No error: sufficiently long-lived state can be referenced in dtors - dt = Dt("dt", &c_long); - dr = Dr("dr", &c_long); - - // Error: destructor order imprecisely modelled - dt = Dt("dt", &c); - //[ast]~^ ERROR `c` does not live long enough - dr = Dr("dr", &c); - //[ast]~^ ERROR `c` does not live long enough - - // Error: `c_shortest` dies too soon for the references in dtors to be valid. - dt = Dt("dt", &c_shortest); - //[ast]~^ ERROR `c_shortest` does not live long enough - //[nll]~^^ ERROR `c_shortest` does not live long enough - dr = Dr("dr", &c_shortest); - //[ast]~^ ERROR `c_shortest` does not live long enough - // No error: Drop impl asserts .1 (A and &'a _) are not accessed - pt = Pt("pt", &c_shortest, &c_long); - pr = Pr("pr", &c_shortest, &c_long); - - // Error: Drop impl's assertion does not apply to `B` nor `&'b _` - pt = Pt("pt", &c_long, &c_shortest); - //[ast]~^ ERROR `c_shortest` does not live long enough - pr = Pr("pr", &c_long, &c_shortest); - //[ast]~^ ERROR `c_shortest` does not live long enough - - // No error: St and Sr have no destructor. - st = St("st", &c_shortest); - sr = Sr("sr", &c_shortest); - - println!("{:?}", (dt.0, dr.0, pt.0, pr.0, st.0, sr.0)); - use_imm(sr.1); use_imm(st.1); use_imm(pr.1); use_imm(pt.1); use_imm(dr.1); use_imm(dt.1); + + // We use separate blocks with separate variable to prevent the error + // messages from being deduplicated. + + { + let c_long; + let (mut dt, mut dr): (Dt<_>, Dr<_>); + c_long = Cell::new(1); + + // No error: sufficiently long-lived state can be referenced in dtors + dt = Dt("dt", &c_long); + dr = Dr("dr", &c_long); + } + + { + let (c, mut dt, mut dr): (Cell<_>, Dt<_>, Dr<_>); + c = Cell::new(1); + + // No Error: destructor order precisely modelled + dt = Dt("dt", &c); + dr = Dr("dr", &c); + } + + { + let (mut dt, mut dr, c_shortest): (Dt<_>, Dr<_>, Cell<_>); + c_shortest = Cell::new(1); + + // Error: `c_shortest` dies too soon for the references in dtors to be valid. + dt = Dt("dt", &c_shortest); + //~^ ERROR `c_shortest` does not live long enough + dr = Dr("dr", &c_shortest); + } + + { + let c_long; + let (mut pt, mut pr, c_shortest): (Pt<_, _>, Pr<_>, Cell<_>); + c_long = Cell::new(1); + c_shortest = Cell::new(1); + + // No error: Drop impl asserts .1 (A and &'a _) are not accessed + pt = Pt("pt", &c_shortest, &c_long); + pr = Pr("pr", &c_shortest, &c_long); + } + + { + let c_long; + let (mut pt, mut pr, c_shortest): (Pt<_, _>, Pr<_>, Cell<_>); + c_long = Cell::new(1); + c_shortest = Cell::new(1); + // Error: Drop impl's assertion does not apply to `B` nor `&'b _` + pt = Pt("pt", &c_long, &c_shortest); + //~^ ERROR `c_shortest` does not live long enough + pr = Pr("pr", &c_long, &c_shortest); + } + + { + let (st, sr, c_shortest): (St<_>, Sr<_>, Cell<_>); + c_shortest = Cell::new(1); + // No error: St and Sr have no destructor. + st = St("st", &c_shortest); + sr = Sr("sr", &c_shortest); + } } fn use_imm(_: &T) { } diff --git a/src/test/ui/dropck/dropck-eyepatch-reorder.stderr b/src/test/ui/dropck/dropck-eyepatch-reorder.stderr new file mode 100644 index 0000000000..5055cdd8b2 --- /dev/null +++ b/src/test/ui/dropck/dropck-eyepatch-reorder.stderr @@ -0,0 +1,31 @@ +error[E0597]: `c_shortest` does not live long enough + --> $DIR/dropck-eyepatch-reorder.rs:64:23 + | +LL | dt = Dt("dt", &c_shortest); + | ^^^^^^^^^^^ borrowed value does not live long enough +... +LL | } + | - + | | + | `c_shortest` dropped here while still borrowed + | borrow might be used here, when `dt` is dropped and runs the `Drop` code for type `Dt` + | + = note: values in a scope are dropped in the opposite order they are defined + +error[E0597]: `c_shortest` does not live long enough + --> $DIR/dropck-eyepatch-reorder.rs:86:32 + | +LL | pt = Pt("pt", &c_long, &c_shortest); + | ^^^^^^^^^^^ borrowed value does not live long enough +... +LL | } + | - + | | + | `c_shortest` dropped here while still borrowed + | borrow might be used here, when `pt` is dropped and runs the `Drop` code for type `Pt` + | + = note: values in a scope are dropped in the opposite order they are defined + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/dropck/dropck-eyepatch.ast.stderr b/src/test/ui/dropck/dropck-eyepatch.ast.stderr deleted file mode 100644 index 0952ed0d6b..0000000000 --- a/src/test/ui/dropck/dropck-eyepatch.ast.stderr +++ /dev/null @@ -1,69 +0,0 @@ -error[E0597]: `c` does not live long enough - --> $DIR/dropck-eyepatch.rs:81:20 - | -LL | dt = Dt("dt", &c); - | ^ borrowed value does not live long enough -... -LL | } - | - `c` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c` does not live long enough - --> $DIR/dropck-eyepatch.rs:83:20 - | -LL | dr = Dr("dr", &c); - | ^ borrowed value does not live long enough -... -LL | } - | - `c` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c_shortest` does not live long enough - --> $DIR/dropck-eyepatch.rs:87:20 - | -LL | dt = Dt("dt", &c_shortest); - | ^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - `c_shortest` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c_shortest` does not live long enough - --> $DIR/dropck-eyepatch.rs:90:20 - | -LL | dr = Dr("dr", &c_shortest); - | ^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - `c_shortest` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c_shortest` does not live long enough - --> $DIR/dropck-eyepatch.rs:98:29 - | -LL | pt = Pt("pt", &c_long, &c_shortest); - | ^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - `c_shortest` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c_shortest` does not live long enough - --> $DIR/dropck-eyepatch.rs:100:29 - | -LL | pr = Pr("pr", &c_long, &c_shortest); - | ^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - `c_shortest` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error: aborting due to 6 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/dropck/dropck-eyepatch.nll.stderr b/src/test/ui/dropck/dropck-eyepatch.nll.stderr deleted file mode 100644 index 4a6e42ef94..0000000000 --- a/src/test/ui/dropck/dropck-eyepatch.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0597]: `c_shortest` does not live long enough - --> $DIR/dropck-eyepatch.rs:87:19 - | -LL | dt = Dt("dt", &c_shortest); - | ^^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `c_shortest` dropped here while still borrowed - | borrow might be used here, when `dt` is dropped and runs the `Drop` code for type `Dt` - | - = note: values in a scope are dropped in the opposite order they are defined - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/dropck/dropck-eyepatch.rs b/src/test/ui/dropck/dropck-eyepatch.rs index fb1c03b678..ec1c685613 100644 --- a/src/test/ui/dropck/dropck-eyepatch.rs +++ b/src/test/ui/dropck/dropck-eyepatch.rs @@ -1,14 +1,4 @@ -// The behavior of AST-borrowck and NLL explcitly differ here due to -// NLL's increased precision; so we use revisions and do not worry -// about the --compare-mode=nll on this test. - -// revisions: ast nll -//[ast]compile-flags: -Z borrowck=ast -//[nll]compile-flags: -Z borrowck=migrate -Z two-phase-borrows - -// ignore-compare-mode-nll - -#![feature(dropck_eyepatch, rustc_attrs)] +#![feature(dropck_eyepatch)] // The point of this test is to illustrate that the `#[may_dangle]` // attribute specifically allows, in the context of a type @@ -64,48 +54,70 @@ unsafe impl<#[may_dangle] 'a, 'b, B: fmt::Debug> Drop for Pr<'a, 'b, B> { fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); } } -fn main() { #![rustc_error] // rust-lang/rust#49855 + +fn main() { use std::cell::Cell; - let c_long; - let (c, mut dt, mut dr, mut pt, mut pr, st, sr, c_shortest) - : (Cell<_>, Dt<_>, Dr<_>, Pt<_, _>, Pr<_>, St<_>, Sr<_>, Cell<_>); - c_long = Cell::new(1); - c = Cell::new(1); - c_shortest = Cell::new(1); - - // No error: sufficiently long-lived state can be referenced in dtors - dt = Dt("dt", &c_long); - dr = Dr("dr", &c_long); - - // Error: destructor order imprecisely modelled - dt = Dt("dt", &c); - //[ast]~^ ERROR `c` does not live long enough - dr = Dr("dr", &c); - //[ast]~^ ERROR `c` does not live long enough - - // Error: `c_shortest` dies too soon for the references in dtors to be valid. - dt = Dt("dt", &c_shortest); - //[ast]~^ ERROR `c_shortest` does not live long enough - //[nll]~^^ ERROR `c_shortest` does not live long enough - dr = Dr("dr", &c_shortest); - //[ast]~^ ERROR `c_shortest` does not live long enough - - // No error: Drop impl asserts .1 (A and &'a _) are not accessed - pt = Pt("pt", &c_shortest, &c_long); - pr = Pr("pr", &c_shortest, &c_long); - - // Error: Drop impl's assertion does not apply to `B` nor `&'b _` - pt = Pt("pt", &c_long, &c_shortest); - //[ast]~^ ERROR `c_shortest` does not live long enough - pr = Pr("pr", &c_long, &c_shortest); - //[ast]~^ ERROR `c_shortest` does not live long enough - - // No error: St and Sr have no destructor. - st = St("st", &c_shortest); - sr = Sr("sr", &c_shortest); - - println!("{:?}", (dt.0, dr.0, pt.0, pr.0, st.0, sr.0)); - use_imm(sr.1); use_imm(st.1); use_imm(pr.1); use_imm(pt.1); use_imm(dr.1); use_imm(dt.1); -} + // We use separate blocks with separate variable to prevent the error + // messages from being deduplicated. + + { + let c_long; + let (mut dt, mut dr): (Dt<_>, Dr<_>); + c_long = Cell::new(1); + + // No error: sufficiently long-lived state can be referenced in dtors + dt = Dt("dt", &c_long); + dr = Dr("dr", &c_long); + } + + { + let (c, mut dt, mut dr): (Cell<_>, Dt<_>, Dr<_>); + c = Cell::new(1); + + // No Error: destructor order precisely modelled + dt = Dt("dt", &c); + dr = Dr("dr", &c); + } + + { + let (mut dt, mut dr, c_shortest): (Dt<_>, Dr<_>, Cell<_>); + c_shortest = Cell::new(1); + + // Error: `c_shortest` dies too soon for the references in dtors to be valid. + dt = Dt("dt", &c_shortest); + //~^ ERROR `c_shortest` does not live long enough + dr = Dr("dr", &c_shortest); + } + + { + let c_long; + let (mut pt, mut pr, c_shortest): (Pt<_, _>, Pr<_>, Cell<_>); + c_long = Cell::new(1); + c_shortest = Cell::new(1); + + // No error: Drop impl asserts .1 (A and &'a _) are not accessed + pt = Pt("pt", &c_shortest, &c_long); + pr = Pr("pr", &c_shortest, &c_long); + } + + { + let c_long; + let (mut pt, mut pr, c_shortest): (Pt<_, _>, Pr<_>, Cell<_>); + c_long = Cell::new(1); + c_shortest = Cell::new(1); + // Error: Drop impl's assertion does not apply to `B` nor `&'b _` + pt = Pt("pt", &c_long, &c_shortest); + //~^ ERROR `c_shortest` does not live long enough + pr = Pr("pr", &c_long, &c_shortest); + } + + { + let (st, sr, c_shortest): (St<_>, Sr<_>, Cell<_>); + c_shortest = Cell::new(1); + // No error: St and Sr have no destructor. + st = St("st", &c_shortest); + sr = Sr("sr", &c_shortest); + } +} fn use_imm(_: &T) { } diff --git a/src/test/ui/dropck/dropck-eyepatch.stderr b/src/test/ui/dropck/dropck-eyepatch.stderr new file mode 100644 index 0000000000..21295e6c60 --- /dev/null +++ b/src/test/ui/dropck/dropck-eyepatch.stderr @@ -0,0 +1,31 @@ +error[E0597]: `c_shortest` does not live long enough + --> $DIR/dropck-eyepatch.rs:88:23 + | +LL | dt = Dt("dt", &c_shortest); + | ^^^^^^^^^^^ borrowed value does not live long enough +... +LL | } + | - + | | + | `c_shortest` dropped here while still borrowed + | borrow might be used here, when `dt` is dropped and runs the `Drop` code for type `Dt` + | + = note: values in a scope are dropped in the opposite order they are defined + +error[E0597]: `c_shortest` does not live long enough + --> $DIR/dropck-eyepatch.rs:110:32 + | +LL | pt = Pt("pt", &c_long, &c_shortest); + | ^^^^^^^^^^^ borrowed value does not live long enough +... +LL | } + | - + | | + | `c_shortest` dropped here while still borrowed + | borrow might be used here, when `pt` is dropped and runs the `Drop` code for type `Pt` + | + = note: values in a scope are dropped in the opposite order they are defined + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/dropck/dropck-union.nll.stderr b/src/test/ui/dropck/dropck-union.nll.stderr deleted file mode 100644 index 228744326f..0000000000 --- a/src/test/ui/dropck/dropck-union.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0597]: `v` does not live long enough - --> $DIR/dropck-union.rs:39:18 - | -LL | v.0.set(Some(&v)); - | ^^ borrowed value does not live long enough -LL | } - | - - | | - | `v` dropped here while still borrowed - | borrow might be used here, when `v` is dropped and runs the `Drop` code for type `Wrap` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/dropck/dropck-union.stderr b/src/test/ui/dropck/dropck-union.stderr index 4f6cd87244..228744326f 100644 --- a/src/test/ui/dropck/dropck-union.stderr +++ b/src/test/ui/dropck/dropck-union.stderr @@ -1,12 +1,13 @@ error[E0597]: `v` does not live long enough - --> $DIR/dropck-union.rs:39:19 + --> $DIR/dropck-union.rs:39:18 | LL | v.0.set(Some(&v)); - | ^ borrowed value does not live long enough + | ^^ borrowed value does not live long enough LL | } - | - `v` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + | - + | | + | `v` dropped here while still borrowed + | borrow might be used here, when `v` is dropped and runs the `Drop` code for type `Wrap` error: aborting due to previous error diff --git a/src/test/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr b/src/test/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr index 9bf324412c..6e20dbaedd 100644 --- a/src/test/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr +++ b/src/test/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr @@ -16,4 +16,3 @@ LL | FingerTree::Single(1); error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0320`. diff --git a/src/test/ui/dropck/dropck_no_diverge_on_nonregular_2.stderr b/src/test/ui/dropck/dropck_no_diverge_on_nonregular_2.stderr index 0a74377ea9..db652aea06 100644 --- a/src/test/ui/dropck/dropck_no_diverge_on_nonregular_2.stderr +++ b/src/test/ui/dropck/dropck_no_diverge_on_nonregular_2.stderr @@ -16,4 +16,3 @@ LL | FingerTree::Single(1); error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0320`. diff --git a/src/test/ui/dropck/dropck_no_diverge_on_nonregular_3.stderr b/src/test/ui/dropck/dropck_no_diverge_on_nonregular_3.stderr index d484e15751..a2425788e1 100644 --- a/src/test/ui/dropck/dropck_no_diverge_on_nonregular_3.stderr +++ b/src/test/ui/dropck/dropck_no_diverge_on_nonregular_3.stderr @@ -24,4 +24,3 @@ LL | Some(Wrapper::Simple::); error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0320`. diff --git a/src/test/ui/dropck/dropck_trait_cycle_checked.nll.stderr b/src/test/ui/dropck/dropck_trait_cycle_checked.nll.stderr deleted file mode 100644 index 8c669b597c..0000000000 --- a/src/test/ui/dropck/dropck_trait_cycle_checked.nll.stderr +++ /dev/null @@ -1,73 +0,0 @@ -error[E0597]: `o2` does not live long enough - --> $DIR/dropck_trait_cycle_checked.rs:111:13 - | -LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); - | -------- cast requires that `o2` is borrowed for `'static` -LL | o1.set0(&o2); - | ^^^ borrowed value does not live long enough -... -LL | } - | - `o2` dropped here while still borrowed - -error[E0597]: `o3` does not live long enough - --> $DIR/dropck_trait_cycle_checked.rs:112:13 - | -LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); - | -------- cast requires that `o3` is borrowed for `'static` -LL | o1.set0(&o2); -LL | o1.set1(&o3); - | ^^^ borrowed value does not live long enough -... -LL | } - | - `o3` dropped here while still borrowed - -error[E0597]: `o2` does not live long enough - --> $DIR/dropck_trait_cycle_checked.rs:113:13 - | -LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); - | -------- cast requires that `o2` is borrowed for `'static` -... -LL | o2.set0(&o2); - | ^^^ borrowed value does not live long enough -... -LL | } - | - `o2` dropped here while still borrowed - -error[E0597]: `o3` does not live long enough - --> $DIR/dropck_trait_cycle_checked.rs:114:13 - | -LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); - | -------- cast requires that `o3` is borrowed for `'static` -... -LL | o2.set1(&o3); - | ^^^ borrowed value does not live long enough -... -LL | } - | - `o3` dropped here while still borrowed - -error[E0597]: `o1` does not live long enough - --> $DIR/dropck_trait_cycle_checked.rs:115:13 - | -LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); - | -------- cast requires that `o1` is borrowed for `'static` -... -LL | o3.set0(&o1); - | ^^^ borrowed value does not live long enough -LL | o3.set1(&o2); -LL | } - | - `o1` dropped here while still borrowed - -error[E0597]: `o2` does not live long enough - --> $DIR/dropck_trait_cycle_checked.rs:116:13 - | -LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); - | -------- cast requires that `o2` is borrowed for `'static` -... -LL | o3.set1(&o2); - | ^^^ borrowed value does not live long enough -LL | } - | - `o2` dropped here while still borrowed - -error: aborting due to 6 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/dropck/dropck_trait_cycle_checked.stderr b/src/test/ui/dropck/dropck_trait_cycle_checked.stderr index 792ef46f24..8c669b597c 100644 --- a/src/test/ui/dropck/dropck_trait_cycle_checked.stderr +++ b/src/test/ui/dropck/dropck_trait_cycle_checked.stderr @@ -1,67 +1,72 @@ error[E0597]: `o2` does not live long enough - --> $DIR/dropck_trait_cycle_checked.rs:111:14 + --> $DIR/dropck_trait_cycle_checked.rs:111:13 | +LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); + | -------- cast requires that `o2` is borrowed for `'static` LL | o1.set0(&o2); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough ... LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - `o2` dropped here while still borrowed error[E0597]: `o3` does not live long enough - --> $DIR/dropck_trait_cycle_checked.rs:112:14 + --> $DIR/dropck_trait_cycle_checked.rs:112:13 | +LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); + | -------- cast requires that `o3` is borrowed for `'static` +LL | o1.set0(&o2); LL | o1.set1(&o3); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough ... LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - `o3` dropped here while still borrowed error[E0597]: `o2` does not live long enough - --> $DIR/dropck_trait_cycle_checked.rs:113:14 + --> $DIR/dropck_trait_cycle_checked.rs:113:13 | +LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); + | -------- cast requires that `o2` is borrowed for `'static` +... LL | o2.set0(&o2); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough ... LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - `o2` dropped here while still borrowed error[E0597]: `o3` does not live long enough - --> $DIR/dropck_trait_cycle_checked.rs:114:14 + --> $DIR/dropck_trait_cycle_checked.rs:114:13 | +LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); + | -------- cast requires that `o3` is borrowed for `'static` +... LL | o2.set1(&o3); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough ... LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - `o3` dropped here while still borrowed error[E0597]: `o1` does not live long enough - --> $DIR/dropck_trait_cycle_checked.rs:115:14 + --> $DIR/dropck_trait_cycle_checked.rs:115:13 | +LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); + | -------- cast requires that `o1` is borrowed for `'static` +... LL | o3.set0(&o1); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough LL | o3.set1(&o2); LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - `o1` dropped here while still borrowed error[E0597]: `o2` does not live long enough - --> $DIR/dropck_trait_cycle_checked.rs:116:14 + --> $DIR/dropck_trait_cycle_checked.rs:116:13 | +LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); + | -------- cast requires that `o2` is borrowed for `'static` +... LL | o3.set1(&o2); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - `o2` dropped here while still borrowed error: aborting due to 6 previous errors diff --git a/src/test/ui/dst/dst-bad-assign-3.stderr b/src/test/ui/dst/dst-bad-assign-3.stderr index 0c4f866131..8c80ec7aac 100644 --- a/src/test/ui/dst/dst-bad-assign-3.stderr +++ b/src/test/ui/dst/dst-bad-assign-3.stderr @@ -19,5 +19,5 @@ LL | f5.2 = Bar1 {f: 36}; error: aborting due to 2 previous errors -Some errors occurred: E0277, E0308. +Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/dst/dst-bad-assign.stderr b/src/test/ui/dst/dst-bad-assign.stderr index a60d9d66f3..849b1a62a4 100644 --- a/src/test/ui/dst/dst-bad-assign.stderr +++ b/src/test/ui/dst/dst-bad-assign.stderr @@ -19,5 +19,5 @@ LL | f5.ptr = Bar1 {f: 36}; error: aborting due to 2 previous errors -Some errors occurred: E0277, E0308. +Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/dst/dst-bad-coerce1.stderr b/src/test/ui/dst/dst-bad-coerce1.stderr index 34b2d6d3d8..3776ce71c6 100644 --- a/src/test/ui/dst/dst-bad-coerce1.stderr +++ b/src/test/ui/dst/dst-bad-coerce1.stderr @@ -34,5 +34,5 @@ LL | let f3: &(Bar,) = f2; error: aborting due to 4 previous errors -Some errors occurred: E0277, E0308. +Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/dst/dst-bad-coerce3.nll.stderr b/src/test/ui/dst/dst-bad-coerce3.nll.stderr deleted file mode 100644 index 289d451f02..0000000000 --- a/src/test/ui/dst/dst-bad-coerce3.nll.stderr +++ /dev/null @@ -1,58 +0,0 @@ -error[E0597]: `f1` does not live long enough - --> $DIR/dst-bad-coerce3.rs:16:32 - | -LL | fn baz<'a>() { - | -- lifetime `'a` defined here -... -LL | let f2: &Fat<[isize; 3]> = &f1; - | ^^^ borrowed value does not live long enough -LL | let f3: &'a Fat<[isize]> = f2; - | ---------------- type annotation requires that `f1` is borrowed for `'a` -... -LL | } - | - `f1` dropped here while still borrowed - -error[E0597]: `f1` does not live long enough - --> $DIR/dst-bad-coerce3.rs:21:25 - | -LL | fn baz<'a>() { - | -- lifetime `'a` defined here -... -LL | let f2: &Fat = &f1; - | ^^^ borrowed value does not live long enough -LL | let f3: &'a Fat = f2; - | ------------ type annotation requires that `f1` is borrowed for `'a` -... -LL | } - | - `f1` dropped here while still borrowed - -error[E0597]: `f1` does not live long enough - --> $DIR/dst-bad-coerce3.rs:26:30 - | -LL | fn baz<'a>() { - | -- lifetime `'a` defined here -... -LL | let f2: &([isize; 3],) = &f1; - | ^^^ borrowed value does not live long enough -LL | let f3: &'a ([isize],) = f2; - | -------------- type annotation requires that `f1` is borrowed for `'a` -... -LL | } - | - `f1` dropped here while still borrowed - -error[E0597]: `f1` does not live long enough - --> $DIR/dst-bad-coerce3.rs:31:23 - | -LL | fn baz<'a>() { - | -- lifetime `'a` defined here -... -LL | let f2: &(Foo,) = &f1; - | ^^^ borrowed value does not live long enough -LL | let f3: &'a (Bar,) = f2; - | ---------- type annotation requires that `f1` is borrowed for `'a` -LL | } - | - `f1` dropped here while still borrowed - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/dst/dst-bad-coerce3.stderr b/src/test/ui/dst/dst-bad-coerce3.stderr index 61473269e5..289d451f02 100644 --- a/src/test/ui/dst/dst-bad-coerce3.stderr +++ b/src/test/ui/dst/dst-bad-coerce3.stderr @@ -1,62 +1,57 @@ error[E0597]: `f1` does not live long enough - --> $DIR/dst-bad-coerce3.rs:16:33 + --> $DIR/dst-bad-coerce3.rs:16:32 | +LL | fn baz<'a>() { + | -- lifetime `'a` defined here +... LL | let f2: &Fat<[isize; 3]> = &f1; - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough +LL | let f3: &'a Fat<[isize]> = f2; + | ---------------- type annotation requires that `f1` is borrowed for `'a` ... LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:8... - --> $DIR/dst-bad-coerce3.rs:13:8 - | -LL | fn baz<'a>() { - | ^^ + | - `f1` dropped here while still borrowed error[E0597]: `f1` does not live long enough - --> $DIR/dst-bad-coerce3.rs:21:26 + --> $DIR/dst-bad-coerce3.rs:21:25 | +LL | fn baz<'a>() { + | -- lifetime `'a` defined here +... LL | let f2: &Fat = &f1; - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough +LL | let f3: &'a Fat = f2; + | ------------ type annotation requires that `f1` is borrowed for `'a` ... LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:8... - --> $DIR/dst-bad-coerce3.rs:13:8 - | -LL | fn baz<'a>() { - | ^^ + | - `f1` dropped here while still borrowed error[E0597]: `f1` does not live long enough - --> $DIR/dst-bad-coerce3.rs:26:31 + --> $DIR/dst-bad-coerce3.rs:26:30 | +LL | fn baz<'a>() { + | -- lifetime `'a` defined here +... LL | let f2: &([isize; 3],) = &f1; - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough +LL | let f3: &'a ([isize],) = f2; + | -------------- type annotation requires that `f1` is borrowed for `'a` ... LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:8... - --> $DIR/dst-bad-coerce3.rs:13:8 - | -LL | fn baz<'a>() { - | ^^ + | - `f1` dropped here while still borrowed error[E0597]: `f1` does not live long enough - --> $DIR/dst-bad-coerce3.rs:31:24 + --> $DIR/dst-bad-coerce3.rs:31:23 | +LL | fn baz<'a>() { + | -- lifetime `'a` defined here +... LL | let f2: &(Foo,) = &f1; - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough LL | let f3: &'a (Bar,) = f2; + | ---------- type annotation requires that `f1` is borrowed for `'a` LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:8... - --> $DIR/dst-bad-coerce3.rs:13:8 - | -LL | fn baz<'a>() { - | ^^ + | - `f1` dropped here while still borrowed error: aborting due to 4 previous errors diff --git a/src/test/ui/dst/dst-index.nll.stderr b/src/test/ui/dst/dst-index.nll.stderr deleted file mode 100644 index 92e3d2b684..0000000000 --- a/src/test/ui/dst/dst-index.nll.stderr +++ /dev/null @@ -1,28 +0,0 @@ -error[E0161]: cannot move a value of type str: the size of str cannot be statically determined - --> $DIR/dst-index.rs:31:5 - | -LL | S[0]; - | ^^^^ - -error[E0161]: cannot move a value of type dyn std::fmt::Debug: the size of dyn std::fmt::Debug cannot be statically determined - --> $DIR/dst-index.rs:34:5 - | -LL | T[0]; - | ^^^^ - -error[E0507]: cannot move out of borrowed content - --> $DIR/dst-index.rs:31:5 - | -LL | S[0]; - | ^^^^ cannot move out of borrowed content - -error[E0507]: cannot move out of borrowed content - --> $DIR/dst-index.rs:34:5 - | -LL | T[0]; - | ^^^^ cannot move out of borrowed content - -error: aborting due to 4 previous errors - -Some errors occurred: E0161, E0507. -For more information about an error, try `rustc --explain E0161`. diff --git a/src/test/ui/dst/dst-index.rs b/src/test/ui/dst/dst-index.rs index 663c704ff3..71ff067bbd 100644 --- a/src/test/ui/dst/dst-index.rs +++ b/src/test/ui/dst/dst-index.rs @@ -29,9 +29,9 @@ impl Index for T { fn main() { S[0]; - //~^ ERROR cannot move out of indexed content + //~^ ERROR cannot move out of borrowed content //~^^ ERROR E0161 T[0]; - //~^ ERROR cannot move out of indexed content + //~^ ERROR cannot move out of borrowed content //~^^ ERROR E0161 } diff --git a/src/test/ui/dst/dst-index.stderr b/src/test/ui/dst/dst-index.stderr index 05993f50fa..ec09a93a4a 100644 --- a/src/test/ui/dst/dst-index.stderr +++ b/src/test/ui/dst/dst-index.stderr @@ -4,25 +4,25 @@ error[E0161]: cannot move a value of type str: the size of str cannot be statica LL | S[0]; | ^^^^ -error[E0161]: cannot move a value of type (dyn std::fmt::Debug + 'static): the size of (dyn std::fmt::Debug + 'static) cannot be statically determined +error[E0161]: cannot move a value of type dyn std::fmt::Debug: the size of dyn std::fmt::Debug cannot be statically determined --> $DIR/dst-index.rs:34:5 | LL | T[0]; | ^^^^ -error[E0507]: cannot move out of indexed content +error[E0507]: cannot move out of borrowed content --> $DIR/dst-index.rs:31:5 | LL | S[0]; - | ^^^^ cannot move out of indexed content + | ^^^^ cannot move out of borrowed content -error[E0507]: cannot move out of indexed content +error[E0507]: cannot move out of borrowed content --> $DIR/dst-index.rs:34:5 | LL | T[0]; - | ^^^^ cannot move out of indexed content + | ^^^^ cannot move out of borrowed content error: aborting due to 4 previous errors -Some errors occurred: E0161, E0507. +Some errors have detailed explanations: E0161, E0507. For more information about an error, try `rustc --explain E0161`. diff --git a/src/test/ui/dst/dst-rvalue.nll.stderr b/src/test/ui/dst/dst-rvalue.nll.stderr deleted file mode 100644 index d0d8f79395..0000000000 --- a/src/test/ui/dst/dst-rvalue.nll.stderr +++ /dev/null @@ -1,28 +0,0 @@ -error[E0161]: cannot move a value of type str: the size of str cannot be statically determined - --> $DIR/dst-rvalue.rs:6:28 - | -LL | let _x: Box = box *"hello world"; - | ^^^^^^^^^^^^^^ - -error[E0161]: cannot move a value of type [isize]: the size of [isize] cannot be statically determined - --> $DIR/dst-rvalue.rs:11:32 - | -LL | let _x: Box<[isize]> = box *array; - | ^^^^^^ - -error[E0507]: cannot move out of borrowed content - --> $DIR/dst-rvalue.rs:6:28 - | -LL | let _x: Box = box *"hello world"; - | ^^^^^^^^^^^^^^ cannot move out of borrowed content - -error[E0508]: cannot move out of type `[isize]`, a non-copy slice - --> $DIR/dst-rvalue.rs:11:32 - | -LL | let _x: Box<[isize]> = box *array; - | ^^^^^^ cannot move out of here - -error: aborting due to 4 previous errors - -Some errors occurred: E0161, E0507, E0508. -For more information about an error, try `rustc --explain E0161`. diff --git a/src/test/ui/dst/dst-rvalue.rs b/src/test/ui/dst/dst-rvalue.rs index 86747dad00..5115bee836 100644 --- a/src/test/ui/dst/dst-rvalue.rs +++ b/src/test/ui/dst/dst-rvalue.rs @@ -10,5 +10,5 @@ pub fn main() { let array: &[isize] = &[1, 2, 3]; let _x: Box<[isize]> = box *array; //~^ ERROR E0161 - //~^^ ERROR cannot move out of borrowed content + //~^^ ERROR cannot move out of type `[isize]`, a non-copy slice } diff --git a/src/test/ui/dst/dst-rvalue.stderr b/src/test/ui/dst/dst-rvalue.stderr index 2c92f5dcbf..7ef8e4dc72 100644 --- a/src/test/ui/dst/dst-rvalue.stderr +++ b/src/test/ui/dst/dst-rvalue.stderr @@ -16,13 +16,13 @@ error[E0507]: cannot move out of borrowed content LL | let _x: Box = box *"hello world"; | ^^^^^^^^^^^^^^ cannot move out of borrowed content -error[E0507]: cannot move out of borrowed content +error[E0508]: cannot move out of type `[isize]`, a non-copy slice --> $DIR/dst-rvalue.rs:11:32 | LL | let _x: Box<[isize]> = box *array; - | ^^^^^^ cannot move out of borrowed content + | ^^^^^^ cannot move out of here error: aborting due to 4 previous errors -Some errors occurred: E0161, E0507. +Some errors have detailed explanations: E0161, E0507, E0508. For more information about an error, try `rustc --explain E0161`. diff --git a/src/test/ui/duplicate/dupe-symbols-7.rs b/src/test/ui/duplicate/dupe-symbols-7.rs index b28f1a40fe..b838aaa102 100644 --- a/src/test/ui/duplicate/dupe-symbols-7.rs +++ b/src/test/ui/duplicate/dupe-symbols-7.rs @@ -1,5 +1,9 @@ // // error-pattern: entry symbol `main` defined multiple times + +// FIXME https://github.com/rust-lang/rust/issues/59774 +// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> "" +// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" #![allow(warnings)] #[no_mangle] diff --git a/src/test/ui/duplicate/dupe-symbols-7.stderr b/src/test/ui/duplicate/dupe-symbols-7.stderr index a1dbbb0c68..7d033ec3d8 100644 --- a/src/test/ui/duplicate/dupe-symbols-7.stderr +++ b/src/test/ui/duplicate/dupe-symbols-7.stderr @@ -1,5 +1,5 @@ error: entry symbol `main` defined multiple times - --> $DIR/dupe-symbols-7.rs:6:1 + --> $DIR/dupe-symbols-7.rs:10:1 | LL | fn main(){} | ^^^^^^^^^^^ diff --git a/src/test/ui/duplicate/duplicate-type-parameter.stderr b/src/test/ui/duplicate/duplicate-type-parameter.stderr index 17d48edc35..8606479ff6 100644 --- a/src/test/ui/duplicate/duplicate-type-parameter.stderr +++ b/src/test/ui/duplicate/duplicate-type-parameter.stderr @@ -62,5 +62,5 @@ LL | impl Qux for Option {} error: aborting due to 8 previous errors -Some errors occurred: E0207, E0403. +Some errors have detailed explanations: E0207, E0403. For more information about an error, try `rustc --explain E0207`. diff --git a/src/test/ui/dyn-trait-compatibility.stderr b/src/test/ui/dyn-trait-compatibility.stderr index aef785a75b..7210a11f35 100644 --- a/src/test/ui/dyn-trait-compatibility.stderr +++ b/src/test/ui/dyn-trait-compatibility.stderr @@ -48,5 +48,5 @@ LL | type A3 = dyn<::dyn>; error: aborting due to 8 previous errors -Some errors occurred: E0412, E0433. +Some errors have detailed explanations: E0412, E0433. For more information about an error, try `rustc --explain E0412`. diff --git a/src/test/ui/e0119/complex-impl.stderr b/src/test/ui/e0119/complex-impl.stderr index f211530dcf..7ed89a5b1a 100644 --- a/src/test/ui/e0119/complex-impl.stderr +++ b/src/test/ui/e0119/complex-impl.stderr @@ -18,5 +18,5 @@ LL | impl External for (Q, R) {} error: aborting due to 2 previous errors -Some errors occurred: E0119, E0210. +Some errors have detailed explanations: E0119, E0210. For more information about an error, try `rustc --explain E0119`. diff --git a/src/test/ui/e0119/conflict-with-std.rs b/src/test/ui/e0119/conflict-with-std.rs index 6dc81f33df..c9db2bab18 100644 --- a/src/test/ui/e0119/conflict-with-std.rs +++ b/src/test/ui/e0119/conflict-with-std.rs @@ -1,4 +1,3 @@ - use std::marker::PhantomData; use std::convert::{TryFrom, AsRef}; diff --git a/src/test/ui/e0119/conflict-with-std.stderr b/src/test/ui/e0119/conflict-with-std.stderr index 8c12b3d0bb..3e0c71e907 100644 --- a/src/test/ui/e0119/conflict-with-std.stderr +++ b/src/test/ui/e0119/conflict-with-std.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `std::convert::AsRef` for type `std::boxed::Box`: - --> $DIR/conflict-with-std.rs:6:1 + --> $DIR/conflict-with-std.rs:5:1 | LL | impl AsRef for Box { | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -9,7 +9,7 @@ LL | impl AsRef for Box { where T: ?Sized; error[E0119]: conflicting implementations of trait `std::convert::From` for type `S`: - --> $DIR/conflict-with-std.rs:13:1 + --> $DIR/conflict-with-std.rs:12:1 | LL | impl From for S { | ^^^^^^^^^^^^^^^^^^ @@ -18,7 +18,7 @@ LL | impl From for S { - impl std::convert::From for T; error[E0119]: conflicting implementations of trait `std::convert::TryFrom` for type `X`: - --> $DIR/conflict-with-std.rs:20:1 + --> $DIR/conflict-with-std.rs:19:1 | LL | impl TryFrom for X { | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/e0119/issue-28981.stderr b/src/test/ui/e0119/issue-28981.stderr index e1e07190d8..70c83e1412 100644 --- a/src/test/ui/e0119/issue-28981.stderr +++ b/src/test/ui/e0119/issue-28981.stderr @@ -18,5 +18,5 @@ LL | impl Deref for Foo { } error: aborting due to 2 previous errors -Some errors occurred: E0119, E0210. +Some errors have detailed explanations: E0119, E0210. For more information about an error, try `rustc --explain E0119`. diff --git a/src/test/ui/editions/edition-deny-async-fns-2015.rs b/src/test/ui/editions/edition-deny-async-fns-2015.rs index 2105aa5835..e1111f9e0e 100644 --- a/src/test/ui/editions/edition-deny-async-fns-2015.rs +++ b/src/test/ui/editions/edition-deny-async-fns-2015.rs @@ -1,6 +1,6 @@ // edition:2015 -#![feature(futures_api, async_await)] +#![feature(async_await)] async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition diff --git a/src/test/ui/editions/edition-deny-async-fns-2015.stderr b/src/test/ui/editions/edition-deny-async-fns-2015.stderr index 83c8dbc747..05a06124dc 100644 --- a/src/test/ui/editions/edition-deny-async-fns-2015.stderr +++ b/src/test/ui/editions/edition-deny-async-fns-2015.stderr @@ -54,5 +54,4 @@ LL | async fn foo() {} error: aborting due to 9 previous errors -Some errors occurred: E0670, E0706. -For more information about an error, try `rustc --explain E0670`. +For more information about this error, try `rustc --explain E0670`. diff --git a/src/test/ui/editions/edition-raw-pointer-method-2015.rs b/src/test/ui/editions/edition-raw-pointer-method-2015.rs index a538bca75f..3631415fc5 100644 --- a/src/test/ui/editions/edition-raw-pointer-method-2015.rs +++ b/src/test/ui/editions/edition-raw-pointer-method-2015.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // edition:2015 // tests that editions work with the tyvar warning-turned-error diff --git a/src/test/ui/editions/edition-raw-pointer-method-2015.stderr b/src/test/ui/editions/edition-raw-pointer-method-2015.stderr index deea6a71b2..508d5df2a7 100644 --- a/src/test/ui/editions/edition-raw-pointer-method-2015.stderr +++ b/src/test/ui/editions/edition-raw-pointer-method-2015.stderr @@ -1,11 +1,11 @@ error: type annotations needed - --> $DIR/edition-raw-pointer-method-2015.rs:10:15 + --> $DIR/edition-raw-pointer-method-2015.rs:9:15 | LL | let _ = y.is_null(); | ^^^^^^^ | note: lint level defined here - --> $DIR/edition-raw-pointer-method-2015.rs:6:8 + --> $DIR/edition-raw-pointer-method-2015.rs:5:8 | LL | #[deny(warnings)] | ^^^^^^^^ diff --git a/src/test/ui/editions/edition-raw-pointer-method-2018.rs b/src/test/ui/editions/edition-raw-pointer-method-2018.rs index eabab5e473..af0b2d6bd4 100644 --- a/src/test/ui/editions/edition-raw-pointer-method-2018.rs +++ b/src/test/ui/editions/edition-raw-pointer-method-2018.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // edition:2018 // tests that editions work with the tyvar warning-turned-error diff --git a/src/test/ui/editions/edition-raw-pointer-method-2018.stderr b/src/test/ui/editions/edition-raw-pointer-method-2018.stderr index 03e7f3a944..23452495b4 100644 --- a/src/test/ui/editions/edition-raw-pointer-method-2018.stderr +++ b/src/test/ui/editions/edition-raw-pointer-method-2018.stderr @@ -1,5 +1,5 @@ error[E0699]: the type of this value must be known to call a method on a raw pointer on it - --> $DIR/edition-raw-pointer-method-2018.rs:10:15 + --> $DIR/edition-raw-pointer-method-2018.rs:9:15 | LL | let _ = y.is_null(); | ^^^^^^^ diff --git a/src/test/ui/emit-artifact-notifications.nll.stderr b/src/test/ui/emit-artifact-notifications.nll.stderr new file mode 100644 index 0000000000..347d9aeac2 --- /dev/null +++ b/src/test/ui/emit-artifact-notifications.nll.stderr @@ -0,0 +1 @@ +{"artifact":"$TEST_BUILD_DIR/emit-artifact-notifications.nll/libemit_artifact_notifications.rmeta"} diff --git a/src/test/ui/emit-artifact-notifications.rs b/src/test/ui/emit-artifact-notifications.rs new file mode 100644 index 0000000000..c2c930c8b1 --- /dev/null +++ b/src/test/ui/emit-artifact-notifications.rs @@ -0,0 +1,6 @@ +// compile-flags:--emit=metadata --error-format=json -Z emit-artifact-notifications +// compile-pass + +// A very basic test for the emission of artifact notifications in JSON output. + +fn main() {} diff --git a/src/test/ui/emit-artifact-notifications.stderr b/src/test/ui/emit-artifact-notifications.stderr new file mode 100644 index 0000000000..56c977181f --- /dev/null +++ b/src/test/ui/emit-artifact-notifications.stderr @@ -0,0 +1 @@ +{"artifact":"$TEST_BUILD_DIR/emit-artifact-notifications/libemit_artifact_notifications.rmeta"} diff --git a/src/test/ui/empty/empty-never-array.nll.stderr b/src/test/ui/empty/empty-never-array.nll.stderr new file mode 100644 index 0000000000..01ee1c3a4d --- /dev/null +++ b/src/test/ui/empty/empty-never-array.nll.stderr @@ -0,0 +1,23 @@ +error[E0005]: refutable pattern in local binding: `T(_, _)` not covered + --> $DIR/empty-never-array.rs:10:9 + | +LL | / enum Helper { +LL | | T(T, [!; 0]), +LL | | #[allow(dead_code)] +LL | | U(U), +LL | | } + | |_- `Helper` defined here +... +LL | let Helper::U(u) = Helper::T(t, []); + | ^^^^^^^^^^^^ pattern `T(_, _)` not covered + +error[E0381]: use of possibly uninitialized variable: `u` + --> $DIR/empty-never-array.rs:12:5 + | +LL | u + | ^ use of possibly uninitialized `u` + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0005, E0381. +For more information about an error, try `rustc --explain E0005`. diff --git a/src/test/ui/empty/empty-never-array.rs b/src/test/ui/empty/empty-never-array.rs index 01b99134a4..ce781da7d4 100644 --- a/src/test/ui/empty/empty-never-array.rs +++ b/src/test/ui/empty/empty-never-array.rs @@ -10,6 +10,9 @@ fn transmute(t: T) -> U { let Helper::U(u) = Helper::T(t, []); //~^ ERROR refutable pattern in local binding: `T(_, _)` not covered u + //~^ WARN use of possibly uninitialized variable: `u` + //~| WARN this error has been downgraded to a warning for backwards compatibility + //~| WARN this represents potential undefined behavior in your code and this warning will } fn main() { diff --git a/src/test/ui/empty/empty-never-array.stderr b/src/test/ui/empty/empty-never-array.stderr index f1be4a6ede..6608ad763b 100644 --- a/src/test/ui/empty/empty-never-array.stderr +++ b/src/test/ui/empty/empty-never-array.stderr @@ -11,6 +11,16 @@ LL | | } LL | let Helper::U(u) = Helper::T(t, []); | ^^^^^^^^^^^^ pattern `T(_, _)` not covered +warning[E0381]: use of possibly uninitialized variable: `u` + --> $DIR/empty-never-array.rs:12:5 + | +LL | u + | ^ use of possibly uninitialized `u` + | + = warning: this error has been downgraded to a warning for backwards compatibility with previous releases + = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + error: aborting due to previous error -For more information about this error, try `rustc --explain E0005`. +Some errors have detailed explanations: E0005, E0381. +For more information about an error, try `rustc --explain E0005`. diff --git a/src/test/ui/empty/empty-struct-braces-expr.rs b/src/test/ui/empty/empty-struct-braces-expr.rs index 2f2f41ae8c..e33fcb70db 100644 --- a/src/test/ui/empty/empty-struct-braces-expr.rs +++ b/src/test/ui/empty/empty-struct-braces-expr.rs @@ -19,6 +19,8 @@ fn main() { let xe1 = XEmpty1; //~ ERROR expected value, found struct `XEmpty1` let xe1 = XEmpty1(); //~ ERROR expected function, found struct `XEmpty1` - let xe3 = XE::Empty3; //~ ERROR no variant named `Empty3` found for type - let xe3 = XE::Empty3(); //~ ERROR no variant named `Empty3` found for type + let xe3 = XE::Empty3; //~ ERROR no variant or associated item named `Empty3` found for type + let xe3 = XE::Empty3(); //~ ERROR no variant or associated item named `Empty3` found for type + + XE::Empty1 {}; //~ ERROR no variant `Empty1` in enum `empty_struct::XE` } diff --git a/src/test/ui/empty/empty-struct-braces-expr.stderr b/src/test/ui/empty/empty-struct-braces-expr.stderr index 57c8c1c85d..b9681db87b 100644 --- a/src/test/ui/empty/empty-struct-braces-expr.stderr +++ b/src/test/ui/empty/empty-struct-braces-expr.stderr @@ -46,25 +46,31 @@ LL | let xe1 = XEmpty1(); | did you mean `XEmpty1 { /* fields */ }`? | help: a unit struct with a similar name exists: `XEmpty2` -error[E0599]: no variant named `Empty3` found for type `empty_struct::XE` in the current scope +error[E0599]: no variant or associated item named `Empty3` found for type `empty_struct::XE` in the current scope --> $DIR/empty-struct-braces-expr.rs:22:19 | LL | let xe3 = XE::Empty3; | ^^^^^^ | | - | variant not found in `empty_struct::XE` - | help: did you mean: `XEmpty3` + | variant or associated item not found in `empty_struct::XE` + | help: there is a variant with a similar name: `XEmpty3` -error[E0599]: no variant named `Empty3` found for type `empty_struct::XE` in the current scope +error[E0599]: no variant or associated item named `Empty3` found for type `empty_struct::XE` in the current scope --> $DIR/empty-struct-braces-expr.rs:23:19 | LL | let xe3 = XE::Empty3(); | ^^^^^^ | | - | variant not found in `empty_struct::XE` - | help: did you mean: `XEmpty3` + | variant or associated item not found in `empty_struct::XE` + | help: there is a variant with a similar name: `XEmpty3` -error: aborting due to 8 previous errors +error: no variant `Empty1` in enum `empty_struct::XE` + --> $DIR/empty-struct-braces-expr.rs:25:9 + | +LL | XE::Empty1 {}; + | ^^^^^^ help: there is a variant with a similar name: `XEmpty3` + +error: aborting due to 9 previous errors -Some errors occurred: E0423, E0599. +Some errors have detailed explanations: E0423, E0599. For more information about an error, try `rustc --explain E0423`. diff --git a/src/test/ui/empty/empty-struct-tuple-pat.stderr b/src/test/ui/empty/empty-struct-tuple-pat.stderr index 71a8141b8d..777b9d4a4a 100644 --- a/src/test/ui/empty/empty-struct-tuple-pat.stderr +++ b/src/test/ui/empty/empty-struct-tuple-pat.stderr @@ -32,5 +32,5 @@ LL | XE::XEmpty5 => (), error: aborting due to 4 previous errors -Some errors occurred: E0530, E0532. +Some errors have detailed explanations: E0530, E0532. For more information about an error, try `rustc --explain E0530`. diff --git a/src/test/ui/enum-variant-generic-args.stderr b/src/test/ui/enum-variant-generic-args.stderr index 09b9a4eed6..97b111a5c8 100644 --- a/src/test/ui/enum-variant-generic-args.stderr +++ b/src/test/ui/enum-variant-generic-args.stderr @@ -186,5 +186,5 @@ LL | AliasFixed::<()>::SVariant::<()> { v: () }; error: aborting due to 28 previous errors -Some errors occurred: E0107, E0109, E0308. +Some errors have detailed explanations: E0107, E0109, E0308. For more information about an error, try `rustc --explain E0107`. diff --git a/src/test/ui/enum/enum-discrim-too-small2.rs b/src/test/ui/enum/enum-discrim-too-small2.rs index af60564302..85cd73d6f0 100644 --- a/src/test/ui/enum/enum-discrim-too-small2.rs +++ b/src/test/ui/enum/enum-discrim-too-small2.rs @@ -5,28 +5,28 @@ enum Ei8 { Ai8 = 23, Bi8 = -23, - Ci8 = 223, //~ ERROR literal out of range for i8 + Ci8 = 223, //~ ERROR literal out of range for `i8` } #[repr(i16)] enum Ei16 { Ai16 = 23, Bi16 = -22333, - Ci16 = 55555, //~ ERROR literal out of range for i16 + Ci16 = 55555, //~ ERROR literal out of range for `i16` } #[repr(i32)] enum Ei32 { Ai32 = 23, Bi32 = -2_000_000_000, - Ci32 = 3_000_000_000, //~ ERROR literal out of range for i32 + Ci32 = 3_000_000_000, //~ ERROR literal out of range for `i32` } #[repr(i64)] enum Ei64 { Ai64 = 23, Bi64 = -9223372036854775808, - Ci64 = 9223372036854775809, //~ ERROR literal out of range for i64 + Ci64 = 9223372036854775809, //~ ERROR literal out of range for `i64` } // u64 currently allows negative numbers, and i64 allows numbers greater than `1<<63`. This is a diff --git a/src/test/ui/enum/enum-discrim-too-small2.stderr b/src/test/ui/enum/enum-discrim-too-small2.stderr index 6340f5a856..f7220044ba 100644 --- a/src/test/ui/enum/enum-discrim-too-small2.stderr +++ b/src/test/ui/enum/enum-discrim-too-small2.stderr @@ -1,4 +1,4 @@ -error: literal out of range for i8 +error: literal out of range for `i8` --> $DIR/enum-discrim-too-small2.rs:8:11 | LL | Ci8 = 223, @@ -10,19 +10,19 @@ note: lint level defined here LL | #![deny(overflowing_literals)] | ^^^^^^^^^^^^^^^^^^^^ -error: literal out of range for i16 +error: literal out of range for `i16` --> $DIR/enum-discrim-too-small2.rs:15:12 | LL | Ci16 = 55555, | ^^^^^ -error: literal out of range for i32 +error: literal out of range for `i32` --> $DIR/enum-discrim-too-small2.rs:22:12 | LL | Ci32 = 3_000_000_000, | ^^^^^^^^^^^^^ -error: literal out of range for i64 +error: literal out of range for `i64` --> $DIR/enum-discrim-too-small2.rs:29:12 | LL | Ci64 = 9223372036854775809, diff --git a/src/test/ui/enum/enum-variant-type-2.stderr b/src/test/ui/enum/enum-variant-type-2.stderr index 7e8453c61f..65c45d9bad 100644 --- a/src/test/ui/enum/enum-variant-type-2.stderr +++ b/src/test/ui/enum/enum-variant-type-2.stderr @@ -9,4 +9,3 @@ LL | fn foo(x: Foo::Bar) {} error: aborting due to previous error -For more information about this error, try `rustc --explain E0573`. diff --git a/src/test/ui/enums-pats-not-idents.stderr b/src/test/ui/enums-pats-not-idents.stderr index 6b1e604626..3891d1eac4 100644 --- a/src/test/ui/enums-pats-not-idents.stderr +++ b/src/test/ui/enums-pats-not-idents.stderr @@ -6,4 +6,3 @@ LL | let a(1) = 13; error: aborting due to previous error -For more information about this error, try `rustc --explain E0531`. diff --git a/src/test/ui/error-codes/E0007.rs b/src/test/ui/error-codes/E0007.rs index 8fc6342002..cdda735ba4 100644 --- a/src/test/ui/error-codes/E0007.rs +++ b/src/test/ui/error-codes/E0007.rs @@ -4,6 +4,7 @@ fn main() { op_string @ Some(s) => {}, //~^ ERROR E0007 //~| ERROR E0303 + //~| ERROR E0382 None => {}, } } diff --git a/src/test/ui/error-codes/E0007.stderr b/src/test/ui/error-codes/E0007.stderr index a5d694976c..89a6298c87 100644 --- a/src/test/ui/error-codes/E0007.stderr +++ b/src/test/ui/error-codes/E0007.stderr @@ -10,7 +10,19 @@ error[E0303]: pattern bindings are not allowed after an `@` LL | op_string @ Some(s) => {}, | ^ not allowed after `@` -error: aborting due to 2 previous errors +error[E0382]: use of moved value + --> $DIR/E0007.rs:4:26 + | +LL | let x = Some("s".to_string()); + | - move occurs because `x` has type `std::option::Option`, which does not implement the `Copy` trait +LL | match x { +LL | op_string @ Some(s) => {}, + | -----------------^- + | | | + | | value used here after move + | value moved here + +error: aborting due to 3 previous errors -Some errors occurred: E0007, E0303. +Some errors have detailed explanations: E0007, E0303, E0382. For more information about an error, try `rustc --explain E0007`. diff --git a/src/test/ui/error-codes/E0008.nll.stderr b/src/test/ui/error-codes/E0008.nll.stderr deleted file mode 100644 index 2505c03a14..0000000000 --- a/src/test/ui/error-codes/E0008.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0008]: cannot bind by-move into a pattern guard - --> $DIR/E0008.rs:3:14 - | -LL | Some(s) if s.len() == 0 => {}, - | ^ moves value into pattern guard - | - = help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0008`. diff --git a/src/test/ui/error-codes/E0008.stderr b/src/test/ui/error-codes/E0008.stderr index d5c44efd66..2505c03a14 100644 --- a/src/test/ui/error-codes/E0008.stderr +++ b/src/test/ui/error-codes/E0008.stderr @@ -3,6 +3,8 @@ error[E0008]: cannot bind by-move into a pattern guard | LL | Some(s) if s.len() == 0 => {}, | ^ moves value into pattern guard + | + = help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0010-teach.stderr b/src/test/ui/error-codes/E0010-teach.stderr index 3e8467fad6..4c9d140692 100644 --- a/src/test/ui/error-codes/E0010-teach.stderr +++ b/src/test/ui/error-codes/E0010-teach.stderr @@ -17,5 +17,5 @@ LL | const CON : Box = box 0; error: aborting due to 2 previous errors -Some errors occurred: E0010, E0019. +Some errors have detailed explanations: E0010, E0019. For more information about an error, try `rustc --explain E0010`. diff --git a/src/test/ui/error-codes/E0010.stderr b/src/test/ui/error-codes/E0010.stderr index 285570f755..48472d8acd 100644 --- a/src/test/ui/error-codes/E0010.stderr +++ b/src/test/ui/error-codes/E0010.stderr @@ -12,5 +12,5 @@ LL | const CON : Box = box 0; error: aborting due to 2 previous errors -Some errors occurred: E0010, E0019. +Some errors have detailed explanations: E0010, E0019. For more information about an error, try `rustc --explain E0010`. diff --git a/src/test/ui/error-codes/E0017.nll.stderr b/src/test/ui/error-codes/E0017.nll.stderr deleted file mode 100644 index 3c2a07265f..0000000000 --- a/src/test/ui/error-codes/E0017.nll.stderr +++ /dev/null @@ -1,34 +0,0 @@ -error[E0017]: references in constants may only refer to immutable values - --> $DIR/E0017.rs:4:30 - | -LL | const CR: &'static mut i32 = &mut C; - | ^^^^^^ constants require immutable values - -error[E0017]: references in statics may only refer to immutable values - --> $DIR/E0017.rs:5:39 - | -LL | static STATIC_REF: &'static mut i32 = &mut X; - | ^^^^^^ statics require immutable values - -error: cannot mutate statics in the initializer of another static - --> $DIR/E0017.rs:5:39 - | -LL | static STATIC_REF: &'static mut i32 = &mut X; - | ^^^^^^ - -error[E0596]: cannot borrow immutable static item `X` as mutable - --> $DIR/E0017.rs:5:39 - | -LL | static STATIC_REF: &'static mut i32 = &mut X; - | ^^^^^^ cannot borrow as mutable - -error[E0017]: references in statics may only refer to immutable values - --> $DIR/E0017.rs:8:38 - | -LL | static CONST_REF: &'static mut i32 = &mut C; - | ^^^^^^ statics require immutable values - -error: aborting due to 5 previous errors - -Some errors occurred: E0017, E0596. -For more information about an error, try `rustc --explain E0017`. diff --git a/src/test/ui/error-codes/E0017.stderr b/src/test/ui/error-codes/E0017.stderr index d0bd93eb90..67ff7da611 100644 --- a/src/test/ui/error-codes/E0017.stderr +++ b/src/test/ui/error-codes/E0017.stderr @@ -16,11 +16,11 @@ error: cannot mutate statics in the initializer of another static LL | static STATIC_REF: &'static mut i32 = &mut X; | ^^^^^^ -error[E0596]: cannot borrow immutable static item as mutable - --> $DIR/E0017.rs:5:44 +error[E0596]: cannot borrow immutable static item `X` as mutable + --> $DIR/E0017.rs:5:39 | LL | static STATIC_REF: &'static mut i32 = &mut X; - | ^ + | ^^^^^^ cannot borrow as mutable error[E0017]: references in statics may only refer to immutable values --> $DIR/E0017.rs:8:38 @@ -30,5 +30,5 @@ LL | static CONST_REF: &'static mut i32 = &mut C; error: aborting due to 5 previous errors -Some errors occurred: E0017, E0596. +Some errors have detailed explanations: E0017, E0596. For more information about an error, try `rustc --explain E0017`. diff --git a/src/test/ui/error-codes/E0030-teach.rs b/src/test/ui/error-codes/E0030-teach.rs index 388064fb0f..8caa4f0931 100644 --- a/src/test/ui/error-codes/E0030-teach.rs +++ b/src/test/ui/error-codes/E0030-teach.rs @@ -4,5 +4,6 @@ fn main() { match 5u32 { 1000 ..= 5 => {} //~^ ERROR lower range bound must be less than or equal to upper + //~| ERROR lower range bound must be less than or equal to upper } } diff --git a/src/test/ui/error-codes/E0030-teach.stderr b/src/test/ui/error-codes/E0030-teach.stderr index 3f1ad4af3a..800f66416a 100644 --- a/src/test/ui/error-codes/E0030-teach.stderr +++ b/src/test/ui/error-codes/E0030-teach.stderr @@ -6,6 +6,12 @@ LL | 1000 ..= 5 => {} | = note: When matching against a range, the compiler verifies that the range is non-empty. Range patterns include both end-points, so this is equivalent to requiring the start of the range to be less than or equal to the end of the range. -error: aborting due to previous error +error[E0030]: lower range bound must be less than or equal to upper + --> $DIR/E0030-teach.rs:5:9 + | +LL | 1000 ..= 5 => {} + | ^^^^ lower bound larger than upper bound + +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0030`. diff --git a/src/test/ui/error-codes/E0033-teach.stderr b/src/test/ui/error-codes/E0033-teach.stderr index 81a8f164b9..1b78820cae 100644 --- a/src/test/ui/error-codes/E0033-teach.stderr +++ b/src/test/ui/error-codes/E0033-teach.stderr @@ -24,5 +24,5 @@ LL | let &invalid = trait_obj; error: aborting due to 3 previous errors -Some errors occurred: E0033, E0038, E0423. +Some errors have detailed explanations: E0033, E0038, E0423. For more information about an error, try `rustc --explain E0033`. diff --git a/src/test/ui/error-codes/E0033.stderr b/src/test/ui/error-codes/E0033.stderr index e250df81c1..976b0e0286 100644 --- a/src/test/ui/error-codes/E0033.stderr +++ b/src/test/ui/error-codes/E0033.stderr @@ -20,5 +20,5 @@ LL | let &invalid = trait_obj; error: aborting due to 3 previous errors -Some errors occurred: E0033, E0038, E0423. +Some errors have detailed explanations: E0033, E0038, E0423. For more information about an error, try `rustc --explain E0033`. diff --git a/src/test/ui/error-codes/E0067.stderr b/src/test/ui/error-codes/E0067.stderr index 024c8681b5..0334565840 100644 --- a/src/test/ui/error-codes/E0067.stderr +++ b/src/test/ui/error-codes/E0067.stderr @@ -16,5 +16,5 @@ LL | LinkedList::new() += 1; error: aborting due to 2 previous errors -Some errors occurred: E0067, E0368. +Some errors have detailed explanations: E0067, E0368. For more information about an error, try `rustc --explain E0067`. diff --git a/src/test/ui/error-codes/E0070.stderr b/src/test/ui/error-codes/E0070.stderr index 6592ad328b..40186137b0 100644 --- a/src/test/ui/error-codes/E0070.stderr +++ b/src/test/ui/error-codes/E0070.stderr @@ -27,5 +27,5 @@ LL | some_other_func() = 4; error: aborting due to 4 previous errors -Some errors occurred: E0070, E0308. +Some errors have detailed explanations: E0070, E0308. For more information about an error, try `rustc --explain E0070`. diff --git a/src/test/ui/error-codes/E0117.stderr b/src/test/ui/error-codes/E0117.stderr index 80b3a4e714..6c0bbc2b62 100644 --- a/src/test/ui/error-codes/E0117.stderr +++ b/src/test/ui/error-codes/E0117.stderr @@ -15,5 +15,5 @@ LL | impl Drop for u32 {} error: aborting due to 2 previous errors -Some errors occurred: E0117, E0120. +Some errors have detailed explanations: E0117, E0120. For more information about an error, try `rustc --explain E0117`. diff --git a/src/test/ui/error-codes/E0161.ast.stderr b/src/test/ui/error-codes/E0161.migrate.stderr similarity index 100% rename from src/test/ui/error-codes/E0161.ast.stderr rename to src/test/ui/error-codes/E0161.migrate.stderr diff --git a/src/test/ui/error-codes/E0161.astul.stderr b/src/test/ui/error-codes/E0161.migrateul.stderr similarity index 100% rename from src/test/ui/error-codes/E0161.astul.stderr rename to src/test/ui/error-codes/E0161.migrateul.stderr diff --git a/src/test/ui/error-codes/E0161.rs b/src/test/ui/error-codes/E0161.rs index a6d2b245eb..2ca17050ae 100644 --- a/src/test/ui/error-codes/E0161.rs +++ b/src/test/ui/error-codes/E0161.rs @@ -3,15 +3,15 @@ // Check that E0161 is a hard error in all possible configurations that might // affect it. -// revisions: ast nll zflags edition astul nllul zflagsul editionul -//[zflags]compile-flags: -Z borrowck=migrate -Z two-phase-borrows +// revisions: migrate nll zflags edition migrateul nllul zflagsul editionul +//[zflags]compile-flags: -Z borrowck=migrate //[edition]edition:2018 -//[zflagsul]compile-flags: -Z borrowck=migrate -Z two-phase-borrows +//[zflagsul]compile-flags: -Z borrowck=migrate //[editionul]edition:2018 #![cfg_attr(nll, feature(nll))] #![cfg_attr(nllul, feature(nll))] -#![cfg_attr(astul, feature(unsized_locals))] +#![cfg_attr(migrateul, feature(unsized_locals))] #![cfg_attr(zflagsul, feature(unsized_locals))] #![cfg_attr(nllul, feature(unsized_locals))] #![cfg_attr(editionul, feature(unsized_locals))] @@ -20,11 +20,11 @@ fn foo(x: Box<[i32]>) { box *x; - //[ast]~^ ERROR E0161 + //[migrate]~^ ERROR E0161 //[nll]~^^ ERROR E0161 //[zflags]~^^^ ERROR E0161 //[edition]~^^^^ ERROR E0161 - //[astul]~^^^^^ ERROR E0161 + //[migrateul]~^^^^^ ERROR E0161 //[nllul]~^^^^^^ ERROR E0161 //[zflagsul]~^^^^^^^ ERROR E0161 //[editionul]~^^^^^^^^ ERROR E0161 diff --git a/src/test/ui/error-codes/E0206.stderr b/src/test/ui/error-codes/E0206.stderr index a0c4b0149a..cd5d74854e 100644 --- a/src/test/ui/error-codes/E0206.stderr +++ b/src/test/ui/error-codes/E0206.stderr @@ -21,5 +21,5 @@ LL | impl Copy for Foo { } error: aborting due to 3 previous errors -Some errors occurred: E0117, E0206. +Some errors have detailed explanations: E0117, E0206. For more information about an error, try `rustc --explain E0117`. diff --git a/src/test/ui/error-codes/E0220.stderr b/src/test/ui/error-codes/E0220.stderr index 43949833e2..bd2205fb75 100644 --- a/src/test/ui/error-codes/E0220.stderr +++ b/src/test/ui/error-codes/E0220.stderr @@ -15,5 +15,5 @@ LL | type Foo = Trait; error: aborting due to 2 previous errors -Some errors occurred: E0191, E0220. +Some errors have detailed explanations: E0191, E0220. For more information about an error, try `rustc --explain E0191`. diff --git a/src/test/ui/error-codes/E0254.rs b/src/test/ui/error-codes/E0254.rs index 706cd347e1..d166aff565 100644 --- a/src/test/ui/error-codes/E0254.rs +++ b/src/test/ui/error-codes/E0254.rs @@ -1,4 +1,3 @@ -#![feature(alloc)] #![allow(unused_extern_crates, non_camel_case_types)] extern crate alloc; diff --git a/src/test/ui/error-codes/E0254.stderr b/src/test/ui/error-codes/E0254.stderr index c2d013da41..10456fd5a5 100644 --- a/src/test/ui/error-codes/E0254.stderr +++ b/src/test/ui/error-codes/E0254.stderr @@ -1,5 +1,5 @@ error[E0254]: the name `alloc` is defined multiple times - --> $DIR/E0254.rs:12:5 + --> $DIR/E0254.rs:11:5 | LL | extern crate alloc; | ------------------- previous import of the extern crate `alloc` here diff --git a/src/test/ui/error-codes/E0259.rs b/src/test/ui/error-codes/E0259.rs index cda3db34df..c83561be9c 100644 --- a/src/test/ui/error-codes/E0259.rs +++ b/src/test/ui/error-codes/E0259.rs @@ -1,4 +1,4 @@ -#![feature(alloc, rustc_private)] +#![feature(rustc_private)] #![allow(unused_extern_crates)] extern crate alloc; diff --git a/src/test/ui/error-codes/E0260.rs b/src/test/ui/error-codes/E0260.rs index 80382c0d2f..73b8934159 100644 --- a/src/test/ui/error-codes/E0260.rs +++ b/src/test/ui/error-codes/E0260.rs @@ -1,4 +1,3 @@ -#![feature(alloc)] #![allow(unused_extern_crates)] extern crate alloc; diff --git a/src/test/ui/error-codes/E0260.stderr b/src/test/ui/error-codes/E0260.stderr index bfe2ed0cfc..7d0b302291 100644 --- a/src/test/ui/error-codes/E0260.stderr +++ b/src/test/ui/error-codes/E0260.stderr @@ -1,5 +1,5 @@ error[E0260]: the name `alloc` is defined multiple times - --> $DIR/E0260.rs:6:1 + --> $DIR/E0260.rs:5:1 | LL | extern crate alloc; | ------------------- previous import of the extern crate `alloc` here diff --git a/src/test/ui/error-codes/E0301.nll.stderr b/src/test/ui/error-codes/E0301.nll.stderr deleted file mode 100644 index 24234c9929..0000000000 --- a/src/test/ui/error-codes/E0301.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0301]: cannot mutably borrow in a pattern guard - --> $DIR/E0301.rs:4:19 - | -LL | option if option.take().is_none() => {}, - | ^^^^^^ borrowed mutably in pattern guard - | - = help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0301`. diff --git a/src/test/ui/error-codes/E0301.rs b/src/test/ui/error-codes/E0301.rs index 54372f8b6b..3b451801c9 100644 --- a/src/test/ui/error-codes/E0301.rs +++ b/src/test/ui/error-codes/E0301.rs @@ -2,6 +2,6 @@ fn main() { match Some(()) { None => { }, option if option.take().is_none() => {}, //~ ERROR E0301 - Some(_) => { } + Some(_) => { } //~^ ERROR E0596 } } diff --git a/src/test/ui/error-codes/E0301.stderr b/src/test/ui/error-codes/E0301.stderr index 80ee681a51..44e823631b 100644 --- a/src/test/ui/error-codes/E0301.stderr +++ b/src/test/ui/error-codes/E0301.stderr @@ -3,7 +3,18 @@ error[E0301]: cannot mutably borrow in a pattern guard | LL | option if option.take().is_none() => {}, | ^^^^^^ borrowed mutably in pattern guard + | + = help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable + +error[E0596]: cannot borrow `option` as mutable, as it is immutable for the pattern guard + --> $DIR/E0301.rs:4:19 + | +LL | option if option.take().is_none() => {}, + | ^^^^^^ cannot borrow as mutable + | + = note: variables bound in patterns are immutable until the end of the pattern guard -error: aborting due to previous error +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0301`. +Some errors have detailed explanations: E0301, E0596. +For more information about an error, try `rustc --explain E0301`. diff --git a/src/test/ui/error-codes/E0302.rs b/src/test/ui/error-codes/E0302.rs index 7c76eb30c1..69f5953deb 100644 --- a/src/test/ui/error-codes/E0302.rs +++ b/src/test/ui/error-codes/E0302.rs @@ -2,6 +2,7 @@ fn main() { match Some(()) { None => { }, option if { option = None; false } => { }, //~ ERROR E0302 + //~^ ERROR cannot assign to `option`, as it is immutable for the pattern guard Some(_) => { } } } diff --git a/src/test/ui/error-codes/E0302.stderr b/src/test/ui/error-codes/E0302.stderr index 69ebb6bb9c..a077fcaea4 100644 --- a/src/test/ui/error-codes/E0302.stderr +++ b/src/test/ui/error-codes/E0302.stderr @@ -4,6 +4,14 @@ error[E0302]: cannot assign in a pattern guard LL | option if { option = None; false } => { }, | ^^^^^^^^^^^^^ assignment in pattern guard -error: aborting due to previous error +error[E0594]: cannot assign to `option`, as it is immutable for the pattern guard + --> $DIR/E0302.rs:4:21 + | +LL | option if { option = None; false } => { }, + | ^^^^^^^^^^^^^ cannot assign + | + = note: variables bound in patterns are immutable until the end of the pattern guard + +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0302`. diff --git a/src/test/ui/error-codes/E0303.stderr b/src/test/ui/error-codes/E0303.stderr index d701b07de6..af537ce562 100644 --- a/src/test/ui/error-codes/E0303.stderr +++ b/src/test/ui/error-codes/E0303.stderr @@ -15,5 +15,5 @@ LL | ref op_string_ref @ Some(s) => {}, error: aborting due to 2 previous errors -Some errors occurred: E0009, E0303. +Some errors have detailed explanations: E0009, E0303. For more information about an error, try `rustc --explain E0009`. diff --git a/src/test/ui/error-codes/E0375.rs b/src/test/ui/error-codes/E0375.rs index 362854a53a..0c03a8761d 100644 --- a/src/test/ui/error-codes/E0375.rs +++ b/src/test/ui/error-codes/E0375.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![feature(coerce_unsized)] use std::ops::CoerceUnsized; diff --git a/src/test/ui/error-codes/E0375.stderr b/src/test/ui/error-codes/E0375.stderr index 18416e9b7d..a68b3af5aa 100644 --- a/src/test/ui/error-codes/E0375.stderr +++ b/src/test/ui/error-codes/E0375.stderr @@ -1,5 +1,5 @@ error[E0375]: implementing the trait `CoerceUnsized` requires multiple coercions - --> $DIR/E0375.rs:12:12 + --> $DIR/E0375.rs:10:12 | LL | impl CoerceUnsized> for Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^ requires multiple coercions diff --git a/src/test/ui/error-codes/E0388.nll.stderr b/src/test/ui/error-codes/E0388.nll.stderr deleted file mode 100644 index 0fc8a76820..0000000000 --- a/src/test/ui/error-codes/E0388.nll.stderr +++ /dev/null @@ -1,34 +0,0 @@ -error[E0017]: references in constants may only refer to immutable values - --> $DIR/E0388.rs:4:30 - | -LL | const CR: &'static mut i32 = &mut C; - | ^^^^^^ constants require immutable values - -error[E0017]: references in statics may only refer to immutable values - --> $DIR/E0388.rs:5:39 - | -LL | static STATIC_REF: &'static mut i32 = &mut X; - | ^^^^^^ statics require immutable values - -error: cannot mutate statics in the initializer of another static - --> $DIR/E0388.rs:5:39 - | -LL | static STATIC_REF: &'static mut i32 = &mut X; - | ^^^^^^ - -error[E0596]: cannot borrow immutable static item `X` as mutable - --> $DIR/E0388.rs:5:39 - | -LL | static STATIC_REF: &'static mut i32 = &mut X; - | ^^^^^^ cannot borrow as mutable - -error[E0017]: references in statics may only refer to immutable values - --> $DIR/E0388.rs:8:38 - | -LL | static CONST_REF: &'static mut i32 = &mut C; - | ^^^^^^ statics require immutable values - -error: aborting due to 5 previous errors - -Some errors occurred: E0017, E0596. -For more information about an error, try `rustc --explain E0017`. diff --git a/src/test/ui/error-codes/E0388.stderr b/src/test/ui/error-codes/E0388.stderr index 3f662459c8..e0ca431673 100644 --- a/src/test/ui/error-codes/E0388.stderr +++ b/src/test/ui/error-codes/E0388.stderr @@ -16,11 +16,11 @@ error: cannot mutate statics in the initializer of another static LL | static STATIC_REF: &'static mut i32 = &mut X; | ^^^^^^ -error[E0596]: cannot borrow immutable static item as mutable - --> $DIR/E0388.rs:5:44 +error[E0596]: cannot borrow immutable static item `X` as mutable + --> $DIR/E0388.rs:5:39 | LL | static STATIC_REF: &'static mut i32 = &mut X; - | ^ + | ^^^^^^ cannot borrow as mutable error[E0017]: references in statics may only refer to immutable values --> $DIR/E0388.rs:8:38 @@ -30,5 +30,5 @@ LL | static CONST_REF: &'static mut i32 = &mut C; error: aborting due to 5 previous errors -Some errors occurred: E0017, E0596. +Some errors have detailed explanations: E0017, E0596. For more information about an error, try `rustc --explain E0017`. diff --git a/src/test/ui/error-codes/E0389.nll.stderr b/src/test/ui/error-codes/E0389.nll.stderr deleted file mode 100644 index c47750b6f4..0000000000 --- a/src/test/ui/error-codes/E0389.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0594]: cannot assign to `fancy_ref.num` which is behind a `&` reference - --> $DIR/E0389.rs:8:5 - | -LL | let fancy_ref = &(&mut fancy); - | ------------- help: consider changing this to be a mutable reference: `&mut (&mut fancy)` -LL | fancy_ref.num = 6; - | ^^^^^^^^^^^^^^^^^ `fancy_ref` is a `&` reference, so the data it refers to cannot be written - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/error-codes/E0389.rs b/src/test/ui/error-codes/E0389.rs index 8b821330eb..9dab2c3092 100644 --- a/src/test/ui/error-codes/E0389.rs +++ b/src/test/ui/error-codes/E0389.rs @@ -5,6 +5,6 @@ struct FancyNum { fn main() { let mut fancy = FancyNum{ num: 5 }; let fancy_ref = &(&mut fancy); - fancy_ref.num = 6; //~ ERROR E0389 + fancy_ref.num = 6; //~ ERROR cannot assign to `fancy_ref.num` which is behind a `&` reference println!("{}", fancy_ref.num); } diff --git a/src/test/ui/error-codes/E0389.stderr b/src/test/ui/error-codes/E0389.stderr index 927eace727..5310367d51 100644 --- a/src/test/ui/error-codes/E0389.stderr +++ b/src/test/ui/error-codes/E0389.stderr @@ -1,9 +1,10 @@ -error[E0389]: cannot assign to data in a `&` reference +error[E0594]: cannot assign to `fancy_ref.num` which is behind a `&` reference --> $DIR/E0389.rs:8:5 | +LL | let fancy_ref = &(&mut fancy); + | ------------- help: consider changing this to be a mutable reference: `&mut (&mut fancy)` LL | fancy_ref.num = 6; - | ^^^^^^^^^^^^^^^^^ assignment into an immutable reference + | ^^^^^^^^^^^^^^^^^ `fancy_ref` is a `&` reference, so the data it refers to cannot be written error: aborting due to previous error -For more information about this error, try `rustc --explain E0389`. diff --git a/src/test/ui/error-codes/E0392.stderr b/src/test/ui/error-codes/E0392.stderr index 1841957223..d0b808df18 100644 --- a/src/test/ui/error-codes/E0392.stderr +++ b/src/test/ui/error-codes/E0392.stderr @@ -2,7 +2,7 @@ error[E0392]: parameter `T` is never used --> $DIR/E0392.rs:1:10 | LL | enum Foo { Bar } - | ^ unused type parameter + | ^ unused parameter | = help: consider removing `T` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/error-codes/E0395.rs b/src/test/ui/error-codes/E0395.rs index 9657bbdead..bbefff27d7 100644 --- a/src/test/ui/error-codes/E0395.rs +++ b/src/test/ui/error-codes/E0395.rs @@ -3,6 +3,8 @@ static FOO: i32 = 42; static BAR: i32 = 42; -static BAZ: bool = unsafe { (&FOO as *const i32) == (&BAR as *const i32) }; //~ ERROR issue #53020 +static BAZ: bool = unsafe { (&FOO as *const i32) == (&BAR as *const i32) }; +//~^ ERROR comparing raw pointers inside static + fn main() { } diff --git a/src/test/ui/error-codes/E0395.stderr b/src/test/ui/error-codes/E0395.stderr index 9d80acb515..30a4d4815f 100644 --- a/src/test/ui/error-codes/E0395.stderr +++ b/src/test/ui/error-codes/E0395.stderr @@ -1,9 +1,10 @@ -error[E0658]: comparing raw pointers inside static (see issue #53020) +error[E0658]: comparing raw pointers inside static --> $DIR/E0395.rs:6:29 | LL | static BAZ: bool = unsafe { (&FOO as *const i32) == (&BAR as *const i32) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/53020 = help: add #![feature(const_compare_raw_pointers)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0396.stderr b/src/test/ui/error-codes/E0396.stderr index 1006ff6dc5..6d2d121e91 100644 --- a/src/test/ui/error-codes/E0396.stderr +++ b/src/test/ui/error-codes/E0396.stderr @@ -1,9 +1,10 @@ -error[E0658]: dereferencing raw pointers in constants is unstable (see issue #51911) +error[E0658]: dereferencing raw pointers in constants is unstable --> $DIR/E0396.rs:5:28 | LL | const VALUE: u8 = unsafe { *REG_ADDR }; | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51911 = help: add #![feature(const_raw_ptr_deref)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0401.stderr b/src/test/ui/error-codes/E0401.stderr index 7c54e5b4ed..1d9dfe4672 100644 --- a/src/test/ui/error-codes/E0401.stderr +++ b/src/test/ui/error-codes/E0401.stderr @@ -2,7 +2,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/E0401.rs:4:39 | LL | fn foo(x: T) { - | - type variable from outer function + | - type parameter from outer function LL | fn bfnr, W: Fn()>(y: T) { | --------------------------- ^ use of generic parameter from outer function | | @@ -12,7 +12,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/E0401.rs:9:16 | LL | fn foo(x: T) { - | - type variable from outer function + | - type parameter from outer function ... LL | fn baz $DIR/E0423.rs:12:39 +error: struct literals are not allowed here + --> $DIR/E0423.rs:12:32 | LL | if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); } - | ^ expecting a type here because of type ascription - | - = note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `: ` -note: this expression expects an ascribed type after the colon - --> $DIR/E0423.rs:12:36 + | ^^^^^^^^^^^^^^^^ +help: surround the struct literal with parentheses | -LL | if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); } - | ^ - = help: this might be indicative of a syntax error elsewhere +LL | if let S { x: _x, y: 2 } = (S { x: 1, y: 2 }) { println!("Ok"); } + | ^ ^ error: expected expression, found `==` - --> $DIR/E0423.rs:15:13 + --> $DIR/E0423.rs:14:13 | LL | if T {} == T {} { println!("Ok"); } | ^^ expected expression -error: expected type, found `0` - --> $DIR/E0423.rs:21:39 +error: struct literals are not allowed here + --> $DIR/E0423.rs:20:14 | LL | for _ in std::ops::Range { start: 0, end: 10 } {} - | ^ expecting a type here because of type ascription + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +help: surround the struct literal with parentheses | - = note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `: ` -note: this expression expects an ascribed type after the colon - --> $DIR/E0423.rs:21:32 - | -LL | for _ in std::ops::Range { start: 0, end: 10 } {} - | ^^^^^ - = help: this might be indicative of a syntax error elsewhere +LL | for _ in (std::ops::Range { start: 0, end: 10 }) {} + | ^ ^ error[E0423]: expected function, found struct `Foo` --> $DIR/E0423.rs:4:13 @@ -41,30 +33,14 @@ LL | let f = Foo(); | did you mean `Foo { /* fields */ }`? | help: a function with a similar name exists: `foo` -error[E0423]: expected value, found struct `S` - --> $DIR/E0423.rs:12:32 - | -LL | if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); } - | ^--------------- - | | - | help: surround the struct literal with parenthesis: `(S { x: 1, y: 2 })` - error[E0423]: expected value, found struct `T` - --> $DIR/E0423.rs:15:8 + --> $DIR/E0423.rs:14:8 | LL | if T {} == T {} { println!("Ok"); } | ^--- | | | help: surround the struct literal with parenthesis: `(T {})` -error[E0423]: expected value, found struct `std::ops::Range` - --> $DIR/E0423.rs:21:14 - | -LL | for _ in std::ops::Range { start: 0, end: 10 } {} - | ^^^^^^^^^^^^^^^---------------------- - | | - | help: surround the struct literal with parenthesis: `(std::ops::Range { start: 0, end: 10 })` - -error: aborting due to 7 previous errors +error: aborting due to 5 previous errors For more information about this error, try `rustc --explain E0423`. diff --git a/src/test/ui/error-codes/E0430.stderr b/src/test/ui/error-codes/E0430.stderr index d8e4a80295..69a0d6e11b 100644 --- a/src/test/ui/error-codes/E0430.stderr +++ b/src/test/ui/error-codes/E0430.stderr @@ -18,5 +18,5 @@ LL | use std::fmt::{self, self}; error: aborting due to 2 previous errors -Some errors occurred: E0252, E0430. +Some errors have detailed explanations: E0252, E0430. For more information about an error, try `rustc --explain E0252`. diff --git a/src/test/ui/error-codes/E0458.stderr b/src/test/ui/error-codes/E0458.stderr index 154e0b1217..d60fd96c77 100644 --- a/src/test/ui/error-codes/E0458.stderr +++ b/src/test/ui/error-codes/E0458.stderr @@ -14,5 +14,5 @@ LL | #[link(kind = "wonderful_unicorn")] extern {} error: aborting due to 2 previous errors -Some errors occurred: E0458, E0459. +Some errors have detailed explanations: E0458, E0459. For more information about an error, try `rustc --explain E0458`. diff --git a/src/test/ui/error-codes/E0499.nll.stderr b/src/test/ui/error-codes/E0499.nll.stderr deleted file mode 100644 index d56baf7227..0000000000 --- a/src/test/ui/error-codes/E0499.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0499]: cannot borrow `i` as mutable more than once at a time - --> $DIR/E0499.rs:4:17 - | -LL | let mut x = &mut i; - | ------ first mutable borrow occurs here -LL | let mut a = &mut i; - | ^^^^^^ second mutable borrow occurs here -LL | a.use_mut(); -LL | x.use_mut(); - | - first borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/error-codes/E0499.stderr b/src/test/ui/error-codes/E0499.stderr index 82270162b3..d56baf7227 100644 --- a/src/test/ui/error-codes/E0499.stderr +++ b/src/test/ui/error-codes/E0499.stderr @@ -1,13 +1,13 @@ error[E0499]: cannot borrow `i` as mutable more than once at a time - --> $DIR/E0499.rs:4:22 + --> $DIR/E0499.rs:4:17 | LL | let mut x = &mut i; - | - first mutable borrow occurs here + | ------ first mutable borrow occurs here LL | let mut a = &mut i; - | ^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here + | ^^^^^^ second mutable borrow occurs here +LL | a.use_mut(); +LL | x.use_mut(); + | - first borrow later used here error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0502.nll.stderr b/src/test/ui/error-codes/E0502.nll.stderr index cade6d7185..e5671ee49e 100644 --- a/src/test/ui/error-codes/E0502.nll.stderr +++ b/src/test/ui/error-codes/E0502.nll.stderr @@ -1,10 +1,10 @@ error[E0502]: cannot borrow `*a` as mutable because it is also borrowed as immutable - --> $DIR/E0502.rs:4:5 + --> $DIR/E0502.rs:4:9 | LL | let ref y = a; | ----- immutable borrow occurs here LL | bar(a); - | ^^^^^^ mutable borrow occurs here + | ^ mutable borrow occurs here LL | y.use_ref(); | - immutable borrow later used here diff --git a/src/test/ui/error-codes/E0502.stderr b/src/test/ui/error-codes/E0502.stderr index 26a2c3bf35..cade6d7185 100644 --- a/src/test/ui/error-codes/E0502.stderr +++ b/src/test/ui/error-codes/E0502.stderr @@ -1,13 +1,12 @@ -error[E0502]: cannot borrow `*a` as mutable because `a` is also borrowed as immutable - --> $DIR/E0502.rs:4:9 +error[E0502]: cannot borrow `*a` as mutable because it is also borrowed as immutable + --> $DIR/E0502.rs:4:5 | LL | let ref y = a; | ----- immutable borrow occurs here LL | bar(a); - | ^ mutable borrow occurs here + | ^^^^^^ mutable borrow occurs here LL | y.use_ref(); -LL | } - | - immutable borrow ends here + | - immutable borrow later used here error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0503.nll.stderr b/src/test/ui/error-codes/E0503.nll.stderr deleted file mode 100644 index 106dda2bc2..0000000000 --- a/src/test/ui/error-codes/E0503.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0503]: cannot use `value` because it was mutably borrowed - --> $DIR/E0503.rs:4:16 - | -LL | let _borrow = &mut value; - | ---------- borrow of `value` occurs here -LL | let _sum = value + 1; - | ^^^^^ use of borrowed `value` -LL | _borrow.use_mut(); - | ------- borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0503`. diff --git a/src/test/ui/error-codes/E0503.stderr b/src/test/ui/error-codes/E0503.stderr index 62cb3afca7..106dda2bc2 100644 --- a/src/test/ui/error-codes/E0503.stderr +++ b/src/test/ui/error-codes/E0503.stderr @@ -2,9 +2,11 @@ error[E0503]: cannot use `value` because it was mutably borrowed --> $DIR/E0503.rs:4:16 | LL | let _borrow = &mut value; - | ----- borrow of `value` occurs here + | ---------- borrow of `value` occurs here LL | let _sum = value + 1; | ^^^^^ use of borrowed `value` +LL | _borrow.use_mut(); + | ------- borrow later used here error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0504.nll.stderr b/src/test/ui/error-codes/E0504.nll.stderr deleted file mode 100644 index 1f2a0407a3..0000000000 --- a/src/test/ui/error-codes/E0504.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0505]: cannot move out of `fancy_num` because it is borrowed - --> $DIR/E0504.rs:9:13 - | -LL | let fancy_ref = &fancy_num; - | ---------- borrow of `fancy_num` occurs here -LL | -LL | let x = move || { - | ^^^^^^^ move out of `fancy_num` occurs here -LL | println!("child function: {}", fancy_num.num); - | --------- move occurs due to use in closure -... -LL | println!("main function: {}", fancy_ref.num); - | ------------- borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/error-codes/E0504.rs b/src/test/ui/error-codes/E0504.rs index 06ae0848b7..c2658bef61 100644 --- a/src/test/ui/error-codes/E0504.rs +++ b/src/test/ui/error-codes/E0504.rs @@ -6,8 +6,8 @@ fn main() { let fancy_num = FancyNum { num: 5 }; let fancy_ref = &fancy_num; - let x = move || { - println!("child function: {}", fancy_num.num); //~ ERROR E0504 + let x = move || { //~ ERROR E0505 + println!("child function: {}", fancy_num.num); }; x(); diff --git a/src/test/ui/error-codes/E0504.stderr b/src/test/ui/error-codes/E0504.stderr index a987713a11..1f2a0407a3 100644 --- a/src/test/ui/error-codes/E0504.stderr +++ b/src/test/ui/error-codes/E0504.stderr @@ -1,12 +1,17 @@ -error[E0504]: cannot move `fancy_num` into closure because it is borrowed - --> $DIR/E0504.rs:10:40 +error[E0505]: cannot move out of `fancy_num` because it is borrowed + --> $DIR/E0504.rs:9:13 | LL | let fancy_ref = &fancy_num; - | --------- borrow of `fancy_num` occurs here -... + | ---------- borrow of `fancy_num` occurs here +LL | +LL | let x = move || { + | ^^^^^^^ move out of `fancy_num` occurs here LL | println!("child function: {}", fancy_num.num); - | ^^^^^^^^^ move into closure occurs here + | --------- move occurs due to use in closure +... +LL | println!("main function: {}", fancy_ref.num); + | ------------- borrow later used here error: aborting due to previous error -For more information about this error, try `rustc --explain E0504`. +For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/error-codes/E0505.nll.stderr b/src/test/ui/error-codes/E0505.nll.stderr deleted file mode 100644 index 4d9d1ef121..0000000000 --- a/src/test/ui/error-codes/E0505.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/E0505.rs:9:13 - | -LL | let _ref_to_val: &Value = &x; - | -- borrow of `x` occurs here -LL | eat(x); - | ^ move out of `x` occurs here -LL | _ref_to_val.use_ref(); - | ----------- borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/error-codes/E0505.stderr b/src/test/ui/error-codes/E0505.stderr index 28dfb25986..4d9d1ef121 100644 --- a/src/test/ui/error-codes/E0505.stderr +++ b/src/test/ui/error-codes/E0505.stderr @@ -2,9 +2,11 @@ error[E0505]: cannot move out of `x` because it is borrowed --> $DIR/E0505.rs:9:13 | LL | let _ref_to_val: &Value = &x; - | - borrow of `x` occurs here + | -- borrow of `x` occurs here LL | eat(x); | ^ move out of `x` occurs here +LL | _ref_to_val.use_ref(); + | ----------- borrow later used here error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0509.nll.stderr b/src/test/ui/error-codes/E0509.nll.stderr deleted file mode 100644 index e5c0cf6e24..0000000000 --- a/src/test/ui/error-codes/E0509.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0509]: cannot move out of type `DropStruct`, which implements the `Drop` trait - --> $DIR/E0509.rs:16:23 - | -LL | let fancy_field = drop_struct.fancy; - | ^^^^^^^^^^^^^^^^^ - | | - | cannot move out of here - | help: consider borrowing here: `&drop_struct.fancy` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0509`. diff --git a/src/test/ui/error-codes/E0509.stderr b/src/test/ui/error-codes/E0509.stderr index 25b6d8a47d..e5c0cf6e24 100644 --- a/src/test/ui/error-codes/E0509.stderr +++ b/src/test/ui/error-codes/E0509.stderr @@ -5,7 +5,7 @@ LL | let fancy_field = drop_struct.fancy; | ^^^^^^^^^^^^^^^^^ | | | cannot move out of here - | help: consider using a reference instead: `&drop_struct.fancy` + | help: consider borrowing here: `&drop_struct.fancy` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0511.stderr b/src/test/ui/error-codes/E0511.stderr index 1362a3d1f2..5f8be0c61d 100644 --- a/src/test/ui/error-codes/E0511.stderr +++ b/src/test/ui/error-codes/E0511.stderr @@ -6,4 +6,3 @@ LL | unsafe { simd_add(0, 1); } error: aborting due to previous error -For more information about this error, try `rustc --explain E0511`. diff --git a/src/test/ui/error-codes/E0597.nll.stderr b/src/test/ui/error-codes/E0597.nll.stderr deleted file mode 100644 index b4a1180ad5..0000000000 --- a/src/test/ui/error-codes/E0597.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0597]: `y` does not live long enough - --> $DIR/E0597.rs:8:16 - | -LL | x.x = Some(&y); - | ^^ borrowed value does not live long enough -LL | -LL | } - | - - | | - | `y` dropped here while still borrowed - | borrow might be used here, when `x` is dropped and runs the `Drop` code for type `Foo` - | - = note: values in a scope are dropped in the opposite order they are defined - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/error-codes/E0597.stderr b/src/test/ui/error-codes/E0597.stderr index cab9785853..b4a1180ad5 100644 --- a/src/test/ui/error-codes/E0597.stderr +++ b/src/test/ui/error-codes/E0597.stderr @@ -1,13 +1,16 @@ error[E0597]: `y` does not live long enough - --> $DIR/E0597.rs:8:17 + --> $DIR/E0597.rs:8:16 | LL | x.x = Some(&y); - | ^ borrowed value does not live long enough + | ^^ borrowed value does not live long enough LL | LL | } - | - `y` dropped here while still borrowed + | - + | | + | `y` dropped here while still borrowed + | borrow might be used here, when `x` is dropped and runs the `Drop` code for type `Foo` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.nll.stderr b/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.nll.stderr new file mode 100644 index 0000000000..5140d1a9a7 --- /dev/null +++ b/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.nll.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/E0621-does-not-trigger-for-closures.rs:15:45 + | +LL | invoke(&x, |a, b| if a > b { a } else { b }); + | -- ^ returning this value requires that `'1` must outlive `'2` + | || + | |return type of closure is &'2 i32 + | has type `&'1 i32` + +error: aborting due to previous error + diff --git a/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr b/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr index feca7f10b7..f50c647801 100644 --- a/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr +++ b/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr @@ -27,4 +27,3 @@ LL | invoke(&x, |a, b| if a > b { a } else { b }); error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/error-codes/E0637.stderr b/src/test/ui/error-codes/E0637.stderr index d19ebfd15a..9c3ca87ed7 100644 --- a/src/test/ui/error-codes/E0637.stderr +++ b/src/test/ui/error-codes/E0637.stderr @@ -18,4 +18,3 @@ LL | impl<'a: '_> Bar<'a> { error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/error-codes/E0657.stderr b/src/test/ui/error-codes/E0657.stderr index df76b45a58..b24b413600 100644 --- a/src/test/ui/error-codes/E0657.stderr +++ b/src/test/ui/error-codes/E0657.stderr @@ -12,4 +12,3 @@ LL | -> Box Id>> error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0657`. diff --git a/src/test/ui/error-codes/E0658.stderr b/src/test/ui/error-codes/E0658.stderr index 292c49fa84..ff3f74addd 100644 --- a/src/test/ui/error-codes/E0658.stderr +++ b/src/test/ui/error-codes/E0658.stderr @@ -1,4 +1,4 @@ -error[E0658]: repr with 128-bit type is unstable (see issue #35118) +error[E0658]: repr with 128-bit type is unstable --> $DIR/E0658.rs:2:1 | LL | / enum Foo { @@ -6,6 +6,7 @@ LL | | Bar(u64), LL | | } | |_^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/35118 = help: add #![feature(repr128)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0719.stderr b/src/test/ui/error-codes/E0719.stderr index 209bfbae07..5854cd7e14 100644 --- a/src/test/ui/error-codes/E0719.stderr +++ b/src/test/ui/error-codes/E0719.stderr @@ -16,4 +16,3 @@ LL | fn test() -> Box> { error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0719`. diff --git a/src/test/ui/error-festival.stderr b/src/test/ui/error-festival.stderr index ff6504e968..8808e95d81 100644 --- a/src/test/ui/error-festival.stderr +++ b/src/test/ui/error-festival.stderr @@ -71,5 +71,5 @@ LL | v as *const [u8]; error: aborting due to 10 previous errors -Some errors occurred: E0054, E0368, E0425, E0599, E0600, E0603, E0604, E0605, E0606... +Some errors have detailed explanations: E0054, E0368, E0425, E0599, E0600, E0603, E0604, E0605, E0606... For more information about an error, try `rustc --explain E0054`. diff --git a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr index 03867a8e43..359725a41c 100644 --- a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr +++ b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr @@ -1,8 +1,8 @@ error: unexpected token: `,` - --> $DIR/exclusive_range_pattern_syntax_collision.rs:5:15 + --> $DIR/exclusive_range_pattern_syntax_collision.rs:5:17 | LL | [_, 99.., _] => {}, - | ^^ + | ^ error: aborting due to previous error diff --git a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr index 5ac435bf01..8f849d7b3f 100644 --- a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr +++ b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr @@ -1,8 +1,8 @@ error: unexpected token: `]` - --> $DIR/exclusive_range_pattern_syntax_collision2.rs:5:15 + --> $DIR/exclusive_range_pattern_syntax_collision2.rs:5:17 | LL | [_, 99..] => {}, - | ^^ + | ^ error: aborting due to previous error diff --git a/src/test/ui/existential-type/issue-60371.rs b/src/test/ui/existential-type/issue-60371.rs new file mode 100644 index 0000000000..f9def11d19 --- /dev/null +++ b/src/test/ui/existential-type/issue-60371.rs @@ -0,0 +1,15 @@ +trait Bug { + type Item: Bug; + + const FUN: fn() -> Self::Item; +} + +impl Bug for &() { + existential type Item: Bug; //~ ERROR existential types are unstable + //~^ ERROR the trait bound `(): Bug` is not satisfied + //~^^ ERROR could not find defining uses + + const FUN: fn() -> Self::Item = || (); +} + +fn main() {} diff --git a/src/test/ui/existential-type/issue-60371.stderr b/src/test/ui/existential-type/issue-60371.stderr new file mode 100644 index 0000000000..2560e01047 --- /dev/null +++ b/src/test/ui/existential-type/issue-60371.stderr @@ -0,0 +1,29 @@ +error[E0658]: existential types are unstable + --> $DIR/issue-60371.rs:8:5 + | +LL | existential type Item: Bug; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/34511 + = help: add #![feature(existential_type)] to the crate attributes to enable + +error[E0277]: the trait bound `(): Bug` is not satisfied + --> $DIR/issue-60371.rs:8:5 + | +LL | existential type Item: Bug; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bug` is not implemented for `()` + | + = help: the following implementations were found: + <&() as Bug> + = note: the return type of a function must have a statically known size + +error: could not find defining uses + --> $DIR/issue-60371.rs:8:5 + | +LL | existential type Item: Bug; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0277, E0658. +For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/existential_types/auxiliary/cross_crate_ice.rs b/src/test/ui/existential_types/auxiliary/cross_crate_ice.rs index af2d209826..96ab476061 100644 --- a/src/test/ui/existential_types/auxiliary/cross_crate_ice.rs +++ b/src/test/ui/existential_types/auxiliary/cross_crate_ice.rs @@ -9,4 +9,3 @@ pub existential type Foo: std::fmt::Debug; pub fn foo() -> Foo { 5 } - diff --git a/src/test/ui/existential_types/existential-types-with-no-traits.rs b/src/test/ui/existential_types/existential-types-with-no-traits.rs new file mode 100644 index 0000000000..46339c73b1 --- /dev/null +++ b/src/test/ui/existential_types/existential-types-with-no-traits.rs @@ -0,0 +1,14 @@ +#![feature(existential_type)] + +existential type Foo: 'static; +//~^ ERROR: at least one trait must be specified + +fn foo() -> Foo { + "foo" +} + +fn bar() -> impl 'static { //~ ERROR: at least one trait must be specified + "foo" +} + +fn main() {} diff --git a/src/test/ui/existential_types/existential-types-with-no-traits.stderr b/src/test/ui/existential_types/existential-types-with-no-traits.stderr new file mode 100644 index 0000000000..4b2fbc79d3 --- /dev/null +++ b/src/test/ui/existential_types/existential-types-with-no-traits.stderr @@ -0,0 +1,14 @@ +error: at least one trait must be specified + --> $DIR/existential-types-with-no-traits.rs:3:23 + | +LL | existential type Foo: 'static; + | ^^^^^^^ + +error: at least one trait must be specified + --> $DIR/existential-types-with-no-traits.rs:10:13 + | +LL | fn bar() -> impl 'static { + | ^^^^^^^^^^^^ + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/existential_types/generic_duplicate_param_use7.rs b/src/test/ui/existential_types/generic_duplicate_param_use7.rs index 2bcac315f5..5d8d05c308 100644 --- a/src/test/ui/existential_types/generic_duplicate_param_use7.rs +++ b/src/test/ui/existential_types/generic_duplicate_param_use7.rs @@ -22,4 +22,3 @@ fn four(t: T, t2: T, u: U, v: V) -> Two { fn five(x: X, y: Y, y2: Y) -> Two { (y, y2) } - diff --git a/src/test/ui/existential_types/generic_nondefining_use.rs b/src/test/ui/existential_types/generic_nondefining_use.rs index 75af5d9570..ffc965aca4 100644 --- a/src/test/ui/existential_types/generic_nondefining_use.rs +++ b/src/test/ui/existential_types/generic_nondefining_use.rs @@ -4,6 +4,8 @@ fn main() {} existential type Cmp: 'static; //~^ ERROR could not find defining uses +//~^^ ERROR: at least one trait must be specified + // not a defining use, because it doesn't define *all* possible generics fn cmp() -> Cmp { //~ ERROR defining existential type use does not fully define diff --git a/src/test/ui/existential_types/generic_nondefining_use.stderr b/src/test/ui/existential_types/generic_nondefining_use.stderr index ef579260f0..d205d44c68 100644 --- a/src/test/ui/existential_types/generic_nondefining_use.stderr +++ b/src/test/ui/existential_types/generic_nondefining_use.stderr @@ -1,5 +1,11 @@ +error: at least one trait must be specified + --> $DIR/generic_nondefining_use.rs:5:26 + | +LL | existential type Cmp: 'static; + | ^^^^^^^ + error: defining existential type use does not fully define existential type - --> $DIR/generic_nondefining_use.rs:9:1 + --> $DIR/generic_nondefining_use.rs:11:1 | LL | / fn cmp() -> Cmp { LL | | 5u32 @@ -12,5 +18,5 @@ error: could not find defining uses LL | existential type Cmp: 'static; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 2 previous errors +error: aborting due to 3 previous errors diff --git a/src/test/ui/existential_types/generic_not_used.rs b/src/test/ui/existential_types/generic_not_used.rs index bfe7b8c4a1..054e6f5f2a 100644 --- a/src/test/ui/existential_types/generic_not_used.rs +++ b/src/test/ui/existential_types/generic_not_used.rs @@ -3,6 +3,7 @@ fn main() {} existential type WrongGeneric: 'static; +//~^ ERROR: at least one trait must be specified fn wrong_generic(_: U, v: V) -> WrongGeneric { //~^ ERROR type parameter `V` is part of concrete type but not used in parameter list diff --git a/src/test/ui/existential_types/generic_not_used.stderr b/src/test/ui/existential_types/generic_not_used.stderr index 1ae4ab6592..d243233992 100644 --- a/src/test/ui/existential_types/generic_not_used.stderr +++ b/src/test/ui/existential_types/generic_not_used.stderr @@ -1,5 +1,11 @@ +error: at least one trait must be specified + --> $DIR/generic_not_used.rs:5:44 + | +LL | existential type WrongGeneric: 'static; + | ^^^^^^^ + error: type parameter `V` is part of concrete type but not used in parameter list for existential type - --> $DIR/generic_not_used.rs:7:73 + --> $DIR/generic_not_used.rs:8:73 | LL | fn wrong_generic(_: U, v: V) -> WrongGeneric { | _________________________________________________________________________^ @@ -8,5 +14,5 @@ LL | | v LL | | } | |_^ -error: aborting due to previous error +error: aborting due to 2 previous errors diff --git a/src/test/ui/existential_types/generic_type_does_not_live_long_enough.nll.stderr b/src/test/ui/existential_types/generic_type_does_not_live_long_enough.nll.stderr new file mode 100644 index 0000000000..f316644156 --- /dev/null +++ b/src/test/ui/existential_types/generic_type_does_not_live_long_enough.nll.stderr @@ -0,0 +1,18 @@ +error: at least one trait must be specified + --> $DIR/generic_type_does_not_live_long_enough.rs:9:35 + | +LL | existential type WrongGeneric: 'static; + | ^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/generic_type_does_not_live_long_enough.rs:6:18 + | +LL | let z: i32 = x; + | ^ expected i32, found opaque type + | + = note: expected type `i32` + found type `WrongGeneric::<&{integer}>` + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/existential_types/generic_type_does_not_live_long_enough.rs b/src/test/ui/existential_types/generic_type_does_not_live_long_enough.rs index 02bb151ccb..d9eedd6dca 100644 --- a/src/test/ui/existential_types/generic_type_does_not_live_long_enough.rs +++ b/src/test/ui/existential_types/generic_type_does_not_live_long_enough.rs @@ -8,6 +8,7 @@ fn main() { existential type WrongGeneric: 'static; //~^ ERROR the parameter type `T` may not live long enough +//~^^ ERROR: at least one trait must be specified fn wrong_generic(t: T) -> WrongGeneric { t diff --git a/src/test/ui/existential_types/generic_type_does_not_live_long_enough.stderr b/src/test/ui/existential_types/generic_type_does_not_live_long_enough.stderr index e3e5481a96..2f76eea446 100644 --- a/src/test/ui/existential_types/generic_type_does_not_live_long_enough.stderr +++ b/src/test/ui/existential_types/generic_type_does_not_live_long_enough.stderr @@ -1,3 +1,9 @@ +error: at least one trait must be specified + --> $DIR/generic_type_does_not_live_long_enough.rs:9:35 + | +LL | existential type WrongGeneric: 'static; + | ^^^^^^^ + error[E0308]: mismatched types --> $DIR/generic_type_does_not_live_long_enough.rs:6:18 | @@ -22,7 +28,7 @@ note: ...so that the type `T` will meet its required lifetime bounds LL | existential type WrongGeneric: 'static; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 2 previous errors +error: aborting due to 3 previous errors -Some errors occurred: E0308, E0310. +Some errors have detailed explanations: E0308, E0310. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/existential_types/generic_underconstrained.rs b/src/test/ui/existential_types/generic_underconstrained.rs index 967faca067..cc0db893c6 100644 --- a/src/test/ui/existential_types/generic_underconstrained.rs +++ b/src/test/ui/existential_types/generic_underconstrained.rs @@ -4,6 +4,7 @@ fn main() {} trait Trait {} existential type Underconstrained: 'static; //~ ERROR the trait bound `T: Trait` +//~^ ERROR: at least one trait must be specified // no `Trait` bound fn underconstrain(_: T) -> Underconstrained { diff --git a/src/test/ui/existential_types/generic_underconstrained.stderr b/src/test/ui/existential_types/generic_underconstrained.stderr index 8551a939e8..35083a53eb 100644 --- a/src/test/ui/existential_types/generic_underconstrained.stderr +++ b/src/test/ui/existential_types/generic_underconstrained.stderr @@ -1,3 +1,9 @@ +error: at least one trait must be specified + --> $DIR/generic_underconstrained.rs:6:46 + | +LL | existential type Underconstrained: 'static; + | ^^^^^^^ + error[E0277]: the trait bound `T: Trait` is not satisfied --> $DIR/generic_underconstrained.rs:6:1 | @@ -7,6 +13,6 @@ LL | existential type Underconstrained: 'static; = help: consider adding a `where T: Trait` bound = note: the return type of a function must have a statically known size -error: aborting due to previous error +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/existential_types/generic_underconstrained2.rs b/src/test/ui/existential_types/generic_underconstrained2.rs index 98d9da832c..c6263eacd5 100644 --- a/src/test/ui/existential_types/generic_underconstrained2.rs +++ b/src/test/ui/existential_types/generic_underconstrained2.rs @@ -4,6 +4,7 @@ fn main() {} existential type Underconstrained: 'static; //~^ ERROR `U` doesn't implement `std::fmt::Debug` +//~^^ ERROR: at least one trait must be specified // not a defining use, because it doesn't define *all* possible generics fn underconstrained(_: U) -> Underconstrained { @@ -12,6 +13,7 @@ fn underconstrained(_: U) -> Underconstrained { existential type Underconstrained2: 'static; //~^ ERROR `V` doesn't implement `std::fmt::Debug` +//~^^ ERROR: at least one trait must be specified // not a defining use, because it doesn't define *all* possible generics fn underconstrained2(_: U, _: V) -> Underconstrained2 { diff --git a/src/test/ui/existential_types/generic_underconstrained2.stderr b/src/test/ui/existential_types/generic_underconstrained2.stderr index c7b6d6ade5..6ff783f33b 100644 --- a/src/test/ui/existential_types/generic_underconstrained2.stderr +++ b/src/test/ui/existential_types/generic_underconstrained2.stderr @@ -1,3 +1,15 @@ +error: at least one trait must be specified + --> $DIR/generic_underconstrained2.rs:5:56 + | +LL | existential type Underconstrained: 'static; + | ^^^^^^^ + +error: at least one trait must be specified + --> $DIR/generic_underconstrained2.rs:14:57 + | +LL | existential type Underconstrained2: 'static; + | ^^^^^^^ + error[E0277]: `U` doesn't implement `std::fmt::Debug` --> $DIR/generic_underconstrained2.rs:5:1 | @@ -9,7 +21,7 @@ LL | existential type Underconstrained: 'static; = note: the return type of a function must have a statically known size error[E0277]: `V` doesn't implement `std::fmt::Debug` - --> $DIR/generic_underconstrained2.rs:13:1 + --> $DIR/generic_underconstrained2.rs:14:1 | LL | existential type Underconstrained2: 'static; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `V` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` @@ -18,6 +30,6 @@ LL | existential type Underconstrained2: 'static; = help: consider adding a `where V: std::fmt::Debug` bound = note: the return type of a function must have a statically known size -error: aborting due to 2 previous errors +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/existential_types/issue-60655-latebound-regions.rs b/src/test/ui/existential_types/issue-60655-latebound-regions.rs new file mode 100644 index 0000000000..a4fe865012 --- /dev/null +++ b/src/test/ui/existential_types/issue-60655-latebound-regions.rs @@ -0,0 +1,30 @@ +// Test that existential types are allowed to contain late-bound regions. + +// compile-pass +// edition:2018 + +#![feature(async_await, existential_type)] + +use std::future::Future; + +pub existential type Func: Sized; + +// Late bound region should be allowed to escape the function, since it's bound +// in the type. +fn null_function_ptr() -> Func { + None:: fn(&'a ())> +} + +async fn async_nop(_: &u8) {} + +pub existential type ServeFut: Future; + +// Late bound regions occur in the generator witness type here. +fn serve() -> ServeFut { + async move { + let x = 5; + async_nop(&x).await + } +} + +fn main() {} diff --git a/src/test/ui/existential_types/nested_existential_types.rs b/src/test/ui/existential_types/nested_existential_types.rs index 62a4779991..6d2a12da7e 100644 --- a/src/test/ui/existential_types/nested_existential_types.rs +++ b/src/test/ui/existential_types/nested_existential_types.rs @@ -18,4 +18,3 @@ mod my_mod { fn main() { let _: my_mod::Foot = my_mod::get_foot(); } - diff --git a/src/test/ui/existential_types/never_reveal_concrete_type.stderr b/src/test/ui/existential_types/never_reveal_concrete_type.stderr index 81b6584ae9..7c195f1fad 100644 --- a/src/test/ui/existential_types/never_reveal_concrete_type.stderr +++ b/src/test/ui/existential_types/never_reveal_concrete_type.stderr @@ -17,5 +17,5 @@ LL | let _ = x as &'static str; error: aborting due to 2 previous errors -Some errors occurred: E0308, E0605. +Some errors have detailed explanations: E0308, E0605. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/existential_types/unused_generic_param.rs b/src/test/ui/existential_types/unused_generic_param.rs index 7af6508788..5455b39f4c 100644 --- a/src/test/ui/existential_types/unused_generic_param.rs +++ b/src/test/ui/existential_types/unused_generic_param.rs @@ -1,18 +1,17 @@ -// compile-pass #![feature(existential_type)] fn main() { } -// test that unused generic parameters are ok existential type PartiallyDefined: 'static; +//~^ ERROR: at least one trait must be specified fn partially_defined(_: T) -> PartiallyDefined { 4u32 } -// test that unused generic parameters are ok existential type PartiallyDefined2: 'static; +//~^ ERROR: at least one trait must be specified fn partially_defined2(_: T) -> PartiallyDefined2 { 4u32 diff --git a/src/test/ui/existential_types/unused_generic_param.stderr b/src/test/ui/existential_types/unused_generic_param.stderr new file mode 100644 index 0000000000..9d628d069d --- /dev/null +++ b/src/test/ui/existential_types/unused_generic_param.stderr @@ -0,0 +1,14 @@ +error: at least one trait must be specified + --> $DIR/unused_generic_param.rs:6:39 + | +LL | existential type PartiallyDefined: 'static; + | ^^^^^^^ + +error: at least one trait must be specified + --> $DIR/unused_generic_param.rs:13:40 + | +LL | existential type PartiallyDefined2: 'static; + | ^^^^^^^ + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/explore-issue-38412.stderr b/src/test/ui/explore-issue-38412.stderr index 5e5d952bce..ceeaaafc2b 100644 --- a/src/test/ui/explore-issue-38412.stderr +++ b/src/test/ui/explore-issue-38412.stderr @@ -1,17 +1,19 @@ -error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) +error[E0658]: use of unstable library feature 'unstable_undeclared' --> $DIR/explore-issue-38412.rs:21:63 | LL | let Record { a_stable_pub: _, a_unstable_declared_pub: _, a_unstable_undeclared_pub: _, .. } = | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38412 = help: add #![feature(unstable_undeclared)] to the crate attributes to enable -error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) +error[E0658]: use of unstable library feature 'unstable_undeclared' --> $DIR/explore-issue-38412.rs:30:5 | LL | r.a_unstable_undeclared_pub; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38412 = help: add #![feature(unstable_undeclared)] to the crate attributes to enable error[E0616]: field `b_crate` of struct `pub_and_stability::Record` is private @@ -32,12 +34,13 @@ error[E0616]: field `d_priv` of struct `pub_and_stability::Record` is private LL | r.d_priv; | ^^^^^^^^ -error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) +error[E0658]: use of unstable library feature 'unstable_undeclared' --> $DIR/explore-issue-38412.rs:37:5 | LL | t.2; | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38412 = help: add #![feature(unstable_undeclared)] to the crate attributes to enable error[E0616]: field `3` of struct `pub_and_stability::Tuple` is private @@ -58,20 +61,22 @@ error[E0616]: field `5` of struct `pub_and_stability::Tuple` is private LL | t.5; | ^^^ -error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) +error[E0658]: use of unstable library feature 'unstable_undeclared' --> $DIR/explore-issue-38412.rs:44:7 | LL | r.unstable_undeclared_trait_method(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38412 = help: add #![feature(unstable_undeclared)] to the crate attributes to enable -error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) +error[E0658]: use of unstable library feature 'unstable_undeclared' --> $DIR/explore-issue-38412.rs:48:7 | LL | r.unstable_undeclared(); | ^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38412 = help: add #![feature(unstable_undeclared)] to the crate attributes to enable error[E0624]: method `pub_crate` is private @@ -92,20 +97,22 @@ error[E0624]: method `private` is private LL | r.private(); | ^^^^^^^ -error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) +error[E0658]: use of unstable library feature 'unstable_undeclared' --> $DIR/explore-issue-38412.rs:57:7 | LL | t.unstable_undeclared_trait_method(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38412 = help: add #![feature(unstable_undeclared)] to the crate attributes to enable -error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) +error[E0658]: use of unstable library feature 'unstable_undeclared' --> $DIR/explore-issue-38412.rs:61:7 | LL | t.unstable_undeclared(); | ^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38412 = help: add #![feature(unstable_undeclared)] to the crate attributes to enable error[E0624]: method `pub_crate` is private @@ -128,5 +135,5 @@ LL | t.private(); error: aborting due to 19 previous errors -Some errors occurred: E0616, E0624, E0658. +Some errors have detailed explanations: E0616, E0624, E0658. For more information about an error, try `rustc --explain E0616`. diff --git a/src/test/ui/export.stderr b/src/test/ui/export.stderr index 76ec91e181..a3668a502c 100644 --- a/src/test/ui/export.stderr +++ b/src/test/ui/export.stderr @@ -30,5 +30,5 @@ LL | fn main() { foo::z(10); } error: aborting due to 5 previous errors -Some errors occurred: E0425, E0603. +Some errors have detailed explanations: E0425, E0603. For more information about an error, try `rustc --explain E0425`. diff --git a/src/test/ui/extern-prelude-fail.stderr b/src/test/ui/extern-prelude-fail.stderr index ad148c04d0..9cd56ea7f5 100644 --- a/src/test/ui/extern-prelude-fail.stderr +++ b/src/test/ui/extern-prelude-fail.stderr @@ -12,5 +12,5 @@ LL | let s = ::extern_prelude::S; error: aborting due to 2 previous errors -Some errors occurred: E0432, E0433. +Some errors have detailed explanations: E0432, E0433. For more information about an error, try `rustc --explain E0432`. diff --git a/src/test/ui/fat-ptr-cast.stderr b/src/test/ui/fat-ptr-cast.stderr index fb16024239..bb7a4d3ff7 100644 --- a/src/test/ui/fat-ptr-cast.stderr +++ b/src/test/ui/fat-ptr-cast.stderr @@ -66,5 +66,5 @@ LL | let mut fail: *const str = 0 as *const str; error: aborting due to 9 previous errors -Some errors occurred: E0605, E0606, E0607. +Some errors have detailed explanations: E0605, E0606, E0607. For more information about an error, try `rustc --explain E0605`. diff --git a/src/test/ui/feature-gate-optimize_attribute.rs b/src/test/ui/feature-gate-optimize_attribute.rs index c1f7510014..f252a3c153 100644 --- a/src/test/ui/feature-gate-optimize_attribute.rs +++ b/src/test/ui/feature-gate-optimize_attribute.rs @@ -1,17 +1,17 @@ #![crate_type="rlib"] -#![optimize(speed)] //~ ERROR #54882 +#![optimize(speed)] //~ ERROR #[optimize] attribute is an unstable feature -#[optimize(size)] //~ ERROR #54882 +#[optimize(size)] //~ ERROR #[optimize] attribute is an unstable feature mod module { -#[optimize(size)] //~ ERROR #54882 +#[optimize(size)] //~ ERROR #[optimize] attribute is an unstable feature fn size() {} -#[optimize(speed)] //~ ERROR #54882 +#[optimize(speed)] //~ ERROR #[optimize] attribute is an unstable feature fn speed() {} #[optimize(banana)] -//~^ ERROR #54882 +//~^ ERROR #[optimize] attribute is an unstable feature //~| ERROR E0722 fn not_known() {} diff --git a/src/test/ui/feature-gate-optimize_attribute.stderr b/src/test/ui/feature-gate-optimize_attribute.stderr index 7635af6ce4..5e7c0a708c 100644 --- a/src/test/ui/feature-gate-optimize_attribute.stderr +++ b/src/test/ui/feature-gate-optimize_attribute.stderr @@ -1,41 +1,46 @@ -error[E0658]: #[optimize] attribute is an unstable feature (see issue #54882) +error[E0658]: #[optimize] attribute is an unstable feature --> $DIR/feature-gate-optimize_attribute.rs:7:1 | LL | #[optimize(size)] | ^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54882 = help: add #![feature(optimize_attribute)] to the crate attributes to enable -error[E0658]: #[optimize] attribute is an unstable feature (see issue #54882) +error[E0658]: #[optimize] attribute is an unstable feature --> $DIR/feature-gate-optimize_attribute.rs:10:1 | LL | #[optimize(speed)] | ^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54882 = help: add #![feature(optimize_attribute)] to the crate attributes to enable -error[E0658]: #[optimize] attribute is an unstable feature (see issue #54882) +error[E0658]: #[optimize] attribute is an unstable feature --> $DIR/feature-gate-optimize_attribute.rs:13:1 | LL | #[optimize(banana)] | ^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54882 = help: add #![feature(optimize_attribute)] to the crate attributes to enable -error[E0658]: #[optimize] attribute is an unstable feature (see issue #54882) +error[E0658]: #[optimize] attribute is an unstable feature --> $DIR/feature-gate-optimize_attribute.rs:4:1 | LL | #[optimize(size)] | ^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54882 = help: add #![feature(optimize_attribute)] to the crate attributes to enable -error[E0658]: #[optimize] attribute is an unstable feature (see issue #54882) +error[E0658]: #[optimize] attribute is an unstable feature --> $DIR/feature-gate-optimize_attribute.rs:2:1 | LL | #![optimize(speed)] | ^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54882 = help: add #![feature(optimize_attribute)] to the crate attributes to enable error[E0722]: invalid argument @@ -46,5 +51,4 @@ LL | #[optimize(banana)] error: aborting due to 6 previous errors -Some errors occurred: E0658, E0722. -For more information about an error, try `rustc --explain E0658`. +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/feature-gate/allow-features-empty.rs b/src/test/ui/feature-gate/allow-features-empty.rs index 83250052cb..784a1d2697 100644 --- a/src/test/ui/feature-gate/allow-features-empty.rs +++ b/src/test/ui/feature-gate/allow-features-empty.rs @@ -7,4 +7,6 @@ #![feature(lang_items)] //~ ERROR +#![feature(unknown_stdlib_feature)] //~ ERROR + fn main() {} diff --git a/src/test/ui/feature-gate/allow-features-empty.stderr b/src/test/ui/feature-gate/allow-features-empty.stderr index cce2c4078c..ab41422ed0 100644 --- a/src/test/ui/feature-gate/allow-features-empty.stderr +++ b/src/test/ui/feature-gate/allow-features-empty.stderr @@ -16,6 +16,12 @@ error[E0725]: the feature `lang_items` is not in the list of allowed features LL | #![feature(lang_items)] | ^^^^^^^^^^ -error: aborting due to 3 previous errors +error[E0725]: the feature `unknown_stdlib_feature` is not in the list of allowed features + --> $DIR/allow-features-empty.rs:10:12 + | +LL | #![feature(unknown_stdlib_feature)] + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0725`. diff --git a/src/test/ui/feature-gate/allow-features.rs b/src/test/ui/feature-gate/allow-features.rs index 1cebc8f34f..de3439a5b6 100644 --- a/src/test/ui/feature-gate/allow-features.rs +++ b/src/test/ui/feature-gate/allow-features.rs @@ -7,4 +7,6 @@ #![feature(lang_items)] +#![feature(unknown_stdlib_feature)] //~ ERROR + fn main() {} diff --git a/src/test/ui/feature-gate/allow-features.stderr b/src/test/ui/feature-gate/allow-features.stderr index b13560fb81..5b39a6f053 100644 --- a/src/test/ui/feature-gate/allow-features.stderr +++ b/src/test/ui/feature-gate/allow-features.stderr @@ -4,6 +4,12 @@ error[E0725]: the feature `rustc_const_unstable` is not in the list of allowed f LL | #![feature(rustc_const_unstable)] | ^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error +error[E0725]: the feature `unknown_stdlib_feature` is not in the list of allowed features + --> $DIR/allow-features.rs:10:12 + | +LL | #![feature(unknown_stdlib_feature)] + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0725`. diff --git a/src/test/ui/feature-gate/await-macro.rs b/src/test/ui/feature-gate/await-macro.rs new file mode 100644 index 0000000000..291db9ba41 --- /dev/null +++ b/src/test/ui/feature-gate/await-macro.rs @@ -0,0 +1,12 @@ +// gate-test-await_macro +// edition:2018 + +#![feature(async_await)] + +async fn bar() {} + +async fn foo() { + await!(bar()); //~ ERROR `await!()` macro syntax is unstable, and will soon be removed +} + +fn main() {} diff --git a/src/test/ui/feature-gate/await-macro.stderr b/src/test/ui/feature-gate/await-macro.stderr new file mode 100644 index 0000000000..699a7a8886 --- /dev/null +++ b/src/test/ui/feature-gate/await-macro.stderr @@ -0,0 +1,12 @@ +error[E0658]: `await!()` macro syntax is unstable, and will soon be removed in favor of `.await` syntax. + --> $DIR/await-macro.rs:9:5 + | +LL | await!(bar()); + | ^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/50547 + = help: add #![feature(await_macro)] to the crate attributes to enable + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/feature-gate/feature-gate-c_variadic.rs b/src/test/ui/feature-gate/feature-gate-c_variadic.rs index 5801a2a89e..8b40c36c7d 100644 --- a/src/test/ui/feature-gate/feature-gate-c_variadic.rs +++ b/src/test/ui/feature-gate/feature-gate-c_variadic.rs @@ -1,4 +1,4 @@ #![crate_type="lib"] pub unsafe extern "C" fn test(_: i32, ap: ...) { } -//~^ C-varaidic functions are unstable +//~^ C-variadic functions are unstable diff --git a/src/test/ui/feature-gate/feature-gate-c_variadic.stderr b/src/test/ui/feature-gate/feature-gate-c_variadic.stderr index a876e16fde..4367dee55a 100644 --- a/src/test/ui/feature-gate/feature-gate-c_variadic.stderr +++ b/src/test/ui/feature-gate/feature-gate-c_variadic.stderr @@ -1,9 +1,10 @@ -error[E0658]: C-varaidic functions are unstable (see issue #44930) +error[E0658]: C-variadic functions are unstable --> $DIR/feature-gate-c_variadic.rs:3:1 | LL | pub unsafe extern "C" fn test(_: i32, ap: ...) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44930 = help: add #![feature(c_variadic)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gate/feature-gate-static-nobundle-2.stderr b/src/test/ui/feature-gate/feature-gate-static-nobundle-2.stderr index 419c21901a..4a653265f1 100644 --- a/src/test/ui/feature-gate/feature-gate-static-nobundle-2.stderr +++ b/src/test/ui/feature-gate/feature-gate-static-nobundle-2.stderr @@ -1,5 +1,6 @@ -error[E0658]: kind="static-nobundle" is feature gated (see issue #37403) +error[E0658]: kind="static-nobundle" is feature gated | + = note: for more information, see https://github.com/rust-lang/rust/issues/37403 = help: add #![feature(static_nobundle)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs index b1a8cba167..ca0a432d33 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs +++ b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs @@ -70,8 +70,6 @@ #![link()] #![link_name = "1900"] #![link_section = "1800"] -#![no_builtins] // Yikes, dupe'd on BUILTIN_ATTRIBUTES list (see "0300") -#![no_mangle] // Yikes, dupe'd on BUILTIN_ATTRIBUTES list (see "3500") // see issue-43106-gating-of-rustc_deprecated.rs #![must_use] // see issue-43106-gating-of-stable.rs diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr index c539e24c01..c7081205e1 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr @@ -29,157 +29,157 @@ LL | #![deny(x5100)] | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:101:8 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:99:8 | LL | #[warn(x5400)] | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:104:25 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:102:25 | LL | mod inner { #![warn(x5400)] } | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:107:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:105:12 | LL | #[warn(x5400)] fn f() { } | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:110:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:108:12 | LL | #[warn(x5400)] struct S; | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:113:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:111:12 | LL | #[warn(x5400)] type T = S; | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:116:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:114:12 | LL | #[warn(x5400)] impl S { } | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:120:9 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:118:9 | LL | #[allow(x5300)] | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:123:26 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:121:26 | LL | mod inner { #![allow(x5300)] } | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:126:13 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:124:13 | LL | #[allow(x5300)] fn f() { } | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:129:13 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:127:13 | LL | #[allow(x5300)] struct S; | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:132:13 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:130:13 | LL | #[allow(x5300)] type T = S; | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:135:13 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:133:13 | LL | #[allow(x5300)] impl S { } | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:139:10 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:137:10 | LL | #[forbid(x5200)] | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:142:27 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:140:27 | LL | mod inner { #![forbid(x5200)] } | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:145:14 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:143:14 | LL | #[forbid(x5200)] fn f() { } | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:148:14 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:146:14 | LL | #[forbid(x5200)] struct S; | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:151:14 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:149:14 | LL | #[forbid(x5200)] type T = S; | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:154:14 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:152:14 | LL | #[forbid(x5200)] impl S { } | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:158:8 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:156:8 | LL | #[deny(x5100)] | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:161:25 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:159:25 | LL | mod inner { #![deny(x5100)] } | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:164:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:162:12 | LL | #[deny(x5100)] fn f() { } | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:167:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:165:12 | LL | #[deny(x5100)] struct S; | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:170:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:168:12 | LL | #[deny(x5100)] type T = S; | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:173:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:171:12 | LL | #[deny(x5100)] impl S { } | ^^^^^ warning: macro_escape is a deprecated synonym for macro_use - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:457:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:455:1 | LL | #[macro_escape] | ^^^^^^^^^^^^^^^ warning: macro_escape is a deprecated synonym for macro_use - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:460:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:458:17 | LL | mod inner { #![macro_escape] } | ^^^^^^^^^^^^^^^^ @@ -187,7 +187,7 @@ LL | mod inner { #![macro_escape] } = help: consider an outer attribute, #[macro_use] mod ... warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:181:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:179:5 | LL | #[macro_use] fn f() { } | ^^^^^^^^^^^^ @@ -199,913 +199,913 @@ LL | #![warn(unused_attributes, unknown_lints)] | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:184:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:182:5 | LL | #[macro_use] struct S; | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:187:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:185:5 | LL | #[macro_use] type T = S; | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:190:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:188:5 | LL | #[macro_use] impl S { } | ^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:197:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:195:17 | LL | mod inner { #![macro_export] } | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:200:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:198:5 | LL | #[macro_export] fn f() { } | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:203:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:201:5 | LL | #[macro_export] struct S; | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:206:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:204:5 | LL | #[macro_export] type T = S; | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:209:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:207:5 | LL | #[macro_export] impl S { } | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:194:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:192:1 | LL | #[macro_export] | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:216:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:214:17 | LL | mod inner { #![plugin_registrar] } | ^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:221:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:219:5 | LL | #[plugin_registrar] struct S; | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:224:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:222:5 | LL | #[plugin_registrar] type T = S; | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:227:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:225:5 | LL | #[plugin_registrar] impl S { } | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:213:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:211:1 | LL | #[plugin_registrar] | ^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:234:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:232:17 | LL | mod inner { #![main] } | ^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:239:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:237:5 | LL | #[main] struct S; | ^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:242:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:240:5 | LL | #[main] type T = S; | ^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:245:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:243:5 | LL | #[main] impl S { } | ^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:231:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:229:1 | LL | #[main] | ^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:252:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:250:17 | LL | mod inner { #![start] } | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:257:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:255:5 | LL | #[start] struct S; | ^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:260:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:258:5 | LL | #[start] type T = S; | ^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:263:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:261:5 | LL | #[start] impl S { } | ^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:249:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:247:1 | LL | #[start] | ^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:316:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:314:5 | LL | #[path = "3800"] fn f() { } | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:319:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:317:5 | LL | #[path = "3800"] struct S; | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:322:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:320:5 | LL | #[path = "3800"] type T = S; | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:325:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:323:5 | LL | #[path = "3800"] impl S { } | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:332:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:330:17 | LL | mod inner { #![automatically_derived] } | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:335:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:333:5 | LL | #[automatically_derived] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:338:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:336:5 | LL | #[automatically_derived] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:341:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:339:5 | LL | #[automatically_derived] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:344:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:342:5 | LL | #[automatically_derived] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:329:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:327:1 | LL | #[automatically_derived] | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:364:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:362:17 | LL | mod inner { #![no_link] } | ^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:367:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:365:5 | LL | #[no_link] fn f() { } | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:370:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:368:5 | LL | #[no_link] struct S; | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:373:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:371:5 | LL | #[no_link]type T = S; | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:376:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:374:5 | LL | #[no_link] impl S { } | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:361:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:359:1 | LL | #[no_link] | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:383:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:381:17 | LL | mod inner { #![should_panic] } | ^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:386:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:384:5 | LL | #[should_panic] fn f() { } | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:389:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:387:5 | LL | #[should_panic] struct S; | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:392:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:390:5 | LL | #[should_panic] type T = S; | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:395:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:393:5 | LL | #[should_panic] impl S { } | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:380:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:378:1 | LL | #[should_panic] | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:402:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:400:17 | LL | mod inner { #![ignore] } | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:405:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:403:5 | LL | #[ignore] fn f() { } | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:408:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:406:5 | LL | #[ignore] struct S; | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:411:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:409:5 | LL | #[ignore] type T = S; | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:414:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:412:5 | LL | #[ignore] impl S { } | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:399:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:397:1 | LL | #[ignore] | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:421:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:419:17 | LL | mod inner { #![no_implicit_prelude] } | ^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:424:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:422:5 | LL | #[no_implicit_prelude] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:427:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:425:5 | LL | #[no_implicit_prelude] struct S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:430:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:428:5 | LL | #[no_implicit_prelude] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:433:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:431:5 | LL | #[no_implicit_prelude] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:418:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:416:1 | LL | #[no_implicit_prelude] | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:440:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:438:17 | LL | mod inner { #![reexport_test_harness_main="2900"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:443:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:441:5 | LL | #[reexport_test_harness_main = "2900"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:446:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:444:5 | LL | #[reexport_test_harness_main = "2900"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:449:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:447:5 | LL | #[reexport_test_harness_main = "2900"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:452:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:450:5 | LL | #[reexport_test_harness_main = "2900"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:437:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:435:1 | LL | #[reexport_test_harness_main = "2900"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:463:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:461:5 | LL | #[macro_escape] fn f() { } | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:466:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:464:5 | LL | #[macro_escape] struct S; | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:469:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:467:5 | LL | #[macro_escape] type T = S; | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:472:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:470:5 | LL | #[macro_escape] impl S { } | ^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:480:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:478:17 | LL | mod inner { #![no_std] } | ^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:480:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:478:17 | LL | mod inner { #![no_std] } | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:484:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:482:5 | LL | #[no_std] fn f() { } | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:484:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:482:5 | LL | #[no_std] fn f() { } | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:488:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:486:5 | LL | #[no_std] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:488:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:486:5 | LL | #[no_std] struct S; | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:492:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:490:5 | LL | #[no_std] type T = S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:492:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:490:5 | LL | #[no_std] type T = S; | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:496:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:494:5 | LL | #[no_std] impl S { } | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:496:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:494:5 | LL | #[no_std] impl S { } | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:476:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:474:1 | LL | #[no_std] | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:476:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:474:1 | LL | #[no_std] | ^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:635:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:633:17 | LL | mod inner { #![crate_name="0900"] } | ^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:635:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:633:17 | LL | mod inner { #![crate_name="0900"] } | ^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:639:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:637:5 | LL | #[crate_name = "0900"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:639:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:637:5 | LL | #[crate_name = "0900"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:643:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:641:5 | LL | #[crate_name = "0900"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:643:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:641:5 | LL | #[crate_name = "0900"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:647:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:645:5 | LL | #[crate_name = "0900"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:647:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:645:5 | LL | #[crate_name = "0900"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:651:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:649:5 | LL | #[crate_name = "0900"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:651:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:649:5 | LL | #[crate_name = "0900"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:631:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:629:1 | LL | #[crate_name = "0900"] | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:631:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:629:1 | LL | #[crate_name = "0900"] | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:660:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:658:17 | LL | mod inner { #![crate_type="0800"] } | ^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:660:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:658:17 | LL | mod inner { #![crate_type="0800"] } | ^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:664:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:662:5 | LL | #[crate_type = "0800"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:664:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:662:5 | LL | #[crate_type = "0800"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:668:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:666:5 | LL | #[crate_type = "0800"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:668:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:666:5 | LL | #[crate_type = "0800"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:672:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:670:5 | LL | #[crate_type = "0800"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:672:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:670:5 | LL | #[crate_type = "0800"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:676:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:674:5 | LL | #[crate_type = "0800"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:676:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:674:5 | LL | #[crate_type = "0800"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:656:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:654:1 | LL | #[crate_type = "0800"] | ^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:656:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:654:1 | LL | #[crate_type = "0800"] | ^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:685:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:683:17 | LL | mod inner { #![feature(x0600)] } | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:685:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:683:17 | LL | mod inner { #![feature(x0600)] } | ^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:689:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:687:5 | LL | #[feature(x0600)] fn f() { } | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:689:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:687:5 | LL | #[feature(x0600)] fn f() { } | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:693:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:691:5 | LL | #[feature(x0600)] struct S; | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:693:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:691:5 | LL | #[feature(x0600)] struct S; | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:697:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:695:5 | LL | #[feature(x0600)] type T = S; | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:697:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:695:5 | LL | #[feature(x0600)] type T = S; | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:701:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:699:5 | LL | #[feature(x0600)] impl S { } | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:701:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:699:5 | LL | #[feature(x0600)] impl S { } | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:681:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:679:1 | LL | #[feature(x0600)] | ^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:681:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:679:1 | LL | #[feature(x0600)] | ^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:711:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:709:17 | LL | mod inner { #![no_main] } | ^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:711:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:709:17 | LL | mod inner { #![no_main] } | ^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:715:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:713:5 | LL | #[no_main] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:715:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:713:5 | LL | #[no_main] fn f() { } | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:719:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:717:5 | LL | #[no_main] struct S; | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:719:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:717:5 | LL | #[no_main] struct S; | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:723:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:5 | LL | #[no_main] type T = S; | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:723:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:5 | LL | #[no_main] type T = S; | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:727:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:725:5 | LL | #[no_main] impl S { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:727:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:725:5 | LL | #[no_main] impl S { } | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:707:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:705:1 | LL | #[no_main] | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:707:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:705:1 | LL | #[no_main] | ^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:749:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:747:17 | LL | mod inner { #![recursion_limit="0200"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:749:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:747:17 | LL | mod inner { #![recursion_limit="0200"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:753:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:751:5 | LL | #[recursion_limit="0200"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:753:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:751:5 | LL | #[recursion_limit="0200"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:757:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:755:5 | LL | #[recursion_limit="0200"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:757:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:755:5 | LL | #[recursion_limit="0200"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:761:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:759:5 | LL | #[recursion_limit="0200"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:761:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:759:5 | LL | #[recursion_limit="0200"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:765:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:763:5 | LL | #[recursion_limit="0200"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:765:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:763:5 | LL | #[recursion_limit="0200"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:745:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:743:1 | LL | #[recursion_limit="0200"] | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:745:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:743:1 | LL | #[recursion_limit="0200"] | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:774:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:772:17 | LL | mod inner { #![type_length_limit="0100"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be in the root module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:774:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:772:17 | LL | mod inner { #![type_length_limit="0100"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:778:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:5 | LL | #[type_length_limit="0100"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:778:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:5 | LL | #[type_length_limit="0100"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:782:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:780:5 | LL | #[type_length_limit="0100"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:782:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:780:5 | LL | #[type_length_limit="0100"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:786:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:784:5 | LL | #[type_length_limit="0100"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:786:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:784:5 | LL | #[type_length_limit="0100"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:790:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:788:5 | LL | #[type_length_limit="0100"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:790:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:788:5 | LL | #[type_length_limit="0100"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:770:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:768:1 | LL | #[type_length_limit="0100"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:770:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:768:1 | LL | #[type_length_limit="0100"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/feature-gate/stability-attribute-consistency.stderr b/src/test/ui/feature-gate/stability-attribute-consistency.stderr index 191b25db3e..9b4b28a392 100644 --- a/src/test/ui/feature-gate/stability-attribute-consistency.stderr +++ b/src/test/ui/feature-gate/stability-attribute-consistency.stderr @@ -12,4 +12,3 @@ LL | #[unstable(feature = "foo", issue = "0")] error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0711`. diff --git a/src/test/ui/feature-gates/auxiliary/re_rebalance_coherence_lib.rs b/src/test/ui/feature-gates/auxiliary/re_rebalance_coherence_lib.rs index c8d027b25c..41b9d64d5f 100644 --- a/src/test/ui/feature-gates/auxiliary/re_rebalance_coherence_lib.rs +++ b/src/test/ui/feature-gates/auxiliary/re_rebalance_coherence_lib.rs @@ -1,5 +1,4 @@ - -pub trait Backend{} +pub trait Backend {} pub trait SupportsDefaultKeyword {} impl SupportsDefaultKeyword for Postgres {} diff --git a/src/test/ui/feature-gates/feature-gate-abi-msp430-interrupt.stderr b/src/test/ui/feature-gates/feature-gate-abi-msp430-interrupt.stderr index 6b3c169c99..0eb26ec829 100644 --- a/src/test/ui/feature-gates/feature-gate-abi-msp430-interrupt.stderr +++ b/src/test/ui/feature-gates/feature-gate-abi-msp430-interrupt.stderr @@ -1,9 +1,10 @@ -error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) +error[E0658]: msp430-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi-msp430-interrupt.rs:4:1 | LL | extern "msp430-interrupt" fn foo() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38487 = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-abi.stderr b/src/test/ui/feature-gates/feature-gate-abi.stderr index 7417f31092..e20ab0cb2f 100644 --- a/src/test/ui/feature-gates/feature-gate-abi.stderr +++ b/src/test/ui/feature-gates/feature-gate-abi.stderr @@ -6,12 +6,13 @@ LL | extern "rust-intrinsic" fn f1() {} | = help: add #![feature(intrinsics)] to the crate attributes to enable -error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) +error[E0658]: platform intrinsics are experimental and possibly buggy --> $DIR/feature-gate-abi.rs:13:1 | LL | extern "platform-intrinsic" fn f2() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/27731 = help: add #![feature(platform_intrinsics)] to the crate attributes to enable error[E0658]: vectorcall is experimental and subject to change @@ -22,36 +23,40 @@ LL | extern "vectorcall" fn f3() {} | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable -error[E0658]: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-abi.rs:15:1 | LL | extern "rust-call" fn f4() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) +error[E0658]: msp430-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:16:1 | LL | extern "msp430-interrupt" fn f5() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38487 = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable -error[E0658]: PTX ABIs are experimental and subject to change (see issue #38788) +error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:17:1 | LL | extern "ptx-kernel" fn f6() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38788 = help: add #![feature(abi_ptx)] to the crate attributes to enable -error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) +error[E0658]: x86-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:18:1 | LL | extern "x86-interrupt" fn f7() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/40180 = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable error[E0658]: thiscall is experimental and subject to change @@ -62,12 +67,13 @@ LL | extern "thiscall" fn f8() {} | = help: add #![feature(abi_thiscall)] to the crate attributes to enable -error[E0658]: amdgpu-kernel ABI is experimental and subject to change (see issue #51575) +error[E0658]: amdgpu-kernel ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:20:1 | LL | extern "amdgpu-kernel" fn f9() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51575 = help: add #![feature(abi_amdgpu_kernel)] to the crate attributes to enable error[E0658]: intrinsics are subject to change @@ -78,12 +84,13 @@ LL | extern "rust-intrinsic" fn m1(); | = help: add #![feature(intrinsics)] to the crate attributes to enable -error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) +error[E0658]: platform intrinsics are experimental and possibly buggy --> $DIR/feature-gate-abi.rs:25:5 | LL | extern "platform-intrinsic" fn m2(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/27731 = help: add #![feature(platform_intrinsics)] to the crate attributes to enable error[E0658]: vectorcall is experimental and subject to change @@ -94,36 +101,40 @@ LL | extern "vectorcall" fn m3(); | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable -error[E0658]: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-abi.rs:27:5 | LL | extern "rust-call" fn m4(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) +error[E0658]: msp430-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:28:5 | LL | extern "msp430-interrupt" fn m5(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38487 = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable -error[E0658]: PTX ABIs are experimental and subject to change (see issue #38788) +error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:29:5 | LL | extern "ptx-kernel" fn m6(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38788 = help: add #![feature(abi_ptx)] to the crate attributes to enable -error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) +error[E0658]: x86-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:30:5 | LL | extern "x86-interrupt" fn m7(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/40180 = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable error[E0658]: thiscall is experimental and subject to change @@ -134,12 +145,13 @@ LL | extern "thiscall" fn m8(); | = help: add #![feature(abi_thiscall)] to the crate attributes to enable -error[E0658]: amdgpu-kernel ABI is experimental and subject to change (see issue #51575) +error[E0658]: amdgpu-kernel ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:32:5 | LL | extern "amdgpu-kernel" fn m9(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51575 = help: add #![feature(abi_amdgpu_kernel)] to the crate attributes to enable error[E0658]: intrinsics are subject to change @@ -150,12 +162,13 @@ LL | extern "rust-intrinsic" fn dm1() {} | = help: add #![feature(intrinsics)] to the crate attributes to enable -error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) +error[E0658]: platform intrinsics are experimental and possibly buggy --> $DIR/feature-gate-abi.rs:35:5 | LL | extern "platform-intrinsic" fn dm2() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/27731 = help: add #![feature(platform_intrinsics)] to the crate attributes to enable error[E0658]: vectorcall is experimental and subject to change @@ -166,36 +179,40 @@ LL | extern "vectorcall" fn dm3() {} | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable -error[E0658]: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-abi.rs:37:5 | LL | extern "rust-call" fn dm4() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) +error[E0658]: msp430-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:38:5 | LL | extern "msp430-interrupt" fn dm5() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38487 = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable -error[E0658]: PTX ABIs are experimental and subject to change (see issue #38788) +error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:39:5 | LL | extern "ptx-kernel" fn dm6() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38788 = help: add #![feature(abi_ptx)] to the crate attributes to enable -error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) +error[E0658]: x86-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:40:5 | LL | extern "x86-interrupt" fn dm7() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/40180 = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable error[E0658]: thiscall is experimental and subject to change @@ -206,12 +223,13 @@ LL | extern "thiscall" fn dm8() {} | = help: add #![feature(abi_thiscall)] to the crate attributes to enable -error[E0658]: amdgpu-kernel ABI is experimental and subject to change (see issue #51575) +error[E0658]: amdgpu-kernel ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:42:5 | LL | extern "amdgpu-kernel" fn dm9() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51575 = help: add #![feature(abi_amdgpu_kernel)] to the crate attributes to enable error[E0658]: intrinsics are subject to change @@ -222,12 +240,13 @@ LL | extern "rust-intrinsic" fn m1() {} | = help: add #![feature(intrinsics)] to the crate attributes to enable -error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) +error[E0658]: platform intrinsics are experimental and possibly buggy --> $DIR/feature-gate-abi.rs:50:5 | LL | extern "platform-intrinsic" fn m2() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/27731 = help: add #![feature(platform_intrinsics)] to the crate attributes to enable error[E0658]: vectorcall is experimental and subject to change @@ -238,36 +257,40 @@ LL | extern "vectorcall" fn m3() {} | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable -error[E0658]: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-abi.rs:52:5 | LL | extern "rust-call" fn m4() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) +error[E0658]: msp430-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:53:5 | LL | extern "msp430-interrupt" fn m5() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38487 = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable -error[E0658]: PTX ABIs are experimental and subject to change (see issue #38788) +error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:54:5 | LL | extern "ptx-kernel" fn m6() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38788 = help: add #![feature(abi_ptx)] to the crate attributes to enable -error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) +error[E0658]: x86-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:55:5 | LL | extern "x86-interrupt" fn m7() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/40180 = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable error[E0658]: thiscall is experimental and subject to change @@ -278,12 +301,13 @@ LL | extern "thiscall" fn m8() {} | = help: add #![feature(abi_thiscall)] to the crate attributes to enable -error[E0658]: amdgpu-kernel ABI is experimental and subject to change (see issue #51575) +error[E0658]: amdgpu-kernel ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:57:5 | LL | extern "amdgpu-kernel" fn m9() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51575 = help: add #![feature(abi_amdgpu_kernel)] to the crate attributes to enable error[E0658]: intrinsics are subject to change @@ -294,12 +318,13 @@ LL | extern "rust-intrinsic" fn im1() {} | = help: add #![feature(intrinsics)] to the crate attributes to enable -error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) +error[E0658]: platform intrinsics are experimental and possibly buggy --> $DIR/feature-gate-abi.rs:63:5 | LL | extern "platform-intrinsic" fn im2() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/27731 = help: add #![feature(platform_intrinsics)] to the crate attributes to enable error[E0658]: vectorcall is experimental and subject to change @@ -310,36 +335,40 @@ LL | extern "vectorcall" fn im3() {} | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable -error[E0658]: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-abi.rs:65:5 | LL | extern "rust-call" fn im4() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) +error[E0658]: msp430-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:66:5 | LL | extern "msp430-interrupt" fn im5() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38487 = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable -error[E0658]: PTX ABIs are experimental and subject to change (see issue #38788) +error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:67:5 | LL | extern "ptx-kernel" fn im6() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38788 = help: add #![feature(abi_ptx)] to the crate attributes to enable -error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) +error[E0658]: x86-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:68:5 | LL | extern "x86-interrupt" fn im7() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/40180 = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable error[E0658]: thiscall is experimental and subject to change @@ -350,12 +379,13 @@ LL | extern "thiscall" fn im8() {} | = help: add #![feature(abi_thiscall)] to the crate attributes to enable -error[E0658]: amdgpu-kernel ABI is experimental and subject to change (see issue #51575) +error[E0658]: amdgpu-kernel ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:70:5 | LL | extern "amdgpu-kernel" fn im9() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51575 = help: add #![feature(abi_amdgpu_kernel)] to the crate attributes to enable error[E0658]: intrinsics are subject to change @@ -366,12 +396,13 @@ LL | type A1 = extern "rust-intrinsic" fn(); | = help: add #![feature(intrinsics)] to the crate attributes to enable -error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) +error[E0658]: platform intrinsics are experimental and possibly buggy --> $DIR/feature-gate-abi.rs:75:11 | LL | type A2 = extern "platform-intrinsic" fn(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/27731 = help: add #![feature(platform_intrinsics)] to the crate attributes to enable error[E0658]: vectorcall is experimental and subject to change @@ -382,36 +413,40 @@ LL | type A3 = extern "vectorcall" fn(); | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable -error[E0658]: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-abi.rs:77:11 | LL | type A4 = extern "rust-call" fn(); | ^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) +error[E0658]: msp430-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:78:11 | LL | type A5 = extern "msp430-interrupt" fn(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38487 = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable -error[E0658]: PTX ABIs are experimental and subject to change (see issue #38788) +error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:79:11 | LL | type A6 = extern "ptx-kernel" fn (); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38788 = help: add #![feature(abi_ptx)] to the crate attributes to enable -error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) +error[E0658]: x86-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:80:11 | LL | type A7 = extern "x86-interrupt" fn(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/40180 = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable error[E0658]: thiscall is experimental and subject to change @@ -422,12 +457,13 @@ LL | type A8 = extern "thiscall" fn(); | = help: add #![feature(abi_thiscall)] to the crate attributes to enable -error[E0658]: amdgpu-kernel ABI is experimental and subject to change (see issue #51575) +error[E0658]: amdgpu-kernel ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:82:11 | LL | type A9 = extern "amdgpu-kernel" fn(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51575 = help: add #![feature(abi_amdgpu_kernel)] to the crate attributes to enable error[E0658]: intrinsics are subject to change @@ -438,12 +474,13 @@ LL | extern "rust-intrinsic" {} | = help: add #![feature(intrinsics)] to the crate attributes to enable -error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) +error[E0658]: platform intrinsics are experimental and possibly buggy --> $DIR/feature-gate-abi.rs:86:1 | LL | extern "platform-intrinsic" {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/27731 = help: add #![feature(platform_intrinsics)] to the crate attributes to enable error[E0658]: vectorcall is experimental and subject to change @@ -454,36 +491,40 @@ LL | extern "vectorcall" {} | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable -error[E0658]: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-abi.rs:88:1 | LL | extern "rust-call" {} | ^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) +error[E0658]: msp430-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:89:1 | LL | extern "msp430-interrupt" {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38487 = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable -error[E0658]: PTX ABIs are experimental and subject to change (see issue #38788) +error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi.rs:90:1 | LL | extern "ptx-kernel" {} | ^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/38788 = help: add #![feature(abi_ptx)] to the crate attributes to enable -error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) +error[E0658]: x86-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:91:1 | LL | extern "x86-interrupt" {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/40180 = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable error[E0658]: thiscall is experimental and subject to change @@ -494,12 +535,13 @@ LL | extern "thiscall" {} | = help: add #![feature(abi_thiscall)] to the crate attributes to enable -error[E0658]: amdgpu-kernel ABI is experimental and subject to change (see issue #51575) +error[E0658]: amdgpu-kernel ABI is experimental and subject to change --> $DIR/feature-gate-abi.rs:93:1 | LL | extern "amdgpu-kernel" {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51575 = help: add #![feature(abi_amdgpu_kernel)] to the crate attributes to enable error: aborting due to 63 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-alloc-error-handler.rs b/src/test/ui/feature-gates/feature-gate-alloc-error-handler.rs index daa2bb5d6f..df7c3ad6b3 100644 --- a/src/test/ui/feature-gates/feature-gate-alloc-error-handler.rs +++ b/src/test/ui/feature-gates/feature-gate-alloc-error-handler.rs @@ -5,7 +5,7 @@ use core::alloc::Layout; -#[alloc_error_handler] //~ ERROR #[alloc_error_handler] is an unstable feature (see issue #51540) +#[alloc_error_handler] //~ ERROR #[alloc_error_handler] is an unstable feature fn oom(info: Layout) -> ! { loop {} } diff --git a/src/test/ui/feature-gates/feature-gate-alloc-error-handler.stderr b/src/test/ui/feature-gates/feature-gate-alloc-error-handler.stderr index 5e64ac50c3..cb01b5caf8 100644 --- a/src/test/ui/feature-gates/feature-gate-alloc-error-handler.stderr +++ b/src/test/ui/feature-gates/feature-gate-alloc-error-handler.stderr @@ -1,9 +1,10 @@ -error[E0658]: #[alloc_error_handler] is an unstable feature (see issue #51540) +error[E0658]: #[alloc_error_handler] is an unstable feature --> $DIR/feature-gate-alloc-error-handler.rs:8:1 | LL | #[alloc_error_handler] | ^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51540 = help: add #![feature(alloc_error_handler)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-allocator_internals.rs b/src/test/ui/feature-gates/feature-gate-allocator_internals.rs index 2045857e4c..a17d17da60 100644 --- a/src/test/ui/feature-gates/feature-gate-allocator_internals.rs +++ b/src/test/ui/feature-gates/feature-gate-allocator_internals.rs @@ -1,4 +1,3 @@ #![default_lib_allocator] //~ ERROR: attribute is an experimental feature fn main() {} - diff --git a/src/test/ui/feature-gates/feature-gate-allow_fail.stderr b/src/test/ui/feature-gates/feature-gate-allow_fail.stderr index 5de1706dd4..af7c8de61d 100644 --- a/src/test/ui/feature-gates/feature-gate-allow_fail.stderr +++ b/src/test/ui/feature-gates/feature-gate-allow_fail.stderr @@ -1,9 +1,10 @@ -error[E0658]: allow_fail attribute is currently unstable (see issue #46488) +error[E0658]: allow_fail attribute is currently unstable --> $DIR/feature-gate-allow_fail.rs:3:1 | LL | #[allow_fail] | ^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/46488 = help: add #![feature(allow_fail)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.stderr b/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.stderr index e1089bc345..8d061a9567 100644 --- a/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.stderr +++ b/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.stderr @@ -1,27 +1,30 @@ -error[E0658]: `Ptr` cannot be used as the type of `self` without the `arbitrary_self_types` feature (see issue #44874) +error[E0658]: `Ptr` cannot be used as the type of `self` without the `arbitrary_self_types` feature --> $DIR/feature-gate-arbitrary-self-types.rs:16:18 | LL | fn foo(self: Ptr); | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44874 = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` -error[E0658]: `Ptr` cannot be used as the type of `self` without the `arbitrary_self_types` feature (see issue #44874) +error[E0658]: `Ptr` cannot be used as the type of `self` without the `arbitrary_self_types` feature --> $DIR/feature-gate-arbitrary-self-types.rs:22:18 | LL | fn foo(self: Ptr) {} | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44874 = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` -error[E0658]: `std::boxed::Box>` cannot be used as the type of `self` without the `arbitrary_self_types` feature (see issue #44874) +error[E0658]: `std::boxed::Box>` cannot be used as the type of `self` without the `arbitrary_self_types` feature --> $DIR/feature-gate-arbitrary-self-types.rs:26:18 | LL | fn bar(self: Box>) {} | ^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44874 = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` diff --git a/src/test/ui/feature-gates/feature-gate-arbitrary_self_types-raw-pointer.stderr b/src/test/ui/feature-gates/feature-gate-arbitrary_self_types-raw-pointer.stderr index f35438f42f..eda2403e05 100644 --- a/src/test/ui/feature-gates/feature-gate-arbitrary_self_types-raw-pointer.stderr +++ b/src/test/ui/feature-gates/feature-gate-arbitrary_self_types-raw-pointer.stderr @@ -1,27 +1,30 @@ -error[E0658]: `*const Self` cannot be used as the type of `self` without the `arbitrary_self_types` feature (see issue #44874) +error[E0658]: `*const Self` cannot be used as the type of `self` without the `arbitrary_self_types` feature --> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:9:18 | LL | fn bar(self: *const Self); | ^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44874 = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` -error[E0658]: `*const Foo` cannot be used as the type of `self` without the `arbitrary_self_types` feature (see issue #44874) +error[E0658]: `*const Foo` cannot be used as the type of `self` without the `arbitrary_self_types` feature --> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:4:18 | LL | fn foo(self: *const Self) {} | ^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44874 = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` -error[E0658]: `*const ()` cannot be used as the type of `self` without the `arbitrary_self_types` feature (see issue #44874) +error[E0658]: `*const ()` cannot be used as the type of `self` without the `arbitrary_self_types` feature --> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:14:18 | LL | fn bar(self: *const Self) {} | ^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44874 = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` diff --git a/src/test/ui/feature-gates/feature-gate-asm.stderr b/src/test/ui/feature-gates/feature-gate-asm.stderr index 6ad0ea6731..ccaf34f016 100644 --- a/src/test/ui/feature-gates/feature-gate-asm.stderr +++ b/src/test/ui/feature-gates/feature-gate-asm.stderr @@ -1,9 +1,10 @@ -error[E0658]: inline assembly is not stable enough for use and is subject to change (see issue #29722) +error[E0658]: inline assembly is not stable enough for use and is subject to change --> $DIR/feature-gate-asm.rs:3:9 | LL | asm!(""); | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29722 = help: add #![feature(asm)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-asm2.stderr b/src/test/ui/feature-gates/feature-gate-asm2.stderr index 466f202819..cafe2be9d0 100644 --- a/src/test/ui/feature-gates/feature-gate-asm2.stderr +++ b/src/test/ui/feature-gates/feature-gate-asm2.stderr @@ -1,9 +1,10 @@ -error[E0658]: inline assembly is not stable enough for use and is subject to change (see issue #29722) +error[E0658]: inline assembly is not stable enough for use and is subject to change --> $DIR/feature-gate-asm2.rs:5:26 | LL | println!("{:?}", asm!("")); | ^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29722 = help: add #![feature(asm)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-assoc-type-defaults.stderr b/src/test/ui/feature-gates/feature-gate-assoc-type-defaults.stderr index fe206d3dfc..16b37cf29c 100644 --- a/src/test/ui/feature-gates/feature-gate-assoc-type-defaults.stderr +++ b/src/test/ui/feature-gates/feature-gate-assoc-type-defaults.stderr @@ -1,9 +1,10 @@ -error[E0658]: associated type defaults are unstable (see issue #29661) +error[E0658]: associated type defaults are unstable --> $DIR/feature-gate-assoc-type-defaults.rs:4:5 | LL | type Bar = u8; | ^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29661 = help: add #![feature(associated_type_defaults)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.rs b/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.rs index b6ab8ae0a9..801aeb82aa 100644 --- a/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.rs +++ b/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.rs @@ -1,7 +1,5 @@ // edition:2015 -#![feature(futures_api)] - async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition //~^ ERROR async fn is unstable diff --git a/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.stderr b/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.stderr index b67949b615..b419f1232d 100644 --- a/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.stderr +++ b/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.stderr @@ -1,30 +1,31 @@ error[E0670]: `async fn` is not permitted in the 2015 edition - --> $DIR/feature-gate-async-await-2015-edition.rs:5:1 + --> $DIR/feature-gate-async-await-2015-edition.rs:3:1 | LL | async fn foo() {} | ^^^^^ error[E0422]: cannot find struct, variant or union type `async` in this scope - --> $DIR/feature-gate-async-await-2015-edition.rs:9:13 + --> $DIR/feature-gate-async-await-2015-edition.rs:7:13 | LL | let _ = async {}; | ^^^^^ not found in this scope error[E0425]: cannot find value `async` in this scope - --> $DIR/feature-gate-async-await-2015-edition.rs:10:13 + --> $DIR/feature-gate-async-await-2015-edition.rs:8:13 | LL | let _ = async || { true }; | ^^^^^ not found in this scope -error[E0658]: async fn is unstable (see issue #50547) - --> $DIR/feature-gate-async-await-2015-edition.rs:5:1 +error[E0658]: async fn is unstable + --> $DIR/feature-gate-async-await-2015-edition.rs:3:1 | LL | async fn foo() {} | ^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/50547 = help: add #![feature(async_await)] to the crate attributes to enable error: aborting due to 4 previous errors -Some errors occurred: E0422, E0425, E0658, E0670. +Some errors have detailed explanations: E0422, E0425, E0658, E0670. For more information about an error, try `rustc --explain E0422`. diff --git a/src/test/ui/feature-gates/feature-gate-async-await.rs b/src/test/ui/feature-gates/feature-gate-async-await.rs index 7ee035644b..9cfefef412 100644 --- a/src/test/ui/feature-gates/feature-gate-async-await.rs +++ b/src/test/ui/feature-gates/feature-gate-async-await.rs @@ -1,6 +1,15 @@ // edition:2018 -#![feature(futures_api)] +struct S; + +impl S { + async fn foo() {} //~ ERROR async fn is unstable +} + +trait T { + async fn foo(); //~ ERROR trait fns cannot be declared `async` + //~^ ERROR async fn is unstable +} async fn foo() {} //~ ERROR async fn is unstable diff --git a/src/test/ui/feature-gates/feature-gate-async-await.stderr b/src/test/ui/feature-gates/feature-gate-async-await.stderr index beec28765c..43e41b4545 100644 --- a/src/test/ui/feature-gates/feature-gate-async-await.stderr +++ b/src/test/ui/feature-gates/feature-gate-async-await.stderr @@ -1,27 +1,54 @@ -error[E0658]: async fn is unstable (see issue #50547) - --> $DIR/feature-gate-async-await.rs:5:1 +error[E0706]: trait fns cannot be declared `async` + --> $DIR/feature-gate-async-await.rs:10:5 + | +LL | async fn foo(); + | ^^^^^^^^^^^^^^^ + +error[E0658]: async fn is unstable + --> $DIR/feature-gate-async-await.rs:6:5 + | +LL | async fn foo() {} + | ^^^^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/50547 + = help: add #![feature(async_await)] to the crate attributes to enable + +error[E0658]: async fn is unstable + --> $DIR/feature-gate-async-await.rs:10:5 + | +LL | async fn foo(); + | ^^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/50547 + = help: add #![feature(async_await)] to the crate attributes to enable + +error[E0658]: async fn is unstable + --> $DIR/feature-gate-async-await.rs:14:1 | LL | async fn foo() {} | ^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/50547 = help: add #![feature(async_await)] to the crate attributes to enable -error[E0658]: async blocks are unstable (see issue #50547) - --> $DIR/feature-gate-async-await.rs:8:13 +error[E0658]: async blocks are unstable + --> $DIR/feature-gate-async-await.rs:17:13 | LL | let _ = async {}; | ^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/50547 = help: add #![feature(async_await)] to the crate attributes to enable -error[E0658]: async closures are unstable (see issue #50547) - --> $DIR/feature-gate-async-await.rs:9:13 +error[E0658]: async closures are unstable + --> $DIR/feature-gate-async-await.rs:18:13 | LL | let _ = async || {}; | ^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/50547 = help: add #![feature(async_await)] to the crate attributes to enable -error: aborting due to 3 previous errors +error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/feature-gates/feature-gate-box-expr.stderr b/src/test/ui/feature-gates/feature-gate-box-expr.stderr index 7b20204287..9666793313 100644 --- a/src/test/ui/feature-gates/feature-gate-box-expr.stderr +++ b/src/test/ui/feature-gates/feature-gate-box-expr.stderr @@ -1,9 +1,10 @@ -error[E0658]: box expression syntax is experimental; you can call `Box::new` instead. (see issue #49733) +error[E0658]: box expression syntax is experimental; you can call `Box::new` instead --> $DIR/feature-gate-box-expr.rs:12:13 | LL | let x = box 'c'; | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/49733 = help: add #![feature(box_syntax)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-box_patterns.stderr b/src/test/ui/feature-gates/feature-gate-box_patterns.stderr index 39404aa39c..765b929de8 100644 --- a/src/test/ui/feature-gates/feature-gate-box_patterns.stderr +++ b/src/test/ui/feature-gates/feature-gate-box_patterns.stderr @@ -1,9 +1,10 @@ -error[E0658]: box pattern syntax is experimental (see issue #29641) +error[E0658]: box pattern syntax is experimental --> $DIR/feature-gate-box_patterns.rs:2:9 | LL | let box x = Box::new('c'); | ^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29641 = help: add #![feature(box_patterns)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-box_syntax.rs b/src/test/ui/feature-gates/feature-gate-box_syntax.rs index df0c604b2a..778660cc0b 100644 --- a/src/test/ui/feature-gates/feature-gate-box_syntax.rs +++ b/src/test/ui/feature-gates/feature-gate-box_syntax.rs @@ -2,5 +2,5 @@ fn main() { let x = box 3; - //~^ ERROR box expression syntax is experimental; you can call `Box::new` instead. + //~^ ERROR box expression syntax is experimental; you can call `Box::new` instead } diff --git a/src/test/ui/feature-gates/feature-gate-box_syntax.stderr b/src/test/ui/feature-gates/feature-gate-box_syntax.stderr index f144d11d89..a9cac7686e 100644 --- a/src/test/ui/feature-gates/feature-gate-box_syntax.stderr +++ b/src/test/ui/feature-gates/feature-gate-box_syntax.stderr @@ -1,9 +1,10 @@ -error[E0658]: box expression syntax is experimental; you can call `Box::new` instead. (see issue #49733) +error[E0658]: box expression syntax is experimental; you can call `Box::new` instead --> $DIR/feature-gate-box_syntax.rs:4:13 | LL | let x = box 3; | ^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/49733 = help: add #![feature(box_syntax)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic.rs b/src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic.rs index db1a7dad06..827ac3af8f 100644 --- a/src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic.rs +++ b/src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic.rs @@ -13,78 +13,78 @@ trait Sized {} trait Copy {} #[cfg(target_has_atomic = "8")] -//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change pub unsafe fn atomic_u8(x: *mut u8) { atomic_xadd(x, 1); atomic_xadd(x, 1); } #[cfg(target_has_atomic = "8")] -//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change pub unsafe fn atomic_i8(x: *mut i8) { atomic_xadd(x, 1); } #[cfg(target_has_atomic = "16")] -//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change pub unsafe fn atomic_u16(x: *mut u16) { atomic_xadd(x, 1); } #[cfg(target_has_atomic = "16")] -//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change pub unsafe fn atomic_i16(x: *mut i16) { atomic_xadd(x, 1); } #[cfg(target_has_atomic = "32")] -//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change pub unsafe fn atomic_u32(x: *mut u32) { atomic_xadd(x, 1); } #[cfg(target_has_atomic = "32")] -//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change pub unsafe fn atomic_i32(x: *mut i32) { atomic_xadd(x, 1); } #[cfg(target_has_atomic = "64")] -//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change pub unsafe fn atomic_u64(x: *mut u64) { atomic_xadd(x, 1); } #[cfg(target_has_atomic = "64")] -//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change pub unsafe fn atomic_i64(x: *mut i64) { atomic_xadd(x, 1); } #[cfg(target_has_atomic = "128")] -//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change pub unsafe fn atomic_u128(x: *mut u128) { atomic_xadd(x, 1); } #[cfg(target_has_atomic = "128")] -//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change pub unsafe fn atomic_i128(x: *mut i128) { atomic_xadd(x, 1); } #[cfg(target_has_atomic = "ptr")] -//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change pub unsafe fn atomic_usize(x: *mut usize) { atomic_xadd(x, 1); } #[cfg(target_has_atomic = "ptr")] -//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change pub unsafe fn atomic_isize(x: *mut isize) { atomic_xadd(x, 1); } fn main() { cfg!(target_has_atomic = "8"); - //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change cfg!(target_has_atomic = "16"); - //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change cfg!(target_has_atomic = "32"); - //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change cfg!(target_has_atomic = "64"); - //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change cfg!(target_has_atomic = "128"); - //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change cfg!(target_has_atomic = "ptr"); - //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change } diff --git a/src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic.stderr b/src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic.stderr index a2d5669bcd..995528efdd 100644 --- a/src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic.stderr +++ b/src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic.stderr @@ -1,145 +1,163 @@ -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:15:7 | LL | #[cfg(target_has_atomic = "8")] | ^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:21:7 | LL | #[cfg(target_has_atomic = "8")] | ^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:26:7 | LL | #[cfg(target_has_atomic = "16")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:31:7 | LL | #[cfg(target_has_atomic = "16")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:36:7 | LL | #[cfg(target_has_atomic = "32")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:41:7 | LL | #[cfg(target_has_atomic = "32")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:46:7 | LL | #[cfg(target_has_atomic = "64")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:51:7 | LL | #[cfg(target_has_atomic = "64")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:56:7 | LL | #[cfg(target_has_atomic = "128")] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:61:7 | LL | #[cfg(target_has_atomic = "128")] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:66:7 | LL | #[cfg(target_has_atomic = "ptr")] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:71:7 | LL | #[cfg(target_has_atomic = "ptr")] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:78:10 | LL | cfg!(target_has_atomic = "8"); | ^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:80:10 | LL | cfg!(target_has_atomic = "16"); | ^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:82:10 | LL | cfg!(target_has_atomic = "32"); | ^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:84:10 | LL | cfg!(target_has_atomic = "64"); | ^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:86:10 | LL | cfg!(target_has_atomic = "128"); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable -error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) +error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:88:10 | LL | cfg!(target_has_atomic = "ptr"); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32976 = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable error: aborting due to 18 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-cfg-target-thread-local.rs b/src/test/ui/feature-gates/feature-gate-cfg-target-thread-local.rs index 54db750058..d44f78d4fa 100644 --- a/src/test/ui/feature-gates/feature-gate-cfg-target-thread-local.rs +++ b/src/test/ui/feature-gates/feature-gate-cfg-target-thread-local.rs @@ -7,7 +7,7 @@ extern crate cfg_target_thread_local; extern { #[cfg_attr(target_thread_local, thread_local)] - //~^ `cfg(target_thread_local)` is experimental and subject to change (see issue #29594) + //~^ `cfg(target_thread_local)` is experimental and subject to change static FOO: u32; } diff --git a/src/test/ui/feature-gates/feature-gate-cfg-target-thread-local.stderr b/src/test/ui/feature-gates/feature-gate-cfg-target-thread-local.stderr index 672fb14871..3d24b21825 100644 --- a/src/test/ui/feature-gates/feature-gate-cfg-target-thread-local.stderr +++ b/src/test/ui/feature-gates/feature-gate-cfg-target-thread-local.stderr @@ -1,9 +1,10 @@ -error[E0658]: `cfg(target_thread_local)` is experimental and subject to change (see issue #29594) +error[E0658]: `cfg(target_thread_local)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-thread-local.rs:9:16 | LL | #[cfg_attr(target_thread_local, thread_local)] | ^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29594 = help: add #![feature(cfg_target_thread_local)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-compiler-builtins.rs b/src/test/ui/feature-gates/feature-gate-compiler-builtins.rs index 10a9749ee5..0d64f1fdcf 100644 --- a/src/test/ui/feature-gates/feature-gate-compiler-builtins.rs +++ b/src/test/ui/feature-gates/feature-gate-compiler-builtins.rs @@ -1,4 +1,3 @@ #![compiler_builtins] //~ ERROR the `#[compiler_builtins]` attribute is fn main() {} - diff --git a/src/test/ui/feature-gates/feature-gate-concat_idents.stderr b/src/test/ui/feature-gates/feature-gate-concat_idents.stderr index 3f4ce6d3b9..be8c727e2b 100644 --- a/src/test/ui/feature-gates/feature-gate-concat_idents.stderr +++ b/src/test/ui/feature-gates/feature-gate-concat_idents.stderr @@ -1,17 +1,19 @@ -error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) +error[E0658]: `concat_idents` is not stable enough for use and is subject to change --> $DIR/feature-gate-concat_idents.rs:5:13 | LL | let a = concat_idents!(X, Y_1); | ^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29599 = help: add #![feature(concat_idents)] to the crate attributes to enable -error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) +error[E0658]: `concat_idents` is not stable enough for use and is subject to change --> $DIR/feature-gate-concat_idents.rs:6:13 | LL | let b = concat_idents!(X, Y_2); | ^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29599 = help: add #![feature(concat_idents)] to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-concat_idents2.stderr b/src/test/ui/feature-gates/feature-gate-concat_idents2.stderr index 105b3d5cff..864ee63b20 100644 --- a/src/test/ui/feature-gates/feature-gate-concat_idents2.stderr +++ b/src/test/ui/feature-gates/feature-gate-concat_idents2.stderr @@ -1,9 +1,10 @@ -error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) +error[E0658]: `concat_idents` is not stable enough for use and is subject to change --> $DIR/feature-gate-concat_idents2.rs:4:5 | LL | concat_idents!(a, b); | ^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29599 = help: add #![feature(concat_idents)] to the crate attributes to enable error[E0425]: cannot find value `ab` in this scope @@ -14,5 +15,5 @@ LL | concat_idents!(a, b); error: aborting due to 2 previous errors -Some errors occurred: E0425, E0658. +Some errors have detailed explanations: E0425, E0658. For more information about an error, try `rustc --explain E0425`. diff --git a/src/test/ui/feature-gates/feature-gate-concat_idents3.stderr b/src/test/ui/feature-gates/feature-gate-concat_idents3.stderr index 9568b1d880..cb8725ab56 100644 --- a/src/test/ui/feature-gates/feature-gate-concat_idents3.stderr +++ b/src/test/ui/feature-gates/feature-gate-concat_idents3.stderr @@ -1,17 +1,19 @@ -error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) +error[E0658]: `concat_idents` is not stable enough for use and is subject to change --> $DIR/feature-gate-concat_idents3.rs:7:20 | LL | assert_eq!(10, concat_idents!(X, Y_1)); | ^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29599 = help: add #![feature(concat_idents)] to the crate attributes to enable -error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) +error[E0658]: `concat_idents` is not stable enough for use and is subject to change --> $DIR/feature-gate-concat_idents3.rs:8:20 | LL | assert_eq!(20, concat_idents!(X, Y_2)); | ^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29599 = help: add #![feature(concat_idents)] to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-const_fn.stderr b/src/test/ui/feature-gates/feature-gate-const_fn.stderr index 7f88d30acc..b4d64c2422 100644 --- a/src/test/ui/feature-gates/feature-gate-const_fn.stderr +++ b/src/test/ui/feature-gates/feature-gate-const_fn.stderr @@ -16,23 +16,25 @@ error[E0379]: trait fns cannot be declared const LL | const fn foo() -> u32 { 0 } | ^^^^^ trait fns cannot be const -error[E0658]: const fn is unstable (see issue #57563) +error[E0658]: const fn is unstable --> $DIR/feature-gate-const_fn.rs:6:5 | LL | const fn foo() -> u32; | ^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0658]: const fn is unstable (see issue #57563) +error[E0658]: const fn is unstable --> $DIR/feature-gate-const_fn.rs:8:5 | LL | const fn bar() -> u32 { 0 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error: aborting due to 5 previous errors -Some errors occurred: E0379, E0658. +Some errors have detailed explanations: E0379, E0658. For more information about an error, try `rustc --explain E0379`. diff --git a/src/test/ui/feature-gates/feature-gate-const_generics.stderr b/src/test/ui/feature-gates/feature-gate-const_generics.stderr index dce4000253..9ea04a1e20 100644 --- a/src/test/ui/feature-gates/feature-gate-const_generics.stderr +++ b/src/test/ui/feature-gates/feature-gate-const_generics.stderr @@ -1,17 +1,19 @@ -error[E0658]: const generics are unstable (see issue #44580) +error[E0658]: const generics are unstable --> $DIR/feature-gate-const_generics.rs:1:14 | LL | fn foo() {} | ^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44580 = help: add #![feature(const_generics)] to the crate attributes to enable -error[E0658]: const generics are unstable (see issue #44580) +error[E0658]: const generics are unstable --> $DIR/feature-gate-const_generics.rs:3:18 | LL | struct Foo([(); X]); | ^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44580 = help: add #![feature(const_generics)] to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-const_transmute.rs b/src/test/ui/feature-gates/feature-gate-const_transmute.rs index 3c4e6de0b1..6a5bbec77f 100644 --- a/src/test/ui/feature-gates/feature-gate-const_transmute.rs +++ b/src/test/ui/feature-gates/feature-gate-const_transmute.rs @@ -4,6 +4,6 @@ use std::mem; struct Foo(u32); const TRANSMUTED_U32: u32 = unsafe { mem::transmute(Foo(3)) }; -//~^ ERROR The use of std::mem::transmute() is gated in constants (see issue #53605) +//~^ ERROR The use of std::mem::transmute() is gated in constants fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-const_transmute.stderr b/src/test/ui/feature-gates/feature-gate-const_transmute.stderr index 2e07a9e7dd..c3cd313134 100644 --- a/src/test/ui/feature-gates/feature-gate-const_transmute.stderr +++ b/src/test/ui/feature-gates/feature-gate-const_transmute.stderr @@ -1,9 +1,10 @@ -error[E0658]: The use of std::mem::transmute() is gated in constants (see issue #53605) +error[E0658]: The use of std::mem::transmute() is gated in constants --> $DIR/feature-gate-const_transmute.rs:6:38 | LL | const TRANSMUTED_U32: u32 = unsafe { mem::transmute(Foo(3)) }; | ^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/53605 = help: add #![feature(const_transmute)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-crate_visibility_modifier.stderr b/src/test/ui/feature-gates/feature-gate-crate_visibility_modifier.stderr index 25b26de60e..4e70870ae7 100644 --- a/src/test/ui/feature-gates/feature-gate-crate_visibility_modifier.stderr +++ b/src/test/ui/feature-gates/feature-gate-crate_visibility_modifier.stderr @@ -1,9 +1,10 @@ -error[E0658]: `crate` visibility modifier is experimental (see issue #53120) +error[E0658]: `crate` visibility modifier is experimental --> $DIR/feature-gate-crate_visibility_modifier.rs:1:1 | LL | crate struct Bender { | ^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/53120 = help: add #![feature(crate_visibility_modifier)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-custom_attribute.stderr b/src/test/ui/feature-gates/feature-gate-custom_attribute.stderr index 8b79c752e4..9b81c38f86 100644 --- a/src/test/ui/feature-gates/feature-gate-custom_attribute.stderr +++ b/src/test/ui/feature-gates/feature-gate-custom_attribute.stderr @@ -1,105 +1,118 @@ -error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute.rs:7:3 | LL | #[fake_attr] | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute.rs:8:3 | LL | #[fake_attr(100)] | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute.rs:9:3 | LL | #[fake_attr(1, 2, 3)] | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute.rs:10:3 | LL | #[fake_attr("hello")] | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute.rs:11:3 | LL | #[fake_attr(name = "hello")] | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute.rs:12:3 | LL | #[fake_attr(1, "hi", key = 12, true, false)] | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute.rs:13:3 | LL | #[fake_attr(key = "hello", val = 10)] | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute.rs:14:3 | LL | #[fake_attr(key("hello"), val(10))] | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute.rs:15:3 | LL | #[fake_attr(enabled = true, disabled = false)] | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute.rs:16:3 | LL | #[fake_attr(true)] | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute.rs:17:3 | LL | #[fake_attr(pi = 3.14159)] | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute.rs:18:3 | LL | #[fake_attr(b"hi")] | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `fake_doc` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `fake_doc` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute.rs:19:3 | LL | #[fake_doc(r"doc")] | ^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable error: aborting due to 13 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-custom_attribute2.stderr b/src/test/ui/feature-gates/feature-gate-custom_attribute2.stderr index 560ceda348..8c8ac1233a 100644 --- a/src/test/ui/feature-gates/feature-gate-custom_attribute2.stderr +++ b/src/test/ui/feature-gates/feature-gate-custom_attribute2.stderr @@ -1,137 +1,154 @@ -error[E0658]: The attribute `lt_struct` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_struct` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute2.rs:6:13 | LL | struct StLt<#[lt_struct] 'a>(&'a u32); | ^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `ty_struct` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `ty_struct` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute2.rs:8:13 | LL | struct StTy<#[ty_struct] I>(I); | ^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `lt_enum` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_enum` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute2.rs:11:11 | LL | enum EnLt<#[lt_enum] 'b> { A(&'b u32), B } | ^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `ty_enum` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `ty_enum` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute2.rs:13:11 | LL | enum EnTy<#[ty_enum] J> { A(J), B } | ^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `lt_trait` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_trait` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute2.rs:16:12 | LL | trait TrLt<#[lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; } | ^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `ty_trait` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `ty_trait` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute2.rs:18:12 | LL | trait TrTy<#[ty_trait] K> { fn foo(&self, _: K); } | ^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `lt_type` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_type` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute2.rs:21:11 | LL | type TyLt<#[lt_type] 'd> = &'d u32; | ^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `ty_type` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `ty_type` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute2.rs:23:11 | LL | type TyTy<#[ty_type] L> = (L, ); | ^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `lt_inherent` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_inherent` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute2.rs:26:6 | LL | impl<#[lt_inherent] 'e> StLt<'e> { } | ^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `ty_inherent` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `ty_inherent` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute2.rs:28:6 | LL | impl<#[ty_inherent] M> StTy { } | ^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `lt_impl_for` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_impl_for` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute2.rs:31:6 | LL | impl<#[lt_impl_for] 'f> TrLt<'f> for StLt<'f> { | ^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `ty_impl_for` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `ty_impl_for` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute2.rs:35:6 | LL | impl<#[ty_impl_for] N> TrTy for StTy { | ^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `lt_fn` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_fn` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute2.rs:40:9 | LL | fn f_lt<#[lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } } | ^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `ty_fn` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `ty_fn` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute2.rs:42:9 | LL | fn f_ty<#[ty_fn] O>(_: O) { } | ^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `lt_meth` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_meth` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute2.rs:46:13 | LL | fn m_lt<#[lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } } | ^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `ty_meth` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `ty_meth` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute2.rs:48:13 | LL | fn m_ty<#[ty_meth] P>(_: P) { } | ^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `lt_hof` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `lt_hof` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/feature-gate-custom_attribute2.rs:53:19 | LL | where Q: for <#[lt_hof] 'i> Fn(&'i [u32]) -> &'i u32 | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable error: aborting due to 17 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr b/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr index bac23b3a60..e288af54cb 100644 --- a/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr +++ b/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr @@ -1,9 +1,10 @@ -error[E0658]: custom test frameworks are an unstable feature (see issue #50297) +error[E0658]: custom test frameworks are an unstable feature --> $DIR/feature-gate-custom_test_frameworks.rs:1:1 | LL | #![test_runner(main)] | ^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/50297 = help: add #![feature(custom_test_frameworks)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-decl_macro.rs b/src/test/ui/feature-gates/feature-gate-decl_macro.rs index ca0dafd0bf..d002c5dbbd 100644 --- a/src/test/ui/feature-gates/feature-gate-decl_macro.rs +++ b/src/test/ui/feature-gates/feature-gate-decl_macro.rs @@ -1,5 +1,5 @@ #![allow(unused_macros)] -macro m() {} //~ ERROR `macro` is experimental (see issue #39412) +macro m() {} //~ ERROR `macro` is experimental fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-decl_macro.stderr b/src/test/ui/feature-gates/feature-gate-decl_macro.stderr index 2d4b622843..808363a004 100644 --- a/src/test/ui/feature-gates/feature-gate-decl_macro.stderr +++ b/src/test/ui/feature-gates/feature-gate-decl_macro.stderr @@ -1,9 +1,10 @@ -error[E0658]: `macro` is experimental (see issue #39412) +error[E0658]: `macro` is experimental --> $DIR/feature-gate-decl_macro.rs:3:1 | LL | macro m() {} | ^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/39412 = help: add #![feature(decl_macro)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-doc_alias.stderr b/src/test/ui/feature-gates/feature-gate-doc_alias.stderr index c585a96adf..be85ae4b13 100644 --- a/src/test/ui/feature-gates/feature-gate-doc_alias.stderr +++ b/src/test/ui/feature-gates/feature-gate-doc_alias.stderr @@ -1,9 +1,10 @@ -error[E0658]: #[doc(alias = "...")] is experimental (see issue #50146) +error[E0658]: #[doc(alias = "...")] is experimental --> $DIR/feature-gate-doc_alias.rs:1:1 | LL | #[doc(alias = "foo")] | ^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/50146 = help: add #![feature(doc_alias)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-doc_cfg-cfg-rustdoc.stderr b/src/test/ui/feature-gates/feature-gate-doc_cfg-cfg-rustdoc.stderr index f018ff4a9d..0f84a1b11f 100644 --- a/src/test/ui/feature-gates/feature-gate-doc_cfg-cfg-rustdoc.stderr +++ b/src/test/ui/feature-gates/feature-gate-doc_cfg-cfg-rustdoc.stderr @@ -1,9 +1,10 @@ -error[E0658]: `cfg(rustdoc)` is experimental and subject to change (see issue #43781) +error[E0658]: `cfg(rustdoc)` is experimental and subject to change --> $DIR/feature-gate-doc_cfg-cfg-rustdoc.rs:1:7 | LL | #[cfg(rustdoc)] | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/43781 = help: add #![feature(doc_cfg)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-doc_cfg.stderr b/src/test/ui/feature-gates/feature-gate-doc_cfg.stderr index 2a0aa4ff3c..9e4aa6c7a0 100644 --- a/src/test/ui/feature-gates/feature-gate-doc_cfg.stderr +++ b/src/test/ui/feature-gates/feature-gate-doc_cfg.stderr @@ -1,9 +1,10 @@ -error[E0658]: #[doc(cfg(...))] is experimental (see issue #43781) +error[E0658]: #[doc(cfg(...))] is experimental --> $DIR/feature-gate-doc_cfg.rs:1:1 | LL | #[doc(cfg(unix))] | ^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/43781 = help: add #![feature(doc_cfg)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-doc_keyword.stderr b/src/test/ui/feature-gates/feature-gate-doc_keyword.stderr index c2cc1dceda..6e46478172 100644 --- a/src/test/ui/feature-gates/feature-gate-doc_keyword.stderr +++ b/src/test/ui/feature-gates/feature-gate-doc_keyword.stderr @@ -1,9 +1,10 @@ -error[E0658]: #[doc(keyword = "...")] is experimental (see issue #51315) +error[E0658]: #[doc(keyword = "...")] is experimental --> $DIR/feature-gate-doc_keyword.rs:1:1 | LL | #[doc(keyword = "match")] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51315 = help: add #![feature(doc_keyword)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-doc_masked.stderr b/src/test/ui/feature-gates/feature-gate-doc_masked.stderr index 77d3a6f6fb..d778d4d994 100644 --- a/src/test/ui/feature-gates/feature-gate-doc_masked.stderr +++ b/src/test/ui/feature-gates/feature-gate-doc_masked.stderr @@ -1,9 +1,10 @@ -error[E0658]: #[doc(masked)] is experimental (see issue #44027) +error[E0658]: #[doc(masked)] is experimental --> $DIR/feature-gate-doc_masked.rs:1:1 | LL | #[doc(masked)] | ^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44027 = help: add #![feature(doc_masked)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-doc_spotlight.stderr b/src/test/ui/feature-gates/feature-gate-doc_spotlight.stderr index 60f5c08218..2bf201f490 100644 --- a/src/test/ui/feature-gates/feature-gate-doc_spotlight.stderr +++ b/src/test/ui/feature-gates/feature-gate-doc_spotlight.stderr @@ -1,9 +1,10 @@ -error[E0658]: #[doc(spotlight)] is experimental (see issue #45040) +error[E0658]: #[doc(spotlight)] is experimental --> $DIR/feature-gate-doc_spotlight.rs:1:1 | LL | #[doc(spotlight)] | ^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/45040 = help: add #![feature(doc_spotlight)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-dropck-ugeh.stderr b/src/test/ui/feature-gates/feature-gate-dropck-ugeh.stderr index bc62fc01b4..9c7f7b2178 100644 --- a/src/test/ui/feature-gates/feature-gate-dropck-ugeh.stderr +++ b/src/test/ui/feature-gates/feature-gate-dropck-ugeh.stderr @@ -1,9 +1,10 @@ -error[E0658]: unsafe_destructor_blind_to_params has been replaced by may_dangle and will be removed in the future (see issue #28498) +error[E0658]: unsafe_destructor_blind_to_params has been replaced by may_dangle and will be removed in the future --> $DIR/feature-gate-dropck-ugeh.rs:16:5 | LL | #[unsafe_destructor_blind_to_params] // This is the UGEH attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/28498 = help: add #![feature(dropck_parametricity)] to the crate attributes to enable warning: use of deprecated attribute `dropck_parametricity`: unsafe_destructor_blind_to_params has been replaced by may_dangle and will be removed in the future. See https://github.com/rust-lang/rust/issues/34761 diff --git a/src/test/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr b/src/test/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr index afb402174f..0eb6da3b12 100644 --- a/src/test/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr +++ b/src/test/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr @@ -1,9 +1,10 @@ -error[E0658]: exclusive range pattern syntax is experimental (see issue #37854) +error[E0658]: exclusive range pattern syntax is experimental --> $DIR/feature-gate-exclusive-range-pattern.rs:3:9 | LL | 0 .. 3 => {} | ^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/37854 = help: add #![feature(exclusive_range_pattern)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.rs b/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.rs index dce8cf46ff..27ff5ace25 100644 --- a/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.rs +++ b/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.rs @@ -6,4 +6,3 @@ fn foo() -> Result { fn main() { let Ok(_x) = foo(); //~ ERROR refutable pattern in local binding } - diff --git a/src/test/ui/feature-gates/feature-gate-existential-type.stderr b/src/test/ui/feature-gates/feature-gate-existential-type.stderr index 6b8b850b5c..efaf29c00d 100644 --- a/src/test/ui/feature-gates/feature-gate-existential-type.stderr +++ b/src/test/ui/feature-gates/feature-gate-existential-type.stderr @@ -1,17 +1,19 @@ -error[E0658]: existential types are unstable (see issue #34511) +error[E0658]: existential types are unstable --> $DIR/feature-gate-existential-type.rs:3:1 | LL | existential type Foo: std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/34511 = help: add #![feature(existential_type)] to the crate attributes to enable -error[E0658]: existential types are unstable (see issue #34511) +error[E0658]: existential types are unstable --> $DIR/feature-gate-existential-type.rs:11:5 | LL | existential type Baa: std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/34511 = help: add #![feature(existential_type)] to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-extern_absolute_paths.stderr b/src/test/ui/feature-gates/feature-gate-extern_absolute_paths.stderr index e31d888f00..59b28704dd 100644 --- a/src/test/ui/feature-gates/feature-gate-extern_absolute_paths.stderr +++ b/src/test/ui/feature-gates/feature-gate-extern_absolute_paths.stderr @@ -12,5 +12,5 @@ LL | let _: u8 = ::core::default::Default(); error: aborting due to 2 previous errors -Some errors occurred: E0432, E0433. +Some errors have detailed explanations: E0432, E0433. For more information about an error, try `rustc --explain E0432`. diff --git a/src/test/ui/feature-gates/feature-gate-extern_types.stderr b/src/test/ui/feature-gates/feature-gate-extern_types.stderr index 7035d85ec2..18c0bae2c4 100644 --- a/src/test/ui/feature-gates/feature-gate-extern_types.stderr +++ b/src/test/ui/feature-gates/feature-gate-extern_types.stderr @@ -1,9 +1,10 @@ -error[E0658]: extern types are experimental (see issue #43467) +error[E0658]: extern types are experimental --> $DIR/feature-gate-extern_types.rs:2:5 | LL | type T; | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/43467 = help: add #![feature(extern_types)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-external_doc.stderr b/src/test/ui/feature-gates/feature-gate-external_doc.stderr index 16507bf596..79e4f8e9b6 100644 --- a/src/test/ui/feature-gates/feature-gate-external_doc.stderr +++ b/src/test/ui/feature-gates/feature-gate-external_doc.stderr @@ -1,9 +1,10 @@ -error[E0658]: #[doc(include = "...")] is experimental (see issue #44732) +error[E0658]: #[doc(include = "...")] is experimental --> $DIR/feature-gate-external_doc.rs:1:1 | LL | #[doc(include="asdf.md")] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44732 = help: add #![feature(external_doc)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.rs b/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.rs index d3df6e5a85..d118b7f4ff 100644 --- a/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.rs +++ b/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.rs @@ -1,7 +1,6 @@ -// ignore-tidy-linelength #![crate_type = "lib"] extern { - #[ffi_returns_twice] //~ ERROR the `#[ffi_returns_twice]` attribute is an experimental feature (see issue #58314) + #[ffi_returns_twice] //~ ERROR the `#[ffi_returns_twice]` attribute is an experimental feature pub fn foo(); } diff --git a/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.stderr b/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.stderr index f85ce8eeea..72e414eab9 100644 --- a/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.stderr +++ b/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.stderr @@ -1,9 +1,10 @@ -error[E0658]: the `#[ffi_returns_twice]` attribute is an experimental feature (see issue #58314) - --> $DIR/feature-gate-ffi_returns_twice.rs:5:5 +error[E0658]: the `#[ffi_returns_twice]` attribute is an experimental feature + --> $DIR/feature-gate-ffi_returns_twice.rs:4:5 | LL | #[ffi_returns_twice] | ^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/58314 = help: add #![feature(ffi_returns_twice)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-fundamental.stderr b/src/test/ui/feature-gates/feature-gate-fundamental.stderr index 9faf2a88a6..265b576bc7 100644 --- a/src/test/ui/feature-gates/feature-gate-fundamental.stderr +++ b/src/test/ui/feature-gates/feature-gate-fundamental.stderr @@ -1,9 +1,10 @@ -error[E0658]: the `#[fundamental]` attribute is an experimental feature (see issue #29635) +error[E0658]: the `#[fundamental]` attribute is an experimental feature --> $DIR/feature-gate-fundamental.rs:1:1 | LL | #[fundamental] | ^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29635 = help: add #![feature(fundamental)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-generators.stderr b/src/test/ui/feature-gates/feature-gate-generators.stderr index 554eeae8de..d85dc18d03 100644 --- a/src/test/ui/feature-gates/feature-gate-generators.stderr +++ b/src/test/ui/feature-gates/feature-gate-generators.stderr @@ -1,9 +1,10 @@ -error[E0658]: yield syntax is experimental (see issue #43122) +error[E0658]: yield syntax is experimental --> $DIR/feature-gate-generators.rs:2:5 | LL | yield true; | ^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/43122 = help: add #![feature(generators)] to the crate attributes to enable error[E0627]: yield statement outside of generator literal @@ -14,5 +15,4 @@ LL | yield true; error: aborting due to 2 previous errors -Some errors occurred: E0627, E0658. -For more information about an error, try `rustc --explain E0627`. +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr b/src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr index 8a207c966c..d37dd93983 100644 --- a/src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr +++ b/src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr @@ -1,57 +1,64 @@ -error[E0658]: generic associated types are unstable (see issue #44265) +error[E0658]: generic associated types are unstable --> $DIR/feature-gate-generic_associated_types.rs:4:5 | LL | type Pointer: Deref; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44265 = help: add #![feature(generic_associated_types)] to the crate attributes to enable -error[E0658]: generic associated types are unstable (see issue #44265) +error[E0658]: generic associated types are unstable --> $DIR/feature-gate-generic_associated_types.rs:6:5 | LL | type Pointer2: Deref where T: Clone, U: Clone; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44265 = help: add #![feature(generic_associated_types)] to the crate attributes to enable -error[E0658]: where clauses on associated types are unstable (see issue #44265) +error[E0658]: where clauses on associated types are unstable --> $DIR/feature-gate-generic_associated_types.rs:6:5 | LL | type Pointer2: Deref where T: Clone, U: Clone; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44265 = help: add #![feature(generic_associated_types)] to the crate attributes to enable -error[E0658]: generic associated types are unstable (see issue #44265) +error[E0658]: generic associated types are unstable --> $DIR/feature-gate-generic_associated_types.rs:14:5 | LL | type Pointer = Box; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44265 = help: add #![feature(generic_associated_types)] to the crate attributes to enable -error[E0658]: generic associated types are unstable (see issue #44265) +error[E0658]: generic associated types are unstable --> $DIR/feature-gate-generic_associated_types.rs:16:5 | LL | type Pointer2 = Box; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44265 = help: add #![feature(generic_associated_types)] to the crate attributes to enable -error[E0658]: where clauses on associated types are unstable (see issue #44265) +error[E0658]: where clauses on associated types are unstable --> $DIR/feature-gate-generic_associated_types.rs:21:5 | LL | type Assoc where Self: Sized; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44265 = help: add #![feature(generic_associated_types)] to the crate attributes to enable -error[E0658]: where clauses on associated types are unstable (see issue #44265) +error[E0658]: where clauses on associated types are unstable --> $DIR/feature-gate-generic_associated_types.rs:26:5 | LL | type Assoc where Self: Sized = Foo; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44265 = help: add #![feature(generic_associated_types)] to the crate attributes to enable error: aborting due to 7 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-global_asm.stderr b/src/test/ui/feature-gates/feature-gate-global_asm.stderr index fb9b47bd49..7d8abac399 100644 --- a/src/test/ui/feature-gates/feature-gate-global_asm.stderr +++ b/src/test/ui/feature-gates/feature-gate-global_asm.stderr @@ -1,9 +1,10 @@ -error[E0658]: `global_asm!` is not stable enough for use and is subject to change (see issue #35119) +error[E0658]: `global_asm!` is not stable enough for use and is subject to change --> $DIR/feature-gate-global_asm.rs:1:1 | LL | global_asm!(""); | ^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/35119 = help: add #![feature(global_asm)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-intrinsics.stderr b/src/test/ui/feature-gates/feature-gate-intrinsics.stderr index 5b032c6f1e..372af6ad92 100644 --- a/src/test/ui/feature-gates/feature-gate-intrinsics.stderr +++ b/src/test/ui/feature-gates/feature-gate-intrinsics.stderr @@ -24,5 +24,5 @@ LL | fn bar(); error: aborting due to 3 previous errors -Some errors occurred: E0093, E0658. +Some errors have detailed explanations: E0093, E0658. For more information about an error, try `rustc --explain E0093`. diff --git a/src/test/ui/feature-gates/feature-gate-is_sorted.stderr b/src/test/ui/feature-gates/feature-gate-is_sorted.stderr index 8230c1e3a3..1d5998641b 100644 --- a/src/test/ui/feature-gates/feature-gate-is_sorted.stderr +++ b/src/test/ui/feature-gates/feature-gate-is_sorted.stderr @@ -1,33 +1,37 @@ -error[E0658]: use of unstable library feature 'is_sorted': new API (see issue #53485) +error[E0658]: use of unstable library feature 'is_sorted': new API --> $DIR/feature-gate-is_sorted.rs:3:33 | LL | assert!([1, 2, 2, 9].iter().is_sorted()); | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/53485 = help: add #![feature(is_sorted)] to the crate attributes to enable -error[E0658]: use of unstable library feature 'is_sorted': new API (see issue #53485) +error[E0658]: use of unstable library feature 'is_sorted': new API --> $DIR/feature-gate-is_sorted.rs:5:39 | LL | assert!(![-2i32, -1, 0, 3].iter().is_sorted_by_key(|n| n.abs())); | ^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/53485 = help: add #![feature(is_sorted)] to the crate attributes to enable -error[E0658]: use of unstable library feature 'is_sorted': new API (see issue #53485) +error[E0658]: use of unstable library feature 'is_sorted': new API --> $DIR/feature-gate-is_sorted.rs:9:26 | LL | assert!([1, 2, 2, 9].is_sorted()); | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/53485 = help: add #![feature(is_sorted)] to the crate attributes to enable -error[E0658]: use of unstable library feature 'is_sorted': new API (see issue #53485) +error[E0658]: use of unstable library feature 'is_sorted': new API --> $DIR/feature-gate-is_sorted.rs:11:32 | LL | assert!(![-2i32, -1, 0, 3].is_sorted_by_key(|n| n.abs())); | ^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/53485 = help: add #![feature(is_sorted)] to the crate attributes to enable error: aborting due to 4 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-label_break_value.stderr b/src/test/ui/feature-gates/feature-gate-label_break_value.stderr index b23db3c216..40efc4dec4 100644 --- a/src/test/ui/feature-gates/feature-gate-label_break_value.stderr +++ b/src/test/ui/feature-gates/feature-gate-label_break_value.stderr @@ -1,9 +1,10 @@ -error[E0658]: labels on blocks are unstable (see issue #48594) +error[E0658]: labels on blocks are unstable --> $DIR/feature-gate-label_break_value.rs:2:5 | LL | 'a: { | ^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/48594 = help: add #![feature(label_break_value)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-lang-items.stderr b/src/test/ui/feature-gates/feature-gate-lang-items.stderr index f4c238d9f3..8fc1197ddf 100644 --- a/src/test/ui/feature-gates/feature-gate-lang-items.stderr +++ b/src/test/ui/feature-gates/feature-gate-lang-items.stderr @@ -14,5 +14,5 @@ LL | #[lang = "foo"] error: aborting due to 2 previous errors -Some errors occurred: E0522, E0658. +Some errors have detailed explanations: E0522, E0658. For more information about an error, try `rustc --explain E0522`. diff --git a/src/test/ui/feature-gates/feature-gate-link_args.stderr b/src/test/ui/feature-gates/feature-gate-link_args.stderr index c43377fe63..5267b56253 100644 --- a/src/test/ui/feature-gates/feature-gate-link_args.stderr +++ b/src/test/ui/feature-gates/feature-gate-link_args.stderr @@ -1,25 +1,28 @@ -error[E0658]: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596) +error[E0658]: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead --> $DIR/feature-gate-link_args.rs:12:1 | LL | #[link_args = "-l expected_use_case"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29596 = help: add #![feature(link_args)] to the crate attributes to enable -error[E0658]: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596) +error[E0658]: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead --> $DIR/feature-gate-link_args.rs:16:1 | LL | #[link_args = "-l unexected_use_on_non_extern_item"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29596 = help: add #![feature(link_args)] to the crate attributes to enable -error[E0658]: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596) +error[E0658]: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead --> $DIR/feature-gate-link_args.rs:9:1 | LL | #![link_args = "-l unexpected_use_as_inner_attr_on_mod"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29596 = help: add #![feature(link_args)] to the crate attributes to enable error: aborting due to 3 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-link_cfg.stderr b/src/test/ui/feature-gates/feature-gate-link_cfg.stderr index b5ac5fdb86..1648245d0b 100644 --- a/src/test/ui/feature-gates/feature-gate-link_cfg.stderr +++ b/src/test/ui/feature-gates/feature-gate-link_cfg.stderr @@ -1,9 +1,10 @@ -error[E0658]: is feature gated (see issue #37406) +error[E0658]: is feature gated --> $DIR/feature-gate-link_cfg.rs:1:1 | LL | #[link(name = "foo", cfg(foo))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/37406 = help: add #![feature(link_cfg)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-link_llvm_intrinsics.stderr b/src/test/ui/feature-gates/feature-gate-link_llvm_intrinsics.stderr index a6cfc99ecd..903696dc7c 100644 --- a/src/test/ui/feature-gates/feature-gate-link_llvm_intrinsics.stderr +++ b/src/test/ui/feature-gates/feature-gate-link_llvm_intrinsics.stderr @@ -1,9 +1,10 @@ -error[E0658]: linking to LLVM intrinsics is experimental (see issue #29602) +error[E0658]: linking to LLVM intrinsics is experimental --> $DIR/feature-gate-link_llvm_intrinsics.rs:3:5 | LL | fn sqrt(x: f32) -> f32; | ^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29602 = help: add #![feature(link_llvm_intrinsics)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-linkage.stderr b/src/test/ui/feature-gates/feature-gate-linkage.stderr index 1399a84faf..872c695120 100644 --- a/src/test/ui/feature-gates/feature-gate-linkage.stderr +++ b/src/test/ui/feature-gates/feature-gate-linkage.stderr @@ -1,9 +1,10 @@ -error[E0658]: the `linkage` attribute is experimental and not portable across platforms (see issue #29603) +error[E0658]: the `linkage` attribute is experimental and not portable across platforms --> $DIR/feature-gate-linkage.rs:2:5 | LL | #[linkage = "extern_weak"] static foo: isize; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29603 = help: add #![feature(linkage)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-lint-reasons.stderr b/src/test/ui/feature-gates/feature-gate-lint-reasons.stderr index 6a36d9fd5a..9e814a20d6 100644 --- a/src/test/ui/feature-gates/feature-gate-lint-reasons.stderr +++ b/src/test/ui/feature-gates/feature-gate-lint-reasons.stderr @@ -1,9 +1,10 @@ -error[E0658]: lint reasons are experimental (see issue #54503) +error[E0658]: lint reasons are experimental --> $DIR/feature-gate-lint-reasons.rs:1:28 | LL | #![warn(nonstandard_style, reason = "the standard should be respected")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54503 = help: add #![feature(lint_reasons)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-log_syntax.stderr b/src/test/ui/feature-gates/feature-gate-log_syntax.stderr index f29ee0b5a7..67bd48d3be 100644 --- a/src/test/ui/feature-gates/feature-gate-log_syntax.stderr +++ b/src/test/ui/feature-gates/feature-gate-log_syntax.stderr @@ -1,9 +1,10 @@ -error[E0658]: `log_syntax!` is not stable enough for use and is subject to change (see issue #29598) +error[E0658]: `log_syntax!` is not stable enough for use and is subject to change --> $DIR/feature-gate-log_syntax.rs:2:5 | LL | log_syntax!() | ^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29598 = help: add #![feature(log_syntax)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-log_syntax2.stderr b/src/test/ui/feature-gates/feature-gate-log_syntax2.stderr index c5a9b49372..ff0fa343c8 100644 --- a/src/test/ui/feature-gates/feature-gate-log_syntax2.stderr +++ b/src/test/ui/feature-gates/feature-gate-log_syntax2.stderr @@ -1,9 +1,10 @@ -error[E0658]: `log_syntax!` is not stable enough for use and is subject to change (see issue #29598) +error[E0658]: `log_syntax!` is not stable enough for use and is subject to change --> $DIR/feature-gate-log_syntax2.rs:4:22 | LL | println!("{:?}", log_syntax!()); | ^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29598 = help: add #![feature(log_syntax)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-macros_in_extern.stderr b/src/test/ui/feature-gates/feature-gate-macros_in_extern.stderr index affef0fe7d..891ed81107 100644 --- a/src/test/ui/feature-gates/feature-gate-macros_in_extern.stderr +++ b/src/test/ui/feature-gates/feature-gate-macros_in_extern.stderr @@ -1,25 +1,28 @@ -error[E0658]: macro invocations in `extern {}` blocks are experimental (see issue #49476) +error[E0658]: macro invocations in `extern {}` blocks are experimental --> $DIR/feature-gate-macros_in_extern.rs:19:5 | LL | returns_isize!(rust_get_test_int); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/49476 = help: add #![feature(macros_in_extern)] to the crate attributes to enable -error[E0658]: macro invocations in `extern {}` blocks are experimental (see issue #49476) +error[E0658]: macro invocations in `extern {}` blocks are experimental --> $DIR/feature-gate-macros_in_extern.rs:21:5 | LL | takes_u32_returns_u32!(rust_dbg_extern_identity_u32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/49476 = help: add #![feature(macros_in_extern)] to the crate attributes to enable -error[E0658]: macro invocations in `extern {}` blocks are experimental (see issue #49476) +error[E0658]: macro invocations in `extern {}` blocks are experimental --> $DIR/feature-gate-macros_in_extern.rs:23:5 | LL | emits_nothing!(); | ^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/49476 = help: add #![feature(macros_in_extern)] to the crate attributes to enable error: aborting due to 3 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-main.stderr b/src/test/ui/feature-gates/feature-gate-main.stderr index 870cf1aa28..4d2d01b49f 100644 --- a/src/test/ui/feature-gates/feature-gate-main.stderr +++ b/src/test/ui/feature-gates/feature-gate-main.stderr @@ -1,9 +1,10 @@ -error[E0658]: declaration of a nonstandard #[main] function may change over time, for now a top-level `fn main()` is required (see issue #29634) +error[E0658]: declaration of a nonstandard #[main] function may change over time, for now a top-level `fn main()` is required --> $DIR/feature-gate-main.rs:2:1 | LL | fn foo() {} | ^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29634 = help: add #![feature(main)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-marker_trait_attr.rs b/src/test/ui/feature-gates/feature-gate-marker_trait_attr.rs index 2b1b5bba6e..ea06c775b1 100644 --- a/src/test/ui/feature-gates/feature-gate-marker_trait_attr.rs +++ b/src/test/ui/feature-gates/feature-gate-marker_trait_attr.rs @@ -1,7 +1,7 @@ use std::fmt::{Debug, Display}; #[marker] trait ExplicitMarker {} -//~^ ERROR marker traits is an experimental feature (see issue #29864) +//~^ ERROR marker traits is an experimental feature impl ExplicitMarker for T {} impl ExplicitMarker for T {} diff --git a/src/test/ui/feature-gates/feature-gate-marker_trait_attr.stderr b/src/test/ui/feature-gates/feature-gate-marker_trait_attr.stderr index e916df18b6..3ed43b52e5 100644 --- a/src/test/ui/feature-gates/feature-gate-marker_trait_attr.stderr +++ b/src/test/ui/feature-gates/feature-gate-marker_trait_attr.stderr @@ -1,9 +1,10 @@ -error[E0658]: marker traits is an experimental feature (see issue #29864) +error[E0658]: marker traits is an experimental feature --> $DIR/feature-gate-marker_trait_attr.rs:3:1 | LL | #[marker] trait ExplicitMarker {} | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29864 = help: add #![feature(marker_trait_attr)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-may-dangle.stderr b/src/test/ui/feature-gates/feature-gate-may-dangle.stderr index 6d21147c9e..f93be3ed4e 100644 --- a/src/test/ui/feature-gates/feature-gate-may-dangle.stderr +++ b/src/test/ui/feature-gates/feature-gate-may-dangle.stderr @@ -1,9 +1,10 @@ -error[E0658]: may_dangle has unstable semantics and may be removed in the future (see issue #34761) +error[E0658]: may_dangle has unstable semantics and may be removed in the future --> $DIR/feature-gate-may-dangle.rs:6:13 | LL | unsafe impl<#[may_dangle] A> Drop for Pt { | ^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/34761 = help: add #![feature(dropck_eyepatch)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-min_const_fn.stderr b/src/test/ui/feature-gates/feature-gate-min_const_fn.stderr index f6666b40f3..f5155b424b 100644 --- a/src/test/ui/feature-gates/feature-gate-min_const_fn.stderr +++ b/src/test/ui/feature-gates/feature-gate-min_const_fn.stderr @@ -16,23 +16,25 @@ error[E0379]: trait fns cannot be declared const LL | const fn foo() -> u32 { 0 } | ^^^^^ trait fns cannot be const -error[E0658]: const fn is unstable (see issue #57563) +error[E0658]: const fn is unstable --> $DIR/feature-gate-min_const_fn.rs:6:5 | LL | const fn foo() -> u32; | ^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0658]: const fn is unstable (see issue #57563) +error[E0658]: const fn is unstable --> $DIR/feature-gate-min_const_fn.rs:8:5 | LL | const fn bar() -> u32 { 0 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error: aborting due to 5 previous errors -Some errors occurred: E0379, E0658. +Some errors have detailed explanations: E0379, E0658. For more information about an error, try `rustc --explain E0379`. diff --git a/src/test/ui/feature-gates/feature-gate-naked_functions.stderr b/src/test/ui/feature-gates/feature-gate-naked_functions.stderr index 2ff5ef101e..0ba4d551a6 100644 --- a/src/test/ui/feature-gates/feature-gate-naked_functions.stderr +++ b/src/test/ui/feature-gates/feature-gate-naked_functions.stderr @@ -1,17 +1,19 @@ -error[E0658]: the `#[naked]` attribute is an experimental feature (see issue #32408) +error[E0658]: the `#[naked]` attribute is an experimental feature --> $DIR/feature-gate-naked_functions.rs:1:1 | LL | #[naked] | ^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32408 = help: add #![feature(naked_functions)] to the crate attributes to enable -error[E0658]: the `#[naked]` attribute is an experimental feature (see issue #32408) +error[E0658]: the `#[naked]` attribute is an experimental feature --> $DIR/feature-gate-naked_functions.rs:5:1 | LL | #[naked] | ^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32408 = help: add #![feature(naked_functions)] to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-needs-allocator.rs b/src/test/ui/feature-gates/feature-gate-needs-allocator.rs index a3f91d02b3..08954944bc 100644 --- a/src/test/ui/feature-gates/feature-gate-needs-allocator.rs +++ b/src/test/ui/feature-gates/feature-gate-needs-allocator.rs @@ -1,4 +1,3 @@ #![needs_allocator] //~ ERROR the `#[needs_allocator]` attribute is fn main() {} - diff --git a/src/test/ui/feature-gates/feature-gate-never_type.stderr b/src/test/ui/feature-gates/feature-gate-never_type.stderr index 13166db213..45a6e6de18 100644 --- a/src/test/ui/feature-gates/feature-gate-never_type.stderr +++ b/src/test/ui/feature-gates/feature-gate-never_type.stderr @@ -1,41 +1,46 @@ -error[E0658]: The `!` type is experimental (see issue #35121) +error[E0658]: The `!` type is experimental --> $DIR/feature-gate-never_type.rs:7:17 | LL | type Ma = (u32, !, i32); | ^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/35121 = help: add #![feature(never_type)] to the crate attributes to enable -error[E0658]: The `!` type is experimental (see issue #35121) +error[E0658]: The `!` type is experimental --> $DIR/feature-gate-never_type.rs:8:20 | LL | type Meeshka = Vec; | ^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/35121 = help: add #![feature(never_type)] to the crate attributes to enable -error[E0658]: The `!` type is experimental (see issue #35121) +error[E0658]: The `!` type is experimental --> $DIR/feature-gate-never_type.rs:9:24 | LL | type Mow = &'static fn(!) -> !; | ^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/35121 = help: add #![feature(never_type)] to the crate attributes to enable -error[E0658]: The `!` type is experimental (see issue #35121) +error[E0658]: The `!` type is experimental --> $DIR/feature-gate-never_type.rs:10:27 | LL | type Skwoz = &'static mut !; | ^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/35121 = help: add #![feature(never_type)] to the crate attributes to enable -error[E0658]: The `!` type is experimental (see issue #35121) +error[E0658]: The `!` type is experimental --> $DIR/feature-gate-never_type.rs:13:16 | LL | type Wub = !; | ^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/35121 = help: add #![feature(never_type)] to the crate attributes to enable error: aborting due to 5 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-nll.rs b/src/test/ui/feature-gates/feature-gate-nll.rs index 14c48fb48a..ec5eacd162 100644 --- a/src/test/ui/feature-gates/feature-gate-nll.rs +++ b/src/test/ui/feature-gates/feature-gate-nll.rs @@ -1,18 +1,19 @@ -// This is a test checking that if you do not opt into NLL then you -// should not get the effects of NLL applied to the test. - -// Don't use 2018 edition, since that turns on NLL (migration mode). -// edition:2015 +// There isn't a great way to test feature(nll), since it just disables migrate +// mode and changes some error messages. We just test for migrate mode. // Don't use compare-mode=nll, since that turns on NLL. // ignore-compare-mode-nll +#![feature(rustc_attrs)] -#![allow(dead_code)] - -fn main() { - let mut x = 33; +#[rustc_error] +fn main() { //~ ERROR compilation successful + let mut x = (33, &0); - let p = &x; - x = 22; //~ ERROR cannot assign to `x` because it is borrowed [E0506] + let m = &mut x; + let p = &*x.1; + //~^ WARNING cannot borrow + //~| WARNING this error has been downgraded to a warning + //~| WARNING this warning will become a hard error in the future + m; } diff --git a/src/test/ui/feature-gates/feature-gate-nll.stderr b/src/test/ui/feature-gates/feature-gate-nll.stderr index cc004e3a1d..ac21241b30 100644 --- a/src/test/ui/feature-gates/feature-gate-nll.stderr +++ b/src/test/ui/feature-gates/feature-gate-nll.stderr @@ -1,11 +1,29 @@ -error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/feature-gate-nll.rs:17:5 +warning[E0502]: cannot borrow `*x.1` as immutable because it is also borrowed as mutable + --> $DIR/feature-gate-nll.rs:14:13 | -LL | let p = &x; - | - borrow of `x` occurs here -LL | x = 22; - | ^^^^^^ assignment to borrowed `x` occurs here +LL | let m = &mut x; + | ------ mutable borrow occurs here +LL | let p = &*x.1; + | ^^^^^ immutable borrow occurs here +... +LL | m; + | - mutable borrow later used here + | + = warning: this error has been downgraded to a warning for backwards compatibility with previous releases + = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + +error: compilation successful + --> $DIR/feature-gate-nll.rs:10:1 + | +LL | / fn main() { +LL | | let mut x = (33, &0); +LL | | +LL | | let m = &mut x; +... | +LL | | m; +LL | | } + | |_^ error: aborting due to previous error -For more information about this error, try `rustc --explain E0506`. +For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/feature-gates/feature-gate-no-debug.stderr b/src/test/ui/feature-gates/feature-gate-no-debug.stderr index 1ee2ec3c88..a58a75b70c 100644 --- a/src/test/ui/feature-gates/feature-gate-no-debug.stderr +++ b/src/test/ui/feature-gates/feature-gate-no-debug.stderr @@ -1,9 +1,10 @@ -error[E0658]: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand (see issue #29721) +error[E0658]: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand --> $DIR/feature-gate-no-debug.rs:3:1 | LL | #[no_debug] | ^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29721 = help: add #![feature(no_debug)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-no_core.stderr b/src/test/ui/feature-gates/feature-gate-no_core.stderr index 279f2198a8..e2f0fd68a7 100644 --- a/src/test/ui/feature-gates/feature-gate-no_core.stderr +++ b/src/test/ui/feature-gates/feature-gate-no_core.stderr @@ -1,9 +1,10 @@ -error[E0658]: no_core is experimental (see issue #29639) +error[E0658]: no_core is experimental --> $DIR/feature-gate-no_core.rs:3:1 | LL | #![no_core] | ^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29639 = help: add #![feature(no_core)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-non_ascii_idents.stderr b/src/test/ui/feature-gates/feature-gate-non_ascii_idents.stderr index 5e4c4649d0..1d78b87a3e 100644 --- a/src/test/ui/feature-gates/feature-gate-non_ascii_idents.stderr +++ b/src/test/ui/feature-gates/feature-gate-non_ascii_idents.stderr @@ -1,105 +1,118 @@ -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/feature-gate-non_ascii_idents.rs:1:22 | LL | extern crate core as bäz; | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/feature-gate-non_ascii_idents.rs:3:5 | LL | use föö::bar; | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/feature-gate-non_ascii_idents.rs:5:5 | LL | mod föö { | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/feature-gate-non_ascii_idents.rs:9:4 | LL | fn bär( | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/feature-gate-non_ascii_idents.rs:10:5 | LL | bäz: isize | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/feature-gate-non_ascii_idents.rs:12:9 | LL | let _ö: isize; | ^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/feature-gate-non_ascii_idents.rs:15:10 | LL | (_ä, _) => {} | ^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/feature-gate-non_ascii_idents.rs:19:8 | LL | struct Föö { | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/feature-gate-non_ascii_idents.rs:20:5 | LL | föö: isize | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/feature-gate-non_ascii_idents.rs:23:6 | LL | enum Bär { | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/feature-gate-non_ascii_idents.rs:24:5 | LL | Bäz { | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/feature-gate-non_ascii_idents.rs:25:9 | LL | qüx: isize | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/feature-gate-non_ascii_idents.rs:30:8 | LL | fn qüx(); | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable error: aborting due to 13 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-non_exhaustive.rs b/src/test/ui/feature-gates/feature-gate-non_exhaustive.rs index b3e2e3d95f..aca214d193 100644 --- a/src/test/ui/feature-gates/feature-gate-non_exhaustive.rs +++ b/src/test/ui/feature-gates/feature-gate-non_exhaustive.rs @@ -1,6 +1,6 @@ //#![feature(non_exhaustive)] -#[non_exhaustive] //~ERROR non exhaustive is an experimental feature (see issue #44109) +#[non_exhaustive] //~ERROR non exhaustive is an experimental feature pub enum NonExhaustiveEnum { Unit, Tuple(u32), diff --git a/src/test/ui/feature-gates/feature-gate-non_exhaustive.stderr b/src/test/ui/feature-gates/feature-gate-non_exhaustive.stderr index 524f77902f..fdb1ffb0a9 100644 --- a/src/test/ui/feature-gates/feature-gate-non_exhaustive.stderr +++ b/src/test/ui/feature-gates/feature-gate-non_exhaustive.stderr @@ -1,9 +1,10 @@ -error[E0658]: non exhaustive is an experimental feature (see issue #44109) +error[E0658]: non exhaustive is an experimental feature --> $DIR/feature-gate-non_exhaustive.rs:3:1 | LL | #[non_exhaustive] | ^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44109 = help: add #![feature(non_exhaustive)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-on-unimplemented.stderr b/src/test/ui/feature-gates/feature-gate-on-unimplemented.stderr index 32bfb20d5e..044a9a398d 100644 --- a/src/test/ui/feature-gates/feature-gate-on-unimplemented.stderr +++ b/src/test/ui/feature-gates/feature-gate-on-unimplemented.stderr @@ -1,9 +1,10 @@ -error[E0658]: the `#[rustc_on_unimplemented]` attribute is an experimental feature (see issue #29628) +error[E0658]: the `#[rustc_on_unimplemented]` attribute is an experimental feature --> $DIR/feature-gate-on-unimplemented.rs:4:1 | LL | #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}`"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29628 = help: add #![feature(on_unimplemented)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-optin-builtin-traits.stderr b/src/test/ui/feature-gates/feature-gate-optin-builtin-traits.stderr index e5d0a8681f..baad1627d9 100644 --- a/src/test/ui/feature-gates/feature-gate-optin-builtin-traits.stderr +++ b/src/test/ui/feature-gates/feature-gate-optin-builtin-traits.stderr @@ -1,17 +1,19 @@ -error[E0658]: auto traits are experimental and possibly buggy (see issue #13231) +error[E0658]: auto traits are experimental and possibly buggy --> $DIR/feature-gate-optin-builtin-traits.rs:6:1 | LL | auto trait AutoDummyTrait {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/13231 = help: add #![feature(optin_builtin_traits)] to the crate attributes to enable -error[E0658]: negative trait bounds are not yet fully implemented; use marker types for now (see issue #13231) +error[E0658]: negative trait bounds are not yet fully implemented; use marker types for now --> $DIR/feature-gate-optin-builtin-traits.rs:9:1 | LL | impl !AutoDummyTrait for DummyStruct {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/13231 = help: add #![feature(optin_builtin_traits)] to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-plugin.stderr b/src/test/ui/feature-gates/feature-gate-plugin.stderr index 0feebb6f0e..5ac4120188 100644 --- a/src/test/ui/feature-gates/feature-gate-plugin.stderr +++ b/src/test/ui/feature-gates/feature-gate-plugin.stderr @@ -1,9 +1,10 @@ -error[E0658]: compiler plugins are experimental and possibly buggy (see issue #29597) +error[E0658]: compiler plugins are experimental and possibly buggy --> $DIR/feature-gate-plugin.rs:3:1 | LL | #![plugin(foo)] | ^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29597 = help: add #![feature(plugin)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-plugin_registrar.stderr b/src/test/ui/feature-gates/feature-gate-plugin_registrar.stderr index 6464d4087b..941a6c49d1 100644 --- a/src/test/ui/feature-gates/feature-gate-plugin_registrar.stderr +++ b/src/test/ui/feature-gates/feature-gate-plugin_registrar.stderr @@ -1,9 +1,10 @@ -error[E0658]: compiler plugins are experimental and possibly buggy (see issue #29597) +error[E0658]: compiler plugins are experimental and possibly buggy --> $DIR/feature-gate-plugin_registrar.rs:6:1 | LL | pub fn registrar() {} | ^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29597 = help: add #![feature(plugin_registrar)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-repr-simd.stderr b/src/test/ui/feature-gates/feature-gate-repr-simd.stderr index c47ce70eaa..fd3176e573 100644 --- a/src/test/ui/feature-gates/feature-gate-repr-simd.stderr +++ b/src/test/ui/feature-gates/feature-gate-repr-simd.stderr @@ -1,17 +1,19 @@ -error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) +error[E0658]: SIMD types are experimental and possibly buggy --> $DIR/feature-gate-repr-simd.rs:1:1 | LL | #[repr(simd)] | ^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/27731 = help: add #![feature(repr_simd)] to the crate attributes to enable -error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) +error[E0658]: SIMD types are experimental and possibly buggy --> $DIR/feature-gate-repr-simd.rs:5:1 | LL | #[repr(simd)] | ^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/27731 = help: add #![feature(repr_simd)] to the crate attributes to enable warning[E0566]: conflicting representation hints @@ -24,5 +26,4 @@ LL | #[repr(simd)] error: aborting due to 2 previous errors -Some errors occurred: E0566, E0658. -For more information about an error, try `rustc --explain E0566`. +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/feature-gates/feature-gate-repr128.stderr b/src/test/ui/feature-gates/feature-gate-repr128.stderr index a2fd659359..30433447a2 100644 --- a/src/test/ui/feature-gates/feature-gate-repr128.stderr +++ b/src/test/ui/feature-gates/feature-gate-repr128.stderr @@ -1,4 +1,4 @@ -error[E0658]: repr with 128-bit type is unstable (see issue #35118) +error[E0658]: repr with 128-bit type is unstable --> $DIR/feature-gate-repr128.rs:2:1 | LL | / enum A { @@ -6,6 +6,7 @@ LL | | A(u64) LL | | } | |_^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/35118 = help: add #![feature(repr128)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-repr_align_enum.rs b/src/test/ui/feature-gates/feature-gate-repr_align_enum.rs index f8e68a9de0..8b68caa6f5 100644 --- a/src/test/ui/feature-gates/feature-gate-repr_align_enum.rs +++ b/src/test/ui/feature-gates/feature-gate-repr_align_enum.rs @@ -1,7 +1,7 @@ #[repr(align(16))] struct Foo(u64); -#[repr(align(8))] //~ ERROR `#[repr(align(x))]` on enums is experimental (see issue #57996) +#[repr(align(8))] //~ ERROR `#[repr(align(x))]` on enums is experimental enum Bar { Foo { foo: Foo }, Baz, diff --git a/src/test/ui/feature-gates/feature-gate-repr_align_enum.stderr b/src/test/ui/feature-gates/feature-gate-repr_align_enum.stderr index ae4066ceb8..36924f4c16 100644 --- a/src/test/ui/feature-gates/feature-gate-repr_align_enum.stderr +++ b/src/test/ui/feature-gates/feature-gate-repr_align_enum.stderr @@ -1,9 +1,10 @@ -error[E0658]: `#[repr(align(x))]` on enums is experimental (see issue #57996) +error[E0658]: `#[repr(align(x))]` on enums is experimental --> $DIR/feature-gate-repr_align_enum.rs:4:1 | LL | #[repr(align(8))] | ^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/57996 = help: add #![feature(repr_align_enum)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-rustc-attrs-1.stderr b/src/test/ui/feature-gates/feature-gate-rustc-attrs-1.stderr index 73cd28fe74..882feb87f4 100644 --- a/src/test/ui/feature-gates/feature-gate-rustc-attrs-1.stderr +++ b/src/test/ui/feature-gates/feature-gate-rustc-attrs-1.stderr @@ -1,17 +1,19 @@ -error[E0658]: the `#[rustc_variance]` attribute is just used for rustc unit tests and will never be stable (see issue #29642) +error[E0658]: the `#[rustc_variance]` attribute is just used for rustc unit tests and will never be stable --> $DIR/feature-gate-rustc-attrs-1.rs:5:1 | LL | #[rustc_variance] | ^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(rustc_attrs)] to the crate attributes to enable -error[E0658]: the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable (see issue #29642) +error[E0658]: the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable --> $DIR/feature-gate-rustc-attrs-1.rs:6:1 | LL | #[rustc_error] | ^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(rustc_attrs)] to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-rustc-attrs.stderr b/src/test/ui/feature-gates/feature-gate-rustc-attrs.stderr index 40e6d6d925..3c823c8d4e 100644 --- a/src/test/ui/feature-gates/feature-gate-rustc-attrs.stderr +++ b/src/test/ui/feature-gates/feature-gate-rustc-attrs.stderr @@ -1,9 +1,10 @@ -error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics (see issue #29642) +error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics --> $DIR/feature-gate-rustc-attrs.rs:3:3 | LL | #[rustc_foo] | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(rustc_attrs)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-rustc_const_unstable.rs b/src/test/ui/feature-gates/feature-gate-rustc_const_unstable.rs index a85f2f4ad3..6961e68744 100644 --- a/src/test/ui/feature-gates/feature-gate-rustc_const_unstable.rs +++ b/src/test/ui/feature-gates/feature-gate-rustc_const_unstable.rs @@ -10,4 +10,3 @@ pub const fn bazinga() {} fn main() { } - diff --git a/src/test/ui/feature-gates/feature-gate-simd.stderr b/src/test/ui/feature-gates/feature-gate-simd.stderr index b37f138fbb..1686a8530f 100644 --- a/src/test/ui/feature-gates/feature-gate-simd.stderr +++ b/src/test/ui/feature-gates/feature-gate-simd.stderr @@ -1,9 +1,10 @@ -error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) +error[E0658]: SIMD types are experimental and possibly buggy --> $DIR/feature-gate-simd.rs:3:1 | LL | #[repr(simd)] | ^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/27731 = help: add #![feature(repr_simd)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-slice-patterns.stderr b/src/test/ui/feature-gates/feature-gate-slice-patterns.stderr index 58eb57516e..fe3c1e0afd 100644 --- a/src/test/ui/feature-gates/feature-gate-slice-patterns.stderr +++ b/src/test/ui/feature-gates/feature-gate-slice-patterns.stderr @@ -1,49 +1,55 @@ -error[E0658]: syntax for subslices in slice patterns is not yet stabilized (see issue #23121) +error[E0658]: syntax for subslices in slice patterns is not yet stabilized --> $DIR/feature-gate-slice-patterns.rs:6:16 | LL | [1, 2, ..] => {} | ^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/23121 = help: add #![feature(slice_patterns)] to the crate attributes to enable -error[E0658]: syntax for subslices in slice patterns is not yet stabilized (see issue #23121) +error[E0658]: syntax for subslices in slice patterns is not yet stabilized --> $DIR/feature-gate-slice-patterns.rs:7:13 | LL | [1, .., 5] => {} | ^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/23121 = help: add #![feature(slice_patterns)] to the crate attributes to enable -error[E0658]: syntax for subslices in slice patterns is not yet stabilized (see issue #23121) +error[E0658]: syntax for subslices in slice patterns is not yet stabilized --> $DIR/feature-gate-slice-patterns.rs:8:10 | LL | [.., 4, 5] => {} | ^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/23121 = help: add #![feature(slice_patterns)] to the crate attributes to enable -error[E0658]: syntax for subslices in slice patterns is not yet stabilized (see issue #23121) +error[E0658]: syntax for subslices in slice patterns is not yet stabilized --> $DIR/feature-gate-slice-patterns.rs:13:11 | LL | [ xs.., 4, 5 ] => {} | ^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/23121 = help: add #![feature(slice_patterns)] to the crate attributes to enable -error[E0658]: syntax for subslices in slice patterns is not yet stabilized (see issue #23121) +error[E0658]: syntax for subslices in slice patterns is not yet stabilized --> $DIR/feature-gate-slice-patterns.rs:14:14 | LL | [ 1, xs.., 5 ] => {} | ^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/23121 = help: add #![feature(slice_patterns)] to the crate attributes to enable -error[E0658]: syntax for subslices in slice patterns is not yet stabilized (see issue #23121) +error[E0658]: syntax for subslices in slice patterns is not yet stabilized --> $DIR/feature-gate-slice-patterns.rs:15:17 | LL | [ 1, 2, xs.. ] => {} | ^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/23121 = help: add #![feature(slice_patterns)] to the crate attributes to enable error: aborting due to 6 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-start.stderr b/src/test/ui/feature-gates/feature-gate-start.stderr index d39e5f3555..fbe64ea130 100644 --- a/src/test/ui/feature-gates/feature-gate-start.stderr +++ b/src/test/ui/feature-gates/feature-gate-start.stderr @@ -1,9 +1,10 @@ -error[E0658]: a #[start] function is an experimental feature whose signature may change over time (see issue #29633) +error[E0658]: a #[start] function is an experimental feature whose signature may change over time --> $DIR/feature-gate-start.rs:2:1 | LL | fn foo(_: isize, _: *const *const u8) -> isize { 0 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29633 = help: add #![feature(start)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-static-nobundle.stderr b/src/test/ui/feature-gates/feature-gate-static-nobundle.stderr index 2e80275f3f..7d5ed74abd 100644 --- a/src/test/ui/feature-gates/feature-gate-static-nobundle.stderr +++ b/src/test/ui/feature-gates/feature-gate-static-nobundle.stderr @@ -1,9 +1,10 @@ -error[E0658]: kind="static-nobundle" is feature gated (see issue #37403) +error[E0658]: kind="static-nobundle" is feature gated --> $DIR/feature-gate-static-nobundle.rs:1:1 | LL | #[link(name="foo", kind="static-nobundle")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/37403 = help: add #![feature(static_nobundle)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-stmt_expr_attributes.rs b/src/test/ui/feature-gates/feature-gate-stmt_expr_attributes.rs index 3e5b6260d7..f213e8933b 100644 --- a/src/test/ui/feature-gates/feature-gate-stmt_expr_attributes.rs +++ b/src/test/ui/feature-gates/feature-gate-stmt_expr_attributes.rs @@ -1,4 +1,4 @@ const X: i32 = #[allow(dead_code)] 8; -//~^ ERROR attributes on expressions are experimental. (see issue #15701) +//~^ ERROR attributes on expressions are experimental fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-stmt_expr_attributes.stderr b/src/test/ui/feature-gates/feature-gate-stmt_expr_attributes.stderr index 4318edd923..bbf0f66ca5 100644 --- a/src/test/ui/feature-gates/feature-gate-stmt_expr_attributes.stderr +++ b/src/test/ui/feature-gates/feature-gate-stmt_expr_attributes.stderr @@ -1,9 +1,10 @@ -error[E0658]: attributes on expressions are experimental. (see issue #15701) +error[E0658]: attributes on expressions are experimental --> $DIR/feature-gate-stmt_expr_attributes.rs:1:16 | LL | const X: i32 = #[allow(dead_code)] 8; | ^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/15701 = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-thread_local.stderr b/src/test/ui/feature-gates/feature-gate-thread_local.stderr index 38064a6bc9..95334d23d5 100644 --- a/src/test/ui/feature-gates/feature-gate-thread_local.stderr +++ b/src/test/ui/feature-gates/feature-gate-thread_local.stderr @@ -1,9 +1,10 @@ -error[E0658]: `#[thread_local]` is an experimental feature, and does not currently handle destructors. (see issue #29594) +error[E0658]: `#[thread_local]` is an experimental feature, and does not currently handle destructors --> $DIR/feature-gate-thread_local.rs:8:1 | LL | #[thread_local] | ^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29594 = help: add #![feature(thread_local)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-trace_macros.stderr b/src/test/ui/feature-gates/feature-gate-trace_macros.stderr index ee22bd2509..bcce31d873 100644 --- a/src/test/ui/feature-gates/feature-gate-trace_macros.stderr +++ b/src/test/ui/feature-gates/feature-gate-trace_macros.stderr @@ -1,9 +1,10 @@ -error[E0658]: `trace_macros` is not stable enough for use and is subject to change (see issue #29598) +error[E0658]: `trace_macros` is not stable enough for use and is subject to change --> $DIR/feature-gate-trace_macros.rs:2:5 | LL | trace_macros!(true); | ^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29598 = help: add #![feature(trace_macros)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-trait-alias.stderr b/src/test/ui/feature-gates/feature-gate-trait-alias.stderr index bb833c4e73..1a9718a6ce 100644 --- a/src/test/ui/feature-gates/feature-gate-trait-alias.stderr +++ b/src/test/ui/feature-gates/feature-gate-trait-alias.stderr @@ -1,9 +1,10 @@ -error[E0658]: trait aliases are experimental (see issue #41517) +error[E0658]: trait aliases are experimental --> $DIR/feature-gate-trait-alias.rs:1:1 | LL | trait Foo = Default; | ^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/41517 = help: add #![feature(trait_alias)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-try_blocks.stderr b/src/test/ui/feature-gates/feature-gate-try_blocks.stderr index 74ad0e70c9..cb72b06733 100644 --- a/src/test/ui/feature-gates/feature-gate-try_blocks.stderr +++ b/src/test/ui/feature-gates/feature-gate-try_blocks.stderr @@ -1,4 +1,4 @@ -error[E0658]: `try` expression is experimental (see issue #31436) +error[E0658]: `try` expression is experimental --> $DIR/feature-gate-try_blocks.rs:4:33 | LL | let try_result: Option<_> = try { @@ -8,6 +8,7 @@ LL | | x LL | | }; | |_____^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/31436 = help: add #![feature(try_blocks)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-try_reserve.stderr b/src/test/ui/feature-gates/feature-gate-try_reserve.stderr index 61a3249c2a..f1d82d94a5 100644 --- a/src/test/ui/feature-gates/feature-gate-try_reserve.stderr +++ b/src/test/ui/feature-gates/feature-gate-try_reserve.stderr @@ -1,9 +1,10 @@ -error[E0658]: use of unstable library feature 'try_reserve': new API (see issue #48043) +error[E0658]: use of unstable library feature 'try_reserve': new API --> $DIR/feature-gate-try_reserve.rs:3:7 | LL | v.try_reserve(10); | ^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/48043 = help: add #![feature(try_reserve)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-type_ascription.stderr b/src/test/ui/feature-gates/feature-gate-type_ascription.stderr index 13dbb60296..0e4e25882c 100644 --- a/src/test/ui/feature-gates/feature-gate-type_ascription.stderr +++ b/src/test/ui/feature-gates/feature-gate-type_ascription.stderr @@ -1,9 +1,10 @@ -error[E0658]: type ascription is experimental (see issue #23416) +error[E0658]: type ascription is experimental --> $DIR/feature-gate-type_ascription.rs:4:13 | LL | let a = 10: u8; | ^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/23416 = help: add #![feature(type_ascription)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr b/src/test/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr index 865b87e7dd..6b09daff0f 100644 --- a/src/test/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr +++ b/src/test/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr @@ -1,41 +1,46 @@ -error[E0658]: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:11:5 | LL | extern "rust-call" fn call(self, args: ()) -> () {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error[E0658]: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:17:5 | LL | extern "rust-call" fn call_once(self, args: ()) -> () {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error[E0658]: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:23:5 | LL | extern "rust-call" fn call_mut(&self, args: ()) -> () {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error[E0658]: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:29:5 | LL | extern "rust-call" fn call_once(&self, args: ()) -> () {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead (see issue #29625) +error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:9:6 | LL | impl Fn<()> for Foo { | ^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable error[E0229]: associated type bindings are not allowed here @@ -44,23 +49,25 @@ error[E0229]: associated type bindings are not allowed here LL | impl FnOnce() for Foo1 { | ^^ associated type not allowed here -error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead (see issue #29625) +error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:21:6 | LL | impl FnMut<()> for Bar { | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead (see issue #29625) +error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:27:6 | LL | impl FnOnce<()> for Baz { | ^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable error: aborting due to 8 previous errors -Some errors occurred: E0229, E0658. +Some errors have detailed explanations: E0229, E0658. For more information about an error, try `rustc --explain E0229`. diff --git a/src/test/ui/feature-gates/feature-gate-unboxed-closures-method-calls.stderr b/src/test/ui/feature-gates/feature-gate-unboxed-closures-method-calls.stderr index 519f652832..164368cd8e 100644 --- a/src/test/ui/feature-gates/feature-gate-unboxed-closures-method-calls.stderr +++ b/src/test/ui/feature-gates/feature-gate-unboxed-closures-method-calls.stderr @@ -1,25 +1,28 @@ -error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) +error[E0658]: use of unstable library feature 'fn_traits' --> $DIR/feature-gate-unboxed-closures-method-calls.rs:4:7 | LL | f.call(()); | ^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(fn_traits)] to the crate attributes to enable -error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) +error[E0658]: use of unstable library feature 'fn_traits' --> $DIR/feature-gate-unboxed-closures-method-calls.rs:5:7 | LL | f.call_mut(()); | ^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(fn_traits)] to the crate attributes to enable -error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) +error[E0658]: use of unstable library feature 'fn_traits' --> $DIR/feature-gate-unboxed-closures-method-calls.rs:6:7 | LL | f.call_once(()); | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(fn_traits)] to the crate attributes to enable error: aborting due to 3 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.stderr b/src/test/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.stderr index a49a8b4cdb..ff2629fe42 100644 --- a/src/test/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.stderr +++ b/src/test/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.stderr @@ -1,25 +1,28 @@ -error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) +error[E0658]: use of unstable library feature 'fn_traits' --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:4:5 | LL | Fn::call(&f, ()); | ^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(fn_traits)] to the crate attributes to enable -error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) +error[E0658]: use of unstable library feature 'fn_traits' --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:5:5 | LL | FnMut::call_mut(&mut f, ()); | ^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(fn_traits)] to the crate attributes to enable -error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) +error[E0658]: use of unstable library feature 'fn_traits' --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:6:5 | LL | FnOnce::call_once(f, ()); | ^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(fn_traits)] to the crate attributes to enable error: aborting due to 3 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-unboxed-closures.rs b/src/test/ui/feature-gates/feature-gate-unboxed-closures.rs index c3f5c99dcb..b8d3aa4a14 100644 --- a/src/test/ui/feature-gates/feature-gate-unboxed-closures.rs +++ b/src/test/ui/feature-gates/feature-gate-unboxed-closures.rs @@ -9,7 +9,7 @@ impl FnOnce<(u32, u32)> for Test { extern "rust-call" fn call_once(self, (a, b): (u32, u32)) -> u32 { a + b } - //~^^^ ERROR rust-call ABI is subject to change (see issue #29625) + //~^^^ ERROR rust-call ABI is subject to change } fn main() { diff --git a/src/test/ui/feature-gates/feature-gate-unboxed-closures.stderr b/src/test/ui/feature-gates/feature-gate-unboxed-closures.stderr index e7b1fc589b..872a593f3e 100644 --- a/src/test/ui/feature-gates/feature-gate-unboxed-closures.stderr +++ b/src/test/ui/feature-gates/feature-gate-unboxed-closures.stderr @@ -1,4 +1,4 @@ -error[E0658]: rust-call ABI is subject to change (see issue #29625) +error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-unboxed-closures.rs:9:5 | LL | / extern "rust-call" fn call_once(self, (a, b): (u32, u32)) -> u32 { @@ -6,14 +6,16 @@ LL | | a + b LL | | } | |_____^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead (see issue #29625) +error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead --> $DIR/feature-gate-unboxed-closures.rs:5:6 | LL | impl FnOnce<(u32, u32)> for Test { | ^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-underscore_const_names.stderr b/src/test/ui/feature-gates/feature-gate-underscore_const_names.stderr index ef93bb97ab..8d925424d8 100644 --- a/src/test/ui/feature-gates/feature-gate-underscore_const_names.stderr +++ b/src/test/ui/feature-gates/feature-gate-underscore_const_names.stderr @@ -1,4 +1,4 @@ -error[E0658]: naming constants with `_` is unstable (see issue #54912) +error[E0658]: naming constants with `_` is unstable --> $DIR/feature-gate-underscore_const_names.rs:6:1 | LL | / const _ : () = { @@ -10,6 +10,7 @@ LL | | () LL | | }; | |__^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54912 = help: add #![feature(underscore_const_names)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr b/src/test/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr index c2f5df48fe..669e87cead 100644 --- a/src/test/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr +++ b/src/test/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr @@ -1,9 +1,10 @@ -error[E0658]: unsized tuple coercion is not stable enough for use and is subject to change (see issue #42877) +error[E0658]: unsized tuple coercion is not stable enough for use and is subject to change --> $DIR/feature-gate-unsized_tuple_coercion.rs:2:24 | LL | let _ : &(Send,) = &((),); | ^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/42877 = help: add #![feature(unsized_tuple_coercion)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-untagged_unions.stderr b/src/test/ui/feature-gates/feature-gate-untagged_unions.stderr index 6faa0528dc..5df3a1d699 100644 --- a/src/test/ui/feature-gates/feature-gate-untagged_unions.stderr +++ b/src/test/ui/feature-gates/feature-gate-untagged_unions.stderr @@ -1,4 +1,4 @@ -error[E0658]: unions with non-`Copy` fields are unstable (see issue #32836) +error[E0658]: unions with non-`Copy` fields are unstable --> $DIR/feature-gate-untagged_unions.rs:9:1 | LL | / union U3 { @@ -6,9 +6,10 @@ LL | | a: String, LL | | } | |_^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32836 = help: add #![feature(untagged_unions)] to the crate attributes to enable -error[E0658]: unions with non-`Copy` fields are unstable (see issue #32836) +error[E0658]: unions with non-`Copy` fields are unstable --> $DIR/feature-gate-untagged_unions.rs:13:1 | LL | / union U4 { @@ -16,9 +17,10 @@ LL | | a: T, LL | | } | |_^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32836 = help: add #![feature(untagged_unions)] to the crate attributes to enable -error[E0658]: unions with `Drop` implementations are unstable (see issue #32836) +error[E0658]: unions with `Drop` implementations are unstable --> $DIR/feature-gate-untagged_unions.rs:17:1 | LL | / union U5 { @@ -26,6 +28,7 @@ LL | | a: u8, LL | | } | |_^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32836 = help: add #![feature(untagged_unions)] to the crate attributes to enable error: aborting due to 3 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-unwind-attributes.stderr b/src/test/ui/feature-gates/feature-gate-unwind-attributes.stderr index 149ce9e4f8..bb55013d63 100644 --- a/src/test/ui/feature-gates/feature-gate-unwind-attributes.stderr +++ b/src/test/ui/feature-gates/feature-gate-unwind-attributes.stderr @@ -1,9 +1,10 @@ -error[E0658]: #[unwind] is experimental (see issue #58760) +error[E0658]: #[unwind] is experimental --> $DIR/feature-gate-unwind-attributes.rs:11:5 | LL | #[unwind(allowed)] | ^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/58760 = help: add #![feature(unwind_attributes)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/feature-gates/underscore_const_names_feature_gate.stderr b/src/test/ui/feature-gates/underscore_const_names_feature_gate.stderr index 83b3017a4c..0931145a6e 100644 --- a/src/test/ui/feature-gates/underscore_const_names_feature_gate.stderr +++ b/src/test/ui/feature-gates/underscore_const_names_feature_gate.stderr @@ -1,9 +1,10 @@ -error[E0658]: naming constants with `_` is unstable (see issue #54912) +error[E0658]: naming constants with `_` is unstable --> $DIR/underscore_const_names_feature_gate.rs:1:1 | LL | const _: () = (); | ^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54912 = help: add #![feature(underscore_const_names)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/ffi_returns_twice.rs b/src/test/ui/ffi_returns_twice.rs index 93c372e1d8..845e18df11 100644 --- a/src/test/ui/ffi_returns_twice.rs +++ b/src/test/ui/ffi_returns_twice.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength #![feature(ffi_returns_twice)] #![crate_type = "lib"] diff --git a/src/test/ui/ffi_returns_twice.stderr b/src/test/ui/ffi_returns_twice.stderr index e4137c7993..862892e27b 100644 --- a/src/test/ui/ffi_returns_twice.stderr +++ b/src/test/ui/ffi_returns_twice.stderr @@ -1,9 +1,8 @@ error[E0724]: `#[ffi_returns_twice]` may only be used on foreign functions - --> $DIR/ffi_returns_twice.rs:5:1 + --> $DIR/ffi_returns_twice.rs:4:1 | LL | #[ffi_returns_twice] | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error -For more information about this error, try `rustc --explain E0724`. diff --git a/src/test/ui/float-literal-inference-restrictions.stderr b/src/test/ui/float-literal-inference-restrictions.stderr index 6ac49b7ccd..839ca57ce5 100644 --- a/src/test/ui/float-literal-inference-restrictions.stderr +++ b/src/test/ui/float-literal-inference-restrictions.stderr @@ -15,6 +15,10 @@ error[E0308]: mismatched types | LL | let y: f32 = 1f64; | ^^^^ expected f32, found f64 +help: change the type of the numeric literal from `f64` to `f32` + | +LL | let y: f32 = 1f32; + | ^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/fmt/format-string-error-2.rs b/src/test/ui/fmt/format-string-error-2.rs index 5c25ae502f..8ca98fc266 100644 --- a/src/test/ui/fmt/format-string-error-2.rs +++ b/src/test/ui/fmt/format-string-error-2.rs @@ -1,3 +1,4 @@ +// compile-flags: -Z continue-parse-after-error // ignore-tidy-tab fn main() { @@ -76,7 +77,6 @@ raw { \n println!("\x7B}\u8 {", 1); //~^ ERROR incorrect unicode escape sequence - //~| ERROR argument never used // note: raw strings don't escape `\xFF` and `\u{FF}` sequences println!(r#"\x7B}\u{8} {"#, 1); diff --git a/src/test/ui/fmt/format-string-error-2.stderr b/src/test/ui/fmt/format-string-error-2.stderr index 66d35a1b85..227ec27efc 100644 --- a/src/test/ui/fmt/format-string-error-2.stderr +++ b/src/test/ui/fmt/format-string-error-2.stderr @@ -1,13 +1,13 @@ error: incorrect unicode escape sequence - --> $DIR/format-string-error-2.rs:77:20 + --> $DIR/format-string-error-2.rs:78:20 | LL | println!("\x7B}\u8 {", 1); | ^^- - | | - | help: format of unicode escape sequences uses braces: `\u{8}` + | | + | help: format of unicode escape sequences uses braces: `\u{8}` error: invalid format string: expected `'}'`, found `'a'` - --> $DIR/format-string-error-2.rs:5:5 + --> $DIR/format-string-error-2.rs:6:5 | LL | format!("{ | - because of this opening brace @@ -17,7 +17,7 @@ LL | a"); = note: if you intended to print `{`, you can escape it using `{{` error: invalid format string: expected `'}'`, found `'b'` - --> $DIR/format-string-error-2.rs:9:5 + --> $DIR/format-string-error-2.rs:10:5 | LL | format!("{ \ | - because of this opening brace @@ -28,7 +28,7 @@ LL | b"); = note: if you intended to print `{`, you can escape it using `{{` error: invalid format string: expected `'}'`, found `'\'` - --> $DIR/format-string-error-2.rs:11:18 + --> $DIR/format-string-error-2.rs:12:18 | LL | format!(r#"{ \ | - ^ expected `}` in format string @@ -38,7 +38,7 @@ LL | format!(r#"{ \ = note: if you intended to print `{`, you can escape it using `{{` error: invalid format string: expected `'}'`, found `'\'` - --> $DIR/format-string-error-2.rs:15:18 + --> $DIR/format-string-error-2.rs:16:18 | LL | format!(r#"{ \n | - ^ expected `}` in format string @@ -48,7 +48,7 @@ LL | format!(r#"{ \n = note: if you intended to print `{`, you can escape it using `{{` error: invalid format string: expected `'}'`, found `'e'` - --> $DIR/format-string-error-2.rs:21:5 + --> $DIR/format-string-error-2.rs:22:5 | LL | format!("{ \n | - because of this opening brace @@ -59,7 +59,7 @@ LL | e"); = note: if you intended to print `{`, you can escape it using `{{` error: invalid format string: expected `'}'`, found `'a'` - --> $DIR/format-string-error-2.rs:25:5 + --> $DIR/format-string-error-2.rs:26:5 | LL | { | - because of this opening brace @@ -69,7 +69,7 @@ LL | a"); = note: if you intended to print `{`, you can escape it using `{{` error: invalid format string: expected `'}'`, found `'a'` - --> $DIR/format-string-error-2.rs:29:5 + --> $DIR/format-string-error-2.rs:30:5 | LL | { | - because of this opening brace @@ -79,7 +79,7 @@ LL | a = note: if you intended to print `{`, you can escape it using `{{` error: invalid format string: expected `'}'`, found `'b'` - --> $DIR/format-string-error-2.rs:35:5 + --> $DIR/format-string-error-2.rs:36:5 | LL | { \ | - because of this opening brace @@ -90,7 +90,7 @@ LL | b"); = note: if you intended to print `{`, you can escape it using `{{` error: invalid format string: expected `'}'`, found `'b'` - --> $DIR/format-string-error-2.rs:40:5 + --> $DIR/format-string-error-2.rs:41:5 | LL | { \ | - because of this opening brace @@ -101,7 +101,7 @@ LL | b \ = note: if you intended to print `{`, you can escape it using `{{` error: invalid format string: expected `'}'`, found `'\'` - --> $DIR/format-string-error-2.rs:45:8 + --> $DIR/format-string-error-2.rs:46:8 | LL | raw { \ | - ^ expected `}` in format string @@ -111,7 +111,7 @@ LL | raw { \ = note: if you intended to print `{`, you can escape it using `{{` error: invalid format string: expected `'}'`, found `'\'` - --> $DIR/format-string-error-2.rs:50:8 + --> $DIR/format-string-error-2.rs:51:8 | LL | raw { \n | - ^ expected `}` in format string @@ -121,7 +121,7 @@ LL | raw { \n = note: if you intended to print `{`, you can escape it using `{{` error: invalid format string: expected `'}'`, found `'e'` - --> $DIR/format-string-error-2.rs:57:5 + --> $DIR/format-string-error-2.rs:58:5 | LL | { \n | - because of this opening brace @@ -132,7 +132,7 @@ LL | e"); = note: if you intended to print `{`, you can escape it using `{{` error: invalid format string: expected `'}'`, found `'a'` - --> $DIR/format-string-error-2.rs:67:5 + --> $DIR/format-string-error-2.rs:68:5 | LL | { | - because of this opening brace @@ -142,13 +142,13 @@ LL | asdf} = note: if you intended to print `{`, you can escape it using `{{` error: 1 positional argument in format string, but no arguments were given - --> $DIR/format-string-error-2.rs:70:17 + --> $DIR/format-string-error-2.rs:71:17 | LL | println!("\t{}"); | ^^ error: invalid format string: expected `'}'` but string was terminated - --> $DIR/format-string-error-2.rs:74:27 + --> $DIR/format-string-error-2.rs:75:27 | LL | println!("\x7B}\u{8} {", 1); | -^ expected `'}'` in format string @@ -157,14 +157,6 @@ LL | println!("\x7B}\u{8} {", 1); | = note: if you intended to print `{`, you can escape it using `{{` -error: argument never used - --> $DIR/format-string-error-2.rs:77:28 - | -LL | println!("\x7B}\u8 {", 1); - | ------------ ^ argument never used - | | - | formatting specifier missing - error: invalid format string: unmatched `}` found --> $DIR/format-string-error-2.rs:82:21 | @@ -181,5 +173,5 @@ LL | println!(r#"\x7B}\u8 {"#, 1); | = note: if you intended to print `}`, you can escape it using `}}` -error: aborting due to 19 previous errors +error: aborting due to 18 previous errors diff --git a/src/test/ui/fn/fn-closure-mutable-capture.nll.stderr b/src/test/ui/fn/fn-closure-mutable-capture.nll.stderr deleted file mode 100644 index f7ab56da8d..0000000000 --- a/src/test/ui/fn/fn-closure-mutable-capture.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0594]: cannot assign to `x`, as it is a captured variable in a `Fn` closure - --> $DIR/fn-closure-mutable-capture.rs:5:17 - | -LL | bar(move || x = 1); - | ^^^^^ cannot assign - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/fn-closure-mutable-capture.rs:5:9 - | -LL | bar(move || x = 1); - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/fn/fn-closure-mutable-capture.rs b/src/test/ui/fn/fn-closure-mutable-capture.rs index a37eceffb9..81376af091 100644 --- a/src/test/ui/fn/fn-closure-mutable-capture.rs +++ b/src/test/ui/fn/fn-closure-mutable-capture.rs @@ -3,8 +3,9 @@ pub fn bar(_f: F) {} pub fn foo() { let mut x = 0; bar(move || x = 1); - //~^ ERROR cannot assign to captured outer variable in an `Fn` closure - //~| NOTE `Fn` closures cannot capture their enclosing environment for modifications + //~^ ERROR cannot assign to `x`, as it is a captured variable in a `Fn` closure + //~| NOTE cannot assign + //~| HELP consider changing this to accept closures that implement `FnMut` } fn main() {} diff --git a/src/test/ui/fn/fn-closure-mutable-capture.stderr b/src/test/ui/fn/fn-closure-mutable-capture.stderr index 84a5989c28..8dfae0cbdf 100644 --- a/src/test/ui/fn/fn-closure-mutable-capture.stderr +++ b/src/test/ui/fn/fn-closure-mutable-capture.stderr @@ -1,11 +1,10 @@ -error[E0594]: cannot assign to captured outer variable in an `Fn` closure +error[E0594]: cannot assign to `x`, as it is a captured variable in a `Fn` closure --> $DIR/fn-closure-mutable-capture.rs:5:17 | LL | bar(move || x = 1); - | ^^^^^ + | ^^^^^ cannot assign | - = note: `Fn` closures cannot capture their enclosing environment for modifications -help: consider changing this closure to take self by mutable reference +help: consider changing this to accept closures that implement `FnMut` --> $DIR/fn-closure-mutable-capture.rs:5:9 | LL | bar(move || x = 1); @@ -13,4 +12,3 @@ LL | bar(move || x = 1); error: aborting due to previous error -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/fn/fn-compare-mismatch.stderr b/src/test/ui/fn/fn-compare-mismatch.stderr index 07b93d9aae..b2f6510d5a 100644 --- a/src/test/ui/fn/fn-compare-mismatch.stderr +++ b/src/test/ui/fn/fn-compare-mismatch.stderr @@ -5,8 +5,14 @@ LL | let x = f == g; | - ^^ - fn() {main::g} | | | fn() {main::f} +help: you might have forgotten to call this function | - = note: an implementation of `std::cmp::PartialEq` might be missing for `fn() {main::f}` +LL | let x = f() == g; + | ^^^ +help: you might have forgotten to call this function + | +LL | let x = f == g(); + | ^^^ error[E0308]: mismatched types --> $DIR/fn-compare-mismatch.rs:4:18 @@ -19,5 +25,5 @@ LL | let x = f == g; error: aborting due to 2 previous errors -Some errors occurred: E0308, E0369. +Some errors have detailed explanations: E0308, E0369. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/fn/fn-trait-formatting.stderr b/src/test/ui/fn/fn-trait-formatting.stderr index bbccb57a1e..6b76a6c914 100644 --- a/src/test/ui/fn/fn-trait-formatting.stderr +++ b/src/test/ui/fn/fn-trait-formatting.stderr @@ -40,5 +40,5 @@ LL | fn needs_fn(x: F) where F: Fn(isize) -> isize {} error: aborting due to 4 previous errors -Some errors occurred: E0277, E0308. +Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.nll.stderr b/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.nll.stderr deleted file mode 100644 index e7b4575342..0000000000 --- a/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0509]: cannot move out of type `A`, which implements the `Drop` trait - --> $DIR/functional-struct-update-noncopyable.rs:12:14 - | -LL | let _b = A { y: Arc::new(3), ..a }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0509`. diff --git a/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.stderr b/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.stderr index 5549adc8d0..e7b4575342 100644 --- a/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.stderr +++ b/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.stderr @@ -1,8 +1,8 @@ error[E0509]: cannot move out of type `A`, which implements the `Drop` trait - --> $DIR/functional-struct-update-noncopyable.rs:12:36 + --> $DIR/functional-struct-update-noncopyable.rs:12:14 | LL | let _b = A { y: Arc::new(3), ..a }; - | ^ cannot move out of here + | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here error: aborting due to previous error diff --git a/src/test/ui/gated-bad-feature.stderr b/src/test/ui/gated-bad-feature.stderr index b208da3645..5a3cfc962e 100644 --- a/src/test/ui/gated-bad-feature.stderr +++ b/src/test/ui/gated-bad-feature.stderr @@ -30,5 +30,4 @@ LL | #![feature = "foo"] error: aborting due to 5 previous errors -Some errors occurred: E0556, E0557. -For more information about an error, try `rustc --explain E0556`. +For more information about this error, try `rustc --explain E0557`. diff --git a/src/test/ui/generator-yielding-or-returning-itself.rs b/src/test/ui/generator-yielding-or-returning-itself.rs index 30788e3c18..fd52667981 100644 --- a/src/test/ui/generator-yielding-or-returning-itself.rs +++ b/src/test/ui/generator-yielding-or-returning-itself.rs @@ -13,7 +13,7 @@ pub fn want_cyclic_generator_return(_: T) fn supply_cyclic_generator_return() { want_cyclic_generator_return(|| { - //~^ ERROR type mismatch + //~^ ERROR closure/generator type that references itself if false { yield None.unwrap(); } None.unwrap() }) diff --git a/src/test/ui/generator-yielding-or-returning-itself.stderr b/src/test/ui/generator-yielding-or-returning-itself.stderr index 5834aed245..42591683fe 100644 --- a/src/test/ui/generator-yielding-or-returning-itself.stderr +++ b/src/test/ui/generator-yielding-or-returning-itself.stderr @@ -1,20 +1,17 @@ -error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-returning-itself.rs:15:34: 19:6 _] as std::ops::Generator>::Return == [generator@$DIR/generator-yielding-or-returning-itself.rs:15:34: 19:6 _]` - --> $DIR/generator-yielding-or-returning-itself.rs:15:5 +error[E0644]: closure/generator type that references itself + --> $DIR/generator-yielding-or-returning-itself.rs:15:34 | -LL | want_cyclic_generator_return(|| { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic type of infinite size +LL | want_cyclic_generator_return(|| { + | __________________________________^ +LL | | +LL | | if false { yield None.unwrap(); } +LL | | None.unwrap() +LL | | }) + | |_____^ cyclic type of infinite size | = note: closures cannot capture themselves or take themselves as argument; this error may be the result of a recent compiler bug-fix, see https://github.com/rust-lang/rust/issues/46062 for more details -note: required by `want_cyclic_generator_return` - --> $DIR/generator-yielding-or-returning-itself.rs:9:1 - | -LL | / pub fn want_cyclic_generator_return(_: T) -LL | | where T: Generator -LL | | { -LL | | } - | |_^ error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 32:6 _] as std::ops::Generator>::Yield == [generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 32:6 _]` --> $DIR/generator-yielding-or-returning-itself.rs:28:5 @@ -36,4 +33,5 @@ LL | | } error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0271`. +Some errors have detailed explanations: E0271, E0644. +For more information about an error, try `rustc --explain E0271`. diff --git a/src/test/ui/generator/auto-trait-regions.nll.stderr b/src/test/ui/generator/auto-trait-regions.nll.stderr new file mode 100644 index 0000000000..4c157a05a5 --- /dev/null +++ b/src/test/ui/generator/auto-trait-regions.nll.stderr @@ -0,0 +1,41 @@ +error[E0716]: temporary value dropped while borrowed + --> $DIR/auto-trait-regions.rs:44:24 + | +LL | let a = A(&mut true, &mut true, No); + | ^^^^ - temporary value is freed at the end of this statement + | | + | creates a temporary which is freed while still in use +LL | yield; +LL | assert_foo(a); + | - borrow later used here + | + = note: consider using a `let` binding to create a longer lived value + +error[E0716]: temporary value dropped while borrowed + --> $DIR/auto-trait-regions.rs:44:35 + | +LL | let a = A(&mut true, &mut true, No); + | ^^^^ - temporary value is freed at the end of this statement + | | + | creates a temporary which is freed while still in use +LL | yield; +LL | assert_foo(a); + | - borrow later used here + | + = note: consider using a `let` binding to create a longer lived value + +error: higher-ranked subtype error + --> $DIR/auto-trait-regions.rs:30:5 + | +LL | assert_foo(gen); + | ^^^^^^^^^^^^^^^ + +error: higher-ranked subtype error + --> $DIR/auto-trait-regions.rs:48:5 + | +LL | assert_foo(gen); + | ^^^^^^^^^^^^^^^ + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/generator/borrowing.nll.stderr b/src/test/ui/generator/borrowing.nll.stderr deleted file mode 100644 index 3d58873f82..0000000000 --- a/src/test/ui/generator/borrowing.nll.stderr +++ /dev/null @@ -1,34 +0,0 @@ -error[E0597]: `a` does not live long enough - --> $DIR/borrowing.rs:9:33 - | -LL | Pin::new(&mut || yield &a).resume() - | ----------^ - | | | - | | borrowed value does not live long enough - | value captured here by generator - | a temporary with access to the borrow is created here ... -LL | -LL | }; - | -- ... and the borrow might be used here, when that temporary is dropped and runs the destructor for generator - | | - | `a` dropped here while still borrowed - | - = note: The temporary is part of an expression at the end of a block. Consider forcing this temporary to be dropped sooner, before the block's local variables are dropped. For example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block. - -error[E0597]: `a` does not live long enough - --> $DIR/borrowing.rs:16:20 - | -LL | let _b = { - | -- borrow later stored here -LL | let a = 3; -LL | || { - | -- value captured here by generator -LL | yield &a - | ^ borrowed value does not live long enough -... -LL | }; - | - `a` dropped here while still borrowed - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/generator/borrowing.rs b/src/test/ui/generator/borrowing.rs index 9f8fc7483f..6234b73804 100644 --- a/src/test/ui/generator/borrowing.rs +++ b/src/test/ui/generator/borrowing.rs @@ -18,4 +18,3 @@ fn main() { } }; } - diff --git a/src/test/ui/generator/borrowing.stderr b/src/test/ui/generator/borrowing.stderr index 38502aa8e0..3d58873f82 100644 --- a/src/test/ui/generator/borrowing.stderr +++ b/src/test/ui/generator/borrowing.stderr @@ -2,28 +2,32 @@ error[E0597]: `a` does not live long enough --> $DIR/borrowing.rs:9:33 | LL | Pin::new(&mut || yield &a).resume() - | -- ^ borrowed value does not live long enough - | | - | capture occurs here + | ----------^ + | | | + | | borrowed value does not live long enough + | value captured here by generator + | a temporary with access to the borrow is created here ... LL | LL | }; - | - borrowed value only lives until here -... -LL | } - | - borrowed value needs to live until here + | -- ... and the borrow might be used here, when that temporary is dropped and runs the destructor for generator + | | + | `a` dropped here while still borrowed + | + = note: The temporary is part of an expression at the end of a block. Consider forcing this temporary to be dropped sooner, before the block's local variables are dropped. For example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block. error[E0597]: `a` does not live long enough --> $DIR/borrowing.rs:16:20 | +LL | let _b = { + | -- borrow later stored here +LL | let a = 3; LL | || { - | -- capture occurs here + | -- value captured here by generator LL | yield &a | ^ borrowed value does not live long enough ... LL | }; - | - borrowed value only lives until here -LL | } - | - borrowed value needs to live until here + | - `a` dropped here while still borrowed error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/dropck.nll.stderr b/src/test/ui/generator/dropck.nll.stderr deleted file mode 100644 index 8bb860f288..0000000000 --- a/src/test/ui/generator/dropck.nll.stderr +++ /dev/null @@ -1,34 +0,0 @@ -error[E0597]: `*cell` does not live long enough - --> $DIR/dropck.rs:10:40 - | -LL | let ref_ = Box::leak(Box::new(Some(cell.borrow_mut()))); - | ^^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `*cell` dropped here while still borrowed - | borrow might be used here, when `gen` is dropped and runs the destructor for generator - | - = note: values in a scope are dropped in the opposite order they are defined - -error[E0597]: `ref_` does not live long enough - --> $DIR/dropck.rs:15:18 - | -LL | gen = || { - | -- value captured here by generator -LL | // but the generator can use it to drop a `Ref<'a, i32>`. -LL | let _d = ref_.take(); - | ^^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `ref_` dropped here while still borrowed - | borrow might be used here, when `gen` is dropped and runs the destructor for generator - | - = note: values in a scope are dropped in the opposite order they are defined - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/generator/dropck.stderr b/src/test/ui/generator/dropck.stderr index 977f388a62..8bb860f288 100644 --- a/src/test/ui/generator/dropck.stderr +++ b/src/test/ui/generator/dropck.stderr @@ -5,23 +5,29 @@ LL | let ref_ = Box::leak(Box::new(Some(cell.borrow_mut()))); | ^^^^ borrowed value does not live long enough ... LL | } - | - `*cell` dropped here while still borrowed + | - + | | + | `*cell` dropped here while still borrowed + | borrow might be used here, when `gen` is dropped and runs the destructor for generator | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `ref_` does not live long enough --> $DIR/dropck.rs:15:18 | LL | gen = || { - | -- capture occurs here + | -- value captured here by generator LL | // but the generator can use it to drop a `Ref<'a, i32>`. LL | let _d = ref_.take(); | ^^^^ borrowed value does not live long enough ... LL | } - | - borrowed value dropped before borrower + | - + | | + | `ref_` dropped here while still borrowed + | borrow might be used here, when `gen` is dropped and runs the destructor for generator | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/generator-region-requirements.ast.stderr b/src/test/ui/generator/generator-region-requirements.migrate.stderr similarity index 100% rename from src/test/ui/generator/generator-region-requirements.ast.stderr rename to src/test/ui/generator/generator-region-requirements.migrate.stderr diff --git a/src/test/ui/generator/generator-region-requirements.rs b/src/test/ui/generator/generator-region-requirements.rs index 9738f6c393..41cb339f45 100644 --- a/src/test/ui/generator/generator-region-requirements.rs +++ b/src/test/ui/generator/generator-region-requirements.rs @@ -1,8 +1,4 @@ -// revisions: ast nll -// ignore-compare-mode-nll - #![feature(generators, generator_trait)] -#![cfg_attr(nll, feature(nll))] use std::ops::{Generator, GeneratorState}; use std::pin::Pin; @@ -14,8 +10,7 @@ fn dangle(x: &mut i32) -> &'static mut i32 { loop { match Pin::new(&mut g).resume() { GeneratorState::Complete(c) => return c, -//[nll]~^ ERROR explicit lifetime required -//[ast]~^^ ERROR explicit lifetime required + //~^ ERROR explicit lifetime required GeneratorState::Yielded(_) => (), } } diff --git a/src/test/ui/generator/generator-region-requirements.nll.stderr b/src/test/ui/generator/generator-region-requirements.stderr similarity index 90% rename from src/test/ui/generator/generator-region-requirements.nll.stderr rename to src/test/ui/generator/generator-region-requirements.stderr index 8a96d187f6..53d48bc4f5 100644 --- a/src/test/ui/generator/generator-region-requirements.nll.stderr +++ b/src/test/ui/generator/generator-region-requirements.stderr @@ -1,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/generator-region-requirements.rs:16:51 + --> $DIR/generator-region-requirements.rs:12:51 | LL | fn dangle(x: &mut i32) -> &'static mut i32 { | -------- help: add explicit lifetime `'static` to the type of `x`: `&'static mut i32` diff --git a/src/test/ui/generator/generator-with-nll.rs b/src/test/ui/generator/generator-with-nll.rs index 87afa57ab5..cee3e6d226 100644 --- a/src/test/ui/generator/generator-with-nll.rs +++ b/src/test/ui/generator/generator-with-nll.rs @@ -1,5 +1,4 @@ #![feature(generators)] -#![feature(nll)] fn main() { || { diff --git a/src/test/ui/generator/generator-with-nll.stderr b/src/test/ui/generator/generator-with-nll.stderr index bd5abb2020..14199aeb93 100644 --- a/src/test/ui/generator/generator-with-nll.stderr +++ b/src/test/ui/generator/generator-with-nll.stderr @@ -1,5 +1,5 @@ error[E0626]: borrow may still be in use when generator yields - --> $DIR/generator-with-nll.rs:8:17 + --> $DIR/generator-with-nll.rs:7:17 | LL | let b = &mut true; | ^^^^^^^^^ diff --git a/src/test/ui/generator/issue-53548.rs b/src/test/ui/generator/issue-53548.rs index 00fdb91faa..73a2bcdd55 100644 --- a/src/test/ui/generator/issue-53548.rs +++ b/src/test/ui/generator/issue-53548.rs @@ -36,4 +36,3 @@ fn main() { yield (); }); } - diff --git a/src/test/ui/generator/no-arguments-on-generators.stderr b/src/test/ui/generator/no-arguments-on-generators.stderr index 47a12bbacc..23ae21585f 100644 --- a/src/test/ui/generator/no-arguments-on-generators.stderr +++ b/src/test/ui/generator/no-arguments-on-generators.stderr @@ -6,4 +6,3 @@ LL | let gen = |start| { error: aborting due to previous error -For more information about this error, try `rustc --explain E0628`. diff --git a/src/test/ui/generator/ref-escapes-but-not-over-yield.nll.stderr b/src/test/ui/generator/ref-escapes-but-not-over-yield.nll.stderr deleted file mode 100644 index 01eea62735..0000000000 --- a/src/test/ui/generator/ref-escapes-but-not-over-yield.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0521]: borrowed data escapes outside of generator - --> $DIR/ref-escapes-but-not-over-yield.rs:11:9 - | -LL | let mut a = &3; - | ----- `a` is declared here, outside of the generator body -... -LL | a = &b; - | ^^^^-- - | | | - | | borrow is only valid in the generator body - | reference to `b` escapes the generator body here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0521`. diff --git a/src/test/ui/generator/ref-escapes-but-not-over-yield.rs b/src/test/ui/generator/ref-escapes-but-not-over-yield.rs index 8c576581ad..3856d8233b 100644 --- a/src/test/ui/generator/ref-escapes-but-not-over-yield.rs +++ b/src/test/ui/generator/ref-escapes-but-not-over-yield.rs @@ -9,7 +9,7 @@ fn foo(x: &i32) { yield(); let b = 5; a = &b; - //~^ ERROR `b` does not live long enough + //~^ ERROR borrowed data escapes outside of generator }; } diff --git a/src/test/ui/generator/ref-escapes-but-not-over-yield.stderr b/src/test/ui/generator/ref-escapes-but-not-over-yield.stderr index 20a06abebd..de533e4d5f 100644 --- a/src/test/ui/generator/ref-escapes-but-not-over-yield.stderr +++ b/src/test/ui/generator/ref-escapes-but-not-over-yield.stderr @@ -1,14 +1,14 @@ -error[E0597]: `b` does not live long enough - --> $DIR/ref-escapes-but-not-over-yield.rs:11:14 +error[E0521]: borrowed data escapes outside of generator + --> $DIR/ref-escapes-but-not-over-yield.rs:11:9 | +LL | let mut a = &3; + | ----- `a` is declared here, outside of the generator body +... LL | a = &b; - | ^ borrowed value does not live long enough -LL | -LL | }; - | - `b` dropped here while still borrowed -LL | } - | - borrowed value needs to live until here + | ^^^^-- + | | | + | | borrow is only valid in the generator body + | reference to `b` escapes the generator body here error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/generator/type-mismatch-signature-deduction.rs b/src/test/ui/generator/type-mismatch-signature-deduction.rs new file mode 100644 index 0000000000..b9c6bc5d07 --- /dev/null +++ b/src/test/ui/generator/type-mismatch-signature-deduction.rs @@ -0,0 +1,17 @@ +#![feature(generators, generator_trait)] + +use std::ops::Generator; + +fn foo() -> impl Generator { + || { + if false { + return Ok(6); //~ ERROR mismatched types [E0308] + } + + yield (); + + 5 + } +} + +fn main() {} diff --git a/src/test/ui/generator/type-mismatch-signature-deduction.stderr b/src/test/ui/generator/type-mismatch-signature-deduction.stderr new file mode 100644 index 0000000000..35d3f95c3e --- /dev/null +++ b/src/test/ui/generator/type-mismatch-signature-deduction.stderr @@ -0,0 +1,12 @@ +error[E0308]: mismatched types + --> $DIR/type-mismatch-signature-deduction.rs:8:20 + | +LL | return Ok(6); + | ^^^^^ expected i32, found enum `std::result::Result` + | + = note: expected type `i32` + found type `std::result::Result<{integer}, _>` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/generator/unresolved_type_param.rs b/src/test/ui/generator/unresolved_type_param.rs new file mode 100644 index 0000000000..77174b0321 --- /dev/null +++ b/src/test/ui/generator/unresolved_type_param.rs @@ -0,0 +1,15 @@ +// Provoke an unresolved type error (T). +// Error message should pinpoint the type parameter T as needing to be bound +// (rather than give a general error message) +// edition:2018 +#![feature(async_await)] +async fn bar() -> () {} + +async fn foo() { + bar().await; + //~^ ERROR type inside generator must be known in this context + //~| NOTE cannot infer type for `T` + //~| NOTE the type is part of the generator because of this `yield` + //~| NOTE in this expansion of desugaring of `await` +} +fn main() {} diff --git a/src/test/ui/generator/unresolved_type_param.stderr b/src/test/ui/generator/unresolved_type_param.stderr new file mode 100644 index 0000000000..afb9adf4c7 --- /dev/null +++ b/src/test/ui/generator/unresolved_type_param.stderr @@ -0,0 +1,15 @@ +error[E0698]: type inside generator must be known in this context + --> $DIR/unresolved_type_param.rs:9:5 + | +LL | bar().await; + | ^^^ cannot infer type for `T` + | +note: the type is part of the generator because of this `yield` + --> $DIR/unresolved_type_param.rs:9:5 + | +LL | bar().await; + | ^^^^^^^^^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0698`. diff --git a/src/test/ui/generator/yield-in-args.nll.stderr b/src/test/ui/generator/yield-in-args.nll.stderr deleted file mode 100644 index ee6d22c27c..0000000000 --- a/src/test/ui/generator/yield-in-args.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0626]: borrow may still be in use when generator yields - --> $DIR/yield-in-args.rs:8:13 - | -LL | foo(&b, yield); - | ^^ ----- possible yield occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0626`. diff --git a/src/test/ui/generator/yield-in-args.stderr b/src/test/ui/generator/yield-in-args.stderr index 2f22dea4e9..ee6d22c27c 100644 --- a/src/test/ui/generator/yield-in-args.stderr +++ b/src/test/ui/generator/yield-in-args.stderr @@ -1,8 +1,8 @@ error[E0626]: borrow may still be in use when generator yields - --> $DIR/yield-in-args.rs:8:14 + --> $DIR/yield-in-args.rs:8:13 | LL | foo(&b, yield); - | ^ ----- possible yield occurs here + | ^^ ----- possible yield occurs here error: aborting due to previous error diff --git a/src/test/ui/generator/yield-in-const.stderr b/src/test/ui/generator/yield-in-const.stderr index e531bd6ef9..663bb70d7a 100644 --- a/src/test/ui/generator/yield-in-const.stderr +++ b/src/test/ui/generator/yield-in-const.stderr @@ -6,4 +6,3 @@ LL | const A: u8 = { yield 3u8; 3u8}; error: aborting due to previous error -For more information about this error, try `rustc --explain E0627`. diff --git a/src/test/ui/generator/yield-in-function.stderr b/src/test/ui/generator/yield-in-function.stderr index 981c9f8339..e12b0e6843 100644 --- a/src/test/ui/generator/yield-in-function.stderr +++ b/src/test/ui/generator/yield-in-function.stderr @@ -6,4 +6,3 @@ LL | fn main() { yield; } error: aborting due to previous error -For more information about this error, try `rustc --explain E0627`. diff --git a/src/test/ui/generator/yield-in-static.stderr b/src/test/ui/generator/yield-in-static.stderr index 46d341f3dc..220520c386 100644 --- a/src/test/ui/generator/yield-in-static.stderr +++ b/src/test/ui/generator/yield-in-static.stderr @@ -6,4 +6,3 @@ LL | static B: u8 = { yield 3u8; 3u8}; error: aborting due to previous error -For more information about this error, try `rustc --explain E0627`. diff --git a/src/test/ui/generator/yield-while-iterating.nll.stderr b/src/test/ui/generator/yield-while-iterating.nll.stderr deleted file mode 100644 index 43e29ceb5e..0000000000 --- a/src/test/ui/generator/yield-while-iterating.nll.stderr +++ /dev/null @@ -1,25 +0,0 @@ -error[E0626]: borrow may still be in use when generator yields - --> $DIR/yield-while-iterating.rs:13:18 - | -LL | for p in &x { - | ^^ -LL | yield(); - | ------- possible yield occurs here - -error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/yield-while-iterating.rs:58:20 - | -LL | let mut b = || { - | -- mutable borrow occurs here -LL | for p in &mut x { - | - first borrow occurs due to use of `x` in generator -... -LL | println!("{}", x[0]); - | ^ immutable borrow occurs here -LL | Pin::new(&mut b).resume(); - | ------ mutable borrow later used here - -error: aborting due to 2 previous errors - -Some errors occurred: E0502, E0626. -For more information about an error, try `rustc --explain E0502`. diff --git a/src/test/ui/generator/yield-while-iterating.stderr b/src/test/ui/generator/yield-while-iterating.stderr index bcfe4f64bc..6a96b25b19 100644 --- a/src/test/ui/generator/yield-while-iterating.stderr +++ b/src/test/ui/generator/yield-while-iterating.stderr @@ -1,8 +1,8 @@ error[E0626]: borrow may still be in use when generator yields - --> $DIR/yield-while-iterating.rs:13:19 + --> $DIR/yield-while-iterating.rs:13:18 | LL | for p in &x { - | ^ + | ^^ LL | yield(); | ------- possible yield occurs here @@ -12,15 +12,14 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as muta LL | let mut b = || { | -- mutable borrow occurs here LL | for p in &mut x { - | - previous borrow occurs due to use of `x` in closure + | - first borrow occurs due to use of `x` in generator ... LL | println!("{}", x[0]); | ^ immutable borrow occurs here LL | Pin::new(&mut b).resume(); -LL | } - | - mutable borrow ends here + | ------ mutable borrow later used here error: aborting due to 2 previous errors -Some errors occurred: E0502, E0626. +Some errors have detailed explanations: E0502, E0626. For more information about an error, try `rustc --explain E0502`. diff --git a/src/test/ui/generator/yield-while-local-borrowed.rs b/src/test/ui/generator/yield-while-local-borrowed.rs index 38061e7135..b643bbf337 100644 --- a/src/test/ui/generator/yield-while-local-borrowed.rs +++ b/src/test/ui/generator/yield-while-local-borrowed.rs @@ -1,5 +1,3 @@ -// compile-flags: -Z borrowck=compare - #![feature(generators, generator_trait)] use std::ops::{GeneratorState, Generator}; @@ -13,8 +11,7 @@ fn borrow_local_inline() { // `b` and gets extended by region inference.) let mut b = move || { let a = &mut 3; - //~^ ERROR borrow may still be in use when generator yields (Ast) - //~| ERROR borrow may still be in use when generator yields (Mir) + //~^ ERROR borrow may still be in use when generator yields yield(); println!("{}", a); }; @@ -41,8 +38,7 @@ fn borrow_local() { let a = 3; { let b = &a; - //~^ ERROR borrow may still be in use when generator yields (Ast) - //~| ERROR borrow may still be in use when generator yields (Mir) + //~^ ERROR borrow may still be in use when generator yields yield(); println!("{}", b); } diff --git a/src/test/ui/generator/yield-while-local-borrowed.stderr b/src/test/ui/generator/yield-while-local-borrowed.stderr index 56f425b7e7..c1513ef9b7 100644 --- a/src/test/ui/generator/yield-while-local-borrowed.stderr +++ b/src/test/ui/generator/yield-while-local-borrowed.stderr @@ -1,39 +1,21 @@ -error[E0626]: borrow may still be in use when generator yields (Ast) - --> $DIR/yield-while-local-borrowed.rs:15:22 - | -LL | let a = &mut 3; - | ^ -... -LL | yield(); - | ------- possible yield occurs here - -error[E0626]: borrow may still be in use when generator yields (Ast) - --> $DIR/yield-while-local-borrowed.rs:43:22 - | -LL | let b = &a; - | ^ -... -LL | yield(); - | ------- possible yield occurs here - -error[E0626]: borrow may still be in use when generator yields (Mir) - --> $DIR/yield-while-local-borrowed.rs:15:17 +error[E0626]: borrow may still be in use when generator yields + --> $DIR/yield-while-local-borrowed.rs:13:17 | LL | let a = &mut 3; | ^^^^^^ -... +LL | LL | yield(); | ------- possible yield occurs here -error[E0626]: borrow may still be in use when generator yields (Mir) - --> $DIR/yield-while-local-borrowed.rs:43:21 +error[E0626]: borrow may still be in use when generator yields + --> $DIR/yield-while-local-borrowed.rs:40:21 | LL | let b = &a; | ^^ -... +LL | LL | yield(); | ------- possible yield occurs here -error: aborting due to 4 previous errors +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0626`. diff --git a/src/test/ui/generator/yield-while-ref-reborrowed.nll.stderr b/src/test/ui/generator/yield-while-ref-reborrowed.nll.stderr deleted file mode 100644 index 4c37cd3517..0000000000 --- a/src/test/ui/generator/yield-while-ref-reborrowed.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0501]: cannot borrow `x` as immutable because previous closure requires unique access - --> $DIR/yield-while-ref-reborrowed.rs:36:20 - | -LL | let mut b = || { - | -- generator construction occurs here -LL | let a = &mut *x; - | - first borrow occurs due to use of `x` in generator -... -LL | println!("{}", x); - | ^ second borrow occurs here -LL | Pin::new(&mut b).resume(); - | ------ first borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0501`. diff --git a/src/test/ui/generator/yield-while-ref-reborrowed.stderr b/src/test/ui/generator/yield-while-ref-reborrowed.stderr index 155f2770d3..4c37cd3517 100644 --- a/src/test/ui/generator/yield-while-ref-reborrowed.stderr +++ b/src/test/ui/generator/yield-while-ref-reborrowed.stderr @@ -2,15 +2,14 @@ error[E0501]: cannot borrow `x` as immutable because previous closure requires u --> $DIR/yield-while-ref-reborrowed.rs:36:20 | LL | let mut b = || { - | -- closure construction occurs here + | -- generator construction occurs here LL | let a = &mut *x; - | - previous borrow occurs due to use of `x` in closure + | - first borrow occurs due to use of `x` in generator ... LL | println!("{}", x); - | ^ borrow occurs here + | ^ second borrow occurs here LL | Pin::new(&mut b).resume(); -LL | } - | - borrow from closure ends here + | ------ first borrow later used here error: aborting due to previous error diff --git a/src/test/ui/generic/generic-arg-mismatch-recover.stderr b/src/test/ui/generic/generic-arg-mismatch-recover.stderr index e16ad9120a..fe36e807c7 100644 --- a/src/test/ui/generic/generic-arg-mismatch-recover.stderr +++ b/src/test/ui/generic/generic-arg-mismatch-recover.stderr @@ -27,5 +27,5 @@ LL | Bar::<'static, 'static, ()>(&()); error: aborting due to 4 previous errors -Some errors occurred: E0107, E0308. +Some errors have detailed explanations: E0107, E0308. For more information about an error, try `rustc --explain E0107`. diff --git a/src/test/ui/glob-resolve1.stderr b/src/test/ui/glob-resolve1.stderr index c252a6e220..4958099ca7 100644 --- a/src/test/ui/glob-resolve1.stderr +++ b/src/test/ui/glob-resolve1.stderr @@ -84,5 +84,5 @@ LL | use bar::D; error: aborting due to 8 previous errors -Some errors occurred: E0412, E0423, E0425. +Some errors have detailed explanations: E0412, E0423, E0425. For more information about an error, try `rustc --explain E0412`. diff --git a/src/test/ui/hashmap-iter-value-lifetime.nll.stderr b/src/test/ui/hashmap-iter-value-lifetime.nll.stderr index f7626b13ba..312a91adca 100644 --- a/src/test/ui/hashmap-iter-value-lifetime.nll.stderr +++ b/src/test/ui/hashmap-iter-value-lifetime.nll.stderr @@ -5,7 +5,7 @@ LL | let (_, thing) = my_stuff.iter().next().unwrap(); | -------- immutable borrow occurs here LL | LL | my_stuff.clear(); - | ^^^^^^^^^^^^^^^^ mutable borrow occurs here + | ^^^^^^^^ mutable borrow occurs here LL | LL | println!("{}", *thing); | ------ immutable borrow later used here diff --git a/src/test/ui/hashmap-iter-value-lifetime.stderr b/src/test/ui/hashmap-iter-value-lifetime.stderr index 0f7e04dae0..f7626b13ba 100644 --- a/src/test/ui/hashmap-iter-value-lifetime.stderr +++ b/src/test/ui/hashmap-iter-value-lifetime.stderr @@ -5,10 +5,10 @@ LL | let (_, thing) = my_stuff.iter().next().unwrap(); | -------- immutable borrow occurs here LL | LL | my_stuff.clear(); - | ^^^^^^^^ mutable borrow occurs here -... -LL | } - | - immutable borrow ends here + | ^^^^^^^^^^^^^^^^ mutable borrow occurs here +LL | +LL | println!("{}", *thing); + | ------ immutable borrow later used here error: aborting due to previous error diff --git a/src/test/ui/hashmap-lifetimes.nll.stderr b/src/test/ui/hashmap-lifetimes.nll.stderr index 497c7d1216..aa8e890c16 100644 --- a/src/test/ui/hashmap-lifetimes.nll.stderr +++ b/src/test/ui/hashmap-lifetimes.nll.stderr @@ -4,7 +4,7 @@ error[E0502]: cannot borrow `my_stuff` as mutable because it is also borrowed as LL | let mut it = my_stuff.iter(); | -------- immutable borrow occurs here LL | my_stuff.insert(1, 43); - | ^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here + | ^^^^^^^^ mutable borrow occurs here LL | it; | -- immutable borrow later used here diff --git a/src/test/ui/hashmap-lifetimes.stderr b/src/test/ui/hashmap-lifetimes.stderr index 728946ca13..497c7d1216 100644 --- a/src/test/ui/hashmap-lifetimes.stderr +++ b/src/test/ui/hashmap-lifetimes.stderr @@ -4,10 +4,9 @@ error[E0502]: cannot borrow `my_stuff` as mutable because it is also borrowed as LL | let mut it = my_stuff.iter(); | -------- immutable borrow occurs here LL | my_stuff.insert(1, 43); - | ^^^^^^^^ mutable borrow occurs here + | ^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here LL | it; -LL | } - | - immutable borrow ends here + | -- immutable borrow later used here error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.nll.stderr b/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.nll.stderr new file mode 100644 index 0000000000..070fe12a28 --- /dev/null +++ b/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.nll.stderr @@ -0,0 +1,30 @@ +error: lifetime may not live long enough + --> $DIR/hr-subtype.rs:33:13 + | +LL | fn subtype<'x,'y:'x,'z:'y>() { + | -- -- lifetime `'y` defined here + | | + | lifetime `'x` defined here +LL | gimme::<$t2>(None::<$t1>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'x` must outlive `'y` +... +LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>), +LL | | fn(Inv<'y>)) } + | |__________________________________________________- in this macro invocation + +error: lifetime may not live long enough + --> $DIR/hr-subtype.rs:39:13 + | +LL | fn supertype<'x,'y:'x,'z:'y>() { + | -- -- lifetime `'y` defined here + | | + | lifetime `'x` defined here +LL | gimme::<$t1>(None::<$t2>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'x` must outlive `'y` +... +LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>), +LL | | fn(Inv<'y>)) } + | |__________________________________________________- in this macro invocation + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.nll.stderr b/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.nll.stderr new file mode 100644 index 0000000000..e140eaadd4 --- /dev/null +++ b/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.nll.stderr @@ -0,0 +1,16 @@ +error: lifetime may not live long enough + --> $DIR/hr-subtype.rs:39:13 + | +LL | fn supertype<'x,'y:'x,'z:'y>() { + | -- -- lifetime `'y` defined here + | | + | lifetime `'x` defined here +LL | gimme::<$t1>(None::<$t2>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'x` must outlive `'y` +... +LL | / check! { free_x_vs_free_y: (fn(&'x u32), +LL | | fn(&'y u32)) } + | |__________________________________________- in this macro invocation + +error: aborting due to previous error + diff --git a/src/test/ui/hrtb/hrtb-cache-issue-54302.nll.stderr b/src/test/ui/hrtb/hrtb-cache-issue-54302.nll.stderr new file mode 100644 index 0000000000..4de35d70c3 --- /dev/null +++ b/src/test/ui/hrtb/hrtb-cache-issue-54302.nll.stderr @@ -0,0 +1,8 @@ +error: higher-ranked subtype error + --> $DIR/hrtb-cache-issue-54302.rs:19:5 + | +LL | assert_deserialize_owned::<&'static str>(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/hrtb/hrtb-debruijn-in-receiver.nll.stderr b/src/test/ui/hrtb/hrtb-debruijn-in-receiver.nll.stderr deleted file mode 100644 index 70d5b3c2ec..0000000000 --- a/src/test/ui/hrtb/hrtb-debruijn-in-receiver.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0499]: cannot borrow `foo` as mutable more than once at a time - --> $DIR/hrtb-debruijn-in-receiver.rs:17:5 - | -LL | foo.insert(); - | --- first mutable borrow occurs here -LL | foo.insert(); - | ^^^ - | | - | second mutable borrow occurs here - | first borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/hrtb/hrtb-debruijn-in-receiver.stderr b/src/test/ui/hrtb/hrtb-debruijn-in-receiver.stderr index e498a9ad02..70d5b3c2ec 100644 --- a/src/test/ui/hrtb/hrtb-debruijn-in-receiver.stderr +++ b/src/test/ui/hrtb/hrtb-debruijn-in-receiver.stderr @@ -4,9 +4,10 @@ error[E0499]: cannot borrow `foo` as mutable more than once at a time LL | foo.insert(); | --- first mutable borrow occurs here LL | foo.insert(); - | ^^^ second mutable borrow occurs here -LL | } - | - first borrow ends here + | ^^^ + | | + | second mutable borrow occurs here + | first borrow later used here error: aborting due to previous error diff --git a/src/test/ui/hrtb/hrtb-identity-fn-borrows.ast.stderr b/src/test/ui/hrtb/hrtb-identity-fn-borrows.ast.stderr deleted file mode 100644 index 6f055aaf5a..0000000000 --- a/src/test/ui/hrtb/hrtb-identity-fn-borrows.ast.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/hrtb-identity-fn-borrows.rs:17:5 - | -LL | let y = f.call(&x); - | - borrow of `x` occurs here -LL | x = 5; - | ^^^^^ assignment to borrowed `x` occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/hrtb/hrtb-identity-fn-borrows.mir.stderr b/src/test/ui/hrtb/hrtb-identity-fn-borrows.mir.stderr deleted file mode 100644 index 2b69b3f622..0000000000 --- a/src/test/ui/hrtb/hrtb-identity-fn-borrows.mir.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/hrtb-identity-fn-borrows.rs:17:5 - | -LL | let y = f.call(&x); - | -- borrow of `x` occurs here -LL | x = 5; - | ^^^^^ assignment to borrowed `x` occurs here -... -LL | drop(y); - | - borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/hrtb/hrtb-identity-fn-borrows.rs b/src/test/ui/hrtb/hrtb-identity-fn-borrows.rs index 35b39a9a69..89fc4705a7 100644 --- a/src/test/ui/hrtb/hrtb-identity-fn-borrows.rs +++ b/src/test/ui/hrtb/hrtb-identity-fn-borrows.rs @@ -1,9 +1,6 @@ // Test that the `'a` in the where clause correctly links the region // of the output to the region of the input. -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - trait FnLike { fn call(&self, arg: A) -> R; } @@ -14,8 +11,7 @@ fn call_repeatedly(f: F) // Result is stored: cannot re-assign `x` let mut x = 3; let y = f.call(&x); - x = 5; //[ast]~ ERROR cannot assign - //[mir]~^ ERROR cannot assign to `x` because it is borrowed + x = 5; //~ ERROR cannot assign to `x` because it is borrowed // Result is not stored: can re-assign `x` let mut x = 3; diff --git a/src/test/ui/hrtb/hrtb-identity-fn-borrows.ast.nll.stderr b/src/test/ui/hrtb/hrtb-identity-fn-borrows.stderr similarity index 89% rename from src/test/ui/hrtb/hrtb-identity-fn-borrows.ast.nll.stderr rename to src/test/ui/hrtb/hrtb-identity-fn-borrows.stderr index 2b69b3f622..4886a3c8ba 100644 --- a/src/test/ui/hrtb/hrtb-identity-fn-borrows.ast.nll.stderr +++ b/src/test/ui/hrtb/hrtb-identity-fn-borrows.stderr @@ -1,5 +1,5 @@ error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/hrtb-identity-fn-borrows.rs:17:5 + --> $DIR/hrtb-identity-fn-borrows.rs:14:5 | LL | let y = f.call(&x); | -- borrow of `x` occurs here diff --git a/src/test/ui/hrtb/hrtb-perfect-forwarding.nll.stderr b/src/test/ui/hrtb/hrtb-perfect-forwarding.nll.stderr new file mode 100644 index 0000000000..0522fc45d6 --- /dev/null +++ b/src/test/ui/hrtb/hrtb-perfect-forwarding.nll.stderr @@ -0,0 +1,77 @@ +warning: function cannot return without recursing + --> $DIR/hrtb-perfect-forwarding.rs:22:1 + | +LL | / fn no_hrtb<'b,T>(mut t: T) +LL | | where T : Bar<&'b isize> +LL | | { +LL | | // OK -- `T : Bar<&'b isize>`, and thus the impl above ensures that +LL | | // `&mut T : Bar<&'b isize>`. +LL | | no_hrtb(&mut t); + | | --------------- recursive call site +LL | | } + | |_^ cannot return without recursing + | + = note: #[warn(unconditional_recursion)] on by default + = help: a `loop` may express intention better if this is on purpose + +warning: function cannot return without recursing + --> $DIR/hrtb-perfect-forwarding.rs:30:1 + | +LL | / fn bar_hrtb(mut t: T) +LL | | where T : for<'b> Bar<&'b isize> +LL | | { +LL | | // OK -- `T : for<'b> Bar<&'b isize>`, and thus the impl above +... | +LL | | bar_hrtb(&mut t); + | | ---------------- recursive call site +LL | | } + | |_^ cannot return without recursing + | + = help: a `loop` may express intention better if this is on purpose + +warning: function cannot return without recursing + --> $DIR/hrtb-perfect-forwarding.rs:39:1 + | +LL | / fn foo_hrtb_bar_not<'b,T>(mut t: T) +LL | | where T : for<'a> Foo<&'a isize> + Bar<&'b isize> +LL | | { +LL | | // Not OK -- The forwarding impl for `Foo` requires that `Bar` also +... | +LL | | foo_hrtb_bar_not(&mut t); + | | ------------------------ recursive call site +LL | | } + | |_^ cannot return without recursing + | + = help: a `loop` may express intention better if this is on purpose + +error: higher-ranked subtype error + --> $DIR/hrtb-perfect-forwarding.rs:46:5 + | +LL | foo_hrtb_bar_not(&mut t); + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: lifetime may not live long enough + --> $DIR/hrtb-perfect-forwarding.rs:46:5 + | +LL | fn foo_hrtb_bar_not<'b,T>(mut t: T) + | -- lifetime `'b` defined here +... +LL | foo_hrtb_bar_not(&mut t); + | ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'static` + +warning: function cannot return without recursing + --> $DIR/hrtb-perfect-forwarding.rs:49:1 + | +LL | / fn foo_hrtb_bar_hrtb(mut t: T) +LL | | where T : for<'a> Foo<&'a isize> + for<'b> Bar<&'b isize> +LL | | { +LL | | // OK -- now we have `T : for<'b> Bar&'b isize>`. +LL | | foo_hrtb_bar_hrtb(&mut t); + | | ------------------------- recursive call site +LL | | } + | |_^ cannot return without recursing + | + = help: a `loop` may express intention better if this is on purpose + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/huge-array-simple.rs b/src/test/ui/huge-array-simple.rs index 8b244a4723..0ff27168a7 100644 --- a/src/test/ui/huge-array-simple.rs +++ b/src/test/ui/huge-array-simple.rs @@ -1,6 +1,10 @@ // error-pattern: too big for the current architecture // normalize-stderr-test "; \d+]" -> "; N]" + +// FIXME https://github.com/rust-lang/rust/issues/59774 +// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> "" +// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" #![allow(exceeding_bitshifts)] #[cfg(target_pointer_width = "64")] diff --git a/src/test/ui/huge-array.rs b/src/test/ui/huge-array.rs index 0608b23dac..f58dcd5806 100644 --- a/src/test/ui/huge-array.rs +++ b/src/test/ui/huge-array.rs @@ -1,5 +1,9 @@ // error-pattern:; 1518600000 +// FIXME https://github.com/rust-lang/rust/issues/59774 +// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> "" +// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" + fn generic(t: T) { let s: [T; 1518600000] = [t; 1518600000]; } diff --git a/src/test/ui/huge-enum.rs b/src/test/ui/huge-enum.rs index 71c8fd55b2..2492afbdc8 100644 --- a/src/test/ui/huge-enum.rs +++ b/src/test/ui/huge-enum.rs @@ -1,6 +1,10 @@ // normalize-stderr-test "std::option::Option<\[u32; \d+\]>" -> "TYPE" // normalize-stderr-test "\[u32; \d+\]" -> "TYPE" +// FIXME https://github.com/rust-lang/rust/issues/59774 +// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> "" +// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" + #[cfg(target_pointer_width = "32")] fn main() { let big: Option<[u32; (1<<29)-1]> = None; diff --git a/src/test/ui/huge-struct.rs b/src/test/ui/huge-struct.rs index 74e43cc647..dc7d75a6f0 100644 --- a/src/test/ui/huge-struct.rs +++ b/src/test/ui/huge-struct.rs @@ -2,6 +2,10 @@ // normalize-stderr-test "S1M" -> "SXX" // error-pattern: too big for the current +// FIXME https://github.com/rust-lang/rust/issues/59774 +// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> "" +// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" + struct S32 { v0: T, v1: T, diff --git a/src/test/ui/hygiene/assoc_item_ctxt.stderr b/src/test/ui/hygiene/assoc_item_ctxt.stderr index ebe38b7c41..0d1c73eef0 100644 --- a/src/test/ui/hygiene/assoc_item_ctxt.stderr +++ b/src/test/ui/hygiene/assoc_item_ctxt.stderr @@ -21,5 +21,5 @@ LL | mac_trait_impl!(); error: aborting due to 2 previous errors -Some errors occurred: E0046, E0407. +Some errors have detailed explanations: E0046, E0407. For more information about an error, try `rustc --explain E0046`. diff --git a/src/test/ui/hygiene/fields-move.nll.stderr b/src/test/ui/hygiene/fields-move.nll.stderr deleted file mode 100644 index 562f60e31b..0000000000 --- a/src/test/ui/hygiene/fields-move.nll.stderr +++ /dev/null @@ -1,38 +0,0 @@ -error[E0382]: use of moved value: `foo.x` - --> $DIR/fields-move.rs:18:9 - | -LL | $foo.x - | ^^^^^^ value used here after move -... -LL | assert_two_copies(copy_modern!(foo), foo.x); - | ----- value moved here -LL | assert_two_copies(copy_legacy!(foo), foo.x); - | ----------------- in this macro invocation - | - = note: move occurs because `foo.x` has type `NonCopy`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `foo.x` - --> $DIR/fields-move.rs:28:42 - | -LL | $foo.x - | ------ value moved here -... -LL | assert_two_copies(copy_modern!(foo), foo.x); - | ^^^^^ value used here after move - | - = note: move occurs because `foo.x` has type `NonCopy`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `foo.x` - --> $DIR/fields-move.rs:29:42 - | -LL | $foo.x - | ------ value moved here -... -LL | assert_two_copies(copy_legacy!(foo), foo.x); - | ^^^^^ value used here after move - | - = note: move occurs because `foo.x` has type `NonCopy`, which does not implement the `Copy` trait - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/hygiene/fields-move.stderr b/src/test/ui/hygiene/fields-move.stderr index 43d55fdc68..562f60e31b 100644 --- a/src/test/ui/hygiene/fields-move.stderr +++ b/src/test/ui/hygiene/fields-move.stderr @@ -1,33 +1,32 @@ error[E0382]: use of moved value: `foo.x` - --> $DIR/fields-move.rs:28:42 + --> $DIR/fields-move.rs:18:9 | -LL | $foo.x - | ------ value moved here +LL | $foo.x + | ^^^^^^ value used here after move ... LL | assert_two_copies(copy_modern!(foo), foo.x); - | ^^^^^ value used here after move + | ----- value moved here +LL | assert_two_copies(copy_legacy!(foo), foo.x); + | ----------------- in this macro invocation | = note: move occurs because `foo.x` has type `NonCopy`, which does not implement the `Copy` trait error[E0382]: use of moved value: `foo.x` - --> $DIR/fields-move.rs:18:9 + --> $DIR/fields-move.rs:28:42 | LL | $foo.x | ------ value moved here ... -LL | $foo.x - | ^^^^^^ value used here after move -... -LL | assert_two_copies(copy_legacy!(foo), foo.x); - | ----------------- in this macro invocation +LL | assert_two_copies(copy_modern!(foo), foo.x); + | ^^^^^ value used here after move | = note: move occurs because `foo.x` has type `NonCopy`, which does not implement the `Copy` trait error[E0382]: use of moved value: `foo.x` --> $DIR/fields-move.rs:29:42 | -LL | $foo.x - | ------ value moved here +LL | $foo.x + | ------ value moved here ... LL | assert_two_copies(copy_legacy!(foo), foo.x); | ^^^^^ value used here after move diff --git a/src/test/ui/hygiene/fields-numeric-borrowck.nll.stderr b/src/test/ui/hygiene/fields-numeric-borrowck.nll.stderr deleted file mode 100644 index fb90825c0d..0000000000 --- a/src/test/ui/hygiene/fields-numeric-borrowck.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0499]: cannot borrow `s.0` as mutable more than once at a time - --> $DIR/fields-numeric-borrowck.rs:6:16 - | -LL | let borrow1 = &mut s.0; - | -------- first mutable borrow occurs here -LL | let S { 0: ref mut borrow2 } = s; - | ^^^^^^^^^^^^^^^ second mutable borrow occurs here -... -LL | borrow1.use_mut(); - | ------- first borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/hygiene/fields-numeric-borrowck.stderr b/src/test/ui/hygiene/fields-numeric-borrowck.stderr index 11b5fd70af..fb90825c0d 100644 --- a/src/test/ui/hygiene/fields-numeric-borrowck.stderr +++ b/src/test/ui/hygiene/fields-numeric-borrowck.stderr @@ -2,12 +2,12 @@ error[E0499]: cannot borrow `s.0` as mutable more than once at a time --> $DIR/fields-numeric-borrowck.rs:6:16 | LL | let borrow1 = &mut s.0; - | --- first mutable borrow occurs here + | -------- first mutable borrow occurs here LL | let S { 0: ref mut borrow2 } = s; | ^^^^^^^^^^^^^^^ second mutable borrow occurs here ... -LL | } - | - first borrow ends here +LL | borrow1.use_mut(); + | ------- first borrow later used here error: aborting due to previous error diff --git a/src/test/ui/hygiene/hygienic-label-1.stderr b/src/test/ui/hygiene/hygienic-label-1.stderr index 80cd1547b4..d61c0687c1 100644 --- a/src/test/ui/hygiene/hygienic-label-1.stderr +++ b/src/test/ui/hygiene/hygienic-label-1.stderr @@ -2,7 +2,7 @@ error[E0426]: use of undeclared label `'x` --> $DIR/hygienic-label-1.rs:2:19 | LL | () => { break 'x; } - | ^^ did you mean `'x`? + | ^^ undeclared label `'x` ... LL | 'x: loop { foo!() } | ------ in this macro invocation diff --git a/src/test/ui/hygiene/hygienic-label-2.stderr b/src/test/ui/hygiene/hygienic-label-2.stderr index c20cbd9f68..f23e741deb 100644 --- a/src/test/ui/hygiene/hygienic-label-2.stderr +++ b/src/test/ui/hygiene/hygienic-label-2.stderr @@ -2,7 +2,7 @@ error[E0426]: use of undeclared label `'x` --> $DIR/hygienic-label-2.rs:6:16 | LL | foo!(break 'x); - | ^^ did you mean `'x`? + | ^^ undeclared label `'x` error: aborting due to previous error diff --git a/src/test/ui/hygiene/hygienic-label-3.stderr b/src/test/ui/hygiene/hygienic-label-3.stderr index b5839fe5c3..0c4173a61a 100644 --- a/src/test/ui/hygiene/hygienic-label-3.stderr +++ b/src/test/ui/hygiene/hygienic-label-3.stderr @@ -2,7 +2,7 @@ error[E0426]: use of undeclared label `'x` --> $DIR/hygienic-label-3.rs:2:19 | LL | () => { break 'x; } - | ^^ did you mean `'x`? + | ^^ undeclared label `'x` ... LL | foo!() | ------ in this macro invocation diff --git a/src/test/ui/hygiene/hygienic-label-4.stderr b/src/test/ui/hygiene/hygienic-label-4.stderr index 1dd7489574..1c93da02f6 100644 --- a/src/test/ui/hygiene/hygienic-label-4.stderr +++ b/src/test/ui/hygiene/hygienic-label-4.stderr @@ -2,7 +2,7 @@ error[E0426]: use of undeclared label `'x` --> $DIR/hygienic-label-4.rs:6:16 | LL | foo!(break 'x); - | ^^ did you mean `'x`? + | ^^ undeclared label `'x` error: aborting due to previous error diff --git a/src/test/ui/hygiene/no_implicit_prelude.rs b/src/test/ui/hygiene/no_implicit_prelude.rs index 1cd05f4d44..890c830754 100644 --- a/src/test/ui/hygiene/no_implicit_prelude.rs +++ b/src/test/ui/hygiene/no_implicit_prelude.rs @@ -13,7 +13,7 @@ mod bar { } fn f() { ::foo::m!(); - println!(); //~ ERROR cannot find macro `print!` in this scope + assert_eq!(0, 0); //~ ERROR cannot find macro `panic!` in this scope } } diff --git a/src/test/ui/hygiene/no_implicit_prelude.stderr b/src/test/ui/hygiene/no_implicit_prelude.stderr index 7948f1667d..737b375ed8 100644 --- a/src/test/ui/hygiene/no_implicit_prelude.stderr +++ b/src/test/ui/hygiene/no_implicit_prelude.stderr @@ -7,11 +7,11 @@ LL | fn f() { ::bar::m!(); } LL | Vec::new(); | ^^^ use of undeclared type or module `Vec` -error: cannot find macro `print!` in this scope +error: cannot find macro `panic!` in this scope --> $DIR/no_implicit_prelude.rs:16:9 | -LL | println!(); - | ^^^^^^^^^^^ +LL | assert_eq!(0, 0); + | ^^^^^^^^^^^^^^^^^ | = help: have you added the `#[macro_use]` on the module/import? = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -31,5 +31,5 @@ LL | ().clone() error: aborting due to 3 previous errors -Some errors occurred: E0433, E0599. +Some errors have detailed explanations: E0433, E0599. For more information about an error, try `rustc --explain E0433`. diff --git a/src/test/ui/if/if-let-arm-types.rs b/src/test/ui/if/if-let-arm-types.rs index 819f5dd1cf..0f8815f047 100644 --- a/src/test/ui/if/if-let-arm-types.rs +++ b/src/test/ui/if/if-let-arm-types.rs @@ -1,11 +1,12 @@ fn main() { if let Some(b) = None { - //~^ NOTE if let` arms have incompatible types + //~^ NOTE if and else have incompatible types () + //~^ NOTE expected because of this } else { 1 }; - //~^^ ERROR: `if let` arms have incompatible types + //~^^ ERROR: if and else have incompatible types //~| NOTE expected (), found integer //~| NOTE expected type `()` } diff --git a/src/test/ui/if/if-let-arm-types.stderr b/src/test/ui/if/if-let-arm-types.stderr index b986973fe9..ff88de20f7 100644 --- a/src/test/ui/if/if-let-arm-types.stderr +++ b/src/test/ui/if/if-let-arm-types.stderr @@ -1,14 +1,16 @@ -error[E0308]: `if let` arms have incompatible types - --> $DIR/if-let-arm-types.rs:6:9 +error[E0308]: if and else have incompatible types + --> $DIR/if-let-arm-types.rs:7:9 | LL | / if let Some(b) = None { LL | | LL | | () + | | -- expected because of this +LL | | LL | | } else { LL | | 1 | | ^ expected (), found integer LL | | }; - | |_____- `if let` arms have incompatible types + | |_____- if and else have incompatible types | = note: expected type `()` found type `{integer}` diff --git a/src/test/ui/if/if-no-match-bindings.rs b/src/test/ui/if/if-no-match-bindings.rs new file mode 100644 index 0000000000..581ce18c1d --- /dev/null +++ b/src/test/ui/if/if-no-match-bindings.rs @@ -0,0 +1,22 @@ +// Checks for `if` expressions with respect to default match bindings. +// Specifically, we do not accept `if cond { ... }` where `cond: &mut? bool`. +// Meanwhile, `match cond { true => ..., _ => ... }` does accept that. + +// FIXME(@rust-lang/lang-team): consider relaxing this? + +fn b_ref<'a>() -> &'a bool { &true } +fn b_mut_ref<'a>() -> &'a mut bool { &mut true } + +fn main() { + // This is OK: + match b_ref() { true => {}, _ => {} } + match b_mut_ref() { true => {}, _ => {} } + match &true { true => {}, _ => {} } + match &mut true { true => {}, _ => {} } + + // This is NOT: + if b_ref() {} //~ ERROR mismatched types [E0308] + if b_mut_ref() {} //~ ERROR mismatched types [E0308] + if &true {} //~ ERROR mismatched types [E0308] + if &mut true {} //~ ERROR mismatched types [E0308] +} diff --git a/src/test/ui/if/if-no-match-bindings.stderr b/src/test/ui/if/if-no-match-bindings.stderr new file mode 100644 index 0000000000..7b0b472121 --- /dev/null +++ b/src/test/ui/if/if-no-match-bindings.stderr @@ -0,0 +1,39 @@ +error[E0308]: mismatched types + --> $DIR/if-no-match-bindings.rs:18:8 + | +LL | if b_ref() {} + | ^^^^^^^ expected bool, found &bool + | + = note: expected type `bool` + found type `&bool` + +error[E0308]: mismatched types + --> $DIR/if-no-match-bindings.rs:19:8 + | +LL | if b_mut_ref() {} + | ^^^^^^^^^^^ expected bool, found &mut bool + | + = note: expected type `bool` + found type `&mut bool` + +error[E0308]: mismatched types + --> $DIR/if-no-match-bindings.rs:20:8 + | +LL | if &true {} + | ^^^^^ expected bool, found &bool + | + = note: expected type `bool` + found type `&bool` + +error[E0308]: mismatched types + --> $DIR/if-no-match-bindings.rs:21:8 + | +LL | if &mut true {} + | ^^^^^^^^^ expected bool, found &mut bool + | + = note: expected type `bool` + found type `&mut bool` + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/if/if-without-else-as-fn-expr.rs b/src/test/ui/if/if-without-else-as-fn-expr.rs index 67e4445629..15892de838 100644 --- a/src/test/ui/if/if-without-else-as-fn-expr.rs +++ b/src/test/ui/if/if-without-else-as-fn-expr.rs @@ -3,6 +3,7 @@ fn foo(bar: usize) -> usize { return 3; } //~^^^ ERROR if may be missing an else clause + //~| ERROR mismatched types [E0308] } fn foo2(bar: usize) -> usize { @@ -10,6 +11,7 @@ fn foo2(bar: usize) -> usize { return 3; }; //~^^^ ERROR if may be missing an else clause + //~| ERROR mismatched types [E0308] x } @@ -18,8 +20,36 @@ fn foo3(bar: usize) -> usize { 3 } //~^^^ ERROR if may be missing an else clause + //~| ERROR mismatched types [E0308] } +fn foo_let(bar: usize) -> usize { + if let 0 = 1 { + return 3; + } + //~^^^ ERROR if may be missing an else clause + //~| ERROR mismatched types [E0308] +} + +fn foo2_let(bar: usize) -> usize { + let x: usize = if let 0 = 1 { + return 3; + }; + //~^^^ ERROR if may be missing an else clause + //~| ERROR mismatched types [E0308] + x +} + +fn foo3_let(bar: usize) -> usize { + if let 0 = 1 { + 3 + } + //~^^^ ERROR if may be missing an else clause + //~| ERROR mismatched types [E0308] +} + +// FIXME(60254): deduplicate first error in favor of second. + fn main() { let _ = foo(1); } diff --git a/src/test/ui/if/if-without-else-as-fn-expr.stderr b/src/test/ui/if/if-without-else-as-fn-expr.stderr index 0ba72726ca..06600b1cb9 100644 --- a/src/test/ui/if/if-without-else-as-fn-expr.stderr +++ b/src/test/ui/if/if-without-else-as-fn-expr.stderr @@ -1,3 +1,14 @@ +error[E0308]: mismatched types + --> $DIR/if-without-else-as-fn-expr.rs:2:5 + | +LL | / if bar % 5 == 0 { +LL | | return 3; +LL | | } + | |_____^ expected usize, found () + | + = note: expected type `usize` + found type `()` + error[E0317]: if may be missing an else clause --> $DIR/if-without-else-as-fn-expr.rs:2:5 | @@ -13,8 +24,20 @@ LL | | } = note: `if` expressions without `else` evaluate to `()` = help: consider adding an `else` block that evaluates to the expected type +error[E0308]: mismatched types + --> $DIR/if-without-else-as-fn-expr.rs:10:20 + | +LL | let x: usize = if bar % 5 == 0 { + | ____________________^ +LL | | return 3; +LL | | }; + | |_____^ expected usize, found () + | + = note: expected type `usize` + found type `()` + error[E0317]: if may be missing an else clause - --> $DIR/if-without-else-as-fn-expr.rs:9:20 + --> $DIR/if-without-else-as-fn-expr.rs:10:20 | LL | let x: usize = if bar % 5 == 0 { | _________-__________^ @@ -29,8 +52,19 @@ LL | | }; = note: `if` expressions without `else` evaluate to `()` = help: consider adding an `else` block that evaluates to the expected type +error[E0308]: mismatched types + --> $DIR/if-without-else-as-fn-expr.rs:19:5 + | +LL | / if bar % 5 == 0 { +LL | | 3 +LL | | } + | |_____^ expected usize, found () + | + = note: expected type `usize` + found type `()` + error[E0317]: if may be missing an else clause - --> $DIR/if-without-else-as-fn-expr.rs:17:5 + --> $DIR/if-without-else-as-fn-expr.rs:19:5 | LL | fn foo3(bar: usize) -> usize { | ----- expected `usize` because of this return type @@ -44,6 +78,87 @@ LL | | } = note: `if` expressions without `else` evaluate to `()` = help: consider adding an `else` block that evaluates to the expected type -error: aborting due to 3 previous errors +error[E0308]: mismatched types + --> $DIR/if-without-else-as-fn-expr.rs:27:5 + | +LL | / if let 0 = 1 { +LL | | return 3; +LL | | } + | |_____^ expected usize, found () + | + = note: expected type `usize` + found type `()` + +error[E0317]: if may be missing an else clause + --> $DIR/if-without-else-as-fn-expr.rs:27:5 + | +LL | fn foo_let(bar: usize) -> usize { + | ----- expected `usize` because of this return type +LL | / if let 0 = 1 { +LL | | return 3; +LL | | } + | |_____^ expected usize, found () + | + = note: expected type `usize` + found type `()` + = note: `if` expressions without `else` evaluate to `()` + = help: consider adding an `else` block that evaluates to the expected type + +error[E0308]: mismatched types + --> $DIR/if-without-else-as-fn-expr.rs:35:20 + | +LL | let x: usize = if let 0 = 1 { + | ____________________^ +LL | | return 3; +LL | | }; + | |_____^ expected usize, found () + | + = note: expected type `usize` + found type `()` + +error[E0317]: if may be missing an else clause + --> $DIR/if-without-else-as-fn-expr.rs:35:20 + | +LL | let x: usize = if let 0 = 1 { + | _________-__________^ + | | | + | | expected because of this assignment +LL | | return 3; +LL | | }; + | |_____^ expected usize, found () + | + = note: expected type `usize` + found type `()` + = note: `if` expressions without `else` evaluate to `()` + = help: consider adding an `else` block that evaluates to the expected type + +error[E0308]: mismatched types + --> $DIR/if-without-else-as-fn-expr.rs:44:5 + | +LL | / if let 0 = 1 { +LL | | 3 +LL | | } + | |_____^ expected usize, found () + | + = note: expected type `usize` + found type `()` + +error[E0317]: if may be missing an else clause + --> $DIR/if-without-else-as-fn-expr.rs:44:5 + | +LL | fn foo3_let(bar: usize) -> usize { + | ----- expected `usize` because of this return type +LL | / if let 0 = 1 { +LL | | 3 +LL | | } + | |_____^ expected usize, found () + | + = note: expected type `usize` + found type `()` + = note: `if` expressions without `else` evaluate to `()` + = help: consider adding an `else` block that evaluates to the expected type + +error: aborting due to 12 previous errors -For more information about this error, try `rustc --explain E0317`. +Some errors have detailed explanations: E0308, E0317. +For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/immut-function-arguments.ast.stderr b/src/test/ui/immut-function-arguments.ast.stderr deleted file mode 100644 index f371a13cd4..0000000000 --- a/src/test/ui/immut-function-arguments.ast.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0594]: cannot assign to immutable `Box` content `*y` - --> $DIR/immut-function-arguments.rs:5:5 - | -LL | fn f(y: Box) { - | - help: make this binding mutable: `mut y` -LL | *y = 5; - | ^^^^^^ cannot borrow as mutable - -error[E0594]: cannot assign to immutable `Box` content `*q` - --> $DIR/immut-function-arguments.rs:10:35 - | -LL | let _frob = |q: Box| { *q = 2; }; - | - ^^^^^^ cannot borrow as mutable - | | - | help: make this binding mutable: `mut q` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/immut-function-arguments.mir.stderr b/src/test/ui/immut-function-arguments.mir.stderr deleted file mode 100644 index 5085f36971..0000000000 --- a/src/test/ui/immut-function-arguments.mir.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0594]: cannot assign to `*y`, as `y` is not declared as mutable - --> $DIR/immut-function-arguments.rs:5:5 - | -LL | fn f(y: Box) { - | - help: consider changing this to be mutable: `mut y` -LL | *y = 5; - | ^^^^^^ cannot assign - -error[E0594]: cannot assign to `*q`, as `q` is not declared as mutable - --> $DIR/immut-function-arguments.rs:10:35 - | -LL | let _frob = |q: Box| { *q = 2; }; - | - ^^^^^^ cannot assign - | | - | help: consider changing this to be mutable: `mut q` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/immut-function-arguments.rs b/src/test/ui/immut-function-arguments.rs index 2cc9c694ef..242a33e821 100644 --- a/src/test/ui/immut-function-arguments.rs +++ b/src/test/ui/immut-function-arguments.rs @@ -1,14 +1,9 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - fn f(y: Box) { - *y = 5; //[ast]~ ERROR cannot assign - //[mir]~^ ERROR cannot assign + *y = 5; //~ ERROR cannot assign } fn g() { - let _frob = |q: Box| { *q = 2; }; //[ast]~ ERROR cannot assign - //[mir]~^ ERROR cannot assign + let _frob = |q: Box| { *q = 2; }; //~ ERROR cannot assign } fn main() {} diff --git a/src/test/ui/immut-function-arguments.ast.nll.stderr b/src/test/ui/immut-function-arguments.stderr similarity index 77% rename from src/test/ui/immut-function-arguments.ast.nll.stderr rename to src/test/ui/immut-function-arguments.stderr index 5085f36971..7871ba52db 100644 --- a/src/test/ui/immut-function-arguments.ast.nll.stderr +++ b/src/test/ui/immut-function-arguments.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to `*y`, as `y` is not declared as mutable - --> $DIR/immut-function-arguments.rs:5:5 + --> $DIR/immut-function-arguments.rs:2:5 | LL | fn f(y: Box) { | - help: consider changing this to be mutable: `mut y` @@ -7,7 +7,7 @@ LL | *y = 5; | ^^^^^^ cannot assign error[E0594]: cannot assign to `*q`, as `q` is not declared as mutable - --> $DIR/immut-function-arguments.rs:10:35 + --> $DIR/immut-function-arguments.rs:6:35 | LL | let _frob = |q: Box| { *q = 2; }; | - ^^^^^^ cannot assign @@ -16,4 +16,3 @@ LL | let _frob = |q: Box| { *q = 2; }; error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/impl-header-lifetime-elision/dyn-trait.nll.stderr b/src/test/ui/impl-header-lifetime-elision/dyn-trait.nll.stderr new file mode 100644 index 0000000000..da30997a23 --- /dev/null +++ b/src/test/ui/impl-header-lifetime-elision/dyn-trait.nll.stderr @@ -0,0 +1,10 @@ +error[E0521]: borrowed data escapes outside of function + --> $DIR/dyn-trait.rs:20:5 + | +LL | fn with_dyn_debug_static<'a>(x: Box) { + | - `x` is a reference that is only valid in the function body +LL | static_val(x); + | ^^^^^^^^^^^^^ `x` escapes the function body here + +error: aborting due to previous error + diff --git a/src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr b/src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr index af120fa977..eb824def24 100644 --- a/src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr +++ b/src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr @@ -19,4 +19,3 @@ LL | fn with_dyn_debug_static<'a>(x: Box) { error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/impl-header-lifetime-elision/path-elided.rs b/src/test/ui/impl-header-lifetime-elision/path-elided.rs index 6532b0aebe..40a52efc7f 100644 --- a/src/test/ui/impl-header-lifetime-elision/path-elided.rs +++ b/src/test/ui/impl-header-lifetime-elision/path-elided.rs @@ -5,7 +5,7 @@ trait MyTrait { } struct Foo<'a> { x: &'a u32 } impl MyTrait for Foo { - //~^ ERROR missing lifetime specifier + //~^ ERROR implicit elided lifetime not allowed here } fn main() {} diff --git a/src/test/ui/impl-header-lifetime-elision/path-elided.stderr b/src/test/ui/impl-header-lifetime-elision/path-elided.stderr index c9287ffba9..6500a2a55f 100644 --- a/src/test/ui/impl-header-lifetime-elision/path-elided.stderr +++ b/src/test/ui/impl-header-lifetime-elision/path-elided.stderr @@ -1,9 +1,8 @@ -error[E0106]: missing lifetime specifier +error[E0726]: implicit elided lifetime not allowed here --> $DIR/path-elided.rs:7:18 | LL | impl MyTrait for Foo { - | ^^^ expected lifetime parameter + | ^^^- help: indicate the anonymous lifetime: `<'_>` error: aborting due to previous error -For more information about this error, try `rustc --explain E0106`. diff --git a/src/test/ui/impl-header-lifetime-elision/trait-elided.rs b/src/test/ui/impl-header-lifetime-elision/trait-elided.rs index 3979eda740..102d259b0c 100644 --- a/src/test/ui/impl-header-lifetime-elision/trait-elided.rs +++ b/src/test/ui/impl-header-lifetime-elision/trait-elided.rs @@ -3,7 +3,7 @@ trait MyTrait<'a> { } impl MyTrait for u32 { - //~^ ERROR missing lifetime specifier + //~^ ERROR implicit elided lifetime not allowed here } fn main() {} diff --git a/src/test/ui/impl-header-lifetime-elision/trait-elided.stderr b/src/test/ui/impl-header-lifetime-elision/trait-elided.stderr index b742db1c75..ad97cb0abd 100644 --- a/src/test/ui/impl-header-lifetime-elision/trait-elided.stderr +++ b/src/test/ui/impl-header-lifetime-elision/trait-elided.stderr @@ -1,9 +1,8 @@ -error[E0106]: missing lifetime specifier +error[E0726]: implicit elided lifetime not allowed here --> $DIR/trait-elided.rs:5:6 | LL | impl MyTrait for u32 { - | ^^^^^^^ expected lifetime parameter + | ^^^^^^^- help: indicate the anonymous lifetime: `<'_>` error: aborting due to previous error -For more information about this error, try `rustc --explain E0106`. diff --git a/src/test/ui/impl-trait/auto-trait-leak.rs b/src/test/ui/impl-trait/auto-trait-leak.rs index ea0be0b346..1c601bc3c3 100644 --- a/src/test/ui/impl-trait/auto-trait-leak.rs +++ b/src/test/ui/impl-trait/auto-trait-leak.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - use std::cell::Cell; use std::rc::Rc; diff --git a/src/test/ui/impl-trait/auto-trait-leak.stderr b/src/test/ui/impl-trait/auto-trait-leak.stderr index 4e79dfc3f7..61450d3203 100644 --- a/src/test/ui/impl-trait/auto-trait-leak.stderr +++ b/src/test/ui/impl-trait/auto-trait-leak.stderr @@ -1,29 +1,29 @@ error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0` - --> $DIR/auto-trait-leak.rs:14:16 + --> $DIR/auto-trait-leak.rs:12:16 | LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^ | note: ...which requires processing `cycle1`... - --> $DIR/auto-trait-leak.rs:14:1 + --> $DIR/auto-trait-leak.rs:12:1 | LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`... note: ...which requires processing `cycle2::{{opaque}}#0`... - --> $DIR/auto-trait-leak.rs:23:16 + --> $DIR/auto-trait-leak.rs:21:16 | LL | fn cycle2() -> impl Clone { | ^^^^^^^^^^ note: ...which requires processing `cycle2`... - --> $DIR/auto-trait-leak.rs:23:1 + --> $DIR/auto-trait-leak.rs:21:1 | LL | fn cycle2() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`... = note: ...which again requires processing `cycle1::{{opaque}}#0`, completing the cycle note: cycle used when checking item types in top-level module - --> $DIR/auto-trait-leak.rs:3:1 + --> $DIR/auto-trait-leak.rs:1:1 | LL | / use std::cell::Cell; LL | | use std::rc::Rc; @@ -35,30 +35,30 @@ LL | | } | |_^ error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0` - --> $DIR/auto-trait-leak.rs:14:16 + --> $DIR/auto-trait-leak.rs:12:16 | LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^ | note: ...which requires processing `cycle1`... - --> $DIR/auto-trait-leak.rs:14:1 + --> $DIR/auto-trait-leak.rs:12:1 | LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`... note: ...which requires processing `cycle2::{{opaque}}#0`... - --> $DIR/auto-trait-leak.rs:23:16 + --> $DIR/auto-trait-leak.rs:21:16 | LL | fn cycle2() -> impl Clone { | ^^^^^^^^^^ note: ...which requires processing `cycle2`... - --> $DIR/auto-trait-leak.rs:23:1 + --> $DIR/auto-trait-leak.rs:21:1 | LL | fn cycle2() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ = note: ...which again requires processing `cycle1::{{opaque}}#0`, completing the cycle note: cycle used when checking item types in top-level module - --> $DIR/auto-trait-leak.rs:3:1 + --> $DIR/auto-trait-leak.rs:1:1 | LL | / use std::cell::Cell; LL | | use std::rc::Rc; @@ -70,7 +70,7 @@ LL | | } | |_^ error[E0277]: `std::rc::Rc` cannot be sent between threads safely - --> $DIR/auto-trait-leak.rs:17:5 + --> $DIR/auto-trait-leak.rs:15:5 | LL | send(cycle2().clone()); | ^^^^ `std::rc::Rc` cannot be sent between threads safely @@ -78,12 +78,12 @@ LL | send(cycle2().clone()); = help: within `impl std::clone::Clone`, the trait `std::marker::Send` is not implemented for `std::rc::Rc` = note: required because it appears within the type `impl std::clone::Clone` note: required by `send` - --> $DIR/auto-trait-leak.rs:6:1 + --> $DIR/auto-trait-leak.rs:4:1 | LL | fn send(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors -Some errors occurred: E0277, E0391. +Some errors have detailed explanations: E0277, E0391. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/impl-trait/auto-trait-leak2.rs b/src/test/ui/impl-trait/auto-trait-leak2.rs index a373edcfcf..fb4b540512 100644 --- a/src/test/ui/impl-trait/auto-trait-leak2.rs +++ b/src/test/ui/impl-trait/auto-trait-leak2.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - use std::cell::Cell; use std::rc::Rc; @@ -25,4 +23,3 @@ fn after() -> impl Fn(i32) { let p = Rc::new(Cell::new(0)); move |x| p.set(x) } - diff --git a/src/test/ui/impl-trait/auto-trait-leak2.stderr b/src/test/ui/impl-trait/auto-trait-leak2.stderr index 4e427d3d6b..19899ff83f 100644 --- a/src/test/ui/impl-trait/auto-trait-leak2.stderr +++ b/src/test/ui/impl-trait/auto-trait-leak2.stderr @@ -1,29 +1,29 @@ error[E0277]: `std::rc::Rc>` cannot be sent between threads safely - --> $DIR/auto-trait-leak2.rs:15:5 + --> $DIR/auto-trait-leak2.rs:13:5 | LL | send(before()); | ^^^^ `std::rc::Rc>` cannot be sent between threads safely | = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc>` - = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:9:5: 9:22 p:std::rc::Rc>]` + = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:7:5: 7:22 p:std::rc::Rc>]` = note: required because it appears within the type `impl std::ops::Fn<(i32,)>` note: required by `send` - --> $DIR/auto-trait-leak2.rs:12:1 + --> $DIR/auto-trait-leak2.rs:10:1 | LL | fn send(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `std::rc::Rc>` cannot be sent between threads safely - --> $DIR/auto-trait-leak2.rs:18:5 + --> $DIR/auto-trait-leak2.rs:16:5 | LL | send(after()); | ^^^^ `std::rc::Rc>` cannot be sent between threads safely | = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc>` - = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:26:5: 26:22 p:std::rc::Rc>]` + = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:24:5: 24:22 p:std::rc::Rc>]` = note: required because it appears within the type `impl std::ops::Fn<(i32,)>` note: required by `send` - --> $DIR/auto-trait-leak2.rs:12:1 + --> $DIR/auto-trait-leak2.rs:10:1 | LL | fn send(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/impl-trait/bindings-opaque.rs b/src/test/ui/impl-trait/bindings-opaque.rs index 5f62332194..d4eef29ed3 100644 --- a/src/test/ui/impl-trait/bindings-opaque.rs +++ b/src/test/ui/impl-trait/bindings-opaque.rs @@ -1,4 +1,5 @@ #![feature(impl_trait_in_bindings)] +//~^ WARN the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash const FOO: impl Copy = 42; diff --git a/src/test/ui/impl-trait/bindings-opaque.stderr b/src/test/ui/impl-trait/bindings-opaque.stderr index 8b2514c050..d0a6a4ee57 100644 --- a/src/test/ui/impl-trait/bindings-opaque.stderr +++ b/src/test/ui/impl-trait/bindings-opaque.stderr @@ -1,17 +1,23 @@ +warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash + --> $DIR/bindings-opaque.rs:1:12 + | +LL | #![feature(impl_trait_in_bindings)] + | ^^^^^^^^^^^^^^^^^^^^^^ + error[E0599]: no method named `count_ones` found for type `impl std::marker::Copy` in the current scope - --> $DIR/bindings-opaque.rs:10:17 + --> $DIR/bindings-opaque.rs:11:17 | LL | let _ = FOO.count_ones(); | ^^^^^^^^^^ error[E0599]: no method named `count_ones` found for type `impl std::marker::Copy` in the current scope - --> $DIR/bindings-opaque.rs:12:17 + --> $DIR/bindings-opaque.rs:13:17 | LL | let _ = BAR.count_ones(); | ^^^^^^^^^^ error[E0599]: no method named `count_ones` found for type `impl std::marker::Copy` in the current scope - --> $DIR/bindings-opaque.rs:14:17 + --> $DIR/bindings-opaque.rs:15:17 | LL | let _ = foo.count_ones(); | ^^^^^^^^^^ diff --git a/src/test/ui/impl-trait/bindings.rs b/src/test/ui/impl-trait/bindings.rs index 91d092634a..104a44d656 100644 --- a/src/test/ui/impl-trait/bindings.rs +++ b/src/test/ui/impl-trait/bindings.rs @@ -1,4 +1,5 @@ #![feature(impl_trait_in_bindings)] +//~^ WARN the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash fn a(x: T) { const foo: impl Clone = x; diff --git a/src/test/ui/impl-trait/bindings.stderr b/src/test/ui/impl-trait/bindings.stderr index a5bf583afe..c66836ab8e 100644 --- a/src/test/ui/impl-trait/bindings.stderr +++ b/src/test/ui/impl-trait/bindings.stderr @@ -1,23 +1,29 @@ +warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash + --> $DIR/bindings.rs:1:12 + | +LL | #![feature(impl_trait_in_bindings)] + | ^^^^^^^^^^^^^^^^^^^^^^ + error[E0435]: attempt to use a non-constant value in a constant - --> $DIR/bindings.rs:4:29 + --> $DIR/bindings.rs:5:29 | LL | const foo: impl Clone = x; | ^ non-constant value error[E0435]: attempt to use a non-constant value in a constant - --> $DIR/bindings.rs:10:33 + --> $DIR/bindings.rs:11:33 | LL | const foo: impl Clone = x; | ^ non-constant value error[E0435]: attempt to use a non-constant value in a constant - --> $DIR/bindings.rs:17:33 + --> $DIR/bindings.rs:18:33 | LL | const foo: impl Clone = x; | ^ non-constant value error[E0435]: attempt to use a non-constant value in a constant - --> $DIR/bindings.rs:24:33 + --> $DIR/bindings.rs:25:33 | LL | const foo: impl Clone = x; | ^ non-constant value diff --git a/src/test/ui/impl-trait/can-return-unconstrained-closure.rs b/src/test/ui/impl-trait/can-return-unconstrained-closure.rs new file mode 100644 index 0000000000..90a7519074 --- /dev/null +++ b/src/test/ui/impl-trait/can-return-unconstrained-closure.rs @@ -0,0 +1,23 @@ +// Test that we are special casing "outlives" for opaque types. +// +// The return type of a closure is not required to outlive the closure. As such +// the following code would not compile if we used a standard outlives check +// when checking the return type, because the return type of the closure would +// be `&ReEmpty i32`, and we don't allow `ReEmpty` to occur in the concrete +// type used for an opaque type. +// +// However, opaque types are special cased to include check all regions in the +// concrete type against the bound, which forces the return type to be +// `&'static i32` here. + +// compile-pass + +fn make_identity() -> impl Sized { + |x: &'static i32| x +} + +fn make_identity_static() -> impl Sized + 'static { + |x: &'static i32| x +} + +fn main() {} diff --git a/src/test/ui/impl-trait/closure-calling-parent-fn.rs b/src/test/ui/impl-trait/closure-calling-parent-fn.rs index cb5f78bd6f..58d7875ccd 100644 --- a/src/test/ui/impl-trait/closure-calling-parent-fn.rs +++ b/src/test/ui/impl-trait/closure-calling-parent-fn.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - // Regression test for #54593: the MIR type checker was going wrong // when a closure returns the `impl Copy` from its parent fn. It was // (incorrectly) replacing the `impl Copy` in its return type with the diff --git a/src/test/ui/impl-trait/equality.stderr b/src/test/ui/impl-trait/equality.stderr index 6cd9d07748..7bb2d7d47a 100644 --- a/src/test/ui/impl-trait/equality.stderr +++ b/src/test/ui/impl-trait/equality.stderr @@ -23,5 +23,5 @@ LL | n + sum_to(n - 1) error: aborting due to 2 previous errors -Some errors occurred: E0277, E0308. +Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/impl-trait/impl_trait_projections.stderr b/src/test/ui/impl-trait/impl_trait_projections.stderr index 4e9bcf32e1..ff4382187a 100644 --- a/src/test/ui/impl-trait/impl_trait_projections.stderr +++ b/src/test/ui/impl-trait/impl_trait_projections.stderr @@ -30,5 +30,4 @@ LL | fn projection_is_disallowed(x: impl Iterator) -> ::Item { error: aborting due to 5 previous errors -Some errors occurred: E0223, E0667. -For more information about an error, try `rustc --explain E0223`. +For more information about this error, try `rustc --explain E0223`. diff --git a/src/test/ui/impl-trait/issue-55608-captures-empty-region.rs b/src/test/ui/impl-trait/issue-55608-captures-empty-region.rs index 7ebc348996..50646edd61 100644 --- a/src/test/ui/impl-trait/issue-55608-captures-empty-region.rs +++ b/src/test/ui/impl-trait/issue-55608-captures-empty-region.rs @@ -1,9 +1,9 @@ // This used to ICE because it creates an `impl Trait` that captures a // hidden empty region. -#![feature(conservative_impl_trait)] +// compile-pass -fn server() -> impl FilterBase2 { //~ ERROR [E0700] +fn server() -> impl FilterBase2 { segment2(|| { loop { } }).map2(|| "") } diff --git a/src/test/ui/impl-trait/issue-55608-captures-empty-region.stderr b/src/test/ui/impl-trait/issue-55608-captures-empty-region.stderr deleted file mode 100644 index 6311a7f006..0000000000 --- a/src/test/ui/impl-trait/issue-55608-captures-empty-region.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/issue-55608-captures-empty-region.rs:6:16 - | -LL | fn server() -> impl FilterBase2 { - | ^^^^^^^^^^^^^^^^ - | - = note: hidden type `Map2<[closure@$DIR/issue-55608-captures-empty-region.rs:7:36: 7:41]>` captures an empty lifetime - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0700`. diff --git a/src/test/ui/impl-trait/issue-57464-unexpected-regions.rs b/src/test/ui/impl-trait/issue-57464-unexpected-regions.rs new file mode 100644 index 0000000000..11f1a39223 --- /dev/null +++ b/src/test/ui/impl-trait/issue-57464-unexpected-regions.rs @@ -0,0 +1,29 @@ +// Regression test for issue 57464. +// +// Closure are (surprisingly) allowed to outlive their signature. As such it +// was possible to end up with `ReScope`s appearing in the concrete type of an +// opaque type. As all regions are now required to outlive the bound in an +// opaque type we avoid the issue here. + +// compile-pass + +struct A(F); + +unsafe impl <'a, 'b, F: Fn(&'a i32) -> &'b i32> Send for A {} + +fn wrapped_closure() -> impl Sized { + let f = |x| x; + f(&0); + A(f) +} + +fn wrapped_closure_with_bound() -> impl Sized + 'static { + let f = |x| x; + f(&0); + A(f) +} + +fn main() { + let x: Box = Box::new(wrapped_closure()); + let y: Box = Box::new(wrapped_closure_with_bound()); +} diff --git a/src/test/ui/impl-trait/issue-57979-deeply-nested-impl-trait-in-assoc-proj.stderr b/src/test/ui/impl-trait/issue-57979-deeply-nested-impl-trait-in-assoc-proj.stderr index 2b6f15e6d3..b9a1a4fa80 100644 --- a/src/test/ui/impl-trait/issue-57979-deeply-nested-impl-trait-in-assoc-proj.stderr +++ b/src/test/ui/impl-trait/issue-57979-deeply-nested-impl-trait-in-assoc-proj.stderr @@ -27,4 +27,3 @@ LL | pub fn demo(_: impl Quux>>) { } error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0666`. diff --git a/src/test/ui/impl-trait/method-suggestion-no-duplication.rs b/src/test/ui/impl-trait/method-suggestion-no-duplication.rs index 32f3517167..c5c966a959 100644 --- a/src/test/ui/impl-trait/method-suggestion-no-duplication.rs +++ b/src/test/ui/impl-trait/method-suggestion-no-duplication.rs @@ -1,6 +1,4 @@ // issue #21405 -// ignore-tidy-linelength - struct Foo; fn foo(f: F) where F: FnMut(Foo) {} diff --git a/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr b/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr index 8da1ce41a0..afb3376638 100644 --- a/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr +++ b/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr @@ -1,5 +1,5 @@ error[E0599]: no method named `is_empty` found for type `Foo` in the current scope - --> $DIR/method-suggestion-no-duplication.rs:9:15 + --> $DIR/method-suggestion-no-duplication.rs:7:15 | LL | struct Foo; | ----------- method `is_empty` not found for this diff --git a/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr b/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr new file mode 100644 index 0000000000..4b7c04f1e4 --- /dev/null +++ b/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr @@ -0,0 +1,51 @@ +error: lifetime may not live long enough + --> $DIR/must_outlive_least_region_or_bound.rs:3:23 + | +LL | fn elided(x: &i32) -> impl Copy { x } + | - ^^^^^^^^^ opaque type requires that `'1` must outlive `'static` + | | + | let's call the lifetime of this reference `'1` +help: to allow this impl Trait to capture borrowed data with lifetime `'1`, add `'_` as a constraint + | +LL | fn elided(x: &i32) -> impl Copy + '_ { x } + | ^^^^^^^^^^^^^^ + +error: lifetime may not live long enough + --> $DIR/must_outlive_least_region_or_bound.rs:6:32 + | +LL | fn explicit<'a>(x: &'a i32) -> impl Copy { x } + | -- ^^^^^^^^^ opaque type requires that `'a` must outlive `'static` + | | + | lifetime `'a` defined here +help: to allow this impl Trait to capture borrowed data with lifetime `'a`, add `'a` as a constraint + | +LL | fn explicit<'a>(x: &'a i32) -> impl Copy + 'a { x } + | ^^^^^^^^^^^^^^ + +error: lifetime may not live long enough + --> $DIR/must_outlive_least_region_or_bound.rs:12:69 + | +LL | fn with_bound<'a>(x: &'a i32) -> impl LifetimeTrait<'a> + 'static { x } + | -- lifetime `'a` defined here ^ returning this value requires that `'a` must outlive `'static` + | + = help: consider replacing `'a` with `'static` + +error: lifetime may not live long enough + --> $DIR/must_outlive_least_region_or_bound.rs:17:61 + | +LL | fn move_lifetime_into_fn<'a, 'b>(x: &'a u32, y: &'b u32) -> impl Fn(&'a u32) { + | -- -- lifetime `'b` defined here ^^^^^^^^^^^^^^^^ opaque type requires that `'b` must outlive `'a` + | | + | lifetime `'a` defined here + +error[E0310]: the parameter type `T` may not live long enough + --> $DIR/must_outlive_least_region_or_bound.rs:22:51 + | +LL | fn ty_param_wont_outlive_static(x: T) -> impl Debug + 'static { + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `T: 'static`... + +error: aborting due to 5 previous errors + +For more information about this error, try `rustc --explain E0310`. diff --git a/src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr b/src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr index 9339a83b09..a6ea783767 100644 --- a/src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr +++ b/src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr @@ -77,5 +77,4 @@ LL | fn ty_param_wont_outlive_static(x: T) -> impl Debug + 'static { error: aborting due to 5 previous errors -Some errors occurred: E0310, E0623. -For more information about an error, try `rustc --explain E0310`. +For more information about this error, try `rustc --explain E0310`. diff --git a/src/test/ui/impl-trait/recursive-async-impl-trait-type.rs b/src/test/ui/impl-trait/recursive-async-impl-trait-type.rs index 40642523be..a4e0801193 100644 --- a/src/test/ui/impl-trait/recursive-async-impl-trait-type.rs +++ b/src/test/ui/impl-trait/recursive-async-impl-trait-type.rs @@ -2,7 +2,7 @@ // Test that impl trait does not allow creating recursive types that are // otherwise forbidden when using `async` and `await`. -#![feature(await_macro, async_await, futures_api, generators)] +#![feature(await_macro, async_await, generators)] async fn recursive_async_function() -> () { //~ ERROR await!(recursive_async_function()); diff --git a/src/test/ui/impl-trait/recursive-impl-trait-type.rs b/src/test/ui/impl-trait/recursive-impl-trait-type.rs index 869876dc6a..2428b560b7 100644 --- a/src/test/ui/impl-trait/recursive-impl-trait-type.rs +++ b/src/test/ui/impl-trait/recursive-impl-trait-type.rs @@ -1,7 +1,7 @@ // Test that impl trait does not allow creating recursive types that are // otherwise forbidden. -#![feature(futures_api, generators)] +#![feature(generators)] fn option(i: i32) -> impl Sized { //~ ERROR if i < 0 { diff --git a/src/test/ui/impl-trait/region-escape-via-bound-contravariant-closure.rs b/src/test/ui/impl-trait/region-escape-via-bound-contravariant-closure.rs index cb40d90ae5..adaa474474 100644 --- a/src/test/ui/impl-trait/region-escape-via-bound-contravariant-closure.rs +++ b/src/test/ui/impl-trait/region-escape-via-bound-contravariant-closure.rs @@ -9,7 +9,6 @@ #![allow(dead_code)] #![feature(in_band_lifetimes)] -#![feature(nll)] fn foo(x: &'x u32) -> impl Fn() -> &'y u32 where 'x: 'y diff --git a/src/test/ui/impl-trait/region-escape-via-bound-contravariant.rs b/src/test/ui/impl-trait/region-escape-via-bound-contravariant.rs index e2310a3907..204c2ff304 100644 --- a/src/test/ui/impl-trait/region-escape-via-bound-contravariant.rs +++ b/src/test/ui/impl-trait/region-escape-via-bound-contravariant.rs @@ -9,7 +9,6 @@ #![allow(dead_code)] #![feature(in_band_lifetimes)] -#![feature(nll)] trait Trait<'a> { } diff --git a/src/test/ui/impl-trait/region-escape-via-bound.rs b/src/test/ui/impl-trait/region-escape-via-bound.rs index d62aec800e..29243699e4 100644 --- a/src/test/ui/impl-trait/region-escape-via-bound.rs +++ b/src/test/ui/impl-trait/region-escape-via-bound.rs @@ -5,7 +5,6 @@ #![allow(dead_code)] #![feature(in_band_lifetimes)] -#![feature(nll)] use std::cell::Cell; diff --git a/src/test/ui/impl-trait/region-escape-via-bound.stderr b/src/test/ui/impl-trait/region-escape-via-bound.stderr index 81b44b7eba..5c8e322f71 100644 --- a/src/test/ui/impl-trait/region-escape-via-bound.stderr +++ b/src/test/ui/impl-trait/region-escape-via-bound.stderr @@ -1,11 +1,11 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/region-escape-via-bound.rs:16:29 + --> $DIR/region-escape-via-bound.rs:15:29 | LL | fn foo(x: Cell<&'x u32>) -> impl Trait<'y> | ^^^^^^^^^^^^^^ | -note: hidden type `std::cell::Cell<&'x u32>` captures the lifetime 'x as defined on the function body at 18:7 - --> $DIR/region-escape-via-bound.rs:18:7 +note: hidden type `std::cell::Cell<&'x u32>` captures the lifetime 'x as defined on the function body at 17:7 + --> $DIR/region-escape-via-bound.rs:17:7 | LL | where 'x: 'y | ^^ diff --git a/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr b/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr new file mode 100644 index 0000000000..0bf120cf7e --- /dev/null +++ b/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr @@ -0,0 +1,26 @@ +error: lifetime may not live long enough + --> $DIR/static-return-lifetime-infered.rs:6:35 + | +LL | fn iter_values_anon(&self) -> impl Iterator { + | - ^^^^^^^^^^^^^^^^^^^^^^^ opaque type requires that `'1` must outlive `'static` + | | + | let's call the lifetime of this reference `'1` +help: to allow this impl Trait to capture borrowed data with lifetime `'1`, add `'_` as a constraint + | +LL | fn iter_values_anon(&self) -> impl Iterator + '_ { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: lifetime may not live long enough + --> $DIR/static-return-lifetime-infered.rs:10:37 + | +LL | fn iter_values<'a>(&'a self) -> impl Iterator { + | -- ^^^^^^^^^^^^^^^^^^^^^^^ opaque type requires that `'a` must outlive `'static` + | | + | lifetime `'a` defined here +help: to allow this impl Trait to capture borrowed data with lifetime `'a`, add `'a` as a constraint + | +LL | fn iter_values<'a>(&'a self) -> impl Iterator + 'a { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/impl-trait/trait_type.stderr b/src/test/ui/impl-trait/trait_type.stderr index a1f6b73abf..129d7ef578 100644 --- a/src/test/ui/impl-trait/trait_type.stderr +++ b/src/test/ui/impl-trait/trait_type.stderr @@ -33,5 +33,5 @@ LL | impl std::fmt::Display for MyType4 {} error: aborting due to 4 previous errors -Some errors occurred: E0046, E0050, E0053, E0186. +Some errors have detailed explanations: E0046, E0050, E0053, E0186. For more information about an error, try `rustc --explain E0046`. diff --git a/src/test/ui/impl-trait/type_parameters_captured.nll.stderr b/src/test/ui/impl-trait/type_parameters_captured.nll.stderr new file mode 100644 index 0000000000..039cb62f86 --- /dev/null +++ b/src/test/ui/impl-trait/type_parameters_captured.nll.stderr @@ -0,0 +1,11 @@ +error[E0310]: the parameter type `T` may not live long enough + --> $DIR/type_parameters_captured.rs:7:20 + | +LL | fn foo(x: T) -> impl Any + 'static { + | ^^^^^^^^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `T: 'static`... + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0310`. diff --git a/src/test/ui/impl-trait/universal-issue-48703.stderr b/src/test/ui/impl-trait/universal-issue-48703.stderr index 26ed8dbb9c..527bbd5f30 100644 --- a/src/test/ui/impl-trait/universal-issue-48703.stderr +++ b/src/test/ui/impl-trait/universal-issue-48703.stderr @@ -6,4 +6,3 @@ LL | foo::('a'); error: aborting due to previous error -For more information about this error, try `rustc --explain E0632`. diff --git a/src/test/ui/impl-trait/universal-turbofish-in-method-issue-50950.stderr b/src/test/ui/impl-trait/universal-turbofish-in-method-issue-50950.stderr index b7fc4d149e..e2e6581fcf 100644 --- a/src/test/ui/impl-trait/universal-turbofish-in-method-issue-50950.stderr +++ b/src/test/ui/impl-trait/universal-turbofish-in-method-issue-50950.stderr @@ -6,4 +6,3 @@ LL | evt.handle_event::(|_evt| { error: aborting due to previous error -For more information about this error, try `rustc --explain E0632`. diff --git a/src/test/ui/impl-trait/where-allowed.stderr b/src/test/ui/impl-trait/where-allowed.stderr index 7218e82922..e7a8430fae 100644 --- a/src/test/ui/impl-trait/where-allowed.stderr +++ b/src/test/ui/impl-trait/where-allowed.stderr @@ -242,5 +242,4 @@ LL | let _in_return_in_local_variable = || -> impl Fn() { || {} }; error: aborting due to 39 previous errors -Some errors occurred: E0562, E0666. -For more information about an error, try `rustc --explain E0562`. +For more information about this error, try `rustc --explain E0562`. diff --git a/src/test/ui/import.stderr b/src/test/ui/import.stderr index 685fff25a1..6b320b198a 100644 --- a/src/test/ui/import.stderr +++ b/src/test/ui/import.stderr @@ -21,5 +21,5 @@ LL | zed::foo(); error: aborting due to 3 previous errors -Some errors occurred: E0432, E0603. +Some errors have detailed explanations: E0432, E0603. For more information about an error, try `rustc --explain E0432`. diff --git a/src/test/ui/imports/duplicate.stderr b/src/test/ui/imports/duplicate.stderr index cc897b2b6b..0dbcb5f1de 100644 --- a/src/test/ui/imports/duplicate.stderr +++ b/src/test/ui/imports/duplicate.stderr @@ -67,5 +67,5 @@ LL | use self::m2::*; error: aborting due to 4 previous errors -Some errors occurred: E0252, E0659. +Some errors have detailed explanations: E0252, E0659. For more information about an error, try `rustc --explain E0252`. diff --git a/src/test/ui/imports/extern-crate-used.rs b/src/test/ui/imports/extern-crate-used.rs index 2d91cbc00f..26150c7d4a 100644 --- a/src/test/ui/imports/extern-crate-used.rs +++ b/src/test/ui/imports/extern-crate-used.rs @@ -5,10 +5,14 @@ #![deny(unused_extern_crates)] -extern crate core as iso1; //~ ERROR `extern crate` is not idiomatic in the new edition -extern crate core as iso2; //~ ERROR `extern crate` is not idiomatic in the new edition -extern crate core as iso3; //~ ERROR `extern crate` is not idiomatic in the new edition -extern crate core as iso4; //~ ERROR `extern crate` is not idiomatic in the new edition +// Shouldn't suggest changing to `use`, as new name +// would no longer be added to the prelude which could cause +// compilation errors for imports that use the new name in +// other modules. See #57672. +extern crate core as iso1; +extern crate core as iso2; +extern crate core as iso3; +extern crate core as iso4; // Doesn't introduce its extern prelude entry, so it's still considered unused. extern crate core; //~ ERROR unused extern crate diff --git a/src/test/ui/imports/extern-crate-used.stderr b/src/test/ui/imports/extern-crate-used.stderr index c0783feb79..397bfa0290 100644 --- a/src/test/ui/imports/extern-crate-used.stderr +++ b/src/test/ui/imports/extern-crate-used.stderr @@ -1,8 +1,8 @@ -error: `extern crate` is not idiomatic in the new edition - --> $DIR/extern-crate-used.rs:8:1 +error: unused extern crate + --> $DIR/extern-crate-used.rs:18:1 | -LL | extern crate core as iso1; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use` +LL | extern crate core; + | ^^^^^^^^^^^^^^^^^^ help: remove it | note: lint level defined here --> $DIR/extern-crate-used.rs:6:9 @@ -10,29 +10,5 @@ note: lint level defined here LL | #![deny(unused_extern_crates)] | ^^^^^^^^^^^^^^^^^^^^ -error: `extern crate` is not idiomatic in the new edition - --> $DIR/extern-crate-used.rs:9:1 - | -LL | extern crate core as iso2; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use` - -error: `extern crate` is not idiomatic in the new edition - --> $DIR/extern-crate-used.rs:10:1 - | -LL | extern crate core as iso3; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use` - -error: `extern crate` is not idiomatic in the new edition - --> $DIR/extern-crate-used.rs:11:1 - | -LL | extern crate core as iso4; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use` - -error: unused extern crate - --> $DIR/extern-crate-used.rs:14:1 - | -LL | extern crate core; - | ^^^^^^^^^^^^^^^^^^ help: remove it - -error: aborting due to 5 previous errors +error: aborting due to previous error diff --git a/src/test/ui/imports/issue-53269.rs b/src/test/ui/imports/issue-53269.rs index 444a16f7e7..1031d50710 100644 --- a/src/test/ui/imports/issue-53269.rs +++ b/src/test/ui/imports/issue-53269.rs @@ -1,4 +1,4 @@ -// Ambiguity between a `macro_rules` macro and a non-existent import recovered as `Def::Err` +// Ambiguity between a `macro_rules` macro and a non-existent import recovered as `Res::Err` macro_rules! mac { () => () } diff --git a/src/test/ui/imports/issue-53269.stderr b/src/test/ui/imports/issue-53269.stderr index fc4ca3d0e5..613c59867c 100644 --- a/src/test/ui/imports/issue-53269.stderr +++ b/src/test/ui/imports/issue-53269.stderr @@ -24,5 +24,5 @@ LL | use nonexistent_module::mac; error: aborting due to 2 previous errors -Some errors occurred: E0432, E0659. +Some errors have detailed explanations: E0432, E0659. For more information about an error, try `rustc --explain E0432`. diff --git a/src/test/ui/imports/issue-53512.rs b/src/test/ui/imports/issue-53512.rs index 61d93531a1..615b36a0b2 100644 --- a/src/test/ui/imports/issue-53512.rs +++ b/src/test/ui/imports/issue-53512.rs @@ -1,4 +1,4 @@ -// Macro from prelude is shadowed by non-existent import recovered as `Def::Err`. +// Macro from prelude is shadowed by non-existent import recovered as `Res::Err`. use std::assert; //~ ERROR unresolved import `std::assert` diff --git a/src/test/ui/imports/issue-56125.stderr b/src/test/ui/imports/issue-56125.stderr index 26d2fa06dd..0ecedd50e0 100644 --- a/src/test/ui/imports/issue-56125.stderr +++ b/src/test/ui/imports/issue-56125.stderr @@ -51,5 +51,5 @@ LL | use issue_56125::*; error: aborting due to 4 previous errors -Some errors occurred: E0432, E0659. +Some errors have detailed explanations: E0432, E0659. For more information about an error, try `rustc --explain E0432`. diff --git a/src/test/ui/imports/local-modularized-tricky-fail-1.rs b/src/test/ui/imports/local-modularized-tricky-fail-1.rs index d1cb6b07d7..29e9b8ec84 100644 --- a/src/test/ui/imports/local-modularized-tricky-fail-1.rs +++ b/src/test/ui/imports/local-modularized-tricky-fail-1.rs @@ -33,7 +33,6 @@ mod inner2 { fn main() { panic!(); //~ ERROR `panic` is ambiguous - //~| ERROR `panic` is ambiguous } mod inner3 { diff --git a/src/test/ui/imports/local-modularized-tricky-fail-1.stderr b/src/test/ui/imports/local-modularized-tricky-fail-1.stderr index d7ae8e6d50..13d3227d8b 100644 --- a/src/test/ui/imports/local-modularized-tricky-fail-1.stderr +++ b/src/test/ui/imports/local-modularized-tricky-fail-1.stderr @@ -22,7 +22,7 @@ LL | use inner1::*; = help: consider adding an explicit import of `exported` to disambiguate error[E0659]: `include` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) - --> $DIR/local-modularized-tricky-fail-1.rs:47:1 + --> $DIR/local-modularized-tricky-fail-1.rs:46:1 | LL | include!(); | ^^^^^^^ ambiguous name @@ -59,26 +59,6 @@ LL | define_panic!(); | ---------------- in this macro invocation = help: use `crate::panic` to refer to this macro unambiguously -error[E0659]: `panic` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) - --> $DIR/local-modularized-tricky-fail-1.rs:35:5 - | -LL | panic!(); - | ^^^^^^^^^ ambiguous name - | - = note: `panic` could refer to a macro from prelude -note: `panic` could also refer to the macro defined here - --> $DIR/local-modularized-tricky-fail-1.rs:11:5 - | -LL | / macro_rules! panic { -LL | | () => () -LL | | } - | |_____^ -... -LL | define_panic!(); - | ---------------- in this macro invocation - = help: use `crate::panic` to refer to this macro unambiguously - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -error: aborting due to 4 previous errors +error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0659`. diff --git a/src/test/ui/imports/local-modularized-tricky-fail-2.stderr b/src/test/ui/imports/local-modularized-tricky-fail-2.stderr index a26f0cbec7..70d197994f 100644 --- a/src/test/ui/imports/local-modularized-tricky-fail-2.stderr +++ b/src/test/ui/imports/local-modularized-tricky-fail-2.stderr @@ -1,4 +1,4 @@ -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/local-modularized-tricky-fail-2.rs:20:32 | LL | exported!(); @@ -7,9 +7,10 @@ LL | exported!(); LL | () => ( struct Б; ) | ^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/local-modularized-tricky-fail-2.rs:36:24 | LL | panic!(); @@ -18,9 +19,10 @@ LL | panic!(); LL | () => ( struct Г; ) | ^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/local-modularized-tricky-fail-2.rs:46:24 | LL | include!(); @@ -29,6 +31,7 @@ LL | include!(); LL | () => ( struct Д; ) | ^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable error: aborting due to 3 previous errors diff --git a/src/test/ui/imports/reexports.stderr b/src/test/ui/imports/reexports.stderr index 7726343ba6..af2c97e77b 100644 --- a/src/test/ui/imports/reexports.stderr +++ b/src/test/ui/imports/reexports.stderr @@ -30,5 +30,5 @@ LL | use b::b::foo::S as T; error: aborting due to 4 previous errors -Some errors occurred: E0364, E0603. +Some errors have detailed explanations: E0364, E0603. For more information about an error, try `rustc --explain E0364`. diff --git a/src/test/ui/imports/unresolved-imports-used.rs b/src/test/ui/imports/unresolved-imports-used.rs new file mode 100644 index 0000000000..d1461e7b04 --- /dev/null +++ b/src/test/ui/imports/unresolved-imports-used.rs @@ -0,0 +1,12 @@ +// There should be *no* unused import errors. +#![deny(unused_imports)] + +mod qux { + fn quz() {} +} + +use qux::quz; //~ ERROR function `quz` is private +use qux::bar; //~ ERROR unresolved import `qux::bar` +use foo::bar; //~ ERROR unresolved import `foo` + +fn main() {} diff --git a/src/test/ui/imports/unresolved-imports-used.stderr b/src/test/ui/imports/unresolved-imports-used.stderr new file mode 100644 index 0000000000..f20db881c8 --- /dev/null +++ b/src/test/ui/imports/unresolved-imports-used.stderr @@ -0,0 +1,22 @@ +error[E0432]: unresolved import `qux::bar` + --> $DIR/unresolved-imports-used.rs:9:5 + | +LL | use qux::bar; + | ^^^^^^^^ no `bar` in `qux` + +error[E0432]: unresolved import `foo` + --> $DIR/unresolved-imports-used.rs:10:5 + | +LL | use foo::bar; + | ^^^ maybe a missing `extern crate foo;`? + +error[E0603]: function `quz` is private + --> $DIR/unresolved-imports-used.rs:8:10 + | +LL | use qux::quz; + | ^^^ + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0432, E0603. +For more information about an error, try `rustc --explain E0432`. diff --git a/src/test/ui/in-band-lifetimes/E0687.stderr b/src/test/ui/in-band-lifetimes/E0687.stderr index 7aea2f2204..e8e5100e00 100644 --- a/src/test/ui/in-band-lifetimes/E0687.stderr +++ b/src/test/ui/in-band-lifetimes/E0687.stderr @@ -24,4 +24,3 @@ LL | fn bar(&self, x: fn(&'a u32)) {} error: aborting due to 4 previous errors -For more information about this error, try `rustc --explain E0687`. diff --git a/src/test/ui/in-band-lifetimes/E0687_where.stderr b/src/test/ui/in-band-lifetimes/E0687_where.stderr index af0f9665f5..b422869c4d 100644 --- a/src/test/ui/in-band-lifetimes/E0687_where.stderr +++ b/src/test/ui/in-band-lifetimes/E0687_where.stderr @@ -12,4 +12,3 @@ LL | fn baz(x: &impl Fn(&'a u32)) {} error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0687`. diff --git a/src/test/ui/in-band-lifetimes/E0688.stderr b/src/test/ui/in-band-lifetimes/E0688.stderr index afefcd9fc2..0078cd5800 100644 --- a/src/test/ui/in-band-lifetimes/E0688.stderr +++ b/src/test/ui/in-band-lifetimes/E0688.stderr @@ -24,4 +24,3 @@ LL | impl<'b> Foo<'a> { error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0688`. diff --git a/src/test/ui/in-band-lifetimes/mismatched.nll.stderr b/src/test/ui/in-band-lifetimes/mismatched.nll.stderr new file mode 100644 index 0000000000..f5aee2d2d7 --- /dev/null +++ b/src/test/ui/in-band-lifetimes/mismatched.nll.stderr @@ -0,0 +1,20 @@ +error[E0621]: explicit lifetime required in the type of `y` + --> $DIR/mismatched.rs:4:42 + | +LL | fn foo(x: &'a u32, y: &u32) -> &'a u32 { y } + | ---- ^ lifetime `'a` required + | | + | help: add explicit lifetime `'a` to the type of `y`: `&'a u32` + +error: lifetime may not live long enough + --> $DIR/mismatched.rs:6:46 + | +LL | fn foo2(x: &'a u32, y: &'b u32) -> &'a u32 { y } + | -- -- ^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b` + | | | + | | lifetime `'b` defined here + | lifetime `'a` defined here + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/in-band-lifetimes/mismatched.stderr b/src/test/ui/in-band-lifetimes/mismatched.stderr index 9d33aaf4c3..ec1045d5fa 100644 --- a/src/test/ui/in-band-lifetimes/mismatched.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched.stderr @@ -16,5 +16,4 @@ LL | fn foo2(x: &'a u32, y: &'b u32) -> &'a u32 { y } error: aborting due to 2 previous errors -Some errors occurred: E0621, E0623. -For more information about an error, try `rustc --explain E0621`. +For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr index fbd312a632..e56a56e2da 100644 --- a/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr @@ -18,4 +18,3 @@ LL | | } error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait_impl.nll.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait_impl.nll.stderr new file mode 100644 index 0000000000..cd65bab2d4 --- /dev/null +++ b/src/test/ui/in-band-lifetimes/mismatched_trait_impl.nll.stderr @@ -0,0 +1,24 @@ +error[E0495]: cannot infer an appropriate lifetime for lifetime parameter 'a in generic type due to conflicting requirements + --> $DIR/mismatched_trait_impl.rs:9:5 + | +LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the method body at 9:5... + --> $DIR/mismatched_trait_impl.rs:9:5 + | +LL | / fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { +LL | | x +LL | | } + | |_____^ +note: ...but the lifetime must also be valid for the lifetime 'a as defined on the method body at 9:32... + --> $DIR/mismatched_trait_impl.rs:9:32 + | +LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { + | ^^ + = note: ...so that the method type is compatible with trait: + expected fn(&i32, &'a u32, &u32) -> &'a u32 + found fn(&i32, &u32, &u32) -> &u32 + +error: aborting due to previous error + diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait_impl.rs b/src/test/ui/in-band-lifetimes/mismatched_trait_impl.rs index 654d2bddfd..f2ba81af9b 100644 --- a/src/test/ui/in-band-lifetimes/mismatched_trait_impl.rs +++ b/src/test/ui/in-band-lifetimes/mismatched_trait_impl.rs @@ -7,7 +7,7 @@ trait Get { impl Get for i32 { fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { //~ ERROR cannot infer - x + x //~ ERROR lifetime mismatch } } diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr index a80ebaf8dd..80f15b7c58 100644 --- a/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr @@ -20,6 +20,15 @@ LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { expected fn(&i32, &'a u32, &u32) -> &'a u32 found fn(&i32, &u32, &u32) -> &u32 -error: aborting due to previous error +error[E0623]: lifetime mismatch + --> $DIR/mismatched_trait_impl.rs:10:9 + | +LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { + | ---- ------- + | | + | this parameter and the return type are declared with different lifetimes... +LL | x + | ^ ...but data from `x` is returned here + +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/in-band-lifetimes/mut_while_borrow.nll.stderr b/src/test/ui/in-band-lifetimes/mut_while_borrow.nll.stderr deleted file mode 100644 index f96ff9dd4e..0000000000 --- a/src/test/ui/in-band-lifetimes/mut_while_borrow.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0506]: cannot assign to `p` because it is borrowed - --> $DIR/mut_while_borrow.rs:9:5 - | -LL | let r = foo(&p); - | -- borrow of `p` occurs here -LL | p += 1; - | ^^^^^^ assignment to borrowed `p` occurs here -LL | println!("{}", r); - | - borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr b/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr index 556c15d0ed..f96ff9dd4e 100644 --- a/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr +++ b/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr @@ -2,9 +2,11 @@ error[E0506]: cannot assign to `p` because it is borrowed --> $DIR/mut_while_borrow.rs:9:5 | LL | let r = foo(&p); - | - borrow of `p` occurs here + | -- borrow of `p` occurs here LL | p += 1; | ^^^^^^ assignment to borrowed `p` occurs here +LL | println!("{}", r); + | - borrow later used here error: aborting due to previous error diff --git a/src/test/ui/indexing-requires-a-uint.stderr b/src/test/ui/indexing-requires-a-uint.stderr index 0b879581ec..3300db58d4 100644 --- a/src/test/ui/indexing-requires-a-uint.stderr +++ b/src/test/ui/indexing-requires-a-uint.stderr @@ -12,8 +12,12 @@ error[E0308]: mismatched types | LL | bar::(i); // i should not be re-coerced back to an isize | ^ expected isize, found usize +help: you can convert an `usize` to `isize` and panic if the converted value wouldn't fit + | +LL | bar::(i.try_into().unwrap()); // i should not be re-coerced back to an isize + | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors -Some errors occurred: E0277, E0308. +Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/inference/inference_unstable_forced.stderr b/src/test/ui/inference/inference_unstable_forced.stderr index 067bf44bda..83e27aaf2f 100644 --- a/src/test/ui/inference/inference_unstable_forced.stderr +++ b/src/test/ui/inference/inference_unstable_forced.stderr @@ -1,9 +1,10 @@ -error[E0658]: use of unstable library feature 'ipu_flatten' (see issue #99999) +error[E0658]: use of unstable library feature 'ipu_flatten' --> $DIR/inference_unstable_forced.rs:11:20 | LL | assert_eq!('x'.ipu_flatten(), 0); | ^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/99999 = help: add #![feature(ipu_flatten)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/infinite/infinite-autoderef.stderr b/src/test/ui/infinite/infinite-autoderef.stderr index 9e4b0a029a..a5cc66f447 100644 --- a/src/test/ui/infinite/infinite-autoderef.stderr +++ b/src/test/ui/infinite/infinite-autoderef.stderr @@ -48,5 +48,5 @@ LL | Foo.bar(); error: aborting due to 6 previous errors -Some errors occurred: E0055, E0308, E0599, E0609. +Some errors have detailed explanations: E0055, E0308, E0599, E0609. For more information about an error, try `rustc --explain E0055`. diff --git a/src/test/ui/infinite/infinite-tag-type-recursion.rs b/src/test/ui/infinite/infinite-tag-type-recursion.rs index 87a9e08dd3..bbfaaa62f0 100644 --- a/src/test/ui/infinite/infinite-tag-type-recursion.rs +++ b/src/test/ui/infinite/infinite-tag-type-recursion.rs @@ -1,4 +1,5 @@ enum MList { Cons(isize, MList), Nil } //~^ ERROR recursive type `MList` has infinite size +//~| ERROR cycle detected when processing `MList` fn main() { let a = MList::Cons(10, MList::Cons(11, MList::Nil)); } diff --git a/src/test/ui/infinite/infinite-tag-type-recursion.stderr b/src/test/ui/infinite/infinite-tag-type-recursion.stderr index 88dad0033d..8f6529db0b 100644 --- a/src/test/ui/infinite/infinite-tag-type-recursion.stderr +++ b/src/test/ui/infinite/infinite-tag-type-recursion.stderr @@ -8,6 +8,16 @@ LL | enum MList { Cons(isize, MList), Nil } | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `MList` representable -error: aborting due to previous error +error[E0391]: cycle detected when processing `MList` + --> $DIR/infinite-tag-type-recursion.rs:1:1 + | +LL | enum MList { Cons(isize, MList), Nil } + | ^^^^^^^^^^ + | + = note: ...which again requires processing `MList`, completing the cycle + = note: cycle used when computing dropck types for `Canonical { max_universe: U0, variables: [], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, def_id: None }, value: MList } }` + +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0072`. +Some errors have detailed explanations: E0072, E0391. +For more information about an error, try `rustc --explain E0072`. diff --git a/src/test/ui/inline-asm-bad-constraint.stderr b/src/test/ui/inline-asm-bad-constraint.stderr index 59066e5e7f..37e71a94c1 100644 --- a/src/test/ui/inline-asm-bad-constraint.stderr +++ b/src/test/ui/inline-asm-bad-constraint.stderr @@ -18,4 +18,3 @@ LL | asm!("addb $1, $0" : "={rax}"((0i32, rax))); error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0668`. diff --git a/src/test/ui/inline-asm-bad-operand.stderr b/src/test/ui/inline-asm-bad-operand.stderr index 3bb1cdda24..4554da7b79 100644 --- a/src/test/ui/inline-asm-bad-operand.stderr +++ b/src/test/ui/inline-asm-bad-operand.stderr @@ -42,4 +42,3 @@ LL | "r"("hello e0669")); error: aborting due to 7 previous errors -For more information about this error, try `rustc --explain E0669`. diff --git a/src/test/ui/inner-static-type-parameter.stderr b/src/test/ui/inner-static-type-parameter.stderr index 3c14e217ae..083b4b67eb 100644 --- a/src/test/ui/inner-static-type-parameter.stderr +++ b/src/test/ui/inner-static-type-parameter.stderr @@ -2,7 +2,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/inner-static-type-parameter.rs:6:19 | LL | fn foo() { - | --- - type variable from outer function + | --- - type parameter from outer function | | | try adding a local generic parameter in this method instead LL | static a: Bar = Bar::What; @@ -12,11 +12,11 @@ error[E0392]: parameter `T` is never used --> $DIR/inner-static-type-parameter.rs:3:10 | LL | enum Bar { What } - | ^ unused type parameter + | ^ unused parameter | = help: consider removing `T` or using a marker such as `std::marker::PhantomData` error: aborting due to 2 previous errors -Some errors occurred: E0392, E0401. +Some errors have detailed explanations: E0392, E0401. For more information about an error, try `rustc --explain E0392`. diff --git a/src/test/ui/integer-literal-suffix-inference.stderr b/src/test/ui/integer-literal-suffix-inference.stderr index 04c8633c8b..80b601dc43 100644 --- a/src/test/ui/integer-literal-suffix-inference.stderr +++ b/src/test/ui/integer-literal-suffix-inference.stderr @@ -3,288 +3,342 @@ error[E0308]: mismatched types | LL | id_i8(a16); | ^^^ expected i8, found i16 +help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit + | +LL | id_i8(a16.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:35:11 | LL | id_i8(a32); | ^^^ expected i8, found i32 +help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit + | +LL | id_i8(a32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:38:11 | LL | id_i8(a64); | ^^^ expected i8, found i64 +help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit + | +LL | id_i8(a64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:42:12 | LL | id_i16(a8); - | ^^ expected i16, found i8 -help: you can cast an `i8` to `i16`, which will sign-extend the source value - | -LL | id_i16(a8.into()); - | ^^^^^^^^^ + | ^^ + | | + | expected i16, found i8 + | help: you can convert an `i8` to `i16`: `a8.into()` error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:46:12 | LL | id_i16(a32); | ^^^ expected i16, found i32 +help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit + | +LL | id_i16(a32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:49:12 | LL | id_i16(a64); | ^^^ expected i16, found i64 +help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit + | +LL | id_i16(a64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:53:12 | LL | id_i32(a8); - | ^^ expected i32, found i8 -help: you can cast an `i8` to `i32`, which will sign-extend the source value - | -LL | id_i32(a8.into()); - | ^^^^^^^^^ + | ^^ + | | + | expected i32, found i8 + | help: you can convert an `i8` to `i32`: `a8.into()` error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:56:12 | LL | id_i32(a16); - | ^^^ expected i32, found i16 -help: you can cast an `i16` to `i32`, which will sign-extend the source value - | -LL | id_i32(a16.into()); - | ^^^^^^^^^^ + | ^^^ + | | + | expected i32, found i16 + | help: you can convert an `i16` to `i32`: `a16.into()` error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:60:12 | LL | id_i32(a64); | ^^^ expected i32, found i64 +help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit + | +LL | id_i32(a64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:64:12 | LL | id_i64(a8); - | ^^ expected i64, found i8 -help: you can cast an `i8` to `i64`, which will sign-extend the source value - | -LL | id_i64(a8.into()); - | ^^^^^^^^^ + | ^^ + | | + | expected i64, found i8 + | help: you can convert an `i8` to `i64`: `a8.into()` error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:67:12 | LL | id_i64(a16); - | ^^^ expected i64, found i16 -help: you can cast an `i16` to `i64`, which will sign-extend the source value - | -LL | id_i64(a16.into()); - | ^^^^^^^^^^ + | ^^^ + | | + | expected i64, found i16 + | help: you can convert an `i16` to `i64`: `a16.into()` error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:70:12 | LL | id_i64(a32); - | ^^^ expected i64, found i32 -help: you can cast an `i32` to `i64`, which will sign-extend the source value - | -LL | id_i64(a32.into()); - | ^^^^^^^^^^ + | ^^^ + | | + | expected i64, found i32 + | help: you can convert an `i32` to `i64`: `a32.into()` error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:76:11 | LL | id_i8(c16); | ^^^ expected i8, found i16 +help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit + | +LL | id_i8(c16.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:79:11 | LL | id_i8(c32); | ^^^ expected i8, found i32 +help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit + | +LL | id_i8(c32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:82:11 | LL | id_i8(c64); | ^^^ expected i8, found i64 +help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit + | +LL | id_i8(c64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:86:12 | LL | id_i16(c8); - | ^^ expected i16, found i8 -help: you can cast an `i8` to `i16`, which will sign-extend the source value - | -LL | id_i16(c8.into()); - | ^^^^^^^^^ + | ^^ + | | + | expected i16, found i8 + | help: you can convert an `i8` to `i16`: `c8.into()` error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:90:12 | LL | id_i16(c32); | ^^^ expected i16, found i32 +help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit + | +LL | id_i16(c32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:93:12 | LL | id_i16(c64); | ^^^ expected i16, found i64 +help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit + | +LL | id_i16(c64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:97:12 | LL | id_i32(c8); - | ^^ expected i32, found i8 -help: you can cast an `i8` to `i32`, which will sign-extend the source value - | -LL | id_i32(c8.into()); - | ^^^^^^^^^ + | ^^ + | | + | expected i32, found i8 + | help: you can convert an `i8` to `i32`: `c8.into()` error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:100:12 | LL | id_i32(c16); - | ^^^ expected i32, found i16 -help: you can cast an `i16` to `i32`, which will sign-extend the source value - | -LL | id_i32(c16.into()); - | ^^^^^^^^^^ + | ^^^ + | | + | expected i32, found i16 + | help: you can convert an `i16` to `i32`: `c16.into()` error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:104:12 | LL | id_i32(c64); | ^^^ expected i32, found i64 +help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit + | +LL | id_i32(c64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:108:12 | LL | id_i64(a8); - | ^^ expected i64, found i8 -help: you can cast an `i8` to `i64`, which will sign-extend the source value - | -LL | id_i64(a8.into()); - | ^^^^^^^^^ + | ^^ + | | + | expected i64, found i8 + | help: you can convert an `i8` to `i64`: `a8.into()` error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:111:12 | LL | id_i64(a16); - | ^^^ expected i64, found i16 -help: you can cast an `i16` to `i64`, which will sign-extend the source value - | -LL | id_i64(a16.into()); - | ^^^^^^^^^^ + | ^^^ + | | + | expected i64, found i16 + | help: you can convert an `i16` to `i64`: `a16.into()` error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:114:12 | LL | id_i64(a32); - | ^^^ expected i64, found i32 -help: you can cast an `i32` to `i64`, which will sign-extend the source value - | -LL | id_i64(a32.into()); - | ^^^^^^^^^^ + | ^^^ + | | + | expected i64, found i32 + | help: you can convert an `i32` to `i64`: `a32.into()` error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:120:11 | LL | id_u8(b16); | ^^^ expected u8, found u16 +help: you can convert an `u16` to `u8` and panic if the converted value wouldn't fit + | +LL | id_u8(b16.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:123:11 | LL | id_u8(b32); | ^^^ expected u8, found u32 +help: you can convert an `u32` to `u8` and panic if the converted value wouldn't fit + | +LL | id_u8(b32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:126:11 | LL | id_u8(b64); | ^^^ expected u8, found u64 +help: you can convert an `u64` to `u8` and panic if the converted value wouldn't fit + | +LL | id_u8(b64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:130:12 | LL | id_u16(b8); - | ^^ expected u16, found u8 -help: you can cast an `u8` to `u16`, which will zero-extend the source value - | -LL | id_u16(b8.into()); - | ^^^^^^^^^ + | ^^ + | | + | expected u16, found u8 + | help: you can convert an `u8` to `u16`: `b8.into()` error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:134:12 | LL | id_u16(b32); | ^^^ expected u16, found u32 +help: you can convert an `u32` to `u16` and panic if the converted value wouldn't fit + | +LL | id_u16(b32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:137:12 | LL | id_u16(b64); | ^^^ expected u16, found u64 +help: you can convert an `u64` to `u16` and panic if the converted value wouldn't fit + | +LL | id_u16(b64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:141:12 | LL | id_u32(b8); - | ^^ expected u32, found u8 -help: you can cast an `u8` to `u32`, which will zero-extend the source value - | -LL | id_u32(b8.into()); - | ^^^^^^^^^ + | ^^ + | | + | expected u32, found u8 + | help: you can convert an `u8` to `u32`: `b8.into()` error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:144:12 | LL | id_u32(b16); - | ^^^ expected u32, found u16 -help: you can cast an `u16` to `u32`, which will zero-extend the source value - | -LL | id_u32(b16.into()); - | ^^^^^^^^^^ + | ^^^ + | | + | expected u32, found u16 + | help: you can convert an `u16` to `u32`: `b16.into()` error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:148:12 | LL | id_u32(b64); | ^^^ expected u32, found u64 +help: you can convert an `u64` to `u32` and panic if the converted value wouldn't fit + | +LL | id_u32(b64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:152:12 | LL | id_u64(b8); - | ^^ expected u64, found u8 -help: you can cast an `u8` to `u64`, which will zero-extend the source value - | -LL | id_u64(b8.into()); - | ^^^^^^^^^ + | ^^ + | | + | expected u64, found u8 + | help: you can convert an `u8` to `u64`: `b8.into()` error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:155:12 | LL | id_u64(b16); - | ^^^ expected u64, found u16 -help: you can cast an `u16` to `u64`, which will zero-extend the source value - | -LL | id_u64(b16.into()); - | ^^^^^^^^^^ + | ^^^ + | | + | expected u64, found u16 + | help: you can convert an `u16` to `u64`: `b16.into()` error[E0308]: mismatched types --> $DIR/integer-literal-suffix-inference.rs:158:12 | LL | id_u64(b32); - | ^^^ expected u64, found u32 -help: you can cast an `u32` to `u64`, which will zero-extend the source value - | -LL | id_u64(b32.into()); - | ^^^^^^^^^^ + | ^^^ + | | + | expected u64, found u32 + | help: you can convert an `u32` to `u64`: `b32.into()` error: aborting due to 36 previous errors diff --git a/src/test/ui/invalid-module-declaration/invalid-module-declaration.rs b/src/test/ui/invalid-module-declaration/invalid-module-declaration.rs index 3b1cd9fbdc..254d810d79 100644 --- a/src/test/ui/invalid-module-declaration/invalid-module-declaration.rs +++ b/src/test/ui/invalid-module-declaration/invalid-module-declaration.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - mod auxiliary { mod foo; } diff --git a/src/test/ui/invalid/invalid-inline.stderr b/src/test/ui/invalid/invalid-inline.stderr index ce29951822..f3d0426419 100644 --- a/src/test/ui/invalid/invalid-inline.stderr +++ b/src/test/ui/invalid/invalid-inline.stderr @@ -18,5 +18,5 @@ LL | #[inline()] error: aborting due to 3 previous errors -Some errors occurred: E0534, E0535. +Some errors have detailed explanations: E0534, E0535. For more information about an error, try `rustc --explain E0534`. diff --git a/src/test/ui/invalid_dispatch_from_dyn_impls.rs b/src/test/ui/invalid_dispatch_from_dyn_impls.rs index c4716893fb..b7bc766fbe 100644 --- a/src/test/ui/invalid_dispatch_from_dyn_impls.rs +++ b/src/test/ui/invalid_dispatch_from_dyn_impls.rs @@ -39,4 +39,13 @@ where T: Unsize, {} //~^^^ ERROR [E0378] +#[repr(align(64))] +struct OverAlignedZst; +struct OverAligned(Box, OverAlignedZst); + +impl DispatchFromDyn> for OverAligned + where + T: Unsize, +{} //~^^^ ERROR [E0378] + fn main() {} diff --git a/src/test/ui/invalid_dispatch_from_dyn_impls.stderr b/src/test/ui/invalid_dispatch_from_dyn_impls.stderr index bd01646630..6d62d4fd07 100644 --- a/src/test/ui/invalid_dispatch_from_dyn_impls.stderr +++ b/src/test/ui/invalid_dispatch_from_dyn_impls.stderr @@ -1,4 +1,4 @@ -error[E0378]: the trait `DispatchFromDyn` may only be implemented for structs containing the field being coerced, `PhantomData` fields, and nothing else +error[E0378]: the trait `DispatchFromDyn` may only be implemented for structs containing the field being coerced, ZST fields with 1 byte alignment, and nothing else --> $DIR/invalid_dispatch_from_dyn_impls.rs:10:1 | LL | / impl DispatchFromDyn> for WrapperWithExtraField @@ -36,6 +36,17 @@ LL | | T: Unsize, LL | | {} | |__^ -error: aborting due to 4 previous errors +error[E0378]: the trait `DispatchFromDyn` may only be implemented for structs containing the field being coerced, ZST fields with 1 byte alignment, and nothing else + --> $DIR/invalid_dispatch_from_dyn_impls.rs:46:1 + | +LL | / impl DispatchFromDyn> for OverAligned +LL | | where +LL | | T: Unsize, +LL | | {} + | |__^ + | + = note: extra field `1` of type `OverAlignedZst` is not allowed + +error: aborting due to 5 previous errors For more information about this error, try `rustc --explain E0378`. diff --git a/src/test/ui/issue-53249.rs b/src/test/ui/issue-53249.rs new file mode 100644 index 0000000000..9e4ff43ecd --- /dev/null +++ b/src/test/ui/issue-53249.rs @@ -0,0 +1,47 @@ +// compile-pass +// edition:2018 + +#![feature(arbitrary_self_types, async_await, await_macro)] + +use std::task::{self, Poll}; +use std::future::Future; +use std::marker::Unpin; +use std::pin::Pin; + +// This is a regression test for a ICE/unbounded recursion issue relating to async-await. + +#[derive(Debug)] +#[must_use = "futures do nothing unless polled"] +pub struct Lazy { + f: Option +} + +impl Unpin for Lazy {} + +pub fn lazy(f: F) -> Lazy + where F: FnOnce(&mut task::Context) -> R, +{ + Lazy { f: Some(f) } +} + +impl Future for Lazy + where F: FnOnce(&mut task::Context) -> R, +{ + type Output = R; + + fn poll(mut self: Pin<&mut Self>, cx: &mut task::Context) -> Poll { + Poll::Ready((self.f.take().unwrap())(cx)) + } +} + +async fn __receive(want: WantFn) -> () + where Fut: Future, WantFn: Fn(&Box) -> Fut, +{ + await!(lazy(|_| ())); +} + +pub fn basic_spawn_receive() { + async { await!(__receive(|_| async { () })) }; +} + +fn main() {} diff --git a/src/test/ui/issue-59756.fixed b/src/test/ui/issue-59756.fixed new file mode 100644 index 0000000000..7b55d0f17e --- /dev/null +++ b/src/test/ui/issue-59756.fixed @@ -0,0 +1,17 @@ +// run-rustfix + +#![allow(warnings)] + +struct A; +struct B; + +fn foo() -> Result { + Ok(A) +} + +fn bar() -> Result { + foo() + //~^ ERROR try expression alternatives have incompatible types [E0308] +} + +fn main() {} diff --git a/src/test/ui/issue-59756.rs b/src/test/ui/issue-59756.rs new file mode 100644 index 0000000000..cccae396b7 --- /dev/null +++ b/src/test/ui/issue-59756.rs @@ -0,0 +1,17 @@ +// run-rustfix + +#![allow(warnings)] + +struct A; +struct B; + +fn foo() -> Result { + Ok(A) +} + +fn bar() -> Result { + foo()? + //~^ ERROR try expression alternatives have incompatible types [E0308] +} + +fn main() {} diff --git a/src/test/ui/issue-59756.stderr b/src/test/ui/issue-59756.stderr new file mode 100644 index 0000000000..d46232874f --- /dev/null +++ b/src/test/ui/issue-59756.stderr @@ -0,0 +1,15 @@ +error[E0308]: try expression alternatives have incompatible types + --> $DIR/issue-59756.rs:13:5 + | +LL | foo()? + | ^^^^^- + | | | + | | help: try removing this `?` + | expected enum `std::result::Result`, found struct `A` + | + = note: expected type `std::result::Result` + found type `A` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/issue-59764.rs b/src/test/ui/issue-59764.rs new file mode 100644 index 0000000000..09dee8c273 --- /dev/null +++ b/src/test/ui/issue-59764.rs @@ -0,0 +1,136 @@ +// aux-build:issue-59764.rs +// compile-flags:--extern issue_59764 +// edition:2018 + +#![allow(warnings)] + +// This tests the suggestion to import macros from the root of a crate. This aims to capture +// the case where a user attempts to import a macro from the definition location instead of the +// root of the crate and the macro is annotated with `#![macro_export]`. + +// Edge cases.. + +mod multiple_imports_same_line_at_end { + use issue_59764::foo::{baz, makro}; + //~^ ERROR unresolved import `issue_59764::foo::makro` [E0432] +} + +mod multiple_imports_multiline_at_end_trailing_comma { + use issue_59764::foo::{ + baz, + makro, //~ ERROR unresolved import `issue_59764::foo::makro` [E0432] + }; +} + +mod multiple_imports_multiline_at_end { + use issue_59764::foo::{ + baz, + makro //~ ERROR unresolved import `issue_59764::foo::makro` [E0432] + }; +} + +mod multiple_imports_same_line_in_middle { + use issue_59764::foo::{baz, makro, foobar}; + //~^ ERROR unresolved import `issue_59764::foo::makro` [E0432] +} + +mod multiple_imports_multiline_in_middle_trailing_comma { + use issue_59764::foo::{ + baz, + makro, //~ ERROR unresolved import `issue_59764::foo::makro` [E0432] + foobar, + }; +} + +mod multiple_imports_multiline_in_middle { + use issue_59764::foo::{ + baz, + makro, //~ ERROR unresolved import `issue_59764::foo::makro` [E0432] + foobar + }; +} + +mod nested_imports { + use issue_59764::{foobaz, foo::makro}; + //~^ ERROR unresolved import `issue_59764::foo::makro` [E0432] +} + +mod nested_multiple_imports { + use issue_59764::{foobaz, foo::{baz, makro}}; + //~^ ERROR unresolved import `issue_59764::foo::makro` [E0432] +} + +mod nested_multiline_multiple_imports_trailing_comma { + use issue_59764::{ + foobaz, + foo::{ + baz, + makro, //~ ERROR unresolved import `issue_59764::foo::makro` [E0432] + }, + }; +} + +mod nested_multiline_multiple_imports { + use issue_59764::{ + foobaz, + foo::{ + baz, + makro //~ ERROR unresolved import `issue_59764::foo::makro` [E0432] + } + }; +} + +mod doubly_nested_multiple_imports { + use issue_59764::{foobaz, foo::{baz, makro, barbaz::{barfoo}}}; + //~^ ERROR unresolved import `issue_59764::foo::makro` [E0432] +} + +mod doubly_multiline_nested_multiple_imports { + use issue_59764::{ + foobaz, + foo::{ + baz, + makro, //~ ERROR unresolved import `issue_59764::foo::makro` [E0432] + barbaz::{ + barfoo, + } + } + }; +} + +mod renamed_import { + use issue_59764::foo::makro as baz; + //~^ ERROR unresolved import `issue_59764::foo::makro` [E0432] +} + +mod renamed_multiple_imports { + use issue_59764::foo::{baz, makro as foobar}; + //~^ ERROR unresolved import `issue_59764::foo::makro` [E0432] +} + +mod lots_of_whitespace { + use + issue_59764::{ + + foobaz, + + + foo::{baz, + + makro as foobar} //~ ERROR unresolved import `issue_59764::foo::makro` [E0432] + + }; +} + +// Simple case.. + +use issue_59764::foo::makro; +//~^ ERROR unresolved import `issue_59764::foo::makro` [E0432] + +makro!(bar); +//~^ ERROR cannot determine resolution for the macro `makro` + +fn main() { + bar(); + //~^ ERROR cannot find function `bar` in this scope [E0425] +} diff --git a/src/test/ui/issue-59764.stderr b/src/test/ui/issue-59764.stderr new file mode 100644 index 0000000000..f266e908ec --- /dev/null +++ b/src/test/ui/issue-59764.stderr @@ -0,0 +1,241 @@ +error[E0432]: unresolved import `issue_59764::foo::makro` + --> $DIR/issue-59764.rs:14:33 + | +LL | use issue_59764::foo::{baz, makro}; + | ^^^^^ no `makro` in `foo` + | + = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined +help: a macro with this name exists at the root of the crate + | +LL | use issue_59764::{makro, foo::{baz}}; + | ^^^^^^^^^ --^^ + +error[E0432]: unresolved import `issue_59764::foo::makro` + --> $DIR/issue-59764.rs:21:9 + | +LL | makro, + | ^^^^^ no `makro` in `foo` + | + = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined +help: a macro with this name exists at the root of the crate + | +LL | use issue_59764::{makro, foo::{ +LL | baz, +LL | +LL | }}; + | + +error[E0432]: unresolved import `issue_59764::foo::makro` + --> $DIR/issue-59764.rs:28:9 + | +LL | makro + | ^^^^^ no `makro` in `foo` + | + = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined +help: a macro with this name exists at the root of the crate + | +LL | use issue_59764::{makro, foo::{ +LL | baz, +LL | +LL | }}; + | + +error[E0432]: unresolved import `issue_59764::foo::makro` + --> $DIR/issue-59764.rs:33:33 + | +LL | use issue_59764::foo::{baz, makro, foobar}; + | ^^^^^ no `makro` in `foo` + | + = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined +help: a macro with this name exists at the root of the crate + | +LL | use issue_59764::{makro, foo::{baz, foobar}}; + | ^^^^^^^^^ -- ^^ + +error[E0432]: unresolved import `issue_59764::foo::makro` + --> $DIR/issue-59764.rs:40:9 + | +LL | makro, + | ^^^^^ no `makro` in `foo` + | + = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined +help: a macro with this name exists at the root of the crate + | +LL | use issue_59764::{makro, foo::{ +LL | baz, +LL | +LL | foobar, +LL | }}; + | + +error[E0432]: unresolved import `issue_59764::foo::makro` + --> $DIR/issue-59764.rs:48:9 + | +LL | makro, + | ^^^^^ no `makro` in `foo` + | + = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined +help: a macro with this name exists at the root of the crate + | +LL | use issue_59764::{makro, foo::{ +LL | baz, +LL | +LL | foobar +LL | }}; + | + +error[E0432]: unresolved import `issue_59764::foo::makro` + --> $DIR/issue-59764.rs:54:31 + | +LL | use issue_59764::{foobaz, foo::makro}; + | ^^^^^^^^^^ no `makro` in `foo` + | + = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined +help: a macro with this name exists at the root of the crate + | +LL | use issue_59764::{makro, foobaz}; + | ^^^^^^^ -- + +error[E0432]: unresolved import `issue_59764::foo::makro` + --> $DIR/issue-59764.rs:59:42 + | +LL | use issue_59764::{foobaz, foo::{baz, makro}}; + | ^^^^^ no `makro` in `foo` + | + = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined +help: a macro with this name exists at the root of the crate + | +LL | use issue_59764::{makro, foobaz, foo::{baz}}; + | ^^^^^^^ -- + +error[E0432]: unresolved import `issue_59764::foo::makro` + --> $DIR/issue-59764.rs:68:13 + | +LL | makro, + | ^^^^^ no `makro` in `foo` + | + = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined +help: a macro with this name exists at the root of the crate + | +LL | use issue_59764::{makro, +LL | foobaz, +LL | foo::{ +LL | baz, +LL | + | + +error[E0432]: unresolved import `issue_59764::foo::makro` + --> $DIR/issue-59764.rs:78:13 + | +LL | makro + | ^^^^^ no `makro` in `foo` + | + = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined +help: a macro with this name exists at the root of the crate + | +LL | use issue_59764::{makro, +LL | foobaz, +LL | foo::{ +LL | baz, +LL | + | + +error[E0432]: unresolved import `issue_59764::foo::makro` + --> $DIR/issue-59764.rs:84:42 + | +LL | use issue_59764::{foobaz, foo::{baz, makro, barbaz::{barfoo}}}; + | ^^^^^ no `makro` in `foo` + | + = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined +help: a macro with this name exists at the root of the crate + | +LL | use issue_59764::{makro, foobaz, foo::{baz, barbaz::{barfoo}}}; + | ^^^^^^^ -- + +error[E0432]: unresolved import `issue_59764::foo::makro` + --> $DIR/issue-59764.rs:93:13 + | +LL | makro, + | ^^^^^ no `makro` in `foo` + | + = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined +help: a macro with this name exists at the root of the crate + | +LL | use issue_59764::{makro, +LL | foobaz, +LL | foo::{ +LL | baz, +LL | + | + +error[E0432]: unresolved import `issue_59764::foo::makro` + --> $DIR/issue-59764.rs:102:9 + | +LL | use issue_59764::foo::makro as baz; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `makro` in `foo` + | + = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined +help: a macro with this name exists at the root of the crate + | +LL | use issue_59764::makro as baz; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0432]: unresolved import `issue_59764::foo::makro` + --> $DIR/issue-59764.rs:107:33 + | +LL | use issue_59764::foo::{baz, makro as foobar}; + | ^^^^^^^^^^^^^^^ no `makro` in `foo` + | + = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined +help: a macro with this name exists at the root of the crate + | +LL | use issue_59764::{makro as foobar, foo::{baz}}; + | ^^^^^^^^^^^^^^^^^^^ --^^ + +error[E0432]: unresolved import `issue_59764::foo::makro` + --> $DIR/issue-59764.rs:120:17 + | +LL | makro as foobar} + | ^^^^^^^^^^^^^^^ no `makro` in `foo` + | + = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined +help: a macro with this name exists at the root of the crate + | +LL | issue_59764::{makro as foobar, +LL | +LL | foobaz, +LL | +LL | +LL | foo::{baz} + | + +error[E0432]: unresolved import `issue_59764::foo::makro` + --> $DIR/issue-59764.rs:127:5 + | +LL | use issue_59764::foo::makro; + | ^^^^^^^^^^^^^^^^^^^^^^^ no `makro` in `foo` + | + = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined +help: a macro with this name exists at the root of the crate + | +LL | use issue_59764::makro; + | ^^^^^^^^^^^^^^^^^^ + +error: cannot determine resolution for the macro `makro` + --> $DIR/issue-59764.rs:130:1 + | +LL | makro!(bar); + | ^^^^^ + | + = note: import resolution is stuck, try simplifying macro imports + +error[E0425]: cannot find function `bar` in this scope + --> $DIR/issue-59764.rs:134:5 + | +LL | bar(); + | ^^^ not found in this scope + +error: aborting due to 18 previous errors + +Some errors have detailed explanations: E0425, E0432. +For more information about an error, try `rustc --explain E0425`. diff --git a/src/test/ui/issue-60075.rs b/src/test/ui/issue-60075.rs new file mode 100644 index 0000000000..5788716a52 --- /dev/null +++ b/src/test/ui/issue-60075.rs @@ -0,0 +1,12 @@ +fn main() {} + +trait T { + fn qux() -> Option { + let _ = if true { + }); +//~^ ERROR expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `;` +//~^^ ERROR expected one of `.`, `;`, `?`, `else`, or an operator, found `}` +//~^^^ ERROR 6:11: 6:12: expected identifier, found `;` +//~^^^^ ERROR missing `fn`, `type`, or `const` for trait-item declaration + Some(4) + } diff --git a/src/test/ui/issue-60075.stderr b/src/test/ui/issue-60075.stderr new file mode 100644 index 0000000000..ac97d32a6e --- /dev/null +++ b/src/test/ui/issue-60075.stderr @@ -0,0 +1,35 @@ +error: expected one of `.`, `;`, `?`, `else`, or an operator, found `}` + --> $DIR/issue-60075.rs:6:10 + | +LL | }); + | ^ expected one of `.`, `;`, `?`, `else`, or an operator here + +error: expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `;` + --> $DIR/issue-60075.rs:6:11 + | +LL | fn qux() -> Option { + | - unclosed delimiter +LL | let _ = if true { +LL | }); + | ^ help: `}` may belong here + +error: expected identifier, found `;` + --> $DIR/issue-60075.rs:6:11 + | +LL | }); + | ^ expected identifier + +error: missing `fn`, `type`, or `const` for trait-item declaration + --> $DIR/issue-60075.rs:6:12 + | +LL | }); + | ____________^ +LL | | +LL | | +LL | | +LL | | +LL | | Some(4) + | |________^ missing `fn`, `type`, or `const` + +error: aborting due to 4 previous errors + diff --git a/src/test/ui/issue-60622.rs b/src/test/ui/issue-60622.rs new file mode 100644 index 0000000000..d6a0189c3e --- /dev/null +++ b/src/test/ui/issue-60622.rs @@ -0,0 +1,18 @@ +// ignore-tidy-linelength + +#![deny(warnings)] + +struct Borked {} + +impl Borked { + fn a(&self) {} +} + +fn run_wild(b: &Borked) { + b.a::<'_, T>(); + //~^ ERROR cannot specify lifetime arguments explicitly if late bound lifetime parameters are present + //~^^ ERROR wrong number of type arguments: expected 0, found 1 + //~^^^ WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! +} + +fn main() {} diff --git a/src/test/ui/issue-60622.stderr b/src/test/ui/issue-60622.stderr new file mode 100644 index 0000000000..0c337c315f --- /dev/null +++ b/src/test/ui/issue-60622.stderr @@ -0,0 +1,27 @@ +error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present + --> $DIR/issue-60622.rs:12:11 + | +LL | fn a(&self) {} + | - the late bound lifetime parameter is introduced here +... +LL | b.a::<'_, T>(); + | ^^ + | +note: lint level defined here + --> $DIR/issue-60622.rs:3:9 + | +LL | #![deny(warnings)] + | ^^^^^^^^ + = note: #[deny(late_bound_lifetime_arguments)] implied by #[deny(warnings)] + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #42868 + +error[E0107]: wrong number of type arguments: expected 0, found 1 + --> $DIR/issue-60622.rs:12:15 + | +LL | b.a::<'_, T>(); + | ^ unexpected type argument + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0107`. diff --git a/src/test/ui/issues/issue-10291.nll.stderr b/src/test/ui/issues/issue-10291.nll.stderr new file mode 100644 index 0000000000..45f29fd795 --- /dev/null +++ b/src/test/ui/issues/issue-10291.nll.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/issue-10291.rs:3:9 + | +LL | fn test<'x>(x: &'x isize) { + | -- lifetime `'x` defined here +LL | drop:: FnMut(&'z isize) -> &'z isize>>(Box::new(|z| { +LL | x + | ^ returning this value requires that `'x` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-10291.stderr b/src/test/ui/issues/issue-10291.stderr index 89ffd4537a..0d653e6ced 100644 --- a/src/test/ui/issues/issue-10291.stderr +++ b/src/test/ui/issues/issue-10291.stderr @@ -20,4 +20,3 @@ LL | fn test<'x>(x: &'x isize) { error: aborting due to previous error -For more information about this error, try `rustc --explain E0312`. diff --git a/src/test/ui/issues/issue-10398.nll.stderr b/src/test/ui/issues/issue-10398.nll.stderr deleted file mode 100644 index f5f4974265..0000000000 --- a/src/test/ui/issues/issue-10398.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: use of moved value: `x` - --> $DIR/issue-10398.rs:7:14 - | -LL | let _a = x; - | - value moved here -LL | drop(x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/issues/issue-10398.stderr b/src/test/ui/issues/issue-10398.stderr index ceb2cfe2b7..f5f4974265 100644 --- a/src/test/ui/issues/issue-10398.stderr +++ b/src/test/ui/issues/issue-10398.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `x` --> $DIR/issue-10398.rs:7:14 | LL | let _a = x; - | -- value moved here + | - value moved here LL | drop(x); | ^ value used here after move | diff --git a/src/test/ui/issues/issue-10412.rs b/src/test/ui/issues/issue-10412.rs index a0bc2fc2f3..0205851368 100644 --- a/src/test/ui/issues/issue-10412.rs +++ b/src/test/ui/issues/issue-10412.rs @@ -5,7 +5,8 @@ trait Serializable<'self, T> { //~ ERROR lifetimes cannot use keyword names impl<'self> Serializable for &'self str { //~ ERROR lifetimes cannot use keyword names //~^ ERROR lifetimes cannot use keyword names - //~| ERROR missing lifetime specifier + //~| ERROR implicit elided lifetime not allowed here + //~| ERROR the size for values of type `str` cannot be known at compilation time fn serialize(val : &'self str) -> Vec { //~ ERROR lifetimes cannot use keyword names vec![1] } diff --git a/src/test/ui/issues/issue-10412.stderr b/src/test/ui/issues/issue-10412.stderr index 48920813ae..0793dd99b4 100644 --- a/src/test/ui/issues/issue-10412.stderr +++ b/src/test/ui/issues/issue-10412.stderr @@ -29,23 +29,32 @@ LL | impl<'self> Serializable for &'self str { | ^^^^^ error: lifetimes cannot use keyword names - --> $DIR/issue-10412.rs:9:25 + --> $DIR/issue-10412.rs:10:25 | LL | fn serialize(val : &'self str) -> Vec { | ^^^^^ error: lifetimes cannot use keyword names - --> $DIR/issue-10412.rs:12:37 + --> $DIR/issue-10412.rs:13:37 | LL | fn deserialize(repr: &[u8]) -> &'self str { | ^^^^^ -error[E0106]: missing lifetime specifier +error[E0726]: implicit elided lifetime not allowed here --> $DIR/issue-10412.rs:6:13 | LL | impl<'self> Serializable for &'self str { - | ^^^^^^^^^^^^^^^^^ expected lifetime parameter + | ^^^^^^^^^^^^^^^^^ help: indicate the anonymous lifetime: `Serializable<'_, str>` -error: aborting due to 8 previous errors +error[E0277]: the size for values of type `str` cannot be known at compilation time + --> $DIR/issue-10412.rs:6:13 + | +LL | impl<'self> Serializable for &'self str { + | ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: the trait `std::marker::Sized` is not implemented for `str` + = note: to learn more, visit + +error: aborting due to 9 previous errors -For more information about this error, try `rustc --explain E0106`. +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/issues/issue-11192.nll.stderr b/src/test/ui/issues/issue-11192.nll.stderr deleted file mode 100644 index 2a9d913171..0000000000 --- a/src/test/ui/issues/issue-11192.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0502]: cannot borrow `*ptr` as immutable because it is also borrowed as mutable - --> $DIR/issue-11192.rs:20:10 - | -LL | let mut test = |foo: &Foo| { - | ----------- mutable borrow occurs here -LL | println!("access {}", foo.x); -LL | ptr = box Foo { x: ptr.x + 1 }; - | --- first borrow occurs due to use of `ptr` in closure -... -LL | test(&*ptr); - | ---- ^^^^^ immutable borrow occurs here - | | - | mutable borrow later used by call - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/issues/issue-11192.stderr b/src/test/ui/issues/issue-11192.stderr index ce90b16207..2a9d913171 100644 --- a/src/test/ui/issues/issue-11192.stderr +++ b/src/test/ui/issues/issue-11192.stderr @@ -1,17 +1,16 @@ -error[E0502]: cannot borrow `*ptr` as immutable because `ptr` is also borrowed as mutable - --> $DIR/issue-11192.rs:20:11 +error[E0502]: cannot borrow `*ptr` as immutable because it is also borrowed as mutable + --> $DIR/issue-11192.rs:20:10 | LL | let mut test = |foo: &Foo| { | ----------- mutable borrow occurs here LL | println!("access {}", foo.x); LL | ptr = box Foo { x: ptr.x + 1 }; - | --- previous borrow occurs due to use of `ptr` in closure + | --- first borrow occurs due to use of `ptr` in closure ... LL | test(&*ptr); - | ^^^^ immutable borrow occurs here -LL | -LL | } - | - mutable borrow ends here + | ---- ^^^^^ immutable borrow occurs here + | | + | mutable borrow later used by call error: aborting due to previous error diff --git a/src/test/ui/issues/issue-11493.ast.stderr b/src/test/ui/issues/issue-11493.ast.stderr deleted file mode 100644 index a5f8aefd19..0000000000 --- a/src/test/ui/issues/issue-11493.ast.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0597]: borrowed value does not live long enough (Ast) - --> $DIR/issue-11493.rs:10:35 - | -LL | let y = x.as_ref().unwrap_or(&id(5)); - | ^^^^^ - temporary value dropped here while still borrowed - | | - | temporary value does not live long enough -... -LL | } - | - temporary value needs to live until here - | - = note: consider using a `let` binding to increase its lifetime - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/issues/issue-11493.mir.stderr b/src/test/ui/issues/issue-11493.mir.stderr deleted file mode 100644 index a5f8aefd19..0000000000 --- a/src/test/ui/issues/issue-11493.mir.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0597]: borrowed value does not live long enough (Ast) - --> $DIR/issue-11493.rs:10:35 - | -LL | let y = x.as_ref().unwrap_or(&id(5)); - | ^^^^^ - temporary value dropped here while still borrowed - | | - | temporary value does not live long enough -... -LL | } - | - temporary value needs to live until here - | - = note: consider using a `let` binding to increase its lifetime - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/issues/issue-11493.rs b/src/test/ui/issues/issue-11493.rs index 4fdc32b42c..b28c173b19 100644 --- a/src/test/ui/issues/issue-11493.rs +++ b/src/test/ui/issues/issue-11493.rs @@ -1,14 +1,7 @@ -// This file must never have a trailing newline -// -// revisions: ast mir -// compile-flags: -Z borrowck=compare - fn id(x: T) -> T { x } fn main() { let x = Some(3); - let y = x.as_ref().unwrap_or(&id(5)); - //[ast]~^ ERROR borrowed value does not live long enough (Ast) - //[mir]~^^ ERROR borrowed value does not live long enough (Ast) - // This actually passes in mir + let y = x.as_ref().unwrap_or(&id(5)); //~ ERROR + &y; } diff --git a/src/test/ui/issues/issue-11493.stderr b/src/test/ui/issues/issue-11493.stderr new file mode 100644 index 0000000000..f954d64ac5 --- /dev/null +++ b/src/test/ui/issues/issue-11493.stderr @@ -0,0 +1,15 @@ +error[E0716]: temporary value dropped while borrowed + --> $DIR/issue-11493.rs:5:35 + | +LL | let y = x.as_ref().unwrap_or(&id(5)); + | ^^^^^ - temporary value is freed at the end of this statement + | | + | creates a temporary which is freed while still in use +LL | &y; + | -- borrow later used here + | + = note: consider using a `let` binding to create a longer lived value + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/issues/issue-11681.nll.stderr b/src/test/ui/issues/issue-11681.nll.stderr deleted file mode 100644 index f2f9307667..0000000000 --- a/src/test/ui/issues/issue-11681.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0515]: cannot return value referencing temporary value - --> $DIR/issue-11681.rs:13:10 - | -LL | let testValue = &Test; - | ---- temporary value created here -LL | return testValue; - | ^^^^^^^^^ returns a value referencing data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-11681.rs b/src/test/ui/issues/issue-11681.rs index 8294ca6b22..6d8810d805 100644 --- a/src/test/ui/issues/issue-11681.rs +++ b/src/test/ui/issues/issue-11681.rs @@ -9,8 +9,8 @@ impl Drop for Test { } fn createTest<'a>() -> &'a Test { - let testValue = &Test; //~ ERROR borrowed value does not live long enough - return testValue; + let testValue = &Test; + return testValue; //~ ERROR cannot return value referencing temporary value } diff --git a/src/test/ui/issues/issue-11681.stderr b/src/test/ui/issues/issue-11681.stderr index f59ddb0764..f2f9307667 100644 --- a/src/test/ui/issues/issue-11681.stderr +++ b/src/test/ui/issues/issue-11681.stderr @@ -1,18 +1,11 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/issue-11681.rs:12:20 +error[E0515]: cannot return value referencing temporary value + --> $DIR/issue-11681.rs:13:10 | LL | let testValue = &Test; - | ^^^^ temporary value does not live long enough + | ---- temporary value created here LL | return testValue; -LL | } - | - temporary value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 11:15... - --> $DIR/issue-11681.rs:11:15 - | -LL | fn createTest<'a>() -> &'a Test { - | ^^ + | ^^^^^^^^^ returns a value referencing data owned by the current function error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-11873.nll.stderr b/src/test/ui/issues/issue-11873.nll.stderr deleted file mode 100644 index 4475bdf147..0000000000 --- a/src/test/ui/issues/issue-11873.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0505]: cannot move out of `v` because it is borrowed - --> $DIR/issue-11873.rs:4:14 - | -LL | let mut f = || v.push(2); - | -- - borrow occurs due to use in closure - | | - | borrow of `v` occurs here -LL | let _w = v; - | ^ move out of `v` occurs here -LL | -LL | f(); - | - borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/issues/issue-11873.stderr b/src/test/ui/issues/issue-11873.stderr index 63bb4e7bd0..4475bdf147 100644 --- a/src/test/ui/issues/issue-11873.stderr +++ b/src/test/ui/issues/issue-11873.stderr @@ -1,10 +1,15 @@ error[E0505]: cannot move out of `v` because it is borrowed - --> $DIR/issue-11873.rs:4:9 + --> $DIR/issue-11873.rs:4:14 | LL | let mut f = || v.push(2); - | -- borrow of `v` occurs here + | -- - borrow occurs due to use in closure + | | + | borrow of `v` occurs here LL | let _w = v; - | ^^ move out of `v` occurs here + | ^ move out of `v` occurs here +LL | +LL | f(); + | - borrow later used here error: aborting due to previous error diff --git a/src/test/ui/issues/issue-12028.stderr b/src/test/ui/issues/issue-12028.stderr index 64694c7a8d..b9e2e80492 100644 --- a/src/test/ui/issues/issue-12028.stderr +++ b/src/test/ui/issues/issue-12028.stderr @@ -6,4 +6,3 @@ LL | self.input_stream(&mut stream); error: aborting due to previous error -For more information about this error, try `rustc --explain E0284`. diff --git a/src/test/ui/issues/issue-12041.nll.stderr b/src/test/ui/issues/issue-12041.nll.stderr deleted file mode 100644 index d95cc89ce9..0000000000 --- a/src/test/ui/issues/issue-12041.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0382]: use of moved value: `tx` - --> $DIR/issue-12041.rs:8:22 - | -LL | let tx = tx; - | ^^ value moved here, in previous iteration of loop - | - = note: move occurs because `tx` has type `std::sync::mpsc::Sender`, which does not implement the `Copy` trait - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/issues/issue-12041.stderr b/src/test/ui/issues/issue-12041.stderr index 48544c073e..d95cc89ce9 100644 --- a/src/test/ui/issues/issue-12041.stderr +++ b/src/test/ui/issues/issue-12041.stderr @@ -1,8 +1,8 @@ error[E0382]: use of moved value: `tx` - --> $DIR/issue-12041.rs:8:17 + --> $DIR/issue-12041.rs:8:22 | LL | let tx = tx; - | ^^ value moved here in previous iteration of loop + | ^^ value moved here, in previous iteration of loop | = note: move occurs because `tx` has type `std::sync::mpsc::Sender`, which does not implement the `Copy` trait diff --git a/src/test/ui/issues/issue-12470.nll.stderr b/src/test/ui/issues/issue-12470.nll.stderr deleted file mode 100644 index c97e59195e..0000000000 --- a/src/test/ui/issues/issue-12470.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0515]: cannot return value referencing local data `*b` - --> $DIR/issue-12470.rs:29:5 - | -LL | let bb: &B = &*b; - | --- `*b` is borrowed here -LL | make_a(bb) - | ^^^^^^^^^^ returns a value referencing data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-12470.rs b/src/test/ui/issues/issue-12470.rs index acf1b764fd..77b78c8a1f 100644 --- a/src/test/ui/issues/issue-12470.rs +++ b/src/test/ui/issues/issue-12470.rs @@ -25,8 +25,8 @@ fn make_a<'a>(p: &'a X) -> A<'a> { fn make_make_a<'a>() -> A<'a> { let b: Box = box B {i:1}; - let bb: &B = &*b; //~ ERROR does not live long enough - make_a(bb) + let bb: &B = &*b; + make_a(bb) //~ ERROR cannot return value referencing local data `*b` } fn main() { diff --git a/src/test/ui/issues/issue-12470.stderr b/src/test/ui/issues/issue-12470.stderr index fadfb75cde..c97e59195e 100644 --- a/src/test/ui/issues/issue-12470.stderr +++ b/src/test/ui/issues/issue-12470.stderr @@ -1,18 +1,11 @@ -error[E0597]: `*b` does not live long enough - --> $DIR/issue-12470.rs:28:19 +error[E0515]: cannot return value referencing local data `*b` + --> $DIR/issue-12470.rs:29:5 | LL | let bb: &B = &*b; - | ^^ borrowed value does not live long enough + | --- `*b` is borrowed here LL | make_a(bb) -LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 26:16... - --> $DIR/issue-12470.rs:26:16 - | -LL | fn make_make_a<'a>() -> A<'a> { - | ^^ + | ^^^^^^^^^^ returns a value referencing data owned by the current function error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-12567.nll.stderr b/src/test/ui/issues/issue-12567.nll.stderr deleted file mode 100644 index 17388df91d..0000000000 --- a/src/test/ui/issues/issue-12567.nll.stderr +++ /dev/null @@ -1,45 +0,0 @@ -error[E0508]: cannot move out of type `[T]`, a non-copy slice - --> $DIR/issue-12567.rs:4:11 - | -LL | match (l1, l2) { - | ^^^^^^^^ cannot move out of here -LL | (&[], &[]) => println!("both empty"), -LL | (&[], &[hd, ..]) | (&[hd, ..], &[]) - | -- data moved here -... -LL | (&[hd1, ..], &[hd2, ..]) - | --- ...and here - | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/issue-12567.rs:6:17 - | -LL | (&[], &[hd, ..]) | (&[hd, ..], &[]) - | ^^ -... -LL | (&[hd1, ..], &[hd2, ..]) - | ^^^ - -error[E0508]: cannot move out of type `[T]`, a non-copy slice - --> $DIR/issue-12567.rs:4:11 - | -LL | match (l1, l2) { - | ^^^^^^^^ cannot move out of here -LL | (&[], &[]) => println!("both empty"), -LL | (&[], &[hd, ..]) | (&[hd, ..], &[]) - | -- data moved here -... -LL | (&[hd1, ..], &[hd2, ..]) - | --- ...and here - | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/issue-12567.rs:6:17 - | -LL | (&[], &[hd, ..]) | (&[hd, ..], &[]) - | ^^ -... -LL | (&[hd1, ..], &[hd2, ..]) - | ^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0508`. diff --git a/src/test/ui/issues/issue-12567.rs b/src/test/ui/issues/issue-12567.rs index 1e1debe31c..643d9a2fc6 100644 --- a/src/test/ui/issues/issue-12567.rs +++ b/src/test/ui/issues/issue-12567.rs @@ -2,15 +2,13 @@ fn match_vecs<'a, T>(l1: &'a [T], l2: &'a [T]) { match (l1, l2) { + //~^ ERROR: cannot move out of type `[T]`, a non-copy slice + //~| ERROR: cannot move out of type `[T]`, a non-copy slice (&[], &[]) => println!("both empty"), (&[], &[hd, ..]) | (&[hd, ..], &[]) => println!("one empty"), - //~^^ ERROR: cannot move out of type `[T]`, a non-copy slice - //~^^^ ERROR: cannot move out of type `[T]`, a non-copy slice (&[hd1, ..], &[hd2, ..]) => println!("both nonempty"), - //~^^ ERROR: cannot move out of type `[T]`, a non-copy slice - //~^^^ ERROR: cannot move out of type `[T]`, a non-copy slice } } diff --git a/src/test/ui/issues/issue-12567.stderr b/src/test/ui/issues/issue-12567.stderr index 15f723f1ce..1de29dc8c6 100644 --- a/src/test/ui/issues/issue-12567.stderr +++ b/src/test/ui/issues/issue-12567.stderr @@ -1,39 +1,45 @@ error[E0508]: cannot move out of type `[T]`, a non-copy slice - --> $DIR/issue-12567.rs:6:16 + --> $DIR/issue-12567.rs:4:11 | +LL | match (l1, l2) { + | ^^^^^^^^ cannot move out of here +... LL | (&[], &[hd, ..]) | (&[hd, ..], &[]) - | ^--^^^^^ - | || - | |hint: to prevent move, use `ref hd` or `ref mut hd` - | cannot move out of here - -error[E0508]: cannot move out of type `[T]`, a non-copy slice - --> $DIR/issue-12567.rs:6:30 + | -- data moved here +LL | => println!("one empty"), +LL | (&[hd1, ..], &[hd2, ..]) + | --- ...and here + | +note: move occurs because these variables have types that don't implement the `Copy` trait + --> $DIR/issue-12567.rs:8:17 | LL | (&[], &[hd, ..]) | (&[hd, ..], &[]) - | ^--^^^^^ - | || - | |hint: to prevent move, use `ref hd` or `ref mut hd` - | cannot move out of here + | ^^ +LL | => println!("one empty"), +LL | (&[hd1, ..], &[hd2, ..]) + | ^^^ error[E0508]: cannot move out of type `[T]`, a non-copy slice - --> $DIR/issue-12567.rs:10:11 + --> $DIR/issue-12567.rs:4:11 | +LL | match (l1, l2) { + | ^^^^^^^^ cannot move out of here +... +LL | (&[], &[hd, ..]) | (&[hd, ..], &[]) + | -- data moved here +LL | => println!("one empty"), LL | (&[hd1, ..], &[hd2, ..]) - | ^---^^^^^ - | || - | |hint: to prevent move, use `ref hd1` or `ref mut hd1` - | cannot move out of here - -error[E0508]: cannot move out of type `[T]`, a non-copy slice - --> $DIR/issue-12567.rs:10:23 + | --- ...and here | +note: move occurs because these variables have types that don't implement the `Copy` trait + --> $DIR/issue-12567.rs:8:17 + | +LL | (&[], &[hd, ..]) | (&[hd, ..], &[]) + | ^^ +LL | => println!("one empty"), LL | (&[hd1, ..], &[hd2, ..]) - | ^---^^^^^ - | || - | |hint: to prevent move, use `ref hd2` or `ref mut hd2` - | cannot move out of here + | ^^^ -error: aborting due to 4 previous errors +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0508`. diff --git a/src/test/ui/issues/issue-13058.nll.stderr b/src/test/ui/issues/issue-13058.nll.stderr new file mode 100644 index 0000000000..8368978dea --- /dev/null +++ b/src/test/ui/issues/issue-13058.nll.stderr @@ -0,0 +1,12 @@ +error[E0621]: explicit lifetime required in the type of `cont` + --> $DIR/issue-13058.rs:14:21 + | +LL | fn check<'r, I: Iterator, T: Itble<'r, usize, I>>(cont: &T) -> bool + | -- help: add explicit lifetime `'r` to the type of `cont`: `&'r T` +LL | { +LL | let cont_iter = cont.iter(); + | ^^^^^^^^^^^ lifetime `'r` required + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/issues/issue-13359.stderr b/src/test/ui/issues/issue-13359.stderr index 00b7fbd456..7cfd754f72 100644 --- a/src/test/ui/issues/issue-13359.stderr +++ b/src/test/ui/issues/issue-13359.stderr @@ -3,12 +3,20 @@ error[E0308]: mismatched types | LL | foo(1*(1 as isize)); | ^^^^^^^^^^^^^^ expected i16, found isize +help: you can convert an `isize` to `i16` and panic if the converted value wouldn't fit + | +LL | foo((1*(1 as isize)).try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/issue-13359.rs:10:9 | LL | bar(1*(1 as usize)); | ^^^^^^^^^^^^^^ expected u32, found usize +help: you can convert an `usize` to `u32` and panic if the converted value wouldn't fit + | +LL | bar((1*(1 as usize)).try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-13407.stderr b/src/test/ui/issues/issue-13407.stderr index 1f4c7dfb0d..ddd99e6a3c 100644 --- a/src/test/ui/issues/issue-13407.stderr +++ b/src/test/ui/issues/issue-13407.stderr @@ -21,5 +21,5 @@ LL | A::C = 1; error: aborting due to 3 previous errors -Some errors occurred: E0070, E0308, E0603. +Some errors have detailed explanations: E0070, E0308, E0603. For more information about an error, try `rustc --explain E0070`. diff --git a/src/test/ui/issues/issue-13497-2.nll.stderr b/src/test/ui/issues/issue-13497-2.nll.stderr deleted file mode 100644 index 8ad921027e..0000000000 --- a/src/test/ui/issues/issue-13497-2.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0515]: cannot return value referencing local variable `rawLines` - --> $DIR/issue-13497-2.rs:3:5 - | -LL | rawLines - | ^------- - | | - | _____`rawLines` is borrowed here - | | -LL | | .iter().map(|l| l.trim()).collect() - | |___________________________________________^ returns a value referencing data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-13497-2.rs b/src/test/ui/issues/issue-13497-2.rs index a39ae4f1cf..c82da0f009 100644 --- a/src/test/ui/issues/issue-13497-2.rs +++ b/src/test/ui/issues/issue-13497-2.rs @@ -1,6 +1,6 @@ fn read_lines_borrowed<'a>() -> Vec<&'a str> { let rawLines: Vec = vec!["foo ".to_string(), " bar".to_string()]; - rawLines //~ ERROR `rawLines` does not live long enough + rawLines //~ ERROR cannot return value referencing local variable `rawLines` .iter().map(|l| l.trim()).collect() } diff --git a/src/test/ui/issues/issue-13497-2.stderr b/src/test/ui/issues/issue-13497-2.stderr index 5fde55cce0..8ad921027e 100644 --- a/src/test/ui/issues/issue-13497-2.stderr +++ b/src/test/ui/issues/issue-13497-2.stderr @@ -1,18 +1,14 @@ -error[E0597]: `rawLines` does not live long enough +error[E0515]: cannot return value referencing local variable `rawLines` --> $DIR/issue-13497-2.rs:3:5 | -LL | rawLines - | ^^^^^^^^ borrowed value does not live long enough -LL | .iter().map(|l| l.trim()).collect() -LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 1:24... - --> $DIR/issue-13497-2.rs:1:24 - | -LL | fn read_lines_borrowed<'a>() -> Vec<&'a str> { - | ^^ +LL | rawLines + | ^------- + | | + | _____`rawLines` is borrowed here + | | +LL | | .iter().map(|l| l.trim()).collect() + | |___________________________________________^ returns a value referencing data owned by the current function error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-1362.stderr b/src/test/ui/issues/issue-1362.stderr index 5fef8497cd..3f4fdee50f 100644 --- a/src/test/ui/issues/issue-1362.stderr +++ b/src/test/ui/issues/issue-1362.stderr @@ -3,6 +3,10 @@ error[E0308]: mismatched types | LL | let x: u32 = 20i32; | ^^^^^ expected u32, found i32 +help: change the type of the numeric literal from `i32` to `u32` + | +LL | let x: u32 = 20u32; + | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-13853.stderr b/src/test/ui/issues/issue-13853.stderr index b4efd5511c..9026845b4e 100644 --- a/src/test/ui/issues/issue-13853.stderr +++ b/src/test/ui/issues/issue-13853.stderr @@ -30,5 +30,5 @@ LL | iterate(graph); error: aborting due to 3 previous errors -Some errors occurred: E0308, E0599. +Some errors have detailed explanations: E0308, E0599. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/issues/issue-1448-2.stderr b/src/test/ui/issues/issue-1448-2.stderr index 487b061eba..a9fabca50a 100644 --- a/src/test/ui/issues/issue-1448-2.stderr +++ b/src/test/ui/issues/issue-1448-2.stderr @@ -3,6 +3,10 @@ error[E0308]: mismatched types | LL | println!("{}", foo(10i32)); | ^^^^^ expected u32, found i32 +help: change the type of the numeric literal from `i32` to `u32` + | +LL | println!("{}", foo(10u32)); + | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-15034.nll.stderr b/src/test/ui/issues/issue-15034.nll.stderr new file mode 100644 index 0000000000..f142e260a2 --- /dev/null +++ b/src/test/ui/issues/issue-15034.nll.stderr @@ -0,0 +1,11 @@ +error[E0621]: explicit lifetime required in the type of `lexer` + --> $DIR/issue-15034.rs:17:9 + | +LL | pub fn new(lexer: &'a mut Lexer) -> Parser<'a> { + | ------------- help: add explicit lifetime `'a` to the type of `lexer`: `&'a mut Lexer<'a>` +LL | Parser { lexer: lexer } + | ^^^^^^^^^^^^^^^^^^^^^^^ lifetime `'a` required + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/issues/issue-15381.nll.stderr b/src/test/ui/issues/issue-15381.nll.stderr new file mode 100644 index 0000000000..a8495846b3 --- /dev/null +++ b/src/test/ui/issues/issue-15381.nll.stderr @@ -0,0 +1,16 @@ +error[E0005]: refutable pattern in `for` loop binding: `&[]` not covered + --> $DIR/issue-15381.rs:4:9 + | +LL | for &[x,y,z] in values.chunks(3).filter(|&xs| xs.len() == 3) { + | ^^^^^^^^ pattern `&[]` not covered + +error[E0381]: borrow of possibly uninitialized variable: `y` + --> $DIR/issue-15381.rs:6:26 + | +LL | println!("y={}", y); + | ^ use of possibly uninitialized `y` + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0005, E0381. +For more information about an error, try `rustc --explain E0005`. diff --git a/src/test/ui/issues/issue-15381.rs b/src/test/ui/issues/issue-15381.rs index e58c866119..3dbd4e717a 100644 --- a/src/test/ui/issues/issue-15381.rs +++ b/src/test/ui/issues/issue-15381.rs @@ -4,5 +4,8 @@ fn main() { for &[x,y,z] in values.chunks(3).filter(|&xs| xs.len() == 3) { //~^ ERROR refutable pattern in `for` loop binding: `&[]` not covered println!("y={}", y); + //~^ WARN borrow of possibly uninitialized variable: `y` + //~| WARN this error has been downgraded to a warning for backwards compatibility + //~| WARN this represents potential undefined behavior in your code and this warning will } } diff --git a/src/test/ui/issues/issue-15381.stderr b/src/test/ui/issues/issue-15381.stderr index 8152737256..0f44a0f170 100644 --- a/src/test/ui/issues/issue-15381.stderr +++ b/src/test/ui/issues/issue-15381.stderr @@ -4,6 +4,16 @@ error[E0005]: refutable pattern in `for` loop binding: `&[]` not covered LL | for &[x,y,z] in values.chunks(3).filter(|&xs| xs.len() == 3) { | ^^^^^^^^ pattern `&[]` not covered +warning[E0381]: borrow of possibly uninitialized variable: `y` + --> $DIR/issue-15381.rs:6:26 + | +LL | println!("y={}", y); + | ^ use of possibly uninitialized `y` + | + = warning: this error has been downgraded to a warning for backwards compatibility with previous releases + = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + error: aborting due to previous error -For more information about this error, try `rustc --explain E0005`. +Some errors have detailed explanations: E0005, E0381. +For more information about an error, try `rustc --explain E0005`. diff --git a/src/test/ui/issues/issue-15919.rs b/src/test/ui/issues/issue-15919.rs index 19ecf2f657..a7ac4802a1 100644 --- a/src/test/ui/issues/issue-15919.rs +++ b/src/test/ui/issues/issue-15919.rs @@ -1,6 +1,10 @@ // error-pattern: too big for the current architecture // normalize-stderr-test "\[usize; \d+\]" -> "[usize; N]" +// FIXME https://github.com/rust-lang/rust/issues/59774 +// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> "" +// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" + #[cfg(target_pointer_width = "32")] fn main() { let x = [0usize; 0xffff_ffff]; diff --git a/src/test/ui/issues/issue-16048.rs b/src/test/ui/issues/issue-16048.rs index 5910481bf7..7d24f3a40a 100644 --- a/src/test/ui/issues/issue-16048.rs +++ b/src/test/ui/issues/issue-16048.rs @@ -22,6 +22,8 @@ impl<'a> NoLifetime for Foo<'a> { //~^ ERROR E0195 //~| NOTE lifetimes do not match method in trait return *self as T; + //~^ ERROR non-primitive cast: `Foo<'a>` as `T` + //~| NOTE an `as` expression can only be used to convert between primitive types. } } diff --git a/src/test/ui/issues/issue-16048.stderr b/src/test/ui/issues/issue-16048.stderr index 18e59bd241..a137bcdf19 100644 --- a/src/test/ui/issues/issue-16048.stderr +++ b/src/test/ui/issues/issue-16048.stderr @@ -7,6 +7,15 @@ LL | fn get<'p, T : Test<'p>>(&self) -> T; LL | fn get<'p, T : Test<'a>>(&self) -> T { | ^^^^^^^^^^^^^^^^^^ lifetimes do not match method in trait -error: aborting due to previous error +error[E0605]: non-primitive cast: `Foo<'a>` as `T` + --> $DIR/issue-16048.rs:24:16 + | +LL | return *self as T; + | ^^^^^^^^^^ + | + = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait + +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0195`. +Some errors have detailed explanations: E0195, E0605. +For more information about an error, try `rustc --explain E0195`. diff --git a/src/test/ui/issues/issue-16538.stderr b/src/test/ui/issues/issue-16538.stderr index 78c7d310ba..2d8b5bf2f6 100644 --- a/src/test/ui/issues/issue-16538.stderr +++ b/src/test/ui/issues/issue-16538.stderr @@ -15,5 +15,5 @@ LL | static foo: *const Y::X = Y::foo(Y::x as *const Y::X); error: aborting due to 2 previous errors -Some errors occurred: E0015, E0277. +Some errors have detailed explanations: E0015, E0277. For more information about an error, try `rustc --explain E0015`. diff --git a/src/test/ui/issues/issue-16683.nll.stderr b/src/test/ui/issues/issue-16683.nll.stderr new file mode 100644 index 0000000000..ea6b69d1a7 --- /dev/null +++ b/src/test/ui/issues/issue-16683.nll.stderr @@ -0,0 +1,10 @@ +error[E0521]: borrowed data escapes outside of function + --> $DIR/issue-16683.rs:4:9 + | +LL | fn b(&self) { + | ----- `self` is a reference that is only valid in the function body +LL | self.a(); + | ^^^^^^^^ `self` escapes the function body here + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-16683.stderr b/src/test/ui/issues/issue-16683.stderr index a047893a16..771a2ddf24 100644 --- a/src/test/ui/issues/issue-16683.stderr +++ b/src/test/ui/issues/issue-16683.stderr @@ -27,4 +27,3 @@ LL | trait T<'a> { error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/issues/issue-17001.stderr b/src/test/ui/issues/issue-17001.stderr index d7e6069977..2374e82955 100644 --- a/src/test/ui/issues/issue-17001.stderr +++ b/src/test/ui/issues/issue-17001.stderr @@ -6,4 +6,3 @@ LL | let p = foo { x: () }; error: aborting due to previous error -For more information about this error, try `rustc --explain E0574`. diff --git a/src/test/ui/issues/issue-17263.ast.stderr b/src/test/ui/issues/issue-17263.ast.stderr deleted file mode 100644 index 823f2c747d..0000000000 --- a/src/test/ui/issues/issue-17263.ast.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error[E0499]: cannot borrow `x` (via `x.b`) as mutable more than once at a time - --> $DIR/issue-17263.rs:17:34 - | -LL | let (a, b) = (&mut x.a, &mut x.b); - | --- ^^^ second mutable borrow occurs here (via `x.b`) - | | - | first mutable borrow occurs here (via `x.a`) -... -LL | } - | - first borrow ends here - -error[E0502]: cannot borrow `foo` (via `foo.b`) as immutable because `foo` is also borrowed as mutable (via `foo.a`) - --> $DIR/issue-17263.rs:21:32 - | -LL | let (c, d) = (&mut foo.a, &foo.b); - | ----- ^^^^^ immutable borrow of `foo.b` -- which overlaps with `foo.a` -- occurs here - | | - | mutable borrow occurs here (via `foo.a`) -... -LL | } - | - mutable borrow ends here - -error: aborting due to 2 previous errors - -Some errors occurred: E0499, E0502. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/issues/issue-17263.nll.stderr b/src/test/ui/issues/issue-17263.nll.stderr deleted file mode 100644 index 5604037a38..0000000000 --- a/src/test/ui/issues/issue-17263.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: compilation successful - --> $DIR/issue-17263.rs:15:1 - | -LL | / fn main() { -LL | | let mut x: Box<_> = box Foo { a: 1, b: 2 }; -LL | | let (a, b) = (&mut x.a, &mut x.b); -LL | | -... | -LL | | use_mut(a); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-17263.rs b/src/test/ui/issues/issue-17263.rs index 754f3b90aa..dce30275ff 100644 --- a/src/test/ui/issues/issue-17263.rs +++ b/src/test/ui/issues/issue-17263.rs @@ -1,28 +1,18 @@ -// This checks diagnostic quality for cases where AST-borrowck treated -// `Box` as other types (see rust-lang/rfcs#130). NLL again treats -// `Box` specially. We capture the differences via revisions. +// compile-pass -// revisions: ast nll -//[ast]compile-flags: -Z borrowck=ast -//[nll]compile-flags: -Z borrowck=migrate -Z two-phase-borrows - -// don't worry about the --compare-mode=nll on this test. -// ignore-compare-mode-nll -#![feature(box_syntax, rustc_attrs)] +#![feature(box_syntax)] struct Foo { a: isize, b: isize } -#[rustc_error] // rust-lang/rust#49855 -fn main() { //[nll]~ ERROR compilation successful + +fn main() { let mut x: Box<_> = box Foo { a: 1, b: 2 }; let (a, b) = (&mut x.a, &mut x.b); - //[ast]~^ ERROR cannot borrow `x` (via `x.b`) as mutable more than once at a time let mut foo: Box<_> = box Foo { a: 1, b: 2 }; let (c, d) = (&mut foo.a, &foo.b); - //[ast]~^ ERROR cannot borrow `foo` (via `foo.b`) as immutable - // We explicitly use the references created above to illustrate - // that NLL is accepting this code *not* because of artificially + // We explicitly use the references created above to illustrate that the + // borrow checker is accepting this code *not* because of artificially // short lifetimes, but rather because it understands that all the // references are of disjoint parts of memory. use_imm(d); diff --git a/src/test/ui/issues/issue-17385.nll.stderr b/src/test/ui/issues/issue-17385.nll.stderr deleted file mode 100644 index 28c22260c3..0000000000 --- a/src/test/ui/issues/issue-17385.nll.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error[E0382]: use of moved value: `foo` - --> $DIR/issue-17385.rs:19:11 - | -LL | let foo = X(1); - | --- move occurs because `foo` has type `X`, which does not implement the `Copy` trait -LL | drop(foo); - | --- value moved here -LL | match foo { -LL | X(1) => (), - | ^ value used here after move - -error[E0382]: use of moved value: `e` - --> $DIR/issue-17385.rs:25:11 - | -LL | let e = Enum::Variant2; - | - move occurs because `e` has type `Enum`, which does not implement the `Copy` trait -LL | drop(e); - | - value moved here -LL | match e { - | ^ value used here after move - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/issues/issue-17385.rs b/src/test/ui/issues/issue-17385.rs index 7400aadb05..93364d2f62 100644 --- a/src/test/ui/issues/issue-17385.rs +++ b/src/test/ui/issues/issue-17385.rs @@ -15,8 +15,8 @@ impl Drop for Enum { fn main() { let foo = X(1); drop(foo); - match foo { //~ ERROR use of moved value - X(1) => (), + match foo { + X(1) => (), //~ ERROR use of moved value _ => unreachable!() } diff --git a/src/test/ui/issues/issue-17385.stderr b/src/test/ui/issues/issue-17385.stderr index ee55d862e1..28c22260c3 100644 --- a/src/test/ui/issues/issue-17385.stderr +++ b/src/test/ui/issues/issue-17385.stderr @@ -1,22 +1,23 @@ error[E0382]: use of moved value: `foo` - --> $DIR/issue-17385.rs:18:11 + --> $DIR/issue-17385.rs:19:11 | +LL | let foo = X(1); + | --- move occurs because `foo` has type `X`, which does not implement the `Copy` trait LL | drop(foo); | --- value moved here LL | match foo { - | ^^^ value used here after move - | - = note: move occurs because `foo` has type `X`, which does not implement the `Copy` trait +LL | X(1) => (), + | ^ value used here after move error[E0382]: use of moved value: `e` --> $DIR/issue-17385.rs:25:11 | +LL | let e = Enum::Variant2; + | - move occurs because `e` has type `Enum`, which does not implement the `Copy` trait LL | drop(e); | - value moved here LL | match e { | ^ value used here after move - | - = note: move occurs because `e` has type `Enum`, which does not implement the `Copy` trait error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-17405.stderr b/src/test/ui/issues/issue-17405.stderr index 37274e239b..4b5678a887 100644 --- a/src/test/ui/issues/issue-17405.stderr +++ b/src/test/ui/issues/issue-17405.stderr @@ -6,4 +6,3 @@ LL | Foo { i } => () error: aborting due to previous error -For more information about this error, try `rustc --explain E0574`. diff --git a/src/test/ui/issues/issue-17458.stderr b/src/test/ui/issues/issue-17458.stderr index a1a8ed9f0c..69b6ab71e5 100644 --- a/src/test/ui/issues/issue-17458.stderr +++ b/src/test/ui/issues/issue-17458.stderr @@ -1,9 +1,10 @@ -error[E0658]: casting pointers to integers in statics is unstable (see issue #51910) +error[E0658]: casting pointers to integers in statics is unstable --> $DIR/issue-17458.rs:1:28 | LL | static X: usize = unsafe { 0 as *const usize as usize }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51910 = help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17545.nll.stderr b/src/test/ui/issues/issue-17545.nll.stderr deleted file mode 100644 index 79a1e09bd7..0000000000 --- a/src/test/ui/issues/issue-17545.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/issue-17545.rs:7:10 - | -LL | pub fn foo<'a, F: Fn(&'a ())>(bar: F) { - | -- lifetime `'a` defined here -LL | / bar.call(( -LL | | &id(()), - | | ^^^^^^ creates a temporary which is freed while still in use -LL | | )); - | | -- temporary value is freed at the end of this statement - | |______| - | argument requires that borrow lasts for `'a` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/issues/issue-17545.rs b/src/test/ui/issues/issue-17545.rs index d62c0b9f32..ced6fff315 100644 --- a/src/test/ui/issues/issue-17545.rs +++ b/src/test/ui/issues/issue-17545.rs @@ -4,7 +4,7 @@ fn id(x: T) -> T { x } pub fn foo<'a, F: Fn(&'a ())>(bar: F) { bar.call(( - &id(()), //~ ERROR borrowed value does not live long enough + &id(()), //~ ERROR temporary value dropped while borrowed )); } fn main() {} diff --git a/src/test/ui/issues/issue-17545.stderr b/src/test/ui/issues/issue-17545.stderr index c4acaf2278..79a1e09bd7 100644 --- a/src/test/ui/issues/issue-17545.stderr +++ b/src/test/ui/issues/issue-17545.stderr @@ -1,18 +1,16 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/issue-17545.rs:7:10 | -LL | &id(()), - | ^^^^^^ temporary value does not live long enough -LL | )); - | - temporary value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 5:12... - --> $DIR/issue-17545.rs:5:12 - | -LL | pub fn foo<'a, F: Fn(&'a ())>(bar: F) { - | ^^ - = note: consider using a `let` binding to increase its lifetime +LL | pub fn foo<'a, F: Fn(&'a ())>(bar: F) { + | -- lifetime `'a` defined here +LL | / bar.call(( +LL | | &id(()), + | | ^^^^^^ creates a temporary which is freed while still in use +LL | | )); + | | -- temporary value is freed at the end of this statement + | |______| + | argument requires that borrow lasts for `'a` error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/issues/issue-17546.stderr b/src/test/ui/issues/issue-17546.stderr index 1fbb229ed9..e27f49b4a3 100644 --- a/src/test/ui/issues/issue-17546.stderr +++ b/src/test/ui/issues/issue-17546.stderr @@ -62,4 +62,3 @@ LL | fn newer() -> Result { error: aborting due to 4 previous errors -For more information about this error, try `rustc --explain E0573`. diff --git a/src/test/ui/issues/issue-17718-const-bad-values.stderr b/src/test/ui/issues/issue-17718-const-bad-values.stderr index 95ef2b1b01..7a49e89a1a 100644 --- a/src/test/ui/issues/issue-17718-const-bad-values.stderr +++ b/src/test/ui/issues/issue-17718-const-bad-values.stderr @@ -18,5 +18,5 @@ LL | const C2: &'static mut usize = unsafe { &mut S }; error: aborting due to 3 previous errors -Some errors occurred: E0013, E0017. +Some errors have detailed explanations: E0013, E0017. For more information about an error, try `rustc --explain E0013`. diff --git a/src/test/ui/issues/issue-17718-constants-not-static.nll.stderr b/src/test/ui/issues/issue-17718-constants-not-static.nll.stderr deleted file mode 100644 index 8f3acae713..0000000000 --- a/src/test/ui/issues/issue-17718-constants-not-static.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0515]: cannot return reference to temporary value - --> $DIR/issue-17718-constants-not-static.rs:5:30 - | -LL | fn foo() -> &'static usize { &id(FOO) } - | ^------- - | || - | |temporary value created here - | returns a reference to data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-17718-constants-not-static.rs b/src/test/ui/issues/issue-17718-constants-not-static.rs index e857b906ef..2e6aff1618 100644 --- a/src/test/ui/issues/issue-17718-constants-not-static.rs +++ b/src/test/ui/issues/issue-17718-constants-not-static.rs @@ -3,7 +3,7 @@ fn id(x: T) -> T { x } const FOO: usize = 3; fn foo() -> &'static usize { &id(FOO) } -//~^ ERROR: borrowed value does not live long enough +//~^ ERROR: cannot return reference to temporary value fn main() { } diff --git a/src/test/ui/issues/issue-17718-constants-not-static.stderr b/src/test/ui/issues/issue-17718-constants-not-static.stderr index 2a5b9d7222..8f3acae713 100644 --- a/src/test/ui/issues/issue-17718-constants-not-static.stderr +++ b/src/test/ui/issues/issue-17718-constants-not-static.stderr @@ -1,13 +1,12 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/issue-17718-constants-not-static.rs:5:31 +error[E0515]: cannot return reference to temporary value + --> $DIR/issue-17718-constants-not-static.rs:5:30 | LL | fn foo() -> &'static usize { &id(FOO) } - | ^^^^^^^ - temporary value only lives until here - | | - | temporary value does not live long enough - | - = note: borrowed value must be valid for the static lifetime... + | ^------- + | || + | |temporary value created here + | returns a reference to data owned by the current function error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-17718-static-move.nll.stderr b/src/test/ui/issues/issue-17718-static-move.nll.stderr deleted file mode 100644 index c3e6267d30..0000000000 --- a/src/test/ui/issues/issue-17718-static-move.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0507]: cannot move out of static item - --> $DIR/issue-17718-static-move.rs:6:14 - | -LL | let _a = FOO; - | ^^^ - | | - | cannot move out of static item - | help: consider borrowing here: `&FOO` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/issues/issue-17718-static-move.stderr b/src/test/ui/issues/issue-17718-static-move.stderr index 064a991e4a..c3e6267d30 100644 --- a/src/test/ui/issues/issue-17718-static-move.stderr +++ b/src/test/ui/issues/issue-17718-static-move.stderr @@ -5,7 +5,7 @@ LL | let _a = FOO; | ^^^ | | | cannot move out of static item - | help: consider using a reference instead: `&FOO` + | help: consider borrowing here: `&FOO` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17728.nll.stderr b/src/test/ui/issues/issue-17728.nll.stderr new file mode 100644 index 0000000000..7436ebd920 --- /dev/null +++ b/src/test/ui/issues/issue-17728.nll.stderr @@ -0,0 +1,21 @@ +error[E0308]: match arms have incompatible types + --> $DIR/issue-17728.rs:109:14 + | +LL | / match to_parse { +LL | | "w" | "west" => RoomDirection::West, +LL | | "e" | "east" => RoomDirection::East, +LL | | "n" | "north" => RoomDirection::North, +... | +LL | | "down" => RoomDirection::Down, + | | ------------------- this and all prior arms are found to be of type `RoomDirection` +LL | | _ => None + | | ^^^^ expected enum `RoomDirection`, found enum `std::option::Option` +LL | | } + | |_____- `match` arms have incompatible types + | + = note: expected type `RoomDirection` + found type `std::option::Option<_>` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/issues/issue-17728.stderr b/src/test/ui/issues/issue-17728.stderr index 2c2efad19f..56dfb89456 100644 --- a/src/test/ui/issues/issue-17728.stderr +++ b/src/test/ui/issues/issue-17728.stderr @@ -29,5 +29,4 @@ LL | | } error: aborting due to 2 previous errors -Some errors occurred: E0308, E0623. -For more information about an error, try `rustc --explain E0308`. +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/issues/issue-17758.nll.stderr b/src/test/ui/issues/issue-17758.nll.stderr new file mode 100644 index 0000000000..b9dc9da368 --- /dev/null +++ b/src/test/ui/issues/issue-17758.nll.stderr @@ -0,0 +1,10 @@ +error[E0521]: borrowed data escapes outside of function + --> $DIR/issue-17758.rs:7:9 + | +LL | fn bar(&self) { + | ----- `self` is a reference that is only valid in the function body +LL | self.foo(); + | ^^^^^^^^^^ `self` escapes the function body here + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-17758.stderr b/src/test/ui/issues/issue-17758.stderr index 28a1be5984..0ef3b98719 100644 --- a/src/test/ui/issues/issue-17758.stderr +++ b/src/test/ui/issues/issue-17758.stderr @@ -28,4 +28,3 @@ LL | trait Foo<'a> { error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/issues/issue-17904-2.stderr b/src/test/ui/issues/issue-17904-2.stderr index b8fabd3b13..930409cc63 100644 --- a/src/test/ui/issues/issue-17904-2.stderr +++ b/src/test/ui/issues/issue-17904-2.stderr @@ -2,7 +2,7 @@ error[E0392]: parameter `T` is never used --> $DIR/issue-17904-2.rs:4:12 | LL | struct Foo where T: Copy; - | ^ unused type parameter + | ^ unused parameter | = help: consider removing `T` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/issues/issue-17913.rs b/src/test/ui/issues/issue-17913.rs index b0c4ef54b1..48d8f407aa 100644 --- a/src/test/ui/issues/issue-17913.rs +++ b/src/test/ui/issues/issue-17913.rs @@ -1,6 +1,10 @@ // normalize-stderr-test "\[&usize; \d+\]" -> "[&usize; N]" // error-pattern: too big for the current architecture +// FIXME https://github.com/rust-lang/rust/issues/59774 +// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> "" +// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" + #![feature(box_syntax)] #[cfg(target_pointer_width = "64")] diff --git a/src/test/ui/issues/issue-17954.nll.stderr b/src/test/ui/issues/issue-17954.nll.stderr deleted file mode 100644 index e08375fee1..0000000000 --- a/src/test/ui/issues/issue-17954.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0712]: thread-local variable borrowed past end of function - --> $DIR/issue-17954.rs:7:13 - | -LL | let a = &FOO; - | ^^^^ thread-local variables cannot be borrowed beyond the end of the function -... -LL | } - | - end of enclosing function is here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0712`. diff --git a/src/test/ui/issues/issue-17954.rs b/src/test/ui/issues/issue-17954.rs index a8fbf2372b..eb6a3d70f5 100644 --- a/src/test/ui/issues/issue-17954.rs +++ b/src/test/ui/issues/issue-17954.rs @@ -5,12 +5,11 @@ static FOO: u8 = 3; fn main() { let a = &FOO; - //~^ ERROR borrowed value does not live long enough - //~| does not live long enough - //~| NOTE borrowed value must be valid for the static lifetime + //~^ ERROR thread-local variable borrowed past end of function + //~| NOTE thread-local variables cannot be borrowed beyond the end of the function std::thread::spawn(move || { println!("{}", a); }); } -//~^ NOTE borrowed value only lives until here +//~^ NOTE end of enclosing function is here diff --git a/src/test/ui/issues/issue-17954.stderr b/src/test/ui/issues/issue-17954.stderr index 458bef5499..e08375fee1 100644 --- a/src/test/ui/issues/issue-17954.stderr +++ b/src/test/ui/issues/issue-17954.stderr @@ -1,14 +1,12 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/issue-17954.rs:7:14 +error[E0712]: thread-local variable borrowed past end of function + --> $DIR/issue-17954.rs:7:13 | LL | let a = &FOO; - | ^^^ borrowed value does not live long enough + | ^^^^ thread-local variables cannot be borrowed beyond the end of the function ... LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - end of enclosing function is here error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0712`. diff --git a/src/test/ui/issues/issue-18118.nll.stderr b/src/test/ui/issues/issue-18118.nll.stderr deleted file mode 100644 index 49798a148d..0000000000 --- a/src/test/ui/issues/issue-18118.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0597]: `p` does not live long enough - --> $DIR/issue-18118.rs:4:9 - | -LL | &p - | ^^ - | | - | borrowed value does not live long enough - | using this value as a constant requires that `p` is borrowed for `'static` -LL | }; - | - `p` dropped here while still borrowed - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/issues/issue-18118.stderr b/src/test/ui/issues/issue-18118.stderr index 07fa1f60e0..49798a148d 100644 --- a/src/test/ui/issues/issue-18118.stderr +++ b/src/test/ui/issues/issue-18118.stderr @@ -1,12 +1,13 @@ error[E0597]: `p` does not live long enough - --> $DIR/issue-18118.rs:4:10 + --> $DIR/issue-18118.rs:4:9 | LL | &p - | ^ borrowed value does not live long enough + | ^^ + | | + | borrowed value does not live long enough + | using this value as a constant requires that `p` is borrowed for `'static` LL | }; - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - `p` dropped here while still borrowed error: aborting due to previous error diff --git a/src/test/ui/issues/issue-18119.stderr b/src/test/ui/issues/issue-18119.stderr index ddee5a9da7..4c5b940190 100644 --- a/src/test/ui/issues/issue-18119.stderr +++ b/src/test/ui/issues/issue-18119.stderr @@ -18,4 +18,3 @@ LL | impl foo {} error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0573`. diff --git a/src/test/ui/issues/issue-18294.stderr b/src/test/ui/issues/issue-18294.stderr index a7d0392f7f..d10242434b 100644 --- a/src/test/ui/issues/issue-18294.stderr +++ b/src/test/ui/issues/issue-18294.stderr @@ -1,9 +1,10 @@ -error[E0658]: casting pointers to integers in constants is unstable (see issue #51910) +error[E0658]: casting pointers to integers in constants is unstable --> $DIR/issue-18294.rs:3:31 | LL | const Y: usize = unsafe { &X as *const u32 as usize }; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51910 = help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/issues/issue-18566.nll.stderr b/src/test/ui/issues/issue-18566.nll.stderr deleted file mode 100644 index 8db78935f8..0000000000 --- a/src/test/ui/issues/issue-18566.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0499]: cannot borrow `*s` as mutable more than once at a time - --> $DIR/issue-18566.rs:23:19 - | -LL | MyPtr(s).poke(s); - | - ---- ^ second mutable borrow occurs here - | | | - | | first borrow later used by call - | first mutable borrow occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/issues/issue-18566.stderr b/src/test/ui/issues/issue-18566.stderr index 90c3af48eb..8db78935f8 100644 --- a/src/test/ui/issues/issue-18566.stderr +++ b/src/test/ui/issues/issue-18566.stderr @@ -2,9 +2,9 @@ error[E0499]: cannot borrow `*s` as mutable more than once at a time --> $DIR/issue-18566.rs:23:19 | LL | MyPtr(s).poke(s); - | - ^- first borrow ends here - | | | - | | second mutable borrow occurs here + | - ---- ^ second mutable borrow occurs here + | | | + | | first borrow later used by call | first mutable borrow occurs here error: aborting due to previous error diff --git a/src/test/ui/issues/issue-18783.nll.stderr b/src/test/ui/issues/issue-18783.nll.stderr deleted file mode 100644 index 047b42578a..0000000000 --- a/src/test/ui/issues/issue-18783.nll.stderr +++ /dev/null @@ -1,33 +0,0 @@ -error[E0499]: cannot borrow `y` as mutable more than once at a time - --> $DIR/issue-18783.rs:7:21 - | -LL | c.push(Box::new(|| y = 0)); - | -- - first borrow occurs due to use of `y` in closure - | | - | first mutable borrow occurs here -LL | c.push(Box::new(|| y = 0)); - | ^^ - second borrow occurs due to use of `y` in closure - | | - | second mutable borrow occurs here -LL | -LL | } - | - first borrow might be used here, when `c` is dropped and runs the destructor for type `std::cell::RefCell>>` - -error[E0499]: cannot borrow `y` as mutable more than once at a time - --> $DIR/issue-18783.rs:16:29 - | -LL | Push::push(&c, Box::new(|| y = 0)); - | -- - first borrow occurs due to use of `y` in closure - | | - | first mutable borrow occurs here -LL | Push::push(&c, Box::new(|| y = 0)); - | ^^ - second borrow occurs due to use of `y` in closure - | | - | second mutable borrow occurs here -LL | -LL | } - | - first borrow might be used here, when `c` is dropped and runs the destructor for type `std::cell::RefCell>>` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/issues/issue-18783.stderr b/src/test/ui/issues/issue-18783.stderr index f88c42552e..047b42578a 100644 --- a/src/test/ui/issues/issue-18783.stderr +++ b/src/test/ui/issues/issue-18783.stderr @@ -2,31 +2,31 @@ error[E0499]: cannot borrow `y` as mutable more than once at a time --> $DIR/issue-18783.rs:7:21 | LL | c.push(Box::new(|| y = 0)); - | -- - previous borrow occurs due to use of `y` in closure + | -- - first borrow occurs due to use of `y` in closure | | | first mutable borrow occurs here LL | c.push(Box::new(|| y = 0)); - | ^^ - borrow occurs due to use of `y` in closure + | ^^ - second borrow occurs due to use of `y` in closure | | | second mutable borrow occurs here LL | LL | } - | - first borrow ends here + | - first borrow might be used here, when `c` is dropped and runs the destructor for type `std::cell::RefCell>>` error[E0499]: cannot borrow `y` as mutable more than once at a time --> $DIR/issue-18783.rs:16:29 | LL | Push::push(&c, Box::new(|| y = 0)); - | -- - previous borrow occurs due to use of `y` in closure + | -- - first borrow occurs due to use of `y` in closure | | | first mutable borrow occurs here LL | Push::push(&c, Box::new(|| y = 0)); - | ^^ - borrow occurs due to use of `y` in closure + | ^^ - second borrow occurs due to use of `y` in closure | | | second mutable borrow occurs here LL | LL | } - | - first borrow ends here + | - first borrow might be used here, when `c` is dropped and runs the destructor for type `std::cell::RefCell>>` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-19163.nll.stderr b/src/test/ui/issues/issue-19163.nll.stderr deleted file mode 100644 index af509aa59d..0000000000 --- a/src/test/ui/issues/issue-19163.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/issue-19163.rs:9:14 - | -LL | mywrite!(&v, "Hello world"); - | ^^ cannot borrow as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/issues/issue-19163.rs b/src/test/ui/issues/issue-19163.rs index 20d3244027..d98c5912af 100644 --- a/src/test/ui/issues/issue-19163.rs +++ b/src/test/ui/issues/issue-19163.rs @@ -7,5 +7,5 @@ use std::io::Write; fn main() { let mut v = vec![]; mywrite!(&v, "Hello world"); - //~^ error: cannot borrow immutable borrowed content as mutable + //~^ ERROR cannot borrow data in a `&` reference as mutable } diff --git a/src/test/ui/issues/issue-19163.stderr b/src/test/ui/issues/issue-19163.stderr index 242ceaedcb..af509aa59d 100644 --- a/src/test/ui/issues/issue-19163.stderr +++ b/src/test/ui/issues/issue-19163.stderr @@ -1,4 +1,4 @@ -error[E0596]: cannot borrow immutable borrowed content as mutable +error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/issue-19163.rs:9:14 | LL | mywrite!(&v, "Hello world"); diff --git a/src/test/ui/issues/issue-19883.stderr b/src/test/ui/issues/issue-19883.stderr index e370b2ec1c..738add1684 100644 --- a/src/test/ui/issues/issue-19883.stderr +++ b/src/test/ui/issues/issue-19883.stderr @@ -6,4 +6,3 @@ LL | >::Dst error: aborting due to previous error -For more information about this error, try `rustc --explain E0576`. diff --git a/src/test/ui/issues/issue-19991.stderr b/src/test/ui/issues/issue-19991.stderr index 4c6d150229..d9ea910ade 100644 --- a/src/test/ui/issues/issue-19991.stderr +++ b/src/test/ui/issues/issue-19991.stderr @@ -6,11 +6,14 @@ LL | | LL | | LL | | LL | | 765 + | | --- found here LL | | }; | |_____^ expected (), found integer | = note: expected type `()` found type `{integer}` + = note: `if` expressions without `else` evaluate to `()` + = help: consider adding an `else` block that evaluates to the expected type error: aborting due to previous error diff --git a/src/test/ui/issues/issue-20091.rs b/src/test/ui/issues/issue-20091.rs index 4d86a17b6f..4ea567d25c 100644 --- a/src/test/ui/issues/issue-20091.rs +++ b/src/test/ui/issues/issue-20091.rs @@ -3,6 +3,7 @@ // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes #![feature(os)] diff --git a/src/test/ui/issues/issue-20313.stderr b/src/test/ui/issues/issue-20313.stderr index 87e2e899d3..405e717c35 100644 --- a/src/test/ui/issues/issue-20313.stderr +++ b/src/test/ui/issues/issue-20313.stderr @@ -1,9 +1,10 @@ -error[E0658]: linking to LLVM intrinsics is experimental (see issue #29602) +error[E0658]: linking to LLVM intrinsics is experimental --> $DIR/issue-20313.rs:3:5 | LL | fn sqrt(x: f32) -> f32; | ^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29602 = help: add #![feature(link_llvm_intrinsics)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/issues/issue-20413.stderr b/src/test/ui/issues/issue-20413.stderr index 893f4faab0..6ef806cd66 100644 --- a/src/test/ui/issues/issue-20413.stderr +++ b/src/test/ui/issues/issue-20413.stderr @@ -2,7 +2,7 @@ error[E0392]: parameter `T` is never used --> $DIR/issue-20413.rs:5:15 | LL | struct NoData; - | ^ unused type parameter + | ^ unused parameter | = help: consider removing `T` or using a marker such as `std::marker::PhantomData` @@ -169,5 +169,5 @@ LL | trait Foo { error: aborting due to 3 previous errors -Some errors occurred: E0275, E0392. +Some errors have detailed explanations: E0275, E0392. For more information about an error, try `rustc --explain E0275`. diff --git a/src/test/ui/issues/issue-20772.stderr b/src/test/ui/issues/issue-20772.stderr index e67fedc5a9..3b5dd975ce 100644 --- a/src/test/ui/issues/issue-20772.stderr +++ b/src/test/ui/issues/issue-20772.stderr @@ -25,5 +25,5 @@ LL | trait T : Iterator error: aborting due to 2 previous errors -Some errors occurred: E0220, E0391. +Some errors have detailed explanations: E0220, E0391. For more information about an error, try `rustc --explain E0220`. diff --git a/src/test/ui/issues/issue-20801.nll.stderr b/src/test/ui/issues/issue-20801.nll.stderr deleted file mode 100644 index adcbe55aa3..0000000000 --- a/src/test/ui/issues/issue-20801.nll.stderr +++ /dev/null @@ -1,39 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/issue-20801.rs:26:22 - | -LL | let a = unsafe { *mut_ref() }; - | ^^^^^^^^^^ - | | - | cannot move out of borrowed content - | help: consider removing the `*`: `mut_ref()` - -error[E0507]: cannot move out of borrowed content - --> $DIR/issue-20801.rs:29:22 - | -LL | let b = unsafe { *imm_ref() }; - | ^^^^^^^^^^ - | | - | cannot move out of borrowed content - | help: consider removing the `*`: `imm_ref()` - -error[E0507]: cannot move out of dereference of raw pointer - --> $DIR/issue-20801.rs:32:22 - | -LL | let c = unsafe { *mut_ptr() }; - | ^^^^^^^^^^ - | | - | cannot move out of dereference of raw pointer - | help: consider removing the `*`: `mut_ptr()` - -error[E0507]: cannot move out of dereference of raw pointer - --> $DIR/issue-20801.rs:35:22 - | -LL | let d = unsafe { *const_ptr() }; - | ^^^^^^^^^^^^ - | | - | cannot move out of dereference of raw pointer - | help: consider removing the `*`: `const_ptr()` - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/issues/issue-20801.stderr b/src/test/ui/issues/issue-20801.stderr index 3e273919bb..adcbe55aa3 100644 --- a/src/test/ui/issues/issue-20801.stderr +++ b/src/test/ui/issues/issue-20801.stderr @@ -2,25 +2,37 @@ error[E0507]: cannot move out of borrowed content --> $DIR/issue-20801.rs:26:22 | LL | let a = unsafe { *mut_ref() }; - | ^^^^^^^^^^ cannot move out of borrowed content + | ^^^^^^^^^^ + | | + | cannot move out of borrowed content + | help: consider removing the `*`: `mut_ref()` error[E0507]: cannot move out of borrowed content --> $DIR/issue-20801.rs:29:22 | LL | let b = unsafe { *imm_ref() }; - | ^^^^^^^^^^ cannot move out of borrowed content + | ^^^^^^^^^^ + | | + | cannot move out of borrowed content + | help: consider removing the `*`: `imm_ref()` error[E0507]: cannot move out of dereference of raw pointer --> $DIR/issue-20801.rs:32:22 | LL | let c = unsafe { *mut_ptr() }; - | ^^^^^^^^^^ cannot move out of dereference of raw pointer + | ^^^^^^^^^^ + | | + | cannot move out of dereference of raw pointer + | help: consider removing the `*`: `mut_ptr()` error[E0507]: cannot move out of dereference of raw pointer --> $DIR/issue-20801.rs:35:22 | LL | let d = unsafe { *const_ptr() }; - | ^^^^^^^^^^^^ cannot move out of dereference of raw pointer + | ^^^^^^^^^^^^ + | | + | cannot move out of dereference of raw pointer + | help: consider removing the `*`: `const_ptr()` error: aborting due to 4 previous errors diff --git a/src/test/ui/issues/issue-20831-debruijn.stderr b/src/test/ui/issues/issue-20831-debruijn.stderr index e20869a6f3..70a395d0b8 100644 --- a/src/test/ui/issues/issue-20831-debruijn.stderr +++ b/src/test/ui/issues/issue-20831-debruijn.stderr @@ -94,5 +94,4 @@ LL | impl<'a> Publisher<'a> for MyStruct<'a> { error: aborting due to 3 previous errors -Some errors occurred: E0308, E0495. -For more information about an error, try `rustc --explain E0308`. +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/issues/issue-21177.stderr b/src/test/ui/issues/issue-21177.stderr index c3d2c6f48a..6841fe85dd 100644 --- a/src/test/ui/issues/issue-21177.stderr +++ b/src/test/ui/issues/issue-21177.stderr @@ -19,5 +19,5 @@ LL | fn foo>() { } error: aborting due to 2 previous errors -Some errors occurred: E0220, E0391. +Some errors have detailed explanations: E0220, E0391. For more information about an error, try `rustc --explain E0220`. diff --git a/src/test/ui/issues/issue-21449.stderr b/src/test/ui/issues/issue-21449.stderr index ecaf6faba4..21de1ea091 100644 --- a/src/test/ui/issues/issue-21449.stderr +++ b/src/test/ui/issues/issue-21449.stderr @@ -6,4 +6,3 @@ LL | let myVar = MyMod { T: 0 }; error: aborting due to previous error -For more information about this error, try `rustc --explain E0574`. diff --git a/src/test/ui/issues/issue-2149.stderr b/src/test/ui/issues/issue-2149.stderr index 82dbf34cc8..1df32aafa7 100644 --- a/src/test/ui/issues/issue-2149.stderr +++ b/src/test/ui/issues/issue-2149.stderr @@ -18,5 +18,5 @@ LL | ["hi"].bind(|x| [x] ); error: aborting due to 2 previous errors -Some errors occurred: E0277, E0599. +Some errors have detailed explanations: E0277, E0599. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/issues/issue-21600.nll.stderr b/src/test/ui/issues/issue-21600.nll.stderr deleted file mode 100644 index 21f3774c05..0000000000 --- a/src/test/ui/issues/issue-21600.nll.stderr +++ /dev/null @@ -1,34 +0,0 @@ -error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure - --> $DIR/issue-21600.rs:14:20 - | -LL | call_it(|| x.gen_mut()); - | ^ cannot borrow as mutable - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/issue-21600.rs:14:17 - | -LL | call_it(|| x.gen_mut()); - | ^^^^^^^^^^^^^^ - -error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure - --> $DIR/issue-21600.rs:14:17 - | -LL | call_it(|| x.gen_mut()); - | ^^ - mutable borrow occurs due to use of `x` in closure - | | - | cannot borrow as mutable - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/issue-21600.rs:12:13 - | -LL | call_it(|| { - | _____________^ -LL | | call_it(|| x.gen()); -LL | | call_it(|| x.gen_mut()); -LL | | -LL | | }); - | |_____^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/issues/issue-21600.rs b/src/test/ui/issues/issue-21600.rs index 1efc873bee..2e22e5e6fa 100644 --- a/src/test/ui/issues/issue-21600.rs +++ b/src/test/ui/issues/issue-21600.rs @@ -11,7 +11,8 @@ fn main() { let mut x = A; call_it(|| { call_it(|| x.gen()); - call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer - //~^ ERROR cannot borrow data mutably in a captured outer + call_it(|| x.gen_mut()); + //~^ ERROR cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure + //~| ERROR cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure }); } diff --git a/src/test/ui/issues/issue-21600.stderr b/src/test/ui/issues/issue-21600.stderr index a20838c6c9..9c534809db 100644 --- a/src/test/ui/issues/issue-21600.stderr +++ b/src/test/ui/issues/issue-21600.stderr @@ -1,8 +1,22 @@ -error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure +error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure + --> $DIR/issue-21600.rs:14:20 + | +LL | call_it(|| x.gen_mut()); + | ^ cannot borrow as mutable + | +help: consider changing this to accept closures that implement `FnMut` + --> $DIR/issue-21600.rs:14:17 + | +LL | call_it(|| x.gen_mut()); + | ^^^^^^^^^^^^^^ + +error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure --> $DIR/issue-21600.rs:14:17 | LL | call_it(|| x.gen_mut()); - | ^^ + | ^^ - mutable borrow occurs due to use of `x` in closure + | | + | cannot borrow as mutable | help: consider changing this to accept closures that implement `FnMut` --> $DIR/issue-21600.rs:12:13 @@ -12,21 +26,10 @@ LL | call_it(|| { LL | | call_it(|| x.gen()); LL | | call_it(|| x.gen_mut()); LL | | +LL | | LL | | }); | |_____^ -error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure - --> $DIR/issue-21600.rs:14:20 - | -LL | call_it(|| x.gen_mut()); - | ^ - | -help: consider changing this closure to take self by mutable reference - --> $DIR/issue-21600.rs:14:17 - | -LL | call_it(|| x.gen_mut()); - | ^^^^^^^^^^^^^^ - error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0387`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/issues/issue-21763.stderr b/src/test/ui/issues/issue-21763.stderr index 62cc887768..87c048fdf4 100644 --- a/src/test/ui/issues/issue-21763.stderr +++ b/src/test/ui/issues/issue-21763.stderr @@ -4,10 +4,10 @@ error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely LL | foo::, Rc<()>>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely | - = help: within `std::collections::HashMap, std::rc::Rc<()>>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>` + = help: within `(std::rc::Rc<()>, std::rc::Rc<()>)`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>` = note: required because it appears within the type `(std::rc::Rc<()>, std::rc::Rc<()>)` - = note: required because it appears within the type `std::marker::PhantomData<(std::rc::Rc<()>, std::rc::Rc<()>)>` - = note: required because it appears within the type `std::collections::hash::table::RawTable, std::rc::Rc<()>>` + = note: required because of the requirements on the impl of `std::marker::Send` for `hashbrown::raw::RawTable<(std::rc::Rc<()>, std::rc::Rc<()>)>` + = note: required because it appears within the type `hashbrown::map::HashMap, std::rc::Rc<()>, std::collections::hash_map::RandomState>` = note: required because it appears within the type `std::collections::HashMap, std::rc::Rc<()>>` note: required by `foo` --> $DIR/issue-21763.rs:6:1 diff --git a/src/test/ui/issues/issue-21950.rs b/src/test/ui/issues/issue-21950.rs index 0f78b37fed..b902893bf8 100644 --- a/src/test/ui/issues/issue-21950.rs +++ b/src/test/ui/issues/issue-21950.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - use std::ops::Add; fn main() { diff --git a/src/test/ui/issues/issue-21950.stderr b/src/test/ui/issues/issue-21950.stderr index bda2e3c457..7655e0811e 100644 --- a/src/test/ui/issues/issue-21950.stderr +++ b/src/test/ui/issues/issue-21950.stderr @@ -1,5 +1,5 @@ error[E0393]: the type parameter `Rhs` must be explicitly specified - --> $DIR/issue-21950.rs:7:14 + --> $DIR/issue-21950.rs:5:14 | LL | &Add; | ^^^ missing reference to `Rhs` @@ -7,12 +7,12 @@ LL | &Add; = note: because of the default `Self` reference, type parameters must be specified on object types error[E0191]: the value of the associated type `Output` (from the trait `std::ops::Add`) must be specified - --> $DIR/issue-21950.rs:7:14 + --> $DIR/issue-21950.rs:5:14 | LL | &Add; | ^^^ associated type `Output` must be specified error: aborting due to 2 previous errors -Some errors occurred: E0191, E0393. +Some errors have detailed explanations: E0191, E0393. For more information about an error, try `rustc --explain E0191`. diff --git a/src/test/ui/issues/issue-22037.stderr b/src/test/ui/issues/issue-22037.stderr index 615628558f..40d4a5e3bc 100644 --- a/src/test/ui/issues/issue-22037.stderr +++ b/src/test/ui/issues/issue-22037.stderr @@ -6,4 +6,3 @@ LL | fn a(&self) -> ::X; error: aborting due to previous error -For more information about this error, try `rustc --explain E0576`. diff --git a/src/test/ui/issues/issue-22370.rs b/src/test/ui/issues/issue-22370.rs index 44eef2da83..90912cfda0 100644 --- a/src/test/ui/issues/issue-22370.rs +++ b/src/test/ui/issues/issue-22370.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - trait A {} fn f(a: &A) {} diff --git a/src/test/ui/issues/issue-22370.stderr b/src/test/ui/issues/issue-22370.stderr index 5d76d84d11..f21551a55b 100644 --- a/src/test/ui/issues/issue-22370.stderr +++ b/src/test/ui/issues/issue-22370.stderr @@ -1,5 +1,5 @@ error[E0393]: the type parameter `T` must be explicitly specified - --> $DIR/issue-22370.rs:5:10 + --> $DIR/issue-22370.rs:3:10 | LL | fn f(a: &A) {} | ^ missing reference to `T` diff --git a/src/test/ui/issues/issue-22384.stderr b/src/test/ui/issues/issue-22384.stderr index 1f767a443d..130c3124b6 100644 --- a/src/test/ui/issues/issue-22384.stderr +++ b/src/test/ui/issues/issue-22384.stderr @@ -6,4 +6,3 @@ LL | <::foobar as Trait>::foo(); error: aborting due to previous error -For more information about this error, try `rustc --explain E0576`. diff --git a/src/test/ui/issues/issue-22560.rs b/src/test/ui/issues/issue-22560.rs index d91211e556..4b8e3aa9eb 100644 --- a/src/test/ui/issues/issue-22560.rs +++ b/src/test/ui/issues/issue-22560.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - use std::ops::{Add, Sub}; type Test = Add + diff --git a/src/test/ui/issues/issue-22560.stderr b/src/test/ui/issues/issue-22560.stderr index 694a4af51b..5a056dff59 100644 --- a/src/test/ui/issues/issue-22560.stderr +++ b/src/test/ui/issues/issue-22560.stderr @@ -1,5 +1,5 @@ error[E0393]: the type parameter `Rhs` must be explicitly specified - --> $DIR/issue-22560.rs:5:13 + --> $DIR/issue-22560.rs:3:13 | LL | type Test = Add + | ^^^ missing reference to `Rhs` @@ -7,7 +7,7 @@ LL | type Test = Add + = note: because of the default `Self` reference, type parameters must be specified on object types error[E0393]: the type parameter `Rhs` must be explicitly specified - --> $DIR/issue-22560.rs:8:13 + --> $DIR/issue-22560.rs:6:13 | LL | Sub; | ^^^ missing reference to `Rhs` @@ -15,13 +15,13 @@ LL | Sub; = note: because of the default `Self` reference, type parameters must be specified on object types error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/issue-22560.rs:8:13 + --> $DIR/issue-22560.rs:6:13 | LL | Sub; | ^^^ non-auto additional trait error[E0191]: the value of the associated type `Output` (from the trait `std::ops::Add`) must be specified - --> $DIR/issue-22560.rs:5:13 + --> $DIR/issue-22560.rs:3:13 | LL | type Test = Add + | _____________^ @@ -32,5 +32,5 @@ LL | | Sub; error: aborting due to 4 previous errors -Some errors occurred: E0191, E0225, E0393. +Some errors have detailed explanations: E0191, E0225, E0393. For more information about an error, try `rustc --explain E0191`. diff --git a/src/test/ui/issues/issue-22933-2.rs b/src/test/ui/issues/issue-22933-2.rs index 68d9ef2cfa..98a354b1bd 100644 --- a/src/test/ui/issues/issue-22933-2.rs +++ b/src/test/ui/issues/issue-22933-2.rs @@ -2,7 +2,7 @@ enum Delicious { Pie = 0x1, Apple = 0x2, ApplePie = Delicious::Apple as isize | Delicious::PIE as isize, - //~^ ERROR no variant named `PIE` found for type `Delicious` + //~^ ERROR no variant or associated item named `PIE` found for type `Delicious` } fn main() {} diff --git a/src/test/ui/issues/issue-22933-2.stderr b/src/test/ui/issues/issue-22933-2.stderr index 23b1474bde..72038ea20a 100644 --- a/src/test/ui/issues/issue-22933-2.stderr +++ b/src/test/ui/issues/issue-22933-2.stderr @@ -1,11 +1,11 @@ -error[E0599]: no variant named `PIE` found for type `Delicious` in the current scope +error[E0599]: no variant or associated item named `PIE` found for type `Delicious` in the current scope --> $DIR/issue-22933-2.rs:4:55 | LL | enum Delicious { - | -------------- variant `PIE` not found here + | -------------- variant or associated item `PIE` not found here ... LL | ApplePie = Delicious::Apple as isize | Delicious::PIE as isize, - | ^^^ variant not found in `Delicious` + | ^^^ variant or associated item not found in `Delicious` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-22933-3.stderr b/src/test/ui/issues/issue-22933-3.stderr index b1afda6d15..e0e8b5e18a 100644 --- a/src/test/ui/issues/issue-22933-3.stderr +++ b/src/test/ui/issues/issue-22933-3.stderr @@ -3,6 +3,10 @@ error[E0599]: no associated item named `MIN` found for type `u8` in the current | LL | const FOO: [u32; u8::MIN as usize] = []; | ^^^ associated item not found in `u8` +help: you are looking for the module in `std`, not the primitive type + | +LL | const FOO: [u32; std::u8::MIN as usize] = []; + | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-23024.stderr b/src/test/ui/issues/issue-23024.stderr index a972b36b80..fbefbe4f56 100644 --- a/src/test/ui/issues/issue-23024.stderr +++ b/src/test/ui/issues/issue-23024.stderr @@ -1,9 +1,10 @@ -error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead (see issue #29625) +error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead --> $DIR/issue-23024.rs:9:35 | LL | println!("{:?}",(vfnfer[0] as Fn)(3)); | ^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable error[E0107]: wrong number of type arguments: expected 1, found 0 @@ -20,5 +21,5 @@ LL | println!("{:?}",(vfnfer[0] as Fn)(3)); error: aborting due to 3 previous errors -Some errors occurred: E0107, E0191, E0658. +Some errors have detailed explanations: E0107, E0191, E0658. For more information about an error, try `rustc --explain E0107`. diff --git a/src/test/ui/issues/issue-23080-2.rs b/src/test/ui/issues/issue-23080-2.rs index 750b7e19d8..319aa2a5cc 100644 --- a/src/test/ui/issues/issue-23080-2.rs +++ b/src/test/ui/issues/issue-23080-2.rs @@ -1,6 +1,4 @@ -// ignore-tidy-linelength - -//~^^ ERROR +//~ ERROR #![feature(optin_builtin_traits)] diff --git a/src/test/ui/issues/issue-23080-2.stderr b/src/test/ui/issues/issue-23080-2.stderr index 38998469e4..1103de0d91 100644 --- a/src/test/ui/issues/issue-23080-2.stderr +++ b/src/test/ui/issues/issue-23080-2.stderr @@ -1,5 +1,5 @@ error[E0380]: auto traits cannot have methods or associated items - --> $DIR/issue-23080-2.rs:7:1 + --> $DIR/issue-23080-2.rs:5:1 | LL | / unsafe auto trait Trait { LL | | @@ -14,5 +14,5 @@ error[E0275]: overflow evaluating the requirement `<() as Trait>::Output` error: aborting due to 2 previous errors -Some errors occurred: E0275, E0380. +Some errors have detailed explanations: E0275, E0380. For more information about an error, try `rustc --explain E0275`. diff --git a/src/test/ui/issues/issue-23080.rs b/src/test/ui/issues/issue-23080.rs index e25a2d916f..fdfee69814 100644 --- a/src/test/ui/issues/issue-23080.rs +++ b/src/test/ui/issues/issue-23080.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![feature(optin_builtin_traits)] unsafe auto trait Trait { diff --git a/src/test/ui/issues/issue-23080.stderr b/src/test/ui/issues/issue-23080.stderr index ed843e793b..91c2721732 100644 --- a/src/test/ui/issues/issue-23080.stderr +++ b/src/test/ui/issues/issue-23080.stderr @@ -1,5 +1,5 @@ error[E0380]: auto traits cannot have methods or associated items - --> $DIR/issue-23080.rs:5:1 + --> $DIR/issue-23080.rs:3:1 | LL | / unsafe auto trait Trait { LL | | diff --git a/src/test/ui/issues/issue-23173.rs b/src/test/ui/issues/issue-23173.rs index 2922ebddf4..7c15598448 100644 --- a/src/test/ui/issues/issue-23173.rs +++ b/src/test/ui/issues/issue-23173.rs @@ -6,12 +6,8 @@ struct Struct { fn use_token(token: &Token) { unimplemented!() } fn main() { - use_token(&Token::Homura); - //~^ ERROR no variant named `Homura` - Struct::method(); - //~^ ERROR no function or associated item named `method` found for type - Struct::method; - //~^ ERROR no function or associated item named `method` found for type - Struct::Assoc; - //~^ ERROR no associated item named `Assoc` found for type `Struct` in + use_token(&Token::Homura); //~ ERROR no variant or associated item named `Homura` + Struct::method(); //~ ERROR no function or associated item named `method` found for type + Struct::method; //~ ERROR no function or associated item named `method` found for type + Struct::Assoc; //~ ERROR no associated item named `Assoc` found for type `Struct` in } diff --git a/src/test/ui/issues/issue-23173.stderr b/src/test/ui/issues/issue-23173.stderr index 75dba88360..699e41156f 100644 --- a/src/test/ui/issues/issue-23173.stderr +++ b/src/test/ui/issues/issue-23173.stderr @@ -1,14 +1,14 @@ -error[E0599]: no variant named `Homura` found for type `Token` in the current scope +error[E0599]: no variant or associated item named `Homura` found for type `Token` in the current scope --> $DIR/issue-23173.rs:9:23 | LL | enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ } - | ---------- variant `Homura` not found here + | ---------- variant or associated item `Homura` not found here ... LL | use_token(&Token::Homura); - | ^^^^^^ variant not found in `Token` + | ^^^^^^ variant or associated item not found in `Token` error[E0599]: no function or associated item named `method` found for type `Struct` in the current scope - --> $DIR/issue-23173.rs:11:13 + --> $DIR/issue-23173.rs:10:13 | LL | struct Struct { | ------------- function or associated item `method` not found for this @@ -17,7 +17,7 @@ LL | Struct::method(); | ^^^^^^ function or associated item not found in `Struct` error[E0599]: no function or associated item named `method` found for type `Struct` in the current scope - --> $DIR/issue-23173.rs:13:13 + --> $DIR/issue-23173.rs:11:13 | LL | struct Struct { | ------------- function or associated item `method` not found for this @@ -26,7 +26,7 @@ LL | Struct::method; | ^^^^^^ function or associated item not found in `Struct` error[E0599]: no associated item named `Assoc` found for type `Struct` in the current scope - --> $DIR/issue-23173.rs:15:13 + --> $DIR/issue-23173.rs:12:13 | LL | struct Struct { | ------------- associated item `Assoc` not found for this diff --git a/src/test/ui/issues/issue-23189.stderr b/src/test/ui/issues/issue-23189.stderr index ed065212c5..50c09f1748 100644 --- a/src/test/ui/issues/issue-23189.stderr +++ b/src/test/ui/issues/issue-23189.stderr @@ -6,4 +6,3 @@ LL | let _ = module { x: 0 }; error: aborting due to previous error -For more information about this error, try `rustc --explain E0574`. diff --git a/src/test/ui/issues/issue-23217.rs b/src/test/ui/issues/issue-23217.rs index 11426df617..157f20d22d 100644 --- a/src/test/ui/issues/issue-23217.rs +++ b/src/test/ui/issues/issue-23217.rs @@ -1,6 +1,5 @@ pub enum SomeEnum { - B = SomeEnum::A, - //~^ ERROR no variant named `A` found for type `SomeEnum` + B = SomeEnum::A, //~ ERROR no variant or associated item named `A` found for type `SomeEnum` } fn main() {} diff --git a/src/test/ui/issues/issue-23217.stderr b/src/test/ui/issues/issue-23217.stderr index 2a982422ca..97100ed375 100644 --- a/src/test/ui/issues/issue-23217.stderr +++ b/src/test/ui/issues/issue-23217.stderr @@ -1,13 +1,13 @@ -error[E0599]: no variant named `A` found for type `SomeEnum` in the current scope +error[E0599]: no variant or associated item named `A` found for type `SomeEnum` in the current scope --> $DIR/issue-23217.rs:2:19 | LL | pub enum SomeEnum { - | ----------------- variant `A` not found here + | ----------------- variant or associated item `A` not found here LL | B = SomeEnum::A, | ^ | | - | variant not found in `SomeEnum` - | help: did you mean: `B` + | variant or associated item not found in `SomeEnum` + | help: there is a variant with a similar name: `B` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-23281.rs b/src/test/ui/issues/issue-23281.rs index 98a0495451..2b457a57d3 100644 --- a/src/test/ui/issues/issue-23281.rs +++ b/src/test/ui/issues/issue-23281.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - pub struct Struct; impl Struct { diff --git a/src/test/ui/issues/issue-23281.stderr b/src/test/ui/issues/issue-23281.stderr index 1e57774afe..e540d4e819 100644 --- a/src/test/ui/issues/issue-23281.stderr +++ b/src/test/ui/issues/issue-23281.stderr @@ -1,5 +1,5 @@ error[E0277]: the size for values of type `(dyn std::ops::Fn() + 'static)` cannot be known at compilation time - --> $DIR/issue-23281.rs:6:5 + --> $DIR/issue-23281.rs:4:5 | LL | pub fn function(funs: Vec ()>) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time diff --git a/src/test/ui/issues/issue-23302-1.stderr b/src/test/ui/issues/issue-23302-1.stderr index 43effc0b3b..bbdb13a950 100644 --- a/src/test/ui/issues/issue-23302-1.stderr +++ b/src/test/ui/issues/issue-23302-1.stderr @@ -5,7 +5,7 @@ LL | A = X::A as isize, | ^^^^^^^^^^^^^ | = note: ...which again requires processing `X::A::{{constant}}#0`, completing the cycle -note: cycle used when const-evaluating `X::A::{{constant}}#0` +note: cycle used when processing `X::A::{{constant}}#0` --> $DIR/issue-23302-1.rs:4:9 | LL | A = X::A as isize, diff --git a/src/test/ui/issues/issue-23302-2.stderr b/src/test/ui/issues/issue-23302-2.stderr index 707d4fa7ed..03afd82211 100644 --- a/src/test/ui/issues/issue-23302-2.stderr +++ b/src/test/ui/issues/issue-23302-2.stderr @@ -5,7 +5,7 @@ LL | A = Y::B as isize, | ^^^^^^^^^^^^^ | = note: ...which again requires processing `Y::A::{{constant}}#0`, completing the cycle -note: cycle used when const-evaluating `Y::A::{{constant}}#0` +note: cycle used when processing `Y::A::{{constant}}#0` --> $DIR/issue-23302-2.rs:4:9 | LL | A = Y::B as isize, diff --git a/src/test/ui/issues/issue-23302-3.rs b/src/test/ui/issues/issue-23302-3.rs index da75f33079..e17c5eea2a 100644 --- a/src/test/ui/issues/issue-23302-3.rs +++ b/src/test/ui/issues/issue-23302-3.rs @@ -1,4 +1,5 @@ const A: i32 = B; //~ ERROR cycle detected +//~^ ERROR cycle detected const B: i32 = A; diff --git a/src/test/ui/issues/issue-23302-3.stderr b/src/test/ui/issues/issue-23302-3.stderr index a7d643987f..9462464080 100644 --- a/src/test/ui/issues/issue-23302-3.stderr +++ b/src/test/ui/issues/issue-23302-3.stderr @@ -10,18 +10,36 @@ note: ...which requires checking which parts of `A` are promotable to static... LL | const A: i32 = B; | ^ note: ...which requires const checking if rvalue is promotable to static `B`... - --> $DIR/issue-23302-3.rs:3:1 + --> $DIR/issue-23302-3.rs:4:1 | LL | const B: i32 = A; | ^^^^^^^^^^^^^^^^^ note: ...which requires checking which parts of `B` are promotable to static... - --> $DIR/issue-23302-3.rs:3:16 + --> $DIR/issue-23302-3.rs:4:16 | LL | const B: i32 = A; | ^ = note: ...which again requires const checking if rvalue is promotable to static `A`, completing the cycle = note: cycle used when running analysis passes on this crate -error: aborting due to previous error +error[E0391]: cycle detected when processing `A` + --> $DIR/issue-23302-3.rs:1:16 + | +LL | const A: i32 = B; + | ^ + | +note: ...which requires processing `B`... + --> $DIR/issue-23302-3.rs:4:16 + | +LL | const B: i32 = A; + | ^ + = note: ...which again requires processing `A`, completing the cycle +note: cycle used when processing `A` + --> $DIR/issue-23302-3.rs:1:1 + | +LL | const A: i32 = B; + | ^^^^^^^^^^^^^^^^^ + +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0391`. diff --git a/src/test/ui/issues/issue-23589.stderr b/src/test/ui/issues/issue-23589.stderr index bc2007ba39..d169fdfe2d 100644 --- a/src/test/ui/issues/issue-23589.stderr +++ b/src/test/ui/issues/issue-23589.stderr @@ -18,5 +18,5 @@ LL | let v: Vec(&str) = vec!['1', '2']; error: aborting due to 2 previous errors -Some errors occurred: E0214, E0308. +Some errors have detailed explanations: E0214, E0308. For more information about an error, try `rustc --explain E0214`. diff --git a/src/test/ui/issues/issue-24267-flow-exit.nll.stderr b/src/test/ui/issues/issue-24267-flow-exit.nll.stderr deleted file mode 100644 index 3b4f27621f..0000000000 --- a/src/test/ui/issues/issue-24267-flow-exit.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0381]: borrow of possibly uninitialized variable: `x` - --> $DIR/issue-24267-flow-exit.rs:12:20 - | -LL | println!("{}", x); - | ^ use of possibly uninitialized `x` - -error[E0381]: borrow of possibly uninitialized variable: `x` - --> $DIR/issue-24267-flow-exit.rs:18:20 - | -LL | println!("{}", x); - | ^ use of possibly uninitialized `x` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/issues/issue-24267-flow-exit.rs b/src/test/ui/issues/issue-24267-flow-exit.rs index ce3a799fb3..a1b4d75d40 100644 --- a/src/test/ui/issues/issue-24267-flow-exit.rs +++ b/src/test/ui/issues/issue-24267-flow-exit.rs @@ -9,11 +9,11 @@ pub fn main() { pub fn foo1() { let x: i32; loop { x = break; } - println!("{}", x); //~ ERROR use of possibly uninitialized variable: `x` + println!("{}", x); //~ ERROR borrow of possibly uninitialized variable: `x` } pub fn foo2() { let x: i32; for _ in 0..10 { x = continue; } - println!("{}", x); //~ ERROR use of possibly uninitialized variable: `x` + println!("{}", x); //~ ERROR borrow of possibly uninitialized variable: `x` } diff --git a/src/test/ui/issues/issue-24267-flow-exit.stderr b/src/test/ui/issues/issue-24267-flow-exit.stderr index 2b9e2ee901..3b4f27621f 100644 --- a/src/test/ui/issues/issue-24267-flow-exit.stderr +++ b/src/test/ui/issues/issue-24267-flow-exit.stderr @@ -1,10 +1,10 @@ -error[E0381]: use of possibly uninitialized variable: `x` +error[E0381]: borrow of possibly uninitialized variable: `x` --> $DIR/issue-24267-flow-exit.rs:12:20 | LL | println!("{}", x); | ^ use of possibly uninitialized `x` -error[E0381]: use of possibly uninitialized variable: `x` +error[E0381]: borrow of possibly uninitialized variable: `x` --> $DIR/issue-24267-flow-exit.rs:18:20 | LL | println!("{}", x); diff --git a/src/test/ui/issues/issue-24357.nll.stderr b/src/test/ui/issues/issue-24357.nll.stderr deleted file mode 100644 index a9c43a8f0d..0000000000 --- a/src/test/ui/issues/issue-24357.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0382]: use of moved value: `x` - --> $DIR/issue-24357.rs:6:12 - | -LL | let x = NoCopy; - | - move occurs because `x` has type `NoCopy`, which does not implement the `Copy` trait -LL | let f = move || { let y = x; }; - | ------- - variable moved due to use in closure - | | - | value moved into closure here -LL | -LL | let z = x; - | ^ value used here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/issues/issue-24357.rs b/src/test/ui/issues/issue-24357.rs index 84f263ff64..152e69ebc8 100644 --- a/src/test/ui/issues/issue-24357.rs +++ b/src/test/ui/issues/issue-24357.rs @@ -1,10 +1,11 @@ struct NoCopy; fn main() { let x = NoCopy; + //~^ NOTE move occurs because `x` has type `NoCopy` let f = move || { let y = x; }; - //~^ NOTE value moved (into closure) here + //~^ NOTE value moved into closure here + //~| NOTE variable moved due to use in closure let z = x; //~^ ERROR use of moved value: `x` //~| NOTE value used here after move - //~| NOTE move occurs because `x` has type `NoCopy` } diff --git a/src/test/ui/issues/issue-24357.stderr b/src/test/ui/issues/issue-24357.stderr index ced24ffc5e..b9e15f5e21 100644 --- a/src/test/ui/issues/issue-24357.stderr +++ b/src/test/ui/issues/issue-24357.stderr @@ -1,13 +1,16 @@ error[E0382]: use of moved value: `x` - --> $DIR/issue-24357.rs:6:8 + --> $DIR/issue-24357.rs:8:12 | -LL | let f = move || { let y = x; }; - | ------- value moved (into closure) here +LL | let x = NoCopy; + | - move occurs because `x` has type `NoCopy`, which does not implement the `Copy` trait LL | +LL | let f = move || { let y = x; }; + | ------- - variable moved due to use in closure + | | + | value moved into closure here +... LL | let z = x; - | ^ value used here after move - | - = note: move occurs because `x` has type `NoCopy`, which does not implement the `Copy` trait + | ^ value used here after move error: aborting due to previous error diff --git a/src/test/ui/issues/issue-24363.stderr b/src/test/ui/issues/issue-24363.stderr index 6f269ba764..50d65e09bb 100644 --- a/src/test/ui/issues/issue-24363.stderr +++ b/src/test/ui/issues/issue-24363.stderr @@ -16,5 +16,5 @@ LL | ()+() error: aborting due to 2 previous errors -Some errors occurred: E0369, E0610. +Some errors have detailed explanations: E0369, E0610. For more information about an error, try `rustc --explain E0369`. diff --git a/src/test/ui/issues/issue-25579.ast.nll.stderr b/src/test/ui/issues/issue-25579.ast.nll.stderr deleted file mode 100644 index 107f88b413..0000000000 --- a/src/test/ui/issues/issue-25579.ast.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error: compilation successful - --> $DIR/issue-25579.rs:21:1 - | -LL | / fn main() { -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-25579.ast.stderr b/src/test/ui/issues/issue-25579.ast.stderr deleted file mode 100644 index a44cc95687..0000000000 --- a/src/test/ui/issues/issue-25579.ast.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0499]: cannot borrow `l.0` as mutable more than once at a time - --> $DIR/issue-25579.rs:14:32 - | -LL | &mut Sexpression::Cons(ref mut expr) => { - | ^^^^^^^^^^^^ mutable borrow starts here in previous iteration of loop -... -LL | } - | - mutable borrow ends here - -error[E0506]: cannot assign to `l` because it is borrowed - --> $DIR/issue-25579.rs:15:13 - | -LL | &mut Sexpression::Cons(ref mut expr) => { - | ------------ borrow of `l` occurs here -LL | l = &mut **expr; - | ^^^^^^^^^^^^^^^ assignment to borrowed `l` occurs here - -error: aborting due to 2 previous errors - -Some errors occurred: E0499, E0506. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/issues/issue-25579.mir.stderr b/src/test/ui/issues/issue-25579.mir.stderr deleted file mode 100644 index 107f88b413..0000000000 --- a/src/test/ui/issues/issue-25579.mir.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error: compilation successful - --> $DIR/issue-25579.rs:21:1 - | -LL | / fn main() { -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-25579.rs b/src/test/ui/issues/issue-25579.rs index 1813253332..31ba102746 100644 --- a/src/test/ui/issues/issue-25579.rs +++ b/src/test/ui/issues/issue-25579.rs @@ -1,7 +1,4 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - -#![feature(rustc_attrs)] +// compile-pass enum Sexpression { Num(()), @@ -11,12 +8,13 @@ enum Sexpression { fn causes_error_in_ast(mut l: &mut Sexpression) { loop { match l { &mut Sexpression::Num(ref mut n) => {}, - &mut Sexpression::Cons(ref mut expr) => { //[ast]~ ERROR [E0499] - l = &mut **expr; //[ast]~ ERROR [E0506] + &mut Sexpression::Cons(ref mut expr) => { + l = &mut **expr; } }} } -#[rustc_error] -fn main() { //[mir]~ ERROR compilation successful + +fn main() { + causes_error_in_ast(&mut Sexpression::Num(())); } diff --git a/src/test/ui/issues/issue-25700.nll.stderr b/src/test/ui/issues/issue-25700.nll.stderr deleted file mode 100644 index fa309a55c3..0000000000 --- a/src/test/ui/issues/issue-25700.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: use of moved value: `t` - --> $DIR/issue-25700.rs:13:10 - | -LL | let t = S::<()>(None); - | - move occurs because `t` has type `S<()>`, which does not implement the `Copy` trait -LL | drop(t); - | - value moved here -LL | drop(t); - | ^ value used here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/issues/issue-25700.stderr b/src/test/ui/issues/issue-25700.stderr index 4a203c7c25..fa309a55c3 100644 --- a/src/test/ui/issues/issue-25700.stderr +++ b/src/test/ui/issues/issue-25700.stderr @@ -1,12 +1,12 @@ error[E0382]: use of moved value: `t` --> $DIR/issue-25700.rs:13:10 | +LL | let t = S::<()>(None); + | - move occurs because `t` has type `S<()>`, which does not implement the `Copy` trait LL | drop(t); | - value moved here LL | drop(t); | ^ value used here after move - | - = note: move occurs because `t` has type `S<()>`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/issues/issue-25793.nll.stderr b/src/test/ui/issues/issue-25793.nll.stderr deleted file mode 100644 index daea9cd8cd..0000000000 --- a/src/test/ui/issues/issue-25793.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0503]: cannot use `self.width` because it was mutably borrowed - --> $DIR/issue-25793.rs:4:9 - | -LL | $this.width.unwrap() - | ^^^^^^^^^^^ use of borrowed `*self` -... -LL | let r = &mut *self; - | ---------- borrow of `*self` occurs here -LL | r.get_size(width!(self)) - | -------- ------------ in this macro invocation - | | - | borrow later used by call - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0503`. diff --git a/src/test/ui/issues/issue-25793.stderr b/src/test/ui/issues/issue-25793.stderr index e8d208c19a..daea9cd8cd 100644 --- a/src/test/ui/issues/issue-25793.stderr +++ b/src/test/ui/issues/issue-25793.stderr @@ -5,9 +5,11 @@ LL | $this.width.unwrap() | ^^^^^^^^^^^ use of borrowed `*self` ... LL | let r = &mut *self; - | ----- borrow of `*self` occurs here + | ---------- borrow of `*self` occurs here LL | r.get_size(width!(self)) - | ------------ in this macro invocation + | -------- ------------ in this macro invocation + | | + | borrow later used by call error: aborting due to previous error diff --git a/src/test/ui/issues/issue-25826.stderr b/src/test/ui/issues/issue-25826.stderr index dc547f7c32..a800f787e3 100644 --- a/src/test/ui/issues/issue-25826.stderr +++ b/src/test/ui/issues/issue-25826.stderr @@ -1,9 +1,10 @@ -error[E0658]: comparing raw pointers inside constant (see issue #53020) +error[E0658]: comparing raw pointers inside constant --> $DIR/issue-25826.rs:3:30 | LL | const A: bool = unsafe { id:: as *const () < id:: as *const () }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/53020 = help: add #![feature(const_compare_raw_pointers)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/issues/issue-2590.nll.stderr b/src/test/ui/issues/issue-2590.nll.stderr deleted file mode 100644 index e19e83dc74..0000000000 --- a/src/test/ui/issues/issue-2590.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/issue-2590.rs:11:9 - | -LL | self.tokens - | ^^^^^^^^^^^ cannot move out of borrowed content - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/issues/issue-2590.stderr b/src/test/ui/issues/issue-2590.stderr index c50652d328..e19e83dc74 100644 --- a/src/test/ui/issues/issue-2590.stderr +++ b/src/test/ui/issues/issue-2590.stderr @@ -2,7 +2,7 @@ error[E0507]: cannot move out of borrowed content --> $DIR/issue-2590.rs:11:9 | LL | self.tokens - | ^^^^ cannot move out of borrowed content + | ^^^^^^^^^^^ cannot move out of borrowed content error: aborting due to previous error diff --git a/src/test/ui/issues/issue-26217.nll.stderr b/src/test/ui/issues/issue-26217.nll.stderr new file mode 100644 index 0000000000..c7601caacd --- /dev/null +++ b/src/test/ui/issues/issue-26217.nll.stderr @@ -0,0 +1,10 @@ +error: lifetime may not live long enough + --> $DIR/issue-26217.rs:4:5 + | +LL | fn bar<'a>() { + | -- lifetime `'a` defined here +LL | foo::<&'a i32>(); + | ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-26217.stderr b/src/test/ui/issues/issue-26217.stderr index be9da569f8..8bcc62ab2e 100644 --- a/src/test/ui/issues/issue-26217.stderr +++ b/src/test/ui/issues/issue-26217.stderr @@ -8,4 +8,3 @@ LL | foo::<&'a i32>(); error: aborting due to previous error -For more information about this error, try `rustc --explain E0477`. diff --git a/src/test/ui/issues/issue-26459.stderr b/src/test/ui/issues/issue-26459.stderr index 187369263a..c7909a142b 100644 --- a/src/test/ui/issues/issue-26459.stderr +++ b/src/test/ui/issues/issue-26459.stderr @@ -6,4 +6,3 @@ LL | char{ch} => true error: aborting due to previous error -For more information about this error, try `rustc --explain E0574`. diff --git a/src/test/ui/issues/issue-26619.nll.stderr b/src/test/ui/issues/issue-26619.nll.stderr deleted file mode 100644 index d1157cda92..0000000000 --- a/src/test/ui/issues/issue-26619.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0515]: cannot return value referencing function parameter - --> $DIR/issue-26619.rs:7:76 - | -LL | for s in vec!["1|2".to_string()].into_iter().filter_map(|ref line| self.make_entry(line)) { - | -------- ^^^^^^^^^^^^^^^^^^^^^ returns a value referencing data owned by the current function - | | - | function parameter borrowed here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-26619.rs b/src/test/ui/issues/issue-26619.rs index cd89c674e4..00e09f3f07 100644 --- a/src/test/ui/issues/issue-26619.rs +++ b/src/test/ui/issues/issue-26619.rs @@ -5,7 +5,7 @@ pub struct History<'a> { pub _s: &'a str } impl<'a> History<'a> { pub fn get_page(&self) { for s in vec!["1|2".to_string()].into_iter().filter_map(|ref line| self.make_entry(line)) { - //~^ ERROR borrowed value does not live long enough + //~^ ERROR cannot return value referencing function parameter println!("{:?}", s); } } diff --git a/src/test/ui/issues/issue-26619.stderr b/src/test/ui/issues/issue-26619.stderr index 3ac6c4e308..d1157cda92 100644 --- a/src/test/ui/issues/issue-26619.stderr +++ b/src/test/ui/issues/issue-26619.stderr @@ -1,12 +1,11 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/issue-26619.rs:7:66 +error[E0515]: cannot return value referencing function parameter + --> $DIR/issue-26619.rs:7:76 | LL | for s in vec!["1|2".to_string()].into_iter().filter_map(|ref line| self.make_entry(line)) { - | ^^^^^^^^ -- temporary value needs to live until here - | | | - | | temporary value dropped here while still borrowed - | temporary value does not live long enough + | -------- ^^^^^^^^^^^^^^^^^^^^^ returns a value referencing data owned by the current function + | | + | function parameter borrowed here error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-26905.rs b/src/test/ui/issues/issue-26905.rs index 0cd166f4ac..efd06219c3 100644 --- a/src/test/ui/issues/issue-26905.rs +++ b/src/test/ui/issues/issue-26905.rs @@ -21,4 +21,3 @@ fn main() { let x = MyRc { _ptr: &iter, _boo: NotPhantomData(PhantomData) }; let _y: MyRc> = x; } - diff --git a/src/test/ui/issues/issue-27592.nll.stderr b/src/test/ui/issues/issue-27592.nll.stderr deleted file mode 100644 index 9d3eaa9705..0000000000 --- a/src/test/ui/issues/issue-27592.nll.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0515]: cannot return value referencing temporary value - --> $DIR/issue-27592.rs:16:14 - | -LL | write(|| format_args!("{}", String::from("Hello world"))); - | ^^^^^^^^^^^^^^^^^^^---------------------------^ - | | | - | | temporary value created here - | returns a value referencing data owned by the current function - -error[E0515]: cannot return value referencing temporary value - --> $DIR/issue-27592.rs:16:14 - | -LL | write(|| format_args!("{}", String::from("Hello world"))); - | ^^^^^^^^^^^^^----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | | - | | temporary value created here - | returns a value referencing data owned by the current function - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-27592.rs b/src/test/ui/issues/issue-27592.rs index 6006f9a7c5..b023ea18ac 100644 --- a/src/test/ui/issues/issue-27592.rs +++ b/src/test/ui/issues/issue-27592.rs @@ -14,6 +14,6 @@ impl ::std::fmt::Write for Stream { fn main() { write(|| format_args!("{}", String::from("Hello world"))); - //~^ ERROR borrowed value does not live long enough - //~| ERROR borrowed value does not live long enough + //~^ ERROR cannot return value referencing temporary value + //~| ERROR cannot return value referencing temporary value } diff --git a/src/test/ui/issues/issue-27592.stderr b/src/test/ui/issues/issue-27592.stderr index 0f62abee1c..9d3eaa9705 100644 --- a/src/test/ui/issues/issue-27592.stderr +++ b/src/test/ui/issues/issue-27592.stderr @@ -1,21 +1,21 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/issue-27592.rs:16:27 +error[E0515]: cannot return value referencing temporary value + --> $DIR/issue-27592.rs:16:14 | LL | write(|| format_args!("{}", String::from("Hello world"))); - | ^^^^ -- temporary value needs to live until here - | | | - | | temporary value dropped here while still borrowed - | temporary value does not live long enough + | ^^^^^^^^^^^^^^^^^^^---------------------------^ + | | | + | | temporary value created here + | returns a value referencing data owned by the current function -error[E0597]: borrowed value does not live long enough - --> $DIR/issue-27592.rs:16:33 +error[E0515]: cannot return value referencing temporary value + --> $DIR/issue-27592.rs:16:14 | LL | write(|| format_args!("{}", String::from("Hello world"))); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^-- temporary value needs to live until here - | | | - | | temporary value dropped here while still borrowed - | temporary value does not live long enough + | ^^^^^^^^^^^^^----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | | | + | | temporary value created here + | returns a value referencing data owned by the current function error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-27815.stderr b/src/test/ui/issues/issue-27815.stderr index 43f78ccf63..1d68e3bf55 100644 --- a/src/test/ui/issues/issue-27815.stderr +++ b/src/test/ui/issues/issue-27815.stderr @@ -24,4 +24,3 @@ LL | u32 { x: 1 } => {} error: aborting due to 4 previous errors -For more information about this error, try `rustc --explain E0574`. diff --git a/src/test/ui/issues/issue-28344.stderr b/src/test/ui/issues/issue-28344.stderr index fcd98b111c..34ce2358a0 100644 --- a/src/test/ui/issues/issue-28344.stderr +++ b/src/test/ui/issues/issue-28344.stderr @@ -11,7 +11,7 @@ LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8); | ^^^^^ | | | function or associated item not found in `dyn std::ops::BitXor<_>` - | help: did you mean: `bitxor` + | help: there is a method with a similar name: `bitxor` error[E0191]: the value of the associated type `Output` (from the trait `std::ops::BitXor`) must be specified --> $DIR/issue-28344.rs:8:13 @@ -26,9 +26,9 @@ LL | let g = BitXor::bitor; | ^^^^^ | | | function or associated item not found in `dyn std::ops::BitXor<_>` - | help: did you mean: `bitxor` + | help: there is a method with a similar name: `bitxor` error: aborting due to 4 previous errors -Some errors occurred: E0191, E0599. +Some errors have detailed explanations: E0191, E0599. For more information about an error, try `rustc --explain E0191`. diff --git a/src/test/ui/issues/issue-28848.nll.stderr b/src/test/ui/issues/issue-28848.nll.stderr new file mode 100644 index 0000000000..5cf9856e4d --- /dev/null +++ b/src/test/ui/issues/issue-28848.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/issue-28848.rs:10:5 + | +LL | pub fn foo<'a, 'b>(u: &'b ()) -> &'a () { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | Foo::<'a, 'b>::xmute(u) + | ^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'a` + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-28971.rs b/src/test/ui/issues/issue-28971.rs index 3f0d2fafb0..6493565d21 100644 --- a/src/test/ui/issues/issue-28971.rs +++ b/src/test/ui/issues/issue-28971.rs @@ -1,5 +1,3 @@ -// This should not cause an ICE - enum Foo { Bar(u8) } @@ -7,7 +5,7 @@ fn main(){ foo(|| { match Foo::Bar(1) { Foo::Baz(..) => (), - //~^ ERROR no variant named `Baz` found for type `Foo` + //~^ ERROR no variant or associated item named `Baz` found for type `Foo` _ => (), } }); diff --git a/src/test/ui/issues/issue-28971.stderr b/src/test/ui/issues/issue-28971.stderr index 4781f7abe8..7411896443 100644 --- a/src/test/ui/issues/issue-28971.stderr +++ b/src/test/ui/issues/issue-28971.stderr @@ -1,14 +1,14 @@ -error[E0599]: no variant named `Baz` found for type `Foo` in the current scope - --> $DIR/issue-28971.rs:9:18 +error[E0599]: no variant or associated item named `Baz` found for type `Foo` in the current scope + --> $DIR/issue-28971.rs:7:18 | LL | enum Foo { - | -------- variant `Baz` not found here + | -------- variant or associated item `Baz` not found here ... LL | Foo::Baz(..) => (), | ^^^ | | - | variant not found in `Foo` - | help: did you mean: `Bar` + | variant or associated item not found in `Foo` + | help: there is a variant with a similar name: `Bar` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-28992-empty.stderr b/src/test/ui/issues/issue-28992-empty.stderr index 68be37252c..9f9f574aa5 100644 --- a/src/test/ui/issues/issue-28992-empty.stderr +++ b/src/test/ui/issues/issue-28992-empty.stderr @@ -12,5 +12,5 @@ LL | if let S::C2(..) = 0 {} error: aborting due to 2 previous errors -Some errors occurred: E0164, E0532. +Some errors have detailed explanations: E0164, E0532. For more information about an error, try `rustc --explain E0164`. diff --git a/src/test/ui/issues/issue-29161.stderr b/src/test/ui/issues/issue-29161.stderr index 50c257ad6f..d30fd28a4a 100644 --- a/src/test/ui/issues/issue-29161.stderr +++ b/src/test/ui/issues/issue-29161.stderr @@ -12,5 +12,5 @@ LL | a::A::default(); error: aborting due to 2 previous errors -Some errors occurred: E0449, E0603. +Some errors have detailed explanations: E0449, E0603. For more information about an error, try `rustc --explain E0449`. diff --git a/src/test/ui/issues/issue-3021-c.stderr b/src/test/ui/issues/issue-3021-c.stderr index cef30acd60..8764ac8a85 100644 --- a/src/test/ui/issues/issue-3021-c.stderr +++ b/src/test/ui/issues/issue-3021-c.stderr @@ -2,7 +2,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/issue-3021-c.rs:4:24 | LL | fn siphash() { - | - type variable from outer function + | - type parameter from outer function ... LL | fn g(&self, x: T) -> T; | - ^ use of generic parameter from outer function @@ -13,7 +13,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/issue-3021-c.rs:4:30 | LL | fn siphash() { - | - type variable from outer function + | - type parameter from outer function ... LL | fn g(&self, x: T) -> T; | - ^ use of generic parameter from outer function diff --git a/src/test/ui/issues/issue-30236.rs b/src/test/ui/issues/issue-30236.rs index 02f899be09..9c2d855076 100644 --- a/src/test/ui/issues/issue-30236.rs +++ b/src/test/ui/issues/issue-30236.rs @@ -5,4 +5,3 @@ type Foo< fn main() { } - diff --git a/src/test/ui/issues/issue-30240-b.rs b/src/test/ui/issues/issue-30240-b.rs index 2df06842e1..01a6e7d8cb 100644 --- a/src/test/ui/issues/issue-30240-b.rs +++ b/src/test/ui/issues/issue-30240-b.rs @@ -13,4 +13,3 @@ fn main() { _ => {}, } } - diff --git a/src/test/ui/issues/issue-30438-a.nll.stderr b/src/test/ui/issues/issue-30438-a.nll.stderr deleted file mode 100644 index 53845af82f..0000000000 --- a/src/test/ui/issues/issue-30438-a.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0515]: cannot return reference to temporary value - --> $DIR/issue-30438-a.rs:12:16 - | -LL | return &Test { s: &self.s}; - | ^------------------ - | || - | |temporary value created here - | returns a reference to data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-30438-a.rs b/src/test/ui/issues/issue-30438-a.rs index 8900821090..0d4eb796ad 100644 --- a/src/test/ui/issues/issue-30438-a.rs +++ b/src/test/ui/issues/issue-30438-a.rs @@ -10,7 +10,7 @@ impl <'a> Index for Test<'a> { type Output = Test<'a>; fn index(&self, _: usize) -> &Self::Output { return &Test { s: &self.s}; - //~^ ERROR: borrowed value does not live long enough + //~^ ERROR: cannot return reference to temporary value } } diff --git a/src/test/ui/issues/issue-30438-a.stderr b/src/test/ui/issues/issue-30438-a.stderr index 89f8e623dc..53845af82f 100644 --- a/src/test/ui/issues/issue-30438-a.stderr +++ b/src/test/ui/issues/issue-30438-a.stderr @@ -1,21 +1,12 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/issue-30438-a.rs:12:17 +error[E0515]: cannot return reference to temporary value + --> $DIR/issue-30438-a.rs:12:16 | LL | return &Test { s: &self.s}; - | ^^^^^^^^^^^^^^^^^^- temporary value only lives until here - | | - | temporary value does not live long enough - | -note: borrowed value must be valid for the anonymous lifetime #1 defined on the method body at 11:5... - --> $DIR/issue-30438-a.rs:11:5 - | -LL | / fn index(&self, _: usize) -> &Self::Output { -LL | | return &Test { s: &self.s}; -LL | | -LL | | } - | |_____^ - = note: consider using a `let` binding to increase its lifetime + | ^------------------ + | || + | |temporary value created here + | returns a reference to data owned by the current function error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-30438-b.nll.stderr b/src/test/ui/issues/issue-30438-b.nll.stderr deleted file mode 100644 index fd6bd25b1d..0000000000 --- a/src/test/ui/issues/issue-30438-b.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0515]: cannot return reference to temporary value - --> $DIR/issue-30438-b.rs:13:9 - | -LL | &Test { s: &self.s} - | ^------------------ - | || - | |temporary value created here - | returns a reference to data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-30438-b.rs b/src/test/ui/issues/issue-30438-b.rs index b84211bec6..79510cdb66 100644 --- a/src/test/ui/issues/issue-30438-b.rs +++ b/src/test/ui/issues/issue-30438-b.rs @@ -11,7 +11,7 @@ impl <'a> Index for Test<'a> { type Output = Test<'a>; fn index(&self, _: usize) -> &Self::Output { &Test { s: &self.s} - //~^ ERROR: borrowed value does not live long enough + //~^ ERROR: cannot return reference to temporary value } } diff --git a/src/test/ui/issues/issue-30438-b.stderr b/src/test/ui/issues/issue-30438-b.stderr index 49208ed696..fd6bd25b1d 100644 --- a/src/test/ui/issues/issue-30438-b.stderr +++ b/src/test/ui/issues/issue-30438-b.stderr @@ -1,21 +1,12 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/issue-30438-b.rs:13:10 +error[E0515]: cannot return reference to temporary value + --> $DIR/issue-30438-b.rs:13:9 | LL | &Test { s: &self.s} - | ^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | -LL | } - | - temporary value only lives until here - | -note: borrowed value must be valid for the anonymous lifetime #1 defined on the method body at 12:5... - --> $DIR/issue-30438-b.rs:12:5 - | -LL | / fn index(&self, _: usize) -> &Self::Output { -LL | | &Test { s: &self.s} -LL | | -LL | | } - | |_____^ + | ^------------------ + | || + | |temporary value created here + | returns a reference to data owned by the current function error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-30438-c.nll.stderr b/src/test/ui/issues/issue-30438-c.nll.stderr deleted file mode 100644 index 7c00108809..0000000000 --- a/src/test/ui/issues/issue-30438-c.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0515]: cannot return reference to local variable `x` - --> $DIR/issue-30438-c.rs:9:5 - | -LL | &x - | ^^ returns a reference to data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-30438-c.rs b/src/test/ui/issues/issue-30438-c.rs index 75caf0a75d..813c1d3e2c 100644 --- a/src/test/ui/issues/issue-30438-c.rs +++ b/src/test/ui/issues/issue-30438-c.rs @@ -7,7 +7,7 @@ struct Test<'a> { s: &'a str } fn silly<'y, 'z>(_s: &'y Test<'z>) -> &'y as Trait>::Out where 'z: 'static { let x = Test { s: "this cannot last" }; &x - //~^ ERROR: `x` does not live long enough + //~^ ERROR: cannot return reference to local variable `x` } impl<'b> Trait for Test<'b> { type Out = Test<'b>; } diff --git a/src/test/ui/issues/issue-30438-c.stderr b/src/test/ui/issues/issue-30438-c.stderr index a003e27f05..7c00108809 100644 --- a/src/test/ui/issues/issue-30438-c.stderr +++ b/src/test/ui/issues/issue-30438-c.stderr @@ -1,18 +1,9 @@ -error[E0597]: `x` does not live long enough - --> $DIR/issue-30438-c.rs:9:6 +error[E0515]: cannot return reference to local variable `x` + --> $DIR/issue-30438-c.rs:9:5 | LL | &x - | ^ borrowed value does not live long enough -LL | -LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'y as defined on the function body at 7:10... - --> $DIR/issue-30438-c.rs:7:10 - | -LL | fn silly<'y, 'z>(_s: &'y Test<'z>) -> &'y as Trait>::Out where 'z: 'static { - | ^^ + | ^^ returns a reference to data owned by the current function error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-30535.stderr b/src/test/ui/issues/issue-30535.stderr index e3692934b6..5faf037421 100644 --- a/src/test/ui/issues/issue-30535.stderr +++ b/src/test/ui/issues/issue-30535.stderr @@ -9,4 +9,3 @@ LL | _: foo::Foo::FooV error: aborting due to previous error -For more information about this error, try `rustc --explain E0573`. diff --git a/src/test/ui/issues/issue-30560.rs b/src/test/ui/issues/issue-30560.rs index c848a1c51c..d8d4ca608f 100644 --- a/src/test/ui/issues/issue-30560.rs +++ b/src/test/ui/issues/issue-30560.rs @@ -1,10 +1,7 @@ type Alias = (); -use Alias::*; -//~^ ERROR unresolved import `Alias` [E0432] -//~| not a module `Alias` -use std::io::Result::*; -//~^ ERROR unresolved import `std::io::Result` [E0432] -//~| not a module `Result` +use Alias::*; //~ ERROR unresolved import `Alias` [E0432] + +use std::io::Result::*; //~ ERROR unresolved import `std::io::Result` [E0432] trait T {} use T::*; //~ ERROR items in traits are not importable diff --git a/src/test/ui/issues/issue-30560.stderr b/src/test/ui/issues/issue-30560.stderr index 5225f190f9..b74134aacc 100644 --- a/src/test/ui/issues/issue-30560.stderr +++ b/src/test/ui/issues/issue-30560.stderr @@ -1,5 +1,5 @@ error: items in traits are not importable. - --> $DIR/issue-30560.rs:10:5 + --> $DIR/issue-30560.rs:7:5 | LL | use T::*; | ^^^^ @@ -8,13 +8,13 @@ error[E0432]: unresolved import `Alias` --> $DIR/issue-30560.rs:2:5 | LL | use Alias::*; - | ^^^^^ not a module `Alias` + | ^^^^^ `Alias` is a type alias, not a module error[E0432]: unresolved import `std::io::Result` - --> $DIR/issue-30560.rs:5:14 + --> $DIR/issue-30560.rs:4:14 | LL | use std::io::Result::*; - | ^^^^^^ not a module `Result` + | ^^^^^^ `Result` is a type alias, not a module error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-31173.stderr b/src/test/ui/issues/issue-31173.stderr index d5f8cc8f83..3ca8338882 100644 --- a/src/test/ui/issues/issue-31173.stderr +++ b/src/test/ui/issues/issue-31173.stderr @@ -19,5 +19,5 @@ LL | .collect(); error: aborting due to 2 previous errors -Some errors occurred: E0271, E0599. +Some errors have detailed explanations: E0271, E0599. For more information about an error, try `rustc --explain E0271`. diff --git a/src/test/ui/issues/issue-31212.stderr b/src/test/ui/issues/issue-31212.stderr index 5daf900c31..0bb56b361c 100644 --- a/src/test/ui/issues/issue-31212.stderr +++ b/src/test/ui/issues/issue-31212.stderr @@ -12,5 +12,5 @@ LL | foo::f(); error: aborting due to 2 previous errors -Some errors occurred: E0425, E0432. +Some errors have detailed explanations: E0425, E0432. For more information about an error, try `rustc --explain E0425`. diff --git a/src/test/ui/issues/issue-31769.stderr b/src/test/ui/issues/issue-31769.stderr index 29fcefc080..51d1f51d1c 100644 --- a/src/test/ui/issues/issue-31769.stderr +++ b/src/test/ui/issues/issue-31769.stderr @@ -12,5 +12,5 @@ LL | #[repr(C)] fn foo() {} error: aborting due to 2 previous errors -Some errors occurred: E0517, E0518. +Some errors have detailed explanations: E0517, E0518. For more information about an error, try `rustc --explain E0517`. diff --git a/src/test/ui/issues/issue-31910.stderr b/src/test/ui/issues/issue-31910.stderr index c58702da97..e7555b958a 100644 --- a/src/test/ui/issues/issue-31910.stderr +++ b/src/test/ui/issues/issue-31910.stderr @@ -3,6 +3,10 @@ error[E0308]: mismatched types | LL | X = Trait::Number, | ^^^^^^^^^^^^^ expected isize, found i32 +help: you can convert an `i32` to `isize` and panic if the converted value wouldn't fit + | +LL | X = Trait::Number.try_into().unwrap(), + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-3214.stderr b/src/test/ui/issues/issue-3214.stderr index 9c2585688e..02c8da10bb 100644 --- a/src/test/ui/issues/issue-3214.stderr +++ b/src/test/ui/issues/issue-3214.stderr @@ -2,7 +2,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/issue-3214.rs:3:12 | LL | fn foo() { - | --- - type variable from outer function + | --- - type parameter from outer function | | | try adding a local generic parameter in this method instead LL | struct Foo { @@ -17,5 +17,5 @@ LL | impl Drop for Foo { error: aborting due to 2 previous errors -Some errors occurred: E0107, E0401. +Some errors have detailed explanations: E0107, E0401. For more information about an error, try `rustc --explain E0107`. diff --git a/src/test/ui/issues/issue-32655.stderr b/src/test/ui/issues/issue-32655.stderr index 7b3c8e75be..3ab934f6ca 100644 --- a/src/test/ui/issues/issue-32655.stderr +++ b/src/test/ui/issues/issue-32655.stderr @@ -1,4 +1,4 @@ -error[E0658]: The attribute `derive_Clone` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `derive_Clone` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/issue-32655.rs:6:11 | LL | #[derive_Clone] @@ -7,14 +7,16 @@ LL | #[derive_Clone] LL | foo!(); | ------- in this macro invocation | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `derive_Clone` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `derive_Clone` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/issue-32655.rs:18:7 | LL | #[derive_Clone] | ^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-32709.stderr b/src/test/ui/issues/issue-32709.stderr index 9127c75465..04b8c3aa35 100644 --- a/src/test/ui/issues/issue-32709.stderr +++ b/src/test/ui/issues/issue-32709.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `(): std::convert::From<{integer}>` is not satisfied - --> $DIR/issue-32709.rs:4:5 +error[E0277]: `?` couldn't convert the error to `()` + --> $DIR/issue-32709.rs:4:11 | LL | Err(5)?; - | ^^^^^^^ the trait `std::convert::From<{integer}>` is not implemented for `()` + | ^ the trait `std::convert::From<{integer}>` is not implemented for `()` | + = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait = note: required by `std::convert::From::from` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-32829.stderr b/src/test/ui/issues/issue-32829.stderr index 037f5416fa..157c8c85af 100644 --- a/src/test/ui/issues/issue-32829.stderr +++ b/src/test/ui/issues/issue-32829.stderr @@ -1,9 +1,10 @@ -error[E0658]: panicking in statics is unstable (see issue #51999) +error[E0658]: panicking in statics is unstable --> $DIR/issue-32829.rs:1:22 | LL | static S : u64 = { { panic!("foo"); 0 } }; | ^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51999 = help: add #![feature(const_panic)] to the crate attributes to enable = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/issues/issue-32963.stderr b/src/test/ui/issues/issue-32963.stderr index 3e22ea7b28..70fda31317 100644 --- a/src/test/ui/issues/issue-32963.stderr +++ b/src/test/ui/issues/issue-32963.stderr @@ -18,5 +18,5 @@ LL | fn size_of_copy() -> usize { mem::size_of::() } error: aborting due to 2 previous errors -Some errors occurred: E0225, E0277. +Some errors have detailed explanations: E0225, E0277. For more information about an error, try `rustc --explain E0225`. diff --git a/src/test/ui/issues/issue-33140.stderr b/src/test/ui/issues/issue-33140.stderr index 43065a2e2d..dae9e02633 100644 --- a/src/test/ui/issues/issue-33140.stderr +++ b/src/test/ui/issues/issue-33140.stderr @@ -31,5 +31,4 @@ LL | | } error: aborting due to 3 previous errors -Some errors occurred: E0119, E0592. -For more information about an error, try `rustc --explain E0119`. +For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/issues/issue-33264.rs b/src/test/ui/issues/issue-33264.rs index 7cba4df7d8..51608b48be 100644 --- a/src/test/ui/issues/issue-33264.rs +++ b/src/test/ui/issues/issue-33264.rs @@ -27,4 +27,3 @@ impl D32x4 { } fn main() { } - diff --git a/src/test/ui/issues/issue-33287.rs b/src/test/ui/issues/issue-33287.rs index c6e1f4d1eb..cc47e58fcd 100644 --- a/src/test/ui/issues/issue-33287.rs +++ b/src/test/ui/issues/issue-33287.rs @@ -8,4 +8,3 @@ fn test() { } fn main() { } - diff --git a/src/test/ui/issues/issue-33525.stderr b/src/test/ui/issues/issue-33525.stderr index 584b903c2e..f8d703dc3b 100644 --- a/src/test/ui/issues/issue-33525.stderr +++ b/src/test/ui/issues/issue-33525.stderr @@ -18,5 +18,5 @@ LL | "".ipsum; error: aborting due to 3 previous errors -Some errors occurred: E0425, E0609. +Some errors have detailed explanations: E0425, E0609. For more information about an error, try `rustc --explain E0425`. diff --git a/src/test/ui/issues/issue-33819.nll.stderr b/src/test/ui/issues/issue-33819.nll.stderr deleted file mode 100644 index 8bc2d82cd3..0000000000 --- a/src/test/ui/issues/issue-33819.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable - --> $DIR/issue-33819.rs:4:34 - | -LL | Some(ref v) => { let a = &mut v; }, - | ^^^^^^ - | | - | cannot borrow as mutable - | try removing `&mut` here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/issues/issue-33819.rs b/src/test/ui/issues/issue-33819.rs index 7f25ebd18f..b73e85974a 100644 --- a/src/test/ui/issues/issue-33819.rs +++ b/src/test/ui/issues/issue-33819.rs @@ -2,8 +2,7 @@ fn main() { let mut op = Some(2); match op { Some(ref v) => { let a = &mut v; }, - //~^ ERROR:cannot borrow immutable - //~| cannot borrow mutably + //~^ ERROR cannot borrow `v` as mutable, as it is not declared as mutable None => {}, } } diff --git a/src/test/ui/issues/issue-33819.stderr b/src/test/ui/issues/issue-33819.stderr index 09b8835a8a..8bc2d82cd3 100644 --- a/src/test/ui/issues/issue-33819.stderr +++ b/src/test/ui/issues/issue-33819.stderr @@ -1,8 +1,11 @@ -error[E0596]: cannot borrow immutable local variable `v` as mutable - --> $DIR/issue-33819.rs:4:39 +error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable + --> $DIR/issue-33819.rs:4:34 | LL | Some(ref v) => { let a = &mut v; }, - | ^ cannot borrow mutably + | ^^^^^^ + | | + | cannot borrow as mutable + | try removing `&mut` here error: aborting due to previous error diff --git a/src/test/ui/issues/issue-33903.rs b/src/test/ui/issues/issue-33903.rs index 98544aca5f..4fdc8dda8b 100644 --- a/src/test/ui/issues/issue-33903.rs +++ b/src/test/ui/issues/issue-33903.rs @@ -8,4 +8,3 @@ const FOO: i32 = [12, 34][0 + 1]; fn main() {} - diff --git a/src/test/ui/issues/issue-34209.rs b/src/test/ui/issues/issue-34209.rs index 50095be774..fc2c3679e1 100644 --- a/src/test/ui/issues/issue-34209.rs +++ b/src/test/ui/issues/issue-34209.rs @@ -4,8 +4,7 @@ enum S { fn bug(l: S) { match l { - S::B { } => { }, - //~^ ERROR no variant `B` on enum `S` + S::B {} => {}, //~ ERROR no variant `B` in enum `S` } } diff --git a/src/test/ui/issues/issue-34209.stderr b/src/test/ui/issues/issue-34209.stderr index 79aba89c14..194bb2bfab 100644 --- a/src/test/ui/issues/issue-34209.stderr +++ b/src/test/ui/issues/issue-34209.stderr @@ -1,8 +1,11 @@ -error: no variant `B` on enum `S` - --> $DIR/issue-34209.rs:7:9 +error: no variant `B` in enum `S` + --> $DIR/issue-34209.rs:7:12 | -LL | S::B { } => { }, - | ^^^^ help: did you mean: `S::A` +LL | enum S { + | ------ variant `B` not found here +... +LL | S::B {} => {}, + | ^ help: there is a variant with a similar name: `A` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-34334.stderr b/src/test/ui/issues/issue-34334.stderr index 51ea0c6a90..e8386fd8de 100644 --- a/src/test/ui/issues/issue-34334.stderr +++ b/src/test/ui/issues/issue-34334.stderr @@ -43,5 +43,5 @@ LL | let sr2: Vec<(u32, _, _)> = sr.iter().map(|(faction, th_sender, th_rece error: aborting due to 6 previous errors -Some errors occurred: E0070, E0308, E0423, E0599. +Some errors have detailed explanations: E0070, E0308, E0423, E0599. For more information about an error, try `rustc --explain E0070`. diff --git a/src/test/ui/issues/issue-34721.rs b/src/test/ui/issues/issue-34721.rs index 226c21446b..bdc9fe43a8 100644 --- a/src/test/ui/issues/issue-34721.rs +++ b/src/test/ui/issues/issue-34721.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - pub trait Foo { fn zero(self) -> Self; } diff --git a/src/test/ui/issues/issue-34721.stderr b/src/test/ui/issues/issue-34721.stderr index 2ed7b543e7..d5cede990a 100644 --- a/src/test/ui/issues/issue-34721.stderr +++ b/src/test/ui/issues/issue-34721.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `x` - --> $DIR/issue-34721.rs:27:9 + --> $DIR/issue-34721.rs:25:9 | LL | pub fn baz(x: T) -> T { | - - move occurs because `x` has type `T`, which does not implement the `Copy` trait diff --git a/src/test/ui/issues/issue-35675.stderr b/src/test/ui/issues/issue-35675.stderr index 3e4fd5593c..28555a15af 100644 --- a/src/test/ui/issues/issue-35675.stderr +++ b/src/test/ui/issues/issue-35675.stderr @@ -67,5 +67,5 @@ LL | fn qux() -> Some { error: aborting due to 7 previous errors -Some errors occurred: E0412, E0425, E0573. +Some errors have detailed explanations: E0412, E0425. For more information about an error, try `rustc --explain E0412`. diff --git a/src/test/ui/issues/issue-36082.ast.nll.stderr b/src/test/ui/issues/issue-36082.ast.nll.stderr deleted file mode 100644 index 6b3b13aa29..0000000000 --- a/src/test/ui/issues/issue-36082.ast.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/issue-36082.rs:11:19 - | -LL | let val: &_ = x.borrow().0; - | ^^^^^^^^^^ - temporary value is freed at the end of this statement - | | - | creates a temporary which is freed while still in use -... -LL | println!("{}", val); - | --- borrow later used here - | - = note: consider using a `let` binding to create a longer lived value - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/issues/issue-36082.ast.stderr b/src/test/ui/issues/issue-36082.ast.stderr deleted file mode 100644 index 56e50e55ed..0000000000 --- a/src/test/ui/issues/issue-36082.ast.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/issue-36082.rs:11:19 - | -LL | let val: &_ = x.borrow().0; - | ^^^^^^^^^^ - temporary value dropped here while still borrowed - | | - | temporary value does not live long enough -... -LL | } - | - temporary value needs to live until here - | - = note: consider using a `let` binding to increase its lifetime - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/issues/issue-36082.rs b/src/test/ui/issues/issue-36082.rs index 2658ef0dda..a2ff477eb8 100644 --- a/src/test/ui/issues/issue-36082.rs +++ b/src/test/ui/issues/issue-36082.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - use std::cell::RefCell; fn main() { @@ -9,15 +6,10 @@ fn main() { let x = RefCell::new((&mut r,s)); let val: &_ = x.borrow().0; - //[ast]~^ ERROR borrowed value does not live long enough [E0597] - //[ast]~| NOTE temporary value dropped here while still borrowed - //[ast]~| NOTE temporary value does not live long enough - //[ast]~| NOTE consider using a `let` binding to increase its lifetime - //[mir]~^^^^^ ERROR temporary value dropped while borrowed [E0716] - //[mir]~| NOTE temporary value is freed at the end of this statement - //[mir]~| NOTE creates a temporary which is freed while still in use - //[mir]~| NOTE consider using a `let` binding to create a longer lived value + //~^ ERROR temporary value dropped while borrowed [E0716] + //~| NOTE temporary value is freed at the end of this statement + //~| NOTE creates a temporary which is freed while still in use + //~| NOTE consider using a `let` binding to create a longer lived value println!("{}", val); - //[mir]~^ borrow later used here + //~^ borrow later used here } -//[ast]~^ NOTE temporary value needs to live until here diff --git a/src/test/ui/issues/issue-36082.mir.stderr b/src/test/ui/issues/issue-36082.stderr similarity index 94% rename from src/test/ui/issues/issue-36082.mir.stderr rename to src/test/ui/issues/issue-36082.stderr index 6b3b13aa29..26bf4cb1be 100644 --- a/src/test/ui/issues/issue-36082.mir.stderr +++ b/src/test/ui/issues/issue-36082.stderr @@ -1,5 +1,5 @@ error[E0716]: temporary value dropped while borrowed - --> $DIR/issue-36082.rs:11:19 + --> $DIR/issue-36082.rs:8:19 | LL | let val: &_ = x.borrow().0; | ^^^^^^^^^^ - temporary value is freed at the end of this statement diff --git a/src/test/ui/issues/issue-36163.stderr b/src/test/ui/issues/issue-36163.stderr index 4c3f726180..50e8cf6e88 100644 --- a/src/test/ui/issues/issue-36163.stderr +++ b/src/test/ui/issues/issue-36163.stderr @@ -10,7 +10,7 @@ note: ...which requires processing `A`... LL | const A: isize = Foo::B as isize; | ^^^^^^^^^^^^^^^ = note: ...which again requires processing `Foo::B::{{constant}}#0`, completing the cycle -note: cycle used when const-evaluating `Foo::B::{{constant}}#0` +note: cycle used when processing `Foo::B::{{constant}}#0` --> $DIR/issue-36163.rs:4:9 | LL | B = A, diff --git a/src/test/ui/issues/issue-36299.stderr b/src/test/ui/issues/issue-36299.stderr index dce4bd31ca..edbe790a0c 100644 --- a/src/test/ui/issues/issue-36299.stderr +++ b/src/test/ui/issues/issue-36299.stderr @@ -2,7 +2,7 @@ error[E0392]: parameter `'a` is never used --> $DIR/issue-36299.rs:1:12 | LL | struct Foo<'a, A> {} - | ^^ unused type parameter + | ^^ unused parameter | = help: consider removing `'a` or using a marker such as `std::marker::PhantomData` @@ -10,7 +10,7 @@ error[E0392]: parameter `A` is never used --> $DIR/issue-36299.rs:1:16 | LL | struct Foo<'a, A> {} - | ^ unused type parameter + | ^ unused parameter | = help: consider removing `A` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/issues/issue-36400.nll.stderr b/src/test/ui/issues/issue-36400.nll.stderr deleted file mode 100644 index 3b37578f3c..0000000000 --- a/src/test/ui/issues/issue-36400.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0596]: cannot borrow `*x` as mutable, as `x` is not declared as mutable - --> $DIR/issue-36400.rs:5:7 - | -LL | let x = Box::new(3); - | - help: consider changing this to be mutable: `mut x` -LL | f(&mut *x); - | ^^^^^^^ cannot borrow as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/issues/issue-36400.rs b/src/test/ui/issues/issue-36400.rs index 5ba9eb2333..a405f9b113 100644 --- a/src/test/ui/issues/issue-36400.rs +++ b/src/test/ui/issues/issue-36400.rs @@ -2,5 +2,5 @@ fn f(x: &mut u32) {} fn main() { let x = Box::new(3); - f(&mut *x); //~ ERROR cannot borrow immutable + f(&mut *x); //~ ERROR cannot borrow `*x` as mutable, as `x` is not declared as mutable } diff --git a/src/test/ui/issues/issue-36400.stderr b/src/test/ui/issues/issue-36400.stderr index 1494324eea..3b37578f3c 100644 --- a/src/test/ui/issues/issue-36400.stderr +++ b/src/test/ui/issues/issue-36400.stderr @@ -1,10 +1,10 @@ -error[E0596]: cannot borrow immutable `Box` content `*x` as mutable - --> $DIR/issue-36400.rs:5:12 +error[E0596]: cannot borrow `*x` as mutable, as `x` is not declared as mutable + --> $DIR/issue-36400.rs:5:7 | LL | let x = Box::new(3); - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` LL | f(&mut *x); - | ^^ cannot borrow as mutable + | ^^^^^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/issues/issue-36638.stderr b/src/test/ui/issues/issue-36638.stderr index 1713430901..2e44086161 100644 --- a/src/test/ui/issues/issue-36638.stderr +++ b/src/test/ui/issues/issue-36638.stderr @@ -14,7 +14,7 @@ error[E0392]: parameter `Self` is never used --> $DIR/issue-36638.rs:3:12 | LL | struct Foo(Self); - | ^^^^ unused type parameter + | ^^^^ unused parameter | = help: consider removing `Self` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/issues/issue-37534.stderr b/src/test/ui/issues/issue-37534.stderr index fe143540b7..741e93561b 100644 --- a/src/test/ui/issues/issue-37534.stderr +++ b/src/test/ui/issues/issue-37534.stderr @@ -18,11 +18,11 @@ error[E0392]: parameter `T` is never used --> $DIR/issue-37534.rs:1:12 | LL | struct Foo { } - | ^ unused type parameter + | ^ unused parameter | = help: consider removing `T` or using a marker such as `std::marker::PhantomData` error: aborting due to 2 previous errors -Some errors occurred: E0392, E0405. +Some errors have detailed explanations: E0392, E0405. For more information about an error, try `rustc --explain E0392`. diff --git a/src/test/ui/issues/issue-37550.stderr b/src/test/ui/issues/issue-37550.stderr index 41f33a38fb..609043942b 100644 --- a/src/test/ui/issues/issue-37550.stderr +++ b/src/test/ui/issues/issue-37550.stderr @@ -1,9 +1,10 @@ -error[E0723]: function pointers in const fn are unstable (see issue #57563) +error[E0723]: function pointers in const fn are unstable --> $DIR/issue-37550.rs:3:9 | LL | let x = || t; | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/issues/issue-3763.stderr b/src/test/ui/issues/issue-3763.stderr index cc95d221c5..50169286b1 100644 --- a/src/test/ui/issues/issue-3763.stderr +++ b/src/test/ui/issues/issue-3763.stderr @@ -30,5 +30,5 @@ LL | let nope = my_struct.priv_field; error: aborting due to 5 previous errors -Some errors occurred: E0616, E0624. +Some errors have detailed explanations: E0616, E0624. For more information about an error, try `rustc --explain E0616`. diff --git a/src/test/ui/issues/issue-37887.stderr b/src/test/ui/issues/issue-37887.stderr index 24543a5efa..81ec3a5956 100644 --- a/src/test/ui/issues/issue-37887.stderr +++ b/src/test/ui/issues/issue-37887.stderr @@ -4,15 +4,16 @@ error[E0432]: unresolved import `libc` LL | use libc::*; | ^^^^ maybe a missing `extern crate libc;`? -error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? (see issue #27812) +error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? --> $DIR/issue-37887.rs:2:5 | LL | extern crate libc; | ^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/27812 = help: add #![feature(rustc_private)] to the crate attributes to enable error: aborting due to 2 previous errors -Some errors occurred: E0432, E0658. +Some errors have detailed explanations: E0432, E0658. For more information about an error, try `rustc --explain E0432`. diff --git a/src/test/ui/issues/issue-38293.stderr b/src/test/ui/issues/issue-38293.stderr index e0b2fe4fe0..d16d45277c 100644 --- a/src/test/ui/issues/issue-38293.stderr +++ b/src/test/ui/issues/issue-38293.stderr @@ -16,5 +16,5 @@ LL | use bar::baz; error: aborting due to 2 previous errors -Some errors occurred: E0423, E0432. +Some errors have detailed explanations: E0423, E0432. For more information about an error, try `rustc --explain E0423`. diff --git a/src/test/ui/issues/issue-38857.stderr b/src/test/ui/issues/issue-38857.stderr index 9385dc56af..5762e3d6ac 100644 --- a/src/test/ui/issues/issue-38857.stderr +++ b/src/test/ui/issues/issue-38857.stderr @@ -12,5 +12,5 @@ LL | let a = std::sys::imp::process::process_common::StdioPipes { ..panic!() error: aborting due to 2 previous errors -Some errors occurred: E0433, E0603. +Some errors have detailed explanations: E0433, E0603. For more information about an error, try `rustc --explain E0433`. diff --git a/src/test/ui/issues/issue-38940.stderr b/src/test/ui/issues/issue-38940.stderr index d94a7101c0..4851c01a34 100644 --- a/src/test/ui/issues/issue-38940.stderr +++ b/src/test/ui/issues/issue-38940.stderr @@ -17,5 +17,5 @@ LL | let x: &Bottom = &t; error: aborting due to 2 previous errors -Some errors occurred: E0055, E0308. +Some errors have detailed explanations: E0055, E0308. For more information about an error, try `rustc --explain E0055`. diff --git a/src/test/ui/issues/issue-39175.rs b/src/test/ui/issues/issue-39175.rs index 25225ca6e7..3ba2a9d40b 100644 --- a/src/test/ui/issues/issue-39175.rs +++ b/src/test/ui/issues/issue-39175.rs @@ -6,6 +6,7 @@ // ignore-windows // ignore-cloudabi // ignore-emscripten +// ignore-sgx no processes use std::process::Command; // use std::os::unix::process::CommandExt; diff --git a/src/test/ui/issues/issue-39175.stderr b/src/test/ui/issues/issue-39175.stderr index 6aee474fe7..108c969cda 100644 --- a/src/test/ui/issues/issue-39175.stderr +++ b/src/test/ui/issues/issue-39175.stderr @@ -1,5 +1,5 @@ error[E0599]: no method named `exec` found for type `&mut std::process::Command` in the current scope - --> $DIR/issue-39175.rs:14:39 + --> $DIR/issue-39175.rs:15:39 | LL | Command::new("echo").arg("hello").exec(); | ^^^^ diff --git a/src/test/ui/issues/issue-39559-2.stderr b/src/test/ui/issues/issue-39559-2.stderr index 700dbe3647..586debbbe5 100644 --- a/src/test/ui/issues/issue-39559-2.stderr +++ b/src/test/ui/issues/issue-39559-2.stderr @@ -24,5 +24,5 @@ LL | = [0; Dim3::dim()]; error: aborting due to 4 previous errors -Some errors occurred: E0015, E0080. +Some errors have detailed explanations: E0015, E0080. For more information about an error, try `rustc --explain E0015`. diff --git a/src/test/ui/issues/issue-3973.stderr b/src/test/ui/issues/issue-3973.stderr index 576da4bcd3..ee07a410a9 100644 --- a/src/test/ui/issues/issue-3973.stderr +++ b/src/test/ui/issues/issue-3973.stderr @@ -18,5 +18,5 @@ LL | let p = Point::new(0.0, 0.0); error: aborting due to 2 previous errors -Some errors occurred: E0407, E0599. +Some errors have detailed explanations: E0407, E0599. For more information about an error, try `rustc --explain E0407`. diff --git a/src/test/ui/issues/issue-40288.nll.stderr b/src/test/ui/issues/issue-40288.nll.stderr deleted file mode 100644 index fb4ecab362..0000000000 --- a/src/test/ui/issues/issue-40288.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0506]: cannot assign to `*refr` because it is borrowed - --> $DIR/issue-40288.rs:16:5 - | -LL | save_ref(&*refr, &mut out); - | ------ borrow of `*refr` occurs here -... -LL | *refr = 3; - | ^^^^^^^^^ assignment to borrowed `*refr` occurs here -... -LL | println!("{:?}", out[0]); - | ------ borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/issues/issue-40288.stderr b/src/test/ui/issues/issue-40288.stderr index 5e8ad323cc..fb4ecab362 100644 --- a/src/test/ui/issues/issue-40288.stderr +++ b/src/test/ui/issues/issue-40288.stderr @@ -2,10 +2,13 @@ error[E0506]: cannot assign to `*refr` because it is borrowed --> $DIR/issue-40288.rs:16:5 | LL | save_ref(&*refr, &mut out); - | ----- borrow of `*refr` occurs here + | ------ borrow of `*refr` occurs here ... LL | *refr = 3; | ^^^^^^^^^ assignment to borrowed `*refr` occurs here +... +LL | println!("{:?}", out[0]); + | ------ borrow later used here error: aborting due to previous error diff --git a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.nll.stderr b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.nll.stderr deleted file mode 100644 index fbfbc0cb97..0000000000 --- a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/issue-40402-1.rs:9:13 - | -LL | let e = f.v[0]; - | ^^^^^^ - | | - | cannot move out of borrowed content - | help: consider borrowing here: `&f.v[0]` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.rs b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.rs index 6bb0b6f1cf..786c37e596 100644 --- a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.rs +++ b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.rs @@ -6,5 +6,5 @@ struct Foo { fn main() { let mut f = Foo { v: Vec::new() }; f.v.push("hello".to_string()); - let e = f.v[0]; //~ ERROR cannot move out of indexed content + let e = f.v[0]; //~ ERROR cannot move out of borrowed content } diff --git a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.stderr b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.stderr index 5e7be1a310..fbfbc0cb97 100644 --- a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.stderr +++ b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.stderr @@ -1,11 +1,11 @@ -error[E0507]: cannot move out of indexed content +error[E0507]: cannot move out of borrowed content --> $DIR/issue-40402-1.rs:9:13 | LL | let e = f.v[0]; | ^^^^^^ | | - | cannot move out of indexed content - | help: consider using a reference instead: `&f.v[0]` + | cannot move out of borrowed content + | help: consider borrowing here: `&f.v[0]` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.nll.stderr b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.nll.stderr deleted file mode 100644 index 0c4a85b590..0000000000 --- a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.nll.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/issue-40402-2.rs:5:18 - | -LL | let (a, b) = x[0]; - | - - ^^^^ - | | | | - | | | cannot move out of borrowed content - | | | help: consider borrowing here: `&x[0]` - | | ...and here - | data moved here - | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/issue-40402-2.rs:5:10 - | -LL | let (a, b) = x[0]; - | ^ ^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.rs b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.rs index 0b8f40c5ef..480a4df48a 100644 --- a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.rs +++ b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.rs @@ -2,5 +2,5 @@ // are nested within a pattern fn main() { let x = vec![(String::new(), String::new())]; - let (a, b) = x[0]; //~ ERROR cannot move out of indexed content + let (a, b) = x[0]; //~ ERROR cannot move out of borrowed content } diff --git a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.stderr b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.stderr index b672029f71..0c4a85b590 100644 --- a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.stderr +++ b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.stderr @@ -1,11 +1,19 @@ -error[E0507]: cannot move out of indexed content +error[E0507]: cannot move out of borrowed content --> $DIR/issue-40402-2.rs:5:18 | LL | let (a, b) = x[0]; - | - - ^^^^ cannot move out of indexed content - | | | - | | ...and here (use `ref b` or `ref mut b`) - | hint: to prevent move, use `ref a` or `ref mut a` + | - - ^^^^ + | | | | + | | | cannot move out of borrowed content + | | | help: consider borrowing here: `&x[0]` + | | ...and here + | data moved here + | +note: move occurs because these variables have types that don't implement the `Copy` trait + --> $DIR/issue-40402-2.rs:5:10 + | +LL | let (a, b) = x[0]; + | ^ ^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-40510-1.migrate.nll.stderr b/src/test/ui/issues/issue-40510-1.migrate.nll.stderr new file mode 100644 index 0000000000..776a724d31 --- /dev/null +++ b/src/test/ui/issues/issue-40510-1.migrate.nll.stderr @@ -0,0 +1,13 @@ +error: captured variable cannot escape `FnMut` closure body + --> $DIR/issue-40510-1.rs:11:9 + | +LL | || { + | - inferred to be a `FnMut` closure +LL | &mut x + | ^^^^^^ returns a reference to a captured variable which escapes the closure body + | + = note: `FnMut` closures only have access to their captured variables while they are executing... + = note: ...therefore, they cannot allow references to captured variables to escape + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-40510-1.migrate.stderr b/src/test/ui/issues/issue-40510-1.migrate.stderr new file mode 100644 index 0000000000..17d1c48d07 --- /dev/null +++ b/src/test/ui/issues/issue-40510-1.migrate.stderr @@ -0,0 +1,21 @@ +warning: captured variable cannot escape `FnMut` closure body + --> $DIR/issue-40510-1.rs:11:9 + | +LL | || { + | - inferred to be a `FnMut` closure +LL | &mut x + | ^^^^^^ returns a reference to a captured variable which escapes the closure body + | + = note: `FnMut` closures only have access to their captured variables while they are executing... + = note: ...therefore, they cannot allow references to captured variables to escape + = warning: this error has been downgraded to a warning for backwards compatibility with previous releases + = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + +error: compilation successful + --> $DIR/issue-40510-1.rs:20:1 + | +LL | fn main() {} + | ^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-40510-1.nll.stderr b/src/test/ui/issues/issue-40510-1.nll.stderr index 44234cbc88..776a724d31 100644 --- a/src/test/ui/issues/issue-40510-1.nll.stderr +++ b/src/test/ui/issues/issue-40510-1.nll.stderr @@ -1,5 +1,5 @@ -warning: captured variable cannot escape `FnMut` closure body - --> $DIR/issue-40510-1.rs:8:9 +error: captured variable cannot escape `FnMut` closure body + --> $DIR/issue-40510-1.rs:11:9 | LL | || { | - inferred to be a `FnMut` closure @@ -8,6 +8,6 @@ LL | &mut x | = note: `FnMut` closures only have access to their captured variables while they are executing... = note: ...therefore, they cannot allow references to captured variables to escape - = warning: this error has been downgraded to a warning for backwards compatibility with previous releases - = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + +error: aborting due to previous error diff --git a/src/test/ui/issues/issue-40510-1.rs b/src/test/ui/issues/issue-40510-1.rs index dd8a6bc5ab..6ecbeefd88 100644 --- a/src/test/ui/issues/issue-40510-1.rs +++ b/src/test/ui/issues/issue-40510-1.rs @@ -1,13 +1,21 @@ -// compile-pass +#![feature(rustc_attrs)] #![allow(unused)] +// revisions: migrate nll +#![cfg_attr(nll, feature(nll))] + fn f() { let mut x: Box<()> = Box::new(()); || { &mut x }; + //[migrate]~^^ WARNING captured variable cannot escape `FnMut` closure body + //[migrate]~| WARNING this error has been downgraded to a warning + //[migrate]~| WARNING this warning will become a hard error in the future + //[nll]~^^^^^ ERROR captured variable cannot escape `FnMut` closure body } - +#[rustc_error] fn main() {} +//[migrate]~^ ERROR diff --git a/src/test/ui/issues/issue-40510-3.migrate.nll.stderr b/src/test/ui/issues/issue-40510-3.migrate.nll.stderr new file mode 100644 index 0000000000..a49475a857 --- /dev/null +++ b/src/test/ui/issues/issue-40510-3.migrate.nll.stderr @@ -0,0 +1,15 @@ +error: captured variable cannot escape `FnMut` closure body + --> $DIR/issue-40510-3.rs:11:9 + | +LL | || { + | - inferred to be a `FnMut` closure +LL | / || { +LL | | x.push(()) +LL | | } + | |_________^ returns a closure that contains a reference to a captured variable, which then escapes the closure body + | + = note: `FnMut` closures only have access to their captured variables while they are executing... + = note: ...therefore, they cannot allow references to captured variables to escape + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-40510-3.migrate.stderr b/src/test/ui/issues/issue-40510-3.migrate.stderr new file mode 100644 index 0000000000..692aa10537 --- /dev/null +++ b/src/test/ui/issues/issue-40510-3.migrate.stderr @@ -0,0 +1,23 @@ +warning: captured variable cannot escape `FnMut` closure body + --> $DIR/issue-40510-3.rs:11:9 + | +LL | || { + | - inferred to be a `FnMut` closure +LL | / || { +LL | | x.push(()) +LL | | } + | |_________^ returns a closure that contains a reference to a captured variable, which then escapes the closure body + | + = note: `FnMut` closures only have access to their captured variables while they are executing... + = note: ...therefore, they cannot allow references to captured variables to escape + = warning: this error has been downgraded to a warning for backwards compatibility with previous releases + = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + +error: compilation successful + --> $DIR/issue-40510-3.rs:22:1 + | +LL | fn main() {} + | ^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-40510-3.nll.stderr b/src/test/ui/issues/issue-40510-3.nll.stderr index 1297e14189..a49475a857 100644 --- a/src/test/ui/issues/issue-40510-3.nll.stderr +++ b/src/test/ui/issues/issue-40510-3.nll.stderr @@ -1,5 +1,5 @@ -warning: captured variable cannot escape `FnMut` closure body - --> $DIR/issue-40510-3.rs:8:9 +error: captured variable cannot escape `FnMut` closure body + --> $DIR/issue-40510-3.rs:11:9 | LL | || { | - inferred to be a `FnMut` closure @@ -10,6 +10,6 @@ LL | | } | = note: `FnMut` closures only have access to their captured variables while they are executing... = note: ...therefore, they cannot allow references to captured variables to escape - = warning: this error has been downgraded to a warning for backwards compatibility with previous releases - = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + +error: aborting due to previous error diff --git a/src/test/ui/issues/issue-40510-3.rs b/src/test/ui/issues/issue-40510-3.rs index bc95c461d1..205d982363 100644 --- a/src/test/ui/issues/issue-40510-3.rs +++ b/src/test/ui/issues/issue-40510-3.rs @@ -1,6 +1,9 @@ -// compile-pass +#![feature(rustc_attrs)] #![allow(unused)] +// revisions: migrate nll +#![cfg_attr(nll, feature(nll))] + fn f() { let mut x: Vec<()> = Vec::new(); @@ -8,8 +11,13 @@ fn f() { || { x.push(()) } + //[migrate]~^^^ WARNING captured variable cannot escape `FnMut` closure body + //[migrate]~| WARNING this error has been downgraded to a warning + //[migrate]~| WARNING this warning will become a hard error in the future + //[nll]~^^^^^^ ERROR captured variable cannot escape `FnMut` closure body }; } - +#[rustc_error] fn main() {} +//[migrate]~^ ERROR diff --git a/src/test/ui/issues/issue-40782.rs b/src/test/ui/issues/issue-40782.rs index 55fec04e0e..60db19ef91 100644 --- a/src/test/ui/issues/issue-40782.rs +++ b/src/test/ui/issues/issue-40782.rs @@ -2,4 +2,3 @@ fn main() { for i 0..2 { //~ ERROR missing `in` } } - diff --git a/src/test/ui/issues/issue-41139.nll.stderr b/src/test/ui/issues/issue-41139.nll.stderr deleted file mode 100644 index 4dd017b0a9..0000000000 --- a/src/test/ui/issues/issue-41139.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0161]: cannot move a value of type dyn Trait: the size of dyn Trait cannot be statically determined - --> $DIR/issue-41139.rs:6:23 - | -LL | let t : &Trait = &get_function()(); - | ^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0161`. diff --git a/src/test/ui/issues/issue-41139.rs b/src/test/ui/issues/issue-41139.rs index 0bfbea11b0..f3e6c44ecb 100644 --- a/src/test/ui/issues/issue-41139.rs +++ b/src/test/ui/issues/issue-41139.rs @@ -4,5 +4,5 @@ fn get_function<'a>() -> &'a Fn() -> Trait { panic!("") } fn main() { let t : &Trait = &get_function()(); - //~^ ERROR cannot move a value of type (dyn Trait + 'static) + //~^ ERROR cannot move a value of type dyn Trait } diff --git a/src/test/ui/issues/issue-41139.stderr b/src/test/ui/issues/issue-41139.stderr index 3e3de7b7cf..4dd017b0a9 100644 --- a/src/test/ui/issues/issue-41139.stderr +++ b/src/test/ui/issues/issue-41139.stderr @@ -1,4 +1,4 @@ -error[E0161]: cannot move a value of type (dyn Trait + 'static): the size of (dyn Trait + 'static) cannot be statically determined +error[E0161]: cannot move a value of type dyn Trait: the size of dyn Trait cannot be statically determined --> $DIR/issue-41139.rs:6:23 | LL | let t : &Trait = &get_function()(); diff --git a/src/test/ui/issues/issue-41255.rs b/src/test/ui/issues/issue-41255.rs index 395ab8601b..60fdf7c3e8 100644 --- a/src/test/ui/issues/issue-41255.rs +++ b/src/test/ui/issues/issue-41255.rs @@ -9,6 +9,8 @@ fn main() { match x { 5.0 => {}, //~ ERROR floating-point types cannot be used in patterns //~| WARNING hard error + //~| ERROR floating-point types cannot be used in patterns + //~| WARNING this was previously accepted by the compiler but is being 5.0f32 => {}, //~ ERROR floating-point types cannot be used in patterns //~| WARNING hard error -5.0 => {}, //~ ERROR floating-point types cannot be used in patterns diff --git a/src/test/ui/issues/issue-41255.stderr b/src/test/ui/issues/issue-41255.stderr index 9ccfc9a001..c334742cfc 100644 --- a/src/test/ui/issues/issue-41255.stderr +++ b/src/test/ui/issues/issue-41255.stderr @@ -13,7 +13,7 @@ LL | #![forbid(illegal_floating_point_literal_pattern)] = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:12:9 + --> $DIR/issue-41255.rs:14:9 | LL | 5.0f32 => {}, | ^^^^^^ @@ -22,7 +22,7 @@ LL | 5.0f32 => {}, = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:14:10 + --> $DIR/issue-41255.rs:16:10 | LL | -5.0 => {}, | ^^^ @@ -31,7 +31,7 @@ LL | -5.0 => {}, = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:16:9 + --> $DIR/issue-41255.rs:18:9 | LL | 1.0 .. 33.0 => {}, | ^^^ @@ -40,7 +40,7 @@ LL | 1.0 .. 33.0 => {}, = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:16:16 + --> $DIR/issue-41255.rs:18:16 | LL | 1.0 .. 33.0 => {}, | ^^^^ @@ -49,7 +49,7 @@ LL | 1.0 .. 33.0 => {}, = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:20:9 + --> $DIR/issue-41255.rs:22:9 | LL | 39.0 ..= 70.0 => {}, | ^^^^ @@ -58,7 +58,7 @@ LL | 39.0 ..= 70.0 => {}, = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:20:18 + --> $DIR/issue-41255.rs:22:18 | LL | 39.0 ..= 70.0 => {}, | ^^^^ @@ -67,7 +67,7 @@ LL | 39.0 ..= 70.0 => {}, = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:29:10 + --> $DIR/issue-41255.rs:31:10 | LL | (3.14, 1) => {}, | ^^^^ @@ -76,7 +76,7 @@ LL | (3.14, 1) => {}, = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:36:18 + --> $DIR/issue-41255.rs:38:18 | LL | Foo { x: 2.0 } => {}, | ^^^ @@ -84,5 +84,14 @@ LL | Foo { x: 2.0 } => {}, = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #41620 -error: aborting due to 9 previous errors +error: floating-point types cannot be used in patterns + --> $DIR/issue-41255.rs:10:9 + | +LL | 5.0 => {}, + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #41620 + +error: aborting due to 10 previous errors diff --git a/src/test/ui/issues/issue-41394.stderr b/src/test/ui/issues/issue-41394.stderr index 5de5889d81..c8437ab189 100644 --- a/src/test/ui/issues/issue-41394.stderr +++ b/src/test/ui/issues/issue-41394.stderr @@ -16,5 +16,5 @@ LL | A = Foo::A as isize error: aborting due to 2 previous errors -Some errors occurred: E0080, E0369. +Some errors have detailed explanations: E0080, E0369. For more information about an error, try `rustc --explain E0080`. diff --git a/src/test/ui/issues/issue-41726.nll.stderr b/src/test/ui/issues/issue-41726.nll.stderr deleted file mode 100644 index c92753d6e3..0000000000 --- a/src/test/ui/issues/issue-41726.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/issue-41726.rs:5:9 - | -LL | things[src.as_str()].sort(); - | ^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable - | - = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `std::collections::HashMap>` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/issues/issue-41726.rs b/src/test/ui/issues/issue-41726.rs index 41dcaa8e28..ed05629389 100644 --- a/src/test/ui/issues/issue-41726.rs +++ b/src/test/ui/issues/issue-41726.rs @@ -2,6 +2,6 @@ use std::collections::HashMap; fn main() { let things: HashMap> = HashMap::new(); for src in things.keys() { - things[src.as_str()].sort(); //~ ERROR cannot borrow immutable + things[src.as_str()].sort(); //~ ERROR cannot borrow data in a `&` reference as mutable } } diff --git a/src/test/ui/issues/issue-41726.stderr b/src/test/ui/issues/issue-41726.stderr index e29c163b81..c92753d6e3 100644 --- a/src/test/ui/issues/issue-41726.stderr +++ b/src/test/ui/issues/issue-41726.stderr @@ -1,4 +1,4 @@ -error[E0596]: cannot borrow immutable indexed content as mutable +error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/issue-41726.rs:5:9 | LL | things[src.as_str()].sort(); diff --git a/src/test/ui/issues/issue-41974.stderr b/src/test/ui/issues/issue-41974.stderr index 54fa48e8bb..20121878a0 100644 --- a/src/test/ui/issues/issue-41974.stderr +++ b/src/test/ui/issues/issue-41974.stderr @@ -25,5 +25,5 @@ LL | impl Drop for T where T: A { error: aborting due to 3 previous errors -Some errors occurred: E0119, E0120, E0210. +Some errors have detailed explanations: E0119, E0120, E0210. For more information about an error, try `rustc --explain E0119`. diff --git a/src/test/ui/issues/issue-42060.rs b/src/test/ui/issues/issue-42060.rs index da7c03032e..1740b23834 100644 --- a/src/test/ui/issues/issue-42060.rs +++ b/src/test/ui/issues/issue-42060.rs @@ -9,4 +9,3 @@ fn f(){ ::N //~ ERROR attempt to use a non-constant value in a constant //~^ ERROR `typeof` is a reserved keyword but unimplemented [E0516] } - diff --git a/src/test/ui/issues/issue-42060.stderr b/src/test/ui/issues/issue-42060.stderr index 6f42c86e84..72408c7919 100644 --- a/src/test/ui/issues/issue-42060.stderr +++ b/src/test/ui/issues/issue-42060.stderr @@ -24,5 +24,5 @@ LL | ::N error: aborting due to 4 previous errors -Some errors occurred: E0435, E0516. +Some errors have detailed explanations: E0435, E0516. For more information about an error, try `rustc --explain E0435`. diff --git a/src/test/ui/issues/issue-42106.nll.stderr b/src/test/ui/issues/issue-42106.nll.stderr deleted file mode 100644 index d5a9d233bc..0000000000 --- a/src/test/ui/issues/issue-42106.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0502]: cannot borrow `*collection` as mutable because it is also borrowed as immutable - --> $DIR/issue-42106.rs:3:5 - | -LL | let _a = &collection; - | ----------- immutable borrow occurs here -LL | collection.swap(1, 2); - | ^^^^^^^^^^ mutable borrow occurs here -LL | _a.use_ref(); - | -- immutable borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/issues/issue-42106.stderr b/src/test/ui/issues/issue-42106.stderr index 9e3ce9878c..d5a9d233bc 100644 --- a/src/test/ui/issues/issue-42106.stderr +++ b/src/test/ui/issues/issue-42106.stderr @@ -1,13 +1,12 @@ -error[E0502]: cannot borrow `*collection` as mutable because `collection` is also borrowed as immutable +error[E0502]: cannot borrow `*collection` as mutable because it is also borrowed as immutable --> $DIR/issue-42106.rs:3:5 | LL | let _a = &collection; - | ---------- immutable borrow occurs here + | ----------- immutable borrow occurs here LL | collection.swap(1, 2); | ^^^^^^^^^^ mutable borrow occurs here LL | _a.use_ref(); -LL | } - | - immutable borrow ends here + | -- immutable borrow later used here error: aborting due to previous error diff --git a/src/test/ui/issues/issue-42344.nll.stderr b/src/test/ui/issues/issue-42344.nll.stderr deleted file mode 100644 index 5cffa1b512..0000000000 --- a/src/test/ui/issues/issue-42344.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0596]: cannot borrow `*TAB[_]` as mutable, as `TAB` is an immutable static item - --> $DIR/issue-42344.rs:4:5 - | -LL | TAB[0].iter_mut(); - | ^^^^^^ cannot borrow as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/issues/issue-42344.rs b/src/test/ui/issues/issue-42344.rs index 5f1bb4f91b..a7636edf2f 100644 --- a/src/test/ui/issues/issue-42344.rs +++ b/src/test/ui/issues/issue-42344.rs @@ -1,7 +1,8 @@ static TAB: [&mut [u8]; 0] = []; pub unsafe fn test() { - TAB[0].iter_mut(); //~ ERROR cannot borrow data mutably in a `&` reference [E0389] + TAB[0].iter_mut(); + //~^ ERROR cannot borrow `*TAB[_]` as mutable, as `TAB` is an immutable static item [E0596] } pub fn main() {} diff --git a/src/test/ui/issues/issue-42344.stderr b/src/test/ui/issues/issue-42344.stderr index 6bf26c2cf5..5cffa1b512 100644 --- a/src/test/ui/issues/issue-42344.stderr +++ b/src/test/ui/issues/issue-42344.stderr @@ -1,9 +1,9 @@ -error[E0389]: cannot borrow data mutably in a `&` reference +error[E0596]: cannot borrow `*TAB[_]` as mutable, as `TAB` is an immutable static item --> $DIR/issue-42344.rs:4:5 | LL | TAB[0].iter_mut(); - | ^^^^^^ assignment into an immutable reference + | ^^^^^^ cannot borrow as mutable error: aborting due to previous error -For more information about this error, try `rustc --explain E0389`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/issues/issue-42796.nll.stderr b/src/test/ui/issues/issue-42796.nll.stderr deleted file mode 100644 index d9dfbc999f..0000000000 --- a/src/test/ui/issues/issue-42796.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0382]: borrow of moved value: `s` - --> $DIR/issue-42796.rs:18:20 - | -LL | let s = "Hello!".to_owned(); - | - move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait -LL | let mut s_copy = s; - | - value moved here -... -LL | println!("{}", s); - | ^ value borrowed here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/issues/issue-42796.rs b/src/test/ui/issues/issue-42796.rs index 98b91270b7..5e83a1cd67 100644 --- a/src/test/ui/issues/issue-42796.rs +++ b/src/test/ui/issues/issue-42796.rs @@ -15,5 +15,5 @@ fn main() { let mut s_copy = s; s_copy.push_str("World!"); "0wned!".to_owned(); - println!("{}", s); //~ ERROR use of moved value + println!("{}", s); //~ ERROR borrow of moved value } diff --git a/src/test/ui/issues/issue-42796.stderr b/src/test/ui/issues/issue-42796.stderr index d180e6478e..d9dfbc999f 100644 --- a/src/test/ui/issues/issue-42796.stderr +++ b/src/test/ui/issues/issue-42796.stderr @@ -1,13 +1,13 @@ -error[E0382]: use of moved value: `s` +error[E0382]: borrow of moved value: `s` --> $DIR/issue-42796.rs:18:20 | +LL | let s = "Hello!".to_owned(); + | - move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait LL | let mut s_copy = s; - | ---------- value moved here + | - value moved here ... LL | println!("{}", s); - | ^ value used here after move - | - = note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait + | ^ value borrowed here after move error: aborting due to previous error diff --git a/src/test/ui/issues/issue-42944.stderr b/src/test/ui/issues/issue-42944.stderr index 0613be0b3d..ba285953db 100644 --- a/src/test/ui/issues/issue-42944.stderr +++ b/src/test/ui/issues/issue-42944.stderr @@ -16,5 +16,5 @@ LL | use foo::B; error: aborting due to 2 previous errors -Some errors occurred: E0423, E0425. +Some errors have detailed explanations: E0423, E0425. For more information about an error, try `rustc --explain E0423`. diff --git a/src/test/ui/issues/issue-43162.stderr b/src/test/ui/issues/issue-43162.stderr index d3ff9002b9..cd11959ede 100644 --- a/src/test/ui/issues/issue-43162.stderr +++ b/src/test/ui/issues/issue-43162.stderr @@ -26,5 +26,5 @@ LL | break true; error: aborting due to 3 previous errors -Some errors occurred: E0268, E0308. +Some errors have detailed explanations: E0268, E0308. For more information about an error, try `rustc --explain E0268`. diff --git a/src/test/ui/issues/issue-43196.rs b/src/test/ui/issues/issue-43196.rs index 81e5205ce3..0eefa01ce6 100644 --- a/src/test/ui/issues/issue-43196.rs +++ b/src/test/ui/issues/issue-43196.rs @@ -4,4 +4,3 @@ fn main() { //~^ ERROR expected `|`, found `}` | //~^ ERROR expected item, found `|` - diff --git a/src/test/ui/issues/issue-4335.nll.stderr b/src/test/ui/issues/issue-4335.nll.stderr deleted file mode 100644 index 5ac3bdb805..0000000000 --- a/src/test/ui/issues/issue-4335.nll.stderr +++ /dev/null @@ -1,30 +0,0 @@ -error[E0507]: cannot move out of captured variable in an `FnMut` closure - --> $DIR/issue-4335.rs:6:20 - | -LL | fn f<'r, T>(v: &'r T) -> Box T + 'r> { - | - captured outer variable -LL | id(Box::new(|| *v)) - | ^^ cannot move out of captured variable in an `FnMut` closure - -error[E0373]: closure may outlive the current function, but it borrows `v`, which is owned by the current function - --> $DIR/issue-4335.rs:6:17 - | -LL | id(Box::new(|| *v)) - | ^^ - `v` is borrowed here - | | - | may outlive borrowed value `v` - | -note: closure is returned here - --> $DIR/issue-4335.rs:6:5 - | -LL | id(Box::new(|| *v)) - | ^^^^^^^^^^^^^^^^^^^ -help: to force the closure to take ownership of `v` (and any other referenced variables), use the `move` keyword - | -LL | id(Box::new(move || *v)) - | ^^^^^^^ - -error: aborting due to 2 previous errors - -Some errors occurred: E0373, E0507. -For more information about an error, try `rustc --explain E0373`. diff --git a/src/test/ui/issues/issue-4335.stderr b/src/test/ui/issues/issue-4335.stderr index 9ef8e16bbd..1b5cab2492 100644 --- a/src/test/ui/issues/issue-4335.stderr +++ b/src/test/ui/issues/issue-4335.stderr @@ -1,3 +1,11 @@ +error[E0507]: cannot move out of captured variable in an `FnMut` closure + --> $DIR/issue-4335.rs:6:20 + | +LL | fn f<'r, T>(v: &'r T) -> Box T + 'r> { + | - captured outer variable +LL | id(Box::new(|| *v)) + | ^^ cannot move out of captured variable in an `FnMut` closure + error[E0373]: closure may outlive the current function, but it borrows `v`, which is owned by the current function --> $DIR/issue-4335.rs:6:17 | @@ -5,18 +13,18 @@ LL | id(Box::new(|| *v)) | ^^ - `v` is borrowed here | | | may outlive borrowed value `v` + | +note: closure is returned here + --> $DIR/issue-4335.rs:6:5 + | +LL | id(Box::new(|| *v)) + | ^^^^^^^^^^^^^^^^^^^ help: to force the closure to take ownership of `v` (and any other referenced variables), use the `move` keyword | LL | id(Box::new(move || *v)) | ^^^^^^^ -error[E0507]: cannot move out of borrowed content - --> $DIR/issue-4335.rs:6:20 - | -LL | id(Box::new(|| *v)) - | ^^ cannot move out of borrowed content - error: aborting due to 2 previous errors -Some errors occurred: E0373, E0507. +Some errors have detailed explanations: E0373, E0507. For more information about an error, try `rustc --explain E0373`. diff --git a/src/test/ui/issues/issue-43355.rs b/src/test/ui/issues/issue-43355.rs index 809300d6d1..bf819af796 100644 --- a/src/test/ui/issues/issue-43355.rs +++ b/src/test/ui/issues/issue-43355.rs @@ -12,7 +12,6 @@ impl Trait1 for T where T: Trait2 { impl Trait1> for A { //~^ ERROR conflicting implementations of trait -//~| hard error //~| downstream crates may implement trait `Trait2>` for type `A` type Output = i32; } diff --git a/src/test/ui/issues/issue-43355.stderr b/src/test/ui/issues/issue-43355.stderr index 039f10447c..75c69e5b3e 100644 --- a/src/test/ui/issues/issue-43355.stderr +++ b/src/test/ui/issues/issue-43355.stderr @@ -1,4 +1,4 @@ -error: conflicting implementations of trait `Trait1>` for type `A`: (E0119) +error[E0119]: conflicting implementations of trait `Trait1>` for type `A`: --> $DIR/issue-43355.rs:13:1 | LL | impl Trait1 for T where T: Trait2 { @@ -7,10 +7,8 @@ LL | impl Trait1 for T where T: Trait2 { LL | impl Trait1> for A { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `A` | - = note: #[deny(incoherent_fundamental_impls)] on by default - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #46205 = note: downstream crates may implement trait `Trait2>` for type `A` error: aborting due to previous error +For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/issues/issue-4366-2.stderr b/src/test/ui/issues/issue-4366-2.stderr index 76f08d7723..63013a6523 100644 --- a/src/test/ui/issues/issue-4366-2.stderr +++ b/src/test/ui/issues/issue-4366-2.stderr @@ -22,5 +22,5 @@ LL | use m1::foo; error: aborting due to 2 previous errors -Some errors occurred: E0412, E0423. +Some errors have detailed explanations: E0412, E0423. For more information about an error, try `rustc --explain E0412`. diff --git a/src/test/ui/issues/issue-43988.stderr b/src/test/ui/issues/issue-43988.stderr index 6fe41a3de2..c72e3eab85 100644 --- a/src/test/ui/issues/issue-43988.stderr +++ b/src/test/ui/issues/issue-43988.stderr @@ -68,5 +68,5 @@ LL | let _z = #[repr] 1; error: aborting due to 9 previous errors -Some errors occurred: E0517, E0518. +Some errors have detailed explanations: E0517, E0518. For more information about an error, try `rustc --explain E0517`. diff --git a/src/test/ui/issues/issue-44005.rs b/src/test/ui/issues/issue-44005.rs index e2625fd937..f6d1b7073a 100644 --- a/src/test/ui/issues/issue-44005.rs +++ b/src/test/ui/issues/issue-44005.rs @@ -27,4 +27,3 @@ pub fn broken(x: &i32, f: F) { } fn main() { } - diff --git a/src/test/ui/issues/issue-44373-2.rs b/src/test/ui/issues/issue-44373-2.rs index ab92bf458f..18b2ce8512 100644 --- a/src/test/ui/issues/issue-44373-2.rs +++ b/src/test/ui/issues/issue-44373-2.rs @@ -1,6 +1,5 @@ // compile-pass #![allow(dead_code)] -// compile-flags: -Z borrowck=compare struct Foo(bool); diff --git a/src/test/ui/issues/issue-44373.nll.stderr b/src/test/ui/issues/issue-44373.nll.stderr deleted file mode 100644 index 6f92fbb1eb..0000000000 --- a/src/test/ui/issues/issue-44373.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/issue-44373.rs:4:42 - | -LL | let _val: &'static [&'static u32] = &[&FOO]; - | ----------------------- ^^^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'static` -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/issues/issue-44373.rs b/src/test/ui/issues/issue-44373.rs index 13e9fa9ea6..0d011d096b 100644 --- a/src/test/ui/issues/issue-44373.rs +++ b/src/test/ui/issues/issue-44373.rs @@ -1,5 +1,5 @@ static FOO: u32 = 50; fn main() { - let _val: &'static [&'static u32] = &[&FOO]; //~ ERROR borrowed value does not live long enough + let _val: &'static [&'static u32] = &[&FOO]; //~ ERROR temporary value dropped while borrowed } diff --git a/src/test/ui/issues/issue-44373.stderr b/src/test/ui/issues/issue-44373.stderr index c529558339..6f92fbb1eb 100644 --- a/src/test/ui/issues/issue-44373.stderr +++ b/src/test/ui/issues/issue-44373.stderr @@ -1,13 +1,13 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/issue-44373.rs:4:42 | LL | let _val: &'static [&'static u32] = &[&FOO]; - | ^^^^^^ temporary value does not live long enough + | ----------------------- ^^^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'static` LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/issues/issue-45199.ast.nll.stderr b/src/test/ui/issues/issue-45199.ast.nll.stderr deleted file mode 100644 index c6ae7c9514..0000000000 --- a/src/test/ui/issues/issue-45199.ast.nll.stderr +++ /dev/null @@ -1,36 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `b` - --> $DIR/issue-45199.rs:10:5 - | -LL | let b: Box; - | - help: make this binding mutable: `mut b` -... -LL | b = Box::new(1); - | - first assignment to `b` -LL | -LL | b = Box::new(2); - | ^ cannot assign twice to immutable variable - -error[E0384]: cannot assign twice to immutable variable `b` - --> $DIR/issue-45199.rs:21:5 - | -LL | let b = Box::new(1); - | - - | | - | first assignment to `b` - | help: make this binding mutable: `mut b` -... -LL | b = Box::new(2); - | ^ cannot assign twice to immutable variable - -error[E0384]: cannot assign to immutable argument `b` - --> $DIR/issue-45199.rs:30:5 - | -LL | fn test_args(b: Box) { - | - help: make this binding mutable: `mut b` -... -LL | b = Box::new(2); - | ^ cannot assign to immutable argument - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/issues/issue-45199.ast.stderr b/src/test/ui/issues/issue-45199.ast.stderr deleted file mode 100644 index 9dfd8e8213..0000000000 --- a/src/test/ui/issues/issue-45199.ast.stderr +++ /dev/null @@ -1,30 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `b` - --> $DIR/issue-45199.rs:10:5 - | -LL | b = Box::new(1); - | --------------- first assignment to `b` -LL | -LL | b = Box::new(2); - | ^^^^^^^^^^^^^^^ cannot assign twice to immutable variable - -error[E0384]: cannot assign twice to immutable variable `b` - --> $DIR/issue-45199.rs:21:5 - | -LL | let b = Box::new(1); - | - first assignment to `b` -... -LL | b = Box::new(2); - | ^^^^^^^^^^^^^^^ cannot assign twice to immutable variable - -error[E0384]: cannot assign twice to immutable variable `b` - --> $DIR/issue-45199.rs:30:5 - | -LL | fn test_args(b: Box) { - | - first assignment to `b` -... -LL | b = Box::new(2); - | ^^^^^^^^^^^^^^^ cannot assign twice to immutable variable - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/issues/issue-45199.rs b/src/test/ui/issues/issue-45199.rs index bb55534c13..cbd45cbb61 100644 --- a/src/test/ui/issues/issue-45199.rs +++ b/src/test/ui/issues/issue-45199.rs @@ -1,36 +1,24 @@ -// revisions: ast mir -//[mir]compile-flags: -Zborrowck=mir - fn test_drop_replace() { let b: Box; - //[mir]~^ HELP make this binding mutable - //[mir]~| SUGGESTION mut b - b = Box::new(1); //[ast]~ NOTE first assignment - //[mir]~^ NOTE first assignment - b = Box::new(2); //[ast]~ ERROR cannot assign twice to immutable variable - //[mir]~^ ERROR cannot assign twice to immutable variable `b` - //[ast]~| NOTE cannot assign twice to immutable - //[mir]~| NOTE cannot assign twice to immutable + //~^ HELP make this binding mutable + //~| SUGGESTION mut b + b = Box::new(1); //~ NOTE first assignment + b = Box::new(2); //~ ERROR cannot assign twice to immutable variable `b` + //~| NOTE cannot assign twice to immutable } fn test_call() { - let b = Box::new(1); //[ast]~ NOTE first assignment - //[mir]~^ NOTE first assignment - //[mir]~| HELP make this binding mutable - //[mir]~| SUGGESTION mut b - b = Box::new(2); //[ast]~ ERROR cannot assign twice to immutable variable - //[mir]~^ ERROR cannot assign twice to immutable variable `b` - //[ast]~| NOTE cannot assign twice to immutable - //[mir]~| NOTE cannot assign twice to immutable + let b = Box::new(1); //~ NOTE first assignment + //~| HELP make this binding mutable + //~| SUGGESTION mut b + b = Box::new(2); //~ ERROR cannot assign twice to immutable variable `b` + //~| NOTE cannot assign twice to immutable } -fn test_args(b: Box) { //[ast]~ NOTE first assignment - //[mir]~^ HELP make this binding mutable - //[mir]~| SUGGESTION mut b - b = Box::new(2); //[ast]~ ERROR cannot assign twice to immutable variable - //[mir]~^ ERROR cannot assign to immutable argument `b` - //[ast]~| NOTE cannot assign twice to immutable - //[mir]~| NOTE cannot assign to immutable argument +fn test_args(b: Box) { //~ HELP make this binding mutable + //~| SUGGESTION mut b + b = Box::new(2); //~ ERROR cannot assign to immutable argument `b` + //~| NOTE cannot assign to immutable argument } fn main() {} diff --git a/src/test/ui/issues/issue-45199.mir.stderr b/src/test/ui/issues/issue-45199.stderr similarity index 90% rename from src/test/ui/issues/issue-45199.mir.stderr rename to src/test/ui/issues/issue-45199.stderr index c6ae7c9514..83b634051b 100644 --- a/src/test/ui/issues/issue-45199.mir.stderr +++ b/src/test/ui/issues/issue-45199.stderr @@ -1,17 +1,16 @@ error[E0384]: cannot assign twice to immutable variable `b` - --> $DIR/issue-45199.rs:10:5 + --> $DIR/issue-45199.rs:6:5 | LL | let b: Box; | - help: make this binding mutable: `mut b` ... LL | b = Box::new(1); | - first assignment to `b` -LL | LL | b = Box::new(2); | ^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `b` - --> $DIR/issue-45199.rs:21:5 + --> $DIR/issue-45199.rs:14:5 | LL | let b = Box::new(1); | - @@ -23,11 +22,11 @@ LL | b = Box::new(2); | ^ cannot assign twice to immutable variable error[E0384]: cannot assign to immutable argument `b` - --> $DIR/issue-45199.rs:30:5 + --> $DIR/issue-45199.rs:20:5 | LL | fn test_args(b: Box) { | - help: make this binding mutable: `mut b` -... +LL | LL | b = Box::new(2); | ^ cannot assign to immutable argument diff --git a/src/test/ui/issues/issue-45696-long-live-borrows-in-boxes.rs b/src/test/ui/issues/issue-45696-long-live-borrows-in-boxes.rs index 9f86caeaea..b3f655628b 100644 --- a/src/test/ui/issues/issue-45696-long-live-borrows-in-boxes.rs +++ b/src/test/ui/issues/issue-45696-long-live-borrows-in-boxes.rs @@ -1,14 +1,5 @@ // rust-lang/rust#45696: This test is checking that we can return // mutable borrows owned by boxes even when the boxes are dropped. -// -// We will explicitly test AST-borrowck, NLL, and migration modes; -// thus we will also skip the automated compare-mode=nll. - -// revisions: ast nll migrate -// ignore-compare-mode-nll - -#![cfg_attr(nll, feature(nll))] -//[migrate]compile-flags: -Z borrowck=migrate -Z two-phase-borrows // run-pass diff --git a/src/test/ui/issues/issue-45696-no-variant-box-recur.rs b/src/test/ui/issues/issue-45696-no-variant-box-recur.rs index 867da22221..c688261fa1 100644 --- a/src/test/ui/issues/issue-45696-no-variant-box-recur.rs +++ b/src/test/ui/issues/issue-45696-no-variant-box-recur.rs @@ -1,16 +1,10 @@ -// rust-lang/rust#45696: This test checks the compiler won't infinite -// loop when you declare a variable of type `struct A(Box, ...);` -// (which is impossible to construct but *is* possible to declare; see -// also issues #4287, #44933, and #52852). +// rust-lang/rust#45696: This test checks the compiler won't infinite loop when +// you declare a variable of type `struct A(Box, ...);` (which is impossible +// to construct but *is* possible to declare; see also issues #4287, #44933, +// and #52852). // -// We will explicitly test AST-borrowck, NLL, and migration modes; -// thus we will also skip the automated compare-mode=nll. - -// revisions: ast nll migrate -// ignore-compare-mode-nll - -#![cfg_attr(nll, feature(nll))] -//[migrate]compile-flags: -Z borrowck=migrate -Z two-phase-borrows +// We will explicitly test NLL, and migration modes; thus we will also skip the +// automated compare-mode=nll. // run-pass diff --git a/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.ast.stderr b/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.ast.stderr deleted file mode 100644 index 0aaba52d29..0000000000 --- a/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.ast.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: compilation successful - --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:82:1 - | -LL | / fn main() { -LL | | -LL | | let mut x = 1; -LL | | { -... | -LL | | *boxed_boxed_scribbled(Box::new(Box::new(Scribble(&mut x)))) += 10; -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.migrate.stderr b/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.migrate.stderr index f8aab239de..8cc9f1eb2a 100644 --- a/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.migrate.stderr +++ b/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.migrate.stderr @@ -1,5 +1,5 @@ warning[E0713]: borrow may still be in use when destructor runs - --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:53:5 + --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:51:5 | LL | fn scribbled<'a>(s: Scribble<'a>) -> &'a mut u32 { | -- lifetime `'a` defined here @@ -13,7 +13,7 @@ LL | } = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future warning[E0713]: borrow may still be in use when destructor runs - --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:64:5 + --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:62:5 | LL | fn boxed_scribbled<'a>(s: Box>) -> &'a mut u32 { | -- lifetime `'a` defined here @@ -27,7 +27,7 @@ LL | } = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future warning[E0713]: borrow may still be in use when destructor runs - --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:75:5 + --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:73:5 | LL | fn boxed_boxed_scribbled<'a>(s: Box>>) -> &'a mut u32 { | -- lifetime `'a` defined here @@ -41,12 +41,12 @@ LL | } = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future error: compilation successful - --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:82:1 + --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:80:1 | LL | / fn main() { -LL | | LL | | let mut x = 1; LL | | { +LL | | let mut long_lived = Scribble(&mut x); ... | LL | | *boxed_boxed_scribbled(Box::new(Box::new(Scribble(&mut x)))) += 10; LL | | } diff --git a/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.nll.stderr b/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.nll.stderr index bfb58325ec..1b9fb04992 100644 --- a/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.nll.stderr +++ b/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.nll.stderr @@ -1,5 +1,5 @@ error[E0713]: borrow may still be in use when destructor runs - --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:53:5 + --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:51:5 | LL | fn scribbled<'a>(s: Scribble<'a>) -> &'a mut u32 { | -- lifetime `'a` defined here @@ -10,7 +10,7 @@ LL | } | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait error[E0713]: borrow may still be in use when destructor runs - --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:64:5 + --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:62:5 | LL | fn boxed_scribbled<'a>(s: Box>) -> &'a mut u32 { | -- lifetime `'a` defined here @@ -21,7 +21,7 @@ LL | } | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait error[E0713]: borrow may still be in use when destructor runs - --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:75:5 + --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:73:5 | LL | fn boxed_boxed_scribbled<'a>(s: Box>>) -> &'a mut u32 { | -- lifetime `'a` defined here diff --git a/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.rs b/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.rs index fc56a2a8b7..f568efa487 100644 --- a/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.rs +++ b/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.rs @@ -2,21 +2,19 @@ // mutable borrows that would be scribbled over by destructors before // the return occurs. // -// We will explicitly test AST-borrowck, NLL, and migration modes; +// We will explicitly test NLL, and migration modes; // thus we will also skip the automated compare-mode=nll. -// revisions: ast nll migrate +// revisions: nll migrate // ignore-compare-mode-nll -// This test is going to pass in the ast and migrate revisions, -// because the AST-borrowck accepted this code in the past (see notes -// below). So we use `#[rustc_error]` to keep the outcome as an error -// in all scenarios, and rely on the stderr files to show what the -// actual behavior is. (See rust-lang/rust#49855.) +// This test is going to pass in the migrate revision, because the AST-borrowck +// accepted this code in the past (see notes below). So we use `#[rustc_error]` +// to keep the outcome as an error in all scenarios, and rely on the stderr +// files to show what the actual behavior is. (See rust-lang/rust#49855.) #![feature(rustc_attrs)] #![cfg_attr(nll, feature(nll))] -//[migrate]compile-flags: -Z borrowck=migrate -Z two-phase-borrows struct Scribble<'a>(&'a mut u32); @@ -79,8 +77,7 @@ fn boxed_boxed_scribbled<'a>(s: Box>>) -> &'a mut u32 { } #[rustc_error] -fn main() { //[ast]~ ERROR compilation successful - //[migrate]~^ ERROR compilation successful +fn main() { //[migrate]~ ERROR compilation successful let mut x = 1; { let mut long_lived = Scribble(&mut x); diff --git a/src/test/ui/issues/issue-45697-1.rs b/src/test/ui/issues/issue-45697-1.rs index c9b267ca5a..b45f1170b8 100644 --- a/src/test/ui/issues/issue-45697-1.rs +++ b/src/test/ui/issues/issue-45697-1.rs @@ -1,7 +1,7 @@ // Test that assignments to an `&mut` pointer which is found in a // borrowed (but otherwise non-aliasable) location is illegal. -// compile-flags: -Z borrowck=compare -C overflow-checks=on +// compile-flags: -C overflow-checks=on struct S<'a> { pointer: &'a mut isize @@ -18,9 +18,8 @@ fn main() { let mut y = S { pointer: &mut x }; let z = copy_borrowed_ptr(&mut y); *y.pointer += 1; - //~^ ERROR cannot assign to `*y.pointer` because it is borrowed (Ast) [E0506] - //~| ERROR cannot use `*y.pointer` because it was mutably borrowed (Mir) [E0503] - //~| ERROR cannot assign to `*y.pointer` because it is borrowed (Mir) [E0506] + //~^ ERROR cannot use `*y.pointer` because it was mutably borrowed [E0503] + //~| ERROR cannot assign to `*y.pointer` because it is borrowed [E0506] *z.pointer += 1; } } diff --git a/src/test/ui/issues/issue-45697-1.stderr b/src/test/ui/issues/issue-45697-1.stderr index 8d39072060..30c69f1965 100644 --- a/src/test/ui/issues/issue-45697-1.stderr +++ b/src/test/ui/issues/issue-45697-1.stderr @@ -1,12 +1,4 @@ -error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Ast) - --> $DIR/issue-45697-1.rs:20:9 - | -LL | let z = copy_borrowed_ptr(&mut y); - | - borrow of `*y.pointer` occurs here -LL | *y.pointer += 1; - | ^^^^^^^^^^^^^^^ assignment to borrowed `*y.pointer` occurs here - -error[E0503]: cannot use `*y.pointer` because it was mutably borrowed (Mir) +error[E0503]: cannot use `*y.pointer` because it was mutably borrowed --> $DIR/issue-45697-1.rs:20:9 | LL | let z = copy_borrowed_ptr(&mut y); @@ -17,7 +9,7 @@ LL | *y.pointer += 1; LL | *z.pointer += 1; | --------------- borrow later used here -error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Mir) +error[E0506]: cannot assign to `*y.pointer` because it is borrowed --> $DIR/issue-45697-1.rs:20:9 | LL | let z = copy_borrowed_ptr(&mut y); @@ -28,7 +20,7 @@ LL | *y.pointer += 1; LL | *z.pointer += 1; | --------------- borrow later used here -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors -Some errors occurred: E0503, E0506. +Some errors have detailed explanations: E0503, E0506. For more information about an error, try `rustc --explain E0503`. diff --git a/src/test/ui/issues/issue-45697.rs b/src/test/ui/issues/issue-45697.rs index 5bb30432fe..db6d1d8fa2 100644 --- a/src/test/ui/issues/issue-45697.rs +++ b/src/test/ui/issues/issue-45697.rs @@ -1,7 +1,7 @@ // Test that assignments to an `&mut` pointer which is found in a // borrowed (but otherwise non-aliasable) location is illegal. -// compile-flags: -Z borrowck=compare -C overflow-checks=off +// compile-flags: -C overflow-checks=off struct S<'a> { pointer: &'a mut isize @@ -18,9 +18,8 @@ fn main() { let mut y = S { pointer: &mut x }; let z = copy_borrowed_ptr(&mut y); *y.pointer += 1; - //~^ ERROR cannot assign to `*y.pointer` because it is borrowed (Ast) [E0506] - //~| ERROR cannot use `*y.pointer` because it was mutably borrowed (Mir) [E0503] - //~| ERROR cannot assign to `*y.pointer` because it is borrowed (Mir) [E0506] + //~^ ERROR cannot use `*y.pointer` because it was mutably borrowed [E0503] + //~| ERROR cannot assign to `*y.pointer` because it is borrowed [E0506] *z.pointer += 1; } } diff --git a/src/test/ui/issues/issue-45697.stderr b/src/test/ui/issues/issue-45697.stderr index 5085d36feb..26749d36f0 100644 --- a/src/test/ui/issues/issue-45697.stderr +++ b/src/test/ui/issues/issue-45697.stderr @@ -1,12 +1,4 @@ -error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Ast) - --> $DIR/issue-45697.rs:20:9 - | -LL | let z = copy_borrowed_ptr(&mut y); - | - borrow of `*y.pointer` occurs here -LL | *y.pointer += 1; - | ^^^^^^^^^^^^^^^ assignment to borrowed `*y.pointer` occurs here - -error[E0503]: cannot use `*y.pointer` because it was mutably borrowed (Mir) +error[E0503]: cannot use `*y.pointer` because it was mutably borrowed --> $DIR/issue-45697.rs:20:9 | LL | let z = copy_borrowed_ptr(&mut y); @@ -17,7 +9,7 @@ LL | *y.pointer += 1; LL | *z.pointer += 1; | --------------- borrow later used here -error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Mir) +error[E0506]: cannot assign to `*y.pointer` because it is borrowed --> $DIR/issue-45697.rs:20:9 | LL | let z = copy_borrowed_ptr(&mut y); @@ -28,7 +20,7 @@ LL | *y.pointer += 1; LL | *z.pointer += 1; | --------------- borrow later used here -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors -Some errors occurred: E0503, E0506. +Some errors have detailed explanations: E0503, E0506. For more information about an error, try `rustc --explain E0503`. diff --git a/src/test/ui/issues/issue-45730.stderr b/src/test/ui/issues/issue-45730.stderr index 3c400d6eef..4fc1e3835f 100644 --- a/src/test/ui/issues/issue-45730.stderr +++ b/src/test/ui/issues/issue-45730.stderr @@ -30,4 +30,3 @@ LL | let x = 0 as *const i32 as *const _ as *mut _; error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0641`. diff --git a/src/test/ui/issues/issue-45829/import-self.stderr b/src/test/ui/issues/issue-45829/import-self.stderr index 2a7277bd1e..39522cd818 100644 --- a/src/test/ui/issues/issue-45829/import-self.stderr +++ b/src/test/ui/issues/issue-45829/import-self.stderr @@ -41,5 +41,5 @@ LL | use foo::{self as OtherA}; error: aborting due to 4 previous errors -Some errors occurred: E0252, E0255, E0429. +Some errors have detailed explanations: E0252, E0255, E0429. For more information about an error, try `rustc --explain E0252`. diff --git a/src/test/ui/issues/issue-46023.ast.nll.stderr b/src/test/ui/issues/issue-46023.ast.nll.stderr deleted file mode 100644 index 05dbe42732..0000000000 --- a/src/test/ui/issues/issue-46023.ast.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/issue-46023.rs:8:9 - | -LL | let x = 0; - | - help: consider changing this to be mutable: `mut x` -... -LL | x = 1; - | ^^^^^ cannot assign - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/issues/issue-46023.ast.stderr b/src/test/ui/issues/issue-46023.ast.stderr deleted file mode 100644 index ace48f8be6..0000000000 --- a/src/test/ui/issues/issue-46023.ast.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0594]: cannot assign to captured outer variable in an `FnMut` closure - --> $DIR/issue-46023.rs:8:9 - | -LL | let x = 0; - | - help: consider making `x` mutable: `mut x` -... -LL | x = 1; - | ^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/issues/issue-46023.rs b/src/test/ui/issues/issue-46023.rs index a9ecbbeea4..a923eb2442 100644 --- a/src/test/ui/issues/issue-46023.rs +++ b/src/test/ui/issues/issue-46023.rs @@ -1,12 +1,8 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - fn main() { let x = 0; (move || { x = 1; - //[mir]~^ ERROR cannot assign to `x`, as it is not declared as mutable [E0594] - //[ast]~^^ ERROR cannot assign to captured outer variable in an `FnMut` closure [E0594] + //~^ ERROR cannot assign to `x`, as it is not declared as mutable [E0594] })() } diff --git a/src/test/ui/issues/issue-46023.mir.stderr b/src/test/ui/issues/issue-46023.stderr similarity index 72% rename from src/test/ui/issues/issue-46023.mir.stderr rename to src/test/ui/issues/issue-46023.stderr index 05dbe42732..fac696c6fd 100644 --- a/src/test/ui/issues/issue-46023.mir.stderr +++ b/src/test/ui/issues/issue-46023.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/issue-46023.rs:8:9 + --> $DIR/issue-46023.rs:5:9 | LL | let x = 0; | - help: consider changing this to be mutable: `mut x` @@ -9,4 +9,3 @@ LL | x = 1; error: aborting due to previous error -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/issues/issue-46036.rs b/src/test/ui/issues/issue-46036.rs index c517bbe57e..18af33c182 100644 --- a/src/test/ui/issues/issue-46036.rs +++ b/src/test/ui/issues/issue-46036.rs @@ -1,6 +1,5 @@ // Issue 46036: [NLL] false edges on infinite loops // Infinite loops should create false edges to the cleanup block. -#![feature(nll)] struct Foo { x: &'static u32 } diff --git a/src/test/ui/issues/issue-46036.stderr b/src/test/ui/issues/issue-46036.stderr index 9c1746e0fa..49dd0e267b 100644 --- a/src/test/ui/issues/issue-46036.stderr +++ b/src/test/ui/issues/issue-46036.stderr @@ -1,5 +1,5 @@ error[E0597]: `a` does not live long enough - --> $DIR/issue-46036.rs:9:24 + --> $DIR/issue-46036.rs:8:24 | LL | let foo = Foo { x: &a }; | ^^ diff --git a/src/test/ui/issues/issue-46101.stderr b/src/test/ui/issues/issue-46101.stderr index 3ad5383294..772d4bfeb3 100644 --- a/src/test/ui/issues/issue-46101.stderr +++ b/src/test/ui/issues/issue-46101.stderr @@ -10,5 +10,5 @@ error[E0601]: `main` function not found in crate `issue_46101` error: aborting due to 2 previous errors -Some errors occurred: E0433, E0601. +Some errors have detailed explanations: E0433, E0601. For more information about an error, try `rustc --explain E0433`. diff --git a/src/test/ui/issues/issue-46471-1.rs b/src/test/ui/issues/issue-46471-1.rs index 3cf3f35284..aa161d40f7 100644 --- a/src/test/ui/issues/issue-46471-1.rs +++ b/src/test/ui/issues/issue-46471-1.rs @@ -1,11 +1,8 @@ -// compile-flags: -Z borrowck=compare - fn main() { let y = { let mut z = 0; &mut z }; - //~^^ ERROR `z` does not live long enough (Ast) [E0597] - //~| ERROR `z` does not live long enough (Mir) [E0597] + //~^^ ERROR `z` does not live long enough [E0597] println!("{}", y); } diff --git a/src/test/ui/issues/issue-46471-1.stderr b/src/test/ui/issues/issue-46471-1.stderr index 51026c9f2d..b09f31729a 100644 --- a/src/test/ui/issues/issue-46471-1.stderr +++ b/src/test/ui/issues/issue-46471-1.stderr @@ -1,16 +1,5 @@ -error[E0597]: `z` does not live long enough (Ast) - --> $DIR/issue-46471-1.rs:6:14 - | -LL | &mut z - | ^ borrowed value does not live long enough -LL | }; - | - `z` dropped here while still borrowed -... -LL | } - | - borrowed value needs to live until here - -error[E0597]: `z` does not live long enough (Mir) - --> $DIR/issue-46471-1.rs:6:9 +error[E0597]: `z` does not live long enough + --> $DIR/issue-46471-1.rs:4:9 | LL | &mut z | ^^^^^^ @@ -20,6 +9,6 @@ LL | &mut z LL | }; | - `z` dropped here while still borrowed -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/issues/issue-46471.rs b/src/test/ui/issues/issue-46471.rs index 0905c8bb1e..8922005d2f 100644 --- a/src/test/ui/issues/issue-46471.rs +++ b/src/test/ui/issues/issue-46471.rs @@ -1,10 +1,7 @@ -// compile-flags: -Z borrowck=compare - fn foo() -> &'static u32 { let x = 0; &x - //~^ ERROR `x` does not live long enough (Ast) [E0597] - //~| ERROR cannot return reference to local variable `x` (Mir) [E0515] + //~^ ERROR cannot return reference to local variable `x` [E0515] } fn main() { } diff --git a/src/test/ui/issues/issue-46471.stderr b/src/test/ui/issues/issue-46471.stderr index 903b6585e8..935414c1f3 100644 --- a/src/test/ui/issues/issue-46471.stderr +++ b/src/test/ui/issues/issue-46471.stderr @@ -1,21 +1,9 @@ -error[E0597]: `x` does not live long enough (Ast) - --> $DIR/issue-46471.rs:5:6 - | -LL | &x - | ^ borrowed value does not live long enough -... -LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... - -error[E0515]: cannot return reference to local variable `x` (Mir) - --> $DIR/issue-46471.rs:5:5 +error[E0515]: cannot return reference to local variable `x` + --> $DIR/issue-46471.rs:3:5 | LL | &x | ^^ returns a reference to data owned by the current function -error: aborting due to 2 previous errors +error: aborting due to previous error -Some errors occurred: E0515, E0597. -For more information about an error, try `rustc --explain E0515`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-46472.rs b/src/test/ui/issues/issue-46472.rs index 88f97e99ae..b9e20e8dbc 100644 --- a/src/test/ui/issues/issue-46472.rs +++ b/src/test/ui/issues/issue-46472.rs @@ -1,9 +1,6 @@ -// compile-flags: -Z borrowck=compare - fn bar<'a>() -> &'a mut u32 { &mut 4 - //~^ ERROR borrowed value does not live long enough (Ast) [E0597] - //~| ERROR cannot return reference to temporary value (Mir) [E0515] + //~^ ERROR cannot return reference to temporary value [E0515] } fn main() { } diff --git a/src/test/ui/issues/issue-46472.stderr b/src/test/ui/issues/issue-46472.stderr index 2d81fa09cc..6e561e03a8 100644 --- a/src/test/ui/issues/issue-46472.stderr +++ b/src/test/ui/issues/issue-46472.stderr @@ -1,20 +1,5 @@ -error[E0597]: borrowed value does not live long enough (Ast) - --> $DIR/issue-46472.rs:4:10 - | -LL | &mut 4 - | ^ temporary value does not live long enough -... -LL | } - | - temporary value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 3:8... - --> $DIR/issue-46472.rs:3:8 - | -LL | fn bar<'a>() -> &'a mut u32 { - | ^^ - -error[E0515]: cannot return reference to temporary value (Mir) - --> $DIR/issue-46472.rs:4:5 +error[E0515]: cannot return reference to temporary value + --> $DIR/issue-46472.rs:2:5 | LL | &mut 4 | ^^^^^- @@ -22,7 +7,6 @@ LL | &mut 4 | | temporary value created here | returns a reference to data owned by the current function -error: aborting due to 2 previous errors +error: aborting due to previous error -Some errors occurred: E0515, E0597. -For more information about an error, try `rustc --explain E0515`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-46604.ast.nll.stderr b/src/test/ui/issues/issue-46604.ast.nll.stderr deleted file mode 100644 index f43588c3bb..0000000000 --- a/src/test/ui/issues/issue-46604.ast.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0017]: references in statics may only refer to immutable values - --> $DIR/issue-46604.rs:4:25 - | -LL | static buf: &mut [u8] = &mut [1u8,2,3,4,5,7]; - | ^^^^^^^^^^^^^^^^^^^^ statics require immutable values - -error[E0594]: cannot assign to `buf[_]`, as `buf` is an immutable static item - --> $DIR/issue-46604.rs:10:5 - | -LL | buf[0]=2; - | ^^^^^^^^ cannot assign - -error: aborting due to 2 previous errors - -Some errors occurred: E0017, E0594. -For more information about an error, try `rustc --explain E0017`. diff --git a/src/test/ui/issues/issue-46604.ast.stderr b/src/test/ui/issues/issue-46604.ast.stderr deleted file mode 100644 index 2ee1ac2d4d..0000000000 --- a/src/test/ui/issues/issue-46604.ast.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0017]: references in statics may only refer to immutable values - --> $DIR/issue-46604.rs:4:25 - | -LL | static buf: &mut [u8] = &mut [1u8,2,3,4,5,7]; - | ^^^^^^^^^^^^^^^^^^^^ statics require immutable values - -error[E0389]: cannot assign to data in a `&` reference - --> $DIR/issue-46604.rs:10:5 - | -LL | buf[0]=2; - | ^^^^^^^^ assignment into an immutable reference - -error: aborting due to 2 previous errors - -Some errors occurred: E0017, E0389. -For more information about an error, try `rustc --explain E0017`. diff --git a/src/test/ui/issues/issue-46604.rs b/src/test/ui/issues/issue-46604.rs index 34fe3af3ab..4f1ad38dbd 100644 --- a/src/test/ui/issues/issue-46604.rs +++ b/src/test/ui/issues/issue-46604.rs @@ -1,12 +1,7 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - -static buf: &mut [u8] = &mut [1u8,2,3,4,5,7]; //[ast]~ ERROR E0017 - //[mir]~^ ERROR E0017 +static buf: &mut [u8] = &mut [1u8,2,3,4,5,7]; //~ ERROR E0017 fn write>(buffer: T) { } fn main() { write(&buf); - buf[0]=2; //[ast]~ ERROR E0389 - //[mir]~^ ERROR E0594 + buf[0]=2; //~ ERROR E0594 } diff --git a/src/test/ui/issues/issue-46604.mir.stderr b/src/test/ui/issues/issue-46604.stderr similarity index 70% rename from src/test/ui/issues/issue-46604.mir.stderr rename to src/test/ui/issues/issue-46604.stderr index f43588c3bb..961b249dae 100644 --- a/src/test/ui/issues/issue-46604.mir.stderr +++ b/src/test/ui/issues/issue-46604.stderr @@ -1,16 +1,15 @@ error[E0017]: references in statics may only refer to immutable values - --> $DIR/issue-46604.rs:4:25 + --> $DIR/issue-46604.rs:1:25 | LL | static buf: &mut [u8] = &mut [1u8,2,3,4,5,7]; | ^^^^^^^^^^^^^^^^^^^^ statics require immutable values error[E0594]: cannot assign to `buf[_]`, as `buf` is an immutable static item - --> $DIR/issue-46604.rs:10:5 + --> $DIR/issue-46604.rs:6:5 | LL | buf[0]=2; | ^^^^^^^^ cannot assign error: aborting due to 2 previous errors -Some errors occurred: E0017, E0594. -For more information about an error, try `rustc --explain E0017`. +For more information about this error, try `rustc --explain E0017`. diff --git a/src/test/ui/issues/issue-46843.stderr b/src/test/ui/issues/issue-46843.stderr index c252f0d075..b7abf0213b 100644 --- a/src/test/ui/issues/issue-46843.stderr +++ b/src/test/ui/issues/issue-46843.stderr @@ -12,5 +12,5 @@ LL | Thing::This => 1, error: aborting due to 2 previous errors -Some errors occurred: E0015, E0019. +Some errors have detailed explanations: E0015, E0019. For more information about an error, try `rustc --explain E0015`. diff --git a/src/test/ui/issues/issue-46983.rs b/src/test/ui/issues/issue-46983.rs index a5c1e17a58..c1fd7729bd 100644 --- a/src/test/ui/issues/issue-46983.rs +++ b/src/test/ui/issues/issue-46983.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - fn foo(x: &u32) -> &'static u32 { &*x //~^ ERROR explicit lifetime required in the type of `x` [E0621] diff --git a/src/test/ui/issues/issue-46983.stderr b/src/test/ui/issues/issue-46983.stderr index 43d351ec90..8a4a6bdb39 100644 --- a/src/test/ui/issues/issue-46983.stderr +++ b/src/test/ui/issues/issue-46983.stderr @@ -1,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/issue-46983.rs:4:5 + --> $DIR/issue-46983.rs:2:5 | LL | fn foo(x: &u32) -> &'static u32 { | ---- help: add explicit lifetime `'static` to the type of `x`: `&'static u32` diff --git a/src/test/ui/issues/issue-47184.rs b/src/test/ui/issues/issue-47184.rs index 04f1146a8f..2f78ce0002 100644 --- a/src/test/ui/issues/issue-47184.rs +++ b/src/test/ui/issues/issue-47184.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - fn main() { let _vec: Vec<&'static String> = vec![&String::new()]; //~^ ERROR temporary value dropped while borrowed [E0716] diff --git a/src/test/ui/issues/issue-47184.stderr b/src/test/ui/issues/issue-47184.stderr index 2b4d576e72..f97713b4ac 100644 --- a/src/test/ui/issues/issue-47184.stderr +++ b/src/test/ui/issues/issue-47184.stderr @@ -1,5 +1,5 @@ error[E0716]: temporary value dropped while borrowed - --> $DIR/issue-47184.rs:4:44 + --> $DIR/issue-47184.rs:2:44 | LL | let _vec: Vec<&'static String> = vec![&String::new()]; | -------------------- ^^^^^^^^^^^^^ - temporary value is freed at the end of this statement diff --git a/src/test/ui/issues/issue-47377.stderr b/src/test/ui/issues/issue-47377.stderr index 88466131e3..7d11a8c802 100644 --- a/src/test/ui/issues/issue-47377.stderr +++ b/src/test/ui/issues/issue-47377.stderr @@ -4,7 +4,7 @@ error[E0369]: binary operation `+` cannot be applied to type `&str` LL | let _a = b + ", World!"; | - ^ ---------- &str | | | - | | `+` can't be used to concatenate two `&str` strings + | | `+` cannot be used to concatenate two `&str` strings | &str help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | diff --git a/src/test/ui/issues/issue-47380.stderr b/src/test/ui/issues/issue-47380.stderr index d69101eab4..89a154c510 100644 --- a/src/test/ui/issues/issue-47380.stderr +++ b/src/test/ui/issues/issue-47380.stderr @@ -4,7 +4,7 @@ error[E0369]: binary operation `+` cannot be applied to type `&str` LL | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!"; | - ^ ---------- &str | | | - | | `+` can't be used to concatenate two `&str` strings + | | `+` cannot be used to concatenate two `&str` strings | &str help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | diff --git a/src/test/ui/issues/issue-47646.rs b/src/test/ui/issues/issue-47646.rs index c3c07bf641..ace6cdce84 100644 --- a/src/test/ui/issues/issue-47646.rs +++ b/src/test/ui/issues/issue-47646.rs @@ -1,6 +1,3 @@ -#![allow(warnings)] -#![feature(nll)] - use std::collections::BinaryHeap; fn main() { diff --git a/src/test/ui/issues/issue-47646.stderr b/src/test/ui/issues/issue-47646.stderr index db9f227d6b..c0b8763684 100644 --- a/src/test/ui/issues/issue-47646.stderr +++ b/src/test/ui/issues/issue-47646.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `heap` as immutable because it is also borrowed as mutable - --> $DIR/issue-47646.rs:12:30 + --> $DIR/issue-47646.rs:9:30 | LL | let borrow = heap.peek_mut(); | ---- mutable borrow occurs here diff --git a/src/test/ui/issues/issue-47703-1.rs b/src/test/ui/issues/issue-47703-1.rs index 9add314fda..74323317f1 100644 --- a/src/test/ui/issues/issue-47703-1.rs +++ b/src/test/ui/issues/issue-47703-1.rs @@ -1,6 +1,4 @@ // compile-pass -#![allow(dead_code)] -#![feature(nll)] struct AtomicRefMut<'a> { value: &'a mut i32, diff --git a/src/test/ui/issues/issue-47703-tuple.rs b/src/test/ui/issues/issue-47703-tuple.rs index 850771cffd..377eeb67ae 100644 --- a/src/test/ui/issues/issue-47703-tuple.rs +++ b/src/test/ui/issues/issue-47703-tuple.rs @@ -1,6 +1,4 @@ // compile-pass -#![allow(dead_code)] -#![feature(nll)] struct WithDrop; diff --git a/src/test/ui/issues/issue-47703.rs b/src/test/ui/issues/issue-47703.rs index 06b17e931a..22f2a1f364 100644 --- a/src/test/ui/issues/issue-47703.rs +++ b/src/test/ui/issues/issue-47703.rs @@ -1,6 +1,4 @@ // compile-pass -#![allow(dead_code)] -#![feature(nll)] struct MyStruct<'a> { field: &'a mut (), diff --git a/src/test/ui/issues/issue-47722.rs b/src/test/ui/issues/issue-47722.rs index c9bc6147aa..cefc872668 100644 --- a/src/test/ui/issues/issue-47722.rs +++ b/src/test/ui/issues/issue-47722.rs @@ -1,10 +1,8 @@ // compile-pass -#![allow(dead_code)] // Tests that automatic coercions from &mut T to *mut T // allow borrows of T to expire immediately - essentially, that // they work identically to 'foo as *mut T' -#![feature(nll)] struct SelfReference { self_reference: *mut SelfReference, diff --git a/src/test/ui/issues/issue-47789.rs b/src/test/ui/issues/issue-47789.rs index d15a27a2a2..334bd608ad 100644 --- a/src/test/ui/issues/issue-47789.rs +++ b/src/test/ui/issues/issue-47789.rs @@ -1,9 +1,6 @@ // compile-pass -#![allow(dead_code)] #![allow(non_upper_case_globals)] -#![feature(nll)] - static mut x: &'static u32 = &0; fn foo() { diff --git a/src/test/ui/issues/issue-48132.rs b/src/test/ui/issues/issue-48132.rs index b3cef78f3e..ea325ea695 100644 --- a/src/test/ui/issues/issue-48132.rs +++ b/src/test/ui/issues/issue-48132.rs @@ -3,9 +3,6 @@ // run-pass -#![feature(nll)] -#![allow(warnings)] - struct Inner { iterator: I, item: V, diff --git a/src/test/ui/issues/issue-48179.rs b/src/test/ui/issues/issue-48179.rs index 245f13b2b6..90e9858d74 100644 --- a/src/test/ui/issues/issue-48179.rs +++ b/src/test/ui/issues/issue-48179.rs @@ -3,9 +3,6 @@ // run-pass -#![feature(nll)] -#![allow(warnings)] - pub struct Container { value: Option, } diff --git a/src/test/ui/issues/issue-48803.rs b/src/test/ui/issues/issue-48803.rs index bc1bc29c98..f7fd04179f 100644 --- a/src/test/ui/issues/issue-48803.rs +++ b/src/test/ui/issues/issue-48803.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - fn flatten<'a, 'b, T>(x: &'a &'b T) -> &'a T { x } diff --git a/src/test/ui/issues/issue-48803.stderr b/src/test/ui/issues/issue-48803.stderr index 9a6da9e625..2f94039c0c 100644 --- a/src/test/ui/issues/issue-48803.stderr +++ b/src/test/ui/issues/issue-48803.stderr @@ -1,5 +1,5 @@ error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/issue-48803.rs:12:5 + --> $DIR/issue-48803.rs:10:5 | LL | let y = &x; | -- borrow of `x` occurs here diff --git a/src/test/ui/issues/issue-49074.stderr b/src/test/ui/issues/issue-49074.stderr index b41d9130f1..29e10f1bf4 100644 --- a/src/test/ui/issues/issue-49074.stderr +++ b/src/test/ui/issues/issue-49074.stderr @@ -1,9 +1,10 @@ -error[E0658]: The attribute `marco_use` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `marco_use` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/issue-49074.rs:3:3 | LL | #[marco_use] // typo | ^^^^^^^^^ help: a built-in attribute with a similar name exists: `macro_use` | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable error: cannot find macro `bar!` in this scope diff --git a/src/test/ui/issues/issue-49556.rs b/src/test/ui/issues/issue-49556.rs index b8fcc645a5..46d9e749aa 100644 --- a/src/test/ui/issues/issue-49556.rs +++ b/src/test/ui/issues/issue-49556.rs @@ -2,10 +2,10 @@ fn iter<'a>(data: &'a [usize]) -> impl Iterator + 'a { data.iter() .map( - |x| x // fn(&'a usize) -> &'(ReScope) usize + |x| x // fn(&'a usize) -> &'a usize ) .map( - |x| *x // fn(&'(ReScope) usize) -> usize + |x| *x // fn(&'a usize) -> usize ) } diff --git a/src/test/ui/issues/issue-49579.rs b/src/test/ui/issues/issue-49579.rs index 34f277af01..dd7b9eeb8d 100644 --- a/src/test/ui/issues/issue-49579.rs +++ b/src/test/ui/issues/issue-49579.rs @@ -1,8 +1,6 @@ // compile-pass // ignore-emscripten no i128 support -#![feature(nll)] - fn fibs(n: u32) -> impl Iterator { (0 .. n) .scan((0, 1), |st, _| { diff --git a/src/test/ui/issues/issue-49824.nll.stderr b/src/test/ui/issues/issue-49824.nll.stderr index bfa07059c6..9c6f8d4532 100644 --- a/src/test/ui/issues/issue-49824.nll.stderr +++ b/src/test/ui/issues/issue-49824.nll.stderr @@ -1,29 +1,18 @@ -warning: captured variable cannot escape `FnMut` closure body - --> $DIR/issue-49824.rs:12:9 +error: captured variable cannot escape `FnMut` closure body + --> $DIR/issue-49824.rs:10:9 | LL | || { | - inferred to be a `FnMut` closure LL | / || { +LL | | +LL | | +LL | | LL | | let _y = &mut x; LL | | } | |_________^ returns a closure that contains a reference to a captured variable, which then escapes the closure body | = note: `FnMut` closures only have access to their captured variables while they are executing... = note: ...therefore, they cannot allow references to captured variables to escape - = warning: this error has been downgraded to a warning for backwards compatibility with previous releases - = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future - -error: compilation successful - --> $DIR/issue-49824.rs:8:1 - | -LL | / fn main() { -LL | | -LL | | let mut x = 0; -LL | | || { -... | -LL | | }; -LL | | } - | |_^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-49824.rs b/src/test/ui/issues/issue-49824.rs index 58cada5d31..b0d01b3d98 100644 --- a/src/test/ui/issues/issue-49824.rs +++ b/src/test/ui/issues/issue-49824.rs @@ -1,15 +1,16 @@ #![feature(rustc_attrs)] -// This test checks that a failure occurs with NLL but does not fail with the -// legacy AST output. Check issue-49824.nll.stderr for expected compilation error -// output under NLL and #49824 for more information. +// This test checks that a warning occurs with migrate mode. #[rustc_error] fn main() { - //~^ compilation successful + //~^ ERROR compilation successful let mut x = 0; || { || { + //~^ WARNING captured variable cannot escape `FnMut` closure body + //~| WARNING this error has been downgraded to a warning + //~| WARNING this warning will become a hard error in the future let _y = &mut x; } }; diff --git a/src/test/ui/issues/issue-49824.stderr b/src/test/ui/issues/issue-49824.stderr index 4ad537f3eb..c66ee69cb2 100644 --- a/src/test/ui/issues/issue-49824.stderr +++ b/src/test/ui/issues/issue-49824.stderr @@ -1,5 +1,23 @@ +warning: captured variable cannot escape `FnMut` closure body + --> $DIR/issue-49824.rs:10:9 + | +LL | || { + | - inferred to be a `FnMut` closure +LL | / || { +LL | | +LL | | +LL | | +LL | | let _y = &mut x; +LL | | } + | |_________^ returns a closure that contains a reference to a captured variable, which then escapes the closure body + | + = note: `FnMut` closures only have access to their captured variables while they are executing... + = note: ...therefore, they cannot allow references to captured variables to escape + = warning: this error has been downgraded to a warning for backwards compatibility with previous releases + = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + error: compilation successful - --> $DIR/issue-49824.rs:8:1 + --> $DIR/issue-49824.rs:6:1 | LL | / fn main() { LL | | diff --git a/src/test/ui/issues/issue-49851/compiler-builtins-error.rs b/src/test/ui/issues/issue-49851/compiler-builtins-error.rs index 0163da0771..3484ff3b87 100644 --- a/src/test/ui/issues/issue-49851/compiler-builtins-error.rs +++ b/src/test/ui/issues/issue-49851/compiler-builtins-error.rs @@ -8,4 +8,3 @@ #![no_std] extern crate cortex_m; - diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-deref-err.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-deref-err.stderr index 96d6814b0f..333036127e 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/result-deref-err.stderr +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/result-deref-err.stderr @@ -2,7 +2,7 @@ error[E0599]: no method named `deref_err` found for type `std::result::Result<_, --> $DIR/result-deref-err.rs:4:28 | LL | let _result = &Err(41).deref_err(); - | ^^^^^^^^^ help: did you mean: `deref_ok` + | ^^^^^^^^^ help: there is a method with a similar name: `deref_ok` | = note: the method `deref_err` exists but the following trait bounds were not satisfied: `{integer} : std::ops::Deref` diff --git a/src/test/ui/issues/issue-50480.stderr b/src/test/ui/issues/issue-50480.stderr index fb111e87d1..9022bfae50 100644 --- a/src/test/ui/issues/issue-50480.stderr +++ b/src/test/ui/issues/issue-50480.stderr @@ -26,5 +26,5 @@ LL | struct Foo(NotDefined, ::Item, Vec, String); error: aborting due to 3 previous errors -Some errors occurred: E0204, E0277, E0412. +Some errors have detailed explanations: E0204, E0277, E0412. For more information about an error, try `rustc --explain E0204`. diff --git a/src/test/ui/issues/issue-50518.rs b/src/test/ui/issues/issue-50518.rs new file mode 100644 index 0000000000..d776d181b6 --- /dev/null +++ b/src/test/ui/issues/issue-50518.rs @@ -0,0 +1,40 @@ +// compile-pass +use std::marker::PhantomData; + +struct Meta { + value: i32, + type_: PhantomData +} + +trait MetaTrait { + fn get_value(&self) -> i32; +} + +impl MetaTrait for Meta { + fn get_value(&self) -> i32 { self.value } +} + +trait Bar { + fn get_const(&self) -> &dyn MetaTrait; +} + +struct Foo { + _value: A +} + +impl Foo { + const CONST: &'static dyn MetaTrait = &Meta:: { + value: 10, + type_: PhantomData + }; +} + +impl Bar for Foo { + fn get_const(&self) -> &dyn MetaTrait { Self::CONST } +} + +fn main() { + let foo = Foo:: { _value: 10 }; + let bar: &dyn Bar = &foo; + println!("const {}", bar.get_const().get_value()); +} diff --git a/src/test/ui/issues/issue-50576.stderr b/src/test/ui/issues/issue-50576.stderr index 22d978262c..95619eeed9 100644 --- a/src/test/ui/issues/issue-50576.stderr +++ b/src/test/ui/issues/issue-50576.stderr @@ -18,5 +18,5 @@ LL | Vec::<[u8; break]>::new(); error: aborting due to 3 previous errors -Some errors occurred: E0268, E0426. +Some errors have detailed explanations: E0268, E0426. For more information about an error, try `rustc --explain E0268`. diff --git a/src/test/ui/issues/issue-50577.rs b/src/test/ui/issues/issue-50577.rs index f0f1dc6c28..bf892a8daa 100644 --- a/src/test/ui/issues/issue-50577.rs +++ b/src/test/ui/issues/issue-50577.rs @@ -2,5 +2,6 @@ fn main() { enum Foo { Drop = assert_eq!(1, 1) //~^ ERROR if may be missing an else clause + //~| ERROR mismatched types [E0308] } } diff --git a/src/test/ui/issues/issue-50577.stderr b/src/test/ui/issues/issue-50577.stderr index 0c3ba2ea4f..413c8c5c80 100644 --- a/src/test/ui/issues/issue-50577.stderr +++ b/src/test/ui/issues/issue-50577.stderr @@ -1,3 +1,13 @@ +error[E0308]: mismatched types + --> $DIR/issue-50577.rs:3:16 + | +LL | Drop = assert_eq!(1, 1) + | ^^^^^^^^^^^^^^^^ expected isize, found () + | + = note: expected type `isize` + found type `()` + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + error[E0317]: if may be missing an else clause --> $DIR/issue-50577.rs:3:16 | @@ -13,6 +23,7 @@ LL | Drop = assert_eq!(1, 1) = help: consider adding an `else` block that evaluates to the expected type = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) -error: aborting due to previous error +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0317`. +Some errors have detailed explanations: E0308, E0317. +For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/issues/issue-50599.stderr b/src/test/ui/issues/issue-50599.stderr index e0c9bea402..4bd74c3c78 100644 --- a/src/test/ui/issues/issue-50599.stderr +++ b/src/test/ui/issues/issue-50599.stderr @@ -18,5 +18,5 @@ LL | let mut digits = [0u32; M]; error: aborting due to 2 previous errors -Some errors occurred: E0080, E0425. +Some errors have detailed explanations: E0080, E0425. For more information about an error, try `rustc --explain E0080`. diff --git a/src/test/ui/issues/issue-50714-1.rs b/src/test/ui/issues/issue-50714-1.rs index 31de3f3c0a..a25940ce1c 100644 --- a/src/test/ui/issues/issue-50714-1.rs +++ b/src/test/ui/issues/issue-50714-1.rs @@ -9,4 +9,3 @@ extern crate std; fn start(_: isize, _: *const *const u8) -> isize where fn(&()): Eq { //~ ERROR [E0647] 0 } - diff --git a/src/test/ui/issues/issue-50714.rs b/src/test/ui/issues/issue-50714.rs index 3683d4bdac..c571a470ce 100644 --- a/src/test/ui/issues/issue-50714.rs +++ b/src/test/ui/issues/issue-50714.rs @@ -1,4 +1,3 @@ // Regression test for issue 50714, make sure that this isn't a linker error. fn main() where fn(&()): Eq {} //~ ERROR [E0646] - diff --git a/src/test/ui/issues/issue-5100.stderr b/src/test/ui/issues/issue-5100.stderr index 0c1a0289cf..b50d24671a 100644 --- a/src/test/ui/issues/issue-5100.stderr +++ b/src/test/ui/issues/issue-5100.stderr @@ -61,5 +61,5 @@ LL | let x: char = true; error: aborting due to 7 previous errors -Some errors occurred: E0308, E0618. +Some errors have detailed explanations: E0308, E0618. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/issues/issue-51102.stderr b/src/test/ui/issues/issue-51102.stderr index 4d4b977374..eb9eb68020 100644 --- a/src/test/ui/issues/issue-51102.stderr +++ b/src/test/ui/issues/issue-51102.stderr @@ -20,5 +20,5 @@ LL | state: 0 error: aborting due to 3 previous errors -Some errors occurred: E0025, E0026. +Some errors have detailed explanations: E0025, E0026. For more information about an error, try `rustc --explain E0025`. diff --git a/src/test/ui/issues/issue-51244.nll.stderr b/src/test/ui/issues/issue-51244.nll.stderr deleted file mode 100644 index c91083955b..0000000000 --- a/src/test/ui/issues/issue-51244.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0594]: cannot assign to `*my_ref` which is behind a `&` reference - --> $DIR/issue-51244.rs:3:5 - | -LL | let ref my_ref @ _ = 0; - | -------------- help: consider changing this to be a mutable reference: `ref mut my_ref @ _` -LL | *my_ref = 0; - | ^^^^^^^^^^^ `my_ref` is a `&` reference, so the data it refers to cannot be written - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/issues/issue-51244.rs b/src/test/ui/issues/issue-51244.rs index d365181013..509060e1ad 100644 --- a/src/test/ui/issues/issue-51244.rs +++ b/src/test/ui/issues/issue-51244.rs @@ -1,4 +1,4 @@ fn main() { let ref my_ref @ _ = 0; - *my_ref = 0; //~ ERROR cannot assign to immutable borrowed content `*my_ref` [E0594] + *my_ref = 0; //~ ERROR cannot assign to `*my_ref` which is behind a `&` reference [E0594] } diff --git a/src/test/ui/issues/issue-51244.stderr b/src/test/ui/issues/issue-51244.stderr index f798b5f1fc..8a7e71e032 100644 --- a/src/test/ui/issues/issue-51244.stderr +++ b/src/test/ui/issues/issue-51244.stderr @@ -1,11 +1,10 @@ -error[E0594]: cannot assign to immutable borrowed content `*my_ref` +error[E0594]: cannot assign to `*my_ref` which is behind a `&` reference --> $DIR/issue-51244.rs:3:5 | LL | let ref my_ref @ _ = 0; - | -------------- help: use a mutable reference instead: `ref mut my_ref @ _` + | -------------- help: consider changing this to be a mutable reference: `ref mut my_ref @ _` LL | *my_ref = 0; - | ^^^^^^^^^^^ cannot borrow as mutable + | ^^^^^^^^^^^ `my_ref` is a `&` reference, so the data it refers to cannot be written error: aborting due to previous error -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/issues/issue-51279.stderr b/src/test/ui/issues/issue-51279.stderr index bc33eacac9..9dd4a9f238 100644 --- a/src/test/ui/issues/issue-51279.stderr +++ b/src/test/ui/issues/issue-51279.stderr @@ -46,12 +46,13 @@ error: #[cfg] cannot be applied on a generic parameter LL | type Z<#[ignored] 'a, #[cfg(none)] T> = X<'a, T>; | ^^^^^^^^^^^^ -error[E0658]: The attribute `ignored` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `ignored` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/issue-51279.rs:23:8 | LL | type Z<#[ignored] 'a, #[cfg(none)] T> = X<'a, T>; | ^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable error: aborting due to 9 previous errors diff --git a/src/test/ui/issues/issue-51515.rs b/src/test/ui/issues/issue-51515.rs index 64d9822bab..8eab7b2fa3 100644 --- a/src/test/ui/issues/issue-51515.rs +++ b/src/test/ui/issues/issue-51515.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - fn main() { let foo = &16; //~^ HELP consider changing this to be a mutable reference diff --git a/src/test/ui/issues/issue-51515.stderr b/src/test/ui/issues/issue-51515.stderr index bcfed6d3bf..827bb8fe2b 100644 --- a/src/test/ui/issues/issue-51515.stderr +++ b/src/test/ui/issues/issue-51515.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to `*foo` which is behind a `&` reference - --> $DIR/issue-51515.rs:7:5 + --> $DIR/issue-51515.rs:5:5 | LL | let foo = &16; | --- help: consider changing this to be a mutable reference: `&mut 16` @@ -8,7 +8,7 @@ LL | *foo = 32; | ^^^^^^^^^ `foo` is a `&` reference, so the data it refers to cannot be written error[E0594]: cannot assign to `*bar` which is behind a `&` reference - --> $DIR/issue-51515.rs:12:5 + --> $DIR/issue-51515.rs:10:5 | LL | let bar = foo; | --- help: consider changing this to be a mutable reference: `&mut i32` @@ -18,4 +18,3 @@ LL | *bar = 64; error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr b/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr index 8f36a3f961..bf45357147 100644 --- a/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr +++ b/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr @@ -2,7 +2,10 @@ error[E0308]: try expression alternatives have incompatible types --> $DIR/issue-51632-try-desugar-incompatible-types.rs:8:5 | LL | missing_discourses()? - | ^^^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found isize + | ^^^^^^^^^^^^^^^^^^^^- + | | | + | | help: try removing this `?` + | expected enum `std::result::Result`, found isize | = note: expected type `std::result::Result` found type `isize` diff --git a/src/test/ui/issues/issue-51714.rs b/src/test/ui/issues/issue-51714.rs index 4885e4a2db..0dc588d75c 100644 --- a/src/test/ui/issues/issue-51714.rs +++ b/src/test/ui/issues/issue-51714.rs @@ -10,5 +10,4 @@ fn main() { [(); return while let Some(n) = Some(0) {}]; //~^ ERROR return statement outside of function body - //~^^ WARN irrefutable while-let pattern } diff --git a/src/test/ui/issues/issue-51714.stderr b/src/test/ui/issues/issue-51714.stderr index df11f6b7f5..023d9013ab 100644 --- a/src/test/ui/issues/issue-51714.stderr +++ b/src/test/ui/issues/issue-51714.stderr @@ -22,14 +22,6 @@ error[E0572]: return statement outside of function body LL | [(); return while let Some(n) = Some(0) {}]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: irrefutable while-let pattern - --> $DIR/issue-51714.rs:11:17 - | -LL | [(); return while let Some(n) = Some(0) {}]; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: #[warn(irrefutable_let_patterns)] on by default - error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0572`. diff --git a/src/test/ui/issues/issue-51719.rs b/src/test/ui/issues/issue-51719.rs new file mode 100644 index 0000000000..5966edd0bf --- /dev/null +++ b/src/test/ui/issues/issue-51719.rs @@ -0,0 +1,13 @@ +// edition:2018 +// +// Tests that the .await syntax can't be used to make a generator + +#![feature(async_await)] + +async fn foo() {} + +fn make_generator() { + let _gen = || foo.await; //~ ERROR `await` is only allowed inside `async` functions and blocks +} + +fn main() {} diff --git a/src/test/ui/issues/issue-51719.stderr b/src/test/ui/issues/issue-51719.stderr new file mode 100644 index 0000000000..c06165b244 --- /dev/null +++ b/src/test/ui/issues/issue-51719.stderr @@ -0,0 +1,10 @@ +error[E0728]: `await` is only allowed inside `async` functions and blocks + --> $DIR/issue-51719.rs:10:19 + | +LL | let _gen = || foo.await; + | -- ^^^^^^^^^ only allowed inside `async` functions and blocks + | | + | this is not `async` + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-51751.rs b/src/test/ui/issues/issue-51751.rs new file mode 100644 index 0000000000..7afd7ecc82 --- /dev/null +++ b/src/test/ui/issues/issue-51751.rs @@ -0,0 +1,13 @@ +// edition:2018 + +#![feature(async_await)] + +async fn inc(limit: i64) -> i64 { + limit + 1 +} + +fn main() { + let result = inc(10000); + let finished = result.await; + //~^ ERROR `await` is only allowed inside `async` functions and blocks +} diff --git a/src/test/ui/issues/issue-51751.stderr b/src/test/ui/issues/issue-51751.stderr new file mode 100644 index 0000000000..97b63d1590 --- /dev/null +++ b/src/test/ui/issues/issue-51751.stderr @@ -0,0 +1,11 @@ +error[E0728]: `await` is only allowed inside `async` functions and blocks + --> $DIR/issue-51751.rs:11:20 + | +LL | fn main() { + | ---- this is not `async` +LL | let result = inc(10000); +LL | let finished = result.await; + | ^^^^^^^^^^^^ only allowed inside `async` functions and blocks + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-52023-array-size-pointer-cast.stderr b/src/test/ui/issues/issue-52023-array-size-pointer-cast.stderr index 60e0792954..f8c3016e3a 100644 --- a/src/test/ui/issues/issue-52023-array-size-pointer-cast.stderr +++ b/src/test/ui/issues/issue-52023-array-size-pointer-cast.stderr @@ -1,9 +1,10 @@ -error[E0658]: casting pointers to integers in constants is unstable (see issue #51910) +error[E0658]: casting pointers to integers in constants is unstable --> $DIR/issue-52023-array-size-pointer-cast.rs:2:17 | LL | let _ = [0; (&0 as *const i32) as usize]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/51910 = help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable error[E0080]: it is undefined behavior to use this value @@ -16,5 +17,5 @@ LL | let _ = [0; (&0 as *const i32) as usize]; error: aborting due to 2 previous errors -Some errors occurred: E0080, E0658. +Some errors have detailed explanations: E0080, E0658. For more information about an error, try `rustc --explain E0080`. diff --git a/src/test/ui/issues/issue-52049.nll.stderr b/src/test/ui/issues/issue-52049.nll.stderr deleted file mode 100644 index 55929d85da..0000000000 --- a/src/test/ui/issues/issue-52049.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/issue-52049.rs:6:10 - | -LL | foo(&unpromotable(5u32)); - | -----^^^^^^^^^^^^^^^^^^- - | | | - | | creates a temporary which is freed while still in use - | argument requires that borrow lasts for `'static` -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/issues/issue-52049.rs b/src/test/ui/issues/issue-52049.rs index 23b21cf4e6..efdcc44930 100644 --- a/src/test/ui/issues/issue-52049.rs +++ b/src/test/ui/issues/issue-52049.rs @@ -5,4 +5,4 @@ fn unpromotable(t: T) -> T { t } fn main() { foo(&unpromotable(5u32)); } -//~^^ ERROR borrowed value does not live long enough +//~^^ ERROR temporary value dropped while borrowed diff --git a/src/test/ui/issues/issue-52049.stderr b/src/test/ui/issues/issue-52049.stderr index 45381765f8..55929d85da 100644 --- a/src/test/ui/issues/issue-52049.stderr +++ b/src/test/ui/issues/issue-52049.stderr @@ -1,13 +1,14 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/issue-52049.rs:6:10 | LL | foo(&unpromotable(5u32)); - | ^^^^^^^^^^^^^^^^^^ - temporary value only lives until here - | | - | temporary value does not live long enough - | - = note: borrowed value must be valid for the static lifetime... + | -----^^^^^^^^^^^^^^^^^^- + | | | + | | creates a temporary which is freed while still in use + | argument requires that borrow lasts for `'static` +LL | } + | - temporary value is freed at the end of this statement error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/issues/issue-52057.rs b/src/test/ui/issues/issue-52057.rs index 356efd5dfe..911983445e 100644 --- a/src/test/ui/issues/issue-52057.rs +++ b/src/test/ui/issues/issue-52057.rs @@ -4,8 +4,6 @@ // // run-pass -#![feature(nll)] - pub trait Parser { type Input; diff --git a/src/test/ui/issues/issue-52126-assign-op-invariance.nll.stderr b/src/test/ui/issues/issue-52126-assign-op-invariance.nll.stderr deleted file mode 100644 index d231f621e5..0000000000 --- a/src/test/ui/issues/issue-52126-assign-op-invariance.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0597]: `line` does not live long enough - --> $DIR/issue-52126-assign-op-invariance.rs:34:28 - | -LL | let v: Vec<&str> = line.split_whitespace().collect(); - | ^^^^ borrowed value does not live long enough -... -LL | acc += cnt2; - | --- borrow later used here -... -LL | } - | - `line` dropped here while still borrowed - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/issues/issue-52126-assign-op-invariance.stderr b/src/test/ui/issues/issue-52126-assign-op-invariance.stderr index b07b8d5281..d231f621e5 100644 --- a/src/test/ui/issues/issue-52126-assign-op-invariance.stderr +++ b/src/test/ui/issues/issue-52126-assign-op-invariance.stderr @@ -4,10 +4,11 @@ error[E0597]: `line` does not live long enough LL | let v: Vec<&str> = line.split_whitespace().collect(); | ^^^^ borrowed value does not live long enough ... +LL | acc += cnt2; + | --- borrow later used here +... LL | } | - `line` dropped here while still borrowed -LL | } - | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/issues/issue-52213.nll.stderr b/src/test/ui/issues/issue-52213.nll.stderr new file mode 100644 index 0000000000..eba875de21 --- /dev/null +++ b/src/test/ui/issues/issue-52213.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/issue-52213.rs:3:20 + | +LL | fn transmute_lifetime<'a, 'b, T>(t: &'a (T,)) -> &'b T { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | match (&t,) { +LL | ((u,),) => u, + | ^ returning this value requires that `'a` must outlive `'b` + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-52213.stderr b/src/test/ui/issues/issue-52213.stderr index 8d74b8ecb8..b4df10efc5 100644 --- a/src/test/ui/issues/issue-52213.stderr +++ b/src/test/ui/issues/issue-52213.stderr @@ -25,4 +25,3 @@ LL | ((u,),) => u, error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/issues/issue-52240.nll.stderr b/src/test/ui/issues/issue-52240.nll.stderr deleted file mode 100644 index 69b663b17d..0000000000 --- a/src/test/ui/issues/issue-52240.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/issue-52240.rs:9:27 - | -LL | if let (Some(Foo::Bar(ref mut val)), _) = (&arr.get(0), 0) { - | ^^^^^^^^^^^ cannot borrow as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/issues/issue-52240.rs b/src/test/ui/issues/issue-52240.rs index 9ac7e9905d..5def557789 100644 --- a/src/test/ui/issues/issue-52240.rs +++ b/src/test/ui/issues/issue-52240.rs @@ -7,7 +7,7 @@ enum Foo { fn main() { let arr = vec!(Foo::Bar(0)); if let (Some(Foo::Bar(ref mut val)), _) = (&arr.get(0), 0) { - //~^ ERROR cannot borrow field of immutable binding as mutable + //~^ ERROR cannot borrow data in a `&` reference as mutable *val = 9001; } match arr[0] { diff --git a/src/test/ui/issues/issue-52240.stderr b/src/test/ui/issues/issue-52240.stderr index c2c2524816..69b663b17d 100644 --- a/src/test/ui/issues/issue-52240.stderr +++ b/src/test/ui/issues/issue-52240.stderr @@ -1,8 +1,8 @@ -error[E0596]: cannot borrow field of immutable binding as mutable +error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/issue-52240.rs:9:27 | LL | if let (Some(Foo::Bar(ref mut val)), _) = (&arr.get(0), 0) { - | ^^^^^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/issues/issue-52533-1.nll.stderr b/src/test/ui/issues/issue-52533-1.nll.stderr new file mode 100644 index 0000000000..20f19b2596 --- /dev/null +++ b/src/test/ui/issues/issue-52533-1.nll.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/issue-52533-1.rs:9:18 + | +LL | gimme(|x, y| y) + | - - ^ closure was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` + | | | + | | has type `&Foo<'_, '1, u32>` + | has type `&Foo<'_, '2, u32>` + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-52533.nll.stderr b/src/test/ui/issues/issue-52533.nll.stderr new file mode 100644 index 0000000000..c764736d79 --- /dev/null +++ b/src/test/ui/issues/issue-52533.nll.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/issue-52533.rs:5:16 + | +LL | foo(|a, b| b) + | - - ^ closure was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` + | | | + | | has type `&'1 u32` + | has type `&'2 u32` + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-52533.stderr b/src/test/ui/issues/issue-52533.stderr index 5865480020..1ed740c421 100644 --- a/src/test/ui/issues/issue-52533.stderr +++ b/src/test/ui/issues/issue-52533.stderr @@ -17,4 +17,3 @@ LL | foo(|a, b| b) error: aborting due to previous error -For more information about this error, try `rustc --explain E0312`. diff --git a/src/test/ui/issues/issue-52891.stderr b/src/test/ui/issues/issue-52891.stderr index 9173c02bcd..6e6e42ddc2 100644 --- a/src/test/ui/issues/issue-52891.stderr +++ b/src/test/ui/issues/issue-52891.stderr @@ -127,5 +127,5 @@ LL | use issue_52891::n; error: aborting due to 10 previous errors -Some errors occurred: E0252, E0254. +Some errors have detailed explanations: E0252, E0254. For more information about an error, try `rustc --explain E0252`. diff --git a/src/test/ui/issues/issue-52992.rs b/src/test/ui/issues/issue-52992.rs index 0fdf077d2f..c58656330e 100644 --- a/src/test/ui/issues/issue-52992.rs +++ b/src/test/ui/issues/issue-52992.rs @@ -4,8 +4,6 @@ // // compile-pass -#![feature(nll)] - fn main() {} fn fail<'a>() -> Struct<'a, Generic<()>> { diff --git a/src/test/ui/issues/issue-53419.rs b/src/test/ui/issues/issue-53419.rs index fc2a926f90..52149cf486 100644 --- a/src/test/ui/issues/issue-53419.rs +++ b/src/test/ui/issues/issue-53419.rs @@ -6,4 +6,3 @@ struct Foo { fn main() { } - diff --git a/src/test/ui/issues/issue-53498.rs b/src/test/ui/issues/issue-53498.rs new file mode 100644 index 0000000000..c87d423649 --- /dev/null +++ b/src/test/ui/issues/issue-53498.rs @@ -0,0 +1,17 @@ +pub mod test { + pub struct A; + pub struct B; + pub struct Foo(T); + + impl Foo { + fn foo() {} + } + + impl Foo { + fn foo() {} + } +} + +fn main() { + test::Foo::::foo(); //~ ERROR method `foo` is private +} diff --git a/src/test/ui/issues/issue-53498.stderr b/src/test/ui/issues/issue-53498.stderr new file mode 100644 index 0000000000..3fd48233da --- /dev/null +++ b/src/test/ui/issues/issue-53498.stderr @@ -0,0 +1,9 @@ +error[E0624]: method `foo` is private + --> $DIR/issue-53498.rs:16:5 + | +LL | test::Foo::::foo(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0624`. diff --git a/src/test/ui/issues/issue-53568.rs b/src/test/ui/issues/issue-53568.rs index 60a6e16492..4d3b3f80a9 100644 --- a/src/test/ui/issues/issue-53568.rs +++ b/src/test/ui/issues/issue-53568.rs @@ -3,9 +3,6 @@ // // compile-pass -#![feature(nll)] -#![allow(dead_code)] - trait Future { type Item; } @@ -48,4 +45,3 @@ where H: Fn() + Copy } fn main() { } - diff --git a/src/test/ui/issues/issue-53787-inline-assembler-macro.stderr b/src/test/ui/issues/issue-53787-inline-assembler-macro.stderr index 047ba341cf..7edf235652 100644 --- a/src/test/ui/issues/issue-53787-inline-assembler-macro.stderr +++ b/src/test/ui/issues/issue-53787-inline-assembler-macro.stderr @@ -6,4 +6,3 @@ LL | fake_jump!("FirstFunc"); error: aborting due to previous error -For more information about this error, try `rustc --explain E0669`. diff --git a/src/test/ui/issues/issue-54302-cases.nll.stderr b/src/test/ui/issues/issue-54302-cases.nll.stderr new file mode 100644 index 0000000000..7463a3f286 --- /dev/null +++ b/src/test/ui/issues/issue-54302-cases.nll.stderr @@ -0,0 +1,26 @@ +error: higher-ranked subtype error + --> $DIR/issue-54302-cases.rs:63:5 + | +LL | >::ref_foo(a) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: higher-ranked subtype error + --> $DIR/issue-54302-cases.rs:69:5 + | +LL | >::ref_foo(a) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: higher-ranked subtype error + --> $DIR/issue-54302-cases.rs:75:5 + | +LL | >::ref_foo(a) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: higher-ranked subtype error + --> $DIR/issue-54302-cases.rs:81:5 + | +LL | >::ref_foo(a) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 4 previous errors + diff --git a/src/test/ui/issues/issue-54302.nll.stderr b/src/test/ui/issues/issue-54302.nll.stderr new file mode 100644 index 0000000000..e68de03128 --- /dev/null +++ b/src/test/ui/issues/issue-54302.nll.stderr @@ -0,0 +1,8 @@ +error: higher-ranked subtype error + --> $DIR/issue-54302.rs:13:5 + | +LL | assert_deserialize_owned::<&'static str>(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-54943-1.rs b/src/test/ui/issues/issue-54943-1.rs index 7750e34036..8d3a4e72de 100644 --- a/src/test/ui/issues/issue-54943-1.rs +++ b/src/test/ui/issues/issue-54943-1.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - // This test is a minimal version of an ICE in the dropck-eyepatch tests // found in the fix for #54943. diff --git a/src/test/ui/issues/issue-54943-2.rs b/src/test/ui/issues/issue-54943-2.rs index f829c38c35..41ca7c1498 100644 --- a/src/test/ui/issues/issue-54943-2.rs +++ b/src/test/ui/issues/issue-54943-2.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - // This test is a minimal version of an ICE in the dropck-eyepatch tests // found in the fix for #54943. In particular, this test is in unreachable // code as the initial fix for this ICE only worked if the code was reachable. diff --git a/src/test/ui/issues/issue-54943.nll.stderr b/src/test/ui/issues/issue-54943.nll.stderr new file mode 100644 index 0000000000..59be0f983b --- /dev/null +++ b/src/test/ui/issues/issue-54943.nll.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/issue-54943.rs:6:13 + | +LL | fn boo<'a>() { + | -- lifetime `'a` defined here +... +LL | let x = foo::<&'a u32>(); + | ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-54943.rs b/src/test/ui/issues/issue-54943.rs index ce4e010674..85722300bf 100644 --- a/src/test/ui/issues/issue-54943.rs +++ b/src/test/ui/issues/issue-54943.rs @@ -1,13 +1,10 @@ -#![feature(nll)] -#![allow(warnings)] - fn foo() { } fn boo<'a>() { return; let x = foo::<&'a u32>(); - //~^ ERROR lifetime may not live long enough + //~^ ERROR } fn main() {} diff --git a/src/test/ui/issues/issue-54943.stderr b/src/test/ui/issues/issue-54943.stderr index aa68177bcd..d0f03f90c8 100644 --- a/src/test/ui/issues/issue-54943.stderr +++ b/src/test/ui/issues/issue-54943.stderr @@ -1,11 +1,10 @@ -error: lifetime may not live long enough - --> $DIR/issue-54943.rs:9:13 +error[E0477]: the type `&'a u32` does not fulfill the required lifetime + --> $DIR/issue-54943.rs:6:13 | -LL | fn boo<'a>() { - | -- lifetime `'a` defined here -... LL | let x = foo::<&'a u32>(); - | ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static` + | ^^^^^^^^^^^^^^ + | + = note: type must satisfy the static lifetime error: aborting due to previous error diff --git a/src/test/ui/issues/issue-54954.rs b/src/test/ui/issues/issue-54954.rs new file mode 100644 index 0000000000..40045bc758 --- /dev/null +++ b/src/test/ui/issues/issue-54954.rs @@ -0,0 +1,19 @@ +#![feature(const_fn)] + +const ARR_LEN: usize = Tt::const_val::<[i8; 123]>(); +//~^ ERROR constant contains unimplemented expression type + +trait Tt { + const fn const_val() -> usize { + //~^ ERROR trait fns cannot be declared const + core::mem::size_of::() + } +} + +fn f(z: [f32; ARR_LEN]) -> [f32; ARR_LEN] { + z +} + +fn main() { + let _ = f([1f32; ARR_LEN]); +} diff --git a/src/test/ui/issues/issue-54954.stderr b/src/test/ui/issues/issue-54954.stderr new file mode 100644 index 0000000000..29edb506c4 --- /dev/null +++ b/src/test/ui/issues/issue-54954.stderr @@ -0,0 +1,16 @@ +error[E0379]: trait fns cannot be declared const + --> $DIR/issue-54954.rs:7:5 + | +LL | const fn const_val() -> usize { + | ^^^^^ trait fns cannot be const + +error[E0019]: constant contains unimplemented expression type + --> $DIR/issue-54954.rs:3:24 + | +LL | const ARR_LEN: usize = Tt::const_val::<[i8; 123]>(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0019, E0379. +For more information about an error, try `rustc --explain E0019`. diff --git a/src/test/ui/issues/issue-54974.rs b/src/test/ui/issues/issue-54974.rs index b2624ec92a..d6f18875c9 100644 --- a/src/test/ui/issues/issue-54974.rs +++ b/src/test/ui/issues/issue-54974.rs @@ -1,7 +1,7 @@ // compile-pass // edition:2018 -#![feature(async_await, await_macro, futures_api)] +#![feature(async_await, await_macro)] use std::sync::Arc; diff --git a/src/test/ui/issues/issue-5500-1.ast.stderr b/src/test/ui/issues/issue-5500-1.ast.stderr deleted file mode 100644 index 558e7b7824..0000000000 --- a/src/test/ui/issues/issue-5500-1.ast.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0594]: cannot assign to field `_iter.node` of immutable binding - --> $DIR/issue-5500-1.rs:12:5 - | -LL | let _iter = TrieMapIterator{node: &a}; - | ----- help: make this binding mutable: `mut _iter` -LL | / _iter.node = & -LL | | -LL | | // MIR doesn't generate an error because the code isn't reachable. This is OK -LL | | // because the test is here to check that the compiler doesn't ICE (cf. #5500). -LL | | panic!() - | |____________^ cannot mutably borrow field of immutable binding - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/issues/issue-5500-1.mir.stderr b/src/test/ui/issues/issue-5500-1.mir.stderr deleted file mode 100644 index 92f803e281..0000000000 --- a/src/test/ui/issues/issue-5500-1.mir.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0594]: cannot assign to field `_iter.node` of immutable binding (Ast) - --> $DIR/issue-5500-1.rs:12:5 - | -LL | let _iter = TrieMapIterator{node: &a}; - | ----- help: make this binding mutable: `mut _iter` -LL | / _iter.node = & -LL | | -LL | | // MIR doesn't generate an error because the code isn't reachable. This is OK -LL | | // because the test is here to check that the compiler doesn't ICE (cf. #5500). -LL | | panic!() - | |____________^ cannot mutably borrow field of immutable binding - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/issues/issue-5500-1.rs b/src/test/ui/issues/issue-5500-1.rs index e8043563c7..56f5ce9901 100644 --- a/src/test/ui/issues/issue-5500-1.rs +++ b/src/test/ui/issues/issue-5500-1.rs @@ -1,6 +1,8 @@ -// ignore-compare-mode-nll -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=compare +// MIR doesn't generate an error because the assignment isn't reachable. This +// is OK because the test is here to check that the compiler doesn't ICE (cf. +// #5500). + +// compile-pass struct TrieMapIterator<'a> { node: &'a usize @@ -9,9 +11,5 @@ struct TrieMapIterator<'a> { fn main() { let a = 5; let _iter = TrieMapIterator{node: &a}; - _iter.node = & //[ast]~ ERROR cannot assign to field `_iter.node` of immutable binding - //[mir]~^ ERROR cannot assign to field `_iter.node` of immutable binding (Ast) - // MIR doesn't generate an error because the code isn't reachable. This is OK - // because the test is here to check that the compiler doesn't ICE (cf. #5500). - panic!() + _iter.node = &panic!() } diff --git a/src/test/ui/issues/issue-55324.rs b/src/test/ui/issues/issue-55324.rs index 6160fbabd9..4572e543f2 100644 --- a/src/test/ui/issues/issue-55324.rs +++ b/src/test/ui/issues/issue-55324.rs @@ -1,7 +1,7 @@ // compile-pass // edition:2018 -#![feature(async_await, await_macro, futures_api)] +#![feature(async_await, await_macro)] use std::future::Future; diff --git a/src/test/ui/issues/issue-55511.nll.stderr b/src/test/ui/issues/issue-55511.nll.stderr deleted file mode 100644 index bf3e58e8cd..0000000000 --- a/src/test/ui/issues/issue-55511.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0597]: `a` does not live long enough - --> $DIR/issue-55511.rs:13:28 - | -LL | let b = Some(Cell::new(&a)); - | ^^ borrowed value does not live long enough -... -LL | <() as Foo<'static>>::C => { } - | ----------------------- type annotation requires that `a` is borrowed for `'static` -... -LL | } - | - `a` dropped here while still borrowed - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/issues/issue-55511.stderr b/src/test/ui/issues/issue-55511.stderr index 24668f0455..bf3e58e8cd 100644 --- a/src/test/ui/issues/issue-55511.stderr +++ b/src/test/ui/issues/issue-55511.stderr @@ -1,13 +1,14 @@ error[E0597]: `a` does not live long enough - --> $DIR/issue-55511.rs:13:29 + --> $DIR/issue-55511.rs:13:28 | LL | let b = Some(Cell::new(&a)); - | ^ borrowed value does not live long enough + | ^^ borrowed value does not live long enough +... +LL | <() as Foo<'static>>::C => { } + | ----------------------- type annotation requires that `a` is borrowed for `'static` ... LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - `a` dropped here while still borrowed error: aborting due to previous error diff --git a/src/test/ui/issues/issue-55731.nll.stderr b/src/test/ui/issues/issue-55731.nll.stderr new file mode 100644 index 0000000000..dd38bb6291 --- /dev/null +++ b/src/test/ui/issues/issue-55731.nll.stderr @@ -0,0 +1,11 @@ +error: higher-ranked subtype error + --> $DIR/issue-55731.rs:48:5 + | +LL | / multi(Map { +LL | | i: Cloned(PhantomData), +LL | | f: X, +LL | | }); + | |______^ + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-55796.nll.stderr b/src/test/ui/issues/issue-55796.nll.stderr new file mode 100644 index 0000000000..5809a56cd4 --- /dev/null +++ b/src/test/ui/issues/issue-55796.nll.stderr @@ -0,0 +1,20 @@ +error: lifetime may not live long enough + --> $DIR/issue-55796.rs:16:9 + | +LL | pub trait Graph<'a> { + | -- lifetime `'a` defined here +... +LL | Box::new(self.out_edges(u).map(|e| e.target())) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/issue-55796.rs:21:9 + | +LL | pub trait Graph<'a> { + | -- lifetime `'a` defined here +... +LL | Box::new(self.in_edges(u).map(|e| e.target())) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/issues/issue-55796.stderr b/src/test/ui/issues/issue-55796.stderr index 7cf597d3a9..9e67e5e125 100644 --- a/src/test/ui/issues/issue-55796.stderr +++ b/src/test/ui/issues/issue-55796.stderr @@ -42,4 +42,3 @@ LL | Box::new(self.in_edges(u).map(|e| e.target())) error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/issues/issue-56411.stderr b/src/test/ui/issues/issue-56411.stderr index 7b23b3766b..1f38c70a11 100644 --- a/src/test/ui/issues/issue-56411.stderr +++ b/src/test/ui/issues/issue-56411.stderr @@ -27,5 +27,5 @@ LL | import!(("issue-56411-aux.rs", issue_56411_aux)); error: aborting due to 2 previous errors -Some errors occurred: E0255, E0365. +Some errors have detailed explanations: E0255, E0365. For more information about an error, try `rustc --explain E0255`. diff --git a/src/test/ui/issues/issue-56762.rs b/src/test/ui/issues/issue-56762.rs index 97b66b2c7c..8bb81b907c 100644 --- a/src/test/ui/issues/issue-56762.rs +++ b/src/test/ui/issues/issue-56762.rs @@ -1,4 +1,8 @@ // only-x86_64 + +// FIXME https://github.com/rust-lang/rust/issues/59774 +// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> "" +// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" const HUGE_SIZE: usize = !0usize / 8; diff --git a/src/test/ui/issues/issue-56806.stderr b/src/test/ui/issues/issue-56806.stderr index 2dd3add8f6..96979b9dc1 100644 --- a/src/test/ui/issues/issue-56806.stderr +++ b/src/test/ui/issues/issue-56806.stderr @@ -9,4 +9,3 @@ LL | fn dyn_instead_of_self(self: Box); error: aborting due to previous error -For more information about this error, try `rustc --explain E0307`. diff --git a/src/test/ui/issues/issue-57843.nll.stderr b/src/test/ui/issues/issue-57843.nll.stderr new file mode 100644 index 0000000000..70310780b4 --- /dev/null +++ b/src/test/ui/issues/issue-57843.nll.stderr @@ -0,0 +1,8 @@ +error: higher-ranked subtype error + --> $DIR/issue-57843.rs:23:9 + | +LL | Foo(Box::new(|_| ())); + | ^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/run-pass/issues/issue-57924.rs b/src/test/ui/issues/issue-57924.rs similarity index 64% rename from src/test/run-pass/issues/issue-57924.rs rename to src/test/ui/issues/issue-57924.rs index 232596334b..dc2942225e 100644 --- a/src/test/run-pass/issues/issue-57924.rs +++ b/src/test/ui/issues/issue-57924.rs @@ -3,6 +3,7 @@ pub struct Gcm(E); impl Gcm { pub fn crash(e: E) -> Self { Self::(e) + //~^ ERROR type arguments are not allowed for this type } } diff --git a/src/test/ui/issues/issue-57924.stderr b/src/test/ui/issues/issue-57924.stderr new file mode 100644 index 0000000000..2f184b1aae --- /dev/null +++ b/src/test/ui/issues/issue-57924.stderr @@ -0,0 +1,9 @@ +error[E0109]: type arguments are not allowed for this type + --> $DIR/issue-57924.rs:5:16 + | +LL | Self::(e) + | ^ type argument not allowed + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0109`. diff --git a/src/test/ui/issues/issue-58006.stderr b/src/test/ui/issues/issue-58006.stderr index c65e3e2777..c34e133c6c 100644 --- a/src/test/ui/issues/issue-58006.stderr +++ b/src/test/ui/issues/issue-58006.stderr @@ -6,4 +6,3 @@ LL | Self::A => (), error: aborting due to previous error -For more information about this error, try `rustc --explain E0533`. diff --git a/src/test/ui/issues/issue-58712.rs b/src/test/ui/issues/issue-58712.rs index 577709cf29..930bec6889 100644 --- a/src/test/ui/issues/issue-58712.rs +++ b/src/test/ui/issues/issue-58712.rs @@ -12,4 +12,3 @@ impl AddrVec { } fn main() {} - diff --git a/src/test/ui/issues/issue-58856-1.stderr b/src/test/ui/issues/issue-58856-1.stderr index 20cdf55365..58ab0a142d 100644 --- a/src/test/ui/issues/issue-58856-1.stderr +++ b/src/test/ui/issues/issue-58856-1.stderr @@ -2,9 +2,8 @@ error: expected one of `)`, `,`, or `:`, found `>` --> $DIR/issue-58856-1.rs:2:14 | LL | fn b(self> - | - ^ - | | | - | | help: `)` may belong here + | - ^ help: `)` may belong here + | | | unclosed delimiter error: aborting due to previous error diff --git a/src/test/ui/issues/issue-58885.rs b/src/test/ui/issues/issue-58885.rs index 559899194f..99d87b2273 100644 --- a/src/test/ui/issues/issue-58885.rs +++ b/src/test/ui/issues/issue-58885.rs @@ -1,7 +1,7 @@ // compile-pass // edition:2018 -#![feature(async_await, await_macro, futures_api)] +#![feature(async_await, await_macro)] struct Xyz { a: u64, diff --git a/src/test/ui/issues/issue-59001.rs b/src/test/ui/issues/issue-59001.rs index a310653fbc..c758244002 100644 --- a/src/test/ui/issues/issue-59001.rs +++ b/src/test/ui/issues/issue-59001.rs @@ -1,7 +1,7 @@ // compile-pass // edition:2018 -#![feature(async_await, await_macro, futures_api)] +#![feature(async_await, await_macro)] use std::future::Future; diff --git a/src/test/ui/issues/issue-5927.stderr b/src/test/ui/issues/issue-5927.stderr index 6b0a2b7b93..89f5e399ae 100644 --- a/src/test/ui/issues/issue-5927.stderr +++ b/src/test/ui/issues/issue-5927.stderr @@ -12,5 +12,4 @@ LL | x(1) => x(1) error: aborting due to 2 previous errors -Some errors occurred: E0425, E0531. -For more information about an error, try `rustc --explain E0425`. +For more information about this error, try `rustc --explain E0425`. diff --git a/src/test/ui/issues/issue-59488.rs b/src/test/ui/issues/issue-59488.rs new file mode 100644 index 0000000000..6fa9961f26 --- /dev/null +++ b/src/test/ui/issues/issue-59488.rs @@ -0,0 +1,34 @@ +fn foo() -> i32 { + 42 +} + +fn bar(a: i64) -> i64 { + 43 +} + +enum Foo { + Bar(usize), +} + +fn main() { + foo > 12; + //~^ ERROR binary operation `>` cannot be applied to type `fn() -> i32 {foo}` [E0369] + //~| ERROR mismatched types [E0308] + + bar > 13; + //~^ ERROR binary operation `>` cannot be applied to type `fn(i64) -> i64 {bar}` [E0369] + //~| ERROR mismatched types [E0308] + + foo > foo; + //~^ ERROR binary operation `>` cannot be applied to type `fn() -> i32 {foo}` [E0369] + + foo > bar; + //~^ ERROR binary operation `>` cannot be applied to type `fn() -> i32 {foo}` [E0369] + //~| ERROR mismatched types [E0308] + + let i = Foo::Bar; + assert_eq!(Foo::Bar, i); + //~^ ERROR binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}` [E0369] + //~| ERROR `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug` [E0277] + //~| ERROR `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug` [E0277] +} diff --git a/src/test/ui/issues/issue-59488.stderr b/src/test/ui/issues/issue-59488.stderr new file mode 100644 index 0000000000..e0cb1f7b96 --- /dev/null +++ b/src/test/ui/issues/issue-59488.stderr @@ -0,0 +1,109 @@ +error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}` + --> $DIR/issue-59488.rs:14:9 + | +LL | foo > 12; + | --- ^ -- {integer} + | | + | fn() -> i32 {foo} + | help: you might have forgotten to call this function: `foo()` + +error[E0308]: mismatched types + --> $DIR/issue-59488.rs:14:11 + | +LL | foo > 12; + | ^^ expected fn item, found integer + | + = note: expected type `fn() -> i32 {foo}` + found type `i32` + +error[E0369]: binary operation `>` cannot be applied to type `fn(i64) -> i64 {bar}` + --> $DIR/issue-59488.rs:18:9 + | +LL | bar > 13; + | --- ^ -- {integer} + | | + | fn(i64) -> i64 {bar} + | help: you might have forgotten to call this function: `bar( /* arguments */ )` + +error[E0308]: mismatched types + --> $DIR/issue-59488.rs:18:11 + | +LL | bar > 13; + | ^^ expected fn item, found integer + | + = note: expected type `fn(i64) -> i64 {bar}` + found type `i64` + +error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}` + --> $DIR/issue-59488.rs:22:9 + | +LL | foo > foo; + | --- ^ --- fn() -> i32 {foo} + | | + | fn() -> i32 {foo} +help: you might have forgotten to call this function + | +LL | foo() > foo; + | ^^^^^ +help: you might have forgotten to call this function + | +LL | foo > foo(); + | ^^^^^ + +error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}` + --> $DIR/issue-59488.rs:25:9 + | +LL | foo > bar; + | --- ^ --- fn(i64) -> i64 {bar} + | | + | fn() -> i32 {foo} + | + = note: an implementation of `std::cmp::PartialOrd` might be missing for `fn() -> i32 {foo}` + +error[E0308]: mismatched types + --> $DIR/issue-59488.rs:25:11 + | +LL | foo > bar; + | ^^^ expected fn item, found a different fn item + | + = note: expected type `fn() -> i32 {foo}` + found type `fn(i64) -> i64 {bar}` + +error[E0369]: binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}` + --> $DIR/issue-59488.rs:30:5 + | +LL | assert_eq!(Foo::Bar, i); + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | | + | fn(usize) -> Foo {Foo::Bar} + | fn(usize) -> Foo {Foo::Bar} + | + = note: an implementation of `std::cmp::PartialEq` might be missing for `fn(usize) -> Foo {Foo::Bar}` + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + +error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug` + --> $DIR/issue-59488.rs:30:5 + | +LL | assert_eq!(Foo::Bar, i); + | ^^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | + = help: the trait `std::fmt::Debug` is not implemented for `fn(usize) -> Foo {Foo::Bar}` + = note: required because of the requirements on the impl of `std::fmt::Debug` for `&fn(usize) -> Foo {Foo::Bar}` + = note: required by `std::fmt::Debug::fmt` + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + +error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug` + --> $DIR/issue-59488.rs:30:5 + | +LL | assert_eq!(Foo::Bar, i); + | ^^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | + = help: the trait `std::fmt::Debug` is not implemented for `fn(usize) -> Foo {Foo::Bar}` + = note: required because of the requirements on the impl of `std::fmt::Debug` for `&fn(usize) -> Foo {Foo::Bar}` + = note: required by `std::fmt::Debug::fmt` + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + +error: aborting due to 10 previous errors + +Some errors have detailed explanations: E0277, E0308, E0369. +For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/issues/issue-59896.rs b/src/test/ui/issues/issue-59896.rs new file mode 100644 index 0000000000..ff9f19acf8 --- /dev/null +++ b/src/test/ui/issues/issue-59896.rs @@ -0,0 +1,9 @@ +#![deny(unused_imports)] + +struct S; + +fn main() { + use S; //~ ERROR the item `S` is imported redundantly + + let _s = S; +} diff --git a/src/test/ui/issues/issue-59896.stderr b/src/test/ui/issues/issue-59896.stderr new file mode 100644 index 0000000000..ef78f27fa6 --- /dev/null +++ b/src/test/ui/issues/issue-59896.stderr @@ -0,0 +1,17 @@ +error: the item `S` is imported redundantly + --> $DIR/issue-59896.rs:6:9 + | +LL | struct S; + | --------- the item `S` is already defined here +... +LL | use S; + | ^ + | +note: lint level defined here + --> $DIR/issue-59896.rs:1:9 + | +LL | #![deny(unused_imports)] + | ^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/issues/issue-5997-enum.stderr b/src/test/ui/issues/issue-5997-enum.stderr index 5c778143e1..1c58b9c391 100644 --- a/src/test/ui/issues/issue-5997-enum.stderr +++ b/src/test/ui/issues/issue-5997-enum.stderr @@ -2,7 +2,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/issue-5997-enum.rs:2:16 | LL | fn f() -> bool { - | - - type variable from outer function + | - - type parameter from outer function | | | try adding a local generic parameter in this method instead LL | enum E { V(Z) } diff --git a/src/test/ui/issues/issue-5997-struct.stderr b/src/test/ui/issues/issue-5997-struct.stderr index cb1b5146b6..5b388d16d7 100644 --- a/src/test/ui/issues/issue-5997-struct.stderr +++ b/src/test/ui/issues/issue-5997-struct.stderr @@ -2,7 +2,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/issue-5997-struct.rs:2:14 | LL | fn f() -> bool { - | - - type variable from outer function + | - - type parameter from outer function | | | try adding a local generic parameter in this method instead LL | struct S(T); diff --git a/src/test/ui/issues/issue-60057.rs b/src/test/ui/issues/issue-60057.rs new file mode 100644 index 0000000000..3027d01c53 --- /dev/null +++ b/src/test/ui/issues/issue-60057.rs @@ -0,0 +1,17 @@ +struct A { + banana: u8, +} + +impl A { + fn new(peach: u8) -> A { + A { + banana: banana //~ ERROR cannot find value `banana` in this scope + } + } + + fn foo(&self, peach: u8) -> A { + A { + banana: banana //~ ERROR cannot find value `banana` in this scope + } + } +} diff --git a/src/test/ui/issues/issue-60057.stderr b/src/test/ui/issues/issue-60057.stderr new file mode 100644 index 0000000000..6b967204ce --- /dev/null +++ b/src/test/ui/issues/issue-60057.stderr @@ -0,0 +1,20 @@ +error[E0425]: cannot find value `banana` in this scope + --> $DIR/issue-60057.rs:8:21 + | +LL | banana: banana + | ^^^^^^ a field by this name exists in `Self` + +error[E0425]: cannot find value `banana` in this scope + --> $DIR/issue-60057.rs:14:21 + | +LL | banana: banana + | ^^^^^^ help: you might have meant to use the available field: `self.banana` + +error[E0601]: `main` function not found in crate `issue_60057` + | + = note: consider adding a `main` function to `$DIR/issue-60057.rs` + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0425, E0601. +For more information about an error, try `rustc --explain E0425`. diff --git a/src/test/ui/issues/issue-60283.stderr b/src/test/ui/issues/issue-60283.stderr index 54cc2f3a03..a79b1959dc 100644 --- a/src/test/ui/issues/issue-60283.stderr +++ b/src/test/ui/issues/issue-60283.stderr @@ -31,5 +31,4 @@ LL | | F: for<'a> FnMut(>::Item) {} error: aborting due to 2 previous errors -Some errors occurred: E0271, E0631. -For more information about an error, try `rustc --explain E0271`. +For more information about this error, try `rustc --explain E0271`. diff --git a/src/test/ui/issues/issue-60662.rs b/src/test/ui/issues/issue-60662.rs new file mode 100644 index 0000000000..fe4eaff742 --- /dev/null +++ b/src/test/ui/issues/issue-60662.rs @@ -0,0 +1,11 @@ +// compile-pass +// compile-flags: -Z unpretty=hir + +#![feature(existential_type)] + +trait Animal { +} + +fn main() { + pub existential type ServeFut: Animal; +} diff --git a/src/test/ui/issues/issue-60662.stdout b/src/test/ui/issues/issue-60662.stdout new file mode 100644 index 0000000000..5acfdf9ed5 --- /dev/null +++ b/src/test/ui/issues/issue-60662.stdout @@ -0,0 +1,14 @@ +// compile-pass +// compile-flags: -Z unpretty=hir + +#![feature(existential_type)] +#[prelude_import] +use ::std::prelude::v1::*; +#[macro_use] +extern crate std; + +trait Animal { } + +fn main() { + pub existential type ServeFut : Animal; + } diff --git a/src/test/ui/issues/issue-60989.rs b/src/test/ui/issues/issue-60989.rs new file mode 100644 index 0000000000..930e98bedc --- /dev/null +++ b/src/test/ui/issues/issue-60989.rs @@ -0,0 +1,18 @@ +struct A {} +struct B {} + +impl From for B { + fn from(a: A) -> B { + B{} + } +} + +fn main() { + let c1 = (); + c1::<()>; + //~^ ERROR type arguments are not allowed for this type + + let c1 = A {}; + c1::>; + //~^ ERROR type arguments are not allowed for this type +} diff --git a/src/test/ui/issues/issue-60989.stderr b/src/test/ui/issues/issue-60989.stderr new file mode 100644 index 0000000000..55a0b9626d --- /dev/null +++ b/src/test/ui/issues/issue-60989.stderr @@ -0,0 +1,15 @@ +error[E0109]: type arguments are not allowed for this type + --> $DIR/issue-60989.rs:12:10 + | +LL | c1::<()>; + | ^^ type argument not allowed + +error[E0109]: type arguments are not allowed for this type + --> $DIR/issue-60989.rs:16:10 + | +LL | c1::>; + | ^^^^^^^ type argument not allowed + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0109`. diff --git a/src/test/ui/issues/issue-61475.rs b/src/test/ui/issues/issue-61475.rs new file mode 100644 index 0000000000..680449c9ef --- /dev/null +++ b/src/test/ui/issues/issue-61475.rs @@ -0,0 +1,15 @@ +// run-pass +#![allow(dead_code)] + +enum E { + A, B +} + +fn main() { + match &&E::A { + &&E::A => { + } + &&E::B => { + } + }; +} diff --git a/src/test/ui/issues/issue-61623.rs b/src/test/ui/issues/issue-61623.rs new file mode 100644 index 0000000000..e5b8747bd8 --- /dev/null +++ b/src/test/ui/issues/issue-61623.rs @@ -0,0 +1,11 @@ +fn f1<'a>(_: &'a mut ()) {} + +fn f2

(_: P, _: ()) {} + +fn f3<'a>(x: &'a ((), &'a mut ())) { + f2(|| x.0, f1(x.1)) +//~^ ERROR cannot borrow `*x.1` as mutable, as it is behind a `&` reference +//~| ERROR cannot borrow `*x.1` as mutable because it is also borrowed as immutable +} + +fn main() {} diff --git a/src/test/ui/issues/issue-61623.stderr b/src/test/ui/issues/issue-61623.stderr new file mode 100644 index 0000000000..883a1c441d --- /dev/null +++ b/src/test/ui/issues/issue-61623.stderr @@ -0,0 +1,22 @@ +error[E0596]: cannot borrow `*x.1` as mutable, as it is behind a `&` reference + --> $DIR/issue-61623.rs:6:19 + | +LL | fn f3<'a>(x: &'a ((), &'a mut ())) { + | -------------------- help: consider changing this to be a mutable reference: `&'a mut ((), &'a mut ())` +LL | f2(|| x.0, f1(x.1)) + | ^^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable + +error[E0502]: cannot borrow `*x.1` as mutable because it is also borrowed as immutable + --> $DIR/issue-61623.rs:6:19 + | +LL | f2(|| x.0, f1(x.1)) + | -- -- - ^^^ mutable borrow occurs here + | | | | + | | | first borrow occurs due to use of `x` in closure + | | immutable borrow occurs here + | immutable borrow later used by call + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0502, E0596. +For more information about an error, try `rustc --explain E0502`. diff --git a/src/test/ui/issues/issue-61882-2.rs b/src/test/ui/issues/issue-61882-2.rs new file mode 100644 index 0000000000..1209b54bc4 --- /dev/null +++ b/src/test/ui/issues/issue-61882-2.rs @@ -0,0 +1,11 @@ +struct A(T); + +impl A<&'static u8> { + fn f() { + let x = 0; + Self(&x); + //~^ ERROR `x` does not live long enough + } +} + +fn main() {} diff --git a/src/test/ui/issues/issue-61882-2.stderr b/src/test/ui/issues/issue-61882-2.stderr new file mode 100644 index 0000000000..03a65540ce --- /dev/null +++ b/src/test/ui/issues/issue-61882-2.stderr @@ -0,0 +1,15 @@ +error[E0597]: `x` does not live long enough + --> $DIR/issue-61882-2.rs:6:14 + | +LL | Self(&x); + | ^^ + | | + | borrowed value does not live long enough + | requires that `x` is borrowed for `'static` +LL | +LL | } + | - `x` dropped here while still borrowed + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/issues/issue-61882.rs b/src/test/ui/issues/issue-61882.rs new file mode 100644 index 0000000000..013398b459 --- /dev/null +++ b/src/test/ui/issues/issue-61882.rs @@ -0,0 +1,9 @@ +struct A(T); + +impl A { + const B: A = Self(0); + //~^ ERROR mismatched types + //~| ERROR mismatched types +} + +fn main() {} diff --git a/src/test/ui/issues/issue-61882.stderr b/src/test/ui/issues/issue-61882.stderr new file mode 100644 index 0000000000..a14e1a4dd4 --- /dev/null +++ b/src/test/ui/issues/issue-61882.stderr @@ -0,0 +1,21 @@ +error[E0308]: mismatched types + --> $DIR/issue-61882.rs:4:27 + | +LL | const B: A = Self(0); + | ^ expected bool, found integer + | + = note: expected type `bool` + found type `{integer}` + +error[E0308]: mismatched types + --> $DIR/issue-61882.rs:4:22 + | +LL | const B: A = Self(0); + | ^^^^^^^ expected u8, found bool + | + = note: expected type `A` + found type `A` + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/issues/issue-6801.nll.stderr b/src/test/ui/issues/issue-6801.nll.stderr deleted file mode 100644 index dbb8e6530c..0000000000 --- a/src/test/ui/issues/issue-6801.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/issue-6801.rs:19:13 - | -LL | let sq = || { *x * *x }; - | -- - borrow occurs due to use in closure - | | - | borrow of `x` occurs here -LL | -LL | twice(x); - | ^ move out of `x` occurs here -LL | invoke(sq); - | -- borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/issues/issue-6801.stderr b/src/test/ui/issues/issue-6801.stderr index 482e4873f3..dbb8e6530c 100644 --- a/src/test/ui/issues/issue-6801.stderr +++ b/src/test/ui/issues/issue-6801.stderr @@ -2,10 +2,14 @@ error[E0505]: cannot move out of `x` because it is borrowed --> $DIR/issue-6801.rs:19:13 | LL | let sq = || { *x * *x }; - | -- borrow of `x` occurs here + | -- - borrow occurs due to use in closure + | | + | borrow of `x` occurs here LL | LL | twice(x); | ^ move out of `x` occurs here +LL | invoke(sq); + | -- borrow later used here error: aborting due to previous error diff --git a/src/test/ui/issues/issue-6804.rs b/src/test/ui/issues/issue-6804.rs index da73e2bd39..b4af3581a0 100644 --- a/src/test/ui/issues/issue-6804.rs +++ b/src/test/ui/issues/issue-6804.rs @@ -10,6 +10,8 @@ fn main() { match x { NAN => {}, //~ ERROR floating-point types cannot be used //~^ WARN this was previously accepted by the compiler but is being phased out + //~| ERROR floating-point types cannot be used in patterns + //~| WARN this was previously accepted by the compiler but is being phased out _ => {}, }; diff --git a/src/test/ui/issues/issue-6804.stderr b/src/test/ui/issues/issue-6804.stderr index 1c251ed844..ab4467e513 100644 --- a/src/test/ui/issues/issue-6804.stderr +++ b/src/test/ui/issues/issue-6804.stderr @@ -13,7 +13,7 @@ LL | #![deny(illegal_floating_point_literal_pattern)] = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-6804.rs:17:10 + --> $DIR/issue-6804.rs:19:10 | LL | [NAN, _] => {}, | ^^^ @@ -21,5 +21,14 @@ LL | [NAN, _] => {}, = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #41620 -error: aborting due to 2 previous errors +error: floating-point types cannot be used in patterns + --> $DIR/issue-6804.rs:11:9 + | +LL | NAN => {}, + | ^^^ + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #41620 + +error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-7364.stderr b/src/test/ui/issues/issue-7364.stderr index 52a99ce36b..1f1079555a 100644 --- a/src/test/ui/issues/issue-7364.stderr +++ b/src/test/ui/issues/issue-7364.stderr @@ -23,5 +23,5 @@ LL | static boxed: Box> = box RefCell::new(0); error: aborting due to 3 previous errors -Some errors occurred: E0010, E0019, E0277. +Some errors have detailed explanations: E0010, E0019, E0277. For more information about an error, try `rustc --explain E0010`. diff --git a/src/test/ui/issues/issue-8761.stderr b/src/test/ui/issues/issue-8761.stderr index fc0c140760..28847c5a82 100644 --- a/src/test/ui/issues/issue-8761.stderr +++ b/src/test/ui/issues/issue-8761.stderr @@ -3,12 +3,20 @@ error[E0308]: mismatched types | LL | A = 1i64, | ^^^^ expected isize, found i64 +help: change the type of the numeric literal from `i64` to `isize` + | +LL | A = 1isize, + | ^^^^^^ error[E0308]: mismatched types --> $DIR/issue-8761.rs:5:9 | LL | B = 2u8 | ^^^ expected isize, found u8 +help: change the type of the numeric literal from `u8` to `isize` + | +LL | B = 2isize + | ^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-9725.stderr b/src/test/ui/issues/issue-9725.stderr index eafe92e468..687e0cc0f3 100644 --- a/src/test/ui/issues/issue-9725.stderr +++ b/src/test/ui/issues/issue-9725.stderr @@ -14,5 +14,5 @@ LL | let A { foo, foo } = A { foo: 3 }; error: aborting due to 2 previous errors -Some errors occurred: E0025, E0416. +Some errors have detailed explanations: E0025, E0416. For more information about an error, try `rustc --explain E0025`. diff --git a/src/test/ui/keyword/keyword-self-as-identifier.stderr b/src/test/ui/keyword/keyword-self-as-identifier.stderr index be57c6ad26..5f567910ed 100644 --- a/src/test/ui/keyword/keyword-self-as-identifier.stderr +++ b/src/test/ui/keyword/keyword-self-as-identifier.stderr @@ -6,4 +6,3 @@ LL | let Self = 22; error: aborting due to previous error -For more information about this error, try `rustc --explain E0531`. diff --git a/src/test/ui/kindck/kindck-impl-type-params.nll.stderr b/src/test/ui/kindck/kindck-impl-type-params.nll.stderr new file mode 100644 index 0000000000..c1f662fda6 --- /dev/null +++ b/src/test/ui/kindck/kindck-impl-type-params.nll.stderr @@ -0,0 +1,63 @@ +error[E0277]: `T` cannot be sent between threads safely + --> $DIR/kindck-impl-type-params.rs:18:13 + | +LL | let a = &t as &Gettable; + | ^^ `T` cannot be sent between threads safely + | + = help: the trait `std::marker::Send` is not implemented for `T` + = help: consider adding a `where T: std::marker::Send` bound + = note: required because of the requirements on the impl of `Gettable` for `S` + = note: required for the cast to the object type `dyn Gettable` + +error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied + --> $DIR/kindck-impl-type-params.rs:18:13 + | +LL | let a = &t as &Gettable; + | ^^ the trait `std::marker::Copy` is not implemented for `T` + | + = help: consider adding a `where T: std::marker::Copy` bound + = note: required because of the requirements on the impl of `Gettable` for `S` + = note: required for the cast to the object type `dyn Gettable` + +error[E0277]: `T` cannot be sent between threads safely + --> $DIR/kindck-impl-type-params.rs:25:27 + | +LL | let a: &Gettable = &t; + | ^^ `T` cannot be sent between threads safely + | + = help: the trait `std::marker::Send` is not implemented for `T` + = help: consider adding a `where T: std::marker::Send` bound + = note: required because of the requirements on the impl of `Gettable` for `S` + = note: required for the cast to the object type `dyn Gettable` + +error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied + --> $DIR/kindck-impl-type-params.rs:25:27 + | +LL | let a: &Gettable = &t; + | ^^ the trait `std::marker::Copy` is not implemented for `T` + | + = help: consider adding a `where T: std::marker::Copy` bound + = note: required because of the requirements on the impl of `Gettable` for `S` + = note: required for the cast to the object type `dyn Gettable` + +error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied + --> $DIR/kindck-impl-type-params.rs:38:13 + | +LL | let a = t as Box>; + | ^ the trait `std::marker::Copy` is not implemented for `std::string::String` + | + = note: required because of the requirements on the impl of `Gettable` for `S` + = note: required for the cast to the object type `dyn Gettable` + +error[E0277]: the trait bound `foo3::Foo: std::marker::Copy` is not satisfied + --> $DIR/kindck-impl-type-params.rs:46:33 + | +LL | let a: Box> = t; + | ^ the trait `std::marker::Copy` is not implemented for `foo3::Foo` + | + = note: required because of the requirements on the impl of `Gettable` for `S` + = note: required for the cast to the object type `dyn Gettable` + +error: aborting due to 6 previous errors + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/kindck/kindck-impl-type-params.stderr b/src/test/ui/kindck/kindck-impl-type-params.stderr index 03cd480bab..8580e6812b 100644 --- a/src/test/ui/kindck/kindck-impl-type-params.stderr +++ b/src/test/ui/kindck/kindck-impl-type-params.stderr @@ -68,5 +68,4 @@ LL | let a: Box> = t; error: aborting due to 7 previous errors -Some errors occurred: E0277, E0477. -For more information about an error, try `rustc --explain E0277`. +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/kindck/kindck-inherited-copy-bound.stderr b/src/test/ui/kindck/kindck-inherited-copy-bound.stderr index 1b7f9cd551..0ed2da46fb 100644 --- a/src/test/ui/kindck/kindck-inherited-copy-bound.stderr +++ b/src/test/ui/kindck/kindck-inherited-copy-bound.stderr @@ -30,5 +30,5 @@ LL | let z = &x as &Foo; error: aborting due to 3 previous errors -Some errors occurred: E0038, E0277. +Some errors have detailed explanations: E0038, E0277. For more information about an error, try `rustc --explain E0038`. diff --git a/src/test/ui/kindck/kindck-send-object1.nll.stderr b/src/test/ui/kindck/kindck-send-object1.nll.stderr new file mode 100644 index 0000000000..1df7412132 --- /dev/null +++ b/src/test/ui/kindck/kindck-send-object1.nll.stderr @@ -0,0 +1,32 @@ +error[E0277]: `(dyn Dummy + 'a)` cannot be shared between threads safely + --> $DIR/kindck-send-object1.rs:10:5 + | +LL | assert_send::<&'a Dummy>(); + | ^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely + | + = help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'a)` + = note: required because of the requirements on the impl of `std::marker::Send` for `&'a (dyn Dummy + 'a)` +note: required by `assert_send` + --> $DIR/kindck-send-object1.rs:5:1 + | +LL | fn assert_send() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0277]: `(dyn Dummy + 'a)` cannot be sent between threads safely + --> $DIR/kindck-send-object1.rs:29:5 + | +LL | assert_send::>(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely + | + = help: the trait `std::marker::Send` is not implemented for `(dyn Dummy + 'a)` + = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<(dyn Dummy + 'a)>` + = note: required because it appears within the type `std::boxed::Box<(dyn Dummy + 'a)>` +note: required by `assert_send` + --> $DIR/kindck-send-object1.rs:5:1 + | +LL | fn assert_send() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/kindck/kindck-send-object1.stderr b/src/test/ui/kindck/kindck-send-object1.stderr index 4f2d09a60f..a4b908e410 100644 --- a/src/test/ui/kindck/kindck-send-object1.stderr +++ b/src/test/ui/kindck/kindck-send-object1.stderr @@ -37,5 +37,4 @@ LL | fn assert_send() { } error: aborting due to 3 previous errors -Some errors occurred: E0277, E0477. -For more information about an error, try `rustc --explain E0277`. +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/label/label_break_value_continue.stderr b/src/test/ui/label/label_break_value_continue.stderr index bd1dd59389..b3c0b42102 100644 --- a/src/test/ui/label/label_break_value_continue.stderr +++ b/src/test/ui/label/label_break_value_continue.stderr @@ -26,5 +26,4 @@ LL | continue; error: aborting due to 3 previous errors -Some errors occurred: E0695, E0696. -For more information about an error, try `rustc --explain E0695`. +For more information about this error, try `rustc --explain E0695`. diff --git a/src/test/ui/lexical-scopes.stderr b/src/test/ui/lexical-scopes.stderr index 859eb04749..e990f705af 100644 --- a/src/test/ui/lexical-scopes.stderr +++ b/src/test/ui/lexical-scopes.stderr @@ -16,5 +16,4 @@ LL | Foo::f(); error: aborting due to 2 previous errors -Some errors occurred: E0574, E0599. -For more information about an error, try `rustc --explain E0574`. +For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/lifetimes/borrowck-let-suggestion.nll.stderr b/src/test/ui/lifetimes/borrowck-let-suggestion.nll.stderr deleted file mode 100644 index 0e2fc0a0fe..0000000000 --- a/src/test/ui/lifetimes/borrowck-let-suggestion.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/borrowck-let-suggestion.rs:2:17 - | -LL | let mut x = vec![1].iter(); - | ^^^^^^^ - temporary value is freed at the end of this statement - | | - | creates a temporary which is freed while still in use -LL | -LL | x.use_mut(); - | - borrow later used here - | - = note: consider using a `let` binding to create a longer lived value - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/lifetimes/borrowck-let-suggestion.rs b/src/test/ui/lifetimes/borrowck-let-suggestion.rs index 1deb0457e9..3d591a506d 100644 --- a/src/test/ui/lifetimes/borrowck-let-suggestion.rs +++ b/src/test/ui/lifetimes/borrowck-let-suggestion.rs @@ -1,6 +1,6 @@ fn f() { let mut x = vec![1].iter(); - //~^ ERROR borrowed value does not live long enough + //~^ ERROR temporary value dropped while borrowed x.use_mut(); } diff --git a/src/test/ui/lifetimes/borrowck-let-suggestion.stderr b/src/test/ui/lifetimes/borrowck-let-suggestion.stderr index 7a95137ac9..0e2fc0a0fe 100644 --- a/src/test/ui/lifetimes/borrowck-let-suggestion.stderr +++ b/src/test/ui/lifetimes/borrowck-let-suggestion.stderr @@ -1,17 +1,17 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/borrowck-let-suggestion.rs:2:17 | LL | let mut x = vec![1].iter(); - | ^^^^^^^ - temporary value dropped here while still borrowed + | ^^^^^^^ - temporary value is freed at the end of this statement | | - | temporary value does not live long enough -... -LL | } - | - temporary value needs to live until here + | creates a temporary which is freed while still in use +LL | +LL | x.use_mut(); + | - borrow later used here | - = note: consider using a `let` binding to increase its lifetime + = note: consider using a `let` binding to create a longer lived value = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.nll.stderr b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.nll.stderr new file mode 100644 index 0000000000..8b24563e92 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.nll.stderr @@ -0,0 +1,20 @@ +error[E0521]: borrowed data escapes outside of function + --> $DIR/lifetime-bound-will-change-warning.rs:34:5 + | +LL | fn test2<'a>(x: &'a Box) { + | - `x` is a reference that is only valid in the function body +LL | // but ref_obj will not, so warn. +LL | ref_obj(x) + | ^^^^^^^^^^ `x` escapes the function body here + +error[E0521]: borrowed data escapes outside of function + --> $DIR/lifetime-bound-will-change-warning.rs:39:5 + | +LL | fn test2cc<'a>(x: &'a Box) { + | - `x` is a reference that is only valid in the function body +LL | // same as test2, but cross crate +LL | lib::ref_obj(x) + | ^^^^^^^^^^^^^^^ `x` escapes the function body here + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr b/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr index 90bec01df6..7b823f012b 100644 --- a/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr +++ b/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr @@ -97,5 +97,5 @@ LL | | } error: aborting due to 6 previous errors -Some errors occurred: E0309, E0310. +Some errors have detailed explanations: E0309, E0310. For more information about an error, try `rustc --explain E0309`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.nll.stderr new file mode 100644 index 0000000000..fc9093bb2e --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/ex1-return-one-existing-name-if-else-using-impl.rs:11:20 + | +LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { + | -- - let's call the lifetime of this reference `'1` + | | + | lifetime `'a` defined here +LL | +LL | if x > y { x } else { y } + | ^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr index e9f5fc311d..56ca610019 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr @@ -11,4 +11,3 @@ LL | if x > y { x } else { y } error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.nll.stderr new file mode 100644 index 0000000000..3384c24da8 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/ex1-return-one-existing-name-return-type-is-anon.rs:8:5 + | +LL | fn foo<'a>(&self, x: &'a i32) -> &i32 { + | -- - let's call the lifetime of this reference `'1` + | | + | lifetime `'a` defined here +LL | +LL | x + | ^ function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr index 0d506f2b9f..df34d18ee8 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr @@ -11,4 +11,3 @@ LL | x error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.nll.stderr new file mode 100644 index 0000000000..5ef29076e0 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/ex1-return-one-existing-name-self-is-anon.rs:8:30 + | +LL | fn foo<'a>(&self, x: &'a Foo) -> &'a Foo { + | -- - let's call the lifetime of this reference `'1` + | | + | lifetime `'a` defined here +LL | +LL | if true { x } else { self } + | ^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr index 98a23613c3..22e14df9ed 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr @@ -11,4 +11,3 @@ LL | if true { x } else { self } error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.nll.stderr new file mode 100644 index 0000000000..90d4754eba --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.nll.stderr @@ -0,0 +1,11 @@ +error[E0621]: explicit lifetime required in the type of `x` + --> $DIR/ex2a-push-one-existing-name-2.rs:6:5 + | +LL | fn foo<'a>(x: Ref, y: &mut Vec>) { + | -------- help: add explicit lifetime `'a` to the type of `x`: `Ref<'a, i32>` +LL | y.push(x); + | ^^^^^^^^^ lifetime `'a` required + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.nll.stderr new file mode 100644 index 0000000000..a03e16b3b7 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.nll.stderr @@ -0,0 +1,12 @@ +error[E0621]: explicit lifetime required in the type of `y` + --> $DIR/ex2a-push-one-existing-name-early-bound.rs:8:5 + | +LL | fn baz<'a, 'b, T>(x: &mut Vec<&'a T>, y: &T) + | -- help: add explicit lifetime `'a` to the type of `y`: `&'a T` +... +LL | x.push(y); + | ^^^^^^^^^ lifetime `'a` required + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.nll.stderr new file mode 100644 index 0000000000..487b34e3d1 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.nll.stderr @@ -0,0 +1,11 @@ +error[E0621]: explicit lifetime required in the type of `y` + --> $DIR/ex2a-push-one-existing-name.rs:6:5 + | +LL | fn foo<'a>(x: &mut Vec>, y: Ref) { + | -------- help: add explicit lifetime `'a` to the type of `y`: `Ref<'a, i32>` +LL | x.push(y); + | ^^^^^^^^^ lifetime `'a` required + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.nll.stderr new file mode 100644 index 0000000000..735f7a0dfc --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/ex2b-push-no-existing-names.rs:6:5 + | +LL | fn foo(x: &mut Vec>, y: Ref) { + | - - has type `Ref<'1, i32>` + | | + | has type `&mut std::vec::Vec>` +LL | x.push(y); + | ^^^^^^^^^ argument requires that `'1` must outlive `'2` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr index e505c9c0dc..c0c75c7453 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr @@ -8,4 +8,3 @@ LL | x.push(y); error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.nll.stderr new file mode 100644 index 0000000000..fbefa1f566 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/ex2c-push-inference-variable.rs:7:5 + | +LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { + | -- -- lifetime `'c` defined here + | | + | lifetime `'b` defined here +LL | let z = Ref { data: y.data }; +LL | x.push(z); + | ^^^^^^^^^ argument requires that `'c` must outlive `'b` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr index 63b1c6db28..57101cffe9 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr @@ -9,4 +9,3 @@ LL | x.push(z); error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.nll.stderr new file mode 100644 index 0000000000..d889eb4afd --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/ex2d-push-inference-variable-2.rs:8:5 + | +LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { + | -- -- lifetime `'c` defined here + | | + | lifetime `'b` defined here +... +LL | a.push(b); + | ^^^^^^^^^ argument requires that `'c` must outlive `'b` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr index 2f669efcf1..cab3063628 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr @@ -8,4 +8,3 @@ LL | let a: &mut Vec> = x; error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.nll.stderr new file mode 100644 index 0000000000..39eb407935 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/ex2e-push-inference-variable-3.rs:8:5 + | +LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { + | -- -- lifetime `'c` defined here + | | + | lifetime `'b` defined here +... +LL | Vec::push(a, b); + | ^^^^^^^^^^^^^^^ argument requires that `'c` must outlive `'b` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr index 258b6805ac..384caca824 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr @@ -8,4 +8,3 @@ LL | let a: &mut Vec> = x; error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.nll.stderr new file mode 100644 index 0000000000..a94f9a7990 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-2.rs:2:5 + | +LL | fn foo(&mut (ref mut v, w): &mut (&u8, &u8), x: &u8) { + | - - let's call the lifetime of this reference `'1` + | | + | let's call the lifetime of this reference `'2` +LL | *v = x; + | ^^^^^^ assignment requires that `'1` must outlive `'2` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr index 0aff80c6fb..9251c5e244 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr @@ -8,4 +8,3 @@ LL | *v = x; error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.nll.stderr new file mode 100644 index 0000000000..779e2eb8b9 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.nll.stderr @@ -0,0 +1,22 @@ +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-3.rs:2:5 + | +LL | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { + | - - let's call the lifetime of this reference `'1` + | | + | let's call the lifetime of this reference `'2` +LL | z.push((x,y)); + | ^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2` + +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-3.rs:2:5 + | +LL | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { + | - - let's call the lifetime of this reference `'1` + | | + | let's call the lifetime of this reference `'2` +LL | z.push((x,y)); + | ^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.rs b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.rs index c04b5d3a3e..c483f59f9d 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.rs +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.rs @@ -4,4 +4,3 @@ fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { } fn main() { } - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.stderr index 2e5ff6782d..adda66899c 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.stderr @@ -16,4 +16,3 @@ LL | z.push((x,y)); error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.nll.stderr new file mode 100644 index 0000000000..4c0ffe5c09 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-both-are-structs-2.rs:7:5 + | +LL | fn foo(mut x: Ref, y: Ref) { + | ----- - has type `Ref<'_, '1>` + | | + | has type `Ref<'_, '2>` +LL | x.b = y.b; + | ^^^^^^^^^ assignment requires that `'1` must outlive `'2` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr index 8e41d7c54e..4341e8e663 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr @@ -8,4 +8,3 @@ LL | x.b = y.b; error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.nll.stderr new file mode 100644 index 0000000000..97c665347f --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-both-are-structs-3.rs:7:5 + | +LL | fn foo(mut x: Ref) { + | ----- + | | + | has type `Ref<'_, '1>` + | has type `Ref<'2, '_>` +LL | x.a = x.b; + | ^^^^^^^^^ assignment requires that `'1` must outlive `'2` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr index da83ebc984..b49ee0cfc7 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr @@ -2,12 +2,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-both-are-structs-3.rs:7:11 | LL | fn foo(mut x: Ref) { - | --- - | | - | this type is declared with multiple lifetimes... + | --- this type is declared with multiple lifetimes... LL | x.a = x.b; | ^^^ ...but data with one lifetime flows into the other here error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.nll.stderr new file mode 100644 index 0000000000..a39bb16580 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-both-are-structs-earlybound-regions.rs:9:5 + | +LL | fn foo<'a, 'b>(mut x: Vec>, y: Ref<'b>) + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | x.push(y); + | ^^^^^^^^^ argument requires that `'b` must outlive `'a` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr index 374bbd93d0..a13c7e63cd 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr @@ -9,4 +9,3 @@ LL | x.push(y); error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.nll.stderr new file mode 100644 index 0000000000..48ce5301ad --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-both-are-structs-latebound-regions.rs:6:5 + | +LL | fn foo<'a, 'b>(mut x: Vec>, y: Ref<'b>) { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | x.push(y); + | ^^^^^^^^^ argument requires that `'b` must outlive `'a` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr index 94798d1ce2..14faf6f460 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr @@ -8,4 +8,3 @@ LL | x.push(y); error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr new file mode 100644 index 0000000000..f9c33c2480 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-both-are-structs.rs:6:5 + | +LL | fn foo(mut x: Vec, y: Ref) { + | ----- - has type `Ref<'1>` + | | + | has type `std::vec::Vec>` +LL | x.push(y); + | ^^^^^^^^^ argument requires that `'1` must outlive `'2` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr index 9f5a79ed33..e5696b74da 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr @@ -8,4 +8,3 @@ LL | x.push(y); error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.nll.stderr new file mode 100644 index 0000000000..0996068398 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-latebound-regions.rs:2:5 + | +LL | fn foo<'a,'b>(x: &mut Vec<&'a u8>, y: &'b u8) { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | x.push(y); + | ^^^^^^^^^ argument requires that `'b` must outlive `'a` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr index 2c87f8dbd2..bbf5d2452b 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr @@ -8,4 +8,3 @@ LL | x.push(y); error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.nll.stderr new file mode 100644 index 0000000000..5751c31948 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.nll.stderr @@ -0,0 +1,21 @@ +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-one-is-struct-2.rs:4:5 + | +LL | fn foo(mut x: Ref, y: &u32) { + | ----- - let's call the lifetime of this reference `'2` + | | + | has type `Ref<'_, '1>` +LL | y = x.b; + | ^^^^^^^ assignment requires that `'1` must outlive `'2` + +error[E0384]: cannot assign to immutable argument `y` + --> $DIR/ex3-both-anon-regions-one-is-struct-2.rs:4:5 + | +LL | fn foo(mut x: Ref, y: &u32) { + | - help: make this binding mutable: `mut y` +LL | y = x.b; + | ^^^^^^^ cannot assign to immutable argument + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr index 60b92ed2b3..f1bc1ca3aa 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr @@ -10,4 +10,3 @@ LL | y = x.b; error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.nll.stderr new file mode 100644 index 0000000000..79e7e8e157 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-one-is-struct-3.rs:4:5 + | +LL | fn foo(mut y: Ref, x: &u32) { + | ----- - let's call the lifetime of this reference `'1` + | | + | has type `Ref<'_, '2>` +LL | y.b = x; + | ^^^^^^^ assignment requires that `'1` must outlive `'2` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr index a220c8ddb2..d8f6b8c49d 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr @@ -8,4 +8,3 @@ LL | y.b = x; error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.nll.stderr new file mode 100644 index 0000000000..53615fd1ab --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-one-is-struct-4.rs:4:5 + | +LL | fn foo(mut y: Ref, x: &u32) { + | ----- - let's call the lifetime of this reference `'1` + | | + | has type `Ref<'_, '2>` +LL | y.b = x; + | ^^^^^^^ assignment requires that `'1` must outlive `'2` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr index 73472a8d02..08ae2c9db5 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr @@ -8,4 +8,3 @@ LL | y.b = x; error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.nll.stderr new file mode 100644 index 0000000000..6ff4411673 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-one-is-struct.rs:7:5 + | +LL | fn foo(mut x: Ref, y: &u32) { + | ----- - let's call the lifetime of this reference `'1` + | | + | has type `Ref<'_, '2>` +LL | x.b = y; + | ^^^^^^^ assignment requires that `'1` must outlive `'2` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr index eb6e6f2e95..ff286d722a 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr @@ -8,4 +8,3 @@ LL | x.b = y; error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.nll.stderr new file mode 100644 index 0000000000..1c258ad98b --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-return-type-is-anon.rs:7:5 + | +LL | fn foo<'a>(&self, x: &i32) -> &i32 { + | - - let's call the lifetime of this reference `'1` + | | + | let's call the lifetime of this reference `'2` +LL | x + | ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.rs b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.rs index 09852403d9..286cb6dc90 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.rs +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.rs @@ -9,4 +9,3 @@ impl Foo { } fn main() { } - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr index 199f880b3c..3d16c26568 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr @@ -10,4 +10,3 @@ LL | x error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.nll.stderr new file mode 100644 index 0000000000..ffe39fdd8c --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-self-is-anon.rs:7:19 + | +LL | fn foo<'a>(&self, x: &Foo) -> &Foo { + | - - let's call the lifetime of this reference `'1` + | | + | let's call the lifetime of this reference `'2` +LL | if true { x } else { self } + | ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.rs b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.rs index 33aa199938..79d7d63c8b 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.rs +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.rs @@ -9,4 +9,3 @@ impl Foo { } fn main() {} - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr index 838f43b377..10872d31ef 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr @@ -10,4 +10,3 @@ LL | if true { x } else { self } error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.nll.stderr new file mode 100644 index 0000000000..33be98c649 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.nll.stderr @@ -0,0 +1,21 @@ +error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable + --> $DIR/ex3-both-anon-regions-using-fn-items.rs:2:3 + | +LL | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) { + | - help: consider changing this to be mutable: `mut y` +LL | y.push(z); + | ^ cannot borrow as mutable + +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-using-fn-items.rs:2:3 + | +LL | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) { + | - - let's call the lifetime of this reference `'1` + | | + | let's call the lifetime of this reference `'2` +LL | y.push(z); + | ^^^^^^^^^ argument requires that `'1` must outlive `'2` + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr index d2cc3dba6a..99e6e8bc5a 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr @@ -8,4 +8,3 @@ LL | y.push(z); error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.nll.stderr new file mode 100644 index 0000000000..f350267484 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-using-impl-items.rs:6:9 + | +LL | fn foo(x: &mut Vec<&u8>, y: &u8) { + | - - let's call the lifetime of this reference `'1` + | | + | let's call the lifetime of this reference `'2` +LL | x.push(y); + | ^^^^^^^^^ argument requires that `'1` must outlive `'2` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr index e8b0208f09..8ac221e333 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr @@ -8,4 +8,3 @@ LL | x.push(y); error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.nll.stderr new file mode 100644 index 0000000000..c4e7ff9006 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.nll.stderr @@ -0,0 +1,21 @@ +error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable + --> $DIR/ex3-both-anon-regions-using-trait-objects.rs:2:3 + | +LL | fn foo(x:Box , y: Vec<&u8>, z: &u8) { + | - help: consider changing this to be mutable: `mut y` +LL | y.push(z); + | ^ cannot borrow as mutable + +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions-using-trait-objects.rs:2:3 + | +LL | fn foo(x:Box , y: Vec<&u8>, z: &u8) { + | - - let's call the lifetime of this reference `'1` + | | + | let's call the lifetime of this reference `'2` +LL | y.push(z); + | ^^^^^^^^^ argument requires that `'1` must outlive `'2` + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr index 5ad85c97e7..6cd175b8a6 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr @@ -8,4 +8,3 @@ LL | y.push(z); error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.nll.stderr new file mode 100644 index 0000000000..6989acfa19 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/ex3-both-anon-regions.rs:2:5 + | +LL | fn foo(x: &mut Vec<&u8>, y: &u8) { + | - - let's call the lifetime of this reference `'1` + | | + | let's call the lifetime of this reference `'2` +LL | x.push(y); + | ^^^^^^^^^ argument requires that `'1` must outlive `'2` + +error: aborting due to previous error + diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr index b278482767..053d577fa0 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr @@ -8,4 +8,3 @@ LL | x.push(y); error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.rs b/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.rs index 99949e17b6..81a20c5877 100644 --- a/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.rs +++ b/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.rs @@ -1,17 +1,13 @@ -// FIXME: Change to UI Test // Check notes are placed on an assignment that can actually precede the current assignment // Don't emit a first assignment for assignment in a loop. -// compile-flags: -Zborrowck=compare - fn test() { let x; if true { x = 1; } else { x = 2; - x = 3; //~ ERROR (Ast) [E0384] - //~^ ERROR (Mir) [E0384] + x = 3; //~ ERROR [E0384] } } @@ -22,8 +18,7 @@ fn test_in_loop() { x = 1; } else { x = 2; - x = 3; //~ ERROR (Ast) [E0384] - //~^ ERROR (Mir) [E0384] + x = 3; //~ ERROR [E0384] } } } @@ -32,11 +27,9 @@ fn test_using_loop() { let x; loop { if true { - x = 1; //~ ERROR (Ast) [E0384] - //~^ ERROR (Mir) [E0384] + x = 1; //~ ERROR [E0384] } else { - x = 2; //~ ERROR (Ast) [E0384] - //~^ ERROR (Mir) [E0384] + x = 2; //~ ERROR [E0384] } } } diff --git a/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr b/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr index e15290f0b9..c646912d3b 100644 --- a/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr @@ -1,36 +1,5 @@ -error[E0384]: cannot assign twice to immutable variable `x` (Ast) - --> $DIR/liveness-assign-imm-local-notes.rs:13:9 - | -LL | x = 2; - | ----- first assignment to `x` -LL | x = 3; - | ^^^^^ cannot assign twice to immutable variable - -error[E0384]: cannot assign twice to immutable variable `x` (Ast) - --> $DIR/liveness-assign-imm-local-notes.rs:25:13 - | -LL | x = 2; - | ----- first assignment to `x` -LL | x = 3; - | ^^^^^ cannot assign twice to immutable variable - -error[E0384]: cannot assign twice to immutable variable `x` (Ast) - --> $DIR/liveness-assign-imm-local-notes.rs:35:13 - | -LL | x = 1; - | ^^^^^ cannot assign twice to immutable variable - -error[E0384]: cannot assign twice to immutable variable `x` (Ast) - --> $DIR/liveness-assign-imm-local-notes.rs:38:13 - | -LL | x = 1; - | ----- first assignment to `x` -... -LL | x = 2; - | ^^^^^ cannot assign twice to immutable variable - -error[E0384]: cannot assign twice to immutable variable `x` (Mir) - --> $DIR/liveness-assign-imm-local-notes.rs:13:9 +error[E0384]: cannot assign twice to immutable variable `x` + --> $DIR/liveness-assign-imm-local-notes.rs:10:9 | LL | let x; | - help: make this binding mutable: `mut x` @@ -40,8 +9,8 @@ LL | x = 2; LL | x = 3; | ^^^^^ cannot assign twice to immutable variable -error[E0384]: cannot assign twice to immutable variable `x` (Mir) - --> $DIR/liveness-assign-imm-local-notes.rs:25:13 +error[E0384]: cannot assign twice to immutable variable `x` + --> $DIR/liveness-assign-imm-local-notes.rs:21:13 | LL | let x; | - help: make this binding mutable: `mut x` @@ -51,8 +20,8 @@ LL | x = 2; LL | x = 3; | ^^^^^ cannot assign twice to immutable variable -error[E0384]: cannot assign twice to immutable variable `x` (Mir) - --> $DIR/liveness-assign-imm-local-notes.rs:35:13 +error[E0384]: cannot assign twice to immutable variable `x` + --> $DIR/liveness-assign-imm-local-notes.rs:30:13 | LL | let x; | - help: make this binding mutable: `mut x` @@ -60,18 +29,18 @@ LL | let x; LL | x = 1; | ^^^^^ cannot assign twice to immutable variable -error[E0384]: cannot assign twice to immutable variable `x` (Mir) - --> $DIR/liveness-assign-imm-local-notes.rs:38:13 +error[E0384]: cannot assign twice to immutable variable `x` + --> $DIR/liveness-assign-imm-local-notes.rs:32:13 | LL | let x; | - help: make this binding mutable: `mut x` ... LL | x = 1; | ----- first assignment to `x` -... +LL | } else { LL | x = 2; | ^^^^^ cannot assign twice to immutable variable -error: aborting due to 8 previous errors +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/linkage2.rs b/src/test/ui/linkage2.rs index 6d1410a90b..f9ea5319d5 100644 --- a/src/test/ui/linkage2.rs +++ b/src/test/ui/linkage2.rs @@ -1,3 +1,8 @@ +// FIXME https://github.com/rust-lang/rust/issues/59774 +// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> "" +// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" +// ignore-sgx no weak linkages permitted + #![feature(linkage)] extern { diff --git a/src/test/ui/linkage2.stderr b/src/test/ui/linkage2.stderr index 64213f1270..8326c0bacc 100644 --- a/src/test/ui/linkage2.stderr +++ b/src/test/ui/linkage2.stderr @@ -1,5 +1,5 @@ error: must have type `*const T` or `*mut T` - --> $DIR/linkage2.rs:4:32 + --> $DIR/linkage2.rs:9:32 | LL | #[linkage = "extern_weak"] static foo: i32; | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/linkage3.rs b/src/test/ui/linkage3.rs index f094a0d53e..1462079acf 100644 --- a/src/test/ui/linkage3.rs +++ b/src/test/ui/linkage3.rs @@ -1,3 +1,7 @@ +// FIXME https://github.com/rust-lang/rust/issues/59774 +// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> "" +// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" + #![feature(linkage)] extern { diff --git a/src/test/ui/linkage3.stderr b/src/test/ui/linkage3.stderr index a03593ff2c..b74fdc9142 100644 --- a/src/test/ui/linkage3.stderr +++ b/src/test/ui/linkage3.stderr @@ -1,5 +1,5 @@ error: invalid linkage specified - --> $DIR/linkage3.rs:4:24 + --> $DIR/linkage3.rs:8:24 | LL | #[linkage = "foo"] static foo: *const i32; | ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/linkage4.stderr b/src/test/ui/linkage4.stderr index fd86671204..f2aab164bd 100644 --- a/src/test/ui/linkage4.stderr +++ b/src/test/ui/linkage4.stderr @@ -1,9 +1,10 @@ -error[E0658]: the `linkage` attribute is experimental and not portable across platforms (see issue #29603) +error[E0658]: the `linkage` attribute is experimental and not portable across platforms --> $DIR/linkage4.rs:1:1 | LL | #[linkage = "external"] | ^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29603 = help: add #![feature(linkage)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/lint/deny-overflowing-literals.rs b/src/test/ui/lint/deny-overflowing-literals.rs index ebd6654d39..21c8ba7d6c 100644 --- a/src/test/ui/lint/deny-overflowing-literals.rs +++ b/src/test/ui/lint/deny-overflowing-literals.rs @@ -1,4 +1,7 @@ fn main() { let x: u8 = 256; - //~^ error: literal out of range for u8 + //~^ error: literal out of range for `u8` + + for _ in 0..256u8 {} + //~^ error: range endpoint is out of range for `u8` } diff --git a/src/test/ui/lint/deny-overflowing-literals.stderr b/src/test/ui/lint/deny-overflowing-literals.stderr index 7313dd0bfb..c97872b522 100644 --- a/src/test/ui/lint/deny-overflowing-literals.stderr +++ b/src/test/ui/lint/deny-overflowing-literals.stderr @@ -1,4 +1,4 @@ -error: literal out of range for u8 +error: literal out of range for `u8` --> $DIR/deny-overflowing-literals.rs:2:17 | LL | let x: u8 = 256; @@ -6,5 +6,11 @@ LL | let x: u8 = 256; | = note: #[deny(overflowing_literals)] on by default -error: aborting due to previous error +error: range endpoint is out of range for `u8` + --> $DIR/deny-overflowing-literals.rs:5:14 + | +LL | for _ in 0..256u8 {} + | ^^^^^^^^ help: use an inclusive range instead: `0..=255u8` + +error: aborting due to 2 previous errors diff --git a/src/test/ui/lint/issue-54180-unused-ref-field.fixed b/src/test/ui/lint/issue-54180-unused-ref-field.fixed new file mode 100644 index 0000000000..1350b7ca69 --- /dev/null +++ b/src/test/ui/lint/issue-54180-unused-ref-field.fixed @@ -0,0 +1,34 @@ +// run-rustfix + +#![deny(unused)] + +pub struct S { + pub f1: i32, +} + +pub struct Point { + pub x: i32, + pub y: i32, +} + +pub enum E { + Variant { field: String } +} + +pub fn foo(arg: &E) { + match arg { + E::Variant { field: _ } => (), //~ ERROR unused variable + } +} + +fn main() { + let s = S { f1: 123 }; + let S { f1: _ } = s; //~ ERROR unused variable + + let points = vec![Point { x: 1, y: 2 }]; + let _: i32 = points.iter().map(|Point { x: _, y }| y).sum(); //~ ERROR unused variable + + match (Point { x: 1, y: 2 }) { + Point { y, x: _ } => y, //~ ERROR unused variable + }; +} diff --git a/src/test/ui/lint/issue-54180-unused-ref-field.rs b/src/test/ui/lint/issue-54180-unused-ref-field.rs new file mode 100644 index 0000000000..7b3392b609 --- /dev/null +++ b/src/test/ui/lint/issue-54180-unused-ref-field.rs @@ -0,0 +1,34 @@ +// run-rustfix + +#![deny(unused)] + +pub struct S { + pub f1: i32, +} + +pub struct Point { + pub x: i32, + pub y: i32, +} + +pub enum E { + Variant { field: String } +} + +pub fn foo(arg: &E) { + match arg { + E::Variant { ref field } => (), //~ ERROR unused variable + } +} + +fn main() { + let s = S { f1: 123 }; + let S { ref f1 } = s; //~ ERROR unused variable + + let points = vec![Point { x: 1, y: 2 }]; + let _: i32 = points.iter().map(|Point { x, y }| y).sum(); //~ ERROR unused variable + + match (Point { x: 1, y: 2 }) { + Point { y, ref mut x } => y, //~ ERROR unused variable + }; +} diff --git a/src/test/ui/lint/issue-54180-unused-ref-field.stderr b/src/test/ui/lint/issue-54180-unused-ref-field.stderr new file mode 100644 index 0000000000..9f47554a1a --- /dev/null +++ b/src/test/ui/lint/issue-54180-unused-ref-field.stderr @@ -0,0 +1,39 @@ +error: unused variable: `field` + --> $DIR/issue-54180-unused-ref-field.rs:20:26 + | +LL | E::Variant { ref field } => (), + | ----^^^^^ + | | + | help: try ignoring the field: `field: _` + | +note: lint level defined here + --> $DIR/issue-54180-unused-ref-field.rs:3:9 + | +LL | #![deny(unused)] + | ^^^^^^ + = note: #[deny(unused_variables)] implied by #[deny(unused)] + +error: unused variable: `x` + --> $DIR/issue-54180-unused-ref-field.rs:29:45 + | +LL | let _: i32 = points.iter().map(|Point { x, y }| y).sum(); + | ^ help: try ignoring the field: `x: _` + +error: unused variable: `f1` + --> $DIR/issue-54180-unused-ref-field.rs:26:17 + | +LL | let S { ref f1 } = s; + | ----^^ + | | + | help: try ignoring the field: `f1: _` + +error: unused variable: `x` + --> $DIR/issue-54180-unused-ref-field.rs:32:28 + | +LL | Point { y, ref mut x } => y, + | --------^ + | | + | help: try ignoring the field: `x: _` + +error: aborting due to 4 previous errors + diff --git a/src/test/ui/lint/lint-incoherent-auto-trait-objects.rs b/src/test/ui/lint/lint-incoherent-auto-trait-objects.rs index 0d18965ee7..d53b514476 100644 --- a/src/test/ui/lint/lint-incoherent-auto-trait-objects.rs +++ b/src/test/ui/lint/lint-incoherent-auto-trait-objects.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - trait Foo {} impl Foo for dyn Send {} diff --git a/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr b/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr index 928c92ef91..448cc953d4 100644 --- a/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr +++ b/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr @@ -1,5 +1,5 @@ error: conflicting implementations of trait `Foo` for type `(dyn std::marker::Send + 'static)`: (E0119) - --> $DIR/lint-incoherent-auto-trait-objects.rs:7:1 + --> $DIR/lint-incoherent-auto-trait-objects.rs:5:1 | LL | impl Foo for dyn Send {} | --------------------- first implementation here @@ -12,7 +12,7 @@ LL | impl Foo for dyn Send + Send {} = note: for more information, see issue #56484 error: conflicting implementations of trait `Foo` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119) - --> $DIR/lint-incoherent-auto-trait-objects.rs:13:1 + --> $DIR/lint-incoherent-auto-trait-objects.rs:11:1 | LL | impl Foo for dyn Send + Sync {} | ---------------------------- first implementation here @@ -24,7 +24,7 @@ LL | impl Foo for dyn Sync + Send {} = note: for more information, see issue #56484 error: conflicting implementations of trait `Foo` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119) - --> $DIR/lint-incoherent-auto-trait-objects.rs:17:1 + --> $DIR/lint-incoherent-auto-trait-objects.rs:15:1 | LL | impl Foo for dyn Sync + Send {} | ---------------------------- first implementation here diff --git a/src/test/ui/lint/lint-range-endpoint-overflow.rs b/src/test/ui/lint/lint-range-endpoint-overflow.rs new file mode 100644 index 0000000000..7034d56aa5 --- /dev/null +++ b/src/test/ui/lint/lint-range-endpoint-overflow.rs @@ -0,0 +1,17 @@ +#![deny(overflowing_literals)] + +fn main() { + let range_a = 0..256; //~ ERROR range endpoint is out of range for `u8` + let range_b = 0..=255; // ok + let range_c = 0..=256; //~ ERROR literal out of range for `u8` + let range_d = 256..5; //~ ERROR literal out of range for `u8` + let range_e = 0..257; //~ ERROR literal out of range for `u8` + let _range_f = 0..256u8; //~ ERROR range endpoint is out of range for `u8` + let _range_g = 0..128i8; //~ ERROR range endpoint is out of range for `i8` + + range_a.collect::>(); + range_b.collect::>(); + range_c.collect::>(); + range_d.collect::>(); + range_e.collect::>(); +} diff --git a/src/test/ui/lint/lint-range-endpoint-overflow.stderr b/src/test/ui/lint/lint-range-endpoint-overflow.stderr new file mode 100644 index 0000000000..939451d6bc --- /dev/null +++ b/src/test/ui/lint/lint-range-endpoint-overflow.stderr @@ -0,0 +1,44 @@ +error: range endpoint is out of range for `u8` + --> $DIR/lint-range-endpoint-overflow.rs:4:19 + | +LL | let range_a = 0..256; + | ^^^^^^ help: use an inclusive range instead: `0..=255` + | +note: lint level defined here + --> $DIR/lint-range-endpoint-overflow.rs:1:9 + | +LL | #![deny(overflowing_literals)] + | ^^^^^^^^^^^^^^^^^^^^ + +error: literal out of range for `u8` + --> $DIR/lint-range-endpoint-overflow.rs:6:23 + | +LL | let range_c = 0..=256; + | ^^^ + +error: literal out of range for `u8` + --> $DIR/lint-range-endpoint-overflow.rs:7:19 + | +LL | let range_d = 256..5; + | ^^^ + +error: literal out of range for `u8` + --> $DIR/lint-range-endpoint-overflow.rs:8:22 + | +LL | let range_e = 0..257; + | ^^^ + +error: range endpoint is out of range for `u8` + --> $DIR/lint-range-endpoint-overflow.rs:9:20 + | +LL | let _range_f = 0..256u8; + | ^^^^^^^^ help: use an inclusive range instead: `0..=255u8` + +error: range endpoint is out of range for `i8` + --> $DIR/lint-range-endpoint-overflow.rs:10:20 + | +LL | let _range_g = 0..128i8; + | ^^^^^^^^ help: use an inclusive range instead: `0..=127i8` + +error: aborting due to 6 previous errors + diff --git a/src/test/ui/lint/lint-type-limits2.rs b/src/test/ui/lint/lint-type-limits2.rs index c4486e0676..3f90119cd8 100644 --- a/src/test/ui/lint/lint-type-limits2.rs +++ b/src/test/ui/lint/lint-type-limits2.rs @@ -11,5 +11,5 @@ fn bar() -> i8 { fn baz() -> bool { 128 > bar() //~ ERROR comparison is useless due to type limits - //~| WARN literal out of range for i8 + //~| WARN literal out of range for `i8` } diff --git a/src/test/ui/lint/lint-type-limits2.stderr b/src/test/ui/lint/lint-type-limits2.stderr index e7bc407422..0b3d292856 100644 --- a/src/test/ui/lint/lint-type-limits2.stderr +++ b/src/test/ui/lint/lint-type-limits2.stderr @@ -6,7 +6,7 @@ LL | 128 > bar() | = note: requested on the command line with `-D unused-comparisons` -warning: literal out of range for i8 +warning: literal out of range for `i8` --> $DIR/lint-type-limits2.rs:13:5 | LL | 128 > bar() diff --git a/src/test/ui/lint/lint-type-limits3.rs b/src/test/ui/lint/lint-type-limits3.rs index a715c69f78..ceecf9ab30 100644 --- a/src/test/ui/lint/lint-type-limits3.rs +++ b/src/test/ui/lint/lint-type-limits3.rs @@ -7,7 +7,7 @@ fn main() { } fn qux() { let mut i = 1i8; while 200 != i { //~ ERROR comparison is useless due to type limits - //~| WARN literal out of range for i8 + //~| WARN literal out of range for `i8` i += 1; } } diff --git a/src/test/ui/lint/lint-type-limits3.stderr b/src/test/ui/lint/lint-type-limits3.stderr index 742b6695c2..70cd9c859e 100644 --- a/src/test/ui/lint/lint-type-limits3.stderr +++ b/src/test/ui/lint/lint-type-limits3.stderr @@ -6,7 +6,7 @@ LL | while 200 != i { | = note: requested on the command line with `-D unused-comparisons` -warning: literal out of range for i8 +warning: literal out of range for `i8` --> $DIR/lint-type-limits3.rs:9:11 | LL | while 200 != i { diff --git a/src/test/ui/lint/lint-type-overflow.rs b/src/test/ui/lint/lint-type-overflow.rs index 847cdf31dc..9672da6d35 100644 --- a/src/test/ui/lint/lint-type-overflow.rs +++ b/src/test/ui/lint/lint-type-overflow.rs @@ -1,5 +1,3 @@ -// - #![deny(overflowing_literals)] fn test(x: i8) { @@ -9,39 +7,39 @@ fn test(x: i8) { #[allow(unused_variables)] fn main() { let x1: u8 = 255; // should be OK - let x1: u8 = 256; //~ error: literal out of range for u8 + let x1: u8 = 256; //~ error: literal out of range for `u8` let x1 = 255_u8; // should be OK - let x1 = 256_u8; //~ error: literal out of range for u8 + let x1 = 256_u8; //~ error: literal out of range for `u8` let x2: i8 = -128; // should be OK - let x1: i8 = 128; //~ error: literal out of range for i8 + let x1: i8 = 128; //~ error: literal out of range for `i8` - let x3: i8 = -129; //~ error: literal out of range for i8 - let x3: i8 = -(129); //~ error: literal out of range for i8 - let x3: i8 = -{129}; //~ error: literal out of range for i8 + let x3: i8 = -129; //~ error: literal out of range for `i8` + let x3: i8 = -(129); //~ error: literal out of range for `i8` + let x3: i8 = -{129}; //~ error: literal out of range for `i8` - test(1000); //~ error: literal out of range for i8 + test(1000); //~ error: literal out of range for `i8` - let x = 128_i8; //~ error: literal out of range for i8 + let x = 128_i8; //~ error: literal out of range for `i8` let x = 127_i8; let x = -128_i8; let x = -(128_i8); - let x = -129_i8; //~ error: literal out of range for i8 + let x = -129_i8; //~ error: literal out of range for `i8` let x: i32 = 2147483647; // should be OK let x = 2147483647_i32; // should be OK - let x: i32 = 2147483648; //~ error: literal out of range for i32 - let x = 2147483648_i32; //~ error: literal out of range for i32 + let x: i32 = 2147483648; //~ error: literal out of range for `i32` + let x = 2147483648_i32; //~ error: literal out of range for `i32` let x: i32 = -2147483648; // should be OK let x = -2147483648_i32; // should be OK - let x: i32 = -2147483649; //~ error: literal out of range for i32 - let x = -2147483649_i32; //~ error: literal out of range for i32 - let x = 2147483648; //~ error: literal out of range for i32 + let x: i32 = -2147483649; //~ error: literal out of range for `i32` + let x = -2147483649_i32; //~ error: literal out of range for `i32` + let x = 2147483648; //~ error: literal out of range for `i32` - let x = 9223372036854775808_i64; //~ error: literal out of range for i64 + let x = 9223372036854775808_i64; //~ error: literal out of range for `i64` let x = -9223372036854775808_i64; // should be OK - let x = 18446744073709551615_i64; //~ error: literal out of range for i64 - let x: i64 = -9223372036854775809; //~ error: literal out of range for i64 - let x = -9223372036854775809_i64; //~ error: literal out of range for i64 + let x = 18446744073709551615_i64; //~ error: literal out of range for `i64` + let x: i64 = -9223372036854775809; //~ error: literal out of range for `i64` + let x = -9223372036854775809_i64; //~ error: literal out of range for `i64` } diff --git a/src/test/ui/lint/lint-type-overflow.stderr b/src/test/ui/lint/lint-type-overflow.stderr index 9da007457a..6fcd9b58b2 100644 --- a/src/test/ui/lint/lint-type-overflow.stderr +++ b/src/test/ui/lint/lint-type-overflow.stderr @@ -1,113 +1,113 @@ -error: literal out of range for u8 - --> $DIR/lint-type-overflow.rs:12:18 +error: literal out of range for `u8` + --> $DIR/lint-type-overflow.rs:10:18 | LL | let x1: u8 = 256; | ^^^ | note: lint level defined here - --> $DIR/lint-type-overflow.rs:3:9 + --> $DIR/lint-type-overflow.rs:1:9 | LL | #![deny(overflowing_literals)] | ^^^^^^^^^^^^^^^^^^^^ -error: literal out of range for u8 - --> $DIR/lint-type-overflow.rs:15:14 +error: literal out of range for `u8` + --> $DIR/lint-type-overflow.rs:13:14 | LL | let x1 = 256_u8; | ^^^^^^ -error: literal out of range for i8 - --> $DIR/lint-type-overflow.rs:18:18 +error: literal out of range for `i8` + --> $DIR/lint-type-overflow.rs:16:18 | LL | let x1: i8 = 128; | ^^^ -error: literal out of range for i8 - --> $DIR/lint-type-overflow.rs:20:19 +error: literal out of range for `i8` + --> $DIR/lint-type-overflow.rs:18:19 | LL | let x3: i8 = -129; | ^^^ -error: literal out of range for i8 - --> $DIR/lint-type-overflow.rs:21:19 +error: literal out of range for `i8` + --> $DIR/lint-type-overflow.rs:19:19 | LL | let x3: i8 = -(129); | ^^^^^ -error: literal out of range for i8 - --> $DIR/lint-type-overflow.rs:22:20 +error: literal out of range for `i8` + --> $DIR/lint-type-overflow.rs:20:20 | LL | let x3: i8 = -{129}; | ^^^ -error: literal out of range for i8 - --> $DIR/lint-type-overflow.rs:24:10 +error: literal out of range for `i8` + --> $DIR/lint-type-overflow.rs:22:10 | LL | test(1000); | ^^^^ -error: literal out of range for i8 - --> $DIR/lint-type-overflow.rs:26:13 +error: literal out of range for `i8` + --> $DIR/lint-type-overflow.rs:24:13 | LL | let x = 128_i8; | ^^^^^^ -error: literal out of range for i8 - --> $DIR/lint-type-overflow.rs:30:14 +error: literal out of range for `i8` + --> $DIR/lint-type-overflow.rs:28:14 | LL | let x = -129_i8; | ^^^^^^ -error: literal out of range for i32 - --> $DIR/lint-type-overflow.rs:34:18 +error: literal out of range for `i32` + --> $DIR/lint-type-overflow.rs:32:18 | LL | let x: i32 = 2147483648; | ^^^^^^^^^^ -error: literal out of range for i32 - --> $DIR/lint-type-overflow.rs:35:13 +error: literal out of range for `i32` + --> $DIR/lint-type-overflow.rs:33:13 | LL | let x = 2147483648_i32; | ^^^^^^^^^^^^^^ -error: literal out of range for i32 - --> $DIR/lint-type-overflow.rs:38:19 +error: literal out of range for `i32` + --> $DIR/lint-type-overflow.rs:36:19 | LL | let x: i32 = -2147483649; | ^^^^^^^^^^ -error: literal out of range for i32 - --> $DIR/lint-type-overflow.rs:39:14 +error: literal out of range for `i32` + --> $DIR/lint-type-overflow.rs:37:14 | LL | let x = -2147483649_i32; | ^^^^^^^^^^^^^^ -error: literal out of range for i32 - --> $DIR/lint-type-overflow.rs:40:13 +error: literal out of range for `i32` + --> $DIR/lint-type-overflow.rs:38:13 | LL | let x = 2147483648; | ^^^^^^^^^^ -error: literal out of range for i64 - --> $DIR/lint-type-overflow.rs:42:13 +error: literal out of range for `i64` + --> $DIR/lint-type-overflow.rs:40:13 | LL | let x = 9223372036854775808_i64; | ^^^^^^^^^^^^^^^^^^^^^^^ -error: literal out of range for i64 - --> $DIR/lint-type-overflow.rs:44:13 +error: literal out of range for `i64` + --> $DIR/lint-type-overflow.rs:42:13 | LL | let x = 18446744073709551615_i64; | ^^^^^^^^^^^^^^^^^^^^^^^^ -error: literal out of range for i64 - --> $DIR/lint-type-overflow.rs:45:19 +error: literal out of range for `i64` + --> $DIR/lint-type-overflow.rs:43:19 | LL | let x: i64 = -9223372036854775809; | ^^^^^^^^^^^^^^^^^^^ -error: literal out of range for i64 - --> $DIR/lint-type-overflow.rs:46:14 +error: literal out of range for `i64` + --> $DIR/lint-type-overflow.rs:44:14 | LL | let x = -9223372036854775809_i64; | ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/lint/lint-type-overflow2.stderr b/src/test/ui/lint/lint-type-overflow2.stderr index 5255f6c759..c76e9e25d5 100644 --- a/src/test/ui/lint/lint-type-overflow2.stderr +++ b/src/test/ui/lint/lint-type-overflow2.stderr @@ -1,4 +1,4 @@ -warning: literal out of range for i8 +warning: literal out of range for `i8` --> $DIR/lint-type-overflow2.rs:9:20 | LL | let x2: i8 = --128; @@ -10,25 +10,25 @@ note: lint level defined here LL | #![warn(overflowing_literals)] | ^^^^^^^^^^^^^^^^^^^^ -warning: literal out of range for f32 +warning: literal out of range for `f32` --> $DIR/lint-type-overflow2.rs:11:14 | LL | let x = -3.40282357e+38_f32; | ^^^^^^^^^^^^^^^^^^ -warning: literal out of range for f32 +warning: literal out of range for `f32` --> $DIR/lint-type-overflow2.rs:12:14 | LL | let x = 3.40282357e+38_f32; | ^^^^^^^^^^^^^^^^^^ -warning: literal out of range for f64 +warning: literal out of range for `f64` --> $DIR/lint-type-overflow2.rs:13:14 | LL | let x = -1.7976931348623159e+308_f64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: literal out of range for f64 +warning: literal out of range for `f64` --> $DIR/lint-type-overflow2.rs:14:14 | LL | let x = 1.7976931348623159e+308_f64; diff --git a/src/test/ui/lint/type-overflow.stderr b/src/test/ui/lint/type-overflow.stderr index 5235c9851b..dabfb876fb 100644 --- a/src/test/ui/lint/type-overflow.stderr +++ b/src/test/ui/lint/type-overflow.stderr @@ -1,4 +1,4 @@ -warning: literal out of range for i8 +warning: literal out of range for `i8` --> $DIR/type-overflow.rs:5:17 | LL | let error = 255i8; diff --git a/src/test/ui/lint/unused_import_warning_issue_45268.rs b/src/test/ui/lint/unused_import_warning_issue_45268.rs new file mode 100644 index 0000000000..0bd7751113 --- /dev/null +++ b/src/test/ui/lint/unused_import_warning_issue_45268.rs @@ -0,0 +1,48 @@ +// compile-pass + +#![warn(unused_imports)] // Warning explanation here, it's OK + +mod test { + pub trait A { + fn a(); + } + + impl A for () { + fn a() { } + } + + pub trait B { + fn b(self); + } + + impl B for () { + fn b(self) { } + } + + pub trait Unused { + } +} + +use test::Unused; // This is really unused, so warning is OK +use test::A; // This is used by the test2::func() through import of super::* +use test::B; // This is used by the test2::func() through import of super::* + +mod test2 { + use super::*; + pub fn func() { + let _ = <()>::a(); + let _ = ().b(); + test3::inner_func(); + } + mod test3 { + use super::*; + pub fn inner_func() { + let _ = <()>::a(); + let _ = ().b(); + } + } +} + +fn main() { + test2::func(); +} diff --git a/src/test/ui/lint/unused_import_warning_issue_45268.stderr b/src/test/ui/lint/unused_import_warning_issue_45268.stderr new file mode 100644 index 0000000000..7392e99f7a --- /dev/null +++ b/src/test/ui/lint/unused_import_warning_issue_45268.stderr @@ -0,0 +1,12 @@ +warning: unused import: `test::Unused` + --> $DIR/unused_import_warning_issue_45268.rs:26:5 + | +LL | use test::Unused; // This is really unused, so warning is OK + | ^^^^^^^^^^^^ + | +note: lint level defined here + --> $DIR/unused_import_warning_issue_45268.rs:3:9 + | +LL | #![warn(unused_imports)] // Warning explanation here, it's OK + | ^^^^^^^^^^^^^^ + diff --git a/src/test/ui/lint/use_suggestion_json.rs b/src/test/ui/lint/use_suggestion_json.rs index 3bdbaa55f2..9679ce4a2a 100644 --- a/src/test/ui/lint/use_suggestion_json.rs +++ b/src/test/ui/lint/use_suggestion_json.rs @@ -1,5 +1,6 @@ // ignore-cloudabi -// compile-flags: --error-format pretty-json -Zunstable-options +// ignore-windows +// compile-flags: --error-format pretty-json -Zunstable-options --json-rendered=termcolor // The output for humans should just highlight the whole span without showing // the suggested replacement, but we also want to test that suggested diff --git a/src/test/ui/lint/use_suggestion_json.stderr b/src/test/ui/lint/use_suggestion_json.stderr index dee7f2f9b1..632666db75 100644 --- a/src/test/ui/lint/use_suggestion_json.stderr +++ b/src/test/ui/lint/use_suggestion_json.stderr @@ -73,10 +73,10 @@ mod foo { "spans": [ { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 440, - "byte_end": 444, - "line_start": 11, - "line_end": 11, + "byte_start": 484, + "byte_end": 488, + "line_start": 12, + "line_end": 12, "column_start": 12, "column_end": 16, "is_primary": true, @@ -101,10 +101,10 @@ mod foo { "spans": [ { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 417, - "byte_end": 417, - "line_start": 10, - "line_end": 10, + "byte_start": 461, + "byte_end": 461, + "line_start": 11, + "line_end": 11, "column_start": 1, "column_end": 1, "is_primary": true, @@ -124,10 +124,10 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 417, - "byte_end": 417, - "line_start": 10, - "line_end": 10, + "byte_start": 461, + "byte_end": 461, + "line_start": 11, + "line_end": 11, "column_start": 1, "column_end": 1, "is_primary": true, @@ -147,10 +147,10 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 417, - "byte_end": 417, - "line_start": 10, - "line_end": 10, + "byte_start": 461, + "byte_end": 461, + "line_start": 11, + "line_end": 11, "column_start": 1, "column_end": 1, "is_primary": true, @@ -170,10 +170,10 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 417, - "byte_end": 417, - "line_start": 10, - "line_end": 10, + "byte_start": 461, + "byte_end": 461, + "line_start": 11, + "line_end": 11, "column_start": 1, "column_end": 1, "is_primary": true, @@ -193,10 +193,10 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 417, - "byte_end": 417, - "line_start": 10, - "line_end": 10, + "byte_start": 461, + "byte_end": 461, + "line_start": 11, + "line_end": 11, "column_start": 1, "column_end": 1, "is_primary": true, @@ -216,10 +216,10 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 417, - "byte_end": 417, - "line_start": 10, - "line_end": 10, + "byte_start": 461, + "byte_end": 461, + "line_start": 11, + "line_end": 11, "column_start": 1, "column_end": 1, "is_primary": true, @@ -239,10 +239,10 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 417, - "byte_end": 417, - "line_start": 10, - "line_end": 10, + "byte_start": 461, + "byte_end": 461, + "line_start": 11, + "line_end": 11, "column_start": 1, "column_end": 1, "is_primary": true, @@ -262,10 +262,10 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 417, - "byte_end": 417, - "line_start": 10, - "line_end": 10, + "byte_start": 461, + "byte_end": 461, + "line_start": 11, + "line_end": 11, "column_start": 1, "column_end": 1, "is_primary": true, @@ -285,10 +285,10 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 417, - "byte_end": 417, - "line_start": 10, - "line_end": 10, + "byte_start": 461, + "byte_end": 461, + "line_start": 11, + "line_end": 11, "column_start": 1, "column_end": 1, "is_primary": true, @@ -308,10 +308,10 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 417, - "byte_end": 417, - "line_start": 10, - "line_end": 10, + "byte_start": 461, + "byte_end": 461, + "line_start": 11, + "line_end": 11, "column_start": 1, "column_end": 1, "is_primary": true, @@ -331,10 +331,10 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 417, - "byte_end": 417, - "line_start": 10, - "line_end": 10, + "byte_start": 461, + "byte_end": 461, + "line_start": 11, + "line_end": 11, "column_start": 1, "column_end": 1, "is_primary": true, @@ -354,10 +354,10 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 417, - "byte_end": 417, - "line_start": 10, - "line_end": 10, + "byte_start": 461, + "byte_end": 461, + "line_start": 11, + "line_end": 11, "column_start": 1, "column_end": 1, "is_primary": true, @@ -380,22 +380,22 @@ mod foo { "rendered": null } ], - "rendered": "error[E0412]: cannot find type `Iter` in this scope - --> $DIR/use_suggestion_json.rs:11:12 - | -LL | let x: Iter; - | ^^^^ not found in this scope -help: possible candidates are found in other modules, you can import them into scope - | -LL | use std::collections::binary_heap::Iter; - | -LL | use std::collections::btree_map::Iter; - | -LL | use std::collections::btree_set::Iter; - | -LL | use std::collections::hash_map::Iter; - | -and 8 other candidates + "rendered": "\u001b[0m\u001b[1m\u001b[38;5;9merror[E0412]\u001b[0m\u001b[0m\u001b[1m: cannot find type `Iter` in this scope\u001b[0m +\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0m$DIR/use_suggestion_json.rs:12:12\u001b[0m +\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m +\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m let x: Iter;\u001b[0m +\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mnot found in this scope\u001b[0m +\u001b[0m\u001b[1m\u001b[38;5;14mhelp\u001b[0m\u001b[0m: possible candidates are found in other modules, you can import them into scope\u001b[0m +\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m +\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse std::collections::binary_heap::Iter;\u001b[0m +\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m +\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse std::collections::btree_map::Iter;\u001b[0m +\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m +\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse std::collections::btree_set::Iter;\u001b[0m +\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m +\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse std::collections::hash_map::Iter;\u001b[0m +\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m +\u001b[0mand 8 other candidates\u001b[0m " } @@ -405,7 +405,7 @@ and 8 other candidates "level": "error", "spans": [], "children": [], - "rendered": "error: aborting due to previous error + "rendered": "\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to previous error\u001b[0m " } @@ -415,6 +415,6 @@ and 8 other candidates "level": "", "spans": [], "children": [], - "rendered": "For more information about this error, try `rustc --explain E0412`. + "rendered": "\u001b[0m\u001b[1mFor more information about this error, try `rustc --explain E0412`.\u001b[0m " } diff --git a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.ast.nll.stderr b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.ast.nll.stderr deleted file mode 100644 index 8376ee88d9..0000000000 --- a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.ast.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `v` - --> $DIR/liveness-assign-imm-local-in-loop.rs:9:9 - | -LL | let v: isize; - | - help: make this binding mutable: `mut v` -... -LL | v = 1; - | ^^^^^ cannot assign twice to immutable variable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.ast.stderr b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.ast.stderr deleted file mode 100644 index db2a482be7..0000000000 --- a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.ast.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `v` - --> $DIR/liveness-assign-imm-local-in-loop.rs:9:9 - | -LL | v = 1; - | ^^^^^ cannot assign twice to immutable variable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.rs b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.rs index 59447ba3d7..c9e1851b9a 100644 --- a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.rs +++ b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.rs @@ -1,16 +1,10 @@ -// revisions: ast mir -//[mir]compile-flags: -Zborrowck=mir - fn test() { let v: isize; - //[mir]~^ HELP make this binding mutable - //[mir]~| SUGGESTION mut v + //~^ HELP make this binding mutable + //~| SUGGESTION mut v loop { - v = 1; //[ast]~ ERROR cannot assign twice to immutable variable - //[mir]~^ ERROR cannot assign twice to immutable variable `v` - //[ast]~| NOTE cannot assign twice to immutable variable - //[mir]~| NOTE cannot assign twice to immutable variable - v.clone(); // just to prevent liveness warnings + v = 1; //~ ERROR cannot assign twice to immutable variable `v` + //~| NOTE cannot assign twice to immutable variable } } diff --git a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.mir.stderr b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.stderr similarity index 86% rename from src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.mir.stderr rename to src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.stderr index 8376ee88d9..69dff734ee 100644 --- a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.mir.stderr +++ b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.stderr @@ -1,5 +1,5 @@ error[E0384]: cannot assign twice to immutable variable `v` - --> $DIR/liveness-assign-imm-local-in-loop.rs:9:9 + --> $DIR/liveness-assign-imm-local-in-loop.rs:6:9 | LL | let v: isize; | - help: make this binding mutable: `mut v` diff --git a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.ast.stderr b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.ast.stderr deleted file mode 100644 index b287edf2fd..0000000000 --- a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.ast.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `v` - --> $DIR/liveness-assign-imm-local-in-op-eq.rs:10:5 - | -LL | v = 2; - | ----- first assignment to `v` -LL | -LL | v += 1; - | ^^^^^^ cannot assign twice to immutable variable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.mir.stderr b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.mir.stderr deleted file mode 100644 index a6a1c73a78..0000000000 --- a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.mir.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `v` - --> $DIR/liveness-assign-imm-local-in-op-eq.rs:10:5 - | -LL | let v: isize; - | - help: make this binding mutable: `mut v` -... -LL | v = 2; - | ----- first assignment to `v` -LL | -LL | v += 1; - | ^^^^^^ cannot assign twice to immutable variable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.rs b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.rs index a2677f4e22..f24f7d2bcf 100644 --- a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.rs +++ b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.rs @@ -1,16 +1,10 @@ -// revisions: ast mir -//[mir]compile-flags: -Zborrowck=mir - fn test() { let v: isize; - //[mir]~^ HELP make this binding mutable - //[mir]~| SUGGESTION mut v - v = 2; //[ast]~ NOTE first assignment - //[mir]~^ NOTE first assignment - v += 1; //[ast]~ ERROR cannot assign twice to immutable variable - //[mir]~^ ERROR cannot assign twice to immutable variable `v` - //[ast]~| NOTE cannot assign twice to immutable - //[mir]~| NOTE cannot assign twice to immutable + //~^ HELP make this binding mutable + //~| SUGGESTION mut v + v = 2; //~ NOTE first assignment + v += 1; //~ ERROR cannot assign twice to immutable variable `v` + //~| NOTE cannot assign twice to immutable v.clone(); } diff --git a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.ast.nll.stderr b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.stderr similarity index 86% rename from src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.ast.nll.stderr rename to src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.stderr index a6a1c73a78..182958dd49 100644 --- a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.ast.nll.stderr +++ b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-in-op-eq.stderr @@ -1,12 +1,11 @@ error[E0384]: cannot assign twice to immutable variable `v` - --> $DIR/liveness-assign-imm-local-in-op-eq.rs:10:5 + --> $DIR/liveness-assign-imm-local-in-op-eq.rs:6:5 | LL | let v: isize; | - help: make this binding mutable: `mut v` ... LL | v = 2; | ----- first assignment to `v` -LL | LL | v += 1; | ^^^^^^ cannot assign twice to immutable variable diff --git a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.ast.stderr b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.ast.stderr deleted file mode 100644 index 108ca48f2f..0000000000 --- a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.ast.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `b` - --> $DIR/liveness-assign-imm-local-with-drop.rs:10:5 - | -LL | let b = Box::new(1); - | - first assignment to `b` -... -LL | b = Box::new(2); - | ^^^^^^^^^^^^^^^ cannot assign twice to immutable variable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.mir.stderr b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.mir.stderr deleted file mode 100644 index 8316ffd7f5..0000000000 --- a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.mir.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `b` - --> $DIR/liveness-assign-imm-local-with-drop.rs:10:5 - | -LL | let b = Box::new(1); - | - - | | - | first assignment to `b` - | help: make this binding mutable: `mut b` -... -LL | b = Box::new(2); - | ^ cannot assign twice to immutable variable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.rs b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.rs index 4a81dcd3cf..8963e32717 100644 --- a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.rs +++ b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.rs @@ -1,16 +1,10 @@ -// revisions: ast mir -//[mir]compile-flags: -Zborrowck=mir - fn test() { - let b = Box::new(1); //[ast]~ NOTE first assignment - //[mir]~^ NOTE first assignment - //[mir]~| HELP make this binding mutable - //[mir]~| SUGGESTION mut b + let b = Box::new(1); //~ NOTE first assignment + //~| HELP make this binding mutable + //~| SUGGESTION mut b drop(b); - b = Box::new(2); //[ast]~ ERROR cannot assign twice to immutable variable - //[mir]~^ ERROR cannot assign twice to immutable variable `b` - //[ast]~| NOTE cannot assign twice to immutable - //[mir]~| NOTE cannot assign twice to immutable + b = Box::new(2); //~ ERROR cannot assign twice to immutable variable `b` + //~| NOTE cannot assign twice to immutable drop(b); } diff --git a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.ast.nll.stderr b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.stderr similarity index 88% rename from src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.ast.nll.stderr rename to src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.stderr index 8316ffd7f5..7c4af624b2 100644 --- a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.ast.nll.stderr +++ b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-drop.stderr @@ -1,5 +1,5 @@ error[E0384]: cannot assign twice to immutable variable `b` - --> $DIR/liveness-assign-imm-local-with-drop.rs:10:5 + --> $DIR/liveness-assign-imm-local-with-drop.rs:6:5 | LL | let b = Box::new(1); | - diff --git a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.ast.nll.stderr b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.ast.nll.stderr deleted file mode 100644 index 5fa06f93c1..0000000000 --- a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.ast.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `v` - --> $DIR/liveness-assign-imm-local-with-init.rs:10:5 - | -LL | let v: isize = 1; - | - - | | - | first assignment to `v` - | help: make this binding mutable: `mut v` -... -LL | v = 2; - | ^^^^^ cannot assign twice to immutable variable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.ast.stderr b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.ast.stderr deleted file mode 100644 index 34fb160bba..0000000000 --- a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.ast.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `v` - --> $DIR/liveness-assign-imm-local-with-init.rs:10:5 - | -LL | let v: isize = 1; - | - first assignment to `v` -... -LL | v = 2; - | ^^^^^ cannot assign twice to immutable variable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.rs b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.rs index 2c59aaf4f9..4ab222af8d 100644 --- a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.rs +++ b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.rs @@ -1,16 +1,10 @@ -// revisions: ast mir -//[mir]compile-flags: -Zborrowck=mir - fn test() { - let v: isize = 1; //[ast]~ NOTE first assignment - //[mir]~^ NOTE first assignment - //[mir]~| HELP make this binding mutable - //[mir]~| SUGGESTION mut v + let v: isize = 1; //~ NOTE first assignment + //~| HELP make this binding mutable + //~| SUGGESTION mut v v.clone(); - v = 2; //[ast]~ ERROR cannot assign twice to immutable variable - //[mir]~^ ERROR cannot assign twice to immutable variable `v` - //[ast]~| NOTE cannot assign twice to immutable - //[mir]~| NOTE cannot assign twice to immutable + v = 2; //~ ERROR cannot assign twice to immutable variable `v` + //~| NOTE cannot assign twice to immutable v.clone(); } diff --git a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.mir.stderr b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.stderr similarity index 87% rename from src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.mir.stderr rename to src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.stderr index 5fa06f93c1..6f5d557487 100644 --- a/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.mir.stderr +++ b/src/test/ui/liveness/liveness-assign/liveness-assign-imm-local-with-init.stderr @@ -1,5 +1,5 @@ error[E0384]: cannot assign twice to immutable variable `v` - --> $DIR/liveness-assign-imm-local-with-init.rs:10:5 + --> $DIR/liveness-assign-imm-local-with-init.rs:6:5 | LL | let v: isize = 1; | - diff --git a/src/test/ui/liveness/liveness-move-call-arg.nll.stderr b/src/test/ui/liveness/liveness-move-call-arg.nll.stderr deleted file mode 100644 index ab4460a326..0000000000 --- a/src/test/ui/liveness/liveness-move-call-arg.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0382]: use of moved value: `x` - --> $DIR/liveness-move-call-arg.rs:9:14 - | -LL | let x: Box = box 25; - | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait -LL | loop { -LL | take(x); - | ^ value moved here, in previous iteration of loop - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/liveness/liveness-move-call-arg.stderr b/src/test/ui/liveness/liveness-move-call-arg.stderr index c50c01e2a9..ab4460a326 100644 --- a/src/test/ui/liveness/liveness-move-call-arg.stderr +++ b/src/test/ui/liveness/liveness-move-call-arg.stderr @@ -1,10 +1,11 @@ error[E0382]: use of moved value: `x` --> $DIR/liveness-move-call-arg.rs:9:14 | +LL | let x: Box = box 25; + | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait +LL | loop { LL | take(x); - | ^ value moved here in previous iteration of loop - | - = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | ^ value moved here, in previous iteration of loop error: aborting due to previous error diff --git a/src/test/ui/liveness/liveness-move-in-loop.nll.stderr b/src/test/ui/liveness/liveness-move-in-loop.nll.stderr deleted file mode 100644 index 150c1ec82b..0000000000 --- a/src/test/ui/liveness/liveness-move-in-loop.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0382]: use of moved value: `y` - --> $DIR/liveness-move-in-loop.rs:11:25 - | -LL | let y: Box = box 42; - | - move occurs because `y` has type `std::boxed::Box`, which does not implement the `Copy` trait -... -LL | x = y; - | ^ value moved here, in previous iteration of loop - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/liveness/liveness-move-in-loop.stderr b/src/test/ui/liveness/liveness-move-in-loop.stderr index 52e83a6a68..150c1ec82b 100644 --- a/src/test/ui/liveness/liveness-move-in-loop.stderr +++ b/src/test/ui/liveness/liveness-move-in-loop.stderr @@ -1,10 +1,11 @@ error[E0382]: use of moved value: `y` --> $DIR/liveness-move-in-loop.rs:11:25 | +LL | let y: Box = box 42; + | - move occurs because `y` has type `std::boxed::Box`, which does not implement the `Copy` trait +... LL | x = y; - | ^ value moved here in previous iteration of loop - | - = note: move occurs because `y` has type `std::boxed::Box`, which does not implement the `Copy` trait + | ^ value moved here, in previous iteration of loop error: aborting due to previous error diff --git a/src/test/ui/liveness/liveness-move-in-while.nll.stderr b/src/test/ui/liveness/liveness-move-in-while.nll.stderr deleted file mode 100644 index e1eed1b59f..0000000000 --- a/src/test/ui/liveness/liveness-move-in-while.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0382]: borrow of moved value: `y` - --> $DIR/liveness-move-in-while.rs:7:24 - | -LL | let y: Box = box 42; - | - move occurs because `y` has type `std::boxed::Box`, which does not implement the `Copy` trait -... -LL | println!("{}", y); - | ^ value borrowed here after move -LL | while true { while true { while true { x = y; x.clone(); } } } - | - value moved here, in previous iteration of loop - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/liveness/liveness-move-in-while.rs b/src/test/ui/liveness/liveness-move-in-while.rs index a43e75982a..420d1311f8 100644 --- a/src/test/ui/liveness/liveness-move-in-while.rs +++ b/src/test/ui/liveness/liveness-move-in-while.rs @@ -4,8 +4,7 @@ fn main() { let y: Box = box 42; let mut x: Box; loop { - println!("{}", y); //~ ERROR use of moved value: `y` + println!("{}", y); //~ ERROR borrow of moved value: `y` while true { while true { while true { x = y; x.clone(); } } } - //~^ ERROR use of moved value: `y` } } diff --git a/src/test/ui/liveness/liveness-move-in-while.stderr b/src/test/ui/liveness/liveness-move-in-while.stderr index 61b4cd8c63..e1eed1b59f 100644 --- a/src/test/ui/liveness/liveness-move-in-while.stderr +++ b/src/test/ui/liveness/liveness-move-in-while.stderr @@ -1,21 +1,14 @@ -error[E0382]: use of moved value: `y` +error[E0382]: borrow of moved value: `y` --> $DIR/liveness-move-in-while.rs:7:24 | +LL | let y: Box = box 42; + | - move occurs because `y` has type `std::boxed::Box`, which does not implement the `Copy` trait +... LL | println!("{}", y); - | ^ value used here after move + | ^ value borrowed here after move LL | while true { while true { while true { x = y; x.clone(); } } } - | - value moved here - | - = note: move occurs because `y` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `y` - --> $DIR/liveness-move-in-while.rs:8:52 - | -LL | while true { while true { while true { x = y; x.clone(); } } } - | ^ value moved here in previous iteration of loop - | - = note: move occurs because `y` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - value moved here, in previous iteration of loop -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/liveness/liveness-use-after-move.nll.stderr b/src/test/ui/liveness/liveness-use-after-move.nll.stderr deleted file mode 100644 index 383b89afaa..0000000000 --- a/src/test/ui/liveness/liveness-use-after-move.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: borrow of moved value: `x` - --> $DIR/liveness-use-after-move.rs:6:20 - | -LL | let x: Box<_> = box 5; - | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait -LL | let y = x; - | - value moved here -LL | println!("{}", *x); - | ^^ value borrowed here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/liveness/liveness-use-after-move.rs b/src/test/ui/liveness/liveness-use-after-move.rs index 157587c7a7..5263e29360 100644 --- a/src/test/ui/liveness/liveness-use-after-move.rs +++ b/src/test/ui/liveness/liveness-use-after-move.rs @@ -3,6 +3,6 @@ fn main() { let x: Box<_> = box 5; let y = x; - println!("{}", *x); //~ ERROR use of moved value: `*x` + println!("{}", *x); //~ ERROR borrow of moved value: `x` y.clone(); } diff --git a/src/test/ui/liveness/liveness-use-after-move.stderr b/src/test/ui/liveness/liveness-use-after-move.stderr index ce192ae05f..383b89afaa 100644 --- a/src/test/ui/liveness/liveness-use-after-move.stderr +++ b/src/test/ui/liveness/liveness-use-after-move.stderr @@ -1,12 +1,12 @@ -error[E0382]: use of moved value: `*x` +error[E0382]: borrow of moved value: `x` --> $DIR/liveness-use-after-move.rs:6:20 | +LL | let x: Box<_> = box 5; + | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait LL | let y = x; - | - value moved here + | - value moved here LL | println!("{}", *x); - | ^^ value used here after move - | - = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | ^^ value borrowed here after move error: aborting due to previous error diff --git a/src/test/ui/liveness/liveness-use-after-send.nll.stderr b/src/test/ui/liveness/liveness-use-after-send.nll.stderr deleted file mode 100644 index ccf9499f64..0000000000 --- a/src/test/ui/liveness/liveness-use-after-send.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: borrow of moved value: `message` - --> $DIR/liveness-use-after-send.rs:16:20 - | -LL | fn test00_start(ch: Chan>, message: Box, _count: Box) { - | ------- move occurs because `message` has type `std::boxed::Box`, which does not implement the `Copy` trait -LL | send(ch, message); - | ------- value moved here -LL | println!("{}", message); - | ^^^^^^^ value borrowed here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/liveness/liveness-use-after-send.rs b/src/test/ui/liveness/liveness-use-after-send.rs index 7f2cc3c00f..6fcd91a9d9 100644 --- a/src/test/ui/liveness/liveness-use-after-send.rs +++ b/src/test/ui/liveness/liveness-use-after-send.rs @@ -13,7 +13,7 @@ struct Chan(isize, marker::PhantomData); // message after the send deinitializes it fn test00_start(ch: Chan>, message: Box, _count: Box) { send(ch, message); - println!("{}", message); //~ ERROR use of moved value: `message` + println!("{}", message); //~ ERROR borrow of moved value: `message` } fn main() { panic!(); } diff --git a/src/test/ui/liveness/liveness-use-after-send.stderr b/src/test/ui/liveness/liveness-use-after-send.stderr index 28173285fb..ccf9499f64 100644 --- a/src/test/ui/liveness/liveness-use-after-send.stderr +++ b/src/test/ui/liveness/liveness-use-after-send.stderr @@ -1,12 +1,12 @@ -error[E0382]: use of moved value: `message` +error[E0382]: borrow of moved value: `message` --> $DIR/liveness-use-after-send.rs:16:20 | +LL | fn test00_start(ch: Chan>, message: Box, _count: Box) { + | ------- move occurs because `message` has type `std::boxed::Box`, which does not implement the `Copy` trait LL | send(ch, message); | ------- value moved here LL | println!("{}", message); - | ^^^^^^^ value used here after move - | - = note: move occurs because `message` has type `std::boxed::Box`, which does not implement the `Copy` trait + | ^^^^^^^ value borrowed here after move error: aborting due to previous error diff --git a/src/test/ui/loops/loop-break-value.stderr b/src/test/ui/loops/loop-break-value.stderr index 8823eecab6..13fe508554 100644 --- a/src/test/ui/loops/loop-break-value.stderr +++ b/src/test/ui/loops/loop-break-value.stderr @@ -152,5 +152,5 @@ LL | break; error: aborting due to 16 previous errors -Some errors occurred: E0308, E0571. +Some errors have detailed explanations: E0308, E0571. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/loops/loop-proper-liveness.nll.stderr b/src/test/ui/loops/loop-proper-liveness.nll.stderr deleted file mode 100644 index c87720659f..0000000000 --- a/src/test/ui/loops/loop-proper-liveness.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0381]: borrow of possibly uninitialized variable: `x` - --> $DIR/loop-proper-liveness.rs:9:22 - | -LL | println!("{:?}", x); - | ^ use of possibly uninitialized `x` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/loops/loop-proper-liveness.rs b/src/test/ui/loops/loop-proper-liveness.rs index fd9d661222..b8f76fbe57 100644 --- a/src/test/ui/loops/loop-proper-liveness.rs +++ b/src/test/ui/loops/loop-proper-liveness.rs @@ -6,7 +6,7 @@ fn test1() { 'a: loop { x = loop { break 'a }; } - println!("{:?}", x); //~ ERROR use of possibly uninitialized variable + println!("{:?}", x); //~ ERROR borrow of possibly uninitialized variable } // test2 and test3 should not fail. diff --git a/src/test/ui/loops/loop-proper-liveness.stderr b/src/test/ui/loops/loop-proper-liveness.stderr index 392b961fa0..c87720659f 100644 --- a/src/test/ui/loops/loop-proper-liveness.stderr +++ b/src/test/ui/loops/loop-proper-liveness.stderr @@ -1,4 +1,4 @@ -error[E0381]: use of possibly uninitialized variable: `x` +error[E0381]: borrow of possibly uninitialized variable: `x` --> $DIR/loop-proper-liveness.rs:9:22 | LL | println!("{:?}", x); diff --git a/src/test/ui/lub-if.nll.stderr b/src/test/ui/lub-if.nll.stderr new file mode 100644 index 0000000000..832688f516 --- /dev/null +++ b/src/test/ui/lub-if.nll.stderr @@ -0,0 +1,20 @@ +error: lifetime may not live long enough + --> $DIR/lub-if.rs:28:9 + | +LL | pub fn opt_str2<'a>(maybestr: &'a Option) -> &'static str { + | -- lifetime `'a` defined here +... +LL | s + | ^ returning this value requires that `'a` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/lub-if.rs:35:9 + | +LL | pub fn opt_str3<'a>(maybestr: &'a Option) -> &'static str { + | -- lifetime `'a` defined here +... +LL | s + | ^ returning this value requires that `'a` must outlive `'static` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/lub-if.stderr b/src/test/ui/lub-if.stderr index 26f756c918..bb772d4c6c 100644 --- a/src/test/ui/lub-if.stderr +++ b/src/test/ui/lub-if.stderr @@ -26,4 +26,3 @@ LL | pub fn opt_str3<'a>(maybestr: &'a Option) -> &'static str { error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0312`. diff --git a/src/test/ui/lub-match.nll.stderr b/src/test/ui/lub-match.nll.stderr new file mode 100644 index 0000000000..3a344a77d2 --- /dev/null +++ b/src/test/ui/lub-match.nll.stderr @@ -0,0 +1,20 @@ +error: lifetime may not live long enough + --> $DIR/lub-match.rs:30:13 + | +LL | pub fn opt_str2<'a>(maybestr: &'a Option) -> &'static str { + | -- lifetime `'a` defined here +... +LL | s + | ^ returning this value requires that `'a` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/lub-match.rs:39:13 + | +LL | pub fn opt_str3<'a>(maybestr: &'a Option) -> &'static str { + | -- lifetime `'a` defined here +... +LL | s + | ^ returning this value requires that `'a` must outlive `'static` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/lub-match.stderr b/src/test/ui/lub-match.stderr index 0cb0a23c6f..090af25143 100644 --- a/src/test/ui/lub-match.stderr +++ b/src/test/ui/lub-match.stderr @@ -26,4 +26,3 @@ LL | pub fn opt_str3<'a>(maybestr: &'a Option) -> &'static str { error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0312`. diff --git a/src/test/ui/macro_backtrace/auxiliary/ping.rs b/src/test/ui/macro_backtrace/auxiliary/ping.rs index efddb209cd..25b9efbc93 100644 --- a/src/test/ui/macro_backtrace/auxiliary/ping.rs +++ b/src/test/ui/macro_backtrace/auxiliary/ping.rs @@ -28,4 +28,3 @@ macro_rules! bar { ping!(); } } - diff --git a/src/test/ui/macros/assert-trailing-junk.rs b/src/test/ui/macros/assert-trailing-junk.rs new file mode 100644 index 0000000000..676ae05bf0 --- /dev/null +++ b/src/test/ui/macros/assert-trailing-junk.rs @@ -0,0 +1,24 @@ +// Ensure assert macro does not ignore trailing garbage. +// +// See https://github.com/rust-lang/rust/issues/60024 for details. + +fn main() { + assert!(true some extra junk, "whatever"); + //~^ ERROR expected one of + + assert!(true some extra junk); + //~^ ERROR expected one of + + assert!(true, "whatever" blah); + //~^ ERROR no rules expected + + assert!(true "whatever" blah); + //~^ WARN unexpected string literal + //~^^ ERROR no rules expected + + assert!(true;); + //~^ WARN macro requires an expression + + assert!(false || true "error message"); + //~^ WARN unexpected string literal +} diff --git a/src/test/ui/macros/assert-trailing-junk.stderr b/src/test/ui/macros/assert-trailing-junk.stderr new file mode 100644 index 0000000000..6fc0a27846 --- /dev/null +++ b/src/test/ui/macros/assert-trailing-junk.stderr @@ -0,0 +1,60 @@ +error: expected one of `,`, `.`, `?`, or an operator, found `some` + --> $DIR/assert-trailing-junk.rs:6:18 + | +LL | assert!(true some extra junk, "whatever"); + | ^^^^ expected one of `,`, `.`, `?`, or an operator here + +error: expected one of `,`, `.`, `?`, or an operator, found `some` + --> $DIR/assert-trailing-junk.rs:9:18 + | +LL | assert!(true some extra junk); + | ^^^^ expected one of `,`, `.`, `?`, or an operator here + +error: no rules expected the token `blah` + --> $DIR/assert-trailing-junk.rs:12:30 + | +LL | assert!(true, "whatever" blah); + | -^^^^ no rules expected this token in macro call + | | + | help: missing comma here + +warning: unexpected string literal + --> $DIR/assert-trailing-junk.rs:15:18 + | +LL | assert!(true "whatever" blah); + | -^^^^^^^^^^ + | | + | help: try adding a comma + | + = note: this is going to be an error in the future + +error: no rules expected the token `blah` + --> $DIR/assert-trailing-junk.rs:15:29 + | +LL | assert!(true "whatever" blah); + | -^^^^ no rules expected this token in macro call + | | + | help: missing comma here + +warning: macro requires an expression as an argument + --> $DIR/assert-trailing-junk.rs:19:5 + | +LL | assert!(true;); + | ^^^^^^^^^^^^-^^ + | | + | help: try removing semicolon + | + = note: this is going to be an error in the future + +warning: unexpected string literal + --> $DIR/assert-trailing-junk.rs:22:27 + | +LL | assert!(false || true "error message"); + | -^^^^^^^^^^^^^^^ + | | + | help: try adding a comma + | + = note: this is going to be an error in the future + +error: aborting due to 4 previous errors + diff --git a/src/test/ui/macros/issue-61033-1.rs b/src/test/ui/macros/issue-61033-1.rs new file mode 100644 index 0000000000..8f85dec017 --- /dev/null +++ b/src/test/ui/macros/issue-61033-1.rs @@ -0,0 +1,9 @@ +// Regression test for issue #61033. + +macro_rules! test1 { + ($x:ident, $($tt:tt)*) => { $($tt)+ } //~ERROR this must repeat at least once +} + +fn main() { + test1!(x,); +} diff --git a/src/test/ui/macros/issue-61033-1.stderr b/src/test/ui/macros/issue-61033-1.stderr new file mode 100644 index 0000000000..f3c68f4928 --- /dev/null +++ b/src/test/ui/macros/issue-61033-1.stderr @@ -0,0 +1,8 @@ +error: this must repeat at least once + --> $DIR/issue-61033-1.rs:4:34 + | +LL | ($x:ident, $($tt:tt)*) => { $($tt)+ } + | ^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/macros/issue-61033-2.rs b/src/test/ui/macros/issue-61033-2.rs new file mode 100644 index 0000000000..0799be10b9 --- /dev/null +++ b/src/test/ui/macros/issue-61033-2.rs @@ -0,0 +1,19 @@ +// Regression test for issue #61033. + +macro_rules! test2 { + ( + $(* $id1:ident)* + $(+ $id2:ident)* + ) => { + $( //~ERROR meta-variable `id1` repeats 2 times + $id1 + $id2 // $id1 and $id2 may repeat different numbers of times + )* + } +} + +fn main() { + test2! { + * a * b + + a + b + c + } +} diff --git a/src/test/ui/macros/issue-61033-2.stderr b/src/test/ui/macros/issue-61033-2.stderr new file mode 100644 index 0000000000..bf502919cf --- /dev/null +++ b/src/test/ui/macros/issue-61033-2.stderr @@ -0,0 +1,11 @@ +error: meta-variable `id1` repeats 2 times, but `id2` repeats 3 times + --> $DIR/issue-61033-2.rs:8:10 + | +LL | $( + | __________^ +LL | | $id1 + $id2 // $id1 and $id2 may repeat different numbers of times +LL | | )* + | |_________^ + +error: aborting due to previous error + diff --git a/src/test/ui/macros/macro-attribute.stderr b/src/test/ui/macros/macro-attribute.stderr index aa1cd94b0c..d28ce25341 100644 --- a/src/test/ui/macros/macro-attribute.stderr +++ b/src/test/ui/macros/macro-attribute.stderr @@ -1,8 +1,8 @@ error: unexpected token: `$` - --> $DIR/macro-attribute.rs:1:7 + --> $DIR/macro-attribute.rs:1:9 | LL | #[doc = $not_there] - | ^ + | ^ error: aborting due to previous error diff --git a/src/test/ui/macros/macro-backtrace-invalid-internals.stderr b/src/test/ui/macros/macro-backtrace-invalid-internals.stderr index 11a4b44eff..015e05ed9b 100644 --- a/src/test/ui/macros/macro-backtrace-invalid-internals.stderr +++ b/src/test/ui/macros/macro-backtrace-invalid-internals.stderr @@ -80,5 +80,5 @@ LL | 2.0_f32.neg() error: aborting due to 8 previous errors -Some errors occurred: E0599, E0610, E0689. +Some errors have detailed explanations: E0599, E0610, E0689. For more information about an error, try `rustc --explain E0599`. diff --git a/src/test/ui/macros/macro-follow.rs b/src/test/ui/macros/macro-follow.rs index 10b44e0017..8054418d9b 100644 --- a/src/test/ui/macros/macro-follow.rs +++ b/src/test/ui/macros/macro-follow.rs @@ -112,4 +112,3 @@ macro_rules! follow_path { // FOLLOW(ident) = any token fn main() {} - diff --git a/src/test/ui/macros/macro-multiple-matcher-bindings.rs b/src/test/ui/macros/macro-multiple-matcher-bindings.rs index 23d566780c..7d39dc0a52 100644 --- a/src/test/ui/macros/macro-multiple-matcher-bindings.rs +++ b/src/test/ui/macros/macro-multiple-matcher-bindings.rs @@ -1,16 +1,11 @@ // Test that duplicate matcher binding names are caught at declaration time, rather than at macro // invocation time. -// -// FIXME(mark-i-m): Update this when it becomes a hard error. - -// compile-pass #![allow(unused_macros)] -#![warn(duplicate_matcher_binding_name)] macro_rules! foo1 { - ($a:ident, $a:ident) => {}; //~WARNING duplicate matcher binding - ($a:ident, $a:path) => {}; //~WARNING duplicate matcher binding + ($a:ident, $a:ident) => {}; //~ERROR duplicate matcher binding + ($a:ident, $a:path) => {}; //~ERROR duplicate matcher binding } macro_rules! foo2 { @@ -19,8 +14,8 @@ macro_rules! foo2 { } macro_rules! foo3 { - ($a:ident, $($a:ident),*) => {}; //~WARNING duplicate matcher binding - ($($a:ident)+ # $($($a:path),+);*) => {}; //~WARNING duplicate matcher binding + ($a:ident, $($a:ident),*) => {}; //~ERROR duplicate matcher binding + ($($a:ident)+ # $($($a:path),+);*) => {}; //~ERROR duplicate matcher binding } fn main() {} diff --git a/src/test/ui/macros/macro-multiple-matcher-bindings.stderr b/src/test/ui/macros/macro-multiple-matcher-bindings.stderr index f7970dbd2e..65362388d7 100644 --- a/src/test/ui/macros/macro-multiple-matcher-bindings.stderr +++ b/src/test/ui/macros/macro-multiple-matcher-bindings.stderr @@ -1,41 +1,50 @@ -warning: duplicate matcher binding - --> $DIR/macro-multiple-matcher-bindings.rs:12:6 +error: duplicate matcher binding + --> $DIR/macro-multiple-matcher-bindings.rs:7:16 | LL | ($a:ident, $a:ident) => {}; - | ^^^^^^^^ ^^^^^^^^ + | ^^^^^^^^ | -note: lint level defined here - --> $DIR/macro-multiple-matcher-bindings.rs:9:9 +note: previous declaration was here + --> $DIR/macro-multiple-matcher-bindings.rs:7:6 | -LL | #![warn(duplicate_matcher_binding_name)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #57593 +LL | ($a:ident, $a:ident) => {}; + | ^^^^^^^^ -warning: duplicate matcher binding - --> $DIR/macro-multiple-matcher-bindings.rs:13:6 +error: duplicate matcher binding + --> $DIR/macro-multiple-matcher-bindings.rs:8:16 | LL | ($a:ident, $a:path) => {}; - | ^^^^^^^^ ^^^^^^^ + | ^^^^^^^ + | +note: previous declaration was here + --> $DIR/macro-multiple-matcher-bindings.rs:8:6 | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #57593 +LL | ($a:ident, $a:path) => {}; + | ^^^^^^^^ -warning: duplicate matcher binding - --> $DIR/macro-multiple-matcher-bindings.rs:22:6 +error: duplicate matcher binding + --> $DIR/macro-multiple-matcher-bindings.rs:17:18 | LL | ($a:ident, $($a:ident),*) => {}; - | ^^^^^^^^ ^^^^^^^^ + | ^^^^^^^^ + | +note: previous declaration was here + --> $DIR/macro-multiple-matcher-bindings.rs:17:6 | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #57593 +LL | ($a:ident, $($a:ident),*) => {}; + | ^^^^^^^^ -warning: duplicate matcher binding - --> $DIR/macro-multiple-matcher-bindings.rs:23:8 +error: duplicate matcher binding + --> $DIR/macro-multiple-matcher-bindings.rs:18:25 | LL | ($($a:ident)+ # $($($a:path),+);*) => {}; - | ^^^^^^^^ ^^^^^^^ + | ^^^^^^^ + | +note: previous declaration was here + --> $DIR/macro-multiple-matcher-bindings.rs:18:8 | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #57593 +LL | ($($a:ident)+ # $($($a:path),+);*) => {}; + | ^^^^^^^^ + +error: aborting due to 4 previous errors diff --git a/src/test/ui/macros/macro-path-prelude-fail-1.rs b/src/test/ui/macros/macro-path-prelude-fail-1.rs index 354c2bf857..cd695ca916 100644 --- a/src/test/ui/macros/macro-path-prelude-fail-1.rs +++ b/src/test/ui/macros/macro-path-prelude-fail-1.rs @@ -2,8 +2,8 @@ mod m { fn check() { - Vec::clone!(); //~ ERROR failed to resolve: not a module `Vec` - u8::clone!(); //~ ERROR failed to resolve: not a module `u8` + Vec::clone!(); //~ ERROR failed to resolve: `Vec` is a struct, not a module + u8::clone!(); //~ ERROR failed to resolve: `u8` is a builtin type, not a module } } diff --git a/src/test/ui/macros/macro-path-prelude-fail-1.stderr b/src/test/ui/macros/macro-path-prelude-fail-1.stderr index 551d2fe8ce..b68e89f07f 100644 --- a/src/test/ui/macros/macro-path-prelude-fail-1.stderr +++ b/src/test/ui/macros/macro-path-prelude-fail-1.stderr @@ -1,14 +1,14 @@ -error[E0433]: failed to resolve: not a module `Vec` +error[E0433]: failed to resolve: `Vec` is a struct, not a module --> $DIR/macro-path-prelude-fail-1.rs:5:9 | LL | Vec::clone!(); - | ^^^ not a module `Vec` + | ^^^ `Vec` is a struct, not a module -error[E0433]: failed to resolve: not a module `u8` +error[E0433]: failed to resolve: `u8` is a builtin type, not a module --> $DIR/macro-path-prelude-fail-1.rs:6:9 | LL | u8::clone!(); - | ^^ not a module `u8` + | ^^ `u8` is a builtin type, not a module error: aborting due to 2 previous errors diff --git a/src/test/ui/macros/macro-reexport-removed.stderr b/src/test/ui/macros/macro-reexport-removed.stderr index 302952909b..742a72964d 100644 --- a/src/test/ui/macros/macro-reexport-removed.stderr +++ b/src/test/ui/macros/macro-reexport-removed.stderr @@ -10,15 +10,16 @@ note: subsumed by `pub use` LL | #![feature(macro_reexport)] | ^^^^^^^^^^^^^^ -error[E0658]: The attribute `macro_reexport` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `macro_reexport` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/macro-reexport-removed.rs:5:3 | LL | #[macro_reexport(macro_one)] | ^^^^^^^^^^^^^^ help: a built-in attribute with a similar name exists: `macro_export` | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable error: aborting due to 2 previous errors -Some errors occurred: E0557, E0658. +Some errors have detailed explanations: E0557, E0658. For more information about an error, try `rustc --explain E0557`. diff --git a/src/test/ui/macros/macros-in-extern.stderr b/src/test/ui/macros/macros-in-extern.stderr index 1d0c28752b..ec7c37402d 100644 --- a/src/test/ui/macros/macros-in-extern.stderr +++ b/src/test/ui/macros/macros-in-extern.stderr @@ -1,25 +1,28 @@ -error[E0658]: macro invocations in `extern {}` blocks are experimental (see issue #49476) +error[E0658]: macro invocations in `extern {}` blocks are experimental --> $DIR/macros-in-extern.rs:26:5 | LL | returns_isize!(rust_get_test_int); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/49476 = help: add #![feature(macros_in_extern)] to the crate attributes to enable -error[E0658]: macro invocations in `extern {}` blocks are experimental (see issue #49476) +error[E0658]: macro invocations in `extern {}` blocks are experimental --> $DIR/macros-in-extern.rs:28:5 | LL | takes_u32_returns_u32!(rust_dbg_extern_identity_u32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/49476 = help: add #![feature(macros_in_extern)] to the crate attributes to enable -error[E0658]: macro invocations in `extern {}` blocks are experimental (see issue #49476) +error[E0658]: macro invocations in `extern {}` blocks are experimental --> $DIR/macros-in-extern.rs:30:5 | LL | emits_nothing!(); | ^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/49476 = help: add #![feature(macros_in_extern)] to the crate attributes to enable error: aborting due to 3 previous errors diff --git a/src/test/ui/macros/macros-nonfatal-errors.stderr b/src/test/ui/macros/macros-nonfatal-errors.stderr index 8a8455c262..f0ea5761bc 100644 --- a/src/test/ui/macros/macros-nonfatal-errors.stderr +++ b/src/test/ui/macros/macros-nonfatal-errors.stderr @@ -88,4 +88,3 @@ LL | trace_macros!(invalid); error: aborting due to 14 previous errors -For more information about this error, try `rustc --explain E0665`. diff --git a/src/test/ui/macros/missing-comma.rs b/src/test/ui/macros/missing-comma.rs index 2b411aba8a..2002fed6c9 100644 --- a/src/test/ui/macros/missing-comma.rs +++ b/src/test/ui/macros/missing-comma.rs @@ -10,6 +10,10 @@ macro_rules! bar { ($lvl:expr, $($arg:tt)+) => {} } +macro_rules! check { + ($ty:ty, $expected:expr) => {}; + ($ty_of:expr, $expected:expr) => {}; +} fn main() { println!("{}" a); @@ -24,4 +28,7 @@ fn main() { //~^ ERROR no rules expected the token `d` bar!(Level::Error, ); //~^ ERROR unexpected end of macro invocation + check!(::fmt, "fmt"); + check!(::fmt, "fmt",); + //~^ ERROR no rules expected the token `,` } diff --git a/src/test/ui/macros/missing-comma.stderr b/src/test/ui/macros/missing-comma.stderr index 424fefd00f..d5b6d86b20 100644 --- a/src/test/ui/macros/missing-comma.stderr +++ b/src/test/ui/macros/missing-comma.stderr @@ -1,11 +1,11 @@ error: expected token: `,` - --> $DIR/missing-comma.rs:15:19 + --> $DIR/missing-comma.rs:19:19 | LL | println!("{}" a); | ^ error: no rules expected the token `b` - --> $DIR/missing-comma.rs:17:12 + --> $DIR/missing-comma.rs:21:12 | LL | macro_rules! foo { | ---------------- when calling this macro @@ -16,7 +16,7 @@ LL | foo!(a b); | help: missing comma here error: no rules expected the token `e` - --> $DIR/missing-comma.rs:19:21 + --> $DIR/missing-comma.rs:23:21 | LL | macro_rules! foo { | ---------------- when calling this macro @@ -27,7 +27,7 @@ LL | foo!(a, b, c, d e); | help: missing comma here error: no rules expected the token `d` - --> $DIR/missing-comma.rs:21:18 + --> $DIR/missing-comma.rs:25:18 | LL | macro_rules! foo { | ---------------- when calling this macro @@ -38,7 +38,7 @@ LL | foo!(a, b, c d, e); | help: missing comma here error: no rules expected the token `d` - --> $DIR/missing-comma.rs:23:18 + --> $DIR/missing-comma.rs:27:18 | LL | macro_rules! foo { | ---------------- when calling this macro @@ -47,7 +47,7 @@ LL | foo!(a, b, c d e); | ^ no rules expected this token in macro call error: unexpected end of macro invocation - --> $DIR/missing-comma.rs:25:23 + --> $DIR/missing-comma.rs:29:23 | LL | macro_rules! bar { | ---------------- when calling this macro @@ -55,5 +55,14 @@ LL | macro_rules! bar { LL | bar!(Level::Error, ); | ^ missing tokens in macro arguments -error: aborting due to 6 previous errors +error: no rules expected the token `,` + --> $DIR/missing-comma.rs:32:38 + | +LL | macro_rules! check { + | ------------------ when calling this macro +... +LL | check!(::fmt, "fmt",); + | ^ no rules expected this token in macro call + +error: aborting due to 7 previous errors diff --git a/src/test/ui/macros/must-use-in-macro-55516.rs b/src/test/ui/macros/must-use-in-macro-55516.rs index 10e5646dc3..a5de32e5d2 100644 --- a/src/test/ui/macros/must-use-in-macro-55516.rs +++ b/src/test/ui/macros/must-use-in-macro-55516.rs @@ -8,4 +8,3 @@ fn main() { let mut example = String::new(); write!(&mut example, "{}", 42); //~WARN must be used } - diff --git a/src/test/ui/macros/span-covering-argument-1.nll.stderr b/src/test/ui/macros/span-covering-argument-1.nll.stderr deleted file mode 100644 index 2ac881107b..0000000000 --- a/src/test/ui/macros/span-covering-argument-1.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0596]: cannot borrow `foo` as mutable, as it is not declared as mutable - --> $DIR/span-covering-argument-1.rs:5:14 - | -LL | let $s = 0; - | -- help: consider changing this to be mutable: `mut foo` -LL | *&mut $s = 0; - | ^^^^^^^ cannot borrow as mutable -... -LL | bad!(foo whatever); - | ------------------- in this macro invocation - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/macros/span-covering-argument-1.rs b/src/test/ui/macros/span-covering-argument-1.rs index 0256aaf901..9b9506c80b 100644 --- a/src/test/ui/macros/span-covering-argument-1.rs +++ b/src/test/ui/macros/span-covering-argument-1.rs @@ -3,7 +3,7 @@ macro_rules! bad { { let $s = 0; *&mut $s = 0; - //~^ ERROR cannot borrow immutable local variable `foo` as mutable [E0596] + //~^ ERROR cannot borrow `foo` as mutable, as it is not declared as mutable [E0596] } } } diff --git a/src/test/ui/macros/span-covering-argument-1.stderr b/src/test/ui/macros/span-covering-argument-1.stderr index 345b880cca..2ac881107b 100644 --- a/src/test/ui/macros/span-covering-argument-1.stderr +++ b/src/test/ui/macros/span-covering-argument-1.stderr @@ -1,10 +1,10 @@ -error[E0596]: cannot borrow immutable local variable `foo` as mutable - --> $DIR/span-covering-argument-1.rs:5:19 +error[E0596]: cannot borrow `foo` as mutable, as it is not declared as mutable + --> $DIR/span-covering-argument-1.rs:5:14 | LL | let $s = 0; - | -- help: make this binding mutable: `mut $s` + | -- help: consider changing this to be mutable: `mut foo` LL | *&mut $s = 0; - | ^^ cannot borrow mutably + | ^^^^^^^ cannot borrow as mutable ... LL | bad!(foo whatever); | ------------------- in this macro invocation diff --git a/src/test/ui/malformed/malformed-interpolated.rs b/src/test/ui/malformed/malformed-interpolated.rs index e452435968..7c4ca3c017 100644 --- a/src/test/ui/malformed/malformed-interpolated.rs +++ b/src/test/ui/malformed/malformed-interpolated.rs @@ -2,8 +2,7 @@ macro_rules! check { ($expr: expr) => ( - #[my_attr = $expr] //~ ERROR suffixed literals are not allowed in attributes - //~| ERROR unexpected token: `-0` + #[my_attr = $expr] //~ ERROR unexpected token: `-0` //~| ERROR unexpected token: `0 + 0` use main as _; ); @@ -11,7 +10,7 @@ macro_rules! check { check!("0"); // OK check!(0); // OK -check!(0u8); // ERROR, see above +check!(0u8); //~ ERROR suffixed literals are not allowed in attributes check!(-0); // ERROR, see above check!(0 + 0); // ERROR, see above diff --git a/src/test/ui/malformed/malformed-interpolated.stderr b/src/test/ui/malformed/malformed-interpolated.stderr index efeede0148..e805416172 100644 --- a/src/test/ui/malformed/malformed-interpolated.stderr +++ b/src/test/ui/malformed/malformed-interpolated.stderr @@ -1,28 +1,25 @@ error: suffixed literals are not allowed in attributes - --> $DIR/malformed-interpolated.rs:5:21 + --> $DIR/malformed-interpolated.rs:13:8 | -LL | #[my_attr = $expr] - | ^^^^^ -... -LL | check!(0u8); // ERROR, see above - | ------------ in this macro invocation +LL | check!(0u8); + | ^^^ | = help: instead of using a suffixed literal (1u8, 1.0f32, etc.), use an unsuffixed version (1, 1.0, etc.). error: unexpected token: `-0` - --> $DIR/malformed-interpolated.rs:5:19 + --> $DIR/malformed-interpolated.rs:5:21 | LL | #[my_attr = $expr] - | ^ + | ^^^^^ ... LL | check!(-0); // ERROR, see above | ----------- in this macro invocation error: unexpected token: `0 + 0` - --> $DIR/malformed-interpolated.rs:5:19 + --> $DIR/malformed-interpolated.rs:5:21 | LL | #[my_attr = $expr] - | ^ + | ^^^^^ ... LL | check!(0 + 0); // ERROR, see above | -------------- in this macro invocation diff --git a/src/test/ui/malformed/malformed-plugin-3.stderr b/src/test/ui/malformed/malformed-plugin-3.stderr index 5739770ad9..bcbbcd48c6 100644 --- a/src/test/ui/malformed/malformed-plugin-3.stderr +++ b/src/test/ui/malformed/malformed-plugin-3.stderr @@ -6,4 +6,3 @@ LL | #![plugin(foo="bleh")] error: aborting due to previous error -For more information about this error, try `rustc --explain E0498`. diff --git a/src/test/ui/malformed/malformed-regressions.stderr b/src/test/ui/malformed/malformed-regressions.stderr index 9a81c1056c..99a87f0c3a 100644 --- a/src/test/ui/malformed/malformed-regressions.stderr +++ b/src/test/ui/malformed/malformed-regressions.stderr @@ -27,7 +27,7 @@ LL | #[inline = ""] = note: for more information, see issue #57571 warning: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", - /*opt*/ cfg = "...")]` + /*opt*/ cfg = "...")]` --> $DIR/malformed-regressions.rs:6:1 | LL | #[link] @@ -37,7 +37,7 @@ LL | #[link] = note: for more information, see issue #57571 warning: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", - /*opt*/ cfg = "...")]` + /*opt*/ cfg = "...")]` --> $DIR/malformed-regressions.rs:7:1 | LL | #[link = ""] diff --git a/src/test/ui/match/match-argm-statics-2.rs b/src/test/ui/match/match-argm-statics-2.rs index ad220d2f43..4c5f2d3564 100644 --- a/src/test/ui/match/match-argm-statics-2.rs +++ b/src/test/ui/match/match-argm-statics-2.rs @@ -60,4 +60,3 @@ fn main() { nonexhaustive_2(); nonexhaustive_3(); } - diff --git a/src/test/ui/match/match-byte-array-patterns-2.rs b/src/test/ui/match/match-byte-array-patterns-2.rs index a3a47d23be..33468d03fa 100644 --- a/src/test/ui/match/match-byte-array-patterns-2.rs +++ b/src/test/ui/match/match-byte-array-patterns-2.rs @@ -11,4 +11,3 @@ fn main() { b"AAAA" => {} } } - diff --git a/src/test/ui/match/match-range-fail-2.stderr b/src/test/ui/match/match-range-fail-2.stderr index b9e4534fdf..52a2bf2b34 100644 --- a/src/test/ui/match/match-range-fail-2.stderr +++ b/src/test/ui/match/match-range-fail-2.stderr @@ -18,5 +18,5 @@ LL | 0xFFFF_FFFF_FFFF_FFFF ..= 1 => { } error: aborting due to 3 previous errors -Some errors occurred: E0030, E0579. +Some errors have detailed explanations: E0030, E0579. For more information about an error, try `rustc --explain E0030`. diff --git a/src/test/ui/match/match-range-fail-dominate.stderr b/src/test/ui/match/match-range-fail-dominate.stderr index d35394aa38..0f5ab7fff3 100644 --- a/src/test/ui/match/match-range-fail-dominate.stderr +++ b/src/test/ui/match/match-range-fail-dominate.stderr @@ -62,5 +62,14 @@ error: unreachable pattern LL | 0.02f64 => {} | ^^^^^^^ +warning: floating-point types cannot be used in patterns + --> $DIR/match-range-fail-dominate.rs:35:7 + | +LL | 0.01f64 ... 6.5f64 => {} + | ^^^^^^^ + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #41620 + error: aborting due to 5 previous errors diff --git a/src/test/ui/match/match-range-fail.stderr b/src/test/ui/match/match-range-fail.stderr index 5496992743..3fd2a499e2 100644 --- a/src/test/ui/match/match-range-fail.stderr +++ b/src/test/ui/match/match-range-fail.stderr @@ -27,5 +27,5 @@ LL | 'c' ..= 100 => { } error: aborting due to 3 previous errors -Some errors occurred: E0029, E0308. +Some errors have detailed explanations: E0029, E0308. For more information about an error, try `rustc --explain E0029`. diff --git a/src/test/ui/match/match-ref-mut-invariance.nll.stderr b/src/test/ui/match/match-ref-mut-invariance.nll.stderr new file mode 100644 index 0000000000..505b8db6a3 --- /dev/null +++ b/src/test/ui/match/match-ref-mut-invariance.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/match-ref-mut-invariance.rs:10:9 + | +LL | impl<'b> S<'b> { + | -- lifetime `'b` defined here +LL | fn bar<'a>(&'a mut self) -> &'a mut &'a i32 { + | -- lifetime `'a` defined here +LL | match self.0 { ref mut x => x } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'b` + +error: aborting due to previous error + diff --git a/src/test/ui/match/match-ref-mut-let-invariance.nll.stderr b/src/test/ui/match/match-ref-mut-let-invariance.nll.stderr new file mode 100644 index 0000000000..ab5f43d022 --- /dev/null +++ b/src/test/ui/match/match-ref-mut-let-invariance.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/match-ref-mut-let-invariance.rs:11:9 + | +LL | impl<'b> S<'b> { + | -- lifetime `'b` defined here +LL | fn bar<'a>(&'a mut self) -> &'a mut &'a i32 { + | -- lifetime `'a` defined here +LL | let ref mut x = self.0; +LL | x + | ^ returning this value requires that `'a` must outlive `'b` + +error: aborting due to previous error + diff --git a/src/test/ui/match/match-type-err-first-arm.rs b/src/test/ui/match/match-type-err-first-arm.rs index b4b84ef8f1..8dfbf1019e 100644 --- a/src/test/ui/match/match-type-err-first-arm.rs +++ b/src/test/ui/match/match-type-err-first-arm.rs @@ -3,8 +3,7 @@ fn main() { let _ = test_func2(1); } -fn test_func1(n: i32) -> i32 { - //~^ NOTE expected `i32` because of return type +fn test_func1(n: i32) -> i32 { //~ NOTE expected `i32` because of return type match n { 12 => 'b', //~^ ERROR mismatched types @@ -14,10 +13,8 @@ fn test_func1(n: i32) -> i32 { } fn test_func2(n: i32) -> i32 { - let x = match n { - //~^ NOTE `match` arms have incompatible types - 12 => 'b', - //~^ NOTE this is found to be of type `char` + let x = match n { //~ NOTE `match` arms have incompatible types + 12 => 'b', //~ NOTE this is found to be of type `char` _ => 42, //~^ ERROR match arms have incompatible types //~| NOTE expected char, found integer @@ -27,8 +24,7 @@ fn test_func2(n: i32) -> i32 { } fn test_func3(n: i32) -> i32 { - let x = match n { - //~^ NOTE `match` arms have incompatible types + let x = match n { //~ NOTE `match` arms have incompatible types 1 => 'b', 2 => 'b', 3 => 'b', @@ -43,3 +39,15 @@ fn test_func3(n: i32) -> i32 { }; x } + +fn test_func4() { + match Some(0u32) { //~ NOTE `match` arms have incompatible types + Some(x) => { + x //~ NOTE this is found to be of type `u32` + }, + None => {} + //~^ ERROR match arms have incompatible types + //~| NOTE expected u32, found () + //~| NOTE expected type `u32` + }; +} diff --git a/src/test/ui/match/match-type-err-first-arm.stderr b/src/test/ui/match/match-type-err-first-arm.stderr index a318e6cffb..e0553fca68 100644 --- a/src/test/ui/match/match-type-err-first-arm.stderr +++ b/src/test/ui/match/match-type-err-first-arm.stderr @@ -1,24 +1,23 @@ error[E0308]: mismatched types - --> $DIR/match-type-err-first-arm.rs:9:15 + --> $DIR/match-type-err-first-arm.rs:8:15 | LL | fn test_func1(n: i32) -> i32 { | --- expected `i32` because of return type -... +LL | match n { LL | 12 => 'b', | ^^^ expected i32, found char error[E0308]: match arms have incompatible types - --> $DIR/match-type-err-first-arm.rs:21:14 + --> $DIR/match-type-err-first-arm.rs:18:14 | LL | let x = match n { | _____________- -LL | | LL | | 12 => 'b', | | --- this is found to be of type `char` -LL | | LL | | _ => 42, | | ^^ expected char, found integer -... | +LL | | +LL | | LL | | LL | | }; | |_____- `match` arms have incompatible types @@ -27,13 +26,13 @@ LL | | }; found type `{integer}` error[E0308]: match arms have incompatible types - --> $DIR/match-type-err-first-arm.rs:39:14 + --> $DIR/match-type-err-first-arm.rs:35:14 | LL | let x = match n { | _____________- -LL | | LL | | 1 => 'b', LL | | 2 => 'b', +LL | | 3 => 'b', ... | LL | | 6 => 'b', | | --- this and all prior arms are found to be of type `char` @@ -48,6 +47,24 @@ LL | | }; = note: expected type `char` found type `{integer}` -error: aborting due to 3 previous errors +error[E0308]: match arms have incompatible types + --> $DIR/match-type-err-first-arm.rs:48:17 + | +LL | / match Some(0u32) { +LL | | Some(x) => { +LL | | x + | | - this is found to be of type `u32` +LL | | }, +LL | | None => {} + | | ^^ expected u32, found () +... | +LL | | +LL | | }; + | |_____- `match` arms have incompatible types + | + = note: expected type `u32` + found type `()` + +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/match/match-vec-mismatch.stderr b/src/test/ui/match/match-vec-mismatch.stderr index e19a0f956c..47f9d48e26 100644 --- a/src/test/ui/match/match-vec-mismatch.stderr +++ b/src/test/ui/match/match-vec-mismatch.stderr @@ -32,5 +32,5 @@ LL | [] => {} error: aborting due to 5 previous errors -Some errors occurred: E0282, E0425, E0527, E0528, E0529. +Some errors have detailed explanations: E0282, E0425, E0527, E0528, E0529. For more information about an error, try `rustc --explain E0282`. diff --git a/src/test/ui/maybe-bounds-where.stderr b/src/test/ui/maybe-bounds-where.stderr index 562e597728..78524cbabe 100644 --- a/src/test/ui/maybe-bounds-where.stderr +++ b/src/test/ui/maybe-bounds-where.stderr @@ -42,4 +42,3 @@ LL | struct S5(*const T) where T: ?Trait<'static> + ?Sized; error: aborting due to 6 previous errors -For more information about this error, try `rustc --explain E0203`. diff --git a/src/test/ui/meta-expected-error-correct-rev.a.stderr b/src/test/ui/meta-expected-error-correct-rev.a.stderr index 901bdcd8e4..db1d5070e7 100644 --- a/src/test/ui/meta-expected-error-correct-rev.a.stderr +++ b/src/test/ui/meta-expected-error-correct-rev.a.stderr @@ -3,6 +3,10 @@ error[E0308]: mismatched types | LL | let x: u32 = 22_usize; | ^^^^^^^^ expected u32, found usize +help: change the type of the numeric literal from `usize` to `u32` + | +LL | let x: u32 = 22_u32; + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr index 9e5f2ee4ce..063a4865b1 100644 --- a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr +++ b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr @@ -11,8 +11,12 @@ error[E0308]: mismatched types | LL | let y: usize = x.foo(); | ^^^^^^^ expected usize, found isize +help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit + | +LL | let y: usize = x.foo().try_into().unwrap(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors -Some errors occurred: E0282, E0308. +Some errors have detailed explanations: E0282, E0308. For more information about an error, try `rustc --explain E0282`. diff --git a/src/test/ui/methods/method-call-err-msg.stderr b/src/test/ui/methods/method-call-err-msg.stderr index 0e901a9834..b8ae4c34dc 100644 --- a/src/test/ui/methods/method-call-err-msg.stderr +++ b/src/test/ui/methods/method-call-err-msg.stderr @@ -43,5 +43,5 @@ LL | .take() error: aborting due to 4 previous errors -Some errors occurred: E0061, E0599. +Some errors have detailed explanations: E0061, E0599. For more information about an error, try `rustc --explain E0061`. diff --git a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr index 3c2e9b0176..d6fac7025a 100644 --- a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr +++ b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr @@ -68,5 +68,5 @@ LL | let _seetype: () = z; error: aborting due to 6 previous errors -Some errors occurred: E0034, E0308. +Some errors have detailed explanations: E0034, E0308. For more information about an error, try `rustc --explain E0034`. diff --git a/src/test/ui/methods/method-path-in-pattern.stderr b/src/test/ui/methods/method-path-in-pattern.stderr index 03d6509c91..3f53ad7688 100644 --- a/src/test/ui/methods/method-path-in-pattern.stderr +++ b/src/test/ui/methods/method-path-in-pattern.stderr @@ -18,4 +18,3 @@ LL | ::trait_bar => {} error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0533`. diff --git a/src/test/ui/methods/method-self-arg-2.nll.stderr b/src/test/ui/methods/method-self-arg-2.nll.stderr deleted file mode 100644 index 82092dd4c0..0000000000 --- a/src/test/ui/methods/method-self-arg-2.nll.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/method-self-arg-2.rs:15:14 - | -LL | let y = &mut x; - | ------ mutable borrow occurs here -LL | Foo::bar(&x); - | ^^ immutable borrow occurs here -LL | y.use_mut(); - | - mutable borrow later used here - -error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/method-self-arg-2.rs:20:14 - | -LL | let y = &mut x; - | ------ first mutable borrow occurs here -LL | Foo::baz(&mut x); - | ^^^^^^ second mutable borrow occurs here -LL | y.use_mut(); - | - first borrow later used here - -error: aborting due to 2 previous errors - -Some errors occurred: E0499, E0502. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/methods/method-self-arg-2.stderr b/src/test/ui/methods/method-self-arg-2.stderr index 56cc8c83fe..946e71ee5b 100644 --- a/src/test/ui/methods/method-self-arg-2.stderr +++ b/src/test/ui/methods/method-self-arg-2.stderr @@ -1,26 +1,24 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/method-self-arg-2.rs:15:15 + --> $DIR/method-self-arg-2.rs:15:14 | LL | let y = &mut x; - | - mutable borrow occurs here + | ------ mutable borrow occurs here LL | Foo::bar(&x); - | ^ immutable borrow occurs here -... -LL | } - | - mutable borrow ends here + | ^^ immutable borrow occurs here +LL | y.use_mut(); + | - mutable borrow later used here error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/method-self-arg-2.rs:20:19 + --> $DIR/method-self-arg-2.rs:20:14 | LL | let y = &mut x; - | - first mutable borrow occurs here + | ------ first mutable borrow occurs here LL | Foo::baz(&mut x); - | ^ second mutable borrow occurs here + | ^^^^^^ second mutable borrow occurs here LL | y.use_mut(); -LL | } - | - first borrow ends here + | - first borrow later used here error: aborting due to 2 previous errors -Some errors occurred: E0499, E0502. +Some errors have detailed explanations: E0499, E0502. For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/mir-dataflow/def-inits-1.rs b/src/test/ui/mir-dataflow/def-inits-1.rs index 07ac1900bc..91d41e9b57 100644 --- a/src/test/ui/mir-dataflow/def-inits-1.rs +++ b/src/test/ui/mir-dataflow/def-inits-1.rs @@ -1,6 +1,5 @@ // General test of maybe_uninits state computed by MIR dataflow. -#![feature(nll)] #![feature(core_intrinsics, rustc_attrs)] use std::intrinsics::rustc_peek; diff --git a/src/test/ui/mir-dataflow/def-inits-1.stderr b/src/test/ui/mir-dataflow/def-inits-1.stderr index 6bc5f7dcb9..48d8450489 100644 --- a/src/test/ui/mir-dataflow/def-inits-1.stderr +++ b/src/test/ui/mir-dataflow/def-inits-1.stderr @@ -1,23 +1,23 @@ error: rustc_peek: bit not set - --> $DIR/def-inits-1.rs:15:14 + --> $DIR/def-inits-1.rs:14:14 | LL | unsafe { rustc_peek(&ret); } | ^^^^^^^^^^^^^^^^ error: rustc_peek: bit not set - --> $DIR/def-inits-1.rs:31:14 + --> $DIR/def-inits-1.rs:30:14 | LL | unsafe { rustc_peek(&z); } | ^^^^^^^^^^^^^^ error: rustc_peek: bit not set - --> $DIR/def-inits-1.rs:34:14 + --> $DIR/def-inits-1.rs:33:14 | LL | unsafe { rustc_peek(&y); } | ^^^^^^^^^^^^^^ error: rustc_peek: bit not set - --> $DIR/def-inits-1.rs:42:14 + --> $DIR/def-inits-1.rs:41:14 | LL | unsafe { rustc_peek(&x); } | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/mir-dataflow/inits-1.rs b/src/test/ui/mir-dataflow/inits-1.rs index 13f900e4a7..4a4786a2a7 100644 --- a/src/test/ui/mir-dataflow/inits-1.rs +++ b/src/test/ui/mir-dataflow/inits-1.rs @@ -1,6 +1,5 @@ // General test of maybe_inits state computed by MIR dataflow. -#![feature(nll)] #![feature(core_intrinsics, rustc_attrs)] use std::intrinsics::rustc_peek; diff --git a/src/test/ui/mir-dataflow/inits-1.stderr b/src/test/ui/mir-dataflow/inits-1.stderr index 38a9c60b16..23d0679cb1 100644 --- a/src/test/ui/mir-dataflow/inits-1.stderr +++ b/src/test/ui/mir-dataflow/inits-1.stderr @@ -1,17 +1,17 @@ error: rustc_peek: bit not set - --> $DIR/inits-1.rs:15:14 + --> $DIR/inits-1.rs:14:14 | LL | unsafe { rustc_peek(&ret); } | ^^^^^^^^^^^^^^^^ error: rustc_peek: bit not set - --> $DIR/inits-1.rs:35:14 + --> $DIR/inits-1.rs:34:14 | LL | unsafe { rustc_peek(&y); } | ^^^^^^^^^^^^^^ error: rustc_peek: bit not set - --> $DIR/inits-1.rs:43:14 + --> $DIR/inits-1.rs:42:14 | LL | unsafe { rustc_peek(&x); } | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/mir-dataflow/uninits-1.rs b/src/test/ui/mir-dataflow/uninits-1.rs index 4c64359693..66b3f458a5 100644 --- a/src/test/ui/mir-dataflow/uninits-1.rs +++ b/src/test/ui/mir-dataflow/uninits-1.rs @@ -1,6 +1,5 @@ // General test of maybe_uninits state computed by MIR dataflow. -#![feature(nll)] #![feature(core_intrinsics, rustc_attrs)] use std::intrinsics::rustc_peek; diff --git a/src/test/ui/mir-dataflow/uninits-1.stderr b/src/test/ui/mir-dataflow/uninits-1.stderr index c60987050e..5f6dbde212 100644 --- a/src/test/ui/mir-dataflow/uninits-1.stderr +++ b/src/test/ui/mir-dataflow/uninits-1.stderr @@ -1,29 +1,29 @@ error: rustc_peek: bit not set - --> $DIR/uninits-1.rs:19:14 + --> $DIR/uninits-1.rs:18:14 | LL | unsafe { rustc_peek(&x) }; | ^^^^^^^^^^^^^^ error: rustc_peek: bit not set - --> $DIR/uninits-1.rs:20:14 + --> $DIR/uninits-1.rs:19:14 | LL | unsafe { rustc_peek(&y) }; | ^^^^^^^^^^^^^^ error: rustc_peek: bit not set - --> $DIR/uninits-1.rs:21:14 + --> $DIR/uninits-1.rs:20:14 | LL | unsafe { rustc_peek(&z) }; | ^^^^^^^^^^^^^^ error: rustc_peek: bit not set - --> $DIR/uninits-1.rs:37:14 + --> $DIR/uninits-1.rs:36:14 | LL | unsafe { rustc_peek(&x); } | ^^^^^^^^^^^^^^ error: rustc_peek: bit not set - --> $DIR/uninits-1.rs:45:14 + --> $DIR/uninits-1.rs:44:14 | LL | unsafe { rustc_peek(&ret); } | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/mir-dataflow/uninits-2.rs b/src/test/ui/mir-dataflow/uninits-2.rs index 2247e68d09..2ccf1c7f9d 100644 --- a/src/test/ui/mir-dataflow/uninits-2.rs +++ b/src/test/ui/mir-dataflow/uninits-2.rs @@ -1,6 +1,5 @@ // General test of maybe_uninits state computed by MIR dataflow. -#![feature(nll)] #![feature(core_intrinsics, rustc_attrs)] use std::intrinsics::rustc_peek; diff --git a/src/test/ui/mir-dataflow/uninits-2.stderr b/src/test/ui/mir-dataflow/uninits-2.stderr index de3e58e52d..dcb6137199 100644 --- a/src/test/ui/mir-dataflow/uninits-2.stderr +++ b/src/test/ui/mir-dataflow/uninits-2.stderr @@ -1,5 +1,5 @@ error: rustc_peek: bit not set - --> $DIR/uninits-2.rs:15:14 + --> $DIR/uninits-2.rs:14:14 | LL | unsafe { rustc_peek(&x) }; | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/mismatched_types/E0409.stderr b/src/test/ui/mismatched_types/E0409.stderr index 93115bfb99..e3919bf260 100644 --- a/src/test/ui/mismatched_types/E0409.stderr +++ b/src/test/ui/mismatched_types/E0409.stderr @@ -17,5 +17,5 @@ LL | (0, ref y) | (y, 0) => {} error: aborting due to 2 previous errors -Some errors occurred: E0308, E0409. +Some errors have detailed explanations: E0308, E0409. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/mismatched_types/E0631.stderr b/src/test/ui/mismatched_types/E0631.stderr index f2bc6e1692..8662bb7795 100644 --- a/src/test/ui/mismatched_types/E0631.stderr +++ b/src/test/ui/mismatched_types/E0631.stderr @@ -58,4 +58,3 @@ LL | fn bar>(_: F) {} error: aborting due to 4 previous errors -For more information about this error, try `rustc --explain E0631`. diff --git a/src/test/ui/mismatched_types/cast-rfc0401.stderr b/src/test/ui/mismatched_types/cast-rfc0401.stderr index c30f0acaa5..0e0bb8da81 100644 --- a/src/test/ui/mismatched_types/cast-rfc0401.stderr +++ b/src/test/ui/mismatched_types/cast-rfc0401.stderr @@ -243,5 +243,5 @@ LL | vec![0.0].iter().map(|s| s as f32).collect::>(); error: aborting due to 34 previous errors -Some errors occurred: E0054, E0277, E0604, E0605, E0606, E0607, E0609. +Some errors have detailed explanations: E0054, E0277, E0604, E0605, E0606, E0607, E0609. For more information about an error, try `rustc --explain E0054`. diff --git a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr b/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr index cf392e1731..d4ccf8d451 100644 --- a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr +++ b/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr @@ -51,5 +51,4 @@ LL | fn baz(_: F) {} error: aborting due to 5 previous errors -Some errors occurred: E0271, E0631. -For more information about an error, try `rustc --explain E0271`. +For more information about this error, try `rustc --explain E0271`. diff --git a/src/test/ui/mismatched_types/closure-mismatch.stderr b/src/test/ui/mismatched_types/closure-mismatch.stderr index 6fbc922561..7161f69790 100644 --- a/src/test/ui/mismatched_types/closure-mismatch.stderr +++ b/src/test/ui/mismatched_types/closure-mismatch.stderr @@ -28,5 +28,4 @@ LL | fn baz(_: T) {} error: aborting due to 2 previous errors -Some errors occurred: E0271, E0631. -For more information about an error, try `rustc --explain E0271`. +For more information about this error, try `rustc --explain E0271`. diff --git a/src/test/ui/mismatched_types/fn-variance-1.stderr b/src/test/ui/mismatched_types/fn-variance-1.stderr index 0fb1a5346f..c15d6620e1 100644 --- a/src/test/ui/mismatched_types/fn-variance-1.stderr +++ b/src/test/ui/mismatched_types/fn-variance-1.stderr @@ -30,4 +30,3 @@ LL | fn apply(t: T, f: F) where F: FnOnce(T) { error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0631`. diff --git a/src/test/ui/mismatched_types/issue-26480.stderr b/src/test/ui/mismatched_types/issue-26480.stderr index ef7a8d3853..881d9fd320 100644 --- a/src/test/ui/mismatched_types/issue-26480.stderr +++ b/src/test/ui/mismatched_types/issue-26480.stderr @@ -6,6 +6,10 @@ LL | $arr.len() * size_of($arr[0])); ... LL | write!(hello); | -------------- in this macro invocation +help: you can convert an `usize` to `u64` and panic if the converted value wouldn't fit + | +LL | ($arr.len() * size_of($arr[0])).try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0605]: non-primitive cast: `{integer}` as `()` --> $DIR/issue-26480.rs:22:19 @@ -20,5 +24,5 @@ LL | cast!(2); error: aborting due to 2 previous errors -Some errors occurred: E0308, E0605. +Some errors have detailed explanations: E0308, E0605. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/mismatched_types/issue-36053-2.stderr b/src/test/ui/mismatched_types/issue-36053-2.stderr index c5c67e6bd9..3f87ef74b8 100644 --- a/src/test/ui/mismatched_types/issue-36053-2.stderr +++ b/src/test/ui/mismatched_types/issue-36053-2.stderr @@ -26,5 +26,4 @@ LL | once::<&str>("str").fuse().filter(|a: &str| true).count(); error: aborting due to 3 previous errors -Some errors occurred: E0599, E0631. -For more information about an error, try `rustc --explain E0599`. +For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/mismatched_types/issue-38371.stderr b/src/test/ui/mismatched_types/issue-38371.stderr index d168692373..a9347926bd 100644 --- a/src/test/ui/mismatched_types/issue-38371.stderr +++ b/src/test/ui/mismatched_types/issue-38371.stderr @@ -12,11 +12,13 @@ error[E0308]: mismatched types --> $DIR/issue-38371.rs:18:9 | LL | fn agh(&&bar: &u32) { - | ^^^^ expected u32, found reference + | ^^^^ + | | + | expected u32, found reference + | help: you can probably remove the explicit borrow: `bar` | = note: expected type `u32` found type `&_` - = help: did you mean `bar: &u32`? error[E0308]: mismatched types --> $DIR/issue-38371.rs:21:8 @@ -35,5 +37,5 @@ LL | fn ugh(&[bar]: &u32) { error: aborting due to 4 previous errors -Some errors occurred: E0308, E0529. +Some errors have detailed explanations: E0308, E0529. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/mismatched_types/main.rs b/src/test/ui/mismatched_types/main.rs index 16c18ddda2..e2d09dc219 100644 --- a/src/test/ui/mismatched_types/main.rs +++ b/src/test/ui/mismatched_types/main.rs @@ -2,4 +2,3 @@ fn main() { let x: u32 = ( //~ ERROR mismatched types ); } - diff --git a/src/test/ui/mismatched_types/numeric-literal-cast.rs b/src/test/ui/mismatched_types/numeric-literal-cast.rs index 74a2211709..69cfe262fd 100644 --- a/src/test/ui/mismatched_types/numeric-literal-cast.rs +++ b/src/test/ui/mismatched_types/numeric-literal-cast.rs @@ -10,4 +10,3 @@ fn main() { foo2(3i16); //~^ ERROR mismatched types } - diff --git a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr index 3551e4105f..bcb316e2bf 100644 --- a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr +++ b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr @@ -21,5 +21,5 @@ LL | let ans = s("burma", "shave"); error: aborting due to 3 previous errors -Some errors occurred: E0057, E0308. +Some errors have detailed explanations: E0057, E0308. For more information about an error, try `rustc --explain E0057`. diff --git a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.rs b/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.rs index 3547272e51..949f5683c8 100644 --- a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.rs +++ b/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.rs @@ -14,4 +14,3 @@ impl Foo for Bar { fn main() { } - diff --git a/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr b/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr index ad0eefa27a..47aa3c21f5 100644 --- a/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr +++ b/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr @@ -15,4 +15,3 @@ LL | fn call_itisize>(y: isize, mut f: F) -> isize { error: aborting due to previous error -For more information about this error, try `rustc --explain E0631`. diff --git a/src/test/ui/missing/missing-alloc_error_handler.rs b/src/test/ui/missing/missing-alloc_error_handler.rs index 1a9e8688e8..ae0c067bb5 100644 --- a/src/test/ui/missing/missing-alloc_error_handler.rs +++ b/src/test/ui/missing/missing-alloc_error_handler.rs @@ -3,7 +3,7 @@ #![no_std] #![crate_type = "staticlib"] -#![feature(panic_handler, alloc_error_handler, alloc)] +#![feature(panic_handler, alloc_error_handler)] #[panic_handler] fn panic(_: &core::panic::PanicInfo) -> ! { diff --git a/src/test/ui/missing/missing-allocator.rs b/src/test/ui/missing/missing-allocator.rs index dbb10d1e7b..6d867e2e8b 100644 --- a/src/test/ui/missing/missing-allocator.rs +++ b/src/test/ui/missing/missing-allocator.rs @@ -3,7 +3,7 @@ #![no_std] #![crate_type = "staticlib"] -#![feature(panic_handler, alloc_error_handler, alloc)] +#![feature(panic_handler, alloc_error_handler)] #[panic_handler] fn panic(_: &core::panic::PanicInfo) -> ! { diff --git a/src/test/ui/missing/missing-fields-in-struct-pattern.stderr b/src/test/ui/missing/missing-fields-in-struct-pattern.stderr index 5d88a5d03e..f703746899 100644 --- a/src/test/ui/missing/missing-fields-in-struct-pattern.stderr +++ b/src/test/ui/missing/missing-fields-in-struct-pattern.stderr @@ -14,5 +14,5 @@ LL | if let S { a, b, c, d } = S(1, 2, 3, 4) { error: aborting due to 2 previous errors -Some errors occurred: E0026, E0027. +Some errors have detailed explanations: E0026, E0027. For more information about an error, try `rustc --explain E0026`. diff --git a/src/test/ui/mod-subitem-as-enum-variant.rs b/src/test/ui/mod-subitem-as-enum-variant.rs index cd4459ae0f..9328d1a904 100644 --- a/src/test/ui/mod-subitem-as-enum-variant.rs +++ b/src/test/ui/mod-subitem-as-enum-variant.rs @@ -1,4 +1,3 @@ - mod Mod { pub struct FakeVariant(pub T); } diff --git a/src/test/ui/mod-subitem-as-enum-variant.stderr b/src/test/ui/mod-subitem-as-enum-variant.stderr index 72eca58820..d6815c91e5 100644 --- a/src/test/ui/mod-subitem-as-enum-variant.stderr +++ b/src/test/ui/mod-subitem-as-enum-variant.stderr @@ -1,5 +1,5 @@ error[E0109]: type arguments are not allowed for this type - --> $DIR/mod-subitem-as-enum-variant.rs:8:11 + --> $DIR/mod-subitem-as-enum-variant.rs:7:11 | LL | Mod::::FakeVariant(0); | ^^^ type argument not allowed diff --git a/src/test/ui/mod/mod_file_disambig.stderr b/src/test/ui/mod/mod_file_disambig.stderr index 2b77d866fb..27df0241aa 100644 --- a/src/test/ui/mod/mod_file_disambig.stderr +++ b/src/test/ui/mod/mod_file_disambig.stderr @@ -8,4 +8,3 @@ LL | mod mod_file_disambig_aux; error: aborting due to previous error -For more information about this error, try `rustc --explain E0584`. diff --git a/src/test/ui/moves/move-guard-same-consts.nll.stderr b/src/test/ui/moves/move-guard-same-consts.nll.stderr deleted file mode 100644 index 0945fbe68a..0000000000 --- a/src/test/ui/moves/move-guard-same-consts.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0382]: use of moved value: `x` - --> $DIR/move-guard-same-consts.rs:20:24 - | -LL | let x: Box<_> = box 1; - | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait -... -LL | (1, 2) if take(x) => (), - | - value moved here -LL | (1, 2) if take(x) => (), - | ^ value used here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/moves/move-guard-same-consts.stderr b/src/test/ui/moves/move-guard-same-consts.stderr index 65f6f1239f..0945fbe68a 100644 --- a/src/test/ui/moves/move-guard-same-consts.stderr +++ b/src/test/ui/moves/move-guard-same-consts.stderr @@ -1,12 +1,13 @@ error[E0382]: use of moved value: `x` --> $DIR/move-guard-same-consts.rs:20:24 | +LL | let x: Box<_> = box 1; + | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait +... LL | (1, 2) if take(x) => (), | - value moved here LL | (1, 2) if take(x) => (), | ^ value used here after move - | - = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/moves/move-in-guard-1.nll.stderr b/src/test/ui/moves/move-in-guard-1.nll.stderr deleted file mode 100644 index 542fd16986..0000000000 --- a/src/test/ui/moves/move-in-guard-1.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0382]: use of moved value: `x` - --> $DIR/move-in-guard-1.rs:10:24 - | -LL | let x: Box<_> = box 1; - | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait -... -LL | (1, _) if take(x) => (), - | - value moved here -LL | (_, 2) if take(x) => (), - | ^ value used here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/moves/move-in-guard-1.stderr b/src/test/ui/moves/move-in-guard-1.stderr index af49fa82b0..542fd16986 100644 --- a/src/test/ui/moves/move-in-guard-1.stderr +++ b/src/test/ui/moves/move-in-guard-1.stderr @@ -1,12 +1,13 @@ error[E0382]: use of moved value: `x` --> $DIR/move-in-guard-1.rs:10:24 | +LL | let x: Box<_> = box 1; + | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait +... LL | (1, _) if take(x) => (), | - value moved here LL | (_, 2) if take(x) => (), | ^ value used here after move - | - = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/moves/move-in-guard-2.nll.stderr b/src/test/ui/moves/move-in-guard-2.nll.stderr deleted file mode 100644 index 8bd405279c..0000000000 --- a/src/test/ui/moves/move-in-guard-2.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0382]: use of moved value: `x` - --> $DIR/move-in-guard-2.rs:10:24 - | -LL | let x: Box<_> = box 1; - | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait -... -LL | (_, 2) if take(x) => (), - | ^ value moved here, in previous iteration of loop - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/moves/move-in-guard-2.stderr b/src/test/ui/moves/move-in-guard-2.stderr index 5228abe86e..8bd405279c 100644 --- a/src/test/ui/moves/move-in-guard-2.stderr +++ b/src/test/ui/moves/move-in-guard-2.stderr @@ -1,10 +1,11 @@ error[E0382]: use of moved value: `x` --> $DIR/move-in-guard-2.rs:10:24 | +LL | let x: Box<_> = box 1; + | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait +... LL | (_, 2) if take(x) => (), - | ^ value moved here in previous iteration of loop - | - = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | ^ value moved here, in previous iteration of loop error: aborting due to previous error diff --git a/src/test/ui/moves/move-into-dead-array-1.nll.stderr b/src/test/ui/moves/move-into-dead-array-1.nll.stderr deleted file mode 100644 index 33da0e54a1..0000000000 --- a/src/test/ui/moves/move-into-dead-array-1.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0381]: use of possibly uninitialized variable: `a` - --> $DIR/move-into-dead-array-1.rs:14:5 - | -LL | a[i] = d(); - | ^^^^ use of possibly uninitialized `a` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0381`. diff --git a/src/test/ui/moves/move-into-dead-array-1.stderr b/src/test/ui/moves/move-into-dead-array-1.stderr index 3a1bbe97d2..33da0e54a1 100644 --- a/src/test/ui/moves/move-into-dead-array-1.stderr +++ b/src/test/ui/moves/move-into-dead-array-1.stderr @@ -2,7 +2,7 @@ error[E0381]: use of possibly uninitialized variable: `a` --> $DIR/move-into-dead-array-1.rs:14:5 | LL | a[i] = d(); - | ^^^^^^^^^^ use of possibly uninitialized `a` + | ^^^^ use of possibly uninitialized `a` error: aborting due to previous error diff --git a/src/test/ui/moves/move-into-dead-array-2.nll.stderr b/src/test/ui/moves/move-into-dead-array-2.nll.stderr deleted file mode 100644 index 19e476c04e..0000000000 --- a/src/test/ui/moves/move-into-dead-array-2.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: use of moved value: `a` - --> $DIR/move-into-dead-array-2.rs:14:5 - | -LL | fn foo(mut a: [D; 4], i: usize) { - | ----- move occurs because `a` has type `[D; 4]`, which does not implement the `Copy` trait -LL | drop(a); - | - value moved here -LL | a[i] = d(); - | ^^^^ value used here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/moves/move-into-dead-array-2.stderr b/src/test/ui/moves/move-into-dead-array-2.stderr index 4521fa9bcb..19e476c04e 100644 --- a/src/test/ui/moves/move-into-dead-array-2.stderr +++ b/src/test/ui/moves/move-into-dead-array-2.stderr @@ -1,12 +1,12 @@ error[E0382]: use of moved value: `a` --> $DIR/move-into-dead-array-2.rs:14:5 | +LL | fn foo(mut a: [D; 4], i: usize) { + | ----- move occurs because `a` has type `[D; 4]`, which does not implement the `Copy` trait LL | drop(a); | - value moved here LL | a[i] = d(); - | ^^^^^^^^^^ value used here after move - | - = note: move occurs because `a` has type `[D; 4]`, which does not implement the `Copy` trait + | ^^^^ value used here after move error: aborting due to previous error diff --git a/src/test/ui/moves/move-out-of-slice-1.nll.stderr b/src/test/ui/moves/move-out-of-slice-1.nll.stderr deleted file mode 100644 index b4b1fe97ca..0000000000 --- a/src/test/ui/moves/move-out-of-slice-1.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0508]: cannot move out of type `[A]`, a non-copy slice - --> $DIR/move-out-of-slice-1.rs:7:11 - | -LL | match a { - | ^ cannot move out of here -LL | box [a] => {}, - | - data moved here - | -note: move occurs because `a` has type `A`, which does not implement the `Copy` trait - --> $DIR/move-out-of-slice-1.rs:8:14 - | -LL | box [a] => {}, - | ^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0508`. diff --git a/src/test/ui/moves/move-out-of-slice-1.rs b/src/test/ui/moves/move-out-of-slice-1.rs index 3e0906060e..982648f5b2 100644 --- a/src/test/ui/moves/move-out-of-slice-1.rs +++ b/src/test/ui/moves/move-out-of-slice-1.rs @@ -4,8 +4,8 @@ struct A; fn main() { let a: Box<[A]> = Box::new([A]); - match a { - box [a] => {}, //~ ERROR cannot move out of type `[A]`, a non-copy slice + match a { //~ ERROR cannot move out of type `[A]`, a non-copy slice + box [a] => {}, _ => {} } } diff --git a/src/test/ui/moves/move-out-of-slice-1.stderr b/src/test/ui/moves/move-out-of-slice-1.stderr index f84e3a3f3e..b4b1fe97ca 100644 --- a/src/test/ui/moves/move-out-of-slice-1.stderr +++ b/src/test/ui/moves/move-out-of-slice-1.stderr @@ -1,11 +1,16 @@ error[E0508]: cannot move out of type `[A]`, a non-copy slice - --> $DIR/move-out-of-slice-1.rs:8:13 + --> $DIR/move-out-of-slice-1.rs:7:11 | +LL | match a { + | ^ cannot move out of here LL | box [a] => {}, - | ^-^ - | || - | |hint: to prevent move, use `ref a` or `ref mut a` - | cannot move out of here + | - data moved here + | +note: move occurs because `a` has type `A`, which does not implement the `Copy` trait + --> $DIR/move-out-of-slice-1.rs:8:14 + | +LL | box [a] => {}, + | ^ error: aborting due to previous error diff --git a/src/test/ui/moves/move-out-of-tuple-field.nll.stderr b/src/test/ui/moves/move-out-of-tuple-field.nll.stderr deleted file mode 100644 index 888ef3352e..0000000000 --- a/src/test/ui/moves/move-out-of-tuple-field.nll.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0382]: use of moved value: `x.0` - --> $DIR/move-out-of-tuple-field.rs:8:13 - | -LL | let y = x.0; - | --- value moved here -LL | let z = x.0; - | ^^^ value used here after move - | - = note: move occurs because `x.0` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `x.0` - --> $DIR/move-out-of-tuple-field.rs:12:13 - | -LL | let y = x.0; - | --- value moved here -LL | let z = x.0; - | ^^^ value used here after move - | - = note: move occurs because `x.0` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/moves/move-out-of-tuple-field.stderr b/src/test/ui/moves/move-out-of-tuple-field.stderr index 89662c8303..888ef3352e 100644 --- a/src/test/ui/moves/move-out-of-tuple-field.stderr +++ b/src/test/ui/moves/move-out-of-tuple-field.stderr @@ -1,20 +1,20 @@ error[E0382]: use of moved value: `x.0` - --> $DIR/move-out-of-tuple-field.rs:8:9 + --> $DIR/move-out-of-tuple-field.rs:8:13 | LL | let y = x.0; - | - value moved here + | --- value moved here LL | let z = x.0; - | ^ value used here after move + | ^^^ value used here after move | = note: move occurs because `x.0` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0382]: use of moved value: `x.0` - --> $DIR/move-out-of-tuple-field.rs:12:9 + --> $DIR/move-out-of-tuple-field.rs:12:13 | LL | let y = x.0; - | - value moved here + | --- value moved here LL | let z = x.0; - | ^ value used here after move + | ^^^ value used here after move | = note: move occurs because `x.0` has type `std::boxed::Box`, which does not implement the `Copy` trait diff --git a/src/test/ui/moves/moves-based-on-type-access-to-field.nll.stderr b/src/test/ui/moves/moves-based-on-type-access-to-field.nll.stderr deleted file mode 100644 index 71a3c4506e..0000000000 --- a/src/test/ui/moves/moves-based-on-type-access-to-field.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: borrow of moved value: `x` - --> $DIR/moves-based-on-type-access-to-field.rs:11:12 - | -LL | let x = vec!["hi".to_string()]; - | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait -LL | consume(x.into_iter().next().unwrap()); - | - value moved here -LL | touch(&x[0]); - | ^ value borrowed here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/moves/moves-based-on-type-access-to-field.rs b/src/test/ui/moves/moves-based-on-type-access-to-field.rs index c7ea357a5d..e2003ed6e4 100644 --- a/src/test/ui/moves/moves-based-on-type-access-to-field.rs +++ b/src/test/ui/moves/moves-based-on-type-access-to-field.rs @@ -8,7 +8,7 @@ fn touch(_a: &A) {} fn f20() { let x = vec!["hi".to_string()]; consume(x.into_iter().next().unwrap()); - touch(&x[0]); //~ ERROR use of moved value: `x` + touch(&x[0]); //~ ERROR borrow of moved value: `x` } fn main() {} diff --git a/src/test/ui/moves/moves-based-on-type-access-to-field.stderr b/src/test/ui/moves/moves-based-on-type-access-to-field.stderr index ed4d69f838..71a3c4506e 100644 --- a/src/test/ui/moves/moves-based-on-type-access-to-field.stderr +++ b/src/test/ui/moves/moves-based-on-type-access-to-field.stderr @@ -1,12 +1,12 @@ -error[E0382]: use of moved value: `x` +error[E0382]: borrow of moved value: `x` --> $DIR/moves-based-on-type-access-to-field.rs:11:12 | +LL | let x = vec!["hi".to_string()]; + | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait LL | consume(x.into_iter().next().unwrap()); | - value moved here LL | touch(&x[0]); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait + | ^ value borrowed here after move error: aborting due to previous error diff --git a/src/test/ui/moves/moves-based-on-type-block-bad.nll.stderr b/src/test/ui/moves/moves-based-on-type-block-bad.nll.stderr deleted file mode 100644 index b83a15c9d4..0000000000 --- a/src/test/ui/moves/moves-based-on-type-block-bad.nll.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/moves-based-on-type-block-bad.rs:24:19 - | -LL | match hellothere.x { - | ^^^^^^^^^^^^ - | | - | cannot move out of borrowed content - | help: consider borrowing here: `&hellothere.x` -... -LL | box E::Bar(x) => println!("{}", x.to_string()), - | - data moved here - | -note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait - --> $DIR/moves-based-on-type-block-bad.rs:27:28 - | -LL | box E::Bar(x) => println!("{}", x.to_string()), - | ^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/moves/moves-based-on-type-block-bad.rs b/src/test/ui/moves/moves-based-on-type-block-bad.rs index 99928caa92..516325ce1d 100644 --- a/src/test/ui/moves/moves-based-on-type-block-bad.rs +++ b/src/test/ui/moves/moves-based-on-type-block-bad.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![feature(box_patterns)] #![feature(box_syntax)] diff --git a/src/test/ui/moves/moves-based-on-type-block-bad.stderr b/src/test/ui/moves/moves-based-on-type-block-bad.stderr index f5328edfcc..e28b22035f 100644 --- a/src/test/ui/moves/moves-based-on-type-block-bad.stderr +++ b/src/test/ui/moves/moves-based-on-type-block-bad.stderr @@ -1,11 +1,20 @@ error[E0507]: cannot move out of borrowed content - --> $DIR/moves-based-on-type-block-bad.rs:24:19 + --> $DIR/moves-based-on-type-block-bad.rs:22:19 | LL | match hellothere.x { - | ^^^^^^^^^^ cannot move out of borrowed content + | ^^^^^^^^^^^^ + | | + | cannot move out of borrowed content + | help: consider borrowing here: `&hellothere.x` ... LL | box E::Bar(x) => println!("{}", x.to_string()), - | - hint: to prevent move, use `ref x` or `ref mut x` + | - data moved here + | +note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + --> $DIR/moves-based-on-type-block-bad.rs:25:28 + | +LL | box E::Bar(x) => println!("{}", x.to_string()), + | ^ error: aborting due to previous error diff --git a/src/test/ui/moves/moves-based-on-type-capture-clause-bad.nll.stderr b/src/test/ui/moves/moves-based-on-type-capture-clause-bad.nll.stderr deleted file mode 100644 index 3a05a1305b..0000000000 --- a/src/test/ui/moves/moves-based-on-type-capture-clause-bad.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0382]: borrow of moved value: `x` - --> $DIR/moves-based-on-type-capture-clause-bad.rs:8:20 - | -LL | let x = "Hello world!".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait -LL | thread::spawn(move|| { - | ------ value moved into closure here -LL | println!("{}", x); - | - variable moved due to use in closure -LL | }); -LL | println!("{}", x); - | ^ value borrowed here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/moves/moves-based-on-type-capture-clause-bad.rs b/src/test/ui/moves/moves-based-on-type-capture-clause-bad.rs index d5f44a0b3f..b2f68352f8 100644 --- a/src/test/ui/moves/moves-based-on-type-capture-clause-bad.rs +++ b/src/test/ui/moves/moves-based-on-type-capture-clause-bad.rs @@ -5,5 +5,5 @@ fn main() { thread::spawn(move|| { println!("{}", x); }); - println!("{}", x); //~ ERROR use of moved value + println!("{}", x); //~ ERROR borrow of moved value } diff --git a/src/test/ui/moves/moves-based-on-type-capture-clause-bad.stderr b/src/test/ui/moves/moves-based-on-type-capture-clause-bad.stderr index 39119ff3aa..3a05a1305b 100644 --- a/src/test/ui/moves/moves-based-on-type-capture-clause-bad.stderr +++ b/src/test/ui/moves/moves-based-on-type-capture-clause-bad.stderr @@ -1,13 +1,15 @@ -error[E0382]: use of moved value: `x` +error[E0382]: borrow of moved value: `x` --> $DIR/moves-based-on-type-capture-clause-bad.rs:8:20 | +LL | let x = "Hello world!".to_string(); + | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait LL | thread::spawn(move|| { - | ------ value moved (into closure) here -... + | ------ value moved into closure here +LL | println!("{}", x); + | - variable moved due to use in closure +LL | }); LL | println!("{}", x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | ^ value borrowed here after move error: aborting due to previous error diff --git a/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.nll.stderr b/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.nll.stderr deleted file mode 100644 index fb8562d00e..0000000000 --- a/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0382]: use of moved value: `node` - --> $DIR/moves-based-on-type-cyclic-types-issue-4821.rs:13:13 - | -LL | Some(right) => consume(right), - | ----- value moved here -... -LL | consume(node) + r - | ^^^^ value used here after partial move - | - = note: move occurs because value has type `std::boxed::Box`, which does not implement the `Copy` trait - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.rs b/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.rs index 4417fb926d..b070671cb2 100644 --- a/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.rs +++ b/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.rs @@ -10,7 +10,7 @@ fn foo(node: Box) -> isize { Some(right) => consume(right), None => 0 }; - consume(node) + r //~ ERROR use of partially moved value: `node` + consume(node) + r //~ ERROR use of moved value: `node` } fn consume(v: Box) -> isize { diff --git a/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr b/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr index 8b904c7169..fb8562d00e 100644 --- a/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr +++ b/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr @@ -1,13 +1,13 @@ -error[E0382]: use of partially moved value: `node` +error[E0382]: use of moved value: `node` --> $DIR/moves-based-on-type-cyclic-types-issue-4821.rs:13:13 | LL | Some(right) => consume(right), | ----- value moved here ... LL | consume(node) + r - | ^^^^ value used here after move + | ^^^^ value used here after partial move | - = note: move occurs because the value has type `std::boxed::Box`, which does not implement the `Copy` trait + = note: move occurs because value has type `std::boxed::Box`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.nll.stderr b/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.nll.stderr deleted file mode 100644 index 25f88fe157..0000000000 --- a/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.nll.stderr +++ /dev/null @@ -1,25 +0,0 @@ -error[E0382]: borrow of moved value: `x` - --> $DIR/moves-based-on-type-distribute-copy-over-paren.rs:11:11 - | -LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait -LL | let _y = Foo { f:x }; - | - value moved here -LL | -LL | touch(&x); - | ^^ value borrowed here after move - -error[E0382]: borrow of moved value: `x` - --> $DIR/moves-based-on-type-distribute-copy-over-paren.rs:20:11 - | -LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait -LL | let _y = Foo { f:(((x))) }; - | ------- value moved here -LL | -LL | touch(&x); - | ^^ value borrowed here after move - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.rs b/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.rs index 7c7ca0044e..0b44ca56ce 100644 --- a/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.rs +++ b/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.rs @@ -6,20 +6,20 @@ fn touch(_a: &A) {} fn f00() { let x = "hi".to_string(); + //~^ NOTE move occurs because `x` has type `std::string::String` let _y = Foo { f:x }; //~^ NOTE value moved here - touch(&x); //~ ERROR use of moved value: `x` - //~^ NOTE value used here after move - //~| NOTE move occurs because `x` has type `std::string::String` + touch(&x); //~ ERROR borrow of moved value: `x` + //~^ NOTE value borrowed here after move } fn f05() { let x = "hi".to_string(); + //~^ NOTE move occurs because `x` has type `std::string::String` let _y = Foo { f:(((x))) }; //~^ NOTE value moved here - touch(&x); //~ ERROR use of moved value: `x` - //~^ NOTE value used here after move - //~| NOTE move occurs because `x` has type `std::string::String` + touch(&x); //~ ERROR borrow of moved value: `x` + //~^ NOTE value borrowed here after move } fn f10() { diff --git a/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.stderr b/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.stderr index edf521a896..d7a7ceabf8 100644 --- a/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.stderr +++ b/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.stderr @@ -1,24 +1,26 @@ -error[E0382]: use of moved value: `x` - --> $DIR/moves-based-on-type-distribute-copy-over-paren.rs:11:12 +error[E0382]: borrow of moved value: `x` + --> $DIR/moves-based-on-type-distribute-copy-over-paren.rs:12:11 | +LL | let x = "hi".to_string(); + | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait +LL | LL | let _y = Foo { f:x }; | - value moved here LL | LL | touch(&x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | ^^ value borrowed here after move -error[E0382]: use of moved value: `x` - --> $DIR/moves-based-on-type-distribute-copy-over-paren.rs:20:12 +error[E0382]: borrow of moved value: `x` + --> $DIR/moves-based-on-type-distribute-copy-over-paren.rs:21:11 | +LL | let x = "hi".to_string(); + | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait +LL | LL | let _y = Foo { f:(((x))) }; | ------- value moved here LL | LL | touch(&x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | ^^ value borrowed here after move error: aborting due to 2 previous errors diff --git a/src/test/ui/moves/moves-based-on-type-exprs.nll.stderr b/src/test/ui/moves/moves-based-on-type-exprs.nll.stderr deleted file mode 100644 index 67fae606c4..0000000000 --- a/src/test/ui/moves/moves-based-on-type-exprs.nll.stderr +++ /dev/null @@ -1,123 +0,0 @@ -error[E0382]: borrow of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:12:11 - | -LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait -LL | let _y = Foo { f:x }; - | - value moved here -LL | touch(&x); - | ^^ value borrowed here after move - -error[E0382]: borrow of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:18:11 - | -LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait -LL | let _y = (x, 3); - | - value moved here -LL | touch(&x); - | ^^ value borrowed here after move - -error[E0382]: borrow of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:35:11 - | -LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait -... -LL | x - | - value moved here -... -LL | touch(&x); - | ^^ value borrowed here after move - -error[E0382]: borrow of moved value: `y` - --> $DIR/moves-based-on-type-exprs.rs:36:11 - | -LL | let y = "ho".to_string(); - | - move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait -... -LL | y - | - value moved here -... -LL | touch(&y); - | ^^ value borrowed here after move - -error[E0382]: borrow of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:46:11 - | -LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait -... -LL | true => x, - | - value moved here -... -LL | touch(&x); - | ^^ value borrowed here after move - -error[E0382]: borrow of moved value: `y` - --> $DIR/moves-based-on-type-exprs.rs:47:11 - | -LL | let y = "ho".to_string(); - | - move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait -... -LL | false => y - | - value moved here -... -LL | touch(&y); - | ^^ value borrowed here after move - -error[E0382]: borrow of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:58:11 - | -LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait -... -LL | _ if guard(x) => 10, - | - value moved here -... -LL | touch(&x); - | ^^ value borrowed here after move - -error[E0382]: borrow of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:65:11 - | -LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait -LL | let _y = [x]; - | - value moved here -LL | touch(&x); - | ^^ value borrowed here after move - -error[E0382]: borrow of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:71:11 - | -LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait -LL | let _y = vec![x]; - | - value moved here -LL | touch(&x); - | ^^ value borrowed here after move - -error[E0382]: borrow of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:77:11 - | -LL | let x = vec!["hi".to_string()]; - | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait -LL | let _y = x.into_iter().next().unwrap(); - | - value moved here -LL | touch(&x); - | ^^ value borrowed here after move - -error[E0382]: borrow of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:83:11 - | -LL | let x = vec!["hi".to_string()]; - | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait -LL | let _y = [x.into_iter().next().unwrap(); 1]; - | - value moved here -LL | touch(&x); - | ^^ value borrowed here after move - -error: aborting due to 11 previous errors - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/moves/moves-based-on-type-exprs.rs b/src/test/ui/moves/moves-based-on-type-exprs.rs index b058f83291..4a52d8d320 100644 --- a/src/test/ui/moves/moves-based-on-type-exprs.rs +++ b/src/test/ui/moves/moves-based-on-type-exprs.rs @@ -9,13 +9,13 @@ fn touch(_a: &A) {} fn f10() { let x = "hi".to_string(); let _y = Foo { f:x }; - touch(&x); //~ ERROR use of moved value: `x` + touch(&x); //~ ERROR borrow of moved value: `x` } fn f20() { let x = "hi".to_string(); let _y = (x, 3); - touch(&x); //~ ERROR use of moved value: `x` + touch(&x); //~ ERROR borrow of moved value: `x` } fn f21() { @@ -32,8 +32,8 @@ fn f30(cond: bool) { } else { y }; - touch(&x); //~ ERROR use of moved value: `x` - touch(&y); //~ ERROR use of moved value: `y` + touch(&x); //~ ERROR borrow of moved value: `x` + touch(&y); //~ ERROR borrow of moved value: `y` } fn f40(cond: bool) { @@ -43,8 +43,8 @@ fn f40(cond: bool) { true => x, false => y }; - touch(&x); //~ ERROR use of moved value: `x` - touch(&y); //~ ERROR use of moved value: `y` + touch(&x); //~ ERROR borrow of moved value: `x` + touch(&y); //~ ERROR borrow of moved value: `y` } fn f50(cond: bool) { @@ -55,32 +55,32 @@ fn f50(cond: bool) { true => 10, false => 20, }; - touch(&x); //~ ERROR use of moved value: `x` + touch(&x); //~ ERROR borrow of moved value: `x` touch(&y); } fn f70() { let x = "hi".to_string(); let _y = [x]; - touch(&x); //~ ERROR use of moved value: `x` + touch(&x); //~ ERROR borrow of moved value: `x` } fn f80() { let x = "hi".to_string(); let _y = vec![x]; - touch(&x); //~ ERROR use of moved value: `x` + touch(&x); //~ ERROR borrow of moved value: `x` } fn f100() { let x = vec!["hi".to_string()]; let _y = x.into_iter().next().unwrap(); - touch(&x); //~ ERROR use of moved value: `x` + touch(&x); //~ ERROR borrow of moved value: `x` } fn f110() { let x = vec!["hi".to_string()]; let _y = [x.into_iter().next().unwrap(); 1]; - touch(&x); //~ ERROR use of moved value: `x` + touch(&x); //~ ERROR borrow of moved value: `x` } fn f120() { diff --git a/src/test/ui/moves/moves-based-on-type-exprs.stderr b/src/test/ui/moves/moves-based-on-type-exprs.stderr index 6cb297cbd6..67fae606c4 100644 --- a/src/test/ui/moves/moves-based-on-type-exprs.stderr +++ b/src/test/ui/moves/moves-based-on-type-exprs.stderr @@ -1,117 +1,122 @@ -error[E0382]: use of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:12:12 +error[E0382]: borrow of moved value: `x` + --> $DIR/moves-based-on-type-exprs.rs:12:11 | +LL | let x = "hi".to_string(); + | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait LL | let _y = Foo { f:x }; | - value moved here LL | touch(&x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | ^^ value borrowed here after move -error[E0382]: use of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:18:12 +error[E0382]: borrow of moved value: `x` + --> $DIR/moves-based-on-type-exprs.rs:18:11 | +LL | let x = "hi".to_string(); + | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait LL | let _y = (x, 3); | - value moved here LL | touch(&x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | ^^ value borrowed here after move -error[E0382]: use of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:35:12 +error[E0382]: borrow of moved value: `x` + --> $DIR/moves-based-on-type-exprs.rs:35:11 | +LL | let x = "hi".to_string(); + | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait +... LL | x | - value moved here ... LL | touch(&x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | ^^ value borrowed here after move -error[E0382]: use of moved value: `y` - --> $DIR/moves-based-on-type-exprs.rs:36:12 +error[E0382]: borrow of moved value: `y` + --> $DIR/moves-based-on-type-exprs.rs:36:11 | +LL | let y = "ho".to_string(); + | - move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait +... LL | y | - value moved here ... LL | touch(&y); - | ^ value used here after move - | - = note: move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait + | ^^ value borrowed here after move -error[E0382]: use of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:46:12 +error[E0382]: borrow of moved value: `x` + --> $DIR/moves-based-on-type-exprs.rs:46:11 | +LL | let x = "hi".to_string(); + | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait +... LL | true => x, | - value moved here ... LL | touch(&x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | ^^ value borrowed here after move -error[E0382]: use of moved value: `y` - --> $DIR/moves-based-on-type-exprs.rs:47:12 +error[E0382]: borrow of moved value: `y` + --> $DIR/moves-based-on-type-exprs.rs:47:11 | +LL | let y = "ho".to_string(); + | - move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait +... LL | false => y | - value moved here ... LL | touch(&y); - | ^ value used here after move - | - = note: move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait + | ^^ value borrowed here after move -error[E0382]: use of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:58:12 +error[E0382]: borrow of moved value: `x` + --> $DIR/moves-based-on-type-exprs.rs:58:11 | +LL | let x = "hi".to_string(); + | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait +... LL | _ if guard(x) => 10, | - value moved here ... LL | touch(&x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | ^^ value borrowed here after move -error[E0382]: use of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:65:12 +error[E0382]: borrow of moved value: `x` + --> $DIR/moves-based-on-type-exprs.rs:65:11 | +LL | let x = "hi".to_string(); + | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait LL | let _y = [x]; | - value moved here LL | touch(&x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | ^^ value borrowed here after move -error[E0382]: use of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:71:12 +error[E0382]: borrow of moved value: `x` + --> $DIR/moves-based-on-type-exprs.rs:71:11 | +LL | let x = "hi".to_string(); + | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait LL | let _y = vec![x]; | - value moved here LL | touch(&x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | ^^ value borrowed here after move -error[E0382]: use of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:77:12 +error[E0382]: borrow of moved value: `x` + --> $DIR/moves-based-on-type-exprs.rs:77:11 | +LL | let x = vec!["hi".to_string()]; + | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait LL | let _y = x.into_iter().next().unwrap(); | - value moved here LL | touch(&x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait + | ^^ value borrowed here after move -error[E0382]: use of moved value: `x` - --> $DIR/moves-based-on-type-exprs.rs:83:12 +error[E0382]: borrow of moved value: `x` + --> $DIR/moves-based-on-type-exprs.rs:83:11 | +LL | let x = vec!["hi".to_string()]; + | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait LL | let _y = [x.into_iter().next().unwrap(); 1]; | - value moved here LL | touch(&x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait + | ^^ value borrowed here after move error: aborting due to 11 previous errors diff --git a/src/test/ui/moves/moves-based-on-type-match-bindings.nll.stderr b/src/test/ui/moves/moves-based-on-type-match-bindings.nll.stderr deleted file mode 100644 index 322999a1f0..0000000000 --- a/src/test/ui/moves/moves-based-on-type-match-bindings.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0382]: borrow of moved value: `x` - --> $DIR/moves-based-on-type-match-bindings.rs:16:11 - | -LL | Foo {f} => {} - | - value moved here -... -LL | touch(&x); - | ^^ value borrowed here after partial move - | - = note: move occurs because `x.f` has type `std::string::String`, which does not implement the `Copy` trait - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/moves/moves-based-on-type-match-bindings.rs b/src/test/ui/moves/moves-based-on-type-match-bindings.rs index 59e5a8f684..1290d4a25a 100644 --- a/src/test/ui/moves/moves-based-on-type-match-bindings.rs +++ b/src/test/ui/moves/moves-based-on-type-match-bindings.rs @@ -13,8 +13,8 @@ fn f10() { Foo {f} => {} }; - touch(&x); //~ ERROR use of partially moved value: `x` - //~^ value used here after move + touch(&x); //~ ERROR borrow of moved value: `x` + //~^ value borrowed here after partial move //~| move occurs because `x.f` has type `std::string::String` } diff --git a/src/test/ui/moves/moves-based-on-type-match-bindings.stderr b/src/test/ui/moves/moves-based-on-type-match-bindings.stderr index 9174cfa122..322999a1f0 100644 --- a/src/test/ui/moves/moves-based-on-type-match-bindings.stderr +++ b/src/test/ui/moves/moves-based-on-type-match-bindings.stderr @@ -1,11 +1,11 @@ -error[E0382]: use of partially moved value: `x` - --> $DIR/moves-based-on-type-match-bindings.rs:16:12 +error[E0382]: borrow of moved value: `x` + --> $DIR/moves-based-on-type-match-bindings.rs:16:11 | LL | Foo {f} => {} | - value moved here ... LL | touch(&x); - | ^ value used here after move + | ^^ value borrowed here after partial move | = note: move occurs because `x.f` has type `std::string::String`, which does not implement the `Copy` trait diff --git a/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.nll.stderr b/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.nll.stderr deleted file mode 100644 index 0568a2e94a..0000000000 --- a/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0507]: cannot move out of captured variable in an `Fn` closure - --> $DIR/moves-based-on-type-move-out-of-closure-env-issue-1965.rs:11:28 - | -LL | let i = box 3; - | - captured outer variable -LL | let _f = to_fn(|| test(i)); - | ^ cannot move out of captured variable in an `Fn` closure - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr b/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr index 654881d25e..0568a2e94a 100644 --- a/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr +++ b/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr @@ -1,10 +1,10 @@ -error[E0507]: cannot move out of captured outer variable in an `Fn` closure +error[E0507]: cannot move out of captured variable in an `Fn` closure --> $DIR/moves-based-on-type-move-out-of-closure-env-issue-1965.rs:11:28 | LL | let i = box 3; | - captured outer variable LL | let _f = to_fn(|| test(i)); - | ^ cannot move out of captured outer variable in an `Fn` closure + | ^ cannot move out of captured variable in an `Fn` closure error: aborting due to previous error diff --git a/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.nll.stderr b/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.nll.stderr deleted file mode 100644 index dde54eee83..0000000000 --- a/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.nll.stderr +++ /dev/null @@ -1,25 +0,0 @@ -error[E0499]: cannot borrow `*f` as mutable more than once at a time - --> $DIR/moves-based-on-type-no-recursive-stack-closure.rs:20:27 - | -LL | (f.c)(f, true); - | ----- ^ second mutable borrow occurs here - | | - | first mutable borrow occurs here - | first borrow later used by call - -error[E0382]: borrow of moved value: `f` - --> $DIR/moves-based-on-type-no-recursive-stack-closure.rs:32:5 - | -LL | fn conspirator(mut f: F) where F: FnMut(&mut R, bool) { - | - ----- move occurs because `f` has type `F`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | let mut r = R {c: Box::new(f)}; - | - value moved here -LL | f(&mut r, false) - | ^ value borrowed here after move - -error: aborting due to 2 previous errors - -Some errors occurred: E0382, E0499. -For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.rs b/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.rs index 737a131c9b..3fa1187862 100644 --- a/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.rs +++ b/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.rs @@ -29,7 +29,7 @@ fn innocent_looking_victim() { fn conspirator(mut f: F) where F: FnMut(&mut R, bool) { let mut r = R {c: Box::new(f)}; - f(&mut r, false) //~ ERROR use of moved value + f(&mut r, false) //~ ERROR borrow of moved value } fn main() { innocent_looking_victim() } diff --git a/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr b/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr index fe91a488d1..483c364752 100644 --- a/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr +++ b/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr @@ -2,22 +2,24 @@ error[E0499]: cannot borrow `*f` as mutable more than once at a time --> $DIR/moves-based-on-type-no-recursive-stack-closure.rs:20:27 | LL | (f.c)(f, true); - | ----- ^ - first borrow ends here - | | | - | | second mutable borrow occurs here + | ----- ^ second mutable borrow occurs here + | | | first mutable borrow occurs here + | first borrow later used by call -error[E0382]: use of moved value: `f` +error[E0382]: borrow of moved value: `f` --> $DIR/moves-based-on-type-no-recursive-stack-closure.rs:32:5 | +LL | fn conspirator(mut f: F) where F: FnMut(&mut R, bool) { + | - ----- move occurs because `f` has type `F`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | let mut r = R {c: Box::new(f)}; | - value moved here LL | f(&mut r, false) - | ^ value used here after move - | - = note: move occurs because `f` has type `F`, which does not implement the `Copy` trait + | ^ value borrowed here after move error: aborting due to 2 previous errors -Some errors occurred: E0382, E0499. +Some errors have detailed explanations: E0382, E0499. For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/moves/moves-based-on-type-tuple.rs b/src/test/ui/moves/moves-based-on-type-tuple.rs index d99fe51931..828d90cd7a 100644 --- a/src/test/ui/moves/moves-based-on-type-tuple.rs +++ b/src/test/ui/moves/moves-based-on-type-tuple.rs @@ -1,11 +1,8 @@ #![feature(box_syntax)] -// compile-flags: -Z borrowck=compare - fn dup(x: Box) -> Box<(Box,Box)> { box (x, x) - //~^ use of moved value: `x` (Ast) [E0382] - //~| use of moved value: `x` (Mir) [E0382] + //~^ use of moved value: `x` [E0382] } fn main() { diff --git a/src/test/ui/moves/moves-based-on-type-tuple.stderr b/src/test/ui/moves/moves-based-on-type-tuple.stderr index c49dbdab40..2e1ddbdf57 100644 --- a/src/test/ui/moves/moves-based-on-type-tuple.stderr +++ b/src/test/ui/moves/moves-based-on-type-tuple.stderr @@ -1,15 +1,5 @@ -error[E0382]: use of moved value: `x` (Ast) - --> $DIR/moves-based-on-type-tuple.rs:6:13 - | -LL | box (x, x) - | - ^ value used here after move - | | - | value moved here - | - = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `x` (Mir) - --> $DIR/moves-based-on-type-tuple.rs:6:13 +error[E0382]: use of moved value: `x` + --> $DIR/moves-based-on-type-tuple.rs:4:13 | LL | fn dup(x: Box) -> Box<(Box,Box)> { | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -18,6 +8,6 @@ LL | box (x, x) | | | value moved here -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/moves/moves-sru-moved-field.nll.stderr b/src/test/ui/moves/moves-sru-moved-field.nll.stderr deleted file mode 100644 index a012c2d9b7..0000000000 --- a/src/test/ui/moves/moves-sru-moved-field.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: use of moved value: `f.moved` - --> $DIR/moves-sru-moved-field.rs:20:14 - | -LL | let _b = Foo {noncopyable: g, ..f}; - | ------------------------- value moved here -LL | let _c = Foo {noncopyable: h, ..f}; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ value used here after move - | - = note: move occurs because `f.moved` has type `std::boxed::Box`, which does not implement the `Copy` trait - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/moves/moves-sru-moved-field.stderr b/src/test/ui/moves/moves-sru-moved-field.stderr index aac399ea4a..a012c2d9b7 100644 --- a/src/test/ui/moves/moves-sru-moved-field.stderr +++ b/src/test/ui/moves/moves-sru-moved-field.stderr @@ -1,10 +1,10 @@ error[E0382]: use of moved value: `f.moved` - --> $DIR/moves-sru-moved-field.rs:20:37 + --> $DIR/moves-sru-moved-field.rs:20:14 | LL | let _b = Foo {noncopyable: g, ..f}; - | - value moved here + | ------------------------- value moved here LL | let _c = Foo {noncopyable: h, ..f}; - | ^ value used here after move + | ^^^^^^^^^^^^^^^^^^^^^^^^^ value used here after move | = note: move occurs because `f.moved` has type `std::boxed::Box`, which does not implement the `Copy` trait diff --git a/src/test/ui/mut/mut-cant-alias.nll.stderr b/src/test/ui/mut/mut-cant-alias.nll.stderr deleted file mode 100644 index d56e45db13..0000000000 --- a/src/test/ui/mut/mut-cant-alias.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0499]: cannot borrow `b` as mutable more than once at a time - --> $DIR/mut-cant-alias.rs:9:20 - | -LL | let b1 = &mut *b; - | - first mutable borrow occurs here -LL | let b2 = &mut *b; - | ^ second mutable borrow occurs here -LL | b1.use_mut(); - | -- first borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/mut/mut-cant-alias.stderr b/src/test/ui/mut/mut-cant-alias.stderr index 5fc194bc3d..d56e45db13 100644 --- a/src/test/ui/mut/mut-cant-alias.stderr +++ b/src/test/ui/mut/mut-cant-alias.stderr @@ -6,8 +6,7 @@ LL | let b1 = &mut *b; LL | let b2 = &mut *b; | ^ second mutable borrow occurs here LL | b1.use_mut(); -LL | } - | - first borrow ends here + | -- first borrow later used here error: aborting due to previous error diff --git a/src/test/ui/mut/mut-pattern-internal-mutability.ast.stderr b/src/test/ui/mut/mut-pattern-internal-mutability.ast.stderr deleted file mode 100644 index da33cdf779..0000000000 --- a/src/test/ui/mut/mut-pattern-internal-mutability.ast.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/mut-pattern-internal-mutability.rs:8:5 - | -LL | let &mut x = foo; - | - first assignment to `x` -LL | x += 1; - | ^^^^^^ cannot assign twice to immutable variable - -error[E0506]: cannot assign to `*foo` because it is borrowed - --> $DIR/mut-pattern-internal-mutability.rs:17:5 - | -LL | let &mut ref x = foo; - | ----- borrow of `*foo` occurs here -LL | *foo += 1; - | ^^^^^^^^^ assignment to borrowed `*foo` occurs here - -error: aborting due to 2 previous errors - -Some errors occurred: E0384, E0506. -For more information about an error, try `rustc --explain E0384`. diff --git a/src/test/ui/mut/mut-pattern-internal-mutability.mir.stderr b/src/test/ui/mut/mut-pattern-internal-mutability.mir.stderr deleted file mode 100644 index 0db32017b3..0000000000 --- a/src/test/ui/mut/mut-pattern-internal-mutability.mir.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/mut-pattern-internal-mutability.rs:8:5 - | -LL | let &mut x = foo; - | - - | | - | first assignment to `x` - | help: make this binding mutable: `mut x` -LL | x += 1; - | ^^^^^^ cannot assign twice to immutable variable - -error[E0506]: cannot assign to `*foo` because it is borrowed - --> $DIR/mut-pattern-internal-mutability.rs:17:5 - | -LL | let &mut ref x = foo; - | ----- borrow of `*foo` occurs here -LL | *foo += 1; - | ^^^^^^^^^ assignment to borrowed `*foo` occurs here -LL | -LL | drop(x); - | - borrow later used here - -error: aborting due to 2 previous errors - -Some errors occurred: E0384, E0506. -For more information about an error, try `rustc --explain E0384`. diff --git a/src/test/ui/mut/mut-pattern-internal-mutability.rs b/src/test/ui/mut/mut-pattern-internal-mutability.rs index ffad623e57..bcee878e38 100644 --- a/src/test/ui/mut/mut-pattern-internal-mutability.rs +++ b/src/test/ui/mut/mut-pattern-internal-mutability.rs @@ -1,12 +1,8 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - fn main() { let foo = &mut 1; let &mut x = foo; - x += 1; //[ast]~ ERROR cannot assign twice to immutable variable - //[mir]~^ ERROR cannot assign twice to immutable variable `x` + x += 1; //~ ERROR cannot assign twice to immutable variable `x` // explicitly mut-ify internals let &mut mut x = foo; @@ -14,7 +10,6 @@ fn main() { // check borrowing is detected successfully let &mut ref x = foo; - *foo += 1; //[ast]~ ERROR cannot assign to `*foo` because it is borrowed - //[mir]~^ ERROR cannot assign to `*foo` because it is borrowed + *foo += 1; //~ ERROR cannot assign to `*foo` because it is borrowed drop(x); } diff --git a/src/test/ui/mut/mut-pattern-internal-mutability.ast.nll.stderr b/src/test/ui/mut/mut-pattern-internal-mutability.stderr similarity index 81% rename from src/test/ui/mut/mut-pattern-internal-mutability.ast.nll.stderr rename to src/test/ui/mut/mut-pattern-internal-mutability.stderr index 0db32017b3..eaa33453a7 100644 --- a/src/test/ui/mut/mut-pattern-internal-mutability.ast.nll.stderr +++ b/src/test/ui/mut/mut-pattern-internal-mutability.stderr @@ -1,5 +1,5 @@ error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/mut-pattern-internal-mutability.rs:8:5 + --> $DIR/mut-pattern-internal-mutability.rs:5:5 | LL | let &mut x = foo; | - @@ -10,17 +10,16 @@ LL | x += 1; | ^^^^^^ cannot assign twice to immutable variable error[E0506]: cannot assign to `*foo` because it is borrowed - --> $DIR/mut-pattern-internal-mutability.rs:17:5 + --> $DIR/mut-pattern-internal-mutability.rs:13:5 | LL | let &mut ref x = foo; | ----- borrow of `*foo` occurs here LL | *foo += 1; | ^^^^^^^^^ assignment to borrowed `*foo` occurs here -LL | LL | drop(x); | - borrow later used here error: aborting due to 2 previous errors -Some errors occurred: E0384, E0506. +Some errors have detailed explanations: E0384, E0506. For more information about an error, try `rustc --explain E0384`. diff --git a/src/test/ui/mut/mut-suggestion.nll.stderr b/src/test/ui/mut/mut-suggestion.nll.stderr deleted file mode 100644 index 61656db5ec..0000000000 --- a/src/test/ui/mut/mut-suggestion.nll.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable - --> $DIR/mut-suggestion.rs:12:5 - | -LL | fn func(arg: S) { - | --- help: consider changing this to be mutable: `mut arg` -... -LL | arg.mutate(); - | ^^^ cannot borrow as mutable - -error[E0596]: cannot borrow `local` as mutable, as it is not declared as mutable - --> $DIR/mut-suggestion.rs:21:5 - | -LL | let local = S; - | ----- help: consider changing this to be mutable: `mut local` -... -LL | local.mutate(); - | ^^^^^ cannot borrow as mutable - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/mut/mut-suggestion.rs b/src/test/ui/mut/mut-suggestion.rs index 0d95a8bc12..3104b20aca 100644 --- a/src/test/ui/mut/mut-suggestion.rs +++ b/src/test/ui/mut/mut-suggestion.rs @@ -7,18 +7,16 @@ impl S { } fn func(arg: S) { - //~^ HELP make this binding mutable + //~^ HELP consider changing this to be mutable //~| SUGGESTION mut arg arg.mutate(); - //~^ ERROR cannot borrow immutable argument - //~| cannot borrow mutably + //~^ ERROR cannot borrow `arg` as mutable, as it is not declared as mutable } fn main() { let local = S; - //~^ HELP make this binding mutable + //~^ HELP consider changing this to be mutable //~| SUGGESTION mut local local.mutate(); - //~^ ERROR cannot borrow immutable local variable - //~| cannot borrow mutably + //~^ ERROR cannot borrow `local` as mutable, as it is not declared as mutable } diff --git a/src/test/ui/mut/mut-suggestion.stderr b/src/test/ui/mut/mut-suggestion.stderr index 1998ec1eca..245eaff4bb 100644 --- a/src/test/ui/mut/mut-suggestion.stderr +++ b/src/test/ui/mut/mut-suggestion.stderr @@ -1,20 +1,20 @@ -error[E0596]: cannot borrow immutable argument `arg` as mutable +error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable --> $DIR/mut-suggestion.rs:12:5 | LL | fn func(arg: S) { - | --- help: make this binding mutable: `mut arg` + | --- help: consider changing this to be mutable: `mut arg` ... LL | arg.mutate(); - | ^^^ cannot borrow mutably + | ^^^ cannot borrow as mutable -error[E0596]: cannot borrow immutable local variable `local` as mutable - --> $DIR/mut-suggestion.rs:21:5 +error[E0596]: cannot borrow `local` as mutable, as it is not declared as mutable + --> $DIR/mut-suggestion.rs:20:5 | LL | let local = S; - | ----- help: make this binding mutable: `mut local` + | ----- help: consider changing this to be mutable: `mut local` ... LL | local.mutate(); - | ^^^^^ cannot borrow mutably + | ^^^^^ cannot borrow as mutable error: aborting due to 2 previous errors diff --git a/src/test/ui/mut/mutable-class-fields-2.nll.stderr b/src/test/ui/mut/mutable-class-fields-2.nll.stderr deleted file mode 100644 index 15323ce9a9..0000000000 --- a/src/test/ui/mut/mutable-class-fields-2.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0594]: cannot assign to `self.how_hungry` which is behind a `&` reference - --> $DIR/mutable-class-fields-2.rs:9:5 - | -LL | pub fn eat(&self) { - | ----- help: consider changing this to be a mutable reference: `&mut self` -LL | self.how_hungry -= 5; - | ^^^^^^^^^^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be written - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/mut/mutable-class-fields-2.stderr b/src/test/ui/mut/mutable-class-fields-2.stderr index b0dea3082d..a27a82ffe4 100644 --- a/src/test/ui/mut/mutable-class-fields-2.stderr +++ b/src/test/ui/mut/mutable-class-fields-2.stderr @@ -1,11 +1,10 @@ -error[E0594]: cannot assign to field `self.how_hungry` of immutable binding +error[E0594]: cannot assign to `self.how_hungry` which is behind a `&` reference --> $DIR/mutable-class-fields-2.rs:9:5 | LL | pub fn eat(&self) { - | ----- use `&mut self` here to make mutable + | ----- help: consider changing this to be a mutable reference: `&mut self` LL | self.how_hungry -= 5; - | ^^^^^^^^^^^^^^^^^^^^ cannot mutably borrow field of immutable binding + | ^^^^^^^^^^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be written error: aborting due to previous error -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/mut/mutable-class-fields.ast.stderr b/src/test/ui/mut/mutable-class-fields.ast.stderr deleted file mode 100644 index 95a928437d..0000000000 --- a/src/test/ui/mut/mutable-class-fields.ast.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0594]: cannot assign to field `nyan.how_hungry` of immutable binding - --> $DIR/mutable-class-fields.rs:18:3 - | -LL | let nyan : Cat = cat(52, 99); - | ---- help: make this binding mutable: `mut nyan` -LL | nyan.how_hungry = 0; - | ^^^^^^^^^^^^^^^^^^^ cannot mutably borrow field of immutable binding - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/mut/mutable-class-fields.mir.stderr b/src/test/ui/mut/mutable-class-fields.mir.stderr deleted file mode 100644 index e243fb74dc..0000000000 --- a/src/test/ui/mut/mutable-class-fields.mir.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0594]: cannot assign to `nyan.how_hungry`, as `nyan` is not declared as mutable - --> $DIR/mutable-class-fields.rs:18:3 - | -LL | let nyan : Cat = cat(52, 99); - | ---- help: consider changing this to be mutable: `mut nyan` -LL | nyan.how_hungry = 0; - | ^^^^^^^^^^^^^^^^^^^ cannot assign - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/mut/mutable-class-fields.rs b/src/test/ui/mut/mutable-class-fields.rs index 2a729a5f6e..30768a1ec9 100644 --- a/src/test/ui/mut/mutable-class-fields.rs +++ b/src/test/ui/mut/mutable-class-fields.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - struct Cat { meows : usize, how_hungry : isize, @@ -15,6 +12,5 @@ fn cat(in_x : usize, in_y : isize) -> Cat { fn main() { let nyan : Cat = cat(52, 99); - nyan.how_hungry = 0; //[ast]~ ERROR cannot assign - //[mir]~^ ERROR cannot assign + nyan.how_hungry = 0; //~ ERROR cannot assign } diff --git a/src/test/ui/mut/mutable-class-fields.ast.nll.stderr b/src/test/ui/mut/mutable-class-fields.stderr similarity index 74% rename from src/test/ui/mut/mutable-class-fields.ast.nll.stderr rename to src/test/ui/mut/mutable-class-fields.stderr index e243fb74dc..5391ccc80c 100644 --- a/src/test/ui/mut/mutable-class-fields.ast.nll.stderr +++ b/src/test/ui/mut/mutable-class-fields.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to `nyan.how_hungry`, as `nyan` is not declared as mutable - --> $DIR/mutable-class-fields.rs:18:3 + --> $DIR/mutable-class-fields.rs:15:3 | LL | let nyan : Cat = cat(52, 99); | ---- help: consider changing this to be mutable: `mut nyan` @@ -8,4 +8,3 @@ LL | nyan.how_hungry = 0; error: aborting due to previous error -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/namespace/namespace-mix.stderr b/src/test/ui/namespace/namespace-mix.stderr index 99fa3b9679..ef2d0d87f0 100644 --- a/src/test/ui/namespace/namespace-mix.stderr +++ b/src/test/ui/namespace/namespace-mix.stderr @@ -596,5 +596,5 @@ LL | fn check(_: T) {} error: aborting due to 48 previous errors -Some errors occurred: E0277, E0423. +Some errors have detailed explanations: E0277, E0423. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/nested-ty-params.stderr b/src/test/ui/nested-ty-params.stderr index 37adeffb9b..f6741b5e5e 100644 --- a/src/test/ui/nested-ty-params.stderr +++ b/src/test/ui/nested-ty-params.stderr @@ -2,7 +2,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/nested-ty-params.rs:3:16 | LL | fn hd(v: Vec ) -> U { - | - type variable from outer function + | - type parameter from outer function LL | fn hd1(w: [U]) -> U { return w[0]; } | --- ^ use of generic parameter from outer function | | @@ -12,7 +12,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/nested-ty-params.rs:3:23 | LL | fn hd(v: Vec ) -> U { - | - type variable from outer function + | - type parameter from outer function LL | fn hd1(w: [U]) -> U { return w[0]; } | --- ^ use of generic parameter from outer function | | diff --git a/src/test/ui/nested_impl_trait.stderr b/src/test/ui/nested_impl_trait.stderr index 60f57e56ba..bf853d30fa 100644 --- a/src/test/ui/nested_impl_trait.stderr +++ b/src/test/ui/nested_impl_trait.stderr @@ -48,5 +48,4 @@ LL | fn allowed_in_ret_type() -> impl Fn() -> impl Into { error: aborting due to 6 previous errors -Some errors occurred: E0562, E0666. -For more information about an error, try `rustc --explain E0562`. +For more information about this error, try `rustc --explain E0562`. diff --git a/src/test/ui/nll/borrow-use-issue-46875.rs b/src/test/ui/nll/borrow-use-issue-46875.rs index 03db28fc50..42e28b9674 100644 --- a/src/test/ui/nll/borrow-use-issue-46875.rs +++ b/src/test/ui/nll/borrow-use-issue-46875.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - // run-pass fn vec() { diff --git a/src/test/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs b/src/test/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs index 59936a8092..7d3b00dfc7 100644 --- a/src/test/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs +++ b/src/test/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs @@ -3,7 +3,6 @@ // // FIXME(#54366) - We probably shouldn't allow #[thread_local] static mut to get a 'static lifetime. -#![feature(nll)] #![feature(thread_local)] #[thread_local] diff --git a/src/test/ui/nll/borrowed-local-error.rs b/src/test/ui/nll/borrowed-local-error.rs index d37e61b63a..d333356d96 100644 --- a/src/test/ui/nll/borrowed-local-error.rs +++ b/src/test/ui/nll/borrowed-local-error.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - fn gimme(x: &(u32,)) -> &u32 { &x.0 } diff --git a/src/test/ui/nll/borrowed-local-error.stderr b/src/test/ui/nll/borrowed-local-error.stderr index 799eec9d34..d629caa435 100644 --- a/src/test/ui/nll/borrowed-local-error.stderr +++ b/src/test/ui/nll/borrowed-local-error.stderr @@ -1,5 +1,5 @@ error[E0597]: `v` does not live long enough - --> $DIR/borrowed-local-error.rs:10:9 + --> $DIR/borrowed-local-error.rs:8:9 | LL | let x = gimme({ | ----- borrow later used by call diff --git a/src/test/ui/nll/borrowed-referent-issue-38899.rs b/src/test/ui/nll/borrowed-referent-issue-38899.rs index 7bad6dc2cd..d4b05fb793 100644 --- a/src/test/ui/nll/borrowed-referent-issue-38899.rs +++ b/src/test/ui/nll/borrowed-referent-issue-38899.rs @@ -1,7 +1,6 @@ // Regression test for issue #38899 #![feature(nll)] -#![allow(dead_code)] pub struct Block<'a> { current: &'a u8, diff --git a/src/test/ui/nll/borrowed-referent-issue-38899.stderr b/src/test/ui/nll/borrowed-referent-issue-38899.stderr index 5c9c48f5b1..38a6e27a0e 100644 --- a/src/test/ui/nll/borrowed-referent-issue-38899.stderr +++ b/src/test/ui/nll/borrowed-referent-issue-38899.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable - --> $DIR/borrowed-referent-issue-38899.rs:14:21 + --> $DIR/borrowed-referent-issue-38899.rs:13:21 | LL | let x = &mut block; | ---------- mutable borrow occurs here diff --git a/src/test/ui/nll/borrowed-temporary-error.rs b/src/test/ui/nll/borrowed-temporary-error.rs index 5ad987c721..37d0e670d3 100644 --- a/src/test/ui/nll/borrowed-temporary-error.rs +++ b/src/test/ui/nll/borrowed-temporary-error.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - fn gimme(x: &(u32,)) -> &u32 { &x.0 } diff --git a/src/test/ui/nll/borrowed-temporary-error.stderr b/src/test/ui/nll/borrowed-temporary-error.stderr index c0d42312eb..2c6bd92641 100644 --- a/src/test/ui/nll/borrowed-temporary-error.stderr +++ b/src/test/ui/nll/borrowed-temporary-error.stderr @@ -1,5 +1,5 @@ error[E0716]: temporary value dropped while borrowed - --> $DIR/borrowed-temporary-error.rs:10:10 + --> $DIR/borrowed-temporary-error.rs:8:10 | LL | &(v,) | ^^^^ creates a temporary which is freed while still in use diff --git a/src/test/ui/nll/borrowed-universal-error-2.rs b/src/test/ui/nll/borrowed-universal-error-2.rs index a10a62b470..3f9b2f2924 100644 --- a/src/test/ui/nll/borrowed-universal-error-2.rs +++ b/src/test/ui/nll/borrowed-universal-error-2.rs @@ -1,6 +1,3 @@ -#![feature(nll)] -#![allow(warnings)] - fn foo<'a>(x: &'a (u32,)) -> &'a u32 { let v = 22; &v diff --git a/src/test/ui/nll/borrowed-universal-error-2.stderr b/src/test/ui/nll/borrowed-universal-error-2.stderr index e89a77a2d3..7213ed3baf 100644 --- a/src/test/ui/nll/borrowed-universal-error-2.stderr +++ b/src/test/ui/nll/borrowed-universal-error-2.stderr @@ -1,5 +1,5 @@ error[E0515]: cannot return reference to local variable `v` - --> $DIR/borrowed-universal-error-2.rs:6:5 + --> $DIR/borrowed-universal-error-2.rs:3:5 | LL | &v | ^^ returns a reference to data owned by the current function diff --git a/src/test/ui/nll/borrowed-universal-error.rs b/src/test/ui/nll/borrowed-universal-error.rs index 18a0a72c4b..fc9ffd4706 100644 --- a/src/test/ui/nll/borrowed-universal-error.rs +++ b/src/test/ui/nll/borrowed-universal-error.rs @@ -1,6 +1,3 @@ -#![feature(nll)] -#![allow(warnings)] - fn gimme(x: &(u32,)) -> &u32 { &x.0 } diff --git a/src/test/ui/nll/borrowed-universal-error.stderr b/src/test/ui/nll/borrowed-universal-error.stderr index 4b76795943..88a2d8fcf8 100644 --- a/src/test/ui/nll/borrowed-universal-error.stderr +++ b/src/test/ui/nll/borrowed-universal-error.stderr @@ -1,5 +1,5 @@ error[E0515]: cannot return value referencing temporary value - --> $DIR/borrowed-universal-error.rs:10:5 + --> $DIR/borrowed-universal-error.rs:7:5 | LL | gimme(&(v,)) | ^^^^^^^----^ diff --git a/src/test/ui/nll/cannot-move-block-spans.nll.stderr b/src/test/ui/nll/cannot-move-block-spans.nll.stderr deleted file mode 100644 index 5d50ed67e2..0000000000 --- a/src/test/ui/nll/cannot-move-block-spans.nll.stderr +++ /dev/null @@ -1,85 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/cannot-move-block-spans.rs:5:15 - | -LL | let x = { *r }; - | ^^ - | | - | cannot move out of borrowed content - | help: consider removing the `*`: `r` - -error[E0507]: cannot move out of borrowed content - --> $DIR/cannot-move-block-spans.rs:6:22 - | -LL | let y = unsafe { *r }; - | ^^ - | | - | cannot move out of borrowed content - | help: consider removing the `*`: `r` - -error[E0507]: cannot move out of borrowed content - --> $DIR/cannot-move-block-spans.rs:7:26 - | -LL | let z = loop { break *r; }; - | ^^ - | | - | cannot move out of borrowed content - | help: consider removing the `*`: `r` - -error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array - --> $DIR/cannot-move-block-spans.rs:11:15 - | -LL | let x = { arr[0] }; - | ^^^^^^ - | | - | cannot move out of here - | help: consider borrowing here: `&arr[0]` - -error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array - --> $DIR/cannot-move-block-spans.rs:12:22 - | -LL | let y = unsafe { arr[0] }; - | ^^^^^^ - | | - | cannot move out of here - | help: consider borrowing here: `&arr[0]` - -error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array - --> $DIR/cannot-move-block-spans.rs:13:26 - | -LL | let z = loop { break arr[0]; }; - | ^^^^^^ - | | - | cannot move out of here - | help: consider borrowing here: `&arr[0]` - -error[E0507]: cannot move out of borrowed content - --> $DIR/cannot-move-block-spans.rs:17:38 - | -LL | let x = { let mut u = 0; u += 1; *r }; - | ^^ - | | - | cannot move out of borrowed content - | help: consider removing the `*`: `r` - -error[E0507]: cannot move out of borrowed content - --> $DIR/cannot-move-block-spans.rs:18:45 - | -LL | let y = unsafe { let mut u = 0; u += 1; *r }; - | ^^ - | | - | cannot move out of borrowed content - | help: consider removing the `*`: `r` - -error[E0507]: cannot move out of borrowed content - --> $DIR/cannot-move-block-spans.rs:19:49 - | -LL | let z = loop { let mut u = 0; u += 1; break *r; u += 2; }; - | ^^ - | | - | cannot move out of borrowed content - | help: consider removing the `*`: `r` - -error: aborting due to 9 previous errors - -Some errors occurred: E0507, E0508. -For more information about an error, try `rustc --explain E0507`. diff --git a/src/test/ui/nll/cannot-move-block-spans.stderr b/src/test/ui/nll/cannot-move-block-spans.stderr index 6de67a45fb..c8dd07dabe 100644 --- a/src/test/ui/nll/cannot-move-block-spans.stderr +++ b/src/test/ui/nll/cannot-move-block-spans.stderr @@ -2,57 +2,84 @@ error[E0507]: cannot move out of borrowed content --> $DIR/cannot-move-block-spans.rs:5:15 | LL | let x = { *r }; - | ^^ cannot move out of borrowed content + | ^^ + | | + | cannot move out of borrowed content + | help: consider removing the `*`: `r` error[E0507]: cannot move out of borrowed content --> $DIR/cannot-move-block-spans.rs:6:22 | LL | let y = unsafe { *r }; - | ^^ cannot move out of borrowed content + | ^^ + | | + | cannot move out of borrowed content + | help: consider removing the `*`: `r` error[E0507]: cannot move out of borrowed content --> $DIR/cannot-move-block-spans.rs:7:26 | LL | let z = loop { break *r; }; - | ^^ cannot move out of borrowed content + | ^^ + | | + | cannot move out of borrowed content + | help: consider removing the `*`: `r` error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array --> $DIR/cannot-move-block-spans.rs:11:15 | LL | let x = { arr[0] }; - | ^^^^^^ cannot move out of here + | ^^^^^^ + | | + | cannot move out of here + | help: consider borrowing here: `&arr[0]` error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array --> $DIR/cannot-move-block-spans.rs:12:22 | LL | let y = unsafe { arr[0] }; - | ^^^^^^ cannot move out of here + | ^^^^^^ + | | + | cannot move out of here + | help: consider borrowing here: `&arr[0]` error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array --> $DIR/cannot-move-block-spans.rs:13:26 | LL | let z = loop { break arr[0]; }; - | ^^^^^^ cannot move out of here + | ^^^^^^ + | | + | cannot move out of here + | help: consider borrowing here: `&arr[0]` error[E0507]: cannot move out of borrowed content --> $DIR/cannot-move-block-spans.rs:17:38 | LL | let x = { let mut u = 0; u += 1; *r }; - | ^^ cannot move out of borrowed content + | ^^ + | | + | cannot move out of borrowed content + | help: consider removing the `*`: `r` error[E0507]: cannot move out of borrowed content --> $DIR/cannot-move-block-spans.rs:18:45 | LL | let y = unsafe { let mut u = 0; u += 1; *r }; - | ^^ cannot move out of borrowed content + | ^^ + | | + | cannot move out of borrowed content + | help: consider removing the `*`: `r` error[E0507]: cannot move out of borrowed content --> $DIR/cannot-move-block-spans.rs:19:49 | LL | let z = loop { let mut u = 0; u += 1; break *r; u += 2; }; - | ^^ cannot move out of borrowed content + | ^^ + | | + | cannot move out of borrowed content + | help: consider removing the `*`: `r` error: aborting due to 9 previous errors -Some errors occurred: E0507, E0508. +Some errors have detailed explanations: E0507, E0508. For more information about an error, try `rustc --explain E0507`. diff --git a/src/test/ui/nll/capture-mut-ref.rs b/src/test/ui/nll/capture-mut-ref.rs index 222f4e71c5..9d2624a9d6 100644 --- a/src/test/ui/nll/capture-mut-ref.rs +++ b/src/test/ui/nll/capture-mut-ref.rs @@ -1,7 +1,6 @@ // Check that capturing a mutable reference by move and assigning to its // referent doesn't make the unused mut lint think that it is mutable. -#![feature(nll)] #![deny(unused_mut)] fn mutable_upvar() { diff --git a/src/test/ui/nll/capture-mut-ref.stderr b/src/test/ui/nll/capture-mut-ref.stderr index 327ce0c6e8..883b2d05a7 100644 --- a/src/test/ui/nll/capture-mut-ref.stderr +++ b/src/test/ui/nll/capture-mut-ref.stderr @@ -1,5 +1,5 @@ error: variable does not need to be mutable - --> $DIR/capture-mut-ref.rs:8:9 + --> $DIR/capture-mut-ref.rs:7:9 | LL | let mut x = &mut 0; | ----^ @@ -7,7 +7,7 @@ LL | let mut x = &mut 0; | help: remove this `mut` | note: lint level defined here - --> $DIR/capture-mut-ref.rs:5:9 + --> $DIR/capture-mut-ref.rs:4:9 | LL | #![deny(unused_mut)] | ^^^^^^^^^^ diff --git a/src/test/ui/nll/capture-ref-in-struct.rs b/src/test/ui/nll/capture-ref-in-struct.rs index bf2db32901..db6ac7d66c 100644 --- a/src/test/ui/nll/capture-ref-in-struct.rs +++ b/src/test/ui/nll/capture-ref-in-struct.rs @@ -1,9 +1,6 @@ // Test that a structure which tries to store a pointer to `y` into // `p` (indirectly) fails to compile. -#![feature(rustc_attrs)] -#![feature(nll)] - struct SomeStruct<'a, 'b: 'a> { p: &'a mut &'b i32, y: &'b i32, diff --git a/src/test/ui/nll/capture-ref-in-struct.stderr b/src/test/ui/nll/capture-ref-in-struct.stderr index 7fafb4474f..521e543bd2 100644 --- a/src/test/ui/nll/capture-ref-in-struct.stderr +++ b/src/test/ui/nll/capture-ref-in-struct.stderr @@ -1,5 +1,5 @@ error[E0597]: `y` does not live long enough - --> $DIR/capture-ref-in-struct.rs:21:16 + --> $DIR/capture-ref-in-struct.rs:18:16 | LL | y: &y, | ^^ borrowed value does not live long enough diff --git a/src/test/ui/nll/closure-access-spans.rs b/src/test/ui/nll/closure-access-spans.rs index 1e11b48181..2a59e80b25 100644 --- a/src/test/ui/nll/closure-access-spans.rs +++ b/src/test/ui/nll/closure-access-spans.rs @@ -1,7 +1,5 @@ // check that accesses due to a closure capture give a special note -#![feature(nll)] - fn closure_imm_capture_conflict(mut x: i32) { let r = &mut x; || x; //~ ERROR diff --git a/src/test/ui/nll/closure-access-spans.stderr b/src/test/ui/nll/closure-access-spans.stderr index 6c4cad923b..4a8086905b 100644 --- a/src/test/ui/nll/closure-access-spans.stderr +++ b/src/test/ui/nll/closure-access-spans.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/closure-access-spans.rs:7:5 + --> $DIR/closure-access-spans.rs:5:5 | LL | let r = &mut x; | ------ mutable borrow occurs here @@ -11,7 +11,7 @@ LL | r.use_mut(); | - mutable borrow later used here error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/closure-access-spans.rs:13:5 + --> $DIR/closure-access-spans.rs:11:5 | LL | let r = &mut x; | ------ first mutable borrow occurs here @@ -23,7 +23,7 @@ LL | r.use_mut(); | - first borrow later used here error[E0500]: closure requires unique access to `x` but it is already borrowed - --> $DIR/closure-access-spans.rs:19:5 + --> $DIR/closure-access-spans.rs:17:5 | LL | let r = &mut x; | ------ borrow occurs here @@ -35,7 +35,7 @@ LL | r.use_mut(); | - first borrow later used here error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/closure-access-spans.rs:25:13 + --> $DIR/closure-access-spans.rs:23:13 | LL | let r = &mut x; | ------ borrow of `x` occurs here @@ -45,7 +45,7 @@ LL | r.use_ref(); | - borrow later used here error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/closure-access-spans.rs:31:5 + --> $DIR/closure-access-spans.rs:29:5 | LL | let r = &x; | -- borrow of `x` occurs here @@ -57,7 +57,7 @@ LL | r.use_ref(); | - borrow later used here error[E0382]: borrow of moved value: `x` - --> $DIR/closure-access-spans.rs:37:5 + --> $DIR/closure-access-spans.rs:35:5 | LL | fn closure_imm_capture_moved(mut x: String) { | ----- move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait @@ -69,7 +69,7 @@ LL | || x.len(); | value borrowed here after move error[E0382]: borrow of moved value: `x` - --> $DIR/closure-access-spans.rs:42:5 + --> $DIR/closure-access-spans.rs:40:5 | LL | fn closure_mut_capture_moved(mut x: String) { | ----- move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait @@ -81,7 +81,7 @@ LL | || x = String::new(); | value borrowed here after move error[E0382]: borrow of moved value: `x` - --> $DIR/closure-access-spans.rs:47:5 + --> $DIR/closure-access-spans.rs:45:5 | LL | fn closure_unique_capture_moved(x: &mut String) { | - move occurs because `x` has type `&mut std::string::String`, which does not implement the `Copy` trait @@ -93,7 +93,7 @@ LL | || *x = String::new(); | value borrowed here after move error[E0382]: use of moved value: `x` - --> $DIR/closure-access-spans.rs:52:5 + --> $DIR/closure-access-spans.rs:50:5 | LL | fn closure_move_capture_moved(x: &mut String) { | - move occurs because `x` has type `&mut std::string::String`, which does not implement the `Copy` trait @@ -106,5 +106,5 @@ LL | || x; error: aborting due to 9 previous errors -Some errors occurred: E0382, E0499, E0500, E0502, E0503, E0505. +Some errors have detailed explanations: E0382, E0499, E0500, E0502, E0503, E0505. For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/nll/closure-borrow-spans.rs b/src/test/ui/nll/closure-borrow-spans.rs index 7fc301b703..b38f7900e8 100644 --- a/src/test/ui/nll/closure-borrow-spans.rs +++ b/src/test/ui/nll/closure-borrow-spans.rs @@ -1,7 +1,5 @@ // check that existing borrows due to a closure capture give a special note -#![feature(nll)] - fn move_while_borrowed(x: String) { let f = || x.len(); let y = x; //~ ERROR diff --git a/src/test/ui/nll/closure-borrow-spans.stderr b/src/test/ui/nll/closure-borrow-spans.stderr index fcb699a756..a3bcbbab3e 100644 --- a/src/test/ui/nll/closure-borrow-spans.stderr +++ b/src/test/ui/nll/closure-borrow-spans.stderr @@ -1,5 +1,5 @@ error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/closure-borrow-spans.rs:7:13 + --> $DIR/closure-borrow-spans.rs:5:13 | LL | let f = || x.len(); | -- - borrow occurs due to use in closure @@ -11,7 +11,7 @@ LL | f.use_ref(); | - borrow later used here error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable - --> $DIR/closure-borrow-spans.rs:13:13 + --> $DIR/closure-borrow-spans.rs:11:13 | LL | let f = || x; | -- - first borrow occurs due to use of `x` in closure @@ -23,7 +23,7 @@ LL | f.use_ref(); | - immutable borrow later used here error[E0597]: `x` does not live long enough - --> $DIR/closure-borrow-spans.rs:21:16 + --> $DIR/closure-borrow-spans.rs:19:16 | LL | f = || x; | -- ^ borrowed value does not live long enough @@ -35,7 +35,7 @@ LL | f.use_ref(); | - borrow later used here error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/closure-borrow-spans.rs:28:5 + --> $DIR/closure-borrow-spans.rs:26:5 | LL | let f = || x; | -- - borrow occurs due to use in closure @@ -47,7 +47,7 @@ LL | f.use_ref(); | - borrow later used here error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/closure-borrow-spans.rs:34:13 + --> $DIR/closure-borrow-spans.rs:32:13 | LL | let f = || x = 0; | -- - borrow occurs due to use of `x` in closure @@ -59,7 +59,7 @@ LL | f.use_ref(); | - borrow later used here error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable - --> $DIR/closure-borrow-spans.rs:40:13 + --> $DIR/closure-borrow-spans.rs:38:13 | LL | let f = || x = 0; | -- - first borrow occurs due to use of `x` in closure @@ -71,7 +71,7 @@ LL | f.use_ref(); | - mutable borrow later used here error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/closure-borrow-spans.rs:46:13 + --> $DIR/closure-borrow-spans.rs:44:13 | LL | let f = || x = 0; | -- - first borrow occurs due to use of `x` in closure @@ -83,7 +83,7 @@ LL | f.use_ref(); | - first borrow later used here error[E0597]: `x` does not live long enough - --> $DIR/closure-borrow-spans.rs:54:16 + --> $DIR/closure-borrow-spans.rs:52:16 | LL | f = || x = 0; | -- ^ borrowed value does not live long enough @@ -95,7 +95,7 @@ LL | f.use_ref(); | - borrow later used here error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/closure-borrow-spans.rs:61:5 + --> $DIR/closure-borrow-spans.rs:59:5 | LL | let f = || x = 0; | -- - borrow occurs due to use in closure @@ -107,7 +107,7 @@ LL | f.use_ref(); | - borrow later used here error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/closure-borrow-spans.rs:67:13 + --> $DIR/closure-borrow-spans.rs:65:13 | LL | let f = || *x = 0; | -- - borrow occurs due to use in closure @@ -119,7 +119,7 @@ LL | f.use_ref(); | - borrow later used here error[E0501]: cannot borrow `x` as immutable because previous closure requires unique access - --> $DIR/closure-borrow-spans.rs:73:13 + --> $DIR/closure-borrow-spans.rs:71:13 | LL | let f = || *x = 0; | -- - first borrow occurs due to use of `x` in closure @@ -131,7 +131,7 @@ LL | f.use_ref(); | - first borrow later used here error[E0501]: cannot borrow `x` as mutable because previous closure requires unique access - --> $DIR/closure-borrow-spans.rs:79:13 + --> $DIR/closure-borrow-spans.rs:77:13 | LL | let f = || *x = 0; | -- - first borrow occurs due to use of `x` in closure @@ -143,7 +143,7 @@ LL | f.use_ref(); | - first borrow later used here error[E0597]: `x` does not live long enough - --> $DIR/closure-borrow-spans.rs:88:17 + --> $DIR/closure-borrow-spans.rs:86:17 | LL | f = || *x = 0; | -- ^ borrowed value does not live long enough @@ -155,7 +155,7 @@ LL | f.use_ref(); | - borrow later used here error[E0506]: cannot assign to `*x` because it is borrowed - --> $DIR/closure-borrow-spans.rs:95:5 + --> $DIR/closure-borrow-spans.rs:93:5 | LL | let f = || *x = 0; | -- - borrow occurs due to use in closure @@ -168,5 +168,5 @@ LL | f.use_ref(); error: aborting due to 14 previous errors -Some errors occurred: E0499, E0501, E0502, E0503, E0505, E0506, E0597. +Some errors have detailed explanations: E0499, E0501, E0502, E0503, E0505, E0506, E0597. For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/nll/closure-captures.rs b/src/test/ui/nll/closure-captures.rs index 3a01f86cad..16d90b9717 100644 --- a/src/test/ui/nll/closure-captures.rs +++ b/src/test/ui/nll/closure-captures.rs @@ -1,8 +1,5 @@ // Some cases with closures that might be problems -#![allow(unused)] -#![feature(nll)] - // Should have one error per assignment fn one_closure(x: i32) { diff --git a/src/test/ui/nll/closure-captures.stderr b/src/test/ui/nll/closure-captures.stderr index 7dc1c59ceb..77f7d815ee 100644 --- a/src/test/ui/nll/closure-captures.stderr +++ b/src/test/ui/nll/closure-captures.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/closure-captures.rs:10:5 + --> $DIR/closure-captures.rs:7:5 | LL | fn one_closure(x: i32) { | - help: consider changing this to be mutable: `mut x` @@ -8,7 +8,7 @@ LL | x = 1; | ^^^^^ cannot assign error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/closure-captures.rs:12:5 + --> $DIR/closure-captures.rs:9:5 | LL | fn one_closure(x: i32) { | - help: consider changing this to be mutable: `mut x` @@ -17,7 +17,7 @@ LL | x = 1; | ^^^^^ cannot assign error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/closure-captures.rs:18:9 + --> $DIR/closure-captures.rs:15:9 | LL | fn two_closures(x: i32) { | - help: consider changing this to be mutable: `mut x` @@ -26,7 +26,7 @@ LL | x = 1; | ^^^^^ cannot assign error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/closure-captures.rs:22:9 + --> $DIR/closure-captures.rs:19:9 | LL | fn two_closures(x: i32) { | - help: consider changing this to be mutable: `mut x` @@ -35,7 +35,7 @@ LL | x = 1; | ^^^^^ cannot assign error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure - --> $DIR/closure-captures.rs:30:9 + --> $DIR/closure-captures.rs:27:9 | LL | || | ^^ cannot borrow as mutable @@ -43,7 +43,7 @@ LL | x = 1;} | - mutable borrow occurs due to use of `x` in closure | help: consider changing this to accept closures that implement `FnMut` - --> $DIR/closure-captures.rs:29:12 + --> $DIR/closure-captures.rs:26:12 | LL | fn_ref(|| { | ____________^ @@ -52,7 +52,7 @@ LL | | x = 1;} | |________________^ error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure - --> $DIR/closure-captures.rs:34:9 + --> $DIR/closure-captures.rs:31:9 | LL | || | ^^ cannot borrow as mutable @@ -60,7 +60,7 @@ LL | x = 1;}); | - mutable borrow occurs due to use of `x` in closure | help: consider changing this to accept closures that implement `FnMut` - --> $DIR/closure-captures.rs:33:12 + --> $DIR/closure-captures.rs:30:12 | LL | fn_ref(move || { | ____________^ @@ -69,7 +69,7 @@ LL | | x = 1;}); | |___________^ error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/closure-captures.rs:42:10 + --> $DIR/closure-captures.rs:39:10 | LL | fn two_closures_ref(x: i32) { | - help: consider changing this to be mutable: `mut x` @@ -78,7 +78,7 @@ LL | x = 1;} | ^^^^^ cannot assign error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure - --> $DIR/closure-captures.rs:41:9 + --> $DIR/closure-captures.rs:38:9 | LL | || | ^^ cannot borrow as mutable @@ -86,7 +86,7 @@ LL | x = 1;} | - mutable borrow occurs due to use of `x` in closure | help: consider changing this to accept closures that implement `FnMut` - --> $DIR/closure-captures.rs:40:12 + --> $DIR/closure-captures.rs:37:12 | LL | fn_ref(|| { | ____________^ @@ -95,7 +95,7 @@ LL | | x = 1;} | |________________^ error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/closure-captures.rs:46:5 + --> $DIR/closure-captures.rs:43:5 | LL | fn two_closures_ref(x: i32) { | - help: consider changing this to be mutable: `mut x` @@ -104,7 +104,7 @@ LL | x = 1;}); | ^^^^^ cannot assign error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure - --> $DIR/closure-captures.rs:45:9 + --> $DIR/closure-captures.rs:42:9 | LL | || | ^^ cannot borrow as mutable @@ -112,7 +112,7 @@ LL | x = 1;}); | - mutable borrow occurs due to use of `x` in closure | help: consider changing this to accept closures that implement `FnMut` - --> $DIR/closure-captures.rs:44:12 + --> $DIR/closure-captures.rs:41:12 | LL | fn_ref(move || { | ____________^ @@ -121,7 +121,7 @@ LL | | x = 1;}); | |___________^ error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure - --> $DIR/closure-captures.rs:51:9 + --> $DIR/closure-captures.rs:48:9 | LL | || | ^^ cannot borrow as mutable @@ -129,7 +129,7 @@ LL | *x = 1;}); | - mutable borrow occurs due to use of `x` in closure | help: consider changing this to accept closures that implement `FnMut` - --> $DIR/closure-captures.rs:50:12 + --> $DIR/closure-captures.rs:47:12 | LL | fn_ref(|| { | ____________^ @@ -138,7 +138,7 @@ LL | | *x = 1;}); | |________________^ error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure - --> $DIR/closure-captures.rs:54:9 + --> $DIR/closure-captures.rs:51:9 | LL | || | ^^ cannot borrow as mutable @@ -146,7 +146,7 @@ LL | *x = 1;}); | - mutable borrow occurs due to use of `x` in closure | help: consider changing this to accept closures that implement `FnMut` - --> $DIR/closure-captures.rs:53:12 + --> $DIR/closure-captures.rs:50:12 | LL | fn_ref(move || { | ____________^ @@ -156,5 +156,4 @@ LL | | *x = 1;}); error: aborting due to 12 previous errors -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/nll/closure-move-spans.rs b/src/test/ui/nll/closure-move-spans.rs index ffbfa9f8ae..bf2431870a 100644 --- a/src/test/ui/nll/closure-move-spans.rs +++ b/src/test/ui/nll/closure-move-spans.rs @@ -1,7 +1,5 @@ // check that moves due to a closure capture give a special note -#![feature(nll)] - fn move_after_move(x: String) { || x; let y = x; //~ ERROR diff --git a/src/test/ui/nll/closure-move-spans.stderr b/src/test/ui/nll/closure-move-spans.stderr index 1cc4ca85b9..972dbc6a61 100644 --- a/src/test/ui/nll/closure-move-spans.stderr +++ b/src/test/ui/nll/closure-move-spans.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `x` - --> $DIR/closure-move-spans.rs:7:13 + --> $DIR/closure-move-spans.rs:5:13 | LL | fn move_after_move(x: String) { | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait @@ -11,7 +11,7 @@ LL | let y = x; | ^ value used here after move error[E0382]: borrow of moved value: `x` - --> $DIR/closure-move-spans.rs:12:13 + --> $DIR/closure-move-spans.rs:10:13 | LL | fn borrow_after_move(x: String) { | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait @@ -23,7 +23,7 @@ LL | let y = &x; | ^^ value borrowed here after move error[E0382]: borrow of moved value: `x` - --> $DIR/closure-move-spans.rs:17:13 + --> $DIR/closure-move-spans.rs:15:13 | LL | fn borrow_mut_after_move(mut x: String) { | ----- move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait diff --git a/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr b/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr index 20041389b3..cc5ffca104 100644 --- a/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr +++ b/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr @@ -4,9 +4,9 @@ note: No external requirements LL | let mut closure = expect_sig(|p, y| *p = y); | ^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:9 ~ escape_argument_callee[317d]::test[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:13 ~ escape_argument_callee[317d]::test[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's, 't0> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) mut &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) i32)), + for<'r, 's, 't0> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) mut &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't0)) i32)), ] error: lifetime may not live long enough @@ -30,7 +30,7 @@ LL | | deref(p); LL | | } | |_^ | - = note: defining type: DefId(0/0:3 ~ escape_argument_callee[317d]::test[0]) with substs [] + = note: defining type: DefId(0:12 ~ escape_argument_callee[317d]::test[0]) with substs [] error: aborting due to previous error diff --git a/src/test/ui/nll/closure-requirements/escape-argument.stderr b/src/test/ui/nll/closure-requirements/escape-argument.stderr index b08ec95393..fdf95b8ace 100644 --- a/src/test/ui/nll/closure-requirements/escape-argument.stderr +++ b/src/test/ui/nll/closure-requirements/escape-argument.stderr @@ -4,9 +4,9 @@ note: No external requirements LL | let mut closure = expect_sig(|p, y| *p = y); | ^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:9 ~ escape_argument[317d]::test[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:13 ~ escape_argument[317d]::test[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) mut &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32)), + for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) mut &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) i32)), ] note: No external requirements @@ -21,7 +21,7 @@ LL | | deref(p); LL | | } | |_^ | - = note: defining type: DefId(0/0:3 ~ escape_argument[317d]::test[0]) with substs [] + = note: defining type: DefId(0:12 ~ escape_argument[317d]::test[0]) with substs [] error[E0597]: `y` does not live long enough --> $DIR/escape-argument.rs:27:25 diff --git a/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr b/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr index 7178b22bb5..135de0445a 100644 --- a/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr +++ b/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr @@ -4,7 +4,7 @@ note: External requirements LL | let mut closure1 = || p = &y; | ^^^^^^^^^ | - = note: defining type: DefId(0/1:10 ~ escape_upvar_nested[317d]::test[0]::{{closure}}[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:14 ~ escape_upvar_nested[317d]::test[0]::{{closure}}[0]::{{closure}}[0]) with closure substs [ i16, extern "rust-call" fn(()), &'_#1r mut &'_#2r i32, @@ -23,7 +23,7 @@ LL | | closure1(); LL | | }; | |_________^ | - = note: defining type: DefId(0/1:9 ~ escape_upvar_nested[317d]::test[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:13 ~ escape_upvar_nested[317d]::test[0]::{{closure}}[0]) with closure substs [ i16, extern "rust-call" fn(()), &'_#1r mut &'_#2r i32, @@ -44,7 +44,7 @@ LL | | deref(p); LL | | } | |_^ | - = note: defining type: DefId(0/0:3 ~ escape_upvar_nested[317d]::test[0]) with substs [] + = note: defining type: DefId(0:12 ~ escape_upvar_nested[317d]::test[0]) with substs [] error[E0597]: `y` does not live long enough --> $DIR/escape-upvar-nested.rs:21:40 diff --git a/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr b/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr index d129f945f2..8c37ab7b76 100644 --- a/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr +++ b/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr @@ -4,7 +4,7 @@ note: External requirements LL | let mut closure = || p = &y; | ^^^^^^^^^ | - = note: defining type: DefId(0/1:9 ~ escape_upvar_ref[317d]::test[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:13 ~ escape_upvar_ref[317d]::test[0]::{{closure}}[0]) with closure substs [ i16, extern "rust-call" fn(()), &'_#1r mut &'_#2r i32, @@ -25,7 +25,7 @@ LL | | deref(p); LL | | } | |_^ | - = note: defining type: DefId(0/0:3 ~ escape_upvar_ref[317d]::test[0]) with substs [] + = note: defining type: DefId(0:12 ~ escape_upvar_ref[317d]::test[0]) with substs [] error[E0597]: `y` does not live long enough --> $DIR/escape-upvar-ref.rs:23:35 diff --git a/src/test/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs b/src/test/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs index 71d5d4053e..8ed6554877 100644 --- a/src/test/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs +++ b/src/test/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs @@ -1,7 +1,3 @@ -// revisions: migrate nll -//[migrate]compile-flags: -Z borrowck=migrate -#![cfg_attr(nll, feature(nll))] - // compile-pass // Test that we propagate region relations from closures precisely when there is diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr index 4db1f04077..8916fdcfc8 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr @@ -8,9 +8,9 @@ LL | | demand_y(x, y, p) LL | | }, | |_________^ | - = note: defining type: DefId(0/1:20 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:27 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#3r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>)), + for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>, std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) &'_#3r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>)), ] = note: late-bound region is '_#4r = note: late-bound region is '_#5r @@ -39,7 +39,7 @@ LL | | ); LL | | } | |_^ | - = note: defining type: DefId(0/0:6 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]) with substs [] + = note: defining type: DefId(0:23 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]) with substs [] error: aborting due to previous error diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr index 7dedae715b..fa8384311e 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr @@ -9,9 +9,9 @@ LL | | LL | | }); | |_____^ | - = note: defining type: DefId(0/1:18 ~ propagate_approximated_ref[317d]::supply[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:25 ~ propagate_approximated_ref[317d]::supply[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>)), + for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't1)) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't1)) u32>)), ] = note: late-bound region is '_#3r = note: late-bound region is '_#4r @@ -30,7 +30,7 @@ LL | | }); LL | | } | |_^ | - = note: defining type: DefId(0/0:6 ~ propagate_approximated_ref[317d]::supply[0]) with substs [] + = note: defining type: DefId(0:22 ~ propagate_approximated_ref[317d]::supply[0]) with substs [] error: lifetime may not live long enough --> $DIR/propagate-approximated-ref.rs:45:9 diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr index b2d7fd8df6..cfaa75b8ef 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr @@ -8,9 +8,9 @@ LL | | LL | | }) | |_____^ | - = note: defining type: DefId(0/1:12 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:18 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]::{{closure}}[0]) with closure substs [ i32, - for<'r> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>)), + for<'r> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>)), ] error[E0521]: borrowed data escapes outside of closure @@ -35,7 +35,7 @@ LL | | }) LL | | } | |_^ | - = note: defining type: DefId(0/0:5 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]) with substs [] + = note: defining type: DefId(0:17 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]) with substs [] note: External requirements --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:35:15 @@ -46,9 +46,9 @@ LL | | cell_x.set(cell_a.get()); // forces 'a: 'x, implies 'a = 'static LL | | }) | |_____^ | - = note: defining type: DefId(0/1:13 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:20 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]::{{closure}}[0]) with closure substs [ i32, - for<'r> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>)), + for<'r> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>)), ] = note: number of external vids: 2 = note: where '_#1r: '_#0r @@ -65,7 +65,7 @@ LL | | }) LL | | } | |_^ | - = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]) with substs [] + = note: defining type: DefId(0:19 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]) with substs [] error[E0597]: `a` does not live long enough --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:30:26 @@ -81,5 +81,4 @@ LL | } error: aborting due to 2 previous errors -Some errors occurred: E0521, E0597. -For more information about an error, try `rustc --explain E0521`. +For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr index e30e2dfee6..601b3577e0 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr @@ -10,9 +10,9 @@ LL | | demand_y(x, y, x.get()) LL | | }); | |_____^ | - = note: defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:25 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) u32>)), + for<'r, 's, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't1)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't2)) u32>)), ] = note: late-bound region is '_#2r = note: late-bound region is '_#3r @@ -31,7 +31,7 @@ LL | | }); LL | | } | |_^ | - = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]) with substs [] + = note: defining type: DefId(0:22 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]) with substs [] error[E0521]: borrowed data escapes outside of function --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:32:5 @@ -48,4 +48,3 @@ LL | | }); error: aborting due to previous error -For more information about this error, try `rustc --explain E0521`. diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr index ec608590a7..5b5440e7a9 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr @@ -10,9 +10,9 @@ LL | | demand_y(x, y, x.get()) LL | | }); | |_____^ | - = note: defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:25 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>)), + for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't0)) std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't1)) u32>)), ] = note: late-bound region is '_#3r = note: late-bound region is '_#4r @@ -31,7 +31,7 @@ LL | | }); LL | | } | |_^ | - = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]) with substs [] + = note: defining type: DefId(0:22 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]) with substs [] error[E0521]: borrowed data escapes outside of function --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:35:5 @@ -48,4 +48,3 @@ LL | | }); error: aborting due to previous error -For more information about this error, try `rustc --explain E0521`. diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr index 223c29f596..a08cde2c9c 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr @@ -9,9 +9,9 @@ LL | | LL | | }); | |_____^ | - = note: defining type: DefId(0/1:18 ~ propagate_approximated_val[317d]::test[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:25 ~ propagate_approximated_val[317d]::test[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>)), + for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>)), ] = note: late-bound region is '_#3r = note: late-bound region is '_#4r @@ -30,7 +30,7 @@ LL | | }); LL | | } | |_^ | - = note: defining type: DefId(0/0:6 ~ propagate_approximated_val[317d]::test[0]) with substs [] + = note: defining type: DefId(0:22 ~ propagate_approximated_val[317d]::test[0]) with substs [] error: lifetime may not live long enough --> $DIR/propagate-approximated-val.rs:38:9 diff --git a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr index d618b4d06a..60847bb2e9 100644 --- a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr @@ -8,9 +8,9 @@ LL | | demand_y(x, y, p) LL | | }, | |_________^ | - = note: defining type: DefId(0/1:16 ~ propagate_despite_same_free_region[317d]::supply[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:23 ~ propagate_despite_same_free_region[317d]::supply[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>)), + for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>)), ] = note: late-bound region is '_#3r = note: number of external vids: 4 @@ -28,5 +28,5 @@ LL | | ); LL | | } | |_^ | - = note: defining type: DefId(0/0:6 ~ propagate_despite_same_free_region[317d]::supply[0]) with substs [] + = note: defining type: DefId(0:21 ~ propagate_despite_same_free_region[317d]::supply[0]) with substs [] diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr index 07fb4d0d5e..a660c763bf 100644 --- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr @@ -9,9 +9,9 @@ LL | | LL | | }); | |_____^ | - = note: defining type: DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:25 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>)), + for<'r, 's, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>)), ] = note: late-bound region is '_#2r = note: late-bound region is '_#3r @@ -39,7 +39,7 @@ LL | | }); LL | | } | |_^ | - = note: defining type: DefId(0/0:6 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]) with substs [] + = note: defining type: DefId(0:22 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]) with substs [] error: aborting due to previous error diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr index a0744c27db..9671b8ebff 100644 --- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr @@ -9,9 +9,9 @@ LL | | LL | | }); | |_____^ | - = note: defining type: DefId(0/1:18 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:25 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>)), + for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't1)) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't1)) u32>)), ] = note: late-bound region is '_#3r = note: late-bound region is '_#4r @@ -39,7 +39,7 @@ LL | | }); LL | | } | |_^ | - = note: defining type: DefId(0/0:6 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]) with substs [] + = note: defining type: DefId(0:22 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]) with substs [] error: aborting due to previous error diff --git a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr index 282246f816..457b5950b7 100644 --- a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr @@ -11,7 +11,7 @@ LL | | require(value); LL | | }); | |_____^ | - = note: defining type: DefId(0/1:16 ~ propagate_from_trait_match[317d]::supply[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:23 ~ propagate_from_trait_match[317d]::supply[0]::{{closure}}[0]) with closure substs [ '_#1r, T, i32, @@ -32,7 +32,7 @@ LL | | }); LL | | } | |_^ | - = note: defining type: DefId(0/0:6 ~ propagate_from_trait_match[317d]::supply[0]) with substs [ + = note: defining type: DefId(0:20 ~ propagate_from_trait_match[317d]::supply[0]) with substs [ '_#1r, T, ] diff --git a/src/test/ui/nll/closure-requirements/propagate-multiple-requirements.rs b/src/test/ui/nll/closure-requirements/propagate-multiple-requirements.rs index dbc659b4ae..a9d2a07715 100644 --- a/src/test/ui/nll/closure-requirements/propagate-multiple-requirements.rs +++ b/src/test/ui/nll/closure-requirements/propagate-multiple-requirements.rs @@ -1,8 +1,6 @@ // Test that we propagate *all* requirements to the caller, not just the first // one. -#![feature(nll)] - fn once U>(f: F, s: S, t: T) -> U { f(s, t) } diff --git a/src/test/ui/nll/closure-requirements/propagate-multiple-requirements.stderr b/src/test/ui/nll/closure-requirements/propagate-multiple-requirements.stderr index 332724daaa..2fec9bc62d 100644 --- a/src/test/ui/nll/closure-requirements/propagate-multiple-requirements.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-multiple-requirements.stderr @@ -1,5 +1,5 @@ error[E0597]: `local_arr` does not live long enough - --> $DIR/propagate-multiple-requirements.rs:17:14 + --> $DIR/propagate-multiple-requirements.rs:15:14 | LL | let mut out: &mut &'static [i32] = &mut (&[1] as _); | ------------------- type annotation requires that `local_arr` is borrowed for `'static` diff --git a/src/test/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs b/src/test/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs index 66290f2ff2..5a008ad26b 100644 --- a/src/test/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs +++ b/src/test/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs @@ -3,8 +3,7 @@ // compile-flags:-Zborrowck=mir -Zverbose // compile-pass - -#![allow(warnings)] +// skip-codegen fn foo<'a, 'b>(x: &'a &'b u32) -> &'a u32 { &**x diff --git a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr index c5645413c7..8aff6d5b89 100644 --- a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr +++ b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr @@ -4,9 +4,9 @@ note: No external requirements LL | expect_sig(|a, b| b); // ought to return `a` | ^^^^^^^^ | - = note: defining type: DefId(0/1:9 ~ return_wrong_bound_region[317d]::test[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:13 ~ return_wrong_bound_region[317d]::test[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32)) -> &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) i32, + for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) i32)) -> &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) i32, ] error: lifetime may not live long enough @@ -27,7 +27,7 @@ LL | | LL | | } | |_^ | - = note: defining type: DefId(0/0:3 ~ return_wrong_bound_region[317d]::test[0]) with substs [] + = note: defining type: DefId(0:12 ~ return_wrong_bound_region[317d]::test[0]) with substs [] error: aborting due to previous error diff --git a/src/test/ui/nll/closure-use-spans.rs b/src/test/ui/nll/closure-use-spans.rs index c7cd519cff..6768250dcb 100644 --- a/src/test/ui/nll/closure-use-spans.rs +++ b/src/test/ui/nll/closure-use-spans.rs @@ -1,7 +1,5 @@ // check that liveness due to a closure capture gives a special note -#![feature(nll)] - fn use_as_borrow_capture(mut x: i32) { let y = &x; x = 0; //~ ERROR diff --git a/src/test/ui/nll/closure-use-spans.stderr b/src/test/ui/nll/closure-use-spans.stderr index 20696da3b8..ec7e0f3085 100644 --- a/src/test/ui/nll/closure-use-spans.stderr +++ b/src/test/ui/nll/closure-use-spans.stderr @@ -1,5 +1,5 @@ error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/closure-use-spans.rs:7:5 + --> $DIR/closure-use-spans.rs:5:5 | LL | let y = &x; | -- borrow of `x` occurs here @@ -9,7 +9,7 @@ LL | || *y; | - borrow later captured here by closure error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/closure-use-spans.rs:13:5 + --> $DIR/closure-use-spans.rs:11:5 | LL | let y = &mut x; | ------ borrow of `x` occurs here @@ -19,7 +19,7 @@ LL | || *y = 1; | - borrow later captured here by closure error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/closure-use-spans.rs:19:5 + --> $DIR/closure-use-spans.rs:17:5 | LL | let y = &x; | -- borrow of `x` occurs here diff --git a/src/test/ui/nll/closures-in-loops.rs b/src/test/ui/nll/closures-in-loops.rs index d2afa56473..491c186ecb 100644 --- a/src/test/ui/nll/closures-in-loops.rs +++ b/src/test/ui/nll/closures-in-loops.rs @@ -1,8 +1,6 @@ // Test messages where a closure capture conflicts with itself because it's in // a loop. -#![feature(nll)] - fn repreated_move(x: String) { for i in 0..10 { || x; //~ ERROR diff --git a/src/test/ui/nll/closures-in-loops.stderr b/src/test/ui/nll/closures-in-loops.stderr index 6408293aee..7603f9650b 100644 --- a/src/test/ui/nll/closures-in-loops.stderr +++ b/src/test/ui/nll/closures-in-loops.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `x` - --> $DIR/closures-in-loops.rs:8:9 + --> $DIR/closures-in-loops.rs:6:9 | LL | fn repreated_move(x: String) { | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait @@ -10,7 +10,7 @@ LL | || x; | value moved into closure here, in previous iteration of loop error[E0499]: cannot borrow `x` as mutable more than once at a time - --> $DIR/closures-in-loops.rs:15:16 + --> $DIR/closures-in-loops.rs:13:16 | LL | v.push(|| x = String::new()); | ^^ - borrows occur due to use of `x` in closure @@ -18,7 +18,7 @@ LL | v.push(|| x = String::new()); | mutable borrow starts here in previous iteration of loop error[E0524]: two closures require unique access to `x` at the same time - --> $DIR/closures-in-loops.rs:22:16 + --> $DIR/closures-in-loops.rs:20:16 | LL | v.push(|| *x = String::new()); | ^^ - borrows occur due to use of `x` in closure @@ -27,5 +27,5 @@ LL | v.push(|| *x = String::new()); error: aborting due to 3 previous errors -Some errors occurred: E0382, E0499, E0524. +Some errors have detailed explanations: E0382, E0499. For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/nll/constant-thread-locals-issue-47053.rs b/src/test/ui/nll/constant-thread-locals-issue-47053.rs index 4dd01410c5..dde0ef7a5b 100644 --- a/src/test/ui/nll/constant-thread-locals-issue-47053.rs +++ b/src/test/ui/nll/constant-thread-locals-issue-47053.rs @@ -1,6 +1,5 @@ // Regression test for issue #47053 -#![feature(nll)] #![feature(thread_local)] #[thread_local] diff --git a/src/test/ui/nll/constant-thread-locals-issue-47053.stderr b/src/test/ui/nll/constant-thread-locals-issue-47053.stderr index ae056a9784..8afb42d66a 100644 --- a/src/test/ui/nll/constant-thread-locals-issue-47053.stderr +++ b/src/test/ui/nll/constant-thread-locals-issue-47053.stderr @@ -1,9 +1,8 @@ error[E0594]: cannot assign to immutable static item `FOO` - --> $DIR/constant-thread-locals-issue-47053.rs:10:5 + --> $DIR/constant-thread-locals-issue-47053.rs:9:5 | LL | FOO = 6; | ^^^^^^^ cannot assign error: aborting due to previous error -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/nll/decl-macro-illegal-copy.rs b/src/test/ui/nll/decl-macro-illegal-copy.rs index 38bdb7dd27..f724329466 100644 --- a/src/test/ui/nll/decl-macro-illegal-copy.rs +++ b/src/test/ui/nll/decl-macro-illegal-copy.rs @@ -1,6 +1,5 @@ // Regression test for #46314 -#![feature(nll)] #![feature(decl_macro)] struct NonCopy(String); diff --git a/src/test/ui/nll/decl-macro-illegal-copy.stderr b/src/test/ui/nll/decl-macro-illegal-copy.stderr index 9232ff5239..7948485bd6 100644 --- a/src/test/ui/nll/decl-macro-illegal-copy.stderr +++ b/src/test/ui/nll/decl-macro-illegal-copy.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `wrapper.inner` - --> $DIR/decl-macro-illegal-copy.rs:22:9 + --> $DIR/decl-macro-illegal-copy.rs:21:9 | LL | $wrapper.inner | -------------- value moved here diff --git a/src/test/ui/nll/extra-unused-mut.rs b/src/test/ui/nll/extra-unused-mut.rs index d5f0b0ddf1..6d0d6e16a6 100644 --- a/src/test/ui/nll/extra-unused-mut.rs +++ b/src/test/ui/nll/extra-unused-mut.rs @@ -1,6 +1,6 @@ // extra unused mut lint tests for #51918 -// run-pass +// compile-pass #![feature(generators, nll)] #![deny(unused_mut)] @@ -53,11 +53,14 @@ fn if_guard(x: Result) { } } -fn main() { - ref_argument(0); - mutable_upvar(); - generator_mutable_upvar(); - ref_closure_argument(); - parse_dot_or_call_expr_with(Vec::new()); - if_guard(Ok(0)); +// #59620 +fn nested_closures() { + let mut i = 0; + [].iter().for_each(|_: &i32| { + [].iter().for_each(move |_: &i32| { + i += 1; + }); + }); } + +fn main() {} diff --git a/src/test/ui/nll/generator-upvar-mutability.stderr b/src/test/ui/nll/generator-upvar-mutability.stderr index 31b061b61d..1b4e5b8998 100644 --- a/src/test/ui/nll/generator-upvar-mutability.stderr +++ b/src/test/ui/nll/generator-upvar-mutability.stderr @@ -9,4 +9,3 @@ LL | x = 1; error: aborting due to previous error -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/nll/get_default.nll.stderr b/src/test/ui/nll/get_default.nll.stderr new file mode 100644 index 0000000000..2791230698 --- /dev/null +++ b/src/test/ui/nll/get_default.nll.stderr @@ -0,0 +1,48 @@ +error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable + --> $DIR/get_default.rs:21:17 + | +LL | fn ok(map: &mut Map) -> &String { + | - let's call the lifetime of this reference `'1` +LL | loop { +LL | match map.get() { + | --- immutable borrow occurs here +LL | Some(v) => { +LL | return v; + | - returning this value requires that `*map` is borrowed for `'1` +... +LL | map.set(String::new()); // Ideally, this would not error. + | ^^^ mutable borrow occurs here + +error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable + --> $DIR/get_default.rs:32:17 + | +LL | fn err(map: &mut Map) -> &String { + | - let's call the lifetime of this reference `'1` +LL | loop { +LL | match map.get() { + | --- immutable borrow occurs here +LL | Some(v) => { +LL | map.set(String::new()); // Both AST and MIR error here + | ^^^ mutable borrow occurs here +LL | +LL | return v; + | - returning this value requires that `*map` is borrowed for `'1` + +error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable + --> $DIR/get_default.rs:37:17 + | +LL | fn err(map: &mut Map) -> &String { + | - let's call the lifetime of this reference `'1` +LL | loop { +LL | match map.get() { + | --- immutable borrow occurs here +... +LL | return v; + | - returning this value requires that `*map` is borrowed for `'1` +... +LL | map.set(String::new()); // Ideally, just AST would error here + | ^^^ mutable borrow occurs here + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/nll/get_default.rs b/src/test/ui/nll/get_default.rs index 89f693bfb6..ffac8a33da 100644 --- a/src/test/ui/nll/get_default.rs +++ b/src/test/ui/nll/get_default.rs @@ -3,8 +3,6 @@ // a variety of errors from the older, AST-based machinery (notably // borrowck), and then we get the NLL error at the end. -// compile-flags:-Zborrowck=compare - struct Map { } @@ -21,8 +19,7 @@ fn ok(map: &mut Map) -> &String { } None => { map.set(String::new()); // Ideally, this would not error. - //~^ ERROR borrowed as immutable (Ast) - //~| ERROR borrowed as immutable (Mir) + //~^ ERROR borrowed as immutable } } } @@ -33,14 +30,12 @@ fn err(map: &mut Map) -> &String { match map.get() { Some(v) => { map.set(String::new()); // Both AST and MIR error here - //~^ ERROR borrowed as immutable (Mir) - //~| ERROR borrowed as immutable (Ast) + //~^ ERROR borrowed as immutable return v; } None => { map.set(String::new()); // Ideally, just AST would error here - //~^ ERROR borrowed as immutable (Ast) - //~| ERROR borrowed as immutable (Mir) + //~^ ERROR borrowed as immutable } } } diff --git a/src/test/ui/nll/get_default.stderr b/src/test/ui/nll/get_default.stderr index abb5343845..af79771e7e 100644 --- a/src/test/ui/nll/get_default.stderr +++ b/src/test/ui/nll/get_default.stderr @@ -1,41 +1,5 @@ -error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast) - --> $DIR/get_default.rs:23:17 - | -LL | match map.get() { - | --- immutable borrow occurs here -... -LL | map.set(String::new()); // Ideally, this would not error. - | ^^^ mutable borrow occurs here -... -LL | } - | - immutable borrow ends here - -error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast) - --> $DIR/get_default.rs:35:17 - | -LL | match map.get() { - | --- immutable borrow occurs here -LL | Some(v) => { -LL | map.set(String::new()); // Both AST and MIR error here - | ^^^ mutable borrow occurs here -... -LL | } - | - immutable borrow ends here - -error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast) - --> $DIR/get_default.rs:41:17 - | -LL | match map.get() { - | --- immutable borrow occurs here -... -LL | map.set(String::new()); // Ideally, just AST would error here - | ^^^ mutable borrow occurs here -... -LL | } - | - immutable borrow ends here - -error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Mir) - --> $DIR/get_default.rs:23:17 +error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable + --> $DIR/get_default.rs:21:17 | LL | fn ok(map: &mut Map) -> &String { | - let's call the lifetime of this reference `'1` @@ -47,10 +11,10 @@ LL | return v; | - returning this value requires that `*map` is borrowed for `'1` ... LL | map.set(String::new()); // Ideally, this would not error. - | ^^^ mutable borrow occurs here + | ^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here -error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Mir) - --> $DIR/get_default.rs:35:17 +error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable + --> $DIR/get_default.rs:32:17 | LL | fn err(map: &mut Map) -> &String { | - let's call the lifetime of this reference `'1` @@ -59,13 +23,13 @@ LL | match map.get() { | --- immutable borrow occurs here LL | Some(v) => { LL | map.set(String::new()); // Both AST and MIR error here - | ^^^ mutable borrow occurs here -... + | ^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here +LL | LL | return v; | - returning this value requires that `*map` is borrowed for `'1` -error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Mir) - --> $DIR/get_default.rs:41:17 +error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable + --> $DIR/get_default.rs:37:17 | LL | fn err(map: &mut Map) -> &String { | - let's call the lifetime of this reference `'1` @@ -77,8 +41,8 @@ LL | return v; | - returning this value requires that `*map` is borrowed for `'1` ... LL | map.set(String::new()); // Ideally, just AST would error here - | ^^^ mutable borrow occurs here + | ^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here -error: aborting due to 6 previous errors +error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/nll/guarantor-issue-46974.stderr b/src/test/ui/nll/guarantor-issue-46974.stderr index 8486c7d485..80df393598 100644 --- a/src/test/ui/nll/guarantor-issue-46974.stderr +++ b/src/test/ui/nll/guarantor-issue-46974.stderr @@ -20,5 +20,5 @@ LL | &s.0 error: aborting due to 2 previous errors -Some errors occurred: E0506, E0621. +Some errors have detailed explanations: E0506, E0621. For more information about an error, try `rustc --explain E0506`. diff --git a/src/test/ui/nll/issue-16223.rs b/src/test/ui/nll/issue-16223.rs index 881e202acf..e753627506 100644 --- a/src/test/ui/nll/issue-16223.rs +++ b/src/test/ui/nll/issue-16223.rs @@ -15,7 +15,6 @@ // compile-pass -#![feature(nll)] #![feature(box_patterns)] struct Root { diff --git a/src/test/ui/nll/issue-21114-ebfull.rs b/src/test/ui/nll/issue-21114-ebfull.rs index f573896874..1fe4fffa32 100644 --- a/src/test/ui/nll/issue-21114-ebfull.rs +++ b/src/test/ui/nll/issue-21114-ebfull.rs @@ -1,6 +1,4 @@ -// (this works, but only in NLL) // compile-pass -#![feature(nll)] use std::collections::HashMap; use std::sync::Mutex; diff --git a/src/test/ui/nll/issue-21114-kixunil.rs b/src/test/ui/nll/issue-21114-kixunil.rs index 2add951b70..80a85293e5 100644 --- a/src/test/ui/nll/issue-21114-kixunil.rs +++ b/src/test/ui/nll/issue-21114-kixunil.rs @@ -1,6 +1,4 @@ -// (this works, but only in NLL) // compile-pass -#![feature(nll)] fn from_stdin(min: u64) -> Vec { use std::io::BufRead; diff --git a/src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.rs b/src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.rs index abafd33057..906ea32b9c 100644 --- a/src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.rs +++ b/src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.rs @@ -8,8 +8,6 @@ // meant to compile and run successfully once rust-lang/rust#54987 is // implemented. -#![feature(nll)] - struct D { x: u32, s: S, diff --git a/src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.stderr b/src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.stderr index 54c728e3d2..153d9bdf32 100644 --- a/src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.stderr +++ b/src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.stderr @@ -1,17 +1,17 @@ error[E0381]: assign of possibly uninitialized variable: `d` - --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:30:5 + --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:28:5 | LL | d.x = 10; | ^^^^^^^^ use of possibly uninitialized `d` error[E0381]: assign of possibly uninitialized variable: `d` - --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:36:5 + --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:34:5 | LL | d.x = 10; | ^^^^^^^^ use of possibly uninitialized `d` error[E0382]: assign of moved value: `d` - --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:43:5 + --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:41:5 | LL | let mut d = D { x: 0, s: S{ y: 0, z: 0 } }; | ----- move occurs because `d` has type `D`, which does not implement the `Copy` trait @@ -21,19 +21,19 @@ LL | d.x = 10; | ^^^^^^^^ value assigned here after move error[E0381]: assign to part of possibly uninitialized variable: `d` - --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:49:5 + --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:47:5 | LL | d.s.y = 20; | ^^^^^^^^^^ use of possibly uninitialized `d.s` error[E0381]: assign to part of possibly uninitialized variable: `d` - --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:55:5 + --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:53:5 | LL | d.s.y = 20; | ^^^^^^^^^^ use of possibly uninitialized `d.s` error[E0382]: assign to part of moved value: `d` - --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:62:5 + --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:60:5 | LL | let mut d = D { x: 0, s: S{ y: 0, z: 0} }; | ----- move occurs because `d` has type `D`, which does not implement the `Copy` trait @@ -44,5 +44,5 @@ LL | d.s.y = 20; error: aborting due to 6 previous errors -Some errors occurred: E0381, E0382. +Some errors have detailed explanations: E0381, E0382. For more information about an error, try `rustc --explain E0381`. diff --git a/src/test/ui/nll/issue-21232-partial-init-and-use.stderr b/src/test/ui/nll/issue-21232-partial-init-and-use.stderr index ab85caabb3..1cdf728a5e 100644 --- a/src/test/ui/nll/issue-21232-partial-init-and-use.stderr +++ b/src/test/ui/nll/issue-21232-partial-init-and-use.stderr @@ -184,5 +184,5 @@ LL | ((c.1).1).0 = 3; error: aborting due to 23 previous errors -Some errors occurred: E0381, E0382. +Some errors have detailed explanations: E0381, E0382. For more information about an error, try `rustc --explain E0381`. diff --git a/src/test/ui/nll/issue-22323-temp-destruction.rs b/src/test/ui/nll/issue-22323-temp-destruction.rs index 2c547fb7c7..6357c3ccef 100644 --- a/src/test/ui/nll/issue-22323-temp-destruction.rs +++ b/src/test/ui/nll/issue-22323-temp-destruction.rs @@ -3,8 +3,6 @@ // compile-pass -#![feature(nll)] - fn main() { let _s = construct().borrow().consume_borrowed(); } diff --git a/src/test/ui/nll/issue-30104.rs b/src/test/ui/nll/issue-30104.rs index 88e49bf8df..27e519005f 100644 --- a/src/test/ui/nll/issue-30104.rs +++ b/src/test/ui/nll/issue-30104.rs @@ -2,8 +2,6 @@ // compile-pass -#![feature(nll)] - use std::ops::{Deref, DerefMut}; fn box_two_field(v: &mut Box<(i32, i32)>) { diff --git a/src/test/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs b/src/test/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs index a114d7092e..7e0ffd6cf3 100644 --- a/src/test/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs +++ b/src/test/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs @@ -1,4 +1,3 @@ -#![feature(nll)] // compile-pass // rust-lang/rust#32382: Borrow checker used to complain about diff --git a/src/test/ui/nll/issue-43058.rs b/src/test/ui/nll/issue-43058.rs index c5bae7a12d..c50473511f 100644 --- a/src/test/ui/nll/issue-43058.rs +++ b/src/test/ui/nll/issue-43058.rs @@ -1,7 +1,5 @@ // compile-pass -#![feature(nll)] - use std::borrow::Cow; #[derive(Clone, Debug)] diff --git a/src/test/ui/nll/issue-46589.rs b/src/test/ui/nll/issue-46589.rs index 690f6f269e..8c0c356e96 100644 --- a/src/test/ui/nll/issue-46589.rs +++ b/src/test/ui/nll/issue-46589.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - struct Foo; impl Foo { diff --git a/src/test/ui/nll/issue-46589.stderr b/src/test/ui/nll/issue-46589.stderr index 7b02b90530..397909a436 100644 --- a/src/test/ui/nll/issue-46589.stderr +++ b/src/test/ui/nll/issue-46589.stderr @@ -1,5 +1,5 @@ error[E0499]: cannot borrow `**other` as mutable more than once at a time - --> $DIR/issue-46589.rs:19:21 + --> $DIR/issue-46589.rs:17:21 | LL | *other = match (*other).get_self() { | -------- first mutable borrow occurs here diff --git a/src/test/ui/nll/issue-47022.rs b/src/test/ui/nll/issue-47022.rs index c0f8efa249..3f8e0f5ad3 100644 --- a/src/test/ui/nll/issue-47022.rs +++ b/src/test/ui/nll/issue-47022.rs @@ -1,8 +1,5 @@ // compile-pass -#![allow(warnings)] -#![feature(nll)] - struct LoadedObject { bodies: Vec, color: Color, @@ -34,4 +31,3 @@ fn convert(objects: Vec) -> (Vec, Vec) { } fn main() {} - diff --git a/src/test/ui/nll/issue-47388.rs b/src/test/ui/nll/issue-47388.rs index df47baa3c1..207af380e6 100644 --- a/src/test/ui/nll/issue-47388.rs +++ b/src/test/ui/nll/issue-47388.rs @@ -1,4 +1,3 @@ -#![feature(nll)] struct FancyNum { num: u8, } diff --git a/src/test/ui/nll/issue-47388.stderr b/src/test/ui/nll/issue-47388.stderr index 91f758a60a..d4064b3f50 100644 --- a/src/test/ui/nll/issue-47388.stderr +++ b/src/test/ui/nll/issue-47388.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to `fancy_ref.num` which is behind a `&` reference - --> $DIR/issue-47388.rs:9:5 + --> $DIR/issue-47388.rs:8:5 | LL | let fancy_ref = &(&mut fancy); | ------------- help: consider changing this to be a mutable reference: `&mut (&mut fancy)` @@ -8,4 +8,3 @@ LL | fancy_ref.num = 6; error: aborting due to previous error -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/nll/issue-47470.rs b/src/test/ui/nll/issue-47470.rs index 67150b46c3..72ee7f8865 100644 --- a/src/test/ui/nll/issue-47470.rs +++ b/src/test/ui/nll/issue-47470.rs @@ -2,8 +2,6 @@ // causing region relations not to be enforced at all the places where // they have to be enforced. -#![feature(nll)] - struct Foo<'a>(&'a ()); trait Bar { type Assoc; diff --git a/src/test/ui/nll/issue-47470.stderr b/src/test/ui/nll/issue-47470.stderr index d23cee3fc7..0b1247d60e 100644 --- a/src/test/ui/nll/issue-47470.stderr +++ b/src/test/ui/nll/issue-47470.stderr @@ -1,5 +1,5 @@ error[E0515]: cannot return reference to local variable `local` - --> $DIR/issue-47470.rs:17:9 + --> $DIR/issue-47470.rs:15:9 | LL | &local | ^^^^^^ returns a reference to data owned by the current function diff --git a/src/test/ui/nll/issue-48070.rs b/src/test/ui/nll/issue-48070.rs index c69bd3dbe9..47426cdfa5 100644 --- a/src/test/ui/nll/issue-48070.rs +++ b/src/test/ui/nll/issue-48070.rs @@ -1,8 +1,6 @@ // run-pass // revisions: lxl nll -#![cfg_attr(nll, feature(nll))] - struct Foo { x: u32 } diff --git a/src/test/ui/nll/issue-48697.rs b/src/test/ui/nll/issue-48697.rs index ececd6fccd..16e29ab2a8 100644 --- a/src/test/ui/nll/issue-48697.rs +++ b/src/test/ui/nll/issue-48697.rs @@ -1,7 +1,5 @@ // Regression test for #48697 -#![feature(nll)] - fn foo(x: &i32) -> &i32 { let z = 4; let f = &|y| y; diff --git a/src/test/ui/nll/issue-48697.stderr b/src/test/ui/nll/issue-48697.stderr index 73832fd578..f0c29b72b4 100644 --- a/src/test/ui/nll/issue-48697.stderr +++ b/src/test/ui/nll/issue-48697.stderr @@ -1,5 +1,5 @@ error[E0515]: cannot return value referencing local variable `z` - --> $DIR/issue-48697.rs:9:5 + --> $DIR/issue-48697.rs:7:5 | LL | let k = f(&z); | -- `z` is borrowed here diff --git a/src/test/ui/nll/issue-50716-1.rs b/src/test/ui/nll/issue-50716-1.rs index db7e6b30f2..ec992959a6 100644 --- a/src/test/ui/nll/issue-50716-1.rs +++ b/src/test/ui/nll/issue-50716-1.rs @@ -3,12 +3,8 @@ // bounds derived from `Sized` requirements” that checks that the fixed compiler // accepts this code fragment with both AST and MIR borrow checkers. // -// revisions: ast mir -// // compile-pass -#![cfg_attr(mir, feature(nll))] - struct Qey(Q); fn main() {} diff --git a/src/test/ui/nll/issue-50716.nll.stderr b/src/test/ui/nll/issue-50716.nll.stderr new file mode 100644 index 0000000000..38dd1b5f6f --- /dev/null +++ b/src/test/ui/nll/issue-50716.nll.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/issue-50716.rs:14:14 + | +LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>) + | -- lifetime `'a` defined here +... +LL | let _x = *s; + | ^^ proving this value is `Sized` requires that `'a` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/nll/issue-50716.rs b/src/test/ui/nll/issue-50716.rs index ce4bee3665..c2fc345fa2 100644 --- a/src/test/ui/nll/issue-50716.rs +++ b/src/test/ui/nll/issue-50716.rs @@ -2,8 +2,6 @@ // Regression test for the issue #50716: NLL ignores lifetimes bounds // derived from `Sized` requirements -#![feature(nll)] - trait A { type X: ?Sized; } diff --git a/src/test/ui/nll/issue-50716.stderr b/src/test/ui/nll/issue-50716.stderr index 7e5ffb5150..b19e3a9dfb 100644 --- a/src/test/ui/nll/issue-50716.stderr +++ b/src/test/ui/nll/issue-50716.stderr @@ -1,11 +1,18 @@ -error: lifetime may not live long enough - --> $DIR/issue-50716.rs:16:14 +error[E0308]: mismatched types + --> $DIR/issue-50716.rs:14:9 | -LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>) - | -- lifetime `'a` defined here -... LL | let _x = *s; - | ^^ proving this value is `Sized` requires that `'a` must outlive `'static` + | ^^ lifetime mismatch + | + = note: expected type `std::marker::Sized` + found type `std::marker::Sized` +note: the lifetime 'a as defined on the function body at 9:8... + --> $DIR/issue-50716.rs:9:8 + | +LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>) + | ^^ + = note: ...does not necessarily outlive the static lifetime error: aborting due to previous error +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/nll/issue-51191.rs b/src/test/ui/nll/issue-51191.rs index 6704b64869..747bfe3a8a 100644 --- a/src/test/ui/nll/issue-51191.rs +++ b/src/test/ui/nll/issue-51191.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - struct Struct; impl Struct { diff --git a/src/test/ui/nll/issue-51191.stderr b/src/test/ui/nll/issue-51191.stderr index e80cd873d5..e226de15dc 100644 --- a/src/test/ui/nll/issue-51191.stderr +++ b/src/test/ui/nll/issue-51191.stderr @@ -1,5 +1,5 @@ warning: function cannot return without recursing - --> $DIR/issue-51191.rs:6:5 + --> $DIR/issue-51191.rs:4:5 | LL | fn bar(self: &mut Self) { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing @@ -11,7 +11,7 @@ LL | (&mut self).bar(); = help: a `loop` may express intention better if this is on purpose error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable - --> $DIR/issue-51191.rs:8:9 + --> $DIR/issue-51191.rs:6:9 | LL | (&mut self).bar(); | ^^^^^^^^^^^ @@ -20,7 +20,7 @@ LL | (&mut self).bar(); | try removing `&mut` here error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable - --> $DIR/issue-51191.rs:13:9 + --> $DIR/issue-51191.rs:11:9 | LL | fn imm(self) { | ---- help: consider changing this to be mutable: `mut self` @@ -28,19 +28,19 @@ LL | (&mut self).bar(); | ^^^^^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable - --> $DIR/issue-51191.rs:22:9 + --> $DIR/issue-51191.rs:20:9 | LL | (&mut self).bar(); | ^^^^^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/issue-51191.rs:22:9 + --> $DIR/issue-51191.rs:20:9 | LL | (&mut self).bar(); | ^^^^^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable - --> $DIR/issue-51191.rs:28:9 + --> $DIR/issue-51191.rs:26:9 | LL | (&mut self).bar(); | ^^^^^^^^^^^ diff --git a/src/test/ui/nll/issue-51244.rs b/src/test/ui/nll/issue-51244.rs index aaf98ddfa2..743415d58a 100644 --- a/src/test/ui/nll/issue-51244.rs +++ b/src/test/ui/nll/issue-51244.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - fn main() { let ref my_ref @ _ = 0; *my_ref = 0; diff --git a/src/test/ui/nll/issue-51244.stderr b/src/test/ui/nll/issue-51244.stderr index 69efb2ca84..8a7e71e032 100644 --- a/src/test/ui/nll/issue-51244.stderr +++ b/src/test/ui/nll/issue-51244.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to `*my_ref` which is behind a `&` reference - --> $DIR/issue-51244.rs:5:5 + --> $DIR/issue-51244.rs:3:5 | LL | let ref my_ref @ _ = 0; | -------------- help: consider changing this to be a mutable reference: `ref mut my_ref @ _` @@ -8,4 +8,3 @@ LL | *my_ref = 0; error: aborting due to previous error -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/nll/issue-51268.rs b/src/test/ui/nll/issue-51268.rs index c14146a3de..12d0449abb 100644 --- a/src/test/ui/nll/issue-51268.rs +++ b/src/test/ui/nll/issue-51268.rs @@ -1,7 +1,5 @@ // ignore-tidy-linelength -#![feature(nll)] - struct Bar; impl Bar { diff --git a/src/test/ui/nll/issue-51268.stderr b/src/test/ui/nll/issue-51268.stderr index 0be181745f..420c94f8e1 100644 --- a/src/test/ui/nll/issue-51268.stderr +++ b/src/test/ui/nll/issue-51268.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `self.thing` as mutable because it is also borrowed as immutable - --> $DIR/issue-51268.rs:18:9 + --> $DIR/issue-51268.rs:16:9 | LL | self.thing.bar(|| { | ^ --- -- immutable borrow occurs here diff --git a/src/test/ui/nll/issue-51351.rs b/src/test/ui/nll/issue-51351.rs index 939993f154..b45477c7fb 100644 --- a/src/test/ui/nll/issue-51351.rs +++ b/src/test/ui/nll/issue-51351.rs @@ -8,8 +8,6 @@ // // compile-pass -#![feature(nll)] - fn creash<'a>() { let x: &'a () = &(); } diff --git a/src/test/ui/nll/issue-51512.rs b/src/test/ui/nll/issue-51512.rs index 7e2e6e0a16..691760eb91 100644 --- a/src/test/ui/nll/issue-51512.rs +++ b/src/test/ui/nll/issue-51512.rs @@ -1,6 +1,3 @@ -#![allow(warnings)] -#![feature(nll)] - fn main() { let range = 0..1; let r = range; diff --git a/src/test/ui/nll/issue-51512.stderr b/src/test/ui/nll/issue-51512.stderr index a84a236ca7..e591ca0829 100644 --- a/src/test/ui/nll/issue-51512.stderr +++ b/src/test/ui/nll/issue-51512.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `range` - --> $DIR/issue-51512.rs:7:13 + --> $DIR/issue-51512.rs:4:13 | LL | let range = 0..1; | ----- move occurs because `range` has type `std::ops::Range`, which does not implement the `Copy` trait diff --git a/src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.rs b/src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.rs index eaa809d2b3..58416c31ed 100644 --- a/src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.rs +++ b/src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.rs @@ -4,7 +4,6 @@ // of the fact that the type implements Drop. #![feature(nll)] -#![allow(dead_code)] pub struct S<'a> { url: &'a mut String } diff --git a/src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.stderr b/src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.stderr index e2036ee4ac..34259d06d3 100644 --- a/src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.stderr +++ b/src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.stderr @@ -1,5 +1,5 @@ error[E0713]: borrow may still be in use when destructor runs - --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:14:5 + --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:13:5 | LL | fn finish_1(s: S) -> &mut String { | - has type `S<'1>` @@ -9,7 +9,7 @@ LL | } | - here, drop of `s` needs exclusive access to `*s.url`, because the type `S<'_>` implements the `Drop` trait error[E0713]: borrow may still be in use when destructor runs - --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:19:13 + --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:18:13 | LL | fn finish_2(s: S) -> &mut String { | - has type `S<'1>` @@ -19,7 +19,7 @@ LL | } | - here, drop of `s` needs exclusive access to `*s.url`, because the type `S<'_>` implements the `Drop` trait error[E0713]: borrow may still be in use when destructor runs - --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:24:21 + --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:23:21 | LL | fn finish_3(s: S) -> &mut String { | - has type `S<'1>` @@ -29,7 +29,7 @@ LL | } | - here, drop of `s` needs exclusive access to `*s.url`, because the type `S<'_>` implements the `Drop` trait error[E0509]: cannot move out of type `S<'_>`, which implements the `Drop` trait - --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:29:13 + --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:28:13 | LL | let p = s.url; p | ^^^^^ @@ -39,5 +39,5 @@ LL | let p = s.url; p error: aborting due to 4 previous errors -Some errors occurred: E0509, E0713. +Some errors have detailed explanations: E0509, E0713. For more information about an error, try `rustc --explain E0509`. diff --git a/src/test/ui/nll/issue-52078.rs b/src/test/ui/nll/issue-52078.rs index ebe442adbd..4b8e6c6807 100644 --- a/src/test/ui/nll/issue-52078.rs +++ b/src/test/ui/nll/issue-52078.rs @@ -1,6 +1,3 @@ -#![feature(nll)] -#![allow(unused_variables)] - // Regression test for #52078: we were failing to infer a relationship // between `'a` and `'b` below due to inference variables introduced // during the normalization process. diff --git a/src/test/ui/nll/issue-52086.rs b/src/test/ui/nll/issue-52086.rs index 78765283ec..0414428e48 100644 --- a/src/test/ui/nll/issue-52086.rs +++ b/src/test/ui/nll/issue-52086.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - use std::rc::Rc; use std::sync::Arc; diff --git a/src/test/ui/nll/issue-52086.stderr b/src/test/ui/nll/issue-52086.stderr index ed4171ff14..da453fb1f9 100644 --- a/src/test/ui/nll/issue-52086.stderr +++ b/src/test/ui/nll/issue-52086.stderr @@ -1,11 +1,11 @@ error[E0507]: cannot move out of an `Rc` - --> $DIR/issue-52086.rs:10:10 + --> $DIR/issue-52086.rs:8:10 | LL | drop(x.field); | ^^^^^^^ cannot move out of an `Rc` error[E0507]: cannot move out of an `Arc` - --> $DIR/issue-52086.rs:14:10 + --> $DIR/issue-52086.rs:12:10 | LL | drop(y.field); | ^^^^^^^ cannot move out of an `Arc` diff --git a/src/test/ui/nll/issue-52113.rs b/src/test/ui/nll/issue-52113.rs index 795f4f426f..0d7ee03769 100644 --- a/src/test/ui/nll/issue-52113.rs +++ b/src/test/ui/nll/issue-52113.rs @@ -1,6 +1,3 @@ -// - -#![allow(warnings)] #![feature(nll)] trait Bazinga {} diff --git a/src/test/ui/nll/issue-52113.stderr b/src/test/ui/nll/issue-52113.stderr index 8638fe2576..590963ded7 100644 --- a/src/test/ui/nll/issue-52113.stderr +++ b/src/test/ui/nll/issue-52113.stderr @@ -1,5 +1,5 @@ error: lifetime may not live long enough - --> $DIR/issue-52113.rs:37:5 + --> $DIR/issue-52113.rs:34:5 | LL | fn produce_err<'a, 'b: 'a>(data: &'b mut Vec<&'b u32>, value: &'a u32) -> impl Bazinga + 'b { | -- -- lifetime `'b` defined here diff --git a/src/test/ui/nll/issue-52534-1.rs b/src/test/ui/nll/issue-52534-1.rs index 7ab3593c89..d9ea3ae42c 100644 --- a/src/test/ui/nll/issue-52534-1.rs +++ b/src/test/ui/nll/issue-52534-1.rs @@ -1,6 +1,3 @@ -#![feature(nll)] -#![allow(warnings)] - struct Test; impl Test { diff --git a/src/test/ui/nll/issue-52534-1.stderr b/src/test/ui/nll/issue-52534-1.stderr index 7d82f5e710..743179f05c 100644 --- a/src/test/ui/nll/issue-52534-1.stderr +++ b/src/test/ui/nll/issue-52534-1.stderr @@ -1,17 +1,17 @@ error[E0515]: cannot return reference to local variable `x` - --> $DIR/issue-52534-1.rs:9:9 + --> $DIR/issue-52534-1.rs:6:9 | LL | &x | ^^ returns a reference to data owned by the current function error[E0515]: cannot return reference to local variable `x` - --> $DIR/issue-52534-1.rs:16:5 + --> $DIR/issue-52534-1.rs:13:5 | LL | &x | ^^ returns a reference to data owned by the current function error[E0515]: cannot return value referencing local variable `x` - --> $DIR/issue-52534-1.rs:22:5 + --> $DIR/issue-52534-1.rs:19:5 | LL | &&x | ^-- @@ -20,7 +20,7 @@ LL | &&x | returns a value referencing data owned by the current function error[E0515]: cannot return reference to temporary value - --> $DIR/issue-52534-1.rs:22:5 + --> $DIR/issue-52534-1.rs:19:5 | LL | &&x | ^-- @@ -29,25 +29,25 @@ LL | &&x | returns a reference to data owned by the current function error[E0515]: cannot return reference to local variable `x` - --> $DIR/issue-52534-1.rs:29:5 + --> $DIR/issue-52534-1.rs:26:5 | LL | &x | ^^ returns a reference to data owned by the current function error[E0515]: cannot return reference to local variable `x` - --> $DIR/issue-52534-1.rs:35:5 + --> $DIR/issue-52534-1.rs:32:5 | LL | &x | ^^ returns a reference to data owned by the current function error[E0515]: cannot return reference to local variable `x` - --> $DIR/issue-52534-1.rs:41:5 + --> $DIR/issue-52534-1.rs:38:5 | LL | &x | ^^ returns a reference to data owned by the current function error[E0515]: cannot return reference to local variable `x` - --> $DIR/issue-52534-1.rs:47:5 + --> $DIR/issue-52534-1.rs:44:5 | LL | &x | ^^ returns a reference to data owned by the current function diff --git a/src/test/ui/nll/issue-52534-2.rs b/src/test/ui/nll/issue-52534-2.rs index 6e84869dd6..e416264ed0 100644 --- a/src/test/ui/nll/issue-52534-2.rs +++ b/src/test/ui/nll/issue-52534-2.rs @@ -1,6 +1,3 @@ -#![feature(nll)] -#![allow(warnings)] - fn foo(x: &u32) -> &u32 { let y; diff --git a/src/test/ui/nll/issue-52534-2.stderr b/src/test/ui/nll/issue-52534-2.stderr index f98deaea71..dd8a87f7e2 100644 --- a/src/test/ui/nll/issue-52534-2.stderr +++ b/src/test/ui/nll/issue-52534-2.stderr @@ -1,5 +1,5 @@ error[E0597]: `x` does not live long enough - --> $DIR/issue-52534-2.rs:9:9 + --> $DIR/issue-52534-2.rs:6:9 | LL | y = &x | ^^^^^^ borrowed value does not live long enough diff --git a/src/test/ui/nll/issue-52534.rs b/src/test/ui/nll/issue-52534.rs index 1394560df1..559d4c8591 100644 --- a/src/test/ui/nll/issue-52534.rs +++ b/src/test/ui/nll/issue-52534.rs @@ -1,6 +1,3 @@ -#![feature(nll)] -#![allow(warnings)] - fn foo(_: impl FnOnce(&u32) -> &u32) { } diff --git a/src/test/ui/nll/issue-52534.stderr b/src/test/ui/nll/issue-52534.stderr index 9ac79eda16..b2b727fd43 100644 --- a/src/test/ui/nll/issue-52534.stderr +++ b/src/test/ui/nll/issue-52534.stderr @@ -1,5 +1,5 @@ error[E0597]: `x` does not live long enough - --> $DIR/issue-52534.rs:12:14 + --> $DIR/issue-52534.rs:9:14 | LL | foo(|a| &x) | - ^ `x` would have to be valid for `'0`... @@ -13,7 +13,7 @@ LL | } = note: to learn more, visit error[E0597]: `y` does not live long enough - --> $DIR/issue-52534.rs:18:26 + --> $DIR/issue-52534.rs:15:26 | LL | baz(|first, second| &y) | ----- ^ `y` would have to be valid for `'0`... diff --git a/src/test/ui/nll/issue-52663-span-decl-captured-variable.rs b/src/test/ui/nll/issue-52663-span-decl-captured-variable.rs index 3e57d26745..24a4267f65 100644 --- a/src/test/ui/nll/issue-52663-span-decl-captured-variable.rs +++ b/src/test/ui/nll/issue-52663-span-decl-captured-variable.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - fn expect_fn(f: F) where F : Fn() { f(); } diff --git a/src/test/ui/nll/issue-52663-span-decl-captured-variable.stderr b/src/test/ui/nll/issue-52663-span-decl-captured-variable.stderr index 0162c6bcbd..8958bdf4c2 100644 --- a/src/test/ui/nll/issue-52663-span-decl-captured-variable.stderr +++ b/src/test/ui/nll/issue-52663-span-decl-captured-variable.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of captured variable in an `Fn` closure - --> $DIR/issue-52663-span-decl-captured-variable.rs:10:26 + --> $DIR/issue-52663-span-decl-captured-variable.rs:8:26 | LL | let x = (vec![22], vec![44]); | - captured outer variable diff --git a/src/test/ui/nll/issue-52663-trait-object.rs b/src/test/ui/nll/issue-52663-trait-object.rs index 121c3ef4e6..e8e571aadc 100644 --- a/src/test/ui/nll/issue-52663-trait-object.rs +++ b/src/test/ui/nll/issue-52663-trait-object.rs @@ -1,5 +1,4 @@ #![feature(box_syntax)] -#![feature(nll)] trait Foo { fn get(&self); } diff --git a/src/test/ui/nll/issue-52663-trait-object.stderr b/src/test/ui/nll/issue-52663-trait-object.stderr index b9437d88ff..9262117f39 100644 --- a/src/test/ui/nll/issue-52663-trait-object.stderr +++ b/src/test/ui/nll/issue-52663-trait-object.stderr @@ -1,5 +1,5 @@ error[E0597]: `tmp0` does not live long enough - --> $DIR/issue-52663-trait-object.rs:13:20 + --> $DIR/issue-52663-trait-object.rs:12:20 | LL | let tmp1 = &tmp0; | ^^^^^ borrowed value does not live long enough diff --git a/src/test/ui/nll/issue-52669.rs b/src/test/ui/nll/issue-52669.rs index 6027e98814..e33528ac59 100644 --- a/src/test/ui/nll/issue-52669.rs +++ b/src/test/ui/nll/issue-52669.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - struct A { b: B, } diff --git a/src/test/ui/nll/issue-52669.stderr b/src/test/ui/nll/issue-52669.stderr index f51768c385..db53e444b9 100644 --- a/src/test/ui/nll/issue-52669.stderr +++ b/src/test/ui/nll/issue-52669.stderr @@ -1,5 +1,5 @@ error[E0382]: borrow of moved value: `a.b` - --> $DIR/issue-52669.rs:15:5 + --> $DIR/issue-52669.rs:13:5 | LL | fn bar(mut a: A) -> B { | ----- move occurs because `a` has type `A`, which does not implement the `Copy` trait diff --git a/src/test/ui/nll/issue-52742.nll.stderr b/src/test/ui/nll/issue-52742.nll.stderr new file mode 100644 index 0000000000..e8b7b3333e --- /dev/null +++ b/src/test/ui/nll/issue-52742.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/issue-52742.rs:14:9 + | +LL | fn take_bar(&mut self, b: Bar<'_>) { + | --------- -- let's call this `'1` + | | + | has type `&mut Foo<'_, '2>` +LL | self.y = b.z + | ^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2` + +error: aborting due to previous error + diff --git a/src/test/ui/nll/issue-52742.rs b/src/test/ui/nll/issue-52742.rs index 150e67fe09..db9ddfff28 100644 --- a/src/test/ui/nll/issue-52742.rs +++ b/src/test/ui/nll/issue-52742.rs @@ -1,4 +1,3 @@ -#![feature(nll)] #![feature(in_band_lifetimes)] struct Foo<'a, 'b> { @@ -13,7 +12,7 @@ struct Bar<'b> { impl Foo<'_, '_> { fn take_bar(&mut self, b: Bar<'_>) { self.y = b.z - //~^ ERROR lifetime may not live long enough + //~^ ERROR } } diff --git a/src/test/ui/nll/issue-52742.stderr b/src/test/ui/nll/issue-52742.stderr index 6b25296c4b..b982915800 100644 --- a/src/test/ui/nll/issue-52742.stderr +++ b/src/test/ui/nll/issue-52742.stderr @@ -1,12 +1,22 @@ -error: lifetime may not live long enough - --> $DIR/issue-52742.rs:15:9 +error[E0312]: lifetime of reference outlives lifetime of borrowed content... + --> $DIR/issue-52742.rs:14:18 | -LL | fn take_bar(&mut self, b: Bar<'_>) { - | --------- -- let's call this `'1` - | | - | has type `&mut Foo<'_, '2>` LL | self.y = b.z - | ^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2` + | ^^^ + | +note: ...the reference is valid for the lifetime '_ as defined on the impl at 12:10... + --> $DIR/issue-52742.rs:12:10 + | +LL | impl Foo<'_, '_> { + | ^^ +note: ...but the borrowed content is only valid for the anonymous lifetime #2 defined on the method body at 13:5 + --> $DIR/issue-52742.rs:13:5 + | +LL | / fn take_bar(&mut self, b: Bar<'_>) { +LL | | self.y = b.z +LL | | +LL | | } + | |_____^ error: aborting due to previous error diff --git a/src/test/ui/nll/issue-53119.rs b/src/test/ui/nll/issue-53119.rs index 97e05c8810..7a47a77f6b 100644 --- a/src/test/ui/nll/issue-53119.rs +++ b/src/test/ui/nll/issue-53119.rs @@ -1,7 +1,5 @@ // compile-pass -#![feature(nll)] - use std::ops::Deref; pub struct TypeFieldIterator<'a, T: 'a> { diff --git a/src/test/ui/nll/issue-53570.rs b/src/test/ui/nll/issue-53570.rs index d0baffa270..cea458dcb6 100644 --- a/src/test/ui/nll/issue-53570.rs +++ b/src/test/ui/nll/issue-53570.rs @@ -8,10 +8,6 @@ // // compile-pass -#![feature(nll)] -#![feature(rustc_attrs)] -#![allow(dead_code)] - use std::cell::{RefCell, Ref}; trait AnyVec<'a> { diff --git a/src/test/ui/nll/issue-53807.nll.stderr b/src/test/ui/nll/issue-53807.nll.stderr deleted file mode 100644 index 2b15da3710..0000000000 --- a/src/test/ui/nll/issue-53807.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0382]: use of moved value - --> $DIR/issue-53807.rs:4:21 - | -LL | if let Some(thing) = maybe { - | ^^^^^ value moved here, in previous iteration of loop - | - = note: move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/nll/issue-53807.rs b/src/test/ui/nll/issue-53807.rs index f69d8c1493..d494f7e151 100644 --- a/src/test/ui/nll/issue-53807.rs +++ b/src/test/ui/nll/issue-53807.rs @@ -2,8 +2,7 @@ pub fn main(){ let maybe = Some(vec![true, true]); loop { if let Some(thing) = maybe { -//~^ ERROR use of partially moved value -//~| ERROR use of moved value +//~^ ERROR use of moved value } } } diff --git a/src/test/ui/nll/issue-53807.stderr b/src/test/ui/nll/issue-53807.stderr index fb6701452c..2b15da3710 100644 --- a/src/test/ui/nll/issue-53807.stderr +++ b/src/test/ui/nll/issue-53807.stderr @@ -1,21 +1,11 @@ -error[E0382]: use of partially moved value: `maybe` - --> $DIR/issue-53807.rs:4:30 - | -LL | if let Some(thing) = maybe { - | ----- ^^^^^ value used here after move - | | - | value moved here - | - = note: move occurs because the value has type `std::vec::Vec`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `(maybe as std::prelude::v1::Some).0` +error[E0382]: use of moved value --> $DIR/issue-53807.rs:4:21 | LL | if let Some(thing) = maybe { - | ^^^^^ value moved here in previous iteration of loop + | ^^^^^ value moved here, in previous iteration of loop | - = note: move occurs because the value has type `std::vec::Vec`, which does not implement the `Copy` trait + = note: move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/nll/issue-54382-use-span-of-tail-of-block.nll.stderr b/src/test/ui/nll/issue-54382-use-span-of-tail-of-block.nll.stderr deleted file mode 100644 index 8412cbdc54..0000000000 --- a/src/test/ui/nll/issue-54382-use-span-of-tail-of-block.nll.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0597]: `_thing1` does not live long enough - --> $DIR/issue-54382-use-span-of-tail-of-block.rs:7:29 - | -LL | D("other").next(&_thing1) - | ----------------^^^^^^^^- - | | | - | | borrowed value does not live long enough - | a temporary with access to the borrow is created here ... -... -LL | } - | - `_thing1` dropped here while still borrowed -LL | -LL | ; - | - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` - | - = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/nll/issue-54382-use-span-of-tail-of-block.stderr b/src/test/ui/nll/issue-54382-use-span-of-tail-of-block.stderr index 8d23891e1b..8412cbdc54 100644 --- a/src/test/ui/nll/issue-54382-use-span-of-tail-of-block.stderr +++ b/src/test/ui/nll/issue-54382-use-span-of-tail-of-block.stderr @@ -1,14 +1,19 @@ error[E0597]: `_thing1` does not live long enough - --> $DIR/issue-54382-use-span-of-tail-of-block.rs:7:30 + --> $DIR/issue-54382-use-span-of-tail-of-block.rs:7:29 | LL | D("other").next(&_thing1) - | ^^^^^^^ borrowed value does not live long enough + | ----------------^^^^^^^^- + | | | + | | borrowed value does not live long enough + | a temporary with access to the borrow is created here ... ... LL | } | - `_thing1` dropped here while still borrowed LL | LL | ; - | - borrowed value needs to live until here + | - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` + | + = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. error: aborting due to previous error diff --git a/src/test/ui/nll/issue-54556-niconii.nll.stderr b/src/test/ui/nll/issue-54556-niconii.nll.stderr deleted file mode 100644 index 40cd04de5e..0000000000 --- a/src/test/ui/nll/issue-54556-niconii.nll.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0597]: `counter` does not live long enough - --> $DIR/issue-54556-niconii.rs:22:20 - | -LL | if let Ok(_) = counter.lock() { } - | ^^^^^^^------- - | | - | borrowed value does not live long enough - | a temporary with access to the borrow is created here ... -... -LL | } - | - - | | - | `counter` dropped here while still borrowed - | ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::result::Result, ()>` - | - = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/nll/issue-54556-niconii.stderr b/src/test/ui/nll/issue-54556-niconii.stderr index 2d0de26ab3..40cd04de5e 100644 --- a/src/test/ui/nll/issue-54556-niconii.stderr +++ b/src/test/ui/nll/issue-54556-niconii.stderr @@ -2,12 +2,18 @@ error[E0597]: `counter` does not live long enough --> $DIR/issue-54556-niconii.rs:22:20 | LL | if let Ok(_) = counter.lock() { } - | ^^^^^^^ borrowed value does not live long enough + | ^^^^^^^------- + | | + | borrowed value does not live long enough + | a temporary with access to the borrow is created here ... ... LL | } - | - `counter` dropped here while still borrowed + | - + | | + | `counter` dropped here while still borrowed + | ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::result::Result, ()>` | - = note: values in a scope are dropped in the opposite order they are created + = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. error: aborting due to previous error diff --git a/src/test/ui/nll/issue-54556-stephaneyfx.nll.stderr b/src/test/ui/nll/issue-54556-stephaneyfx.nll.stderr deleted file mode 100644 index 0bf76485ee..0000000000 --- a/src/test/ui/nll/issue-54556-stephaneyfx.nll.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0597]: `stmt` does not live long enough - --> $DIR/issue-54556-stephaneyfx.rs:27:21 - | -LL | let rows = Rows(&stmt); - | ^^^^^ borrowed value does not live long enough -LL | rows.map(|row| row).next() - | ------------------- a temporary with access to the borrow is created here ... -... -LL | } - | - - | | - | `stmt` dropped here while still borrowed - | ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::iter::Map, [closure@$DIR/issue-54556-stephaneyfx.rs:28:14: 28:23]>` - | - = note: The temporary is part of an expression at the end of a block. Consider forcing this temporary to be dropped sooner, before the block's local variables are dropped. For example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block. - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/nll/issue-54556-stephaneyfx.stderr b/src/test/ui/nll/issue-54556-stephaneyfx.stderr index 4e581a516b..0bf76485ee 100644 --- a/src/test/ui/nll/issue-54556-stephaneyfx.stderr +++ b/src/test/ui/nll/issue-54556-stephaneyfx.stderr @@ -1,13 +1,18 @@ error[E0597]: `stmt` does not live long enough - --> $DIR/issue-54556-stephaneyfx.rs:27:22 + --> $DIR/issue-54556-stephaneyfx.rs:27:21 | LL | let rows = Rows(&stmt); - | ^^^^ borrowed value does not live long enough + | ^^^^^ borrowed value does not live long enough +LL | rows.map(|row| row).next() + | ------------------- a temporary with access to the borrow is created here ... ... LL | } - | - `stmt` dropped here while still borrowed + | - + | | + | `stmt` dropped here while still borrowed + | ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::iter::Map, [closure@$DIR/issue-54556-stephaneyfx.rs:28:14: 28:23]>` | - = note: values in a scope are dropped in the opposite order they are created + = note: The temporary is part of an expression at the end of a block. Consider forcing this temporary to be dropped sooner, before the block's local variables are dropped. For example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block. error: aborting due to previous error diff --git a/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.nll.stderr b/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.nll.stderr deleted file mode 100644 index 513dca7950..0000000000 --- a/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.nll.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0597]: `_thing1` does not live long enough - --> $DIR/issue-54556-temps-in-tail-diagnostic.rs:5:11 - | -LL | D(&_thing1).end() - | --^^^^^^^^- - | | | - | | borrowed value does not live long enough - | a temporary with access to the borrow is created here ... -LL | } - | - `_thing1` dropped here while still borrowed -LL | -LL | ; - | - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` - | - = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr b/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr index a74970f711..513dca7950 100644 --- a/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr +++ b/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr @@ -1,13 +1,18 @@ error[E0597]: `_thing1` does not live long enough - --> $DIR/issue-54556-temps-in-tail-diagnostic.rs:5:12 + --> $DIR/issue-54556-temps-in-tail-diagnostic.rs:5:11 | LL | D(&_thing1).end() - | ^^^^^^^ borrowed value does not live long enough + | --^^^^^^^^- + | | | + | | borrowed value does not live long enough + | a temporary with access to the borrow is created here ... LL | } | - `_thing1` dropped here while still borrowed LL | LL | ; - | - borrowed value needs to live until here + | - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` + | + = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. error: aborting due to previous error diff --git a/src/test/ui/nll/issue-54556-used-vs-unused-tails.nll.stderr b/src/test/ui/nll/issue-54556-used-vs-unused-tails.nll.stderr deleted file mode 100644 index 52d0870b78..0000000000 --- a/src/test/ui/nll/issue-54556-used-vs-unused-tails.nll.stderr +++ /dev/null @@ -1,113 +0,0 @@ -error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:10:55 - | -LL | { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // suggest `;` - | --^^^^- - - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` - | | | | - | | | `_t1` dropped here while still borrowed - | | borrowed value does not live long enough - | a temporary with access to the borrow is created here ... - | - = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. - -error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:13:55 - | -LL | { { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } } ; // suggest `;` - | --^^^^- - - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` - | | | | - | | | `_t1` dropped here while still borrowed - | | borrowed value does not live long enough - | a temporary with access to the borrow is created here ... - | - = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. - -error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:16:55 - | -LL | { { let mut _t1 = D(Box::new("t1")); D(&_t1).end() }; } // suggest `;` - | --^^^^- -- ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` - | | | | - | | | `_t1` dropped here while still borrowed - | | borrowed value does not live long enough - | a temporary with access to the borrow is created here ... - | - = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. - -error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:19:55 - | -LL | let _ = { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // suggest `;` - | --^^^^- - - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` - | | | | - | | | `_t1` dropped here while still borrowed - | | borrowed value does not live long enough - | a temporary with access to the borrow is created here ... - | - = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. - -error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:22:55 - | -LL | let _u = { let mut _t1 = D(Box::new("t1")); D(&_t1).unit() } ; // suggest `;` - | --^^^^- - - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` - | | | | - | | | `_t1` dropped here while still borrowed - | | borrowed value does not live long enough - | a temporary with access to the borrow is created here ... - | - = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. - -error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:25:55 - | -LL | let _x = { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // `let x = ...; x` - | --^^^^- - - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` - | | | | - | | | `_t1` dropped here while still borrowed - | | borrowed value does not live long enough - | a temporary with access to the borrow is created here ... - | - = note: The temporary is part of an expression at the end of a block. Consider forcing this temporary to be dropped sooner, before the block's local variables are dropped. For example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block. - -error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:30:55 - | -LL | _y = { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // `let x = ...; x` - | --^^^^- - - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` - | | | | - | | | `_t1` dropped here while still borrowed - | | borrowed value does not live long enough - | a temporary with access to the borrow is created here ... - | - = note: The temporary is part of an expression at the end of a block. Consider forcing this temporary to be dropped sooner, before the block's local variables are dropped. For example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block. - -error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:37:55 - | -LL | fn f_local_ref() { let mut _t1 = D(Box::new("t1")); D(&_t1).unit() } // suggest `;` - | --^^^^- - - | | | | - | | | `_t1` dropped here while still borrowed - | | | ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` - | | borrowed value does not live long enough - | a temporary with access to the borrow is created here ... - | - = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. - -error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:40:55 - | -LL | fn f() -> String { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } // `let x = ...; x` - | --^^^^- - - | | | | - | | | `_t1` dropped here while still borrowed - | | | ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` - | | borrowed value does not live long enough - | a temporary with access to the borrow is created here ... - | - = note: The temporary is part of an expression at the end of a block. Consider forcing this temporary to be dropped sooner, before the block's local variables are dropped. For example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block. - -error: aborting due to 9 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/nll/issue-54556-used-vs-unused-tails.stderr b/src/test/ui/nll/issue-54556-used-vs-unused-tails.stderr index e9e4e51136..52d0870b78 100644 --- a/src/test/ui/nll/issue-54556-used-vs-unused-tails.stderr +++ b/src/test/ui/nll/issue-54556-used-vs-unused-tails.stderr @@ -1,85 +1,112 @@ error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:10:56 + --> $DIR/issue-54556-used-vs-unused-tails.rs:10:55 | LL | { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // suggest `;` - | ^^^ - - borrowed value needs to live until here - | | | - | | `_t1` dropped here while still borrowed - | borrowed value does not live long enough + | --^^^^- - - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` + | | | | + | | | `_t1` dropped here while still borrowed + | | borrowed value does not live long enough + | a temporary with access to the borrow is created here ... + | + = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:13:56 + --> $DIR/issue-54556-used-vs-unused-tails.rs:13:55 | LL | { { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } } ; // suggest `;` - | ^^^ - - borrowed value needs to live until here - | | | - | | `_t1` dropped here while still borrowed - | borrowed value does not live long enough + | --^^^^- - - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` + | | | | + | | | `_t1` dropped here while still borrowed + | | borrowed value does not live long enough + | a temporary with access to the borrow is created here ... + | + = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:16:56 + --> $DIR/issue-54556-used-vs-unused-tails.rs:16:55 | LL | { { let mut _t1 = D(Box::new("t1")); D(&_t1).end() }; } // suggest `;` - | ^^^ -- borrowed value needs to live until here - | | | - | | `_t1` dropped here while still borrowed - | borrowed value does not live long enough + | --^^^^- -- ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` + | | | | + | | | `_t1` dropped here while still borrowed + | | borrowed value does not live long enough + | a temporary with access to the borrow is created here ... + | + = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:19:56 + --> $DIR/issue-54556-used-vs-unused-tails.rs:19:55 | LL | let _ = { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // suggest `;` - | ^^^ - - borrowed value needs to live until here - | | | - | | `_t1` dropped here while still borrowed - | borrowed value does not live long enough + | --^^^^- - - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` + | | | | + | | | `_t1` dropped here while still borrowed + | | borrowed value does not live long enough + | a temporary with access to the borrow is created here ... + | + = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:22:56 + --> $DIR/issue-54556-used-vs-unused-tails.rs:22:55 | LL | let _u = { let mut _t1 = D(Box::new("t1")); D(&_t1).unit() } ; // suggest `;` - | ^^^ - - borrowed value needs to live until here - | | | - | | `_t1` dropped here while still borrowed - | borrowed value does not live long enough + | --^^^^- - - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` + | | | | + | | | `_t1` dropped here while still borrowed + | | borrowed value does not live long enough + | a temporary with access to the borrow is created here ... + | + = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:25:56 + --> $DIR/issue-54556-used-vs-unused-tails.rs:25:55 | LL | let _x = { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // `let x = ...; x` - | ^^^ - - borrowed value needs to live until here - | | | - | | `_t1` dropped here while still borrowed - | borrowed value does not live long enough + | --^^^^- - - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` + | | | | + | | | `_t1` dropped here while still borrowed + | | borrowed value does not live long enough + | a temporary with access to the borrow is created here ... + | + = note: The temporary is part of an expression at the end of a block. Consider forcing this temporary to be dropped sooner, before the block's local variables are dropped. For example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block. error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:30:56 + --> $DIR/issue-54556-used-vs-unused-tails.rs:30:55 | LL | _y = { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } ; // `let x = ...; x` - | ^^^ - - borrowed value needs to live until here - | | | - | | `_t1` dropped here while still borrowed - | borrowed value does not live long enough + | --^^^^- - - ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` + | | | | + | | | `_t1` dropped here while still borrowed + | | borrowed value does not live long enough + | a temporary with access to the borrow is created here ... + | + = note: The temporary is part of an expression at the end of a block. Consider forcing this temporary to be dropped sooner, before the block's local variables are dropped. For example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block. error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:37:56 + --> $DIR/issue-54556-used-vs-unused-tails.rs:37:55 | LL | fn f_local_ref() { let mut _t1 = D(Box::new("t1")); D(&_t1).unit() } // suggest `;` - | ^^^ - `_t1` dropped here while still borrowed - | | - | borrowed value does not live long enough + | --^^^^- - + | | | | + | | | `_t1` dropped here while still borrowed + | | | ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` + | | borrowed value does not live long enough + | a temporary with access to the borrow is created here ... | - = note: values in a scope are dropped in the opposite order they are created + = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped. error[E0597]: `_t1` does not live long enough - --> $DIR/issue-54556-used-vs-unused-tails.rs:40:56 + --> $DIR/issue-54556-used-vs-unused-tails.rs:40:55 | LL | fn f() -> String { let mut _t1 = D(Box::new("t1")); D(&_t1).end() } // `let x = ...; x` - | ^^^ - `_t1` dropped here while still borrowed - | | - | borrowed value does not live long enough + | --^^^^- - + | | | | + | | | `_t1` dropped here while still borrowed + | | | ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `D` + | | borrowed value does not live long enough + | a temporary with access to the borrow is created here ... | - = note: values in a scope are dropped in the opposite order they are created + = note: The temporary is part of an expression at the end of a block. Consider forcing this temporary to be dropped sooner, before the block's local variables are dropped. For example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block. error: aborting due to 9 previous errors diff --git a/src/test/ui/nll/issue-54556-wrap-it-up.nll.stderr b/src/test/ui/nll/issue-54556-wrap-it-up.nll.stderr deleted file mode 100644 index 9f27fac15a..0000000000 --- a/src/test/ui/nll/issue-54556-wrap-it-up.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/issue-54556-wrap-it-up.rs:27:5 - | -LL | let wrap = Wrap { p: &mut x }; - | ------ borrow of `x` occurs here -... -LL | x = 1; - | ^^^^^ assignment to borrowed `x` occurs here -LL | } - | - borrow might be used here, when `foo` is dropped and runs the destructor for type `Foo<'_>` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/nll/issue-54556-wrap-it-up.stderr b/src/test/ui/nll/issue-54556-wrap-it-up.stderr index c98b3a9faf..9f27fac15a 100644 --- a/src/test/ui/nll/issue-54556-wrap-it-up.stderr +++ b/src/test/ui/nll/issue-54556-wrap-it-up.stderr @@ -2,10 +2,12 @@ error[E0506]: cannot assign to `x` because it is borrowed --> $DIR/issue-54556-wrap-it-up.rs:27:5 | LL | let wrap = Wrap { p: &mut x }; - | - borrow of `x` occurs here + | ------ borrow of `x` occurs here ... LL | x = 1; | ^^^^^ assignment to borrowed `x` occurs here +LL | } + | - borrow might be used here, when `foo` is dropped and runs the destructor for type `Foo<'_>` error: aborting due to previous error diff --git a/src/test/ui/nll/issue-55288.rs b/src/test/ui/nll/issue-55288.rs index 9b3eb7f05d..c7b6ac5924 100644 --- a/src/test/ui/nll/issue-55288.rs +++ b/src/test/ui/nll/issue-55288.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - // run-pass struct Slice(&'static [&'static [u8]]); diff --git a/src/test/ui/nll/issue-55344.rs b/src/test/ui/nll/issue-55344.rs index b900acfa15..521d4d33d8 100644 --- a/src/test/ui/nll/issue-55344.rs +++ b/src/test/ui/nll/issue-55344.rs @@ -1,7 +1,5 @@ // compile-pass -#![feature(nll)] -#![allow(unreachable_code)] #![deny(unused_mut)] pub fn foo() { diff --git a/src/test/ui/nll/issue-55394.nll.stderr b/src/test/ui/nll/issue-55394.nll.stderr new file mode 100644 index 0000000000..d0723047ac --- /dev/null +++ b/src/test/ui/nll/issue-55394.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/issue-55394.rs:9:9 + | +LL | fn new(bar: &mut Bar) -> Self { + | - ---- return type is Foo<'2> + | | + | let's call the lifetime of this reference `'1` +LL | Foo { bar } + | ^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2` + +error: aborting due to previous error + diff --git a/src/test/ui/nll/issue-55394.rs b/src/test/ui/nll/issue-55394.rs index deb1034525..f813d1c915 100644 --- a/src/test/ui/nll/issue-55394.rs +++ b/src/test/ui/nll/issue-55394.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - struct Bar; struct Foo<'s> { @@ -8,7 +6,7 @@ struct Foo<'s> { impl Foo<'_> { fn new(bar: &mut Bar) -> Self { - Foo { bar } //~ERROR lifetime may not live long enough + Foo { bar } //~ERROR } } diff --git a/src/test/ui/nll/issue-55394.stderr b/src/test/ui/nll/issue-55394.stderr index e9a70fd6b1..ffb94ed7dd 100644 --- a/src/test/ui/nll/issue-55394.stderr +++ b/src/test/ui/nll/issue-55394.stderr @@ -1,12 +1,29 @@ -error: lifetime may not live long enough - --> $DIR/issue-55394.rs:11:9 +error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'s` due to conflicting requirements + --> $DIR/issue-55394.rs:9:9 | -LL | fn new(bar: &mut Bar) -> Self { - | - ---- return type is Foo<'2> - | | - | let's call the lifetime of this reference `'1` LL | Foo { bar } - | ^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2` + | ^^^ + | +note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 8:5... + --> $DIR/issue-55394.rs:8:5 + | +LL | / fn new(bar: &mut Bar) -> Self { +LL | | Foo { bar } +LL | | } + | |_____^ +note: ...so that reference does not outlive borrowed content + --> $DIR/issue-55394.rs:9:15 + | +LL | Foo { bar } + | ^^^ +note: but, the lifetime must be valid for the lifetime '_ as defined on the impl at 7:10... + --> $DIR/issue-55394.rs:7:10 + | +LL | impl Foo<'_> { + | ^^ + = note: ...so that the expression is assignable: + expected Foo<'_> + found Foo<'_> error: aborting due to previous error diff --git a/src/test/ui/nll/issue-55401.nll.stderr b/src/test/ui/nll/issue-55401.nll.stderr new file mode 100644 index 0000000000..4f797f26a1 --- /dev/null +++ b/src/test/ui/nll/issue-55401.nll.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/issue-55401.rs:3:5 + | +LL | fn static_to_a_to_static_through_ref_in_tuple<'a>(x: &'a u32) -> &'static u32 { + | -- lifetime `'a` defined here +LL | let (ref y, _z): (&'a u32, u32) = (&22, 44); +LL | *y + | ^^ returning this value requires that `'a` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/nll/issue-55401.rs b/src/test/ui/nll/issue-55401.rs index 2fa2344910..fc45824e90 100644 --- a/src/test/ui/nll/issue-55401.rs +++ b/src/test/ui/nll/issue-55401.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - fn static_to_a_to_static_through_ref_in_tuple<'a>(x: &'a u32) -> &'static u32 { let (ref y, _z): (&'a u32, u32) = (&22, 44); *y //~ ERROR diff --git a/src/test/ui/nll/issue-55401.stderr b/src/test/ui/nll/issue-55401.stderr index 622bc5a3f3..50debc6386 100644 --- a/src/test/ui/nll/issue-55401.stderr +++ b/src/test/ui/nll/issue-55401.stderr @@ -1,11 +1,15 @@ -error: lifetime may not live long enough - --> $DIR/issue-55401.rs:5:5 +error[E0312]: lifetime of reference outlives lifetime of borrowed content... + --> $DIR/issue-55401.rs:3:5 | -LL | fn static_to_a_to_static_through_ref_in_tuple<'a>(x: &'a u32) -> &'static u32 { - | -- lifetime `'a` defined here -LL | let (ref y, _z): (&'a u32, u32) = (&22, 44); LL | *y - | ^^ returning this value requires that `'a` must outlive `'static` + | ^^ + | + = note: ...the reference is valid for the static lifetime... +note: ...but the borrowed content is only valid for the lifetime 'a as defined on the function body at 1:47 + --> $DIR/issue-55401.rs:1:47 + | +LL | fn static_to_a_to_static_through_ref_in_tuple<'a>(x: &'a u32) -> &'static u32 { + | ^^ error: aborting due to previous error diff --git a/src/test/ui/nll/issue-55850.nll.stderr b/src/test/ui/nll/issue-55850.nll.stderr deleted file mode 100644 index bf0c6986ef..0000000000 --- a/src/test/ui/nll/issue-55850.nll.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0597]: `s` does not live long enough - --> $DIR/issue-55850.rs:28:16 - | -LL | yield &s[..] - | ^ borrowed value does not live long enough -LL | }) - | - `s` dropped here while still borrowed - -error[E0626]: borrow may still be in use when generator yields - --> $DIR/issue-55850.rs:28:16 - | -LL | yield &s[..] - | -------^---- possible yield occurs here - -error: aborting due to 2 previous errors - -Some errors occurred: E0597, E0626. -For more information about an error, try `rustc --explain E0597`. diff --git a/src/test/ui/nll/issue-55850.rs b/src/test/ui/nll/issue-55850.rs index 8b5887224d..a8f7299f89 100644 --- a/src/test/ui/nll/issue-55850.rs +++ b/src/test/ui/nll/issue-55850.rs @@ -25,7 +25,8 @@ where fn bug<'a>() -> impl Iterator { GenIter(move || { let mut s = String::new(); - yield &s[..] //~ ERROR `s` does not live long enough [E0597] + yield &s[..] //~ ERROR cannot yield value referencing local variable `s` [E0515] + //~| ERROR borrow may still be in use when generator yields }) } diff --git a/src/test/ui/nll/issue-55850.stderr b/src/test/ui/nll/issue-55850.stderr index 7deee1d541..86a8cdc42f 100644 --- a/src/test/ui/nll/issue-55850.stderr +++ b/src/test/ui/nll/issue-55850.stderr @@ -1,17 +1,19 @@ -error[E0597]: `s` does not live long enough - --> $DIR/issue-55850.rs:28:16 +error[E0515]: cannot yield value referencing local variable `s` + --> $DIR/issue-55850.rs:28:9 | LL | yield &s[..] - | ^ borrowed value does not live long enough -LL | }) - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 25:8... - --> $DIR/issue-55850.rs:25:8 + | ^^^^^^^-^^^^ + | | | + | | `s` is borrowed here + | yields a value referencing data owned by the current function + +error[E0626]: borrow may still be in use when generator yields + --> $DIR/issue-55850.rs:28:16 | -LL | fn bug<'a>() -> impl Iterator { - | ^^ +LL | yield &s[..] + | -------^---- possible yield occurs here -error: aborting due to previous error +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0597`. +Some errors have detailed explanations: E0515, E0626. +For more information about an error, try `rustc --explain E0515`. diff --git a/src/test/ui/nll/issue-57265-return-type-wf-check.rs b/src/test/ui/nll/issue-57265-return-type-wf-check.rs index 24c61a4926..8fb8351cee 100644 --- a/src/test/ui/nll/issue-57265-return-type-wf-check.rs +++ b/src/test/ui/nll/issue-57265-return-type-wf-check.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - use std::any::Any; #[derive(Debug, Clone)] diff --git a/src/test/ui/nll/issue-57265-return-type-wf-check.stderr b/src/test/ui/nll/issue-57265-return-type-wf-check.stderr index db01212597..20add62b91 100644 --- a/src/test/ui/nll/issue-57265-return-type-wf-check.stderr +++ b/src/test/ui/nll/issue-57265-return-type-wf-check.stderr @@ -1,5 +1,5 @@ error[E0716]: temporary value dropped while borrowed - --> $DIR/issue-57265-return-type-wf-check.rs:22:23 + --> $DIR/issue-57265-return-type-wf-check.rs:20:23 | LL | let (_, z) = foo(&"hello".to_string()); | -----^^^^^^^^^^^^^^^^^^^-- temporary value is freed at the end of this statement diff --git a/src/test/ui/nll/issue-57280-1.rs b/src/test/ui/nll/issue-57280-1.rs index 356c477f1b..e02d6a0cb5 100644 --- a/src/test/ui/nll/issue-57280-1.rs +++ b/src/test/ui/nll/issue-57280-1.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - // compile-pass trait Foo<'a> { diff --git a/src/test/ui/nll/issue-57280.rs b/src/test/ui/nll/issue-57280.rs index 4fe6a96f5d..776a0d359c 100644 --- a/src/test/ui/nll/issue-57280.rs +++ b/src/test/ui/nll/issue-57280.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - // compile-pass trait Foo { diff --git a/src/test/ui/nll/issue-57989.rs b/src/test/ui/nll/issue-57989.rs index 4f21cca97c..c410f0b0bf 100644 --- a/src/test/ui/nll/issue-57989.rs +++ b/src/test/ui/nll/issue-57989.rs @@ -1,7 +1,5 @@ // Test for ICE from issue 57989 -#![feature(nll)] - fn f(x: &i32) { let g = &x; *x = 0; //~ ERROR cannot assign to `*x` which is behind a `&` reference diff --git a/src/test/ui/nll/issue-57989.stderr b/src/test/ui/nll/issue-57989.stderr index db28787a04..00a9bab486 100644 --- a/src/test/ui/nll/issue-57989.stderr +++ b/src/test/ui/nll/issue-57989.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to `*x` which is behind a `&` reference - --> $DIR/issue-57989.rs:7:5 + --> $DIR/issue-57989.rs:5:5 | LL | fn f(x: &i32) { | ---- help: consider changing this to be a mutable reference: `&mut i32` @@ -8,7 +8,7 @@ LL | *x = 0; | ^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written error[E0506]: cannot assign to `*x` because it is borrowed - --> $DIR/issue-57989.rs:7:5 + --> $DIR/issue-57989.rs:5:5 | LL | let g = &x; | -- borrow of `*x` occurs here @@ -20,5 +20,4 @@ LL | g; error: aborting due to 2 previous errors -Some errors occurred: E0506, E0594. -For more information about an error, try `rustc --explain E0506`. +For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/nll/issue-58053.rs b/src/test/ui/nll/issue-58053.rs index d4338905ed..0992e3a85a 100644 --- a/src/test/ui/nll/issue-58053.rs +++ b/src/test/ui/nll/issue-58053.rs @@ -1,4 +1,3 @@ -#![allow(warnings)] #![feature(nll)] fn main() { diff --git a/src/test/ui/nll/issue-58053.stderr b/src/test/ui/nll/issue-58053.stderr index 9048983318..297681ff40 100644 --- a/src/test/ui/nll/issue-58053.stderr +++ b/src/test/ui/nll/issue-58053.stderr @@ -1,5 +1,5 @@ error: lifetime may not live long enough - --> $DIR/issue-58053.rs:7:33 + --> $DIR/issue-58053.rs:6:33 | LL | let f = |x: &i32| -> &i32 { x }; | - ---- ^ returning this value requires that `'1` must outlive `'2` @@ -8,7 +8,7 @@ LL | let f = |x: &i32| -> &i32 { x }; | let's call the lifetime of this reference `'1` error: lifetime may not live long enough - --> $DIR/issue-58053.rs:11:25 + --> $DIR/issue-58053.rs:10:25 | LL | let g = |x: &i32| { x }; | - - ^ returning this value requires that `'1` must outlive `'2` diff --git a/src/test/ui/nll/issue-58299.rs b/src/test/ui/nll/issue-58299.rs index 9267cac5dd..3277a9db8e 100644 --- a/src/test/ui/nll/issue-58299.rs +++ b/src/test/ui/nll/issue-58299.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] #![feature(nll)] struct A<'a>(&'a ()); diff --git a/src/test/ui/nll/issue-58299.stderr b/src/test/ui/nll/issue-58299.stderr index 0c69b70a97..aba07542d0 100644 --- a/src/test/ui/nll/issue-58299.stderr +++ b/src/test/ui/nll/issue-58299.stderr @@ -1,5 +1,5 @@ error: lifetime may not live long enough - --> $DIR/issue-58299.rs:17:9 + --> $DIR/issue-58299.rs:16:9 | LL | fn foo<'a>(x: i32) { | -- lifetime `'a` defined here @@ -8,7 +8,7 @@ LL | A::<'a>::X..=A::<'static>::X => (), | ^^^^^^^^^^ requires that `'a` must outlive `'static` error: lifetime may not live long enough - --> $DIR/issue-58299.rs:25:27 + --> $DIR/issue-58299.rs:24:27 | LL | fn bar<'a>(x: i32) { | -- lifetime `'a` defined here diff --git a/src/test/ui/nll/loan_ends_mid_block_pair.rs b/src/test/ui/nll/loan_ends_mid_block_pair.rs index bad214deac..acd6ec7060 100644 --- a/src/test/ui/nll/loan_ends_mid_block_pair.rs +++ b/src/test/ui/nll/loan_ends_mid_block_pair.rs @@ -1,5 +1,3 @@ -// compile-flags:-Zborrowck=compare - #![allow(warnings)] #![feature(rustc_attrs)] @@ -12,12 +10,9 @@ fn nll_fail() { let c = &mut data.0; capitalize(c); data.0 = 'e'; - //~^ ERROR (Ast) [E0506] - //~| ERROR (Mir) [E0506] + //~^ ERROR [E0506] data.0 = 'f'; - //~^ ERROR (Ast) [E0506] data.0 = 'g'; - //~^ ERROR (Ast) [E0506] capitalize(c); } @@ -26,11 +21,8 @@ fn nll_ok() { let c = &mut data.0; capitalize(c); data.0 = 'e'; - //~^ ERROR (Ast) [E0506] data.0 = 'f'; - //~^ ERROR (Ast) [E0506] data.0 = 'g'; - //~^ ERROR (Ast) [E0506] } fn capitalize(_: &mut char) { diff --git a/src/test/ui/nll/loan_ends_mid_block_pair.stderr b/src/test/ui/nll/loan_ends_mid_block_pair.stderr index 85703bda31..eb8442b31d 100644 --- a/src/test/ui/nll/loan_ends_mid_block_pair.stderr +++ b/src/test/ui/nll/loan_ends_mid_block_pair.stderr @@ -1,59 +1,5 @@ -error[E0506]: cannot assign to `data.0` because it is borrowed (Ast) - --> $DIR/loan_ends_mid_block_pair.rs:14:5 - | -LL | let c = &mut data.0; - | ------ borrow of `data.0` occurs here -LL | capitalize(c); -LL | data.0 = 'e'; - | ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here - -error[E0506]: cannot assign to `data.0` because it is borrowed (Ast) - --> $DIR/loan_ends_mid_block_pair.rs:17:5 - | -LL | let c = &mut data.0; - | ------ borrow of `data.0` occurs here -... -LL | data.0 = 'f'; - | ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here - -error[E0506]: cannot assign to `data.0` because it is borrowed (Ast) - --> $DIR/loan_ends_mid_block_pair.rs:19:5 - | -LL | let c = &mut data.0; - | ------ borrow of `data.0` occurs here -... -LL | data.0 = 'g'; - | ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here - -error[E0506]: cannot assign to `data.0` because it is borrowed (Ast) - --> $DIR/loan_ends_mid_block_pair.rs:28:5 - | -LL | let c = &mut data.0; - | ------ borrow of `data.0` occurs here -LL | capitalize(c); -LL | data.0 = 'e'; - | ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here - -error[E0506]: cannot assign to `data.0` because it is borrowed (Ast) - --> $DIR/loan_ends_mid_block_pair.rs:30:5 - | -LL | let c = &mut data.0; - | ------ borrow of `data.0` occurs here -... -LL | data.0 = 'f'; - | ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here - -error[E0506]: cannot assign to `data.0` because it is borrowed (Ast) - --> $DIR/loan_ends_mid_block_pair.rs:32:5 - | -LL | let c = &mut data.0; - | ------ borrow of `data.0` occurs here -... -LL | data.0 = 'g'; - | ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here - -error[E0506]: cannot assign to `data.0` because it is borrowed (Mir) - --> $DIR/loan_ends_mid_block_pair.rs:14:5 +error[E0506]: cannot assign to `data.0` because it is borrowed + --> $DIR/loan_ends_mid_block_pair.rs:12:5 | LL | let c = &mut data.0; | ----------- borrow of `data.0` occurs here @@ -64,6 +10,6 @@ LL | data.0 = 'e'; LL | capitalize(c); | - borrow later used here -error: aborting due to 7 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/nll/loan_ends_mid_block_vec.rs b/src/test/ui/nll/loan_ends_mid_block_vec.rs index 682e7e3e96..2edcdef0af 100644 --- a/src/test/ui/nll/loan_ends_mid_block_vec.rs +++ b/src/test/ui/nll/loan_ends_mid_block_vec.rs @@ -1,5 +1,3 @@ -// compile-flags:-Zborrowck=compare - #![allow(warnings)] #![feature(rustc_attrs)] @@ -11,14 +9,11 @@ fn nll_fail() { let slice = &mut data; capitalize(slice); data.push('d'); - //~^ ERROR (Ast) [E0499] - //~| ERROR (Mir) [E0499] + //~^ ERROR [E0499] data.push('e'); - //~^ ERROR (Ast) [E0499] - //~| ERROR (Mir) [E0499] + //~^ ERROR [E0499] data.push('f'); - //~^ ERROR (Ast) [E0499] - //~| ERROR (Mir) [E0499] + //~^ ERROR [E0499] capitalize(slice); } @@ -27,11 +22,8 @@ fn nll_ok() { let slice = &mut data; capitalize(slice); data.push('d'); - //~^ ERROR (Ast) [E0499] data.push('e'); - //~^ ERROR (Ast) [E0499] data.push('f'); - //~^ ERROR (Ast) [E0499] } fn capitalize(_: &mut [char]) { diff --git a/src/test/ui/nll/loan_ends_mid_block_vec.stderr b/src/test/ui/nll/loan_ends_mid_block_vec.stderr index a3f1391f00..c0b97bea34 100644 --- a/src/test/ui/nll/loan_ends_mid_block_vec.stderr +++ b/src/test/ui/nll/loan_ends_mid_block_vec.stderr @@ -1,77 +1,5 @@ -error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast) - --> $DIR/loan_ends_mid_block_vec.rs:13:5 - | -LL | let slice = &mut data; - | ---- first mutable borrow occurs here -LL | capitalize(slice); -LL | data.push('d'); - | ^^^^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here - -error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast) - --> $DIR/loan_ends_mid_block_vec.rs:16:5 - | -LL | let slice = &mut data; - | ---- first mutable borrow occurs here -... -LL | data.push('e'); - | ^^^^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here - -error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast) - --> $DIR/loan_ends_mid_block_vec.rs:19:5 - | -LL | let slice = &mut data; - | ---- first mutable borrow occurs here -... -LL | data.push('f'); - | ^^^^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here - -error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast) - --> $DIR/loan_ends_mid_block_vec.rs:29:5 - | -LL | let slice = &mut data; - | ---- first mutable borrow occurs here -LL | capitalize(slice); -LL | data.push('d'); - | ^^^^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here - -error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast) - --> $DIR/loan_ends_mid_block_vec.rs:31:5 - | -LL | let slice = &mut data; - | ---- first mutable borrow occurs here -... -LL | data.push('e'); - | ^^^^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here - -error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast) - --> $DIR/loan_ends_mid_block_vec.rs:33:5 - | -LL | let slice = &mut data; - | ---- first mutable borrow occurs here -... -LL | data.push('f'); - | ^^^^ second mutable borrow occurs here -LL | -LL | } - | - first borrow ends here - -error[E0499]: cannot borrow `data` as mutable more than once at a time (Mir) - --> $DIR/loan_ends_mid_block_vec.rs:13:5 +error[E0499]: cannot borrow `data` as mutable more than once at a time + --> $DIR/loan_ends_mid_block_vec.rs:11:5 | LL | let slice = &mut data; | --------- first mutable borrow occurs here @@ -82,8 +10,8 @@ LL | data.push('d'); LL | capitalize(slice); | ----- first borrow later used here -error[E0499]: cannot borrow `data` as mutable more than once at a time (Mir) - --> $DIR/loan_ends_mid_block_vec.rs:16:5 +error[E0499]: cannot borrow `data` as mutable more than once at a time + --> $DIR/loan_ends_mid_block_vec.rs:13:5 | LL | let slice = &mut data; | --------- first mutable borrow occurs here @@ -94,18 +22,18 @@ LL | data.push('e'); LL | capitalize(slice); | ----- first borrow later used here -error[E0499]: cannot borrow `data` as mutable more than once at a time (Mir) - --> $DIR/loan_ends_mid_block_vec.rs:19:5 +error[E0499]: cannot borrow `data` as mutable more than once at a time + --> $DIR/loan_ends_mid_block_vec.rs:15:5 | LL | let slice = &mut data; | --------- first mutable borrow occurs here ... LL | data.push('f'); | ^^^^ second mutable borrow occurs here -... +LL | LL | capitalize(slice); | ----- first borrow later used here -error: aborting due to 9 previous errors +error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/nll/local-outlives-static-via-hrtb.rs b/src/test/ui/nll/local-outlives-static-via-hrtb.rs new file mode 100644 index 0000000000..5f1f9b3a7f --- /dev/null +++ b/src/test/ui/nll/local-outlives-static-via-hrtb.rs @@ -0,0 +1,26 @@ +// Test that we handle the case when a local variable is borrowed for `'static` +// due to an outlives constraint involving a region in an incompatible universe + +pub trait Outlives<'this> {} + +impl<'this, T> Outlives<'this> for T where T: 'this {} +trait Reference { + type AssociatedType; +} + +impl<'a, T: 'a> Reference for &'a T { + type AssociatedType = &'a (); +} + +fn assert_static_via_hrtb(_: G) where for<'a> G: Outlives<'a> {} + +fn assert_static_via_hrtb_with_assoc_type(_: &'_ T) +where + for<'a> &'a T: Reference, +{} + +fn main() { + let local = 0; + assert_static_via_hrtb(&local); //~ ERROR `local` does not live long enough + assert_static_via_hrtb_with_assoc_type(&&local); //~ ERROR `local` does not live long enough +} diff --git a/src/test/ui/nll/local-outlives-static-via-hrtb.stderr b/src/test/ui/nll/local-outlives-static-via-hrtb.stderr new file mode 100644 index 0000000000..61009da49f --- /dev/null +++ b/src/test/ui/nll/local-outlives-static-via-hrtb.stderr @@ -0,0 +1,26 @@ +error[E0597]: `local` does not live long enough + --> $DIR/local-outlives-static-via-hrtb.rs:24:28 + | +LL | assert_static_via_hrtb(&local); + | -----------------------^^^^^^- + | | | + | | borrowed value does not live long enough + | argument requires that `local` is borrowed for `'static` +LL | assert_static_via_hrtb_with_assoc_type(&&local); +LL | } + | - `local` dropped here while still borrowed + +error[E0597]: `local` does not live long enough + --> $DIR/local-outlives-static-via-hrtb.rs:25:45 + | +LL | assert_static_via_hrtb_with_assoc_type(&&local); + | ----------------------------------------^^^^^^- + | | | + | | borrowed value does not live long enough + | argument requires that `local` is borrowed for `'static` +LL | } + | - `local` dropped here while still borrowed + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/nll/match-cfg-fake-edges.stderr b/src/test/ui/nll/match-cfg-fake-edges.stderr index 72c6a6cd42..d37c52444a 100644 --- a/src/test/ui/nll/match-cfg-fake-edges.stderr +++ b/src/test/ui/nll/match-cfg-fake-edges.stderr @@ -30,5 +30,5 @@ LL | r; error: aborting due to 3 previous errors -Some errors occurred: E0381, E0382, E0503. +Some errors have detailed explanations: E0381, E0382, E0503. For more information about an error, try `rustc --explain E0381`. diff --git a/src/test/ui/nll/match-guards-always-borrow.ast.nll.stderr b/src/test/ui/nll/match-guards-always-borrow.ast.nll.stderr deleted file mode 100644 index 82a30db153..0000000000 --- a/src/test/ui/nll/match-guards-always-borrow.ast.nll.stderr +++ /dev/null @@ -1,22 +0,0 @@ -warning[E0507]: cannot move out of borrowed content - --> $DIR/match-guards-always-borrow.rs:13:13 - | -LL | (|| { let bar = foo; bar.take() })(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content - | - = warning: this error has been downgraded to a warning for backwards compatibility with previous releases - = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future - -error: compilation successful - --> $DIR/match-guards-always-borrow.rs:47:1 - | -LL | / fn main() { -LL | | should_reject_destructive_mutate_in_guard(); -LL | | allow_mutate_in_arm_body(); -LL | | allow_move_into_arm_body(); -LL | | } - | |_^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/nll/match-guards-always-borrow.ast.stderr b/src/test/ui/nll/match-guards-always-borrow.ast.stderr deleted file mode 100644 index 0c08f20602..0000000000 --- a/src/test/ui/nll/match-guards-always-borrow.ast.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: compilation successful - --> $DIR/match-guards-always-borrow.rs:47:1 - | -LL | / fn main() { -LL | | should_reject_destructive_mutate_in_guard(); -LL | | allow_mutate_in_arm_body(); -LL | | allow_move_into_arm_body(); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/nll/match-guards-always-borrow.rs b/src/test/ui/nll/match-guards-always-borrow.rs index ec4eed6797..5900dc3ade 100644 --- a/src/test/ui/nll/match-guards-always-borrow.rs +++ b/src/test/ui/nll/match-guards-always-borrow.rs @@ -1,7 +1,4 @@ -//revisions: ast mir -//[mir] compile-flags: -Z borrowck=mir - -#![feature(rustc_attrs)] +#![feature(nll)] // Here is arielb1's basic example from rust-lang/rust#27282 // that AST borrowck is flummoxed by: @@ -11,7 +8,7 @@ fn should_reject_destructive_mutate_in_guard() { None => {}, ref mut foo if { (|| { let bar = foo; bar.take() })(); - //[mir]~^ ERROR cannot move out of borrowed content [E0507] + //~^ ERROR cannot move out of borrowed content [E0507] false } => { }, Some(s) => std::process::exit(*s), } @@ -39,12 +36,7 @@ fn allow_move_into_arm_body() { } } -// Since this is a compile-fail test that is explicitly encoding the -// different behavior of AST- vs MIR-borrowck where AST-borrowck does -// not error, we need to use rustc_error to placate the test harness -// that wants *some* error to occur. -#[rustc_error] -fn main() { //[ast]~ ERROR compilation successful +fn main() { should_reject_destructive_mutate_in_guard(); allow_mutate_in_arm_body(); allow_move_into_arm_body(); diff --git a/src/test/ui/nll/match-guards-always-borrow.mir.stderr b/src/test/ui/nll/match-guards-always-borrow.stderr similarity index 86% rename from src/test/ui/nll/match-guards-always-borrow.mir.stderr rename to src/test/ui/nll/match-guards-always-borrow.stderr index 3e90c5a154..2492397c65 100644 --- a/src/test/ui/nll/match-guards-always-borrow.mir.stderr +++ b/src/test/ui/nll/match-guards-always-borrow.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of borrowed content - --> $DIR/match-guards-always-borrow.rs:13:13 + --> $DIR/match-guards-always-borrow.rs:10:13 | LL | (|| { let bar = foo; bar.take() })(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content diff --git a/src/test/ui/nll/match-guards-partially-borrow.stderr b/src/test/ui/nll/match-guards-partially-borrow.stderr index a646b7d84b..3d9b67b4ea 100644 --- a/src/test/ui/nll/match-guards-partially-borrow.stderr +++ b/src/test/ui/nll/match-guards-partially-borrow.stderr @@ -83,5 +83,5 @@ LL | b = &true; error: aborting due to 9 previous errors -Some errors occurred: E0506, E0510. +Some errors have detailed explanations: E0506, E0510. For more information about an error, try `rustc --explain E0506`. diff --git a/src/test/ui/nll/match-on-borrowed.stderr b/src/test/ui/nll/match-on-borrowed.stderr index e8db0626a7..9f804dfb3d 100644 --- a/src/test/ui/nll/match-on-borrowed.stderr +++ b/src/test/ui/nll/match-on-borrowed.stderr @@ -42,5 +42,5 @@ LL | match n {} error: aborting due to 4 previous errors -Some errors occurred: E0381, E0503. +Some errors have detailed explanations: E0381, E0503. For more information about an error, try `rustc --explain E0381`. diff --git a/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.rs b/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.rs index 5b609820a2..1de32ddf53 100644 --- a/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.rs +++ b/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.rs @@ -1,6 +1,3 @@ -#![allow(warnings)] -#![feature(nll)] - struct Wrap<'p> { p: &'p mut i32 } impl<'p> Drop for Wrap<'p> { diff --git a/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr b/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr index e7755bdb89..80e2978074 100644 --- a/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr +++ b/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr @@ -1,5 +1,5 @@ error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/maybe-initialized-drop-implicit-fragment-drop.rs:20:5 + --> $DIR/maybe-initialized-drop-implicit-fragment-drop.rs:17:5 | LL | let wrap = Wrap { p: &mut x }; | ------ borrow of `x` occurs here diff --git a/src/test/ui/nll/move-errors.rs b/src/test/ui/nll/move-errors.rs index a341637370..e0fcd62503 100644 --- a/src/test/ui/nll/move-errors.rs +++ b/src/test/ui/nll/move-errors.rs @@ -1,6 +1,3 @@ -#![allow(unused)] -#![feature(nll)] - struct A(String); struct C(D); diff --git a/src/test/ui/nll/move-errors.stderr b/src/test/ui/nll/move-errors.stderr index f329748139..a4af11e3d4 100644 --- a/src/test/ui/nll/move-errors.stderr +++ b/src/test/ui/nll/move-errors.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of borrowed content - --> $DIR/move-errors.rs:9:13 + --> $DIR/move-errors.rs:6:13 | LL | let b = *a; | ^^ @@ -8,7 +8,7 @@ LL | let b = *a; | help: consider removing the `*`: `a` error[E0508]: cannot move out of type `[A; 1]`, a non-copy array - --> $DIR/move-errors.rs:15:13 + --> $DIR/move-errors.rs:12:13 | LL | let b = a[0]; | ^^^^ @@ -17,7 +17,7 @@ LL | let b = a[0]; | help: consider borrowing here: `&a[0]` error[E0507]: cannot move out of borrowed content - --> $DIR/move-errors.rs:22:13 + --> $DIR/move-errors.rs:19:13 | LL | let s = **r; | ^^^ @@ -26,7 +26,7 @@ LL | let s = **r; | help: consider removing the `*`: `*r` error[E0507]: cannot move out of an `Rc` - --> $DIR/move-errors.rs:30:13 + --> $DIR/move-errors.rs:27:13 | LL | let s = *r; | ^^ @@ -35,7 +35,7 @@ LL | let s = *r; | help: consider removing the `*`: `r` error[E0508]: cannot move out of type `[A; 1]`, a non-copy array - --> $DIR/move-errors.rs:35:13 + --> $DIR/move-errors.rs:32:13 | LL | let a = [A("".to_string())][0]; | ^^^^^^^^^^^^^^^^^^^^^^ @@ -44,7 +44,7 @@ LL | let a = [A("".to_string())][0]; | help: consider borrowing here: `&[A("".to_string())][0]` error[E0507]: cannot move out of borrowed content - --> $DIR/move-errors.rs:41:16 + --> $DIR/move-errors.rs:38:16 | LL | let A(s) = *a; | - ^^ @@ -54,13 +54,13 @@ LL | let A(s) = *a; | data moved here | note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/move-errors.rs:41:11 + --> $DIR/move-errors.rs:38:11 | LL | let A(s) = *a; | ^ error[E0509]: cannot move out of type `D`, which implements the `Drop` trait - --> $DIR/move-errors.rs:47:19 + --> $DIR/move-errors.rs:44:19 | LL | let C(D(s)) = c; | - ^ cannot move out of here @@ -68,19 +68,19 @@ LL | let C(D(s)) = c; | data moved here | note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/move-errors.rs:47:13 + --> $DIR/move-errors.rs:44:13 | LL | let C(D(s)) = c; | ^ error[E0507]: cannot move out of borrowed content - --> $DIR/move-errors.rs:54:9 + --> $DIR/move-errors.rs:51:9 | LL | b = *a; | ^^ cannot move out of borrowed content error[E0508]: cannot move out of type `[B; 1]`, a non-copy array - --> $DIR/move-errors.rs:77:11 + --> $DIR/move-errors.rs:74:11 | LL | match x[0] { | ^^^^ @@ -94,7 +94,7 @@ LL | B::V(s) => (), | - ...and here | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/move-errors.rs:79:14 + --> $DIR/move-errors.rs:76:14 | LL | B::U(d) => (), | ^ @@ -102,7 +102,7 @@ LL | B::V(s) => (), | ^ error[E0509]: cannot move out of type `D`, which implements the `Drop` trait - --> $DIR/move-errors.rs:86:11 + --> $DIR/move-errors.rs:83:11 | LL | match x { | ^ cannot move out of here @@ -111,13 +111,13 @@ LL | B::U(D(s)) => (), | - data moved here | note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/move-errors.rs:89:16 + --> $DIR/move-errors.rs:86:16 | LL | B::U(D(s)) => (), | ^ error[E0509]: cannot move out of type `D`, which implements the `Drop` trait - --> $DIR/move-errors.rs:95:11 + --> $DIR/move-errors.rs:92:11 | LL | match x { | ^ cannot move out of here @@ -126,13 +126,13 @@ LL | (D(s), &t) => (), | - data moved here | note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/move-errors.rs:98:12 + --> $DIR/move-errors.rs:95:12 | LL | (D(s), &t) => (), | ^ error[E0507]: cannot move out of borrowed content - --> $DIR/move-errors.rs:95:11 + --> $DIR/move-errors.rs:92:11 | LL | match x { | ^ cannot move out of borrowed content @@ -141,13 +141,13 @@ LL | (D(s), &t) => (), | - data moved here | note: move occurs because `t` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/move-errors.rs:98:17 + --> $DIR/move-errors.rs:95:17 | LL | (D(s), &t) => (), | ^ error[E0509]: cannot move out of type `F`, which implements the `Drop` trait - --> $DIR/move-errors.rs:105:11 + --> $DIR/move-errors.rs:102:11 | LL | match x { | ^ cannot move out of here @@ -158,13 +158,13 @@ LL | F(s, mut t) => (), | data moved here | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/move-errors.rs:107:11 + --> $DIR/move-errors.rs:104:11 | LL | F(s, mut t) => (), | ^ ^^^^^ error[E0507]: cannot move out of borrowed content - --> $DIR/move-errors.rs:113:11 + --> $DIR/move-errors.rs:110:11 | LL | match *x { | ^^ @@ -176,12 +176,12 @@ LL | Ok(s) | Err(s) => (), | - data moved here | note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait - --> $DIR/move-errors.rs:115:12 + --> $DIR/move-errors.rs:112:12 | LL | Ok(s) | Err(s) => (), | ^ error: aborting due to 14 previous errors -Some errors occurred: E0507, E0508, E0509. +Some errors have detailed explanations: E0507, E0508, E0509. For more information about an error, try `rustc --explain E0507`. diff --git a/src/test/ui/nll/move-subpaths-moves-root.rs b/src/test/ui/nll/move-subpaths-moves-root.rs index 72a36ef22d..e7caf89e78 100644 --- a/src/test/ui/nll/move-subpaths-moves-root.rs +++ b/src/test/ui/nll/move-subpaths-moves-root.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - fn main() { let x = (vec![1, 2, 3], ); drop(x.0); diff --git a/src/test/ui/nll/move-subpaths-moves-root.stderr b/src/test/ui/nll/move-subpaths-moves-root.stderr index bdbc25e9ee..7030d5b330 100644 --- a/src/test/ui/nll/move-subpaths-moves-root.stderr +++ b/src/test/ui/nll/move-subpaths-moves-root.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `x` - --> $DIR/move-subpaths-moves-root.rs:6:10 + --> $DIR/move-subpaths-moves-root.rs:4:10 | LL | drop(x.0); | --- value moved here diff --git a/src/test/ui/nll/normalization-bounds-error.rs b/src/test/ui/nll/normalization-bounds-error.rs index d6610e1582..b6cfcd9873 100644 --- a/src/test/ui/nll/normalization-bounds-error.rs +++ b/src/test/ui/nll/normalization-bounds-error.rs @@ -1,7 +1,6 @@ // Check that we error when a bound from the impl is not satisfied when // normalizing an associated type. -#![feature(nll)] trait Visitor<'d> { type Value; } diff --git a/src/test/ui/nll/normalization-bounds-error.stderr b/src/test/ui/nll/normalization-bounds-error.stderr index cd88ceb16d..951e73e7fd 100644 --- a/src/test/ui/nll/normalization-bounds-error.stderr +++ b/src/test/ui/nll/normalization-bounds-error.stderr @@ -1,16 +1,16 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'d` due to conflicting requirements - --> $DIR/normalization-bounds-error.rs:13:1 + --> $DIR/normalization-bounds-error.rs:12:1 | LL | fn visit_seq<'d, 'a: 'd>() -> <&'a () as Visitor<'d>>::Value {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -note: first, the lifetime cannot outlive the lifetime 'd as defined on the function body at 13:14... - --> $DIR/normalization-bounds-error.rs:13:14 +note: first, the lifetime cannot outlive the lifetime 'd as defined on the function body at 12:14... + --> $DIR/normalization-bounds-error.rs:12:14 | LL | fn visit_seq<'d, 'a: 'd>() -> <&'a () as Visitor<'d>>::Value {} | ^^ -note: ...but the lifetime must also be valid for the lifetime 'a as defined on the function body at 13:18... - --> $DIR/normalization-bounds-error.rs:13:18 +note: ...but the lifetime must also be valid for the lifetime 'a as defined on the function body at 12:18... + --> $DIR/normalization-bounds-error.rs:12:18 | LL | fn visit_seq<'d, 'a: 'd>() -> <&'a () as Visitor<'d>>::Value {} | ^^ @@ -20,4 +20,3 @@ LL | fn visit_seq<'d, 'a: 'd>() -> <&'a () as Visitor<'d>>::Value {} error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/nll/normalization-bounds.rs b/src/test/ui/nll/normalization-bounds.rs index ebc19d7cc8..5d2825ef2d 100644 --- a/src/test/ui/nll/normalization-bounds.rs +++ b/src/test/ui/nll/normalization-bounds.rs @@ -2,7 +2,6 @@ //run-pass -#![feature(nll)] trait Visitor<'d> { type Value; } diff --git a/src/test/ui/nll/polonius-smoke-test.stderr b/src/test/ui/nll/polonius-smoke-test.stderr index fb3e9cfd25..dbc5b7a019 100644 --- a/src/test/ui/nll/polonius-smoke-test.stderr +++ b/src/test/ui/nll/polonius-smoke-test.stderr @@ -37,5 +37,5 @@ LL | tmp; error: aborting due to 4 previous errors -Some errors occurred: E0503, E0505, E0515. +Some errors have detailed explanations: E0503, E0505, E0515. For more information about an error, try `rustc --explain E0503`. diff --git a/src/test/ui/nll/projection-return.rs b/src/test/ui/nll/projection-return.rs index b2c9a087e0..fdf3f59484 100644 --- a/src/test/ui/nll/projection-return.rs +++ b/src/test/ui/nll/projection-return.rs @@ -16,4 +16,3 @@ fn foo() -> <() as Foo>::Bar { } fn main() { } - diff --git a/src/test/ui/nll/promotable-mutable-zst-doesnt-conflict.rs b/src/test/ui/nll/promotable-mutable-zst-doesnt-conflict.rs index 061d0d69d0..6d5bdfa4da 100644 --- a/src/test/ui/nll/promotable-mutable-zst-doesnt-conflict.rs +++ b/src/test/ui/nll/promotable-mutable-zst-doesnt-conflict.rs @@ -3,8 +3,6 @@ // run-pass -#![feature(nll)] - pub fn main() { let mut x: Vec<&[i32; 0]> = Vec::new(); for i in 0..10 { diff --git a/src/test/ui/nll/promoted-bounds.rs b/src/test/ui/nll/promoted-bounds.rs index 59b21cf9ac..5f95ae13c5 100644 --- a/src/test/ui/nll/promoted-bounds.rs +++ b/src/test/ui/nll/promoted-bounds.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - fn shorten_lifetime<'a, 'b, 'min>(a: &'a i32, b: &'b i32) -> &'min i32 where 'a: 'min, diff --git a/src/test/ui/nll/promoted-bounds.stderr b/src/test/ui/nll/promoted-bounds.stderr index de185cc0d2..df347f4e7f 100644 --- a/src/test/ui/nll/promoted-bounds.stderr +++ b/src/test/ui/nll/promoted-bounds.stderr @@ -1,5 +1,5 @@ error[E0597]: `l` does not live long enough - --> $DIR/promoted-bounds.rs:21:17 + --> $DIR/promoted-bounds.rs:19:17 | LL | let ptr = { | --- borrow later stored here diff --git a/src/test/ui/nll/promoted-closure-pair.rs b/src/test/ui/nll/promoted-closure-pair.rs index 7b3bbad4c1..cc9f17fd4e 100644 --- a/src/test/ui/nll/promoted-closure-pair.rs +++ b/src/test/ui/nll/promoted-closure-pair.rs @@ -1,7 +1,5 @@ // Check that we handle multiple closures in the same promoted constant. -#![feature(nll)] - fn foo() -> &'static i32 { let z = 0; let p = &(|y| y, |y| y); diff --git a/src/test/ui/nll/promoted-closure-pair.stderr b/src/test/ui/nll/promoted-closure-pair.stderr index b04d1a9ccb..000bdf8580 100644 --- a/src/test/ui/nll/promoted-closure-pair.stderr +++ b/src/test/ui/nll/promoted-closure-pair.stderr @@ -1,5 +1,5 @@ error[E0515]: cannot return value referencing local variable `z` - --> $DIR/promoted-closure-pair.rs:9:5 + --> $DIR/promoted-closure-pair.rs:7:5 | LL | p.1(&z) | ^^^^--^ diff --git a/src/test/ui/nll/reference-carried-through-struct-field.ast.stderr b/src/test/ui/nll/reference-carried-through-struct-field.ast.stderr deleted file mode 100644 index 3104944339..0000000000 --- a/src/test/ui/nll/reference-carried-through-struct-field.ast.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0506]: cannot assign to `x` because it is borrowed - --> $DIR/reference-carried-through-struct-field.rs:11:5 - | -LL | let wrapper = Wrap { w: &mut x }; - | - borrow of `x` occurs here -LL | x += 1; - | ^^^^^^ assignment to borrowed `x` occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/nll/reference-carried-through-struct-field.mir.stderr b/src/test/ui/nll/reference-carried-through-struct-field.mir.stderr deleted file mode 100644 index 1f6eb9a06b..0000000000 --- a/src/test/ui/nll/reference-carried-through-struct-field.mir.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/reference-carried-through-struct-field.rs:11:5 - | -LL | let wrapper = Wrap { w: &mut x }; - | ------ borrow of `x` occurs here -LL | x += 1; - | ^^^^^^ use of borrowed `x` -LL | -LL | *wrapper.w += 1; - | --------------- borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0503`. diff --git a/src/test/ui/nll/reference-carried-through-struct-field.rs b/src/test/ui/nll/reference-carried-through-struct-field.rs index f7903cba6a..effd610849 100644 --- a/src/test/ui/nll/reference-carried-through-struct-field.rs +++ b/src/test/ui/nll/reference-carried-through-struct-field.rs @@ -1,15 +1,9 @@ -//revisions: ast mir -//[mir] compile-flags: -Z borrowck=mir - -#![allow(unused_assignments)] - struct Wrap<'a> { w: &'a mut u32 } fn foo() { let mut x = 22; let wrapper = Wrap { w: &mut x }; - x += 1; //[ast]~ ERROR cannot assign to `x` because it is borrowed [E0506] - //[mir]~^ ERROR cannot use `x` because it was mutably borrowed [E0503] + x += 1; //~ ERROR cannot use `x` because it was mutably borrowed [E0503] *wrapper.w += 1; } diff --git a/src/test/ui/nll/reference-carried-through-struct-field.ast.nll.stderr b/src/test/ui/nll/reference-carried-through-struct-field.stderr similarity index 86% rename from src/test/ui/nll/reference-carried-through-struct-field.ast.nll.stderr rename to src/test/ui/nll/reference-carried-through-struct-field.stderr index 1f6eb9a06b..56d878e430 100644 --- a/src/test/ui/nll/reference-carried-through-struct-field.ast.nll.stderr +++ b/src/test/ui/nll/reference-carried-through-struct-field.stderr @@ -1,11 +1,10 @@ error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/reference-carried-through-struct-field.rs:11:5 + --> $DIR/reference-carried-through-struct-field.rs:6:5 | LL | let wrapper = Wrap { w: &mut x }; | ------ borrow of `x` occurs here LL | x += 1; | ^^^^^^ use of borrowed `x` -LL | LL | *wrapper.w += 1; | --------------- borrow later used here diff --git a/src/test/ui/nll/region-ends-after-if-condition.nll.stderr b/src/test/ui/nll/region-ends-after-if-condition.nll.stderr new file mode 100644 index 0000000000..322930984a --- /dev/null +++ b/src/test/ui/nll/region-ends-after-if-condition.nll.stderr @@ -0,0 +1,15 @@ +error[E0502]: cannot borrow `my_struct.field` as mutable because it is also borrowed as immutable + --> $DIR/region-ends-after-if-condition.rs:26:9 + | +LL | let value = &my_struct.field; + | ---------------- immutable borrow occurs here +LL | if value.is_empty() { +LL | my_struct.field.push_str("Hello, world!"); + | ^^^^^^^^^^^^^^^ mutable borrow occurs here +... +LL | drop(value); + | ----- immutable borrow later used here + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/nll/region-ends-after-if-condition.rs b/src/test/ui/nll/region-ends-after-if-condition.rs index 1bf13a91b9..f67de03caf 100644 --- a/src/test/ui/nll/region-ends-after-if-condition.rs +++ b/src/test/ui/nll/region-ends-after-if-condition.rs @@ -2,8 +2,6 @@ // in the type of `p` includes the points after `&v[0]` up to (but not // including) the call to `use_x`. The `else` branch is not included. -// compile-flags:-Zborrowck=compare - #![allow(warnings)] #![feature(rustc_attrs)] @@ -17,7 +15,6 @@ fn foo1() { let value = &my_struct.field; if value.is_empty() { my_struct.field.push_str("Hello, world!"); - //~^ ERROR (Ast) [E0502] } } @@ -27,8 +24,7 @@ fn foo2() { let value = &my_struct.field; if value.is_empty() { my_struct.field.push_str("Hello, world!"); - //~^ ERROR (Ast) [E0502] - //~| ERROR (Mir) [E0502] + //~^ ERROR [E0502] } drop(value); } diff --git a/src/test/ui/nll/region-ends-after-if-condition.stderr b/src/test/ui/nll/region-ends-after-if-condition.stderr index aa876a0bcb..c03e385790 100644 --- a/src/test/ui/nll/region-ends-after-if-condition.stderr +++ b/src/test/ui/nll/region-ends-after-if-condition.stderr @@ -1,39 +1,15 @@ -error[E0502]: cannot borrow `my_struct.field` as mutable because it is also borrowed as immutable (Ast) - --> $DIR/region-ends-after-if-condition.rs:19:9 - | -LL | let value = &my_struct.field; - | --------------- immutable borrow occurs here -LL | if value.is_empty() { -LL | my_struct.field.push_str("Hello, world!"); - | ^^^^^^^^^^^^^^^ mutable borrow occurs here -... -LL | } - | - immutable borrow ends here - -error[E0502]: cannot borrow `my_struct.field` as mutable because it is also borrowed as immutable (Ast) - --> $DIR/region-ends-after-if-condition.rs:29:9 - | -LL | let value = &my_struct.field; - | --------------- immutable borrow occurs here -LL | if value.is_empty() { -LL | my_struct.field.push_str("Hello, world!"); - | ^^^^^^^^^^^^^^^ mutable borrow occurs here -... -LL | } - | - immutable borrow ends here - -error[E0502]: cannot borrow `my_struct.field` as mutable because it is also borrowed as immutable (Mir) - --> $DIR/region-ends-after-if-condition.rs:29:9 +error[E0502]: cannot borrow `my_struct.field` as mutable because it is also borrowed as immutable + --> $DIR/region-ends-after-if-condition.rs:26:9 | LL | let value = &my_struct.field; | ---------------- immutable borrow occurs here LL | if value.is_empty() { LL | my_struct.field.push_str("Hello, world!"); - | ^^^^^^^^^^^^^^^ mutable borrow occurs here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here ... LL | drop(value); | ----- immutable borrow later used here -error: aborting due to 3 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/nll/relate_tys/issue-48071.rs b/src/test/ui/nll/relate_tys/issue-48071.rs index 9b8ac16746..7298762984 100644 --- a/src/test/ui/nll/relate_tys/issue-48071.rs +++ b/src/test/ui/nll/relate_tys/issue-48071.rs @@ -6,10 +6,6 @@ // // compile-pass -#![allow(warnings)] -#![feature(dyn_trait)] -#![feature(nll)] - trait Foo { fn foo(&self) { } } diff --git a/src/test/ui/nll/relate_tys/var-appears-twice.rs b/src/test/ui/nll/relate_tys/var-appears-twice.rs index 2f227c8725..77129f4468 100644 --- a/src/test/ui/nll/relate_tys/var-appears-twice.rs +++ b/src/test/ui/nll/relate_tys/var-appears-twice.rs @@ -2,9 +2,6 @@ // function returning always its first argument can be upcast to one // that returns either first or second argument. -#![feature(nll)] -#![allow(warnings)] - use std::cell::Cell; type DoubleCell = Cell<(A, A)>; diff --git a/src/test/ui/nll/relate_tys/var-appears-twice.stderr b/src/test/ui/nll/relate_tys/var-appears-twice.stderr index 7c078d226d..d032ce6f21 100644 --- a/src/test/ui/nll/relate_tys/var-appears-twice.stderr +++ b/src/test/ui/nll/relate_tys/var-appears-twice.stderr @@ -1,5 +1,5 @@ error[E0597]: `b` does not live long enough - --> $DIR/var-appears-twice.rs:23:38 + --> $DIR/var-appears-twice.rs:20:38 | LL | let x: DoubleCell<_> = make_cell(&b); | ------------- ^^ borrowed value does not live long enough diff --git a/src/test/ui/nll/return-ref-mut-issue-46557.rs b/src/test/ui/nll/return-ref-mut-issue-46557.rs index b535ab1f5e..dca61d39df 100644 --- a/src/test/ui/nll/return-ref-mut-issue-46557.rs +++ b/src/test/ui/nll/return-ref-mut-issue-46557.rs @@ -1,8 +1,5 @@ // Regression test for issue #46557 -#![feature(nll)] -#![allow(dead_code)] - fn gimme_static_mut() -> &'static mut u32 { let ref mut x = 1234543; x //~ ERROR cannot return value referencing temporary value [E0515] diff --git a/src/test/ui/nll/return-ref-mut-issue-46557.stderr b/src/test/ui/nll/return-ref-mut-issue-46557.stderr index cc201136ff..720440a0ae 100644 --- a/src/test/ui/nll/return-ref-mut-issue-46557.stderr +++ b/src/test/ui/nll/return-ref-mut-issue-46557.stderr @@ -1,5 +1,5 @@ error[E0515]: cannot return value referencing temporary value - --> $DIR/return-ref-mut-issue-46557.rs:8:5 + --> $DIR/return-ref-mut-issue-46557.rs:5:5 | LL | let ref mut x = 1234543; | ------- temporary value created here diff --git a/src/test/ui/nll/return_from_loop.rs b/src/test/ui/nll/return_from_loop.rs index 23a1e0b816..4954108940 100644 --- a/src/test/ui/nll/return_from_loop.rs +++ b/src/test/ui/nll/return_from_loop.rs @@ -2,8 +2,6 @@ // in the type of `p` includes the points after `&v[0]` up to (but not // including) the call to `use_x`. The `else` branch is not included. -// compile-flags:-Zborrowck=compare - #![allow(warnings)] #![feature(rustc_attrs)] @@ -20,8 +18,7 @@ fn nll_fail() { let value = &mut my_struct.field; loop { my_struct.field.push_str("Hello, world!"); - //~^ ERROR (Ast) [E0499] - //~| ERROR (Mir) [E0499] + //~^ ERROR [E0499] value.len(); return; } @@ -33,7 +30,6 @@ fn nll_ok() { let value = &mut my_struct.field; loop { my_struct.field.push_str("Hello, world!"); - //~^ ERROR (Ast) [E0499] return; } } diff --git a/src/test/ui/nll/return_from_loop.stderr b/src/test/ui/nll/return_from_loop.stderr index 09882d55cb..efd56ea2dd 100644 --- a/src/test/ui/nll/return_from_loop.stderr +++ b/src/test/ui/nll/return_from_loop.stderr @@ -1,39 +1,15 @@ -error[E0499]: cannot borrow `my_struct.field` as mutable more than once at a time (Ast) - --> $DIR/return_from_loop.rs:22:9 - | -LL | let value = &mut my_struct.field; - | --------------- first mutable borrow occurs here -LL | loop { -LL | my_struct.field.push_str("Hello, world!"); - | ^^^^^^^^^^^^^^^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here - -error[E0499]: cannot borrow `my_struct.field` as mutable more than once at a time (Ast) - --> $DIR/return_from_loop.rs:35:9 - | -LL | let value = &mut my_struct.field; - | --------------- first mutable borrow occurs here -LL | loop { -LL | my_struct.field.push_str("Hello, world!"); - | ^^^^^^^^^^^^^^^ second mutable borrow occurs here -... -LL | } - | - first borrow ends here - -error[E0499]: cannot borrow `my_struct.field` as mutable more than once at a time (Mir) - --> $DIR/return_from_loop.rs:22:9 +error[E0499]: cannot borrow `my_struct.field` as mutable more than once at a time + --> $DIR/return_from_loop.rs:20:9 | LL | let value = &mut my_struct.field; | -------------------- first mutable borrow occurs here LL | loop { LL | my_struct.field.push_str("Hello, world!"); | ^^^^^^^^^^^^^^^ second mutable borrow occurs here -... +LL | LL | value.len(); | ----- first borrow later used here -error: aborting due to 3 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/nll/ty-outlives/issue-53789-1.rs b/src/test/ui/nll/ty-outlives/issue-53789-1.rs index 593cdfdbf7..dc67c1a68a 100644 --- a/src/test/ui/nll/ty-outlives/issue-53789-1.rs +++ b/src/test/ui/nll/ty-outlives/issue-53789-1.rs @@ -2,9 +2,6 @@ // // compile-pass -#![feature(nll)] -#![allow(unused_variables)] - use std::collections::BTreeMap; trait ValueTree { @@ -88,4 +85,3 @@ fn any_with<'a, A: Arbitrary<'a>>(args: A::Parameters) -> StrategyType<'a, A> { } fn main() { } - diff --git a/src/test/ui/nll/ty-outlives/issue-53789-2.rs b/src/test/ui/nll/ty-outlives/issue-53789-2.rs index 62e2833aa1..1b80be2eaf 100644 --- a/src/test/ui/nll/ty-outlives/issue-53789-2.rs +++ b/src/test/ui/nll/ty-outlives/issue-53789-2.rs @@ -2,9 +2,6 @@ // // compile-pass -#![feature(nll)] -#![allow(unused_variables)] - use std::collections::BTreeMap; use std::ops::Range; use std::cmp::Ord; @@ -248,4 +245,3 @@ mod statics { } fn main() { } - diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr index cda1f7d363..9fa54e8381 100644 --- a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr @@ -4,7 +4,7 @@ note: External requirements LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:15 ~ projection_no_regions_closure[317d]::no_region[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:22 ~ projection_no_regions_closure[317d]::no_region[0]::{{closure}}[0]) with closure substs [ '_#1r, T, i32, @@ -25,7 +25,7 @@ LL | | LL | | } | |_^ | - = note: defining type: DefId(0/0:6 ~ projection_no_regions_closure[317d]::no_region[0]) with substs [ + = note: defining type: DefId(0:19 ~ projection_no_regions_closure[317d]::no_region[0]) with substs [ '_#1r, T, ] @@ -44,7 +44,7 @@ note: External requirements LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:18 ~ projection_no_regions_closure[317d]::correct_region[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:26 ~ projection_no_regions_closure[317d]::correct_region[0]::{{closure}}[0]) with closure substs [ '_#1r, T, i32, @@ -64,7 +64,7 @@ LL | | with_signature(x, |mut y| Box::new(y.next())) LL | | } | |_^ | - = note: defining type: DefId(0/0:7 ~ projection_no_regions_closure[317d]::correct_region[0]) with substs [ + = note: defining type: DefId(0:23 ~ projection_no_regions_closure[317d]::correct_region[0]) with substs [ '_#1r, T, ] @@ -75,7 +75,7 @@ note: External requirements LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:22 ~ projection_no_regions_closure[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:31 ~ projection_no_regions_closure[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, T, @@ -97,7 +97,7 @@ LL | | LL | | } | |_^ | - = note: defining type: DefId(0/0:8 ~ projection_no_regions_closure[317d]::wrong_region[0]) with substs [ + = note: defining type: DefId(0:27 ~ projection_no_regions_closure[317d]::wrong_region[0]) with substs [ '_#1r, '_#2r, T, @@ -117,7 +117,7 @@ note: External requirements LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:26 ~ projection_no_regions_closure[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:36 ~ projection_no_regions_closure[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, T, @@ -139,7 +139,7 @@ LL | | with_signature(x, |mut y| Box::new(y.next())) LL | | } | |_^ | - = note: defining type: DefId(0/0:9 ~ projection_no_regions_closure[317d]::outlives_region[0]) with substs [ + = note: defining type: DefId(0:32 ~ projection_no_regions_closure[317d]::outlives_region[0]) with substs [ '_#1r, '_#2r, T, diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr index 9d71600650..10b2bd1af4 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr @@ -4,7 +4,7 @@ note: External requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:19 ~ projection_one_region_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:28 ~ projection_one_region_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [ '_#1r, T, i32, @@ -27,7 +27,7 @@ LL | | LL | | } | |_^ | - = note: defining type: DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]) with substs [ + = note: defining type: DefId(0:24 ~ projection_one_region_closure[317d]::no_relationships_late[0]) with substs [ '_#1r, T, ] @@ -38,7 +38,7 @@ error[E0309]: the parameter type `T` may not live long enough LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`... + = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0:24 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(25), 'a))`... error: lifetime may not live long enough --> $DIR/projection-one-region-closure.rs:45:39 @@ -57,7 +57,7 @@ note: External requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:23 ~ projection_one_region_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:33 ~ projection_one_region_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, T, @@ -80,7 +80,7 @@ LL | | LL | | } | |_^ | - = note: defining type: DefId(0/0:9 ~ projection_one_region_closure[317d]::no_relationships_early[0]) with substs [ + = note: defining type: DefId(0:29 ~ projection_one_region_closure[317d]::no_relationships_early[0]) with substs [ '_#1r, '_#2r, T, @@ -111,7 +111,7 @@ note: External requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:27 ~ projection_one_region_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:38 ~ projection_one_region_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, T, @@ -133,7 +133,7 @@ LL | | with_signature(cell, t, |cell, t| require(cell, t)); LL | | } | |_^ | - = note: defining type: DefId(0/0:10 ~ projection_one_region_closure[317d]::projection_outlives[0]) with substs [ + = note: defining type: DefId(0:34 ~ projection_one_region_closure[317d]::projection_outlives[0]) with substs [ '_#1r, '_#2r, T, @@ -145,7 +145,7 @@ note: External requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:31 ~ projection_one_region_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:43 ~ projection_one_region_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, T, @@ -168,7 +168,7 @@ LL | | with_signature(cell, t, |cell, t| require(cell, t)); LL | | } | |_^ | - = note: defining type: DefId(0/0:11 ~ projection_one_region_closure[317d]::elements_outlive[0]) with substs [ + = note: defining type: DefId(0:39 ~ projection_one_region_closure[317d]::elements_outlive[0]) with substs [ '_#1r, '_#2r, T, diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr index 0fa4060137..b4b74bfc12 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr @@ -4,7 +4,7 @@ note: External requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:19 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:28 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [ '_#1r, T, i32, @@ -26,7 +26,7 @@ LL | | LL | | } | |_^ | - = note: defining type: DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [ + = note: defining type: DefId(0:24 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [ '_#1r, T, ] @@ -48,7 +48,7 @@ note: External requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:23 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:33 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, T, @@ -70,7 +70,7 @@ LL | | LL | | } | |_^ | - = note: defining type: DefId(0/0:9 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [ + = note: defining type: DefId(0:29 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [ '_#1r, '_#2r, T, @@ -93,7 +93,7 @@ note: External requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:27 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:38 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, T, @@ -115,7 +115,7 @@ LL | | with_signature(cell, t, |cell, t| require(cell, t)); LL | | } | |_^ | - = note: defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [ + = note: defining type: DefId(0:34 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [ '_#1r, '_#2r, T, @@ -127,7 +127,7 @@ note: External requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:31 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:43 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, T, @@ -149,7 +149,7 @@ LL | | with_signature(cell, t, |cell, t| require(cell, t)); LL | | } | |_^ | - = note: defining type: DefId(0/0:11 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]) with substs [ + = note: defining type: DefId(0:39 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]) with substs [ '_#1r, '_#2r, T, @@ -161,7 +161,7 @@ note: External requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:47 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ '_#1r, T, i32, @@ -182,7 +182,7 @@ LL | | with_signature(cell, t, |cell, t| require(cell, t)); LL | | } | |_^ | - = note: defining type: DefId(0/0:12 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]) with substs [ + = note: defining type: DefId(0:44 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]) with substs [ '_#1r, T, ] diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr index f616a7feae..a757a43499 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr @@ -4,7 +4,7 @@ note: No external requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:19 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:28 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [ '_#1r, T, i32, @@ -23,7 +23,7 @@ LL | | with_signature(cell, t, |cell, t| require(cell, t)); LL | | } | |_^ | - = note: defining type: DefId(0/0:8 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_late[0]) with substs [ + = note: defining type: DefId(0:24 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_late[0]) with substs [ '_#1r, T, ] @@ -34,7 +34,7 @@ note: No external requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:23 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:33 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, T, @@ -54,7 +54,7 @@ LL | | with_signature(cell, t, |cell, t| require(cell, t)); LL | | } | |_^ | - = note: defining type: DefId(0/0:9 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_early[0]) with substs [ + = note: defining type: DefId(0:29 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_early[0]) with substs [ '_#1r, '_#2r, T, @@ -66,7 +66,7 @@ note: No external requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:27 ~ projection_one_region_trait_bound_static_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:38 ~ projection_one_region_trait_bound_static_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, T, @@ -86,7 +86,7 @@ LL | | with_signature(cell, t, |cell, t| require(cell, t)); LL | | } | |_^ | - = note: defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_static_closure[317d]::projection_outlives[0]) with substs [ + = note: defining type: DefId(0:34 ~ projection_one_region_trait_bound_static_closure[317d]::projection_outlives[0]) with substs [ '_#1r, '_#2r, T, @@ -98,7 +98,7 @@ note: No external requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:31 ~ projection_one_region_trait_bound_static_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:43 ~ projection_one_region_trait_bound_static_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, T, @@ -118,7 +118,7 @@ LL | | with_signature(cell, t, |cell, t| require(cell, t)); LL | | } | |_^ | - = note: defining type: DefId(0/0:11 ~ projection_one_region_trait_bound_static_closure[317d]::elements_outlive[0]) with substs [ + = note: defining type: DefId(0:39 ~ projection_one_region_trait_bound_static_closure[317d]::elements_outlive[0]) with substs [ '_#1r, '_#2r, T, @@ -130,7 +130,7 @@ note: No external requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_static_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:47 ~ projection_one_region_trait_bound_static_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ '_#1r, T, i32, @@ -149,7 +149,7 @@ LL | | with_signature(cell, t, |cell, t| require(cell, t)); LL | | } | |_^ | - = note: defining type: DefId(0/0:12 ~ projection_one_region_trait_bound_static_closure[317d]::one_region[0]) with substs [ + = note: defining type: DefId(0:44 ~ projection_one_region_trait_bound_static_closure[317d]::one_region[0]) with substs [ '_#1r, T, ] diff --git a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr index b761b03144..a48766cd73 100644 --- a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr @@ -4,7 +4,7 @@ note: External requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:22 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:31 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, T, @@ -27,7 +27,7 @@ LL | | LL | | } | |_^ | - = note: defining type: DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [ + = note: defining type: DefId(0:26 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [ '_#1r, '_#2r, T, @@ -39,7 +39,7 @@ error[E0309]: the associated type `>::AssocType` may LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = help: consider adding an explicit lifetime bound `>::AssocType: ReFree(DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:18), 'a))`... + = help: consider adding an explicit lifetime bound `>::AssocType: ReFree(DefId(0:26 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(27), 'a))`... note: External requirements --> $DIR/projection-two-region-trait-bound-closure.rs:48:29 @@ -47,7 +47,7 @@ note: External requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:27 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:37 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, '_#3r, @@ -70,7 +70,7 @@ LL | | LL | | } | |_^ | - = note: defining type: DefId(0/0:9 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [ + = note: defining type: DefId(0:32 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [ '_#1r, '_#2r, '_#3r, @@ -91,7 +91,7 @@ note: External requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:32 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:43 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, '_#3r, @@ -114,7 +114,7 @@ LL | | with_signature(cell, t, |cell, t| require(cell, t)); LL | | } | |_^ | - = note: defining type: DefId(0/0:10 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [ + = note: defining type: DefId(0:38 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [ '_#1r, '_#2r, '_#3r, @@ -127,7 +127,7 @@ note: External requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:37 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:49 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, '_#3r, @@ -150,7 +150,7 @@ LL | | with_signature(cell, t, |cell, t| require(cell, t)); LL | | } | |_^ | - = note: defining type: DefId(0/0:11 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]) with substs [ + = note: defining type: DefId(0:44 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]) with substs [ '_#1r, '_#2r, '_#3r, @@ -163,7 +163,7 @@ note: External requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:42 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:55 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, '_#3r, @@ -186,7 +186,7 @@ LL | | with_signature(cell, t, |cell, t| require(cell, t)); LL | | } | |_^ | - = note: defining type: DefId(0/0:12 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]) with substs [ + = note: defining type: DefId(0:50 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]) with substs [ '_#1r, '_#2r, '_#3r, @@ -199,7 +199,7 @@ note: External requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:46 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:60 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]::{{closure}}[0]) with closure substs [ '_#1r, T, i32, @@ -221,7 +221,7 @@ LL | | LL | | } | |_^ | - = note: defining type: DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]) with substs [ + = note: defining type: DefId(0:56 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]) with substs [ '_#1r, T, ] @@ -243,7 +243,7 @@ note: External requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:50 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:65 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, T, @@ -265,7 +265,7 @@ LL | | with_signature(cell, t, |cell, t| require(cell, t)); LL | | } | |_^ | - = note: defining type: DefId(0/0:14 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]) with substs [ + = note: defining type: DefId(0:61 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]) with substs [ '_#1r, '_#2r, T, @@ -277,7 +277,7 @@ note: External requirements LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:53 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:69 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ '_#1r, T, i32, @@ -298,7 +298,7 @@ LL | | with_signature(cell, t, |cell, t| require(cell, t)); LL | | } | |_^ | - = note: defining type: DefId(0/0:15 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]) with substs [ + = note: defining type: DefId(0:66 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]) with substs [ '_#1r, T, ] diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.nll.stderr b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.nll.stderr new file mode 100644 index 0000000000..3a84cbfbed --- /dev/null +++ b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.nll.stderr @@ -0,0 +1,11 @@ +error[E0309]: the associated type `>::Output` may not live long enough + --> $DIR/projection-where-clause-env-wrong-bound.rs:15:5 + | +LL | bar::() + | ^^^^^^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `>::Output: 'a`... + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0309`. diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.rs b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.rs index 9c2cbfd4a4..dce88b88c7 100644 --- a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.rs +++ b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - // Test that we are able to establish that `>::Output` outlives `'b` here. We need to prove however // that `>::Output` outlives `'a`, so we also have to diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr index 1aed0a545b..1a5a3719fd 100644 --- a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr +++ b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr @@ -1,10 +1,15 @@ -error[E0309]: the associated type `>::Output` may not live long enough - --> $DIR/projection-where-clause-env-wrong-bound.rs:17:5 +error[E0309]: the associated type `>::Output` may not live long enough + --> $DIR/projection-where-clause-env-wrong-bound.rs:15:5 | LL | bar::() | ^^^^^^^^^^^^^^^^ | - = help: consider adding an explicit lifetime bound `>::Output: 'a`... + = help: consider adding an explicit lifetime bound `>::Output: 'a`... +note: ...so that the type `>::Output` will meet its required lifetime bounds + --> $DIR/projection-where-clause-env-wrong-bound.rs:15:5 + | +LL | bar::() + | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.nll.stderr b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.nll.stderr new file mode 100644 index 0000000000..58bfb60045 --- /dev/null +++ b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.nll.stderr @@ -0,0 +1,11 @@ +error[E0309]: the associated type `>::Output` may not live long enough + --> $DIR/projection-where-clause-env-wrong-lifetime.rs:14:5 + | +LL | bar::<>::Output>() + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `>::Output: 'a`... + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0309`. diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env.rs b/src/test/ui/nll/ty-outlives/projection-where-clause-env.rs index c6935badf5..7314766611 100644 --- a/src/test/ui/nll/ty-outlives/projection-where-clause-env.rs +++ b/src/test/ui/nll/ty-outlives/projection-where-clause-env.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - // Test that when we have a `>::Output: 'a` // relationship in the environment we take advantage of it. In this // case, that means we **don't** have to prove that `T: 'a`. diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr index 6f3071becf..2ed94df1f3 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr @@ -4,10 +4,10 @@ note: External requirements LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:14 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:20 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]::{{closure}}[0]) with closure substs [ T, i16, - for<'r, 's> extern "rust-call" fn((std::option::Option>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T)), + for<'r, 's> extern "rust-call" fn((std::option::Option>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) T)), ] = note: number of external vids: 2 = note: where T: '_#1r @@ -21,7 +21,7 @@ LL | | twice(cell, value, |a, b| invoke(a, b)); LL | | } | |_^ | - = note: defining type: DefId(0/0:5 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]) with substs [ + = note: defining type: DefId(0:18 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]) with substs [ T, ] @@ -31,10 +31,10 @@ note: External requirements LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ | - = note: defining type: DefId(0/1:17 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:24 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]::{{closure}}[0]) with closure substs [ T, i16, - for<'r, 's> extern "rust-call" fn((std::option::Option>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T)), + for<'r, 's> extern "rust-call" fn((std::option::Option>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) T)), ] = note: late-bound region is '_#2r = note: number of external vids: 3 @@ -49,7 +49,7 @@ LL | | LL | | } | |_^ | - = note: defining type: DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]) with substs [ + = note: defining type: DefId(0:21 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]) with substs [ T, ] @@ -59,7 +59,7 @@ error[E0309]: the parameter type `T` may not live long enough LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ | - = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]), BrNamed(crate0:DefIndex(1:15), 'a))`... + = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0:21 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]), BrNamed(crate0:DefIndex(22), 'a))`... error: aborting due to previous error diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr index cdb7157620..d689949969 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr @@ -4,7 +4,7 @@ note: External requirements LL | with_signature(x, |y| y) | ^^^^^ | - = note: defining type: DefId(0/1:14 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:20 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]::{{closure}}[0]) with closure substs [ '_#1r, T, i32, @@ -25,7 +25,7 @@ LL | | LL | | } | |_^ | - = note: defining type: DefId(0/0:5 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]) with substs [ + = note: defining type: DefId(0:17 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]) with substs [ '_#1r, T, ] diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr index 68798a335f..11444c9f72 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr @@ -11,7 +11,7 @@ LL | | require(&x, &y) LL | | }) | |_____^ | - = note: defining type: DefId(0/1:16 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:23 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]::{{closure}}[0]) with closure substs [ T, i32, extern "rust-call" fn((std::cell::Cell<&'_#1r ()>, T)), @@ -32,7 +32,7 @@ LL | | }) LL | | } | |_^ | - = note: defining type: DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]) with substs [ + = note: defining type: DefId(0:20 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]) with substs [ T, ] @@ -49,7 +49,7 @@ LL | | require(&x, &y) LL | | }) | |_____^ | - = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]), BrNamed(crate0:DefIndex(1:14), 'a))`... + = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0:20 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]), BrNamed(crate0:DefIndex(21), 'a))`... note: External requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:43:26 @@ -64,7 +64,7 @@ LL | | require(&x, &y) LL | | }) | |_____^ | - = note: defining type: DefId(0/1:19 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:27 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]::{{closure}}[0]) with closure substs [ '_#1r, T, i32, @@ -85,7 +85,7 @@ LL | | }) LL | | } | |_^ | - = note: defining type: DefId(0/0:7 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]) with substs [ + = note: defining type: DefId(0:24 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]) with substs [ '_#1r, T, ] @@ -101,7 +101,7 @@ LL | | require(&x, &y) LL | | }) | |_____^ | - = note: defining type: DefId(0/1:23 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:32 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [ '_#1r, T, i32, @@ -123,7 +123,7 @@ LL | | }) LL | | } | |_^ | - = note: defining type: DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]) with substs [ + = note: defining type: DefId(0:28 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]) with substs [ '_#1r, T, ] @@ -139,7 +139,7 @@ LL | | require(&x, &y) LL | | }) | |_____^ | - = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(1:20), 'a))`... + = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0:28 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(29), 'a))`... note: External requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:77:26 @@ -151,7 +151,7 @@ LL | | require(&x, &y) LL | | }) | |_____^ | - = note: defining type: DefId(0/1:27 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [ + = note: defining type: DefId(0:37 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [ '_#1r, '_#2r, T, @@ -173,7 +173,7 @@ LL | | }) LL | | } | |_^ | - = note: defining type: DefId(0/0:9 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]) with substs [ + = note: defining type: DefId(0:33 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]) with substs [ '_#1r, '_#2r, T, diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.rs b/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.rs deleted file mode 100644 index ec55943757..0000000000 --- a/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.rs +++ /dev/null @@ -1,30 +0,0 @@ -// Test that we assume that universal types like `T` outlive the -// function body. Same as ty-param-fn-body, but uses `feature(nll)`, -// which affects error reporting. - -#![feature(nll)] - -#![allow(warnings)] - -use std::cell::Cell; - -// No errors here, because `'a` is local to the body. -fn region_within_body(t: T) { - let some_int = 22; - let cell = Cell::new(&some_int); - outlives(cell, t) -} - -// Error here, because T: 'a is not satisfied. -fn region_static<'a, T>(cell: Cell<&'a usize>, t: T) { - outlives(cell, t) - //~^ ERROR the parameter type `T` may not live long enough -} - -fn outlives<'a, T>(x: Cell<&'a usize>, y: T) -where - T: 'a, -{ -} - -fn main() {} diff --git a/src/test/ui/nll/type-alias-free-regions.nll.stderr b/src/test/ui/nll/type-alias-free-regions.nll.stderr new file mode 100644 index 0000000000..235bf4167d --- /dev/null +++ b/src/test/ui/nll/type-alias-free-regions.nll.stderr @@ -0,0 +1,22 @@ +error: lifetime may not live long enough + --> $DIR/type-alias-free-regions.rs:17:9 + | +LL | impl<'a> FromBox<'a> for C<'a> { + | -- lifetime `'a` defined here +LL | fn from_box(b: Box) -> Self { + | - has type `std::boxed::Box>` +LL | C { f: b } + | ^^^^^^^^^^ returning this value requires that `'1` must outlive `'a` + +error: lifetime may not live long enough + --> $DIR/type-alias-free-regions.rs:27:9 + | +LL | impl<'a> FromTuple<'a> for C<'a> { + | -- lifetime `'a` defined here +LL | fn from_tuple(b: (B,)) -> Self { + | - has type `(std::boxed::Box<&'1 isize>,)` +LL | C { f: Box::new(b.0) } + | ^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'a` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/nll/type-alias-free-regions.rs b/src/test/ui/nll/type-alias-free-regions.rs index ebe6b9d207..fd5566f35d 100644 --- a/src/test/ui/nll/type-alias-free-regions.rs +++ b/src/test/ui/nll/type-alias-free-regions.rs @@ -1,8 +1,6 @@ // Test that we don't assume that type aliases have the same type parameters // as the type they alias and then panic when we see this. -#![feature(nll)] - type A<'a> = &'a isize; type B<'a> = Box>; diff --git a/src/test/ui/nll/type-alias-free-regions.stderr b/src/test/ui/nll/type-alias-free-regions.stderr index 4facc2d0da..00d58d3436 100644 --- a/src/test/ui/nll/type-alias-free-regions.stderr +++ b/src/test/ui/nll/type-alias-free-regions.stderr @@ -1,22 +1,52 @@ -error: lifetime may not live long enough - --> $DIR/type-alias-free-regions.rs:19:9 +error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements + --> $DIR/type-alias-free-regions.rs:17:9 | -LL | impl<'a> FromBox<'a> for C<'a> { - | -- lifetime `'a` defined here -LL | fn from_box(b: Box) -> Self { - | - has type `std::boxed::Box>` LL | C { f: b } - | ^^^^^^^^^^ returning this value requires that `'1` must outlive `'a` + | ^ + | +note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 16:5... + --> $DIR/type-alias-free-regions.rs:16:5 + | +LL | / fn from_box(b: Box) -> Self { +LL | | C { f: b } +LL | | } + | |_____^ + = note: ...so that the expression is assignable: + expected std::boxed::Box> + found std::boxed::Box> +note: but, the lifetime must be valid for the lifetime 'a as defined on the impl at 15:6... + --> $DIR/type-alias-free-regions.rs:15:6 + | +LL | impl<'a> FromBox<'a> for C<'a> { + | ^^ + = note: ...so that the expression is assignable: + expected C<'a> + found C<'_> -error: lifetime may not live long enough - --> $DIR/type-alias-free-regions.rs:29:9 +error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements + --> $DIR/type-alias-free-regions.rs:27:16 | -LL | impl<'a> FromTuple<'a> for C<'a> { - | -- lifetime `'a` defined here -LL | fn from_tuple(b: (B,)) -> Self { - | - has type `(std::boxed::Box<&'1 isize>,)` LL | C { f: Box::new(b.0) } - | ^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'a` + | ^^^^^^^^^^^^^ + | +note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 26:5... + --> $DIR/type-alias-free-regions.rs:26:5 + | +LL | / fn from_tuple(b: (B,)) -> Self { +LL | | C { f: Box::new(b.0) } +LL | | } + | |_____^ + = note: ...so that the expression is assignable: + expected std::boxed::Box<&isize> + found std::boxed::Box<&isize> +note: but, the lifetime must be valid for the lifetime 'a as defined on the impl at 25:6... + --> $DIR/type-alias-free-regions.rs:25:6 + | +LL | impl<'a> FromTuple<'a> for C<'a> { + | ^^ + = note: ...so that the expression is assignable: + expected C<'a> + found C<'_> error: aborting due to 2 previous errors diff --git a/src/test/ui/nll/unused-mut-issue-50343.rs b/src/test/ui/nll/unused-mut-issue-50343.rs index 06dbc47355..da0d9229c1 100644 --- a/src/test/ui/nll/unused-mut-issue-50343.rs +++ b/src/test/ui/nll/unused-mut-issue-50343.rs @@ -1,4 +1,3 @@ -#![feature(nll)] #![deny(unused_mut)] fn main() { diff --git a/src/test/ui/nll/unused-mut-issue-50343.stderr b/src/test/ui/nll/unused-mut-issue-50343.stderr index ef31dd7b29..261d678db6 100644 --- a/src/test/ui/nll/unused-mut-issue-50343.stderr +++ b/src/test/ui/nll/unused-mut-issue-50343.stderr @@ -1,5 +1,5 @@ error: variable does not need to be mutable - --> $DIR/unused-mut-issue-50343.rs:5:33 + --> $DIR/unused-mut-issue-50343.rs:4:33 | LL | vec![(42, 22)].iter().map(|(mut x, _y)| ()).count(); | ----^ @@ -7,7 +7,7 @@ LL | vec![(42, 22)].iter().map(|(mut x, _y)| ()).count(); | help: remove this `mut` | note: lint level defined here - --> $DIR/unused-mut-issue-50343.rs:2:9 + --> $DIR/unused-mut-issue-50343.rs:1:9 | LL | #![deny(unused_mut)] | ^^^^^^^^^^ diff --git a/src/test/ui/nll/user-annotations/adt-brace-enums.rs b/src/test/ui/nll/user-annotations/adt-brace-enums.rs index 842ebae261..0d9828342d 100644 --- a/src/test/ui/nll/user-annotations/adt-brace-enums.rs +++ b/src/test/ui/nll/user-annotations/adt-brace-enums.rs @@ -1,8 +1,6 @@ // Unit test for the "user substitutions" that are annotated on each // node. -#![feature(nll)] - enum SomeEnum { SomeVariant { t: T } } diff --git a/src/test/ui/nll/user-annotations/adt-brace-enums.stderr b/src/test/ui/nll/user-annotations/adt-brace-enums.stderr index 38f068746a..e38b77fdce 100644 --- a/src/test/ui/nll/user-annotations/adt-brace-enums.stderr +++ b/src/test/ui/nll/user-annotations/adt-brace-enums.stderr @@ -1,5 +1,5 @@ error[E0597]: `c` does not live long enough - --> $DIR/adt-brace-enums.rs:27:48 + --> $DIR/adt-brace-enums.rs:25:48 | LL | SomeEnum::SomeVariant::<&'static u32> { t: &c }; | ^^ @@ -10,7 +10,7 @@ LL | } | - `c` dropped here while still borrowed error[E0597]: `c` does not live long enough - --> $DIR/adt-brace-enums.rs:32:43 + --> $DIR/adt-brace-enums.rs:30:43 | LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here @@ -24,7 +24,7 @@ LL | } | - `c` dropped here while still borrowed error[E0597]: `c` does not live long enough - --> $DIR/adt-brace-enums.rs:42:47 + --> $DIR/adt-brace-enums.rs:40:47 | LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here diff --git a/src/test/ui/nll/user-annotations/adt-brace-structs.rs b/src/test/ui/nll/user-annotations/adt-brace-structs.rs index d7ebbe8eb5..bdbfd87d58 100644 --- a/src/test/ui/nll/user-annotations/adt-brace-structs.rs +++ b/src/test/ui/nll/user-annotations/adt-brace-structs.rs @@ -1,8 +1,6 @@ // Unit test for the "user substitutions" that are annotated on each // node. -#![feature(nll)] - struct SomeStruct { t: T } fn no_annot() { diff --git a/src/test/ui/nll/user-annotations/adt-brace-structs.stderr b/src/test/ui/nll/user-annotations/adt-brace-structs.stderr index 25a9de480b..3c3003477c 100644 --- a/src/test/ui/nll/user-annotations/adt-brace-structs.stderr +++ b/src/test/ui/nll/user-annotations/adt-brace-structs.stderr @@ -1,5 +1,5 @@ error[E0597]: `c` does not live long enough - --> $DIR/adt-brace-structs.rs:25:37 + --> $DIR/adt-brace-structs.rs:23:37 | LL | SomeStruct::<&'static u32> { t: &c }; | ^^ @@ -10,7 +10,7 @@ LL | } | - `c` dropped here while still borrowed error[E0597]: `c` does not live long enough - --> $DIR/adt-brace-structs.rs:30:32 + --> $DIR/adt-brace-structs.rs:28:32 | LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here @@ -24,7 +24,7 @@ LL | } | - `c` dropped here while still borrowed error[E0597]: `c` does not live long enough - --> $DIR/adt-brace-structs.rs:40:36 + --> $DIR/adt-brace-structs.rs:38:36 | LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here diff --git a/src/test/ui/nll/user-annotations/adt-nullary-enums.rs b/src/test/ui/nll/user-annotations/adt-nullary-enums.rs index 7a8f55a800..53853668d1 100644 --- a/src/test/ui/nll/user-annotations/adt-nullary-enums.rs +++ b/src/test/ui/nll/user-annotations/adt-nullary-enums.rs @@ -1,7 +1,6 @@ // Unit test for the "user substitutions" that are annotated on each // node. -#![feature(nll)] #![allow(warnings)] use std::cell::Cell; diff --git a/src/test/ui/nll/user-annotations/adt-nullary-enums.stderr b/src/test/ui/nll/user-annotations/adt-nullary-enums.stderr index 1afbac7c4b..bb70341222 100644 --- a/src/test/ui/nll/user-annotations/adt-nullary-enums.stderr +++ b/src/test/ui/nll/user-annotations/adt-nullary-enums.stderr @@ -1,5 +1,5 @@ error[E0597]: `c` does not live long enough - --> $DIR/adt-nullary-enums.rs:34:41 + --> $DIR/adt-nullary-enums.rs:33:41 | LL | SomeEnum::SomeVariant(Cell::new(&c)), | ----------^^- @@ -11,7 +11,7 @@ LL | } | - `c` dropped here while still borrowed error[E0597]: `c` does not live long enough - --> $DIR/adt-nullary-enums.rs:42:41 + --> $DIR/adt-nullary-enums.rs:41:41 | LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here @@ -26,7 +26,7 @@ LL | } | - `c` dropped here while still borrowed error[E0597]: `c` does not live long enough - --> $DIR/adt-nullary-enums.rs:55:45 + --> $DIR/adt-nullary-enums.rs:54:45 | LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here diff --git a/src/test/ui/nll/user-annotations/adt-tuple-enums.rs b/src/test/ui/nll/user-annotations/adt-tuple-enums.rs index 085596ecc5..efe8dfda19 100644 --- a/src/test/ui/nll/user-annotations/adt-tuple-enums.rs +++ b/src/test/ui/nll/user-annotations/adt-tuple-enums.rs @@ -1,7 +1,6 @@ // Unit test for the "user substitutions" that are annotated on each // node. -#![feature(nll)] #![allow(warnings)] enum SomeEnum { diff --git a/src/test/ui/nll/user-annotations/adt-tuple-enums.stderr b/src/test/ui/nll/user-annotations/adt-tuple-enums.stderr index cd625653ac..810912bf88 100644 --- a/src/test/ui/nll/user-annotations/adt-tuple-enums.stderr +++ b/src/test/ui/nll/user-annotations/adt-tuple-enums.stderr @@ -1,5 +1,5 @@ error[E0597]: `c` does not live long enough - --> $DIR/adt-tuple-enums.rs:29:43 + --> $DIR/adt-tuple-enums.rs:28:43 | LL | SomeEnum::SomeVariant::<&'static u32>(&c); | ^^ @@ -10,7 +10,7 @@ LL | } | - `c` dropped here while still borrowed error[E0597]: `c` does not live long enough - --> $DIR/adt-tuple-enums.rs:34:38 + --> $DIR/adt-tuple-enums.rs:33:38 | LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here @@ -24,7 +24,7 @@ LL | } | - `c` dropped here while still borrowed error[E0597]: `c` does not live long enough - --> $DIR/adt-tuple-enums.rs:44:42 + --> $DIR/adt-tuple-enums.rs:43:42 | LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here diff --git a/src/test/ui/nll/user-annotations/adt-tuple-struct.rs b/src/test/ui/nll/user-annotations/adt-tuple-struct.rs index ebbe3cd2c8..37284e1fda 100644 --- a/src/test/ui/nll/user-annotations/adt-tuple-struct.rs +++ b/src/test/ui/nll/user-annotations/adt-tuple-struct.rs @@ -1,8 +1,6 @@ // Unit test for the "user substitutions" that are annotated on each // node. -#![feature(nll)] - struct SomeStruct(T); fn no_annot() { diff --git a/src/test/ui/nll/user-annotations/adt-tuple-struct.stderr b/src/test/ui/nll/user-annotations/adt-tuple-struct.stderr index 2bb58bb259..4d2140eca1 100644 --- a/src/test/ui/nll/user-annotations/adt-tuple-struct.stderr +++ b/src/test/ui/nll/user-annotations/adt-tuple-struct.stderr @@ -1,5 +1,5 @@ error[E0597]: `c` does not live long enough - --> $DIR/adt-tuple-struct.rs:25:32 + --> $DIR/adt-tuple-struct.rs:23:32 | LL | SomeStruct::<&'static u32>(&c); | ^^ @@ -10,7 +10,7 @@ LL | } | - `c` dropped here while still borrowed error[E0597]: `c` does not live long enough - --> $DIR/adt-tuple-struct.rs:30:27 + --> $DIR/adt-tuple-struct.rs:28:27 | LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here @@ -24,7 +24,7 @@ LL | } | - `c` dropped here while still borrowed error[E0597]: `c` does not live long enough - --> $DIR/adt-tuple-struct.rs:40:31 + --> $DIR/adt-tuple-struct.rs:38:31 | LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here diff --git a/src/test/ui/nll/user-annotations/cast_static_lifetime.rs b/src/test/ui/nll/user-annotations/cast_static_lifetime.rs index 4756c771f6..bb6129dacd 100644 --- a/src/test/ui/nll/user-annotations/cast_static_lifetime.rs +++ b/src/test/ui/nll/user-annotations/cast_static_lifetime.rs @@ -1,5 +1,4 @@ #![allow(warnings)] -#![feature(nll)] fn main() { let x = 22_u32; diff --git a/src/test/ui/nll/user-annotations/cast_static_lifetime.stderr b/src/test/ui/nll/user-annotations/cast_static_lifetime.stderr index 0228b56d76..4599d04e7e 100644 --- a/src/test/ui/nll/user-annotations/cast_static_lifetime.stderr +++ b/src/test/ui/nll/user-annotations/cast_static_lifetime.stderr @@ -1,5 +1,5 @@ error[E0597]: `x` does not live long enough - --> $DIR/cast_static_lifetime.rs:6:19 + --> $DIR/cast_static_lifetime.rs:5:19 | LL | let y: &u32 = (&x) as &'static u32; | ^^^^---------------- diff --git a/src/test/ui/nll/user-annotations/closure-substs.stderr b/src/test/ui/nll/user-annotations/closure-substs.stderr index 55bb3a6090..384d53f0e4 100644 --- a/src/test/ui/nll/user-annotations/closure-substs.stderr +++ b/src/test/ui/nll/user-annotations/closure-substs.stderr @@ -34,4 +34,3 @@ LL | b(x); error: aborting due to 4 previous errors -For more information about this error, try `rustc --explain E0521`. diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.nll.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.nll.stderr new file mode 100644 index 0000000000..c39301588a --- /dev/null +++ b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.nll.stderr @@ -0,0 +1,10 @@ +error: lifetime may not live long enough + --> $DIR/constant-in-expr-inherent-1.rs:8:5 + | +LL | fn foo<'a>(_: &'a u32) -> &'static u32 { + | -- lifetime `'a` defined here +LL | >::C + | ^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.rs b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.rs index 058ebaee9e..e3a8a5f58d 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.rs +++ b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - struct Foo<'a> { x: &'a u32 } impl<'a> Foo<'a> { @@ -12,4 +10,3 @@ fn foo<'a>(_: &'a u32) -> &'static u32 { fn main() { } - diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr index 9a28fbd113..77e1339dc1 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr +++ b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr @@ -1,10 +1,23 @@ -error: lifetime may not live long enough - --> $DIR/constant-in-expr-inherent-1.rs:10:5 +error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements + --> $DIR/constant-in-expr-inherent-1.rs:8:5 + | +LL | >::C + | ^^^^^^^^^^^^ + | +note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 7:8... + --> $DIR/constant-in-expr-inherent-1.rs:7:8 | LL | fn foo<'a>(_: &'a u32) -> &'static u32 { - | -- lifetime `'a` defined here + | ^^ + = note: ...so that the types are compatible: + expected Foo<'_> + found Foo<'a> + = note: but, the lifetime must be valid for the static lifetime... +note: ...so that reference does not outlive borrowed content + --> $DIR/constant-in-expr-inherent-1.rs:8:5 + | LL | >::C - | ^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` + | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.rs b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.rs index 123be6b3e4..90696d4b17 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.rs +++ b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.rs @@ -1,8 +1,6 @@ // Test that we still check constants are well-formed, even when we there's no // type annotation to check. -#![feature(nll)] - const FUN: fn(&'static ()) = |_| {}; struct A; impl A { diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.stderr index 07e2e1e85c..12065a85aa 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.stderr +++ b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.stderr @@ -1,5 +1,5 @@ error[E0597]: `x` does not live long enough - --> $DIR/constant-in-expr-inherent-2.rs:25:9 + --> $DIR/constant-in-expr-inherent-2.rs:23:9 | LL | FUN(&x); | ----^^- @@ -11,7 +11,7 @@ LL | } | - `x` dropped here while still borrowed error[E0597]: `x` does not live long enough - --> $DIR/constant-in-expr-inherent-2.rs:26:23 + --> $DIR/constant-in-expr-inherent-2.rs:24:23 | LL | A::ASSOCIATED_FUN(&x); | ------------------^^- @@ -23,7 +23,7 @@ LL | } | - `x` dropped here while still borrowed error[E0597]: `x` does not live long enough - --> $DIR/constant-in-expr-inherent-2.rs:27:28 + --> $DIR/constant-in-expr-inherent-2.rs:25:28 | LL | B::ALSO_ASSOCIATED_FUN(&x); | -----------------------^^- @@ -35,7 +35,7 @@ LL | } | - `x` dropped here while still borrowed error[E0597]: `x` does not live long enough - --> $DIR/constant-in-expr-inherent-2.rs:28:31 + --> $DIR/constant-in-expr-inherent-2.rs:26:31 | LL | <_>::TRAIT_ASSOCIATED_FUN(&x); | --------------------------^^- diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-normalize.nll.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-normalize.nll.stderr new file mode 100644 index 0000000000..541a2cfaf2 --- /dev/null +++ b/src/test/ui/nll/user-annotations/constant-in-expr-normalize.nll.stderr @@ -0,0 +1,10 @@ +error: lifetime may not live long enough + --> $DIR/constant-in-expr-normalize.rs:18:5 + | +LL | fn foo<'a>(_: &'a u32) -> &'static u32 { + | -- lifetime `'a` defined here +LL | <() as Foo<'a>>::C + | ^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-normalize.rs b/src/test/ui/nll/user-annotations/constant-in-expr-normalize.rs index 4292fc710e..b7095430d8 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-normalize.rs +++ b/src/test/ui/nll/user-annotations/constant-in-expr-normalize.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - trait Mirror { type Me; } diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-normalize.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-normalize.stderr index 5e66a30d7c..f49d68458b 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-normalize.stderr +++ b/src/test/ui/nll/user-annotations/constant-in-expr-normalize.stderr @@ -1,10 +1,15 @@ -error: lifetime may not live long enough - --> $DIR/constant-in-expr-normalize.rs:20:5 +error[E0312]: lifetime of reference outlives lifetime of borrowed content... + --> $DIR/constant-in-expr-normalize.rs:18:5 | -LL | fn foo<'a>(_: &'a u32) -> &'static u32 { - | -- lifetime `'a` defined here LL | <() as Foo<'a>>::C - | ^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` + | ^^^^^^^^^^^^^^^^^^ + | + = note: ...the reference is valid for the static lifetime... +note: ...but the borrowed content is only valid for the lifetime 'a as defined on the function body at 17:8 + --> $DIR/constant-in-expr-normalize.rs:17:8 + | +LL | fn foo<'a>(_: &'a u32) -> &'static u32 { + | ^^ error: aborting due to previous error diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.nll.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.nll.stderr new file mode 100644 index 0000000000..ea0fcb6d63 --- /dev/null +++ b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.nll.stderr @@ -0,0 +1,10 @@ +error: lifetime may not live long enough + --> $DIR/constant-in-expr-trait-item-1.rs:10:5 + | +LL | fn foo<'a>(_: &'a u32) -> &'static u32 { + | -- lifetime `'a` defined here +LL | <() as Foo<'a>>::C + | ^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.rs b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.rs index daa0d7bc24..e0400b2cc0 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.rs +++ b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - trait Foo<'a> { const C: &'a u32; } diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr index c96838f259..451bcf41e4 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr +++ b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr @@ -1,10 +1,15 @@ -error: lifetime may not live long enough - --> $DIR/constant-in-expr-trait-item-1.rs:12:5 +error[E0312]: lifetime of reference outlives lifetime of borrowed content... + --> $DIR/constant-in-expr-trait-item-1.rs:10:5 | -LL | fn foo<'a>(_: &'a u32) -> &'static u32 { - | -- lifetime `'a` defined here LL | <() as Foo<'a>>::C - | ^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` + | ^^^^^^^^^^^^^^^^^^ + | + = note: ...the reference is valid for the static lifetime... +note: ...but the borrowed content is only valid for the lifetime 'a as defined on the function body at 9:8 + --> $DIR/constant-in-expr-trait-item-1.rs:9:8 + | +LL | fn foo<'a>(_: &'a u32) -> &'static u32 { + | ^^ error: aborting due to previous error diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.nll.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.nll.stderr new file mode 100644 index 0000000000..ff549f1d88 --- /dev/null +++ b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.nll.stderr @@ -0,0 +1,10 @@ +error: lifetime may not live long enough + --> $DIR/constant-in-expr-trait-item-2.rs:10:5 + | +LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 { + | -- lifetime `'a` defined here +LL | >::C + | ^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.rs b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.rs index cd66e7a49c..73c4e577b0 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.rs +++ b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - trait Foo<'a> { const C: &'a u32; } diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr index fcc3c40e43..d129e55e1e 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr +++ b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr @@ -1,10 +1,15 @@ -error: lifetime may not live long enough - --> $DIR/constant-in-expr-trait-item-2.rs:12:5 +error[E0312]: lifetime of reference outlives lifetime of borrowed content... + --> $DIR/constant-in-expr-trait-item-2.rs:10:5 | -LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 { - | -- lifetime `'a` defined here LL | >::C - | ^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` + | ^^^^^^^^^^^^^^^^^ + | + = note: ...the reference is valid for the static lifetime... +note: ...but the borrowed content is only valid for the lifetime 'a as defined on the function body at 9:8 + --> $DIR/constant-in-expr-trait-item-2.rs:9:8 + | +LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 { + | ^^ error: aborting due to previous error diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.nll.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.nll.stderr new file mode 100644 index 0000000000..7f160d8e39 --- /dev/null +++ b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.nll.stderr @@ -0,0 +1,10 @@ +error: lifetime may not live long enough + --> $DIR/constant-in-expr-trait-item-3.rs:10:5 + | +LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 { + | -- lifetime `'a` defined here +LL | T::C + | ^^^^ returning this value requires that `'a` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.rs b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.rs index f83ae2438e..567e31ef93 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.rs +++ b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - trait Foo<'a> { const C: &'a u32; } diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr index c91370c810..77655fe091 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr +++ b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr @@ -1,10 +1,23 @@ -error: lifetime may not live long enough - --> $DIR/constant-in-expr-trait-item-3.rs:12:5 +error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements + --> $DIR/constant-in-expr-trait-item-3.rs:10:5 + | +LL | T::C + | ^^^^ + | +note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 9:8... + --> $DIR/constant-in-expr-trait-item-3.rs:9:8 | LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 { - | -- lifetime `'a` defined here + | ^^ + = note: ...so that the types are compatible: + expected Foo<'_> + found Foo<'a> + = note: but, the lifetime must be valid for the static lifetime... +note: ...so that reference does not outlive borrowed content + --> $DIR/constant-in-expr-trait-item-3.rs:10:5 + | LL | T::C - | ^^^^ returning this value requires that `'a` must outlive `'static` + | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/nll/user-annotations/fns.rs b/src/test/ui/nll/user-annotations/fns.rs index 1e5e9340be..38db6d1c4c 100644 --- a/src/test/ui/nll/user-annotations/fns.rs +++ b/src/test/ui/nll/user-annotations/fns.rs @@ -1,8 +1,6 @@ // Unit test for the "user substitutions" that are annotated on each // node. -#![feature(nll)] - fn some_fn(arg: T) { } fn no_annot() { diff --git a/src/test/ui/nll/user-annotations/fns.stderr b/src/test/ui/nll/user-annotations/fns.stderr index dadce24159..e0640da39e 100644 --- a/src/test/ui/nll/user-annotations/fns.stderr +++ b/src/test/ui/nll/user-annotations/fns.stderr @@ -1,5 +1,5 @@ error[E0597]: `c` does not live long enough - --> $DIR/fns.rs:25:29 + --> $DIR/fns.rs:23:29 | LL | some_fn::<&'static u32>(&c); | ------------------------^^- @@ -10,7 +10,7 @@ LL | } | - `c` dropped here while still borrowed error[E0597]: `c` does not live long enough - --> $DIR/fns.rs:30:24 + --> $DIR/fns.rs:28:24 | LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here @@ -24,7 +24,7 @@ LL | } | - `c` dropped here while still borrowed error[E0597]: `c` does not live long enough - --> $DIR/fns.rs:40:28 + --> $DIR/fns.rs:38:28 | LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here diff --git a/src/test/ui/nll/user-annotations/issue-54570-bootstrapping.rs b/src/test/ui/nll/user-annotations/issue-54570-bootstrapping.rs index 0a8a6793dc..6b9d30f5ab 100644 --- a/src/test/ui/nll/user-annotations/issue-54570-bootstrapping.rs +++ b/src/test/ui/nll/user-annotations/issue-54570-bootstrapping.rs @@ -1,5 +1,4 @@ // compile-pass -#![feature(nll)] // This test is reduced from a scenario pnkfelix encountered while // bootstrapping the compiler. diff --git a/src/test/ui/nll/user-annotations/issue-55219.rs b/src/test/ui/nll/user-annotations/issue-55219.rs index 7daa5a59b9..4d18e96cc1 100644 --- a/src/test/ui/nll/user-annotations/issue-55219.rs +++ b/src/test/ui/nll/user-annotations/issue-55219.rs @@ -5,8 +5,6 @@ // // run-pass -#![feature(nll)] - pub struct Foo(T); impl Foo { diff --git a/src/test/ui/nll/user-annotations/issue-55241.rs b/src/test/ui/nll/user-annotations/issue-55241.rs index d7686b9dc9..29969c7b4c 100644 --- a/src/test/ui/nll/user-annotations/issue-55241.rs +++ b/src/test/ui/nll/user-annotations/issue-55241.rs @@ -7,8 +7,6 @@ // // run-pass -#![feature(nll)] - pub trait Hasher { type Out: Eq; } diff --git a/src/test/ui/nll/user-annotations/method-call.rs b/src/test/ui/nll/user-annotations/method-call.rs index 59d1513c4c..beafc597ac 100644 --- a/src/test/ui/nll/user-annotations/method-call.rs +++ b/src/test/ui/nll/user-annotations/method-call.rs @@ -1,8 +1,6 @@ // Unit test for the "user substitutions" that are annotated on each // node. -#![feature(nll)] - trait Bazoom { fn method(&self, arg: T, arg2: U) { } } diff --git a/src/test/ui/nll/user-annotations/method-call.stderr b/src/test/ui/nll/user-annotations/method-call.stderr index 7e5314614f..10447e45a6 100644 --- a/src/test/ui/nll/user-annotations/method-call.stderr +++ b/src/test/ui/nll/user-annotations/method-call.stderr @@ -1,5 +1,5 @@ error[E0597]: `c` does not live long enough - --> $DIR/method-call.rs:38:34 + --> $DIR/method-call.rs:36:34 | LL | a.method::<&'static u32>(b, &c); | -----------------------------^^- @@ -10,7 +10,7 @@ LL | } | - `c` dropped here while still borrowed error[E0597]: `c` does not live long enough - --> $DIR/method-call.rs:45:29 + --> $DIR/method-call.rs:43:29 | LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here @@ -24,7 +24,7 @@ LL | } | - `c` dropped here while still borrowed error[E0597]: `c` does not live long enough - --> $DIR/method-call.rs:59:33 + --> $DIR/method-call.rs:57:33 | LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here diff --git a/src/test/ui/nll/user-annotations/method-ufcs-1.rs b/src/test/ui/nll/user-annotations/method-ufcs-1.rs index 7968a9f6c4..950771f35e 100644 --- a/src/test/ui/nll/user-annotations/method-ufcs-1.rs +++ b/src/test/ui/nll/user-annotations/method-ufcs-1.rs @@ -1,8 +1,6 @@ // Unit test for the "user substitutions" that are annotated on each // node. -#![feature(nll)] - trait Bazoom: Sized { fn method(self, arg: T, arg2: U) { } } diff --git a/src/test/ui/nll/user-annotations/method-ufcs-1.stderr b/src/test/ui/nll/user-annotations/method-ufcs-1.stderr index 12b02ba33f..962ddfd2bd 100644 --- a/src/test/ui/nll/user-annotations/method-ufcs-1.stderr +++ b/src/test/ui/nll/user-annotations/method-ufcs-1.stderr @@ -1,5 +1,5 @@ error[E0597]: `a` does not live long enough - --> $DIR/method-ufcs-1.rs:32:7 + --> $DIR/method-ufcs-1.rs:30:7 | LL | x(&a, b, c); | --^^------- @@ -10,7 +10,7 @@ LL | } | - `a` dropped here while still borrowed error[E0597]: `a` does not live long enough - --> $DIR/method-ufcs-1.rs:39:36 + --> $DIR/method-ufcs-1.rs:37:36 | LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here @@ -24,7 +24,7 @@ LL | } | - `a` dropped here while still borrowed error[E0597]: `a` does not live long enough - --> $DIR/method-ufcs-1.rs:53:41 + --> $DIR/method-ufcs-1.rs:51:41 | LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here diff --git a/src/test/ui/nll/user-annotations/method-ufcs-2.rs b/src/test/ui/nll/user-annotations/method-ufcs-2.rs index a1d0e7b4c9..7dc0f0c12a 100644 --- a/src/test/ui/nll/user-annotations/method-ufcs-2.rs +++ b/src/test/ui/nll/user-annotations/method-ufcs-2.rs @@ -1,8 +1,6 @@ // Unit test for the "user substitutions" that are annotated on each // node. -#![feature(nll)] - trait Bazoom: Sized { fn method(self, arg: T, arg2: U) { } } diff --git a/src/test/ui/nll/user-annotations/method-ufcs-2.stderr b/src/test/ui/nll/user-annotations/method-ufcs-2.stderr index a55ed1aa27..63d59905e1 100644 --- a/src/test/ui/nll/user-annotations/method-ufcs-2.stderr +++ b/src/test/ui/nll/user-annotations/method-ufcs-2.stderr @@ -1,5 +1,5 @@ error[E0597]: `a` does not live long enough - --> $DIR/method-ufcs-2.rs:32:7 + --> $DIR/method-ufcs-2.rs:30:7 | LL | x(&a, b, c); | --^^------- @@ -10,7 +10,7 @@ LL | } | - `a` dropped here while still borrowed error[E0597]: `b` does not live long enough - --> $DIR/method-ufcs-2.rs:39:39 + --> $DIR/method-ufcs-2.rs:37:39 | LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here @@ -24,7 +24,7 @@ LL | } | - `b` dropped here while still borrowed error[E0597]: `b` does not live long enough - --> $DIR/method-ufcs-2.rs:53:44 + --> $DIR/method-ufcs-2.rs:51:44 | LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here diff --git a/src/test/ui/nll/user-annotations/method-ufcs-3.rs b/src/test/ui/nll/user-annotations/method-ufcs-3.rs index ea480c03c3..59d2009d14 100644 --- a/src/test/ui/nll/user-annotations/method-ufcs-3.rs +++ b/src/test/ui/nll/user-annotations/method-ufcs-3.rs @@ -1,8 +1,6 @@ // Unit test for the "user substitutions" that are annotated on each // node. -#![feature(nll)] - trait Bazoom { fn method(&self, arg: T, arg2: U) { } } diff --git a/src/test/ui/nll/user-annotations/method-ufcs-3.stderr b/src/test/ui/nll/user-annotations/method-ufcs-3.stderr index 140bda2df4..e7851833e9 100644 --- a/src/test/ui/nll/user-annotations/method-ufcs-3.stderr +++ b/src/test/ui/nll/user-annotations/method-ufcs-3.stderr @@ -1,5 +1,5 @@ error[E0597]: `c` does not live long enough - --> $DIR/method-ufcs-3.rs:38:53 + --> $DIR/method-ufcs-3.rs:36:53 | LL | <_ as Bazoom<_>>::method::<&'static u32>(&a, b, &c); | ------------------------------------------------^^- @@ -10,7 +10,7 @@ LL | } | - `c` dropped here while still borrowed error[E0597]: `c` does not live long enough - --> $DIR/method-ufcs-3.rs:45:48 + --> $DIR/method-ufcs-3.rs:43:48 | LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here @@ -24,7 +24,7 @@ LL | } | - `c` dropped here while still borrowed error[E0597]: `c` does not live long enough - --> $DIR/method-ufcs-3.rs:59:52 + --> $DIR/method-ufcs-3.rs:57:52 | LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here diff --git a/src/test/ui/nll/user-annotations/method-ufcs-inherent-2.rs b/src/test/ui/nll/user-annotations/method-ufcs-inherent-2.rs index a77d6af532..cfbc0bcf6b 100644 --- a/src/test/ui/nll/user-annotations/method-ufcs-inherent-2.rs +++ b/src/test/ui/nll/user-annotations/method-ufcs-inherent-2.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - // Check that substitutions given on the self type (here, `A`) can be // used in combination with annotations given for method arguments. diff --git a/src/test/ui/nll/user-annotations/method-ufcs-inherent-2.stderr b/src/test/ui/nll/user-annotations/method-ufcs-inherent-2.stderr index 4dc534b2e7..06f20d9b23 100644 --- a/src/test/ui/nll/user-annotations/method-ufcs-inherent-2.stderr +++ b/src/test/ui/nll/user-annotations/method-ufcs-inherent-2.stderr @@ -1,5 +1,5 @@ error[E0597]: `v` does not live long enough - --> $DIR/method-ufcs-inherent-2.rs:16:37 + --> $DIR/method-ufcs-inherent-2.rs:14:37 | LL | fn foo<'a>() { | -- lifetime `'a` defined here @@ -14,7 +14,7 @@ LL | } | - `v` dropped here while still borrowed error[E0597]: `v` does not live long enough - --> $DIR/method-ufcs-inherent-2.rs:16:41 + --> $DIR/method-ufcs-inherent-2.rs:14:41 | LL | fn foo<'a>() { | -- lifetime `'a` defined here diff --git a/src/test/ui/nll/user-annotations/method-ufcs-inherent-4.rs b/src/test/ui/nll/user-annotations/method-ufcs-inherent-4.rs index 3f88c3df48..85e7597390 100644 --- a/src/test/ui/nll/user-annotations/method-ufcs-inherent-4.rs +++ b/src/test/ui/nll/user-annotations/method-ufcs-inherent-4.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - // Check that inherent methods invoked with `::new` style // carry their annotations through to NLL in connection with // method type parameters. diff --git a/src/test/ui/nll/user-annotations/method-ufcs-inherent-4.stderr b/src/test/ui/nll/user-annotations/method-ufcs-inherent-4.stderr index a41cf50465..0f83e99cdf 100644 --- a/src/test/ui/nll/user-annotations/method-ufcs-inherent-4.stderr +++ b/src/test/ui/nll/user-annotations/method-ufcs-inherent-4.stderr @@ -1,5 +1,5 @@ error[E0597]: `v` does not live long enough - --> $DIR/method-ufcs-inherent-4.rs:17:37 + --> $DIR/method-ufcs-inherent-4.rs:15:37 | LL | fn foo<'a>() { | -- lifetime `'a` defined here @@ -14,7 +14,7 @@ LL | } | - `v` dropped here while still borrowed error[E0597]: `v` does not live long enough - --> $DIR/method-ufcs-inherent-4.rs:17:41 + --> $DIR/method-ufcs-inherent-4.rs:15:41 | LL | fn foo<'a>() { | -- lifetime `'a` defined here diff --git a/src/test/ui/nll/user-annotations/normalization.rs b/src/test/ui/nll/user-annotations/normalization.rs index e0af2e67e1..870e3d8110 100644 --- a/src/test/ui/nll/user-annotations/normalization.rs +++ b/src/test/ui/nll/user-annotations/normalization.rs @@ -1,8 +1,6 @@ // Test that we enforce a `&'static` requirement that is only visible // after normalization. -#![feature(nll)] - trait Foo { type Out; } impl Foo for () { type Out = &'static u32; } diff --git a/src/test/ui/nll/user-annotations/normalization.stderr b/src/test/ui/nll/user-annotations/normalization.stderr index fe93c3edba..4c7893789a 100644 --- a/src/test/ui/nll/user-annotations/normalization.stderr +++ b/src/test/ui/nll/user-annotations/normalization.stderr @@ -1,5 +1,5 @@ error[E0597]: `a` does not live long enough - --> $DIR/normalization.rs:11:31 + --> $DIR/normalization.rs:9:31 | LL | let b: <() as Foo>::Out = &a; | ---------------- ^^ borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/normalize-self-ty.rs b/src/test/ui/nll/user-annotations/normalize-self-ty.rs index d97cc88dd9..a06229a020 100644 --- a/src/test/ui/nll/user-annotations/normalize-self-ty.rs +++ b/src/test/ui/nll/user-annotations/normalize-self-ty.rs @@ -4,8 +4,6 @@ // // run-pass -#![feature(nll)] - trait Mirror { type Me; } diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.rs b/src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.rs index 526134b6e4..59cd69c0ca 100644 --- a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.rs +++ b/src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - enum Foo<'a> { Bar { field: &'a u32 } } diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.stderr b/src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.stderr index b483f219c9..a97e7a9fd4 100644 --- a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.stderr +++ b/src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.stderr @@ -1,5 +1,5 @@ error[E0597]: `y` does not live long enough - --> $DIR/pattern_substs_on_brace_enum_variant.rs:9:33 + --> $DIR/pattern_substs_on_brace_enum_variant.rs:7:33 | LL | let foo = Foo::Bar { field: &y }; | ^^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } | - `y` dropped here while still borrowed error[E0597]: `y` does not live long enough - --> $DIR/pattern_substs_on_brace_enum_variant.rs:16:33 + --> $DIR/pattern_substs_on_brace_enum_variant.rs:14:33 | LL | let foo = Foo::Bar { field: &y }; | ^^ borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.rs b/src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.rs index 1c92858eb3..1586c4ea30 100644 --- a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.rs +++ b/src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - struct Foo<'a> { field: &'a u32 } fn in_let() { diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.stderr b/src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.stderr index 9c888b0bff..408d7c2a5e 100644 --- a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.stderr +++ b/src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.stderr @@ -1,5 +1,5 @@ error[E0597]: `y` does not live long enough - --> $DIR/pattern_substs_on_brace_struct.rs:7:28 + --> $DIR/pattern_substs_on_brace_struct.rs:5:28 | LL | let foo = Foo { field: &y }; | ^^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } | - `y` dropped here while still borrowed error[E0597]: `y` does not live long enough - --> $DIR/pattern_substs_on_brace_struct.rs:14:28 + --> $DIR/pattern_substs_on_brace_struct.rs:12:28 | LL | let foo = Foo { field: &y }; | ^^ borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.rs b/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.rs index d6c364f8e3..6fa59fdd8d 100644 --- a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.rs +++ b/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - enum Foo<'a> { Bar(&'a u32) } diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.stderr b/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.stderr index 698cff5112..920c906f63 100644 --- a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.stderr +++ b/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.stderr @@ -1,5 +1,5 @@ error[E0597]: `y` does not live long enough - --> $DIR/pattern_substs_on_tuple_enum_variant.rs:9:24 + --> $DIR/pattern_substs_on_tuple_enum_variant.rs:7:24 | LL | let foo = Foo::Bar(&y); | ^^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } | - `y` dropped here while still borrowed error[E0597]: `y` does not live long enough - --> $DIR/pattern_substs_on_tuple_enum_variant.rs:16:24 + --> $DIR/pattern_substs_on_tuple_enum_variant.rs:14:24 | LL | let foo = Foo::Bar(&y); | ^^ borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.rs b/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.rs index 626ca90879..7486aab0e0 100644 --- a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.rs +++ b/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - struct Foo<'a>(&'a u32); fn in_let() { diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.stderr b/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.stderr index b5f2cb8e32..3f01638d84 100644 --- a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.stderr +++ b/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.stderr @@ -1,5 +1,5 @@ error[E0597]: `y` does not live long enough - --> $DIR/pattern_substs_on_tuple_struct.rs:7:19 + --> $DIR/pattern_substs_on_tuple_struct.rs:5:19 | LL | let foo = Foo(&y); | ^^ borrowed value does not live long enough @@ -10,7 +10,7 @@ LL | } | - `y` dropped here while still borrowed error[E0597]: `y` does not live long enough - --> $DIR/pattern_substs_on_tuple_struct.rs:14:19 + --> $DIR/pattern_substs_on_tuple_struct.rs:12:19 | LL | let foo = Foo(&y); | ^^ borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/patterns.stderr b/src/test/ui/nll/user-annotations/patterns.stderr index 1ac6283231..7ebd0ae227 100644 --- a/src/test/ui/nll/user-annotations/patterns.stderr +++ b/src/test/ui/nll/user-annotations/patterns.stderr @@ -185,5 +185,5 @@ LL | let (y, _z): (&'static u32, u32) = (x, 44); error: aborting due to 19 previous errors -Some errors occurred: E0597, E0716. +Some errors have detailed explanations: E0597, E0716. For more information about an error, try `rustc --explain E0597`. diff --git a/src/test/ui/nll/user-annotations/promoted-annotation.rs b/src/test/ui/nll/user-annotations/promoted-annotation.rs index fa2d2fb811..b92f8bfd23 100644 --- a/src/test/ui/nll/user-annotations/promoted-annotation.rs +++ b/src/test/ui/nll/user-annotations/promoted-annotation.rs @@ -1,7 +1,5 @@ // Test that type annotations are checked in promoted constants correctly. -#![feature(nll)] - fn foo<'a>() { let x = 0; let f = &drop::<&'a i32>; diff --git a/src/test/ui/nll/user-annotations/promoted-annotation.stderr b/src/test/ui/nll/user-annotations/promoted-annotation.stderr index d8b01f2214..cb99a6a369 100644 --- a/src/test/ui/nll/user-annotations/promoted-annotation.stderr +++ b/src/test/ui/nll/user-annotations/promoted-annotation.stderr @@ -1,5 +1,5 @@ error[E0597]: `x` does not live long enough - --> $DIR/promoted-annotation.rs:8:7 + --> $DIR/promoted-annotation.rs:6:7 | LL | fn foo<'a>() { | -- lifetime `'a` defined here diff --git a/src/test/ui/nll/user-annotations/type_ascription_static_lifetime.rs b/src/test/ui/nll/user-annotations/type_ascription_static_lifetime.rs index 362fe51c3e..101b5cfabb 100644 --- a/src/test/ui/nll/user-annotations/type_ascription_static_lifetime.rs +++ b/src/test/ui/nll/user-annotations/type_ascription_static_lifetime.rs @@ -1,5 +1,4 @@ #![allow(warnings)] -#![feature(nll)] #![feature(type_ascription)] fn main() { diff --git a/src/test/ui/nll/user-annotations/type_ascription_static_lifetime.stderr b/src/test/ui/nll/user-annotations/type_ascription_static_lifetime.stderr index 93dbf7cb1b..133bbef523 100644 --- a/src/test/ui/nll/user-annotations/type_ascription_static_lifetime.stderr +++ b/src/test/ui/nll/user-annotations/type_ascription_static_lifetime.stderr @@ -1,5 +1,5 @@ error[E0597]: `x` does not live long enough - --> $DIR/type_ascription_static_lifetime.rs:7:19 + --> $DIR/type_ascription_static_lifetime.rs:6:19 | LL | let y: &u32 = &x: &'static u32; | ^^-------------- diff --git a/src/test/ui/no-args-non-move-async-closure.rs b/src/test/ui/no-args-non-move-async-closure.rs index 4f5b2ea378..345f19b062 100644 --- a/src/test/ui/no-args-non-move-async-closure.rs +++ b/src/test/ui/no-args-non-move-async-closure.rs @@ -1,6 +1,6 @@ // edition:2018 -#![feature(arbitrary_self_types, async_await, await_macro, futures_api, pin)] +#![feature(async_await, await_macro)] fn main() { let _ = async |x: u8| {}; diff --git a/src/test/ui/no-args-non-move-async-closure.stderr b/src/test/ui/no-args-non-move-async-closure.stderr index e1d16f669a..1b4b86210f 100644 --- a/src/test/ui/no-args-non-move-async-closure.stderr +++ b/src/test/ui/no-args-non-move-async-closure.stderr @@ -8,4 +8,3 @@ LL | let _ = async |x: u8| {}; error: aborting due to previous error -For more information about this error, try `rustc --explain E0708`. diff --git a/src/test/ui/no-capture-arc.nll.stderr b/src/test/ui/no-capture-arc.nll.stderr deleted file mode 100644 index 476b6f75ab..0000000000 --- a/src/test/ui/no-capture-arc.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0382]: borrow of moved value: `arc_v` - --> $DIR/no-capture-arc.rs:14:18 - | -LL | let arc_v = Arc::new(v); - | ----- move occurs because `arc_v` has type `std::sync::Arc>`, which does not implement the `Copy` trait -LL | -LL | thread::spawn(move|| { - | ------ value moved into closure here -LL | assert_eq!((*arc_v)[3], 4); - | ----- variable moved due to use in closure -... -LL | assert_eq!((*arc_v)[2], 3); - | ^^^^^ value borrowed here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/no-capture-arc.rs b/src/test/ui/no-capture-arc.rs index 06f5fb3da3..3f0b075778 100644 --- a/src/test/ui/no-capture-arc.rs +++ b/src/test/ui/no-capture-arc.rs @@ -1,4 +1,4 @@ -// error-pattern: use of moved value +// error-pattern: borrow of moved value use std::sync::Arc; use std::thread; diff --git a/src/test/ui/no-capture-arc.stderr b/src/test/ui/no-capture-arc.stderr index 0dfa5cdbe9..476b6f75ab 100644 --- a/src/test/ui/no-capture-arc.stderr +++ b/src/test/ui/no-capture-arc.stderr @@ -1,25 +1,17 @@ -error[E0382]: use of moved value: `arc_v` +error[E0382]: borrow of moved value: `arc_v` --> $DIR/no-capture-arc.rs:14:18 | +LL | let arc_v = Arc::new(v); + | ----- move occurs because `arc_v` has type `std::sync::Arc>`, which does not implement the `Copy` trait +LL | LL | thread::spawn(move|| { - | ------ value moved (into closure) here + | ------ value moved into closure here +LL | assert_eq!((*arc_v)[3], 4); + | ----- variable moved due to use in closure ... LL | assert_eq!((*arc_v)[2], 3); - | ^^^^^ value used here after move - | - = note: move occurs because `arc_v` has type `std::sync::Arc>`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `arc_v` - --> $DIR/no-capture-arc.rs:16:23 - | -LL | thread::spawn(move|| { - | ------ value moved (into closure) here -... -LL | println!("{:?}", *arc_v); - | ^^^^^ value used here after move - | - = note: move occurs because `arc_v` has type `std::sync::Arc>`, which does not implement the `Copy` trait + | ^^^^^ value borrowed here after move -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/no-implicit-prelude-nested.stderr b/src/test/ui/no-implicit-prelude-nested.stderr index 521ed8f2cf..79b9396d41 100644 --- a/src/test/ui/no-implicit-prelude-nested.stderr +++ b/src/test/ui/no-implicit-prelude-nested.stderr @@ -192,5 +192,5 @@ LL | use std::prelude::v1::drop; error: aborting due to 18 previous errors -Some errors occurred: E0405, E0425. +Some errors have detailed explanations: E0405, E0425. For more information about an error, try `rustc --explain E0405`. diff --git a/src/test/ui/no-implicit-prelude.stderr b/src/test/ui/no-implicit-prelude.stderr index e5c54ddd10..eac1fcb7b6 100644 --- a/src/test/ui/no-implicit-prelude.stderr +++ b/src/test/ui/no-implicit-prelude.stderr @@ -64,5 +64,5 @@ LL | use std::prelude::v1::drop; error: aborting due to 6 previous errors -Some errors occurred: E0405, E0425. +Some errors have detailed explanations: E0405, E0425. For more information about an error, try `rustc --explain E0405`. diff --git a/src/test/ui/no-patterns-in-args-macro.stderr b/src/test/ui/no-patterns-in-args-macro.stderr index 28a48bf6a8..680430a05e 100644 --- a/src/test/ui/no-patterns-in-args-macro.stderr +++ b/src/test/ui/no-patterns-in-args-macro.stderr @@ -18,5 +18,5 @@ LL | m!((bad, pat)); error: aborting due to 3 previous errors -Some errors occurred: E0130, E0561, E0642. +Some errors have detailed explanations: E0130, E0642. For more information about an error, try `rustc --explain E0130`. diff --git a/src/test/ui/no-patterns-in-args.stderr b/src/test/ui/no-patterns-in-args.stderr index 0768c3f4de..b65e0ecd25 100644 --- a/src/test/ui/no-patterns-in-args.stderr +++ b/src/test/ui/no-patterns-in-args.stderr @@ -30,5 +30,4 @@ LL | type A2 = fn(&arg: u8); error: aborting due to 5 previous errors -Some errors occurred: E0130, E0561. -For more information about an error, try `rustc --explain E0130`. +For more information about this error, try `rustc --explain E0130`. diff --git a/src/test/ui/no-reuse-move-arc.nll.stderr b/src/test/ui/no-reuse-move-arc.nll.stderr deleted file mode 100644 index 3f7169e6fc..0000000000 --- a/src/test/ui/no-reuse-move-arc.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0382]: borrow of moved value: `arc_v` - --> $DIR/no-reuse-move-arc.rs:12:18 - | -LL | let arc_v = Arc::new(v); - | ----- move occurs because `arc_v` has type `std::sync::Arc>`, which does not implement the `Copy` trait -LL | -LL | thread::spawn(move|| { - | ------ value moved into closure here -LL | assert_eq!((*arc_v)[3], 4); - | ----- variable moved due to use in closure -... -LL | assert_eq!((*arc_v)[2], 3); - | ^^^^^ value borrowed here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/no-reuse-move-arc.rs b/src/test/ui/no-reuse-move-arc.rs index b60a7f2499..9c957a4e01 100644 --- a/src/test/ui/no-reuse-move-arc.rs +++ b/src/test/ui/no-reuse-move-arc.rs @@ -9,7 +9,7 @@ fn main() { assert_eq!((*arc_v)[3], 4); }); - assert_eq!((*arc_v)[2], 3); //~ ERROR use of moved value: `arc_v` + assert_eq!((*arc_v)[2], 3); //~ ERROR borrow of moved value: `arc_v` - println!("{:?}", *arc_v); //~ ERROR use of moved value: `arc_v` + println!("{:?}", *arc_v); } diff --git a/src/test/ui/no-reuse-move-arc.stderr b/src/test/ui/no-reuse-move-arc.stderr index d712331478..3f7169e6fc 100644 --- a/src/test/ui/no-reuse-move-arc.stderr +++ b/src/test/ui/no-reuse-move-arc.stderr @@ -1,25 +1,17 @@ -error[E0382]: use of moved value: `arc_v` +error[E0382]: borrow of moved value: `arc_v` --> $DIR/no-reuse-move-arc.rs:12:18 | +LL | let arc_v = Arc::new(v); + | ----- move occurs because `arc_v` has type `std::sync::Arc>`, which does not implement the `Copy` trait +LL | LL | thread::spawn(move|| { - | ------ value moved (into closure) here + | ------ value moved into closure here +LL | assert_eq!((*arc_v)[3], 4); + | ----- variable moved due to use in closure ... LL | assert_eq!((*arc_v)[2], 3); - | ^^^^^ value used here after move - | - = note: move occurs because `arc_v` has type `std::sync::Arc>`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `arc_v` - --> $DIR/no-reuse-move-arc.rs:14:23 - | -LL | thread::spawn(move|| { - | ------ value moved (into closure) here -... -LL | println!("{:?}", *arc_v); - | ^^^^^ value used here after move - | - = note: move occurs because `arc_v` has type `std::sync::Arc>`, which does not implement the `Copy` trait + | ^^^^^ value borrowed here after move -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/non-interger-atomic.stderr b/src/test/ui/non-interger-atomic.stderr index 9a49ee88d0..7d1130d238 100644 --- a/src/test/ui/non-interger-atomic.stderr +++ b/src/test/ui/non-interger-atomic.stderr @@ -96,4 +96,3 @@ LL | intrinsics::atomic_cxchg(p, v, v); error: aborting due to 16 previous errors -For more information about this error, try `rustc --explain E0511`. diff --git a/src/test/ui/not-copy-closure.nll.stderr b/src/test/ui/not-copy-closure.nll.stderr deleted file mode 100644 index 10bf570727..0000000000 --- a/src/test/ui/not-copy-closure.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0382]: use of moved value: `hello` - --> $DIR/not-copy-closure.rs:10:13 - | -LL | let b = hello; - | ----- value moved here -LL | let c = hello; - | ^^^^^ value used here after move - | -note: closure cannot be moved more than once as it is not `Copy` due to moving the variable `a` out of its environment - --> $DIR/not-copy-closure.rs:6:9 - | -LL | a += 1; - | ^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/not-copy-closure.stderr b/src/test/ui/not-copy-closure.stderr index 4144753797..10bf570727 100644 --- a/src/test/ui/not-copy-closure.stderr +++ b/src/test/ui/not-copy-closure.stderr @@ -1,12 +1,12 @@ error[E0382]: use of moved value: `hello` - --> $DIR/not-copy-closure.rs:10:9 + --> $DIR/not-copy-closure.rs:10:13 | LL | let b = hello; - | - value moved here + | ----- value moved here LL | let c = hello; - | ^ value used here after move + | ^^^^^ value used here after move | -note: closure cannot be invoked more than once because it moves the variable `a` out of its environment +note: closure cannot be moved more than once as it is not `Copy` due to moving the variable `a` out of its environment --> $DIR/not-copy-closure.rs:6:9 | LL | a += 1; diff --git a/src/test/ui/numeric/const-scope.rs b/src/test/ui/numeric/const-scope.rs new file mode 100644 index 0000000000..053599a9bb --- /dev/null +++ b/src/test/ui/numeric/const-scope.rs @@ -0,0 +1,12 @@ +const C: i32 = 1i8; //~ ERROR mismatched types +const D: i8 = C; //~ ERROR mismatched types + +const fn foo() { + let c: i32 = 1i8; //~ ERROR mismatched types + let d: i8 = c; //~ ERROR mismatched types +} + +fn main() { + let c: i32 = 1i8; //~ ERROR mismatched types + let d: i8 = c; //~ ERROR mismatched types +} diff --git a/src/test/ui/numeric/const-scope.stderr b/src/test/ui/numeric/const-scope.stderr new file mode 100644 index 0000000000..3f69bcc7d4 --- /dev/null +++ b/src/test/ui/numeric/const-scope.stderr @@ -0,0 +1,47 @@ +error[E0308]: mismatched types + --> $DIR/const-scope.rs:1:16 + | +LL | const C: i32 = 1i8; + | ^^^ expected i32, found i8 + +error[E0308]: mismatched types + --> $DIR/const-scope.rs:2:15 + | +LL | const D: i8 = C; + | ^ expected i8, found i32 + +error[E0308]: mismatched types + --> $DIR/const-scope.rs:5:18 + | +LL | let c: i32 = 1i8; + | ^^^ expected i32, found i8 + +error[E0308]: mismatched types + --> $DIR/const-scope.rs:6:17 + | +LL | let d: i8 = c; + | ^ expected i8, found i32 + +error[E0308]: mismatched types + --> $DIR/const-scope.rs:10:18 + | +LL | let c: i32 = 1i8; + | ^^^ expected i32, found i8 +help: change the type of the numeric literal from `i8` to `i32` + | +LL | let c: i32 = 1i32; + | ^^^^ + +error[E0308]: mismatched types + --> $DIR/const-scope.rs:11:17 + | +LL | let d: i8 = c; + | ^ expected i8, found i32 +help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit + | +LL | let d: i8 = c.try_into().unwrap(); + | ^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 6 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/numeric/len.rs b/src/test/ui/numeric/len.rs new file mode 100644 index 0000000000..a725409882 --- /dev/null +++ b/src/test/ui/numeric/len.rs @@ -0,0 +1,8 @@ +fn main() { + let array = [1, 2, 3]; + test(array.len()); //~ ERROR mismatched types +} + +fn test(length: u32) { + println!("{}", length); +} diff --git a/src/test/ui/numeric/len.stderr b/src/test/ui/numeric/len.stderr new file mode 100644 index 0000000000..c767bdd9bd --- /dev/null +++ b/src/test/ui/numeric/len.stderr @@ -0,0 +1,13 @@ +error[E0308]: mismatched types + --> $DIR/len.rs:3:10 + | +LL | test(array.len()); + | ^^^^^^^^^^^ expected u32, found usize +help: you can convert an `usize` to `u32` and panic if the converted value wouldn't fit + | +LL | test(array.len().try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/numeric/numeric-cast-2.stderr b/src/test/ui/numeric/numeric-cast-2.stderr index 79088f0e2c..f58389ce96 100644 --- a/src/test/ui/numeric/numeric-cast-2.stderr +++ b/src/test/ui/numeric/numeric-cast-2.stderr @@ -3,18 +3,30 @@ error[E0308]: mismatched types | LL | let x: u16 = foo(); | ^^^^^ expected u16, found i32 +help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit + | +LL | let x: u16 = foo().try_into().unwrap(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/numeric-cast-2.rs:7:18 | LL | let y: i64 = x + x; | ^^^^^ expected i64, found u16 +help: you can convert an `u16` to `i64` and panic if the converted value wouldn't fit + | +LL | let y: i64 = (x + x).try_into().unwrap(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/numeric-cast-2.rs:9:18 | LL | let z: i32 = x + x; | ^^^^^ expected i32, found u16 +help: you can convert an `u16` to `i32` and panic if the converted value wouldn't fit + | +LL | let z: i32 = (x + x).try_into().unwrap(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/numeric/numeric-cast-without-suggestion.rs b/src/test/ui/numeric/numeric-cast-without-suggestion.rs new file mode 100644 index 0000000000..faf24a8c18 --- /dev/null +++ b/src/test/ui/numeric/numeric-cast-without-suggestion.rs @@ -0,0 +1,38 @@ +fn foo(_x: N) {} + +fn main() { + let x_usize: usize = 1; + let x_u64: u64 = 2; + let x_u32: u32 = 3; + let x_u16: u16 = 4; + let x_u8: u8 = 5; + let x_isize: isize = 6; + let x_i64: i64 = 7; + let x_i32: i32 = 8; + let x_i16: i16 = 9; + let x_i8: i8 = 10; + let x_f64: f64 = 11.0; + let x_f32: f32 = 12.0; + + foo::(x_f64); //~ ERROR mismatched types + foo::(x_f32); //~ ERROR mismatched types + foo::(x_f64); //~ ERROR mismatched types + foo::(x_f32); //~ ERROR mismatched types + foo::(x_f64); //~ ERROR mismatched types + foo::(x_f32); //~ ERROR mismatched types + foo::(x_f64); //~ ERROR mismatched types + foo::(x_f32); //~ ERROR mismatched types + foo::(x_f64); //~ ERROR mismatched types + foo::(x_f32); //~ ERROR mismatched types + foo::(x_f64); //~ ERROR mismatched types + foo::(x_f32); //~ ERROR mismatched types + foo::(x_f64); //~ ERROR mismatched types + foo::(x_f32); //~ ERROR mismatched types + foo::(x_f64); //~ ERROR mismatched types + foo::(x_f32); //~ ERROR mismatched types + foo::(x_f64); //~ ERROR mismatched types + foo::(x_f32); //~ ERROR mismatched types + foo::(x_f64); //~ ERROR mismatched types + foo::(x_f32); //~ ERROR mismatched types + foo::(x_f64); //~ ERROR mismatched types +} diff --git a/src/test/ui/numeric/numeric-cast-without-suggestion.stderr b/src/test/ui/numeric/numeric-cast-without-suggestion.stderr new file mode 100644 index 0000000000..a79eaea16e --- /dev/null +++ b/src/test/ui/numeric/numeric-cast-without-suggestion.stderr @@ -0,0 +1,129 @@ +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:17:18 + | +LL | foo::(x_f64); + | ^^^^^ expected usize, found f64 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:18:18 + | +LL | foo::(x_f32); + | ^^^^^ expected usize, found f32 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:19:18 + | +LL | foo::(x_f64); + | ^^^^^ expected isize, found f64 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:20:18 + | +LL | foo::(x_f32); + | ^^^^^ expected isize, found f32 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:21:16 + | +LL | foo::(x_f64); + | ^^^^^ expected u64, found f64 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:22:16 + | +LL | foo::(x_f32); + | ^^^^^ expected u64, found f32 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:23:16 + | +LL | foo::(x_f64); + | ^^^^^ expected i64, found f64 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:24:16 + | +LL | foo::(x_f32); + | ^^^^^ expected i64, found f32 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:25:16 + | +LL | foo::(x_f64); + | ^^^^^ expected u32, found f64 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:26:16 + | +LL | foo::(x_f32); + | ^^^^^ expected u32, found f32 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:27:16 + | +LL | foo::(x_f64); + | ^^^^^ expected i32, found f64 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:28:16 + | +LL | foo::(x_f32); + | ^^^^^ expected i32, found f32 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:29:16 + | +LL | foo::(x_f64); + | ^^^^^ expected u16, found f64 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:30:16 + | +LL | foo::(x_f32); + | ^^^^^ expected u16, found f32 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:31:16 + | +LL | foo::(x_f64); + | ^^^^^ expected i16, found f64 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:32:16 + | +LL | foo::(x_f32); + | ^^^^^ expected i16, found f32 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:33:15 + | +LL | foo::(x_f64); + | ^^^^^ expected u8, found f64 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:34:15 + | +LL | foo::(x_f32); + | ^^^^^ expected u8, found f32 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:35:15 + | +LL | foo::(x_f64); + | ^^^^^ expected i8, found f64 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:36:15 + | +LL | foo::(x_f32); + | ^^^^^ expected i8, found f32 + +error[E0308]: mismatched types + --> $DIR/numeric-cast-without-suggestion.rs:37:16 + | +LL | foo::(x_f64); + | ^^^^^ expected f32, found f64 + +error: aborting due to 21 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/numeric/numeric-cast.fixed b/src/test/ui/numeric/numeric-cast.fixed new file mode 100644 index 0000000000..6f78228a85 --- /dev/null +++ b/src/test/ui/numeric/numeric-cast.fixed @@ -0,0 +1,293 @@ +// run-rustfix + +// The `try_into` suggestion doesn't include this, but we do suggest it after applying it +use std::convert::TryInto; + +fn foo(_x: N) {} + +fn main() { + let x_usize: usize = 1; + let x_u64: u64 = 2; + let x_u32: u32 = 3; + let x_u16: u16 = 4; + let x_u8: u8 = 5; + let x_isize: isize = 6; + let x_i64: i64 = 7; + let x_i32: i32 = 8; + let x_i16: i16 = 9; + let x_i8: i8 = 10; + let x_f64: f64 = 11.0; + let x_f32: f32 = 12.0; + + foo::(x_usize); + foo::(x_u64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u32.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u16.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u8.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_isize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i32.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i16.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i8.try_into().unwrap()); + //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); + + foo::(x_usize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u32.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u16.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u8.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_isize); + foo::(x_i64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i32.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i16.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i8.try_into().unwrap()); + //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); + + foo::(x_usize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u64); + foo::(x_u32.into()); + //~^ ERROR mismatched types + foo::(x_u16.into()); + //~^ ERROR mismatched types + foo::(x_u8.into()); + //~^ ERROR mismatched types + foo::(x_isize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i32.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i16.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i8.try_into().unwrap()); + //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); + + foo::(x_usize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u32.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u16.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u8.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_isize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i64); + foo::(x_i32.into()); + //~^ ERROR mismatched types + foo::(x_i16.into()); + //~^ ERROR mismatched types + foo::(x_i8.into()); + //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); + + foo::(x_usize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u32); + foo::(x_u16.into()); + //~^ ERROR mismatched types + foo::(x_u8.into()); + //~^ ERROR mismatched types + foo::(x_isize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i32.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i16.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i8.try_into().unwrap()); + //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); + + foo::(x_usize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u32.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u16.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u8.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_isize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i32); + foo::(x_i16.into()); + //~^ ERROR mismatched types + foo::(x_i8.into()); + //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); + + foo::(x_usize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u32.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u16); + foo::(x_u8.into()); + //~^ ERROR mismatched types + foo::(x_isize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i32.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i16.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i8.try_into().unwrap()); + //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); + + foo::(x_usize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u32.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u16.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u8.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_isize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i32.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i16); + foo::(x_i8.into()); + //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); + + foo::(x_usize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u32.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u16.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u8); + foo::(x_isize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i32.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i16.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i8.try_into().unwrap()); + //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); + + foo::(x_usize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u32.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u16.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_u8.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_isize.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i64.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i32.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i16.try_into().unwrap()); + //~^ ERROR mismatched types + foo::(x_i8); + // foo::(x_f64); + // foo::(x_f32); + + foo::(x_usize as f64); + //~^ ERROR mismatched types + foo::(x_u64 as f64); + //~^ ERROR mismatched types + foo::(x_u32.into()); + //~^ ERROR mismatched types + foo::(x_u16.into()); + //~^ ERROR mismatched types + foo::(x_u8.into()); + //~^ ERROR mismatched types + foo::(x_isize as f64); + //~^ ERROR mismatched types + foo::(x_i64 as f64); + //~^ ERROR mismatched types + foo::(x_i32.into()); + //~^ ERROR mismatched types + foo::(x_i16.into()); + //~^ ERROR mismatched types + foo::(x_i8.into()); + //~^ ERROR mismatched types + foo::(x_f64); + foo::(x_f32.into()); + //~^ ERROR mismatched types + + foo::(x_usize as f32); + //~^ ERROR mismatched types + foo::(x_u64 as f32); + //~^ ERROR mismatched types + foo::(x_u32 as f32); + //~^ ERROR mismatched types + foo::(x_u16.into()); + //~^ ERROR mismatched types + foo::(x_u8.into()); + //~^ ERROR mismatched types + foo::(x_isize as f32); + //~^ ERROR mismatched types + foo::(x_i64 as f32); + //~^ ERROR mismatched types + foo::(x_i32 as f32); + //~^ ERROR mismatched types + foo::(x_i16.into()); + //~^ ERROR mismatched types + foo::(x_i8.into()); + //~^ ERROR mismatched types + // foo::(x_f64); + foo::(x_f32); + + foo::((x_u8 as u16).into()); + //~^ ERROR mismatched types + foo::((-x_i8).into()); + //~^ ERROR mismatched types +} diff --git a/src/test/ui/numeric/numeric-cast.rs b/src/test/ui/numeric/numeric-cast.rs index 39378c288f..7bddfc5090 100644 --- a/src/test/ui/numeric/numeric-cast.rs +++ b/src/test/ui/numeric/numeric-cast.rs @@ -1,3 +1,8 @@ +// run-rustfix + +// The `try_into` suggestion doesn't include this, but we do suggest it after applying it +use std::convert::TryInto; + fn foo(_x: N) {} fn main() { @@ -33,10 +38,8 @@ fn main() { //~^ ERROR mismatched types foo::(x_i8); //~^ ERROR mismatched types - foo::(x_f64); - //~^ ERROR mismatched types - foo::(x_f32); - //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); foo::(x_usize); //~^ ERROR mismatched types @@ -57,10 +60,8 @@ fn main() { //~^ ERROR mismatched types foo::(x_i8); //~^ ERROR mismatched types - foo::(x_f64); - //~^ ERROR mismatched types - foo::(x_f32); - //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); foo::(x_usize); //~^ ERROR mismatched types @@ -81,10 +82,8 @@ fn main() { //~^ ERROR mismatched types foo::(x_i8); //~^ ERROR mismatched types - foo::(x_f64); - //~^ ERROR mismatched types - foo::(x_f32); - //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); foo::(x_usize); //~^ ERROR mismatched types @@ -105,10 +104,8 @@ fn main() { //~^ ERROR mismatched types foo::(x_i8); //~^ ERROR mismatched types - foo::(x_f64); - //~^ ERROR mismatched types - foo::(x_f32); - //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); foo::(x_usize); //~^ ERROR mismatched types @@ -129,10 +126,8 @@ fn main() { //~^ ERROR mismatched types foo::(x_i8); //~^ ERROR mismatched types - foo::(x_f64); - //~^ ERROR mismatched types - foo::(x_f32); - //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); foo::(x_usize); //~^ ERROR mismatched types @@ -153,10 +148,8 @@ fn main() { //~^ ERROR mismatched types foo::(x_i8); //~^ ERROR mismatched types - foo::(x_f64); - //~^ ERROR mismatched types - foo::(x_f32); - //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); foo::(x_usize); //~^ ERROR mismatched types @@ -177,10 +170,8 @@ fn main() { //~^ ERROR mismatched types foo::(x_i8); //~^ ERROR mismatched types - foo::(x_f64); - //~^ ERROR mismatched types - foo::(x_f32); - //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); foo::(x_usize); //~^ ERROR mismatched types @@ -201,10 +192,8 @@ fn main() { foo::(x_i16); foo::(x_i8); //~^ ERROR mismatched types - foo::(x_f64); - //~^ ERROR mismatched types - foo::(x_f32); - //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); foo::(x_usize); //~^ ERROR mismatched types @@ -225,10 +214,8 @@ fn main() { //~^ ERROR mismatched types foo::(x_i8); //~^ ERROR mismatched types - foo::(x_f64); - //~^ ERROR mismatched types - foo::(x_f32); - //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); foo::(x_usize); //~^ ERROR mismatched types @@ -249,10 +236,8 @@ fn main() { foo::(x_i16); //~^ ERROR mismatched types foo::(x_i8); - foo::(x_f64); - //~^ ERROR mismatched types - foo::(x_f32); - //~^ ERROR mismatched types + // foo::(x_f64); + // foo::(x_f32); foo::(x_usize); //~^ ERROR mismatched types @@ -298,8 +283,7 @@ fn main() { //~^ ERROR mismatched types foo::(x_i8); //~^ ERROR mismatched types - foo::(x_f64); - //~^ ERROR mismatched types + // foo::(x_f64); foo::(x_f32); foo::(x_u8 as u16); diff --git a/src/test/ui/numeric/numeric-cast.stderr b/src/test/ui/numeric/numeric-cast.stderr index 2c4f6e20f1..e66b83f2b3 100644 --- a/src/test/ui/numeric/numeric-cast.stderr +++ b/src/test/ui/numeric/numeric-cast.stderr @@ -1,907 +1,1118 @@ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:18:18 + --> $DIR/numeric-cast.rs:23:18 | LL | foo::(x_u64); | ^^^^^ expected usize, found u64 +help: you can convert an `u64` to `usize` and panic if the converted value wouldn't fit + | +LL | foo::(x_u64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:20:18 + --> $DIR/numeric-cast.rs:25:18 | LL | foo::(x_u32); | ^^^^^ expected usize, found u32 +help: you can convert an `u32` to `usize` and panic if the converted value wouldn't fit + | +LL | foo::(x_u32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:22:18 + --> $DIR/numeric-cast.rs:27:18 | LL | foo::(x_u16); | ^^^^^ expected usize, found u16 +help: you can convert an `u16` to `usize` and panic if the converted value wouldn't fit + | +LL | foo::(x_u16.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:24:18 + --> $DIR/numeric-cast.rs:29:18 | LL | foo::(x_u8); | ^^^^ expected usize, found u8 +help: you can convert an `u8` to `usize` and panic if the converted value wouldn't fit + | +LL | foo::(x_u8.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:26:18 + --> $DIR/numeric-cast.rs:31:18 | LL | foo::(x_isize); | ^^^^^^^ expected usize, found isize +help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit + | +LL | foo::(x_isize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:28:18 + --> $DIR/numeric-cast.rs:33:18 | LL | foo::(x_i64); | ^^^^^ expected usize, found i64 +help: you can convert an `i64` to `usize` and panic if the converted value wouldn't fit + | +LL | foo::(x_i64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:30:18 + --> $DIR/numeric-cast.rs:35:18 | LL | foo::(x_i32); | ^^^^^ expected usize, found i32 +help: you can convert an `i32` to `usize` and panic if the converted value wouldn't fit + | +LL | foo::(x_i32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:32:18 + --> $DIR/numeric-cast.rs:37:18 | LL | foo::(x_i16); | ^^^^^ expected usize, found i16 +help: you can convert an `i16` to `usize` and panic if the converted value wouldn't fit + | +LL | foo::(x_i16.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:34:18 + --> $DIR/numeric-cast.rs:39:18 | LL | foo::(x_i8); | ^^^^ expected usize, found i8 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:36:18 +help: you can convert an `i8` to `usize` and panic if the converted value wouldn't fit | -LL | foo::(x_f64); - | ^^^^^ expected usize, found f64 +LL | foo::(x_i8.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:38:18 - | -LL | foo::(x_f32); - | ^^^^^ expected usize, found f32 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:41:18 + --> $DIR/numeric-cast.rs:44:18 | LL | foo::(x_usize); | ^^^^^^^ expected isize, found usize +help: you can convert an `usize` to `isize` and panic if the converted value wouldn't fit + | +LL | foo::(x_usize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:43:18 + --> $DIR/numeric-cast.rs:46:18 | LL | foo::(x_u64); | ^^^^^ expected isize, found u64 +help: you can convert an `u64` to `isize` and panic if the converted value wouldn't fit + | +LL | foo::(x_u64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:45:18 + --> $DIR/numeric-cast.rs:48:18 | LL | foo::(x_u32); | ^^^^^ expected isize, found u32 +help: you can convert an `u32` to `isize` and panic if the converted value wouldn't fit + | +LL | foo::(x_u32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:47:18 + --> $DIR/numeric-cast.rs:50:18 | LL | foo::(x_u16); | ^^^^^ expected isize, found u16 +help: you can convert an `u16` to `isize` and panic if the converted value wouldn't fit + | +LL | foo::(x_u16.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:49:18 + --> $DIR/numeric-cast.rs:52:18 | LL | foo::(x_u8); | ^^^^ expected isize, found u8 +help: you can convert an `u8` to `isize` and panic if the converted value wouldn't fit + | +LL | foo::(x_u8.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:52:18 + --> $DIR/numeric-cast.rs:55:18 | LL | foo::(x_i64); | ^^^^^ expected isize, found i64 +help: you can convert an `i64` to `isize` and panic if the converted value wouldn't fit + | +LL | foo::(x_i64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:54:18 + --> $DIR/numeric-cast.rs:57:18 | LL | foo::(x_i32); | ^^^^^ expected isize, found i32 +help: you can convert an `i32` to `isize` and panic if the converted value wouldn't fit + | +LL | foo::(x_i32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:56:18 + --> $DIR/numeric-cast.rs:59:18 | LL | foo::(x_i16); | ^^^^^ expected isize, found i16 +help: you can convert an `i16` to `isize` and panic if the converted value wouldn't fit + | +LL | foo::(x_i16.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:58:18 + --> $DIR/numeric-cast.rs:61:18 | LL | foo::(x_i8); | ^^^^ expected isize, found i8 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:60:18 +help: you can convert an `i8` to `isize` and panic if the converted value wouldn't fit | -LL | foo::(x_f64); - | ^^^^^ expected isize, found f64 +LL | foo::(x_i8.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:62:18 - | -LL | foo::(x_f32); - | ^^^^^ expected isize, found f32 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:65:16 + --> $DIR/numeric-cast.rs:66:16 | LL | foo::(x_usize); | ^^^^^^^ expected u64, found usize +help: you can convert an `usize` to `u64` and panic if the converted value wouldn't fit + | +LL | foo::(x_usize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:68:16 + --> $DIR/numeric-cast.rs:69:16 | LL | foo::(x_u32); - | ^^^^^ expected u64, found u32 -help: you can cast an `u32` to `u64`, which will zero-extend the source value - | -LL | foo::(x_u32.into()); - | ^^^^^^^^^^^^ + | ^^^^^ + | | + | expected u64, found u32 + | help: you can convert an `u32` to `u64`: `x_u32.into()` error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:70:16 + --> $DIR/numeric-cast.rs:71:16 | LL | foo::(x_u16); - | ^^^^^ expected u64, found u16 -help: you can cast an `u16` to `u64`, which will zero-extend the source value - | -LL | foo::(x_u16.into()); - | ^^^^^^^^^^^^ + | ^^^^^ + | | + | expected u64, found u16 + | help: you can convert an `u16` to `u64`: `x_u16.into()` error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:72:16 + --> $DIR/numeric-cast.rs:73:16 | LL | foo::(x_u8); - | ^^^^ expected u64, found u8 -help: you can cast an `u8` to `u64`, which will zero-extend the source value - | -LL | foo::(x_u8.into()); - | ^^^^^^^^^^^ + | ^^^^ + | | + | expected u64, found u8 + | help: you can convert an `u8` to `u64`: `x_u8.into()` error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:74:16 + --> $DIR/numeric-cast.rs:75:16 | LL | foo::(x_isize); | ^^^^^^^ expected u64, found isize +help: you can convert an `isize` to `u64` and panic if the converted value wouldn't fit + | +LL | foo::(x_isize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:76:16 + --> $DIR/numeric-cast.rs:77:16 | LL | foo::(x_i64); | ^^^^^ expected u64, found i64 +help: you can convert an `i64` to `u64` and panic if the converted value wouldn't fit + | +LL | foo::(x_i64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:78:16 + --> $DIR/numeric-cast.rs:79:16 | LL | foo::(x_i32); | ^^^^^ expected u64, found i32 +help: you can convert an `i32` to `u64` and panic if the converted value wouldn't fit + | +LL | foo::(x_i32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:80:16 + --> $DIR/numeric-cast.rs:81:16 | LL | foo::(x_i16); | ^^^^^ expected u64, found i16 +help: you can convert an `i16` to `u64` and panic if the converted value wouldn't fit + | +LL | foo::(x_i16.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:82:16 + --> $DIR/numeric-cast.rs:83:16 | LL | foo::(x_i8); | ^^^^ expected u64, found i8 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:84:16 +help: you can convert an `i8` to `u64` and panic if the converted value wouldn't fit | -LL | foo::(x_f64); - | ^^^^^ expected u64, found f64 +LL | foo::(x_i8.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:86:16 - | -LL | foo::(x_f32); - | ^^^^^ expected u64, found f32 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:89:16 + --> $DIR/numeric-cast.rs:88:16 | LL | foo::(x_usize); | ^^^^^^^ expected i64, found usize +help: you can convert an `usize` to `i64` and panic if the converted value wouldn't fit + | +LL | foo::(x_usize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:91:16 + --> $DIR/numeric-cast.rs:90:16 | LL | foo::(x_u64); | ^^^^^ expected i64, found u64 +help: you can convert an `u64` to `i64` and panic if the converted value wouldn't fit + | +LL | foo::(x_u64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:93:16 + --> $DIR/numeric-cast.rs:92:16 | LL | foo::(x_u32); | ^^^^^ expected i64, found u32 +help: you can convert an `u32` to `i64` and panic if the converted value wouldn't fit + | +LL | foo::(x_u32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:95:16 + --> $DIR/numeric-cast.rs:94:16 | LL | foo::(x_u16); | ^^^^^ expected i64, found u16 +help: you can convert an `u16` to `i64` and panic if the converted value wouldn't fit + | +LL | foo::(x_u16.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:97:16 + --> $DIR/numeric-cast.rs:96:16 | LL | foo::(x_u8); | ^^^^ expected i64, found u8 +help: you can convert an `u8` to `i64` and panic if the converted value wouldn't fit + | +LL | foo::(x_u8.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:99:16 + --> $DIR/numeric-cast.rs:98:16 | LL | foo::(x_isize); | ^^^^^^^ expected i64, found isize +help: you can convert an `isize` to `i64` and panic if the converted value wouldn't fit + | +LL | foo::(x_isize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:102:16 + --> $DIR/numeric-cast.rs:101:16 | LL | foo::(x_i32); - | ^^^^^ expected i64, found i32 -help: you can cast an `i32` to `i64`, which will sign-extend the source value - | -LL | foo::(x_i32.into()); - | ^^^^^^^^^^^^ + | ^^^^^ + | | + | expected i64, found i32 + | help: you can convert an `i32` to `i64`: `x_i32.into()` error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:104:16 + --> $DIR/numeric-cast.rs:103:16 | LL | foo::(x_i16); - | ^^^^^ expected i64, found i16 -help: you can cast an `i16` to `i64`, which will sign-extend the source value - | -LL | foo::(x_i16.into()); - | ^^^^^^^^^^^^ + | ^^^^^ + | | + | expected i64, found i16 + | help: you can convert an `i16` to `i64`: `x_i16.into()` error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:106:16 + --> $DIR/numeric-cast.rs:105:16 | LL | foo::(x_i8); - | ^^^^ expected i64, found i8 -help: you can cast an `i8` to `i64`, which will sign-extend the source value - | -LL | foo::(x_i8.into()); - | ^^^^^^^^^^^ - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:108:16 - | -LL | foo::(x_f64); - | ^^^^^ expected i64, found f64 + | ^^^^ + | | + | expected i64, found i8 + | help: you can convert an `i8` to `i64`: `x_i8.into()` error[E0308]: mismatched types --> $DIR/numeric-cast.rs:110:16 | -LL | foo::(x_f32); - | ^^^^^ expected i64, found f32 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:113:16 - | LL | foo::(x_usize); | ^^^^^^^ expected u32, found usize +help: you can convert an `usize` to `u32` and panic if the converted value wouldn't fit + | +LL | foo::(x_usize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:115:16 + --> $DIR/numeric-cast.rs:112:16 | LL | foo::(x_u64); | ^^^^^ expected u32, found u64 +help: you can convert an `u64` to `u32` and panic if the converted value wouldn't fit + | +LL | foo::(x_u64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:118:16 + --> $DIR/numeric-cast.rs:115:16 | LL | foo::(x_u16); - | ^^^^^ expected u32, found u16 -help: you can cast an `u16` to `u32`, which will zero-extend the source value - | -LL | foo::(x_u16.into()); - | ^^^^^^^^^^^^ + | ^^^^^ + | | + | expected u32, found u16 + | help: you can convert an `u16` to `u32`: `x_u16.into()` error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:120:16 + --> $DIR/numeric-cast.rs:117:16 | LL | foo::(x_u8); - | ^^^^ expected u32, found u8 -help: you can cast an `u8` to `u32`, which will zero-extend the source value - | -LL | foo::(x_u8.into()); - | ^^^^^^^^^^^ + | ^^^^ + | | + | expected u32, found u8 + | help: you can convert an `u8` to `u32`: `x_u8.into()` error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:122:16 + --> $DIR/numeric-cast.rs:119:16 | LL | foo::(x_isize); | ^^^^^^^ expected u32, found isize +help: you can convert an `isize` to `u32` and panic if the converted value wouldn't fit + | +LL | foo::(x_isize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:124:16 + --> $DIR/numeric-cast.rs:121:16 | LL | foo::(x_i64); | ^^^^^ expected u32, found i64 +help: you can convert an `i64` to `u32` and panic if the converted value wouldn't fit + | +LL | foo::(x_i64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:126:16 + --> $DIR/numeric-cast.rs:123:16 | LL | foo::(x_i32); | ^^^^^ expected u32, found i32 +help: you can convert an `i32` to `u32` and panic if the converted value wouldn't fit + | +LL | foo::(x_i32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:128:16 + --> $DIR/numeric-cast.rs:125:16 | LL | foo::(x_i16); | ^^^^^ expected u32, found i16 +help: you can convert an `i16` to `u32` and panic if the converted value wouldn't fit + | +LL | foo::(x_i16.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:130:16 + --> $DIR/numeric-cast.rs:127:16 | LL | foo::(x_i8); | ^^^^ expected u32, found i8 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:132:16 - | -LL | foo::(x_f64); - | ^^^^^ expected u32, found f64 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:134:16 +help: you can convert an `i8` to `u32` and panic if the converted value wouldn't fit | -LL | foo::(x_f32); - | ^^^^^ expected u32, found f32 +LL | foo::(x_i8.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:137:16 + --> $DIR/numeric-cast.rs:132:16 | LL | foo::(x_usize); | ^^^^^^^ expected i32, found usize +help: you can convert an `usize` to `i32` and panic if the converted value wouldn't fit + | +LL | foo::(x_usize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:139:16 + --> $DIR/numeric-cast.rs:134:16 | LL | foo::(x_u64); | ^^^^^ expected i32, found u64 +help: you can convert an `u64` to `i32` and panic if the converted value wouldn't fit + | +LL | foo::(x_u64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:141:16 + --> $DIR/numeric-cast.rs:136:16 | LL | foo::(x_u32); | ^^^^^ expected i32, found u32 +help: you can convert an `u32` to `i32` and panic if the converted value wouldn't fit + | +LL | foo::(x_u32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:143:16 + --> $DIR/numeric-cast.rs:138:16 | LL | foo::(x_u16); | ^^^^^ expected i32, found u16 +help: you can convert an `u16` to `i32` and panic if the converted value wouldn't fit + | +LL | foo::(x_u16.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:145:16 + --> $DIR/numeric-cast.rs:140:16 | LL | foo::(x_u8); | ^^^^ expected i32, found u8 +help: you can convert an `u8` to `i32` and panic if the converted value wouldn't fit + | +LL | foo::(x_u8.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:147:16 + --> $DIR/numeric-cast.rs:142:16 | LL | foo::(x_isize); | ^^^^^^^ expected i32, found isize +help: you can convert an `isize` to `i32` and panic if the converted value wouldn't fit + | +LL | foo::(x_isize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:149:16 + --> $DIR/numeric-cast.rs:144:16 | LL | foo::(x_i64); | ^^^^^ expected i32, found i64 +help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit + | +LL | foo::(x_i64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:152:16 + --> $DIR/numeric-cast.rs:147:16 | LL | foo::(x_i16); - | ^^^^^ expected i32, found i16 -help: you can cast an `i16` to `i32`, which will sign-extend the source value - | -LL | foo::(x_i16.into()); - | ^^^^^^^^^^^^ + | ^^^^^ + | | + | expected i32, found i16 + | help: you can convert an `i16` to `i32`: `x_i16.into()` error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:154:16 + --> $DIR/numeric-cast.rs:149:16 | LL | foo::(x_i8); - | ^^^^ expected i32, found i8 -help: you can cast an `i8` to `i32`, which will sign-extend the source value - | -LL | foo::(x_i8.into()); - | ^^^^^^^^^^^ - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:156:16 - | -LL | foo::(x_f64); - | ^^^^^ expected i32, found f64 + | ^^^^ + | | + | expected i32, found i8 + | help: you can convert an `i8` to `i32`: `x_i8.into()` error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:158:16 - | -LL | foo::(x_f32); - | ^^^^^ expected i32, found f32 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:161:16 + --> $DIR/numeric-cast.rs:154:16 | LL | foo::(x_usize); | ^^^^^^^ expected u16, found usize +help: you can convert an `usize` to `u16` and panic if the converted value wouldn't fit + | +LL | foo::(x_usize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:163:16 + --> $DIR/numeric-cast.rs:156:16 | LL | foo::(x_u64); | ^^^^^ expected u16, found u64 +help: you can convert an `u64` to `u16` and panic if the converted value wouldn't fit + | +LL | foo::(x_u64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:165:16 + --> $DIR/numeric-cast.rs:158:16 | LL | foo::(x_u32); | ^^^^^ expected u16, found u32 +help: you can convert an `u32` to `u16` and panic if the converted value wouldn't fit + | +LL | foo::(x_u32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:168:16 + --> $DIR/numeric-cast.rs:161:16 | LL | foo::(x_u8); - | ^^^^ expected u16, found u8 -help: you can cast an `u8` to `u16`, which will zero-extend the source value - | -LL | foo::(x_u8.into()); - | ^^^^^^^^^^^ + | ^^^^ + | | + | expected u16, found u8 + | help: you can convert an `u8` to `u16`: `x_u8.into()` error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:170:16 + --> $DIR/numeric-cast.rs:163:16 | LL | foo::(x_isize); | ^^^^^^^ expected u16, found isize +help: you can convert an `isize` to `u16` and panic if the converted value wouldn't fit + | +LL | foo::(x_isize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:172:16 + --> $DIR/numeric-cast.rs:165:16 | LL | foo::(x_i64); | ^^^^^ expected u16, found i64 +help: you can convert an `i64` to `u16` and panic if the converted value wouldn't fit + | +LL | foo::(x_i64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:174:16 + --> $DIR/numeric-cast.rs:167:16 | LL | foo::(x_i32); | ^^^^^ expected u16, found i32 +help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit + | +LL | foo::(x_i32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:176:16 + --> $DIR/numeric-cast.rs:169:16 | LL | foo::(x_i16); | ^^^^^ expected u16, found i16 +help: you can convert an `i16` to `u16` and panic if the converted value wouldn't fit + | +LL | foo::(x_i16.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:178:16 + --> $DIR/numeric-cast.rs:171:16 | LL | foo::(x_i8); | ^^^^ expected u16, found i8 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:180:16 - | -LL | foo::(x_f64); - | ^^^^^ expected u16, found f64 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:182:16 +help: you can convert an `i8` to `u16` and panic if the converted value wouldn't fit | -LL | foo::(x_f32); - | ^^^^^ expected u16, found f32 +LL | foo::(x_i8.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:185:16 + --> $DIR/numeric-cast.rs:176:16 | LL | foo::(x_usize); | ^^^^^^^ expected i16, found usize +help: you can convert an `usize` to `i16` and panic if the converted value wouldn't fit + | +LL | foo::(x_usize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:187:16 + --> $DIR/numeric-cast.rs:178:16 | LL | foo::(x_u64); | ^^^^^ expected i16, found u64 +help: you can convert an `u64` to `i16` and panic if the converted value wouldn't fit + | +LL | foo::(x_u64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:189:16 + --> $DIR/numeric-cast.rs:180:16 | LL | foo::(x_u32); | ^^^^^ expected i16, found u32 +help: you can convert an `u32` to `i16` and panic if the converted value wouldn't fit + | +LL | foo::(x_u32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:191:16 + --> $DIR/numeric-cast.rs:182:16 | LL | foo::(x_u16); | ^^^^^ expected i16, found u16 +help: you can convert an `u16` to `i16` and panic if the converted value wouldn't fit + | +LL | foo::(x_u16.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:193:16 + --> $DIR/numeric-cast.rs:184:16 | LL | foo::(x_u8); | ^^^^ expected i16, found u8 +help: you can convert an `u8` to `i16` and panic if the converted value wouldn't fit + | +LL | foo::(x_u8.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:195:16 + --> $DIR/numeric-cast.rs:186:16 | LL | foo::(x_isize); | ^^^^^^^ expected i16, found isize +help: you can convert an `isize` to `i16` and panic if the converted value wouldn't fit + | +LL | foo::(x_isize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:197:16 + --> $DIR/numeric-cast.rs:188:16 | LL | foo::(x_i64); | ^^^^^ expected i16, found i64 +help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit + | +LL | foo::(x_i64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:199:16 + --> $DIR/numeric-cast.rs:190:16 | LL | foo::(x_i32); | ^^^^^ expected i16, found i32 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:202:16 - | -LL | foo::(x_i8); - | ^^^^ expected i16, found i8 -help: you can cast an `i8` to `i16`, which will sign-extend the source value - | -LL | foo::(x_i8.into()); - | ^^^^^^^^^^^ - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:204:16 +help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit | -LL | foo::(x_f64); - | ^^^^^ expected i16, found f64 +LL | foo::(x_i32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:206:16 + --> $DIR/numeric-cast.rs:193:16 | -LL | foo::(x_f32); - | ^^^^^ expected i16, found f32 +LL | foo::(x_i8); + | ^^^^ + | | + | expected i16, found i8 + | help: you can convert an `i8` to `i16`: `x_i8.into()` error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:209:15 + --> $DIR/numeric-cast.rs:198:15 | LL | foo::(x_usize); | ^^^^^^^ expected u8, found usize +help: you can convert an `usize` to `u8` and panic if the converted value wouldn't fit + | +LL | foo::(x_usize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:211:15 + --> $DIR/numeric-cast.rs:200:15 | LL | foo::(x_u64); | ^^^^^ expected u8, found u64 +help: you can convert an `u64` to `u8` and panic if the converted value wouldn't fit + | +LL | foo::(x_u64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:213:15 + --> $DIR/numeric-cast.rs:202:15 | LL | foo::(x_u32); | ^^^^^ expected u8, found u32 +help: you can convert an `u32` to `u8` and panic if the converted value wouldn't fit + | +LL | foo::(x_u32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:215:15 + --> $DIR/numeric-cast.rs:204:15 | LL | foo::(x_u16); | ^^^^^ expected u8, found u16 +help: you can convert an `u16` to `u8` and panic if the converted value wouldn't fit + | +LL | foo::(x_u16.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:218:15 + --> $DIR/numeric-cast.rs:207:15 | LL | foo::(x_isize); | ^^^^^^^ expected u8, found isize +help: you can convert an `isize` to `u8` and panic if the converted value wouldn't fit + | +LL | foo::(x_isize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:220:15 + --> $DIR/numeric-cast.rs:209:15 | LL | foo::(x_i64); | ^^^^^ expected u8, found i64 +help: you can convert an `i64` to `u8` and panic if the converted value wouldn't fit + | +LL | foo::(x_i64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:222:15 + --> $DIR/numeric-cast.rs:211:15 | LL | foo::(x_i32); | ^^^^^ expected u8, found i32 +help: you can convert an `i32` to `u8` and panic if the converted value wouldn't fit + | +LL | foo::(x_i32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:224:15 + --> $DIR/numeric-cast.rs:213:15 | LL | foo::(x_i16); | ^^^^^ expected u8, found i16 +help: you can convert an `i16` to `u8` and panic if the converted value wouldn't fit + | +LL | foo::(x_i16.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:226:15 + --> $DIR/numeric-cast.rs:215:15 | LL | foo::(x_i8); | ^^^^ expected u8, found i8 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:228:15 - | -LL | foo::(x_f64); - | ^^^^^ expected u8, found f64 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:230:15 +help: you can convert an `i8` to `u8` and panic if the converted value wouldn't fit | -LL | foo::(x_f32); - | ^^^^^ expected u8, found f32 +LL | foo::(x_i8.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:233:15 + --> $DIR/numeric-cast.rs:220:15 | LL | foo::(x_usize); | ^^^^^^^ expected i8, found usize +help: you can convert an `usize` to `i8` and panic if the converted value wouldn't fit + | +LL | foo::(x_usize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:235:15 + --> $DIR/numeric-cast.rs:222:15 | LL | foo::(x_u64); | ^^^^^ expected i8, found u64 +help: you can convert an `u64` to `i8` and panic if the converted value wouldn't fit + | +LL | foo::(x_u64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:237:15 + --> $DIR/numeric-cast.rs:224:15 | LL | foo::(x_u32); | ^^^^^ expected i8, found u32 +help: you can convert an `u32` to `i8` and panic if the converted value wouldn't fit + | +LL | foo::(x_u32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:239:15 + --> $DIR/numeric-cast.rs:226:15 | LL | foo::(x_u16); | ^^^^^ expected i8, found u16 +help: you can convert an `u16` to `i8` and panic if the converted value wouldn't fit + | +LL | foo::(x_u16.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:241:15 + --> $DIR/numeric-cast.rs:228:15 | LL | foo::(x_u8); | ^^^^ expected i8, found u8 +help: you can convert an `u8` to `i8` and panic if the converted value wouldn't fit + | +LL | foo::(x_u8.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:243:15 + --> $DIR/numeric-cast.rs:230:15 | LL | foo::(x_isize); | ^^^^^^^ expected i8, found isize +help: you can convert an `isize` to `i8` and panic if the converted value wouldn't fit + | +LL | foo::(x_isize.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:245:15 + --> $DIR/numeric-cast.rs:232:15 | LL | foo::(x_i64); | ^^^^^ expected i8, found i64 +help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit + | +LL | foo::(x_i64.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:247:15 + --> $DIR/numeric-cast.rs:234:15 | LL | foo::(x_i32); | ^^^^^ expected i8, found i32 +help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit + | +LL | foo::(x_i32.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:249:15 + --> $DIR/numeric-cast.rs:236:15 | LL | foo::(x_i16); | ^^^^^ expected i8, found i16 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:252:15 - | -LL | foo::(x_f64); - | ^^^^^ expected i8, found f64 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:254:15 +help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit | -LL | foo::(x_f32); - | ^^^^^ expected i8, found f32 +LL | foo::(x_i16.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:257:16 + --> $DIR/numeric-cast.rs:242:16 | LL | foo::(x_usize); | ^^^^^^^ expected f64, found usize +help: you can cast an `usize to `f64`, producing the floating point representation of the integer, + | rounded if necessary +LL | foo::(x_usize as f64); + | ^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:259:16 + --> $DIR/numeric-cast.rs:244:16 | LL | foo::(x_u64); | ^^^^^ expected f64, found u64 +help: you can cast an `u64 to `f64`, producing the floating point representation of the integer, + | rounded if necessary +LL | foo::(x_u64 as f64); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:261:16 + --> $DIR/numeric-cast.rs:246:16 | LL | foo::(x_u32); | ^^^^^ expected f64, found u32 -help: you can cast an `u32` to `f64`, producing the floating point representation of the integer +help: you can convert an `u32` to `f64`, producing the floating point representation of the integer | LL | foo::(x_u32.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:263:16 + --> $DIR/numeric-cast.rs:248:16 | LL | foo::(x_u16); | ^^^^^ expected f64, found u16 -help: you can cast an `u16` to `f64`, producing the floating point representation of the integer +help: you can convert an `u16` to `f64`, producing the floating point representation of the integer | LL | foo::(x_u16.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:265:16 + --> $DIR/numeric-cast.rs:250:16 | LL | foo::(x_u8); | ^^^^ expected f64, found u8 -help: you can cast an `u8` to `f64`, producing the floating point representation of the integer +help: you can convert an `u8` to `f64`, producing the floating point representation of the integer | LL | foo::(x_u8.into()); | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:267:16 + --> $DIR/numeric-cast.rs:252:16 | LL | foo::(x_isize); | ^^^^^^^ expected f64, found isize +help: you can convert an `isize` to `f64`, producing the floating point representation of the integer, rounded if necessary + | +LL | foo::(x_isize as f64); + | ^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:269:16 + --> $DIR/numeric-cast.rs:254:16 | LL | foo::(x_i64); | ^^^^^ expected f64, found i64 +help: you can convert an `i64` to `f64`, producing the floating point representation of the integer, rounded if necessary + | +LL | foo::(x_i64 as f64); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:271:16 + --> $DIR/numeric-cast.rs:256:16 | LL | foo::(x_i32); | ^^^^^ expected f64, found i32 -help: you can cast an `i32` to `f64`, producing the floating point representation of the integer +help: you can convert an `i32` to `f64`, producing the floating point representation of the integer | LL | foo::(x_i32.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:273:16 + --> $DIR/numeric-cast.rs:258:16 | LL | foo::(x_i16); | ^^^^^ expected f64, found i16 -help: you can cast an `i16` to `f64`, producing the floating point representation of the integer +help: you can convert an `i16` to `f64`, producing the floating point representation of the integer | LL | foo::(x_i16.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:275:16 + --> $DIR/numeric-cast.rs:260:16 | LL | foo::(x_i8); | ^^^^ expected f64, found i8 -help: you can cast an `i8` to `f64`, producing the floating point representation of the integer +help: you can convert an `i8` to `f64`, producing the floating point representation of the integer | LL | foo::(x_i8.into()); | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:278:16 + --> $DIR/numeric-cast.rs:263:16 | LL | foo::(x_f32); - | ^^^^^ expected f64, found f32 -help: you can cast an `f32` to `f64` in a lossless way - | -LL | foo::(x_f32.into()); - | ^^^^^^^^^^^^ + | ^^^^^ + | | + | expected f64, found f32 + | help: you can convert an `f32` to `f64`: `x_f32.into()` error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:281:16 + --> $DIR/numeric-cast.rs:266:16 | LL | foo::(x_usize); | ^^^^^^^ expected f32, found usize +help: you can cast an `usize to `f32`, producing the floating point representation of the integer, + | rounded if necessary +LL | foo::(x_usize as f32); + | ^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:283:16 + --> $DIR/numeric-cast.rs:268:16 | LL | foo::(x_u64); | ^^^^^ expected f32, found u64 +help: you can cast an `u64 to `f32`, producing the floating point representation of the integer, + | rounded if necessary +LL | foo::(x_u64 as f32); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:285:16 + --> $DIR/numeric-cast.rs:270:16 | LL | foo::(x_u32); | ^^^^^ expected f32, found u32 +help: you can cast an `u32 to `f32`, producing the floating point representation of the integer, + | rounded if necessary +LL | foo::(x_u32 as f32); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:287:16 + --> $DIR/numeric-cast.rs:272:16 | LL | foo::(x_u16); | ^^^^^ expected f32, found u16 -help: you can cast an `u16` to `f32`, producing the floating point representation of the integer +help: you can convert an `u16` to `f32`, producing the floating point representation of the integer | LL | foo::(x_u16.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:289:16 + --> $DIR/numeric-cast.rs:274:16 | LL | foo::(x_u8); | ^^^^ expected f32, found u8 -help: you can cast an `u8` to `f32`, producing the floating point representation of the integer +help: you can convert an `u8` to `f32`, producing the floating point representation of the integer | LL | foo::(x_u8.into()); | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:291:16 + --> $DIR/numeric-cast.rs:276:16 | LL | foo::(x_isize); | ^^^^^^^ expected f32, found isize +help: you can convert an `isize` to `f32`, producing the floating point representation of the integer, rounded if necessary + | +LL | foo::(x_isize as f32); + | ^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:293:16 + --> $DIR/numeric-cast.rs:278:16 | LL | foo::(x_i64); | ^^^^^ expected f32, found i64 +help: you can convert an `i64` to `f32`, producing the floating point representation of the integer, rounded if necessary + | +LL | foo::(x_i64 as f32); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:295:16 + --> $DIR/numeric-cast.rs:280:16 | LL | foo::(x_i32); | ^^^^^ expected f32, found i32 +help: you can convert an `i32` to `f32`, producing the floating point representation of the integer, rounded if necessary + | +LL | foo::(x_i32 as f32); + | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:297:16 + --> $DIR/numeric-cast.rs:282:16 | LL | foo::(x_i16); | ^^^^^ expected f32, found i16 -help: you can cast an `i16` to `f32`, producing the floating point representation of the integer +help: you can convert an `i16` to `f32`, producing the floating point representation of the integer | LL | foo::(x_i16.into()); | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:299:16 + --> $DIR/numeric-cast.rs:284:16 | LL | foo::(x_i8); | ^^^^ expected f32, found i8 -help: you can cast an `i8` to `f32`, producing the floating point representation of the integer +help: you can convert an `i8` to `f32`, producing the floating point representation of the integer | LL | foo::(x_i8.into()); | ^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:301:16 - | -LL | foo::(x_f64); - | ^^^^^ expected f32, found f64 - -error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:305:16 + --> $DIR/numeric-cast.rs:289:16 | LL | foo::(x_u8 as u16); - | ^^^^^^^^^^^ expected u32, found u16 -help: you can cast an `u16` to `u32`, which will zero-extend the source value - | -LL | foo::((x_u8 as u16).into()); - | ^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^ + | | + | expected u32, found u16 + | help: you can convert an `u16` to `u32`: `(x_u8 as u16).into()` error[E0308]: mismatched types - --> $DIR/numeric-cast.rs:307:16 + --> $DIR/numeric-cast.rs:291:16 | LL | foo::(-x_i8); - | ^^^^^ expected i32, found i8 -help: you can cast an `i8` to `i32`, which will sign-extend the source value - | -LL | foo::((-x_i8).into()); - | ^^^^^^^^^^^^^^ + | ^^^^^ + | | + | expected i32, found i8 + | help: you can convert an `i8` to `i32`: `(-x_i8).into()` -error: aborting due to 134 previous errors +error: aborting due to 113 previous errors For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/numeric/numeric-fields.stderr b/src/test/ui/numeric/numeric-fields.stderr index ce51bbaa11..13c18d740f 100644 --- a/src/test/ui/numeric/numeric-fields.stderr +++ b/src/test/ui/numeric/numeric-fields.stderr @@ -14,5 +14,5 @@ LL | S{0: a, 0x1: b, ..} => {} error: aborting due to 2 previous errors -Some errors occurred: E0026, E0560. +Some errors have detailed explanations: E0026, E0560. For more information about an error, try `rustc --explain E0026`. diff --git a/src/test/ui/numeric/numeric-suffix.fixed b/src/test/ui/numeric/numeric-suffix.fixed new file mode 100644 index 0000000000..53c5fe0f43 --- /dev/null +++ b/src/test/ui/numeric/numeric-suffix.fixed @@ -0,0 +1,298 @@ +// run-rustfix + +fn foo(_x: N) {} + +fn main() { + foo::(42_usize); + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42usize); + //~^ ERROR mismatched types + foo::(42usize); + //~^ ERROR mismatched types + + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_isize); + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42isize); + //~^ ERROR mismatched types + foo::(42isize); + //~^ ERROR mismatched types + + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u64); + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42u64); + //~^ ERROR mismatched types + foo::(42u64); + //~^ ERROR mismatched types + + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i64); + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42i64); + //~^ ERROR mismatched types + foo::(42i64); + //~^ ERROR mismatched types + + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u32); + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42u32); + //~^ ERROR mismatched types + foo::(42u32); + //~^ ERROR mismatched types + + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i32); + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42i32); + //~^ ERROR mismatched types + foo::(42i32); + //~^ ERROR mismatched types + + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u16); + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42u16); + //~^ ERROR mismatched types + foo::(42u16); + //~^ ERROR mismatched types + + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i16); + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42i16); + //~^ ERROR mismatched types + foo::(42i16); + //~^ ERROR mismatched types + + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_u8); + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42u8); + //~^ ERROR mismatched types + foo::(42u8); + //~^ ERROR mismatched types + + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42_i8); + foo::(42i8); + //~^ ERROR mismatched types + foo::(42i8); + //~^ ERROR mismatched types + + foo::(42_f64); + //~^ ERROR mismatched types + foo::(42_f64); + //~^ ERROR mismatched types + foo::(42_u32.into()); + //~^ ERROR mismatched types + foo::(42_u16.into()); + //~^ ERROR mismatched types + foo::(42_u8.into()); + //~^ ERROR mismatched types + foo::(42_f64); + //~^ ERROR mismatched types + foo::(42_f64); + //~^ ERROR mismatched types + foo::(42_i32.into()); + //~^ ERROR mismatched types + foo::(42_i16.into()); + //~^ ERROR mismatched types + foo::(42_i8.into()); + //~^ ERROR mismatched types + foo::(42.0_f64); + foo::(42.0_f64); + //~^ ERROR mismatched types + + foo::(42_f32); + //~^ ERROR mismatched types + foo::(42_f32); + //~^ ERROR mismatched types + foo::(42_f32); + //~^ ERROR mismatched types + foo::(42_u16.into()); + //~^ ERROR mismatched types + foo::(42_u8.into()); + //~^ ERROR mismatched types + foo::(42_f32); + //~^ ERROR mismatched types + foo::(42_f32); + //~^ ERROR mismatched types + foo::(42_f32); + //~^ ERROR mismatched types + foo::(42_i16.into()); + //~^ ERROR mismatched types + foo::(42_i8.into()); + //~^ ERROR mismatched types + foo::(42.0_f32); + //~^ ERROR mismatched types + foo::(42.0_f32); + + foo::((42_u8 as u16).into()); + //~^ ERROR mismatched types + foo::((-42_i8).into()); + //~^ ERROR mismatched types +} diff --git a/src/test/ui/numeric/numeric-suffix.rs b/src/test/ui/numeric/numeric-suffix.rs new file mode 100644 index 0000000000..ca38ed8222 --- /dev/null +++ b/src/test/ui/numeric/numeric-suffix.rs @@ -0,0 +1,298 @@ +// run-rustfix + +fn foo(_x: N) {} + +fn main() { + foo::(42_usize); + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42.0_f64); + //~^ ERROR mismatched types + foo::(42.0_f32); + //~^ ERROR mismatched types + + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_isize); + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42.0_f64); + //~^ ERROR mismatched types + foo::(42.0_f32); + //~^ ERROR mismatched types + + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_u64); + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42.0_f64); + //~^ ERROR mismatched types + foo::(42.0_f32); + //~^ ERROR mismatched types + + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_i64); + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42.0_f64); + //~^ ERROR mismatched types + foo::(42.0_f32); + //~^ ERROR mismatched types + + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u32); + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42.0_f64); + //~^ ERROR mismatched types + foo::(42.0_f32); + //~^ ERROR mismatched types + + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i32); + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42.0_f64); + //~^ ERROR mismatched types + foo::(42.0_f32); + //~^ ERROR mismatched types + + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u16); + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42.0_f64); + //~^ ERROR mismatched types + foo::(42.0_f32); + //~^ ERROR mismatched types + + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i16); + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42.0_f64); + //~^ ERROR mismatched types + foo::(42.0_f32); + //~^ ERROR mismatched types + + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u8); + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42.0_f64); + //~^ ERROR mismatched types + foo::(42.0_f32); + //~^ ERROR mismatched types + + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i8); + foo::(42.0_f64); + //~^ ERROR mismatched types + foo::(42.0_f32); + //~^ ERROR mismatched types + + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42.0_f64); + foo::(42.0_f32); + //~^ ERROR mismatched types + + foo::(42_usize); + //~^ ERROR mismatched types + foo::(42_u64); + //~^ ERROR mismatched types + foo::(42_u32); + //~^ ERROR mismatched types + foo::(42_u16); + //~^ ERROR mismatched types + foo::(42_u8); + //~^ ERROR mismatched types + foo::(42_isize); + //~^ ERROR mismatched types + foo::(42_i64); + //~^ ERROR mismatched types + foo::(42_i32); + //~^ ERROR mismatched types + foo::(42_i16); + //~^ ERROR mismatched types + foo::(42_i8); + //~^ ERROR mismatched types + foo::(42.0_f64); + //~^ ERROR mismatched types + foo::(42.0_f32); + + foo::(42_u8 as u16); + //~^ ERROR mismatched types + foo::(-42_i8); + //~^ ERROR mismatched types +} diff --git a/src/test/ui/numeric/numeric-suffix.stderr b/src/test/ui/numeric/numeric-suffix.stderr new file mode 100644 index 0000000000..c88eeeb9f7 --- /dev/null +++ b/src/test/ui/numeric/numeric-suffix.stderr @@ -0,0 +1,1341 @@ +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:7:18 + | +LL | foo::(42_u64); + | ^^^^^^ expected usize, found u64 +help: change the type of the numeric literal from `u64` to `usize` + | +LL | foo::(42_usize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:9:18 + | +LL | foo::(42_u32); + | ^^^^^^ expected usize, found u32 +help: change the type of the numeric literal from `u32` to `usize` + | +LL | foo::(42_usize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:11:18 + | +LL | foo::(42_u16); + | ^^^^^^ expected usize, found u16 +help: change the type of the numeric literal from `u16` to `usize` + | +LL | foo::(42_usize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:13:18 + | +LL | foo::(42_u8); + | ^^^^^ expected usize, found u8 +help: change the type of the numeric literal from `u8` to `usize` + | +LL | foo::(42_usize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:15:18 + | +LL | foo::(42_isize); + | ^^^^^^^^ expected usize, found isize +help: change the type of the numeric literal from `isize` to `usize` + | +LL | foo::(42_usize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:17:18 + | +LL | foo::(42_i64); + | ^^^^^^ expected usize, found i64 +help: change the type of the numeric literal from `i64` to `usize` + | +LL | foo::(42_usize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:19:18 + | +LL | foo::(42_i32); + | ^^^^^^ expected usize, found i32 +help: change the type of the numeric literal from `i32` to `usize` + | +LL | foo::(42_usize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:21:18 + | +LL | foo::(42_i16); + | ^^^^^^ expected usize, found i16 +help: change the type of the numeric literal from `i16` to `usize` + | +LL | foo::(42_usize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:23:18 + | +LL | foo::(42_i8); + | ^^^^^ expected usize, found i8 +help: change the type of the numeric literal from `i8` to `usize` + | +LL | foo::(42_usize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:25:18 + | +LL | foo::(42.0_f64); + | ^^^^^^^^ expected usize, found f64 +help: change the type of the numeric literal from `f64` to `usize` + | +LL | foo::(42usize); + | ^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:27:18 + | +LL | foo::(42.0_f32); + | ^^^^^^^^ expected usize, found f32 +help: change the type of the numeric literal from `f32` to `usize` + | +LL | foo::(42usize); + | ^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:30:18 + | +LL | foo::(42_usize); + | ^^^^^^^^ expected isize, found usize +help: change the type of the numeric literal from `usize` to `isize` + | +LL | foo::(42_isize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:32:18 + | +LL | foo::(42_u64); + | ^^^^^^ expected isize, found u64 +help: change the type of the numeric literal from `u64` to `isize` + | +LL | foo::(42_isize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:34:18 + | +LL | foo::(42_u32); + | ^^^^^^ expected isize, found u32 +help: change the type of the numeric literal from `u32` to `isize` + | +LL | foo::(42_isize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:36:18 + | +LL | foo::(42_u16); + | ^^^^^^ expected isize, found u16 +help: change the type of the numeric literal from `u16` to `isize` + | +LL | foo::(42_isize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:38:18 + | +LL | foo::(42_u8); + | ^^^^^ expected isize, found u8 +help: change the type of the numeric literal from `u8` to `isize` + | +LL | foo::(42_isize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:41:18 + | +LL | foo::(42_i64); + | ^^^^^^ expected isize, found i64 +help: change the type of the numeric literal from `i64` to `isize` + | +LL | foo::(42_isize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:43:18 + | +LL | foo::(42_i32); + | ^^^^^^ expected isize, found i32 +help: change the type of the numeric literal from `i32` to `isize` + | +LL | foo::(42_isize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:45:18 + | +LL | foo::(42_i16); + | ^^^^^^ expected isize, found i16 +help: change the type of the numeric literal from `i16` to `isize` + | +LL | foo::(42_isize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:47:18 + | +LL | foo::(42_i8); + | ^^^^^ expected isize, found i8 +help: change the type of the numeric literal from `i8` to `isize` + | +LL | foo::(42_isize); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:49:18 + | +LL | foo::(42.0_f64); + | ^^^^^^^^ expected isize, found f64 +help: change the type of the numeric literal from `f64` to `isize` + | +LL | foo::(42isize); + | ^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:51:18 + | +LL | foo::(42.0_f32); + | ^^^^^^^^ expected isize, found f32 +help: change the type of the numeric literal from `f32` to `isize` + | +LL | foo::(42isize); + | ^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:54:16 + | +LL | foo::(42_usize); + | ^^^^^^^^ expected u64, found usize +help: change the type of the numeric literal from `usize` to `u64` + | +LL | foo::(42_u64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:57:16 + | +LL | foo::(42_u32); + | ^^^^^^ expected u64, found u32 +help: change the type of the numeric literal from `u32` to `u64` + | +LL | foo::(42_u64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:59:16 + | +LL | foo::(42_u16); + | ^^^^^^ expected u64, found u16 +help: change the type of the numeric literal from `u16` to `u64` + | +LL | foo::(42_u64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:61:16 + | +LL | foo::(42_u8); + | ^^^^^ expected u64, found u8 +help: change the type of the numeric literal from `u8` to `u64` + | +LL | foo::(42_u64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:63:16 + | +LL | foo::(42_isize); + | ^^^^^^^^ expected u64, found isize +help: change the type of the numeric literal from `isize` to `u64` + | +LL | foo::(42_u64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:65:16 + | +LL | foo::(42_i64); + | ^^^^^^ expected u64, found i64 +help: change the type of the numeric literal from `i64` to `u64` + | +LL | foo::(42_u64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:67:16 + | +LL | foo::(42_i32); + | ^^^^^^ expected u64, found i32 +help: change the type of the numeric literal from `i32` to `u64` + | +LL | foo::(42_u64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:69:16 + | +LL | foo::(42_i16); + | ^^^^^^ expected u64, found i16 +help: change the type of the numeric literal from `i16` to `u64` + | +LL | foo::(42_u64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:71:16 + | +LL | foo::(42_i8); + | ^^^^^ expected u64, found i8 +help: change the type of the numeric literal from `i8` to `u64` + | +LL | foo::(42_u64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:73:16 + | +LL | foo::(42.0_f64); + | ^^^^^^^^ expected u64, found f64 +help: change the type of the numeric literal from `f64` to `u64` + | +LL | foo::(42u64); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:75:16 + | +LL | foo::(42.0_f32); + | ^^^^^^^^ expected u64, found f32 +help: change the type of the numeric literal from `f32` to `u64` + | +LL | foo::(42u64); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:78:16 + | +LL | foo::(42_usize); + | ^^^^^^^^ expected i64, found usize +help: change the type of the numeric literal from `usize` to `i64` + | +LL | foo::(42_i64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:80:16 + | +LL | foo::(42_u64); + | ^^^^^^ expected i64, found u64 +help: change the type of the numeric literal from `u64` to `i64` + | +LL | foo::(42_i64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:82:16 + | +LL | foo::(42_u32); + | ^^^^^^ expected i64, found u32 +help: change the type of the numeric literal from `u32` to `i64` + | +LL | foo::(42_i64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:84:16 + | +LL | foo::(42_u16); + | ^^^^^^ expected i64, found u16 +help: change the type of the numeric literal from `u16` to `i64` + | +LL | foo::(42_i64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:86:16 + | +LL | foo::(42_u8); + | ^^^^^ expected i64, found u8 +help: change the type of the numeric literal from `u8` to `i64` + | +LL | foo::(42_i64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:88:16 + | +LL | foo::(42_isize); + | ^^^^^^^^ expected i64, found isize +help: change the type of the numeric literal from `isize` to `i64` + | +LL | foo::(42_i64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:91:16 + | +LL | foo::(42_i32); + | ^^^^^^ expected i64, found i32 +help: change the type of the numeric literal from `i32` to `i64` + | +LL | foo::(42_i64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:93:16 + | +LL | foo::(42_i16); + | ^^^^^^ expected i64, found i16 +help: change the type of the numeric literal from `i16` to `i64` + | +LL | foo::(42_i64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:95:16 + | +LL | foo::(42_i8); + | ^^^^^ expected i64, found i8 +help: change the type of the numeric literal from `i8` to `i64` + | +LL | foo::(42_i64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:97:16 + | +LL | foo::(42.0_f64); + | ^^^^^^^^ expected i64, found f64 +help: change the type of the numeric literal from `f64` to `i64` + | +LL | foo::(42i64); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:99:16 + | +LL | foo::(42.0_f32); + | ^^^^^^^^ expected i64, found f32 +help: change the type of the numeric literal from `f32` to `i64` + | +LL | foo::(42i64); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:102:16 + | +LL | foo::(42_usize); + | ^^^^^^^^ expected u32, found usize +help: change the type of the numeric literal from `usize` to `u32` + | +LL | foo::(42_u32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:104:16 + | +LL | foo::(42_u64); + | ^^^^^^ expected u32, found u64 +help: change the type of the numeric literal from `u64` to `u32` + | +LL | foo::(42_u32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:107:16 + | +LL | foo::(42_u16); + | ^^^^^^ expected u32, found u16 +help: change the type of the numeric literal from `u16` to `u32` + | +LL | foo::(42_u32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:109:16 + | +LL | foo::(42_u8); + | ^^^^^ expected u32, found u8 +help: change the type of the numeric literal from `u8` to `u32` + | +LL | foo::(42_u32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:111:16 + | +LL | foo::(42_isize); + | ^^^^^^^^ expected u32, found isize +help: change the type of the numeric literal from `isize` to `u32` + | +LL | foo::(42_u32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:113:16 + | +LL | foo::(42_i64); + | ^^^^^^ expected u32, found i64 +help: change the type of the numeric literal from `i64` to `u32` + | +LL | foo::(42_u32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:115:16 + | +LL | foo::(42_i32); + | ^^^^^^ expected u32, found i32 +help: change the type of the numeric literal from `i32` to `u32` + | +LL | foo::(42_u32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:117:16 + | +LL | foo::(42_i16); + | ^^^^^^ expected u32, found i16 +help: change the type of the numeric literal from `i16` to `u32` + | +LL | foo::(42_u32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:119:16 + | +LL | foo::(42_i8); + | ^^^^^ expected u32, found i8 +help: change the type of the numeric literal from `i8` to `u32` + | +LL | foo::(42_u32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:121:16 + | +LL | foo::(42.0_f64); + | ^^^^^^^^ expected u32, found f64 +help: change the type of the numeric literal from `f64` to `u32` + | +LL | foo::(42u32); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:123:16 + | +LL | foo::(42.0_f32); + | ^^^^^^^^ expected u32, found f32 +help: change the type of the numeric literal from `f32` to `u32` + | +LL | foo::(42u32); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:126:16 + | +LL | foo::(42_usize); + | ^^^^^^^^ expected i32, found usize +help: change the type of the numeric literal from `usize` to `i32` + | +LL | foo::(42_i32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:128:16 + | +LL | foo::(42_u64); + | ^^^^^^ expected i32, found u64 +help: change the type of the numeric literal from `u64` to `i32` + | +LL | foo::(42_i32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:130:16 + | +LL | foo::(42_u32); + | ^^^^^^ expected i32, found u32 +help: change the type of the numeric literal from `u32` to `i32` + | +LL | foo::(42_i32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:132:16 + | +LL | foo::(42_u16); + | ^^^^^^ expected i32, found u16 +help: change the type of the numeric literal from `u16` to `i32` + | +LL | foo::(42_i32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:134:16 + | +LL | foo::(42_u8); + | ^^^^^ expected i32, found u8 +help: change the type of the numeric literal from `u8` to `i32` + | +LL | foo::(42_i32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:136:16 + | +LL | foo::(42_isize); + | ^^^^^^^^ expected i32, found isize +help: change the type of the numeric literal from `isize` to `i32` + | +LL | foo::(42_i32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:138:16 + | +LL | foo::(42_i64); + | ^^^^^^ expected i32, found i64 +help: change the type of the numeric literal from `i64` to `i32` + | +LL | foo::(42_i32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:141:16 + | +LL | foo::(42_i16); + | ^^^^^^ expected i32, found i16 +help: change the type of the numeric literal from `i16` to `i32` + | +LL | foo::(42_i32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:143:16 + | +LL | foo::(42_i8); + | ^^^^^ expected i32, found i8 +help: change the type of the numeric literal from `i8` to `i32` + | +LL | foo::(42_i32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:145:16 + | +LL | foo::(42.0_f64); + | ^^^^^^^^ expected i32, found f64 +help: change the type of the numeric literal from `f64` to `i32` + | +LL | foo::(42i32); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:147:16 + | +LL | foo::(42.0_f32); + | ^^^^^^^^ expected i32, found f32 +help: change the type of the numeric literal from `f32` to `i32` + | +LL | foo::(42i32); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:150:16 + | +LL | foo::(42_usize); + | ^^^^^^^^ expected u16, found usize +help: change the type of the numeric literal from `usize` to `u16` + | +LL | foo::(42_u16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:152:16 + | +LL | foo::(42_u64); + | ^^^^^^ expected u16, found u64 +help: change the type of the numeric literal from `u64` to `u16` + | +LL | foo::(42_u16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:154:16 + | +LL | foo::(42_u32); + | ^^^^^^ expected u16, found u32 +help: change the type of the numeric literal from `u32` to `u16` + | +LL | foo::(42_u16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:157:16 + | +LL | foo::(42_u8); + | ^^^^^ expected u16, found u8 +help: change the type of the numeric literal from `u8` to `u16` + | +LL | foo::(42_u16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:159:16 + | +LL | foo::(42_isize); + | ^^^^^^^^ expected u16, found isize +help: change the type of the numeric literal from `isize` to `u16` + | +LL | foo::(42_u16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:161:16 + | +LL | foo::(42_i64); + | ^^^^^^ expected u16, found i64 +help: change the type of the numeric literal from `i64` to `u16` + | +LL | foo::(42_u16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:163:16 + | +LL | foo::(42_i32); + | ^^^^^^ expected u16, found i32 +help: change the type of the numeric literal from `i32` to `u16` + | +LL | foo::(42_u16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:165:16 + | +LL | foo::(42_i16); + | ^^^^^^ expected u16, found i16 +help: change the type of the numeric literal from `i16` to `u16` + | +LL | foo::(42_u16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:167:16 + | +LL | foo::(42_i8); + | ^^^^^ expected u16, found i8 +help: change the type of the numeric literal from `i8` to `u16` + | +LL | foo::(42_u16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:169:16 + | +LL | foo::(42.0_f64); + | ^^^^^^^^ expected u16, found f64 +help: change the type of the numeric literal from `f64` to `u16` + | +LL | foo::(42u16); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:171:16 + | +LL | foo::(42.0_f32); + | ^^^^^^^^ expected u16, found f32 +help: change the type of the numeric literal from `f32` to `u16` + | +LL | foo::(42u16); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:174:16 + | +LL | foo::(42_usize); + | ^^^^^^^^ expected i16, found usize +help: change the type of the numeric literal from `usize` to `i16` + | +LL | foo::(42_i16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:176:16 + | +LL | foo::(42_u64); + | ^^^^^^ expected i16, found u64 +help: change the type of the numeric literal from `u64` to `i16` + | +LL | foo::(42_i16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:178:16 + | +LL | foo::(42_u32); + | ^^^^^^ expected i16, found u32 +help: change the type of the numeric literal from `u32` to `i16` + | +LL | foo::(42_i16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:180:16 + | +LL | foo::(42_u16); + | ^^^^^^ expected i16, found u16 +help: change the type of the numeric literal from `u16` to `i16` + | +LL | foo::(42_i16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:182:16 + | +LL | foo::(42_u8); + | ^^^^^ expected i16, found u8 +help: change the type of the numeric literal from `u8` to `i16` + | +LL | foo::(42_i16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:184:16 + | +LL | foo::(42_isize); + | ^^^^^^^^ expected i16, found isize +help: change the type of the numeric literal from `isize` to `i16` + | +LL | foo::(42_i16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:186:16 + | +LL | foo::(42_i64); + | ^^^^^^ expected i16, found i64 +help: change the type of the numeric literal from `i64` to `i16` + | +LL | foo::(42_i16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:188:16 + | +LL | foo::(42_i32); + | ^^^^^^ expected i16, found i32 +help: change the type of the numeric literal from `i32` to `i16` + | +LL | foo::(42_i16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:191:16 + | +LL | foo::(42_i8); + | ^^^^^ expected i16, found i8 +help: change the type of the numeric literal from `i8` to `i16` + | +LL | foo::(42_i16); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:193:16 + | +LL | foo::(42.0_f64); + | ^^^^^^^^ expected i16, found f64 +help: change the type of the numeric literal from `f64` to `i16` + | +LL | foo::(42i16); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:195:16 + | +LL | foo::(42.0_f32); + | ^^^^^^^^ expected i16, found f32 +help: change the type of the numeric literal from `f32` to `i16` + | +LL | foo::(42i16); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:198:15 + | +LL | foo::(42_usize); + | ^^^^^^^^ expected u8, found usize +help: change the type of the numeric literal from `usize` to `u8` + | +LL | foo::(42_u8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:200:15 + | +LL | foo::(42_u64); + | ^^^^^^ expected u8, found u64 +help: change the type of the numeric literal from `u64` to `u8` + | +LL | foo::(42_u8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:202:15 + | +LL | foo::(42_u32); + | ^^^^^^ expected u8, found u32 +help: change the type of the numeric literal from `u32` to `u8` + | +LL | foo::(42_u8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:204:15 + | +LL | foo::(42_u16); + | ^^^^^^ expected u8, found u16 +help: change the type of the numeric literal from `u16` to `u8` + | +LL | foo::(42_u8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:207:15 + | +LL | foo::(42_isize); + | ^^^^^^^^ expected u8, found isize +help: change the type of the numeric literal from `isize` to `u8` + | +LL | foo::(42_u8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:209:15 + | +LL | foo::(42_i64); + | ^^^^^^ expected u8, found i64 +help: change the type of the numeric literal from `i64` to `u8` + | +LL | foo::(42_u8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:211:15 + | +LL | foo::(42_i32); + | ^^^^^^ expected u8, found i32 +help: change the type of the numeric literal from `i32` to `u8` + | +LL | foo::(42_u8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:213:15 + | +LL | foo::(42_i16); + | ^^^^^^ expected u8, found i16 +help: change the type of the numeric literal from `i16` to `u8` + | +LL | foo::(42_u8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:215:15 + | +LL | foo::(42_i8); + | ^^^^^ expected u8, found i8 +help: change the type of the numeric literal from `i8` to `u8` + | +LL | foo::(42_u8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:217:15 + | +LL | foo::(42.0_f64); + | ^^^^^^^^ expected u8, found f64 +help: change the type of the numeric literal from `f64` to `u8` + | +LL | foo::(42u8); + | ^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:219:15 + | +LL | foo::(42.0_f32); + | ^^^^^^^^ expected u8, found f32 +help: change the type of the numeric literal from `f32` to `u8` + | +LL | foo::(42u8); + | ^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:222:15 + | +LL | foo::(42_usize); + | ^^^^^^^^ expected i8, found usize +help: change the type of the numeric literal from `usize` to `i8` + | +LL | foo::(42_i8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:224:15 + | +LL | foo::(42_u64); + | ^^^^^^ expected i8, found u64 +help: change the type of the numeric literal from `u64` to `i8` + | +LL | foo::(42_i8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:226:15 + | +LL | foo::(42_u32); + | ^^^^^^ expected i8, found u32 +help: change the type of the numeric literal from `u32` to `i8` + | +LL | foo::(42_i8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:228:15 + | +LL | foo::(42_u16); + | ^^^^^^ expected i8, found u16 +help: change the type of the numeric literal from `u16` to `i8` + | +LL | foo::(42_i8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:230:15 + | +LL | foo::(42_u8); + | ^^^^^ expected i8, found u8 +help: change the type of the numeric literal from `u8` to `i8` + | +LL | foo::(42_i8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:232:15 + | +LL | foo::(42_isize); + | ^^^^^^^^ expected i8, found isize +help: change the type of the numeric literal from `isize` to `i8` + | +LL | foo::(42_i8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:234:15 + | +LL | foo::(42_i64); + | ^^^^^^ expected i8, found i64 +help: change the type of the numeric literal from `i64` to `i8` + | +LL | foo::(42_i8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:236:15 + | +LL | foo::(42_i32); + | ^^^^^^ expected i8, found i32 +help: change the type of the numeric literal from `i32` to `i8` + | +LL | foo::(42_i8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:238:15 + | +LL | foo::(42_i16); + | ^^^^^^ expected i8, found i16 +help: change the type of the numeric literal from `i16` to `i8` + | +LL | foo::(42_i8); + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:241:15 + | +LL | foo::(42.0_f64); + | ^^^^^^^^ expected i8, found f64 +help: change the type of the numeric literal from `f64` to `i8` + | +LL | foo::(42i8); + | ^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:243:15 + | +LL | foo::(42.0_f32); + | ^^^^^^^^ expected i8, found f32 +help: change the type of the numeric literal from `f32` to `i8` + | +LL | foo::(42i8); + | ^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:246:16 + | +LL | foo::(42_usize); + | ^^^^^^^^ expected f64, found usize +help: change the type of the numeric literal from `usize` to `f64` + | +LL | foo::(42_f64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:248:16 + | +LL | foo::(42_u64); + | ^^^^^^ expected f64, found u64 +help: change the type of the numeric literal from `u64` to `f64` + | +LL | foo::(42_f64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:250:16 + | +LL | foo::(42_u32); + | ^^^^^^ expected f64, found u32 +help: you can convert an `u32` to `f64`, producing the floating point representation of the integer + | +LL | foo::(42_u32.into()); + | ^^^^^^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:252:16 + | +LL | foo::(42_u16); + | ^^^^^^ expected f64, found u16 +help: you can convert an `u16` to `f64`, producing the floating point representation of the integer + | +LL | foo::(42_u16.into()); + | ^^^^^^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:254:16 + | +LL | foo::(42_u8); + | ^^^^^ expected f64, found u8 +help: you can convert an `u8` to `f64`, producing the floating point representation of the integer + | +LL | foo::(42_u8.into()); + | ^^^^^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:256:16 + | +LL | foo::(42_isize); + | ^^^^^^^^ expected f64, found isize +help: change the type of the numeric literal from `isize` to `f64` + | +LL | foo::(42_f64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:258:16 + | +LL | foo::(42_i64); + | ^^^^^^ expected f64, found i64 +help: change the type of the numeric literal from `i64` to `f64` + | +LL | foo::(42_f64); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:260:16 + | +LL | foo::(42_i32); + | ^^^^^^ expected f64, found i32 +help: you can convert an `i32` to `f64`, producing the floating point representation of the integer + | +LL | foo::(42_i32.into()); + | ^^^^^^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:262:16 + | +LL | foo::(42_i16); + | ^^^^^^ expected f64, found i16 +help: you can convert an `i16` to `f64`, producing the floating point representation of the integer + | +LL | foo::(42_i16.into()); + | ^^^^^^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:264:16 + | +LL | foo::(42_i8); + | ^^^^^ expected f64, found i8 +help: you can convert an `i8` to `f64`, producing the floating point representation of the integer + | +LL | foo::(42_i8.into()); + | ^^^^^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:267:16 + | +LL | foo::(42.0_f32); + | ^^^^^^^^ expected f64, found f32 +help: change the type of the numeric literal from `f32` to `f64` + | +LL | foo::(42.0_f64); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:270:16 + | +LL | foo::(42_usize); + | ^^^^^^^^ expected f32, found usize +help: change the type of the numeric literal from `usize` to `f32` + | +LL | foo::(42_f32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:272:16 + | +LL | foo::(42_u64); + | ^^^^^^ expected f32, found u64 +help: change the type of the numeric literal from `u64` to `f32` + | +LL | foo::(42_f32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:274:16 + | +LL | foo::(42_u32); + | ^^^^^^ expected f32, found u32 +help: change the type of the numeric literal from `u32` to `f32` + | +LL | foo::(42_f32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:276:16 + | +LL | foo::(42_u16); + | ^^^^^^ expected f32, found u16 +help: you can convert an `u16` to `f32`, producing the floating point representation of the integer + | +LL | foo::(42_u16.into()); + | ^^^^^^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:278:16 + | +LL | foo::(42_u8); + | ^^^^^ expected f32, found u8 +help: you can convert an `u8` to `f32`, producing the floating point representation of the integer + | +LL | foo::(42_u8.into()); + | ^^^^^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:280:16 + | +LL | foo::(42_isize); + | ^^^^^^^^ expected f32, found isize +help: change the type of the numeric literal from `isize` to `f32` + | +LL | foo::(42_f32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:282:16 + | +LL | foo::(42_i64); + | ^^^^^^ expected f32, found i64 +help: change the type of the numeric literal from `i64` to `f32` + | +LL | foo::(42_f32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:284:16 + | +LL | foo::(42_i32); + | ^^^^^^ expected f32, found i32 +help: change the type of the numeric literal from `i32` to `f32` + | +LL | foo::(42_f32); + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:286:16 + | +LL | foo::(42_i16); + | ^^^^^^ expected f32, found i16 +help: you can convert an `i16` to `f32`, producing the floating point representation of the integer + | +LL | foo::(42_i16.into()); + | ^^^^^^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:288:16 + | +LL | foo::(42_i8); + | ^^^^^ expected f32, found i8 +help: you can convert an `i8` to `f32`, producing the floating point representation of the integer + | +LL | foo::(42_i8.into()); + | ^^^^^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:290:16 + | +LL | foo::(42.0_f64); + | ^^^^^^^^ expected f32, found f64 +help: change the type of the numeric literal from `f64` to `f32` + | +LL | foo::(42.0_f32); + | ^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:294:16 + | +LL | foo::(42_u8 as u16); + | ^^^^^^^^^^^^ + | | + | expected u32, found u16 + | help: you can convert an `u16` to `u32`: `(42_u8 as u16).into()` + +error[E0308]: mismatched types + --> $DIR/numeric-suffix.rs:296:16 + | +LL | foo::(-42_i8); + | ^^^^^^ + | | + | expected i32, found i8 + | help: you can convert an `i8` to `i32`: `(-42_i8).into()` + +error: aborting due to 134 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/object-lifetime/object-lifetime-default-ambiguous.stderr b/src/test/ui/object-lifetime/object-lifetime-default-ambiguous.stderr index f079803c90..0319c7bfbe 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-ambiguous.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-ambiguous.stderr @@ -18,4 +18,3 @@ LL | fn f(t: &Ref2) { error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0228`. diff --git a/src/test/ui/object-lifetime/object-lifetime-default-elision.nll.stderr b/src/test/ui/object-lifetime/object-lifetime-default-elision.nll.stderr new file mode 100644 index 0000000000..19cdd66ef7 --- /dev/null +++ b/src/test/ui/object-lifetime/object-lifetime-default-elision.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/object-lifetime-default-elision.rs:71:5 + | +LL | fn load3<'a,'b>(ss: &'a SomeTrait) -> &'b SomeTrait { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | ss + | ^^ returning this value requires that `'a` must outlive `'b` + +error: aborting due to previous error + diff --git a/src/test/ui/object-lifetime/object-lifetime-default-elision.stderr b/src/test/ui/object-lifetime/object-lifetime-default-elision.stderr index ed734c20f3..dcb07a1706 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-elision.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-elision.stderr @@ -50,4 +50,3 @@ LL | fn load3<'a,'b>(ss: &'a SomeTrait) -> &'b SomeTrait { error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr new file mode 100644 index 0000000000..9e68647214 --- /dev/null +++ b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr @@ -0,0 +1,28 @@ +error[E0621]: explicit lifetime required in the type of `ss` + --> $DIR/object-lifetime-default-from-box-error.rs:18:5 + | +LL | fn load(ss: &mut SomeStruct) -> Box { + | --------------- help: add explicit lifetime `'static` to the type of `ss`: `&mut SomeStruct<'static>` +... +LL | ss.r + | ^^^^ lifetime `'static` required + +error[E0507]: cannot move out of borrowed content + --> $DIR/object-lifetime-default-from-box-error.rs:18:5 + | +LL | ss.r + | ^^^^ cannot move out of borrowed content + +error[E0621]: explicit lifetime required in the type of `ss` + --> $DIR/object-lifetime-default-from-box-error.rs:31:5 + | +LL | fn store1<'b>(ss: &mut SomeStruct, b: Box) { + | --------------- help: add explicit lifetime `'b` to the type of `ss`: `&mut SomeStruct<'b>` +... +LL | ss.r = b; + | ^^^^ lifetime `'b` required + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0507, E0621. +For more information about an error, try `rustc --explain E0507`. diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.nll.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.nll.stderr new file mode 100644 index 0000000000..6d183ddf22 --- /dev/null +++ b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.nll.stderr @@ -0,0 +1,10 @@ +error: lifetime may not live long enough + --> $DIR/object-lifetime-default-from-rptr-box-error.rs:15:5 + | +LL | fn c<'a>(t: &'a Box, mut ss: SomeStruct<'a>) { + | -- lifetime `'a` defined here +LL | ss.t = t; + | ^^^^^^^^ assignment requires that `'a` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.nll.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.nll.stderr new file mode 100644 index 0000000000..fe3b21fa39 --- /dev/null +++ b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.nll.stderr @@ -0,0 +1,10 @@ +error: lifetime may not live long enough + --> $DIR/object-lifetime-default-from-rptr-struct-error.rs:21:5 + | +LL | fn c<'a>(t: &'a MyBox, mut ss: SomeStruct<'a>) { + | -- lifetime `'a` defined here +LL | ss.t = t; + | ^^^^^^^^ assignment requires that `'a` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/object-lifetime/object-lifetime-default-mybox.nll.stderr b/src/test/ui/object-lifetime/object-lifetime-default-mybox.nll.stderr new file mode 100644 index 0000000000..448fe9e551 --- /dev/null +++ b/src/test/ui/object-lifetime/object-lifetime-default-mybox.nll.stderr @@ -0,0 +1,21 @@ +error: lifetime may not live long enough + --> $DIR/object-lifetime-default-mybox.rs:27:5 + | +LL | fn load1<'a,'b>(a: &'a MyBox, + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | a + | ^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a` + +error[E0521]: borrowed data escapes outside of function + --> $DIR/object-lifetime-default-mybox.rs:31:5 + | +LL | fn load2<'a>(ss: &MyBox) -> MyBox { + | -- `ss` is a reference that is only valid in the function body +LL | load0(ss) + | ^^^^^^^^^ `ss` escapes the function body here + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr b/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr index 402448cde3..4c23f867be 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr @@ -27,5 +27,4 @@ LL | fn load2<'a>(ss: &MyBox) -> MyBox { error: aborting due to 2 previous errors -Some errors occurred: E0308, E0623. -For more information about an error, try `rustc --explain E0308`. +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/object-safety/object-safety-by-value-self-use.nll.stderr b/src/test/ui/object-safety/object-safety-by-value-self-use.nll.stderr deleted file mode 100644 index 1497aa4208..0000000000 --- a/src/test/ui/object-safety/object-safety-by-value-self-use.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0161]: cannot move a value of type dyn Bar: the size of dyn Bar cannot be statically determined - --> $DIR/object-safety-by-value-self-use.rs:15:5 - | -LL | t.bar() - | ^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0161`. diff --git a/src/test/ui/object-safety/object-safety-by-value-self-use.rs b/src/test/ui/object-safety/object-safety-by-value-self-use.rs index dc8ea64ec9..0b70c8ad45 100644 --- a/src/test/ui/object-safety/object-safety-by-value-self-use.rs +++ b/src/test/ui/object-safety/object-safety-by-value-self-use.rs @@ -12,7 +12,7 @@ trait Baz { } fn use_bar(t: Box) { - t.bar() //~ ERROR cannot move a value of type (dyn Bar + 'static) + t.bar() //~ ERROR cannot move a value of type dyn Bar } fn main() { } diff --git a/src/test/ui/object-safety/object-safety-by-value-self-use.stderr b/src/test/ui/object-safety/object-safety-by-value-self-use.stderr index 0ab881687e..1497aa4208 100644 --- a/src/test/ui/object-safety/object-safety-by-value-self-use.stderr +++ b/src/test/ui/object-safety/object-safety-by-value-self-use.stderr @@ -1,4 +1,4 @@ -error[E0161]: cannot move a value of type (dyn Bar + 'static): the size of (dyn Bar + 'static) cannot be statically determined +error[E0161]: cannot move a value of type dyn Bar: the size of dyn Bar cannot be statically determined --> $DIR/object-safety-by-value-self-use.rs:15:5 | LL | t.bar() diff --git a/src/test/ui/on-unimplemented/auxiliary/no_debug.rs b/src/test/ui/on-unimplemented/auxiliary/no_debug.rs index f240d0e1f1..fd3dc0abdc 100644 --- a/src/test/ui/on-unimplemented/auxiliary/no_debug.rs +++ b/src/test/ui/on-unimplemented/auxiliary/no_debug.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![crate_type = "lib"] pub struct Bar; diff --git a/src/test/ui/on-unimplemented/bad-annotation.stderr b/src/test/ui/on-unimplemented/bad-annotation.stderr index 31b626e0ff..abbe9f0fcd 100644 --- a/src/test/ui/on-unimplemented/bad-annotation.stderr +++ b/src/test/ui/on-unimplemented/bad-annotation.stderr @@ -72,5 +72,5 @@ LL | #[rustc_on_unimplemented(on(desugared, on(desugared, message="x")), message error: aborting due to 10 previous errors -Some errors occurred: E0230, E0231, E0232. +Some errors have detailed explanations: E0230, E0231, E0232. For more information about an error, try `rustc --explain E0230`. diff --git a/src/test/ui/on-unimplemented/no-debug.rs b/src/test/ui/on-unimplemented/no-debug.rs index 858df17ffd..45c9ea46fa 100644 --- a/src/test/ui/on-unimplemented/no-debug.rs +++ b/src/test/ui/on-unimplemented/no-debug.rs @@ -14,4 +14,3 @@ fn main() { //~| ERROR `no_debug::Bar` doesn't implement `std::fmt::Debug` //~^^^^ ERROR `Foo` doesn't implement `std::fmt::Display` //~| ERROR `no_debug::Bar` doesn't implement `std::fmt::Display` - diff --git a/src/test/ui/on-unimplemented/slice-index.rs b/src/test/ui/on-unimplemented/slice-index.rs index b5e18e2397..758220d3c4 100644 --- a/src/test/ui/on-unimplemented/slice-index.rs +++ b/src/test/ui/on-unimplemented/slice-index.rs @@ -1,7 +1,4 @@ // Test new Index error message for slices -// ignore-tidy-linelength - - use std::ops::Index; diff --git a/src/test/ui/on-unimplemented/slice-index.stderr b/src/test/ui/on-unimplemented/slice-index.stderr index c1d884929a..25a6546007 100644 --- a/src/test/ui/on-unimplemented/slice-index.stderr +++ b/src/test/ui/on-unimplemented/slice-index.stderr @@ -1,5 +1,5 @@ error[E0277]: the type `[i32]` cannot be indexed by `i32` - --> $DIR/slice-index.rs:11:5 + --> $DIR/slice-index.rs:8:5 | LL | x[1i32]; | ^^^^^^^ slice indices are of type `usize` or ranges of `usize` @@ -8,7 +8,7 @@ LL | x[1i32]; = note: required because of the requirements on the impl of `std::ops::Index` for `[i32]` error[E0277]: the type `[i32]` cannot be indexed by `std::ops::RangeTo` - --> $DIR/slice-index.rs:12:5 + --> $DIR/slice-index.rs:9:5 | LL | x[..1i32]; | ^^^^^^^^^ slice indices are of type `usize` or ranges of `usize` diff --git a/src/test/ui/once-cant-call-twice-on-heap.nll.stderr b/src/test/ui/once-cant-call-twice-on-heap.nll.stderr deleted file mode 100644 index f98d3d8384..0000000000 --- a/src/test/ui/once-cant-call-twice-on-heap.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0382]: use of moved value: `blk` - --> $DIR/once-cant-call-twice-on-heap.rs:9:5 - | -LL | fn foo(blk: F) { - | - --- move occurs because `blk` has type `F`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | blk(); - | --- value moved here -LL | blk(); - | ^^^ value used here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/once-cant-call-twice-on-heap.stderr b/src/test/ui/once-cant-call-twice-on-heap.stderr index 40034dae5b..f98d3d8384 100644 --- a/src/test/ui/once-cant-call-twice-on-heap.stderr +++ b/src/test/ui/once-cant-call-twice-on-heap.stderr @@ -1,12 +1,14 @@ error[E0382]: use of moved value: `blk` --> $DIR/once-cant-call-twice-on-heap.rs:9:5 | +LL | fn foo(blk: F) { + | - --- move occurs because `blk` has type `F`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | blk(); | --- value moved here LL | blk(); | ^^^ value used here after move - | - = note: move occurs because `blk` has type `F`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/order-dependent-cast-inference.stderr b/src/test/ui/order-dependent-cast-inference.stderr index 081038c573..01e59f8f02 100644 --- a/src/test/ui/order-dependent-cast-inference.stderr +++ b/src/test/ui/order-dependent-cast-inference.stderr @@ -10,4 +10,3 @@ LL | let mut y = 0 as *const _; error: aborting due to previous error -For more information about this error, try `rustc --explain E0641`. diff --git a/src/test/ui/panic-runtime/abort-link-to-unwind-dylib.rs b/src/test/ui/panic-runtime/abort-link-to-unwind-dylib.rs index 7e1174a273..c2deeb7dfd 100644 --- a/src/test/ui/panic-runtime/abort-link-to-unwind-dylib.rs +++ b/src/test/ui/panic-runtime/abort-link-to-unwind-dylib.rs @@ -2,6 +2,7 @@ // ignore-musl - no dylibs here // ignore-cloudabi // ignore-emscripten +// ignore-sgx no dynamic lib support // error-pattern:`panic_unwind` is not compiled with this crate's panic strategy // This is a test where the local crate, compiled with `panic=abort`, links to diff --git a/src/test/ui/panic-runtime/libtest-unwinds.rs b/src/test/ui/panic-runtime/libtest-unwinds.rs index 47dd8c3efe..bc13072612 100644 --- a/src/test/ui/panic-runtime/libtest-unwinds.rs +++ b/src/test/ui/panic-runtime/libtest-unwinds.rs @@ -8,4 +8,3 @@ extern crate test; fn main() { } - diff --git a/src/test/ui/panic-runtime/needs-gate.stderr b/src/test/ui/panic-runtime/needs-gate.stderr index 5b8ff82d1f..72999a0de8 100644 --- a/src/test/ui/panic-runtime/needs-gate.stderr +++ b/src/test/ui/panic-runtime/needs-gate.stderr @@ -1,17 +1,19 @@ -error[E0658]: the `#[panic_runtime]` attribute is an experimental feature (see issue #32837) +error[E0658]: the `#[panic_runtime]` attribute is an experimental feature --> $DIR/needs-gate.rs:4:1 | LL | #![panic_runtime] | ^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32837 = help: add #![feature(panic_runtime)] to the crate attributes to enable -error[E0658]: the `#[needs_panic_runtime]` attribute is an experimental feature (see issue #32837) +error[E0658]: the `#[needs_panic_runtime]` attribute is an experimental feature --> $DIR/needs-gate.rs:5:1 | LL | #![needs_panic_runtime] | ^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/32837 = help: add #![feature(needs_panic_runtime)] to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/parse-error-correct.stderr b/src/test/ui/parse-error-correct.stderr index b0d2b2d0c0..d593431d97 100644 --- a/src/test/ui/parse-error-correct.stderr +++ b/src/test/ui/parse-error-correct.stderr @@ -29,5 +29,5 @@ LL | let x = y.foo; error: aborting due to 4 previous errors -Some errors occurred: E0610, E0618. +Some errors have detailed explanations: E0610, E0618. For more information about an error, try `rustc --explain E0610`. diff --git a/src/test/ui/parser-recovery-1.stderr b/src/test/ui/parser-recovery-1.stderr index cd02710c40..c29f427591 100644 --- a/src/test/ui/parser-recovery-1.stderr +++ b/src/test/ui/parser-recovery-1.stderr @@ -36,5 +36,5 @@ error[E0601]: `main` function not found in crate `parser_recovery_1` error: aborting due to 5 previous errors -Some errors occurred: E0425, E0601. +Some errors have detailed explanations: E0425, E0601. For more information about an error, try `rustc --explain E0425`. diff --git a/src/test/ui/parser/ascii-only-character-escape.stderr b/src/test/ui/parser/ascii-only-character-escape.stderr index 8a981e8d62..3916779175 100644 --- a/src/test/ui/parser/ascii-only-character-escape.stderr +++ b/src/test/ui/parser/ascii-only-character-escape.stderr @@ -1,20 +1,20 @@ error: this form of character escape may only be used with characters in the range [\x00-\x7f] - --> $DIR/ascii-only-character-escape.rs:4:16 + --> $DIR/ascii-only-character-escape.rs:4:14 | LL | let x = "\x80"; - | ^^ + | ^^^^ error: this form of character escape may only be used with characters in the range [\x00-\x7f] - --> $DIR/ascii-only-character-escape.rs:5:16 + --> $DIR/ascii-only-character-escape.rs:5:14 | LL | let y = "\xff"; - | ^^ + | ^^^^ error: this form of character escape may only be used with characters in the range [\x00-\x7f] - --> $DIR/ascii-only-character-escape.rs:6:16 + --> $DIR/ascii-only-character-escape.rs:6:14 | LL | let z = "\xe2"; - | ^^ + | ^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/parser/attr-bad-meta-2.stderr b/src/test/ui/parser/attr-bad-meta-2.stderr index ffbfc583e8..2d772dae69 100644 --- a/src/test/ui/parser/attr-bad-meta-2.stderr +++ b/src/test/ui/parser/attr-bad-meta-2.stderr @@ -1,8 +1,8 @@ error: unexpected token: `]` - --> $DIR/attr-bad-meta-2.rs:1:8 + --> $DIR/attr-bad-meta-2.rs:1:9 | LL | #[path =] - | ^ + | ^ error: aborting due to previous error diff --git a/src/test/ui/parser/byte-literals.stderr b/src/test/ui/parser/byte-literals.stderr index 28385f34f2..58a5797b90 100644 --- a/src/test/ui/parser/byte-literals.stderr +++ b/src/test/ui/parser/byte-literals.stderr @@ -34,11 +34,11 @@ error: byte constant must be ASCII. Use a \xHH escape for a non-ASCII byte LL | b'é'; | ^ -error: unterminated byte constant: b'a - --> $DIR/byte-literals.rs:14:5 +error: unterminated byte constant + --> $DIR/byte-literals.rs:14:6 | LL | b'a - | ^^^ + | ^^^^ error: aborting due to 7 previous errors diff --git a/src/test/ui/parser/byte-string-literals.rs b/src/test/ui/parser/byte-string-literals.rs index d028f28655..8d8ee4da98 100644 --- a/src/test/ui/parser/byte-string-literals.rs +++ b/src/test/ui/parser/byte-string-literals.rs @@ -1,8 +1,5 @@ // compile-flags: -Z continue-parse-after-error - -// ignore-tidy-tab - static FOO: &'static [u8] = b"\f"; //~ ERROR unknown byte escape pub fn main() { diff --git a/src/test/ui/parser/byte-string-literals.stderr b/src/test/ui/parser/byte-string-literals.stderr index 6701cfd8e6..eeb2fcd123 100644 --- a/src/test/ui/parser/byte-string-literals.stderr +++ b/src/test/ui/parser/byte-string-literals.stderr @@ -1,32 +1,32 @@ error: unknown byte escape: f - --> $DIR/byte-string-literals.rs:6:32 + --> $DIR/byte-string-literals.rs:3:32 | LL | static FOO: &'static [u8] = b"\f"; | ^ unknown byte escape error: unknown byte escape: f - --> $DIR/byte-string-literals.rs:9:8 + --> $DIR/byte-string-literals.rs:6:8 | LL | b"\f"; | ^ unknown byte escape error: invalid character in numeric character escape: Z - --> $DIR/byte-string-literals.rs:10:10 + --> $DIR/byte-string-literals.rs:7:10 | LL | b"\x0Z"; | ^ error: byte constant must be ASCII. Use a \xHH escape for a non-ASCII byte - --> $DIR/byte-string-literals.rs:11:7 + --> $DIR/byte-string-literals.rs:8:7 | LL | b"é"; | ^ error: unterminated double quote byte string - --> $DIR/byte-string-literals.rs:12:7 + --> $DIR/byte-string-literals.rs:9:6 | LL | b"a - | _______^ + | ______^ LL | | } | |__^ diff --git a/src/test/ui/parser/default.stderr b/src/test/ui/parser/default.stderr index c43fffd58a..ded088acfc 100644 --- a/src/test/ui/parser/default.stderr +++ b/src/test/ui/parser/default.stderr @@ -21,5 +21,5 @@ LL | impl Foo for u32 { error: aborting due to 3 previous errors -Some errors occurred: E0046, E0449. +Some errors have detailed explanations: E0046, E0449. For more information about an error, try `rustc --explain E0046`. diff --git a/src/test/ui/parser/doc-inside-trait-item.stderr b/src/test/ui/parser/doc-inside-trait-item.stderr index 261e27b6e0..3287ece9ae 100644 --- a/src/test/ui/parser/doc-inside-trait-item.stderr +++ b/src/test/ui/parser/doc-inside-trait-item.stderr @@ -8,4 +8,3 @@ LL | /// empty doc error: aborting due to previous error -For more information about this error, try `rustc --explain E0584`. diff --git a/src/test/ui/parser/expr-as-stmt.fixed b/src/test/ui/parser/expr-as-stmt.fixed new file mode 100644 index 0000000000..1ce6f9c250 --- /dev/null +++ b/src/test/ui/parser/expr-as-stmt.fixed @@ -0,0 +1,40 @@ +// run-rustfix +#![allow(unused_variables)] +#![allow(dead_code)] +#![allow(unused_must_use)] + +fn foo() -> i32 { + ({2}) + {2} //~ ERROR expected expression, found `+` + //~^ ERROR mismatched types +} + +fn bar() -> i32 { + ({2}) + 2 //~ ERROR expected expression, found `+` + //~^ ERROR mismatched types +} + +fn zul() -> u32 { + let foo = 3; + ({ 42 }) + foo; //~ ERROR expected expression, found `+` + //~^ ERROR mismatched types + 32 +} + +fn baz() -> i32 { + ({ 3 }) * 3 //~ ERROR type `{integer}` cannot be dereferenced + //~^ ERROR mismatched types +} + +fn qux(a: Option, b: Option) -> bool { + (if let Some(x) = a { true } else { false }) + && //~ ERROR expected expression + if let Some(y) = a { true } else { false } +} + +fn moo(x: u32) -> bool { + (match x { + _ => 1, + }) > 0 //~ ERROR expected expression +} + +fn main() {} diff --git a/src/test/ui/parser/expr-as-stmt.rs b/src/test/ui/parser/expr-as-stmt.rs new file mode 100644 index 0000000000..b526c17488 --- /dev/null +++ b/src/test/ui/parser/expr-as-stmt.rs @@ -0,0 +1,40 @@ +// run-rustfix +#![allow(unused_variables)] +#![allow(dead_code)] +#![allow(unused_must_use)] + +fn foo() -> i32 { + {2} + {2} //~ ERROR expected expression, found `+` + //~^ ERROR mismatched types +} + +fn bar() -> i32 { + {2} + 2 //~ ERROR expected expression, found `+` + //~^ ERROR mismatched types +} + +fn zul() -> u32 { + let foo = 3; + { 42 } + foo; //~ ERROR expected expression, found `+` + //~^ ERROR mismatched types + 32 +} + +fn baz() -> i32 { + { 3 } * 3 //~ ERROR type `{integer}` cannot be dereferenced + //~^ ERROR mismatched types +} + +fn qux(a: Option, b: Option) -> bool { + if let Some(x) = a { true } else { false } + && //~ ERROR expected expression + if let Some(y) = a { true } else { false } +} + +fn moo(x: u32) -> bool { + match x { + _ => 1, + } > 0 //~ ERROR expected expression +} + +fn main() {} diff --git a/src/test/ui/parser/expr-as-stmt.stderr b/src/test/ui/parser/expr-as-stmt.stderr new file mode 100644 index 0000000000..a11209998a --- /dev/null +++ b/src/test/ui/parser/expr-as-stmt.stderr @@ -0,0 +1,92 @@ +error: expected expression, found `+` + --> $DIR/expr-as-stmt.rs:7:9 + | +LL | {2} + {2} + | --- ^ expected expression + | | + | help: parentheses are required to parse this as an expression: `({2})` + +error: expected expression, found `+` + --> $DIR/expr-as-stmt.rs:12:9 + | +LL | {2} + 2 + | --- ^ expected expression + | | + | help: parentheses are required to parse this as an expression: `({2})` + +error: expected expression, found `+` + --> $DIR/expr-as-stmt.rs:18:12 + | +LL | { 42 } + foo; + | ------ ^ expected expression + | | + | help: parentheses are required to parse this as an expression: `({ 42 })` + +error: expected expression, found `&&` + --> $DIR/expr-as-stmt.rs:30:5 + | +LL | if let Some(x) = a { true } else { false } + | ------------------------------------------ help: parentheses are required to parse this as an expression: `(if let Some(x) = a { true } else { false })` +LL | && + | ^^ expected expression + +error: expected expression, found `>` + --> $DIR/expr-as-stmt.rs:37:7 + | +LL | } > 0 + | ^ expected expression +help: parentheses are required to parse this as an expression + | +LL | (match x { +LL | _ => 1, +LL | }) > 0 + | + +error[E0308]: mismatched types + --> $DIR/expr-as-stmt.rs:7:6 + | +LL | {2} + {2} + | ^ expected (), found integer + | + = note: expected type `()` + found type `{integer}` + +error[E0308]: mismatched types + --> $DIR/expr-as-stmt.rs:12:6 + | +LL | {2} + 2 + | ^ expected (), found integer + | + = note: expected type `()` + found type `{integer}` + +error[E0308]: mismatched types + --> $DIR/expr-as-stmt.rs:18:7 + | +LL | { 42 } + foo; + | ^^ expected (), found integer + | + = note: expected type `()` + found type `{integer}` + +error[E0308]: mismatched types + --> $DIR/expr-as-stmt.rs:24:7 + | +LL | { 3 } * 3 + | ^ expected (), found integer + | + = note: expected type `()` + found type `{integer}` + +error[E0614]: type `{integer}` cannot be dereferenced + --> $DIR/expr-as-stmt.rs:24:11 + | +LL | { 3 } * 3 + | ----- ^^^ + | | + | help: parentheses are required to parse this as an expression: `({ 3 })` + +error: aborting due to 10 previous errors + +Some errors have detailed explanations: E0308, E0614. +For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/parser/issue-10636-2.stderr b/src/test/ui/parser/issue-10636-2.stderr index 38d57ce572..5b9a9b7f06 100644 --- a/src/test/ui/parser/issue-10636-2.stderr +++ b/src/test/ui/parser/issue-10636-2.stderr @@ -2,9 +2,8 @@ error: expected one of `)`, `,`, `.`, `?`, or an operator, found `;` --> $DIR/issue-10636-2.rs:5:25 | LL | option.map(|some| 42; - | - ^ - | | | - | | help: `)` may belong here + | - ^ help: `)` may belong here + | | | unclosed delimiter error: expected expression, found `)` diff --git a/src/test/ui/parser/issue-23620-invalid-escapes.rs b/src/test/ui/parser/issue-23620-invalid-escapes.rs index b4b8f1fc0b..53629973a1 100644 --- a/src/test/ui/parser/issue-23620-invalid-escapes.rs +++ b/src/test/ui/parser/issue-23620-invalid-escapes.rs @@ -9,32 +9,27 @@ fn main() { let _ = b'\u'; //~^ ERROR incorrect unicode escape sequence - //~^^ ERROR unicode escape sequences cannot be used as a byte or in a byte string let _ = b'\x5'; //~^ ERROR numeric character escape is too short let _ = b'\xxy'; //~^ ERROR invalid character in numeric character escape: x - //~^^ ERROR invalid character in numeric character escape: y let _ = '\x5'; //~^ ERROR numeric character escape is too short let _ = '\xxy'; //~^ ERROR invalid character in numeric character escape: x - //~^^ ERROR invalid character in numeric character escape: y let _ = b"\u{a4a4} \xf \u"; //~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string //~^^ ERROR invalid character in numeric character escape: //~^^^ ERROR incorrect unicode escape sequence - //~^^^^ ERROR unicode escape sequences cannot be used as a byte or in a byte string let _ = "\xf \u"; //~^ ERROR invalid character in numeric character escape: - //~^^ ERROR form of character escape may only be used with characters in the range [\x00-\x7f] - //~^^^ ERROR incorrect unicode escape sequence + //~^^ ERROR incorrect unicode escape sequence let _ = "\u8f"; //~^ ERROR incorrect unicode escape sequence diff --git a/src/test/ui/parser/issue-23620-invalid-escapes.stderr b/src/test/ui/parser/issue-23620-invalid-escapes.stderr index 295ba3b73e..5fabc1d7e4 100644 --- a/src/test/ui/parser/issue-23620-invalid-escapes.stderr +++ b/src/test/ui/parser/issue-23620-invalid-escapes.stderr @@ -18,88 +18,58 @@ LL | let _ = b'\u'; | = help: format of unicode escape sequences is `\u{...}` -error: unicode escape sequences cannot be used as a byte or in a byte string - --> $DIR/issue-23620-invalid-escapes.rs:10:15 - | -LL | let _ = b'\u'; - | ^^ - error: numeric character escape is too short - --> $DIR/issue-23620-invalid-escapes.rs:14:17 + --> $DIR/issue-23620-invalid-escapes.rs:13:15 | LL | let _ = b'\x5'; - | ^ + | ^^^ error: invalid character in numeric character escape: x - --> $DIR/issue-23620-invalid-escapes.rs:17:17 + --> $DIR/issue-23620-invalid-escapes.rs:16:17 | LL | let _ = b'\xxy'; | ^ -error: invalid character in numeric character escape: y - --> $DIR/issue-23620-invalid-escapes.rs:17:18 - | -LL | let _ = b'\xxy'; - | ^ - error: numeric character escape is too short - --> $DIR/issue-23620-invalid-escapes.rs:21:16 + --> $DIR/issue-23620-invalid-escapes.rs:19:14 | LL | let _ = '\x5'; - | ^ + | ^^^ error: invalid character in numeric character escape: x - --> $DIR/issue-23620-invalid-escapes.rs:24:16 + --> $DIR/issue-23620-invalid-escapes.rs:22:16 | LL | let _ = '\xxy'; | ^ -error: invalid character in numeric character escape: y - --> $DIR/issue-23620-invalid-escapes.rs:24:17 - | -LL | let _ = '\xxy'; - | ^ - error: unicode escape sequences cannot be used as a byte or in a byte string - --> $DIR/issue-23620-invalid-escapes.rs:28:15 + --> $DIR/issue-23620-invalid-escapes.rs:25:15 | LL | let _ = b"\u{a4a4} \xf \u"; | ^^^^^^^^ error: invalid character in numeric character escape: - --> $DIR/issue-23620-invalid-escapes.rs:28:27 + --> $DIR/issue-23620-invalid-escapes.rs:25:27 | LL | let _ = b"\u{a4a4} \xf \u"; | ^ error: incorrect unicode escape sequence - --> $DIR/issue-23620-invalid-escapes.rs:28:28 + --> $DIR/issue-23620-invalid-escapes.rs:25:28 | LL | let _ = b"\u{a4a4} \xf \u"; | ^^ incorrect unicode escape sequence | = help: format of unicode escape sequences is `\u{...}` -error: unicode escape sequences cannot be used as a byte or in a byte string - --> $DIR/issue-23620-invalid-escapes.rs:28:28 - | -LL | let _ = b"\u{a4a4} \xf \u"; - | ^^ - error: invalid character in numeric character escape: - --> $DIR/issue-23620-invalid-escapes.rs:34:17 + --> $DIR/issue-23620-invalid-escapes.rs:30:17 | LL | let _ = "\xf \u"; | ^ -error: this form of character escape may only be used with characters in the range [\x00-\x7f] - --> $DIR/issue-23620-invalid-escapes.rs:34:16 - | -LL | let _ = "\xf \u"; - | ^^ - error: incorrect unicode escape sequence - --> $DIR/issue-23620-invalid-escapes.rs:34:18 + --> $DIR/issue-23620-invalid-escapes.rs:30:18 | LL | let _ = "\xf \u"; | ^^ incorrect unicode escape sequence @@ -107,12 +77,12 @@ LL | let _ = "\xf \u"; = help: format of unicode escape sequences is `\u{...}` error: incorrect unicode escape sequence - --> $DIR/issue-23620-invalid-escapes.rs:39:14 + --> $DIR/issue-23620-invalid-escapes.rs:34:14 | LL | let _ = "\u8f"; | ^^-- - | | - | help: format of unicode escape sequences uses braces: `\u{8f}` + | | + | help: format of unicode escape sequences uses braces: `\u{8f}` -error: aborting due to 18 previous errors +error: aborting due to 13 previous errors diff --git a/src/test/ui/parser/issue-8537.stderr b/src/test/ui/parser/issue-8537.stderr index 82ca614215..29a68c9e1c 100644 --- a/src/test/ui/parser/issue-8537.stderr +++ b/src/test/ui/parser/issue-8537.stderr @@ -8,4 +8,3 @@ LL | "invalid-ab_isize" error: aborting due to previous error -For more information about this error, try `rustc --explain E0703`. diff --git a/src/test/ui/parser/lex-bad-char-literals-1.stderr b/src/test/ui/parser/lex-bad-char-literals-1.stderr index 414ad81512..000d155c26 100644 --- a/src/test/ui/parser/lex-bad-char-literals-1.stderr +++ b/src/test/ui/parser/lex-bad-char-literals-1.stderr @@ -1,14 +1,14 @@ error: numeric character escape is too short - --> $DIR/lex-bad-char-literals-1.rs:3:8 + --> $DIR/lex-bad-char-literals-1.rs:3:6 | LL | '\x1' - | ^ + | ^^^ error: numeric character escape is too short - --> $DIR/lex-bad-char-literals-1.rs:7:8 + --> $DIR/lex-bad-char-literals-1.rs:7:6 | LL | "\x1" - | ^ + | ^^^ error: unknown character escape: \u{25cf} --> $DIR/lex-bad-char-literals-1.rs:11:7 diff --git a/src/test/ui/parser/lex-bad-char-literals-2.stderr b/src/test/ui/parser/lex-bad-char-literals-2.stderr index 4c1c5c29f4..b0a4ed0243 100644 --- a/src/test/ui/parser/lex-bad-char-literals-2.stderr +++ b/src/test/ui/parser/lex-bad-char-literals-2.stderr @@ -3,6 +3,10 @@ error: character literal may only contain one codepoint | LL | 'nope' | ^^^^^^ +help: if you meant to write a `str` literal, use double quotes + | +LL | "nope" + | ^^^^^^ error[E0601]: `main` function not found in crate `lex_bad_char_literals_2` | diff --git a/src/test/ui/parser/lex-bad-char-literals-4.rs b/src/test/ui/parser/lex-bad-char-literals-4.rs index e13f11f36d..de0a19df99 100644 --- a/src/test/ui/parser/lex-bad-char-literals-4.rs +++ b/src/test/ui/parser/lex-bad-char-literals-4.rs @@ -1,5 +1,5 @@ // // This test needs to the last one appearing in this file as it kills the parser static c: char = - '● //~ ERROR: character literal may only contain one codepoint + '● //~ ERROR: unterminated character literal ; diff --git a/src/test/ui/parser/lex-bad-char-literals-4.stderr b/src/test/ui/parser/lex-bad-char-literals-4.stderr index 7bcca3761f..8f8f806f6c 100644 --- a/src/test/ui/parser/lex-bad-char-literals-4.stderr +++ b/src/test/ui/parser/lex-bad-char-literals-4.stderr @@ -1,8 +1,8 @@ -error: character literal may only contain one codepoint: '● +error: unterminated character literal --> $DIR/lex-bad-char-literals-4.rs:4:5 | LL | '● - | ^^ + | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/parser/lex-bad-char-literals-6.stderr b/src/test/ui/parser/lex-bad-char-literals-6.stderr index df99726034..a7bbe05e94 100644 --- a/src/test/ui/parser/lex-bad-char-literals-6.stderr +++ b/src/test/ui/parser/lex-bad-char-literals-6.stderr @@ -3,18 +3,30 @@ error: character literal may only contain one codepoint | LL | let x: &str = 'ab'; | ^^^^ +help: if you meant to write a `str` literal, use double quotes + | +LL | let x: &str = "ab"; + | ^^^^ error: character literal may only contain one codepoint --> $DIR/lex-bad-char-literals-6.rs:4:19 | LL | let y: char = 'cd'; | ^^^^ +help: if you meant to write a `str` literal, use double quotes + | +LL | let y: char = "cd"; + | ^^^^ error: character literal may only contain one codepoint --> $DIR/lex-bad-char-literals-6.rs:6:13 | LL | let z = 'ef'; | ^^^^ +help: if you meant to write a `str` literal, use double quotes + | +LL | let z = "ef"; + | ^^^^ error[E0277]: can't compare `&str` with `char` --> $DIR/lex-bad-char-literals-6.rs:9:10 @@ -43,5 +55,5 @@ LL | if x == z {} error: aborting due to 6 previous errors -Some errors occurred: E0277, E0308. +Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/parser/lex-bad-char-literals-7.rs b/src/test/ui/parser/lex-bad-char-literals-7.rs new file mode 100644 index 0000000000..70eafcb91d --- /dev/null +++ b/src/test/ui/parser/lex-bad-char-literals-7.rs @@ -0,0 +1,14 @@ +// compile-flags: -Z continue-parse-after-error +fn main() { + let _: char = ''; + //~^ ERROR: empty character literal + let _: char = '\u{}'; + //~^ ERROR: empty unicode escape (must have at least 1 hex digit) + + // Next two are OK, but may befool error recovery + let _ = '/'; + let _ = b'/'; + + let _ = ' hello // here's a comment + //~^ ERROR: unterminated character literal +} diff --git a/src/test/ui/parser/lex-bad-char-literals-7.stderr b/src/test/ui/parser/lex-bad-char-literals-7.stderr new file mode 100644 index 0000000000..e1ba3c3ee0 --- /dev/null +++ b/src/test/ui/parser/lex-bad-char-literals-7.stderr @@ -0,0 +1,20 @@ +error: empty character literal + --> $DIR/lex-bad-char-literals-7.rs:3:20 + | +LL | let _: char = ''; + | ^ + +error: empty unicode escape (must have at least 1 hex digit) + --> $DIR/lex-bad-char-literals-7.rs:5:20 + | +LL | let _: char = '\u{}'; + | ^^^^ + +error: unterminated character literal + --> $DIR/lex-bad-char-literals-7.rs:12:13 + | +LL | let _ = ' hello // here's a comment + | ^^^^^^^^ + +error: aborting due to 3 previous errors + diff --git a/src/test/ui/parser/macro/literals-are-validated-before-expansion.rs b/src/test/ui/parser/macro/literals-are-validated-before-expansion.rs new file mode 100644 index 0000000000..c3fc754b55 --- /dev/null +++ b/src/test/ui/parser/macro/literals-are-validated-before-expansion.rs @@ -0,0 +1,10 @@ +macro_rules! black_hole { + ($($tt:tt)*) => {} +} + +fn main() { + black_hole! { '\u{FFFFFF}' } + //~^ ERROR: invalid unicode character escape + black_hole! { "this is surrogate: \u{DAAA}" } + //~^ ERROR: invalid unicode character escape +} diff --git a/src/test/ui/parser/macro/literals-are-validated-before-expansion.stderr b/src/test/ui/parser/macro/literals-are-validated-before-expansion.stderr new file mode 100644 index 0000000000..d20eb0fb30 --- /dev/null +++ b/src/test/ui/parser/macro/literals-are-validated-before-expansion.stderr @@ -0,0 +1,18 @@ +error: invalid unicode character escape + --> $DIR/literals-are-validated-before-expansion.rs:6:20 + | +LL | black_hole! { '\u{FFFFFF}' } + | ^^^^^^^^^^ + | + = help: unicode escape must be at most 10FFFF + +error: invalid unicode character escape + --> $DIR/literals-are-validated-before-expansion.rs:8:39 + | +LL | black_hole! { "this is surrogate: \u{DAAA}" } + | ^^^^^^^^ + | + = help: unicode escape must not be a surrogate + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/parser/match-arrows-block-then-binop.rs b/src/test/ui/parser/match-arrows-block-then-binop.rs index 1a40d67492..56c917c746 100644 --- a/src/test/ui/parser/match-arrows-block-then-binop.rs +++ b/src/test/ui/parser/match-arrows-block-then-binop.rs @@ -1,7 +1,7 @@ fn main() { - - match 0 { + let _ = match 0 { 0 => { + 0 } + 5 //~ ERROR expected pattern, found `+` - } + }; } diff --git a/src/test/ui/parser/match-arrows-block-then-binop.stderr b/src/test/ui/parser/match-arrows-block-then-binop.stderr index a844cac189..bb7df30783 100644 --- a/src/test/ui/parser/match-arrows-block-then-binop.stderr +++ b/src/test/ui/parser/match-arrows-block-then-binop.stderr @@ -3,6 +3,12 @@ error: expected pattern, found `+` | LL | } + 5 | ^ expected pattern +help: parentheses are required to parse this as an expression + | +LL | 0 => ({ +LL | 0 +LL | }) + 5 + | error: aborting due to previous error diff --git a/src/test/ui/parser/new-unicode-escapes-1.stderr b/src/test/ui/parser/new-unicode-escapes-1.stderr index a8da50951d..22d6a0981f 100644 --- a/src/test/ui/parser/new-unicode-escapes-1.stderr +++ b/src/test/ui/parser/new-unicode-escapes-1.stderr @@ -1,8 +1,8 @@ error: unterminated unicode escape (needed a `}`) - --> $DIR/new-unicode-escapes-1.rs:2:21 + --> $DIR/new-unicode-escapes-1.rs:2:14 | LL | let s = "\u{2603"; - | ^ + | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/parser/new-unicode-escapes-2.stderr b/src/test/ui/parser/new-unicode-escapes-2.stderr index ede49cdf7e..b5148279c7 100644 --- a/src/test/ui/parser/new-unicode-escapes-2.stderr +++ b/src/test/ui/parser/new-unicode-escapes-2.stderr @@ -1,8 +1,8 @@ error: overlong unicode escape (must have at most 6 hex digits) - --> $DIR/new-unicode-escapes-2.rs:2:17 + --> $DIR/new-unicode-escapes-2.rs:2:14 | LL | let s = "\u{260311111111}"; - | ^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/parser/new-unicode-escapes-3.stderr b/src/test/ui/parser/new-unicode-escapes-3.stderr index 59cfb988f2..361698467f 100644 --- a/src/test/ui/parser/new-unicode-escapes-3.stderr +++ b/src/test/ui/parser/new-unicode-escapes-3.stderr @@ -1,16 +1,16 @@ error: invalid unicode character escape - --> $DIR/new-unicode-escapes-3.rs:2:14 + --> $DIR/new-unicode-escapes-3.rs:2:15 | LL | let s1 = "\u{d805}"; - | ^^^^^^^^^^ + | ^^^^^^^^ | = help: unicode escape must not be a surrogate error: invalid unicode character escape - --> $DIR/new-unicode-escapes-3.rs:3:14 + --> $DIR/new-unicode-escapes-3.rs:3:15 | LL | let s2 = "\u{ffffff}"; - | ^^^^^^^^^^^^ + | ^^^^^^^^^^ | = help: unicode escape must be at most 10FFFF diff --git a/src/test/ui/parser/pat-tuple-5.stderr b/src/test/ui/parser/pat-tuple-5.stderr index 61ae40b355..f9832214c6 100644 --- a/src/test/ui/parser/pat-tuple-5.stderr +++ b/src/test/ui/parser/pat-tuple-5.stderr @@ -1,8 +1,8 @@ error: unexpected token: `)` - --> $DIR/pat-tuple-5.rs:3:14 + --> $DIR/pat-tuple-5.rs:3:16 | LL | (pat ..) => {} - | ^^ + | ^ error: aborting due to previous error diff --git a/src/test/ui/parser/recover-missing-semi.rs b/src/test/ui/parser/recover-missing-semi.rs new file mode 100644 index 0000000000..1893dc716b --- /dev/null +++ b/src/test/ui/parser/recover-missing-semi.rs @@ -0,0 +1,13 @@ +fn main() { + let _: usize = () + //~^ ERROR mismatched types + let _ = 3; + //~^ ERROR expected one of +} + +fn foo() -> usize { + let _: usize = () + //~^ ERROR mismatched types + return 3; + //~^ ERROR expected one of +} diff --git a/src/test/ui/parser/recover-missing-semi.stderr b/src/test/ui/parser/recover-missing-semi.stderr new file mode 100644 index 0000000000..99339e4dd5 --- /dev/null +++ b/src/test/ui/parser/recover-missing-semi.stderr @@ -0,0 +1,39 @@ +error: expected one of `.`, `;`, `?`, or an operator, found `let` + --> $DIR/recover-missing-semi.rs:4:5 + | +LL | let _: usize = () + | - help: a semicolon may be missing here +LL | +LL | let _ = 3; + | ^^^ + +error: expected one of `.`, `;`, `?`, or an operator, found `return` + --> $DIR/recover-missing-semi.rs:11:5 + | +LL | let _: usize = () + | - help: a semicolon may be missing here +LL | +LL | return 3; + | ^^^^^^ + +error[E0308]: mismatched types + --> $DIR/recover-missing-semi.rs:2:20 + | +LL | let _: usize = () + | ^^ expected usize, found () + | + = note: expected type `usize` + found type `()` + +error[E0308]: mismatched types + --> $DIR/recover-missing-semi.rs:9:20 + | +LL | let _: usize = () + | ^^ expected usize, found () + | + = note: expected type `usize` + found type `()` + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/parser/require-parens-for-chained-comparison.stderr b/src/test/ui/parser/require-parens-for-chained-comparison.stderr index 8899b0d43c..76e548de04 100644 --- a/src/test/ui/parser/require-parens-for-chained-comparison.stderr +++ b/src/test/ui/parser/require-parens-for-chained-comparison.stderr @@ -49,5 +49,5 @@ LL | f(); error: aborting due to 6 previous errors -Some errors occurred: E0308, E0369. +Some errors have detailed explanations: E0308, E0369. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/parser/struct-literal-in-for.rs b/src/test/ui/parser/struct-literal-in-for.rs index 526b5e75c4..3227ae37bf 100644 --- a/src/test/ui/parser/struct-literal-in-for.rs +++ b/src/test/ui/parser/struct-literal-in-for.rs @@ -9,9 +9,9 @@ impl Foo { } fn main() { - for x in Foo { //~ ERROR expected value, found struct `Foo` - x: 3 //~ ERROR expected type, found `3` - }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{` + for x in Foo { //~ ERROR struct literals are not allowed here + x: 3 //~^ ERROR `bool` is not an iterator + }.hi() { println!("yo"); } } diff --git a/src/test/ui/parser/struct-literal-in-for.stderr b/src/test/ui/parser/struct-literal-in-for.stderr index 07f2e41ac4..29af72a5d2 100644 --- a/src/test/ui/parser/struct-literal-in-for.stderr +++ b/src/test/ui/parser/struct-literal-in-for.stderr @@ -1,29 +1,30 @@ -error: expected type, found `3` - --> $DIR/struct-literal-in-for.rs:13:12 - | -LL | x: 3 - | ^ expecting a type here because of type ascription +error: struct literals are not allowed here + --> $DIR/struct-literal-in-for.rs:12:14 | - = note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `: ` -note: this expression expects an ascribed type after the colon - --> $DIR/struct-literal-in-for.rs:13:9 +LL | for x in Foo { + | ______________^ +LL | | x: 3 +LL | | }.hi() { + | |_____^ +help: surround the struct literal with parentheses | +LL | for x in (Foo { LL | x: 3 - | ^ - = help: this might be indicative of a syntax error elsewhere - -error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{` - --> $DIR/struct-literal-in-for.rs:14:12 +LL | }).hi() { | -LL | }.hi() { - | ^ expected one of `.`, `;`, `?`, `}`, or an operator here -error[E0423]: expected value, found struct `Foo` +error[E0277]: `bool` is not an iterator --> $DIR/struct-literal-in-for.rs:12:14 | -LL | for x in Foo { - | ^^^ did you mean `(Foo { /* fields */ })`? +LL | for x in Foo { + | ______________^ +LL | | x: 3 +LL | | }.hi() { + | |__________^ `bool` is not an iterator + | + = help: the trait `std::iter::Iterator` is not implemented for `bool` + = note: required by `std::iter::IntoIterator::into_iter` -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0423`. +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/parser/struct-literal-in-if.rs b/src/test/ui/parser/struct-literal-in-if.rs index 362a71c577..2ce2c8f189 100644 --- a/src/test/ui/parser/struct-literal-in-if.rs +++ b/src/test/ui/parser/struct-literal-in-if.rs @@ -9,9 +9,9 @@ impl Foo { } fn main() { - if Foo { //~ ERROR expected value, found struct `Foo` - x: 3 //~ ERROR expected type, found `3` - }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{` + if Foo { //~ ERROR struct literals are not allowed here + x: 3 + }.hi() { println!("yo"); } } diff --git a/src/test/ui/parser/struct-literal-in-if.stderr b/src/test/ui/parser/struct-literal-in-if.stderr index 3dd61e74f1..e76c1cb45d 100644 --- a/src/test/ui/parser/struct-literal-in-if.stderr +++ b/src/test/ui/parser/struct-literal-in-if.stderr @@ -1,29 +1,17 @@ -error: expected type, found `3` - --> $DIR/struct-literal-in-if.rs:13:12 - | -LL | x: 3 - | ^ expecting a type here because of type ascription +error: struct literals are not allowed here + --> $DIR/struct-literal-in-if.rs:12:8 | - = note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `: ` -note: this expression expects an ascribed type after the colon - --> $DIR/struct-literal-in-if.rs:13:9 +LL | if Foo { + | ________^ +LL | | x: 3 +LL | | }.hi() { + | |_____^ +help: surround the struct literal with parentheses | +LL | if (Foo { LL | x: 3 - | ^ - = help: this might be indicative of a syntax error elsewhere - -error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{` - --> $DIR/struct-literal-in-if.rs:14:12 - | -LL | }.hi() { - | ^ expected one of `.`, `;`, `?`, `}`, or an operator here - -error[E0423]: expected value, found struct `Foo` - --> $DIR/struct-literal-in-if.rs:12:8 +LL | }).hi() { | -LL | if Foo { - | ^^^ did you mean `(Foo { /* fields */ })`? -error: aborting due to 3 previous errors +error: aborting due to previous error -For more information about this error, try `rustc --explain E0423`. diff --git a/src/test/ui/parser/struct-literal-in-match-discriminant.rs b/src/test/ui/parser/struct-literal-in-match-discriminant.rs index 35a1109035..ce132df5a8 100644 --- a/src/test/ui/parser/struct-literal-in-match-discriminant.rs +++ b/src/test/ui/parser/struct-literal-in-match-discriminant.rs @@ -3,11 +3,11 @@ struct Foo { } fn main() { - match Foo { //~ ERROR expected value, found struct `Foo` - x: 3 //~ ERROR expected one of `=>`, `@`, `if`, or `|`, found `:` + match Foo { //~ ERROR struct literals are not allowed here + x: 3 } { - Foo { //~ ERROR mismatched types - x: x //~ ERROR cannot find value `x` in this scope - } => {} //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `=>` + Foo { + x: x + } => {} } } diff --git a/src/test/ui/parser/struct-literal-in-match-discriminant.stderr b/src/test/ui/parser/struct-literal-in-match-discriminant.stderr index 94a758eb52..95b0882b7a 100644 --- a/src/test/ui/parser/struct-literal-in-match-discriminant.stderr +++ b/src/test/ui/parser/struct-literal-in-match-discriminant.stderr @@ -1,42 +1,17 @@ -error: expected one of `=>`, `@`, `if`, or `|`, found `:` - --> $DIR/struct-literal-in-match-discriminant.rs:7:10 - | -LL | x: 3 - | ^ expected one of `=>`, `@`, `if`, or `|` here - -error: expected one of `.`, `;`, `?`, `}`, or an operator, found `=>` - --> $DIR/struct-literal-in-match-discriminant.rs:11:11 - | -LL | } => {} - | ^^ expected one of `.`, `;`, `?`, `}`, or an operator here - -error[E0423]: expected value, found struct `Foo` +error: struct literals are not allowed here --> $DIR/struct-literal-in-match-discriminant.rs:6:11 | -LL | match Foo { - | ^^^ did you mean `(Foo { /* fields */ })`? - -error[E0425]: cannot find value `x` in this scope - --> $DIR/struct-literal-in-match-discriminant.rs:10:16 - | -LL | x: x - | ^ not found in this scope - -error[E0308]: mismatched types - --> $DIR/struct-literal-in-match-discriminant.rs:9:9 +LL | match Foo { + | ___________^ +LL | | x: 3 +LL | | } { + | |_____^ +help: surround the struct literal with parentheses | -LL | fn main() { - | - expected `()` because of default return type -... -LL | / Foo { -LL | | x: x -LL | | } => {} - | |_________^ expected (), found struct `Foo` +LL | match (Foo { +LL | x: 3 +LL | }) { | - = note: expected type `()` - found type `Foo` -error: aborting due to 5 previous errors +error: aborting due to previous error -Some errors occurred: E0308, E0423, E0425. -For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/parser/struct-literal-in-while.rs b/src/test/ui/parser/struct-literal-in-while.rs index 561cdcea08..5000ce85b7 100644 --- a/src/test/ui/parser/struct-literal-in-while.rs +++ b/src/test/ui/parser/struct-literal-in-while.rs @@ -9,10 +9,9 @@ impl Foo { } fn main() { - while Foo { //~ ERROR expected value, found struct `Foo` - x: 3 //~ ERROR expected type, found `3` - }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{` - //~| ERROR no method named `hi` found for type `()` in the current scope + while Foo { //~ ERROR struct literals are not allowed here + x: 3 + }.hi() { println!("yo"); } } diff --git a/src/test/ui/parser/struct-literal-in-while.stderr b/src/test/ui/parser/struct-literal-in-while.stderr index d48244654c..acd31b477d 100644 --- a/src/test/ui/parser/struct-literal-in-while.stderr +++ b/src/test/ui/parser/struct-literal-in-while.stderr @@ -1,36 +1,17 @@ -error: expected type, found `3` - --> $DIR/struct-literal-in-while.rs:13:12 - | -LL | x: 3 - | ^ expecting a type here because of type ascription +error: struct literals are not allowed here + --> $DIR/struct-literal-in-while.rs:12:11 | - = note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `: ` -note: this expression expects an ascribed type after the colon - --> $DIR/struct-literal-in-while.rs:13:9 +LL | while Foo { + | ___________^ +LL | | x: 3 +LL | | }.hi() { + | |_____^ +help: surround the struct literal with parentheses | +LL | while (Foo { LL | x: 3 - | ^ - = help: this might be indicative of a syntax error elsewhere - -error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{` - --> $DIR/struct-literal-in-while.rs:14:12 - | -LL | }.hi() { - | ^ expected one of `.`, `;`, `?`, `}`, or an operator here - -error[E0423]: expected value, found struct `Foo` - --> $DIR/struct-literal-in-while.rs:12:11 - | -LL | while Foo { - | ^^^ did you mean `(Foo { /* fields */ })`? - -error[E0599]: no method named `hi` found for type `()` in the current scope - --> $DIR/struct-literal-in-while.rs:14:7 +LL | }).hi() { | -LL | }.hi() { - | ^^ -error: aborting due to 4 previous errors +error: aborting due to previous error -Some errors occurred: E0423, E0599. -For more information about an error, try `rustc --explain E0423`. diff --git a/src/test/ui/parser/struct-literal-restrictions-in-lamda.rs b/src/test/ui/parser/struct-literal-restrictions-in-lamda.rs index e5049082ab..e185153dcf 100644 --- a/src/test/ui/parser/struct-literal-restrictions-in-lamda.rs +++ b/src/test/ui/parser/struct-literal-restrictions-in-lamda.rs @@ -9,10 +9,9 @@ impl Foo { } fn main() { - while || Foo { //~ ERROR expected value, found struct `Foo` - x: 3 //~ ERROR expected type, found `3` - }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{` - //~| ERROR no method named `hi` found for type `()` in the current scope + while || Foo { //~ ERROR struct literals are not allowed here + x: 3 //~^ ERROR mismatched types + }.hi() { println!("yo"); } } diff --git a/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr b/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr index a8c93233db..2407807416 100644 --- a/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr +++ b/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr @@ -1,36 +1,30 @@ -error: expected type, found `3` - --> $DIR/struct-literal-restrictions-in-lamda.rs:13:12 - | -LL | x: 3 - | ^ expecting a type here because of type ascription +error: struct literals are not allowed here + --> $DIR/struct-literal-restrictions-in-lamda.rs:12:14 | - = note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `: ` -note: this expression expects an ascribed type after the colon - --> $DIR/struct-literal-restrictions-in-lamda.rs:13:9 +LL | while || Foo { + | ______________^ +LL | | x: 3 +LL | | }.hi() { + | |_____^ +help: surround the struct literal with parentheses | +LL | while || (Foo { LL | x: 3 - | ^ - = help: this might be indicative of a syntax error elsewhere - -error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{` - --> $DIR/struct-literal-restrictions-in-lamda.rs:14:12 +LL | }).hi() { | -LL | }.hi() { - | ^ expected one of `.`, `;`, `?`, `}`, or an operator here -error[E0423]: expected value, found struct `Foo` - --> $DIR/struct-literal-restrictions-in-lamda.rs:12:14 +error[E0308]: mismatched types + --> $DIR/struct-literal-restrictions-in-lamda.rs:12:11 | -LL | while || Foo { - | ^^^ did you mean `(Foo { /* fields */ })`? - -error[E0599]: no method named `hi` found for type `()` in the current scope - --> $DIR/struct-literal-restrictions-in-lamda.rs:14:7 +LL | while || Foo { + | ___________^ +LL | | x: 3 +LL | | }.hi() { + | |__________^ expected bool, found closure | -LL | }.hi() { - | ^^ + = note: expected type `bool` + found type `[closure@$DIR/struct-literal-restrictions-in-lamda.rs:12:11: 14:11]` -error: aborting due to 4 previous errors +error: aborting due to 2 previous errors -Some errors occurred: E0423, E0599. -For more information about an error, try `rustc --explain E0423`. +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/pattern/const-pat-ice.rs b/src/test/ui/pattern/const-pat-ice.rs index 865c54be1a..b866c7fa6c 100644 --- a/src/test/ui/pattern/const-pat-ice.rs +++ b/src/test/ui/pattern/const-pat-ice.rs @@ -1,5 +1,7 @@ // failure-status: 101 // rustc-env:RUST_BACKTRACE=0 +// normalize-stderr-test "note: rustc 1.* running on .*" -> "note: rustc VERSION running on TARGET" +// normalize-stderr-test "note: compiler flags: .*" -> "note: compiler flags: FLAGS" // This is a repro test for an ICE in our pattern handling of constants. diff --git a/src/test/ui/pattern/const-pat-ice.stderr b/src/test/ui/pattern/const-pat-ice.stderr new file mode 100644 index 0000000000..260c2e04d7 --- /dev/null +++ b/src/test/ui/pattern/const-pat-ice.stderr @@ -0,0 +1,13 @@ +thread 'rustc' panicked at 'assertion failed: rows.iter().all(|r| r.len() == v.len())', src/librustc_mir/hair/pattern/_match.rs:1083:5 +note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace. + +error: internal compiler error: unexpected panic + +note: the compiler unexpectedly panicked. this is a bug. + +note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports + +note: rustc VERSION running on TARGET + +note: compiler flags: FLAGS + diff --git a/src/test/ui/pattern/pat-tuple-bad-type.stderr b/src/test/ui/pattern/pat-tuple-bad-type.stderr index 84b9a62243..3da3bcb635 100644 --- a/src/test/ui/pattern/pat-tuple-bad-type.stderr +++ b/src/test/ui/pattern/pat-tuple-bad-type.stderr @@ -20,5 +20,5 @@ LL | (..) => {} error: aborting due to 2 previous errors -Some errors occurred: E0282, E0308. +Some errors have detailed explanations: E0282, E0308. For more information about an error, try `rustc --explain E0282`. diff --git a/src/test/ui/pattern/pat-tuple-overfield.stderr b/src/test/ui/pattern/pat-tuple-overfield.stderr index 9bf14e15fc..0430897510 100644 --- a/src/test/ui/pattern/pat-tuple-overfield.stderr +++ b/src/test/ui/pattern/pat-tuple-overfield.stderr @@ -30,5 +30,5 @@ LL | S(1, 2, .., 3, 4) => {} error: aborting due to 4 previous errors -Some errors occurred: E0023, E0308. +Some errors have detailed explanations: E0023, E0308. For more information about an error, try `rustc --explain E0023`. diff --git a/src/test/ui/pattern/pattern-bindings-after-at.nll.stderr b/src/test/ui/pattern/pattern-bindings-after-at.nll.stderr new file mode 100644 index 0000000000..35ee7877f2 --- /dev/null +++ b/src/test/ui/pattern/pattern-bindings-after-at.nll.stderr @@ -0,0 +1,22 @@ +error[E0303]: pattern bindings are not allowed after an `@` + --> $DIR/pattern-bindings-after-at.rs:8:31 + | +LL | ref mut z @ &mut Some(ref a) => { + | ^^^^^ not allowed after `@` + +error[E0502]: cannot borrow `_` as immutable because it is also borrowed as mutable + --> $DIR/pattern-bindings-after-at.rs:8:31 + | +LL | ref mut z @ &mut Some(ref a) => { + | ----------------------^^^^^- + | | | + | | immutable borrow occurs here + | mutable borrow occurs here +... +LL | **z = None; + | ---------- mutable borrow later used here + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0303, E0502. +For more information about an error, try `rustc --explain E0303`. diff --git a/src/test/ui/pattern/pattern-bindings-after-at.rs b/src/test/ui/pattern/pattern-bindings-after-at.rs index 4a24a49685..20a1d017cd 100644 --- a/src/test/ui/pattern/pattern-bindings-after-at.rs +++ b/src/test/ui/pattern/pattern-bindings-after-at.rs @@ -7,6 +7,9 @@ fn main() { match &mut Some(1) { ref mut z @ &mut Some(ref a) => { //~^ ERROR pattern bindings are not allowed after an `@` + //~| WARN cannot borrow `_` as immutable because it is also borrowed as mutable + //~| WARN this error has been downgraded to a warning for backwards compatibility + //~| WARN this represents potential undefined behavior in your code and this warning will **z = None; println!("{}", *a); } diff --git a/src/test/ui/pattern/pattern-bindings-after-at.stderr b/src/test/ui/pattern/pattern-bindings-after-at.stderr index 7a3883c585..3a2cffcbf4 100644 --- a/src/test/ui/pattern/pattern-bindings-after-at.stderr +++ b/src/test/ui/pattern/pattern-bindings-after-at.stderr @@ -4,6 +4,22 @@ error[E0303]: pattern bindings are not allowed after an `@` LL | ref mut z @ &mut Some(ref a) => { | ^^^^^ not allowed after `@` +warning[E0502]: cannot borrow `_` as immutable because it is also borrowed as mutable + --> $DIR/pattern-bindings-after-at.rs:8:31 + | +LL | ref mut z @ &mut Some(ref a) => { + | ----------------------^^^^^- + | | | + | | immutable borrow occurs here + | mutable borrow occurs here +... +LL | **z = None; + | ---------- mutable borrow later used here + | + = warning: this error has been downgraded to a warning for backwards compatibility with previous releases + = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + error: aborting due to previous error -For more information about this error, try `rustc --explain E0303`. +Some errors have detailed explanations: E0303, E0502. +For more information about an error, try `rustc --explain E0303`. diff --git a/src/test/ui/pattern/pattern-error-continue.stderr b/src/test/ui/pattern/pattern-error-continue.stderr index 11e0c31cfa..a581f07496 100644 --- a/src/test/ui/pattern/pattern-error-continue.stderr +++ b/src/test/ui/pattern/pattern-error-continue.stderr @@ -37,5 +37,5 @@ LL | f(true); error: aborting due to 5 previous errors -Some errors occurred: E0023, E0308, E0433, E0532. +Some errors have detailed explanations: E0023, E0308, E0433, E0532. For more information about an error, try `rustc --explain E0023`. diff --git a/src/test/ui/pptypedef.stderr b/src/test/ui/pptypedef.stderr index 32ee1a6aae..dc4b3ce370 100644 --- a/src/test/ui/pptypedef.stderr +++ b/src/test/ui/pptypedef.stderr @@ -3,12 +3,20 @@ error[E0308]: mismatched types | LL | let_in(3u32, |i| { assert!(i == 3i32); }); | ^^^^ expected u32, found i32 +help: change the type of the numeric literal from `i32` to `u32` + | +LL | let_in(3u32, |i| { assert!(i == 3u32); }); + | ^^^^ error[E0308]: mismatched types --> $DIR/pptypedef.rs:8:37 | LL | let_in(3i32, |i| { assert!(i == 3u32); }); | ^^^^ expected i32, found u32 +help: change the type of the numeric literal from `u32` to `i32` + | +LL | let_in(3i32, |i| { assert!(i == 3i32); }); + | ^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/print_type_sizes/multiple_types.stdout b/src/test/ui/print_type_sizes/multiple_types.stdout index eed9af2698..6411881545 100644 --- a/src/test/ui/print_type_sizes/multiple_types.stdout +++ b/src/test/ui/print_type_sizes/multiple_types.stdout @@ -1,9 +1,9 @@ print-type-size type: `Enum`: 51 bytes, alignment: 1 bytes print-type-size discriminant: 1 bytes -print-type-size variant `Small`: 7 bytes -print-type-size field `.0`: 7 bytes print-type-size variant `Large`: 50 bytes print-type-size field `.0`: 50 bytes +print-type-size variant `Small`: 7 bytes +print-type-size field `.0`: 7 bytes print-type-size type: `FiftyBytes`: 50 bytes, alignment: 1 bytes print-type-size field `.0`: 50 bytes print-type-size type: `SevenBytes`: 7 bytes, alignment: 1 bytes diff --git a/src/test/ui/print_type_sizes/niche-filling.rs b/src/test/ui/print_type_sizes/niche-filling.rs index bed1e32a60..0127261b2b 100644 --- a/src/test/ui/print_type_sizes/niche-filling.rs +++ b/src/test/ui/print_type_sizes/niche-filling.rs @@ -57,6 +57,15 @@ pub enum Enum4 { Four(D) } +pub union Union1 { + a: A, +} + +pub union Union2 { + a: A, + b: B, +} + #[start] fn start(_: isize, _: *const *const u8) -> isize { let _x: MyOption = Default::default(); @@ -69,5 +78,13 @@ fn start(_: isize, _: *const *const u8) -> isize { let _e: Enum4<(), char, (), ()> = Enum4::One(()); let _f: Enum4<(), (), bool, ()> = Enum4::One(()); let _g: Enum4<(), (), (), MyOption> = Enum4::One(()); + + // Unions do not currently participate in niche filling. + let _h: MyOption> = Default::default(); + + // ...even when theoretically possible. + let _i: MyOption> = Default::default(); + let _j: MyOption> = Default::default(); + 0 } diff --git a/src/test/ui/print_type_sizes/niche-filling.stdout b/src/test/ui/print_type_sizes/niche-filling.stdout index 0789c6d7f3..301edc0d08 100644 --- a/src/test/ui/print_type_sizes/niche-filling.stdout +++ b/src/test/ui/print_type_sizes/niche-filling.stdout @@ -4,75 +4,101 @@ print-type-size field `.post`: 2 bytes print-type-size field `.pre`: 1 bytes print-type-size end padding: 1 bytes print-type-size type: `MyOption`: 12 bytes, alignment: 4 bytes -print-type-size variant `None`: 0 bytes print-type-size variant `Some`: 12 bytes print-type-size field `.0`: 12 bytes -print-type-size type: `EmbeddedDiscr`: 8 bytes, alignment: 4 bytes print-type-size variant `None`: 0 bytes +print-type-size type: `EmbeddedDiscr`: 8 bytes, alignment: 4 bytes print-type-size variant `Record`: 7 bytes print-type-size field `.val`: 4 bytes print-type-size field `.post`: 2 bytes print-type-size field `.pre`: 1 bytes +print-type-size variant `None`: 0 bytes print-type-size end padding: 1 bytes +print-type-size type: `MyOption>`: 8 bytes, alignment: 4 bytes +print-type-size discriminant: 4 bytes +print-type-size variant `Some`: 4 bytes +print-type-size field `.0`: 4 bytes +print-type-size variant `None`: 0 bytes +print-type-size type: `MyOption>`: 8 bytes, alignment: 4 bytes +print-type-size discriminant: 4 bytes +print-type-size variant `Some`: 4 bytes +print-type-size field `.0`: 4 bytes +print-type-size variant `None`: 0 bytes +print-type-size type: `MyOption>`: 8 bytes, alignment: 4 bytes +print-type-size discriminant: 4 bytes +print-type-size variant `Some`: 4 bytes +print-type-size field `.0`: 4 bytes +print-type-size variant `None`: 0 bytes print-type-size type: `NestedNonZero`: 8 bytes, alignment: 4 bytes print-type-size field `.val`: 4 bytes print-type-size field `.post`: 2 bytes print-type-size field `.pre`: 1 bytes print-type-size end padding: 1 bytes print-type-size type: `Enum4<(), char, (), ()>`: 4 bytes, alignment: 4 bytes -print-type-size variant `One`: 0 bytes -print-type-size field `.0`: 0 bytes print-type-size variant `Two`: 4 bytes print-type-size field `.0`: 4 bytes +print-type-size variant `One`: 0 bytes +print-type-size field `.0`: 0 bytes print-type-size variant `Three`: 0 bytes print-type-size field `.0`: 0 bytes print-type-size variant `Four`: 0 bytes print-type-size field `.0`: 0 bytes print-type-size type: `MyOption`: 4 bytes, alignment: 4 bytes -print-type-size variant `None`: 0 bytes print-type-size variant `Some`: 4 bytes print-type-size field `.0`: 4 bytes -print-type-size type: `MyOption`: 4 bytes, alignment: 4 bytes print-type-size variant `None`: 0 bytes +print-type-size type: `MyOption`: 4 bytes, alignment: 4 bytes print-type-size variant `Some`: 4 bytes print-type-size field `.0`: 4 bytes +print-type-size variant `None`: 0 bytes +print-type-size type: `Union1`: 4 bytes, alignment: 4 bytes +print-type-size variant `Union1`: 4 bytes +print-type-size field `.a`: 4 bytes +print-type-size type: `Union2`: 4 bytes, alignment: 4 bytes +print-type-size variant `Union2`: 4 bytes +print-type-size field `.a`: 4 bytes +print-type-size field `.b`: 4 bytes, offset: 0 bytes, alignment: 4 bytes +print-type-size type: `Union2`: 4 bytes, alignment: 4 bytes +print-type-size variant `Union2`: 4 bytes +print-type-size field `.a`: 4 bytes +print-type-size field `.b`: 4 bytes, offset: 0 bytes, alignment: 4 bytes print-type-size type: `std::num::NonZeroU32`: 4 bytes, alignment: 4 bytes print-type-size field `.0`: 4 bytes print-type-size type: `Enum4<(), (), (), MyOption>`: 2 bytes, alignment: 1 bytes +print-type-size variant `Four`: 2 bytes +print-type-size field `.0`: 2 bytes print-type-size variant `One`: 0 bytes print-type-size field `.0`: 0 bytes print-type-size variant `Two`: 0 bytes print-type-size field `.0`: 0 bytes print-type-size variant `Three`: 0 bytes print-type-size field `.0`: 0 bytes -print-type-size variant `Four`: 2 bytes -print-type-size field `.0`: 2 bytes print-type-size type: `MyOption>`: 2 bytes, alignment: 1 bytes -print-type-size variant `None`: 0 bytes print-type-size variant `Some`: 2 bytes print-type-size field `.0`: 2 bytes +print-type-size variant `None`: 0 bytes print-type-size type: `MyOption`: 2 bytes, alignment: 1 bytes print-type-size discriminant: 1 bytes -print-type-size variant `None`: 0 bytes print-type-size variant `Some`: 1 bytes print-type-size field `.0`: 1 bytes +print-type-size variant `None`: 0 bytes print-type-size type: `Enum4<(), (), bool, ()>`: 1 bytes, alignment: 1 bytes +print-type-size variant `Three`: 1 bytes +print-type-size field `.0`: 1 bytes print-type-size variant `One`: 0 bytes print-type-size field `.0`: 0 bytes print-type-size variant `Two`: 0 bytes print-type-size field `.0`: 0 bytes -print-type-size variant `Three`: 1 bytes -print-type-size field `.0`: 1 bytes print-type-size variant `Four`: 0 bytes print-type-size field `.0`: 0 bytes print-type-size type: `MyOption`: 1 bytes, alignment: 1 bytes -print-type-size variant `None`: 0 bytes print-type-size variant `Some`: 1 bytes print-type-size field `.0`: 1 bytes -print-type-size type: `MyOption`: 1 bytes, alignment: 1 bytes print-type-size variant `None`: 0 bytes +print-type-size type: `MyOption`: 1 bytes, alignment: 1 bytes print-type-size variant `Some`: 1 bytes print-type-size field `.0`: 1 bytes +print-type-size variant `None`: 0 bytes print-type-size type: `std::cmp::Ordering`: 1 bytes, alignment: 1 bytes print-type-size discriminant: 1 bytes print-type-size variant `Less`: 0 bytes diff --git a/src/test/ui/print_type_sizes/padding.stdout b/src/test/ui/print_type_sizes/padding.stdout index 0eaff7118b..9afdf76245 100644 --- a/src/test/ui/print_type_sizes/padding.stdout +++ b/src/test/ui/print_type_sizes/padding.stdout @@ -1,21 +1,21 @@ print-type-size type: `E1`: 12 bytes, alignment: 4 bytes print-type-size discriminant: 1 bytes +print-type-size variant `B`: 11 bytes +print-type-size padding: 3 bytes +print-type-size field `.0`: 8 bytes, alignment: 4 bytes print-type-size variant `A`: 7 bytes print-type-size field `.1`: 1 bytes print-type-size padding: 2 bytes print-type-size field `.0`: 4 bytes, alignment: 4 bytes +print-type-size type: `E2`: 12 bytes, alignment: 4 bytes +print-type-size discriminant: 1 bytes print-type-size variant `B`: 11 bytes print-type-size padding: 3 bytes print-type-size field `.0`: 8 bytes, alignment: 4 bytes -print-type-size type: `E2`: 12 bytes, alignment: 4 bytes -print-type-size discriminant: 1 bytes print-type-size variant `A`: 7 bytes print-type-size field `.0`: 1 bytes print-type-size padding: 2 bytes print-type-size field `.1`: 4 bytes, alignment: 4 bytes -print-type-size variant `B`: 11 bytes -print-type-size padding: 3 bytes -print-type-size field `.0`: 8 bytes, alignment: 4 bytes print-type-size type: `S`: 8 bytes, alignment: 4 bytes print-type-size field `.g`: 4 bytes print-type-size field `.a`: 1 bytes diff --git a/src/test/ui/print_type_sizes/repr-align.stdout b/src/test/ui/print_type_sizes/repr-align.stdout index 7df12f040b..33671bd8e1 100644 --- a/src/test/ui/print_type_sizes/repr-align.stdout +++ b/src/test/ui/print_type_sizes/repr-align.stdout @@ -1,10 +1,10 @@ print-type-size type: `E`: 32 bytes, alignment: 16 bytes print-type-size discriminant: 4 bytes -print-type-size variant `A`: 4 bytes -print-type-size field `.0`: 4 bytes print-type-size variant `B`: 28 bytes print-type-size padding: 12 bytes print-type-size field `.0`: 16 bytes, alignment: 16 bytes +print-type-size variant `A`: 4 bytes +print-type-size field `.0`: 4 bytes print-type-size type: `S`: 32 bytes, alignment: 16 bytes print-type-size field `.c`: 16 bytes print-type-size field `.a`: 4 bytes diff --git a/src/test/ui/print_type_sizes/variants.stdout b/src/test/ui/print_type_sizes/variants.stdout index eed9af2698..6411881545 100644 --- a/src/test/ui/print_type_sizes/variants.stdout +++ b/src/test/ui/print_type_sizes/variants.stdout @@ -1,9 +1,9 @@ print-type-size type: `Enum`: 51 bytes, alignment: 1 bytes print-type-size discriminant: 1 bytes -print-type-size variant `Small`: 7 bytes -print-type-size field `.0`: 7 bytes print-type-size variant `Large`: 50 bytes print-type-size field `.0`: 50 bytes +print-type-size variant `Small`: 7 bytes +print-type-size field `.0`: 7 bytes print-type-size type: `FiftyBytes`: 50 bytes, alignment: 1 bytes print-type-size field `.0`: 50 bytes print-type-size type: `SevenBytes`: 7 bytes, alignment: 1 bytes diff --git a/src/test/ui/privacy/privacy-ns1.stderr b/src/test/ui/privacy/privacy-ns1.stderr index 07b013be72..09148f9d0e 100644 --- a/src/test/ui/privacy/privacy-ns1.stderr +++ b/src/test/ui/privacy/privacy-ns1.stderr @@ -72,5 +72,5 @@ LL | use foo3::Bar; error: aborting due to 4 previous errors -Some errors occurred: E0412, E0423, E0425, E0573. +Some errors have detailed explanations: E0412, E0423, E0425. For more information about an error, try `rustc --explain E0412`. diff --git a/src/test/ui/privacy/privacy-ns2.stderr b/src/test/ui/privacy/privacy-ns2.stderr index cd5b536906..8ea32f36f9 100644 --- a/src/test/ui/privacy/privacy-ns2.stderr +++ b/src/test/ui/privacy/privacy-ns2.stderr @@ -82,5 +82,5 @@ LL | use foo3::{Bar,Baz}; error: aborting due to 7 previous errors -Some errors occurred: E0423, E0573, E0603. +Some errors have detailed explanations: E0423, E0603. For more information about an error, try `rustc --explain E0423`. diff --git a/src/test/ui/privacy/privacy1.stderr b/src/test/ui/privacy/privacy1.stderr index 73672d1c21..b647cc8ab8 100644 --- a/src/test/ui/privacy/privacy1.stderr +++ b/src/test/ui/privacy/privacy1.stderr @@ -102,5 +102,5 @@ LL | ::bar::baz::A.bar2(); error: aborting due to 17 previous errors -Some errors occurred: E0603, E0624. +Some errors have detailed explanations: E0603, E0624. For more information about an error, try `rustc --explain E0603`. diff --git a/src/test/ui/privacy/privacy2.stderr b/src/test/ui/privacy/privacy2.stderr index 2e6bb99f43..9f2359657b 100644 --- a/src/test/ui/privacy/privacy2.stderr +++ b/src/test/ui/privacy/privacy2.stderr @@ -14,5 +14,5 @@ error: requires `sized` lang_item error: aborting due to 3 previous errors -Some errors occurred: E0432, E0603. +Some errors have detailed explanations: E0432, E0603. For more information about an error, try `rustc --explain E0432`. diff --git a/src/test/ui/privacy/private-in-public-assoc-ty.stderr b/src/test/ui/privacy/private-in-public-assoc-ty.stderr index a610b47592..81d70ee770 100644 --- a/src/test/ui/privacy/private-in-public-assoc-ty.stderr +++ b/src/test/ui/privacy/private-in-public-assoc-ty.stderr @@ -58,5 +58,5 @@ LL | existential type Exist: PrivTr; error: aborting due to 3 previous errors -Some errors occurred: E0445, E0446. +Some errors have detailed explanations: E0445, E0446. For more information about an error, try `rustc --explain E0445`. diff --git a/src/test/ui/privacy/private-in-public.stderr b/src/test/ui/privacy/private-in-public.stderr index 3c57e50cfe..e3fa4c145c 100644 --- a/src/test/ui/privacy/private-in-public.stderr +++ b/src/test/ui/privacy/private-in-public.stderr @@ -294,5 +294,5 @@ LL | pub fn f3(arg: Result) {} error: aborting due to 32 previous errors -Some errors occurred: E0445, E0446. +Some errors have detailed explanations: E0445, E0446. For more information about an error, try `rustc --explain E0445`. diff --git a/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs b/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs index 9ebc96017f..784615354a 100644 --- a/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs +++ b/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs @@ -1,6 +1,6 @@ // aux-build:priv_dep.rs // aux-build:pub_dep.rs - // compile-flags: --extern-private priv_dep + // extern-private:priv_dep #![deny(exported_private_dependencies)] // This crate is a private dependency diff --git a/src/test/ui/privacy/restricted/test.stderr b/src/test/ui/privacy/restricted/test.stderr index b4ef7b8e3f..fa78ae759c 100644 --- a/src/test/ui/privacy/restricted/test.stderr +++ b/src/test/ui/privacy/restricted/test.stderr @@ -78,5 +78,5 @@ LL | u.h(); error: aborting due to 12 previous errors -Some errors occurred: E0364, E0433, E0603, E0616, E0624. +Some errors have detailed explanations: E0364, E0433, E0603, E0616, E0624. For more information about an error, try `rustc --explain E0364`. diff --git a/src/test/ui/proc-macro/ambiguous-builtin-attrs.stderr b/src/test/ui/proc-macro/ambiguous-builtin-attrs.stderr index 975be7ce03..23310f6c6f 100644 --- a/src/test/ui/proc-macro/ambiguous-builtin-attrs.stderr +++ b/src/test/ui/proc-macro/ambiguous-builtin-attrs.stderr @@ -76,5 +76,5 @@ LL | use builtin_attrs::*; error: aborting due to 6 previous errors -Some errors occurred: E0425, E0659. +Some errors have detailed explanations: E0425, E0659. For more information about an error, try `rustc --explain E0425`. diff --git a/src/test/ui/proc-macro/attr-stmt-expr.stderr b/src/test/ui/proc-macro/attr-stmt-expr.stderr index 34ee012ab3..3928a973ea 100644 --- a/src/test/ui/proc-macro/attr-stmt-expr.stderr +++ b/src/test/ui/proc-macro/attr-stmt-expr.stderr @@ -1,17 +1,19 @@ -error[E0658]: attributes on expressions are experimental. (see issue #15701) +error[E0658]: attributes on expressions are experimental --> $DIR/attr-stmt-expr.rs:10:5 | LL | #[expect_print_expr] | ^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/15701 = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable -error[E0658]: attributes on expressions are experimental. (see issue #15701) +error[E0658]: attributes on expressions are experimental --> $DIR/attr-stmt-expr.rs:23:5 | LL | #[expect_expr] | ^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/15701 = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/proc-macro/auxiliary/derive-bad.rs b/src/test/ui/proc-macro/auxiliary/derive-bad.rs index 468410972f..90bb9b1baf 100644 --- a/src/test/ui/proc-macro/auxiliary/derive-bad.rs +++ b/src/test/ui/proc-macro/auxiliary/derive-bad.rs @@ -11,4 +11,3 @@ use proc_macro::TokenStream; pub fn derive_a(_input: TokenStream) -> TokenStream { "struct A { inner }".parse().unwrap() } - diff --git a/src/test/ui/proc-macro/derive-helper-shadowing.stderr b/src/test/ui/proc-macro/derive-helper-shadowing.stderr index 5f2009b384..fb86cabf93 100644 --- a/src/test/ui/proc-macro/derive-helper-shadowing.stderr +++ b/src/test/ui/proc-macro/derive-helper-shadowing.stderr @@ -1,9 +1,10 @@ -error[E0658]: The attribute `my_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `my_attr` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/derive-helper-shadowing.rs:20:15 | LL | #[my_attr] | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable error[E0659]: `my_attr` is ambiguous (derive helper attribute vs any other name) @@ -26,5 +27,5 @@ LL | use derive_helper_shadowing::*; error: aborting due to 2 previous errors -Some errors occurred: E0658, E0659. +Some errors have detailed explanations: E0658, E0659. For more information about an error, try `rustc --explain E0658`. diff --git a/src/test/ui/proc-macro/derive-still-gated.stderr b/src/test/ui/proc-macro/derive-still-gated.stderr index f7c8960372..d235343ff1 100644 --- a/src/test/ui/proc-macro/derive-still-gated.stderr +++ b/src/test/ui/proc-macro/derive-still-gated.stderr @@ -1,9 +1,10 @@ -error[E0658]: The attribute `derive_A` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `derive_A` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/derive-still-gated.rs:8:3 | LL | #[derive_A] | ^^^^^^^^ help: a built-in attribute with a similar name exists: `derive` | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/proc-macro/expand-to-unstable-2.stderr b/src/test/ui/proc-macro/expand-to-unstable-2.stderr index b322f8e9d5..e2f51dd3d5 100644 --- a/src/test/ui/proc-macro/expand-to-unstable-2.stderr +++ b/src/test/ui/proc-macro/expand-to-unstable-2.stderr @@ -1,9 +1,10 @@ -error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics (see issue #29642) +error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics --> $DIR/expand-to-unstable-2.rs:8:10 | LL | #[derive(Unstable)] | ^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(rustc_attrs)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/proc-macro/invalid-punct-ident-1.rs b/src/test/ui/proc-macro/invalid-punct-ident-1.rs index 2360b1fe8c..c9881ad2c3 100644 --- a/src/test/ui/proc-macro/invalid-punct-ident-1.rs +++ b/src/test/ui/proc-macro/invalid-punct-ident-1.rs @@ -1,5 +1,9 @@ // aux-build:invalid-punct-ident.rs +// FIXME https://github.com/rust-lang/rust/issues/59998 +// normalize-stderr-test "thread.*panicked.*proc_macro_server.rs.*\n" -> "" +// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" + #[macro_use] extern crate invalid_punct_ident; diff --git a/src/test/ui/proc-macro/invalid-punct-ident-1.stderr b/src/test/ui/proc-macro/invalid-punct-ident-1.stderr index 9a53741f94..40333a3f4c 100644 --- a/src/test/ui/proc-macro/invalid-punct-ident-1.stderr +++ b/src/test/ui/proc-macro/invalid-punct-ident-1.stderr @@ -1,5 +1,5 @@ error: proc macro panicked - --> $DIR/invalid-punct-ident-1.rs:6:1 + --> $DIR/invalid-punct-ident-1.rs:10:1 | LL | invalid_punct!(); | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/proc-macro/invalid-punct-ident-2.rs b/src/test/ui/proc-macro/invalid-punct-ident-2.rs index 9593d47bb1..15e2286a65 100644 --- a/src/test/ui/proc-macro/invalid-punct-ident-2.rs +++ b/src/test/ui/proc-macro/invalid-punct-ident-2.rs @@ -1,5 +1,9 @@ // aux-build:invalid-punct-ident.rs +// FIXME https://github.com/rust-lang/rust/issues/59998 +// normalize-stderr-test "thread.*panicked.*proc_macro_server.rs.*\n" -> "" +// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" + #[macro_use] extern crate invalid_punct_ident; diff --git a/src/test/ui/proc-macro/invalid-punct-ident-2.stderr b/src/test/ui/proc-macro/invalid-punct-ident-2.stderr index 77a26b830d..ec97e265c3 100644 --- a/src/test/ui/proc-macro/invalid-punct-ident-2.stderr +++ b/src/test/ui/proc-macro/invalid-punct-ident-2.stderr @@ -1,5 +1,5 @@ error: proc macro panicked - --> $DIR/invalid-punct-ident-2.rs:6:1 + --> $DIR/invalid-punct-ident-2.rs:10:1 | LL | invalid_ident!(); | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/proc-macro/invalid-punct-ident-3.rs b/src/test/ui/proc-macro/invalid-punct-ident-3.rs index 75e3e06f88..629bbaa9e3 100644 --- a/src/test/ui/proc-macro/invalid-punct-ident-3.rs +++ b/src/test/ui/proc-macro/invalid-punct-ident-3.rs @@ -1,5 +1,9 @@ // aux-build:invalid-punct-ident.rs +// FIXME https://github.com/rust-lang/rust/issues/59998 +// normalize-stderr-test "thread.*panicked.*proc_macro_server.rs.*\n" -> "" +// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" + #[macro_use] extern crate invalid_punct_ident; diff --git a/src/test/ui/proc-macro/invalid-punct-ident-3.stderr b/src/test/ui/proc-macro/invalid-punct-ident-3.stderr index 24371f3a2a..a5e5ded653 100644 --- a/src/test/ui/proc-macro/invalid-punct-ident-3.stderr +++ b/src/test/ui/proc-macro/invalid-punct-ident-3.stderr @@ -1,5 +1,5 @@ error: proc macro panicked - --> $DIR/invalid-punct-ident-3.rs:6:1 + --> $DIR/invalid-punct-ident-3.rs:10:1 | LL | invalid_raw_ident!(); | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/proc-macro/issue-41211.stderr b/src/test/ui/proc-macro/issue-41211.stderr index f75481e482..dfb2f6f63d 100644 --- a/src/test/ui/proc-macro/issue-41211.stderr +++ b/src/test/ui/proc-macro/issue-41211.stderr @@ -1,9 +1,10 @@ -error[E0658]: The attribute `emit_unchanged` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `emit_unchanged` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/issue-41211.rs:8:4 | LL | #![emit_unchanged] | ^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable error: inconsistent resolution for a macro: first custom attribute, then attribute macro diff --git a/src/test/ui/proc-macro/issue-50493.rs b/src/test/ui/proc-macro/issue-50493.rs index eeb08f5eeb..5d1a9f25ba 100644 --- a/src/test/ui/proc-macro/issue-50493.rs +++ b/src/test/ui/proc-macro/issue-50493.rs @@ -11,4 +11,3 @@ struct Restricted { mod restricted {} fn main() {} - diff --git a/src/test/ui/proc-macro/macros-in-extern.stderr b/src/test/ui/proc-macro/macros-in-extern.stderr index 8a48656d08..61571650f2 100644 --- a/src/test/ui/proc-macro/macros-in-extern.stderr +++ b/src/test/ui/proc-macro/macros-in-extern.stderr @@ -1,25 +1,28 @@ -error[E0658]: macro invocations in `extern {}` blocks are experimental (see issue #49476) +error[E0658]: macro invocations in `extern {}` blocks are experimental --> $DIR/macros-in-extern.rs:15:5 | LL | #[no_output] | ^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/49476 = help: add #![feature(macros_in_extern)] to the crate attributes to enable -error[E0658]: macro invocations in `extern {}` blocks are experimental (see issue #49476) +error[E0658]: macro invocations in `extern {}` blocks are experimental --> $DIR/macros-in-extern.rs:19:5 | LL | #[nop_attr] | ^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/49476 = help: add #![feature(macros_in_extern)] to the crate attributes to enable -error[E0658]: macro invocations in `extern {}` blocks are experimental (see issue #49476) +error[E0658]: macro invocations in `extern {}` blocks are experimental --> $DIR/macros-in-extern.rs:23:5 | LL | emit_input!(fn rust_dbg_extern_identity_u32(arg: u32) -> u32;); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/49476 = help: add #![feature(macros_in_extern)] to the crate attributes to enable error: aborting due to 3 previous errors diff --git a/src/test/ui/proc-macro/more-gates.stderr b/src/test/ui/proc-macro/more-gates.stderr index c6c2954f93..80985ce752 100644 --- a/src/test/ui/proc-macro/more-gates.stderr +++ b/src/test/ui/proc-macro/more-gates.stderr @@ -1,41 +1,46 @@ -error[E0658]: procedural macros cannot expand to macro definitions (see issue #54727) +error[E0658]: procedural macros cannot expand to macro definitions --> $DIR/more-gates.rs:9:1 | LL | #[attr2mac1] | ^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable -error[E0658]: procedural macros cannot expand to macro definitions (see issue #54727) +error[E0658]: procedural macros cannot expand to macro definitions --> $DIR/more-gates.rs:12:1 | LL | #[attr2mac2] | ^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable -error[E0658]: procedural macros cannot expand to macro definitions (see issue #54727) +error[E0658]: procedural macros cannot expand to macro definitions --> $DIR/more-gates.rs:16:1 | LL | mac2mac1!(); | ^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable -error[E0658]: procedural macros cannot expand to macro definitions (see issue #54727) +error[E0658]: procedural macros cannot expand to macro definitions --> $DIR/more-gates.rs:17:1 | LL | mac2mac2!(); | ^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable -error[E0658]: procedural macros cannot expand to macro definitions (see issue #54727) +error[E0658]: procedural macros cannot expand to macro definitions --> $DIR/more-gates.rs:19:1 | LL | tricky!(); | ^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable error: aborting due to 5 previous errors diff --git a/src/test/ui/proc-macro/no-missing-docs.rs b/src/test/ui/proc-macro/no-missing-docs.rs new file mode 100644 index 0000000000..e5a5f8beb4 --- /dev/null +++ b/src/test/ui/proc-macro/no-missing-docs.rs @@ -0,0 +1,16 @@ +//! Verify that the `decls` module implicitly added by the compiler does not cause `missing_docs` +//! warnings. + +// compile-pass +// force-host +// no-prefer-dynamic + +#![crate_type = "proc-macro"] +#![deny(missing_docs)] + +extern crate proc_macro; +use proc_macro::*; + +/// Foo1. +#[proc_macro] +pub fn foo1(input: TokenStream) -> TokenStream { input } diff --git a/src/test/ui/proc-macro/proc-macro-attributes.stderr b/src/test/ui/proc-macro/proc-macro-attributes.stderr index f8f1e7cd98..5117c7e155 100644 --- a/src/test/ui/proc-macro/proc-macro-attributes.stderr +++ b/src/test/ui/proc-macro/proc-macro-attributes.stderr @@ -1,9 +1,10 @@ -error[E0658]: The attribute `C` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `C` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/proc-macro-attributes.rs:7:3 | LL | #[C] | ^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable error[E0659]: `B` is ambiguous (derive helper attribute vs any other name) @@ -76,5 +77,5 @@ LL | #[macro_use] error: aborting due to 5 previous errors -Some errors occurred: E0658, E0659. +Some errors have detailed explanations: E0658, E0659. For more information about an error, try `rustc --explain E0658`. diff --git a/src/test/ui/proc-macro/proc-macro-gates.stderr b/src/test/ui/proc-macro/proc-macro-gates.stderr index 4ae8e63df7..1bb864b52e 100644 --- a/src/test/ui/proc-macro/proc-macro-gates.stderr +++ b/src/test/ui/proc-macro/proc-macro-gates.stderr @@ -1,33 +1,37 @@ -error[E0658]: non-builtin inner attributes are unstable (see issue #54726) +error[E0658]: non-builtin inner attributes are unstable --> $DIR/proc-macro-gates.rs:11:5 | LL | #![a] | ^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54726 = help: add #![feature(custom_inner_attributes)] to the crate attributes to enable -error[E0658]: non-builtin inner attributes are unstable (see issue #54726) +error[E0658]: non-builtin inner attributes are unstable --> $DIR/proc-macro-gates.rs:18:5 | LL | #![a] | ^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54726 = help: add #![feature(custom_inner_attributes)] to the crate attributes to enable -error[E0658]: custom attributes cannot be applied to modules (see issue #54727) +error[E0658]: custom attributes cannot be applied to modules --> $DIR/proc-macro-gates.rs:14:1 | LL | #[a] | ^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable -error[E0658]: custom attributes cannot be applied to modules (see issue #54727) +error[E0658]: custom attributes cannot be applied to modules --> $DIR/proc-macro-gates.rs:18:5 | LL | #![a] | ^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable error: custom attribute invocations must be of the form #[foo] or #[foo(..)], the macro name must only be followed by a delimiter token @@ -36,100 +40,112 @@ error: custom attribute invocations must be of the form #[foo] or #[foo(..)], th LL | #[a = "y"] | ^^^^^^^^^^ -error[E0658]: custom attributes cannot be applied to statements (see issue #54727) +error[E0658]: custom attributes cannot be applied to statements --> $DIR/proc-macro-gates.rs:31:5 | LL | #[a] | ^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable -error[E0658]: custom attributes cannot be applied to statements (see issue #54727) +error[E0658]: custom attributes cannot be applied to statements --> $DIR/proc-macro-gates.rs:35:5 | LL | #[a] | ^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable -error[E0658]: custom attributes cannot be applied to statements (see issue #54727) +error[E0658]: custom attributes cannot be applied to statements --> $DIR/proc-macro-gates.rs:39:5 | LL | #[a] | ^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable -error[E0658]: custom attributes cannot be applied to expressions (see issue #54727) +error[E0658]: custom attributes cannot be applied to expressions --> $DIR/proc-macro-gates.rs:43:14 | LL | let _x = #[a] 2; | ^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable -error[E0658]: custom attributes cannot be applied to expressions (see issue #54727) +error[E0658]: custom attributes cannot be applied to expressions --> $DIR/proc-macro-gates.rs:46:15 | LL | let _x = [#[a] 2]; | ^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable -error[E0658]: custom attributes cannot be applied to expressions (see issue #54727) +error[E0658]: custom attributes cannot be applied to expressions --> $DIR/proc-macro-gates.rs:49:14 | LL | let _x = #[a] println!(); | ^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable -error[E0658]: procedural macros cannot be expanded to types (see issue #54727) +error[E0658]: procedural macros cannot be expanded to types --> $DIR/proc-macro-gates.rs:53:13 | LL | let _x: m!(u32) = 3; | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable -error[E0658]: procedural macros cannot be expanded to patterns (see issue #54727) +error[E0658]: procedural macros cannot be expanded to patterns --> $DIR/proc-macro-gates.rs:54:12 | LL | if let m!(Some(_x)) = Some(3) {} | ^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable -error[E0658]: procedural macros cannot be expanded to statements (see issue #54727) +error[E0658]: procedural macros cannot be expanded to statements --> $DIR/proc-macro-gates.rs:56:5 | LL | m!(struct S;); | ^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable -error[E0658]: procedural macros cannot be expanded to statements (see issue #54727) +error[E0658]: procedural macros cannot be expanded to statements --> $DIR/proc-macro-gates.rs:57:5 | LL | m!(let _x = 3;); | ^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable -error[E0658]: procedural macros cannot be expanded to expressions (see issue #54727) +error[E0658]: procedural macros cannot be expanded to expressions --> $DIR/proc-macro-gates.rs:59:14 | LL | let _x = m!(3); | ^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable -error[E0658]: procedural macros cannot be expanded to expressions (see issue #54727) +error[E0658]: procedural macros cannot be expanded to expressions --> $DIR/proc-macro-gates.rs:60:15 | LL | let _x = [m!(3)]; | ^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54727 = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable error: aborting due to 17 previous errors diff --git a/src/test/ui/proc-macro/proc-macro-gates2.stderr b/src/test/ui/proc-macro/proc-macro-gates2.stderr index 89ad527a43..0e8236f460 100644 --- a/src/test/ui/proc-macro/proc-macro-gates2.stderr +++ b/src/test/ui/proc-macro/proc-macro-gates2.stderr @@ -1,17 +1,19 @@ -error[E0658]: The attribute `a` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `a` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/proc-macro-gates2.rs:13:11 | LL | fn _test6<#[a] T>() {} | ^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `a` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `a` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/proc-macro-gates2.rs:18:9 | LL | #[a] | ^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/proc-macro/span-preservation.stderr b/src/test/ui/proc-macro/span-preservation.stderr index fbccde28f5..1cc7706ce3 100644 --- a/src/test/ui/proc-macro/span-preservation.stderr +++ b/src/test/ui/proc-macro/span-preservation.stderr @@ -48,5 +48,5 @@ LL | 0 error: aborting due to 6 previous errors -Some errors occurred: E0308, E0560. +Some errors have detailed explanations: E0308, E0560. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/pub/pub-ident-fn-3.rs b/src/test/ui/pub/pub-ident-fn-3.rs new file mode 100644 index 0000000000..fdbea7cf48 --- /dev/null +++ b/src/test/ui/pub/pub-ident-fn-3.rs @@ -0,0 +1,8 @@ +// #60115 + +mod foo { + pub bar(); + //~^ ERROR missing `fn` or `struct` for function or struct definition +} + +fn main() {} diff --git a/src/test/ui/pub/pub-ident-fn-3.stderr b/src/test/ui/pub/pub-ident-fn-3.stderr new file mode 100644 index 0000000000..6d3d4e592c --- /dev/null +++ b/src/test/ui/pub/pub-ident-fn-3.stderr @@ -0,0 +1,8 @@ +error: missing `fn` or `struct` for function or struct definition + --> $DIR/pub-ident-fn-3.rs:4:8 + | +LL | pub bar(); + | ---^--- help: if you meant to call a macro, try: `bar!` + +error: aborting due to previous error + diff --git a/src/test/ui/pub/pub-restricted.rs b/src/test/ui/pub/pub-restricted.rs index 8793cb9d33..b4bc4a08c7 100644 --- a/src/test/ui/pub/pub-restricted.rs +++ b/src/test/ui/pub/pub-restricted.rs @@ -4,6 +4,8 @@ mod a {} pub (a) fn afn() {} //~ incorrect visibility restriction pub (b) fn bfn() {} //~ incorrect visibility restriction +pub (crate::a) fn cfn() {} //~ incorrect visibility restriction + pub fn privfn() {} mod x { mod y { diff --git a/src/test/ui/pub/pub-restricted.stderr b/src/test/ui/pub/pub-restricted.stderr index 7eeefa9550..596264ba16 100644 --- a/src/test/ui/pub/pub-restricted.stderr +++ b/src/test/ui/pub/pub-restricted.stderr @@ -21,7 +21,18 @@ LL | pub (b) fn bfn() {} `pub(in path::to::module)`: visible only on the specified path error[E0704]: incorrect visibility restriction - --> $DIR/pub-restricted.rs:22:14 + --> $DIR/pub-restricted.rs:7:6 + | +LL | pub (crate::a) fn cfn() {} + | ^^^^^^^^ help: make this visible only to module `crate::a` with `in`: `in crate::a` + | + = help: some possible visibility restrictions are: + `pub(crate)`: visible only on the current crate + `pub(super)`: visible only in the current module's parent + `pub(in path::to::module)`: visible only on the specified path + +error[E0704]: incorrect visibility restriction + --> $DIR/pub-restricted.rs:24:14 | LL | pub (a) invalid: usize, | ^ help: make this visible only to module `a` with `in`: `in a` @@ -32,7 +43,7 @@ LL | pub (a) invalid: usize, `pub(in path::to::module)`: visible only on the specified path error[E0704]: incorrect visibility restriction - --> $DIR/pub-restricted.rs:31:6 + --> $DIR/pub-restricted.rs:33:6 | LL | pub (xyz) fn xyz() {} | ^^^ help: make this visible only to module `xyz` with `in`: `in xyz` @@ -43,11 +54,11 @@ LL | pub (xyz) fn xyz() {} `pub(in path::to::module)`: visible only on the specified path error: visibilities can only be restricted to ancestor modules - --> $DIR/pub-restricted.rs:23:17 + --> $DIR/pub-restricted.rs:25:17 | LL | pub (in x) non_parent_invalid: usize, | ^ -error: aborting due to 5 previous errors +error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0704`. diff --git a/src/test/ui/qualified/qualified-path-params-2.stderr b/src/test/ui/qualified/qualified-path-params-2.stderr index 2d14d6c5aa..15da5193e8 100644 --- a/src/test/ui/qualified/qualified-path-params-2.stderr +++ b/src/test/ui/qualified/qualified-path-params-2.stderr @@ -12,5 +12,5 @@ LL | type A = ::A::f; error: aborting due to 2 previous errors -Some errors occurred: E0109, E0223. +Some errors have detailed explanations: E0109, E0223. For more information about an error, try `rustc --explain E0109`. diff --git a/src/test/ui/qualified/qualified-path-params.stderr b/src/test/ui/qualified/qualified-path-params.stderr index 926b098040..b8d3b744e8 100644 --- a/src/test/ui/qualified/qualified-path-params.stderr +++ b/src/test/ui/qualified/qualified-path-params.stderr @@ -15,5 +15,4 @@ LL | 0 ..= ::A::f:: => {} error: aborting due to 2 previous errors -Some errors occurred: E0029, E0533. -For more information about an error, try `rustc --explain E0029`. +For more information about this error, try `rustc --explain E0029`. diff --git a/src/test/ui/question-mark-type-infer.stderr b/src/test/ui/question-mark-type-infer.stderr index f62a540572..2a1bdf57a8 100644 --- a/src/test/ui/question-mark-type-infer.stderr +++ b/src/test/ui/question-mark-type-infer.stderr @@ -6,4 +6,3 @@ LL | l.iter().map(f).collect()? error: aborting due to previous error -For more information about this error, try `rustc --explain E0284`. diff --git a/src/test/ui/range/range-1.stderr b/src/test/ui/range/range-1.stderr index 00c0c80515..bbc2abea51 100644 --- a/src/test/ui/range/range-1.stderr +++ b/src/test/ui/range/range-1.stderr @@ -24,5 +24,5 @@ LL | let range = *arr..; error: aborting due to 3 previous errors -Some errors occurred: E0277, E0308. +Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/range/range_traits-2.rs b/src/test/ui/range/range_traits-2.rs index c34ef781d8..234d7a64dc 100644 --- a/src/test/ui/range/range_traits-2.rs +++ b/src/test/ui/range/range_traits-2.rs @@ -4,4 +4,3 @@ use std::ops::*; struct R(Range); fn main() {} - diff --git a/src/test/ui/range/range_traits-3.rs b/src/test/ui/range/range_traits-3.rs index b0448afce0..2d597cce5a 100644 --- a/src/test/ui/range/range_traits-3.rs +++ b/src/test/ui/range/range_traits-3.rs @@ -4,4 +4,3 @@ use std::ops::*; struct R(RangeFrom); fn main() {} - diff --git a/src/test/ui/range/range_traits-4.rs b/src/test/ui/range/range_traits-4.rs index ff84577048..52c706080f 100644 --- a/src/test/ui/range/range_traits-4.rs +++ b/src/test/ui/range/range_traits-4.rs @@ -7,4 +7,3 @@ struct R(RangeTo); fn main() {} - diff --git a/src/test/ui/range/range_traits-5.rs b/src/test/ui/range/range_traits-5.rs index 95505c94d1..a8c3e9b0d6 100644 --- a/src/test/ui/range/range_traits-5.rs +++ b/src/test/ui/range/range_traits-5.rs @@ -7,4 +7,3 @@ struct R(RangeFull); fn main() {} - diff --git a/src/test/ui/range/range_traits-6.rs b/src/test/ui/range/range_traits-6.rs index 041f04a349..bce106bbfe 100644 --- a/src/test/ui/range/range_traits-6.rs +++ b/src/test/ui/range/range_traits-6.rs @@ -4,4 +4,3 @@ use std::ops::*; struct R(RangeInclusive); fn main() {} - diff --git a/src/test/ui/range/range_traits-7.rs b/src/test/ui/range/range_traits-7.rs index c328ecb223..548676063c 100644 --- a/src/test/ui/range/range_traits-7.rs +++ b/src/test/ui/range/range_traits-7.rs @@ -7,4 +7,3 @@ struct R(RangeToInclusive); fn main() {} - diff --git a/src/test/ui/reachable/expr_if.rs b/src/test/ui/reachable/expr_if.rs index ed43bd8c68..a3d54892de 100644 --- a/src/test/ui/reachable/expr_if.rs +++ b/src/test/ui/reachable/expr_if.rs @@ -4,7 +4,7 @@ #![deny(unreachable_code)] fn foo() { - if {return} { + if {return} { //~ ERROR unreachable block in `if` expression println!("Hello, world!"); } } diff --git a/src/test/ui/reachable/expr_if.stderr b/src/test/ui/reachable/expr_if.stderr index d11471da1a..f1690e595e 100644 --- a/src/test/ui/reachable/expr_if.stderr +++ b/src/test/ui/reachable/expr_if.stderr @@ -1,15 +1,25 @@ -error: unreachable statement - --> $DIR/expr_if.rs:27:5 +error: unreachable block in `if` expression + --> $DIR/expr_if.rs:7:17 | -LL | println!("But I am."); - | ^^^^^^^^^^^^^^^^^^^^^^ +LL | if {return} { + | _________________^ +LL | | println!("Hello, world!"); +LL | | } + | |_____^ | note: lint level defined here --> $DIR/expr_if.rs:4:9 | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ + +error: unreachable statement + --> $DIR/expr_if.rs:27:5 + | +LL | println!("But I am."); + | ^^^^^^^^^^^^^^^^^^^^^^ + | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) -error: aborting due to previous error +error: aborting due to 2 previous errors diff --git a/src/test/ui/recursion/recursive-types-are-not-uninhabited.nll.stderr b/src/test/ui/recursion/recursive-types-are-not-uninhabited.nll.stderr new file mode 100644 index 0000000000..eee331d95b --- /dev/null +++ b/src/test/ui/recursion/recursive-types-are-not-uninhabited.nll.stderr @@ -0,0 +1,16 @@ +error[E0005]: refutable pattern in local binding: `Err(_)` not covered + --> $DIR/recursive-types-are-not-uninhabited.rs:6:9 + | +LL | let Ok(x) = res; + | ^^^^^ pattern `Err(_)` not covered + +error[E0381]: use of possibly uninitialized variable: `x` + --> $DIR/recursive-types-are-not-uninhabited.rs:8:5 + | +LL | x + | ^ use of possibly uninitialized `x` + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0005, E0381. +For more information about an error, try `rustc --explain E0005`. diff --git a/src/test/ui/recursion/recursive-types-are-not-uninhabited.rs b/src/test/ui/recursion/recursive-types-are-not-uninhabited.rs index b3e4efb994..a618aba941 100644 --- a/src/test/ui/recursion/recursive-types-are-not-uninhabited.rs +++ b/src/test/ui/recursion/recursive-types-are-not-uninhabited.rs @@ -6,9 +6,11 @@ fn foo(res: Result) -> u32 { let Ok(x) = res; //~^ ERROR refutable pattern x + //~^ WARN use of possibly uninitialized variable: `x` + //~| WARN this error has been downgraded to a warning for backwards compatibility + //~| WARN this represents potential undefined behavior in your code and this warning will } fn main() { foo(Ok(23)); } - diff --git a/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr b/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr index dad98cff45..940ab94a61 100644 --- a/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr +++ b/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr @@ -4,6 +4,16 @@ error[E0005]: refutable pattern in local binding: `Err(_)` not covered LL | let Ok(x) = res; | ^^^^^ pattern `Err(_)` not covered +warning[E0381]: use of possibly uninitialized variable: `x` + --> $DIR/recursive-types-are-not-uninhabited.rs:8:5 + | +LL | x + | ^ use of possibly uninitialized `x` + | + = warning: this error has been downgraded to a warning for backwards compatibility with previous releases + = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + error: aborting due to previous error -For more information about this error, try `rustc --explain E0005`. +Some errors have detailed explanations: E0005, E0381. +For more information about an error, try `rustc --explain E0005`. diff --git a/src/test/ui/ref-suggestion.nll.stderr b/src/test/ui/ref-suggestion.nll.stderr deleted file mode 100644 index 9ff8e21bb5..0000000000 --- a/src/test/ui/ref-suggestion.nll.stderr +++ /dev/null @@ -1,34 +0,0 @@ -error[E0382]: use of moved value: `x` - --> $DIR/ref-suggestion.rs:4:5 - | -LL | let x = vec![1]; - | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait -LL | let y = x; - | - value moved here -LL | x; - | ^ value used here after move - -error[E0382]: use of moved value: `x` - --> $DIR/ref-suggestion.rs:8:5 - | -LL | let x = vec![1]; - | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait -LL | let mut y = x; - | - value moved here -LL | x; - | ^ value used here after move - -error[E0382]: use of moved value: `x` - --> $DIR/ref-suggestion.rs:16:5 - | -LL | (Some(y), ()) => {}, - | - value moved here -... -LL | x; - | ^ value used here after partial move - | - = note: move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/ref-suggestion.rs b/src/test/ui/ref-suggestion.rs index 346d118f0f..49d199cd9e 100644 --- a/src/test/ui/ref-suggestion.rs +++ b/src/test/ui/ref-suggestion.rs @@ -13,5 +13,5 @@ fn main() { (Some(y), ()) => {}, _ => {}, } - x; //~ ERROR use of partially moved value + x; //~ ERROR use of moved value } diff --git a/src/test/ui/ref-suggestion.stderr b/src/test/ui/ref-suggestion.stderr index df677a611c..9ff8e21bb5 100644 --- a/src/test/ui/ref-suggestion.stderr +++ b/src/test/ui/ref-suggestion.stderr @@ -1,33 +1,33 @@ error[E0382]: use of moved value: `x` --> $DIR/ref-suggestion.rs:4:5 | +LL | let x = vec![1]; + | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait LL | let y = x; - | - value moved here + | - value moved here LL | x; | ^ value used here after move - | - = note: move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait error[E0382]: use of moved value: `x` --> $DIR/ref-suggestion.rs:8:5 | +LL | let x = vec![1]; + | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait LL | let mut y = x; - | ----- value moved here + | - value moved here LL | x; | ^ value used here after move - | - = note: move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait -error[E0382]: use of partially moved value: `x` +error[E0382]: use of moved value: `x` --> $DIR/ref-suggestion.rs:16:5 | LL | (Some(y), ()) => {}, | - value moved here ... LL | x; - | ^ value used here after move + | ^ value used here after partial move | - = note: move occurs because the value has type `std::vec::Vec`, which does not implement the `Copy` trait + = note: move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait error: aborting due to 3 previous errors diff --git a/src/test/ui/regions/issue-56537-closure-uses-region-from-container.rs b/src/test/ui/regions/issue-56537-closure-uses-region-from-container.rs index 24676fe5e5..5cbfe6ebeb 100644 --- a/src/test/ui/regions/issue-56537-closure-uses-region-from-container.rs +++ b/src/test/ui/regions/issue-56537-closure-uses-region-from-container.rs @@ -9,13 +9,6 @@ // rust-lang/rust#56537 // compile-pass -// We are already testing NLL explicitly via the revision system below. -// ignore-compare-mode-nll - -// revisions: ll nll migrate -//[ll] compile-flags:-Zborrowck=ast -//[nll] compile-flags:-Zborrowck=mir -Z two-phase-borrows -//[migrate] compile-flags:-Zborrowck=migrate -Z two-phase-borrows fn willy_no_annot<'w>(p: &'w str, q: &str) -> &'w str { let free_dumb = |_x| { p }; // no type annotation at all diff --git a/src/test/ui/regions/region-borrow-params-issue-29793-big.ast.stderr b/src/test/ui/regions/region-borrow-params-issue-29793-big.ast.stderr deleted file mode 100644 index 27d8ce4ab5..0000000000 --- a/src/test/ui/regions/region-borrow-params-issue-29793-big.ast.stderr +++ /dev/null @@ -1,29 +0,0 @@ -error[E0597]: `x` does not live long enough - --> $DIR/region-borrow-params-issue-29793-big.rs:71:43 - | -LL | WrapB::new().set(|t: bool| if t { x } else { y }) // (separate errors for `x` vs `y`) - | --------- ^ borrowed value does not live long enough - | | - | capture occurs here -... -LL | }); - | - borrowed value dropped before borrower - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `y` does not live long enough - --> $DIR/region-borrow-params-issue-29793-big.rs:71:54 - | -LL | WrapB::new().set(|t: bool| if t { x } else { y }) // (separate errors for `x` vs `y`) - | --------- ^ borrowed value does not live long enough - | | - | capture occurs here -... -LL | }); - | - borrowed value dropped before borrower - | - = note: values in a scope are dropped in the opposite order they are created - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/regions/region-borrow-params-issue-29793-big.mir.stderr b/src/test/ui/regions/region-borrow-params-issue-29793-big.mir.stderr deleted file mode 100644 index 8fb1ebbf7d..0000000000 --- a/src/test/ui/regions/region-borrow-params-issue-29793-big.mir.stderr +++ /dev/null @@ -1,39 +0,0 @@ -error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-big.rs:71:26 - | -LL | WrapB::new().set(|t: bool| if t { x } else { y }) // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-big.rs:71:9 - | -LL | WrapB::new().set(|t: bool| if t { x } else { y }) // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -LL | WrapB::new().set(move |t: bool| if t { x } else { y }) // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-big.rs:71:26 - | -LL | WrapB::new().set(|t: bool| if t { x } else { y }) // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-big.rs:71:9 - | -LL | WrapB::new().set(|t: bool| if t { x } else { y }) // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -LL | WrapB::new().set(move |t: bool| if t { x } else { y }) // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0373`. diff --git a/src/test/ui/regions/region-borrow-params-issue-29793-big.rs b/src/test/ui/regions/region-borrow-params-issue-29793-big.rs index f21140b43d..83b1a6eab5 100644 --- a/src/test/ui/regions/region-borrow-params-issue-29793-big.rs +++ b/src/test/ui/regions/region-borrow-params-issue-29793-big.rs @@ -6,10 +6,6 @@ // behavior (because the improperly accepted closure was actually // able to be invoked). -// ignore-tidy-linelength -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - struct WrapA(Option); impl WrapA { @@ -69,10 +65,8 @@ impl WrapA fn main() { let mut w = WrapA::new().set(|x: usize, y: usize| { WrapB::new().set(|t: bool| if t { x } else { y }) // (separate errors for `x` vs `y`) - //[ast]~^ ERROR `x` does not live long enough - //[ast]~| ERROR `y` does not live long enough - //[mir]~^^^ ERROR closure may outlive the current function - //[mir]~| ERROR closure may outlive the current function + //~^ ERROR closure may outlive the current function + //~| ERROR closure may outlive the current function }); w.handle(); // This works diff --git a/src/test/ui/regions/region-borrow-params-issue-29793-big.ast.nll.stderr b/src/test/ui/regions/region-borrow-params-issue-29793-big.stderr similarity index 88% rename from src/test/ui/regions/region-borrow-params-issue-29793-big.ast.nll.stderr rename to src/test/ui/regions/region-borrow-params-issue-29793-big.stderr index 8fb1ebbf7d..328e602ca7 100644 --- a/src/test/ui/regions/region-borrow-params-issue-29793-big.ast.nll.stderr +++ b/src/test/ui/regions/region-borrow-params-issue-29793-big.stderr @@ -1,5 +1,5 @@ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-big.rs:71:26 + --> $DIR/region-borrow-params-issue-29793-big.rs:67:26 | LL | WrapB::new().set(|t: bool| if t { x } else { y }) // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `x` is borrowed here @@ -7,7 +7,7 @@ LL | WrapB::new().set(|t: bool| if t { x } else { y }) // (separate erro | may outlive borrowed value `x` | note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-big.rs:71:9 + --> $DIR/region-borrow-params-issue-29793-big.rs:67:9 | LL | WrapB::new().set(|t: bool| if t { x } else { y }) // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -17,7 +17,7 @@ LL | WrapB::new().set(move |t: bool| if t { x } else { y }) // (separate | ^^^^^^^^^^^^^^ error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-big.rs:71:26 + --> $DIR/region-borrow-params-issue-29793-big.rs:67:26 | LL | WrapB::new().set(|t: bool| if t { x } else { y }) // (separate errors for `x` vs `y`) | ^^^^^^^^^ - `y` is borrowed here @@ -25,7 +25,7 @@ LL | WrapB::new().set(|t: bool| if t { x } else { y }) // (separate erro | may outlive borrowed value `y` | note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-big.rs:71:9 + --> $DIR/region-borrow-params-issue-29793-big.rs:67:9 | LL | WrapB::new().set(|t: bool| if t { x } else { y }) // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/regions/region-borrow-params-issue-29793-small.nll.stderr b/src/test/ui/regions/region-borrow-params-issue-29793-small.nll.stderr deleted file mode 100644 index 18610b7cff..0000000000 --- a/src/test/ui/regions/region-borrow-params-issue-29793-small.nll.stderr +++ /dev/null @@ -1,363 +0,0 @@ -error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:9:17 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:12:16 - | -LL | return f; - | ^ -help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:9:17 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:12:16 - | -LL | return f; - | ^ -help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:24:17 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:27:9 - | -LL | f - | ^ -help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:24:17 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:27:9 - | -LL | f - | ^ -help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:55:17 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:58:16 - | -LL | return Box::new(f); - | ^^^^^^^^^^^ -help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:55:17 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:58:16 - | -LL | return Box::new(f); - | ^^^^^^^^^^^ -help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:66:17 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:69:9 - | -LL | Box::new(f) - | ^^^^^^^^^^^ -help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:66:17 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:69:9 - | -LL | Box::new(f) - | ^^^^^^^^^^^ -help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:90:21 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:93:20 - | -LL | return Box::new(f); - | ^^^^^^^^^^^ -help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:90:21 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:93:20 - | -LL | return Box::new(f); - | ^^^^^^^^^^^ -help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:104:21 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:107:13 - | -LL | Box::new(f) - | ^^^^^^^^^^^ -help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:104:21 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:107:13 - | -LL | Box::new(f) - | ^^^^^^^^^^^ -help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:132:21 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:135:20 - | -LL | return Box::new(f); - | ^^^^^^^^^^^ -help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:132:21 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:135:20 - | -LL | return Box::new(f); - | ^^^^^^^^^^^ -help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:147:21 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:150:13 - | -LL | Box::new(f) - | ^^^^^^^^^^^ -help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:147:21 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:150:13 - | -LL | Box::new(f) - | ^^^^^^^^^^^ -help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:175:21 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:178:20 - | -LL | return Box::new(f); - | ^^^^^^^^^^^ -help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:175:21 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:178:20 - | -LL | return Box::new(f); - | ^^^^^^^^^^^ -help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:189:21 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `x` is borrowed here - | | - | may outlive borrowed value `x` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:192:13 - | -LL | Box::new(f) - | ^^^^^^^^^^^ -help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/region-borrow-params-issue-29793-small.rs:189:21 - | -LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^ - `y` is borrowed here - | | - | may outlive borrowed value `y` - | -note: closure is returned here - --> $DIR/region-borrow-params-issue-29793-small.rs:192:13 - | -LL | Box::new(f) - | ^^^^^^^^^^^ -help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | ^^^^^^^^^^^^^^ - -error: aborting due to 20 previous errors - -For more information about this error, try `rustc --explain E0373`. diff --git a/src/test/ui/regions/region-borrow-params-issue-29793-small.rs b/src/test/ui/regions/region-borrow-params-issue-29793-small.rs index 08ed79cbdb..a1ccf66767 100644 --- a/src/test/ui/regions/region-borrow-params-issue-29793-small.rs +++ b/src/test/ui/regions/region-borrow-params-issue-29793-small.rs @@ -7,8 +7,8 @@ fn escaping_borrow_of_closure_params_1() { let g = |x: usize, y:usize| { let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - //~^ ERROR `x` does not live long enough - //~| ERROR `y` does not live long enough + //~^ ERROR E0373 + //~| ERROR E0373 return f; }; @@ -22,8 +22,8 @@ fn escaping_borrow_of_closure_params_1() { fn escaping_borrow_of_closure_params_2() { let g = |x: usize, y:usize| { let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - //~^ ERROR `x` does not live long enough - //~| ERROR `y` does not live long enough + //~^ ERROR E0373 + //~| ERROR E0373 f }; @@ -210,4 +210,3 @@ fn move_of_trait_default_params() { } fn main() { } - diff --git a/src/test/ui/regions/region-borrow-params-issue-29793-small.stderr b/src/test/ui/regions/region-borrow-params-issue-29793-small.stderr index d6ad68fe94..18610b7cff 100644 --- a/src/test/ui/regions/region-borrow-params-issue-29793-small.stderr +++ b/src/test/ui/regions/region-borrow-params-issue-29793-small.stderr @@ -1,54 +1,74 @@ -error[E0597]: `x` does not live long enough - --> $DIR/region-borrow-params-issue-29793-small.rs:9:34 +error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function + --> $DIR/region-borrow-params-issue-29793-small.rs:9:17 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | --------- ^ borrowed value does not live long enough + | ^^^^^^^^^ - `x` is borrowed here | | - | capture occurs here -... -LL | }; - | - borrowed value dropped before borrower + | may outlive borrowed value `x` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:12:16 | - = note: values in a scope are dropped in the opposite order they are created +LL | return f; + | ^ +help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword + | +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^^^^^^ -error[E0597]: `y` does not live long enough - --> $DIR/region-borrow-params-issue-29793-small.rs:9:45 +error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function + --> $DIR/region-borrow-params-issue-29793-small.rs:9:17 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | --------- ^ borrowed value does not live long enough + | ^^^^^^^^^ - `y` is borrowed here | | - | capture occurs here -... -LL | }; - | - borrowed value dropped before borrower + | may outlive borrowed value `y` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:12:16 | - = note: values in a scope are dropped in the opposite order they are created +LL | return f; + | ^ +help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword + | +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^^^^^^ -error[E0597]: `x` does not live long enough - --> $DIR/region-borrow-params-issue-29793-small.rs:24:34 +error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function + --> $DIR/region-borrow-params-issue-29793-small.rs:24:17 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | --------- ^ borrowed value does not live long enough + | ^^^^^^^^^ - `x` is borrowed here | | - | capture occurs here -... -LL | }; - | - borrowed value dropped before borrower + | may outlive borrowed value `x` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:27:9 | - = note: values in a scope are dropped in the opposite order they are created +LL | f + | ^ +help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword + | +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^^^^^^ -error[E0597]: `y` does not live long enough - --> $DIR/region-borrow-params-issue-29793-small.rs:24:45 +error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function + --> $DIR/region-borrow-params-issue-29793-small.rs:24:17 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) - | --------- ^ borrowed value does not live long enough + | ^^^^^^^^^ - `y` is borrowed here | | - | capture occurs here -... -LL | }; - | - borrowed value dropped before borrower + | may outlive borrowed value `y` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:27:9 | - = note: values in a scope are dropped in the opposite order they are created +LL | f + | ^ +help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword + | +LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) + | ^^^^^^^^^^^^^^ error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function --> $DIR/region-borrow-params-issue-29793-small.rs:55:17 @@ -57,6 +77,12 @@ LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x | ^^^^^^^^^ - `x` is borrowed here | | | may outlive borrowed value `x` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:58:16 + | +LL | return Box::new(f); + | ^^^^^^^^^^^ help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) @@ -69,6 +95,12 @@ LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x | ^^^^^^^^^ - `y` is borrowed here | | | may outlive borrowed value `y` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:58:16 + | +LL | return Box::new(f); + | ^^^^^^^^^^^ help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) @@ -81,6 +113,12 @@ LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x | ^^^^^^^^^ - `x` is borrowed here | | | may outlive borrowed value `x` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:69:9 + | +LL | Box::new(f) + | ^^^^^^^^^^^ help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) @@ -93,6 +131,12 @@ LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x | ^^^^^^^^^ - `y` is borrowed here | | | may outlive borrowed value `y` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:69:9 + | +LL | Box::new(f) + | ^^^^^^^^^^^ help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) @@ -105,6 +149,12 @@ LL | let f = |t: bool| if t { x } else { y }; // (separate errors fo | ^^^^^^^^^ - `x` is borrowed here | | | may outlive borrowed value `x` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:93:20 + | +LL | return Box::new(f); + | ^^^^^^^^^^^ help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) @@ -117,6 +167,12 @@ LL | let f = |t: bool| if t { x } else { y }; // (separate errors fo | ^^^^^^^^^ - `y` is borrowed here | | | may outlive borrowed value `y` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:93:20 + | +LL | return Box::new(f); + | ^^^^^^^^^^^ help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) @@ -129,6 +185,12 @@ LL | let f = |t: bool| if t { x } else { y }; // (separate errors fo | ^^^^^^^^^ - `x` is borrowed here | | | may outlive borrowed value `x` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:107:13 + | +LL | Box::new(f) + | ^^^^^^^^^^^ help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) @@ -141,6 +203,12 @@ LL | let f = |t: bool| if t { x } else { y }; // (separate errors fo | ^^^^^^^^^ - `y` is borrowed here | | | may outlive borrowed value `y` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:107:13 + | +LL | Box::new(f) + | ^^^^^^^^^^^ help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) @@ -153,6 +221,12 @@ LL | let f = |t: bool| if t { x } else { y }; // (separate errors fo | ^^^^^^^^^ - `x` is borrowed here | | | may outlive borrowed value `x` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:135:20 + | +LL | return Box::new(f); + | ^^^^^^^^^^^ help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) @@ -165,6 +239,12 @@ LL | let f = |t: bool| if t { x } else { y }; // (separate errors fo | ^^^^^^^^^ - `y` is borrowed here | | | may outlive borrowed value `y` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:135:20 + | +LL | return Box::new(f); + | ^^^^^^^^^^^ help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) @@ -177,6 +257,12 @@ LL | let f = |t: bool| if t { x } else { y }; // (separate errors fo | ^^^^^^^^^ - `x` is borrowed here | | | may outlive borrowed value `x` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:150:13 + | +LL | Box::new(f) + | ^^^^^^^^^^^ help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) @@ -189,6 +275,12 @@ LL | let f = |t: bool| if t { x } else { y }; // (separate errors fo | ^^^^^^^^^ - `y` is borrowed here | | | may outlive borrowed value `y` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:150:13 + | +LL | Box::new(f) + | ^^^^^^^^^^^ help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) @@ -201,6 +293,12 @@ LL | let f = |t: bool| if t { x } else { y }; // (separate errors fo | ^^^^^^^^^ - `x` is borrowed here | | | may outlive borrowed value `x` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:178:20 + | +LL | return Box::new(f); + | ^^^^^^^^^^^ help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) @@ -213,6 +311,12 @@ LL | let f = |t: bool| if t { x } else { y }; // (separate errors fo | ^^^^^^^^^ - `y` is borrowed here | | | may outlive borrowed value `y` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:178:20 + | +LL | return Box::new(f); + | ^^^^^^^^^^^ help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) @@ -225,6 +329,12 @@ LL | let f = |t: bool| if t { x } else { y }; // (separate errors fo | ^^^^^^^^^ - `x` is borrowed here | | | may outlive borrowed value `x` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:192:13 + | +LL | Box::new(f) + | ^^^^^^^^^^^ help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) @@ -237,6 +347,12 @@ LL | let f = |t: bool| if t { x } else { y }; // (separate errors fo | ^^^^^^^^^ - `y` is borrowed here | | | may outlive borrowed value `y` + | +note: closure is returned here + --> $DIR/region-borrow-params-issue-29793-small.rs:192:13 + | +LL | Box::new(f) + | ^^^^^^^^^^^ help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword | LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) @@ -244,5 +360,4 @@ LL | let f = move |t: bool| if t { x } else { y }; // (separate erro error: aborting due to 20 previous errors -Some errors occurred: E0373, E0597. -For more information about an error, try `rustc --explain E0373`. +For more information about this error, try `rustc --explain E0373`. diff --git a/src/test/ui/regions/region-bound-on-closure-outlives-call.nll.stderr b/src/test/ui/regions/region-bound-on-closure-outlives-call.nll.stderr deleted file mode 100644 index d455902ee8..0000000000 --- a/src/test/ui/regions/region-bound-on-closure-outlives-call.nll.stderr +++ /dev/null @@ -1,24 +0,0 @@ -warning: function cannot return without recursing - --> $DIR/region-bound-on-closure-outlives-call.rs:1:1 - | -LL | fn call_rec(mut f: F) -> usize where F: FnMut(usize) -> usize { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing -LL | -LL | (|x| f(x))(call_rec(f)) - | ----------- recursive call site - | - = note: #[warn(unconditional_recursion)] on by default - = help: a `loop` may express intention better if this is on purpose - -error[E0505]: cannot move out of `f` because it is borrowed - --> $DIR/region-bound-on-closure-outlives-call.rs:3:25 - | -LL | (|x| f(x))(call_rec(f)) - | --- - ^ move out of `f` occurs here - | | | - | | borrow occurs due to use in closure - | borrow of `f` occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/regions/region-bound-on-closure-outlives-call.stderr b/src/test/ui/regions/region-bound-on-closure-outlives-call.stderr index cb888ab66c..d455902ee8 100644 --- a/src/test/ui/regions/region-bound-on-closure-outlives-call.stderr +++ b/src/test/ui/regions/region-bound-on-closure-outlives-call.stderr @@ -14,8 +14,9 @@ error[E0505]: cannot move out of `f` because it is borrowed --> $DIR/region-bound-on-closure-outlives-call.rs:3:25 | LL | (|x| f(x))(call_rec(f)) - | --- ^ move out of `f` occurs here - | | + | --- - ^ move out of `f` occurs here + | | | + | | borrow occurs due to use in closure | borrow of `f` occurs here error: aborting due to previous error diff --git a/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr b/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr index ec71d55705..8bcb2da457 100644 --- a/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr +++ b/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr @@ -25,11 +25,11 @@ error[E0392]: parameter `'c` is never used --> $DIR/region-bounds-on-objects-and-type-parameters.rs:11:18 | LL | struct Foo<'a,'b,'c> { - | ^^ unused type parameter + | ^^ unused parameter | = help: consider removing `'c` or using a marker such as `std::marker::PhantomData` error: aborting due to 3 previous errors -Some errors occurred: E0226, E0392, E0478. -For more information about an error, try `rustc --explain E0226`. +Some errors have detailed explanations: E0392, E0478. +For more information about an error, try `rustc --explain E0392`. diff --git a/src/test/ui/regions/region-invariant-static-error-reporting.nll.stderr b/src/test/ui/regions/region-invariant-static-error-reporting.nll.stderr new file mode 100644 index 0000000000..76129b4d18 --- /dev/null +++ b/src/test/ui/regions/region-invariant-static-error-reporting.nll.stderr @@ -0,0 +1,11 @@ +error[E0521]: borrowed data escapes outside of function + --> $DIR/region-invariant-static-error-reporting.rs:15:9 + | +LL | fn unify<'a>(x: Option>, f: fn(Invariant<'a>)) { + | - `x` is a reference that is only valid in the function body +LL | let bad = if x.is_some() { +LL | x.unwrap() + | ^^^^^^^^^^ `x` escapes the function body here + +error: aborting due to previous error + diff --git a/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.nll.stderr b/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.nll.stderr new file mode 100644 index 0000000000..24c9a315ba --- /dev/null +++ b/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.nll.stderr @@ -0,0 +1,12 @@ +error[E0308]: mismatched types + --> $DIR/region-lifetime-bounds-on-fns-where-clause.rs:20:43 + | +LL | let _: fn(&mut &isize, &mut &isize) = a; + | ^ expected concrete lifetime, found bound lifetime parameter + | + = note: expected type `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)` + found type `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr b/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr index 7b901c2f96..fd78f82d0f 100644 --- a/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr +++ b/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr @@ -27,5 +27,4 @@ LL | let _: fn(&mut &isize, &mut &isize) = a; error: aborting due to 3 previous errors -Some errors occurred: E0308, E0623. -For more information about an error, try `rustc --explain E0308`. +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.nll.stderr b/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.nll.stderr new file mode 100644 index 0000000000..6d031e9ac3 --- /dev/null +++ b/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.nll.stderr @@ -0,0 +1,12 @@ +error[E0308]: mismatched types + --> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:22:56 + | +LL | let _: fn(&mut &isize, &mut &isize, &mut &isize) = a; + | ^ expected concrete lifetime, found bound lifetime parameter + | + = note: expected type `for<'r, 's, 't0, 't1, 't2, 't3> fn(&'r mut &'s isize, &'t0 mut &'t1 isize, &'t2 mut &'t3 isize)` + found type `for<'r, 's, 't0> fn(&'r mut &isize, &'s mut &isize, &'t0 mut &isize) {a::<'_, '_, '_>}` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr b/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr index 3e42cfcffb..220c5493d1 100644 --- a/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr +++ b/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr @@ -38,5 +38,4 @@ LL | let _: fn(&mut &isize, &mut &isize, &mut &isize) = a; error: aborting due to 4 previous errors -Some errors occurred: E0308, E0623. -For more information about an error, try `rustc --explain E0308`. +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/regions/region-object-lifetime-2.nll.stderr b/src/test/ui/regions/region-object-lifetime-2.nll.stderr new file mode 100644 index 0000000000..56e8c40c99 --- /dev/null +++ b/src/test/ui/regions/region-object-lifetime-2.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/region-object-lifetime-2.rs:10:5 + | +LL | fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a Foo) -> &'b () { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | x.borrowed() + | ^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'b` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/region-object-lifetime-2.stderr b/src/test/ui/regions/region-object-lifetime-2.stderr index 8817ad1c9f..d3552ab0c4 100644 --- a/src/test/ui/regions/region-object-lifetime-2.stderr +++ b/src/test/ui/regions/region-object-lifetime-2.stderr @@ -27,4 +27,3 @@ LL | x.borrowed() error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/regions/region-object-lifetime-4.nll.stderr b/src/test/ui/regions/region-object-lifetime-4.nll.stderr new file mode 100644 index 0000000000..aa91c371f4 --- /dev/null +++ b/src/test/ui/regions/region-object-lifetime-4.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/region-object-lifetime-4.rs:12:5 + | +LL | fn borrowed_receiver_related_lifetimes2<'a,'b>(x: &'a (Foo+'b)) -> &'b () { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | x.borrowed() + | ^^^^^^^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/region-object-lifetime-4.stderr b/src/test/ui/regions/region-object-lifetime-4.stderr index fee7f40efd..75b26ffc6d 100644 --- a/src/test/ui/regions/region-object-lifetime-4.stderr +++ b/src/test/ui/regions/region-object-lifetime-4.stderr @@ -27,4 +27,3 @@ LL | x.borrowed() error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/regions/region-object-lifetime-5.nll.stderr b/src/test/ui/regions/region-object-lifetime-5.nll.stderr deleted file mode 100644 index b86f6e3a2a..0000000000 --- a/src/test/ui/regions/region-object-lifetime-5.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0515]: cannot return value referencing local data `*x` - --> $DIR/region-object-lifetime-5.rs:11:5 - | -LL | x.borrowed() - | -^^^^^^^^^^^ - | | - | returns a value referencing data owned by the current function - | `*x` is borrowed here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/region-object-lifetime-5.rs b/src/test/ui/regions/region-object-lifetime-5.rs index 5009b2bbf3..bd68aebbee 100644 --- a/src/test/ui/regions/region-object-lifetime-5.rs +++ b/src/test/ui/regions/region-object-lifetime-5.rs @@ -8,7 +8,7 @@ trait Foo { // Here, the object is bounded by an anonymous lifetime and returned // as `&'static`, so you get an error. fn owned_receiver(x: Box) -> &'static () { - x.borrowed() //~ ERROR `*x` does not live long enough + x.borrowed() //~ ERROR cannot return value referencing local data `*x` } fn main() {} diff --git a/src/test/ui/regions/region-object-lifetime-5.stderr b/src/test/ui/regions/region-object-lifetime-5.stderr index 1efaee181c..b86f6e3a2a 100644 --- a/src/test/ui/regions/region-object-lifetime-5.stderr +++ b/src/test/ui/regions/region-object-lifetime-5.stderr @@ -1,13 +1,12 @@ -error[E0597]: `*x` does not live long enough +error[E0515]: cannot return value referencing local data `*x` --> $DIR/region-object-lifetime-5.rs:11:5 | LL | x.borrowed() - | ^ borrowed value does not live long enough -LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | -^^^^^^^^^^^ + | | + | returns a value referencing data owned by the current function + | `*x` is borrowed here error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/region-object-lifetime-in-coercion.nll.stderr b/src/test/ui/regions/region-object-lifetime-in-coercion.nll.stderr new file mode 100644 index 0000000000..a54f8f5faa --- /dev/null +++ b/src/test/ui/regions/region-object-lifetime-in-coercion.nll.stderr @@ -0,0 +1,38 @@ +error[E0621]: explicit lifetime required in the type of `v` + --> $DIR/region-object-lifetime-in-coercion.rs:8:12 + | +LL | fn a(v: &[u8]) -> Box { + | ----- help: add explicit lifetime `'static` to the type of `v`: `&'static [u8]` +LL | let x: Box = Box::new(v); + | ^^^^^^^^^^^^^^^^^^ lifetime `'static` required + +error[E0621]: explicit lifetime required in the type of `v` + --> $DIR/region-object-lifetime-in-coercion.rs:14:5 + | +LL | fn b(v: &[u8]) -> Box { + | ----- help: add explicit lifetime `'static` to the type of `v`: `&'static [u8]` +LL | Box::new(v) + | ^^^^^^^^^^^ lifetime `'static` required + +error[E0621]: explicit lifetime required in the type of `v` + --> $DIR/region-object-lifetime-in-coercion.rs:21:5 + | +LL | fn c(v: &[u8]) -> Box { + | ----- help: add explicit lifetime `'static` to the type of `v`: `&'static [u8]` +... +LL | Box::new(v) + | ^^^^^^^^^^^ lifetime `'static` required + +error: lifetime may not live long enough + --> $DIR/region-object-lifetime-in-coercion.rs:26:5 + | +LL | fn d<'a,'b>(v: &'a [u8]) -> Box { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | Box::new(v) + | ^^^^^^^^^^^ returning this value requires that `'a` must outlive `'b` + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/regions/region-object-lifetime-in-coercion.stderr b/src/test/ui/regions/region-object-lifetime-in-coercion.stderr index b8ea6d3476..c94a25ce60 100644 --- a/src/test/ui/regions/region-object-lifetime-in-coercion.stderr +++ b/src/test/ui/regions/region-object-lifetime-in-coercion.stderr @@ -48,5 +48,4 @@ LL | fn d<'a,'b>(v: &'a [u8]) -> Box { error: aborting due to 4 previous errors -Some errors occurred: E0495, E0621. -For more information about an error, try `rustc --explain E0495`. +For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/regions/regions-addr-of-arg.nll.stderr b/src/test/ui/regions/regions-addr-of-arg.nll.stderr deleted file mode 100644 index 54f44b98b9..0000000000 --- a/src/test/ui/regions/regions-addr-of-arg.nll.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0597]: `a` does not live long enough - --> $DIR/regions-addr-of-arg.rs:5:30 - | -LL | let _p: &'static isize = &a; - | -------------- ^^ borrowed value does not live long enough - | | - | type annotation requires that `a` is borrowed for `'static` -LL | } - | - `a` dropped here while still borrowed - -error[E0515]: cannot return reference to function parameter `a` - --> $DIR/regions-addr-of-arg.rs:13:5 - | -LL | &a - | ^^ returns a reference to data owned by the current function - -error: aborting due to 2 previous errors - -Some errors occurred: E0515, E0597. -For more information about an error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-addr-of-arg.rs b/src/test/ui/regions/regions-addr-of-arg.rs index 06f16be821..1805141c42 100644 --- a/src/test/ui/regions/regions-addr-of-arg.rs +++ b/src/test/ui/regions/regions-addr-of-arg.rs @@ -10,7 +10,7 @@ fn bar(a: isize) { } fn zed<'a>(a: isize) -> &'a isize { - &a //~ ERROR `a` does not live long enough + &a //~ ERROR cannot return reference to function parameter `a` } fn main() { diff --git a/src/test/ui/regions/regions-addr-of-arg.stderr b/src/test/ui/regions/regions-addr-of-arg.stderr index 3e76a7dda9..e77289287e 100644 --- a/src/test/ui/regions/regions-addr-of-arg.stderr +++ b/src/test/ui/regions/regions-addr-of-arg.stderr @@ -1,27 +1,20 @@ error[E0597]: `a` does not live long enough - --> $DIR/regions-addr-of-arg.rs:5:31 + --> $DIR/regions-addr-of-arg.rs:5:30 | LL | let _p: &'static isize = &a; - | ^ borrowed value does not live long enough + | -------------- ^^ borrowed value does not live long enough + | | + | type annotation requires that `a` is borrowed for `'static` LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - `a` dropped here while still borrowed -error[E0597]: `a` does not live long enough - --> $DIR/regions-addr-of-arg.rs:13:6 +error[E0515]: cannot return reference to function parameter `a` + --> $DIR/regions-addr-of-arg.rs:13:5 | LL | &a - | ^ borrowed value does not live long enough -LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 12:8... - --> $DIR/regions-addr-of-arg.rs:12:8 - | -LL | fn zed<'a>(a: isize) -> &'a isize { - | ^^ + | ^^ returns a reference to data owned by the current function error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0597`. +Some errors have detailed explanations: E0515, E0597. +For more information about an error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-addr-of-self.nll.stderr b/src/test/ui/regions/regions-addr-of-self.nll.stderr new file mode 100644 index 0000000000..3d7aac74bd --- /dev/null +++ b/src/test/ui/regions/regions-addr-of-self.nll.stderr @@ -0,0 +1,10 @@ +error: lifetime may not live long enough + --> $DIR/regions-addr-of-self.rs:7:16 + | +LL | pub fn chase_cat(&mut self) { + | - let's call the lifetime of this reference `'1` +LL | let p: &'static mut usize = &mut self.cats_chased; + | ^^^^^^^^^^^^^^^^^^ type annotation requires that `'1` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-addr-of-self.stderr b/src/test/ui/regions/regions-addr-of-self.stderr index a0b8b6b51e..2274e9341d 100644 --- a/src/test/ui/regions/regions-addr-of-self.stderr +++ b/src/test/ui/regions/regions-addr-of-self.stderr @@ -26,4 +26,3 @@ LL | let p: &'static mut usize = &mut self.cats_chased; error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/regions/regions-addr-of-upvar-self.nll.stderr b/src/test/ui/regions/regions-addr-of-upvar-self.nll.stderr new file mode 100644 index 0000000000..345e617a7a --- /dev/null +++ b/src/test/ui/regions/regions-addr-of-upvar-self.nll.stderr @@ -0,0 +1,35 @@ +error: lifetime may not live long enough + --> $DIR/regions-addr-of-upvar-self.rs:10:20 + | +LL | let _f = || { + | -- lifetime `'1` represents this closure's body +LL | let p: &'static mut usize = &mut self.food; + | ^^^^^^^^^^^^^^^^^^ type annotation requires that `'1` must outlive `'static` + | + = note: closure implements `FnMut`, so references to captured variables can't escape the closure + +error: lifetime may not live long enough + --> $DIR/regions-addr-of-upvar-self.rs:10:20 + | +LL | pub fn chase_cat(&mut self) { + | - let's call the lifetime of this reference `'1` +LL | let _f = || { +LL | let p: &'static mut usize = &mut self.food; + | ^^^^^^^^^^^^^^^^^^ type annotation requires that `'1` must outlive `'static` + +error[E0597]: `self` does not live long enough + --> $DIR/regions-addr-of-upvar-self.rs:10:46 + | +LL | let _f = || { + | -- value captured here +LL | let p: &'static mut usize = &mut self.food; + | ------------------ ^^^^ borrowed value does not live long enough + | | + | type annotation requires that `self` is borrowed for `'static` +... +LL | } + | - `self` dropped here while still borrowed + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/regions/regions-addr-of-upvar-self.stderr b/src/test/ui/regions/regions-addr-of-upvar-self.stderr index ac5e5e9aab..d02caeb44f 100644 --- a/src/test/ui/regions/regions-addr-of-upvar-self.stderr +++ b/src/test/ui/regions/regions-addr-of-upvar-self.stderr @@ -23,4 +23,3 @@ LL | let p: &'static mut usize = &mut self.food; error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/regions/regions-adjusted-lvalue-op.nll.stderr b/src/test/ui/regions/regions-adjusted-lvalue-op.nll.stderr deleted file mode 100644 index 2c55634445..0000000000 --- a/src/test/ui/regions/regions-adjusted-lvalue-op.nll.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0502]: cannot borrow `v` as immutable because it is also borrowed as mutable - --> $DIR/regions-adjusted-lvalue-op.rs:14:16 - | -LL | v[0].oh_no(&v); - | - ----- ^^ immutable borrow occurs here - | | | - | | mutable borrow later used by call - | mutable borrow occurs here - -error[E0502]: cannot borrow `v` as immutable because it is also borrowed as mutable - --> $DIR/regions-adjusted-lvalue-op.rs:15:16 - | -LL | (*v).oh_no(&v); - | - ----- ^^ immutable borrow occurs here - | | | - | | mutable borrow later used by call - | mutable borrow occurs here - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/regions/regions-adjusted-lvalue-op.stderr b/src/test/ui/regions/regions-adjusted-lvalue-op.stderr index 2c4c75f323..2c55634445 100644 --- a/src/test/ui/regions/regions-adjusted-lvalue-op.stderr +++ b/src/test/ui/regions/regions-adjusted-lvalue-op.stderr @@ -1,19 +1,19 @@ error[E0502]: cannot borrow `v` as immutable because it is also borrowed as mutable - --> $DIR/regions-adjusted-lvalue-op.rs:14:17 + --> $DIR/regions-adjusted-lvalue-op.rs:14:16 | LL | v[0].oh_no(&v); - | - ^- mutable borrow ends here - | | | - | | immutable borrow occurs here + | - ----- ^^ immutable borrow occurs here + | | | + | | mutable borrow later used by call | mutable borrow occurs here error[E0502]: cannot borrow `v` as immutable because it is also borrowed as mutable - --> $DIR/regions-adjusted-lvalue-op.rs:15:17 + --> $DIR/regions-adjusted-lvalue-op.rs:15:16 | LL | (*v).oh_no(&v); - | - ^- mutable borrow ends here - | | | - | | immutable borrow occurs here + | - ----- ^^ immutable borrow occurs here + | | | + | | mutable borrow later used by call | mutable borrow occurs here error: aborting due to 2 previous errors diff --git a/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.mir.stderr b/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.migrate.nll.stderr similarity index 65% rename from src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.mir.stderr rename to src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.migrate.nll.stderr index ad94d375b5..867eafe252 100644 --- a/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.mir.stderr +++ b/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.migrate.nll.stderr @@ -1,13 +1,13 @@ error: lifetime may not live long enough - --> $DIR/regions-assoc-type-in-supertrait-outlives-container.rs:45:13 + --> $DIR/regions-assoc-type-in-supertrait-outlives-container.rs:43:12 | LL | fn with_assoc<'a,'b>() { | -- -- lifetime `'b` defined here | | | lifetime `'a` defined here ... -LL | let _x: &'a WithAssoc> = loop { }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a` +LL | let _: &'a WithAssoc> = loop { }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a` error: aborting due to previous error diff --git a/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.ast.stderr b/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.migrate.stderr similarity index 87% rename from src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.ast.stderr rename to src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.migrate.stderr index 76ead4e94e..f31f25bf00 100644 --- a/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.ast.stderr +++ b/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.migrate.stderr @@ -1,8 +1,8 @@ error[E0491]: in type `&'a WithAssoc>`, reference has a longer lifetime than the data it references - --> $DIR/regions-assoc-type-in-supertrait-outlives-container.rs:45:13 + --> $DIR/regions-assoc-type-in-supertrait-outlives-container.rs:43:12 | -LL | let _x: &'a WithAssoc> = loop { }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | let _: &'a WithAssoc> = loop { }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: the pointer is valid for the lifetime 'a as defined on the function body at 37:15 --> $DIR/regions-assoc-type-in-supertrait-outlives-container.rs:37:15 diff --git a/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.nll.stderr b/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.nll.stderr new file mode 100644 index 0000000000..867eafe252 --- /dev/null +++ b/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/regions-assoc-type-in-supertrait-outlives-container.rs:43:12 + | +LL | fn with_assoc<'a,'b>() { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | let _: &'a WithAssoc> = loop { }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.rs b/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.rs index 1d53492199..97c5559360 100644 --- a/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.rs +++ b/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.rs @@ -3,8 +3,8 @@ // outlive the location in which the type appears, even when the // associted type is in a supertype. Issue #22246. -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir +// revisions: migrate nll +//[nll]compile-flags: -Z borrowck=mir #![allow(dead_code)] @@ -40,11 +40,9 @@ fn with_assoc<'a,'b>() { // outlive 'a. In this case, that means TheType<'b>::TheAssocType, // which is &'b (), must outlive 'a. - // FIXME (#54943) NLL doesn't enforce WF condition in unreachable code if - // `_x` is changed to `_` - let _x: &'a WithAssoc> = loop { }; - //[ast]~^ ERROR reference has a longer lifetime - //[mir]~^^ ERROR lifetime may not live long enough + let _: &'a WithAssoc> = loop { }; + //[migrate]~^ ERROR reference has a longer lifetime + //[nll]~^^ ERROR lifetime may not live long enough } fn main() { diff --git a/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.stderr b/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.stderr deleted file mode 100644 index aa92c59cee..0000000000 --- a/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0491]: in type `&'a WithAssoc>`, reference has a longer lifetime than the data it references - --> $DIR/regions-assoc-type-in-supertrait-outlives-container.rs:42:13 - | -LL | let _x: &'a WithAssoc> = loop { }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | -note: the pointer is valid for the lifetime 'a as defined on the function body at 34:15 - --> $DIR/regions-assoc-type-in-supertrait-outlives-container.rs:34:15 - | -LL | fn with_assoc<'a,'b>() { - | ^^ -note: but the referenced data is only valid for the lifetime 'b as defined on the function body at 34:18 - --> $DIR/regions-assoc-type-in-supertrait-outlives-container.rs:34:18 - | -LL | fn with_assoc<'a,'b>() { - | ^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0491`. diff --git a/src/test/ui/regions/regions-assoc-type-region-bound-in-trait-not-met.stderr b/src/test/ui/regions/regions-assoc-type-region-bound-in-trait-not-met.stderr index d01e991103..9732cd12ce 100644 --- a/src/test/ui/regions/regions-assoc-type-region-bound-in-trait-not-met.stderr +++ b/src/test/ui/regions/regions-assoc-type-region-bound-in-trait-not-met.stderr @@ -46,4 +46,3 @@ LL | impl<'a,'b> Foo<'b> for &'a i64 { error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr b/src/test/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr index 33a4ea01ce..2067bc3946 100644 --- a/src/test/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr +++ b/src/test/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr @@ -21,4 +21,3 @@ LL | impl<'a> Foo for &'a i32 { error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/regions/regions-bounded-by-trait-requiring-static.nll.stderr b/src/test/ui/regions/regions-bounded-by-trait-requiring-static.nll.stderr new file mode 100644 index 0000000000..86bd100538 --- /dev/null +++ b/src/test/ui/regions/regions-bounded-by-trait-requiring-static.nll.stderr @@ -0,0 +1,50 @@ +error: lifetime may not live long enough + --> $DIR/regions-bounded-by-trait-requiring-static.rs:22:5 + | +LL | fn param_not_ok<'a>(x: &'a isize) { + | -- lifetime `'a` defined here +LL | assert_send::<&'a isize>(); + | ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/regions-bounded-by-trait-requiring-static.rs:26:5 + | +LL | fn param_not_ok1<'a>(_: &'a isize) { + | -- lifetime `'a` defined here +LL | assert_send::<&'a str>(); + | ^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/regions-bounded-by-trait-requiring-static.rs:30:5 + | +LL | fn param_not_ok2<'a>(_: &'a isize) { + | -- lifetime `'a` defined here +LL | assert_send::<&'a [isize]>(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/regions-bounded-by-trait-requiring-static.rs:44:5 + | +LL | fn box_with_region_not_ok<'a>() { + | -- lifetime `'a` defined here +LL | assert_send::>(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/regions-bounded-by-trait-requiring-static.rs:55:5 + | +LL | fn unsafe_ok2<'a>(_: &'a isize) { + | -- lifetime `'a` defined here +LL | assert_send::<*const &'a isize>(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/regions-bounded-by-trait-requiring-static.rs:59:5 + | +LL | fn unsafe_ok3<'a>(_: &'a isize) { + | -- lifetime `'a` defined here +LL | assert_send::<*mut &'a isize>(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static` + +error: aborting due to 6 previous errors + diff --git a/src/test/ui/regions/regions-bounded-by-trait-requiring-static.stderr b/src/test/ui/regions/regions-bounded-by-trait-requiring-static.stderr index c72d6483c2..fcd7332cf3 100644 --- a/src/test/ui/regions/regions-bounded-by-trait-requiring-static.stderr +++ b/src/test/ui/regions/regions-bounded-by-trait-requiring-static.stderr @@ -48,4 +48,3 @@ LL | assert_send::<*mut &'a isize>(); error: aborting due to 6 previous errors -For more information about this error, try `rustc --explain E0477`. diff --git a/src/test/ui/regions/regions-bounded-method-type-parameters-cross-crate.nll.stderr b/src/test/ui/regions/regions-bounded-method-type-parameters-cross-crate.nll.stderr new file mode 100644 index 0000000000..a8ab92d75c --- /dev/null +++ b/src/test/ui/regions/regions-bounded-method-type-parameters-cross-crate.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/regions-bounded-method-type-parameters-cross-crate.rs:20:5 + | +LL | fn call_bigger_region<'x, 'y>(a: Inv<'x>, b: Inv<'y>) { + | -- -- lifetime `'y` defined here + | | + | lifetime `'x` defined here +LL | // Here the value provided for 'y is 'y, and hence 'y:'x does not hold. +LL | a.bigger_region(b) + | ^^^^^^^^^^^^^^^^^^ argument requires that `'y` must outlive `'x` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-bounded-method-type-parameters-cross-crate.stderr b/src/test/ui/regions/regions-bounded-method-type-parameters-cross-crate.stderr index eb205a303d..4e88be1c1e 100644 --- a/src/test/ui/regions/regions-bounded-method-type-parameters-cross-crate.stderr +++ b/src/test/ui/regions/regions-bounded-method-type-parameters-cross-crate.stderr @@ -9,4 +9,3 @@ LL | a.bigger_region(b) error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.nll.stderr b/src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.nll.stderr new file mode 100644 index 0000000000..52ad2d9dae --- /dev/null +++ b/src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.nll.stderr @@ -0,0 +1,13 @@ +error[E0521]: borrowed data escapes outside of function + --> $DIR/regions-bounded-method-type-parameters-trait-bound.rs:20:5 + | +LL | fn caller2<'a,'b,F:Foo<'a>>(a: Inv<'a>, b: Inv<'b>, f: F) { + | - - `b` is a reference that is only valid in the function body + | | + | `a` is declared here, outside of the function body +LL | // Here the value provided for 'y is 'b, and hence 'b:'a does not hold. +LL | f.method(b); + | ^^^^^^^^^^^ `b` escapes the function body here + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.stderr b/src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.stderr index de1073cd1d..6b1302b539 100644 --- a/src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.stderr +++ b/src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.stderr @@ -9,4 +9,3 @@ LL | f.method(b); error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/regions/regions-bounded-method-type-parameters.nll.stderr b/src/test/ui/regions/regions-bounded-method-type-parameters.nll.stderr new file mode 100644 index 0000000000..b6d7b8aac5 --- /dev/null +++ b/src/test/ui/regions/regions-bounded-method-type-parameters.nll.stderr @@ -0,0 +1,10 @@ +error: lifetime may not live long enough + --> $DIR/regions-bounded-method-type-parameters.rs:12:9 + | +LL | fn caller<'a>(x: &isize) { + | -- lifetime `'a` defined here +LL | Foo.some_method::<&'a isize>(); + | ^^^^^^^^^^^ requires that `'a` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-bounded-method-type-parameters.stderr b/src/test/ui/regions/regions-bounded-method-type-parameters.stderr index 66b61b1349..f77f97f44f 100644 --- a/src/test/ui/regions/regions-bounded-method-type-parameters.stderr +++ b/src/test/ui/regions/regions-bounded-method-type-parameters.stderr @@ -8,4 +8,3 @@ LL | Foo.some_method::<&'a isize>(); error: aborting due to previous error -For more information about this error, try `rustc --explain E0477`. diff --git a/src/test/ui/regions/regions-bounds.nll.stderr b/src/test/ui/regions/regions-bounds.nll.stderr new file mode 100644 index 0000000000..3345946bfd --- /dev/null +++ b/src/test/ui/regions/regions-bounds.nll.stderr @@ -0,0 +1,22 @@ +error: lifetime may not live long enough + --> $DIR/regions-bounds.rs:9:12 + | +LL | fn a_fn1<'a,'b>(e: TupleStruct<'a>) -> TupleStruct<'b> { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | return e; + | ^ returning this value requires that `'a` must outlive `'b` + +error: lifetime may not live long enough + --> $DIR/regions-bounds.rs:13:12 + | +LL | fn a_fn3<'a,'b>(e: Struct<'a>) -> Struct<'b> { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | return e; + | ^ returning this value requires that `'a` must outlive `'b` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/regions/regions-close-associated-type-into-object.nll.stderr b/src/test/ui/regions/regions-close-associated-type-into-object.nll.stderr new file mode 100644 index 0000000000..92c4956da0 --- /dev/null +++ b/src/test/ui/regions/regions-close-associated-type-into-object.nll.stderr @@ -0,0 +1,36 @@ +error[E0310]: the associated type `::Item` may not live long enough + --> $DIR/regions-close-associated-type-into-object.rs:15:5 + | +LL | Box::new(item) + | ^^^^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `::Item: 'static`... + +error[E0310]: the associated type `::Item` may not live long enough + --> $DIR/regions-close-associated-type-into-object.rs:22:5 + | +LL | Box::new(item) + | ^^^^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `::Item: 'static`... + +error[E0309]: the associated type `::Item` may not live long enough + --> $DIR/regions-close-associated-type-into-object.rs:28:5 + | +LL | Box::new(item) + | ^^^^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `::Item: 'a`... + +error[E0309]: the associated type `::Item` may not live long enough + --> $DIR/regions-close-associated-type-into-object.rs:35:5 + | +LL | Box::new(item) + | ^^^^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `::Item: 'a`... + +error: aborting due to 4 previous errors + +Some errors have detailed explanations: E0309, E0310. +For more information about an error, try `rustc --explain E0309`. diff --git a/src/test/ui/regions/regions-close-associated-type-into-object.stderr b/src/test/ui/regions/regions-close-associated-type-into-object.stderr index 89c0c25342..2401f549a5 100644 --- a/src/test/ui/regions/regions-close-associated-type-into-object.stderr +++ b/src/test/ui/regions/regions-close-associated-type-into-object.stderr @@ -52,5 +52,5 @@ LL | Box::new(item) error: aborting due to 4 previous errors -Some errors occurred: E0309, E0310. +Some errors have detailed explanations: E0309, E0310. For more information about an error, try `rustc --explain E0309`. diff --git a/src/test/ui/regions/regions-close-object-into-object-1.nll.stderr b/src/test/ui/regions/regions-close-object-into-object-1.nll.stderr deleted file mode 100644 index 8e119c4f53..0000000000 --- a/src/test/ui/regions/regions-close-object-into-object-1.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0515]: cannot return value referencing local data `*v` - --> $DIR/regions-close-object-into-object-1.rs:12:5 - | -LL | box B(&*v) as Box - | ^^^^^^---^^^^^^^^^^^ - | | | - | | `*v` is borrowed here - | returns a value referencing data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-close-object-into-object-1.rs b/src/test/ui/regions/regions-close-object-into-object-1.rs index 7a862f97a9..5518c6a94b 100644 --- a/src/test/ui/regions/regions-close-object-into-object-1.rs +++ b/src/test/ui/regions/regions-close-object-into-object-1.rs @@ -9,7 +9,7 @@ trait X { } impl<'a, T> X for B<'a, T> {} fn f<'a, T:'static, U>(v: Box+'static>) -> Box { - box B(&*v) as Box //~ ERROR `*v` does not live long enough + box B(&*v) as Box //~ ERROR cannot return value referencing local data `*v` } fn main() {} diff --git a/src/test/ui/regions/regions-close-object-into-object-1.stderr b/src/test/ui/regions/regions-close-object-into-object-1.stderr index c7bde8dbd6..8e119c4f53 100644 --- a/src/test/ui/regions/regions-close-object-into-object-1.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-1.stderr @@ -1,13 +1,12 @@ -error[E0597]: `*v` does not live long enough - --> $DIR/regions-close-object-into-object-1.rs:12:12 +error[E0515]: cannot return value referencing local data `*v` + --> $DIR/regions-close-object-into-object-1.rs:12:5 | LL | box B(&*v) as Box - | ^^ borrowed value does not live long enough -LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | ^^^^^^---^^^^^^^^^^^ + | | | + | | `*v` is borrowed here + | returns a value referencing data owned by the current function error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-close-object-into-object-2.nll.stderr b/src/test/ui/regions/regions-close-object-into-object-2.nll.stderr new file mode 100644 index 0000000000..42df9b1c49 --- /dev/null +++ b/src/test/ui/regions/regions-close-object-into-object-2.nll.stderr @@ -0,0 +1,20 @@ +error: lifetime may not live long enough + --> $DIR/regions-close-object-into-object-2.rs:10:5 + | +LL | fn g<'a, T: 'static>(v: Box+'a>) -> Box { + | -- lifetime `'a` defined here +LL | box B(&*v) as Box + | ^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` + +error[E0515]: cannot return value referencing local data `*v` + --> $DIR/regions-close-object-into-object-2.rs:10:5 + | +LL | box B(&*v) as Box + | ^^^^^^---^^^^^^^^^^^ + | | | + | | `*v` is borrowed here + | returns a value referencing data owned by the current function + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-close-object-into-object-2.stderr b/src/test/ui/regions/regions-close-object-into-object-2.stderr index d5e228e1f0..b5b03e618e 100644 --- a/src/test/ui/regions/regions-close-object-into-object-2.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-2.stderr @@ -21,4 +21,3 @@ LL | box B(&*v) as Box error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/regions/regions-close-object-into-object-3.nll.stderr b/src/test/ui/regions/regions-close-object-into-object-3.nll.stderr deleted file mode 100644 index 9ea13638f5..0000000000 --- a/src/test/ui/regions/regions-close-object-into-object-3.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0515]: cannot return value referencing local data `*v` - --> $DIR/regions-close-object-into-object-3.rs:11:5 - | -LL | box B(&*v) as Box - | ^^^^^^---^^^^^^^^^^^ - | | | - | | `*v` is borrowed here - | returns a value referencing data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-close-object-into-object-3.rs b/src/test/ui/regions/regions-close-object-into-object-3.rs index cafbf09322..6f6b3a1700 100644 --- a/src/test/ui/regions/regions-close-object-into-object-3.rs +++ b/src/test/ui/regions/regions-close-object-into-object-3.rs @@ -8,7 +8,7 @@ trait X { } impl<'a, T> X for B<'a, T> {} fn h<'a, T, U:'static>(v: Box+'static>) -> Box { - box B(&*v) as Box //~ ERROR `*v` does not live long enough + box B(&*v) as Box //~ ERROR cannot return value referencing local data `*v` } fn main() {} diff --git a/src/test/ui/regions/regions-close-object-into-object-3.stderr b/src/test/ui/regions/regions-close-object-into-object-3.stderr index 122e57a325..9ea13638f5 100644 --- a/src/test/ui/regions/regions-close-object-into-object-3.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-3.stderr @@ -1,13 +1,12 @@ -error[E0597]: `*v` does not live long enough - --> $DIR/regions-close-object-into-object-3.rs:11:12 +error[E0515]: cannot return value referencing local data `*v` + --> $DIR/regions-close-object-into-object-3.rs:11:5 | LL | box B(&*v) as Box - | ^^ borrowed value does not live long enough -LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | ^^^^^^---^^^^^^^^^^^ + | | | + | | `*v` is borrowed here + | returns a value referencing data owned by the current function error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-close-object-into-object-4.nll.stderr b/src/test/ui/regions/regions-close-object-into-object-4.nll.stderr new file mode 100644 index 0000000000..8af94fa7e7 --- /dev/null +++ b/src/test/ui/regions/regions-close-object-into-object-4.nll.stderr @@ -0,0 +1,37 @@ +error[E0310]: the parameter type `U` may not live long enough + --> $DIR/regions-close-object-into-object-4.rs:10:5 + | +LL | box B(&*v) as Box + | ^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `U: 'static`... + +error: lifetime may not live long enough + --> $DIR/regions-close-object-into-object-4.rs:10:5 + | +LL | fn i<'a, T, U>(v: Box+'a>) -> Box { + | -- lifetime `'a` defined here +LL | box B(&*v) as Box + | ^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` + +error[E0515]: cannot return value referencing local data `*v` + --> $DIR/regions-close-object-into-object-4.rs:10:5 + | +LL | box B(&*v) as Box + | ^^^^^^---^^^^^^^^^^^ + | | | + | | `*v` is borrowed here + | returns a value referencing data owned by the current function + +error[E0310]: the parameter type `U` may not live long enough + --> $DIR/regions-close-object-into-object-4.rs:10:9 + | +LL | box B(&*v) as Box + | ^^^^^^ + | + = help: consider adding an explicit lifetime bound `U: 'static`... + +error: aborting due to 4 previous errors + +Some errors have detailed explanations: E0310, E0515. +For more information about an error, try `rustc --explain E0310`. diff --git a/src/test/ui/regions/regions-close-object-into-object-4.stderr b/src/test/ui/regions/regions-close-object-into-object-4.stderr index c9ad95d31d..20cbcbb841 100644 --- a/src/test/ui/regions/regions-close-object-into-object-4.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-4.stderr @@ -21,4 +21,3 @@ LL | box B(&*v) as Box error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/regions/regions-close-object-into-object-5.nll.stderr b/src/test/ui/regions/regions-close-object-into-object-5.nll.stderr new file mode 100644 index 0000000000..08ba1b17b5 --- /dev/null +++ b/src/test/ui/regions/regions-close-object-into-object-5.nll.stderr @@ -0,0 +1,29 @@ +error[E0310]: the parameter type `T` may not live long enough + --> $DIR/regions-close-object-into-object-5.rs:17:5 + | +LL | box B(&*v) as Box + | ^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `T: 'static`... + +error[E0515]: cannot return value referencing local data `*v` + --> $DIR/regions-close-object-into-object-5.rs:17:5 + | +LL | box B(&*v) as Box + | ^^^^^^---^^^^^^^^^^^ + | | | + | | `*v` is borrowed here + | returns a value referencing data owned by the current function + +error[E0310]: the parameter type `T` may not live long enough + --> $DIR/regions-close-object-into-object-5.rs:17:9 + | +LL | box B(&*v) as Box + | ^^^^^^ + | + = help: consider adding an explicit lifetime bound `T: 'static`... + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0310, E0515. +For more information about an error, try `rustc --explain E0310`. diff --git a/src/test/ui/regions/regions-close-over-type-parameter-1.nll.stderr b/src/test/ui/regions/regions-close-over-type-parameter-1.nll.stderr new file mode 100644 index 0000000000..30fdb820e3 --- /dev/null +++ b/src/test/ui/regions/regions-close-over-type-parameter-1.nll.stderr @@ -0,0 +1,20 @@ +error[E0310]: the parameter type `A` may not live long enough + --> $DIR/regions-close-over-type-parameter-1.rs:10:5 + | +LL | box v as Box + | ^^^^^ + | + = help: consider adding an explicit lifetime bound `A: 'static`... + +error[E0309]: the parameter type `A` may not live long enough + --> $DIR/regions-close-over-type-parameter-1.rs:20:5 + | +LL | box v as Box + | ^^^^^ + | + = help: consider adding an explicit lifetime bound `A: 'b`... + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0309, E0310. +For more information about an error, try `rustc --explain E0309`. diff --git a/src/test/ui/regions/regions-close-over-type-parameter-1.stderr b/src/test/ui/regions/regions-close-over-type-parameter-1.stderr index 6d33f14730..615c55d9da 100644 --- a/src/test/ui/regions/regions-close-over-type-parameter-1.stderr +++ b/src/test/ui/regions/regions-close-over-type-parameter-1.stderr @@ -56,5 +56,5 @@ LL | box v as Box error: aborting due to 4 previous errors -Some errors occurred: E0309, E0310. +Some errors have detailed explanations: E0309, E0310. For more information about an error, try `rustc --explain E0309`. diff --git a/src/test/ui/regions/regions-close-over-type-parameter-multiple.nll.stderr b/src/test/ui/regions/regions-close-over-type-parameter-multiple.nll.stderr new file mode 100644 index 0000000000..001ed7fe4c --- /dev/null +++ b/src/test/ui/regions/regions-close-over-type-parameter-multiple.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/regions-close-over-type-parameter-multiple.rs:20:5 + | +LL | fn make_object_bad<'a,'b,'c,A:SomeTrait+'a+'b>(v: A) -> Box { + | -- -- lifetime `'c` defined here + | | + | lifetime `'a` defined here +LL | // A outlives 'a AND 'b...but not 'c. +LL | box v as Box + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'c` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-close-over-type-parameter-multiple.stderr b/src/test/ui/regions/regions-close-over-type-parameter-multiple.stderr index 68809eb548..96e6a329e7 100644 --- a/src/test/ui/regions/regions-close-over-type-parameter-multiple.stderr +++ b/src/test/ui/regions/regions-close-over-type-parameter-multiple.stderr @@ -25,4 +25,3 @@ LL | fn make_object_bad<'a,'b,'c,A:SomeTrait+'a+'b>(v: A) -> Box { error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/regions/regions-close-param-into-object.nll.stderr b/src/test/ui/regions/regions-close-param-into-object.nll.stderr new file mode 100644 index 0000000000..7bd7824f00 --- /dev/null +++ b/src/test/ui/regions/regions-close-param-into-object.nll.stderr @@ -0,0 +1,36 @@ +error[E0310]: the parameter type `T` may not live long enough + --> $DIR/regions-close-param-into-object.rs:6:5 + | +LL | Box::new(v) + | ^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `T: 'static`... + +error[E0310]: the parameter type `T` may not live long enough + --> $DIR/regions-close-param-into-object.rs:12:5 + | +LL | Box::new(v) + | ^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `T: 'static`... + +error[E0309]: the parameter type `T` may not live long enough + --> $DIR/regions-close-param-into-object.rs:18:5 + | +LL | Box::new(v) + | ^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `T: 'a`... + +error[E0309]: the parameter type `T` may not live long enough + --> $DIR/regions-close-param-into-object.rs:24:5 + | +LL | Box::new(v) + | ^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `T: 'a`... + +error: aborting due to 4 previous errors + +Some errors have detailed explanations: E0309, E0310. +For more information about an error, try `rustc --explain E0309`. diff --git a/src/test/ui/regions/regions-close-param-into-object.stderr b/src/test/ui/regions/regions-close-param-into-object.stderr index a7f0572381..ef226073de 100644 --- a/src/test/ui/regions/regions-close-param-into-object.stderr +++ b/src/test/ui/regions/regions-close-param-into-object.stderr @@ -60,5 +60,5 @@ LL | Box::new(v) error: aborting due to 4 previous errors -Some errors occurred: E0309, E0310. +Some errors have detailed explanations: E0309, E0310. For more information about an error, try `rustc --explain E0309`. diff --git a/src/test/ui/regions/regions-creating-enums.nll.stderr b/src/test/ui/regions/regions-creating-enums.nll.stderr deleted file mode 100644 index a95d846290..0000000000 --- a/src/test/ui/regions/regions-creating-enums.nll.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0515]: cannot return reference to temporary value - --> $DIR/regions-creating-enums.rs:23:16 - | -LL | return &Ast::Num((*f)(x)); - | ^----------------- - | || - | |temporary value created here - | returns a reference to data owned by the current function - -error[E0515]: cannot return reference to temporary value - --> $DIR/regions-creating-enums.rs:28:16 - | -LL | return &Ast::Add(m_x, m_y); - | ^------------------ - | || - | |temporary value created here - | returns a reference to data owned by the current function - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-creating-enums.rs b/src/test/ui/regions/regions-creating-enums.rs index ea8d4373e0..6ed68f8033 100644 --- a/src/test/ui/regions/regions-creating-enums.rs +++ b/src/test/ui/regions/regions-creating-enums.rs @@ -20,12 +20,12 @@ fn compute(x: &Ast) -> usize { fn map_nums<'a,'b, F>(x: &Ast, f: &mut F) -> &'a Ast<'b> where F: FnMut(usize) -> usize { match *x { Ast::Num(x) => { - return &Ast::Num((*f)(x)); //~ ERROR borrowed value does not live long enough + return &Ast::Num((*f)(x)); //~ ERROR cannot return reference to temporary value } Ast::Add(x, y) => { let m_x = map_nums(x, f); let m_y = map_nums(y, f); - return &Ast::Add(m_x, m_y); //~ ERROR borrowed value does not live long enough + return &Ast::Add(m_x, m_y); //~ ERROR cannot return reference to temporary value } } } diff --git a/src/test/ui/regions/regions-creating-enums.stderr b/src/test/ui/regions/regions-creating-enums.stderr index bb11be9b75..a95d846290 100644 --- a/src/test/ui/regions/regions-creating-enums.stderr +++ b/src/test/ui/regions/regions-creating-enums.stderr @@ -1,33 +1,21 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/regions-creating-enums.rs:23:17 +error[E0515]: cannot return reference to temporary value + --> $DIR/regions-creating-enums.rs:23:16 | LL | return &Ast::Num((*f)(x)); - | ^^^^^^^^^^^^^^^^^- temporary value only lives until here - | | - | temporary value does not live long enough - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 20:13... - --> $DIR/regions-creating-enums.rs:20:13 - | -LL | fn map_nums<'a,'b, F>(x: &Ast, f: &mut F) -> &'a Ast<'b> where F: FnMut(usize) -> usize { - | ^^ - = note: consider using a `let` binding to increase its lifetime + | ^----------------- + | || + | |temporary value created here + | returns a reference to data owned by the current function -error[E0597]: borrowed value does not live long enough - --> $DIR/regions-creating-enums.rs:28:17 +error[E0515]: cannot return reference to temporary value + --> $DIR/regions-creating-enums.rs:28:16 | LL | return &Ast::Add(m_x, m_y); - | ^^^^^^^^^^^^^^^^^^- temporary value only lives until here - | | - | temporary value does not live long enough - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 20:13... - --> $DIR/regions-creating-enums.rs:20:13 - | -LL | fn map_nums<'a,'b, F>(x: &Ast, f: &mut F) -> &'a Ast<'b> where F: FnMut(usize) -> usize { - | ^^ - = note: consider using a `let` binding to increase its lifetime + | ^------------------ + | || + | |temporary value created here + | returns a reference to data owned by the current function error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-creating-enums3.nll.stderr b/src/test/ui/regions/regions-creating-enums3.nll.stderr new file mode 100644 index 0000000000..e35a878fce --- /dev/null +++ b/src/test/ui/regions/regions-creating-enums3.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/regions-creating-enums3.rs:7:5 + | +LL | fn mk_add_bad1<'a,'b>(x: &'a Ast<'a>, y: &'b Ast<'b>) -> Ast<'a> { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | Ast::Add(x, y) + | ^^^^^^^^^^^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-creating-enums3.stderr b/src/test/ui/regions/regions-creating-enums3.stderr index 2fc1fc3f68..763b62d945 100644 --- a/src/test/ui/regions/regions-creating-enums3.stderr +++ b/src/test/ui/regions/regions-creating-enums3.stderr @@ -10,4 +10,3 @@ LL | Ast::Add(x, y) error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/regions/regions-creating-enums4.nll.stderr b/src/test/ui/regions/regions-creating-enums4.nll.stderr new file mode 100644 index 0000000000..4eac457fed --- /dev/null +++ b/src/test/ui/regions/regions-creating-enums4.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/regions-creating-enums4.rs:7:5 + | +LL | fn mk_add_bad2<'a,'b>(x: &'a Ast<'a>, y: &'a Ast<'a>, z: &Ast) -> Ast<'b> { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | Ast::Add(x, y) + | ^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'b` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-creating-enums4.stderr b/src/test/ui/regions/regions-creating-enums4.stderr index 4d00783d18..e13cbe9960 100644 --- a/src/test/ui/regions/regions-creating-enums4.stderr +++ b/src/test/ui/regions/regions-creating-enums4.stderr @@ -23,4 +23,3 @@ LL | fn mk_add_bad2<'a,'b>(x: &'a Ast<'a>, y: &'a Ast<'a>, z: &Ast) -> Ast<'b> { error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/regions/regions-early-bound-error-method.nll.stderr b/src/test/ui/regions/regions-early-bound-error-method.nll.stderr new file mode 100644 index 0000000000..1540a7bacd --- /dev/null +++ b/src/test/ui/regions/regions-early-bound-error-method.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/regions-early-bound-error-method.rs:20:9 + | +LL | impl<'a> Box<'a> { + | -- lifetime `'a` defined here +LL | fn or<'b,G:GetRef<'b>>(&self, g2: G) -> &'a isize { + | -- lifetime `'b` defined here +LL | g2.get() + | ^^^^^^^^ returning this value requires that `'b` must outlive `'a` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-early-bound-error-method.stderr b/src/test/ui/regions/regions-early-bound-error-method.stderr index 7b9f2c9503..2e5f55f874 100644 --- a/src/test/ui/regions/regions-early-bound-error-method.stderr +++ b/src/test/ui/regions/regions-early-bound-error-method.stderr @@ -17,4 +17,3 @@ LL | fn or<'b,G:GetRef<'b>>(&self, g2: G) -> &'a isize { error: aborting due to previous error -For more information about this error, try `rustc --explain E0312`. diff --git a/src/test/ui/regions/regions-early-bound-error.nll.stderr b/src/test/ui/regions/regions-early-bound-error.nll.stderr new file mode 100644 index 0000000000..7836291a7c --- /dev/null +++ b/src/test/ui/regions/regions-early-bound-error.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/regions-early-bound-error.rs:19:5 + | +LL | fn get<'a,'b,G:GetRef<'a, isize>>(g1: G, b: &'b isize) -> &'b isize { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | g1.get() + | ^^^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-early-bound-error.stderr b/src/test/ui/regions/regions-early-bound-error.stderr index a68355b78f..bc52f4bef7 100644 --- a/src/test/ui/regions/regions-early-bound-error.stderr +++ b/src/test/ui/regions/regions-early-bound-error.stderr @@ -17,4 +17,3 @@ LL | fn get<'a,'b,G:GetRef<'a, isize>>(g1: G, b: &'b isize) -> &'b isize { error: aborting due to previous error -For more information about this error, try `rustc --explain E0312`. diff --git a/src/test/ui/regions/regions-escape-method.nll.stderr b/src/test/ui/regions/regions-escape-method.nll.stderr new file mode 100644 index 0000000000..9f425125b9 --- /dev/null +++ b/src/test/ui/regions/regions-escape-method.nll.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/regions-escape-method.rs:15:13 + | +LL | s.f(|p| p) + | -- ^ returning this value requires that `'1` must outlive `'2` + | || + | |return type of closure is &'2 i32 + | has type `&'1 i32` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-escape-method.stderr b/src/test/ui/regions/regions-escape-method.stderr index b93dd0d4c5..d867448e13 100644 --- a/src/test/ui/regions/regions-escape-method.stderr +++ b/src/test/ui/regions/regions-escape-method.stderr @@ -25,4 +25,3 @@ LL | s.f(|p| p) error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/regions/regions-escape-via-trait-or-not.nll.stderr b/src/test/ui/regions/regions-escape-via-trait-or-not.nll.stderr new file mode 100644 index 0000000000..cae6c33ac6 --- /dev/null +++ b/src/test/ui/regions/regions-escape-via-trait-or-not.nll.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/regions-escape-via-trait-or-not.rs:18:14 + | +LL | with(|o| o) + | -- ^ returning this value requires that `'1` must outlive `'2` + | || + | |return type of closure is &'2 isize + | has type `&'1 isize` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-escape-via-trait-or-not.stderr b/src/test/ui/regions/regions-escape-via-trait-or-not.stderr index a6b165e2d4..c8a02683d1 100644 --- a/src/test/ui/regions/regions-escape-via-trait-or-not.stderr +++ b/src/test/ui/regions/regions-escape-via-trait-or-not.stderr @@ -25,4 +25,3 @@ LL | with(|o| o) error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/regions/regions-free-region-ordering-callee.nll.stderr b/src/test/ui/regions/regions-free-region-ordering-callee.nll.stderr new file mode 100644 index 0000000000..9ae484eaf4 --- /dev/null +++ b/src/test/ui/regions/regions-free-region-ordering-callee.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/regions-free-region-ordering-callee.rs:13:5 + | +LL | fn ordering2<'a, 'b>(x: &'a &'b usize, y: &'a usize) -> &'b usize { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | // However, it is not safe to assume that 'b <= 'a +LL | &*y + | ^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a` + +error: lifetime may not live long enough + --> $DIR/regions-free-region-ordering-callee.rs:18:12 + | +LL | fn ordering3<'a, 'b>(x: &'a usize, y: &'b usize) -> &'a &'b usize { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | // Do not infer an ordering from the return value. +LL | let z: &'b usize = &*x; + | ^^^^^^^^^ type annotation requires that `'a` must outlive `'b` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/regions/regions-free-region-ordering-callee.stderr b/src/test/ui/regions/regions-free-region-ordering-callee.stderr index 4648bf046b..49cf1dfc64 100644 --- a/src/test/ui/regions/regions-free-region-ordering-callee.stderr +++ b/src/test/ui/regions/regions-free-region-ordering-callee.stderr @@ -22,4 +22,3 @@ LL | let z: &'b usize = &*x; error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/regions/regions-free-region-ordering-caller.mir.stderr b/src/test/ui/regions/regions-free-region-ordering-caller.migrate.nll.stderr similarity index 100% rename from src/test/ui/regions/regions-free-region-ordering-caller.mir.stderr rename to src/test/ui/regions/regions-free-region-ordering-caller.migrate.nll.stderr diff --git a/src/test/ui/regions/regions-free-region-ordering-caller.ast.stderr b/src/test/ui/regions/regions-free-region-ordering-caller.migrate.stderr similarity index 95% rename from src/test/ui/regions/regions-free-region-ordering-caller.ast.stderr rename to src/test/ui/regions/regions-free-region-ordering-caller.migrate.stderr index a33d358355..9d6bae79ce 100644 --- a/src/test/ui/regions/regions-free-region-ordering-caller.ast.stderr +++ b/src/test/ui/regions/regions-free-region-ordering-caller.migrate.stderr @@ -29,4 +29,3 @@ LL | let z: Option<&'a &'b usize> = None; error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/regions/regions-free-region-ordering-caller.nll.stderr b/src/test/ui/regions/regions-free-region-ordering-caller.nll.stderr new file mode 100644 index 0000000000..16eda2844c --- /dev/null +++ b/src/test/ui/regions/regions-free-region-ordering-caller.nll.stderr @@ -0,0 +1,33 @@ +error: lifetime may not live long enough + --> $DIR/regions-free-region-ordering-caller.rs:11:12 + | +LL | fn call2<'a, 'b>(a: &'a usize, b: &'b usize) { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | let z: Option<&'b &'a usize> = None; + | ^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'b` + +error: lifetime may not live long enough + --> $DIR/regions-free-region-ordering-caller.rs:17:12 + | +LL | fn call3<'a, 'b>(a: &'a usize, b: &'b usize) { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | let y: Paramd<'a> = Paramd { x: a }; +LL | let z: Option<&'b Paramd<'a>> = None; + | ^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'b` + +error: lifetime may not live long enough + --> $DIR/regions-free-region-ordering-caller.rs:22:12 + | +LL | fn call4<'a, 'b>(a: &'a usize, b: &'b usize) { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | let z: Option<&'a &'b usize> = None; + | ^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a` + +error: aborting due to 3 previous errors + diff --git a/src/test/ui/regions/regions-free-region-ordering-caller.rs b/src/test/ui/regions/regions-free-region-ordering-caller.rs index 621e6e78b4..c0b12f23cd 100644 --- a/src/test/ui/regions/regions-free-region-ordering-caller.rs +++ b/src/test/ui/regions/regions-free-region-ordering-caller.rs @@ -2,25 +2,25 @@ // than the thing it points at and ensure that they result in // errors. See also regions-free-region-ordering-callee.rs -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir +// revisions: migrate nll +//[nll]compile-flags: -Z borrowck=mir struct Paramd<'a> { x: &'a usize } fn call2<'a, 'b>(a: &'a usize, b: &'b usize) { - let z: Option<&'b &'a usize> = None;//[ast]~ ERROR E0623 - //[mir]~^ ERROR lifetime may not live long enough + let z: Option<&'b &'a usize> = None;//[migrate]~ ERROR E0623 + //[nll]~^ ERROR lifetime may not live long enough } fn call3<'a, 'b>(a: &'a usize, b: &'b usize) { let y: Paramd<'a> = Paramd { x: a }; - let z: Option<&'b Paramd<'a>> = None;//[ast]~ ERROR E0623 - //[mir]~^ ERROR lifetime may not live long enough + let z: Option<&'b Paramd<'a>> = None;//[migrate]~ ERROR E0623 + //[nll]~^ ERROR lifetime may not live long enough } fn call4<'a, 'b>(a: &'a usize, b: &'b usize) { - let z: Option<&'a &'b usize> = None;//[ast]~ ERROR E0623 - //[mir]~^ ERROR lifetime may not live long enough + let z: Option<&'a &'b usize> = None;//[migrate]~ ERROR E0623 + //[nll]~^ ERROR lifetime may not live long enough } fn main() {} diff --git a/src/test/ui/regions/regions-free-region-ordering-caller1.nll.stderr b/src/test/ui/regions/regions-free-region-ordering-caller1.nll.stderr deleted file mode 100644 index 539343a682..0000000000 --- a/src/test/ui/regions/regions-free-region-ordering-caller1.nll.stderr +++ /dev/null @@ -1,32 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/regions-free-region-ordering-caller1.rs:9:27 - | -LL | fn call1<'a>(x: &'a usize) { - | -- lifetime `'a` defined here -... -LL | let z: &'a & usize = &(&y); - | ----------- ^^^^ creates a temporary which is freed while still in use - | | - | type annotation requires that borrow lasts for `'a` -... -LL | } - | - temporary value is freed at the end of this statement - -error[E0597]: `y` does not live long enough - --> $DIR/regions-free-region-ordering-caller1.rs:9:27 - | -LL | fn call1<'a>(x: &'a usize) { - | -- lifetime `'a` defined here -... -LL | let z: &'a & usize = &(&y); - | ----------- ^^^^ borrowed value does not live long enough - | | - | type annotation requires that `y` is borrowed for `'a` -... -LL | } - | - `y` dropped here while still borrowed - -error: aborting due to 2 previous errors - -Some errors occurred: E0597, E0716. -For more information about an error, try `rustc --explain E0597`. diff --git a/src/test/ui/regions/regions-free-region-ordering-caller1.rs b/src/test/ui/regions/regions-free-region-ordering-caller1.rs index d9251c085e..f324556166 100644 --- a/src/test/ui/regions/regions-free-region-ordering-caller1.rs +++ b/src/test/ui/regions/regions-free-region-ordering-caller1.rs @@ -7,7 +7,7 @@ fn call1<'a>(x: &'a usize) { // &'a &'z usize requires that 'a <= 'z: let y: usize = 3; let z: &'a & usize = &(&y); - //~^ ERROR borrowed value does not live long enough + //~^ ERROR temporary value dropped while borrowed //~^^ ERROR `y` does not live long enough } diff --git a/src/test/ui/regions/regions-free-region-ordering-caller1.stderr b/src/test/ui/regions/regions-free-region-ordering-caller1.stderr index 08aaa35e08..8042b1740b 100644 --- a/src/test/ui/regions/regions-free-region-ordering-caller1.stderr +++ b/src/test/ui/regions/regions-free-region-ordering-caller1.stderr @@ -1,33 +1,32 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/regions-free-region-ordering-caller1.rs:9:27 | +LL | fn call1<'a>(x: &'a usize) { + | -- lifetime `'a` defined here +... LL | let z: &'a & usize = &(&y); - | ^^^^ temporary value does not live long enough + | ----------- ^^^^ creates a temporary which is freed while still in use + | | + | type annotation requires that borrow lasts for `'a` ... LL | } - | - temporary value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 5:10... - --> $DIR/regions-free-region-ordering-caller1.rs:5:10 - | -LL | fn call1<'a>(x: &'a usize) { - | ^^ + | - temporary value is freed at the end of this statement error[E0597]: `y` does not live long enough - --> $DIR/regions-free-region-ordering-caller1.rs:9:29 + --> $DIR/regions-free-region-ordering-caller1.rs:9:27 | +LL | fn call1<'a>(x: &'a usize) { + | -- lifetime `'a` defined here +... LL | let z: &'a & usize = &(&y); - | ^ borrowed value does not live long enough + | ----------- ^^^^ borrowed value does not live long enough + | | + | type annotation requires that `y` is borrowed for `'a` ... LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 5:10... - --> $DIR/regions-free-region-ordering-caller1.rs:5:10 - | -LL | fn call1<'a>(x: &'a usize) { - | ^^ + | - `y` dropped here while still borrowed error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0597`. +Some errors have detailed explanations: E0597, E0716. +For more information about an error, try `rustc --explain E0597`. diff --git a/src/test/ui/regions/regions-free-region-ordering-incorrect.nll.stderr b/src/test/ui/regions/regions-free-region-ordering-incorrect.nll.stderr new file mode 100644 index 0000000000..480a81d33f --- /dev/null +++ b/src/test/ui/regions/regions-free-region-ordering-incorrect.nll.stderr @@ -0,0 +1,15 @@ +error: lifetime may not live long enough + --> $DIR/regions-free-region-ordering-incorrect.rs:15:9 + | +LL | impl<'b, T> Node<'b, T> { + | -- lifetime `'b` defined here +LL | fn get<'a>(&'a self) -> &'b T { + | -- lifetime `'a` defined here +LL | / match self.next { +LL | | Some(ref next) => next.get(), +LL | | None => &self.val +LL | | } + | |_________^ returning this value requires that `'a` must outlive `'b` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-free-region-ordering-incorrect.stderr b/src/test/ui/regions/regions-free-region-ordering-incorrect.stderr index 676e96a038..5fad6de2a6 100644 --- a/src/test/ui/regions/regions-free-region-ordering-incorrect.stderr +++ b/src/test/ui/regions/regions-free-region-ordering-incorrect.stderr @@ -30,4 +30,3 @@ LL | | } error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr b/src/test/ui/regions/regions-implied-bounds-projection-gap-1.nll.stderr similarity index 51% rename from src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr rename to src/test/ui/regions/regions-implied-bounds-projection-gap-1.nll.stderr index b3c02f7f42..0f0f86dfcd 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr +++ b/src/test/ui/regions/regions-implied-bounds-projection-gap-1.nll.stderr @@ -1,10 +1,10 @@ error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-fn-body-nll-feature.rs:20:5 + --> $DIR/regions-implied-bounds-projection-gap-1.rs:16:5 | -LL | outlives(cell, t) - | ^^^^^^^^^^^^^^^^^ +LL | wf::<&'x T>(); + | ^^^^^^^^^^^ | - = help: consider adding an explicit lifetime bound `T: 'a`... + = help: consider adding an explicit lifetime bound `T: 'x`... error: aborting due to previous error diff --git a/src/test/ui/regions/regions-infer-borrow-scope-too-big.nll.stderr b/src/test/ui/regions/regions-infer-borrow-scope-too-big.nll.stderr deleted file mode 100644 index 2c7a6e8b5c..0000000000 --- a/src/test/ui/regions/regions-infer-borrow-scope-too-big.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0515]: cannot return value referencing local data `*p` - --> $DIR/regions-infer-borrow-scope-too-big.rs:13:12 - | -LL | let xc = x_coord(&*p); - | --- `*p` is borrowed here -LL | assert_eq!(*xc, 3); -LL | return xc; - | ^^ returns a value referencing data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-infer-borrow-scope-too-big.rs b/src/test/ui/regions/regions-infer-borrow-scope-too-big.rs index 3bf1c67da9..250b41da57 100644 --- a/src/test/ui/regions/regions-infer-borrow-scope-too-big.rs +++ b/src/test/ui/regions/regions-infer-borrow-scope-too-big.rs @@ -8,9 +8,9 @@ fn x_coord<'r>(p: &'r Point) -> &'r isize { } fn foo<'a>(p: Box) -> &'a isize { - let xc = x_coord(&*p); //~ ERROR `*p` does not live long enough + let xc = x_coord(&*p); assert_eq!(*xc, 3); - return xc; + return xc; //~ ERROR cannot return value referencing local data `*p` } fn main() {} diff --git a/src/test/ui/regions/regions-infer-borrow-scope-too-big.stderr b/src/test/ui/regions/regions-infer-borrow-scope-too-big.stderr index ed4bc15504..2c7a6e8b5c 100644 --- a/src/test/ui/regions/regions-infer-borrow-scope-too-big.stderr +++ b/src/test/ui/regions/regions-infer-borrow-scope-too-big.stderr @@ -1,18 +1,12 @@ -error[E0597]: `*p` does not live long enough - --> $DIR/regions-infer-borrow-scope-too-big.rs:11:23 +error[E0515]: cannot return value referencing local data `*p` + --> $DIR/regions-infer-borrow-scope-too-big.rs:13:12 | LL | let xc = x_coord(&*p); - | ^^ borrowed value does not live long enough -... -LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 10:8... - --> $DIR/regions-infer-borrow-scope-too-big.rs:10:8 - | -LL | fn foo<'a>(p: Box) -> &'a isize { - | ^^ + | --- `*p` is borrowed here +LL | assert_eq!(*xc, 3); +LL | return xc; + | ^^ returns a value referencing data owned by the current function error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-infer-bound-from-trait-self.nll.stderr b/src/test/ui/regions/regions-infer-bound-from-trait-self.nll.stderr new file mode 100644 index 0000000000..0651e305cd --- /dev/null +++ b/src/test/ui/regions/regions-infer-bound-from-trait-self.nll.stderr @@ -0,0 +1,11 @@ +error[E0309]: the parameter type `Self` may not live long enough + --> $DIR/regions-infer-bound-from-trait-self.rs:46:9 + | +LL | check_bound(x, self) + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `Self: 'a`... + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0309`. diff --git a/src/test/ui/regions/regions-infer-bound-from-trait.nll.stderr b/src/test/ui/regions/regions-infer-bound-from-trait.nll.stderr new file mode 100644 index 0000000000..1f7b34fc69 --- /dev/null +++ b/src/test/ui/regions/regions-infer-bound-from-trait.nll.stderr @@ -0,0 +1,19 @@ +error[E0309]: the parameter type `A` may not live long enough + --> $DIR/regions-infer-bound-from-trait.rs:33:5 + | +LL | check_bound(x, a) + | ^^^^^^^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `A: 'a`... + +error[E0309]: the parameter type `A` may not live long enough + --> $DIR/regions-infer-bound-from-trait.rs:37:5 + | +LL | check_bound(x, a) + | ^^^^^^^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `A: 'a`... + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0309`. diff --git a/src/test/ui/regions/regions-infer-call-3.nll.stderr b/src/test/ui/regions/regions-infer-call-3.nll.stderr new file mode 100644 index 0000000000..ca51555a07 --- /dev/null +++ b/src/test/ui/regions/regions-infer-call-3.nll.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/regions-infer-call-3.rs:8:24 + | +LL | let z = with(|y| { select(x, y) }); + | -- ^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2` + | || + | |return type of closure is &'2 isize + | has type `&'1 isize` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-infer-call-3.stderr b/src/test/ui/regions/regions-infer-call-3.stderr index 1d6dbdb2c7..151c8307a1 100644 --- a/src/test/ui/regions/regions-infer-call-3.stderr +++ b/src/test/ui/regions/regions-infer-call-3.stderr @@ -27,4 +27,3 @@ LL | let z = with(|y| { select(x, y) }); error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/regions/regions-infer-contravariance-due-to-decl.nll.stderr b/src/test/ui/regions/regions-infer-contravariance-due-to-decl.nll.stderr new file mode 100644 index 0000000000..cefeecf16e --- /dev/null +++ b/src/test/ui/regions/regions-infer-contravariance-due-to-decl.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/regions-infer-contravariance-due-to-decl.rs:25:12 + | +LL | fn use_<'short,'long>(c: Contravariant<'short>, + | ------ ----- lifetime `'long` defined here + | | + | lifetime `'short` defined here +... +LL | let _: Contravariant<'long> = c; + | ^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'short` must outlive `'long` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-infer-contravariance-due-to-decl.stderr b/src/test/ui/regions/regions-infer-contravariance-due-to-decl.stderr index f3a0358b90..9374818960 100644 --- a/src/test/ui/regions/regions-infer-contravariance-due-to-decl.stderr +++ b/src/test/ui/regions/regions-infer-contravariance-due-to-decl.stderr @@ -12,4 +12,3 @@ LL | let _: Contravariant<'long> = c; error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/regions/regions-infer-covariance-due-to-decl.nll.stderr b/src/test/ui/regions/regions-infer-covariance-due-to-decl.nll.stderr new file mode 100644 index 0000000000..1bddecba50 --- /dev/null +++ b/src/test/ui/regions/regions-infer-covariance-due-to-decl.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/regions-infer-covariance-due-to-decl.rs:22:12 + | +LL | fn use_<'short,'long>(c: Covariant<'long>, + | ------ ----- lifetime `'long` defined here + | | + | lifetime `'short` defined here +... +LL | let _: Covariant<'short> = c; + | ^^^^^^^^^^^^^^^^^ type annotation requires that `'short` must outlive `'long` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-infer-covariance-due-to-decl.stderr b/src/test/ui/regions/regions-infer-covariance-due-to-decl.stderr index c3e2075fbc..cd0a18a892 100644 --- a/src/test/ui/regions/regions-infer-covariance-due-to-decl.stderr +++ b/src/test/ui/regions/regions-infer-covariance-due-to-decl.stderr @@ -11,4 +11,3 @@ LL | let _: Covariant<'short> = c; error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/regions/regions-infer-invariance-due-to-decl.nll.stderr b/src/test/ui/regions/regions-infer-invariance-due-to-decl.nll.stderr new file mode 100644 index 0000000000..0c1e3989b2 --- /dev/null +++ b/src/test/ui/regions/regions-infer-invariance-due-to-decl.nll.stderr @@ -0,0 +1,10 @@ +error: lifetime may not live long enough + --> $DIR/regions-infer-invariance-due-to-decl.rs:12:5 + | +LL | fn to_longer_lifetime<'r>(b_isize: Invariant<'r>) -> Invariant<'static> { + | -- lifetime `'r` defined here +LL | b_isize + | ^^^^^^^ returning this value requires that `'r` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.nll.stderr b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.nll.stderr new file mode 100644 index 0000000000..0edeb27239 --- /dev/null +++ b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.nll.stderr @@ -0,0 +1,10 @@ +error: lifetime may not live long enough + --> $DIR/regions-infer-invariance-due-to-mutability-3.rs:10:5 + | +LL | fn to_longer_lifetime<'r>(b_isize: Invariant<'r>) -> Invariant<'static> { + | -- lifetime `'r` defined here +LL | b_isize + | ^^^^^^^ returning this value requires that `'r` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.nll.stderr b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.nll.stderr new file mode 100644 index 0000000000..724dd7e3f6 --- /dev/null +++ b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.nll.stderr @@ -0,0 +1,10 @@ +error: lifetime may not live long enough + --> $DIR/regions-infer-invariance-due-to-mutability-4.rs:10:5 + | +LL | fn to_longer_lifetime<'r>(b_isize: Invariant<'r>) -> Invariant<'static> { + | -- lifetime `'r` defined here +LL | b_isize + | ^^^^^^^ returning this value requires that `'r` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-infer-not-param.nll.stderr b/src/test/ui/regions/regions-infer-not-param.nll.stderr new file mode 100644 index 0000000000..2064b060ec --- /dev/null +++ b/src/test/ui/regions/regions-infer-not-param.nll.stderr @@ -0,0 +1,26 @@ +error: lifetime may not live long enough + --> $DIR/regions-infer-not-param.rs:15:54 + | +LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } + | -- -- lifetime `'b` defined here ^ returning this value requires that `'a` must outlive `'b` + | | + | lifetime `'a` defined here + +error: lifetime may not live long enough + --> $DIR/regions-infer-not-param.rs:19:63 + | +LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } + | -- -- lifetime `'b` defined here ^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b` + | | + | lifetime `'a` defined here + +error: lifetime may not live long enough + --> $DIR/regions-infer-not-param.rs:19:63 + | +LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } + | -- -- lifetime `'b` defined here ^ returning this value requires that `'a` must outlive `'b` + | | + | lifetime `'a` defined here + +error: aborting due to 3 previous errors + diff --git a/src/test/ui/regions/regions-infer-paramd-indirect.nll.stderr b/src/test/ui/regions/regions-infer-paramd-indirect.nll.stderr new file mode 100644 index 0000000000..a86e6ccdc5 --- /dev/null +++ b/src/test/ui/regions/regions-infer-paramd-indirect.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/regions-infer-paramd-indirect.rs:22:9 + | +LL | impl<'a> SetF<'a> for C<'a> { + | -- lifetime `'a` defined here +... +LL | fn set_f_bad(&mut self, b: Box) { + | - has type `std::boxed::Box>` +LL | self.f = b; + | ^^^^^^ assignment requires that `'1` must outlive `'a` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-infer-proc-static-upvar.nll.stderr b/src/test/ui/regions/regions-infer-proc-static-upvar.nll.stderr deleted file mode 100644 index 803d0d7449..0000000000 --- a/src/test/ui/regions/regions-infer-proc-static-upvar.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0597]: `x` does not live long enough - --> $DIR/regions-infer-proc-static-upvar.rs:10:13 - | -LL | let y = &x; - | ^^ borrowed value does not live long enough -LL | / foo(move|| { -LL | | let _a = *y; -LL | | }); - | |______- argument requires that `x` is borrowed for `'static` -LL | } - | - `x` dropped here while still borrowed - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/regions/regions-infer-proc-static-upvar.stderr b/src/test/ui/regions/regions-infer-proc-static-upvar.stderr index 21b2e881a7..803d0d7449 100644 --- a/src/test/ui/regions/regions-infer-proc-static-upvar.stderr +++ b/src/test/ui/regions/regions-infer-proc-static-upvar.stderr @@ -1,13 +1,14 @@ error[E0597]: `x` does not live long enough - --> $DIR/regions-infer-proc-static-upvar.rs:10:14 + --> $DIR/regions-infer-proc-static-upvar.rs:10:13 | -LL | let y = &x; - | ^ borrowed value does not live long enough -... -LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... +LL | let y = &x; + | ^^ borrowed value does not live long enough +LL | / foo(move|| { +LL | | let _a = *y; +LL | | }); + | |______- argument requires that `x` is borrowed for `'static` +LL | } + | - `x` dropped here while still borrowed error: aborting due to previous error diff --git a/src/test/ui/regions/regions-lifetime-bounds-on-fns.nll.stderr b/src/test/ui/regions/regions-lifetime-bounds-on-fns.nll.stderr new file mode 100644 index 0000000000..e1f14fc0cd --- /dev/null +++ b/src/test/ui/regions/regions-lifetime-bounds-on-fns.nll.stderr @@ -0,0 +1,12 @@ +error[E0308]: mismatched types + --> $DIR/regions-lifetime-bounds-on-fns.rs:20:43 + | +LL | let _: fn(&mut &isize, &mut &isize) = a; + | ^ expected concrete lifetime, found bound lifetime parameter + | + = note: expected type `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)` + found type `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr b/src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr index 46200e4d84..0c3c342728 100644 --- a/src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr +++ b/src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr @@ -27,5 +27,4 @@ LL | let _: fn(&mut &isize, &mut &isize) = a; error: aborting due to 3 previous errors -Some errors occurred: E0308, E0623. -For more information about an error, try `rustc --explain E0308`. +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/regions/regions-lifetime-of-struct-or-enum-variant.nll.stderr b/src/test/ui/regions/regions-lifetime-of-struct-or-enum-variant.nll.stderr deleted file mode 100644 index 7984f4f0e5..0000000000 --- a/src/test/ui/regions/regions-lifetime-of-struct-or-enum-variant.nll.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0515]: cannot return value referencing temporary value - --> $DIR/regions-lifetime-of-struct-or-enum-variant.rs:16:3 - | -LL | let testValue = &id(Test); - | -------- temporary value created here -LL | -LL | testValue - | ^^^^^^^^^ returns a value referencing data owned by the current function - -error[E0515]: cannot return value referencing temporary value - --> $DIR/regions-lifetime-of-struct-or-enum-variant.rs:22:3 - | -LL | let testValue = &id(MyEnum::Variant1); - | -------------------- temporary value created here -LL | -LL | testValue - | ^^^^^^^^^ returns a value referencing data owned by the current function - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-lifetime-of-struct-or-enum-variant.rs b/src/test/ui/regions/regions-lifetime-of-struct-or-enum-variant.rs index 2d21a51108..1b25294c7e 100644 --- a/src/test/ui/regions/regions-lifetime-of-struct-or-enum-variant.rs +++ b/src/test/ui/regions/regions-lifetime-of-struct-or-enum-variant.rs @@ -12,14 +12,14 @@ enum MyEnum { fn structLifetime<'a>() -> &'a Test { let testValue = &id(Test); - //~^ ERROR borrowed value does not live long enough testValue + //~^ ERROR cannot return value referencing temporary value } fn variantLifetime<'a>() -> &'a MyEnum { let testValue = &id(MyEnum::Variant1); - //~^ ERROR borrowed value does not live long enough testValue + //~^ ERROR cannot return value referencing temporary value } diff --git a/src/test/ui/regions/regions-lifetime-of-struct-or-enum-variant.stderr b/src/test/ui/regions/regions-lifetime-of-struct-or-enum-variant.stderr index c0bfc475f1..b4bf2ab312 100644 --- a/src/test/ui/regions/regions-lifetime-of-struct-or-enum-variant.stderr +++ b/src/test/ui/regions/regions-lifetime-of-struct-or-enum-variant.stderr @@ -1,33 +1,19 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/regions-lifetime-of-struct-or-enum-variant.rs:14:20 +error[E0515]: cannot return value referencing temporary value + --> $DIR/regions-lifetime-of-struct-or-enum-variant.rs:15:3 | LL | let testValue = &id(Test); - | ^^^^^^^^ temporary value does not live long enough -... -LL | } - | - temporary value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:19... - --> $DIR/regions-lifetime-of-struct-or-enum-variant.rs:13:19 - | -LL | fn structLifetime<'a>() -> &'a Test { - | ^^ + | -------- temporary value created here +LL | testValue + | ^^^^^^^^^ returns a value referencing data owned by the current function -error[E0597]: borrowed value does not live long enough - --> $DIR/regions-lifetime-of-struct-or-enum-variant.rs:20:20 +error[E0515]: cannot return value referencing temporary value + --> $DIR/regions-lifetime-of-struct-or-enum-variant.rs:21:3 | LL | let testValue = &id(MyEnum::Variant1); - | ^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -... -LL | } - | - temporary value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 19:20... - --> $DIR/regions-lifetime-of-struct-or-enum-variant.rs:19:20 - | -LL | fn variantLifetime<'a>() -> &'a MyEnum { - | ^^ + | -------------------- temporary value created here +LL | testValue + | ^^^^^^^^^ returns a value referencing data owned by the current function error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-nested-fns-2.nll.stderr b/src/test/ui/regions/regions-nested-fns-2.nll.stderr deleted file mode 100644 index 8627dac545..0000000000 --- a/src/test/ui/regions/regions-nested-fns-2.nll.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0597]: `y` does not live long enough - --> $DIR/regions-nested-fns-2.rs:8:25 - | -LL | |z| { - | --- value captured here -LL | -LL | if false { &y } else { z } - | -^ - | || - | |borrowed value does not live long enough - | returning this value requires that `y` is borrowed for `'static` -LL | }); -LL | } - | - `y` dropped here while still borrowed - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/regions/regions-nested-fns-2.rs b/src/test/ui/regions/regions-nested-fns-2.rs index 1b51880f41..3b3e26c450 100644 --- a/src/test/ui/regions/regions-nested-fns-2.rs +++ b/src/test/ui/regions/regions-nested-fns-2.rs @@ -4,8 +4,8 @@ fn nested() { let y = 3; ignore( |z| { - //~^ ERROR E0373 if false { &y } else { z } + //~^ ERROR `y` does not live long enough }); } diff --git a/src/test/ui/regions/regions-nested-fns-2.stderr b/src/test/ui/regions/regions-nested-fns-2.stderr index 08bab6e980..43c8d1272c 100644 --- a/src/test/ui/regions/regions-nested-fns-2.stderr +++ b/src/test/ui/regions/regions-nested-fns-2.stderr @@ -1,16 +1,17 @@ -error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function - --> $DIR/regions-nested-fns-2.rs:6:9 +error[E0597]: `y` does not live long enough + --> $DIR/regions-nested-fns-2.rs:7:25 | LL | |z| { - | ^^^ may outlive borrowed value `y` -LL | + | --- value captured here LL | if false { &y } else { z } - | - `y` is borrowed here -help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword - | -LL | move |z| { - | ^^^^^^^^ + | -^ + | || + | |borrowed value does not live long enough + | returning this value requires that `y` is borrowed for `'static` +... +LL | } + | - `y` dropped here while still borrowed error: aborting due to previous error -For more information about this error, try `rustc --explain E0373`. +For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/regions/regions-nested-fns.nll.stderr b/src/test/ui/regions/regions-nested-fns.nll.stderr new file mode 100644 index 0000000000..c11c09b6d0 --- /dev/null +++ b/src/test/ui/regions/regions-nested-fns.nll.stderr @@ -0,0 +1,51 @@ +error[E0521]: borrowed data escapes outside of closure + --> $DIR/regions-nested-fns.rs:10:9 + | +LL | let mut ay = &y; + | ------ `ay` is declared here, outside of the closure body +LL | +LL | ignore:: FnMut(&'z isize)>>(Box::new(|z| { + | - `z` is a reference that is only valid in the closure body +... +LL | ay = z; + | ^^^^^^ `z` escapes the closure body here + +error[E0597]: `y` does not live long enough + --> $DIR/regions-nested-fns.rs:5:18 + | +LL | let mut ay = &y; + | ^^ borrowed value does not live long enough +... +LL | if false { return ay; } + | -- returning this value requires that `y` is borrowed for `'static` +... +LL | } + | - `y` dropped here while still borrowed + +error[E0597]: `y` does not live long enough + --> $DIR/regions-nested-fns.rs:9:15 + | +LL | ignore:: FnMut(&'z isize)>>(Box::new(|z| { + | --- value captured here +LL | ay = x; +LL | ay = &y; + | ^ borrowed value does not live long enough +... +LL | if false { return ay; } + | -- returning this value requires that `y` is borrowed for `'static` +... +LL | } + | - `y` dropped here while still borrowed + +error: lifetime may not live long enough + --> $DIR/regions-nested-fns.rs:14:27 + | +LL | fn nested<'x>(x: &'x isize) { + | -- lifetime `'x` defined here +... +LL | if false { return x; } + | ^ returning this value requires that `'x` must outlive `'static` + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/regions/regions-nested-fns.stderr b/src/test/ui/regions/regions-nested-fns.stderr index 3cecd4ee83..702254a0ac 100644 --- a/src/test/ui/regions/regions-nested-fns.stderr +++ b/src/test/ui/regions/regions-nested-fns.stderr @@ -57,5 +57,3 @@ LL | fn nested<'x>(x: &'x isize) { error: aborting due to 2 previous errors -Some errors occurred: E0312, E0495. -For more information about an error, try `rustc --explain E0312`. diff --git a/src/test/ui/regions/regions-normalize-in-where-clause-list.stderr b/src/test/ui/regions/regions-normalize-in-where-clause-list.stderr index c44edf1f03..912e118316 100644 --- a/src/test/ui/regions/regions-normalize-in-where-clause-list.stderr +++ b/src/test/ui/regions/regions-normalize-in-where-clause-list.stderr @@ -23,4 +23,3 @@ LL | fn bar<'a, 'b>() error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/regions/regions-outlives-projection-container-hrtb.mir.stderr b/src/test/ui/regions/regions-outlives-projection-container-hrtb.migrate.nll.stderr similarity index 100% rename from src/test/ui/regions/regions-outlives-projection-container-hrtb.mir.stderr rename to src/test/ui/regions/regions-outlives-projection-container-hrtb.migrate.nll.stderr diff --git a/src/test/ui/regions/regions-outlives-projection-container-hrtb.ast.stderr b/src/test/ui/regions/regions-outlives-projection-container-hrtb.migrate.stderr similarity index 100% rename from src/test/ui/regions/regions-outlives-projection-container-hrtb.ast.stderr rename to src/test/ui/regions/regions-outlives-projection-container-hrtb.migrate.stderr diff --git a/src/test/ui/regions/regions-outlives-projection-container-hrtb.nll.stderr b/src/test/ui/regions/regions-outlives-projection-container-hrtb.nll.stderr new file mode 100644 index 0000000000..5028663ba6 --- /dev/null +++ b/src/test/ui/regions/regions-outlives-projection-container-hrtb.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/regions-outlives-projection-container-hrtb.rs:35:12 + | +LL | fn with_assoc<'a,'b>() { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | let _: &'a WithHrAssoc> = loop { }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a` + +error: lifetime may not live long enough + --> $DIR/regions-outlives-projection-container-hrtb.rs:57:12 + | +LL | fn with_assoc_sub<'a,'b>() { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | let _: &'a WithHrAssocSub> = loop { }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/regions/regions-outlives-projection-container-hrtb.rs b/src/test/ui/regions/regions-outlives-projection-container-hrtb.rs index 2871d962c4..407a4fdf59 100644 --- a/src/test/ui/regions/regions-outlives-projection-container-hrtb.rs +++ b/src/test/ui/regions/regions-outlives-projection-container-hrtb.rs @@ -1,8 +1,8 @@ // Test that structs with higher-ranked where clauses don't generate // "outlives" requirements. Issue #22246. -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir +// revisions: migrate nll +//[nll]compile-flags: -Z borrowck=mir #![allow(dead_code)] @@ -33,8 +33,8 @@ fn with_assoc<'a,'b>() { // We get an error because 'b:'a does not hold: let _: &'a WithHrAssoc> = loop { }; - //[ast]~^ ERROR reference has a longer lifetime - //[mir]~^^ ERROR lifetime may not live long enough + //[migrate]~^ ERROR reference has a longer lifetime + //[nll]~^^ ERROR lifetime may not live long enough } /////////////////////////////////////////////////////////////////////////// @@ -55,8 +55,8 @@ fn with_assoc_sub<'a,'b>() { // below to be well-formed, it is not related to the HR relation. let _: &'a WithHrAssocSub> = loop { }; - //[ast]~^ ERROR reference has a longer lifetime - //[mir]~^^ ERROR lifetime may not live long enough + //[migrate]~^ ERROR reference has a longer lifetime + //[nll]~^^ ERROR lifetime may not live long enough } diff --git a/src/test/ui/regions/regions-outlives-projection-container-hrtb.stderr b/src/test/ui/regions/regions-outlives-projection-container-hrtb.stderr deleted file mode 100644 index 856e28f141..0000000000 --- a/src/test/ui/regions/regions-outlives-projection-container-hrtb.stderr +++ /dev/null @@ -1,37 +0,0 @@ -error[E0491]: in type `&'a WithHrAssoc>`, reference has a longer lifetime than the data it references - --> $DIR/regions-outlives-projection-container-hrtb.rs:32:12 - | -LL | let _: &'a WithHrAssoc> = loop { }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | -note: the pointer is valid for the lifetime 'a as defined on the function body at 29:15 - --> $DIR/regions-outlives-projection-container-hrtb.rs:29:15 - | -LL | fn with_assoc<'a,'b>() { - | ^^ -note: but the referenced data is only valid for the lifetime 'b as defined on the function body at 29:18 - --> $DIR/regions-outlives-projection-container-hrtb.rs:29:18 - | -LL | fn with_assoc<'a,'b>() { - | ^^ - -error[E0491]: in type `&'a WithHrAssocSub>`, reference has a longer lifetime than the data it references - --> $DIR/regions-outlives-projection-container-hrtb.rs:53:12 - | -LL | let _: &'a WithHrAssocSub> = loop { }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | -note: the pointer is valid for the lifetime 'a as defined on the function body at 49:19 - --> $DIR/regions-outlives-projection-container-hrtb.rs:49:19 - | -LL | fn with_assoc_sub<'a,'b>() { - | ^^ -note: but the referenced data is only valid for the lifetime 'b as defined on the function body at 49:22 - --> $DIR/regions-outlives-projection-container-hrtb.rs:49:22 - | -LL | fn with_assoc_sub<'a,'b>() { - | ^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0491`. diff --git a/src/test/ui/regions/regions-outlives-projection-container-wc.mir.stderr b/src/test/ui/regions/regions-outlives-projection-container-wc.migrate.nll.stderr similarity index 100% rename from src/test/ui/regions/regions-outlives-projection-container-wc.mir.stderr rename to src/test/ui/regions/regions-outlives-projection-container-wc.migrate.nll.stderr diff --git a/src/test/ui/regions/regions-outlives-projection-container-wc.ast.stderr b/src/test/ui/regions/regions-outlives-projection-container-wc.migrate.stderr similarity index 100% rename from src/test/ui/regions/regions-outlives-projection-container-wc.ast.stderr rename to src/test/ui/regions/regions-outlives-projection-container-wc.migrate.stderr diff --git a/src/test/ui/regions/regions-outlives-projection-container-wc.nll.stderr b/src/test/ui/regions/regions-outlives-projection-container-wc.nll.stderr new file mode 100644 index 0000000000..880fe17b74 --- /dev/null +++ b/src/test/ui/regions/regions-outlives-projection-container-wc.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/regions-outlives-projection-container-wc.rs:37:12 + | +LL | fn with_assoc<'a,'b>() { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | let _: &'a WithAssoc> = loop { }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-outlives-projection-container-wc.rs b/src/test/ui/regions/regions-outlives-projection-container-wc.rs index 3762221132..5037ea536d 100644 --- a/src/test/ui/regions/regions-outlives-projection-container-wc.rs +++ b/src/test/ui/regions/regions-outlives-projection-container-wc.rs @@ -3,8 +3,8 @@ // outlive the location in which the type appears, even when the // constraint is in a where clause not a bound. Issue #22246. -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir +// revisions: migrate nll +//[nll]compile-flags: -Z borrowck=mir #![allow(dead_code)] @@ -35,8 +35,8 @@ fn with_assoc<'a,'b>() { // which is &'b (), must outlive 'a. let _: &'a WithAssoc> = loop { }; - //[ast]~^ ERROR reference has a longer lifetime - //[mir]~^^ ERROR lifetime may not live long enough + //[migrate]~^ ERROR reference has a longer lifetime + //[nll]~^^ ERROR lifetime may not live long enough } fn main() { diff --git a/src/test/ui/regions/regions-outlives-projection-container-wc.stderr b/src/test/ui/regions/regions-outlives-projection-container-wc.stderr deleted file mode 100644 index 0d73d3d643..0000000000 --- a/src/test/ui/regions/regions-outlives-projection-container-wc.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0491]: in type `&'a WithAssoc>`, reference has a longer lifetime than the data it references - --> $DIR/regions-outlives-projection-container-wc.rs:34:12 - | -LL | let _: &'a WithAssoc> = loop { }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | -note: the pointer is valid for the lifetime 'a as defined on the function body at 28:15 - --> $DIR/regions-outlives-projection-container-wc.rs:28:15 - | -LL | fn with_assoc<'a,'b>() { - | ^^ -note: but the referenced data is only valid for the lifetime 'b as defined on the function body at 28:18 - --> $DIR/regions-outlives-projection-container-wc.rs:28:18 - | -LL | fn with_assoc<'a,'b>() { - | ^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0491`. diff --git a/src/test/ui/regions/regions-outlives-projection-container.nll.stderr b/src/test/ui/regions/regions-outlives-projection-container.nll.stderr new file mode 100644 index 0000000000..ef87d02ec0 --- /dev/null +++ b/src/test/ui/regions/regions-outlives-projection-container.nll.stderr @@ -0,0 +1,46 @@ +error: lifetime may not live long enough + --> $DIR/regions-outlives-projection-container.rs:40:13 + | +LL | fn with_assoc<'a,'b>() { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | let _x: &'a WithAssoc> = loop { }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a` + +error: lifetime may not live long enough + --> $DIR/regions-outlives-projection-container.rs:58:13 + | +LL | fn without_assoc<'a,'b>() { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | let _x: &'a WithoutAssoc> = loop { }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a` + +error: lifetime may not live long enough + --> $DIR/regions-outlives-projection-container.rs:67:5 + | +LL | fn call_with_assoc<'a,'b>() { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | call::<&'a WithAssoc>>(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'a` + +error: lifetime may not live long enough + --> $DIR/regions-outlives-projection-container.rs:74:5 + | +LL | fn call_without_assoc<'a,'b>() { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | call::<&'a WithoutAssoc>>(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'a` + +error: aborting due to 4 previous errors + diff --git a/src/test/ui/regions/regions-pattern-typing-issue-19552.nll.stderr b/src/test/ui/regions/regions-pattern-typing-issue-19552.nll.stderr deleted file mode 100644 index f77d94a24b..0000000000 --- a/src/test/ui/regions/regions-pattern-typing-issue-19552.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0597]: `line` does not live long enough - --> $DIR/regions-pattern-typing-issue-19552.rs:5:14 - | -LL | match [&*line] { - | ^^^^ borrowed value does not live long enough -LL | [ word ] => { assert_static(word); } - | ------------------- argument requires that `line` is borrowed for `'static` -LL | } -LL | } - | - `line` dropped here while still borrowed - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/regions/regions-pattern-typing-issue-19552.stderr b/src/test/ui/regions/regions-pattern-typing-issue-19552.stderr index 3e3201db24..f77d94a24b 100644 --- a/src/test/ui/regions/regions-pattern-typing-issue-19552.stderr +++ b/src/test/ui/regions/regions-pattern-typing-issue-19552.stderr @@ -3,11 +3,11 @@ error[E0597]: `line` does not live long enough | LL | match [&*line] { | ^^^^ borrowed value does not live long enough -... +LL | [ word ] => { assert_static(word); } + | ------------------- argument requires that `line` is borrowed for `'static` +LL | } LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - `line` dropped here while still borrowed error: aborting due to previous error diff --git a/src/test/ui/regions/regions-pattern-typing-issue-19997.ast.stderr b/src/test/ui/regions/regions-pattern-typing-issue-19997.ast.stderr deleted file mode 100644 index 0074d2b4f7..0000000000 --- a/src/test/ui/regions/regions-pattern-typing-issue-19997.ast.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0506]: cannot assign to `a1` because it is borrowed - --> $DIR/regions-pattern-typing-issue-19997.rs:10:13 - | -LL | match (&a1,) { - | -- borrow of `a1` occurs here -LL | (&ref b0,) => { -LL | a1 = &f; - | ^^^^^^^ assignment to borrowed `a1` occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/regions/regions-pattern-typing-issue-19997.mir.stderr b/src/test/ui/regions/regions-pattern-typing-issue-19997.mir.stderr deleted file mode 100644 index b1c5878224..0000000000 --- a/src/test/ui/regions/regions-pattern-typing-issue-19997.mir.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0506]: cannot assign to `a1` because it is borrowed - --> $DIR/regions-pattern-typing-issue-19997.rs:10:13 - | -LL | match (&a1,) { - | --- borrow of `a1` occurs here -LL | (&ref b0,) => { -LL | a1 = &f; - | ^^^^^^^ assignment to borrowed `a1` occurs here -LL | -LL | drop(b0); - | -- borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0506`. diff --git a/src/test/ui/regions/regions-pattern-typing-issue-19997.rs b/src/test/ui/regions/regions-pattern-typing-issue-19997.rs index 35f38af0cf..39190697fe 100644 --- a/src/test/ui/regions/regions-pattern-typing-issue-19997.rs +++ b/src/test/ui/regions/regions-pattern-typing-issue-19997.rs @@ -1,14 +1,10 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - fn main() { let a0 = 0; let f = 1; let mut a1 = &a0; match (&a1,) { (&ref b0,) => { - a1 = &f; //[ast]~ ERROR cannot assign - //[mir]~^ ERROR cannot assign to `a1` because it is borrowed + a1 = &f; //~ ERROR cannot assign to `a1` because it is borrowed drop(b0); } } diff --git a/src/test/ui/regions/regions-pattern-typing-issue-19997.ast.nll.stderr b/src/test/ui/regions/regions-pattern-typing-issue-19997.stderr similarity index 87% rename from src/test/ui/regions/regions-pattern-typing-issue-19997.ast.nll.stderr rename to src/test/ui/regions/regions-pattern-typing-issue-19997.stderr index b1c5878224..ae60e3c0d5 100644 --- a/src/test/ui/regions/regions-pattern-typing-issue-19997.ast.nll.stderr +++ b/src/test/ui/regions/regions-pattern-typing-issue-19997.stderr @@ -1,12 +1,11 @@ error[E0506]: cannot assign to `a1` because it is borrowed - --> $DIR/regions-pattern-typing-issue-19997.rs:10:13 + --> $DIR/regions-pattern-typing-issue-19997.rs:7:13 | LL | match (&a1,) { | --- borrow of `a1` occurs here LL | (&ref b0,) => { LL | a1 = &f; | ^^^^^^^ assignment to borrowed `a1` occurs here -LL | LL | drop(b0); | -- borrow later used here diff --git a/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.nll.stderr b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.nll.stderr new file mode 100644 index 0000000000..c8582f8bfe --- /dev/null +++ b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/regions-reborrow-from-shorter-mut-ref-mut-ref.rs:4:5 + | +LL | fn copy_borrowed_ptr<'a, 'b, 'c>(p: &'a mut &'b mut &'c mut isize) -> &'b mut isize { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | &mut ***p + | ^^^^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.stderr b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.stderr index aca3a1ed05..ead448df93 100644 --- a/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.stderr +++ b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.stderr @@ -10,4 +10,3 @@ LL | &mut ***p error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref.nll.stderr b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref.nll.stderr new file mode 100644 index 0000000000..5946e7bf84 --- /dev/null +++ b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/regions-reborrow-from-shorter-mut-ref.rs:6:5 + | +LL | fn copy_borrowed_ptr<'a, 'b>(p: &'a mut &'b mut isize) -> &'b mut isize { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | &mut **p + | ^^^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref.stderr b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref.stderr index a9916dbe4f..064e89ee00 100644 --- a/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref.stderr +++ b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref.stderr @@ -10,4 +10,3 @@ LL | &mut **p error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/regions/regions-ref-in-fn-arg.nll.stderr b/src/test/ui/regions/regions-ref-in-fn-arg.nll.stderr deleted file mode 100644 index ccba6c59b6..0000000000 --- a/src/test/ui/regions/regions-ref-in-fn-arg.nll.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0515]: cannot return value referencing function parameter - --> $DIR/regions-ref-in-fn-arg.rs:5:5 - | -LL | fn arg_item(box ref x: Box) -> &'static isize { - | --------- function parameter borrowed here -LL | x - | ^ returns a value referencing data owned by the current function - -error[E0515]: cannot return value referencing function parameter - --> $DIR/regions-ref-in-fn-arg.rs:11:22 - | -LL | with(|box ref x| x) - | --------- ^ returns a value referencing data owned by the current function - | | - | function parameter borrowed here - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-ref-in-fn-arg.rs b/src/test/ui/regions/regions-ref-in-fn-arg.rs index cf9e7b27ed..d1cbd279b6 100644 --- a/src/test/ui/regions/regions-ref-in-fn-arg.rs +++ b/src/test/ui/regions/regions-ref-in-fn-arg.rs @@ -2,13 +2,13 @@ #![feature(box_syntax)] fn arg_item(box ref x: Box) -> &'static isize { - x //~^ ERROR borrowed value does not live long enough + x //~ ERROR cannot return value referencing function parameter } fn with(f: F) -> R where F: FnOnce(Box) -> R { f(box 3) } fn arg_closure() -> &'static isize { - with(|box ref x| x) //~ ERROR borrowed value does not live long enough + with(|box ref x| x) //~ ERROR cannot return value referencing function parameter } fn main() {} diff --git a/src/test/ui/regions/regions-ref-in-fn-arg.stderr b/src/test/ui/regions/regions-ref-in-fn-arg.stderr index 9ecd327510..ccba6c59b6 100644 --- a/src/test/ui/regions/regions-ref-in-fn-arg.stderr +++ b/src/test/ui/regions/regions-ref-in-fn-arg.stderr @@ -1,24 +1,19 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/regions-ref-in-fn-arg.rs:4:17 +error[E0515]: cannot return value referencing function parameter + --> $DIR/regions-ref-in-fn-arg.rs:5:5 | LL | fn arg_item(box ref x: Box) -> &'static isize { - | ^^^^^ borrowed value does not live long enough + | --------- function parameter borrowed here LL | x -LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | ^ returns a value referencing data owned by the current function -error[E0597]: borrowed value does not live long enough - --> $DIR/regions-ref-in-fn-arg.rs:11:15 +error[E0515]: cannot return value referencing function parameter + --> $DIR/regions-ref-in-fn-arg.rs:11:22 | LL | with(|box ref x| x) - | ^^^^^ - borrowed value only lives until here - | | - | borrowed value does not live long enough - | - = note: borrowed value must be valid for the static lifetime... + | --------- ^ returns a value referencing data owned by the current function + | | + | function parameter borrowed here error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-ret-borrowed-1.nll.stderr b/src/test/ui/regions/regions-ret-borrowed-1.nll.stderr new file mode 100644 index 0000000000..0784e894ea --- /dev/null +++ b/src/test/ui/regions/regions-ret-borrowed-1.nll.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/regions-ret-borrowed-1.rs:10:14 + | +LL | with(|o| o) + | -- ^ returning this value requires that `'1` must outlive `'2` + | || + | |return type of closure is &'2 isize + | has type `&'1 isize` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-ret-borrowed-1.stderr b/src/test/ui/regions/regions-ret-borrowed-1.stderr index 72e47cea09..403af2a9e6 100644 --- a/src/test/ui/regions/regions-ret-borrowed-1.stderr +++ b/src/test/ui/regions/regions-ret-borrowed-1.stderr @@ -25,4 +25,3 @@ LL | with(|o| o) error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/regions/regions-ret-borrowed.nll.stderr b/src/test/ui/regions/regions-ret-borrowed.nll.stderr new file mode 100644 index 0000000000..d9be5ef89c --- /dev/null +++ b/src/test/ui/regions/regions-ret-borrowed.nll.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/regions-ret-borrowed.rs:13:14 + | +LL | with(|o| o) + | -- ^ returning this value requires that `'1` must outlive `'2` + | || + | |return type of closure is &'2 isize + | has type `&'1 isize` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-ret-borrowed.stderr b/src/test/ui/regions/regions-ret-borrowed.stderr index ce0c429ccb..5d1f26da6c 100644 --- a/src/test/ui/regions/regions-ret-borrowed.stderr +++ b/src/test/ui/regions/regions-ret-borrowed.stderr @@ -25,4 +25,3 @@ LL | with(|o| o) error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/regions/regions-ret.nll.stderr b/src/test/ui/regions/regions-ret.nll.stderr deleted file mode 100644 index 0e4875ac98..0000000000 --- a/src/test/ui/regions/regions-ret.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0515]: cannot return reference to temporary value - --> $DIR/regions-ret.rs:4:12 - | -LL | return &id(3); - | ^----- - | || - | |temporary value created here - | returns a reference to data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-ret.rs b/src/test/ui/regions/regions-ret.rs index a094d1af5b..580545ef85 100644 --- a/src/test/ui/regions/regions-ret.rs +++ b/src/test/ui/regions/regions-ret.rs @@ -1,7 +1,7 @@ fn id(x: T) -> T { x } fn f(_x: &isize) -> &isize { - return &id(3); //~ ERROR borrowed value does not live long enough + return &id(3); //~ ERROR cannot return reference to temporary value } fn main() { diff --git a/src/test/ui/regions/regions-ret.stderr b/src/test/ui/regions/regions-ret.stderr index 77820a34e4..0e4875ac98 100644 --- a/src/test/ui/regions/regions-ret.stderr +++ b/src/test/ui/regions/regions-ret.stderr @@ -1,20 +1,12 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/regions-ret.rs:4:13 +error[E0515]: cannot return reference to temporary value + --> $DIR/regions-ret.rs:4:12 | LL | return &id(3); - | ^^^^^- temporary value only lives until here - | | - | temporary value does not live long enough - | -note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 3:1... - --> $DIR/regions-ret.rs:3:1 - | -LL | / fn f(_x: &isize) -> &isize { -LL | | return &id(3); -LL | | } - | |_^ - = note: consider using a `let` binding to increase its lifetime + | ^----- + | || + | |temporary value created here + | returns a reference to data owned by the current function error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-return-ref-to-upvar-issue-17403.nll.stderr b/src/test/ui/regions/regions-return-ref-to-upvar-issue-17403.nll.stderr new file mode 100644 index 0000000000..4c275b1949 --- /dev/null +++ b/src/test/ui/regions/regions-return-ref-to-upvar-issue-17403.nll.stderr @@ -0,0 +1,13 @@ +error: captured variable cannot escape `FnMut` closure body + --> $DIR/regions-return-ref-to-upvar-issue-17403.rs:7:24 + | +LL | let mut f = || &mut x; + | - ^^^^^^ returns a reference to a captured variable which escapes the closure body + | | + | inferred to be a `FnMut` closure + | + = note: `FnMut` closures only have access to their captured variables while they are executing... + = note: ...therefore, they cannot allow references to captured variables to escape + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-return-ref-to-upvar-issue-17403.stderr b/src/test/ui/regions/regions-return-ref-to-upvar-issue-17403.stderr index be441bc480..291b8367f7 100644 --- a/src/test/ui/regions/regions-return-ref-to-upvar-issue-17403.stderr +++ b/src/test/ui/regions/regions-return-ref-to-upvar-issue-17403.stderr @@ -27,4 +27,3 @@ LL | let y = f(); error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/regions/regions-return-stack-allocated-vec.nll.stderr b/src/test/ui/regions/regions-return-stack-allocated-vec.nll.stderr deleted file mode 100644 index 9d87fe266b..0000000000 --- a/src/test/ui/regions/regions-return-stack-allocated-vec.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0515]: cannot return reference to temporary value - --> $DIR/regions-return-stack-allocated-vec.rs:4:5 - | -LL | &[x] - | ^--- - | || - | |temporary value created here - | returns a reference to data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-return-stack-allocated-vec.rs b/src/test/ui/regions/regions-return-stack-allocated-vec.rs index 8d071dbc60..97fbdbf468 100644 --- a/src/test/ui/regions/regions-return-stack-allocated-vec.rs +++ b/src/test/ui/regions/regions-return-stack-allocated-vec.rs @@ -1,7 +1,7 @@ // Test that we cannot return a stack allocated slice fn function(x: isize) -> &'static [isize] { - &[x] //~ ERROR borrowed value does not live long enough + &[x] //~ ERROR cannot return reference to temporary value } fn main() { diff --git a/src/test/ui/regions/regions-return-stack-allocated-vec.stderr b/src/test/ui/regions/regions-return-stack-allocated-vec.stderr index 3256294473..9d87fe266b 100644 --- a/src/test/ui/regions/regions-return-stack-allocated-vec.stderr +++ b/src/test/ui/regions/regions-return-stack-allocated-vec.stderr @@ -1,13 +1,12 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/regions-return-stack-allocated-vec.rs:4:6 +error[E0515]: cannot return reference to temporary value + --> $DIR/regions-return-stack-allocated-vec.rs:4:5 | LL | &[x] - | ^^^ temporary value does not live long enough -LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | ^--- + | || + | |temporary value created here + | returns a reference to data owned by the current function error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-static-bound.ll.nll.stderr b/src/test/ui/regions/regions-static-bound.ll.nll.stderr new file mode 100644 index 0000000000..d6cec03e0f --- /dev/null +++ b/src/test/ui/regions/regions-static-bound.ll.nll.stderr @@ -0,0 +1,28 @@ +error: lifetime may not live long enough + --> $DIR/regions-static-bound.rs:9:5 + | +LL | fn static_id_wrong_way<'a>(t: &'a ()) -> &'static () where 'static: 'a { + | -- lifetime `'a` defined here +LL | t //[ll]~ ERROR E0312 + | ^ returning this value requires that `'a` must outlive `'static` + +error[E0621]: explicit lifetime required in the type of `u` + --> $DIR/regions-static-bound.rs:14:5 + | +LL | fn error(u: &(), v: &()) { + | --- help: add explicit lifetime `'static` to the type of `u`: `&'static ()` +LL | static_id(&u); //[ll]~ ERROR explicit lifetime required in the type of `u` [E0621] + | ^^^^^^^^^^^^^ lifetime `'static` required + +error[E0621]: explicit lifetime required in the type of `v` + --> $DIR/regions-static-bound.rs:16:5 + | +LL | fn error(u: &(), v: &()) { + | --- help: add explicit lifetime `'static` to the type of `v`: `&'static ()` +... +LL | static_id_indirect(&v); //[ll]~ ERROR explicit lifetime required in the type of `v` [E0621] + | ^^^^^^^^^^^^^^^^^^^^^^ lifetime `'static` required + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/regions/regions-static-bound.migrate.nll.stderr b/src/test/ui/regions/regions-static-bound.migrate.nll.stderr new file mode 100644 index 0000000000..b5f3e6cfab --- /dev/null +++ b/src/test/ui/regions/regions-static-bound.migrate.nll.stderr @@ -0,0 +1,28 @@ +error: lifetime may not live long enough + --> $DIR/regions-static-bound.rs:9:5 + | +LL | fn static_id_wrong_way<'a>(t: &'a ()) -> &'static () where 'static: 'a { + | -- lifetime `'a` defined here +LL | t + | ^ returning this value requires that `'a` must outlive `'static` + +error[E0621]: explicit lifetime required in the type of `u` + --> $DIR/regions-static-bound.rs:14:5 + | +LL | fn error(u: &(), v: &()) { + | --- help: add explicit lifetime `'static` to the type of `u`: `&'static ()` +LL | static_id(&u); + | ^^^^^^^^^^^^^ lifetime `'static` required + +error[E0621]: explicit lifetime required in the type of `v` + --> $DIR/regions-static-bound.rs:16:5 + | +LL | fn error(u: &(), v: &()) { + | --- help: add explicit lifetime `'static` to the type of `v`: `&'static ()` +... +LL | static_id_indirect(&v); + | ^^^^^^^^^^^^^^^^^^^^^^ lifetime `'static` required + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/regions/regions-static-bound.ll.stderr b/src/test/ui/regions/regions-static-bound.migrate.stderr similarity index 91% rename from src/test/ui/regions/regions-static-bound.ll.stderr rename to src/test/ui/regions/regions-static-bound.migrate.stderr index d0dc554b6f..fc8cca929d 100644 --- a/src/test/ui/regions/regions-static-bound.ll.stderr +++ b/src/test/ui/regions/regions-static-bound.migrate.stderr @@ -30,5 +30,4 @@ LL | static_id_indirect(&v); error: aborting due to 3 previous errors -Some errors occurred: E0312, E0621. -For more information about an error, try `rustc --explain E0312`. +For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/regions/regions-static-bound.rs b/src/test/ui/regions/regions-static-bound.rs index c1a15e50a4..1db54881d3 100644 --- a/src/test/ui/regions/regions-static-bound.rs +++ b/src/test/ui/regions/regions-static-bound.rs @@ -1,4 +1,4 @@ -// revisions: ll nll +// revisions: migrate nll //[nll] compile-flags:-Zborrowck=mir fn static_id<'a,'b>(t: &'a ()) -> &'static () @@ -6,14 +6,14 @@ fn static_id<'a,'b>(t: &'a ()) -> &'static () fn static_id_indirect<'a,'b>(t: &'a ()) -> &'static () where 'a: 'b, 'b: 'static { t } fn static_id_wrong_way<'a>(t: &'a ()) -> &'static () where 'static: 'a { - t //[ll]~ ERROR E0312 + t //[migrate]~ ERROR E0312 //[nll]~^ ERROR lifetime may not live long enough } fn error(u: &(), v: &()) { - static_id(&u); //[ll]~ ERROR explicit lifetime required in the type of `u` [E0621] + static_id(&u); //[migrate]~ ERROR explicit lifetime required in the type of `u` [E0621] //[nll]~^ ERROR explicit lifetime required in the type of `u` [E0621] - static_id_indirect(&v); //[ll]~ ERROR explicit lifetime required in the type of `v` [E0621] + static_id_indirect(&v); //[migrate]~ ERROR explicit lifetime required in the type of `v` [E0621] //[nll]~^ ERROR explicit lifetime required in the type of `v` [E0621] } diff --git a/src/test/ui/regions/regions-steal-closure.nll.stderr b/src/test/ui/regions/regions-steal-closure.nll.stderr deleted file mode 100644 index 5b0efaf955..0000000000 --- a/src/test/ui/regions/regions-steal-closure.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0597]: `i` does not live long enough - --> $DIR/regions-steal-closure.rs:14:28 - | -LL | let mut cl_box = { - | ---------- borrow later stored here -LL | let mut i = 3; -LL | box_it(Box::new(|| i += 1)) - | -- ^ borrowed value does not live long enough - | | - | value captured here -LL | }; - | - `i` dropped here while still borrowed - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/regions/regions-steal-closure.stderr b/src/test/ui/regions/regions-steal-closure.stderr index 8cfd5b5031..5b0efaf955 100644 --- a/src/test/ui/regions/regions-steal-closure.stderr +++ b/src/test/ui/regions/regions-steal-closure.stderr @@ -1,15 +1,15 @@ error[E0597]: `i` does not live long enough --> $DIR/regions-steal-closure.rs:14:28 | +LL | let mut cl_box = { + | ---------- borrow later stored here +LL | let mut i = 3; LL | box_it(Box::new(|| i += 1)) | -- ^ borrowed value does not live long enough | | - | capture occurs here + | value captured here LL | }; - | - borrowed value only lives until here -LL | cl_box.cl.call_mut(()); -LL | } - | - borrowed value needs to live until here + | - `i` dropped here while still borrowed error: aborting due to previous error diff --git a/src/test/ui/regions/regions-trait-object-subtyping.nll.stderr b/src/test/ui/regions/regions-trait-object-subtyping.nll.stderr new file mode 100644 index 0000000000..eccf1b5e8c --- /dev/null +++ b/src/test/ui/regions/regions-trait-object-subtyping.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/regions-trait-object-subtyping.rs:15:5 + | +LL | fn foo3<'a,'b>(x: &'a mut Dummy) -> &'b mut Dummy { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | // Without knowing 'a:'b, we can't coerce +LL | x + | ^ returning this value requires that `'a` must outlive `'b` + +error: lifetime may not live long enough + --> $DIR/regions-trait-object-subtyping.rs:22:5 + | +LL | fn foo4<'a:'b,'b>(x: Wrapper<&'a mut Dummy>) -> Wrapper<&'b mut Dummy> { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | // We can't coerce because it is packed in `Wrapper` +LL | x + | ^ returning this value requires that `'b` must outlive `'a` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/regions/regions-trait-object-subtyping.stderr b/src/test/ui/regions/regions-trait-object-subtyping.stderr index 3b30ddd16c..f2d2b37d90 100644 --- a/src/test/ui/regions/regions-trait-object-subtyping.stderr +++ b/src/test/ui/regions/regions-trait-object-subtyping.stderr @@ -61,5 +61,5 @@ LL | fn foo4<'a:'b,'b>(x: Wrapper<&'a mut Dummy>) -> Wrapper<&'b mut Dummy> { error: aborting due to 3 previous errors -Some errors occurred: E0308, E0478, E0495. +Some errors have detailed explanations: E0308, E0478. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/regions/regions-trait-variance.nll.stderr b/src/test/ui/regions/regions-trait-variance.nll.stderr deleted file mode 100644 index 56c9f89e1f..0000000000 --- a/src/test/ui/regions/regions-trait-variance.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0515]: cannot return value referencing local data `*b` - --> $DIR/regions-trait-variance.rs:38:5 - | -LL | let bb: &B = &*b; - | --- `*b` is borrowed here -LL | make_a(bb) - | ^^^^^^^^^^ returns a value referencing data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-trait-variance.rs b/src/test/ui/regions/regions-trait-variance.rs index d5462b21fa..73baa84ec9 100644 --- a/src/test/ui/regions/regions-trait-variance.rs +++ b/src/test/ui/regions/regions-trait-variance.rs @@ -34,8 +34,8 @@ fn make_make_a<'a>() -> A<'a> { let b: Box = box B { i: 1, }; - let bb: &B = &*b; //~ ERROR `*b` does not live long enough - make_a(bb) + let bb: &B = &*b; + make_a(bb) //~ ERROR cannot return value referencing local data `*b` } fn main() { diff --git a/src/test/ui/regions/regions-trait-variance.stderr b/src/test/ui/regions/regions-trait-variance.stderr index 32c89b8eef..56c9f89e1f 100644 --- a/src/test/ui/regions/regions-trait-variance.stderr +++ b/src/test/ui/regions/regions-trait-variance.stderr @@ -1,18 +1,11 @@ -error[E0597]: `*b` does not live long enough - --> $DIR/regions-trait-variance.rs:37:19 +error[E0515]: cannot return value referencing local data `*b` + --> $DIR/regions-trait-variance.rs:38:5 | LL | let bb: &B = &*b; - | ^^ borrowed value does not live long enough + | --- `*b` is borrowed here LL | make_a(bb) -LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the lifetime 'a as defined on the function body at 33:16... - --> $DIR/regions-trait-variance.rs:33:16 - | -LL | fn make_make_a<'a>() -> A<'a> { - | ^^ + | ^^^^^^^^^^ returns a value referencing data owned by the current function error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/regions/regions-var-type-out-of-scope.nll.stderr b/src/test/ui/regions/regions-var-type-out-of-scope.nll.stderr deleted file mode 100644 index 146fb8fd81..0000000000 --- a/src/test/ui/regions/regions-var-type-out-of-scope.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/regions-var-type-out-of-scope.rs:9:14 - | -LL | x = &id(3); - | ^^^^^- temporary value is freed at the end of this statement - | | - | creates a temporary which is freed while still in use -LL | assert_eq!(*x, 3); - | ------------------ borrow later used here - | - = note: consider using a `let` binding to create a longer lived value - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/regions/regions-var-type-out-of-scope.rs b/src/test/ui/regions/regions-var-type-out-of-scope.rs index e972163097..aba55e9df6 100644 --- a/src/test/ui/regions/regions-var-type-out-of-scope.rs +++ b/src/test/ui/regions/regions-var-type-out-of-scope.rs @@ -6,7 +6,7 @@ fn foo(cond: bool) { let mut x; if cond { - x = &id(3); //~ ERROR borrowed value does not live long enough + x = &id(3); //~ ERROR temporary value dropped while borrowed assert_eq!(*x, 3); } } diff --git a/src/test/ui/regions/regions-var-type-out-of-scope.stderr b/src/test/ui/regions/regions-var-type-out-of-scope.stderr index 0363fe0d19..146fb8fd81 100644 --- a/src/test/ui/regions/regions-var-type-out-of-scope.stderr +++ b/src/test/ui/regions/regions-var-type-out-of-scope.stderr @@ -1,16 +1,16 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/regions-var-type-out-of-scope.rs:9:14 | LL | x = &id(3); - | ^^^^^- temporary value dropped here while still borrowed + | ^^^^^- temporary value is freed at the end of this statement | | - | temporary value does not live long enough -... -LL | } - | - temporary value needs to live until here + | creates a temporary which is freed while still in use +LL | assert_eq!(*x, 3); + | ------------------ borrow later used here | - = note: consider using a `let` binding to increase its lifetime + = note: consider using a `let` binding to create a longer lived value + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.nll.stderr b/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.nll.stderr new file mode 100644 index 0000000000..f5b96f314c --- /dev/null +++ b/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/regions-variance-contravariant-use-covariant-in-second-position.rs:25:12 + | +LL | fn use_<'short,'long>(c: S<'long, 'short>, + | ------ ----- lifetime `'long` defined here + | | + | lifetime `'short` defined here +... +LL | let _: S<'long, 'long> = c; + | ^^^^^^^^^^^^^^^ type annotation requires that `'short` must outlive `'long` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr b/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr index e135007604..6b3a488805 100644 --- a/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr +++ b/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr @@ -2,13 +2,10 @@ error[E0623]: lifetime mismatch --> $DIR/regions-variance-contravariant-use-covariant-in-second-position.rs:25:30 | LL | fn use_<'short,'long>(c: S<'long, 'short>, - | ---------------- - | | - | this type is declared with multiple lifetimes... + | ---------------- this type is declared with multiple lifetimes... ... LL | let _: S<'long, 'long> = c; | ^ ...but data with one lifetime flows into the other here error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/regions/regions-variance-contravariant-use-covariant.nll.stderr b/src/test/ui/regions/regions-variance-contravariant-use-covariant.nll.stderr new file mode 100644 index 0000000000..372510a2f7 --- /dev/null +++ b/src/test/ui/regions/regions-variance-contravariant-use-covariant.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/regions-variance-contravariant-use-covariant.rs:23:12 + | +LL | fn use_<'short,'long>(c: Contravariant<'short>, + | ------ ----- lifetime `'long` defined here + | | + | lifetime `'short` defined here +... +LL | let _: Contravariant<'long> = c; + | ^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'short` must outlive `'long` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-variance-contravariant-use-covariant.stderr b/src/test/ui/regions/regions-variance-contravariant-use-covariant.stderr index e7c106cbbe..4419988144 100644 --- a/src/test/ui/regions/regions-variance-contravariant-use-covariant.stderr +++ b/src/test/ui/regions/regions-variance-contravariant-use-covariant.stderr @@ -12,4 +12,3 @@ LL | let _: Contravariant<'long> = c; error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/regions/regions-variance-covariant-use-contravariant.nll.stderr b/src/test/ui/regions/regions-variance-covariant-use-contravariant.nll.stderr new file mode 100644 index 0000000000..e87e914727 --- /dev/null +++ b/src/test/ui/regions/regions-variance-covariant-use-contravariant.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/regions-variance-covariant-use-contravariant.rs:23:12 + | +LL | fn use_<'short,'long>(c: Covariant<'long>, + | ------ ----- lifetime `'long` defined here + | | + | lifetime `'short` defined here +... +LL | let _: Covariant<'short> = c; + | ^^^^^^^^^^^^^^^^^ type annotation requires that `'short` must outlive `'long` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr b/src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr index e5e5261ba9..22ba883889 100644 --- a/src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr +++ b/src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr @@ -11,4 +11,3 @@ LL | let _: Covariant<'short> = c; error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/regions/regions-variance-invariant-use-contravariant.nll.stderr b/src/test/ui/regions/regions-variance-invariant-use-contravariant.nll.stderr new file mode 100644 index 0000000000..adee33bfc7 --- /dev/null +++ b/src/test/ui/regions/regions-variance-invariant-use-contravariant.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/regions-variance-invariant-use-contravariant.rs:20:12 + | +LL | fn use_<'short,'long>(c: Invariant<'long>, + | ------ ----- lifetime `'long` defined here + | | + | lifetime `'short` defined here +... +LL | let _: Invariant<'short> = c; + | ^^^^^^^^^^^^^^^^^ type annotation requires that `'short` must outlive `'long` + +error: aborting due to previous error + diff --git a/src/test/ui/regions/regions-variance-invariant-use-contravariant.stderr b/src/test/ui/regions/regions-variance-invariant-use-contravariant.stderr index 2a2d5d019a..a779b485ea 100644 --- a/src/test/ui/regions/regions-variance-invariant-use-contravariant.stderr +++ b/src/test/ui/regions/regions-variance-invariant-use-contravariant.stderr @@ -11,4 +11,3 @@ LL | let _: Invariant<'short> = c; error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/regions/regions-variance-invariant-use-covariant.nll.stderr b/src/test/ui/regions/regions-variance-invariant-use-covariant.nll.stderr new file mode 100644 index 0000000000..15853e6ca5 --- /dev/null +++ b/src/test/ui/regions/regions-variance-invariant-use-covariant.nll.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/regions-variance-invariant-use-covariant.rs:17:12 + | +LL | fn use_<'b>(c: Invariant<'b>) { + | -- lifetime `'b` defined here +... +LL | let _: Invariant<'static> = c; + | ^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/reject-specialized-drops-8142.stderr b/src/test/ui/reject-specialized-drops-8142.stderr index 7dacc1f274..08aca3bb14 100644 --- a/src/test/ui/reject-specialized-drops-8142.stderr +++ b/src/test/ui/reject-specialized-drops-8142.stderr @@ -111,5 +111,5 @@ LL | struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 } error: aborting due to 8 previous errors -Some errors occurred: E0308, E0366, E0367, E0495. +Some errors have detailed explanations: E0308, E0366, E0367. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/repeat_count.stderr b/src/test/ui/repeat_count.stderr index df3227bfcd..df73ac0b18 100644 --- a/src/test/ui/repeat_count.stderr +++ b/src/test/ui/repeat_count.stderr @@ -42,12 +42,20 @@ error[E0308]: mismatched types | LL | let f = [0; -4_isize]; | ^^^^^^^^ expected usize, found isize +help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit + | +LL | let f = [0; (-4_isize).try_into().unwrap()]; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/repeat_count.rs:28:23 | LL | let f = [0_usize; -1_isize]; | ^^^^^^^^ expected usize, found isize +help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit + | +LL | let f = [0_usize; (-1_isize).try_into().unwrap()]; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/repeat_count.rs:34:17 @@ -60,5 +68,5 @@ LL | let g = [0; G { g: () }]; error: aborting due to 8 previous errors -Some errors occurred: E0308, E0435. +Some errors have detailed explanations: E0308, E0435. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/repr/repr-align-assign.stderr b/src/test/ui/repr/repr-align-assign.stderr index cc046e04de..177bd81e8f 100644 --- a/src/test/ui/repr/repr-align-assign.stderr +++ b/src/test/ui/repr/repr-align-assign.stderr @@ -12,4 +12,3 @@ LL | #[repr(align="8")] error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0693`. diff --git a/src/test/ui/repr/repr-packed-contains-align.stderr b/src/test/ui/repr/repr-packed-contains-align.stderr index df001d6b5f..219516d8ab 100644 --- a/src/test/ui/repr/repr-packed-contains-align.stderr +++ b/src/test/ui/repr/repr-packed-contains-align.stderr @@ -56,4 +56,3 @@ LL | | } error: aborting due to 8 previous errors -For more information about this error, try `rustc --explain E0588`. diff --git a/src/test/ui/repr/repr-transparent-other-items.stderr b/src/test/ui/repr/repr-transparent-other-items.stderr index c3fb1d9e21..24fa309a2f 100644 --- a/src/test/ui/repr/repr-transparent-other-items.stderr +++ b/src/test/ui/repr/repr-transparent-other-items.stderr @@ -65,5 +65,5 @@ LL | enum Void {} error: aborting due to 7 previous errors -Some errors occurred: E0084, E0517. +Some errors have detailed explanations: E0084, E0517. For more information about an error, try `rustc --explain E0084`. diff --git a/src/test/ui/repr/repr-transparent.stderr b/src/test/ui/repr/repr-transparent.stderr index 2ecee838be..2542a842fe 100644 --- a/src/test/ui/repr/repr-transparent.stderr +++ b/src/test/ui/repr/repr-transparent.stderr @@ -68,5 +68,5 @@ LL | struct GenericAlign(ZstAlign32, u32); error: aborting due to 8 previous errors -Some errors occurred: E0690, E0691. +Some errors have detailed explanations: E0690, E0691. For more information about an error, try `rustc --explain E0690`. diff --git a/src/test/ui/reserved/reserved-attr-on-macro.stderr b/src/test/ui/reserved/reserved-attr-on-macro.stderr index 3e082e53ca..c8738d1ed3 100644 --- a/src/test/ui/reserved/reserved-attr-on-macro.stderr +++ b/src/test/ui/reserved/reserved-attr-on-macro.stderr @@ -1,9 +1,10 @@ -error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics (see issue #29642) +error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics --> $DIR/reserved-attr-on-macro.rs:1:3 | LL | #[rustc_attribute_should_be_reserved] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(rustc_attrs)] to the crate attributes to enable error: cannot determine resolution for the macro `foo` diff --git a/src/test/ui/resolve/enums-are-namespaced-xc.stderr b/src/test/ui/resolve/enums-are-namespaced-xc.stderr index a0771ed9dc..3e812c2694 100644 --- a/src/test/ui/resolve/enums-are-namespaced-xc.stderr +++ b/src/test/ui/resolve/enums-are-namespaced-xc.stderr @@ -30,5 +30,5 @@ LL | use namespaced_enums::Foo::C; error: aborting due to 3 previous errors -Some errors occurred: E0422, E0425. +Some errors have detailed explanations: E0422, E0425. For more information about an error, try `rustc --explain E0422`. diff --git a/src/test/ui/resolve/issue-14254.stderr b/src/test/ui/resolve/issue-14254.stderr index 783b3addfc..97d42aa8ef 100644 --- a/src/test/ui/resolve/issue-14254.stderr +++ b/src/test/ui/resolve/issue-14254.stderr @@ -20,13 +20,13 @@ error[E0425]: cannot find value `x` in this scope --> $DIR/issue-14254.rs:30:9 | LL | x; - | ^ help: try: `self.x` + | ^ help: you might have meant to use the available field: `self.x` error[E0425]: cannot find value `y` in this scope --> $DIR/issue-14254.rs:32:9 | LL | y; - | ^ help: try: `self.y` + | ^ help: you might have meant to use the available field: `self.y` error[E0425]: cannot find value `a` in this scope --> $DIR/issue-14254.rs:34:9 @@ -56,13 +56,13 @@ error[E0425]: cannot find value `x` in this scope --> $DIR/issue-14254.rs:47:9 | LL | x; - | ^ help: try: `self.x` + | ^ help: you might have meant to use the available field: `self.x` error[E0425]: cannot find value `y` in this scope --> $DIR/issue-14254.rs:49:9 | LL | y; - | ^ help: try: `self.y` + | ^ help: you might have meant to use the available field: `self.y` error[E0425]: cannot find value `a` in this scope --> $DIR/issue-14254.rs:51:9 diff --git a/src/test/ui/resolve/issue-16058.stderr b/src/test/ui/resolve/issue-16058.stderr index 9766f8f141..64177ac2a8 100644 --- a/src/test/ui/resolve/issue-16058.stderr +++ b/src/test/ui/resolve/issue-16058.stderr @@ -14,4 +14,3 @@ LL | use std::thread::Result; error: aborting due to previous error -For more information about this error, try `rustc --explain E0574`. diff --git a/src/test/ui/resolve/issue-21221-1.stderr b/src/test/ui/resolve/issue-21221-1.stderr index 925923f92b..d00d87393a 100644 --- a/src/test/ui/resolve/issue-21221-1.stderr +++ b/src/test/ui/resolve/issue-21221-1.stderr @@ -47,5 +47,5 @@ LL | use std::ops::Div; error: aborting due to 4 previous errors -Some errors occurred: E0405, E0412. +Some errors have detailed explanations: E0405, E0412. For more information about an error, try `rustc --explain E0405`. diff --git a/src/test/ui/resolve/issue-2356.stderr b/src/test/ui/resolve/issue-2356.stderr index fb4acaa141..7790383843 100644 --- a/src/test/ui/resolve/issue-2356.stderr +++ b/src/test/ui/resolve/issue-2356.stderr @@ -20,10 +20,7 @@ error[E0425]: cannot find value `whiskers` in this scope --> $DIR/issue-2356.rs:39:5 | LL | whiskers -= other; - | ^^^^^^^^ - | | - | `self` value is a keyword only available in methods with `self` parameter - | help: try: `self.whiskers` + | ^^^^^^^^ a field by this name exists in `Self` error[E0425]: cannot find function `shave` in this scope --> $DIR/issue-2356.rs:41:5 @@ -83,16 +80,13 @@ error[E0425]: cannot find value `whiskers` in this scope --> $DIR/issue-2356.rs:79:5 | LL | whiskers = 0; - | ^^^^^^^^ help: try: `self.whiskers` + | ^^^^^^^^ help: you might have meant to use the available field: `self.whiskers` error[E0425]: cannot find value `whiskers` in this scope --> $DIR/issue-2356.rs:84:5 | LL | whiskers = 4; - | ^^^^^^^^ - | | - | `self` value is a keyword only available in methods with `self` parameter - | help: try: `self.whiskers` + | ^^^^^^^^ a field by this name exists in `Self` error[E0425]: cannot find function `purr_louder` in this scope --> $DIR/issue-2356.rs:86:5 @@ -108,5 +102,5 @@ LL | self += 1; error: aborting due to 17 previous errors -Some errors occurred: E0424, E0425. +Some errors have detailed explanations: E0424, E0425. For more information about an error, try `rustc --explain E0424`. diff --git a/src/test/ui/resolve/issue-5035.stderr b/src/test/ui/resolve/issue-5035.stderr index 68d35f3b5f..96befdbe07 100644 --- a/src/test/ui/resolve/issue-5035.stderr +++ b/src/test/ui/resolve/issue-5035.stderr @@ -17,5 +17,5 @@ LL | impl K for isize {} error: aborting due to 2 previous errors -Some errors occurred: E0404, E0432. +Some errors have detailed explanations: E0404, E0432. For more information about an error, try `rustc --explain E0404`. diff --git a/src/test/ui/resolve/levenshtein.stderr b/src/test/ui/resolve/levenshtein.stderr index cddfe4e7ff..7af2cdf7b5 100644 --- a/src/test/ui/resolve/levenshtein.stderr +++ b/src/test/ui/resolve/levenshtein.stderr @@ -48,5 +48,5 @@ LL | let b: m::first = m::second; // Misspelled item in module. error: aborting due to 8 previous errors -Some errors occurred: E0412, E0425. +Some errors have detailed explanations: E0412, E0425. For more information about an error, try `rustc --explain E0412`. diff --git a/src/test/ui/resolve/privacy-enum-ctor.stderr b/src/test/ui/resolve/privacy-enum-ctor.stderr index 75d9c97513..a1a8714ab3 100644 --- a/src/test/ui/resolve/privacy-enum-ctor.stderr +++ b/src/test/ui/resolve/privacy-enum-ctor.stderr @@ -266,5 +266,5 @@ LL | let _: E = E::Unit; error: aborting due to 23 previous errors -Some errors occurred: E0308, E0412, E0423, E0603, E0618. +Some errors have detailed explanations: E0308, E0412, E0423, E0603, E0618. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/resolve/privacy-struct-ctor.stderr b/src/test/ui/resolve/privacy-struct-ctor.stderr index 519e74d9f6..9bf7d19117 100644 --- a/src/test/ui/resolve/privacy-struct-ctor.stderr +++ b/src/test/ui/resolve/privacy-struct-ctor.stderr @@ -67,5 +67,5 @@ LL | xcrate::m::n::Z; error: aborting due to 10 previous errors -Some errors occurred: E0423, E0603. +Some errors have detailed explanations: E0423, E0603. For more information about an error, try `rustc --explain E0423`. diff --git a/src/test/ui/resolve/resolve-assoc-suggestions.stderr b/src/test/ui/resolve/resolve-assoc-suggestions.stderr index f2e1d72e7a..87040015b8 100644 --- a/src/test/ui/resolve/resolve-assoc-suggestions.stderr +++ b/src/test/ui/resolve/resolve-assoc-suggestions.stderr @@ -14,7 +14,7 @@ error[E0425]: cannot find value `field` in this scope --> $DIR/resolve-assoc-suggestions.rs:20:9 | LL | field; - | ^^^^^ help: try: `self.field` + | ^^^^^ help: you might have meant to use the available field: `self.field` error[E0412]: cannot find type `Type` in this scope --> $DIR/resolve-assoc-suggestions.rs:23:16 @@ -54,5 +54,5 @@ LL | method; error: aborting due to 9 previous errors -Some errors occurred: E0412, E0425, E0531. +Some errors have detailed explanations: E0412, E0425. For more information about an error, try `rustc --explain E0412`. diff --git a/src/test/ui/resolve/resolve-bad-visibility.stderr b/src/test/ui/resolve/resolve-bad-visibility.stderr index 32b85f202f..b8004a48a6 100644 --- a/src/test/ui/resolve/resolve-bad-visibility.stderr +++ b/src/test/ui/resolve/resolve-bad-visibility.stderr @@ -30,5 +30,3 @@ LL | pub(in too_soon) struct H; error: aborting due to 5 previous errors -Some errors occurred: E0577, E0578. -For more information about an error, try `rustc --explain E0577`. diff --git a/src/test/ui/resolve/resolve-inconsistent-binding-mode.stderr b/src/test/ui/resolve/resolve-inconsistent-binding-mode.stderr index a14d3d67b1..6f660872f5 100644 --- a/src/test/ui/resolve/resolve-inconsistent-binding-mode.stderr +++ b/src/test/ui/resolve/resolve-inconsistent-binding-mode.stderr @@ -49,5 +49,5 @@ LL | Opts::A(ref mut i) | Opts::B(ref i) => {} error: aborting due to 6 previous errors -Some errors occurred: E0308, E0409. +Some errors have detailed explanations: E0308, E0409. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/resolve/resolve-primitive-fallback.stderr b/src/test/ui/resolve/resolve-primitive-fallback.stderr index 963bab4355..92c2a03298 100644 --- a/src/test/ui/resolve/resolve-primitive-fallback.stderr +++ b/src/test/ui/resolve/resolve-primitive-fallback.stderr @@ -18,5 +18,5 @@ LL | std::mem::size_of(u16); error: aborting due to 3 previous errors -Some errors occurred: E0061, E0412, E0423. +Some errors have detailed explanations: E0061, E0412, E0423. For more information about an error, try `rustc --explain E0061`. diff --git a/src/test/ui/resolve/resolve-self-in-impl-2.stderr b/src/test/ui/resolve/resolve-self-in-impl-2.stderr index 765f150ebc..3791fe90a6 100644 --- a/src/test/ui/resolve/resolve-self-in-impl-2.stderr +++ b/src/test/ui/resolve/resolve-self-in-impl-2.stderr @@ -12,5 +12,5 @@ LL | impl Self::N for S {} error: aborting due to 2 previous errors -Some errors occurred: E0405, E0411. +Some errors have detailed explanations: E0405, E0411. For more information about an error, try `rustc --explain E0405`. diff --git a/src/test/ui/resolve/resolve-speculative-adjustment.stderr b/src/test/ui/resolve/resolve-speculative-adjustment.stderr index c4a6ced1ca..892b50309a 100644 --- a/src/test/ui/resolve/resolve-speculative-adjustment.stderr +++ b/src/test/ui/resolve/resolve-speculative-adjustment.stderr @@ -14,7 +14,7 @@ error[E0425]: cannot find value `field` in this scope --> $DIR/resolve-speculative-adjustment.rs:23:9 | LL | field; - | ^^^^^ help: try: `self.field` + | ^^^^^ help: you might have meant to use the available field: `self.field` error[E0425]: cannot find function `method` in this scope --> $DIR/resolve-speculative-adjustment.rs:25:9 diff --git a/src/test/ui/resolve/resolve-type-param-in-item-in-trait.stderr b/src/test/ui/resolve/resolve-type-param-in-item-in-trait.stderr index f6b8abf405..10a703ee09 100644 --- a/src/test/ui/resolve/resolve-type-param-in-item-in-trait.stderr +++ b/src/test/ui/resolve/resolve-type-param-in-item-in-trait.stderr @@ -2,7 +2,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/resolve-type-param-in-item-in-trait.rs:8:22 | LL | trait TraitA { - | - type variable from outer function + | - type parameter from outer function LL | fn outer(&self) { | ----- try adding a local generic parameter in this method instead LL | enum Foo { @@ -13,7 +13,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/resolve-type-param-in-item-in-trait.rs:16:23 | LL | trait TraitB { - | - type variable from outer function + | - type parameter from outer function LL | fn outer(&self) { | ----- try adding a local generic parameter in this method instead LL | struct Foo(A); @@ -23,7 +23,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/resolve-type-param-in-item-in-trait.rs:23:28 | LL | trait TraitC { - | - type variable from outer function + | - type parameter from outer function LL | fn outer(&self) { | ----- try adding a local generic parameter in this method instead LL | struct Foo { a: A } @@ -33,7 +33,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/resolve-type-param-in-item-in-trait.rs:30:22 | LL | trait TraitD { - | - type variable from outer function + | - type parameter from outer function LL | fn outer(&self) { LL | fn foo(a: A) { } | ------ ^ use of generic parameter from outer function diff --git a/src/test/ui/resolve/resolve-variant-assoc-item.rs b/src/test/ui/resolve/resolve-variant-assoc-item.rs index f0f55c0c66..db4fedfb0b 100644 --- a/src/test/ui/resolve/resolve-variant-assoc-item.rs +++ b/src/test/ui/resolve/resolve-variant-assoc-item.rs @@ -2,6 +2,6 @@ enum E { V } use E::V; fn main() { - E::V::associated_item; //~ ERROR failed to resolve: not a module `V` - V::associated_item; //~ ERROR failed to resolve: not a module `V` + E::V::associated_item; //~ ERROR failed to resolve: `V` is a variant, not a module + V::associated_item; //~ ERROR failed to resolve: `V` is a variant, not a module } diff --git a/src/test/ui/resolve/resolve-variant-assoc-item.stderr b/src/test/ui/resolve/resolve-variant-assoc-item.stderr index 173976d707..4be1019968 100644 --- a/src/test/ui/resolve/resolve-variant-assoc-item.stderr +++ b/src/test/ui/resolve/resolve-variant-assoc-item.stderr @@ -1,14 +1,14 @@ -error[E0433]: failed to resolve: not a module `V` +error[E0433]: failed to resolve: `V` is a variant, not a module --> $DIR/resolve-variant-assoc-item.rs:5:8 | LL | E::V::associated_item; - | ^ not a module `V` + | ^ `V` is a variant, not a module -error[E0433]: failed to resolve: not a module `V` +error[E0433]: failed to resolve: `V` is a variant, not a module --> $DIR/resolve-variant-assoc-item.rs:6:5 | LL | V::associated_item; - | ^ not a module `V` + | ^ `V` is a variant, not a module error: aborting due to 2 previous errors diff --git a/src/test/ui/resolve/token-error-correct-3.stderr b/src/test/ui/resolve/token-error-correct-3.stderr index 52a3117ff3..607573f276 100644 --- a/src/test/ui/resolve/token-error-correct-3.stderr +++ b/src/test/ui/resolve/token-error-correct-3.stderr @@ -2,9 +2,8 @@ error: expected one of `)`, `,`, `.`, `?`, or an operator, found `;` --> $DIR/token-error-correct-3.rs:15:35 | LL | callback(path.as_ref(); - | - ^ - | | | - | | help: `)` may belong here + | - ^ help: `)` may belong here + | | | unclosed delimiter error: expected one of `.`, `;`, `?`, `}`, or an operator, found `)` @@ -35,5 +34,5 @@ LL | fs::create_dir_all(path.as_ref()).map(|()| true) error: aborting due to 4 previous errors -Some errors occurred: E0308, E0425. +Some errors have detailed explanations: E0308, E0425. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/resolve/tuple-struct-alias.stderr b/src/test/ui/resolve/tuple-struct-alias.stderr index fc701b1644..02af357a2c 100644 --- a/src/test/ui/resolve/tuple-struct-alias.stderr +++ b/src/test/ui/resolve/tuple-struct-alias.stderr @@ -16,5 +16,5 @@ LL | A(..) => {} error: aborting due to 2 previous errors -Some errors occurred: E0423, E0532. +Some errors have detailed explanations: E0423, E0532. For more information about an error, try `rustc --explain E0423`. diff --git a/src/test/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr b/src/test/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr index 70cabcbeb6..c86a6d7034 100644 --- a/src/test/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr +++ b/src/test/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr @@ -14,5 +14,5 @@ LL | fn g isize>(x: F) {} error: aborting due to 2 previous errors -Some errors occurred: E0404, E0405. +Some errors have detailed explanations: E0404, E0405. For more information about an error, try `rustc --explain E0404`. diff --git a/src/test/ui/resolve/unresolved_static_type_field.stderr b/src/test/ui/resolve/unresolved_static_type_field.stderr index a517324378..06926b53dd 100644 --- a/src/test/ui/resolve/unresolved_static_type_field.stderr +++ b/src/test/ui/resolve/unresolved_static_type_field.stderr @@ -2,10 +2,7 @@ error[E0425]: cannot find value `cx` in this scope --> $DIR/unresolved_static_type_field.rs:9:11 | LL | f(cx); - | ^^ - | | - | `self` value is a keyword only available in methods with `self` parameter - | help: try: `self.cx` + | ^^ a field by this name exists in `Self` error: aborting due to previous error diff --git a/src/test/ui/resolve/use_suggestion_placement.stderr b/src/test/ui/resolve/use_suggestion_placement.stderr index 8d2fdd530f..258b989387 100644 --- a/src/test/ui/resolve/use_suggestion_placement.stderr +++ b/src/test/ui/resolve/use_suggestion_placement.stderr @@ -32,5 +32,5 @@ LL | use std::collections::hash_map::HashMap; error: aborting due to 3 previous errors -Some errors occurred: E0412, E0425. +Some errors have detailed explanations: E0412, E0425. For more information about an error, try `rustc --explain E0412`. diff --git a/src/test/ui/resolve_self_super_hint.rs b/src/test/ui/resolve_self_super_hint.rs index 91a01cc0fa..a9423830d9 100644 --- a/src/test/ui/resolve_self_super_hint.rs +++ b/src/test/ui/resolve_self_super_hint.rs @@ -1,4 +1,3 @@ -#![feature(alloc)] #![allow(unused_extern_crates)] mod a { diff --git a/src/test/ui/resolve_self_super_hint.stderr b/src/test/ui/resolve_self_super_hint.stderr index 03214cad8e..14cdae97d1 100644 --- a/src/test/ui/resolve_self_super_hint.stderr +++ b/src/test/ui/resolve_self_super_hint.stderr @@ -1,17 +1,17 @@ error[E0432]: unresolved import `alloc` - --> $DIR/resolve_self_super_hint.rs:6:9 + --> $DIR/resolve_self_super_hint.rs:5:9 | LL | use alloc::HashMap; | ^^^^^ help: a similar path exists: `self::alloc` error[E0432]: unresolved import `alloc` - --> $DIR/resolve_self_super_hint.rs:11:13 + --> $DIR/resolve_self_super_hint.rs:10:13 | LL | use alloc::HashMap; | ^^^^^ help: a similar path exists: `super::alloc` error[E0432]: unresolved import `alloc` - --> $DIR/resolve_self_super_hint.rs:16:17 + --> $DIR/resolve_self_super_hint.rs:15:17 | LL | use alloc::HashMap; | ^^^^^ @@ -20,7 +20,7 @@ LL | use alloc::HashMap; | help: a similar path exists: `a::alloc` error[E0432]: unresolved import `alloc` - --> $DIR/resolve_self_super_hint.rs:21:21 + --> $DIR/resolve_self_super_hint.rs:20:21 | LL | use alloc::HashMap; | ^^^^^ diff --git a/src/test/ui/return/return-from-diverging.rs b/src/test/ui/return/return-from-diverging.rs index faeccaace6..2ee48e7bc4 100644 --- a/src/test/ui/return/return-from-diverging.rs +++ b/src/test/ui/return/return-from-diverging.rs @@ -6,4 +6,3 @@ fn fail() -> ! { fn main() { } - diff --git a/src/test/ui/return/return-unit-from-diverging.rs b/src/test/ui/return/return-unit-from-diverging.rs index 31a13784b4..48417599b1 100644 --- a/src/test/ui/return/return-unit-from-diverging.rs +++ b/src/test/ui/return/return-unit-from-diverging.rs @@ -7,4 +7,3 @@ fn fail() -> ! { fn main() { } - diff --git a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/bind-by-move-no-guards.rs b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/bind-by-move-no-guards.rs index 2f3c094ff3..7b499af632 100644 --- a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/bind-by-move-no-guards.rs +++ b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/bind-by-move-no-guards.rs @@ -4,7 +4,6 @@ // compile-pass -#![feature(nll)] #![feature(bind_by_move_pattern_guards)] use std::sync::mpsc::channel; diff --git a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.gate_and_2015.stderr b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.gate_and_2015.stderr index 4c17ce23b3..34e8b0e143 100644 --- a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.gate_and_2015.stderr +++ b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.gate_and_2015.stderr @@ -1,9 +1,10 @@ -error[E0008]: cannot bind by-move into a pattern guard - --> $DIR/feature-gate.rs:33:16 +error: compilation successful + --> $DIR/feature-gate.rs:41:1 | -LL | A { a: v } if *v == 42 => v, - | ^ moves value into pattern guard +LL | / fn main() { +LL | | foo(107) +LL | | } + | |_^ error: aborting due to previous error -For more information about this error, try `rustc --explain E0008`. diff --git a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.gate_and_2018.stderr b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.gate_and_2018.stderr index 4bde9b0c8d..34e8b0e143 100644 --- a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.gate_and_2018.stderr +++ b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.gate_and_2018.stderr @@ -1,5 +1,5 @@ error: compilation successful - --> $DIR/feature-gate.rs:42:1 + --> $DIR/feature-gate.rs:41:1 | LL | / fn main() { LL | | foo(107) diff --git a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.gate_and_feature_nll.stderr b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.gate_and_feature_nll.stderr index 4bde9b0c8d..34e8b0e143 100644 --- a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.gate_and_feature_nll.stderr +++ b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.gate_and_feature_nll.stderr @@ -1,5 +1,5 @@ error: compilation successful - --> $DIR/feature-gate.rs:42:1 + --> $DIR/feature-gate.rs:41:1 | LL | / fn main() { LL | | foo(107) diff --git a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.gate_and_znll.stderr b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.gate_and_znll.stderr index 4bde9b0c8d..34e8b0e143 100644 --- a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.gate_and_znll.stderr +++ b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.gate_and_znll.stderr @@ -1,5 +1,5 @@ error: compilation successful - --> $DIR/feature-gate.rs:42:1 + --> $DIR/feature-gate.rs:41:1 | LL | / fn main() { LL | | foo(107) diff --git a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.no_gate.stderr b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.no_gate.stderr index 4c17ce23b3..2a1a04b3f4 100644 --- a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.no_gate.stderr +++ b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.no_gate.stderr @@ -3,6 +3,8 @@ error[E0008]: cannot bind by-move into a pattern guard | LL | A { a: v } if *v == 42 => v, | ^ moves value into pattern guard + | + = help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.rs b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.rs index f6df4d07ba..97f90f7762 100644 --- a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.rs +++ b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/feature-gate.rs @@ -32,7 +32,6 @@ fn foo(n: i32) { A { a: v } if *v == 42 => v, //[no_gate]~^ ERROR cannot bind by-move into a pattern guard - //[gate_and_2015]~^^ ERROR cannot bind by-move into a pattern guard _ => Box::new(0) }; @@ -42,6 +41,7 @@ fn foo(n: i32) { fn main() { foo(107) } -//[gate_and_2018]~^^^ ERROR compilation successful -//[gate_and_znll]~^^^^ ERROR compilation successful -//[gate_and_feature_nll]~^^^^^ ERROR compilation successful +//[gate_and_2015]~^^^ ERROR compilation successful +//[gate_and_2018]~^^^^ ERROR compilation successful +//[gate_and_znll]~^^^^^ ERROR compilation successful +//[gate_and_feature_nll]~^^^^^^ ERROR compilation successful diff --git a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/rfc-basic-examples.rs b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/rfc-basic-examples.rs index 9a9d11ce1b..aca6aa5f0f 100644 --- a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/rfc-basic-examples.rs +++ b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/rfc-basic-examples.rs @@ -1,4 +1,3 @@ -#![feature(nll)] #![feature(bind_by_move_pattern_guards)] // compile-pass diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs index c648f54285..193a523aed 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs @@ -1,8 +1,8 @@ // compile-flags: --test -use std::num::ParseIntError; +use std::num::ParseFloatError; #[test] -fn can_parse_zero_as_f32() -> Result { //~ ERROR +fn can_parse_zero_as_f32() -> Result { //~ ERROR "0".parse() } diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr index 18115541af..f253b67a01 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr @@ -1,12 +1,12 @@ -error[E0277]: `main` has invalid return type `std::result::Result` +error[E0277]: `main` has invalid return type `std::result::Result` --> $DIR/termination-trait-test-wrong-type.rs:6:1 | -LL | / fn can_parse_zero_as_f32() -> Result { +LL | / fn can_parse_zero_as_f32() -> Result { LL | | "0".parse() LL | | } | |_^ `main` can only return types that implement `std::process::Termination` | - = help: the trait `std::process::Termination` is not implemented for `std::result::Result` + = help: the trait `std::process::Termination` is not implemented for `std::result::Result` = note: required by `test::assert_test_result` error: aborting due to previous error diff --git a/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.nll.stderr b/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.nll.stderr index 04572920ee..c74b82dbbd 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.nll.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.nll.stderr @@ -4,7 +4,7 @@ error[E0502]: cannot borrow `foo` as mutable because it is also borrowed as immu LL | while let Some(Ok(string)) = foo.get() { | --- immutable borrow occurs here LL | foo.mutate(); - | ^^^^^^^^^^^^ mutable borrow occurs here + | ^^^ mutable borrow occurs here LL | LL | println!("foo={:?}", *string); | ------- immutable borrow later used here diff --git a/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.stderr b/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.stderr index e946d41e23..04572920ee 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.stderr @@ -2,11 +2,12 @@ error[E0502]: cannot borrow `foo` as mutable because it is also borrowed as immu --> $DIR/borrowck-issue-49631.rs:20:9 | LL | while let Some(Ok(string)) = foo.get() { - | --- - immutable borrow ends here - | | - | immutable borrow occurs here + | --- immutable borrow occurs here LL | foo.mutate(); - | ^^^ mutable borrow occurs here + | ^^^^^^^^^^^^ mutable borrow occurs here +LL | +LL | println!("foo={:?}", *string); + | ------- immutable borrow later used here error: aborting due to previous error diff --git a/src/test/ui/rfc-2005-default-binding-mode/enum.nll.stderr b/src/test/ui/rfc-2005-default-binding-mode/enum.nll.stderr deleted file mode 100644 index d6a89006bc..0000000000 --- a/src/test/ui/rfc-2005-default-binding-mode/enum.nll.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0594]: cannot assign to `*x` which is behind a `&` reference - --> $DIR/enum.rs:9:5 - | -LL | *x += 1; - | ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written - -error[E0594]: cannot assign to `*x` which is behind a `&` reference - --> $DIR/enum.rs:13:9 - | -LL | *x += 1; - | ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written - -error[E0594]: cannot assign to `*x` which is behind a `&` reference - --> $DIR/enum.rs:19:9 - | -LL | *x += 1; - | ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/rfc-2005-default-binding-mode/enum.rs b/src/test/ui/rfc-2005-default-binding-mode/enum.rs index 7609345404..af82d36f87 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/enum.rs +++ b/src/test/ui/rfc-2005-default-binding-mode/enum.rs @@ -6,17 +6,17 @@ use Wrapper::Wrap; pub fn main() { let Wrap(x) = &Wrap(3); - *x += 1; //~ ERROR cannot assign to immutable + *x += 1; //~ ERROR cannot assign to `*x` which is behind a `&` reference if let Some(x) = &Some(3) { - *x += 1; //~ ERROR cannot assign to immutable + *x += 1; //~ ERROR cannot assign to `*x` which is behind a `&` reference } else { panic!(); } while let Some(x) = &Some(3) { - *x += 1; //~ ERROR cannot assign to immutable + *x += 1; //~ ERROR cannot assign to `*x` which is behind a `&` reference break; } } diff --git a/src/test/ui/rfc-2005-default-binding-mode/enum.stderr b/src/test/ui/rfc-2005-default-binding-mode/enum.stderr index 5106618af6..9d53e6d788 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/enum.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/enum.stderr @@ -1,21 +1,20 @@ -error[E0594]: cannot assign to immutable borrowed content `*x` +error[E0594]: cannot assign to `*x` which is behind a `&` reference --> $DIR/enum.rs:9:5 | LL | *x += 1; - | ^^^^^^^ cannot borrow as mutable + | ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written -error[E0594]: cannot assign to immutable borrowed content `*x` +error[E0594]: cannot assign to `*x` which is behind a `&` reference --> $DIR/enum.rs:13:9 | LL | *x += 1; - | ^^^^^^^ cannot borrow as mutable + | ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written -error[E0594]: cannot assign to immutable borrowed content `*x` +error[E0594]: cannot assign to `*x` which is behind a `&` reference --> $DIR/enum.rs:19:9 | LL | *x += 1; - | ^^^^^^^ cannot borrow as mutable + | ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.nll.stderr b/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.nll.stderr deleted file mode 100644 index a6f2f3ec30..0000000000 --- a/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.nll.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0594]: cannot assign to `*n` which is behind a `&` reference - --> $DIR/explicit-mut.rs:7:13 - | -LL | *n += 1; - | ^^^^^^^ `n` is a `&` reference, so the data it refers to cannot be written - -error[E0594]: cannot assign to `*n` which is behind a `&` reference - --> $DIR/explicit-mut.rs:15:13 - | -LL | *n += 1; - | ^^^^^^^ `n` is a `&` reference, so the data it refers to cannot be written - -error[E0594]: cannot assign to `*n` which is behind a `&` reference - --> $DIR/explicit-mut.rs:23:13 - | -LL | *n += 1; - | ^^^^^^^ `n` is a `&` reference, so the data it refers to cannot be written - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.rs b/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.rs index 73efddef6c..212fd94ded 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.rs +++ b/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.rs @@ -4,7 +4,7 @@ fn main() { match &&Some(5i32) { Some(n) => { - *n += 1; //~ ERROR cannot assign to immutable + *n += 1; //~ ERROR cannot assign to `*n` which is behind a `&` reference let _ = n; } None => {}, @@ -12,7 +12,7 @@ fn main() { match &mut &Some(5i32) { Some(n) => { - *n += 1; //~ ERROR cannot assign to immutable + *n += 1; //~ ERROR cannot assign to `*n` which is behind a `&` reference let _ = n; } None => {}, @@ -20,7 +20,7 @@ fn main() { match &&mut Some(5i32) { Some(n) => { - *n += 1; //~ ERROR cannot assign to immutable + *n += 1; //~ ERROR cannot assign to `*n` which is behind a `&` reference let _ = n; } None => {}, diff --git a/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.stderr b/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.stderr index b6424f8426..5eace3d263 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.stderr @@ -1,21 +1,20 @@ -error[E0594]: cannot assign to immutable borrowed content `*n` +error[E0594]: cannot assign to `*n` which is behind a `&` reference --> $DIR/explicit-mut.rs:7:13 | LL | *n += 1; - | ^^^^^^^ cannot borrow as mutable + | ^^^^^^^ `n` is a `&` reference, so the data it refers to cannot be written -error[E0594]: cannot assign to immutable borrowed content `*n` +error[E0594]: cannot assign to `*n` which is behind a `&` reference --> $DIR/explicit-mut.rs:15:13 | LL | *n += 1; - | ^^^^^^^ cannot borrow as mutable + | ^^^^^^^ `n` is a `&` reference, so the data it refers to cannot be written -error[E0594]: cannot assign to immutable borrowed content `*n` +error[E0594]: cannot assign to `*n` which is behind a `&` reference --> $DIR/explicit-mut.rs:23:13 | LL | *n += 1; - | ^^^^^^^ cannot borrow as mutable + | ^^^^^^^ `n` is a `&` reference, so the data it refers to cannot be written error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/rfc-2005-default-binding-mode/for.rs b/src/test/ui/rfc-2005-default-binding-mode/for.rs index 2fa7852635..919ae62a18 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/for.rs +++ b/src/test/ui/rfc-2005-default-binding-mode/for.rs @@ -5,5 +5,6 @@ pub fn main() { // The below desugars to &(ref n, mut m). for (n, mut m) in &tups { //~^ ERROR cannot bind by-move and by-ref in the same pattern + //~| ERROR cannot move out of borrowed content } } diff --git a/src/test/ui/rfc-2005-default-binding-mode/for.stderr b/src/test/ui/rfc-2005-default-binding-mode/for.stderr index 37aaa9cfd7..d9a59e6345 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/for.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/for.stderr @@ -6,6 +6,21 @@ LL | for (n, mut m) in &tups { | | | both by-ref and by-move used -error: aborting due to previous error +error[E0507]: cannot move out of borrowed content + --> $DIR/for.rs:6:23 + | +LL | for (n, mut m) in &tups { + | ----- ^^^^^ cannot move out of borrowed content + | | + | data moved here + | +note: move occurs because `m` has type `Foo`, which does not implement the `Copy` trait + --> $DIR/for.rs:6:13 + | +LL | for (n, mut m) in &tups { + | ^^^^^ + +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0009`. +Some errors have detailed explanations: E0009, E0507. +For more information about an error, try `rustc --explain E0009`. diff --git a/src/test/ui/rfc-2008-non-exhaustive/struct.stderr b/src/test/ui/rfc-2008-non-exhaustive/struct.stderr index ecfad88a82..96040f11b5 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/struct.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/struct.stderr @@ -60,5 +60,5 @@ LL | let UnitStruct { } = us; error: aborting due to 9 previous errors -Some errors occurred: E0423, E0603, E0638, E0639. +Some errors have detailed explanations: E0423, E0603, E0638, E0639. For more information about an error, try `rustc --explain E0423`. diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/auxiliary/uninhabited.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/auxiliary/uninhabited.rs new file mode 100644 index 0000000000..8cb9a8cf1f --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/auxiliary/uninhabited.rs @@ -0,0 +1,33 @@ +#![crate_type = "rlib"] +#![feature(never_type)] +#![feature(non_exhaustive)] + +#[non_exhaustive] +pub enum UninhabitedEnum { +} + +#[non_exhaustive] +pub struct UninhabitedStruct { + _priv: !, +} + +#[non_exhaustive] +pub struct UninhabitedTupleStruct(!); + +pub enum UninhabitedVariants { + #[non_exhaustive] Tuple(!), + #[non_exhaustive] Struct { x: ! } +} + +pub enum PartiallyInhabitedVariants { + Tuple(u8), + #[non_exhaustive] Struct { x: ! } +} + +pub struct IndirectUninhabitedEnum(UninhabitedEnum); + +pub struct IndirectUninhabitedStruct(UninhabitedStruct); + +pub struct IndirectUninhabitedTupleStruct(UninhabitedTupleStruct); + +pub struct IndirectUninhabitedVariants(UninhabitedVariants); diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.rs new file mode 100644 index 0000000000..80b9dc4c1c --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.rs @@ -0,0 +1,38 @@ +// aux-build:uninhabited.rs +#![feature(never_type)] + +extern crate uninhabited; + +use uninhabited::{ + UninhabitedEnum, + UninhabitedStruct, + UninhabitedTupleStruct, + UninhabitedVariants, +}; + +// This test checks that uninhabited non-exhaustive types cannot coerce to any type, as the never +// type can. + +struct A; + +fn can_coerce_never_type_to_anything(x: !) -> A { + x +} + +fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A { + x //~ ERROR mismatched types +} + +fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A { + x //~ ERROR mismatched types +} + +fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A { + x //~ ERROR mismatched types +} + +fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariants) -> A { + x //~ ERROR mismatched types +} + +fn main() {} diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr new file mode 100644 index 0000000000..d05ee1d39e --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr @@ -0,0 +1,47 @@ +error[E0308]: mismatched types + --> $DIR/coercions.rs:23:5 + | +LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A { + | - expected `A` because of return type +LL | x + | ^ expected struct `A`, found enum `uninhabited::UninhabitedEnum` + | + = note: expected type `A` + found type `uninhabited::UninhabitedEnum` + +error[E0308]: mismatched types + --> $DIR/coercions.rs:27:5 + | +LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A { + | - expected `A` because of return type +LL | x + | ^ expected struct `A`, found struct `uninhabited::UninhabitedTupleStruct` + | + = note: expected type `A` + found type `uninhabited::UninhabitedTupleStruct` + +error[E0308]: mismatched types + --> $DIR/coercions.rs:31:5 + | +LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A { + | - expected `A` because of return type +LL | x + | ^ expected struct `A`, found struct `uninhabited::UninhabitedStruct` + | + = note: expected type `A` + found type `uninhabited::UninhabitedStruct` + +error[E0308]: mismatched types + --> $DIR/coercions.rs:35:5 + | +LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariants) -> A { + | - expected `A` because of return type +LL | x + | ^ expected struct `A`, found enum `uninhabited::UninhabitedVariants` + | + = note: expected type `A` + found type `uninhabited::UninhabitedVariants` + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.rs new file mode 100644 index 0000000000..803a542f8a --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.rs @@ -0,0 +1,46 @@ +#![feature(never_type)] +#![feature(non_exhaustive)] + +#[non_exhaustive] +pub enum UninhabitedEnum { +} + +#[non_exhaustive] +pub struct UninhabitedTupleStruct(!); + +#[non_exhaustive] +pub struct UninhabitedStruct { + _priv: !, +} + +pub enum UninhabitedVariants { + #[non_exhaustive] Tuple(!), + #[non_exhaustive] Struct { x: ! } +} + +struct A; + +// This test checks that uninhabited non-exhaustive types defined in the same crate cannot coerce +// to any type, as the never type can. + +fn can_coerce_never_type_to_anything(x: !) -> A { + x +} + +fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A { + x //~ ERROR mismatched types +} + +fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A { + x //~ ERROR mismatched types +} + +fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A { + x //~ ERROR mismatched types +} + +fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariants) -> A { + x //~ ERROR mismatched types +} + +fn main() {} diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr new file mode 100644 index 0000000000..8f6b709bb1 --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr @@ -0,0 +1,47 @@ +error[E0308]: mismatched types + --> $DIR/coercions_same_crate.rs:31:5 + | +LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A { + | - expected `A` because of return type +LL | x + | ^ expected struct `A`, found enum `UninhabitedEnum` + | + = note: expected type `A` + found type `UninhabitedEnum` + +error[E0308]: mismatched types + --> $DIR/coercions_same_crate.rs:35:5 + | +LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A { + | - expected `A` because of return type +LL | x + | ^ expected struct `A`, found struct `UninhabitedTupleStruct` + | + = note: expected type `A` + found type `UninhabitedTupleStruct` + +error[E0308]: mismatched types + --> $DIR/coercions_same_crate.rs:39:5 + | +LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A { + | - expected `A` because of return type +LL | x + | ^ expected struct `A`, found struct `UninhabitedStruct` + | + = note: expected type `A` + found type `UninhabitedStruct` + +error[E0308]: mismatched types + --> $DIR/coercions_same_crate.rs:43:5 + | +LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariants) -> A { + | - expected `A` because of return type +LL | x + | ^ expected struct `A`, found enum `UninhabitedVariants` + | + = note: expected type `A` + found type `UninhabitedVariants` + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.rs new file mode 100644 index 0000000000..98a7fdbc50 --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.rs @@ -0,0 +1,36 @@ +// aux-build:uninhabited.rs +#![feature(never_type)] + +extern crate uninhabited; + +use uninhabited::{ + IndirectUninhabitedEnum, + IndirectUninhabitedStruct, + IndirectUninhabitedTupleStruct, + IndirectUninhabitedVariants, +}; + +struct A; + +// This test checks that an empty match on a non-exhaustive uninhabited type through a level of +// indirection from an extern crate will not compile. + +fn cannot_empty_match_on_empty_enum_to_anything(x: IndirectUninhabitedEnum) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn cannot_empty_match_on_empty_struct_to_anything(x: IndirectUninhabitedStruct) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn cannot_empty_match_on_empty_tuple_struct_to_anything(x: IndirectUninhabitedTupleStruct) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn cannot_empty_match_on_enum_with_empty_variants_struct_to_anything( + x: IndirectUninhabitedVariants, +) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn main() {} diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.stderr new file mode 100644 index 0000000000..af82022e1d --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.stderr @@ -0,0 +1,35 @@ +error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedEnum` of type `uninhabited::IndirectUninhabitedEnum` is not handled + --> $DIR/indirect_match.rs:19:11 + | +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedStruct` of type `uninhabited::IndirectUninhabitedStruct` is not handled + --> $DIR/indirect_match.rs:23:11 + | +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedTupleStruct` of type `uninhabited::IndirectUninhabitedTupleStruct` is not handled + --> $DIR/indirect_match.rs:27:11 + | +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedVariants` of type `uninhabited::IndirectUninhabitedVariants` is not handled + --> $DIR/indirect_match.rs:33:11 + | +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0004`. diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.rs new file mode 100644 index 0000000000..3c8d495e12 --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.rs @@ -0,0 +1,52 @@ +#![feature(never_type)] +#![feature(non_exhaustive)] + +#[non_exhaustive] +pub enum UninhabitedEnum { +} + +#[non_exhaustive] +pub struct UninhabitedStruct { + _priv: !, +} + +#[non_exhaustive] +pub struct UninhabitedTupleStruct(!); + +pub enum UninhabitedVariants { + #[non_exhaustive] Tuple(!), + #[non_exhaustive] Struct { x: ! } +} + +pub struct IndirectUninhabitedEnum(UninhabitedEnum); + +pub struct IndirectUninhabitedStruct(UninhabitedStruct); + +pub struct IndirectUninhabitedTupleStruct(UninhabitedTupleStruct); + +pub struct IndirectUninhabitedVariants(UninhabitedVariants); + +struct A; + +// This test checks that an empty match on a non-exhaustive uninhabited type through a level of +// indirection from the defining crate will not compile without `#![feature(exhaustive_patterns)]`. + +fn cannot_empty_match_on_empty_enum_to_anything(x: IndirectUninhabitedEnum) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn cannot_empty_match_on_empty_struct_to_anything(x: IndirectUninhabitedStruct) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn cannot_empty_match_on_empty_tuple_struct_to_anything(x: IndirectUninhabitedTupleStruct) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn cannot_empty_match_on_enum_with_empty_variants_struct_to_anything( + x: IndirectUninhabitedVariants, +) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn main() {} diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.stderr new file mode 100644 index 0000000000..27b120792d --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.stderr @@ -0,0 +1,59 @@ +error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedEnum` of type `IndirectUninhabitedEnum` is not handled + --> $DIR/indirect_match_same_crate.rs:35:11 + | +LL | pub struct IndirectUninhabitedEnum(UninhabitedEnum); + | ---------------------------------------------------- + | | | + | | variant not covered + | `IndirectUninhabitedEnum` defined here +... +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedStruct` of type `IndirectUninhabitedStruct` is not handled + --> $DIR/indirect_match_same_crate.rs:39:11 + | +LL | pub struct IndirectUninhabitedStruct(UninhabitedStruct); + | -------------------------------------------------------- + | | | + | | variant not covered + | `IndirectUninhabitedStruct` defined here +... +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedTupleStruct` of type `IndirectUninhabitedTupleStruct` is not handled + --> $DIR/indirect_match_same_crate.rs:43:11 + | +LL | pub struct IndirectUninhabitedTupleStruct(UninhabitedTupleStruct); + | ------------------------------------------------------------------ + | | | + | | variant not covered + | `IndirectUninhabitedTupleStruct` defined here +... +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedVariants` of type `IndirectUninhabitedVariants` is not handled + --> $DIR/indirect_match_same_crate.rs:49:11 + | +LL | pub struct IndirectUninhabitedVariants(UninhabitedVariants); + | ------------------------------------------------------------ + | | | + | | variant not covered + | `IndirectUninhabitedVariants` defined here +... +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0004`. diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.rs new file mode 100644 index 0000000000..be86519ecb --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.rs @@ -0,0 +1,40 @@ +// aux-build:uninhabited.rs +#![deny(unreachable_patterns)] +#![feature(exhaustive_patterns)] +#![feature(never_type)] + +extern crate uninhabited; + +use uninhabited::{ + IndirectUninhabitedEnum, + IndirectUninhabitedStruct, + IndirectUninhabitedTupleStruct, + IndirectUninhabitedVariants, +}; + +struct A; + +// This test checks that an empty match on a non-exhaustive uninhabited type through a level of +// indirection from an extern crate will not compile. In particular, this enables the +// `exhaustive_patterns` feature as this can change the branch used in the compiler to determine +// this. + +fn cannot_empty_match_on_empty_enum_to_anything(x: IndirectUninhabitedEnum) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn cannot_empty_match_on_empty_struct_to_anything(x: IndirectUninhabitedStruct) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn cannot_empty_match_on_empty_tuple_struct_to_anything(x: IndirectUninhabitedTupleStruct) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn cannot_empty_match_on_enum_with_empty_variants_struct_to_anything( + x: IndirectUninhabitedVariants, +) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn main() {} diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.stderr new file mode 100644 index 0000000000..17a8d01007 --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.stderr @@ -0,0 +1,35 @@ +error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedEnum` is non-empty + --> $DIR/indirect_match_with_exhaustive_patterns.rs:23:11 + | +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedStruct` is non-empty + --> $DIR/indirect_match_with_exhaustive_patterns.rs:27:11 + | +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedTupleStruct` is non-empty + --> $DIR/indirect_match_with_exhaustive_patterns.rs:31:11 + | +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedVariants` is non-empty + --> $DIR/indirect_match_with_exhaustive_patterns.rs:37:11 + | +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0004`. diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns_same_crate.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns_same_crate.rs new file mode 100644 index 0000000000..5dbd38e07d --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns_same_crate.rs @@ -0,0 +1,58 @@ +// compile-pass +// skip-codegen +#![deny(unreachable_patterns)] +#![feature(exhaustive_patterns)] +#![feature(never_type)] +#![feature(non_exhaustive)] + +#[non_exhaustive] +pub enum UninhabitedEnum { +} + +#[non_exhaustive] +pub struct UninhabitedStruct { + _priv: !, +} + +#[non_exhaustive] +pub struct UninhabitedTupleStruct(!); + +pub enum UninhabitedVariants { + #[non_exhaustive] Tuple(!), + #[non_exhaustive] Struct { x: ! } +} + +pub struct IndirectUninhabitedEnum(UninhabitedEnum); + +pub struct IndirectUninhabitedStruct(UninhabitedStruct); + +pub struct IndirectUninhabitedTupleStruct(UninhabitedTupleStruct); + +pub struct IndirectUninhabitedVariants(UninhabitedVariants); + +struct A; + +// This test checks that an empty match on a non-exhaustive uninhabited type from the defining crate +// will compile. In particular, this enables the `exhaustive_patterns` feature as this can +// change the branch used in the compiler to determine this. +// Codegen is skipped because tests with long names can cause issues on Windows CI, see #60648. + +fn cannot_empty_match_on_empty_enum_to_anything(x: IndirectUninhabitedEnum) -> A { + match x {} +} + +fn cannot_empty_match_on_empty_struct_to_anything(x: IndirectUninhabitedStruct) -> A { + match x {} +} + +fn cannot_empty_match_on_empty_tuple_struct_to_anything(x: IndirectUninhabitedTupleStruct) -> A { + match x {} +} + +fn cannot_empty_match_on_enum_with_empty_variants_struct_to_anything( + x: IndirectUninhabitedVariants, +) -> A { + match x {} +} + +fn main() {} diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.rs new file mode 100644 index 0000000000..e54098d4d4 --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.rs @@ -0,0 +1,34 @@ +// aux-build:uninhabited.rs +#![feature(never_type)] + +extern crate uninhabited; + +use uninhabited::{ + UninhabitedEnum, + UninhabitedStruct, + UninhabitedTupleStruct, + UninhabitedVariants, +}; + +struct A; + +// This test checks that an empty match on a non-exhaustive uninhabited type from an extern crate +// will not compile. + +fn cannot_empty_match_on_empty_enum_to_anything(x: UninhabitedEnum) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn cannot_empty_match_on_empty_struct_to_anything(x: UninhabitedStruct) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn cannot_empty_match_on_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn cannot_empty_match_on_enum_with_empty_variants_struct_to_anything(x: UninhabitedVariants) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn main() {} diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr new file mode 100644 index 0000000000..de39688f45 --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr @@ -0,0 +1,35 @@ +error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedEnum` is non-empty + --> $DIR/match.rs:19:11 + | +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error[E0004]: non-exhaustive patterns: pattern `UninhabitedStruct` of type `uninhabited::UninhabitedStruct` is not handled + --> $DIR/match.rs:23:11 + | +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error[E0004]: non-exhaustive patterns: pattern `UninhabitedTupleStruct` of type `uninhabited::UninhabitedTupleStruct` is not handled + --> $DIR/match.rs:27:11 + | +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error[E0004]: non-exhaustive patterns: multiple patterns of type `uninhabited::UninhabitedVariants` are not handled + --> $DIR/match.rs:31:11 + | +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0004`. diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.rs new file mode 100644 index 0000000000..6405dd3bd6 --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.rs @@ -0,0 +1,42 @@ +#![feature(never_type)] +#![feature(non_exhaustive)] + +#[non_exhaustive] +pub enum UninhabitedEnum { +} + +#[non_exhaustive] +pub struct UninhabitedStruct { + _priv: !, +} + +#[non_exhaustive] +pub struct UninhabitedTupleStruct(!); + +pub enum UninhabitedVariants { + #[non_exhaustive] Tuple(!), + #[non_exhaustive] Struct { x: ! } +} + +struct A; + +// This test checks that an empty match on a non-exhaustive uninhabited type from the defining crate +// will compile. + +fn cannot_empty_match_on_empty_enum_to_anything(x: UninhabitedEnum) -> A { + match x {} +} + +fn cannot_empty_match_on_empty_struct_to_anything(x: UninhabitedStruct) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn cannot_empty_match_on_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn cannot_empty_match_on_enum_with_empty_variants_struct_to_anything(x: UninhabitedVariants) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn main() {} diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.stderr new file mode 100644 index 0000000000..410285a39a --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.stderr @@ -0,0 +1,49 @@ +error[E0004]: non-exhaustive patterns: pattern `UninhabitedStruct` of type `UninhabitedStruct` is not handled + --> $DIR/match_same_crate.rs:31:11 + | +LL | pub struct UninhabitedStruct { + | - ----------------- variant not covered + | _| + | | +LL | | _priv: !, +LL | | } + | |_- `UninhabitedStruct` defined here +... +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error[E0004]: non-exhaustive patterns: pattern `UninhabitedTupleStruct` of type `UninhabitedTupleStruct` is not handled + --> $DIR/match_same_crate.rs:35:11 + | +LL | pub struct UninhabitedTupleStruct(!); + | ------------------------------------- + | | | + | | variant not covered + | `UninhabitedTupleStruct` defined here +... +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error[E0004]: non-exhaustive patterns: multiple patterns of type `UninhabitedVariants` are not handled + --> $DIR/match_same_crate.rs:39:11 + | +LL | / pub enum UninhabitedVariants { +LL | | #[non_exhaustive] Tuple(!), + | | ----- variant not covered +LL | | #[non_exhaustive] Struct { x: ! } + | | ------ variant not covered +LL | | } + | |_- `UninhabitedVariants` defined here +... +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0004`. diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.rs new file mode 100644 index 0000000000..900dfff652 --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.rs @@ -0,0 +1,37 @@ +// aux-build:uninhabited.rs +#![deny(unreachable_patterns)] +#![feature(exhaustive_patterns)] +#![feature(never_type)] + +extern crate uninhabited; + +use uninhabited::{ + UninhabitedEnum, + UninhabitedStruct, + UninhabitedTupleStruct, + UninhabitedVariants, +}; + +struct A; + +// This test checks that an empty match on a non-exhaustive uninhabited type from an extern crate +// will not compile. In particular, this enables the `exhaustive_patterns` feature as this can +// change the branch used in the compiler to determine this. + +fn cannot_empty_match_on_empty_enum_to_anything(x: UninhabitedEnum) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn cannot_empty_match_on_empty_struct_to_anything(x: UninhabitedStruct) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn cannot_empty_match_on_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn cannot_empty_match_on_enum_with_empty_variants_struct_to_anything(x: UninhabitedVariants) -> A { + match x {} //~ ERROR non-exhaustive patterns +} + +fn main() {} diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr new file mode 100644 index 0000000000..48a888bc50 --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr @@ -0,0 +1,35 @@ +error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedEnum` is non-empty + --> $DIR/match_with_exhaustive_patterns.rs:22:11 + | +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedStruct` is non-empty + --> $DIR/match_with_exhaustive_patterns.rs:26:11 + | +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedTupleStruct` is non-empty + --> $DIR/match_with_exhaustive_patterns.rs:30:11 + | +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedVariants` is non-empty + --> $DIR/match_with_exhaustive_patterns.rs:34:11 + | +LL | match x {} + | ^ + | + = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0004`. diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns_same_crate.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns_same_crate.rs new file mode 100644 index 0000000000..74922d4bcb --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns_same_crate.rs @@ -0,0 +1,48 @@ +// compile-pass +// skip-codegen +#![deny(unreachable_patterns)] +#![feature(exhaustive_patterns)] +#![feature(never_type)] +#![feature(non_exhaustive)] + +#[non_exhaustive] +pub enum UninhabitedEnum { +} + +#[non_exhaustive] +pub struct UninhabitedStruct { + _priv: !, +} + +#[non_exhaustive] +pub struct UninhabitedTupleStruct(!); + +pub enum UninhabitedVariants { + #[non_exhaustive] Tuple(!), + #[non_exhaustive] Struct { x: ! } +} + +struct A; + +// This test checks that an empty match on a non-exhaustive uninhabited type from the defining crate +// will compile. In particular, this enables the `exhaustive_patterns` feature as this can +// change the branch used in the compiler to determine this. +// Codegen is skipped because tests with long names can cause issues on Windows CI, see #60648. + +fn cannot_empty_match_on_empty_enum_to_anything(x: UninhabitedEnum) -> A { + match x {} +} + +fn cannot_empty_match_on_empty_struct_to_anything(x: UninhabitedStruct) -> A { + match x {} +} + +fn cannot_empty_match_on_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A { + match x {} +} + +fn cannot_empty_match_on_enum_with_empty_variants_struct_to_anything(x: UninhabitedVariants) -> A { + match x {} +} + +fn main() {} diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs new file mode 100644 index 0000000000..97061310d1 --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns.rs @@ -0,0 +1,59 @@ +// aux-build:uninhabited.rs +// compile-pass +#![deny(unreachable_patterns)] +#![feature(exhaustive_patterns)] + +extern crate uninhabited; + +use uninhabited::{ + PartiallyInhabitedVariants, + UninhabitedEnum, + UninhabitedStruct, + UninhabitedTupleStruct, + UninhabitedVariants, +}; + +fn uninhabited_enum() -> Option { + None +} + +fn uninhabited_variant() -> Option { + None +} + +fn partially_inhabited_variant() -> PartiallyInhabitedVariants { + PartiallyInhabitedVariants::Tuple(3) +} + +fn uninhabited_struct() -> Option { + None +} + +fn uninhabited_tuple_struct() -> Option { + None +} + +// This test checks that non-exhaustive types that would normally be considered uninhabited within +// the defining crate are not considered uninhabited from extern crates. + +fn main() { + match uninhabited_enum() { + Some(_x) => (), // This line would normally error. + None => (), + } + + match uninhabited_variant() { + Some(_x) => (), // This line would normally error. + None => (), + } + + // This line would normally error. + while let PartiallyInhabitedVariants::Struct { x, .. } = partially_inhabited_variant() { + } + + while let Some(_x) = uninhabited_struct() { // This line would normally error. + } + + while let Some(_x) = uninhabited_tuple_struct() { // This line would normally error. + } +} diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.rs b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.rs new file mode 100644 index 0000000000..302a35cab5 --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.rs @@ -0,0 +1,71 @@ +#![deny(unreachable_patterns)] +#![feature(exhaustive_patterns)] +#![feature(never_type)] +#![feature(non_exhaustive)] + +#[non_exhaustive] +pub enum UninhabitedEnum { +} + +#[non_exhaustive] +pub struct UninhabitedTupleStruct(!); + +#[non_exhaustive] +pub struct UninhabitedStruct { + _priv: !, +} + +pub enum UninhabitedVariants { + #[non_exhaustive] Tuple(!), + #[non_exhaustive] Struct { x: ! } +} + +pub enum PartiallyInhabitedVariants { + Tuple(u8), + #[non_exhaustive] Struct { x: ! } +} + +fn uninhabited_enum() -> Option { + None +} + +fn uninhabited_variant() -> Option { + None +} + +fn partially_inhabited_variant() -> PartiallyInhabitedVariants { + PartiallyInhabitedVariants::Tuple(3) +} + +fn uninhabited_struct() -> Option { + None +} + +fn uninhabited_tuple_struct() -> Option { + None +} + +// This test checks that non-exhaustive types that would normally be considered uninhabited within +// the defining crate are still considered uninhabited. + +fn main() { + match uninhabited_enum() { + Some(_x) => (), //~ ERROR unreachable pattern + None => (), + } + + match uninhabited_variant() { + Some(_x) => (), //~ ERROR unreachable pattern + None => (), + } + + while let PartiallyInhabitedVariants::Struct { x } = partially_inhabited_variant() { + //~^ ERROR unreachable pattern + } + + while let Some(_x) = uninhabited_struct() { //~ ERROR unreachable pattern + } + + while let Some(_x) = uninhabited_tuple_struct() { //~ ERROR unreachable pattern + } +} diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.stderr new file mode 100644 index 0000000000..72f37d9a60 --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.stderr @@ -0,0 +1,38 @@ +error: unreachable pattern + --> $DIR/patterns_same_crate.rs:53:9 + | +LL | Some(_x) => (), + | ^^^^^^^^ + | +note: lint level defined here + --> $DIR/patterns_same_crate.rs:1:9 + | +LL | #![deny(unreachable_patterns)] + | ^^^^^^^^^^^^^^^^^^^^ + +error: unreachable pattern + --> $DIR/patterns_same_crate.rs:58:9 + | +LL | Some(_x) => (), + | ^^^^^^^^ + +error: unreachable pattern + --> $DIR/patterns_same_crate.rs:62:15 + | +LL | while let PartiallyInhabitedVariants::Struct { x } = partially_inhabited_variant() { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: unreachable pattern + --> $DIR/patterns_same_crate.rs:66:15 + | +LL | while let Some(_x) = uninhabited_struct() { + | ^^^^^^^^ + +error: unreachable pattern + --> $DIR/patterns_same_crate.rs:69:15 + | +LL | while let Some(_x) = uninhabited_tuple_struct() { + | ^^^^^^^^ + +error: aborting due to 5 previous errors + diff --git a/src/test/ui/rfc-2008-non-exhaustive/variant.stderr b/src/test/ui/rfc-2008-non-exhaustive/variant.stderr index edfca78915..d9d6ea21b8 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/variant.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/variant.stderr @@ -48,5 +48,5 @@ LL | if let NonExhaustiveVariants::Struct { field } = variant_struct { error: aborting due to 8 previous errors -Some errors occurred: E0603, E0638, E0639. +Some errors have detailed explanations: E0603, E0638, E0639. For more information about an error, try `rustc --explain E0603`. diff --git a/src/test/ui/rfc-2008-non-exhaustive/variants_fictive_visibility.rs b/src/test/ui/rfc-2008-non-exhaustive/variants_fictive_visibility.rs new file mode 100644 index 0000000000..62f6e4463f --- /dev/null +++ b/src/test/ui/rfc-2008-non-exhaustive/variants_fictive_visibility.rs @@ -0,0 +1,12 @@ +// compile-pass +// aux-build:variants.rs + +extern crate variants; + +const S: u8 = 0; + +// OK, `Struct` in value namespace is crate-private, so it's filtered away +// and there's no conflict with the previously defined `const S`. +use variants::NonExhaustiveVariants::Struct as S; + +fn main() {} diff --git a/src/test/ui/rfc-2093-infer-outlives/cross-crate.rs b/src/test/ui/rfc-2093-infer-outlives/cross-crate.rs index ce50452dd5..a9bfeabf16 100644 --- a/src/test/ui/rfc-2093-infer-outlives/cross-crate.rs +++ b/src/test/ui/rfc-2093-infer-outlives/cross-crate.rs @@ -6,4 +6,3 @@ struct Foo<'a, T> { //~ ERROR rustc_outlives } fn main() {} - diff --git a/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.rs b/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.rs index 812e8c8bb3..5297d0d984 100644 --- a/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.rs +++ b/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - /* * We don't infer `T: 'static` outlives relationships by default. * Instead an additional feature gate `infer_static_outlives_requirements` @@ -14,4 +12,3 @@ struct Bar { } fn main() {} - diff --git a/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.stderr b/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.stderr index 26cbeeaf5a..b049d8a4ab 100644 --- a/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.stderr @@ -1,5 +1,5 @@ error[E0310]: the parameter type `U` may not live long enough - --> $DIR/dont-infer-static.rs:10:5 + --> $DIR/dont-infer-static.rs:8:5 | LL | struct Foo { | - help: consider adding an explicit lifetime bound `U: 'static`... @@ -7,7 +7,7 @@ LL | bar: Bar | ^^^^^^^^^^^ | note: ...so that the type `U` will meet its required lifetime bounds - --> $DIR/dont-infer-static.rs:10:5 + --> $DIR/dont-infer-static.rs:8:5 | LL | bar: Bar | ^^^^^^^^^^^ diff --git a/src/test/ui/rfc-2093-infer-outlives/enum.rs b/src/test/ui/rfc-2093-infer-outlives/enum.rs index 622794ea9a..71d2d32226 100644 --- a/src/test/ui/rfc-2093-infer-outlives/enum.rs +++ b/src/test/ui/rfc-2093-infer-outlives/enum.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![feature(rustc_attrs)] // Needs an explicit where clause stating outlives condition. (RFC 2093) diff --git a/src/test/ui/rfc-2093-infer-outlives/enum.stderr b/src/test/ui/rfc-2093-infer-outlives/enum.stderr index e81d10a66d..dd56c1f79c 100644 --- a/src/test/ui/rfc-2093-infer-outlives/enum.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/enum.stderr @@ -1,5 +1,5 @@ error: rustc_outlives - --> $DIR/enum.rs:9:1 + --> $DIR/enum.rs:7:1 | LL | / enum Foo<'a, T> { LL | | One(Bar<'a, T>) @@ -9,7 +9,7 @@ LL | | } = note: T : 'a error: rustc_outlives - --> $DIR/enum.rs:15:1 + --> $DIR/enum.rs:13:1 | LL | / struct Bar<'b, U> { LL | | field2: &'b U @@ -19,7 +19,7 @@ LL | | } = note: U : 'b error: rustc_outlives - --> $DIR/enum.rs:21:1 + --> $DIR/enum.rs:19:1 | LL | / enum Ying<'c, K> { LL | | One(&'c Yang) diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-enum.rs b/src/test/ui/rfc-2093-infer-outlives/explicit-enum.rs index b7a66a326b..c330c27fea 100644 --- a/src/test/ui/rfc-2093-infer-outlives/explicit-enum.rs +++ b/src/test/ui/rfc-2093-infer-outlives/explicit-enum.rs @@ -11,4 +11,3 @@ struct Bar<'x, T> where T: 'x { } fn main() {} - diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-struct.rs b/src/test/ui/rfc-2093-infer-outlives/explicit-struct.rs index 3c69f9f612..3d5e610b93 100644 --- a/src/test/ui/rfc-2093-infer-outlives/explicit-struct.rs +++ b/src/test/ui/rfc-2093-infer-outlives/explicit-struct.rs @@ -11,4 +11,3 @@ struct Bar<'a, T> where T: 'a { } fn main() {} - diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-union.rs b/src/test/ui/rfc-2093-infer-outlives/explicit-union.rs index 87a789b06a..a16fb7670a 100644 --- a/src/test/ui/rfc-2093-infer-outlives/explicit-union.rs +++ b/src/test/ui/rfc-2093-infer-outlives/explicit-union.rs @@ -13,4 +13,3 @@ union Bar<'a, T> where T: 'a { } fn main() {} - diff --git a/src/test/ui/rfc-2093-infer-outlives/infer-static.rs b/src/test/ui/rfc-2093-infer-outlives/infer-static.rs index 916d4849ed..bd778e3b13 100644 --- a/src/test/ui/rfc-2093-infer-outlives/infer-static.rs +++ b/src/test/ui/rfc-2093-infer-outlives/infer-static.rs @@ -10,4 +10,3 @@ struct Bar { } fn main() {} - diff --git a/src/test/ui/rfc-2093-infer-outlives/projection.rs b/src/test/ui/rfc-2093-infer-outlives/projection.rs index 0b9637e952..411c86da1d 100644 --- a/src/test/ui/rfc-2093-infer-outlives/projection.rs +++ b/src/test/ui/rfc-2093-infer-outlives/projection.rs @@ -6,4 +6,3 @@ struct Foo<'a, T: Iterator> { //~ ERROR rustc_outlives } fn main() {} - diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-struct-not-wf.stderr b/src/test/ui/rfc-2093-infer-outlives/regions-struct-not-wf.stderr index 8130f5de55..5a11c5fb95 100644 --- a/src/test/ui/rfc-2093-infer-outlives/regions-struct-not-wf.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/regions-struct-not-wf.stderr @@ -45,5 +45,5 @@ LL | impl<'a, 'b, T> Trait1<'a, 'b, T> for u32 { error: aborting due to 3 previous errors -Some errors occurred: E0309, E0491. +Some errors have detailed explanations: E0309, E0491. For more information about an error, try `rustc --explain E0309`. diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs index f1b73ee115..e885263aa8 100644 --- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs +++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs @@ -1,6 +1,7 @@ // run-pass // ignore-cloudabi no processes // ignore-emscripten no processes +// ignore-sgx no processes // Tests ensuring that `dbg!(expr)` has the expected run-time behavior. // as well as some compile time properties we expect. @@ -54,37 +55,59 @@ fn test() { 7331 })); assert_eq!(foo, 42); + + // Test trailing comma: + assert_eq!(("Yeah",), dbg!(("Yeah",))); + + // Test multiple arguments: + assert_eq!((1u8, 2u32), dbg!(1, + 2)); + + // Test multiple arguments + trailing comma: + assert_eq!((1u8, 2u32, "Yeah"), dbg!(1u8, 2u32, + "Yeah",)); } fn validate_stderr(stderr: Vec) { assert_eq!(stderr, &[ - ":21] Unit = Unit", + ":22] Unit = Unit", - ":22] a = Unit", + ":23] a = Unit", - ":28] Point{x: 42, y: 24,} = Point {", + ":29] Point{x: 42, y: 24,} = Point {", " x: 42,", " y: 24,", "}", - ":29] b = Point {", + ":30] b = Point {", " x: 42,", " y: 24,", "}", - ":37]", + ":38]", - ":41] &a = NoCopy(", + ":42] &a = NoCopy(", " 1337,", ")", - ":41] dbg!(& a) = NoCopy(", + ":42] dbg!(& a) = NoCopy(", " 1337,", ")", - ":46] f(&42) = 42", + ":47] f(&42) = 42", "before", - ":51] { foo += 1; eprintln!(\"before\"); 7331 } = 7331", + ":52] { foo += 1; eprintln!(\"before\"); 7331 } = 7331", + + ":60] (\"Yeah\",) = (", + " \"Yeah\",", + ")", + + ":63] 1 = 1", + ":63] 2 = 2", + + ":67] 1u8 = 1", + ":67] 2u32 = 2", + ":67] \"Yeah\" = \"Yeah\"", ]); } diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.nll.stderr b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.nll.stderr deleted file mode 100644 index 5f0b3a1d40..0000000000 --- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0382]: use of moved value: `a` - --> $DIR/dbg-macro-move-semantics.rs:9:18 - | -LL | let a = NoCopy(0); - | - move occurs because `a` has type `NoCopy`, which does not implement the `Copy` trait -LL | let _ = dbg!(a); - | ------- value moved here -LL | let _ = dbg!(a); - | ^ value used here after move - | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.rs b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.rs index e6ddb3d91b..9f3c567b64 100644 --- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.rs +++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.rs @@ -7,5 +7,4 @@ fn main() { let a = NoCopy(0); let _ = dbg!(a); let _ = dbg!(a); //~ ERROR use of moved value - //~^ ERROR use of moved value } diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr index cfc318c1cd..5f0b3a1d40 100644 --- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr +++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr @@ -1,25 +1,15 @@ error[E0382]: use of moved value: `a` --> $DIR/dbg-macro-move-semantics.rs:9:18 | +LL | let a = NoCopy(0); + | - move occurs because `a` has type `NoCopy`, which does not implement the `Copy` trait LL | let _ = dbg!(a); | ------- value moved here LL | let _ = dbg!(a); | ^ value used here after move | - = note: move occurs because `a` has type `NoCopy`, which does not implement the `Copy` trait = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) -error[E0382]: use of moved value: `a` - --> $DIR/dbg-macro-move-semantics.rs:9:13 - | -LL | let _ = dbg!(a); - | ------- value moved here -LL | let _ = dbg!(a); - | ^^^^^^^ value used here after move - | - = note: move occurs because `a` has type `NoCopy`, which does not implement the `Copy` trait - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/rfc1445/feature-gate.no_gate.stderr b/src/test/ui/rfc1445/feature-gate.no_gate.stderr index 370b74b877..3a2014fab0 100644 --- a/src/test/ui/rfc1445/feature-gate.no_gate.stderr +++ b/src/test/ui/rfc1445/feature-gate.no_gate.stderr @@ -1,9 +1,10 @@ -error[E0658]: the semantics of constant patterns is not yet settled (see issue #31434) +error[E0658]: the semantics of constant patterns is not yet settled --> $DIR/feature-gate.rs:13:1 | LL | #[structural_match] | ^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/31434 = help: add #![feature(structural_match)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/rfc1445/match-forbidden-without-eq.rs b/src/test/ui/rfc1445/match-forbidden-without-eq.rs index 78d799e2b0..1cca275206 100644 --- a/src/test/ui/rfc1445/match-forbidden-without-eq.rs +++ b/src/test/ui/rfc1445/match-forbidden-without-eq.rs @@ -20,6 +20,8 @@ fn main() { f32::INFINITY => { } //~^ WARNING floating-point types cannot be used in patterns //~| WARNING will become a hard error in a future release + //~| WARNING floating-point types cannot be used in patterns + //~| WARNING this was previously accepted by the compiler but is being phased out _ => { } } } diff --git a/src/test/ui/rfc1445/match-forbidden-without-eq.stderr b/src/test/ui/rfc1445/match-forbidden-without-eq.stderr index ebea2f364e..4ec1e8ddb9 100644 --- a/src/test/ui/rfc1445/match-forbidden-without-eq.stderr +++ b/src/test/ui/rfc1445/match-forbidden-without-eq.stderr @@ -14,5 +14,14 @@ LL | f32::INFINITY => { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #41620 +warning: floating-point types cannot be used in patterns + --> $DIR/match-forbidden-without-eq.rs:20:9 + | +LL | f32::INFINITY => { } + | ^^^^^^^^^^^^^ + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #41620 + error: aborting due to previous error diff --git a/src/test/ui/rfc1598-generic-associated-types/gat-dont-ice-on-absent-feature.rs b/src/test/ui/rfc1598-generic-associated-types/gat-dont-ice-on-absent-feature.rs new file mode 100644 index 0000000000..84fbb47301 --- /dev/null +++ b/src/test/ui/rfc1598-generic-associated-types/gat-dont-ice-on-absent-feature.rs @@ -0,0 +1,14 @@ +// rust-lang/rust#60654: Do not ICE on an attempt to use GATs that is +// missing the feature gate. + +struct Foo; + +impl Iterator for Foo { + type Item<'b> = &'b Foo; //~ ERROR generic associated types are unstable [E0658] + + fn next(&mut self) -> Option { + None + } +} + +fn main() { } diff --git a/src/test/ui/rfc1598-generic-associated-types/gat-dont-ice-on-absent-feature.stderr b/src/test/ui/rfc1598-generic-associated-types/gat-dont-ice-on-absent-feature.stderr new file mode 100644 index 0000000000..27b1d73d04 --- /dev/null +++ b/src/test/ui/rfc1598-generic-associated-types/gat-dont-ice-on-absent-feature.stderr @@ -0,0 +1,12 @@ +error[E0658]: generic associated types are unstable + --> $DIR/gat-dont-ice-on-absent-feature.rs:7:5 + | +LL | type Item<'b> = &'b Foo; + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: for more information, see https://github.com/rust-lang/rust/issues/44265 + = help: add #![feature(generic_associated_types)] to the crate attributes to enable + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr b/src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr index d65edc6f7e..f8c0a1f3bf 100644 --- a/src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr @@ -36,5 +36,5 @@ LL | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>; error: aborting due to 5 previous errors -Some errors occurred: E0109, E0261. +Some errors have detailed explanations: E0109, E0261. For more information about an error, try `rustc --explain E0109`. diff --git a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed b/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed index a9f4a1edbb..e51ce5d1d5 100644 --- a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed +++ b/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed @@ -12,8 +12,11 @@ //~^ ERROR unused extern crate -use edition_lint_paths as bar; -//~^ ERROR `extern crate` is not idiomatic in the new edition +// Shouldn't suggest changing to `use`, as `bar` +// would no longer be added to the prelude which could cause +// compilation errors for imports that use `bar` in other +// modules. See #57672. +extern crate edition_lint_paths as bar; fn main() { // This is not considered to *use* the `extern crate` in Rust 2018: @@ -23,4 +26,3 @@ fn main() { // But this should be a use of the (renamed) crate: crate::bar::foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.rs b/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.rs index 02e3e83df1..debbf085d6 100644 --- a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.rs +++ b/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.rs @@ -12,8 +12,11 @@ extern crate edition_lint_paths; //~^ ERROR unused extern crate +// Shouldn't suggest changing to `use`, as `bar` +// would no longer be added to the prelude which could cause +// compilation errors for imports that use `bar` in other +// modules. See #57672. extern crate edition_lint_paths as bar; -//~^ ERROR `extern crate` is not idiomatic in the new edition fn main() { // This is not considered to *use* the `extern crate` in Rust 2018: @@ -23,4 +26,3 @@ fn main() { // But this should be a use of the (renamed) crate: crate::bar::foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr b/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr index f3f9193948..13980c70a8 100644 --- a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr +++ b/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr @@ -11,11 +11,5 @@ LL | #![deny(rust_2018_idioms)] | ^^^^^^^^^^^^^^^^ = note: #[deny(unused_extern_crates)] implied by #[deny(rust_2018_idioms)] -error: `extern crate` is not idiomatic in the new edition - --> $DIR/extern-crate-idiomatic-in-2018.rs:15:1 - | -LL | extern crate edition_lint_paths as bar; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use` - -error: aborting due to 2 previous errors +error: aborting due to previous error diff --git a/src/test/ui/rust-2018/extern-crate-idiomatic.fixed b/src/test/ui/rust-2018/extern-crate-idiomatic.fixed index 38dddf38d3..3111b1dabc 100644 --- a/src/test/ui/rust-2018/extern-crate-idiomatic.fixed +++ b/src/test/ui/rust-2018/extern-crate-idiomatic.fixed @@ -16,4 +16,3 @@ use edition_lint_paths::foo; fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-idiomatic.rs b/src/test/ui/rust-2018/extern-crate-idiomatic.rs index 38dddf38d3..3111b1dabc 100644 --- a/src/test/ui/rust-2018/extern-crate-idiomatic.rs +++ b/src/test/ui/rust-2018/extern-crate-idiomatic.rs @@ -16,4 +16,3 @@ use edition_lint_paths::foo; fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.fixed b/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.fixed index e249c8a026..11b9a67ed7 100644 --- a/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.fixed +++ b/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.fixed @@ -15,4 +15,3 @@ use self::edition_lint_paths::foo; fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.rs b/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.rs index e249c8a026..11b9a67ed7 100644 --- a/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.rs +++ b/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.rs @@ -15,4 +15,3 @@ use self::edition_lint_paths::foo; fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-rename.fixed b/src/test/ui/rust-2018/extern-crate-rename.fixed index aa8b935289..c4c9bdf58c 100644 --- a/src/test/ui/rust-2018/extern-crate-rename.fixed +++ b/src/test/ui/rust-2018/extern-crate-rename.fixed @@ -16,4 +16,3 @@ use crate::my_crate::foo; fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-rename.rs b/src/test/ui/rust-2018/extern-crate-rename.rs index 98c7d341bf..8f14f2f1fe 100644 --- a/src/test/ui/rust-2018/extern-crate-rename.rs +++ b/src/test/ui/rust-2018/extern-crate-rename.rs @@ -16,4 +16,3 @@ use my_crate::foo; fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-submod.fixed b/src/test/ui/rust-2018/extern-crate-submod.fixed index 0564e58f3c..2a8e24db0b 100644 --- a/src/test/ui/rust-2018/extern-crate-submod.fixed +++ b/src/test/ui/rust-2018/extern-crate-submod.fixed @@ -23,4 +23,3 @@ use crate::m::edition_lint_paths::foo; fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/extern-crate-submod.rs b/src/test/ui/rust-2018/extern-crate-submod.rs index 206f3903b4..f3a357917c 100644 --- a/src/test/ui/rust-2018/extern-crate-submod.rs +++ b/src/test/ui/rust-2018/extern-crate-submod.rs @@ -23,4 +23,3 @@ use m::edition_lint_paths::foo; fn main() { foo(); } - diff --git a/src/test/ui/rust-2018/remove-extern-crate.fixed b/src/test/ui/rust-2018/remove-extern-crate.fixed index a977e00c01..14575d18c2 100644 --- a/src/test/ui/rust-2018/remove-extern-crate.fixed +++ b/src/test/ui/rust-2018/remove-extern-crate.fixed @@ -4,11 +4,14 @@ // aux-build:remove-extern-crate.rs // compile-flags:--extern remove_extern_crate -#![feature(alloc)] #![warn(rust_2018_idioms)] -use core as another_name; +// Shouldn't suggest changing to `use`, as `another_name` +// would no longer be added to the prelude which could cause +// compilation errors for imports that use `another_name` in other +// modules. See #57672. +extern crate core as another_name; use remove_extern_crate; #[macro_use] extern crate remove_extern_crate as something_else; diff --git a/src/test/ui/rust-2018/remove-extern-crate.rs b/src/test/ui/rust-2018/remove-extern-crate.rs index cafe82d846..0ee85f34e4 100644 --- a/src/test/ui/rust-2018/remove-extern-crate.rs +++ b/src/test/ui/rust-2018/remove-extern-crate.rs @@ -4,10 +4,13 @@ // aux-build:remove-extern-crate.rs // compile-flags:--extern remove_extern_crate -#![feature(alloc)] #![warn(rust_2018_idioms)] extern crate core; +// Shouldn't suggest changing to `use`, as `another_name` +// would no longer be added to the prelude which could cause +// compilation errors for imports that use `another_name` in other +// modules. See #57672. extern crate core as another_name; use remove_extern_crate; #[macro_use] diff --git a/src/test/ui/rust-2018/remove-extern-crate.stderr b/src/test/ui/rust-2018/remove-extern-crate.stderr index 4e08b7aa6a..5de0dfe961 100644 --- a/src/test/ui/rust-2018/remove-extern-crate.stderr +++ b/src/test/ui/rust-2018/remove-extern-crate.stderr @@ -1,24 +1,18 @@ warning: unused extern crate - --> $DIR/remove-extern-crate.rs:10:1 + --> $DIR/remove-extern-crate.rs:9:1 | LL | extern crate core; | ^^^^^^^^^^^^^^^^^^ help: remove it | note: lint level defined here - --> $DIR/remove-extern-crate.rs:8:9 + --> $DIR/remove-extern-crate.rs:7:9 | LL | #![warn(rust_2018_idioms)] | ^^^^^^^^^^^^^^^^ = note: #[warn(unused_extern_crates)] implied by #[warn(rust_2018_idioms)] warning: `extern crate` is not idiomatic in the new edition - --> $DIR/remove-extern-crate.rs:11:1 - | -LL | extern crate core as another_name; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use` - -warning: `extern crate` is not idiomatic in the new edition - --> $DIR/remove-extern-crate.rs:29:5 + --> $DIR/remove-extern-crate.rs:32:5 | LL | extern crate core; | ^^^^^^^^^^^^^^^^^^ help: convert it to a `use` diff --git a/src/test/ui/rust-2018/uniform-paths/macro-rules.stderr b/src/test/ui/rust-2018/uniform-paths/macro-rules.stderr index e1000e588f..f1b5e0c5ef 100644 --- a/src/test/ui/rust-2018/uniform-paths/macro-rules.stderr +++ b/src/test/ui/rust-2018/uniform-paths/macro-rules.stderr @@ -30,5 +30,5 @@ LL | macro legacy_macro() {} error: aborting due to 2 previous errors -Some errors occurred: E0364, E0659. +Some errors have detailed explanations: E0364, E0659. For more information about an error, try `rustc --explain E0364`. diff --git a/src/test/ui/rust-2018/uniform-paths/prelude-fail.stderr b/src/test/ui/rust-2018/uniform-paths/prelude-fail.stderr index a61af699cd..42daf7c6fb 100644 --- a/src/test/ui/rust-2018/uniform-paths/prelude-fail.stderr +++ b/src/test/ui/rust-2018/uniform-paths/prelude-fail.stderr @@ -8,7 +8,7 @@ error[E0432]: unresolved import `rustfmt` --> $DIR/prelude-fail.rs:7:5 | LL | use rustfmt::skip as imported_rustfmt_skip; - | ^^^^^^^ not a module `rustfmt` + | ^^^^^^^ `rustfmt` is a tool module, not a module error: aborting due to 2 previous errors diff --git a/src/test/ui/arbitrary-self-types-not-object-safe.rs b/src/test/ui/self/arbitrary-self-types-not-object-safe.rs similarity index 100% rename from src/test/ui/arbitrary-self-types-not-object-safe.rs rename to src/test/ui/self/arbitrary-self-types-not-object-safe.rs diff --git a/src/test/ui/arbitrary-self-types-not-object-safe.stderr b/src/test/ui/self/arbitrary-self-types-not-object-safe.stderr similarity index 100% rename from src/test/ui/arbitrary-self-types-not-object-safe.stderr rename to src/test/ui/self/arbitrary-self-types-not-object-safe.stderr diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime.rs b/src/test/ui/self/arbitrary_self_types_pin_lifetime.rs new file mode 100644 index 0000000000..ba574eeb46 --- /dev/null +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime.rs @@ -0,0 +1,60 @@ +// compile-pass + +use std::pin::Pin; +use std::task::{Context, Poll}; + +struct Foo; + +impl Foo { + fn pin_ref(self: Pin<&Self>) -> Pin<&Self> { self } + + fn pin_mut(self: Pin<&mut Self>) -> Pin<&mut Self> { self } + + fn pin_pin_pin_ref(self: Pin>>) -> Pin>> { self } + + fn pin_ref_impl_trait(self: Pin<&Self>) -> impl Clone + '_ { self } + + fn b(self: Pin<&Foo>, f: &Foo) -> Pin<&Foo> { self } +} + +type Alias = Pin; +impl Foo { + fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> Alias<&Self> { self } +} + +struct Bar { + field1: T, + field2: U, +} + +impl Bar { + fn fields(self: Pin<&mut Self>) -> (Pin<&mut T>, Pin<&mut U>) { + let this = self.get_mut(); + (Pin::new(&mut this.field1), Pin::new(&mut this.field2)) + } +} + +trait AsyncBufRead { + fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) + -> Poll>; +} + +struct Baz(Vec); + +impl AsyncBufRead for Baz { + fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) + -> Poll> + { + Poll::Ready(Ok(&self.get_mut().0)) + } +} + +fn main() { + let mut foo = Foo; + { Pin::new(&foo).pin_ref() }; + { Pin::new(&mut foo).pin_mut() }; + { Pin::new(Pin::new(Pin::new(&foo))).pin_pin_pin_ref() }; + { Pin::new(&foo).pin_ref_impl_trait() }; + let mut bar = Bar { field1: 0u8, field2: 1u8 }; + { Pin::new(&mut bar).fields() }; +} diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.nll.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.nll.stderr new file mode 100644 index 0000000000..496700781f --- /dev/null +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.nll.stderr @@ -0,0 +1,14 @@ +error: lifetime may not live long enough + --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait.rs:8:31 + | +LL | fn f(self: Pin<&Self>) -> impl Clone { self } + | - ^^^^^^^^^^ opaque type requires that `'1` must outlive `'static` + | | + | let's call the lifetime of this reference `'1` +help: to allow this impl Trait to capture borrowed data with lifetime `'1`, add `'_` as a constraint + | +LL | fn f(self: Pin<&Self>) -> impl Clone + '_ { self } + | ^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.rs b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.rs new file mode 100644 index 0000000000..ad8959727c --- /dev/null +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.rs @@ -0,0 +1,13 @@ +// compile-fail + +use std::pin::Pin; + +struct Foo; + +impl Foo { + fn f(self: Pin<&Self>) -> impl Clone { self } //~ ERROR cannot infer an appropriate lifetime +} + +fn main() { + { Pin::new(&Foo).f() }; +} diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr new file mode 100644 index 0000000000..5118280e7e --- /dev/null +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr @@ -0,0 +1,20 @@ +error: cannot infer an appropriate lifetime + --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait.rs:8:44 + | +LL | fn f(self: Pin<&Self>) -> impl Clone { self } + | ---------- ^^^^ ...but this borrow... + | | + | this return type evaluates to the `'static` lifetime... + | +note: ...can't outlive the anonymous lifetime #1 defined on the method body at 8:5 + --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait.rs:8:5 + | +LL | fn f(self: Pin<&Self>) -> impl Clone { self } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +help: you can add a constraint to the return type to make it last less than `'static` and match the anonymous lifetime #1 defined on the method body at 8:5 + | +LL | fn f(self: Pin<&Self>) -> impl Clone + '_ { self } + | ^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.nll.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.nll.stderr new file mode 100644 index 0000000000..8a0f1a804a --- /dev/null +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.nll.stderr @@ -0,0 +1,28 @@ +error: lifetime may not live long enough + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:8:46 + | +LL | fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f } + | - - ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` + | | | + | | let's call the lifetime of this reference `'1` + | let's call the lifetime of this reference `'2` + +error: lifetime may not live long enough + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:10:69 + | +LL | fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) } + | - - ^^^^^^^^^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` + | | | + | | let's call the lifetime of this reference `'1` + | let's call the lifetime of this reference `'2` + +error: lifetime may not live long enough + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:15:58 + | +LL | fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg } + | -- ---- has type `std::pin::Pin<&'1 Foo>` ^^^ function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a` + | | + | lifetime `'a` defined here + +error: aborting due to 3 previous errors + diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.rs b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.rs new file mode 100644 index 0000000000..fc5f94201b --- /dev/null +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.rs @@ -0,0 +1,18 @@ +// compile-fail + +use std::pin::Pin; + +struct Foo; + +impl Foo { + fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f } //~ ERROR E0623 + + fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) } //~ ERROR E0623 +} + +type Alias = Pin; +impl Foo { + fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg } //~ ERROR E0623 +} + +fn main() {} diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.stderr new file mode 100644 index 0000000000..3296e14f80 --- /dev/null +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.stderr @@ -0,0 +1,26 @@ +error[E0623]: lifetime mismatch + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:8:46 + | +LL | fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f } + | ---- ---- ^ ...but data from `f` is returned here + | | + | this parameter and the return type are declared with different lifetimes... + +error[E0623]: lifetime mismatch + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:10:76 + | +LL | fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) } + | ---- ----------------- ^ ...but data from `f` is returned here + | | + | this parameter and the return type are declared with different lifetimes... + +error[E0623]: lifetime mismatch + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:15:58 + | +LL | fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg } + | ------ --- ^^^ ...but data from `arg` is returned here + | | + | this parameter and the return type are declared with different lifetimes... + +error: aborting due to 3 previous errors + diff --git a/src/test/run-pass/arbitrary_self_types_pointers_and_wrappers.rs b/src/test/ui/self/arbitrary_self_types_pointers_and_wrappers.rs similarity index 99% rename from src/test/run-pass/arbitrary_self_types_pointers_and_wrappers.rs rename to src/test/ui/self/arbitrary_self_types_pointers_and_wrappers.rs index 6904c29111..65fec3beca 100644 --- a/src/test/run-pass/arbitrary_self_types_pointers_and_wrappers.rs +++ b/src/test/ui/self/arbitrary_self_types_pointers_and_wrappers.rs @@ -1,3 +1,4 @@ +// run-pass #![feature(arbitrary_self_types, unsize, coerce_unsized, dispatch_from_dyn)] #![feature(rustc_attrs)] diff --git a/src/test/run-pass/self/arbitrary_self_types_raw_pointer_struct.rs b/src/test/ui/self/arbitrary_self_types_raw_pointer_struct.rs similarity index 100% rename from src/test/run-pass/self/arbitrary_self_types_raw_pointer_struct.rs rename to src/test/ui/self/arbitrary_self_types_raw_pointer_struct.rs diff --git a/src/test/run-pass/self/arbitrary_self_types_raw_pointer_trait.rs b/src/test/ui/self/arbitrary_self_types_raw_pointer_trait.rs similarity index 100% rename from src/test/run-pass/self/arbitrary_self_types_raw_pointer_trait.rs rename to src/test/ui/self/arbitrary_self_types_raw_pointer_trait.rs diff --git a/src/test/run-pass/self/arbitrary_self_types_silly.rs b/src/test/ui/self/arbitrary_self_types_silly.rs similarity index 100% rename from src/test/run-pass/self/arbitrary_self_types_silly.rs rename to src/test/ui/self/arbitrary_self_types_silly.rs diff --git a/src/test/run-pass/arbitrary_self_types_stdlib_pointers.rs b/src/test/ui/self/arbitrary_self_types_stdlib_pointers.rs similarity index 99% rename from src/test/run-pass/arbitrary_self_types_stdlib_pointers.rs rename to src/test/ui/self/arbitrary_self_types_stdlib_pointers.rs index 9f6a647a07..29563fbbd8 100644 --- a/src/test/run-pass/arbitrary_self_types_stdlib_pointers.rs +++ b/src/test/ui/self/arbitrary_self_types_stdlib_pointers.rs @@ -1,3 +1,4 @@ +// run-pass #![feature(arbitrary_self_types)] #![feature(rustc_attrs)] diff --git a/src/test/run-pass/self/arbitrary_self_types_struct.rs b/src/test/ui/self/arbitrary_self_types_struct.rs similarity index 100% rename from src/test/run-pass/self/arbitrary_self_types_struct.rs rename to src/test/ui/self/arbitrary_self_types_struct.rs diff --git a/src/test/run-pass/self/arbitrary_self_types_trait.rs b/src/test/ui/self/arbitrary_self_types_trait.rs similarity index 100% rename from src/test/run-pass/self/arbitrary_self_types_trait.rs rename to src/test/ui/self/arbitrary_self_types_trait.rs diff --git a/src/test/run-pass/self/arbitrary_self_types_unsized_struct.rs b/src/test/ui/self/arbitrary_self_types_unsized_struct.rs similarity index 100% rename from src/test/run-pass/self/arbitrary_self_types_unsized_struct.rs rename to src/test/ui/self/arbitrary_self_types_unsized_struct.rs diff --git a/src/test/run-pass/self/auxiliary/explicit_self_xcrate.rs b/src/test/ui/self/auxiliary/explicit_self_xcrate.rs similarity index 100% rename from src/test/run-pass/self/auxiliary/explicit_self_xcrate.rs rename to src/test/ui/self/auxiliary/explicit_self_xcrate.rs diff --git a/src/test/run-pass/self/builtin-superkinds-self-type.rs b/src/test/ui/self/builtin-superkinds-self-type.rs similarity index 100% rename from src/test/run-pass/self/builtin-superkinds-self-type.rs rename to src/test/ui/self/builtin-superkinds-self-type.rs diff --git a/src/test/run-pass/self/by-value-self-in-mut-slot.rs b/src/test/ui/self/by-value-self-in-mut-slot.rs similarity index 100% rename from src/test/run-pass/self/by-value-self-in-mut-slot.rs rename to src/test/ui/self/by-value-self-in-mut-slot.rs diff --git a/src/test/run-pass/self/explicit-self-closures.rs b/src/test/ui/self/explicit-self-closures.rs similarity index 94% rename from src/test/run-pass/self/explicit-self-closures.rs rename to src/test/ui/self/explicit-self-closures.rs index 61be98fe3d..1217823da1 100644 --- a/src/test/run-pass/self/explicit-self-closures.rs +++ b/src/test/ui/self/explicit-self-closures.rs @@ -1,4 +1,4 @@ -// run-pass +// compile-pass #![allow(dead_code)] // Test to make sure that explicit self params work inside closures diff --git a/src/test/run-pass/self/explicit-self-generic.rs b/src/test/ui/self/explicit-self-generic.rs similarity index 100% rename from src/test/run-pass/self/explicit-self-generic.rs rename to src/test/ui/self/explicit-self-generic.rs diff --git a/src/test/run-pass/self/explicit-self-objects-uniq.rs b/src/test/ui/self/explicit-self-objects-uniq.rs similarity index 100% rename from src/test/run-pass/self/explicit-self-objects-uniq.rs rename to src/test/ui/self/explicit-self-objects-uniq.rs diff --git a/src/test/run-pass/self/explicit-self.rs b/src/test/ui/self/explicit-self.rs similarity index 100% rename from src/test/run-pass/self/explicit-self.rs rename to src/test/ui/self/explicit-self.rs diff --git a/src/test/run-pass/self/explicit_self_xcrate_exe.rs b/src/test/ui/self/explicit_self_xcrate_exe.rs similarity index 100% rename from src/test/run-pass/self/explicit_self_xcrate_exe.rs rename to src/test/ui/self/explicit_self_xcrate_exe.rs diff --git a/src/test/run-pass/self/move-self.rs b/src/test/ui/self/move-self.rs similarity index 100% rename from src/test/run-pass/self/move-self.rs rename to src/test/ui/self/move-self.rs diff --git a/src/test/run-pass/self/object-safety-sized-self-by-value-self.rs b/src/test/ui/self/object-safety-sized-self-by-value-self.rs similarity index 100% rename from src/test/run-pass/self/object-safety-sized-self-by-value-self.rs rename to src/test/ui/self/object-safety-sized-self-by-value-self.rs diff --git a/src/test/run-pass/self/object-safety-sized-self-generic-method.rs b/src/test/ui/self/object-safety-sized-self-generic-method.rs similarity index 100% rename from src/test/run-pass/self/object-safety-sized-self-generic-method.rs rename to src/test/ui/self/object-safety-sized-self-generic-method.rs diff --git a/src/test/run-pass/self/object-safety-sized-self-return-Self.rs b/src/test/ui/self/object-safety-sized-self-return-Self.rs similarity index 100% rename from src/test/run-pass/self/object-safety-sized-self-return-Self.rs rename to src/test/ui/self/object-safety-sized-self-return-Self.rs diff --git a/src/test/run-pass/self/self-impl.rs b/src/test/ui/self/self-impl-2.rs similarity index 100% rename from src/test/run-pass/self/self-impl.rs rename to src/test/ui/self/self-impl-2.rs diff --git a/src/test/run-pass/self/self-in-mut-slot-default-method.rs b/src/test/ui/self/self-in-mut-slot-default-method.rs similarity index 100% rename from src/test/run-pass/self/self-in-mut-slot-default-method.rs rename to src/test/ui/self/self-in-mut-slot-default-method.rs diff --git a/src/test/run-pass/self/self-in-mut-slot-immediate-value.rs b/src/test/ui/self/self-in-mut-slot-immediate-value.rs similarity index 100% rename from src/test/run-pass/self/self-in-mut-slot-immediate-value.rs rename to src/test/ui/self/self-in-mut-slot-immediate-value.rs diff --git a/src/test/run-pass/self/self-in-typedefs.rs b/src/test/ui/self/self-in-typedefs.rs similarity index 96% rename from src/test/run-pass/self/self-in-typedefs.rs rename to src/test/ui/self/self-in-typedefs.rs index 9c0906013f..e4fe7324ef 100644 --- a/src/test/run-pass/self/self-in-typedefs.rs +++ b/src/test/ui/self/self-in-typedefs.rs @@ -1,4 +1,4 @@ -// run-pass +// compile-pass #![feature(untagged_unions)] diff --git a/src/test/run-pass/self/self-re-assign.rs b/src/test/ui/self/self-re-assign.rs similarity index 100% rename from src/test/run-pass/self/self-re-assign.rs rename to src/test/ui/self/self-re-assign.rs diff --git a/src/test/run-pass/self/self-shadowing-import.rs b/src/test/ui/self/self-shadowing-import.rs similarity index 100% rename from src/test/run-pass/self/self-shadowing-import.rs rename to src/test/ui/self/self-shadowing-import.rs diff --git a/src/test/run-pass/self/self-type-param.rs b/src/test/ui/self/self-type-param.rs similarity index 93% rename from src/test/run-pass/self/self-type-param.rs rename to src/test/ui/self/self-type-param.rs index 6deae5f2d1..57e01caa69 100644 --- a/src/test/run-pass/self/self-type-param.rs +++ b/src/test/ui/self/self-type-param.rs @@ -1,4 +1,4 @@ -// run-pass +// compile-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/self/self_lifetime.rs b/src/test/ui/self/self_lifetime.rs new file mode 100644 index 0000000000..a3163ade04 --- /dev/null +++ b/src/test/ui/self/self_lifetime.rs @@ -0,0 +1,13 @@ +// compile-pass + +struct Foo<'a>(&'a ()); +impl<'a> Foo<'a> { + fn foo<'b>(self: &'b Foo<'a>) -> &() { self.0 } +} + +type Alias = Foo<'static>; +impl Alias { + fn bar<'a>(self: &Alias, arg: &'a ()) -> &() { arg } +} + +fn main() {} diff --git a/src/test/ui/self/self_type_keyword-2.stderr b/src/test/ui/self/self_type_keyword-2.stderr index eedec6896f..359410bc1c 100644 --- a/src/test/ui/self/self_type_keyword-2.stderr +++ b/src/test/ui/self/self_type_keyword-2.stderr @@ -24,5 +24,4 @@ LL | Foo { x: Self } => (), error: aborting due to 4 previous errors -Some errors occurred: E0432, E0531. -For more information about an error, try `rustc --explain E0432`. +For more information about this error, try `rustc --explain E0432`. diff --git a/src/test/ui/self/self_type_keyword.stderr b/src/test/ui/self/self_type_keyword.stderr index f75377a220..e0df00ffa9 100644 --- a/src/test/ui/self/self_type_keyword.stderr +++ b/src/test/ui/self/self_type_keyword.stderr @@ -62,7 +62,7 @@ error[E0392]: parameter `'Self` is never used --> $DIR/self_type_keyword.rs:8:12 | LL | struct Bar<'Self>; - | ^^^^^ unused type parameter + | ^^^^^ unused parameter | = help: consider removing `'Self` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/run-pass/self/string-self-append.rs b/src/test/ui/self/string-self-append.rs similarity index 100% rename from src/test/run-pass/self/string-self-append.rs rename to src/test/ui/self/string-self-append.rs diff --git a/src/test/ui/self/suggest-self.rs b/src/test/ui/self/suggest-self.rs index 9d81b6fd7c..1cc17116ea 100644 --- a/src/test/ui/self/suggest-self.rs +++ b/src/test/ui/self/suggest-self.rs @@ -39,4 +39,3 @@ fn main() { let len = this.len(); let len = my.len(); } - diff --git a/src/test/run-pass/self/ufcs-explicit-self.rs b/src/test/ui/self/ufcs-explicit-self.rs similarity index 100% rename from src/test/run-pass/self/ufcs-explicit-self.rs rename to src/test/ui/self/ufcs-explicit-self.rs diff --git a/src/test/run-pass/self/uniq-self-in-mut-slot.rs b/src/test/ui/self/uniq-self-in-mut-slot.rs similarity index 100% rename from src/test/run-pass/self/uniq-self-in-mut-slot.rs rename to src/test/ui/self/uniq-self-in-mut-slot.rs diff --git a/src/test/run-pass/self/where-for-self.rs b/src/test/ui/self/where-for-self.rs similarity index 100% rename from src/test/run-pass/self/where-for-self.rs rename to src/test/ui/self/where-for-self.rs diff --git a/src/test/ui/shift-various-bad-types.stderr b/src/test/ui/shift-various-bad-types.stderr index 1bcff65ad7..409fabb951 100644 --- a/src/test/ui/shift-various-bad-types.stderr +++ b/src/test/ui/shift-various-bad-types.stderr @@ -27,8 +27,12 @@ error[E0308]: mismatched types | LL | let _: i32 = 22_i64 >> 1_i32; | ^^^^^^^^^^^^^^^ expected i32, found i64 +help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit + | +LL | let _: i32 = (22_i64 >> 1_i32).try_into().unwrap(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 4 previous errors -Some errors occurred: E0277, E0308. +Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.stderr b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.stderr index 0e88540bcc..e10ac2e119 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.stderr +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.stderr @@ -12,4 +12,3 @@ LL | simd_saturating_sub(z, z); error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0511`. diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic.stderr b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic.stderr index 27493950af..014db52504 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic.stderr +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-arithmetic.stderr @@ -84,4 +84,3 @@ LL | simd_xor(z, z); error: aborting due to 14 previous errors -For more information about this error, try `rustc --explain E0511`. diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-bitmask.stderr b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-bitmask.stderr index d016838d09..f9135d1cbf 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-bitmask.stderr +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-bitmask.stderr @@ -30,4 +30,3 @@ LL | let _: u128 = simd_bitmask(m64); error: aborting due to 5 previous errors -For more information about this error, try `rustc --explain E0511`. diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-cast.stderr b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-cast.stderr index 6e33e3b30f..333f92a40a 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-cast.stderr +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-cast.stderr @@ -24,4 +24,3 @@ LL | simd_cast::<_, i32x8>(x); error: aborting due to 4 previous errors -For more information about this error, try `rustc --explain E0511`. diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-comparison.stderr b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-comparison.stderr index d8da2e5ee5..cea319f1bc 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-comparison.stderr +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-comparison.stderr @@ -108,4 +108,3 @@ LL | simd_ge::<_, i16x8>(x, x); error: aborting due to 18 previous errors -For more information about this error, try `rustc --explain E0511`. diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-elements.stderr b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-elements.stderr index 2f8ffb6035..3a84567b53 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-elements.stderr +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-elements.stderr @@ -90,4 +90,3 @@ LL | simd_shuffle8::<_, i32x2>(x, x, [0; 8]); error: aborting due to 15 previous errors -For more information about this error, try `rustc --explain E0511`. diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-reduction.stderr b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-reduction.stderr index b56de9613d..144571cb26 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-reduction.stderr +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-reduction.stderr @@ -72,4 +72,3 @@ LL | simd_reduce_mul_ordered(z, x); error: aborting due to 12 previous errors -For more information about this error, try `rustc --explain E0511`. diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-select.stderr b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-select.stderr index a46352c730..e03e396fdf 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-generic-select.stderr +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-generic-select.stderr @@ -48,4 +48,3 @@ LL | simd_select_bitmask("x", x, x); error: aborting due to 8 previous errors -For more information about this error, try `rustc --explain E0511`. diff --git a/src/test/ui/simd-type.stderr b/src/test/ui/simd-type.stderr index 48b9916e89..0c4242f46b 100644 --- a/src/test/ui/simd-type.stderr +++ b/src/test/ui/simd-type.stderr @@ -12,5 +12,5 @@ LL | struct i64f64(i64, f64); error: aborting due to 2 previous errors -Some errors occurred: E0075, E0076. +Some errors have detailed explanations: E0075, E0076. For more information about an error, try `rustc --explain E0075`. diff --git a/src/test/ui/slice-mut-2.nll.stderr b/src/test/ui/slice-mut-2.nll.stderr deleted file mode 100644 index bad0268772..0000000000 --- a/src/test/ui/slice-mut-2.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference - --> $DIR/slice-mut-2.rs:7:18 - | -LL | let x: &[isize] = &[1, 2, 3, 4, 5]; - | ---------------- help: consider changing this to be a mutable reference: `&mut [1, 2, 3, 4, 5]` -... -LL | let _ = &mut x[2..4]; - | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/slice-mut-2.rs b/src/test/ui/slice-mut-2.rs index 9586103f5f..216edbb780 100644 --- a/src/test/ui/slice-mut-2.rs +++ b/src/test/ui/slice-mut-2.rs @@ -4,5 +4,5 @@ fn main() { let x: &[isize] = &[1, 2, 3, 4, 5]; // Can't mutably slice an immutable slice let slice: &mut [isize] = &mut [0, 1]; - let _ = &mut x[2..4]; //~ERROR cannot borrow immutable borrowed content `*x` as mutable + let _ = &mut x[2..4]; //~ERROR cannot borrow `*x` as mutable, as it is behind a `&` reference } diff --git a/src/test/ui/slice-mut-2.stderr b/src/test/ui/slice-mut-2.stderr index 78dbfa56d4..bad0268772 100644 --- a/src/test/ui/slice-mut-2.stderr +++ b/src/test/ui/slice-mut-2.stderr @@ -1,8 +1,11 @@ -error[E0596]: cannot borrow immutable borrowed content `*x` as mutable +error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference --> $DIR/slice-mut-2.rs:7:18 | +LL | let x: &[isize] = &[1, 2, 3, 4, 5]; + | ---------------- help: consider changing this to be a mutable reference: `&mut [1, 2, 3, 4, 5]` +... LL | let _ = &mut x[2..4]; - | ^ cannot borrow as mutable + | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to previous error diff --git a/src/test/ui/span/E0493.stderr b/src/test/ui/span/E0493.stderr index d05e89e257..7e164ba968 100644 --- a/src/test/ui/span/E0493.stderr +++ b/src/test/ui/span/E0493.stderr @@ -6,4 +6,3 @@ LL | const F : Foo = (Foo { a : 0 }, Foo { a : 1 }).1; error: aborting due to previous error -For more information about this error, try `rustc --explain E0493`. diff --git a/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.nll.stderr b/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.nll.stderr deleted file mode 100644 index 0a9bc3ac51..0000000000 --- a/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.nll.stderr +++ /dev/null @@ -1,88 +0,0 @@ -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:53:24 - | -LL | fn deref_mut_field1(x: Own) { - | - help: consider changing this to be mutable: `mut x` -LL | let __isize = &mut x.y; - | ^ cannot borrow as mutable - -error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:65:10 - | -LL | fn deref_extend_mut_field1(x: &Own) -> &mut isize { - | ----------- help: consider changing this to be a mutable reference: `&mut Own` -LL | &mut x.y - | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0499]: cannot borrow `*x` as mutable more than once at a time - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:78:19 - | -LL | let _x = &mut x.x; - | - first mutable borrow occurs here -LL | let _y = &mut x.y; - | ^ second mutable borrow occurs here -LL | use_mut(_x); - | -- first borrow later used here - -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:88:5 - | -LL | fn assign_field1<'a>(x: Own) { - | - help: consider changing this to be mutable: `mut x` -LL | x.y = 3; - | ^ cannot borrow as mutable - -error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:92:5 - | -LL | fn assign_field2<'a>(x: &'a Own) { - | -------------- help: consider changing this to be a mutable reference: `&'a mut Own` -LL | x.y = 3; - | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0499]: cannot borrow `*x` as mutable more than once at a time - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:101:5 - | -LL | let _p: &mut Point = &mut **x; - | -- first mutable borrow occurs here -LL | x.y = 3; - | ^ second mutable borrow occurs here -LL | use_mut(_p); - | -- first borrow later used here - -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:109:5 - | -LL | fn deref_mut_method1(x: Own) { - | - help: consider changing this to be mutable: `mut x` -LL | x.set(0, 0); - | ^ cannot borrow as mutable - -error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:121:5 - | -LL | fn deref_extend_mut_method1(x: &Own) -> &mut isize { - | ----------- help: consider changing this to be a mutable reference: `&mut Own` -LL | x.y_mut() - | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:129:6 - | -LL | fn assign_method1<'a>(x: Own) { - | - help: consider changing this to be mutable: `mut x` -LL | *x.y_mut() = 3; - | ^ cannot borrow as mutable - -error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:133:6 - | -LL | fn assign_method2<'a>(x: &'a Own) { - | -------------- help: consider changing this to be a mutable reference: `&'a mut Own` -LL | *x.y_mut() = 3; - | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error: aborting due to 10 previous errors - -Some errors occurred: E0499, E0596. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr b/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr index 63baa7c8cb..8fceef64c8 100644 --- a/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr +++ b/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr @@ -1,18 +1,18 @@ -error[E0596]: cannot borrow immutable argument `x` as mutable +error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:53:24 | LL | fn deref_mut_field1(x: Own) { - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` LL | let __isize = &mut x.y; - | ^ cannot borrow mutably + | ^ cannot borrow as mutable -error[E0596]: cannot borrow immutable borrowed content `*x` as mutable +error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:65:10 | LL | fn deref_extend_mut_field1(x: &Own) -> &mut isize { - | ----------- use `&mut Own` here to make mutable + | ----------- help: consider changing this to be a mutable reference: `&mut Own` LL | &mut x.y - | ^ cannot borrow as mutable + | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0499]: cannot borrow `*x` as mutable more than once at a time --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:78:19 @@ -22,24 +22,23 @@ LL | let _x = &mut x.x; LL | let _y = &mut x.y; | ^ second mutable borrow occurs here LL | use_mut(_x); -LL | } - | - first borrow ends here + | -- first borrow later used here -error[E0596]: cannot borrow immutable argument `x` as mutable +error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:88:5 | LL | fn assign_field1<'a>(x: Own) { - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` LL | x.y = 3; - | ^ cannot borrow mutably + | ^ cannot borrow as mutable -error[E0596]: cannot borrow immutable borrowed content `*x` as mutable +error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:92:5 | LL | fn assign_field2<'a>(x: &'a Own) { - | -------------- use `&'a mut Own` here to make mutable + | -------------- help: consider changing this to be a mutable reference: `&'a mut Own` LL | x.y = 3; - | ^ cannot borrow as mutable + | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0499]: cannot borrow `*x` as mutable more than once at a time --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:101:5 @@ -49,42 +48,41 @@ LL | let _p: &mut Point = &mut **x; LL | x.y = 3; | ^ second mutable borrow occurs here LL | use_mut(_p); -LL | } - | - first borrow ends here + | -- first borrow later used here -error[E0596]: cannot borrow immutable argument `x` as mutable +error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:109:5 | LL | fn deref_mut_method1(x: Own) { - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` LL | x.set(0, 0); - | ^ cannot borrow mutably + | ^ cannot borrow as mutable -error[E0596]: cannot borrow immutable borrowed content `*x` as mutable +error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:121:5 | LL | fn deref_extend_mut_method1(x: &Own) -> &mut isize { - | ----------- use `&mut Own` here to make mutable + | ----------- help: consider changing this to be a mutable reference: `&mut Own` LL | x.y_mut() - | ^ cannot borrow as mutable + | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0596]: cannot borrow immutable argument `x` as mutable +error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:129:6 | LL | fn assign_method1<'a>(x: Own) { - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` LL | *x.y_mut() = 3; - | ^ cannot borrow mutably + | ^ cannot borrow as mutable -error[E0596]: cannot borrow immutable borrowed content `*x` as mutable +error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:133:6 | LL | fn assign_method2<'a>(x: &'a Own) { - | -------------- use `&'a mut Own` here to make mutable + | -------------- help: consider changing this to be a mutable reference: `&'a mut Own` LL | *x.y_mut() = 3; - | ^ cannot borrow as mutable + | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to 10 previous errors -Some errors occurred: E0499, E0596. +Some errors have detailed explanations: E0499, E0596. For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.nll.stderr b/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.nll.stderr deleted file mode 100644 index 3ebfba7e4d..0000000000 --- a/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.nll.stderr +++ /dev/null @@ -1,35 +0,0 @@ -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:29:25 - | -LL | fn deref_mut1(x: Own) { - | - help: consider changing this to be mutable: `mut x` -LL | let __isize = &mut *x; - | ^ cannot borrow as mutable - -error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:41:11 - | -LL | fn deref_extend_mut1<'a>(x: &'a Own) -> &'a mut isize { - | -------------- help: consider changing this to be a mutable reference: `&'a mut Own` -LL | &mut **x - | ^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:49:6 - | -LL | fn assign1<'a>(x: Own) { - | - help: consider changing this to be mutable: `mut x` -LL | *x = 3; - | ^ cannot borrow as mutable - -error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:53:6 - | -LL | fn assign2<'a>(x: &'a Own) { - | -------------- help: consider changing this to be a mutable reference: `&'a mut Own` -LL | **x = 3; - | ^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr b/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr index 77f3982b2b..3ebfba7e4d 100644 --- a/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr +++ b/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr @@ -1,34 +1,34 @@ -error[E0596]: cannot borrow immutable argument `x` as mutable +error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:29:25 | LL | fn deref_mut1(x: Own) { - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` LL | let __isize = &mut *x; - | ^ cannot borrow mutably + | ^ cannot borrow as mutable -error[E0596]: cannot borrow immutable borrowed content `*x` as mutable +error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:41:11 | LL | fn deref_extend_mut1<'a>(x: &'a Own) -> &'a mut isize { - | -------------- use `&'a mut Own` here to make mutable + | -------------- help: consider changing this to be a mutable reference: `&'a mut Own` LL | &mut **x - | ^^ cannot borrow as mutable + | ^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0596]: cannot borrow immutable argument `x` as mutable +error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:49:6 | LL | fn assign1<'a>(x: Own) { - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` LL | *x = 3; - | ^ cannot borrow mutably + | ^ cannot borrow as mutable -error[E0596]: cannot borrow immutable borrowed content `*x` as mutable +error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:53:6 | LL | fn assign2<'a>(x: &'a Own) { - | -------------- use `&'a mut Own` here to make mutable + | -------------- help: consider changing this to be a mutable reference: `&'a mut Own` LL | **x = 3; - | ^^ cannot borrow as mutable + | ^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to 4 previous errors diff --git a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.nll.stderr b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.nll.stderr deleted file mode 100644 index 4e2ab59f82..0000000000 --- a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.nll.stderr +++ /dev/null @@ -1,51 +0,0 @@ -error[E0499]: cannot borrow `f` as mutable more than once at a time - --> $DIR/borrowck-call-is-borrow-issue-12224.rs:12:16 - | -LL | f(Box::new(|| { - | - ^^ second mutable borrow occurs here - | | - | first mutable borrow occurs here - | first borrow later used by call -LL | -LL | f((Box::new(|| {}))) - | - second borrow occurs due to use of `f` in closure - -error[E0596]: cannot borrow `*f` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-call-is-borrow-issue-12224.rs:25:5 - | -LL | fn test2(f: &F) where F: FnMut() { - | -- help: consider changing this to be a mutable reference: `&mut F` -LL | (*f)(); - | ^^^^ `f` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `f.f` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-call-is-borrow-issue-12224.rs:34:5 - | -LL | fn test4(f: &Test) { - | ----- help: consider changing this to be a mutable reference: `&mut Test<'_>` -LL | f.f.call_mut(()) - | ^^^ `f` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0507]: cannot move out of captured variable in an `FnMut` closure - --> $DIR/borrowck-call-is-borrow-issue-12224.rs:56:13 - | -LL | let mut f = move |g: Box, b: isize| { - | ----- captured outer variable -... -LL | foo(f); - | ^ cannot move out of captured variable in an `FnMut` closure - -error[E0505]: cannot move out of `f` because it is borrowed - --> $DIR/borrowck-call-is-borrow-issue-12224.rs:55:16 - | -LL | f(Box::new(|a| { - | - ^^^ move out of `f` occurs here - | | - | borrow of `f` occurs here -LL | foo(f); - | - move occurs due to use in closure - -error: aborting due to 5 previous errors - -Some errors occurred: E0499, E0505, E0507, E0596. -For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.rs b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.rs index f246f1118b..db48bdf4c0 100644 --- a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.rs +++ b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.rs @@ -23,7 +23,7 @@ fn test1() { fn test2(f: &F) where F: FnMut() { (*f)(); - //~^ ERROR cannot borrow immutable borrowed content `*f` as mutable + //~^ ERROR cannot borrow `*f` as mutable, as it is behind a `&` reference } fn test3(f: &mut F) where F: FnMut() { @@ -32,7 +32,7 @@ fn test3(f: &mut F) where F: FnMut() { fn test4(f: &Test) { f.f.call_mut(()) - //~^ ERROR: cannot borrow field `f.f` of immutable binding as mutable + //~^ ERROR: cannot borrow `f.f` as mutable, as it is behind a `&` reference } fn test5(f: &mut Test) { @@ -53,9 +53,9 @@ fn test7() { let _ = s.len(); }; f(Box::new(|a| { + //~^ ERROR cannot move out of `f` because it is borrowed foo(f); - //~^ ERROR cannot move `f` into closure because it is borrowed - //~| ERROR cannot move out of captured outer variable in an `FnMut` closure + //~^ ERROR cannot move out of captured variable in an `FnMut` closure }), 3); } diff --git a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr index a61ee8334a..847f686562 100644 --- a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr +++ b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr @@ -5,46 +5,48 @@ LL | f(Box::new(|| { | - ^^ second mutable borrow occurs here | | | first mutable borrow occurs here + | first borrow later used by call LL | LL | f((Box::new(|| {}))) - | - borrow occurs due to use of `f` in closure -LL | })); - | - first borrow ends here + | - second borrow occurs due to use of `f` in closure -error[E0596]: cannot borrow immutable borrowed content `*f` as mutable +error[E0596]: cannot borrow `*f` as mutable, as it is behind a `&` reference --> $DIR/borrowck-call-is-borrow-issue-12224.rs:25:5 | LL | fn test2(f: &F) where F: FnMut() { - | -- use `&mut F` here to make mutable + | -- help: consider changing this to be a mutable reference: `&mut F` LL | (*f)(); - | ^^^^ cannot borrow as mutable + | ^^^^ `f` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0596]: cannot borrow field `f.f` of immutable binding as mutable +error[E0596]: cannot borrow `f.f` as mutable, as it is behind a `&` reference --> $DIR/borrowck-call-is-borrow-issue-12224.rs:34:5 | LL | fn test4(f: &Test) { - | ----- use `&mut Test` here to make mutable + | ----- help: consider changing this to be a mutable reference: `&mut Test<'_>` LL | f.f.call_mut(()) - | ^^^ cannot mutably borrow field of immutable binding + | ^^^ `f` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0504]: cannot move `f` into closure because it is borrowed - --> $DIR/borrowck-call-is-borrow-issue-12224.rs:56:13 - | -LL | f(Box::new(|a| { - | - borrow of `f` occurs here -LL | foo(f); - | ^ move into closure occurs here - -error[E0507]: cannot move out of captured outer variable in an `FnMut` closure - --> $DIR/borrowck-call-is-borrow-issue-12224.rs:56:13 +error[E0507]: cannot move out of captured variable in an `FnMut` closure + --> $DIR/borrowck-call-is-borrow-issue-12224.rs:57:13 | LL | let mut f = move |g: Box, b: isize| { | ----- captured outer variable ... LL | foo(f); - | ^ cannot move out of captured outer variable in an `FnMut` closure + | ^ cannot move out of captured variable in an `FnMut` closure + +error[E0505]: cannot move out of `f` because it is borrowed + --> $DIR/borrowck-call-is-borrow-issue-12224.rs:55:16 + | +LL | f(Box::new(|a| { + | - ^^^ move out of `f` occurs here + | | + | borrow of `f` occurs here +LL | +LL | foo(f); + | - move occurs due to use in closure error: aborting due to 5 previous errors -Some errors occurred: E0499, E0504, E0507, E0596. +Some errors have detailed explanations: E0499, E0505, E0507, E0596. For more information about an error, try `rustc --explain E0499`. diff --git a/src/test/ui/span/borrowck-call-method-from-mut-aliasable.nll.stderr b/src/test/ui/span/borrowck-call-method-from-mut-aliasable.nll.stderr deleted file mode 100644 index 6b5e0779e5..0000000000 --- a/src/test/ui/span/borrowck-call-method-from-mut-aliasable.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-call-method-from-mut-aliasable.rs:17:5 - | -LL | fn b(x: &Foo) { - | ---- help: consider changing this to be a mutable reference: `&mut Foo` -LL | x.f(); -LL | x.h(); - | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr b/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr index 440c5c9c7c..6b5e0779e5 100644 --- a/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr +++ b/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr @@ -1,11 +1,11 @@ -error[E0596]: cannot borrow immutable borrowed content `*x` as mutable +error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference --> $DIR/borrowck-call-method-from-mut-aliasable.rs:17:5 | LL | fn b(x: &Foo) { - | ---- use `&mut Foo` here to make mutable + | ---- help: consider changing this to be a mutable reference: `&mut Foo` LL | x.f(); LL | x.h(); - | ^ cannot borrow as mutable + | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to previous error diff --git a/src/test/ui/span/borrowck-fn-in-const-b.nll.stderr b/src/test/ui/span/borrowck-fn-in-const-b.nll.stderr deleted file mode 100644 index 9133d482c2..0000000000 --- a/src/test/ui/span/borrowck-fn-in-const-b.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-fn-in-const-b.rs:7:9 - | -LL | fn broken(x: &Vec) { - | ------------ help: consider changing this to be a mutable reference: `&mut std::vec::Vec` -LL | x.push(format!("this is broken")); - | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/span/borrowck-fn-in-const-b.stderr b/src/test/ui/span/borrowck-fn-in-const-b.stderr index 4a30bdf3b0..9133d482c2 100644 --- a/src/test/ui/span/borrowck-fn-in-const-b.stderr +++ b/src/test/ui/span/borrowck-fn-in-const-b.stderr @@ -1,10 +1,10 @@ -error[E0596]: cannot borrow immutable borrowed content `*x` as mutable +error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference --> $DIR/borrowck-fn-in-const-b.rs:7:9 | LL | fn broken(x: &Vec) { - | ------------ use `&mut Vec` here to make mutable + | ------------ help: consider changing this to be a mutable reference: `&mut std::vec::Vec` LL | x.push(format!("this is broken")); - | ^ cannot borrow as mutable + | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to previous error diff --git a/src/test/ui/span/borrowck-let-suggestion-suffixes.nll.stderr b/src/test/ui/span/borrowck-let-suggestion-suffixes.nll.stderr deleted file mode 100644 index f5f1193264..0000000000 --- a/src/test/ui/span/borrowck-let-suggestion-suffixes.nll.stderr +++ /dev/null @@ -1,42 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/borrowck-let-suggestion-suffixes.rs:19:14 - | -LL | v3.push(&id('x')); // statement 6 - | ^^^^^^^ - temporary value is freed at the end of this statement - | | - | creates a temporary which is freed while still in use -... -LL | (v1, v2, v3, /* v4 is above. */ v5).use_ref(); - | -- borrow later used here - | - = note: consider using a `let` binding to create a longer lived value - -error[E0716]: temporary value dropped while borrowed - --> $DIR/borrowck-let-suggestion-suffixes.rs:29:18 - | -LL | v4.push(&id('y')); - | ^^^^^^^ - temporary value is freed at the end of this statement - | | - | creates a temporary which is freed while still in use -... -LL | v4.use_ref(); - | -- borrow later used here - | - = note: consider using a `let` binding to create a longer lived value - -error[E0716]: temporary value dropped while borrowed - --> $DIR/borrowck-let-suggestion-suffixes.rs:40:14 - | -LL | v5.push(&id('z')); - | ^^^^^^^ - temporary value is freed at the end of this statement - | | - | creates a temporary which is freed while still in use -... -LL | (v1, v2, v3, /* v4 is above. */ v5).use_ref(); - | -- borrow later used here - | - = note: consider using a `let` binding to create a longer lived value - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/span/borrowck-let-suggestion-suffixes.rs b/src/test/ui/span/borrowck-let-suggestion-suffixes.rs index 4b14907cec..4744f3710c 100644 --- a/src/test/ui/span/borrowck-let-suggestion-suffixes.rs +++ b/src/test/ui/span/borrowck-let-suggestion-suffixes.rs @@ -1,4 +1,3 @@ -#![feature(rustc_attrs)] fn id(x: T) -> T { x } fn f() { @@ -7,51 +6,52 @@ fn f() { let mut v2 = Vec::new(); // statement 2 - let young = ['y']; // statement 3 + { + let young = ['y']; // statement 3 - v2.push(&young[0]); // statement 4 - //~^ ERROR `young[..]` does not live long enough - //~| NOTE borrowed value does not live long enough - //~| NOTE values in a scope are dropped in the opposite order they are created + v2.push(&young[0]); // statement 4 + //~^ ERROR `young[_]` does not live long enough + //~| NOTE borrowed value does not live long enough + } //~ NOTE `young[_]` dropped here while still borrowed let mut v3 = Vec::new(); // statement 5 v3.push(&id('x')); // statement 6 - //~^ ERROR borrowed value does not live long enough - //~| NOTE temporary value does not live long enough - //~| NOTE temporary value dropped here while still borrowed - //~| NOTE consider using a `let` binding to increase its lifetime + //~^ ERROR temporary value dropped while borrowed + //~| NOTE creates a temporary which is freed while still in use + //~| NOTE temporary value is freed at the end of this statement + //~| NOTE consider using a `let` binding to create a longer lived value { let mut v4 = Vec::new(); // (sub) statement 0 v4.push(&id('y')); - //~^ ERROR borrowed value does not live long enough - //~| NOTE temporary value does not live long enough - //~| NOTE temporary value dropped here while still borrowed - //~| NOTE consider using a `let` binding to increase its lifetime + //~^ ERROR temporary value dropped while borrowed + //~| NOTE creates a temporary which is freed while still in use + //~| NOTE temporary value is freed at the end of this statement + //~| NOTE consider using a `let` binding to create a longer lived value v4.use_ref(); + //~^ NOTE borrow later used here } // (statement 7) - //~^ NOTE temporary value needs to live until here let mut v5 = Vec::new(); // statement 8 v5.push(&id('z')); - //~^ ERROR borrowed value does not live long enough - //~| NOTE temporary value does not live long enough - //~| NOTE temporary value dropped here while still borrowed - //~| NOTE consider using a `let` binding to increase its lifetime + //~^ ERROR temporary value dropped while borrowed + //~| NOTE creates a temporary which is freed while still in use + //~| NOTE temporary value is freed at the end of this statement + //~| NOTE consider using a `let` binding to create a longer lived value v1.push(&old[0]); (v1, v2, v3, /* v4 is above. */ v5).use_ref(); + //~^ NOTE borrow later used here + //~| NOTE borrow later used here + //~| NOTE borrow later used here } -//~^ NOTE `young[..]` dropped here while still borrowed -//~| NOTE temporary value needs to live until here -//~| NOTE temporary value needs to live until here -fn main() { #![rustc_error] // rust-lang/rust#49855 +fn main() { f(); } diff --git a/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr b/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr index 8bf542e37f..7ba909d208 100644 --- a/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr +++ b/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr @@ -1,53 +1,55 @@ -error[E0597]: `young[..]` does not live long enough - --> $DIR/borrowck-let-suggestion-suffixes.rs:12:14 +error[E0597]: `young[_]` does not live long enough + --> $DIR/borrowck-let-suggestion-suffixes.rs:12:17 | -LL | v2.push(&young[0]); // statement 4 - | ^^^^^^^^ borrowed value does not live long enough +LL | v2.push(&young[0]); // statement 4 + | ^^^^^^^^^ borrowed value does not live long enough ... -LL | } - | - `young[..]` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `young[_]` dropped here while still borrowed +... +LL | (v1, v2, v3, /* v4 is above. */ v5).use_ref(); + | -- borrow later used here -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/borrowck-let-suggestion-suffixes.rs:19:14 | LL | v3.push(&id('x')); // statement 6 - | ^^^^^^^ - temporary value dropped here while still borrowed + | ^^^^^^^ - temporary value is freed at the end of this statement | | - | temporary value does not live long enough + | creates a temporary which is freed while still in use ... -LL | } - | - temporary value needs to live until here +LL | (v1, v2, v3, /* v4 is above. */ v5).use_ref(); + | -- borrow later used here | - = note: consider using a `let` binding to increase its lifetime + = note: consider using a `let` binding to create a longer lived value -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/borrowck-let-suggestion-suffixes.rs:29:18 | LL | v4.push(&id('y')); - | ^^^^^^^ - temporary value dropped here while still borrowed + | ^^^^^^^ - temporary value is freed at the end of this statement | | - | temporary value does not live long enough + | creates a temporary which is freed while still in use ... -LL | } // (statement 7) - | - temporary value needs to live until here +LL | v4.use_ref(); + | -- borrow later used here | - = note: consider using a `let` binding to increase its lifetime + = note: consider using a `let` binding to create a longer lived value -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/borrowck-let-suggestion-suffixes.rs:40:14 | LL | v5.push(&id('z')); - | ^^^^^^^ - temporary value dropped here while still borrowed + | ^^^^^^^ - temporary value is freed at the end of this statement | | - | temporary value does not live long enough + | creates a temporary which is freed while still in use ... -LL | } - | - temporary value needs to live until here +LL | (v1, v2, v3, /* v4 is above. */ v5).use_ref(); + | -- borrow later used here | - = note: consider using a `let` binding to increase its lifetime + = note: consider using a `let` binding to create a longer lived value error: aborting due to 4 previous errors -For more information about this error, try `rustc --explain E0597`. +Some errors have detailed explanations: E0597, E0716. +For more information about an error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/borrowck-object-mutability.nll.stderr b/src/test/ui/span/borrowck-object-mutability.nll.stderr deleted file mode 100644 index fe6014cd5a..0000000000 --- a/src/test/ui/span/borrowck-object-mutability.nll.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference - --> $DIR/borrowck-object-mutability.rs:8:5 - | -LL | fn borrowed_receiver(x: &Foo) { - | ---- help: consider changing this to be a mutable reference: `&mut dyn Foo` -LL | x.borrowed(); -LL | x.borrowed_mut(); - | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `*x` as mutable, as `x` is not declared as mutable - --> $DIR/borrowck-object-mutability.rs:18:5 - | -LL | fn owned_receiver(x: Box) { - | - help: consider changing this to be mutable: `mut x` -LL | x.borrowed(); -LL | x.borrowed_mut(); - | ^ cannot borrow as mutable - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/span/borrowck-object-mutability.stderr b/src/test/ui/span/borrowck-object-mutability.stderr index 073a70e361..fe6014cd5a 100644 --- a/src/test/ui/span/borrowck-object-mutability.stderr +++ b/src/test/ui/span/borrowck-object-mutability.stderr @@ -1,17 +1,17 @@ -error[E0596]: cannot borrow immutable borrowed content `*x` as mutable +error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference --> $DIR/borrowck-object-mutability.rs:8:5 | LL | fn borrowed_receiver(x: &Foo) { - | ---- use `&mut Foo` here to make mutable + | ---- help: consider changing this to be a mutable reference: `&mut dyn Foo` LL | x.borrowed(); LL | x.borrowed_mut(); - | ^ cannot borrow as mutable + | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0596]: cannot borrow immutable `Box` content `*x` as mutable +error[E0596]: cannot borrow `*x` as mutable, as `x` is not declared as mutable --> $DIR/borrowck-object-mutability.rs:18:5 | LL | fn owned_receiver(x: Box) { - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` LL | x.borrowed(); LL | x.borrowed_mut(); | ^ cannot borrow as mutable diff --git a/src/test/ui/span/borrowck-ref-into-rvalue.nll.stderr b/src/test/ui/span/borrowck-ref-into-rvalue.nll.stderr deleted file mode 100644 index 4f529ce951..0000000000 --- a/src/test/ui/span/borrowck-ref-into-rvalue.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/borrowck-ref-into-rvalue.rs:3:11 - | -LL | match Some("Hello".to_string()) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use -... -LL | } - | - temporary value is freed at the end of this statement -LL | println!("{}", *msg); - | ---- borrow later used here - | - = note: consider using a `let` binding to create a longer lived value - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/span/borrowck-ref-into-rvalue.rs b/src/test/ui/span/borrowck-ref-into-rvalue.rs index aeaebf073a..c11aa1af54 100644 --- a/src/test/ui/span/borrowck-ref-into-rvalue.rs +++ b/src/test/ui/span/borrowck-ref-into-rvalue.rs @@ -1,8 +1,8 @@ fn main() { let msg; match Some("Hello".to_string()) { + //~^ ERROR temporary value dropped while borrowed Some(ref m) => { - //~^ ERROR borrowed value does not live long enough msg = m; }, None => { panic!() } diff --git a/src/test/ui/span/borrowck-ref-into-rvalue.stderr b/src/test/ui/span/borrowck-ref-into-rvalue.stderr index b8e79be8b6..4f529ce951 100644 --- a/src/test/ui/span/borrowck-ref-into-rvalue.stderr +++ b/src/test/ui/span/borrowck-ref-into-rvalue.stderr @@ -1,17 +1,16 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/borrowck-ref-into-rvalue.rs:4:14 +error[E0716]: temporary value dropped while borrowed + --> $DIR/borrowck-ref-into-rvalue.rs:3:11 | -LL | Some(ref m) => { - | ^^^^^ borrowed value does not live long enough +LL | match Some("Hello".to_string()) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use ... LL | } - | - borrowed value dropped here while still borrowed + | - temporary value is freed at the end of this statement LL | println!("{}", *msg); -LL | } - | - borrowed value needs to live until here + | ---- borrow later used here | - = note: consider using a `let` binding to increase its lifetime + = note: consider using a `let` binding to create a longer lived value error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/span/destructor-restrictions.nll.stderr b/src/test/ui/span/destructor-restrictions.nll.stderr deleted file mode 100644 index a3c6cfb6ae..0000000000 --- a/src/test/ui/span/destructor-restrictions.nll.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0597]: `*a` does not live long enough - --> $DIR/destructor-restrictions.rs:8:10 - | -LL | *a.borrow() + 1 - | ^--------- - | | - | borrowed value does not live long enough - | a temporary with access to the borrow is created here ... -LL | }; - | -- ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::cell::Ref<'_, i32>` - | | - | `*a` dropped here while still borrowed - | - = note: The temporary is part of an expression at the end of a block. Consider forcing this temporary to be dropped sooner, before the block's local variables are dropped. For example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block. - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/destructor-restrictions.stderr b/src/test/ui/span/destructor-restrictions.stderr index a82e24b939..a3c6cfb6ae 100644 --- a/src/test/ui/span/destructor-restrictions.stderr +++ b/src/test/ui/span/destructor-restrictions.stderr @@ -2,11 +2,16 @@ error[E0597]: `*a` does not live long enough --> $DIR/destructor-restrictions.rs:8:10 | LL | *a.borrow() + 1 - | ^ borrowed value does not live long enough + | ^--------- + | | + | borrowed value does not live long enough + | a temporary with access to the borrow is created here ... LL | }; - | -- borrowed value needs to live until here + | -- ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::cell::Ref<'_, i32>` | | | `*a` dropped here while still borrowed + | + = note: The temporary is part of an expression at the end of a block. Consider forcing this temporary to be dropped sooner, before the block's local variables are dropped. For example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block. error: aborting due to previous error diff --git a/src/test/ui/span/dropck-object-cycle.nll.stderr b/src/test/ui/span/dropck-object-cycle.nll.stderr deleted file mode 100644 index cfaf470212..0000000000 --- a/src/test/ui/span/dropck-object-cycle.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0597]: `*m` does not live long enough - --> $DIR/dropck-object-cycle.rs:27:31 - | -LL | assert_eq!(object_invoke1(&*m), (4,5)); - | ^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `*m` dropped here while still borrowed - | borrow might be used here, when `m` is dropped and runs the destructor for type `std::boxed::Box>` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/dropck-object-cycle.rs b/src/test/ui/span/dropck-object-cycle.rs index 7b7f37d53f..8dc70ea252 100644 --- a/src/test/ui/span/dropck-object-cycle.rs +++ b/src/test/ui/span/dropck-object-cycle.rs @@ -45,4 +45,3 @@ pub fn main() { // the type of `m` *strictly outlives* `'m`. Hence we get an // error. } - diff --git a/src/test/ui/span/dropck-object-cycle.stderr b/src/test/ui/span/dropck-object-cycle.stderr index 3fc52853d0..cfaf470212 100644 --- a/src/test/ui/span/dropck-object-cycle.stderr +++ b/src/test/ui/span/dropck-object-cycle.stderr @@ -1,13 +1,14 @@ error[E0597]: `*m` does not live long enough - --> $DIR/dropck-object-cycle.rs:27:32 + --> $DIR/dropck-object-cycle.rs:27:31 | LL | assert_eq!(object_invoke1(&*m), (4,5)); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough ... LL | } - | - `*m` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + | - + | | + | `*m` dropped here while still borrowed + | borrow might be used here, when `m` is dropped and runs the destructor for type `std::boxed::Box>` error: aborting due to previous error diff --git a/src/test/ui/span/dropck_arr_cycle_checked.nll.stderr b/src/test/ui/span/dropck_arr_cycle_checked.nll.stderr deleted file mode 100644 index e9caae64be..0000000000 --- a/src/test/ui/span/dropck_arr_cycle_checked.nll.stderr +++ /dev/null @@ -1,43 +0,0 @@ -error[E0597]: `b2` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:93:24 - | -LL | b1.a[0].v.set(Some(&b2)); - | ^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `b2` dropped here while still borrowed - | borrow might be used here, when `b1` is dropped and runs the destructor for type `B<'_>` - | - = note: values in a scope are dropped in the opposite order they are defined - -error[E0597]: `b3` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:95:24 - | -LL | b1.a[1].v.set(Some(&b3)); - | ^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `b3` dropped here while still borrowed - | borrow might be used here, when `b1` is dropped and runs the destructor for type `B<'_>` - | - = note: values in a scope are dropped in the opposite order they are defined - -error[E0597]: `b1` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:101:24 - | -LL | b3.a[0].v.set(Some(&b1)); - | ^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `b1` dropped here while still borrowed - | borrow might be used here, when `b1` is dropped and runs the destructor for type `B<'_>` - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/dropck_arr_cycle_checked.rs b/src/test/ui/span/dropck_arr_cycle_checked.rs index 35145014a5..ac31e4910d 100644 --- a/src/test/ui/span/dropck_arr_cycle_checked.rs +++ b/src/test/ui/span/dropck_arr_cycle_checked.rs @@ -95,13 +95,10 @@ fn f() { b1.a[1].v.set(Some(&b3)); //~^ ERROR `b3` does not live long enough b2.a[0].v.set(Some(&b2)); - //~^ ERROR `b2` does not live long enough b2.a[1].v.set(Some(&b3)); - //~^ ERROR `b3` does not live long enough b3.a[0].v.set(Some(&b1)); //~^ ERROR `b1` does not live long enough b3.a[1].v.set(Some(&b2)); - //~^ ERROR `b2` does not live long enough } fn main() { diff --git a/src/test/ui/span/dropck_arr_cycle_checked.stderr b/src/test/ui/span/dropck_arr_cycle_checked.stderr index b2bacc7f67..068c779ae5 100644 --- a/src/test/ui/span/dropck_arr_cycle_checked.stderr +++ b/src/test/ui/span/dropck_arr_cycle_checked.stderr @@ -1,69 +1,43 @@ error[E0597]: `b2` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:93:25 + --> $DIR/dropck_arr_cycle_checked.rs:93:24 | LL | b1.a[0].v.set(Some(&b2)); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough ... LL | } - | - `b2` dropped here while still borrowed + | - + | | + | `b2` dropped here while still borrowed + | borrow might be used here, when `b1` is dropped and runs the destructor for type `B<'_>` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `b3` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:95:25 + --> $DIR/dropck_arr_cycle_checked.rs:95:24 | LL | b1.a[1].v.set(Some(&b3)); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough ... LL | } - | - `b3` dropped here while still borrowed + | - + | | + | `b3` dropped here while still borrowed + | borrow might be used here, when `b1` is dropped and runs the destructor for type `B<'_>` | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `b2` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:97:25 - | -LL | b2.a[0].v.set(Some(&b2)); - | ^^ borrowed value does not live long enough -... -LL | } - | - `b2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `b3` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:99:25 - | -LL | b2.a[1].v.set(Some(&b3)); - | ^^ borrowed value does not live long enough -... -LL | } - | - `b3` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `b1` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:101:25 + --> $DIR/dropck_arr_cycle_checked.rs:99:24 | LL | b3.a[0].v.set(Some(&b1)); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough ... LL | } - | - `b1` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `b2` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:103:25 - | -LL | b3.a[1].v.set(Some(&b2)); - | ^^ borrowed value does not live long enough -LL | -LL | } - | - `b2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + | - + | | + | `b1` dropped here while still borrowed + | borrow might be used here, when `b1` is dropped and runs the destructor for type `B<'_>` -error: aborting due to 6 previous errors +error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/dropck_direct_cycle_with_drop.nll.stderr b/src/test/ui/span/dropck_direct_cycle_with_drop.nll.stderr deleted file mode 100644 index 07ae138ac7..0000000000 --- a/src/test/ui/span/dropck_direct_cycle_with_drop.nll.stderr +++ /dev/null @@ -1,29 +0,0 @@ -error[E0597]: `d2` does not live long enough - --> $DIR/dropck_direct_cycle_with_drop.rs:36:19 - | -LL | d1.p.set(Some(&d2)); - | ^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `d2` dropped here while still borrowed - | borrow might be used here, when `d1` is dropped and runs the `Drop` code for type `D` - | - = note: values in a scope are dropped in the opposite order they are defined - -error[E0597]: `d1` does not live long enough - --> $DIR/dropck_direct_cycle_with_drop.rs:38:19 - | -LL | d2.p.set(Some(&d1)); - | ^^^ borrowed value does not live long enough -LL | -LL | } - | - - | | - | `d1` dropped here while still borrowed - | borrow might be used here, when `d1` is dropped and runs the `Drop` code for type `D` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/dropck_direct_cycle_with_drop.stderr b/src/test/ui/span/dropck_direct_cycle_with_drop.stderr index 497924208a..07ae138ac7 100644 --- a/src/test/ui/span/dropck_direct_cycle_with_drop.stderr +++ b/src/test/ui/span/dropck_direct_cycle_with_drop.stderr @@ -1,24 +1,28 @@ error[E0597]: `d2` does not live long enough - --> $DIR/dropck_direct_cycle_with_drop.rs:36:20 + --> $DIR/dropck_direct_cycle_with_drop.rs:36:19 | LL | d1.p.set(Some(&d2)); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough ... LL | } - | - `d2` dropped here while still borrowed + | - + | | + | `d2` dropped here while still borrowed + | borrow might be used here, when `d1` is dropped and runs the `Drop` code for type `D` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `d1` does not live long enough - --> $DIR/dropck_direct_cycle_with_drop.rs:38:20 + --> $DIR/dropck_direct_cycle_with_drop.rs:38:19 | LL | d2.p.set(Some(&d1)); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough LL | LL | } - | - `d1` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + | - + | | + | `d1` dropped here while still borrowed + | borrow might be used here, when `d1` is dropped and runs the `Drop` code for type `D` error: aborting due to 2 previous errors diff --git a/src/test/ui/span/dropck_misc_variants.nll.stderr b/src/test/ui/span/dropck_misc_variants.nll.stderr deleted file mode 100644 index 76e90574ce..0000000000 --- a/src/test/ui/span/dropck_misc_variants.nll.stderr +++ /dev/null @@ -1,30 +0,0 @@ -error[E0597]: `bomb` does not live long enough - --> $DIR/dropck_misc_variants.rs:23:36 - | -LL | _w = Wrap::<&[&str]>(NoisyDrop(&bomb)); - | ^^^^^ borrowed value does not live long enough -LL | } - | - - | | - | `bomb` dropped here while still borrowed - | borrow might be used here, when `_w` is dropped and runs the destructor for type `Wrap<&[&str]>` - | - = note: values in a scope are dropped in the opposite order they are defined - -error[E0597]: `v` does not live long enough - --> $DIR/dropck_misc_variants.rs:31:27 - | -LL | let u = NoisyDrop(&v); - | ^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `v` dropped here while still borrowed - | borrow might be used here, when `_w` is dropped and runs the destructor for closure - | - = note: values in a scope are dropped in the opposite order they are defined - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/dropck_misc_variants.stderr b/src/test/ui/span/dropck_misc_variants.stderr index b2de455cdc..76e90574ce 100644 --- a/src/test/ui/span/dropck_misc_variants.stderr +++ b/src/test/ui/span/dropck_misc_variants.stderr @@ -1,23 +1,29 @@ error[E0597]: `bomb` does not live long enough - --> $DIR/dropck_misc_variants.rs:23:37 + --> $DIR/dropck_misc_variants.rs:23:36 | LL | _w = Wrap::<&[&str]>(NoisyDrop(&bomb)); - | ^^^^ borrowed value does not live long enough + | ^^^^^ borrowed value does not live long enough LL | } - | - `bomb` dropped here while still borrowed + | - + | | + | `bomb` dropped here while still borrowed + | borrow might be used here, when `_w` is dropped and runs the destructor for type `Wrap<&[&str]>` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `v` does not live long enough - --> $DIR/dropck_misc_variants.rs:31:28 + --> $DIR/dropck_misc_variants.rs:31:27 | LL | let u = NoisyDrop(&v); - | ^ borrowed value does not live long enough + | ^^ borrowed value does not live long enough ... LL | } - | - `v` dropped here while still borrowed + | - + | | + | `v` dropped here while still borrowed + | borrow might be used here, when `_w` is dropped and runs the destructor for closure | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to 2 previous errors diff --git a/src/test/ui/span/dropck_vec_cycle_checked.nll.stderr b/src/test/ui/span/dropck_vec_cycle_checked.nll.stderr deleted file mode 100644 index 05692515af..0000000000 --- a/src/test/ui/span/dropck_vec_cycle_checked.nll.stderr +++ /dev/null @@ -1,43 +0,0 @@ -error[E0597]: `c2` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:98:24 - | -LL | c1.v[0].v.set(Some(&c2)); - | ^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `c2` dropped here while still borrowed - | borrow might be used here, when `c1` is dropped and runs the destructor for type `C<'_>` - | - = note: values in a scope are dropped in the opposite order they are defined - -error[E0597]: `c3` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:100:24 - | -LL | c1.v[1].v.set(Some(&c3)); - | ^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `c3` dropped here while still borrowed - | borrow might be used here, when `c1` is dropped and runs the destructor for type `C<'_>` - | - = note: values in a scope are dropped in the opposite order they are defined - -error[E0597]: `c1` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:106:24 - | -LL | c3.v[0].v.set(Some(&c1)); - | ^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `c1` dropped here while still borrowed - | borrow might be used here, when `c1` is dropped and runs the destructor for type `C<'_>` - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/dropck_vec_cycle_checked.rs b/src/test/ui/span/dropck_vec_cycle_checked.rs index c80e0386e6..bacd99c682 100644 --- a/src/test/ui/span/dropck_vec_cycle_checked.rs +++ b/src/test/ui/span/dropck_vec_cycle_checked.rs @@ -100,13 +100,10 @@ fn f() { c1.v[1].v.set(Some(&c3)); //~^ ERROR `c3` does not live long enough c2.v[0].v.set(Some(&c2)); - //~^ ERROR `c2` does not live long enough c2.v[1].v.set(Some(&c3)); - //~^ ERROR `c3` does not live long enough c3.v[0].v.set(Some(&c1)); //~^ ERROR `c1` does not live long enough c3.v[1].v.set(Some(&c2)); - //~^ ERROR `c2` does not live long enough } fn main() { diff --git a/src/test/ui/span/dropck_vec_cycle_checked.stderr b/src/test/ui/span/dropck_vec_cycle_checked.stderr index 7f902388fa..7ff991c0c3 100644 --- a/src/test/ui/span/dropck_vec_cycle_checked.stderr +++ b/src/test/ui/span/dropck_vec_cycle_checked.stderr @@ -1,69 +1,43 @@ error[E0597]: `c2` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:98:25 + --> $DIR/dropck_vec_cycle_checked.rs:98:24 | LL | c1.v[0].v.set(Some(&c2)); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough ... LL | } - | - `c2` dropped here while still borrowed + | - + | | + | `c2` dropped here while still borrowed + | borrow might be used here, when `c1` is dropped and runs the destructor for type `C<'_>` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `c3` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:100:25 + --> $DIR/dropck_vec_cycle_checked.rs:100:24 | LL | c1.v[1].v.set(Some(&c3)); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough ... LL | } - | - `c3` dropped here while still borrowed + | - + | | + | `c3` dropped here while still borrowed + | borrow might be used here, when `c1` is dropped and runs the destructor for type `C<'_>` | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c2` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:102:25 - | -LL | c2.v[0].v.set(Some(&c2)); - | ^^ borrowed value does not live long enough -... -LL | } - | - `c2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c3` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:104:25 - | -LL | c2.v[1].v.set(Some(&c3)); - | ^^ borrowed value does not live long enough -... -LL | } - | - `c3` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `c1` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:106:25 + --> $DIR/dropck_vec_cycle_checked.rs:104:24 | LL | c3.v[0].v.set(Some(&c1)); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough ... LL | } - | - `c1` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `c2` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:108:25 - | -LL | c3.v[1].v.set(Some(&c2)); - | ^^ borrowed value does not live long enough -LL | -LL | } - | - `c2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + | - + | | + | `c1` dropped here while still borrowed + | borrow might be used here, when `c1` is dropped and runs the destructor for type `C<'_>` -error: aborting due to 6 previous errors +error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/gated-features-attr-spans.stderr b/src/test/ui/span/gated-features-attr-spans.stderr index 45d14f32f9..938edbe463 100644 --- a/src/test/ui/span/gated-features-attr-spans.stderr +++ b/src/test/ui/span/gated-features-attr-spans.stderr @@ -1,9 +1,10 @@ -error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) +error[E0658]: SIMD types are experimental and possibly buggy --> $DIR/gated-features-attr-spans.rs:1:1 | LL | #[repr(simd)] | ^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/27731 = help: add #![feature(repr_simd)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/span/impl-wrong-item-for-trait.stderr b/src/test/ui/span/impl-wrong-item-for-trait.stderr index 8e08d3690e..81409aac28 100644 --- a/src/test/ui/span/impl-wrong-item-for-trait.stderr +++ b/src/test/ui/span/impl-wrong-item-for-trait.stderr @@ -68,5 +68,5 @@ LL | impl Debug for FooTypeForMethod { error: aborting due to 8 previous errors -Some errors occurred: E0046, E0323, E0324, E0325, E0437. +Some errors have detailed explanations: E0046, E0323, E0324, E0325, E0437. For more information about an error, try `rustc --explain E0046`. diff --git a/src/test/ui/span/issue-11925.nll.stderr b/src/test/ui/span/issue-11925.nll.stderr deleted file mode 100644 index 1d317fc331..0000000000 --- a/src/test/ui/span/issue-11925.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0515]: cannot return reference to local data `x` - --> $DIR/issue-11925.rs:8:35 - | -LL | let f = to_fn_once(move|| &x); - | ^^ returns a reference to data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/span/issue-11925.rs b/src/test/ui/span/issue-11925.rs index 276aaa1c29..0f6472b05f 100644 --- a/src/test/ui/span/issue-11925.rs +++ b/src/test/ui/span/issue-11925.rs @@ -5,7 +5,7 @@ fn to_fn_once>(f: F) -> F { f } fn main() { let r = { let x: Box<_> = box 42; - let f = to_fn_once(move|| &x); //~ ERROR does not live long enough + let f = to_fn_once(move|| &x); //~ ERROR cannot return reference to local data `x` f() }; diff --git a/src/test/ui/span/issue-11925.stderr b/src/test/ui/span/issue-11925.stderr index c75022261a..1d317fc331 100644 --- a/src/test/ui/span/issue-11925.stderr +++ b/src/test/ui/span/issue-11925.stderr @@ -1,15 +1,9 @@ -error[E0597]: `x` does not live long enough - --> $DIR/issue-11925.rs:8:36 +error[E0515]: cannot return reference to local data `x` + --> $DIR/issue-11925.rs:8:35 | LL | let f = to_fn_once(move|| &x); - | ^ - | | - | borrowed value does not live long enough - | `x` dropped here while still borrowed -... -LL | } - | - borrowed value needs to live until here + | ^^ returns a reference to data owned by the current function error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/span/issue-15480.nll.stderr b/src/test/ui/span/issue-15480.nll.stderr deleted file mode 100644 index 23ee2256dd..0000000000 --- a/src/test/ui/span/issue-15480.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/issue-15480.rs:5:10 - | -LL | &id(3) - | ^^^^^ creates a temporary which is freed while still in use -LL | ]; - | - temporary value is freed at the end of this statement -... -LL | for &&x in &v { - | -- borrow later used here - | - = note: consider using a `let` binding to create a longer lived value - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/span/issue-15480.rs b/src/test/ui/span/issue-15480.rs index c102423409..b286d94178 100644 --- a/src/test/ui/span/issue-15480.rs +++ b/src/test/ui/span/issue-15480.rs @@ -4,7 +4,7 @@ fn main() { let v = vec![ &id(3) ]; - //~^^ ERROR borrowed value does not live long enough + //~^^ ERROR temporary value dropped while borrowed for &&x in &v { println!("{}", x + 3); diff --git a/src/test/ui/span/issue-15480.stderr b/src/test/ui/span/issue-15480.stderr index c5e3899fac..23ee2256dd 100644 --- a/src/test/ui/span/issue-15480.stderr +++ b/src/test/ui/span/issue-15480.stderr @@ -1,16 +1,16 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/issue-15480.rs:5:10 | LL | &id(3) - | ^^^^^ temporary value does not live long enough + | ^^^^^ creates a temporary which is freed while still in use LL | ]; - | - temporary value dropped here while still borrowed + | - temporary value is freed at the end of this statement ... -LL | } - | - temporary value needs to live until here +LL | for &&x in &v { + | -- borrow later used here | - = note: consider using a `let` binding to increase its lifetime + = note: consider using a `let` binding to create a longer lived value error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.nll.stderr b/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.nll.stderr deleted file mode 100644 index 4696945814..0000000000 --- a/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.nll.stderr +++ /dev/null @@ -1,34 +0,0 @@ -error[E0597]: `y` does not live long enough - --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:10:5 - | -LL | y.borrow().clone() - | ^--------- - | | - | borrowed value does not live long enough - | a temporary with access to the borrow is created here ... -LL | } - | - - | | - | `y` dropped here while still borrowed - | ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::cell::Ref<'_, std::string::String>` - | - = note: The temporary is part of an expression at the end of a block. Consider forcing this temporary to be dropped sooner, before the block's local variables are dropped. For example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block. - -error[E0597]: `y` does not live long enough - --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:17:9 - | -LL | y.borrow().clone() - | ^--------- - | | - | borrowed value does not live long enough - | a temporary with access to the borrow is created here ... -LL | }; - | -- ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::cell::Ref<'_, std::string::String>` - | | - | `y` dropped here while still borrowed - | - = note: The temporary is part of an expression at the end of a block. Consider forcing this temporary to be dropped sooner, before the block's local variables are dropped. For example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block. - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr b/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr index f18f0da319..4696945814 100644 --- a/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr +++ b/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr @@ -2,21 +2,32 @@ error[E0597]: `y` does not live long enough --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:10:5 | LL | y.borrow().clone() - | ^ borrowed value does not live long enough + | ^--------- + | | + | borrowed value does not live long enough + | a temporary with access to the borrow is created here ... LL | } - | - `y` dropped here while still borrowed + | - + | | + | `y` dropped here while still borrowed + | ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::cell::Ref<'_, std::string::String>` | - = note: values in a scope are dropped in the opposite order they are created + = note: The temporary is part of an expression at the end of a block. Consider forcing this temporary to be dropped sooner, before the block's local variables are dropped. For example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block. error[E0597]: `y` does not live long enough --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:17:9 | LL | y.borrow().clone() - | ^ borrowed value does not live long enough + | ^--------- + | | + | borrowed value does not live long enough + | a temporary with access to the borrow is created here ... LL | }; - | -- borrowed value needs to live until here + | -- ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::cell::Ref<'_, std::string::String>` | | | `y` dropped here while still borrowed + | + = note: The temporary is part of an expression at the end of a block. Consider forcing this temporary to be dropped sooner, before the block's local variables are dropped. For example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block. error: aborting due to 2 previous errors diff --git a/src/test/ui/span/issue-24356.rs b/src/test/ui/span/issue-24356.rs index 7696bd5422..7ec05aab29 100644 --- a/src/test/ui/span/issue-24356.rs +++ b/src/test/ui/span/issue-24356.rs @@ -1,7 +1,5 @@ // Regression test for #24356 -// ignore-tidy-linelength - fn main() { { use std::ops::Deref; diff --git a/src/test/ui/span/issue-24356.stderr b/src/test/ui/span/issue-24356.stderr index 102cc4201e..4827e9ddd5 100644 --- a/src/test/ui/span/issue-24356.stderr +++ b/src/test/ui/span/issue-24356.stderr @@ -1,5 +1,5 @@ error[E0046]: not all trait items implemented, missing: `Target` - --> $DIR/issue-24356.rs:20:9 + --> $DIR/issue-24356.rs:18:9 | LL | impl Deref for Thing { | ^^^^^^^^^^^^^^^^^^^^ missing `Target` in implementation diff --git a/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.nll.stderr b/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.nll.stderr deleted file mode 100644 index 809e60a8c8..0000000000 --- a/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0597]: `d1` does not live long enough - --> $DIR/issue-24805-dropck-child-has-items-via-parent.rs:28:18 - | -LL | _d = D_Child(&d1); - | ^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `d1` dropped here while still borrowed - | borrow might be used here, when `_d` is dropped and runs the `Drop` code for type `D_Child` - | - = note: values in a scope are dropped in the opposite order they are defined - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr b/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr index ad90fcd54d..809e60a8c8 100644 --- a/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr +++ b/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr @@ -1,13 +1,16 @@ error[E0597]: `d1` does not live long enough - --> $DIR/issue-24805-dropck-child-has-items-via-parent.rs:28:19 + --> $DIR/issue-24805-dropck-child-has-items-via-parent.rs:28:18 | LL | _d = D_Child(&d1); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough ... LL | } - | - `d1` dropped here while still borrowed + | - + | | + | `d1` dropped here while still borrowed + | borrow might be used here, when `_d` is dropped and runs the `Drop` code for type `D_Child` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to previous error diff --git a/src/test/ui/span/issue-24805-dropck-trait-has-items.nll.stderr b/src/test/ui/span/issue-24805-dropck-trait-has-items.nll.stderr deleted file mode 100644 index 2e21706691..0000000000 --- a/src/test/ui/span/issue-24805-dropck-trait-has-items.nll.stderr +++ /dev/null @@ -1,42 +0,0 @@ -error[E0597]: `d1` does not live long enough - --> $DIR/issue-24805-dropck-trait-has-items.rs:37:26 - | -LL | _d = D_HasSelfMethod(&d1); - | ^^^ borrowed value does not live long enough -LL | } - | - - | | - | `d1` dropped here while still borrowed - | borrow might be used here, when `_d` is dropped and runs the `Drop` code for type `D_HasSelfMethod` - | - = note: values in a scope are dropped in the opposite order they are defined - -error[E0597]: `d1` does not live long enough - --> $DIR/issue-24805-dropck-trait-has-items.rs:43:33 - | -LL | _d = D_HasMethodWithSelfArg(&d1); - | ^^^ borrowed value does not live long enough -LL | } - | - - | | - | `d1` dropped here while still borrowed - | borrow might be used here, when `_d` is dropped and runs the `Drop` code for type `D_HasMethodWithSelfArg` - | - = note: values in a scope are dropped in the opposite order they are defined - -error[E0597]: `d1` does not live long enough - --> $DIR/issue-24805-dropck-trait-has-items.rs:49:20 - | -LL | _d = D_HasType(&d1); - | ^^^ borrowed value does not live long enough -LL | } - | - - | | - | `d1` dropped here while still borrowed - | borrow might be used here, when `_d` is dropped and runs the `Drop` code for type `D_HasType` - | - = note: values in a scope are dropped in the opposite order they are defined - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/issue-24805-dropck-trait-has-items.stderr b/src/test/ui/span/issue-24805-dropck-trait-has-items.stderr index 3de4014928..2e21706691 100644 --- a/src/test/ui/span/issue-24805-dropck-trait-has-items.stderr +++ b/src/test/ui/span/issue-24805-dropck-trait-has-items.stderr @@ -1,32 +1,41 @@ error[E0597]: `d1` does not live long enough - --> $DIR/issue-24805-dropck-trait-has-items.rs:37:27 + --> $DIR/issue-24805-dropck-trait-has-items.rs:37:26 | LL | _d = D_HasSelfMethod(&d1); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough LL | } - | - `d1` dropped here while still borrowed + | - + | | + | `d1` dropped here while still borrowed + | borrow might be used here, when `_d` is dropped and runs the `Drop` code for type `D_HasSelfMethod` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `d1` does not live long enough - --> $DIR/issue-24805-dropck-trait-has-items.rs:43:34 + --> $DIR/issue-24805-dropck-trait-has-items.rs:43:33 | LL | _d = D_HasMethodWithSelfArg(&d1); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough LL | } - | - `d1` dropped here while still borrowed + | - + | | + | `d1` dropped here while still borrowed + | borrow might be used here, when `_d` is dropped and runs the `Drop` code for type `D_HasMethodWithSelfArg` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `d1` does not live long enough - --> $DIR/issue-24805-dropck-trait-has-items.rs:49:21 + --> $DIR/issue-24805-dropck-trait-has-items.rs:49:20 | LL | _d = D_HasType(&d1); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough LL | } - | - `d1` dropped here while still borrowed + | - + | | + | `d1` dropped here while still borrowed + | borrow might be used here, when `_d` is dropped and runs the `Drop` code for type `D_HasType` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to 3 previous errors diff --git a/src/test/ui/span/issue-24895-copy-clone-dropck.nll.stderr b/src/test/ui/span/issue-24895-copy-clone-dropck.nll.stderr deleted file mode 100644 index 18a3dc9e6d..0000000000 --- a/src/test/ui/span/issue-24895-copy-clone-dropck.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0597]: `d1` does not live long enough - --> $DIR/issue-24895-copy-clone-dropck.rs:27:14 - | -LL | d2 = D(S(&d1, "inner"), "d2"); - | ^^^ borrowed value does not live long enough -LL | } - | - - | | - | `d1` dropped here while still borrowed - | borrow might be used here, when `d2` is dropped and runs the `Drop` code for type `D` - | - = note: values in a scope are dropped in the opposite order they are defined - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/issue-24895-copy-clone-dropck.stderr b/src/test/ui/span/issue-24895-copy-clone-dropck.stderr index 9185919431..18a3dc9e6d 100644 --- a/src/test/ui/span/issue-24895-copy-clone-dropck.stderr +++ b/src/test/ui/span/issue-24895-copy-clone-dropck.stderr @@ -1,12 +1,15 @@ error[E0597]: `d1` does not live long enough - --> $DIR/issue-24895-copy-clone-dropck.rs:27:15 + --> $DIR/issue-24895-copy-clone-dropck.rs:27:14 | LL | d2 = D(S(&d1, "inner"), "d2"); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough LL | } - | - `d1` dropped here while still borrowed + | - + | | + | `d1` dropped here while still borrowed + | borrow might be used here, when `d2` is dropped and runs the `Drop` code for type `D` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to previous error diff --git a/src/test/ui/span/issue-25199.nll.stderr b/src/test/ui/span/issue-25199.nll.stderr deleted file mode 100644 index d70a4afc1b..0000000000 --- a/src/test/ui/span/issue-25199.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0597]: `container` does not live long enough - --> $DIR/issue-25199.rs:70:27 - | -LL | let test = Test{test: &container}; - | ^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `container` dropped here while still borrowed - | borrow might be used here, when `container` is dropped and runs the destructor for type `Container<'_>` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/issue-25199.rs b/src/test/ui/span/issue-25199.rs index 4ef57457ca..ed690443d4 100644 --- a/src/test/ui/span/issue-25199.rs +++ b/src/test/ui/span/issue-25199.rs @@ -71,5 +71,4 @@ fn main() { //~^ ERROR `container` does not live long enough println!("container.v[30]: {:?}", container.v.v[30]); container.store(test); - //~^ ERROR `container` does not live long enough } diff --git a/src/test/ui/span/issue-25199.stderr b/src/test/ui/span/issue-25199.stderr index 6d8320bc05..d70a4afc1b 100644 --- a/src/test/ui/span/issue-25199.stderr +++ b/src/test/ui/span/issue-25199.stderr @@ -1,25 +1,15 @@ error[E0597]: `container` does not live long enough - --> $DIR/issue-25199.rs:70:28 + --> $DIR/issue-25199.rs:70:27 | LL | let test = Test{test: &container}; - | ^^^^^^^^^ borrowed value does not live long enough + | ^^^^^^^^^^ borrowed value does not live long enough ... LL | } - | - `container` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error[E0597]: `container` does not live long enough - --> $DIR/issue-25199.rs:73:5 - | -LL | container.store(test); - | ^^^^^^^^^ borrowed value does not live long enough -LL | -LL | } - | - `container` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + | - + | | + | `container` dropped here while still borrowed + | borrow might be used here, when `container` is dropped and runs the destructor for type `Container<'_>` -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/issue-26656.nll.stderr b/src/test/ui/span/issue-26656.nll.stderr deleted file mode 100644 index 1e939c484f..0000000000 --- a/src/test/ui/span/issue-26656.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0597]: `ticking` does not live long enough - --> $DIR/issue-26656.rs:40:35 - | -LL | zook.button = B::BigRedButton(&ticking); - | ^^^^^^^^ borrowed value does not live long enough -LL | } - | - - | | - | `ticking` dropped here while still borrowed - | borrow might be used here, when `zook` is dropped and runs the `Drop` code for type `Zook` - | - = note: values in a scope are dropped in the opposite order they are defined - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/issue-26656.stderr b/src/test/ui/span/issue-26656.stderr index ba2befb90a..1e939c484f 100644 --- a/src/test/ui/span/issue-26656.stderr +++ b/src/test/ui/span/issue-26656.stderr @@ -1,12 +1,15 @@ error[E0597]: `ticking` does not live long enough - --> $DIR/issue-26656.rs:40:36 + --> $DIR/issue-26656.rs:40:35 | LL | zook.button = B::BigRedButton(&ticking); - | ^^^^^^^ borrowed value does not live long enough + | ^^^^^^^^ borrowed value does not live long enough LL | } - | - `ticking` dropped here while still borrowed + | - + | | + | `ticking` dropped here while still borrowed + | borrow might be used here, when `zook` is dropped and runs the `Drop` code for type `Zook` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to previous error diff --git a/src/test/ui/span/issue-27522.stderr b/src/test/ui/span/issue-27522.stderr index c99231a533..46f424b192 100644 --- a/src/test/ui/span/issue-27522.stderr +++ b/src/test/ui/span/issue-27522.stderr @@ -9,4 +9,3 @@ LL | fn handler(self: &SomeType); error: aborting due to previous error -For more information about this error, try `rustc --explain E0307`. diff --git a/src/test/ui/span/issue-29106.nll.stderr b/src/test/ui/span/issue-29106.nll.stderr deleted file mode 100644 index 3b403de12d..0000000000 --- a/src/test/ui/span/issue-29106.nll.stderr +++ /dev/null @@ -1,29 +0,0 @@ -error[E0597]: `x` does not live long enough - --> $DIR/issue-29106.rs:16:26 - | -LL | y = Arc::new(Foo(&x)); - | ^^ borrowed value does not live long enough -LL | } - | - - | | - | `x` dropped here while still borrowed - | borrow might be used here, when `y` is dropped and runs the `Drop` code for type `std::sync::Arc` - | - = note: values in a scope are dropped in the opposite order they are defined - -error[E0597]: `x` does not live long enough - --> $DIR/issue-29106.rs:23:25 - | -LL | y = Rc::new(Foo(&x)); - | ^^ borrowed value does not live long enough -LL | } - | - - | | - | `x` dropped here while still borrowed - | borrow might be used here, when `y` is dropped and runs the `Drop` code for type `std::rc::Rc` - | - = note: values in a scope are dropped in the opposite order they are defined - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/issue-29106.stderr b/src/test/ui/span/issue-29106.stderr index bb2f846224..3b403de12d 100644 --- a/src/test/ui/span/issue-29106.stderr +++ b/src/test/ui/span/issue-29106.stderr @@ -1,22 +1,28 @@ error[E0597]: `x` does not live long enough - --> $DIR/issue-29106.rs:16:27 + --> $DIR/issue-29106.rs:16:26 | LL | y = Arc::new(Foo(&x)); - | ^ borrowed value does not live long enough + | ^^ borrowed value does not live long enough LL | } - | - `x` dropped here while still borrowed + | - + | | + | `x` dropped here while still borrowed + | borrow might be used here, when `y` is dropped and runs the `Drop` code for type `std::sync::Arc` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `x` does not live long enough - --> $DIR/issue-29106.rs:23:26 + --> $DIR/issue-29106.rs:23:25 | LL | y = Rc::new(Foo(&x)); - | ^ borrowed value does not live long enough + | ^^ borrowed value does not live long enough LL | } - | - `x` dropped here while still borrowed + | - + | | + | `x` dropped here while still borrowed + | borrow might be used here, when `y` is dropped and runs the `Drop` code for type `std::rc::Rc` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to 2 previous errors diff --git a/src/test/ui/span/issue-34264.stderr b/src/test/ui/span/issue-34264.stderr index c5b6245572..295b8c6f67 100644 --- a/src/test/ui/span/issue-34264.stderr +++ b/src/test/ui/span/issue-34264.stderr @@ -45,5 +45,5 @@ LL | bar(1, 2, 3); error: aborting due to 6 previous errors -Some errors occurred: E0061, E0308. +Some errors have detailed explanations: E0061, E0308. For more information about an error, try `rustc --explain E0061`. diff --git a/src/test/ui/span/issue-36530.stderr b/src/test/ui/span/issue-36530.stderr index 05b2ca9057..ee479d6c79 100644 --- a/src/test/ui/span/issue-36530.stderr +++ b/src/test/ui/span/issue-36530.stderr @@ -1,25 +1,28 @@ -error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/issue-36530.rs:3:3 | LL | #[foo] | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: non-builtin inner attributes are unstable (see issue #54726) +error[E0658]: non-builtin inner attributes are unstable --> $DIR/issue-36530.rs:5:5 | LL | #![foo] | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/54726 = help: add #![feature(custom_inner_attributes)] to the crate attributes to enable -error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/issue-36530.rs:5:8 | LL | #![foo] | ^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable error: aborting due to 3 previous errors diff --git a/src/test/ui/span/issue-36537.nll.stderr b/src/test/ui/span/issue-36537.nll.stderr deleted file mode 100644 index edb804e850..0000000000 --- a/src/test/ui/span/issue-36537.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0597]: `a` does not live long enough - --> $DIR/issue-36537.rs:5:9 - | -LL | p = &a; - | ^^^^^^ borrowed value does not live long enough -... -LL | } - | - `a` dropped here while still borrowed -LL | p.use_ref(); - | - borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/issue-36537.stderr b/src/test/ui/span/issue-36537.stderr index d3bcbb25ad..edb804e850 100644 --- a/src/test/ui/span/issue-36537.stderr +++ b/src/test/ui/span/issue-36537.stderr @@ -1,14 +1,13 @@ error[E0597]: `a` does not live long enough - --> $DIR/issue-36537.rs:5:14 + --> $DIR/issue-36537.rs:5:9 | LL | p = &a; - | ^ borrowed value does not live long enough + | ^^^^^^ borrowed value does not live long enough ... LL | } | - `a` dropped here while still borrowed -... -LL | } - | - borrowed value needs to live until here +LL | p.use_ref(); + | - borrow later used here error: aborting due to previous error diff --git a/src/test/ui/span/issue-39018.rs b/src/test/ui/span/issue-39018.rs index 6dbc8d3997..a3b1d1d817 100644 --- a/src/test/ui/span/issue-39018.rs +++ b/src/test/ui/span/issue-39018.rs @@ -16,3 +16,23 @@ enum World { Hello, Goodbye, } + +fn foo() { + let a = String::new(); + let b = String::new(); + let c = ""; + let d = ""; + let e = &a; + let _ = &a + &b; //~ ERROR binary operation + let _ = &a + b; //~ ERROR binary operation + let _ = a + &b; // ok + let _ = a + b; //~ ERROR mismatched types + let _ = e + b; //~ ERROR binary operation + let _ = e + &b; //~ ERROR binary operation + let _ = e + d; //~ ERROR binary operation + let _ = e + &d; //~ ERROR binary operation + let _ = &c + &d; //~ ERROR binary operation + let _ = &c + d; //~ ERROR binary operation + let _ = c + &d; //~ ERROR binary operation + let _ = c + d; //~ ERROR binary operation +} diff --git a/src/test/ui/span/issue-39018.stderr b/src/test/ui/span/issue-39018.stderr index a5b91f090d..d8fbf841b6 100644 --- a/src/test/ui/span/issue-39018.stderr +++ b/src/test/ui/span/issue-39018.stderr @@ -4,7 +4,7 @@ error[E0369]: binary operation `+` cannot be applied to type `&str` LL | let x = "Hello " + "World!"; | -------- ^ -------- &str | | | - | | `+` can't be used to concatenate two `&str` strings + | | `+` cannot be used to concatenate two `&str` strings | &str help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | @@ -25,16 +25,152 @@ error[E0369]: binary operation `+` cannot be applied to type `&str` --> $DIR/issue-39018.rs:11:22 | LL | let x = "Hello " + "World!".to_owned(); - | ---------^-------------------- - | | | - | | std::string::String + | -------- ^ ------------------- std::string::String + | | | + | | `+` cannot be used to concatenate a `&str` with a `String` | &str - | `+` can't be used to concatenate a `&str` with a `String` help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let x = "Hello ".to_owned() + &"World!".to_owned(); | ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 3 previous errors +error[E0369]: binary operation `+` cannot be applied to type `&std::string::String` + --> $DIR/issue-39018.rs:26:16 + | +LL | let _ = &a + &b; + | -- ^ -- &std::string::String + | | | + | | `+` cannot be used to concatenate two `&str` strings + | &std::string::String +help: String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + | +LL | let _ = a + &b; + | ^ + +error[E0369]: binary operation `+` cannot be applied to type `&std::string::String` + --> $DIR/issue-39018.rs:27:16 + | +LL | let _ = &a + b; + | -- ^ - std::string::String + | | | + | | `+` cannot be used to concatenate a `&str` with a `String` + | &std::string::String +help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + | +LL | let _ = a + &b; + | ^ ^^ + +error[E0308]: mismatched types + --> $DIR/issue-39018.rs:29:17 + | +LL | let _ = a + b; + | ^ + | | + | expected &str, found struct `std::string::String` + | help: consider borrowing here: `&b` + | + = note: expected type `&str` + found type `std::string::String` + +error[E0369]: binary operation `+` cannot be applied to type `&std::string::String` + --> $DIR/issue-39018.rs:30:15 + | +LL | let _ = e + b; + | - ^ - std::string::String + | | | + | | `+` cannot be used to concatenate a `&str` with a `String` + | &std::string::String +help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + | +LL | let _ = e.to_owned() + &b; + | ^^^^^^^^^^^^ ^^ + +error[E0369]: binary operation `+` cannot be applied to type `&std::string::String` + --> $DIR/issue-39018.rs:31:15 + | +LL | let _ = e + &b; + | - ^ -- &std::string::String + | | | + | | `+` cannot be used to concatenate two `&str` strings + | &std::string::String +help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + | +LL | let _ = e.to_owned() + &b; + | ^^^^^^^^^^^^ + +error[E0369]: binary operation `+` cannot be applied to type `&std::string::String` + --> $DIR/issue-39018.rs:32:15 + | +LL | let _ = e + d; + | - ^ - &str + | | | + | | `+` cannot be used to concatenate two `&str` strings + | &std::string::String +help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + | +LL | let _ = e.to_owned() + d; + | ^^^^^^^^^^^^ + +error[E0369]: binary operation `+` cannot be applied to type `&std::string::String` + --> $DIR/issue-39018.rs:33:15 + | +LL | let _ = e + &d; + | - ^ -- &&str + | | | + | | `+` cannot be used to concatenate two `&str` strings + | &std::string::String +help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + | +LL | let _ = e.to_owned() + &d; + | ^^^^^^^^^^^^ + +error[E0369]: binary operation `+` cannot be applied to type `&&str` + --> $DIR/issue-39018.rs:34:16 + | +LL | let _ = &c + &d; + | -- ^ -- &&str + | | + | &&str + | + = note: an implementation of `std::ops::Add` might be missing for `&&str` + +error[E0369]: binary operation `+` cannot be applied to type `&&str` + --> $DIR/issue-39018.rs:35:16 + | +LL | let _ = &c + d; + | -- ^ - &str + | | + | &&str + | + = note: an implementation of `std::ops::Add` might be missing for `&&str` + +error[E0369]: binary operation `+` cannot be applied to type `&str` + --> $DIR/issue-39018.rs:36:15 + | +LL | let _ = c + &d; + | - ^ -- &&str + | | | + | | `+` cannot be used to concatenate two `&str` strings + | &str +help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + | +LL | let _ = c.to_owned() + &d; + | ^^^^^^^^^^^^ + +error[E0369]: binary operation `+` cannot be applied to type `&str` + --> $DIR/issue-39018.rs:37:15 + | +LL | let _ = c + d; + | - ^ - &str + | | | + | | `+` cannot be used to concatenate two `&str` strings + | &str +help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left + | +LL | let _ = c.to_owned() + d; + | ^^^^^^^^^^^^ + +error: aborting due to 14 previous errors -For more information about this error, try `rustc --explain E0369`. +Some errors have detailed explanations: E0308, E0369. +For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/span/issue-40157.nll.stderr b/src/test/ui/span/issue-40157.nll.stderr deleted file mode 100644 index 0b365c3f7b..0000000000 --- a/src/test/ui/span/issue-40157.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0597]: `foo` does not live long enough - --> $DIR/issue-40157.rs:2:53 - | -LL | {println!("{:?}", match { let foo = vec![1, 2]; foo.get(1) } { x => x });} - | ------------------------^^^--------- - | | | | - | | | `foo` dropped here while still borrowed - | | borrowed value does not live long enough - | borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/issue-40157.stderr b/src/test/ui/span/issue-40157.stderr index 55fc8d8ee5..0b365c3f7b 100644 --- a/src/test/ui/span/issue-40157.stderr +++ b/src/test/ui/span/issue-40157.stderr @@ -2,13 +2,11 @@ error[E0597]: `foo` does not live long enough --> $DIR/issue-40157.rs:2:53 | LL | {println!("{:?}", match { let foo = vec![1, 2]; foo.get(1) } { x => x });} - | -----------------------------------------------^^^---------------------- - | | | | - | | | `foo` dropped here while still borrowed - | | borrowed value does not live long enough - | borrowed value needs to live until here - | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + | ------------------------^^^--------- + | | | | + | | | `foo` dropped here while still borrowed + | | borrowed value does not live long enough + | borrow later used here error: aborting due to previous error diff --git a/src/test/ui/span/issue-7575.rs b/src/test/ui/span/issue-7575.rs index c33398cd39..ea0a66540b 100644 --- a/src/test/ui/span/issue-7575.rs +++ b/src/test/ui/span/issue-7575.rs @@ -1,6 +1,4 @@ // Test the mechanism for warning about possible missing `self` declarations. -// ignore-tidy-linelength - trait CtxtFn { fn f8(self, _: usize) -> usize; fn f9(_: usize) -> usize; diff --git a/src/test/ui/span/issue-7575.stderr b/src/test/ui/span/issue-7575.stderr index b2c9e505f0..614638752f 100644 --- a/src/test/ui/span/issue-7575.stderr +++ b/src/test/ui/span/issue-7575.stderr @@ -1,24 +1,24 @@ error[E0599]: no method named `f9` found for type `usize` in the current scope - --> $DIR/issue-7575.rs:64:18 + --> $DIR/issue-7575.rs:62:18 | LL | u.f8(42) + u.f9(342) + m.fff(42) | ^^ this is an associated function, not a method | = note: found the following associated functions; to be used as methods, functions must have a `self` parameter note: candidate #1 is defined in the trait `CtxtFn` - --> $DIR/issue-7575.rs:6:5 + --> $DIR/issue-7575.rs:4:5 | LL | fn f9(_: usize) -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `CtxtFn::f9(u, 342)` instead note: candidate #2 is defined in the trait `OtherTrait` - --> $DIR/issue-7575.rs:10:5 + --> $DIR/issue-7575.rs:8:5 | LL | fn f9(_: usize) -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `OtherTrait::f9(u, 342)` instead note: candidate #3 is defined in the trait `UnusedTrait` - --> $DIR/issue-7575.rs:19:5 + --> $DIR/issue-7575.rs:17:5 | LL | fn f9(_: usize) -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -30,7 +30,7 @@ LL | fn f9(_: usize) -> usize; candidate #3: `UnusedTrait` error[E0599]: no method named `fff` found for type `Myisize` in the current scope - --> $DIR/issue-7575.rs:64:30 + --> $DIR/issue-7575.rs:62:30 | LL | struct Myisize(isize); | ---------------------- method `fff` not found for this @@ -43,20 +43,20 @@ LL | u.f8(42) + u.f9(342) + m.fff(42) | = note: found the following associated functions; to be used as methods, functions must have a `self` parameter note: the candidate is defined in an impl for the type `Myisize` - --> $DIR/issue-7575.rs:41:5 + --> $DIR/issue-7575.rs:39:5 | LL | fn fff(i: isize) -> isize { | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0599]: no method named `is_str` found for type `T` in the current scope - --> $DIR/issue-7575.rs:72:7 + --> $DIR/issue-7575.rs:70:7 | LL | t.is_str() | ^^^^^^ this is an associated function, not a method | = note: found the following associated functions; to be used as methods, functions must have a `self` parameter note: the candidate is defined in the trait `ManyImplTrait` - --> $DIR/issue-7575.rs:47:5 + --> $DIR/issue-7575.rs:45:5 | LL | fn is_str() -> bool { | ^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/span/issue28498-reject-ex1.nll.stderr b/src/test/ui/span/issue28498-reject-ex1.nll.stderr deleted file mode 100644 index 86e2d8c56b..0000000000 --- a/src/test/ui/span/issue28498-reject-ex1.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0713]: borrow may still be in use when destructor runs - --> $DIR/issue28498-reject-ex1.rs:34:29 - | -LL | foo.data[0].1.set(Some(&foo.data[1])); - | ^^^^^^^^ -... -LL | } - | - - | | - | here, drop of `foo` needs exclusive access to `foo.data`, because the type `Foo>` implements the `Drop` trait - | borrow might be used here, when `foo` is dropped and runs the `Drop` code for type `Foo` - | - = note: consider using a `let` binding to create a longer lived value - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0713`. diff --git a/src/test/ui/span/issue28498-reject-ex1.rs b/src/test/ui/span/issue28498-reject-ex1.rs index 05104d1cdc..4d1b412550 100644 --- a/src/test/ui/span/issue28498-reject-ex1.rs +++ b/src/test/ui/span/issue28498-reject-ex1.rs @@ -32,7 +32,6 @@ fn main() { foo.data.push(Concrete(0, Cell::new(None))); foo.data[0].1.set(Some(&foo.data[1])); - //~^ ERROR `foo.data` does not live long enough + //~^ ERROR borrow may still be in use when destructor runs foo.data[1].1.set(Some(&foo.data[0])); - //~^ ERROR `foo.data` does not live long enough } diff --git a/src/test/ui/span/issue28498-reject-ex1.stderr b/src/test/ui/span/issue28498-reject-ex1.stderr index 1438b95d73..86e2d8c56b 100644 --- a/src/test/ui/span/issue28498-reject-ex1.stderr +++ b/src/test/ui/span/issue28498-reject-ex1.stderr @@ -1,25 +1,17 @@ -error[E0597]: `foo.data` does not live long enough +error[E0713]: borrow may still be in use when destructor runs --> $DIR/issue28498-reject-ex1.rs:34:29 | LL | foo.data[0].1.set(Some(&foo.data[1])); - | ^^^^^^^^ borrowed value does not live long enough + | ^^^^^^^^ ... LL | } - | - `foo.data` dropped here while still borrowed + | - + | | + | here, drop of `foo` needs exclusive access to `foo.data`, because the type `Foo>` implements the `Drop` trait + | borrow might be used here, when `foo` is dropped and runs the `Drop` code for type `Foo` | - = note: values in a scope are dropped in the opposite order they are created + = note: consider using a `let` binding to create a longer lived value -error[E0597]: `foo.data` does not live long enough - --> $DIR/issue28498-reject-ex1.rs:36:29 - | -LL | foo.data[1].1.set(Some(&foo.data[0])); - | ^^^^^^^^ borrowed value does not live long enough -LL | -LL | } - | - `foo.data` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - -error: aborting due to 2 previous errors +error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0713`. diff --git a/src/test/ui/span/issue28498-reject-lifetime-param.nll.stderr b/src/test/ui/span/issue28498-reject-lifetime-param.nll.stderr deleted file mode 100644 index 3273b51ba0..0000000000 --- a/src/test/ui/span/issue28498-reject-lifetime-param.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0597]: `first_dropped` does not live long enough - --> $DIR/issue28498-reject-lifetime-param.rs:34:19 - | -LL | foo1 = Foo(1, &first_dropped); - | ^^^^^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `first_dropped` dropped here while still borrowed - | borrow might be used here, when `foo1` is dropped and runs the `Drop` code for type `Foo` - | - = note: values in a scope are dropped in the opposite order they are defined - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/issue28498-reject-lifetime-param.rs b/src/test/ui/span/issue28498-reject-lifetime-param.rs index 062636af3f..9bc01766be 100644 --- a/src/test/ui/span/issue28498-reject-lifetime-param.rs +++ b/src/test/ui/span/issue28498-reject-lifetime-param.rs @@ -29,8 +29,7 @@ fn main() { last_dropped = ScribbleOnDrop(format!("last")); first_dropped = ScribbleOnDrop(format!("first")); - foo0 = Foo(0, &last_dropped); - //~^ ERROR `last_dropped` does not live long enough + foo0 = Foo(0, &last_dropped); // OK foo1 = Foo(1, &first_dropped); //~^ ERROR `first_dropped` does not live long enough diff --git a/src/test/ui/span/issue28498-reject-lifetime-param.stderr b/src/test/ui/span/issue28498-reject-lifetime-param.stderr index 0e51729f8d..1dcb40e5d9 100644 --- a/src/test/ui/span/issue28498-reject-lifetime-param.stderr +++ b/src/test/ui/span/issue28498-reject-lifetime-param.stderr @@ -1,25 +1,17 @@ -error[E0597]: `last_dropped` does not live long enough - --> $DIR/issue28498-reject-lifetime-param.rs:32:20 - | -LL | foo0 = Foo(0, &last_dropped); - | ^^^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - `last_dropped` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - error[E0597]: `first_dropped` does not live long enough - --> $DIR/issue28498-reject-lifetime-param.rs:34:20 + --> $DIR/issue28498-reject-lifetime-param.rs:33:19 | LL | foo1 = Foo(1, &first_dropped); - | ^^^^^^^^^^^^^ borrowed value does not live long enough + | ^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | } - | - `first_dropped` dropped here while still borrowed + | - + | | + | `first_dropped` dropped here while still borrowed + | borrow might be used here, when `foo1` is dropped and runs the `Drop` code for type `Foo` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/issue28498-reject-passed-to-fn.nll.stderr b/src/test/ui/span/issue28498-reject-passed-to-fn.nll.stderr deleted file mode 100644 index ae08e3e5e6..0000000000 --- a/src/test/ui/span/issue28498-reject-passed-to-fn.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0597]: `first_dropped` does not live long enough - --> $DIR/issue28498-reject-passed-to-fn.rs:36:19 - | -LL | foo1 = Foo(1, &first_dropped, Box::new(callback)); - | ^^^^^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `first_dropped` dropped here while still borrowed - | borrow might be used here, when `foo1` is dropped and runs the `Drop` code for type `Foo` - | - = note: values in a scope are dropped in the opposite order they are defined - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/issue28498-reject-passed-to-fn.rs b/src/test/ui/span/issue28498-reject-passed-to-fn.rs index 27a757e850..c59de5df41 100644 --- a/src/test/ui/span/issue28498-reject-passed-to-fn.rs +++ b/src/test/ui/span/issue28498-reject-passed-to-fn.rs @@ -31,8 +31,7 @@ fn main() { last_dropped = ScribbleOnDrop(format!("last")); first_dropped = ScribbleOnDrop(format!("first")); - foo0 = Foo(0, &last_dropped, Box::new(callback)); - //~^ ERROR `last_dropped` does not live long enough + foo0 = Foo(0, &last_dropped, Box::new(callback)); // OK foo1 = Foo(1, &first_dropped, Box::new(callback)); //~^ ERROR `first_dropped` does not live long enough diff --git a/src/test/ui/span/issue28498-reject-passed-to-fn.stderr b/src/test/ui/span/issue28498-reject-passed-to-fn.stderr index 80533c79f1..214a6f6d65 100644 --- a/src/test/ui/span/issue28498-reject-passed-to-fn.stderr +++ b/src/test/ui/span/issue28498-reject-passed-to-fn.stderr @@ -1,25 +1,17 @@ -error[E0597]: `last_dropped` does not live long enough - --> $DIR/issue28498-reject-passed-to-fn.rs:34:20 - | -LL | foo0 = Foo(0, &last_dropped, Box::new(callback)); - | ^^^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - `last_dropped` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - error[E0597]: `first_dropped` does not live long enough - --> $DIR/issue28498-reject-passed-to-fn.rs:36:20 + --> $DIR/issue28498-reject-passed-to-fn.rs:35:19 | LL | foo1 = Foo(1, &first_dropped, Box::new(callback)); - | ^^^^^^^^^^^^^ borrowed value does not live long enough + | ^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | } - | - `first_dropped` dropped here while still borrowed + | - + | | + | `first_dropped` dropped here while still borrowed + | borrow might be used here, when `foo1` is dropped and runs the `Drop` code for type `Foo` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/issue28498-reject-trait-bound.nll.stderr b/src/test/ui/span/issue28498-reject-trait-bound.nll.stderr deleted file mode 100644 index 600fd539fe..0000000000 --- a/src/test/ui/span/issue28498-reject-trait-bound.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0597]: `first_dropped` does not live long enough - --> $DIR/issue28498-reject-trait-bound.rs:36:19 - | -LL | foo1 = Foo(1, &first_dropped); - | ^^^^^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `first_dropped` dropped here while still borrowed - | borrow might be used here, when `foo1` is dropped and runs the `Drop` code for type `Foo` - | - = note: values in a scope are dropped in the opposite order they are defined - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/issue28498-reject-trait-bound.rs b/src/test/ui/span/issue28498-reject-trait-bound.rs index 3ea67d1662..8813180c89 100644 --- a/src/test/ui/span/issue28498-reject-trait-bound.rs +++ b/src/test/ui/span/issue28498-reject-trait-bound.rs @@ -31,8 +31,7 @@ fn main() { last_dropped = ScribbleOnDrop(format!("last")); first_dropped = ScribbleOnDrop(format!("first")); - foo0 = Foo(0, &last_dropped); - //~^ ERROR `last_dropped` does not live long enough + foo0 = Foo(0, &last_dropped); // OK foo1 = Foo(1, &first_dropped); //~^ ERROR `first_dropped` does not live long enough diff --git a/src/test/ui/span/issue28498-reject-trait-bound.stderr b/src/test/ui/span/issue28498-reject-trait-bound.stderr index 3ce4dd9fdd..d4fe291bef 100644 --- a/src/test/ui/span/issue28498-reject-trait-bound.stderr +++ b/src/test/ui/span/issue28498-reject-trait-bound.stderr @@ -1,25 +1,17 @@ -error[E0597]: `last_dropped` does not live long enough - --> $DIR/issue28498-reject-trait-bound.rs:34:20 - | -LL | foo0 = Foo(0, &last_dropped); - | ^^^^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - `last_dropped` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created - error[E0597]: `first_dropped` does not live long enough - --> $DIR/issue28498-reject-trait-bound.rs:36:20 + --> $DIR/issue28498-reject-trait-bound.rs:35:19 | LL | foo1 = Foo(1, &first_dropped); - | ^^^^^^^^^^^^^ borrowed value does not live long enough + | ^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | } - | - `first_dropped` dropped here while still borrowed + | - + | | + | `first_dropped` dropped here while still borrowed + | borrow might be used here, when `foo1` is dropped and runs the `Drop` code for type `Foo` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/mut-arg-hint.nll.stderr b/src/test/ui/span/mut-arg-hint.nll.stderr deleted file mode 100644 index 8027cf69cf..0000000000 --- a/src/test/ui/span/mut-arg-hint.nll.stderr +++ /dev/null @@ -1,27 +0,0 @@ -error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference - --> $DIR/mut-arg-hint.rs:3:9 - | -LL | fn foo(mut a: &String) { - | ------- help: consider changing this to be a mutable reference: `&mut std::string::String` -LL | a.push_str("bar"); - | ^ `a` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference - --> $DIR/mut-arg-hint.rs:8:5 - | -LL | pub fn foo<'a>(mut a: &'a String) { - | ---------- help: consider changing this to be a mutable reference: `&'a mut String` -LL | a.push_str("foo"); - | ^ `a` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference - --> $DIR/mut-arg-hint.rs:15:9 - | -LL | pub fn foo(mut a: &String) { - | ------- help: consider changing this to be a mutable reference: `&mut std::string::String` -LL | a.push_str("foo"); - | ^ `a` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/span/mut-arg-hint.rs b/src/test/ui/span/mut-arg-hint.rs index 3d46613aa7..d7ff1f0de4 100644 --- a/src/test/ui/span/mut-arg-hint.rs +++ b/src/test/ui/span/mut-arg-hint.rs @@ -1,18 +1,18 @@ trait B { fn foo(mut a: &String) { - a.push_str("bar"); //~ ERROR cannot borrow immutable borrowed content + a.push_str("bar"); //~ ERROR cannot borrow `*a` as mutable, as it is behind a `&` reference } } pub fn foo<'a>(mut a: &'a String) { - a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content + a.push_str("foo"); //~ ERROR cannot borrow `*a` as mutable, as it is behind a `&` reference } struct A {} impl A { pub fn foo(mut a: &String) { - a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content + a.push_str("foo"); //~ ERROR cannot borrow `*a` as mutable, as it is behind a `&` reference } } diff --git a/src/test/ui/span/mut-arg-hint.stderr b/src/test/ui/span/mut-arg-hint.stderr index ce5786186e..8027cf69cf 100644 --- a/src/test/ui/span/mut-arg-hint.stderr +++ b/src/test/ui/span/mut-arg-hint.stderr @@ -1,26 +1,26 @@ -error[E0596]: cannot borrow immutable borrowed content `*a` as mutable +error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference --> $DIR/mut-arg-hint.rs:3:9 | LL | fn foo(mut a: &String) { - | ------- use `&mut String` here to make mutable + | ------- help: consider changing this to be a mutable reference: `&mut std::string::String` LL | a.push_str("bar"); - | ^ cannot borrow as mutable + | ^ `a` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0596]: cannot borrow immutable borrowed content `*a` as mutable +error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference --> $DIR/mut-arg-hint.rs:8:5 | LL | pub fn foo<'a>(mut a: &'a String) { - | ---------- use `&'a mut String` here to make mutable + | ---------- help: consider changing this to be a mutable reference: `&'a mut String` LL | a.push_str("foo"); - | ^ cannot borrow as mutable + | ^ `a` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0596]: cannot borrow immutable borrowed content `*a` as mutable +error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference --> $DIR/mut-arg-hint.rs:15:9 | LL | pub fn foo(mut a: &String) { - | ------- use `&mut String` here to make mutable + | ------- help: consider changing this to be a mutable reference: `&mut std::string::String` LL | a.push_str("foo"); - | ^ cannot borrow as mutable + | ^ `a` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to 3 previous errors diff --git a/src/test/ui/span/mut-ptr-cant-outlive-ref.nll.stderr b/src/test/ui/span/mut-ptr-cant-outlive-ref.nll.stderr deleted file mode 100644 index 21b29464df..0000000000 --- a/src/test/ui/span/mut-ptr-cant-outlive-ref.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0597]: `b` does not live long enough - --> $DIR/mut-ptr-cant-outlive-ref.rs:8:15 - | -LL | p = &*b; - | ^ borrowed value does not live long enough -LL | } - | - `b` dropped here while still borrowed -LL | -LL | p.use_ref(); - | - borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr b/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr index f6cf568a8d..21b29464df 100644 --- a/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr +++ b/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr @@ -5,9 +5,9 @@ LL | p = &*b; | ^ borrowed value does not live long enough LL | } | - `b` dropped here while still borrowed -... -LL | } - | - borrowed value needs to live until here +LL | +LL | p.use_ref(); + | - borrow later used here error: aborting due to previous error diff --git a/src/test/ui/span/range-2.nll.stderr b/src/test/ui/span/range-2.nll.stderr deleted file mode 100644 index 8ca8156b08..0000000000 --- a/src/test/ui/span/range-2.nll.stderr +++ /dev/null @@ -1,25 +0,0 @@ -error[E0597]: `a` does not live long enough - --> $DIR/range-2.rs:7:9 - | -LL | let r = { - | - borrow later stored here -... -LL | &a..&b - | ^^ borrowed value does not live long enough -LL | }; - | - `a` dropped here while still borrowed - -error[E0597]: `b` does not live long enough - --> $DIR/range-2.rs:7:13 - | -LL | let r = { - | - borrow later stored here -... -LL | &a..&b - | ^^ borrowed value does not live long enough -LL | }; - | - `b` dropped here while still borrowed - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/range-2.stderr b/src/test/ui/span/range-2.stderr index 7d0edd6971..8ca8156b08 100644 --- a/src/test/ui/span/range-2.stderr +++ b/src/test/ui/span/range-2.stderr @@ -1,24 +1,24 @@ error[E0597]: `a` does not live long enough - --> $DIR/range-2.rs:7:10 + --> $DIR/range-2.rs:7:9 | +LL | let r = { + | - borrow later stored here +... LL | &a..&b - | ^ borrowed value does not live long enough + | ^^ borrowed value does not live long enough LL | }; | - `a` dropped here while still borrowed -... -LL | } - | - borrowed value needs to live until here error[E0597]: `b` does not live long enough - --> $DIR/range-2.rs:7:14 + --> $DIR/range-2.rs:7:13 | +LL | let r = { + | - borrow later stored here +... LL | &a..&b - | ^ borrowed value does not live long enough + | ^^ borrowed value does not live long enough LL | }; | - `b` dropped here while still borrowed -... -LL | } - | - borrowed value needs to live until here error: aborting due to 2 previous errors diff --git a/src/test/ui/span/regionck-unboxed-closure-lifetimes.nll.stderr b/src/test/ui/span/regionck-unboxed-closure-lifetimes.nll.stderr deleted file mode 100644 index 8e9cd59515..0000000000 --- a/src/test/ui/span/regionck-unboxed-closure-lifetimes.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0597]: `c` does not live long enough - --> $DIR/regionck-unboxed-closure-lifetimes.rs:8:21 - | -LL | let c_ref = &c; - | ^^ borrowed value does not live long enough -... -LL | } - | - `c` dropped here while still borrowed -LL | f.use_mut(); - | - borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr b/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr index b3f09669f5..8e9cd59515 100644 --- a/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr +++ b/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr @@ -1,14 +1,13 @@ error[E0597]: `c` does not live long enough - --> $DIR/regionck-unboxed-closure-lifetimes.rs:8:22 + --> $DIR/regionck-unboxed-closure-lifetimes.rs:8:21 | LL | let c_ref = &c; - | ^ borrowed value does not live long enough + | ^^ borrowed value does not live long enough ... LL | } | - `c` dropped here while still borrowed LL | f.use_mut(); -LL | } - | - borrowed value needs to live until here + | - borrow later used here error: aborting due to previous error diff --git a/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.nll.stderr b/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.nll.stderr deleted file mode 100644 index 2be2d0ff7b..0000000000 --- a/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/regions-close-over-borrowed-ref-in-obj.rs:12:27 - | -LL | let ss: &isize = &id(1); - | ^^^^^ creates a temporary which is freed while still in use -... -LL | } - | - temporary value is freed at the end of this statement -LL | } - | - borrow might be used here, when `blah` is dropped and runs the destructor for type `std::boxed::Box` - | - = note: consider using a `let` binding to create a longer lived value - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.rs b/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.rs index 9ca352a07f..13e651fa56 100644 --- a/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.rs +++ b/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.rs @@ -10,7 +10,7 @@ fn main() { let blah; { let ss: &isize = &id(1); - //~^ ERROR borrowed value does not live long enough + //~^ ERROR temporary value dropped while borrowed blah = box ss as Box; } } diff --git a/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.stderr b/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.stderr index 8a853e7ce5..2be2d0ff7b 100644 --- a/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.stderr +++ b/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.stderr @@ -1,14 +1,16 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/regions-close-over-borrowed-ref-in-obj.rs:12:27 | LL | let ss: &isize = &id(1); - | ^^^^^ temporary value does not live long enough + | ^^^^^ creates a temporary which is freed while still in use ... LL | } - | - temporary value dropped here while still borrowed + | - temporary value is freed at the end of this statement LL | } - | - temporary value needs to live until here + | - borrow might be used here, when `blah` is dropped and runs the destructor for type `std::boxed::Box` + | + = note: consider using a `let` binding to create a longer lived value error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/span/regions-close-over-type-parameter-2.nll.stderr b/src/test/ui/span/regions-close-over-type-parameter-2.nll.stderr deleted file mode 100644 index 2e584d9a88..0000000000 --- a/src/test/ui/span/regions-close-over-type-parameter-2.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0597]: `tmp0` does not live long enough - --> $DIR/regions-close-over-type-parameter-2.rs:23:20 - | -LL | let tmp1 = &tmp0; - | ^^^^^ borrowed value does not live long enough -LL | repeater3(tmp1) - | --------------- borrow later captured here by trait object -LL | }; - | - `tmp0` dropped here while still borrowed - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/regions-close-over-type-parameter-2.stderr b/src/test/ui/span/regions-close-over-type-parameter-2.stderr index 5ee155c1d1..2e584d9a88 100644 --- a/src/test/ui/span/regions-close-over-type-parameter-2.stderr +++ b/src/test/ui/span/regions-close-over-type-parameter-2.stderr @@ -1,13 +1,12 @@ error[E0597]: `tmp0` does not live long enough - --> $DIR/regions-close-over-type-parameter-2.rs:23:21 + --> $DIR/regions-close-over-type-parameter-2.rs:23:20 | LL | let tmp1 = &tmp0; - | ^^^^ borrowed value does not live long enough + | ^^^^^ borrowed value does not live long enough LL | repeater3(tmp1) + | --------------- borrow later captured here by trait object LL | }; - | -- borrowed value needs to live until here - | | - | `tmp0` dropped here while still borrowed + | - `tmp0` dropped here while still borrowed error: aborting due to previous error diff --git a/src/test/ui/span/regions-escape-loop-via-variable.nll.stderr b/src/test/ui/span/regions-escape-loop-via-variable.nll.stderr deleted file mode 100644 index 42df668529..0000000000 --- a/src/test/ui/span/regions-escape-loop-via-variable.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0597]: `x` does not live long enough - --> $DIR/regions-escape-loop-via-variable.rs:11:13 - | -LL | let x = 1 + *p; - | -- borrow later used here -LL | p = &x; - | ^^ borrowed value does not live long enough -LL | } - | - `x` dropped here while still borrowed - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/regions-escape-loop-via-variable.stderr b/src/test/ui/span/regions-escape-loop-via-variable.stderr index ef36b81f49..42df668529 100644 --- a/src/test/ui/span/regions-escape-loop-via-variable.stderr +++ b/src/test/ui/span/regions-escape-loop-via-variable.stderr @@ -1,13 +1,12 @@ error[E0597]: `x` does not live long enough - --> $DIR/regions-escape-loop-via-variable.rs:11:14 + --> $DIR/regions-escape-loop-via-variable.rs:11:13 | +LL | let x = 1 + *p; + | -- borrow later used here LL | p = &x; - | ^ borrowed value does not live long enough + | ^^ borrowed value does not live long enough LL | } | - `x` dropped here while still borrowed -LL | -LL | } - | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/regions-escape-loop-via-vec.nll.stderr b/src/test/ui/span/regions-escape-loop-via-vec.nll.stderr deleted file mode 100644 index 284981e934..0000000000 --- a/src/test/ui/span/regions-escape-loop-via-vec.nll.stderr +++ /dev/null @@ -1,49 +0,0 @@ -error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/regions-escape-loop-via-vec.rs:5:11 - | -LL | let mut _y = vec![&mut x]; - | ------ borrow of `x` occurs here -LL | while x < 10 { - | ^ use of borrowed `x` -LL | let mut z = x; -LL | _y.push(&mut z); - | -- borrow later used here - -error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/regions-escape-loop-via-vec.rs:6:21 - | -LL | let mut _y = vec![&mut x]; - | ------ borrow of `x` occurs here -LL | while x < 10 { -LL | let mut z = x; - | ^ use of borrowed `x` -LL | _y.push(&mut z); - | -- borrow later used here - -error[E0597]: `z` does not live long enough - --> $DIR/regions-escape-loop-via-vec.rs:7:17 - | -LL | _y.push(&mut z); - | -- ^^^^^^ borrowed value does not live long enough - | | - | borrow later used here -... -LL | } - | - `z` dropped here while still borrowed - -error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/regions-escape-loop-via-vec.rs:9:9 - | -LL | let mut _y = vec![&mut x]; - | ------ borrow of `x` occurs here -... -LL | _y.push(&mut z); - | -- borrow later used here -LL | -LL | x += 1; - | ^^^^^^ use of borrowed `x` - -error: aborting due to 4 previous errors - -Some errors occurred: E0503, E0597. -For more information about an error, try `rustc --explain E0503`. diff --git a/src/test/ui/span/regions-escape-loop-via-vec.rs b/src/test/ui/span/regions-escape-loop-via-vec.rs index 52f3dc37c9..1fceb09696 100644 --- a/src/test/ui/span/regions-escape-loop-via-vec.rs +++ b/src/test/ui/span/regions-escape-loop-via-vec.rs @@ -6,7 +6,7 @@ fn broken() { let mut z = x; //~ ERROR cannot use `x` because it was mutably borrowed _y.push(&mut z); //~^ ERROR `z` does not live long enough - x += 1; //~ ERROR cannot assign + x += 1; //~ ERROR cannot use `x` because it was mutably borrowed } } diff --git a/src/test/ui/span/regions-escape-loop-via-vec.stderr b/src/test/ui/span/regions-escape-loop-via-vec.stderr index 1d604b58d7..b47250db72 100644 --- a/src/test/ui/span/regions-escape-loop-via-vec.stderr +++ b/src/test/ui/span/regions-escape-loop-via-vec.stderr @@ -1,41 +1,49 @@ -error[E0597]: `z` does not live long enough - --> $DIR/regions-escape-loop-via-vec.rs:7:22 - | -LL | _y.push(&mut z); - | ^ borrowed value does not live long enough -... -LL | } - | - `z` dropped here while still borrowed -LL | } - | - borrowed value needs to live until here - error[E0503]: cannot use `x` because it was mutably borrowed --> $DIR/regions-escape-loop-via-vec.rs:5:11 | LL | let mut _y = vec![&mut x]; - | - borrow of `x` occurs here + | ------ borrow of `x` occurs here LL | while x < 10 { | ^ use of borrowed `x` +LL | let mut z = x; +LL | _y.push(&mut z); + | -- borrow later used here error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/regions-escape-loop-via-vec.rs:6:13 + --> $DIR/regions-escape-loop-via-vec.rs:6:21 | LL | let mut _y = vec![&mut x]; - | - borrow of `x` occurs here + | ------ borrow of `x` occurs here LL | while x < 10 { LL | let mut z = x; - | ^^^^^ use of borrowed `x` + | ^ use of borrowed `x` +LL | _y.push(&mut z); + | -- borrow later used here -error[E0506]: cannot assign to `x` because it is borrowed +error[E0597]: `z` does not live long enough + --> $DIR/regions-escape-loop-via-vec.rs:7:17 + | +LL | _y.push(&mut z); + | -- ^^^^^^ borrowed value does not live long enough + | | + | borrow later used here +... +LL | } + | - `z` dropped here while still borrowed + +error[E0503]: cannot use `x` because it was mutably borrowed --> $DIR/regions-escape-loop-via-vec.rs:9:9 | LL | let mut _y = vec![&mut x]; - | - borrow of `x` occurs here + | ------ borrow of `x` occurs here ... +LL | _y.push(&mut z); + | -- borrow later used here +LL | LL | x += 1; - | ^^^^^^ assignment to borrowed `x` occurs here + | ^^^^^^ use of borrowed `x` error: aborting due to 4 previous errors -Some errors occurred: E0503, E0506, E0597. +Some errors have detailed explanations: E0503, E0597. For more information about an error, try `rustc --explain E0503`. diff --git a/src/test/ui/span/regions-infer-borrow-scope-within-loop.nll.stderr b/src/test/ui/span/regions-infer-borrow-scope-within-loop.nll.stderr deleted file mode 100644 index fd67c65c4e..0000000000 --- a/src/test/ui/span/regions-infer-borrow-scope-within-loop.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0597]: `*x` does not live long enough - --> $DIR/regions-infer-borrow-scope-within-loop.rs:13:20 - | -LL | y = borrow(&*x); - | ^^^ borrowed value does not live long enough -... -LL | } - | - `*x` dropped here while still borrowed -LL | assert!(*y != 0); - | -- borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/regions-infer-borrow-scope-within-loop.stderr b/src/test/ui/span/regions-infer-borrow-scope-within-loop.stderr index 94abbcef03..fd67c65c4e 100644 --- a/src/test/ui/span/regions-infer-borrow-scope-within-loop.stderr +++ b/src/test/ui/span/regions-infer-borrow-scope-within-loop.stderr @@ -1,14 +1,13 @@ error[E0597]: `*x` does not live long enough - --> $DIR/regions-infer-borrow-scope-within-loop.rs:13:21 + --> $DIR/regions-infer-borrow-scope-within-loop.rs:13:20 | LL | y = borrow(&*x); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough ... LL | } | - `*x` dropped here while still borrowed LL | assert!(*y != 0); -LL | } - | - borrowed value needs to live until here + | -- borrow later used here error: aborting due to previous error diff --git a/src/test/ui/span/send-is-not-static-ensures-scoping.nll.stderr b/src/test/ui/span/send-is-not-static-ensures-scoping.nll.stderr deleted file mode 100644 index 65d10c1305..0000000000 --- a/src/test/ui/span/send-is-not-static-ensures-scoping.nll.stderr +++ /dev/null @@ -1,29 +0,0 @@ -error[E0597]: `x` does not live long enough - --> $DIR/send-is-not-static-ensures-scoping.rs:16:17 - | -LL | let bad = { - | --- borrow later stored here -LL | let x = 1; -LL | let y = &x; - | ^^ borrowed value does not live long enough -... -LL | }; - | - `x` dropped here while still borrowed - -error[E0597]: `y` does not live long enough - --> $DIR/send-is-not-static-ensures-scoping.rs:20:22 - | -LL | let bad = { - | --- borrow later stored here -... -LL | scoped(|| { - | -- value captured here -LL | let _z = y; - | ^ borrowed value does not live long enough -... -LL | }; - | - `y` dropped here while still borrowed - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/send-is-not-static-ensures-scoping.stderr b/src/test/ui/span/send-is-not-static-ensures-scoping.stderr index 47026284fb..65d10c1305 100644 --- a/src/test/ui/span/send-is-not-static-ensures-scoping.stderr +++ b/src/test/ui/span/send-is-not-static-ensures-scoping.stderr @@ -1,28 +1,28 @@ error[E0597]: `x` does not live long enough - --> $DIR/send-is-not-static-ensures-scoping.rs:16:18 + --> $DIR/send-is-not-static-ensures-scoping.rs:16:17 | +LL | let bad = { + | --- borrow later stored here +LL | let x = 1; LL | let y = &x; - | ^ borrowed value does not live long enough + | ^^ borrowed value does not live long enough ... LL | }; | - `x` dropped here while still borrowed -... -LL | } - | - borrowed value needs to live until here error[E0597]: `y` does not live long enough --> $DIR/send-is-not-static-ensures-scoping.rs:20:22 | +LL | let bad = { + | --- borrow later stored here +... LL | scoped(|| { - | -- capture occurs here + | -- value captured here LL | let _z = y; | ^ borrowed value does not live long enough ... LL | }; - | - borrowed value only lives until here -... -LL | } - | - borrowed value needs to live until here + | - `y` dropped here while still borrowed error: aborting due to 2 previous errors diff --git a/src/test/ui/span/send-is-not-static-std-sync-2.nll.stderr b/src/test/ui/span/send-is-not-static-std-sync-2.nll.stderr deleted file mode 100644 index bcd07e1164..0000000000 --- a/src/test/ui/span/send-is-not-static-std-sync-2.nll.stderr +++ /dev/null @@ -1,37 +0,0 @@ -error[E0597]: `x` does not live long enough - --> $DIR/send-is-not-static-std-sync-2.rs:11:20 - | -LL | let lock = { - | ---- borrow later stored here -LL | let x = 1; -LL | Mutex::new(&x) - | ^^ borrowed value does not live long enough -LL | }; - | - `x` dropped here while still borrowed - -error[E0597]: `x` does not live long enough - --> $DIR/send-is-not-static-std-sync-2.rs:21:21 - | -LL | let lock = { - | ---- borrow later stored here -LL | let x = 1; -LL | RwLock::new(&x) - | ^^ borrowed value does not live long enough -LL | }; - | - `x` dropped here while still borrowed - -error[E0597]: `x` does not live long enough - --> $DIR/send-is-not-static-std-sync-2.rs:31:25 - | -LL | let (_tx, rx) = { - | --- borrow later used here -... -LL | let _ = tx.send(&x); - | ^^ borrowed value does not live long enough -LL | (tx, rx) -LL | }; - | - `x` dropped here while still borrowed - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/send-is-not-static-std-sync-2.stderr b/src/test/ui/span/send-is-not-static-std-sync-2.stderr index 4172731745..bcd07e1164 100644 --- a/src/test/ui/span/send-is-not-static-std-sync-2.stderr +++ b/src/test/ui/span/send-is-not-static-std-sync-2.stderr @@ -1,36 +1,36 @@ error[E0597]: `x` does not live long enough - --> $DIR/send-is-not-static-std-sync-2.rs:11:21 + --> $DIR/send-is-not-static-std-sync-2.rs:11:20 | +LL | let lock = { + | ---- borrow later stored here +LL | let x = 1; LL | Mutex::new(&x) - | ^ borrowed value does not live long enough + | ^^ borrowed value does not live long enough LL | }; | - `x` dropped here while still borrowed -... -LL | } - | - borrowed value needs to live until here error[E0597]: `x` does not live long enough - --> $DIR/send-is-not-static-std-sync-2.rs:21:22 + --> $DIR/send-is-not-static-std-sync-2.rs:21:21 | +LL | let lock = { + | ---- borrow later stored here +LL | let x = 1; LL | RwLock::new(&x) - | ^ borrowed value does not live long enough + | ^^ borrowed value does not live long enough LL | }; | - `x` dropped here while still borrowed -... -LL | } - | - borrowed value needs to live until here error[E0597]: `x` does not live long enough - --> $DIR/send-is-not-static-std-sync-2.rs:31:26 + --> $DIR/send-is-not-static-std-sync-2.rs:31:25 | +LL | let (_tx, rx) = { + | --- borrow later used here +... LL | let _ = tx.send(&x); - | ^ borrowed value does not live long enough + | ^^ borrowed value does not live long enough LL | (tx, rx) LL | }; | - `x` dropped here while still borrowed -... -LL | } - | - borrowed value needs to live until here error: aborting due to 3 previous errors diff --git a/src/test/ui/span/send-is-not-static-std-sync.nll.stderr b/src/test/ui/span/send-is-not-static-std-sync.nll.stderr deleted file mode 100644 index 93473a86b5..0000000000 --- a/src/test/ui/span/send-is-not-static-std-sync.nll.stderr +++ /dev/null @@ -1,72 +0,0 @@ -error[E0505]: cannot move out of `y` because it is borrowed - --> $DIR/send-is-not-static-std-sync.rs:13:10 - | -LL | *lock.lock().unwrap() = &*y; - | --- borrow of `*y` occurs here -LL | drop(y); - | ^ move out of `y` occurs here -... -LL | *lock.lock().unwrap() = &z; - | ---- borrow later used here - -error[E0597]: `z` does not live long enough - --> $DIR/send-is-not-static-std-sync.rs:16:33 - | -LL | *lock.lock().unwrap() = &z; - | ^^ borrowed value does not live long enough -LL | } - | - `z` dropped here while still borrowed -LL | -LL | lock.use_ref(); // (Mutex is #[may_dangle] so its dtor does not use `z` => needs explicit use) - | ---- borrow later used here - -error[E0505]: cannot move out of `y` because it is borrowed - --> $DIR/send-is-not-static-std-sync.rs:27:10 - | -LL | *lock.write().unwrap() = &*y; - | --- borrow of `*y` occurs here -LL | drop(y); - | ^ move out of `y` occurs here -... -LL | *lock.write().unwrap() = &z; - | ---- borrow later used here - -error[E0597]: `z` does not live long enough - --> $DIR/send-is-not-static-std-sync.rs:30:34 - | -LL | *lock.write().unwrap() = &z; - | ^^ borrowed value does not live long enough -LL | } - | - `z` dropped here while still borrowed -LL | -LL | lock.use_ref(); // (RwLock is #[may_dangle] so its dtor does not use `z` => needs explicit use) - | ---- borrow later used here - -error[E0505]: cannot move out of `y` because it is borrowed - --> $DIR/send-is-not-static-std-sync.rs:43:10 - | -LL | tx.send(&*y); - | --- borrow of `*y` occurs here -LL | drop(y); - | ^ move out of `y` occurs here -... -LL | tx.send(&z).unwrap(); - | -- borrow later used here - -error[E0597]: `z` does not live long enough - --> $DIR/send-is-not-static-std-sync.rs:46:17 - | -LL | tx.send(&z).unwrap(); - | ^^ borrowed value does not live long enough -LL | } - | - `z` dropped here while still borrowed -... -LL | } - | - borrow might be used here, when `tx` is dropped and runs the `Drop` code for type `std::sync::mpsc::Sender` - | - = note: values in a scope are dropped in the opposite order they are defined - -error: aborting due to 6 previous errors - -Some errors occurred: E0505, E0597. -For more information about an error, try `rustc --explain E0505`. diff --git a/src/test/ui/span/send-is-not-static-std-sync.stderr b/src/test/ui/span/send-is-not-static-std-sync.stderr index aa9e1c2de2..d00b157d38 100644 --- a/src/test/ui/span/send-is-not-static-std-sync.stderr +++ b/src/test/ui/span/send-is-not-static-std-sync.stderr @@ -1,61 +1,72 @@ -error[E0597]: `z` does not live long enough - --> $DIR/send-is-not-static-std-sync.rs:16:34 - | -LL | *lock.lock().unwrap() = &z; - | ^ borrowed value does not live long enough -LL | } - | - `z` dropped here while still borrowed -... -LL | } - | - borrowed value needs to live until here - error[E0505]: cannot move out of `y` because it is borrowed --> $DIR/send-is-not-static-std-sync.rs:13:10 | LL | *lock.lock().unwrap() = &*y; - | -- borrow of `*y` occurs here + | --- borrow of `*y` occurs here LL | drop(y); | ^ move out of `y` occurs here +... +LL | *lock.lock().unwrap() = &z; + | ---- borrow later used here error[E0597]: `z` does not live long enough - --> $DIR/send-is-not-static-std-sync.rs:30:35 + --> $DIR/send-is-not-static-std-sync.rs:16:33 | -LL | *lock.write().unwrap() = &z; - | ^ borrowed value does not live long enough +LL | *lock.lock().unwrap() = &z; + | ^^ borrowed value does not live long enough LL | } | - `z` dropped here while still borrowed -... -LL | } - | - borrowed value needs to live until here +LL | +LL | lock.use_ref(); // (Mutex is #[may_dangle] so its dtor does not use `z` => needs explicit use) + | ---- borrow later used here error[E0505]: cannot move out of `y` because it is borrowed --> $DIR/send-is-not-static-std-sync.rs:27:10 | LL | *lock.write().unwrap() = &*y; - | -- borrow of `*y` occurs here + | --- borrow of `*y` occurs here LL | drop(y); | ^ move out of `y` occurs here +... +LL | *lock.write().unwrap() = &z; + | ---- borrow later used here error[E0597]: `z` does not live long enough - --> $DIR/send-is-not-static-std-sync.rs:46:18 + --> $DIR/send-is-not-static-std-sync.rs:30:34 | -LL | tx.send(&z).unwrap(); - | ^ borrowed value does not live long enough +LL | *lock.write().unwrap() = &z; + | ^^ borrowed value does not live long enough LL | } | - `z` dropped here while still borrowed -... -LL | } - | - borrowed value needs to live until here +LL | +LL | lock.use_ref(); // (RwLock is #[may_dangle] so its dtor does not use `z` => needs explicit use) + | ---- borrow later used here error[E0505]: cannot move out of `y` because it is borrowed --> $DIR/send-is-not-static-std-sync.rs:43:10 | LL | tx.send(&*y); - | -- borrow of `*y` occurs here + | --- borrow of `*y` occurs here LL | drop(y); | ^ move out of `y` occurs here +... +LL | tx.send(&z).unwrap(); + | -- borrow later used here + +error[E0597]: `z` does not live long enough + --> $DIR/send-is-not-static-std-sync.rs:46:17 + | +LL | tx.send(&z).unwrap(); + | ^^ borrowed value does not live long enough +LL | } + | - `z` dropped here while still borrowed +... +LL | } + | - borrow might be used here, when `tx` is dropped and runs the `Drop` code for type `std::sync::mpsc::Sender` + | + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to 6 previous errors -Some errors occurred: E0505, E0597. +Some errors have detailed explanations: E0505, E0597. For more information about an error, try `rustc --explain E0505`. diff --git a/src/test/ui/span/slice-borrow.nll.stderr b/src/test/ui/span/slice-borrow.nll.stderr deleted file mode 100644 index 84d0c847b7..0000000000 --- a/src/test/ui/span/slice-borrow.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/slice-borrow.rs:6:28 - | -LL | let x: &[isize] = &vec![1, 2, 3, 4, 5]; - | ^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use -... -LL | } - | - temporary value is freed at the end of this statement -LL | y.use_ref(); - | - borrow later used here - | - = note: consider using a `let` binding to create a longer lived value - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/span/slice-borrow.rs b/src/test/ui/span/slice-borrow.rs index 23e53039e9..38cd7acbdf 100644 --- a/src/test/ui/span/slice-borrow.rs +++ b/src/test/ui/span/slice-borrow.rs @@ -4,7 +4,7 @@ fn main() { let y; { let x: &[isize] = &vec![1, 2, 3, 4, 5]; - //~^ ERROR borrowed value does not live long enough + //~^ ERROR temporary value dropped while borrowed y = &x[1..]; } y.use_ref(); diff --git a/src/test/ui/span/slice-borrow.stderr b/src/test/ui/span/slice-borrow.stderr index a03cac58e2..84d0c847b7 100644 --- a/src/test/ui/span/slice-borrow.stderr +++ b/src/test/ui/span/slice-borrow.stderr @@ -1,17 +1,17 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/slice-borrow.rs:6:28 | LL | let x: &[isize] = &vec![1, 2, 3, 4, 5]; - | ^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough + | ^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use ... LL | } - | - temporary value dropped here while still borrowed + | - temporary value is freed at the end of this statement LL | y.use_ref(); -LL | } - | - temporary value needs to live until here + | - borrow later used here | + = note: consider using a `let` binding to create a longer lived value = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/span/suggestion-non-ascii.rs b/src/test/ui/span/suggestion-non-ascii.rs index 74032cf026..914efd85a0 100644 --- a/src/test/ui/span/suggestion-non-ascii.rs +++ b/src/test/ui/span/suggestion-non-ascii.rs @@ -2,4 +2,3 @@ fn main() { let tup = (1,); println!("☃{}", tup[0]); //~ ERROR cannot index into a value of type } - diff --git a/src/test/ui/span/vec-must-not-hide-type-from-dropck.nll.stderr b/src/test/ui/span/vec-must-not-hide-type-from-dropck.nll.stderr deleted file mode 100644 index f87c32d1ad..0000000000 --- a/src/test/ui/span/vec-must-not-hide-type-from-dropck.nll.stderr +++ /dev/null @@ -1,29 +0,0 @@ -error[E0597]: `c2` does not live long enough - --> $DIR/vec-must-not-hide-type-from-dropck.rs:117:24 - | -LL | c1.v[0].v.set(Some(&c2)); - | ^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `c2` dropped here while still borrowed - | borrow might be used here, when `c1` is dropped and runs the destructor for type `C<'_>` - | - = note: values in a scope are dropped in the opposite order they are defined - -error[E0597]: `c1` does not live long enough - --> $DIR/vec-must-not-hide-type-from-dropck.rs:119:24 - | -LL | c2.v[0].v.set(Some(&c1)); - | ^^^ borrowed value does not live long enough -LL | -LL | } - | - - | | - | `c1` dropped here while still borrowed - | borrow might be used here, when `c1` is dropped and runs the destructor for type `C<'_>` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr b/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr index b957243018..f87c32d1ad 100644 --- a/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr +++ b/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr @@ -1,24 +1,28 @@ error[E0597]: `c2` does not live long enough - --> $DIR/vec-must-not-hide-type-from-dropck.rs:117:25 + --> $DIR/vec-must-not-hide-type-from-dropck.rs:117:24 | LL | c1.v[0].v.set(Some(&c2)); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough ... LL | } - | - `c2` dropped here while still borrowed + | - + | | + | `c2` dropped here while still borrowed + | borrow might be used here, when `c1` is dropped and runs the destructor for type `C<'_>` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `c1` does not live long enough - --> $DIR/vec-must-not-hide-type-from-dropck.rs:119:25 + --> $DIR/vec-must-not-hide-type-from-dropck.rs:119:24 | LL | c2.v[0].v.set(Some(&c1)); - | ^^ borrowed value does not live long enough + | ^^^ borrowed value does not live long enough LL | LL | } - | - `c1` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + | - + | | + | `c1` dropped here while still borrowed + | borrow might be used here, when `c1` is dropped and runs the destructor for type `C<'_>` error: aborting due to 2 previous errors diff --git a/src/test/ui/span/vec_refs_data_with_early_death.nll.stderr b/src/test/ui/span/vec_refs_data_with_early_death.nll.stderr deleted file mode 100644 index 684e784531..0000000000 --- a/src/test/ui/span/vec_refs_data_with_early_death.nll.stderr +++ /dev/null @@ -1,31 +0,0 @@ -error[E0597]: `x` does not live long enough - --> $DIR/vec_refs_data_with_early_death.rs:17:12 - | -LL | v.push(&x); - | ^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `x` dropped here while still borrowed - | borrow might be used here, when `v` is dropped and runs the `Drop` code for type `Bag` - | - = note: values in a scope are dropped in the opposite order they are defined - -error[E0597]: `y` does not live long enough - --> $DIR/vec_refs_data_with_early_death.rs:19:12 - | -LL | v.push(&y); - | ^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `y` dropped here while still borrowed - | borrow might be used here, when `v` is dropped and runs the `Drop` code for type `Bag` - | - = note: values in a scope are dropped in the opposite order they are defined - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/vec_refs_data_with_early_death.stderr b/src/test/ui/span/vec_refs_data_with_early_death.stderr index 65fd6b5064..684e784531 100644 --- a/src/test/ui/span/vec_refs_data_with_early_death.stderr +++ b/src/test/ui/span/vec_refs_data_with_early_death.stderr @@ -1,24 +1,30 @@ error[E0597]: `x` does not live long enough - --> $DIR/vec_refs_data_with_early_death.rs:17:13 + --> $DIR/vec_refs_data_with_early_death.rs:17:12 | LL | v.push(&x); - | ^ borrowed value does not live long enough + | ^^ borrowed value does not live long enough ... LL | } - | - `x` dropped here while still borrowed + | - + | | + | `x` dropped here while still borrowed + | borrow might be used here, when `v` is dropped and runs the `Drop` code for type `Bag` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `y` does not live long enough - --> $DIR/vec_refs_data_with_early_death.rs:19:13 + --> $DIR/vec_refs_data_with_early_death.rs:19:12 | LL | v.push(&y); - | ^ borrowed value does not live long enough + | ^^ borrowed value does not live long enough ... LL | } - | - `y` dropped here while still borrowed + | - + | | + | `y` dropped here while still borrowed + | borrow might be used here, when `v` is dropped and runs the `Drop` code for type `Bag` | - = note: values in a scope are dropped in the opposite order they are created + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to 2 previous errors diff --git a/src/test/ui/span/visibility-ty-params.stderr b/src/test/ui/span/visibility-ty-params.stderr index ddc13bb1c7..cdbede3c19 100644 --- a/src/test/ui/span/visibility-ty-params.stderr +++ b/src/test/ui/span/visibility-ty-params.stderr @@ -20,4 +20,3 @@ LL | m!{ S } error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0577`. diff --git a/src/test/ui/span/wf-method-late-bound-regions.nll.stderr b/src/test/ui/span/wf-method-late-bound-regions.nll.stderr deleted file mode 100644 index 6b0b008208..0000000000 --- a/src/test/ui/span/wf-method-late-bound-regions.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0597]: `pointer` does not live long enough - --> $DIR/wf-method-late-bound-regions.rs:20:18 - | -LL | let dangling = { - | -------- borrow later stored here -LL | let pointer = Box::new(42); -LL | f2.xmute(&pointer) - | ^^^^^^^^ borrowed value does not live long enough -LL | }; - | - `pointer` dropped here while still borrowed - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/span/wf-method-late-bound-regions.stderr b/src/test/ui/span/wf-method-late-bound-regions.stderr index a30e0f4d7e..6b0b008208 100644 --- a/src/test/ui/span/wf-method-late-bound-regions.stderr +++ b/src/test/ui/span/wf-method-late-bound-regions.stderr @@ -1,13 +1,13 @@ error[E0597]: `pointer` does not live long enough - --> $DIR/wf-method-late-bound-regions.rs:20:19 + --> $DIR/wf-method-late-bound-regions.rs:20:18 | +LL | let dangling = { + | -------- borrow later stored here +LL | let pointer = Box::new(42); LL | f2.xmute(&pointer) - | ^^^^^^^ borrowed value does not live long enough + | ^^^^^^^^ borrowed value does not live long enough LL | }; | - `pointer` dropped here while still borrowed -... -LL | } - | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/specialization/defaultimpl/specialization-feature-gate-default.stderr b/src/test/ui/specialization/defaultimpl/specialization-feature-gate-default.stderr index 0b20a19d2e..b95e62edaa 100644 --- a/src/test/ui/specialization/defaultimpl/specialization-feature-gate-default.stderr +++ b/src/test/ui/specialization/defaultimpl/specialization-feature-gate-default.stderr @@ -1,4 +1,4 @@ -error[E0658]: specialization is unstable (see issue #31844) +error[E0658]: specialization is unstable --> $DIR/specialization-feature-gate-default.rs:7:1 | LL | / default impl Foo for T { @@ -6,6 +6,7 @@ LL | | fn foo(&self) {} LL | | } | |_^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/31844 = help: add #![feature(specialization)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/specialization/specialization-feature-gate-default.stderr b/src/test/ui/specialization/specialization-feature-gate-default.stderr index ad33908eff..e649f2aa47 100644 --- a/src/test/ui/specialization/specialization-feature-gate-default.stderr +++ b/src/test/ui/specialization/specialization-feature-gate-default.stderr @@ -1,9 +1,10 @@ -error[E0658]: specialization is unstable (see issue #31844) +error[E0658]: specialization is unstable --> $DIR/specialization-feature-gate-default.rs:10:5 | LL | default fn foo(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/31844 = help: add #![feature(specialization)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/specialization/specialization-overlap-hygiene.stderr b/src/test/ui/specialization/specialization-overlap-hygiene.stderr index 6adf16de46..ed99aa3102 100644 --- a/src/test/ui/specialization/specialization-overlap-hygiene.stderr +++ b/src/test/ui/specialization/specialization-overlap-hygiene.stderr @@ -9,4 +9,3 @@ LL | fn f() {} error: aborting due to previous error -For more information about this error, try `rustc --explain E0592`. diff --git a/src/test/ui/stability-attribute/stability-attribute-issue.rs b/src/test/ui/stability-attribute/stability-attribute-issue.rs index fc4a7dab1a..cda1aff133 100644 --- a/src/test/ui/stability-attribute/stability-attribute-issue.rs +++ b/src/test/ui/stability-attribute/stability-attribute-issue.rs @@ -1,6 +1,4 @@ // aux-build:stability_attribute_issue.rs -// ignore-tidy-linelength - #![deny(deprecated)] extern crate stability_attribute_issue; @@ -8,7 +6,7 @@ use stability_attribute_issue::*; fn main() { unstable(); - //~^ ERROR use of unstable library feature 'unstable_test_feature' (see issue #1) + //~^ ERROR use of unstable library feature 'unstable_test_feature' unstable_msg(); - //~^ ERROR use of unstable library feature 'unstable_test_feature': message (see issue #2) + //~^ ERROR use of unstable library feature 'unstable_test_feature': message } diff --git a/src/test/ui/stability-attribute/stability-attribute-issue.stderr b/src/test/ui/stability-attribute/stability-attribute-issue.stderr index 94fdc0db3d..7e6fbe1600 100644 --- a/src/test/ui/stability-attribute/stability-attribute-issue.stderr +++ b/src/test/ui/stability-attribute/stability-attribute-issue.stderr @@ -1,17 +1,19 @@ -error[E0658]: use of unstable library feature 'unstable_test_feature' (see issue #1) - --> $DIR/stability-attribute-issue.rs:10:5 +error[E0658]: use of unstable library feature 'unstable_test_feature' + --> $DIR/stability-attribute-issue.rs:8:5 | LL | unstable(); | ^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/1 = help: add #![feature(unstable_test_feature)] to the crate attributes to enable -error[E0658]: use of unstable library feature 'unstable_test_feature': message (see issue #2) - --> $DIR/stability-attribute-issue.rs:12:5 +error[E0658]: use of unstable library feature 'unstable_test_feature': message + --> $DIR/stability-attribute-issue.rs:10:5 | LL | unstable_msg(); | ^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/2 = help: add #![feature(unstable_test_feature)] to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/stability-attribute/stability-attribute-sanity-2.stderr b/src/test/ui/stability-attribute/stability-attribute-sanity-2.stderr index 2bc544d107..d683d08953 100644 --- a/src/test/ui/stability-attribute/stability-attribute-sanity-2.stderr +++ b/src/test/ui/stability-attribute/stability-attribute-sanity-2.stderr @@ -18,5 +18,5 @@ LL | #[unstable(feature = "a", issue = "no")] error: aborting due to 3 previous errors -Some errors occurred: E0538, E0541, E0545. +Some errors have detailed explanations: E0538, E0541. For more information about an error, try `rustc --explain E0538`. diff --git a/src/test/ui/stability-attribute/stability-attribute-sanity.stderr b/src/test/ui/stability-attribute/stability-attribute-sanity.stderr index 5343e3bd53..d9a5448bdd 100644 --- a/src/test/ui/stability-attribute/stability-attribute-sanity.stderr +++ b/src/test/ui/stability-attribute/stability-attribute-sanity.stderr @@ -102,5 +102,4 @@ LL | fn deprecated_without_unstable_or_stable() { } error: aborting due to 17 previous errors -Some errors occurred: E0539, E0540, E0541, E0542, E0544, E0546, E0547, E0549, E0553. -For more information about an error, try `rustc --explain E0539`. +For more information about this error, try `rustc --explain E0541`. diff --git a/src/test/ui/static/static-closures.stderr b/src/test/ui/static/static-closures.stderr index 99235e26e1..ced78c03e0 100644 --- a/src/test/ui/static/static-closures.stderr +++ b/src/test/ui/static/static-closures.stderr @@ -6,4 +6,3 @@ LL | static || {}; error: aborting due to previous error -For more information about this error, try `rustc --explain E0697`. diff --git a/src/test/ui/static/static-drop-scope.nll.stderr b/src/test/ui/static/static-drop-scope.nll.stderr deleted file mode 100644 index df6383b4fc..0000000000 --- a/src/test/ui/static/static-drop-scope.nll.stderr +++ /dev/null @@ -1,72 +0,0 @@ -error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/static-drop-scope.rs:9:60 - | -LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor); - | ^^^^^^^^ statics cannot evaluate destructors - -error[E0716]: temporary value dropped while borrowed - --> $DIR/static-drop-scope.rs:9:60 - | -LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor); - | ------^^^^^^^^- - | | | | - | | | temporary value is freed at the end of this statement - | | creates a temporary which is freed while still in use - | using this value as a static requires that borrow lasts for `'static` - -error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/static-drop-scope.rs:13:59 - | -LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor); - | ^^^^^^^^ constants cannot evaluate destructors - -error[E0716]: temporary value dropped while borrowed - --> $DIR/static-drop-scope.rs:13:59 - | -LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor); - | ------^^^^^^^^- - | | | | - | | | temporary value is freed at the end of this statement - | | creates a temporary which is freed while still in use - | using this value as a constant requires that borrow lasts for `'static` - -error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/static-drop-scope.rs:17:28 - | -LL | static EARLY_DROP_S: i32 = (WithDtor, 0).1; - | ^^^^^^^^^^^^^ statics cannot evaluate destructors - -error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/static-drop-scope.rs:20:27 - | -LL | const EARLY_DROP_C: i32 = (WithDtor, 0).1; - | ^^^^^^^^^^^^^ constants cannot evaluate destructors - -error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/static-drop-scope.rs:23:24 - | -LL | const fn const_drop(_: T) {} - | ^ constant functions cannot evaluate destructors - -error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/static-drop-scope.rs:27:5 - | -LL | (x, ()).1 - | ^^^^^^^ constant functions cannot evaluate destructors - -error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/static-drop-scope.rs:31:34 - | -LL | const EARLY_DROP_C_OPTION: i32 = (Some(WithDtor), 0).1; - | ^^^^^^^^^^^^^^^^^^^ constants cannot evaluate destructors - -error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/static-drop-scope.rs:36:43 - | -LL | const EARLY_DROP_C_OPTION_CONSTANT: i32 = (HELPER, 0).1; - | ^^^^^^^^^^^ constants cannot evaluate destructors - -error: aborting due to 10 previous errors - -Some errors occurred: E0493, E0716. -For more information about an error, try `rustc --explain E0493`. diff --git a/src/test/ui/static/static-drop-scope.rs b/src/test/ui/static/static-drop-scope.rs index e5a9f2a405..0de28d5469 100644 --- a/src/test/ui/static/static-drop-scope.rs +++ b/src/test/ui/static/static-drop-scope.rs @@ -8,11 +8,11 @@ impl Drop for WithDtor { static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor); //~^ ERROR destructors cannot be evaluated at compile-time -//~| ERROR borrowed value does not live long enoug +//~| ERROR temporary value dropped while borrowed const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor); //~^ ERROR destructors cannot be evaluated at compile-time -//~| ERROR borrowed value does not live long enoug +//~| ERROR temporary value dropped while borrowed static EARLY_DROP_S: i32 = (WithDtor, 0).1; //~^ ERROR destructors cannot be evaluated at compile-time diff --git a/src/test/ui/static/static-drop-scope.stderr b/src/test/ui/static/static-drop-scope.stderr index 3e3032eb4f..8a23dad1ba 100644 --- a/src/test/ui/static/static-drop-scope.stderr +++ b/src/test/ui/static/static-drop-scope.stderr @@ -4,15 +4,15 @@ error[E0493]: destructors cannot be evaluated at compile-time LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor); | ^^^^^^^^ statics cannot evaluate destructors -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/static-drop-scope.rs:9:60 | LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor); - | ^^^^^^^^- temporary value only lives until here - | | - | temporary value does not live long enough - | - = note: borrowed value must be valid for the static lifetime... + | ------^^^^^^^^- + | | | | + | | | temporary value is freed at the end of this statement + | | creates a temporary which is freed while still in use + | using this value as a static requires that borrow lasts for `'static` error[E0493]: destructors cannot be evaluated at compile-time --> $DIR/static-drop-scope.rs:13:59 @@ -20,15 +20,15 @@ error[E0493]: destructors cannot be evaluated at compile-time LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor); | ^^^^^^^^ constants cannot evaluate destructors -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/static-drop-scope.rs:13:59 | LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor); - | ^^^^^^^^- temporary value only lives until here - | | - | temporary value does not live long enough - | - = note: borrowed value must be valid for the static lifetime... + | ------^^^^^^^^- + | | | | + | | | temporary value is freed at the end of this statement + | | creates a temporary which is freed while still in use + | using this value as a constant requires that borrow lasts for `'static` error[E0493]: destructors cannot be evaluated at compile-time --> $DIR/static-drop-scope.rs:17:28 @@ -68,5 +68,4 @@ LL | const EARLY_DROP_C_OPTION_CONSTANT: i32 = (HELPER, 0).1; error: aborting due to 10 previous errors -Some errors occurred: E0493, E0597. -For more information about an error, try `rustc --explain E0493`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/static/static-lifetime-bound.nll.stderr b/src/test/ui/static/static-lifetime-bound.nll.stderr deleted file mode 100644 index 90d728204e..0000000000 --- a/src/test/ui/static/static-lifetime-bound.nll.stderr +++ /dev/null @@ -1,22 +0,0 @@ -warning: unnecessary lifetime parameter `'a` - --> $DIR/static-lifetime-bound.rs:1:6 - | -LL | fn f<'a: 'static>(_: &'a i32) {} - | ^^^^^^^^^^^ - | - = help: you can use the `'static` lifetime directly, in place of `'a` - -error[E0597]: `x` does not live long enough - --> $DIR/static-lifetime-bound.rs:5:7 - | -LL | f(&x); - | --^^- - | | | - | | borrowed value does not live long enough - | argument requires that `x` is borrowed for `'static` -LL | } - | - `x` dropped here while still borrowed - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/static/static-lifetime-bound.stderr b/src/test/ui/static/static-lifetime-bound.stderr index b9aa4d8722..90d728204e 100644 --- a/src/test/ui/static/static-lifetime-bound.stderr +++ b/src/test/ui/static/static-lifetime-bound.stderr @@ -7,14 +7,15 @@ LL | fn f<'a: 'static>(_: &'a i32) {} = help: you can use the `'static` lifetime directly, in place of `'a` error[E0597]: `x` does not live long enough - --> $DIR/static-lifetime-bound.rs:5:8 + --> $DIR/static-lifetime-bound.rs:5:7 | LL | f(&x); - | ^ borrowed value does not live long enough + | --^^- + | | | + | | borrowed value does not live long enough + | argument requires that `x` is borrowed for `'static` LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - `x` dropped here while still borrowed error: aborting due to previous error diff --git a/src/test/ui/static/static-mut-not-constant.stderr b/src/test/ui/static/static-mut-not-constant.stderr index d2c6ba6a2f..3560be0e29 100644 --- a/src/test/ui/static/static-mut-not-constant.stderr +++ b/src/test/ui/static/static-mut-not-constant.stderr @@ -12,5 +12,5 @@ LL | static mut a: Box = box 3; error: aborting due to 2 previous errors -Some errors occurred: E0010, E0019. +Some errors have detailed explanations: E0010, E0019. For more information about an error, try `rustc --explain E0010`. diff --git a/src/test/ui/static/static-reference-to-fn-2.nll.stderr b/src/test/ui/static/static-reference-to-fn-2.nll.stderr deleted file mode 100644 index 07c8b48eb1..0000000000 --- a/src/test/ui/static/static-reference-to-fn-2.nll.stderr +++ /dev/null @@ -1,47 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/static-reference-to-fn-2.rs:18:22 - | -LL | fn state1(self_: &mut StateMachineIter) -> Option<&'static str> { - | ----- has type `&mut StateMachineIter<'1>` -LL | self_.statefn = &id(state2 as StateMachineFunc); - | -----------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- temporary value is freed at the end of this statement - | | | - | | creates a temporary which is freed while still in use - | assignment requires that borrow lasts for `'1` - -error[E0716]: temporary value dropped while borrowed - --> $DIR/static-reference-to-fn-2.rs:24:22 - | -LL | fn state2(self_: &mut StateMachineIter) -> Option<(&'static str)> { - | ----- has type `&mut StateMachineIter<'1>` -LL | self_.statefn = &id(state3 as StateMachineFunc); - | -----------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- temporary value is freed at the end of this statement - | | | - | | creates a temporary which is freed while still in use - | assignment requires that borrow lasts for `'1` - -error[E0716]: temporary value dropped while borrowed - --> $DIR/static-reference-to-fn-2.rs:30:22 - | -LL | fn state3(self_: &mut StateMachineIter) -> Option<(&'static str)> { - | ----- has type `&mut StateMachineIter<'1>` -LL | self_.statefn = &id(finished as StateMachineFunc); - | -----------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- temporary value is freed at the end of this statement - | | | - | | creates a temporary which is freed while still in use - | assignment requires that borrow lasts for `'1` - -error[E0515]: cannot return value referencing temporary value - --> $DIR/static-reference-to-fn-2.rs:40:5 - | -LL | / StateMachineIter { -LL | | statefn: &id(state1 as StateMachineFunc) - | | ------------------------------ temporary value created here -LL | | -LL | | } - | |_____^ returns a value referencing data owned by the current function - -error: aborting due to 4 previous errors - -Some errors occurred: E0515, E0716. -For more information about an error, try `rustc --explain E0515`. diff --git a/src/test/ui/static/static-reference-to-fn-2.rs b/src/test/ui/static/static-reference-to-fn-2.rs index 8e66532cad..6693667c09 100644 --- a/src/test/ui/static/static-reference-to-fn-2.rs +++ b/src/test/ui/static/static-reference-to-fn-2.rs @@ -16,19 +16,19 @@ impl<'a> Iterator for StateMachineIter<'a> { fn state1(self_: &mut StateMachineIter) -> Option<&'static str> { self_.statefn = &id(state2 as StateMachineFunc); - //~^ ERROR borrowed value does not live long enough + //~^ ERROR temporary value dropped while borrowed return Some("state1"); } fn state2(self_: &mut StateMachineIter) -> Option<(&'static str)> { self_.statefn = &id(state3 as StateMachineFunc); - //~^ ERROR borrowed value does not live long enough + //~^ ERROR temporary value dropped while borrowed return Some("state2"); } fn state3(self_: &mut StateMachineIter) -> Option<(&'static str)> { self_.statefn = &id(finished as StateMachineFunc); - //~^ ERROR borrowed value does not live long enough + //~^ ERROR temporary value dropped while borrowed return Some("state3"); } @@ -38,8 +38,8 @@ fn finished(_: &mut StateMachineIter) -> Option<(&'static str)> { fn state_iter() -> StateMachineIter<'static> { StateMachineIter { + //~^ ERROR cannot return value referencing temporary value statefn: &id(state1 as StateMachineFunc) - //~^ ERROR borrowed value does not live long enough } } diff --git a/src/test/ui/static/static-reference-to-fn-2.stderr b/src/test/ui/static/static-reference-to-fn-2.stderr index 17d4a36125..028e11a60c 100644 --- a/src/test/ui/static/static-reference-to-fn-2.stderr +++ b/src/test/ui/static/static-reference-to-fn-2.stderr @@ -1,71 +1,47 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/static-reference-to-fn-2.rs:18:22 | +LL | fn state1(self_: &mut StateMachineIter) -> Option<&'static str> { + | ----- has type `&mut StateMachineIter<'1>` LL | self_.statefn = &id(state2 as StateMachineFunc); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- temporary value only lives until here - | | - | temporary value does not live long enough - | -note: borrowed value must be valid for the anonymous lifetime #2 defined on the function body at 17:1... - --> $DIR/static-reference-to-fn-2.rs:17:1 - | -LL | / fn state1(self_: &mut StateMachineIter) -> Option<&'static str> { -LL | | self_.statefn = &id(state2 as StateMachineFunc); -LL | | -LL | | return Some("state1"); -LL | | } - | |_^ - = note: consider using a `let` binding to increase its lifetime + | -----------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- temporary value is freed at the end of this statement + | | | + | | creates a temporary which is freed while still in use + | assignment requires that borrow lasts for `'1` -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/static-reference-to-fn-2.rs:24:22 | +LL | fn state2(self_: &mut StateMachineIter) -> Option<(&'static str)> { + | ----- has type `&mut StateMachineIter<'1>` LL | self_.statefn = &id(state3 as StateMachineFunc); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- temporary value only lives until here - | | - | temporary value does not live long enough - | -note: borrowed value must be valid for the anonymous lifetime #2 defined on the function body at 23:1... - --> $DIR/static-reference-to-fn-2.rs:23:1 - | -LL | / fn state2(self_: &mut StateMachineIter) -> Option<(&'static str)> { -LL | | self_.statefn = &id(state3 as StateMachineFunc); -LL | | -LL | | return Some("state2"); -LL | | } - | |_^ - = note: consider using a `let` binding to increase its lifetime + | -----------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- temporary value is freed at the end of this statement + | | | + | | creates a temporary which is freed while still in use + | assignment requires that borrow lasts for `'1` -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/static-reference-to-fn-2.rs:30:22 | +LL | fn state3(self_: &mut StateMachineIter) -> Option<(&'static str)> { + | ----- has type `&mut StateMachineIter<'1>` LL | self_.statefn = &id(finished as StateMachineFunc); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- temporary value only lives until here - | | - | temporary value does not live long enough - | -note: borrowed value must be valid for the anonymous lifetime #2 defined on the function body at 29:1... - --> $DIR/static-reference-to-fn-2.rs:29:1 - | -LL | / fn state3(self_: &mut StateMachineIter) -> Option<(&'static str)> { -LL | | self_.statefn = &id(finished as StateMachineFunc); -LL | | -LL | | return Some("state3"); -LL | | } - | |_^ - = note: consider using a `let` binding to increase its lifetime + | -----------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- temporary value is freed at the end of this statement + | | | + | | creates a temporary which is freed while still in use + | assignment requires that borrow lasts for `'1` -error[E0597]: borrowed value does not live long enough - --> $DIR/static-reference-to-fn-2.rs:41:19 +error[E0515]: cannot return value referencing temporary value + --> $DIR/static-reference-to-fn-2.rs:40:5 | -LL | statefn: &id(state1 as StateMachineFunc) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -... -LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... +LL | / StateMachineIter { +LL | | +LL | | statefn: &id(state1 as StateMachineFunc) + | | ------------------------------ temporary value created here +LL | | } + | |_____^ returns a value referencing data owned by the current function error: aborting due to 4 previous errors -For more information about this error, try `rustc --explain E0597`. +Some errors have detailed explanations: E0515, E0716. +For more information about an error, try `rustc --explain E0515`. diff --git a/src/test/ui/static/static-region-bound.nll.stderr b/src/test/ui/static/static-region-bound.nll.stderr deleted file mode 100644 index 15261259ed..0000000000 --- a/src/test/ui/static/static-region-bound.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0716]: temporary value dropped while borrowed - --> $DIR/static-region-bound.rs:10:14 - | -LL | let x = &id(3); - | ^^^^^ creates a temporary which is freed while still in use -LL | f(x); - | ---- argument requires that borrow lasts for `'static` -LL | } - | - temporary value is freed at the end of this statement - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/static/static-region-bound.rs b/src/test/ui/static/static-region-bound.rs index ee411370d1..f133133b33 100644 --- a/src/test/ui/static/static-region-bound.rs +++ b/src/test/ui/static/static-region-bound.rs @@ -7,6 +7,6 @@ fn f(_: T) {} fn main() { let x: Box<_> = box 3; f(x); - let x = &id(3); //~ ERROR borrowed value does not live long enough + let x = &id(3); //~ ERROR temporary value dropped while borrowed f(x); } diff --git a/src/test/ui/static/static-region-bound.stderr b/src/test/ui/static/static-region-bound.stderr index f6bbfcecf6..15261259ed 100644 --- a/src/test/ui/static/static-region-bound.stderr +++ b/src/test/ui/static/static-region-bound.stderr @@ -1,14 +1,13 @@ -error[E0597]: borrowed value does not live long enough +error[E0716]: temporary value dropped while borrowed --> $DIR/static-region-bound.rs:10:14 | LL | let x = &id(3); - | ^^^^^ temporary value does not live long enough + | ^^^^^ creates a temporary which is freed while still in use LL | f(x); + | ---- argument requires that borrow lasts for `'static` LL | } - | - temporary value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - temporary value is freed at the end of this statement error: aborting due to previous error -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0716`. diff --git a/src/test/ui/std-uncopyable-atomics.nll.stderr b/src/test/ui/std-uncopyable-atomics.nll.stderr deleted file mode 100644 index 8241f6f1fd..0000000000 --- a/src/test/ui/std-uncopyable-atomics.nll.stderr +++ /dev/null @@ -1,39 +0,0 @@ -error[E0507]: cannot move out of borrowed content - --> $DIR/std-uncopyable-atomics.rs:9:13 - | -LL | let x = *&x; - | ^^^ - | | - | cannot move out of borrowed content - | help: consider removing the `*`: `&x` - -error[E0507]: cannot move out of borrowed content - --> $DIR/std-uncopyable-atomics.rs:11:13 - | -LL | let x = *&x; - | ^^^ - | | - | cannot move out of borrowed content - | help: consider removing the `*`: `&x` - -error[E0507]: cannot move out of borrowed content - --> $DIR/std-uncopyable-atomics.rs:13:13 - | -LL | let x = *&x; - | ^^^ - | | - | cannot move out of borrowed content - | help: consider removing the `*`: `&x` - -error[E0507]: cannot move out of borrowed content - --> $DIR/std-uncopyable-atomics.rs:15:13 - | -LL | let x = *&x; - | ^^^ - | | - | cannot move out of borrowed content - | help: consider removing the `*`: `&x` - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/std-uncopyable-atomics.stderr b/src/test/ui/std-uncopyable-atomics.stderr index 7f01434838..8241f6f1fd 100644 --- a/src/test/ui/std-uncopyable-atomics.stderr +++ b/src/test/ui/std-uncopyable-atomics.stderr @@ -5,7 +5,7 @@ LL | let x = *&x; | ^^^ | | | cannot move out of borrowed content - | help: consider using a reference instead: `&*&x` + | help: consider removing the `*`: `&x` error[E0507]: cannot move out of borrowed content --> $DIR/std-uncopyable-atomics.rs:11:13 @@ -14,7 +14,7 @@ LL | let x = *&x; | ^^^ | | | cannot move out of borrowed content - | help: consider using a reference instead: `&*&x` + | help: consider removing the `*`: `&x` error[E0507]: cannot move out of borrowed content --> $DIR/std-uncopyable-atomics.rs:13:13 @@ -23,7 +23,7 @@ LL | let x = *&x; | ^^^ | | | cannot move out of borrowed content - | help: consider using a reference instead: `&*&x` + | help: consider removing the `*`: `&x` error[E0507]: cannot move out of borrowed content --> $DIR/std-uncopyable-atomics.rs:15:13 @@ -32,7 +32,7 @@ LL | let x = *&x; | ^^^ | | | cannot move out of borrowed content - | help: consider using a reference instead: `&*&x` + | help: consider removing the `*`: `&x` error: aborting due to 4 previous errors diff --git a/src/test/ui/stmt_expr_attrs_no_feature.rs b/src/test/ui/stmt_expr_attrs_no_feature.rs index 0a71d8d133..8952175e42 100644 --- a/src/test/ui/stmt_expr_attrs_no_feature.rs +++ b/src/test/ui/stmt_expr_attrs_no_feature.rs @@ -91,42 +91,42 @@ item_mac!(e); extern { #[cfg(unset)] fn x(a: [u8; #[attr] 5]); - fn y(a: [u8; #[attr] 5]); //~ ERROR 15701 + fn y(a: [u8; #[attr] 5]); //~ ERROR attributes on expressions are experimental } struct Foo; impl Foo { #[cfg(unset)] const X: u8 = #[attr] 5; - const Y: u8 = #[attr] 5; //~ ERROR 15701 + const Y: u8 = #[attr] 5; //~ ERROR attributes on expressions are experimental } trait Bar { #[cfg(unset)] const X: [u8; #[attr] 5]; - const Y: [u8; #[attr] 5]; //~ ERROR 15701 + const Y: [u8; #[attr] 5]; //~ ERROR attributes on expressions are experimental } struct Joyce { #[cfg(unset)] field: [u8; #[attr] 5], - field2: [u8; #[attr] 5] //~ ERROR 15701 + field2: [u8; #[attr] 5] //~ ERROR attributes on expressions are experimental } struct Walky( #[cfg(unset)] [u8; #[attr] 5], - [u8; #[attr] 5] //~ ERROR 15701 + [u8; #[attr] 5] //~ ERROR attributes on expressions are experimental ); enum Mike { Happy( #[cfg(unset)] [u8; #[attr] 5], - [u8; #[attr] 5] //~ ERROR 15701 + [u8; #[attr] 5] //~ ERROR attributes on expressions are experimental ), Angry { #[cfg(unset)] field: [u8; #[attr] 5], - field2: [u8; #[attr] 5] //~ ERROR 15701 + field2: [u8; #[attr] 5] //~ ERROR attributes on expressions are experimental } } @@ -134,7 +134,7 @@ fn pat() { match 5 { #[cfg(unset)] 5 => #[attr] (), - 6 => #[attr] (), //~ ERROR 15701 + 6 => #[attr] (), //~ ERROR attributes on expressions are experimental _ => (), } } diff --git a/src/test/ui/stmt_expr_attrs_no_feature.stderr b/src/test/ui/stmt_expr_attrs_no_feature.stderr index c644126535..1b5e989af7 100644 --- a/src/test/ui/stmt_expr_attrs_no_feature.stderr +++ b/src/test/ui/stmt_expr_attrs_no_feature.stderr @@ -1,73 +1,82 @@ -error[E0658]: attributes on expressions are experimental. (see issue #15701) +error[E0658]: attributes on expressions are experimental --> $DIR/stmt_expr_attrs_no_feature.rs:13:5 | LL | #[attr] | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/15701 = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable -error[E0658]: attributes on expressions are experimental. (see issue #15701) +error[E0658]: attributes on expressions are experimental --> $DIR/stmt_expr_attrs_no_feature.rs:94:18 | LL | fn y(a: [u8; #[attr] 5]); | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/15701 = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable -error[E0658]: attributes on expressions are experimental. (see issue #15701) +error[E0658]: attributes on expressions are experimental --> $DIR/stmt_expr_attrs_no_feature.rs:101:19 | LL | const Y: u8 = #[attr] 5; | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/15701 = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable -error[E0658]: attributes on expressions are experimental. (see issue #15701) +error[E0658]: attributes on expressions are experimental --> $DIR/stmt_expr_attrs_no_feature.rs:107:19 | LL | const Y: [u8; #[attr] 5]; | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/15701 = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable -error[E0658]: attributes on expressions are experimental. (see issue #15701) +error[E0658]: attributes on expressions are experimental --> $DIR/stmt_expr_attrs_no_feature.rs:113:18 | LL | field2: [u8; #[attr] 5] | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/15701 = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable -error[E0658]: attributes on expressions are experimental. (see issue #15701) +error[E0658]: attributes on expressions are experimental --> $DIR/stmt_expr_attrs_no_feature.rs:118:10 | LL | [u8; #[attr] 5] | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/15701 = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable -error[E0658]: attributes on expressions are experimental. (see issue #15701) +error[E0658]: attributes on expressions are experimental --> $DIR/stmt_expr_attrs_no_feature.rs:124:14 | LL | [u8; #[attr] 5] | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/15701 = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable -error[E0658]: attributes on expressions are experimental. (see issue #15701) +error[E0658]: attributes on expressions are experimental --> $DIR/stmt_expr_attrs_no_feature.rs:129:22 | LL | field2: [u8; #[attr] 5] | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/15701 = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable -error[E0658]: attributes on expressions are experimental. (see issue #15701) +error[E0658]: attributes on expressions are experimental --> $DIR/stmt_expr_attrs_no_feature.rs:137:14 | LL | 6 => #[attr] (), | ^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/15701 = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable error: aborting due to 9 previous errors diff --git a/src/test/ui/str/str-array-assignment.stderr b/src/test/ui/str/str-array-assignment.stderr index 87809d212d..ecd5fb4412 100644 --- a/src/test/ui/str/str-array-assignment.stderr +++ b/src/test/ui/str/str-array-assignment.stderr @@ -48,5 +48,5 @@ LL | let w: &str = s[..2]; error: aborting due to 4 previous errors -Some errors occurred: E0277, E0308. +Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/str/str-as-char.fixed b/src/test/ui/str/str-as-char.fixed index accead5c85..42bbef8391 100644 --- a/src/test/ui/str/str-as-char.fixed +++ b/src/test/ui/str/str-as-char.fixed @@ -1,6 +1,5 @@ // run-rustfix fn main() { - println!("{}", "●●"); //~ ERROR character literal may only contain one codepoint - //~^ ERROR format argument must be a string literal + println!("●●"); //~ ERROR character literal may only contain one codepoint } diff --git a/src/test/ui/str/str-as-char.rs b/src/test/ui/str/str-as-char.rs index fb179ec724..09b9dfc590 100644 --- a/src/test/ui/str/str-as-char.rs +++ b/src/test/ui/str/str-as-char.rs @@ -2,5 +2,4 @@ fn main() { println!('●●'); //~ ERROR character literal may only contain one codepoint - //~^ ERROR format argument must be a string literal } diff --git a/src/test/ui/str/str-as-char.stderr b/src/test/ui/str/str-as-char.stderr index 162f0888a2..540a1b5537 100644 --- a/src/test/ui/str/str-as-char.stderr +++ b/src/test/ui/str/str-as-char.stderr @@ -8,15 +8,5 @@ help: if you meant to write a `str` literal, use double quotes LL | println!("●●"); | ^^^^ -error: format argument must be a string literal - --> $DIR/str-as-char.rs:4:14 - | -LL | println!('●●'); - | ^^^^ -help: you might be missing a string literal to format with - | -LL | println!("{}", '●●'); - | ^^^^^ - -error: aborting due to 2 previous errors +error: aborting due to previous error diff --git a/src/test/ui/str/str-concat-on-double-ref.stderr b/src/test/ui/str/str-concat-on-double-ref.stderr index 61ebcfdefc..3e53cdc4d9 100644 --- a/src/test/ui/str/str-concat-on-double-ref.stderr +++ b/src/test/ui/str/str-concat-on-double-ref.stderr @@ -3,10 +3,13 @@ error[E0369]: binary operation `+` cannot be applied to type `&std::string::Stri | LL | let c = a + b; | - ^ - &str - | | + | | | + | | `+` cannot be used to concatenate two `&str` strings | &std::string::String +help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | - = note: an implementation of `std::ops::Add` might be missing for `&std::string::String` +LL | let c = a.to_owned() + b; + | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/struct-literal-variant-in-if.rs b/src/test/ui/struct-literal-variant-in-if.rs new file mode 100644 index 0000000000..4ef8effaf1 --- /dev/null +++ b/src/test/ui/struct-literal-variant-in-if.rs @@ -0,0 +1,25 @@ +#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)] +enum E { + V { field: bool }, + I { field1: bool, field2: usize }, + J { field: isize }, + K { field: &'static str}, +} +fn test_E(x: E) { + let field = true; + if x == E::V { field } {} + //~^ ERROR expected value, found struct variant `E::V` + //~| ERROR mismatched types + if x == E::I { field1: true, field2: 42 } {} + //~^ ERROR struct literals are not allowed here + if x == E::V { field: false } {} + //~^ ERROR struct literals are not allowed here + if x == E::J { field: -42 } {} + //~^ ERROR struct literals are not allowed here + if x == E::K { field: "" } {} + //~^ ERROR struct literals are not allowed here + let y: usize = (); + //~^ ERROR mismatched types +} + +fn main() {} diff --git a/src/test/ui/struct-literal-variant-in-if.stderr b/src/test/ui/struct-literal-variant-in-if.stderr new file mode 100644 index 0000000000..f91b9d7dce --- /dev/null +++ b/src/test/ui/struct-literal-variant-in-if.stderr @@ -0,0 +1,73 @@ +error: struct literals are not allowed here + --> $DIR/struct-literal-variant-in-if.rs:13:13 + | +LL | if x == E::I { field1: true, field2: 42 } {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +help: surround the struct literal with parentheses + | +LL | if x == (E::I { field1: true, field2: 42 }) {} + | ^ ^ + +error: struct literals are not allowed here + --> $DIR/struct-literal-variant-in-if.rs:15:13 + | +LL | if x == E::V { field: false } {} + | ^^^^^^^^^^^^^^^^^^^^^ +help: surround the struct literal with parentheses + | +LL | if x == (E::V { field: false }) {} + | ^ ^ + +error: struct literals are not allowed here + --> $DIR/struct-literal-variant-in-if.rs:17:13 + | +LL | if x == E::J { field: -42 } {} + | ^^^^^^^^^^^^^^^^^^^ +help: surround the struct literal with parentheses + | +LL | if x == (E::J { field: -42 }) {} + | ^ ^ + +error: struct literals are not allowed here + --> $DIR/struct-literal-variant-in-if.rs:19:13 + | +LL | if x == E::K { field: "" } {} + | ^^^^^^^^^^^^^^^^^^ +help: surround the struct literal with parentheses + | +LL | if x == (E::K { field: "" }) {} + | ^ ^ + +error[E0423]: expected value, found struct variant `E::V` + --> $DIR/struct-literal-variant-in-if.rs:10:13 + | +LL | if x == E::V { field } {} + | ^^^^---------- + | | + | help: surround the struct literal with parenthesis: `(E::V { field })` + +error[E0308]: mismatched types + --> $DIR/struct-literal-variant-in-if.rs:10:20 + | +LL | fn test_E(x: E) { + | - help: try adding a return type: `-> bool` +LL | let field = true; +LL | if x == E::V { field } {} + | ^^^^^ expected (), found bool + | + = note: expected type `()` + found type `bool` + +error[E0308]: mismatched types + --> $DIR/struct-literal-variant-in-if.rs:21:20 + | +LL | let y: usize = (); + | ^^ expected usize, found () + | + = note: expected type `usize` + found type `()` + +error: aborting due to 7 previous errors + +Some errors have detailed explanations: E0308, E0423. +For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/structs/struct-base-wrong-type-2.rs b/src/test/ui/structs/struct-base-wrong-type-2.rs deleted file mode 100644 index 562f75b8e8..0000000000 --- a/src/test/ui/structs/struct-base-wrong-type-2.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Check that `base` in `Fru { field: expr, ..base }` must have right type. -// -// See also struct-base-wrong-type.rs, which tests same condition -// within a const expression. - -struct Foo { a: isize, b: isize } -struct Bar { x: isize } - -fn main() { - let b = Bar { x: 5 }; - let f = Foo { a: 2, ..b }; //~ ERROR mismatched types - //~| expected type `Foo` - //~| found type `Bar` - //~| expected struct `Foo`, found struct `Bar` - let f__isize = Foo { a: 2, ..4 }; //~ ERROR mismatched types - //~| expected type `Foo` - //~| found type `{integer}` - //~| expected struct `Foo`, found integer -} diff --git a/src/test/ui/structs/struct-base-wrong-type-2.stderr b/src/test/ui/structs/struct-base-wrong-type-2.stderr deleted file mode 100644 index d02ed205e9..0000000000 --- a/src/test/ui/structs/struct-base-wrong-type-2.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/struct-base-wrong-type-2.rs:11:27 - | -LL | let f = Foo { a: 2, ..b }; - | ^ expected struct `Foo`, found struct `Bar` - | - = note: expected type `Foo` - found type `Bar` - -error[E0308]: mismatched types - --> $DIR/struct-base-wrong-type-2.rs:15:34 - | -LL | let f__isize = Foo { a: 2, ..4 }; - | ^ expected struct `Foo`, found integer - | - = note: expected type `Foo` - found type `{integer}` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/structs/struct-base-wrong-type.rs b/src/test/ui/structs/struct-base-wrong-type.rs index 6252673c29..b64c6b4993 100644 --- a/src/test/ui/structs/struct-base-wrong-type.rs +++ b/src/test/ui/structs/struct-base-wrong-type.rs @@ -1,27 +1,14 @@ // Check that `base` in `Fru { field: expr, ..base }` must have right type. -// -// See also struct-base-wrong-type-2.rs, which tests same condition -// within a function body. struct Foo { a: isize, b: isize } struct Bar { x: isize } static bar: Bar = Bar { x: 5 }; static foo: Foo = Foo { a: 2, ..bar }; //~ ERROR mismatched types - //~| expected type `Foo` - //~| found type `Bar` - //~| expected struct `Foo`, found struct `Bar` static foo_i: Foo = Foo { a: 2, ..4 }; //~ ERROR mismatched types - //~| expected type `Foo` - //~| found type `{integer}` - //~| expected struct `Foo`, found integer fn main() { let b = Bar { x: 5 }; - // errors below are no longer caught since error above causes - // compilation to abort before we bother checking function bodies. - // See also struct-base-wrong-type-2.rs, which checks that we - // would catch these errors eventually. - let f = Foo { a: 2, ..b }; - let f__isize = Foo { a: 2, ..4 }; + let f = Foo { a: 2, ..b }; //~ ERROR mismatched types + let f__isize = Foo { a: 2, ..4 }; //~ ERROR mismatched types } diff --git a/src/test/ui/structs/struct-base-wrong-type.stderr b/src/test/ui/structs/struct-base-wrong-type.stderr index 2491296c5e..a0216305f3 100644 --- a/src/test/ui/structs/struct-base-wrong-type.stderr +++ b/src/test/ui/structs/struct-base-wrong-type.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/struct-base-wrong-type.rs:10:33 + --> $DIR/struct-base-wrong-type.rs:7:33 | LL | static foo: Foo = Foo { a: 2, ..bar }; | ^^^ expected struct `Foo`, found struct `Bar` @@ -8,7 +8,7 @@ LL | static foo: Foo = Foo { a: 2, ..bar }; found type `Bar` error[E0308]: mismatched types - --> $DIR/struct-base-wrong-type.rs:14:35 + --> $DIR/struct-base-wrong-type.rs:8:35 | LL | static foo_i: Foo = Foo { a: 2, ..4 }; | ^ expected struct `Foo`, found integer @@ -16,6 +16,24 @@ LL | static foo_i: Foo = Foo { a: 2, ..4 }; = note: expected type `Foo` found type `{integer}` -error: aborting due to 2 previous errors +error[E0308]: mismatched types + --> $DIR/struct-base-wrong-type.rs:12:27 + | +LL | let f = Foo { a: 2, ..b }; + | ^ expected struct `Foo`, found struct `Bar` + | + = note: expected type `Foo` + found type `Bar` + +error[E0308]: mismatched types + --> $DIR/struct-base-wrong-type.rs:13:34 + | +LL | let f__isize = Foo { a: 2, ..4 }; + | ^ expected struct `Foo`, found integer + | + = note: expected type `Foo` + found type `{integer}` + +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/structs/struct-field-cfg.stderr b/src/test/ui/structs/struct-field-cfg.stderr index 565866a682..29bad31ef9 100644 --- a/src/test/ui/structs/struct-field-cfg.stderr +++ b/src/test/ui/structs/struct-field-cfg.stderr @@ -26,5 +26,5 @@ LL | let Foo { present: (), #[cfg(all())] absent: () } = foo; error: aborting due to 4 previous errors -Some errors occurred: E0026, E0027, E0063, E0560. +Some errors have detailed explanations: E0026, E0027, E0063, E0560. For more information about an error, try `rustc --explain E0026`. diff --git a/src/test/ui/structs/struct-fields-shorthand.rs b/src/test/ui/structs/struct-fields-shorthand.rs index 45e3014f22..1bdcc8315c 100644 --- a/src/test/ui/structs/struct-fields-shorthand.rs +++ b/src/test/ui/structs/struct-fields-shorthand.rs @@ -9,4 +9,3 @@ fn main() { x, y, z //~ ERROR struct `Foo` has no field named `z` }; } - diff --git a/src/test/ui/structs/struct-pat-derived-error.stderr b/src/test/ui/structs/struct-pat-derived-error.stderr index 92a88defc5..673715cd3e 100644 --- a/src/test/ui/structs/struct-pat-derived-error.stderr +++ b/src/test/ui/structs/struct-pat-derived-error.stderr @@ -18,5 +18,5 @@ LL | let A { x, y } = self.d; error: aborting due to 3 previous errors -Some errors occurred: E0026, E0027, E0609. +Some errors have detailed explanations: E0026, E0027, E0609. For more information about an error, try `rustc --explain E0026`. diff --git a/src/test/ui/structs/struct-path-associated-type.stderr b/src/test/ui/structs/struct-path-associated-type.stderr index f054bd3d29..7cfbd7b720 100644 --- a/src/test/ui/structs/struct-path-associated-type.stderr +++ b/src/test/ui/structs/struct-path-associated-type.stderr @@ -54,5 +54,5 @@ LL | S::A {} => {} error: aborting due to 9 previous errors -Some errors occurred: E0071, E0109, E0223. +Some errors have detailed explanations: E0071, E0109, E0223. For more information about an error, try `rustc --explain E0071`. diff --git a/src/test/ui/structs/struct-path-self.stderr b/src/test/ui/structs/struct-path-self.stderr index d9e84acdb3..9eaa1f95bd 100644 --- a/src/test/ui/structs/struct-path-self.stderr +++ b/src/test/ui/structs/struct-path-self.stderr @@ -36,5 +36,5 @@ LL | let z = Self:: {}; error: aborting due to 6 previous errors -Some errors occurred: E0071, E0109. +Some errors have detailed explanations: E0071, E0109. For more information about an error, try `rustc --explain E0071`. diff --git a/src/test/ui/structs/structure-constructor-type-mismatch.stderr b/src/test/ui/structs/structure-constructor-type-mismatch.stderr index 375678b7ce..62d872bb3e 100644 --- a/src/test/ui/structs/structure-constructor-type-mismatch.stderr +++ b/src/test/ui/structs/structure-constructor-type-mismatch.stderr @@ -141,5 +141,5 @@ LL | PairF:: { .. } => {} error: aborting due to 13 previous errors -Some errors occurred: E0107, E0308. +Some errors have detailed explanations: E0107, E0308. For more information about an error, try `rustc --explain E0107`. diff --git a/src/test/ui/substs-ppaux.normal.stderr b/src/test/ui/substs-ppaux.normal.stderr index 567b4d9f44..123dd86b90 100644 --- a/src/test/ui/substs-ppaux.normal.stderr +++ b/src/test/ui/substs-ppaux.normal.stderr @@ -51,5 +51,5 @@ LL | fn bar<'a, T>() where T: 'a {} error: aborting due to 5 previous errors -Some errors occurred: E0277, E0308. +Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/substs-ppaux.verbose.stderr b/src/test/ui/substs-ppaux.verbose.stderr index 86936475f8..9167346282 100644 --- a/src/test/ui/substs-ppaux.verbose.stderr +++ b/src/test/ui/substs-ppaux.verbose.stderr @@ -51,5 +51,5 @@ LL | fn bar<'a, T>() where T: 'a {} error: aborting due to 5 previous errors -Some errors occurred: E0277, E0308. +Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/suggestions/attribute-typos.stderr b/src/test/ui/suggestions/attribute-typos.stderr index 077c955431..8367ff20aa 100644 --- a/src/test/ui/suggestions/attribute-typos.stderr +++ b/src/test/ui/suggestions/attribute-typos.stderr @@ -1,25 +1,28 @@ -error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics (see issue #29642) +error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics --> $DIR/attribute-typos.rs:11:3 | LL | #[rustc_err] | ^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(rustc_attrs)] to the crate attributes to enable -error[E0658]: The attribute `tests` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `tests` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/attribute-typos.rs:6:3 | LL | #[tests] | ^^^^^ help: a built-in attribute with a similar name exists: `test` | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable -error[E0658]: The attribute `deprcated` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) +error[E0658]: The attribute `deprcated` is currently unknown to the compiler and may have meaning added to it in the future --> $DIR/attribute-typos.rs:1:3 | LL | #[deprcated] | ^^^^^^^^^ help: a built-in attribute with a similar name exists: `deprecated` | + = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add #![feature(custom_attribute)] to the crate attributes to enable error: aborting due to 3 previous errors diff --git a/src/test/ui/suggestions/borrow-for-loop-head.nll.stderr b/src/test/ui/suggestions/borrow-for-loop-head.nll.stderr deleted file mode 100644 index 96dbdec707..0000000000 --- a/src/test/ui/suggestions/borrow-for-loop-head.nll.stderr +++ /dev/null @@ -1,25 +0,0 @@ -error[E0505]: cannot move out of `a` because it is borrowed - --> $DIR/borrow-for-loop-head.rs:4:18 - | -LL | for i in &a { - | -- borrow of `a` occurs here -LL | for j in a { - | ^ move out of `a` occurs here - -error[E0382]: use of moved value: `a` - --> $DIR/borrow-for-loop-head.rs:4:18 - | -LL | let a = vec![1, 2, 3]; - | - move occurs because `a` has type `std::vec::Vec`, which does not implement the `Copy` trait -LL | for i in &a { -LL | for j in a { - | ^ value moved here, in previous iteration of loop -help: consider borrowing this to avoid moving it into the for loop - | -LL | for j in &a { - | ^^ - -error: aborting due to 2 previous errors - -Some errors occurred: E0382, E0505. -For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/suggestions/borrow-for-loop-head.stderr b/src/test/ui/suggestions/borrow-for-loop-head.stderr index 17ac3fe86d..10287f59cc 100644 --- a/src/test/ui/suggestions/borrow-for-loop-head.stderr +++ b/src/test/ui/suggestions/borrow-for-loop-head.stderr @@ -2,17 +2,18 @@ error[E0505]: cannot move out of `a` because it is borrowed --> $DIR/borrow-for-loop-head.rs:4:18 | LL | for i in &a { - | - borrow of `a` occurs here + | -- borrow of `a` occurs here LL | for j in a { | ^ move out of `a` occurs here error[E0382]: use of moved value: `a` --> $DIR/borrow-for-loop-head.rs:4:18 | +LL | let a = vec![1, 2, 3]; + | - move occurs because `a` has type `std::vec::Vec`, which does not implement the `Copy` trait +LL | for i in &a { LL | for j in a { - | ^ value moved here in previous iteration of loop - | - = note: move occurs because `a` has type `std::vec::Vec`, which does not implement the `Copy` trait + | ^ value moved here, in previous iteration of loop help: consider borrowing this to avoid moving it into the for loop | LL | for j in &a { @@ -20,5 +21,5 @@ LL | for j in &a { error: aborting due to 2 previous errors -Some errors occurred: E0382, E0505. +Some errors have detailed explanations: E0382, E0505. For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.rs b/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.rs index 4faede3530..1c1230346a 100644 --- a/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.rs +++ b/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - #[derive(Clone)] enum Either { One(X), diff --git a/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr b/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr index b1aaab6a75..f8e043fbfd 100644 --- a/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr +++ b/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of borrowed content - --> $DIR/duplicate-suggestions.rs:41:27 + --> $DIR/duplicate-suggestions.rs:39:27 | LL | let &(X(_t), X(_u)) = &(x.clone(), x.clone()); | --------------- ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -9,13 +9,13 @@ LL | let &(X(_t), X(_u)) = &(x.clone(), x.clone()); | help: consider removing the `&`: `(X(_t), X(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:41:13 + --> $DIR/duplicate-suggestions.rs:39:13 | LL | let &(X(_t), X(_u)) = &(x.clone(), x.clone()); | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/duplicate-suggestions.rs:45:50 + --> $DIR/duplicate-suggestions.rs:43:50 | LL | if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { } | ----------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -25,13 +25,13 @@ LL | if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:45:26 + --> $DIR/duplicate-suggestions.rs:43:26 | LL | if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { } | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/duplicate-suggestions.rs:49:53 + --> $DIR/duplicate-suggestions.rs:47:53 | LL | while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { } | ----------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -41,13 +41,13 @@ LL | while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:49:29 + --> $DIR/duplicate-suggestions.rs:47:29 | LL | while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { } | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/duplicate-suggestions.rs:53:11 + --> $DIR/duplicate-suggestions.rs:51:11 | LL | match &(e.clone(), e.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -61,7 +61,7 @@ LL | &(Either::Two(_t), Either::One(_u)) => (), | -- ...and here -- ...and here | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:55:23 + --> $DIR/duplicate-suggestions.rs:53:23 | LL | &(Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ @@ -78,7 +78,7 @@ LL | (Either::Two(_t), Either::One(_u)) => (), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0507]: cannot move out of borrowed content - --> $DIR/duplicate-suggestions.rs:63:11 + --> $DIR/duplicate-suggestions.rs:61:11 | LL | match &(e.clone(), e.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -91,13 +91,13 @@ LL | &(Either::One(_t), Either::Two(_u)) | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:65:23 + --> $DIR/duplicate-suggestions.rs:63:23 | LL | &(Either::One(_t), Either::Two(_u)) | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/duplicate-suggestions.rs:72:11 + --> $DIR/duplicate-suggestions.rs:70:11 | LL | match &(e.clone(), e.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -110,13 +110,13 @@ LL | &(Either::One(_t), Either::Two(_u)) => (), | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:74:23 + --> $DIR/duplicate-suggestions.rs:72:23 | LL | &(Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/duplicate-suggestions.rs:80:11 + --> $DIR/duplicate-suggestions.rs:78:11 | LL | match &(e.clone(), e.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -129,13 +129,13 @@ LL | &(Either::One(_t), Either::Two(_u)) => (), | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:82:23 + --> $DIR/duplicate-suggestions.rs:80:23 | LL | &(Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/duplicate-suggestions.rs:93:31 + --> $DIR/duplicate-suggestions.rs:91:31 | LL | let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone()); | ------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -145,13 +145,13 @@ LL | let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone()); | help: consider removing the `&mut`: `(X(_t), X(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:93:17 + --> $DIR/duplicate-suggestions.rs:91:17 | LL | let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone()); | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/duplicate-suggestions.rs:97:54 + --> $DIR/duplicate-suggestions.rs:95:54 | LL | if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { } | --------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -161,13 +161,13 @@ LL | if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.c | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:97:30 + --> $DIR/duplicate-suggestions.rs:95:30 | LL | if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { } | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/duplicate-suggestions.rs:101:57 + --> $DIR/duplicate-suggestions.rs:99:57 | LL | while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { } | --------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -177,13 +177,13 @@ LL | while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), e | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:101:33 + --> $DIR/duplicate-suggestions.rs:99:33 | LL | while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { } | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/duplicate-suggestions.rs:105:11 + --> $DIR/duplicate-suggestions.rs:103:11 | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -197,7 +197,7 @@ LL | &mut (Either::Two(_t), Either::One(_u)) => (), | -- ...and here -- ...and here | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:107:27 + --> $DIR/duplicate-suggestions.rs:105:27 | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ @@ -214,7 +214,7 @@ LL | (Either::Two(_t), Either::One(_u)) => (), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0507]: cannot move out of borrowed content - --> $DIR/duplicate-suggestions.rs:115:11 + --> $DIR/duplicate-suggestions.rs:113:11 | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -227,13 +227,13 @@ LL | &mut (Either::One(_t), Either::Two(_u)) | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:117:27 + --> $DIR/duplicate-suggestions.rs:115:27 | LL | &mut (Either::One(_t), Either::Two(_u)) | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/duplicate-suggestions.rs:124:11 + --> $DIR/duplicate-suggestions.rs:122:11 | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -246,13 +246,13 @@ LL | &mut (Either::One(_t), Either::Two(_u)) => (), | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:126:27 + --> $DIR/duplicate-suggestions.rs:124:27 | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/duplicate-suggestions.rs:132:11 + --> $DIR/duplicate-suggestions.rs:130:11 | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -265,13 +265,13 @@ LL | &mut (Either::One(_t), Either::Two(_u)) => (), | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:134:27 + --> $DIR/duplicate-suggestions.rs:132:27 | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/duplicate-suggestions.rs:140:11 + --> $DIR/duplicate-suggestions.rs:138:11 | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -284,13 +284,13 @@ LL | &mut (Either::One(_t), Either::Two(_u)) => (), | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:142:27 + --> $DIR/duplicate-suggestions.rs:140:27 | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/duplicate-suggestions.rs:88:11 + --> $DIR/duplicate-suggestions.rs:86:11 | LL | fn f5(&(X(_t), X(_u)): &(X, X)) { } | ^^^^--^^^^^--^^ @@ -301,13 +301,13 @@ LL | fn f5(&(X(_t), X(_u)): &(X, X)) { } | help: consider removing the `&`: `(X(_t), X(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:88:15 + --> $DIR/duplicate-suggestions.rs:86:15 | LL | fn f5(&(X(_t), X(_u)): &(X, X)) { } | ^^ ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/duplicate-suggestions.rs:148:11 + --> $DIR/duplicate-suggestions.rs:146:11 | LL | fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { } | ^^^^^^^^--^^^^^--^^ @@ -318,7 +318,7 @@ LL | fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { } | help: consider removing the `&mut`: `(X(_t), X(_u))` | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:148:19 + --> $DIR/duplicate-suggestions.rs:146:19 | LL | fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { } | ^^ ^^ diff --git a/src/test/ui/suggestions/dont-suggest-ref/move-into-closure.rs b/src/test/ui/suggestions/dont-suggest-ref/move-into-closure.rs index 90a9fe4e7d..6e3879a415 100644 --- a/src/test/ui/suggestions/dont-suggest-ref/move-into-closure.rs +++ b/src/test/ui/suggestions/dont-suggest-ref/move-into-closure.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - #[derive(Clone)] enum Either { One(X), diff --git a/src/test/ui/suggestions/dont-suggest-ref/move-into-closure.stderr b/src/test/ui/suggestions/dont-suggest-ref/move-into-closure.stderr index f1d515e932..74f3a63be5 100644 --- a/src/test/ui/suggestions/dont-suggest-ref/move-into-closure.stderr +++ b/src/test/ui/suggestions/dont-suggest-ref/move-into-closure.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of captured variable in an `Fn` closure - --> $DIR/move-into-closure.rs:30:21 + --> $DIR/move-into-closure.rs:28:21 | LL | let x = X(Y); | - captured outer variable @@ -12,13 +12,13 @@ LL | let X(_t) = x; | data moved here | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:30:15 + --> $DIR/move-into-closure.rs:28:15 | LL | let X(_t) = x; | ^^ error[E0507]: cannot move out of captured variable in an `Fn` closure - --> $DIR/move-into-closure.rs:34:34 + --> $DIR/move-into-closure.rs:32:34 | LL | let e = Either::One(X(Y)); | - captured outer variable @@ -31,13 +31,13 @@ LL | if let Either::One(_t) = e { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:34:28 + --> $DIR/move-into-closure.rs:32:28 | LL | if let Either::One(_t) = e { } | ^^ error[E0507]: cannot move out of captured variable in an `Fn` closure - --> $DIR/move-into-closure.rs:38:37 + --> $DIR/move-into-closure.rs:36:37 | LL | let e = Either::One(X(Y)); | - captured outer variable @@ -50,13 +50,13 @@ LL | while let Either::One(_t) = e { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:38:31 + --> $DIR/move-into-closure.rs:36:31 | LL | while let Either::One(_t) = e { } | ^^ error[E0507]: cannot move out of captured variable in an `Fn` closure - --> $DIR/move-into-closure.rs:42:15 + --> $DIR/move-into-closure.rs:40:15 | LL | let e = Either::One(X(Y)); | - captured outer variable @@ -71,13 +71,13 @@ LL | Either::One(_t) | -- data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:46:25 + --> $DIR/move-into-closure.rs:44:25 | LL | Either::One(_t) | ^^ error[E0507]: cannot move out of captured variable in an `Fn` closure - --> $DIR/move-into-closure.rs:49:15 + --> $DIR/move-into-closure.rs:47:15 | LL | let e = Either::One(X(Y)); | - captured outer variable @@ -92,13 +92,13 @@ LL | Either::One(_t) => (), | -- data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:53:25 + --> $DIR/move-into-closure.rs:51:25 | LL | Either::One(_t) => (), | ^^ error[E0507]: cannot move out of captured variable in an `Fn` closure - --> $DIR/move-into-closure.rs:58:25 + --> $DIR/move-into-closure.rs:56:25 | LL | let x = X(Y); | - captured outer variable @@ -111,13 +111,13 @@ LL | let X(mut _t) = x; | data moved here | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:58:15 + --> $DIR/move-into-closure.rs:56:15 | LL | let X(mut _t) = x; | ^^^^^^ error[E0507]: cannot move out of captured variable in an `Fn` closure - --> $DIR/move-into-closure.rs:62:38 + --> $DIR/move-into-closure.rs:60:38 | LL | let mut em = Either::One(X(Y)); | ------ captured outer variable @@ -130,13 +130,13 @@ LL | if let Either::One(mut _t) = em { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:62:28 + --> $DIR/move-into-closure.rs:60:28 | LL | if let Either::One(mut _t) = em { } | ^^^^^^ error[E0507]: cannot move out of captured variable in an `Fn` closure - --> $DIR/move-into-closure.rs:66:41 + --> $DIR/move-into-closure.rs:64:41 | LL | let mut em = Either::One(X(Y)); | ------ captured outer variable @@ -149,13 +149,13 @@ LL | while let Either::One(mut _t) = em { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:66:31 + --> $DIR/move-into-closure.rs:64:31 | LL | while let Either::One(mut _t) = em { } | ^^^^^^ error[E0507]: cannot move out of captured variable in an `Fn` closure - --> $DIR/move-into-closure.rs:70:15 + --> $DIR/move-into-closure.rs:68:15 | LL | let mut em = Either::One(X(Y)); | ------ captured outer variable @@ -170,13 +170,13 @@ LL | Either::One(mut _t) | ------ data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:74:25 + --> $DIR/move-into-closure.rs:72:25 | LL | Either::One(mut _t) | ^^^^^^ error[E0507]: cannot move out of captured variable in an `Fn` closure - --> $DIR/move-into-closure.rs:77:15 + --> $DIR/move-into-closure.rs:75:15 | LL | let mut em = Either::One(X(Y)); | ------ captured outer variable @@ -191,13 +191,13 @@ LL | Either::One(mut _t) => (), | ------ data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:81:25 + --> $DIR/move-into-closure.rs:79:25 | LL | Either::One(mut _t) => (), | ^^^^^^ error[E0507]: cannot move out of captured variable in an `FnMut` closure - --> $DIR/move-into-closure.rs:97:21 + --> $DIR/move-into-closure.rs:95:21 | LL | let x = X(Y); | - captured outer variable @@ -210,13 +210,13 @@ LL | let X(_t) = x; | data moved here | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:97:15 + --> $DIR/move-into-closure.rs:95:15 | LL | let X(_t) = x; | ^^ error[E0507]: cannot move out of captured variable in an `FnMut` closure - --> $DIR/move-into-closure.rs:101:34 + --> $DIR/move-into-closure.rs:99:34 | LL | let e = Either::One(X(Y)); | - captured outer variable @@ -229,13 +229,13 @@ LL | if let Either::One(_t) = e { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:101:28 + --> $DIR/move-into-closure.rs:99:28 | LL | if let Either::One(_t) = e { } | ^^ error[E0507]: cannot move out of captured variable in an `FnMut` closure - --> $DIR/move-into-closure.rs:105:37 + --> $DIR/move-into-closure.rs:103:37 | LL | let e = Either::One(X(Y)); | - captured outer variable @@ -248,13 +248,13 @@ LL | while let Either::One(_t) = e { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:105:31 + --> $DIR/move-into-closure.rs:103:31 | LL | while let Either::One(_t) = e { } | ^^ error[E0507]: cannot move out of captured variable in an `FnMut` closure - --> $DIR/move-into-closure.rs:109:15 + --> $DIR/move-into-closure.rs:107:15 | LL | let e = Either::One(X(Y)); | - captured outer variable @@ -269,13 +269,13 @@ LL | Either::One(_t) | -- data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:113:25 + --> $DIR/move-into-closure.rs:111:25 | LL | Either::One(_t) | ^^ error[E0507]: cannot move out of captured variable in an `FnMut` closure - --> $DIR/move-into-closure.rs:116:15 + --> $DIR/move-into-closure.rs:114:15 | LL | let e = Either::One(X(Y)); | - captured outer variable @@ -290,13 +290,13 @@ LL | Either::One(_t) => (), | -- data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:120:25 + --> $DIR/move-into-closure.rs:118:25 | LL | Either::One(_t) => (), | ^^ error[E0507]: cannot move out of captured variable in an `FnMut` closure - --> $DIR/move-into-closure.rs:125:25 + --> $DIR/move-into-closure.rs:123:25 | LL | let x = X(Y); | - captured outer variable @@ -309,13 +309,13 @@ LL | let X(mut _t) = x; | data moved here | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:125:15 + --> $DIR/move-into-closure.rs:123:15 | LL | let X(mut _t) = x; | ^^^^^^ error[E0507]: cannot move out of captured variable in an `FnMut` closure - --> $DIR/move-into-closure.rs:129:38 + --> $DIR/move-into-closure.rs:127:38 | LL | let mut em = Either::One(X(Y)); | ------ captured outer variable @@ -328,13 +328,13 @@ LL | if let Either::One(mut _t) = em { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:129:28 + --> $DIR/move-into-closure.rs:127:28 | LL | if let Either::One(mut _t) = em { } | ^^^^^^ error[E0507]: cannot move out of captured variable in an `FnMut` closure - --> $DIR/move-into-closure.rs:133:41 + --> $DIR/move-into-closure.rs:131:41 | LL | let mut em = Either::One(X(Y)); | ------ captured outer variable @@ -347,13 +347,13 @@ LL | while let Either::One(mut _t) = em { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:133:31 + --> $DIR/move-into-closure.rs:131:31 | LL | while let Either::One(mut _t) = em { } | ^^^^^^ error[E0507]: cannot move out of captured variable in an `FnMut` closure - --> $DIR/move-into-closure.rs:137:15 + --> $DIR/move-into-closure.rs:135:15 | LL | let mut em = Either::One(X(Y)); | ------ captured outer variable @@ -368,13 +368,13 @@ LL | Either::One(mut _t) | ------ data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:141:25 + --> $DIR/move-into-closure.rs:139:25 | LL | Either::One(mut _t) | ^^^^^^ error[E0507]: cannot move out of captured variable in an `FnMut` closure - --> $DIR/move-into-closure.rs:144:15 + --> $DIR/move-into-closure.rs:142:15 | LL | let mut em = Either::One(X(Y)); | ------ captured outer variable @@ -389,13 +389,13 @@ LL | Either::One(mut _t) => (), | ------ data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:148:25 + --> $DIR/move-into-closure.rs:146:25 | LL | Either::One(mut _t) => (), | ^^^^^^ error[E0507]: cannot move out of captured variable in an `FnMut` closure - --> $DIR/move-into-closure.rs:152:15 + --> $DIR/move-into-closure.rs:150:15 | LL | let mut em = Either::One(X(Y)); | ------ captured outer variable @@ -410,7 +410,7 @@ LL | Either::One(mut _t) => (), | ------ data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/move-into-closure.rs:156:25 + --> $DIR/move-into-closure.rs:154:25 | LL | Either::One(mut _t) => (), | ^^^^^^ diff --git a/src/test/ui/suggestions/dont-suggest-ref/simple.rs b/src/test/ui/suggestions/dont-suggest-ref/simple.rs index 58aab85ac2..31ab1a6639 100644 --- a/src/test/ui/suggestions/dont-suggest-ref/simple.rs +++ b/src/test/ui/suggestions/dont-suggest-ref/simple.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - #[derive(Clone)] enum Either { One(X), diff --git a/src/test/ui/suggestions/dont-suggest-ref/simple.stderr b/src/test/ui/suggestions/dont-suggest-ref/simple.stderr index 6a8b17ca87..7f2ba4da71 100644 --- a/src/test/ui/suggestions/dont-suggest-ref/simple.stderr +++ b/src/test/ui/suggestions/dont-suggest-ref/simple.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:40:17 + --> $DIR/simple.rs:38:17 | LL | let X(_t) = *s; | -- ^^ @@ -9,13 +9,13 @@ LL | let X(_t) = *s; | data moved here | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/simple.rs:40:11 + --> $DIR/simple.rs:38:11 | LL | let X(_t) = *s; | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:44:30 + --> $DIR/simple.rs:42:30 | LL | if let Either::One(_t) = *r { } | -- ^^ @@ -25,13 +25,13 @@ LL | if let Either::One(_t) = *r { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:44:24 + --> $DIR/simple.rs:42:24 | LL | if let Either::One(_t) = *r { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:48:33 + --> $DIR/simple.rs:46:33 | LL | while let Either::One(_t) = *r { } | -- ^^ @@ -41,13 +41,13 @@ LL | while let Either::One(_t) = *r { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:48:27 + --> $DIR/simple.rs:46:27 | LL | while let Either::One(_t) = *r { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:52:11 + --> $DIR/simple.rs:50:11 | LL | match *r { | ^^ @@ -59,13 +59,13 @@ LL | Either::One(_t) | -- data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:56:21 + --> $DIR/simple.rs:54:21 | LL | Either::One(_t) | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:59:11 + --> $DIR/simple.rs:57:11 | LL | match *r { | ^^ @@ -77,13 +77,13 @@ LL | Either::One(_t) => (), | -- data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:63:21 + --> $DIR/simple.rs:61:21 | LL | Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:68:17 + --> $DIR/simple.rs:66:17 | LL | let X(_t) = *sm; | -- ^^^ @@ -93,13 +93,13 @@ LL | let X(_t) = *sm; | data moved here | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/simple.rs:68:11 + --> $DIR/simple.rs:66:11 | LL | let X(_t) = *sm; | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:72:30 + --> $DIR/simple.rs:70:30 | LL | if let Either::One(_t) = *rm { } | -- ^^^ @@ -109,13 +109,13 @@ LL | if let Either::One(_t) = *rm { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:72:24 + --> $DIR/simple.rs:70:24 | LL | if let Either::One(_t) = *rm { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:76:33 + --> $DIR/simple.rs:74:33 | LL | while let Either::One(_t) = *rm { } | -- ^^^ @@ -125,13 +125,13 @@ LL | while let Either::One(_t) = *rm { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:76:27 + --> $DIR/simple.rs:74:27 | LL | while let Either::One(_t) = *rm { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:80:11 + --> $DIR/simple.rs:78:11 | LL | match *rm { | ^^^ @@ -143,13 +143,13 @@ LL | Either::One(_t) | -- data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:84:21 + --> $DIR/simple.rs:82:21 | LL | Either::One(_t) | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:87:11 + --> $DIR/simple.rs:85:11 | LL | match *rm { | ^^^ @@ -161,13 +161,13 @@ LL | Either::One(_t) => (), | -- data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:91:21 + --> $DIR/simple.rs:89:21 | LL | Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:95:11 + --> $DIR/simple.rs:93:11 | LL | match *rm { | ^^^ @@ -179,13 +179,13 @@ LL | Either::One(_t) => (), | -- data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:99:21 + --> $DIR/simple.rs:97:21 | LL | Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:104:17 + --> $DIR/simple.rs:102:17 | LL | let X(_t) = vs[0]; | -- ^^^^^ @@ -195,13 +195,13 @@ LL | let X(_t) = vs[0]; | data moved here | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/simple.rs:104:11 + --> $DIR/simple.rs:102:11 | LL | let X(_t) = vs[0]; | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:108:30 + --> $DIR/simple.rs:106:30 | LL | if let Either::One(_t) = vr[0] { } | -- ^^^^^ @@ -211,13 +211,13 @@ LL | if let Either::One(_t) = vr[0] { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:108:24 + --> $DIR/simple.rs:106:24 | LL | if let Either::One(_t) = vr[0] { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:112:33 + --> $DIR/simple.rs:110:33 | LL | while let Either::One(_t) = vr[0] { } | -- ^^^^^ @@ -227,13 +227,13 @@ LL | while let Either::One(_t) = vr[0] { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:112:27 + --> $DIR/simple.rs:110:27 | LL | while let Either::One(_t) = vr[0] { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:116:11 + --> $DIR/simple.rs:114:11 | LL | match vr[0] { | ^^^^^ @@ -245,13 +245,13 @@ LL | Either::One(_t) | -- data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:120:21 + --> $DIR/simple.rs:118:21 | LL | Either::One(_t) | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:123:11 + --> $DIR/simple.rs:121:11 | LL | match vr[0] { | ^^^^^ @@ -263,13 +263,13 @@ LL | Either::One(_t) => (), | -- data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:127:21 + --> $DIR/simple.rs:125:21 | LL | Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:132:17 + --> $DIR/simple.rs:130:17 | LL | let X(_t) = vsm[0]; | -- ^^^^^^ @@ -279,13 +279,13 @@ LL | let X(_t) = vsm[0]; | data moved here | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/simple.rs:132:11 + --> $DIR/simple.rs:130:11 | LL | let X(_t) = vsm[0]; | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:136:30 + --> $DIR/simple.rs:134:30 | LL | if let Either::One(_t) = vrm[0] { } | -- ^^^^^^ @@ -295,13 +295,13 @@ LL | if let Either::One(_t) = vrm[0] { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:136:24 + --> $DIR/simple.rs:134:24 | LL | if let Either::One(_t) = vrm[0] { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:140:33 + --> $DIR/simple.rs:138:33 | LL | while let Either::One(_t) = vrm[0] { } | -- ^^^^^^ @@ -311,13 +311,13 @@ LL | while let Either::One(_t) = vrm[0] { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:140:27 + --> $DIR/simple.rs:138:27 | LL | while let Either::One(_t) = vrm[0] { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:144:11 + --> $DIR/simple.rs:142:11 | LL | match vrm[0] { | ^^^^^^ @@ -329,13 +329,13 @@ LL | Either::One(_t) | -- data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:148:21 + --> $DIR/simple.rs:146:21 | LL | Either::One(_t) | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:151:11 + --> $DIR/simple.rs:149:11 | LL | match vrm[0] { | ^^^^^^ @@ -347,13 +347,13 @@ LL | Either::One(_t) => (), | -- data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:155:21 + --> $DIR/simple.rs:153:21 | LL | Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:159:11 + --> $DIR/simple.rs:157:11 | LL | match vrm[0] { | ^^^^^^ @@ -365,13 +365,13 @@ LL | Either::One(_t) => (), | -- data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:163:21 + --> $DIR/simple.rs:161:21 | LL | Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:170:18 + --> $DIR/simple.rs:168:18 | LL | let &X(_t) = s; | ------ ^ cannot move out of borrowed content @@ -380,13 +380,13 @@ LL | let &X(_t) = s; | help: consider removing the `&`: `X(_t)` | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/simple.rs:170:12 + --> $DIR/simple.rs:168:12 | LL | let &X(_t) = s; | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:174:31 + --> $DIR/simple.rs:172:31 | LL | if let &Either::One(_t) = r { } | ---------------- ^ cannot move out of borrowed content @@ -395,13 +395,13 @@ LL | if let &Either::One(_t) = r { } | help: consider removing the `&`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:174:25 + --> $DIR/simple.rs:172:25 | LL | if let &Either::One(_t) = r { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:178:34 + --> $DIR/simple.rs:176:34 | LL | while let &Either::One(_t) = r { } | ---------------- ^ cannot move out of borrowed content @@ -410,13 +410,13 @@ LL | while let &Either::One(_t) = r { } | help: consider removing the `&`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:178:28 + --> $DIR/simple.rs:176:28 | LL | while let &Either::One(_t) = r { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:182:11 + --> $DIR/simple.rs:180:11 | LL | match r { | ^ cannot move out of borrowed content @@ -428,13 +428,13 @@ LL | &Either::One(_t) | help: consider removing the `&`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:184:22 + --> $DIR/simple.rs:182:22 | LL | &Either::One(_t) | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:190:11 + --> $DIR/simple.rs:188:11 | LL | match r { | ^ cannot move out of borrowed content @@ -446,13 +446,13 @@ LL | &Either::One(_t) => (), | help: consider removing the `&`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:192:22 + --> $DIR/simple.rs:190:22 | LL | &Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:197:11 + --> $DIR/simple.rs:195:11 | LL | match r { | ^ cannot move out of borrowed content @@ -464,13 +464,13 @@ LL | &Either::One(_t) => (), | help: consider removing the `&`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:199:22 + --> $DIR/simple.rs:197:22 | LL | &Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:209:22 + --> $DIR/simple.rs:207:22 | LL | let &mut X(_t) = sm; | ---------- ^^ cannot move out of borrowed content @@ -479,13 +479,13 @@ LL | let &mut X(_t) = sm; | help: consider removing the `&mut`: `X(_t)` | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/simple.rs:209:16 + --> $DIR/simple.rs:207:16 | LL | let &mut X(_t) = sm; | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:213:35 + --> $DIR/simple.rs:211:35 | LL | if let &mut Either::One(_t) = rm { } | -------------------- ^^ cannot move out of borrowed content @@ -494,13 +494,13 @@ LL | if let &mut Either::One(_t) = rm { } | help: consider removing the `&mut`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:213:29 + --> $DIR/simple.rs:211:29 | LL | if let &mut Either::One(_t) = rm { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:217:38 + --> $DIR/simple.rs:215:38 | LL | while let &mut Either::One(_t) = rm { } | -------------------- ^^ cannot move out of borrowed content @@ -509,13 +509,13 @@ LL | while let &mut Either::One(_t) = rm { } | help: consider removing the `&mut`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:217:32 + --> $DIR/simple.rs:215:32 | LL | while let &mut Either::One(_t) = rm { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:221:11 + --> $DIR/simple.rs:219:11 | LL | match rm { | ^^ cannot move out of borrowed content @@ -527,7 +527,7 @@ LL | &mut Either::Two(_t) => (), | -- ...and here | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/simple.rs:223:26 + --> $DIR/simple.rs:221:26 | LL | &mut Either::One(_t) => (), | ^^ @@ -544,7 +544,7 @@ LL | Either::Two(_t) => (), | ^^^^^^^^^^^^^^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:230:11 + --> $DIR/simple.rs:228:11 | LL | match rm { | ^^ cannot move out of borrowed content @@ -556,13 +556,13 @@ LL | &mut Either::One(_t) => (), | help: consider removing the `&mut`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:232:26 + --> $DIR/simple.rs:230:26 | LL | &mut Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:237:11 + --> $DIR/simple.rs:235:11 | LL | match rm { | ^^ cannot move out of borrowed content @@ -574,13 +574,13 @@ LL | &mut Either::One(_t) => (), | help: consider removing the `&mut`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:239:26 + --> $DIR/simple.rs:237:26 | LL | &mut Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:244:11 + --> $DIR/simple.rs:242:11 | LL | match rm { | ^^ cannot move out of borrowed content @@ -592,13 +592,13 @@ LL | &mut Either::One(_t) => (), | help: consider removing the `&mut`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:246:26 + --> $DIR/simple.rs:244:26 | LL | &mut Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:260:21 + --> $DIR/simple.rs:258:21 | LL | let (&X(_t),) = (&x.clone(),); | -- ^^^^^^^^^^^^^ cannot move out of borrowed content @@ -606,13 +606,13 @@ LL | let (&X(_t),) = (&x.clone(),); | data moved here | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/simple.rs:260:13 + --> $DIR/simple.rs:258:13 | LL | let (&X(_t),) = (&x.clone(),); | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:262:34 + --> $DIR/simple.rs:260:34 | LL | if let (&Either::One(_t),) = (&e.clone(),) { } | -- ^^^^^^^^^^^^^ cannot move out of borrowed content @@ -620,13 +620,13 @@ LL | if let (&Either::One(_t),) = (&e.clone(),) { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:262:26 + --> $DIR/simple.rs:260:26 | LL | if let (&Either::One(_t),) = (&e.clone(),) { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:264:37 + --> $DIR/simple.rs:262:37 | LL | while let (&Either::One(_t),) = (&e.clone(),) { } | -- ^^^^^^^^^^^^^ cannot move out of borrowed content @@ -634,13 +634,13 @@ LL | while let (&Either::One(_t),) = (&e.clone(),) { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:264:29 + --> $DIR/simple.rs:262:29 | LL | while let (&Either::One(_t),) = (&e.clone(),) { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:266:11 + --> $DIR/simple.rs:264:11 | LL | match (&e.clone(),) { | ^^^^^^^^^^^^^ cannot move out of borrowed content @@ -649,13 +649,13 @@ LL | (&Either::One(_t),) | -- data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:268:23 + --> $DIR/simple.rs:266:23 | LL | (&Either::One(_t),) | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:274:25 + --> $DIR/simple.rs:272:25 | LL | let (&mut X(_t),) = (&mut xm.clone(),); | -- ^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -663,13 +663,13 @@ LL | let (&mut X(_t),) = (&mut xm.clone(),); | data moved here | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/simple.rs:274:17 + --> $DIR/simple.rs:272:17 | LL | let (&mut X(_t),) = (&mut xm.clone(),); | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:276:38 + --> $DIR/simple.rs:274:38 | LL | if let (&mut Either::One(_t),) = (&mut em.clone(),) { } | -- ^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -677,13 +677,13 @@ LL | if let (&mut Either::One(_t),) = (&mut em.clone(),) { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:276:30 + --> $DIR/simple.rs:274:30 | LL | if let (&mut Either::One(_t),) = (&mut em.clone(),) { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:278:41 + --> $DIR/simple.rs:276:41 | LL | while let (&mut Either::One(_t),) = (&mut em.clone(),) { } | -- ^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -691,13 +691,13 @@ LL | while let (&mut Either::One(_t),) = (&mut em.clone(),) { } | data moved here | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:278:33 + --> $DIR/simple.rs:276:33 | LL | while let (&mut Either::One(_t),) = (&mut em.clone(),) { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:280:11 + --> $DIR/simple.rs:278:11 | LL | match (&mut em.clone(),) { | ^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content @@ -708,7 +708,7 @@ LL | (&mut Either::Two(_t),) => (), | -- ...and here | note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/simple.rs:282:27 + --> $DIR/simple.rs:280:27 | LL | (&mut Either::One(_t),) => (), | ^^ @@ -716,7 +716,7 @@ LL | (&mut Either::Two(_t),) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:290:18 + --> $DIR/simple.rs:288:18 | LL | let &X(_t) = &x; | ------ ^^ cannot move out of borrowed content @@ -725,13 +725,13 @@ LL | let &X(_t) = &x; | help: consider removing the `&`: `X(_t)` | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/simple.rs:290:12 + --> $DIR/simple.rs:288:12 | LL | let &X(_t) = &x; | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:294:31 + --> $DIR/simple.rs:292:31 | LL | if let &Either::One(_t) = &e { } | ---------------- ^^ cannot move out of borrowed content @@ -740,13 +740,13 @@ LL | if let &Either::One(_t) = &e { } | help: consider removing the `&`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:294:25 + --> $DIR/simple.rs:292:25 | LL | if let &Either::One(_t) = &e { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:298:34 + --> $DIR/simple.rs:296:34 | LL | while let &Either::One(_t) = &e { } | ---------------- ^^ cannot move out of borrowed content @@ -755,13 +755,13 @@ LL | while let &Either::One(_t) = &e { } | help: consider removing the `&`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:298:28 + --> $DIR/simple.rs:296:28 | LL | while let &Either::One(_t) = &e { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:302:11 + --> $DIR/simple.rs:300:11 | LL | match &e { | ^^ cannot move out of borrowed content @@ -773,13 +773,13 @@ LL | &Either::One(_t) | help: consider removing the `&`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:304:22 + --> $DIR/simple.rs:302:22 | LL | &Either::One(_t) | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:310:11 + --> $DIR/simple.rs:308:11 | LL | match &e { | ^^ cannot move out of borrowed content @@ -791,13 +791,13 @@ LL | &Either::One(_t) => (), | help: consider removing the `&`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:312:22 + --> $DIR/simple.rs:310:22 | LL | &Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:317:11 + --> $DIR/simple.rs:315:11 | LL | match &e { | ^^ cannot move out of borrowed content @@ -809,13 +809,13 @@ LL | &Either::One(_t) => (), | help: consider removing the `&`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:319:22 + --> $DIR/simple.rs:317:22 | LL | &Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:325:22 + --> $DIR/simple.rs:323:22 | LL | let &mut X(_t) = &mut xm; | ---------- ^^^^^^^ cannot move out of borrowed content @@ -824,13 +824,13 @@ LL | let &mut X(_t) = &mut xm; | help: consider removing the `&mut`: `X(_t)` | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/simple.rs:325:16 + --> $DIR/simple.rs:323:16 | LL | let &mut X(_t) = &mut xm; | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:329:35 + --> $DIR/simple.rs:327:35 | LL | if let &mut Either::One(_t) = &mut em { } | -------------------- ^^^^^^^ cannot move out of borrowed content @@ -839,13 +839,13 @@ LL | if let &mut Either::One(_t) = &mut em { } | help: consider removing the `&mut`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:329:29 + --> $DIR/simple.rs:327:29 | LL | if let &mut Either::One(_t) = &mut em { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:333:38 + --> $DIR/simple.rs:331:38 | LL | while let &mut Either::One(_t) = &mut em { } | -------------------- ^^^^^^^ cannot move out of borrowed content @@ -854,13 +854,13 @@ LL | while let &mut Either::One(_t) = &mut em { } | help: consider removing the `&mut`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:333:32 + --> $DIR/simple.rs:331:32 | LL | while let &mut Either::One(_t) = &mut em { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:337:11 + --> $DIR/simple.rs:335:11 | LL | match &mut em { | ^^^^^^^ cannot move out of borrowed content @@ -872,13 +872,13 @@ LL | &mut Either::One(_t) | help: consider removing the `&mut`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:339:26 + --> $DIR/simple.rs:337:26 | LL | &mut Either::One(_t) | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:345:11 + --> $DIR/simple.rs:343:11 | LL | match &mut em { | ^^^^^^^ cannot move out of borrowed content @@ -890,13 +890,13 @@ LL | &mut Either::One(_t) => (), | help: consider removing the `&mut`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:347:26 + --> $DIR/simple.rs:345:26 | LL | &mut Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:352:11 + --> $DIR/simple.rs:350:11 | LL | match &mut em { | ^^^^^^^ cannot move out of borrowed content @@ -908,13 +908,13 @@ LL | &mut Either::One(_t) => (), | help: consider removing the `&mut`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:354:26 + --> $DIR/simple.rs:352:26 | LL | &mut Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:359:11 + --> $DIR/simple.rs:357:11 | LL | match &mut em { | ^^^^^^^ cannot move out of borrowed content @@ -926,13 +926,13 @@ LL | &mut Either::One(_t) => (), | help: consider removing the `&mut`: `Either::One(_t)` | note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait - --> $DIR/simple.rs:361:26 + --> $DIR/simple.rs:359:26 | LL | &mut Either::One(_t) => (), | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:204:11 + --> $DIR/simple.rs:202:11 | LL | fn f1(&X(_t): &X) { } | ^^^--^ @@ -942,13 +942,13 @@ LL | fn f1(&X(_t): &X) { } | help: consider removing the `&`: `X(_t)` | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/simple.rs:204:14 + --> $DIR/simple.rs:202:14 | LL | fn f1(&X(_t): &X) { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:251:11 + --> $DIR/simple.rs:249:11 | LL | fn f2(&mut X(_t): &mut X) { } | ^^^^^^^--^ @@ -958,13 +958,13 @@ LL | fn f2(&mut X(_t): &mut X) { } | help: consider removing the `&mut`: `X(_t)` | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/simple.rs:251:18 + --> $DIR/simple.rs:249:18 | LL | fn f2(&mut X(_t): &mut X) { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:271:11 + --> $DIR/simple.rs:269:11 | LL | fn f3((&X(_t),): (&X,)) { } | ^^^^--^^^ @@ -973,13 +973,13 @@ LL | fn f3((&X(_t),): (&X,)) { } | cannot move out of borrowed content | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/simple.rs:271:15 + --> $DIR/simple.rs:269:15 | LL | fn f3((&X(_t),): (&X,)) { } | ^^ error[E0507]: cannot move out of borrowed content - --> $DIR/simple.rs:285:11 + --> $DIR/simple.rs:283:11 | LL | fn f4((&mut X(_t),): (&mut X,)) { } | ^^^^^^^^--^^^ @@ -988,7 +988,7 @@ LL | fn f4((&mut X(_t),): (&mut X,)) { } | cannot move out of borrowed content | note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait - --> $DIR/simple.rs:285:19 + --> $DIR/simple.rs:283:19 | LL | fn f4((&mut X(_t),): (&mut X,)) { } | ^^ diff --git a/src/test/ui/suggestions/issue-57672.rs b/src/test/ui/suggestions/issue-57672.rs new file mode 100644 index 0000000000..1773f72fc7 --- /dev/null +++ b/src/test/ui/suggestions/issue-57672.rs @@ -0,0 +1,14 @@ +// aux-build:foo.rs +// compile-flags:--extern foo +// compile-pass +// edition:2018 + +#![deny(unused_extern_crates)] + +extern crate foo as foo_renamed; + +pub mod m { + pub use foo_renamed::Foo; +} + +fn main() {} diff --git a/src/test/ui/suggestions/issue-59819.fixed b/src/test/ui/suggestions/issue-59819.fixed new file mode 100644 index 0000000000..644d2a4e41 --- /dev/null +++ b/src/test/ui/suggestions/issue-59819.fixed @@ -0,0 +1,35 @@ +// run-rustfix + +#![allow(warnings)] + +// Test that suggestion to add `*` characters applies to implementations of `Deref` as well as +// references. + +struct Foo(i32); + +struct Bar(String); + +impl std::ops::Deref for Foo { + type Target = i32; + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +impl std::ops::Deref for Bar { + type Target = String; + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +fn main() { + let x = Foo(42); + let y: i32 = *x; //~ ERROR mismatched types + let a = &42; + let b: i32 = *a; //~ ERROR mismatched types + + // Do not make a suggestion when adding a `*` wouldn't actually fix the issue: + let f = Bar("bar".to_string()); + let g: String = f.to_string(); //~ ERROR mismatched types +} diff --git a/src/test/ui/suggestions/issue-59819.rs b/src/test/ui/suggestions/issue-59819.rs new file mode 100644 index 0000000000..8e8ff8372e --- /dev/null +++ b/src/test/ui/suggestions/issue-59819.rs @@ -0,0 +1,35 @@ +// run-rustfix + +#![allow(warnings)] + +// Test that suggestion to add `*` characters applies to implementations of `Deref` as well as +// references. + +struct Foo(i32); + +struct Bar(String); + +impl std::ops::Deref for Foo { + type Target = i32; + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +impl std::ops::Deref for Bar { + type Target = String; + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +fn main() { + let x = Foo(42); + let y: i32 = x; //~ ERROR mismatched types + let a = &42; + let b: i32 = a; //~ ERROR mismatched types + + // Do not make a suggestion when adding a `*` wouldn't actually fix the issue: + let f = Bar("bar".to_string()); + let g: String = f; //~ ERROR mismatched types +} diff --git a/src/test/ui/suggestions/issue-59819.stderr b/src/test/ui/suggestions/issue-59819.stderr new file mode 100644 index 0000000000..66898115cb --- /dev/null +++ b/src/test/ui/suggestions/issue-59819.stderr @@ -0,0 +1,39 @@ +error[E0308]: mismatched types + --> $DIR/issue-59819.rs:28:18 + | +LL | let y: i32 = x; + | ^ + | | + | expected i32, found struct `Foo` + | help: consider dereferencing the type: `*x` + | + = note: expected type `i32` + found type `Foo` + +error[E0308]: mismatched types + --> $DIR/issue-59819.rs:30:18 + | +LL | let b: i32 = a; + | ^ + | | + | expected i32, found &{integer} + | help: consider dereferencing the borrow: `*a` + | + = note: expected type `i32` + found type `&{integer}` + +error[E0308]: mismatched types + --> $DIR/issue-59819.rs:34:21 + | +LL | let g: String = f; + | ^ + | | + | expected struct `std::string::String`, found struct `Bar` + | help: try using a conversion method: `f.to_string()` + | + = note: expected type `std::string::String` + found type `Bar` + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/suggestions/match-ergonomics.rs b/src/test/ui/suggestions/match-ergonomics.rs new file mode 100644 index 0000000000..c4fc01469b --- /dev/null +++ b/src/test/ui/suggestions/match-ergonomics.rs @@ -0,0 +1,41 @@ +fn main() { + let x = vec![1i32]; + match &x[..] { + [&v] => {}, //~ ERROR mismatched types + _ => {}, + } + match x { + [&v] => {}, //~ ERROR expected an array or slice + _ => {}, + } + match &x[..] { + [v] => {}, + _ => {}, + } + match &x[..] { + &[v] => {}, + _ => {}, + } + match x { + [v] => {}, //~ ERROR expected an array or slice + _ => {}, + } + let y = 1i32; + match &y { + &v => {}, + _ => {}, + } + match y { + &v => {}, //~ ERROR mismatched types + _ => {}, + } + match &y { + v => {}, + _ => {}, + } + match y { + v => {}, + _ => {}, + } + if let [&v] = &x[..] {} //~ ERROR mismatched types +} diff --git a/src/test/ui/suggestions/match-ergonomics.stderr b/src/test/ui/suggestions/match-ergonomics.stderr new file mode 100644 index 0000000000..b7497be6ce --- /dev/null +++ b/src/test/ui/suggestions/match-ergonomics.stderr @@ -0,0 +1,52 @@ +error[E0308]: mismatched types + --> $DIR/match-ergonomics.rs:4:10 + | +LL | [&v] => {}, + | ^^ + | | + | expected i32, found reference + | help: you can probably remove the explicit borrow: `v` + | + = note: expected type `i32` + found type `&_` + +error[E0529]: expected an array or slice, found `std::vec::Vec` + --> $DIR/match-ergonomics.rs:8:9 + | +LL | [&v] => {}, + | ^^^^ pattern cannot match with input type `std::vec::Vec` + +error[E0529]: expected an array or slice, found `std::vec::Vec` + --> $DIR/match-ergonomics.rs:20:9 + | +LL | [v] => {}, + | ^^^ pattern cannot match with input type `std::vec::Vec` + +error[E0308]: mismatched types + --> $DIR/match-ergonomics.rs:29:9 + | +LL | &v => {}, + | ^^ + | | + | expected i32, found reference + | help: you can probably remove the explicit borrow: `v` + | + = note: expected type `i32` + found type `&_` + +error[E0308]: mismatched types + --> $DIR/match-ergonomics.rs:40:13 + | +LL | if let [&v] = &x[..] {} + | ^^ + | | + | expected i32, found reference + | help: you can probably remove the explicit borrow: `v` + | + = note: expected type `i32` + found type `&_` + +error: aborting due to 5 previous errors + +Some errors have detailed explanations: E0308, E0529. +For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/suggestions/recover-invalid-float.fixed b/src/test/ui/suggestions/recover-invalid-float.fixed new file mode 100644 index 0000000000..62389ba612 --- /dev/null +++ b/src/test/ui/suggestions/recover-invalid-float.fixed @@ -0,0 +1,10 @@ +// run-rustfix + +fn main() { + let _: f32 = 0.3; + //~^ ERROR float literals must have an integer part + let _: f32 = 0.42f32; + //~^ ERROR float literals must have an integer part + let _: f64 = 0.5f64; + //~^ ERROR float literals must have an integer part +} diff --git a/src/test/ui/suggestions/recover-invalid-float.rs b/src/test/ui/suggestions/recover-invalid-float.rs index 506ef8900b..a5a7efe5e7 100644 --- a/src/test/ui/suggestions/recover-invalid-float.rs +++ b/src/test/ui/suggestions/recover-invalid-float.rs @@ -1,11 +1,10 @@ +// run-rustfix + fn main() { - let _: usize = .3; + let _: f32 = .3; //~^ ERROR float literals must have an integer part - //~| ERROR mismatched types - let _: usize = .42f32; + let _: f32 = .42f32; //~^ ERROR float literals must have an integer part - //~| ERROR mismatched types - let _: usize = .5f64; + let _: f64 = .5f64; //~^ ERROR float literals must have an integer part - //~| ERROR mismatched types } diff --git a/src/test/ui/suggestions/recover-invalid-float.stderr b/src/test/ui/suggestions/recover-invalid-float.stderr index c464676b44..dd24746eab 100644 --- a/src/test/ui/suggestions/recover-invalid-float.stderr +++ b/src/test/ui/suggestions/recover-invalid-float.stderr @@ -1,42 +1,20 @@ error: float literals must have an integer part - --> $DIR/recover-invalid-float.rs:2:20 + --> $DIR/recover-invalid-float.rs:4:18 | -LL | let _: usize = .3; - | ^^ help: must have an integer part: `0.3` +LL | let _: f32 = .3; + | ^^ help: must have an integer part: `0.3` error: float literals must have an integer part - --> $DIR/recover-invalid-float.rs:5:20 + --> $DIR/recover-invalid-float.rs:6:18 | -LL | let _: usize = .42f32; - | ^^^^^^ help: must have an integer part: `0.42f32` +LL | let _: f32 = .42f32; + | ^^^^^^ help: must have an integer part: `0.42f32` error: float literals must have an integer part - --> $DIR/recover-invalid-float.rs:8:20 + --> $DIR/recover-invalid-float.rs:8:18 | -LL | let _: usize = .5f64; - | ^^^^^ help: must have an integer part: `0.5f64` +LL | let _: f64 = .5f64; + | ^^^^^ help: must have an integer part: `0.5f64` -error[E0308]: mismatched types - --> $DIR/recover-invalid-float.rs:2:20 - | -LL | let _: usize = .3; - | ^^ expected usize, found floating-point number - | - = note: expected type `usize` - found type `{float}` - -error[E0308]: mismatched types - --> $DIR/recover-invalid-float.rs:5:20 - | -LL | let _: usize = .42f32; - | ^^^^^^ expected usize, found f32 - -error[E0308]: mismatched types - --> $DIR/recover-invalid-float.rs:8:20 - | -LL | let _: usize = .5f64; - | ^^^^^ expected usize, found f64 - -error: aborting due to 6 previous errors +error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/suggestions/suggest-impl-trait-lifetime.nll.stderr b/src/test/ui/suggestions/suggest-impl-trait-lifetime.nll.stderr new file mode 100644 index 0000000000..f4eb9813c1 --- /dev/null +++ b/src/test/ui/suggestions/suggest-impl-trait-lifetime.nll.stderr @@ -0,0 +1,11 @@ +error[E0310]: the parameter type `impl Debug` may not live long enough + --> $DIR/suggest-impl-trait-lifetime.rs:7:5 + | +LL | bar(d); + | ^^^^^^ + | + = help: consider adding an explicit lifetime bound `impl Debug: 'static`... + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0310`. diff --git a/src/test/ui/suggestions/suggest-labels.stderr b/src/test/ui/suggestions/suggest-labels.stderr index ead8f94209..02d46a3f59 100644 --- a/src/test/ui/suggestions/suggest-labels.stderr +++ b/src/test/ui/suggestions/suggest-labels.stderr @@ -2,19 +2,31 @@ error[E0426]: use of undeclared label `'fo` --> $DIR/suggest-labels.rs:4:15 | LL | break 'fo; - | ^^^ did you mean `'foo`? + | ^^^ +help: a label with a similar name exists in this scope + | +LL | break 'foo; + | ^^^^ error[E0426]: use of undeclared label `'bor` --> $DIR/suggest-labels.rs:8:18 | LL | continue 'bor; - | ^^^^ did you mean `'bar`? + | ^^^^ +help: a label with a similar name exists in this scope + | +LL | continue 'bar; + | ^^^^ error[E0426]: use of undeclared label `'longlable` --> $DIR/suggest-labels.rs:13:19 | LL | break 'longlable; - | ^^^^^^^^^^ did you mean `'longlabel1`? + | ^^^^^^^^^^ +help: a label with a similar name exists in this scope + | +LL | break 'longlabel1; + | ^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/suggestions/suggest-methods.stderr b/src/test/ui/suggestions/suggest-methods.stderr index 09d58575d9..ad4a4deb5a 100644 --- a/src/test/ui/suggestions/suggest-methods.stderr +++ b/src/test/ui/suggestions/suggest-methods.stderr @@ -5,19 +5,19 @@ LL | struct Foo; | ----------- method `bat` not found for this ... LL | f.bat(1.0); - | ^^^ help: did you mean: `bar` + | ^^^ help: there is a method with a similar name: `bar` error[E0599]: no method named `is_emtpy` found for type `std::string::String` in the current scope --> $DIR/suggest-methods.rs:21:15 | LL | let _ = s.is_emtpy(); - | ^^^^^^^^ help: did you mean: `is_empty` + | ^^^^^^^^ help: there is a method with a similar name: `is_empty` error[E0599]: no method named `count_eos` found for type `u32` in the current scope --> $DIR/suggest-methods.rs:25:19 | LL | let _ = 63u32.count_eos(); - | ^^^^^^^^^ help: did you mean: `count_zeros` + | ^^^^^^^^^ help: there is a method with a similar name: `count_zeros` error[E0599]: no method named `count_o` found for type `u32` in the current scope --> $DIR/suggest-methods.rs:28:19 diff --git a/src/test/ui/suggestions/suggest-ref-mut.rs b/src/test/ui/suggestions/suggest-ref-mut.rs index b4a6fa39f9..d04113ffcc 100644 --- a/src/test/ui/suggestions/suggest-ref-mut.rs +++ b/src/test/ui/suggestions/suggest-ref-mut.rs @@ -1,5 +1,3 @@ -#![feature(nll)] - struct X(usize); impl X { diff --git a/src/test/ui/suggestions/suggest-ref-mut.stderr b/src/test/ui/suggestions/suggest-ref-mut.stderr index 9f00967d84..2414367875 100644 --- a/src/test/ui/suggestions/suggest-ref-mut.stderr +++ b/src/test/ui/suggestions/suggest-ref-mut.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to `self.0` which is behind a `&` reference - --> $DIR/suggest-ref-mut.rs:9:9 + --> $DIR/suggest-ref-mut.rs:7:9 | LL | fn zap(&self) { | ----- help: consider changing this to be a mutable reference: `&mut self` @@ -8,7 +8,7 @@ LL | self.0 = 32; | ^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be written error[E0594]: cannot assign to `*foo` which is behind a `&` reference - --> $DIR/suggest-ref-mut.rs:18:5 + --> $DIR/suggest-ref-mut.rs:16:5 | LL | let ref foo = 16; | ------- help: consider changing this to be a mutable reference: `ref mut foo` @@ -17,7 +17,7 @@ LL | *foo = 32; | ^^^^^^^^^ `foo` is a `&` reference, so the data it refers to cannot be written error[E0594]: cannot assign to `*bar` which is behind a `&` reference - --> $DIR/suggest-ref-mut.rs:23:9 + --> $DIR/suggest-ref-mut.rs:21:9 | LL | if let Some(ref bar) = Some(16) { | ------- help: consider changing this to be a mutable reference: `ref mut bar` @@ -26,7 +26,7 @@ LL | *bar = 32; | ^^^^^^^^^ `bar` is a `&` reference, so the data it refers to cannot be written error[E0594]: cannot assign to `*quo` which is behind a `&` reference - --> $DIR/suggest-ref-mut.rs:27:22 + --> $DIR/suggest-ref-mut.rs:25:22 | LL | ref quo => { *quo = 32; }, | ------- ^^^^^^^^^ `quo` is a `&` reference, so the data it refers to cannot be written @@ -35,4 +35,3 @@ LL | ref quo => { *quo = 32; }, error: aborting due to 4 previous errors -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/suggestions/suggest-std-when-using-type.rs b/src/test/ui/suggestions/suggest-std-when-using-type.rs new file mode 100644 index 0000000000..9ca68a635d --- /dev/null +++ b/src/test/ui/suggestions/suggest-std-when-using-type.rs @@ -0,0 +1,7 @@ +fn main() { + let pi = f32::consts::PI; //~ ERROR ambiguous associated type + let bytes = "hello world".as_bytes(); + let string = unsafe { + str::from_utf8(bytes) //~ ERROR no function or associated item named `from_utf8` found + }; +} diff --git a/src/test/ui/suggestions/suggest-std-when-using-type.stderr b/src/test/ui/suggestions/suggest-std-when-using-type.stderr new file mode 100644 index 0000000000..eecb4e60f9 --- /dev/null +++ b/src/test/ui/suggestions/suggest-std-when-using-type.stderr @@ -0,0 +1,24 @@ +error[E0223]: ambiguous associated type + --> $DIR/suggest-std-when-using-type.rs:2:14 + | +LL | let pi = f32::consts::PI; + | ^^^^^^^^^^^^^^^ +help: you are looking for the module in `std`, not the primitive type + | +LL | let pi = std::f32::consts::PI; + | ^^^^^^^^^^^^^^^^^^^^ + +error[E0599]: no function or associated item named `from_utf8` found for type `str` in the current scope + --> $DIR/suggest-std-when-using-type.rs:5:14 + | +LL | str::from_utf8(bytes) + | ^^^^^^^^^ function or associated item not found in `str` +help: you are looking for the module in `std`, not the primitive type + | +LL | std::str::from_utf8(bytes) + | ^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0223, E0599. +For more information about an error, try `rustc --explain E0223`. diff --git a/src/test/ui/suggestions/suggest-variants.rs b/src/test/ui/suggestions/suggest-variants.rs index 6d6e280d96..d418834432 100644 --- a/src/test/ui/suggestions/suggest-variants.rs +++ b/src/test/ui/suggestions/suggest-variants.rs @@ -12,4 +12,7 @@ fn main() { println!("My shape is {:?}", Shape::Squareee { size: 5}); //~ ERROR no variant `Squareee` println!("My shape is {:?}", Shape::Circl { size: 5}); //~ ERROR no variant `Circl` println!("My shape is {:?}", Shape::Rombus{ size: 5}); //~ ERROR no variant `Rombus` + Shape::Squareee; //~ ERROR no variant + Shape::Circl; //~ ERROR no variant + Shape::Rombus; //~ ERROR no variant } diff --git a/src/test/ui/suggestions/suggest-variants.stderr b/src/test/ui/suggestions/suggest-variants.stderr index 08ae68ea71..ef0ba70c34 100644 --- a/src/test/ui/suggestions/suggest-variants.stderr +++ b/src/test/ui/suggestions/suggest-variants.stderr @@ -1,20 +1,65 @@ -error: no variant `Squareee` on enum `Shape` - --> $DIR/suggest-variants.rs:12:34 +error: no variant `Squareee` in enum `Shape` + --> $DIR/suggest-variants.rs:12:41 | +LL | enum Shape { + | ---------- variant `Squareee` not found here +... LL | println!("My shape is {:?}", Shape::Squareee { size: 5}); - | ^^^^^^^^^^^^^^^ help: did you mean: `Shape::Square` + | ^^^^^^^^ help: there is a variant with a similar name: `Square` -error: no variant `Circl` on enum `Shape` - --> $DIR/suggest-variants.rs:13:34 +error: no variant `Circl` in enum `Shape` + --> $DIR/suggest-variants.rs:13:41 | +LL | enum Shape { + | ---------- variant `Circl` not found here +... LL | println!("My shape is {:?}", Shape::Circl { size: 5}); - | ^^^^^^^^^^^^ help: did you mean: `Shape::Circle` + | ^^^^^ help: there is a variant with a similar name: `Circle` -error: no variant `Rombus` on enum `Shape` - --> $DIR/suggest-variants.rs:14:34 +error: no variant `Rombus` in enum `Shape` + --> $DIR/suggest-variants.rs:14:41 | +LL | enum Shape { + | ---------- variant `Rombus` not found here +... LL | println!("My shape is {:?}", Shape::Rombus{ size: 5}); - | ^^^^^^^^^^^^^ unknown variant + | -------^^^^^^ + | | + | variant not found in `Shape` -error: aborting due to 3 previous errors +error[E0599]: no variant or associated item named `Squareee` found for type `Shape` in the current scope + --> $DIR/suggest-variants.rs:15:12 + | +LL | enum Shape { + | ---------- variant or associated item `Squareee` not found here +... +LL | Shape::Squareee; + | ^^^^^^^^ + | | + | variant or associated item not found in `Shape` + | help: there is a variant with a similar name: `Square` + +error[E0599]: no variant or associated item named `Circl` found for type `Shape` in the current scope + --> $DIR/suggest-variants.rs:16:12 + | +LL | enum Shape { + | ---------- variant or associated item `Circl` not found here +... +LL | Shape::Circl; + | ^^^^^ + | | + | variant or associated item not found in `Shape` + | help: there is a variant with a similar name: `Circle` + +error[E0599]: no variant or associated item named `Rombus` found for type `Shape` in the current scope + --> $DIR/suggest-variants.rs:17:12 + | +LL | enum Shape { + | ---------- variant or associated item `Rombus` not found here +... +LL | Shape::Rombus; + | ^^^^^^ variant or associated item not found in `Shape` + +error: aborting due to 6 previous errors +For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/suggestions/type-ascription-instead-of-path.stderr b/src/test/ui/suggestions/type-ascription-instead-of-path.stderr index 1beb822d6a..0f9b31fb52 100644 --- a/src/test/ui/suggestions/type-ascription-instead-of-path.stderr +++ b/src/test/ui/suggestions/type-ascription-instead-of-path.stderr @@ -14,5 +14,5 @@ LL | std:io::stdin(); error: aborting due to 2 previous errors -Some errors occurred: E0423, E0433. +Some errors have detailed explanations: E0423, E0433. For more information about an error, try `rustc --explain E0423`. diff --git a/src/test/ui/suggestions/type-mismatch-struct-field-shorthand-2.stderr b/src/test/ui/suggestions/type-mismatch-struct-field-shorthand-2.stderr index d0f9e1f7f7..a25c644680 100644 --- a/src/test/ui/suggestions/type-mismatch-struct-field-shorthand-2.stderr +++ b/src/test/ui/suggestions/type-mismatch-struct-field-shorthand-2.stderr @@ -2,21 +2,19 @@ error[E0308]: mismatched types --> $DIR/type-mismatch-struct-field-shorthand-2.rs:5:19 | LL | let _ = RGB { r, g, c }; - | ^ expected f64, found f32 -help: you can cast an `f32` to `f64` in a lossless way - | -LL | let _ = RGB { r: r.into(), g, c }; - | ^^^^^^^^^^^ + | ^ + | | + | expected f64, found f32 + | help: you can convert an `f32` to `f64`: `r: r.into()` error[E0308]: mismatched types --> $DIR/type-mismatch-struct-field-shorthand-2.rs:5:22 | LL | let _ = RGB { r, g, c }; - | ^ expected f64, found f32 -help: you can cast an `f32` to `f64` in a lossless way - | -LL | let _ = RGB { r, g: g.into(), c }; - | ^^^^^^^^^^^ + | ^ + | | + | expected f64, found f32 + | help: you can convert an `f32` to `f64`: `g: g.into()` error[E0560]: struct `RGB` has no field named `c` --> $DIR/type-mismatch-struct-field-shorthand-2.rs:5:25 @@ -26,5 +24,5 @@ LL | let _ = RGB { r, g, c }; error: aborting due to 3 previous errors -Some errors occurred: E0308, E0560. +Some errors have detailed explanations: E0308, E0560. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.stderr b/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.stderr index 6bc16ba8b7..ed8013d599 100644 --- a/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.stderr +++ b/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.stderr @@ -2,31 +2,28 @@ error[E0308]: mismatched types --> $DIR/type-mismatch-struct-field-shorthand.rs:8:19 | LL | let _ = RGB { r, g, b }; - | ^ expected f64, found f32 -help: you can cast an `f32` to `f64` in a lossless way - | -LL | let _ = RGB { r: r.into(), g, b }; - | ^^^^^^^^^^^ + | ^ + | | + | expected f64, found f32 + | help: you can convert an `f32` to `f64`: `r: r.into()` error[E0308]: mismatched types --> $DIR/type-mismatch-struct-field-shorthand.rs:8:22 | LL | let _ = RGB { r, g, b }; - | ^ expected f64, found f32 -help: you can cast an `f32` to `f64` in a lossless way - | -LL | let _ = RGB { r, g: g.into(), b }; - | ^^^^^^^^^^^ + | ^ + | | + | expected f64, found f32 + | help: you can convert an `f32` to `f64`: `g: g.into()` error[E0308]: mismatched types --> $DIR/type-mismatch-struct-field-shorthand.rs:8:25 | LL | let _ = RGB { r, g, b }; - | ^ expected f64, found f32 -help: you can cast an `f32` to `f64` in a lossless way - | -LL | let _ = RGB { r, g, b: b.into() }; - | ^^^^^^^^^^^ + | ^ + | | + | expected f64, found f32 + | help: you can convert an `f32` to `f64`: `b: b.into()` error: aborting due to 3 previous errors diff --git a/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr b/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr index 16e9fa90aa..5e333187e3 100644 --- a/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr +++ b/src/test/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr @@ -27,5 +27,5 @@ LL | i: Box>, error: aborting due to 2 previous errors -Some errors occurred: E0107, E0191. +Some errors have detailed explanations: E0107, E0191. For more information about an error, try `rustc --explain E0107`. diff --git a/src/test/ui/svh/svh-change-lit.stderr b/src/test/ui/svh/svh-change-lit.stderr index 1b1501331b..bf51e31bfd 100644 --- a/src/test/ui/svh/svh-change-lit.stderr +++ b/src/test/ui/svh/svh-change-lit.stderr @@ -11,4 +11,3 @@ LL | extern crate b; error: aborting due to previous error -For more information about this error, try `rustc --explain E0460`. diff --git a/src/test/ui/svh/svh-change-significant-cfg.stderr b/src/test/ui/svh/svh-change-significant-cfg.stderr index 2357a4387d..c747464db7 100644 --- a/src/test/ui/svh/svh-change-significant-cfg.stderr +++ b/src/test/ui/svh/svh-change-significant-cfg.stderr @@ -11,4 +11,3 @@ LL | extern crate b; error: aborting due to previous error -For more information about this error, try `rustc --explain E0460`. diff --git a/src/test/ui/svh/svh-change-trait-bound.stderr b/src/test/ui/svh/svh-change-trait-bound.stderr index 9fe949b2e7..b144b3b70d 100644 --- a/src/test/ui/svh/svh-change-trait-bound.stderr +++ b/src/test/ui/svh/svh-change-trait-bound.stderr @@ -11,4 +11,3 @@ LL | extern crate b; error: aborting due to previous error -For more information about this error, try `rustc --explain E0460`. diff --git a/src/test/ui/svh/svh-change-type-arg.stderr b/src/test/ui/svh/svh-change-type-arg.stderr index a8b35d29c9..473e4000d2 100644 --- a/src/test/ui/svh/svh-change-type-arg.stderr +++ b/src/test/ui/svh/svh-change-type-arg.stderr @@ -11,4 +11,3 @@ LL | extern crate b; error: aborting due to previous error -For more information about this error, try `rustc --explain E0460`. diff --git a/src/test/ui/svh/svh-change-type-ret.stderr b/src/test/ui/svh/svh-change-type-ret.stderr index ebe44a7bee..ecb332fc5b 100644 --- a/src/test/ui/svh/svh-change-type-ret.stderr +++ b/src/test/ui/svh/svh-change-type-ret.stderr @@ -11,4 +11,3 @@ LL | extern crate b; error: aborting due to previous error -For more information about this error, try `rustc --explain E0460`. diff --git a/src/test/ui/svh/svh-change-type-static.stderr b/src/test/ui/svh/svh-change-type-static.stderr index da09c3230a..33f7e3c485 100644 --- a/src/test/ui/svh/svh-change-type-static.stderr +++ b/src/test/ui/svh/svh-change-type-static.stderr @@ -11,4 +11,3 @@ LL | extern crate b; error: aborting due to previous error -For more information about this error, try `rustc --explain E0460`. diff --git a/src/test/ui/svh/svh-use-trait.stderr b/src/test/ui/svh/svh-use-trait.stderr index 4676143a06..3230bb5c38 100644 --- a/src/test/ui/svh/svh-use-trait.stderr +++ b/src/test/ui/svh/svh-use-trait.stderr @@ -11,4 +11,3 @@ LL | extern crate utb; error: aborting due to previous error -For more information about this error, try `rustc --explain E0460`. diff --git a/src/test/ui/symbol-names/basic.stderr b/src/test/ui/symbol-names/basic.stderr index 6ddd93d632..7539cbada8 100644 --- a/src/test/ui/symbol-names/basic.stderr +++ b/src/test/ui/symbol-names/basic.stderr @@ -1,4 +1,4 @@ -error: symbol-name(_ZN5basic4main17h08bcaf310214ed52E) +error: symbol-name(_ZN5basic4main17hd72940ef9669d526E) --> $DIR/basic.rs:3:1 | LL | #[rustc_symbol_name] diff --git a/src/test/ui/symbol-names/impl1.stderr b/src/test/ui/symbol-names/impl1.stderr index eda8646b5b..20e48782a3 100644 --- a/src/test/ui/symbol-names/impl1.stderr +++ b/src/test/ui/symbol-names/impl1.stderr @@ -1,4 +1,4 @@ -error: symbol-name(_ZN5impl13foo3Foo3bar17hc487d6ec13fe9124E) +error: symbol-name(_ZN5impl13foo3Foo3bar17he53b9bee7600ed8dE) --> $DIR/impl1.rs:8:9 | LL | #[rustc_symbol_name] @@ -10,7 +10,7 @@ error: def-path(foo::Foo::bar) LL | #[rustc_def_path] | ^^^^^^^^^^^^^^^^^ -error: symbol-name(_ZN5impl13bar33_$LT$impl$u20$impl1..foo..Foo$GT$3baz17h38577281258e1527E) +error: symbol-name(_ZN5impl13bar33_$LT$impl$u20$impl1..foo..Foo$GT$3baz17h86c41f0462d901d4E) --> $DIR/impl1.rs:18:9 | LL | #[rustc_symbol_name] diff --git a/src/test/ui/syntax-trait-polarity-feature-gate.stderr b/src/test/ui/syntax-trait-polarity-feature-gate.stderr index 7b9c3da371..86b4bc1157 100644 --- a/src/test/ui/syntax-trait-polarity-feature-gate.stderr +++ b/src/test/ui/syntax-trait-polarity-feature-gate.stderr @@ -1,9 +1,10 @@ -error[E0658]: negative trait bounds are not yet fully implemented; use marker types for now (see issue #13231) +error[E0658]: negative trait bounds are not yet fully implemented; use marker types for now --> $DIR/syntax-trait-polarity-feature-gate.rs:7:1 | LL | impl !Send for TestType {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/13231 = help: add #![feature(optin_builtin_traits)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/syntax-trait-polarity.stderr b/src/test/ui/syntax-trait-polarity.stderr index 689e24bb83..b66db9feed 100644 --- a/src/test/ui/syntax-trait-polarity.stderr +++ b/src/test/ui/syntax-trait-polarity.stderr @@ -36,5 +36,5 @@ LL | impl !TestTrait for TestType2 {} error: aborting due to 6 previous errors -Some errors occurred: E0192, E0198. +Some errors have detailed explanations: E0192, E0198. For more information about an error, try `rustc --explain E0192`. diff --git a/src/test/ui/synthetic-param.stderr b/src/test/ui/synthetic-param.stderr index b63a57a201..bfafd8cbd7 100644 --- a/src/test/ui/synthetic-param.stderr +++ b/src/test/ui/synthetic-param.stderr @@ -18,4 +18,3 @@ LL | Bar::::func::(42); error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0632`. diff --git a/src/test/ui/target-feature-gate.rs b/src/test/ui/target-feature-gate.rs index 84300301b7..bc7f7caa10 100644 --- a/src/test/ui/target-feature-gate.rs +++ b/src/test/ui/target-feature-gate.rs @@ -23,6 +23,8 @@ // gate-test-adx_target_feature // gate-test-cmpxchg16b_target_feature // gate-test-movbe_target_feature +// gate-test-rtm_target_feature +// gate-test-f16c_target_feature // min-llvm-version 6.0 #[target_feature(enable = "avx512bw")] diff --git a/src/test/ui/target-feature-gate.stderr b/src/test/ui/target-feature-gate.stderr index 24141d0064..c7adba868e 100644 --- a/src/test/ui/target-feature-gate.stderr +++ b/src/test/ui/target-feature-gate.stderr @@ -1,9 +1,10 @@ -error[E0658]: the target feature `avx512bw` is currently unstable (see issue #44839) - --> $DIR/target-feature-gate.rs:28:18 +error[E0658]: the target feature `avx512bw` is currently unstable + --> $DIR/target-feature-gate.rs:30:18 | LL | #[target_feature(enable = "avx512bw")] | ^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/44839 = help: add #![feature(avx512_target_feature)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/thread-local-in-ctfe.nll.stderr b/src/test/ui/thread-local-in-ctfe.nll.stderr index c5cca9d25c..18d01b1879 100644 --- a/src/test/ui/thread-local-in-ctfe.nll.stderr +++ b/src/test/ui/thread-local-in-ctfe.nll.stderr @@ -10,47 +10,40 @@ error[E0625]: thread-local statics cannot be accessed at compile-time LL | static C: &u32 = &A; | ^^ -warning[E0712]: thread-local variable borrowed past end of function +error[E0712]: thread-local variable borrowed past end of function --> $DIR/thread-local-in-ctfe.rs:9:18 | LL | static C: &u32 = &A; | ^^- end of enclosing function is here | | | thread-local variables cannot be borrowed beyond the end of the function - | - = warning: this error has been downgraded to a warning for backwards compatibility with previous releases - = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future error[E0625]: thread-local statics cannot be accessed at compile-time - --> $DIR/thread-local-in-ctfe.rs:12:16 + --> $DIR/thread-local-in-ctfe.rs:15:16 | LL | const D: u32 = A; | ^ error[E0625]: thread-local statics cannot be accessed at compile-time - --> $DIR/thread-local-in-ctfe.rs:15:17 + --> $DIR/thread-local-in-ctfe.rs:18:17 | LL | const E: &u32 = &A; | ^^ -warning[E0712]: thread-local variable borrowed past end of function - --> $DIR/thread-local-in-ctfe.rs:15:17 +error[E0712]: thread-local variable borrowed past end of function + --> $DIR/thread-local-in-ctfe.rs:18:17 | LL | const E: &u32 = &A; | ^^- end of enclosing function is here | | | thread-local variables cannot be borrowed beyond the end of the function - | - = warning: this error has been downgraded to a warning for backwards compatibility with previous releases - = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future error[E0625]: thread-local statics cannot be accessed at compile-time - --> $DIR/thread-local-in-ctfe.rs:19:5 + --> $DIR/thread-local-in-ctfe.rs:25:5 | LL | A | ^ -error: aborting due to 5 previous errors +error: aborting due to 7 previous errors -Some errors occurred: E0625, E0712. -For more information about an error, try `rustc --explain E0625`. +For more information about this error, try `rustc --explain E0712`. diff --git a/src/test/ui/thread-local-in-ctfe.rs b/src/test/ui/thread-local-in-ctfe.rs index 313d39de36..7ca1a2e7e9 100644 --- a/src/test/ui/thread-local-in-ctfe.rs +++ b/src/test/ui/thread-local-in-ctfe.rs @@ -8,12 +8,18 @@ static B: u32 = A; static C: &u32 = &A; //~^ ERROR thread-local statics cannot be accessed at compile-time +//~| WARNING thread-local variable borrowed past end of function +//~| WARNING this error has been downgraded to a warning +//~| WARNING this warning will become a hard error in the future const D: u32 = A; //~^ ERROR thread-local statics cannot be accessed at compile-time const E: &u32 = &A; //~^ ERROR thread-local statics cannot be accessed at compile-time +//~| WARNING thread-local variable borrowed past end of function +//~| WARNING this error has been downgraded to a warning +//~| WARNING this warning will become a hard error in the future const fn f() -> u32 { A diff --git a/src/test/ui/thread-local-in-ctfe.stderr b/src/test/ui/thread-local-in-ctfe.stderr index abeb2a3e0d..bba5b0c74d 100644 --- a/src/test/ui/thread-local-in-ctfe.stderr +++ b/src/test/ui/thread-local-in-ctfe.stderr @@ -10,24 +10,46 @@ error[E0625]: thread-local statics cannot be accessed at compile-time LL | static C: &u32 = &A; | ^^ +warning[E0712]: thread-local variable borrowed past end of function + --> $DIR/thread-local-in-ctfe.rs:9:18 + | +LL | static C: &u32 = &A; + | ^^- end of enclosing function is here + | | + | thread-local variables cannot be borrowed beyond the end of the function + | + = warning: this error has been downgraded to a warning for backwards compatibility with previous releases + = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + error[E0625]: thread-local statics cannot be accessed at compile-time - --> $DIR/thread-local-in-ctfe.rs:12:16 + --> $DIR/thread-local-in-ctfe.rs:15:16 | LL | const D: u32 = A; | ^ error[E0625]: thread-local statics cannot be accessed at compile-time - --> $DIR/thread-local-in-ctfe.rs:15:17 + --> $DIR/thread-local-in-ctfe.rs:18:17 | LL | const E: &u32 = &A; | ^^ +warning[E0712]: thread-local variable borrowed past end of function + --> $DIR/thread-local-in-ctfe.rs:18:17 + | +LL | const E: &u32 = &A; + | ^^- end of enclosing function is here + | | + | thread-local variables cannot be borrowed beyond the end of the function + | + = warning: this error has been downgraded to a warning for backwards compatibility with previous releases + = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future + error[E0625]: thread-local statics cannot be accessed at compile-time - --> $DIR/thread-local-in-ctfe.rs:19:5 + --> $DIR/thread-local-in-ctfe.rs:25:5 | LL | A | ^ error: aborting due to 5 previous errors -For more information about this error, try `rustc --explain E0625`. +For more information about this error, try `rustc --explain E0712`. diff --git a/src/test/ui/thread-local-mutation.nll.stderr b/src/test/ui/thread-local-mutation.nll.stderr deleted file mode 100644 index e5dc0e72ed..0000000000 --- a/src/test/ui/thread-local-mutation.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0594]: cannot assign to immutable static item `S` - --> $DIR/thread-local-mutation.rs:11:5 - | -LL | S = "after"; - | ^^^^^^^^^^^ cannot assign - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/thread-local-mutation.stderr b/src/test/ui/thread-local-mutation.stderr index 685e7c6585..7f7738b5d6 100644 --- a/src/test/ui/thread-local-mutation.stderr +++ b/src/test/ui/thread-local-mutation.stderr @@ -1,9 +1,8 @@ -error[E0594]: cannot assign to immutable thread-local static item +error[E0594]: cannot assign to immutable static item `S` --> $DIR/thread-local-mutation.rs:11:5 | LL | S = "after"; - | ^^^^^^^^^^^ + | ^^^^^^^^^^^ cannot assign error: aborting due to previous error -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/tool-attributes/tool-attributes-misplaced-1.stderr b/src/test/ui/tool-attributes/tool-attributes-misplaced-1.stderr index 1e9d1609f0..1c799b41c5 100644 --- a/src/test/ui/tool-attributes/tool-attributes-misplaced-1.stderr +++ b/src/test/ui/tool-attributes/tool-attributes-misplaced-1.stderr @@ -36,5 +36,4 @@ LL | rustfmt::skip; error: aborting due to 6 previous errors -Some errors occurred: E0423, E0573. -For more information about an error, try `rustc --explain E0423`. +For more information about this error, try `rustc --explain E0423`. diff --git a/src/test/ui/tool_lints.stderr b/src/test/ui/tool_lints.stderr index 2484b10116..de941604a9 100644 --- a/src/test/ui/tool_lints.stderr +++ b/src/test/ui/tool_lints.stderr @@ -6,4 +6,3 @@ LL | #[warn(foo::bar)] error: aborting due to previous error -For more information about this error, try `rustc --explain E0710`. diff --git a/src/test/ui/trace_macros-gate.stderr b/src/test/ui/trace_macros-gate.stderr index 4d2fd554a0..e0ffcfe295 100644 --- a/src/test/ui/trace_macros-gate.stderr +++ b/src/test/ui/trace_macros-gate.stderr @@ -1,9 +1,10 @@ -error[E0658]: `trace_macros` is not stable enough for use and is subject to change (see issue #29598) +error[E0658]: `trace_macros` is not stable enough for use and is subject to change --> $DIR/trace_macros-gate.rs:4:5 | LL | trace_macros!(); | ^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29598 = help: add #![feature(trace_macros)] to the crate attributes to enable error: trace_macros! accepts only `true` or `false` @@ -12,23 +13,25 @@ error: trace_macros! accepts only `true` or `false` LL | trace_macros!(); | ^^^^^^^^^^^^^^^^ -error[E0658]: `trace_macros` is not stable enough for use and is subject to change (see issue #29598) +error[E0658]: `trace_macros` is not stable enough for use and is subject to change --> $DIR/trace_macros-gate.rs:6:5 | LL | trace_macros!(true); | ^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29598 = help: add #![feature(trace_macros)] to the crate attributes to enable -error[E0658]: `trace_macros` is not stable enough for use and is subject to change (see issue #29598) +error[E0658]: `trace_macros` is not stable enough for use and is subject to change --> $DIR/trace_macros-gate.rs:7:5 | LL | trace_macros!(false); | ^^^^^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29598 = help: add #![feature(trace_macros)] to the crate attributes to enable -error[E0658]: `trace_macros` is not stable enough for use and is subject to change (see issue #29598) +error[E0658]: `trace_macros` is not stable enough for use and is subject to change --> $DIR/trace_macros-gate.rs:10:26 | LL | ($x: ident) => { trace_macros!($x) } @@ -37,6 +40,7 @@ LL | ($x: ident) => { trace_macros!($x) } LL | expando!(true); | --------------- in this macro invocation | + = note: for more information, see https://github.com/rust-lang/rust/issues/29598 = help: add #![feature(trace_macros)] to the crate attributes to enable error: aborting due to 5 previous errors diff --git a/src/test/ui/traits/cycle-cache-err-60010.rs b/src/test/ui/traits/cycle-cache-err-60010.rs new file mode 100644 index 0000000000..45aa1b3c52 --- /dev/null +++ b/src/test/ui/traits/cycle-cache-err-60010.rs @@ -0,0 +1,71 @@ +// Test that we properly detect the cycle amongst the traits +// here and report an error. + +use std::panic::RefUnwindSafe; + +trait Database { + type Storage; +} +trait HasQueryGroup {} +trait Query { + type Data; +} +trait SourceDatabase { + fn parse(&self) { + loop {} + } +} + +struct ParseQuery; +struct RootDatabase { + _runtime: Runtime, +} +struct Runtime { + _storage: Box, +} +struct SalsaStorage { + _parse: >::Data, //~ ERROR overflow +} + +impl Database for RootDatabase { //~ ERROR overflow + type Storage = SalsaStorage; +} +impl HasQueryGroup for RootDatabase {} +impl Query for ParseQuery +where + DB: SourceDatabase, + DB: Database, +{ + type Data = RootDatabase; +} +impl SourceDatabase for T +where + T: RefUnwindSafe, + T: HasQueryGroup, +{ +} + +pub(crate) fn goto_implementation(db: &RootDatabase) -> u32 { + // This is not satisfied: + // + // - `RootDatabase: SourceDatabase` + // - requires `RootDatabase: RefUnwindSafe` + `RootDatabase: HasQueryGroup` + // - `RootDatabase: RefUnwindSafe` + // - requires `Runtime: RefUnwindSafe` + // - `Runtime: RefUnwindSafe` + // - requires `DB::Storage: RefUnwindSafe` (`SalsaStorage: RefUnwindSafe`) + // - `SalsaStorage: RefUnwindSafe` + // - requires `>::Data: RefUnwindSafe`, + // which means `ParseQuery: Query` + // - `ParseQuery: Query` + // - requires `RootDatabase: SourceDatabase`, + // - `RootDatabase: SourceDatabase` is already on the stack, so we have a + // cycle with non-coinductive participants + // + // we used to fail to report an error here because we got the + // caching wrong. + SourceDatabase::parse(db); + 22 +} + +fn main() {} diff --git a/src/test/ui/traits/cycle-cache-err-60010.stderr b/src/test/ui/traits/cycle-cache-err-60010.stderr new file mode 100644 index 0000000000..9192f7ba2e --- /dev/null +++ b/src/test/ui/traits/cycle-cache-err-60010.stderr @@ -0,0 +1,20 @@ +error[E0275]: overflow evaluating the requirement `RootDatabase: SourceDatabase` + --> $DIR/cycle-cache-err-60010.rs:27:5 + | +LL | _parse: >::Data, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: required because of the requirements on the impl of `Query` for `ParseQuery` + +error[E0275]: overflow evaluating the requirement `RootDatabase: SourceDatabase` + --> $DIR/cycle-cache-err-60010.rs:30:6 + | +LL | impl Database for RootDatabase { + | ^^^^^^^^ + | + = note: required because of the requirements on the impl of `Query` for `ParseQuery` + = note: required because it appears within the type `SalsaStorage` + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0275`. diff --git a/src/test/ui/traits/trait-alias-object.stderr b/src/test/ui/traits/trait-alias-object.stderr index c6b61eae4a..353aea311e 100644 --- a/src/test/ui/traits/trait-alias-object.stderr +++ b/src/test/ui/traits/trait-alias-object.stderr @@ -14,5 +14,5 @@ LL | let _: &dyn IteratorAlias = &vec![123].into_iter(); error: aborting due to 2 previous errors -Some errors occurred: E0038, E0191. +Some errors have detailed explanations: E0038, E0191. For more information about an error, try `rustc --explain E0038`. diff --git a/src/test/ui/traits/trait-as-struct-constructor.stderr b/src/test/ui/traits/trait-as-struct-constructor.stderr index e1d54fbf8a..434dcbc873 100644 --- a/src/test/ui/traits/trait-as-struct-constructor.stderr +++ b/src/test/ui/traits/trait-as-struct-constructor.stderr @@ -6,4 +6,3 @@ LL | TraitNotAStruct{ value: 0 }; error: aborting due to previous error -For more information about this error, try `rustc --explain E0574`. diff --git a/src/test/ui/traits/trait-coercion-generic-regions.nll.stderr b/src/test/ui/traits/trait-coercion-generic-regions.nll.stderr deleted file mode 100644 index 4ee3e4cacc..0000000000 --- a/src/test/ui/traits/trait-coercion-generic-regions.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0597]: `person` does not live long enough - --> $DIR/trait-coercion-generic-regions.rs:17:24 - | -LL | let person: &str = &person; - | ^^^^^^^ - | | - | borrowed value does not live long enough - | assignment requires that `person` is borrowed for `'static` -LL | let s: Box> = Box::new(Struct { person: person }); -LL | } - | - `person` dropped here while still borrowed - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/traits/trait-coercion-generic-regions.stderr b/src/test/ui/traits/trait-coercion-generic-regions.stderr index 2a9ca4f95f..4ee3e4cacc 100644 --- a/src/test/ui/traits/trait-coercion-generic-regions.stderr +++ b/src/test/ui/traits/trait-coercion-generic-regions.stderr @@ -1,13 +1,14 @@ error[E0597]: `person` does not live long enough - --> $DIR/trait-coercion-generic-regions.rs:17:25 + --> $DIR/trait-coercion-generic-regions.rs:17:24 | LL | let person: &str = &person; - | ^^^^^^ borrowed value does not live long enough + | ^^^^^^^ + | | + | borrowed value does not live long enough + | assignment requires that `person` is borrowed for `'static` LL | let s: Box> = Box::new(Struct { person: person }); LL | } - | - borrowed value only lives until here - | - = note: borrowed value must be valid for the static lifetime... + | - `person` dropped here while still borrowed error: aborting due to previous error diff --git a/src/test/ui/traits/trait-impl-can-not-have-untraitful-items.stderr b/src/test/ui/traits/trait-impl-can-not-have-untraitful-items.stderr index 84565bdaa1..0abed79d38 100644 --- a/src/test/ui/traits/trait-impl-can-not-have-untraitful-items.stderr +++ b/src/test/ui/traits/trait-impl-can-not-have-untraitful-items.stderr @@ -18,5 +18,5 @@ LL | fn foo(&self) { } error: aborting due to 3 previous errors -Some errors occurred: E0407, E0437, E0438. +Some errors have detailed explanations: E0407, E0437, E0438. For more information about an error, try `rustc --explain E0407`. diff --git a/src/test/ui/traits/trait-impl-for-module.stderr b/src/test/ui/traits/trait-impl-for-module.stderr index c62bcfca94..4a06cd777d 100644 --- a/src/test/ui/traits/trait-impl-for-module.stderr +++ b/src/test/ui/traits/trait-impl-for-module.stderr @@ -6,4 +6,3 @@ LL | impl A for a { error: aborting due to previous error -For more information about this error, try `rustc --explain E0573`. diff --git a/src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.stderr b/src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.stderr index 4c63d60977..fb417b82d1 100644 --- a/src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.stderr +++ b/src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.stderr @@ -20,4 +20,3 @@ LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> { error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/traits/trait-item-privacy.stderr b/src/test/ui/traits/trait-item-privacy.stderr index 3bf5309ee7..de699a69fa 100644 --- a/src/test/ui/traits/trait-item-privacy.stderr +++ b/src/test/ui/traits/trait-item-privacy.stderr @@ -142,5 +142,5 @@ LL | A = u8, error: aborting due to 15 previous errors -Some errors occurred: E0038, E0223, E0599, E0624. +Some errors have detailed explanations: E0038, E0223, E0599, E0624. For more information about an error, try `rustc --explain E0038`. diff --git a/src/test/ui/traits/trait-object-auto-dedup-in-impl.stderr b/src/test/ui/traits/trait-object-auto-dedup-in-impl.stderr index 2570db0212..9cf39584a8 100644 --- a/src/test/ui/traits/trait-object-auto-dedup-in-impl.stderr +++ b/src/test/ui/traits/trait-object-auto-dedup-in-impl.stderr @@ -9,4 +9,3 @@ LL | fn test(&self) { println!("two"); } error: aborting due to previous error -For more information about this error, try `rustc --explain E0592`. diff --git a/src/test/ui/traits/trait-object-macro-matcher.stderr b/src/test/ui/traits/trait-object-macro-matcher.stderr index 3a6bf3dcc8..57a529ebc5 100644 --- a/src/test/ui/traits/trait-object-macro-matcher.stderr +++ b/src/test/ui/traits/trait-object-macro-matcher.stderr @@ -14,5 +14,4 @@ LL | m!(Copy + Send + 'static); error: aborting due to 2 previous errors -Some errors occurred: E0038, E0224. -For more information about an error, try `rustc --explain E0038`. +For more information about this error, try `rustc --explain E0038`. diff --git a/src/test/ui/traits/trait-object-vs-lifetime-2.stderr b/src/test/ui/traits/trait-object-vs-lifetime-2.stderr index 70ad839b9a..057f587a7b 100644 --- a/src/test/ui/traits/trait-object-vs-lifetime-2.stderr +++ b/src/test/ui/traits/trait-object-vs-lifetime-2.stderr @@ -6,4 +6,3 @@ LL | 'static +: 'static + Copy, error: aborting due to previous error -For more information about this error, try `rustc --explain E0224`. diff --git a/src/test/ui/traits/trait-object-vs-lifetime.stderr b/src/test/ui/traits/trait-object-vs-lifetime.stderr index e0c52a72a0..c13d0e3f29 100644 --- a/src/test/ui/traits/trait-object-vs-lifetime.stderr +++ b/src/test/ui/traits/trait-object-vs-lifetime.stderr @@ -30,5 +30,4 @@ LL | let _: S<'static +, 'static>; error: aborting due to 5 previous errors -Some errors occurred: E0107, E0224. -For more information about an error, try `rustc --explain E0107`. +For more information about this error, try `rustc --explain E0107`. diff --git a/src/test/ui/traits/trait-object-with-self-in-projection-output-repeated-supertrait.rs b/src/test/ui/traits/trait-object-with-self-in-projection-output-repeated-supertrait.rs index 46c083f930..3e9f612a2a 100644 --- a/src/test/ui/traits/trait-object-with-self-in-projection-output-repeated-supertrait.rs +++ b/src/test/ui/traits/trait-object-with-self-in-projection-output-repeated-supertrait.rs @@ -1,5 +1,8 @@ // compile-pass +// FIXME(eddyb) shorten the name so windows doesn't choke on it. +#![crate_name = "trait_test"] + // Regression test related to #56288. Check that a supertrait projection (of // `Output`) that references `Self` is ok if there is another occurence of // the same supertrait that specifies the projection explicitly, even if diff --git a/src/test/ui/traits/trait-safety-trait-impl.stderr b/src/test/ui/traits/trait-safety-trait-impl.stderr index c83a2cd71e..5b29fd12ab 100644 --- a/src/test/ui/traits/trait-safety-trait-impl.stderr +++ b/src/test/ui/traits/trait-safety-trait-impl.stderr @@ -12,5 +12,5 @@ LL | unsafe impl SafeTrait for u32 { } error: aborting due to 2 previous errors -Some errors occurred: E0199, E0200. +Some errors have detailed explanations: E0199, E0200. For more information about an error, try `rustc --explain E0199`. diff --git a/src/test/ui/traits/trait-test-2.stderr b/src/test/ui/traits/trait-test-2.stderr index 4d61ac67de..0e3446e0d2 100644 --- a/src/test/ui/traits/trait-test-2.stderr +++ b/src/test/ui/traits/trait-test-2.stderr @@ -31,5 +31,5 @@ LL | (box 10 as Box).dup(); error: aborting due to 4 previous errors -Some errors occurred: E0038, E0107. +Some errors have detailed explanations: E0038, E0107. For more information about an error, try `rustc --explain E0038`. diff --git a/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr b/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr index a91be8e69a..87e7ba3e7e 100644 --- a/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr +++ b/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr @@ -19,5 +19,4 @@ LL | fn copy(x: T) -> (T, T) { (x, x) } error: aborting due to 2 previous errors -Some errors occurred: E0277, E0568. -For more information about an error, try `rustc --explain E0277`. +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/traits/traits-multidispatch-bad.stderr b/src/test/ui/traits/traits-multidispatch-bad.stderr index 5b800114aa..9e6c38ced0 100644 --- a/src/test/ui/traits/traits-multidispatch-bad.stderr +++ b/src/test/ui/traits/traits-multidispatch-bad.stderr @@ -3,6 +3,10 @@ error[E0308]: mismatched types | LL | test(22i32, 44i32); | ^^^^^ expected u32, found i32 +help: change the type of the numeric literal from `i32` to `u32` + | +LL | test(22i32, 44u32); + | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/transmute/transmute-from-fn-item-types-error.stderr b/src/test/ui/transmute/transmute-from-fn-item-types-error.stderr index d08078bcfb..1a6093343a 100644 --- a/src/test/ui/transmute/transmute-from-fn-item-types-error.stderr +++ b/src/test/ui/transmute/transmute-from-fn-item-types-error.stderr @@ -88,5 +88,5 @@ LL | mem::transmute::<_, Option>(Some(baz)); error: aborting due to 9 previous errors -Some errors occurred: E0512, E0591. +Some errors have detailed explanations: E0512, E0591. For more information about an error, try `rustc --explain E0512`. diff --git a/src/test/ui/transmute/transmute-imut-to-mut.rs b/src/test/ui/transmute/transmute-imut-to-mut.rs index 94361a2908..8e34e0ae8c 100644 --- a/src/test/ui/transmute/transmute-imut-to-mut.rs +++ b/src/test/ui/transmute/transmute-imut-to-mut.rs @@ -6,4 +6,3 @@ fn main() { let _a: &mut u8 = unsafe { transmute(&1u8) }; //~^ ERROR mutating transmuted &mut T from &T may cause undefined behavior } - diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.nll.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.nll.stderr deleted file mode 100644 index aac119afda..0000000000 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.nll.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0596]: cannot borrow `**t` as mutable, as it is behind a `&` reference - --> $DIR/trivial-bounds-inconsistent-copy-reborrow.rs:6:5 - | -LL | fn reborrow_mut<'a>(t: &'a &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy { - | --------------- help: consider changing this to be a mutable reference: `&'a mut &'a mut i32` -LL | *t - | ^^ `t` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error[E0596]: cannot borrow `**t` as mutable, as it is behind a `&` reference - --> $DIR/trivial-bounds-inconsistent-copy-reborrow.rs:10:6 - | -LL | fn copy_reborrow_mut<'a>(t: &'a &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy { - | --------------- help: consider changing this to be a mutable reference: `&'a mut &'a mut i32` -LL | {*t} - | ^^ `t` is a `&` reference, so the data it refers to cannot be borrowed as mutable - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.stderr index adaeb9b5d5..aac119afda 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.stderr @@ -1,19 +1,19 @@ -error[E0389]: cannot borrow data mutably in a `&` reference +error[E0596]: cannot borrow `**t` as mutable, as it is behind a `&` reference --> $DIR/trivial-bounds-inconsistent-copy-reborrow.rs:6:5 | LL | fn reborrow_mut<'a>(t: &'a &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy { - | --------------- use `&'a mut &'a mut i32` here to make mutable + | --------------- help: consider changing this to be a mutable reference: `&'a mut &'a mut i32` LL | *t - | ^^ assignment into an immutable reference + | ^^ `t` is a `&` reference, so the data it refers to cannot be borrowed as mutable -error[E0389]: cannot borrow data mutably in a `&` reference +error[E0596]: cannot borrow `**t` as mutable, as it is behind a `&` reference --> $DIR/trivial-bounds-inconsistent-copy-reborrow.rs:10:6 | LL | fn copy_reborrow_mut<'a>(t: &'a &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy { - | --------------- use `&'a mut &'a mut i32` here to make mutable + | --------------- help: consider changing this to be a mutable reference: `&'a mut &'a mut i32` LL | {*t} - | ^^ assignment into an immutable reference + | ^^ `t` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0389`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr index 7c1a833442..e9c2824804 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr @@ -6,6 +6,10 @@ LL | fn global_bound_is_hidden() -> u8 ... LL | B::get_x() | ^^^^^^^^^^ expected u8, found i32 +help: you can convert an `i32` to `u8` and panic if the converted value wouldn't fit + | +LL | B::get_x().try_into().unwrap() + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/trivial-bounds/trivial-bounds-leak.rs b/src/test/ui/trivial-bounds/trivial-bounds-leak.rs index dc4f1c7f9f..249051d806 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-leak.rs +++ b/src/test/ui/trivial-bounds/trivial-bounds-leak.rs @@ -29,4 +29,3 @@ fn foo() { fn generic_function(t: T) {} fn main() {} - diff --git a/src/test/ui/trivial-bounds/trivial-bounds-leak.stderr b/src/test/ui/trivial-bounds/trivial-bounds-leak.stderr index 3de683e566..46b4b2a878 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-leak.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-leak.stderr @@ -44,5 +44,5 @@ LL | fn generic_function(t: T) {} error: aborting due to 4 previous errors -Some errors occurred: E0277, E0599. +Some errors have detailed explanations: E0277, E0599. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/try-block/try-block-bad-lifetime.rs b/src/test/ui/try-block/try-block-bad-lifetime.rs index 872604f4ee..6063e2e463 100644 --- a/src/test/ui/try-block/try-block-bad-lifetime.rs +++ b/src/test/ui/try-block/try-block-bad-lifetime.rs @@ -35,4 +35,3 @@ pub fn main() { *i_ptr = 50; } } - diff --git a/src/test/ui/try-block/try-block-bad-lifetime.stderr b/src/test/ui/try-block/try-block-bad-lifetime.stderr index a236cb9055..de1667d883 100644 --- a/src/test/ui/try-block/try-block-bad-lifetime.stderr +++ b/src/test/ui/try-block/try-block-bad-lifetime.stderr @@ -48,5 +48,5 @@ LL | let i_ptr = if let Err(i_ptr) = j { i_ptr } else { panic ! ("") }; error: aborting due to 4 previous errors -Some errors occurred: E0382, E0506, E0597. +Some errors have detailed explanations: E0382, E0506, E0597. For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/try-block/try-block-bad-type.rs b/src/test/ui/try-block/try-block-bad-type.rs index 0e297dd8ff..4dfc8e6a2f 100644 --- a/src/test/ui/try-block/try-block-bad-type.rs +++ b/src/test/ui/try-block/try-block-bad-type.rs @@ -4,7 +4,7 @@ pub fn main() { let res: Result = try { - Err("")?; //~ ERROR the trait bound `i32: std::convert::From<&str>` is not satisfied + Err("")?; //~ ERROR `?` couldn't convert the error 5 }; diff --git a/src/test/ui/try-block/try-block-bad-type.stderr b/src/test/ui/try-block/try-block-bad-type.stderr index 07e7149793..e1c2c6b675 100644 --- a/src/test/ui/try-block/try-block-bad-type.stderr +++ b/src/test/ui/try-block/try-block-bad-type.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `i32: std::convert::From<&str>` is not satisfied - --> $DIR/try-block-bad-type.rs:7:9 +error[E0277]: `?` couldn't convert the error to `i32` + --> $DIR/try-block-bad-type.rs:7:16 | LL | Err("")?; - | ^^^^^^^^ the trait `std::convert::From<&str>` is not implemented for `i32` + | ^ the trait `std::convert::From<&str>` is not implemented for `i32` | + = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait = help: the following implementations were found: > > @@ -48,5 +49,5 @@ LL | let res: i32 = try { 5 }; error: aborting due to 5 previous errors -Some errors occurred: E0271, E0277. +Some errors have detailed explanations: E0271, E0277. For more information about an error, try `rustc --explain E0271`. diff --git a/src/test/ui/try-block/try-block-catch.rs b/src/test/ui/try-block/try-block-catch.rs new file mode 100644 index 0000000000..d165015611 --- /dev/null +++ b/src/test/ui/try-block/try-block-catch.rs @@ -0,0 +1,10 @@ +// compile-flags: --edition 2018 + +#![feature(try_blocks)] + +fn main() { + let res: Option = try { + true + } catch { }; + //~^ ERROR keyword `catch` cannot follow a `try` block +} diff --git a/src/test/ui/try-block/try-block-catch.stderr b/src/test/ui/try-block/try-block-catch.stderr new file mode 100644 index 0000000000..39cf943f4d --- /dev/null +++ b/src/test/ui/try-block/try-block-catch.stderr @@ -0,0 +1,10 @@ +error: keyword `catch` cannot follow a `try` block + --> $DIR/try-block-catch.rs:8:7 + | +LL | } catch { }; + | ^^^^^ + | + = help: try using `match` on the result of the `try` block instead + +error: aborting due to previous error + diff --git a/src/test/ui/try-block/try-block-in-edition2015.stderr b/src/test/ui/try-block/try-block-in-edition2015.stderr index c94e43131f..7034cdce75 100644 --- a/src/test/ui/try-block/try-block-in-edition2015.stderr +++ b/src/test/ui/try-block/try-block-in-edition2015.stderr @@ -21,4 +21,3 @@ LL | let try_result: Option<_> = try { error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0574`. diff --git a/src/test/ui/try-block/try-block-maybe-bad-lifetime.rs b/src/test/ui/try-block/try-block-maybe-bad-lifetime.rs index 113d089c75..1d1c3d980e 100644 --- a/src/test/ui/try-block/try-block-maybe-bad-lifetime.rs +++ b/src/test/ui/try-block/try-block-maybe-bad-lifetime.rs @@ -42,4 +42,3 @@ pub fn main() { do_something_with(j); } } - diff --git a/src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr b/src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr index 665a6262d3..1f0e09277b 100644 --- a/src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr +++ b/src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr @@ -36,5 +36,5 @@ LL | do_something_with(j); error: aborting due to 3 previous errors -Some errors occurred: E0382, E0506. +Some errors have detailed explanations: E0382, E0506. For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/try-block/try-block-opt-init.rs b/src/test/ui/try-block/try-block-opt-init.rs index ef559226e6..2387db8de4 100644 --- a/src/test/ui/try-block/try-block-opt-init.rs +++ b/src/test/ui/try-block/try-block-opt-init.rs @@ -14,4 +14,3 @@ pub fn main() { }; assert_eq!(cfg_res, 5); //~ ERROR borrow of possibly uninitialized variable: `cfg_res` } - diff --git a/src/test/ui/try-on-option.rs b/src/test/ui/try-on-option.rs index 9c8e8b33ad..5d94cee8e3 100644 --- a/src/test/ui/try-on-option.rs +++ b/src/test/ui/try-on-option.rs @@ -4,12 +4,12 @@ fn main() {} fn foo() -> Result { let x: Option = None; - x?; //~ the trait bound + x?; //~ ERROR `?` couldn't convert the error Ok(22) } fn bar() -> u32 { let x: Option = None; - x?; //~ the `?` operator + x?; //~ ERROR the `?` operator 22 } diff --git a/src/test/ui/try-on-option.stderr b/src/test/ui/try-on-option.stderr index 7dfa1a7d3a..db5046f8c1 100644 --- a/src/test/ui/try-on-option.stderr +++ b/src/test/ui/try-on-option.stderr @@ -1,9 +1,10 @@ -error[E0277]: the trait bound `(): std::convert::From` is not satisfied - --> $DIR/try-on-option.rs:7:5 +error[E0277]: `?` couldn't convert the error to `()` + --> $DIR/try-on-option.rs:7:6 | LL | x?; - | ^^ the trait `std::convert::From` is not implemented for `()` + | ^ the trait `std::convert::From` is not implemented for `()` | + = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait = note: required by `std::convert::From::from` error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`) diff --git a/src/test/ui/try-poll.rs b/src/test/ui/try-poll.rs index 3d7115c522..f63950ad5e 100644 --- a/src/test/ui/try-poll.rs +++ b/src/test/ui/try-poll.rs @@ -1,7 +1,6 @@ // compile-pass #![allow(dead_code, unused)] -#![feature(futures_api)] use std::task::Poll; diff --git a/src/test/ui/tutorial-suffix-inference-test.stderr b/src/test/ui/tutorial-suffix-inference-test.stderr index 6ba1b098d1..f3e1cc41ca 100644 --- a/src/test/ui/tutorial-suffix-inference-test.stderr +++ b/src/test/ui/tutorial-suffix-inference-test.stderr @@ -2,23 +2,30 @@ error[E0308]: mismatched types --> $DIR/tutorial-suffix-inference-test.rs:9:18 | LL | identity_u16(x); - | ^ expected u16, found u8 -help: you can cast an `u8` to `u16`, which will zero-extend the source value - | -LL | identity_u16(x.into()); - | ^^^^^^^^ + | ^ + | | + | expected u16, found u8 + | help: you can convert an `u8` to `u16`: `x.into()` error[E0308]: mismatched types --> $DIR/tutorial-suffix-inference-test.rs:12:18 | LL | identity_u16(y); | ^ expected u16, found i32 +help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit + | +LL | identity_u16(y.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/tutorial-suffix-inference-test.rs:21:18 | LL | identity_u16(a); | ^ expected u16, found isize +help: you can convert an `isize` to `u16` and panic if the converted value wouldn't fit + | +LL | identity_u16(a.try_into().unwrap()); + | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/type-alias-enum-variants-panic.stderr b/src/test/ui/type-alias-enum-variants-panic.stderr index 3480d11638..24cf85f527 100644 --- a/src/test/ui/type-alias-enum-variants-panic.stderr +++ b/src/test/ui/type-alias-enum-variants-panic.stderr @@ -18,5 +18,4 @@ LL | let Alias::Variant(..) = panic!(); error: aborting due to 3 previous errors -Some errors occurred: E0164, E0533. -For more information about an error, try `rustc --explain E0164`. +For more information about this error, try `rustc --explain E0164`. diff --git a/src/test/ui/type-alias-enum-variants-priority.rs b/src/test/ui/type-alias-enum-variants-priority.rs index db1da2b12e..82cd21b09d 100644 --- a/src/test/ui/type-alias-enum-variants-priority.rs +++ b/src/test/ui/type-alias-enum-variants-priority.rs @@ -1,5 +1,4 @@ #![feature(type_alias_enum_variants)] -#![deny(ambiguous_associated_items)] enum E { V diff --git a/src/test/ui/type-alias-enum-variants-priority.stderr b/src/test/ui/type-alias-enum-variants-priority.stderr index dcf7dc77ed..b8271807b8 100644 --- a/src/test/ui/type-alias-enum-variants-priority.stderr +++ b/src/test/ui/type-alias-enum-variants-priority.stderr @@ -1,23 +1,19 @@ error: ambiguous associated item - --> $DIR/type-alias-enum-variants-priority.rs:15:15 + --> $DIR/type-alias-enum-variants-priority.rs:14:15 | LL | fn f() -> Self::V { 0 } | ^^^^^^^ help: use fully-qualified syntax: `::V` | -note: lint level defined here - --> $DIR/type-alias-enum-variants-priority.rs:2:9 - | -LL | #![deny(ambiguous_associated_items)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: #[deny(ambiguous_associated_items)] on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57644 note: `V` could refer to variant defined here - --> $DIR/type-alias-enum-variants-priority.rs:5:5 + --> $DIR/type-alias-enum-variants-priority.rs:4:5 | LL | V | ^ note: `V` could also refer to associated type defined here - --> $DIR/type-alias-enum-variants-priority.rs:9:5 + --> $DIR/type-alias-enum-variants-priority.rs:8:5 | LL | type V; | ^^^^^^^ diff --git a/src/test/ui/type/type-arg-out-of-scope.stderr b/src/test/ui/type/type-arg-out-of-scope.stderr index 645cbb33ab..ea991069c0 100644 --- a/src/test/ui/type/type-arg-out-of-scope.stderr +++ b/src/test/ui/type/type-arg-out-of-scope.stderr @@ -2,7 +2,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/type-arg-out-of-scope.rs:3:25 | LL | fn foo(x: T) { - | - type variable from outer function + | - type parameter from outer function LL | fn bar(f: Box T>) { } | --- ^ use of generic parameter from outer function | | @@ -12,7 +12,7 @@ error[E0401]: can't use generic parameters from outer function --> $DIR/type-arg-out-of-scope.rs:3:31 | LL | fn foo(x: T) { - | - type variable from outer function + | - type parameter from outer function LL | fn bar(f: Box T>) { } | --- ^ use of generic parameter from outer function | | diff --git a/src/test/ui/type/type-ascription-precedence.stderr b/src/test/ui/type/type-ascription-precedence.stderr index 992974eef6..aecb0f8738 100644 --- a/src/test/ui/type/type-ascription-precedence.stderr +++ b/src/test/ui/type/type-ascription-precedence.stderr @@ -68,5 +68,5 @@ LL | (S .. S): S; error: aborting due to 8 previous errors -Some errors occurred: E0308, E0600, E0614. +Some errors have detailed explanations: E0308, E0600, E0614. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/type/type-ascription-with-fn-call.stderr b/src/test/ui/type/type-ascription-with-fn-call.stderr index eeaca5300f..624c817e33 100644 --- a/src/test/ui/type/type-ascription-with-fn-call.stderr +++ b/src/test/ui/type/type-ascription-with-fn-call.stderr @@ -11,4 +11,3 @@ LL | f(); error: aborting due to previous error -For more information about this error, try `rustc --explain E0573`. diff --git a/src/test/ui/type/type-check/assignment-expected-bool.stderr b/src/test/ui/type/type-check/assignment-expected-bool.stderr index fed8b91346..b636a71f3a 100644 --- a/src/test/ui/type/type-check/assignment-expected-bool.stderr +++ b/src/test/ui/type/type-check/assignment-expected-bool.stderr @@ -147,5 +147,5 @@ LL | let _: usize = 0 = 0; error: aborting due to 13 previous errors -Some errors occurred: E0070, E0308. +Some errors have detailed explanations: E0070, E0308. For more information about an error, try `rustc --explain E0070`. diff --git a/src/test/ui/type/type-check/issue-41314.stderr b/src/test/ui/type/type-check/issue-41314.stderr index 3461ab4df6..c2bba98d10 100644 --- a/src/test/ui/type/type-check/issue-41314.stderr +++ b/src/test/ui/type/type-check/issue-41314.stderr @@ -14,5 +14,5 @@ LL | X::Y { number } => {} error: aborting due to 2 previous errors -Some errors occurred: E0026, E0027. +Some errors have detailed explanations: E0026, E0027. For more information about an error, try `rustc --explain E0026`. diff --git a/src/test/ui/type/type-check/missing_trait_impl.stderr b/src/test/ui/type/type-check/missing_trait_impl.stderr index b0e3c35c70..2a158ab856 100644 --- a/src/test/ui/type/type-check/missing_trait_impl.stderr +++ b/src/test/ui/type/type-check/missing_trait_impl.stderr @@ -20,5 +20,5 @@ LL | x += x; error: aborting due to 2 previous errors -Some errors occurred: E0368, E0369. +Some errors have detailed explanations: E0368, E0369. For more information about an error, try `rustc --explain E0368`. diff --git a/src/test/ui/type/type-dependent-def-issue-49241.stderr b/src/test/ui/type/type-dependent-def-issue-49241.stderr index 5040b728c5..25cae8d9e4 100644 --- a/src/test/ui/type/type-dependent-def-issue-49241.stderr +++ b/src/test/ui/type/type-dependent-def-issue-49241.stderr @@ -12,5 +12,5 @@ LL | let s: [u32; l] = v.into_iter().collect(); error: aborting due to 2 previous errors -Some errors occurred: E0080, E0435. +Some errors have detailed explanations: E0080, E0435. For more information about an error, try `rustc --explain E0080`. diff --git a/src/test/ui/type/type-mismatch-multiple.rs b/src/test/ui/type/type-mismatch-multiple.rs index 1904ccf5d5..b8f04ca8d4 100644 --- a/src/test/ui/type/type-mismatch-multiple.rs +++ b/src/test/ui/type/type-mismatch-multiple.rs @@ -7,4 +7,3 @@ fn main() { let a: bool = 1; let b: i32 = true; } //~| expected bool, found integer //~| ERROR mismatched types //~| expected i32, found bool - diff --git a/src/test/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr b/src/test/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr index 7306929d71..0beb9e9eb4 100644 --- a/src/test/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr +++ b/src/test/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr @@ -20,5 +20,5 @@ LL | let y = x as MyAdd; error: aborting due to 2 previous errors -Some errors occurred: E0038, E0620. +Some errors have detailed explanations: E0038, E0620. For more information about an error, try `rustc --explain E0038`. diff --git a/src/test/ui/type/type-path-err-node-types.stderr b/src/test/ui/type/type-path-err-node-types.stderr index 29a438a23c..ed744478f2 100644 --- a/src/test/ui/type/type-path-err-node-types.stderr +++ b/src/test/ui/type/type-path-err-node-types.stderr @@ -24,5 +24,5 @@ LL | nonexistent.nonexistent::(); error: aborting due to 4 previous errors -Some errors occurred: E0412, E0425, E0433, E0576. +Some errors have detailed explanations: E0412, E0425, E0433. For more information about an error, try `rustc --explain E0412`. diff --git a/src/test/ui/typeck/typeck-auto-trait-no-supertraits-2.stderr b/src/test/ui/typeck/typeck-auto-trait-no-supertraits-2.stderr index 8755bcded9..1184e30749 100644 --- a/src/test/ui/typeck/typeck-auto-trait-no-supertraits-2.stderr +++ b/src/test/ui/typeck/typeck-auto-trait-no-supertraits-2.stderr @@ -6,4 +6,3 @@ LL | auto trait Magic : Sized where Option : Magic {} error: aborting due to previous error -For more information about this error, try `rustc --explain E0568`. diff --git a/src/test/ui/typeck/typeck-auto-trait-no-supertraits.stderr b/src/test/ui/typeck/typeck-auto-trait-no-supertraits.stderr index 5a38883490..7b45ca07b3 100644 --- a/src/test/ui/typeck/typeck-auto-trait-no-supertraits.stderr +++ b/src/test/ui/typeck/typeck-auto-trait-no-supertraits.stderr @@ -6,4 +6,3 @@ LL | auto trait Magic: Copy {} error: aborting due to previous error -For more information about this error, try `rustc --explain E0568`. diff --git a/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr b/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr index 154b4042c6..6518684496 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr @@ -33,5 +33,5 @@ LL | impl DefaultedTrait for lib::Something { } error: aborting due to 4 previous errors -Some errors occurred: E0117, E0321. +Some errors have detailed explanations: E0117, E0321. For more information about an error, try `rustc --explain E0117`. diff --git a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.rs b/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.rs index f31dac27ca..e4487fb110 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.rs +++ b/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![feature(optin_builtin_traits)] struct Managed; diff --git a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr b/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr index 5330c04074..4d435bf4e8 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr @@ -1,18 +1,18 @@ error[E0277]: `MyNotSync` cannot be shared between threads safely - --> $DIR/typeck-default-trait-impl-negation-sync.rs:35:5 + --> $DIR/typeck-default-trait-impl-negation-sync.rs:33:5 | LL | is_sync::(); | ^^^^^^^^^^^^^^^^^^^^ `MyNotSync` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `MyNotSync` note: required by `is_sync` - --> $DIR/typeck-default-trait-impl-negation-sync.rs:31:1 + --> $DIR/typeck-default-trait-impl-negation-sync.rs:29:1 | LL | fn is_sync() {} | ^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `std::cell::UnsafeCell` cannot be shared between threads safely - --> $DIR/typeck-default-trait-impl-negation-sync.rs:38:5 + --> $DIR/typeck-default-trait-impl-negation-sync.rs:36:5 | LL | is_sync::(); | ^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` cannot be shared between threads safely @@ -20,13 +20,13 @@ LL | is_sync::(); = help: within `MyTypeWUnsafe`, the trait `std::marker::Sync` is not implemented for `std::cell::UnsafeCell` = note: required because it appears within the type `MyTypeWUnsafe` note: required by `is_sync` - --> $DIR/typeck-default-trait-impl-negation-sync.rs:31:1 + --> $DIR/typeck-default-trait-impl-negation-sync.rs:29:1 | LL | fn is_sync() {} | ^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `Managed` cannot be shared between threads safely - --> $DIR/typeck-default-trait-impl-negation-sync.rs:41:5 + --> $DIR/typeck-default-trait-impl-negation-sync.rs:39:5 | LL | is_sync::(); | ^^^^^^^^^^^^^^^^^^^^^^^^ `Managed` cannot be shared between threads safely @@ -34,7 +34,7 @@ LL | is_sync::(); = help: within `MyTypeManaged`, the trait `std::marker::Sync` is not implemented for `Managed` = note: required because it appears within the type `MyTypeManaged` note: required by `is_sync` - --> $DIR/typeck-default-trait-impl-negation-sync.rs:31:1 + --> $DIR/typeck-default-trait-impl-negation-sync.rs:29:1 | LL | fn is_sync() {} | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr b/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr index 2187c61fab..1251d6eee8 100644 --- a/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr +++ b/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr @@ -103,5 +103,4 @@ LL | fn dummy3(self: &&Bar) {} error: aborting due to 7 previous errors -Some errors occurred: E0307, E0308. -For more information about an error, try `rustc --explain E0307`. +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/ufcs/ufcs-partially-resolved.rs b/src/test/ui/ufcs/ufcs-partially-resolved.rs index 4efded8b37..82a593ff16 100644 --- a/src/test/ui/ufcs/ufcs-partially-resolved.rs +++ b/src/test/ui/ufcs/ufcs-partially-resolved.rs @@ -45,9 +45,9 @@ fn main() { ::NN; //~ ERROR cannot find method or associated constant `NN` in `E::N` ::NN; //~ ERROR cannot find method or associated constant `NN` in `A::N` let _: ::NN; //~ ERROR cannot find associated type `NN` in `Tr::Y` - let _: ::NN; //~ ERROR failed to resolve: not a module `Y` + let _: ::NN; //~ ERROR failed to resolve: `Y` is a variant, not a module ::NN; //~ ERROR cannot find method or associated constant `NN` in `Tr::Y` - ::NN; //~ ERROR failed to resolve: not a module `Y` + ::NN; //~ ERROR failed to resolve: `Y` is a variant, not a module let _: ::Z; //~ ERROR expected associated type, found method `Dr::Z` ::X; //~ ERROR expected method or associated constant, found associated type `Dr::X` diff --git a/src/test/ui/ufcs/ufcs-partially-resolved.stderr b/src/test/ui/ufcs/ufcs-partially-resolved.stderr index 900c729721..5ee8adaaf2 100644 --- a/src/test/ui/ufcs/ufcs-partially-resolved.stderr +++ b/src/test/ui/ufcs/ufcs-partially-resolved.stderr @@ -1,14 +1,14 @@ -error[E0433]: failed to resolve: not a module `Y` +error[E0433]: failed to resolve: `Y` is a variant, not a module --> $DIR/ufcs-partially-resolved.rs:48:22 | LL | let _: ::NN; - | ^ not a module `Y` + | ^ `Y` is a variant, not a module -error[E0433]: failed to resolve: not a module `Y` +error[E0433]: failed to resolve: `Y` is a variant, not a module --> $DIR/ufcs-partially-resolved.rs:50:15 | LL | ::NN; - | ^ not a module `Y` + | ^ `Y` is a variant, not a module error[E0576]: cannot find associated type `N` in trait `Tr` --> $DIR/ufcs-partially-resolved.rs:19:24 @@ -200,5 +200,5 @@ LL | ::X::N; error: aborting due to 32 previous errors -Some errors occurred: E0223, E0433, E0575, E0576, E0599. +Some errors have detailed explanations: E0223, E0433, E0599. For more information about an error, try `rustc --explain E0223`. diff --git a/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr b/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr index e3027eedbf..f749ed3f9d 100644 --- a/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr +++ b/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr @@ -11,14 +11,22 @@ error[E0308]: mismatched types | LL | >::add(1u32, 2); | ^^^^ expected i32, found u32 +help: change the type of the numeric literal from `u32` to `i32` + | +LL | >::add(1i32, 2); + | ^^^^ error[E0308]: mismatched types --> $DIR/ufcs-qpath-self-mismatch.rs:8:31 | LL | >::add(1, 2u32); | ^^^^ expected i32, found u32 +help: change the type of the numeric literal from `u32` to `i32` + | +LL | >::add(1, 2i32); + | ^^^^ error: aborting due to 3 previous errors -Some errors occurred: E0277, E0308. +Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/unboxed-closures/unboxed-closure-feature-gate.stderr b/src/test/ui/unboxed-closures/unboxed-closure-feature-gate.stderr index 038167ae9d..1604aa4a0f 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-feature-gate.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-feature-gate.stderr @@ -1,9 +1,10 @@ -error[E0658]: parenthetical notation is only stable when used with `Fn`-family traits (see issue #29625) +error[E0658]: parenthetical notation is only stable when used with `Fn`-family traits --> $DIR/unboxed-closure-feature-gate.rs:13:16 | LL | let x: Box; | ^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.nll.stderr deleted file mode 100644 index 934d057ea0..0000000000 --- a/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.nll.stderr +++ /dev/null @@ -1,35 +0,0 @@ -error[E0507]: cannot move out of captured variable in an `Fn` closure - --> $DIR/unboxed-closure-illegal-move.rs:15:31 - | -LL | let x = Box::new(0); - | - captured outer variable -LL | let f = to_fn(|| drop(x)); - | ^ cannot move out of captured variable in an `Fn` closure - -error[E0507]: cannot move out of captured variable in an `FnMut` closure - --> $DIR/unboxed-closure-illegal-move.rs:19:35 - | -LL | let x = Box::new(0); - | - captured outer variable -LL | let f = to_fn_mut(|| drop(x)); - | ^ cannot move out of captured variable in an `FnMut` closure - -error[E0507]: cannot move out of captured variable in an `Fn` closure - --> $DIR/unboxed-closure-illegal-move.rs:28:36 - | -LL | let x = Box::new(0); - | - captured outer variable -LL | let f = to_fn(move || drop(x)); - | ^ cannot move out of captured variable in an `Fn` closure - -error[E0507]: cannot move out of captured variable in an `FnMut` closure - --> $DIR/unboxed-closure-illegal-move.rs:32:40 - | -LL | let x = Box::new(0); - | - captured outer variable -LL | let f = to_fn_mut(move || drop(x)); - | ^ cannot move out of captured variable in an `FnMut` closure - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.stderr b/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.stderr index 7620f6a3cb..934d057ea0 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.stderr @@ -1,34 +1,34 @@ -error[E0507]: cannot move out of captured outer variable in an `Fn` closure +error[E0507]: cannot move out of captured variable in an `Fn` closure --> $DIR/unboxed-closure-illegal-move.rs:15:31 | LL | let x = Box::new(0); | - captured outer variable LL | let f = to_fn(|| drop(x)); - | ^ cannot move out of captured outer variable in an `Fn` closure + | ^ cannot move out of captured variable in an `Fn` closure -error[E0507]: cannot move out of captured outer variable in an `FnMut` closure +error[E0507]: cannot move out of captured variable in an `FnMut` closure --> $DIR/unboxed-closure-illegal-move.rs:19:35 | LL | let x = Box::new(0); | - captured outer variable LL | let f = to_fn_mut(|| drop(x)); - | ^ cannot move out of captured outer variable in an `FnMut` closure + | ^ cannot move out of captured variable in an `FnMut` closure -error[E0507]: cannot move out of captured outer variable in an `Fn` closure +error[E0507]: cannot move out of captured variable in an `Fn` closure --> $DIR/unboxed-closure-illegal-move.rs:28:36 | LL | let x = Box::new(0); | - captured outer variable LL | let f = to_fn(move || drop(x)); - | ^ cannot move out of captured outer variable in an `Fn` closure + | ^ cannot move out of captured variable in an `Fn` closure -error[E0507]: cannot move out of captured outer variable in an `FnMut` closure +error[E0507]: cannot move out of captured variable in an `FnMut` closure --> $DIR/unboxed-closure-illegal-move.rs:32:40 | LL | let x = Box::new(0); | - captured outer variable LL | let f = to_fn_mut(move || drop(x)); - | ^ cannot move out of captured outer variable in an `FnMut` closure + | ^ cannot move out of captured variable in an `FnMut` closure error: aborting due to 4 previous errors diff --git a/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.nll.stderr deleted file mode 100644 index 3e7f79040f..0000000000 --- a/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.nll.stderr +++ /dev/null @@ -1,75 +0,0 @@ -error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/unboxed-closure-immutable-capture.rs:9:13 - | -LL | let x = 0; - | - help: consider changing this to be mutable: `mut x` -LL | move || x = 1; - | ^^^^^ cannot assign - -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/unboxed-closure-immutable-capture.rs:10:17 - | -LL | let x = 0; - | - help: consider changing this to be mutable: `mut x` -LL | move || x = 1; -LL | move || set(&mut x); - | ^^^^^^ cannot borrow as mutable - -error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/unboxed-closure-immutable-capture.rs:11:13 - | -LL | let x = 0; - | - help: consider changing this to be mutable: `mut x` -... -LL | move || x = 1; - | ^^^^^ cannot assign - -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/unboxed-closure-immutable-capture.rs:12:17 - | -LL | let x = 0; - | - help: consider changing this to be mutable: `mut x` -... -LL | move || set(&mut x); - | ^^^^^^ cannot borrow as mutable - -error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/unboxed-closure-immutable-capture.rs:13:8 - | -LL | let x = 0; - | - help: consider changing this to be mutable: `mut x` -... -LL | || x = 1; - | ^^^^^ cannot assign - -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/unboxed-closure-immutable-capture.rs:15:12 - | -LL | let x = 0; - | - help: consider changing this to be mutable: `mut x` -... -LL | || set(&mut x); - | ^^^^^^ cannot borrow as mutable - -error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/unboxed-closure-immutable-capture.rs:16:8 - | -LL | let x = 0; - | - help: consider changing this to be mutable: `mut x` -... -LL | || x = 1; - | ^^^^^ cannot assign - -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/unboxed-closure-immutable-capture.rs:18:12 - | -LL | let x = 0; - | - help: consider changing this to be mutable: `mut x` -... -LL | || set(&mut x); - | ^^^^^^ cannot borrow as mutable - -error: aborting due to 8 previous errors - -Some errors occurred: E0594, E0596. -For more information about an error, try `rustc --explain E0594`. diff --git a/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.rs b/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.rs index 5d59cecf99..3eba9c4d43 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.rs +++ b/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.rs @@ -11,9 +11,7 @@ fn main() { move || x = 1; //~ ERROR cannot assign move || set(&mut x); //~ ERROR cannot borrow || x = 1; //~ ERROR cannot assign - // FIXME: this should be `cannot borrow` (issue #18330) - || set(&mut x); //~ ERROR cannot assign + || set(&mut x); //~ ERROR cannot borrow || x = 1; //~ ERROR cannot assign - // FIXME: this should be `cannot borrow` (issue #18330) - || set(&mut x); //~ ERROR cannot assign + || set(&mut x); //~ ERROR cannot borrow } diff --git a/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.stderr b/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.stderr index e4aa54032e..9fd8aa562f 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.stderr @@ -1,69 +1,74 @@ -error[E0595]: closure cannot assign to immutable local variable `x` - --> $DIR/unboxed-closure-immutable-capture.rs:13:5 +error[E0594]: cannot assign to `x`, as it is not declared as mutable + --> $DIR/unboxed-closure-immutable-capture.rs:9:13 | LL | let x = 0; - | - help: make this binding mutable: `mut x` -... -LL | || x = 1; - | ^^ cannot borrow mutably + | - help: consider changing this to be mutable: `mut x` +LL | move || x = 1; + | ^^^^^ cannot assign -error[E0595]: closure cannot assign to immutable local variable `x` - --> $DIR/unboxed-closure-immutable-capture.rs:15:5 +error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable + --> $DIR/unboxed-closure-immutable-capture.rs:10:17 | LL | let x = 0; - | - help: make this binding mutable: `mut x` -... -LL | || set(&mut x); - | ^^ cannot borrow mutably + | - help: consider changing this to be mutable: `mut x` +LL | move || x = 1; +LL | move || set(&mut x); + | ^^^^^^ cannot borrow as mutable -error[E0595]: closure cannot assign to immutable local variable `x` - --> $DIR/unboxed-closure-immutable-capture.rs:16:5 +error[E0594]: cannot assign to `x`, as it is not declared as mutable + --> $DIR/unboxed-closure-immutable-capture.rs:11:13 | LL | let x = 0; - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` ... -LL | || x = 1; - | ^^ cannot borrow mutably +LL | move || x = 1; + | ^^^^^ cannot assign -error[E0595]: closure cannot assign to immutable local variable `x` - --> $DIR/unboxed-closure-immutable-capture.rs:18:5 +error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable + --> $DIR/unboxed-closure-immutable-capture.rs:12:17 | LL | let x = 0; - | - help: make this binding mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` ... -LL | || set(&mut x); - | ^^ cannot borrow mutably +LL | move || set(&mut x); + | ^^^^^^ cannot borrow as mutable -error[E0594]: cannot assign to captured outer variable in an `FnMut` closure - --> $DIR/unboxed-closure-immutable-capture.rs:9:13 +error[E0594]: cannot assign to `x`, as it is not declared as mutable + --> $DIR/unboxed-closure-immutable-capture.rs:13:8 | LL | let x = 0; - | - help: consider making `x` mutable: `mut x` -LL | move || x = 1; - | ^^^^^ + | - help: consider changing this to be mutable: `mut x` +... +LL | || x = 1; + | ^^^^^ cannot assign -error[E0596]: cannot borrow captured outer variable in an `FnMut` closure as mutable - --> $DIR/unboxed-closure-immutable-capture.rs:10:22 +error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable + --> $DIR/unboxed-closure-immutable-capture.rs:14:12 | -LL | move || set(&mut x); - | ^ +LL | let x = 0; + | - help: consider changing this to be mutable: `mut x` +... +LL | || set(&mut x); + | ^^^^^^ cannot borrow as mutable -error[E0594]: cannot assign to captured outer variable in an `FnMut` closure - --> $DIR/unboxed-closure-immutable-capture.rs:11:13 +error[E0594]: cannot assign to `x`, as it is not declared as mutable + --> $DIR/unboxed-closure-immutable-capture.rs:15:8 | LL | let x = 0; - | - help: consider making `x` mutable: `mut x` + | - help: consider changing this to be mutable: `mut x` ... -LL | move || x = 1; - | ^^^^^ +LL | || x = 1; + | ^^^^^ cannot assign -error[E0596]: cannot borrow captured outer variable in an `FnMut` closure as mutable - --> $DIR/unboxed-closure-immutable-capture.rs:12:22 +error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable + --> $DIR/unboxed-closure-immutable-capture.rs:16:12 | -LL | move || set(&mut x); - | ^ +LL | let x = 0; + | - help: consider changing this to be mutable: `mut x` +... +LL | || set(&mut x); + | ^^^^^^ cannot borrow as mutable error: aborting due to 8 previous errors -Some errors occurred: E0594, E0595, E0596. -For more information about an error, try `rustc --explain E0594`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/unboxed-closures/unboxed-closure-region.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closure-region.nll.stderr deleted file mode 100644 index b40b2f67d9..0000000000 --- a/src/test/ui/unboxed-closures/unboxed-closure-region.nll.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0597]: `x` does not live long enough - --> $DIR/unboxed-closure-region.rs:8:12 - | -LL | let _f = { - | -- borrow later stored here -LL | let x = 0; -LL | || x - | -- ^ borrowed value does not live long enough - | | - | value captured here -LL | }; - | - `x` dropped here while still borrowed - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/ui/unboxed-closures/unboxed-closure-region.stderr b/src/test/ui/unboxed-closures/unboxed-closure-region.stderr index f710342e2c..b40b2f67d9 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-region.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-region.stderr @@ -1,15 +1,15 @@ error[E0597]: `x` does not live long enough --> $DIR/unboxed-closure-region.rs:8:12 | +LL | let _f = { + | -- borrow later stored here +LL | let x = 0; LL | || x | -- ^ borrowed value does not live long enough | | - | capture occurs here + | value captured here LL | }; - | - borrowed value only lives until here -LL | _f; -LL | } - | - borrowed value needs to live until here + | - `x` dropped here while still borrowed error: aborting due to previous error diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.stderr index 90f04a52d3..0901126a3f 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.stderr @@ -1,17 +1,19 @@ -error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead (see issue #29625) +error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead --> $DIR/unboxed-closure-sugar-not-used-on-fn.rs:3:13 | LL | fn bar1(x: &Fn<(), Output=()>) { | ^^^^^^^^^^^^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable -error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead (see issue #29625) +error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead --> $DIR/unboxed-closure-sugar-not-used-on-fn.rs:7:28 | LL | fn bar2(x: &T) where T: Fn<()> { | ^^^^^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/29625 = help: add #![feature(unboxed_closures)] to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr index fa52e66fb0..81095826f3 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr @@ -12,5 +12,5 @@ LL | let x: Box = panic!(); error: aborting due to 2 previous errors -Some errors occurred: E0107, E0214. +Some errors have detailed explanations: E0107, E0214. For more information about an error, try `rustc --explain E0107`. diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr index b34237937e..3c78d9f913 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr @@ -12,5 +12,5 @@ LL | fn foo(b: Box) { error: aborting due to 2 previous errors -Some errors occurred: E0107, E0214. +Some errors have detailed explanations: E0107, E0214. For more information about an error, try `rustc --explain E0107`. diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr index 3a9fff3831..62b3a25443 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr @@ -12,5 +12,5 @@ LL | fn foo(_: &Three()) error: aborting due to 2 previous errors -Some errors occurred: E0107, E0220. +Some errors have detailed explanations: E0107, E0220. For more information about an error, try `rustc --explain E0107`. diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr index 3f80197897..b64fc61cc8 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr @@ -12,5 +12,5 @@ LL | fn foo(_: Zero()) error: aborting due to 2 previous errors -Some errors occurred: E0107, E0220. +Some errors have detailed explanations: E0107, E0220. For more information about an error, try `rustc --explain E0107`. diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr index a04062e7b9..bd707a8508 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr @@ -12,5 +12,5 @@ LL | fn f isize>(x: F) {} error: aborting due to 2 previous errors -Some errors occurred: E0107, E0220. +Some errors have detailed explanations: E0107, E0220. For more information about an error, try `rustc --explain E0107`. diff --git a/src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.nll.stderr deleted file mode 100644 index 21d6b4fde7..0000000000 --- a/src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.nll.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/unboxed-closures-borrow-conflict.rs:9:14 - | -LL | let f = || x += 1; - | -- - borrow occurs due to use of `x` in closure - | | - | borrow of `x` occurs here -LL | let _y = x; - | ^ use of borrowed `x` -LL | f; - | - borrow later used here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0503`. diff --git a/src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr b/src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr index ac0e4ff13c..21d6b4fde7 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr @@ -1,10 +1,14 @@ error[E0503]: cannot use `x` because it was mutably borrowed - --> $DIR/unboxed-closures-borrow-conflict.rs:9:9 + --> $DIR/unboxed-closures-borrow-conflict.rs:9:14 | LL | let f = || x += 1; - | -- borrow of `x` occurs here + | -- - borrow occurs due to use of `x` in closure + | | + | borrow of `x` occurs here LL | let _y = x; - | ^^ use of borrowed `x` + | ^ use of borrowed `x` +LL | f; + | - borrow later used here error: aborting due to previous error diff --git a/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.nll.stderr deleted file mode 100644 index 19cb2cb733..0000000000 --- a/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.nll.stderr +++ /dev/null @@ -1,62 +0,0 @@ -error[E0597]: `factorial` does not live long enough - --> $DIR/unboxed-closures-failed-recursive-fn-1.rs:15:17 - | -LL | let f = |x: u32| -> u32 { - | --------------- value captured here -LL | let g = factorial.as_ref().unwrap(); - | ^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - - | | - | `factorial` dropped here while still borrowed - | borrow might be used here, when `factorial` is dropped and runs the destructor for type `std::option::Option u32>>` - -error[E0506]: cannot assign to `factorial` because it is borrowed - --> $DIR/unboxed-closures-failed-recursive-fn-1.rs:20:5 - | -LL | let f = |x: u32| -> u32 { - | --------------- borrow of `factorial` occurs here -LL | let g = factorial.as_ref().unwrap(); - | --------- borrow occurs due to use in closure -... -LL | factorial = Some(Box::new(f)); - | ^^^^^^^^^ - | | - | assignment to borrowed `factorial` occurs here - | borrow later used here - -error[E0597]: `factorial` does not live long enough - --> $DIR/unboxed-closures-failed-recursive-fn-1.rs:28:17 - | -LL | let mut factorial: Option u32 + 'static>> = None; - | ------------------------------------- type annotation requires that `factorial` is borrowed for `'static` -LL | -LL | let f = |x: u32| -> u32 { - | --------------- value captured here -LL | -LL | let g = factorial.as_ref().unwrap(); - | ^^^^^^^^^ borrowed value does not live long enough -... -LL | } - | - `factorial` dropped here while still borrowed - -error[E0506]: cannot assign to `factorial` because it is borrowed - --> $DIR/unboxed-closures-failed-recursive-fn-1.rs:32:5 - | -LL | let mut factorial: Option u32 + 'static>> = None; - | ------------------------------------- type annotation requires that `factorial` is borrowed for `'static` -LL | -LL | let f = |x: u32| -> u32 { - | --------------- borrow of `factorial` occurs here -LL | -LL | let g = factorial.as_ref().unwrap(); - | --------- borrow occurs due to use in closure -... -LL | factorial = Some(Box::new(f)); - | ^^^^^^^^^ assignment to borrowed `factorial` occurs here - -error: aborting due to 4 previous errors - -Some errors occurred: E0506, E0597. -For more information about an error, try `rustc --explain E0506`. diff --git a/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.rs b/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.rs index b72482a712..82dc536bb5 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.rs +++ b/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.rs @@ -18,18 +18,20 @@ fn a() { }; factorial = Some(Box::new(f)); + //~^ ERROR cannot assign to `factorial` because it is borrowed } fn b() { let mut factorial: Option u32 + 'static>> = None; let f = |x: u32| -> u32 { - //~^ ERROR closure may outlive the current function, but it borrows `factorial` let g = factorial.as_ref().unwrap(); + //~^ ERROR `factorial` does not live long enough if x == 0 {1} else {x * g(x-1)} }; factorial = Some(Box::new(f)); + //~^ ERROR cannot assign to `factorial` because it is borrowed } fn main() { } diff --git a/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr b/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr index 47fe0ee72d..8d39fb026b 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr @@ -2,29 +2,59 @@ error[E0597]: `factorial` does not live long enough --> $DIR/unboxed-closures-failed-recursive-fn-1.rs:15:17 | LL | let f = |x: u32| -> u32 { - | --------------- capture occurs here + | --------------- value captured here LL | let g = factorial.as_ref().unwrap(); | ^^^^^^^^^ borrowed value does not live long enough ... LL | } - | - borrowed value dropped before borrower + | - + | | + | `factorial` dropped here while still borrowed + | borrow might be used here, when `factorial` is dropped and runs the destructor for type `std::option::Option u32>>` + +error[E0506]: cannot assign to `factorial` because it is borrowed + --> $DIR/unboxed-closures-failed-recursive-fn-1.rs:20:5 | - = note: values in a scope are dropped in the opposite order they are created +LL | let f = |x: u32| -> u32 { + | --------------- borrow of `factorial` occurs here +LL | let g = factorial.as_ref().unwrap(); + | --------- borrow occurs due to use in closure +... +LL | factorial = Some(Box::new(f)); + | ^^^^^^^^^ + | | + | assignment to borrowed `factorial` occurs here + | borrow later used here -error[E0373]: closure may outlive the current function, but it borrows `factorial`, which is owned by the current function - --> $DIR/unboxed-closures-failed-recursive-fn-1.rs:26:13 +error[E0597]: `factorial` does not live long enough + --> $DIR/unboxed-closures-failed-recursive-fn-1.rs:28:17 | +LL | let mut factorial: Option u32 + 'static>> = None; + | ------------------------------------- type annotation requires that `factorial` is borrowed for `'static` +LL | LL | let f = |x: u32| -> u32 { - | ^^^^^^^^^^^^^^^ may outlive borrowed value `factorial` -LL | + | --------------- value captured here LL | let g = factorial.as_ref().unwrap(); - | --------- `factorial` is borrowed here -help: to force the closure to take ownership of `factorial` (and any other referenced variables), use the `move` keyword + | ^^^^^^^^^ borrowed value does not live long enough +... +LL | } + | - `factorial` dropped here while still borrowed + +error[E0506]: cannot assign to `factorial` because it is borrowed + --> $DIR/unboxed-closures-failed-recursive-fn-1.rs:33:5 | -LL | let f = move |x: u32| -> u32 { - | ^^^^^^^^^^^^^^^^^^^^ +LL | let mut factorial: Option u32 + 'static>> = None; + | ------------------------------------- type annotation requires that `factorial` is borrowed for `'static` +LL | +LL | let f = |x: u32| -> u32 { + | --------------- borrow of `factorial` occurs here +LL | let g = factorial.as_ref().unwrap(); + | --------- borrow occurs due to use in closure +... +LL | factorial = Some(Box::new(f)); + | ^^^^^^^^^ assignment to borrowed `factorial` occurs here -error: aborting due to 2 previous errors +error: aborting due to 4 previous errors -Some errors occurred: E0373, E0597. -For more information about an error, try `rustc --explain E0373`. +Some errors have detailed explanations: E0506, E0597. +For more information about an error, try `rustc --explain E0506`. diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.nll.stderr new file mode 100644 index 0000000000..ead42c1488 --- /dev/null +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.nll.stderr @@ -0,0 +1,12 @@ +error: lifetime may not live long enough + --> $DIR/unboxed-closures-infer-argument-types-two-region-pointers.rs:17:9 + | +LL | doit(0, &|x, y| { + | - - has type `&'1 i32` + | | + | has type `&std::cell::Cell<&'2 i32>` +LL | x.set(y); + | ^^^^^^^^ argument requires that `'1` must outlive `'2` + +error: aborting due to previous error + diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.stderr index 526055ba04..728efadf41 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.stderr @@ -23,4 +23,3 @@ LL | | }); error: aborting due to previous error -For more information about this error, try `rustc --explain E0312`. diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.nll.stderr deleted file mode 100644 index 1e1172cdbf..0000000000 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.nll.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0596]: cannot borrow `tick1` as mutable, as it is not declared as mutable - --> $DIR/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs:17:9 - | -LL | let tick1 = || { - | ----- help: consider changing this to be mutable: `mut tick1` -... -LL | tick1(); - | ^^^^^ cannot borrow as mutable - -error[E0596]: cannot borrow `tick2` as mutable, as it is not declared as mutable - --> $DIR/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs:20:5 - | -LL | let tick2 = || { - | ----- help: consider changing this to be mutable: `mut tick2` -... -LL | tick2(); - | ^^^^^ cannot borrow as mutable - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs index aaa692c109..6401b5e01f 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs @@ -11,10 +11,9 @@ fn main() { }; // In turn, tick2 must be inferred to FnMut so that it can call - // tick1, but we forgot the mut. The error message we currently - // get seems... suboptimal. - let tick2 = || { //~ ERROR closure cannot assign to immutable local variable `tick1` - tick1(); + // tick1, but we forgot the mut. + let tick2 = || { + tick1(); //~ ERROR cannot borrow `tick1` as mutable }; tick2(); //~ ERROR cannot borrow diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.stderr index c90c150749..5dea424596 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.stderr @@ -1,22 +1,21 @@ -error[E0595]: closure cannot assign to immutable local variable `tick1` - --> $DIR/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs:16:17 +error[E0596]: cannot borrow `tick1` as mutable, as it is not declared as mutable + --> $DIR/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs:16:9 | LL | let tick1 = || { - | ----- help: make this binding mutable: `mut tick1` + | ----- help: consider changing this to be mutable: `mut tick1` ... -LL | let tick2 = || { - | ^^ cannot borrow mutably +LL | tick1(); + | ^^^^^ cannot borrow as mutable -error[E0596]: cannot borrow immutable local variable `tick2` as mutable - --> $DIR/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs:20:5 +error[E0596]: cannot borrow `tick2` as mutable, as it is not declared as mutable + --> $DIR/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs:19:5 | LL | let tick2 = || { - | ----- help: make this binding mutable: `mut tick2` + | ----- help: consider changing this to be mutable: `mut tick2` ... LL | tick2(); - | ^^^^^ cannot borrow mutably + | ^^^^^ cannot borrow as mutable error: aborting due to 2 previous errors -Some errors occurred: E0595, E0596. -For more information about an error, try `rustc --explain E0595`. +For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.nll.stderr deleted file mode 100644 index eb39862884..0000000000 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0596]: cannot borrow `tick` as mutable, as it is not declared as mutable - --> $DIR/unboxed-closures-infer-fnmut-missing-mut.rs:7:5 - | -LL | let tick = || counter += 1; - | ---- help: consider changing this to be mutable: `mut tick` -LL | tick(); - | ^^^^ cannot borrow as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.rs b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.rs index de3f9839d2..5c0ceb23d6 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.rs +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.rs @@ -4,5 +4,5 @@ fn main() { let mut counter = 0; let tick = || counter += 1; - tick(); //~ ERROR cannot borrow immutable local variable `tick` as mutable + tick(); //~ ERROR cannot borrow `tick` as mutable, as it is not declared as mutable } diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.stderr index 33e2154485..eb39862884 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.stderr @@ -1,10 +1,10 @@ -error[E0596]: cannot borrow immutable local variable `tick` as mutable +error[E0596]: cannot borrow `tick` as mutable, as it is not declared as mutable --> $DIR/unboxed-closures-infer-fnmut-missing-mut.rs:7:5 | LL | let tick = || counter += 1; - | ---- help: make this binding mutable: `mut tick` + | ---- help: consider changing this to be mutable: `mut tick` LL | tick(); - | ^^^^ cannot borrow mutably + | ^^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.nll.stderr deleted file mode 100644 index b9d76d9a75..0000000000 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0596]: cannot borrow `tick` as mutable, as it is not declared as mutable - --> $DIR/unboxed-closures-infer-fnmut-move-missing-mut.rs:7:5 - | -LL | let tick = move || counter += 1; - | ---- help: consider changing this to be mutable: `mut tick` -LL | tick(); - | ^^^^ cannot borrow as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.rs b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.rs index b011c5a58b..144a674ac5 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.rs +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.rs @@ -4,5 +4,5 @@ fn main() { let mut counter = 0; let tick = move || counter += 1; - tick(); //~ ERROR cannot borrow immutable local variable `tick` as mutable + tick(); //~ ERROR cannot borrow `tick` as mutable, as it is not declared as mutable } diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.stderr index 585577ae82..b9d76d9a75 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.stderr @@ -1,10 +1,10 @@ -error[E0596]: cannot borrow immutable local variable `tick` as mutable +error[E0596]: cannot borrow `tick` as mutable, as it is not declared as mutable --> $DIR/unboxed-closures-infer-fnmut-move-missing-mut.rs:7:5 | LL | let tick = move || counter += 1; - | ---- help: make this binding mutable: `mut tick` + | ---- help: consider changing this to be mutable: `mut tick` LL | tick(); - | ^^^^ cannot borrow mutably + | ^^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.nll.stderr deleted file mode 100644 index 6bba38510b..0000000000 --- a/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.nll.stderr +++ /dev/null @@ -1,45 +0,0 @@ -error[E0594]: cannot assign to `n`, as it is not declared as mutable - --> $DIR/unboxed-closures-mutate-upvar.rs:15:9 - | -LL | let n = 0; - | - help: consider changing this to be mutable: `mut n` -LL | let mut f = to_fn_mut(|| { -LL | n += 1; - | ^^^^^^ cannot assign - -error[E0594]: cannot assign to `n`, as it is not declared as mutable - --> $DIR/unboxed-closures-mutate-upvar.rs:32:9 - | -LL | let n = 0; - | - help: consider changing this to be mutable: `mut n` -... -LL | n += 1; - | ^^^^^^ cannot assign - -error[E0594]: cannot assign to `n`, as it is not declared as mutable - --> $DIR/unboxed-closures-mutate-upvar.rs:46:9 - | -LL | let n = 0; - | - help: consider changing this to be mutable: `mut n` -LL | let mut f = to_fn(move || { -LL | n += 1; - | ^^^^^^ cannot assign - -error[E0594]: cannot assign to `n`, as it is a captured variable in a `Fn` closure - --> $DIR/unboxed-closures-mutate-upvar.rs:53:9 - | -LL | n += 1; - | ^^^^^^ cannot assign - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/unboxed-closures-mutate-upvar.rs:52:23 - | -LL | let mut f = to_fn(move || { - | _______________________^ -LL | | n += 1; -LL | | }); - | |_____^ - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.rs b/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.rs index 3bea9226f2..57e6d30658 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.rs +++ b/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.rs @@ -11,8 +11,8 @@ fn to_fn_mut>(f: F) -> F { f } fn a() { let n = 0; - let mut f = to_fn_mut(|| { //~ ERROR closure cannot assign - n += 1; + let mut f = to_fn_mut(|| { + n += 1; //~ ERROR cannot assign to `n`, as it is not declared as mutable }); } diff --git a/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.stderr b/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.stderr index 055a1748db..fef6c23a50 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.stderr @@ -1,44 +1,37 @@ -error[E0595]: closure cannot assign to immutable local variable `n` - --> $DIR/unboxed-closures-mutate-upvar.rs:14:27 +error[E0594]: cannot assign to `n`, as it is not declared as mutable + --> $DIR/unboxed-closures-mutate-upvar.rs:15:9 | LL | let n = 0; - | - help: make this binding mutable: `mut n` + | - help: consider changing this to be mutable: `mut n` LL | let mut f = to_fn_mut(|| { - | ^^ cannot borrow mutably +LL | n += 1; + | ^^^^^^ cannot assign -error[E0594]: cannot assign to captured outer variable in an `FnMut` closure +error[E0594]: cannot assign to `n`, as it is not declared as mutable --> $DIR/unboxed-closures-mutate-upvar.rs:32:9 | LL | let n = 0; - | - help: consider making `n` mutable: `mut n` + | - help: consider changing this to be mutable: `mut n` ... LL | n += 1; - | ^^^^^^ + | ^^^^^^ cannot assign -error[E0594]: cannot assign to captured outer variable in an `Fn` closure +error[E0594]: cannot assign to `n`, as it is not declared as mutable --> $DIR/unboxed-closures-mutate-upvar.rs:46:9 | +LL | let n = 0; + | - help: consider changing this to be mutable: `mut n` +LL | let mut f = to_fn(move || { LL | n += 1; - | ^^^^^^ - | - = note: `Fn` closures cannot capture their enclosing environment for modifications -help: consider changing this closure to take self by mutable reference - --> $DIR/unboxed-closures-mutate-upvar.rs:45:23 - | -LL | let mut f = to_fn(move || { - | _______________________^ -LL | | n += 1; -LL | | }); - | |_____^ + | ^^^^^^ cannot assign -error[E0594]: cannot assign to captured outer variable in an `Fn` closure +error[E0594]: cannot assign to `n`, as it is a captured variable in a `Fn` closure --> $DIR/unboxed-closures-mutate-upvar.rs:53:9 | LL | n += 1; - | ^^^^^^ + | ^^^^^^ cannot assign | - = note: `Fn` closures cannot capture their enclosing environment for modifications -help: consider changing this closure to take self by mutable reference +help: consider changing this to accept closures that implement `FnMut` --> $DIR/unboxed-closures-mutate-upvar.rs:52:23 | LL | let mut f = to_fn(move || { @@ -49,5 +42,3 @@ LL | | }); error: aborting due to 4 previous errors -Some errors occurred: E0594, E0595. -For more information about an error, try `rustc --explain E0594`. diff --git a/src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.ast.stderr b/src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.ast.stderr deleted file mode 100644 index 07883500b8..0000000000 --- a/src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.ast.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0387]: cannot assign to data in a captured outer variable in an `Fn` closure - --> $DIR/unboxed-closures-mutated-upvar-from-fn-closure.rs:14:9 - | -LL | counter += 1; - | ^^^^^^^^^^^^ - | -help: consider changing this closure to take self by mutable reference - --> $DIR/unboxed-closures-mutated-upvar-from-fn-closure.rs:13:10 - | -LL | call(|| { - | __________^ -LL | | counter += 1; -LL | | -LL | | -LL | | }); - | |_____^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0387`. diff --git a/src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.mir.stderr b/src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.mir.stderr deleted file mode 100644 index 3440edeadf..0000000000 --- a/src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.mir.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0594]: cannot assign to `counter`, as it is a captured variable in a `Fn` closure - --> $DIR/unboxed-closures-mutated-upvar-from-fn-closure.rs:14:9 - | -LL | counter += 1; - | ^^^^^^^^^^^^ cannot assign - | -help: consider changing this to accept closures that implement `FnMut` - --> $DIR/unboxed-closures-mutated-upvar-from-fn-closure.rs:13:10 - | -LL | call(|| { - | __________^ -LL | | counter += 1; -LL | | -LL | | -LL | | }); - | |_____^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.rs b/src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.rs index a5dcb57d33..174ad245d5 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.rs +++ b/src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.rs @@ -1,6 +1,3 @@ -// revisions: ast mir -//[mir]compile-flags: -Z borrowck=mir - // Test that a by-ref `FnMut` closure gets an error when it tries to // mutate a value. @@ -12,7 +9,6 @@ fn main() { let mut counter = 0; call(|| { counter += 1; - //[ast]~^ ERROR cannot assign to data in a captured outer variable in an `Fn` closure - //[mir]~^^ ERROR cannot assign to `counter` + //~^ ERROR cannot assign to `counter` }); } diff --git a/src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.ast.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.stderr similarity index 65% rename from src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.ast.nll.stderr rename to src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.stderr index 3440edeadf..2bc1f01af9 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.ast.nll.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.stderr @@ -1,20 +1,18 @@ error[E0594]: cannot assign to `counter`, as it is a captured variable in a `Fn` closure - --> $DIR/unboxed-closures-mutated-upvar-from-fn-closure.rs:14:9 + --> $DIR/unboxed-closures-mutated-upvar-from-fn-closure.rs:11:9 | LL | counter += 1; | ^^^^^^^^^^^^ cannot assign | help: consider changing this to accept closures that implement `FnMut` - --> $DIR/unboxed-closures-mutated-upvar-from-fn-closure.rs:13:10 + --> $DIR/unboxed-closures-mutated-upvar-from-fn-closure.rs:10:10 | LL | call(|| { | __________^ LL | | counter += 1; LL | | -LL | | LL | | }); | |_____^ error: aborting due to previous error -For more information about this error, try `rustc --explain E0594`. diff --git a/src/test/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.nll.stderr deleted file mode 100644 index 830f6bc993..0000000000 --- a/src/test/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0499]: cannot borrow `*self` as mutable more than once at a time - --> $DIR/unboxed-closures-recursive-fn-using-fn-mut.rs:22:21 - | -LL | (self.func)(self, arg) - | ----------- ^^^^ second mutable borrow occurs here - | | - | first mutable borrow occurs here - | first borrow later used by call - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.stderr b/src/test/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.stderr index f881d1982a..830f6bc993 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-recursive-fn-using-fn-mut.stderr @@ -2,10 +2,10 @@ error[E0499]: cannot borrow `*self` as mutable more than once at a time --> $DIR/unboxed-closures-recursive-fn-using-fn-mut.rs:22:21 | LL | (self.func)(self, arg) - | ----------- ^^^^ - first borrow ends here - | | | - | | second mutable borrow occurs here + | ----------- ^^^^ second mutable borrow occurs here + | | | first mutable borrow occurs here + | first borrow later used by call error: aborting due to previous error diff --git a/src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr b/src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr index df31a8d610..758762fd5f 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr @@ -3,6 +3,10 @@ error[E0308]: mismatched types | LL | let z = f(1_usize, 2); | ^^^^^^^ expected isize, found usize +help: change the type of the numeric literal from `usize` to `isize` + | +LL | let z = f(1_isize, 2); + | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr index 1ea9c423e5..b20c23ade2 100644 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr +++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr @@ -12,5 +12,4 @@ LL | x: Box, error: aborting due to 2 previous errors -Some errors occurred: E0106, E0228. -For more information about an error, try `rustc --explain E0106`. +For more information about this error, try `rustc --explain E0106`. diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr new file mode 100644 index 0000000000..8ed48bda26 --- /dev/null +++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/dyn-trait-underscore.rs:8:5 + | +LL | fn a(items: &[T]) -> Box> { + | - let's call the lifetime of this reference `'1` +LL | // ^^^^^^^^^^^^^^^^^^^^^ bound *here* defaults to `'static` +LL | Box::new(items.iter()) + | ^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'static` + +error: aborting due to previous error + diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr index d0475bf08c..92e5ac282e 100644 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr +++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr @@ -24,4 +24,3 @@ LL | Box::new(items.iter()) error: aborting due to previous error -For more information about this error, try `rustc --explain E0495`. diff --git a/src/test/ui/underscore-lifetime/in-binder.stderr b/src/test/ui/underscore-lifetime/in-binder.stderr index fcd7eddb57..1b936dd9ae 100644 --- a/src/test/ui/underscore-lifetime/in-binder.stderr +++ b/src/test/ui/underscore-lifetime/in-binder.stderr @@ -36,4 +36,3 @@ LL | fn foo<'_>() { error: aborting due to 6 previous errors -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr b/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr index 104e638847..936e3ba55f 100644 --- a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr +++ b/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr @@ -34,5 +34,4 @@ LL | fn foo2(_: &'_ u8, y: &'_ u8) -> &'_ u8 { y } error: aborting due to 5 previous errors -Some errors occurred: E0106, E0637. -For more information about an error, try `rustc --explain E0106`. +For more information about this error, try `rustc --explain E0106`. diff --git a/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.nll.stderr b/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.nll.stderr new file mode 100644 index 0000000000..e1d57b8ba1 --- /dev/null +++ b/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.nll.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/underscore-lifetime-elison-mismatch.rs:1:42 + | +LL | fn foo(x: &mut Vec<&'_ u8>, y: &'_ u8) { x.push(y); } + | - - ^^^^^^^^^ argument requires that `'1` must outlive `'2` + | | | + | | let's call the lifetime of this reference `'1` + | let's call the lifetime of this reference `'2` + +error: aborting due to previous error + diff --git a/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.stderr b/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.stderr index 76c14ccc14..21fdfcaef8 100644 --- a/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.stderr +++ b/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.stderr @@ -8,4 +8,3 @@ LL | fn foo(x: &mut Vec<&'_ u8>, y: &'_ u8) { x.push(y); } error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/underscore-lifetime/underscore-outlives-bounds.stderr b/src/test/ui/underscore-lifetime/underscore-outlives-bounds.stderr index 4b38a26f95..6fa74d4e31 100644 --- a/src/test/ui/underscore-lifetime/underscore-outlives-bounds.stderr +++ b/src/test/ui/underscore-lifetime/underscore-outlives-bounds.stderr @@ -6,4 +6,3 @@ LL | impl<'b: '_> Foo<'b> for i32 {} error: aborting due to previous error -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2015.stderr b/src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2015.stderr index fe726cb49c..eec8e4b846 100644 --- a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2015.stderr +++ b/src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2015.stderr @@ -6,4 +6,3 @@ LL | T: WithType<&u32> error: aborting due to previous error -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2018.stderr b/src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2018.stderr index fe726cb49c..eec8e4b846 100644 --- a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2018.stderr +++ b/src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2018.stderr @@ -6,4 +6,3 @@ LL | T: WithType<&u32> error: aborting due to previous error -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2015.stderr b/src/test/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2015.stderr index 95939fd6b7..d2c3e35204 100644 --- a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2015.stderr +++ b/src/test/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2015.stderr @@ -6,4 +6,3 @@ LL | T: WithRegion<'_> error: aborting due to previous error -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2018.stderr b/src/test/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2018.stderr index 95939fd6b7..d2c3e35204 100644 --- a/src/test/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2018.stderr +++ b/src/test/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rust2018.stderr @@ -6,4 +6,3 @@ LL | T: WithRegion<'_> error: aborting due to previous error -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rust2015.stderr b/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rust2015.stderr index fbd14de210..586b2b6aea 100644 --- a/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rust2015.stderr +++ b/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rust2015.stderr @@ -6,4 +6,3 @@ LL | T: WithType<&u32> error: aborting due to previous error -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rust2018.stderr b/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rust2018.stderr index fbd14de210..586b2b6aea 100644 --- a/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rust2018.stderr +++ b/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rust2018.stderr @@ -6,4 +6,3 @@ LL | T: WithType<&u32> error: aborting due to previous error -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2015.stderr b/src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2015.stderr index 92caff0dcd..faabf57a7d 100644 --- a/src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2015.stderr +++ b/src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2015.stderr @@ -6,4 +6,3 @@ LL | T: WithRegion<'_> error: aborting due to previous error -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2018.stderr b/src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2018.stderr index 92caff0dcd..faabf57a7d 100644 --- a/src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2018.stderr +++ b/src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rust2018.stderr @@ -6,4 +6,3 @@ LL | T: WithRegion<'_> error: aborting due to previous error -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/underscore-lifetime/where-clauses.stderr b/src/test/ui/underscore-lifetime/where-clauses.stderr index 1a3ea4af7e..8674a925c1 100644 --- a/src/test/ui/underscore-lifetime/where-clauses.stderr +++ b/src/test/ui/underscore-lifetime/where-clauses.stderr @@ -12,4 +12,3 @@ LL | impl Foo<'static> for Vec {} error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0637`. diff --git a/src/test/ui/uninhabited/uninhabited-irrefutable.rs b/src/test/ui/uninhabited/uninhabited-irrefutable.rs index c32d3a4a0a..48cd92719b 100644 --- a/src/test/ui/uninhabited/uninhabited-irrefutable.rs +++ b/src/test/ui/uninhabited/uninhabited-irrefutable.rs @@ -26,4 +26,3 @@ fn main() { let x: Foo = Foo::D(123); let Foo::D(_y) = x; //~ ERROR refutable pattern in local binding: `A(_)` not covered } - diff --git a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr index 533cf595ef..de7a963577 100644 --- a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr +++ b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr @@ -54,5 +54,5 @@ LL | let Ok(x) = x; error: aborting due to 7 previous errors -Some errors occurred: E0004, E0005. +Some errors have detailed explanations: E0004, E0005. For more information about an error, try `rustc --explain E0004`. diff --git a/src/test/ui/uninhabited/uninhabited-patterns.rs b/src/test/ui/uninhabited/uninhabited-patterns.rs index 609ed3d75b..1bf01184a0 100644 --- a/src/test/ui/uninhabited/uninhabited-patterns.rs +++ b/src/test/ui/uninhabited/uninhabited-patterns.rs @@ -45,4 +45,3 @@ fn main() { //~^ ERROR unreachable pattern } } - diff --git a/src/test/ui/union/union-borrow-move-parent-sibling.nll.stderr b/src/test/ui/union/union-borrow-move-parent-sibling.nll.stderr deleted file mode 100644 index 70860c822e..0000000000 --- a/src/test/ui/union/union-borrow-move-parent-sibling.nll.stderr +++ /dev/null @@ -1,70 +0,0 @@ -error[E0502]: cannot borrow `u` (via `u.y`) as immutable because it is also borrowed as mutable (via `u.x.0`) - --> $DIR/union-borrow-move-parent-sibling.rs:15:13 - | -LL | let a = &mut u.x.0; - | ---------- mutable borrow occurs here (via `u.x.0`) -LL | let b = &u.y; - | ^^^^ immutable borrow of `u.y` -- which overlaps with `u.x.0` -- occurs here -LL | use_borrow(a); - | - mutable borrow later used here - | - = note: `u.y` is a field of the union `U`, so it overlaps the field `u.x.0` - -error[E0382]: use of moved value: `u` - --> $DIR/union-borrow-move-parent-sibling.rs:22:13 - | -LL | let u = U { x: ((Vec::new(), Vec::new()), Vec::new()) }; - | - move occurs because `u` has type `U`, which does not implement the `Copy` trait -LL | let a = u.x.0; - | ----- value moved here -LL | let b = u.y; - | ^^^ value used here after move - -error[E0502]: cannot borrow `u` (via `u.y`) as immutable because it is also borrowed as mutable (via `u.x.0.0`) - --> $DIR/union-borrow-move-parent-sibling.rs:28:13 - | -LL | let a = &mut (u.x.0).0; - | -------------- mutable borrow occurs here (via `u.x.0.0`) -LL | let b = &u.y; - | ^^^^ immutable borrow of `u.y` -- which overlaps with `u.x.0.0` -- occurs here -LL | use_borrow(a); - | - mutable borrow later used here - | - = note: `u.y` is a field of the union `U`, so it overlaps the field `u.x.0.0` - -error[E0382]: use of moved value: `u` - --> $DIR/union-borrow-move-parent-sibling.rs:35:13 - | -LL | let u = U { x: ((Vec::new(), Vec::new()), Vec::new()) }; - | - move occurs because `u` has type `U`, which does not implement the `Copy` trait -LL | let a = (u.x.0).0; - | --------- value moved here -LL | let b = u.y; - | ^^^ value used here after move - -error[E0502]: cannot borrow `u` (via `u.x`) as immutable because it is also borrowed as mutable (via `*u.y`) - --> $DIR/union-borrow-move-parent-sibling.rs:41:13 - | -LL | let a = &mut *u.y; - | --------- mutable borrow occurs here (via `*u.y`) -LL | let b = &u.x; - | ^^^^ immutable borrow of `u.x` -- which overlaps with `*u.y` -- occurs here -LL | use_borrow(a); - | - mutable borrow later used here - | - = note: `u.x` is a field of the union `U`, so it overlaps the field `*u.y` - -error[E0382]: use of moved value: `u` - --> $DIR/union-borrow-move-parent-sibling.rs:48:13 - | -LL | let u = U { x: ((Vec::new(), Vec::new()), Vec::new()) }; - | - move occurs because `u` has type `U`, which does not implement the `Copy` trait -LL | let a = *u.y; - | ---- value moved here -LL | let b = u.x; - | ^^^ value used here after move - -error: aborting due to 6 previous errors - -Some errors occurred: E0382, E0502. -For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/union/union-borrow-move-parent-sibling.rs b/src/test/ui/union/union-borrow-move-parent-sibling.rs index 43abbd374f..1b6052f10b 100644 --- a/src/test/ui/union/union-borrow-move-parent-sibling.rs +++ b/src/test/ui/union/union-borrow-move-parent-sibling.rs @@ -12,27 +12,27 @@ fn use_borrow(_: &T) {} unsafe fn parent_sibling_borrow() { let mut u = U { x: ((Vec::new(), Vec::new()), Vec::new()) }; let a = &mut u.x.0; - let b = &u.y; //~ ERROR cannot borrow `u.y` + let b = &u.y; //~ ERROR cannot borrow `u` (via `u.y`) use_borrow(a); } unsafe fn parent_sibling_move() { let u = U { x: ((Vec::new(), Vec::new()), Vec::new()) }; let a = u.x.0; - let b = u.y; //~ ERROR use of moved value: `u.y` + let b = u.y; //~ ERROR use of moved value: `u` } unsafe fn grandparent_sibling_borrow() { let mut u = U { x: ((Vec::new(), Vec::new()), Vec::new()) }; let a = &mut (u.x.0).0; - let b = &u.y; //~ ERROR cannot borrow `u.y` + let b = &u.y; //~ ERROR cannot borrow `u` (via `u.y`) use_borrow(a); } unsafe fn grandparent_sibling_move() { let u = U { x: ((Vec::new(), Vec::new()), Vec::new()) }; let a = (u.x.0).0; - let b = u.y; //~ ERROR use of moved value: `u.y` + let b = u.y; //~ ERROR use of moved value: `u` } unsafe fn deref_sibling_borrow() { @@ -45,7 +45,7 @@ unsafe fn deref_sibling_borrow() { unsafe fn deref_sibling_move() { let u = U { x: ((Vec::new(), Vec::new()), Vec::new()) }; let a = *u.y; - let b = u.x; //~ ERROR use of moved value: `u.x` + let b = u.x; //~ ERROR use of moved value: `u` } diff --git a/src/test/ui/union/union-borrow-move-parent-sibling.stderr b/src/test/ui/union/union-borrow-move-parent-sibling.stderr index c1c6932e1e..2f4c921ea0 100644 --- a/src/test/ui/union/union-borrow-move-parent-sibling.stderr +++ b/src/test/ui/union/union-borrow-move-parent-sibling.stderr @@ -1,67 +1,70 @@ -error[E0502]: cannot borrow `u.y` as immutable because `u.x.0` is also borrowed as mutable - --> $DIR/union-borrow-move-parent-sibling.rs:15:14 +error[E0502]: cannot borrow `u` (via `u.y`) as immutable because it is also borrowed as mutable (via `u.x.0`) + --> $DIR/union-borrow-move-parent-sibling.rs:15:13 | LL | let a = &mut u.x.0; - | ----- mutable borrow occurs here + | ---------- mutable borrow occurs here (via `u.x.0`) LL | let b = &u.y; - | ^^^ immutable borrow occurs here + | ^^^^ immutable borrow of `u.y` -- which overlaps with `u.x.0` -- occurs here LL | use_borrow(a); -LL | } - | - mutable borrow ends here + | - mutable borrow later used here + | + = note: `u.y` is a field of the union `U`, so it overlaps the field `u.x.0` -error[E0382]: use of moved value: `u.y` - --> $DIR/union-borrow-move-parent-sibling.rs:22:9 +error[E0382]: use of moved value: `u` + --> $DIR/union-borrow-move-parent-sibling.rs:22:13 | +LL | let u = U { x: ((Vec::new(), Vec::new()), Vec::new()) }; + | - move occurs because `u` has type `U`, which does not implement the `Copy` trait LL | let a = u.x.0; - | - value moved here + | ----- value moved here LL | let b = u.y; - | ^ value used here after move - | - = note: move occurs because `u.y` has type `[type error]`, which does not implement the `Copy` trait + | ^^^ value used here after move -error[E0502]: cannot borrow `u.y` as immutable because `u.x.0.0` is also borrowed as mutable - --> $DIR/union-borrow-move-parent-sibling.rs:28:14 +error[E0502]: cannot borrow `u` (via `u.y`) as immutable because it is also borrowed as mutable (via `u.x.0.0`) + --> $DIR/union-borrow-move-parent-sibling.rs:28:13 | LL | let a = &mut (u.x.0).0; - | --------- mutable borrow occurs here + | -------------- mutable borrow occurs here (via `u.x.0.0`) LL | let b = &u.y; - | ^^^ immutable borrow occurs here + | ^^^^ immutable borrow of `u.y` -- which overlaps with `u.x.0.0` -- occurs here LL | use_borrow(a); -LL | } - | - mutable borrow ends here + | - mutable borrow later used here + | + = note: `u.y` is a field of the union `U`, so it overlaps the field `u.x.0.0` -error[E0382]: use of moved value: `u.y` - --> $DIR/union-borrow-move-parent-sibling.rs:35:9 +error[E0382]: use of moved value: `u` + --> $DIR/union-borrow-move-parent-sibling.rs:35:13 | +LL | let u = U { x: ((Vec::new(), Vec::new()), Vec::new()) }; + | - move occurs because `u` has type `U`, which does not implement the `Copy` trait LL | let a = (u.x.0).0; - | - value moved here + | --------- value moved here LL | let b = u.y; - | ^ value used here after move - | - = note: move occurs because `u.y` has type `[type error]`, which does not implement the `Copy` trait + | ^^^ value used here after move -error[E0502]: cannot borrow `u` (via `u.x`) as immutable because `u` is also borrowed as mutable (via `*u.y`) - --> $DIR/union-borrow-move-parent-sibling.rs:41:14 +error[E0502]: cannot borrow `u` (via `u.x`) as immutable because it is also borrowed as mutable (via `*u.y`) + --> $DIR/union-borrow-move-parent-sibling.rs:41:13 | LL | let a = &mut *u.y; - | ---- mutable borrow occurs here (via `*u.y`) + | --------- mutable borrow occurs here (via `*u.y`) LL | let b = &u.x; - | ^^^ immutable borrow of `u.x` -- which overlaps with `*u.y` -- occurs here + | ^^^^ immutable borrow of `u.x` -- which overlaps with `*u.y` -- occurs here LL | use_borrow(a); -LL | } - | - mutable borrow ends here + | - mutable borrow later used here + | + = note: `u.x` is a field of the union `U`, so it overlaps the field `*u.y` -error[E0382]: use of moved value: `u.x` - --> $DIR/union-borrow-move-parent-sibling.rs:48:9 +error[E0382]: use of moved value: `u` + --> $DIR/union-borrow-move-parent-sibling.rs:48:13 | +LL | let u = U { x: ((Vec::new(), Vec::new()), Vec::new()) }; + | - move occurs because `u` has type `U`, which does not implement the `Copy` trait LL | let a = *u.y; - | - value moved here + | ---- value moved here LL | let b = u.x; - | ^ value used here after move - | - = note: move occurs because `u.x` has type `[type error]`, which does not implement the `Copy` trait + | ^^^ value used here after move error: aborting due to 6 previous errors -Some errors occurred: E0382, E0502. +Some errors have detailed explanations: E0382, E0502. For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/union/union-derive-clone.stderr b/src/test/ui/union/union-derive-clone.stderr index 7421bb73ec..37a0093784 100644 --- a/src/test/ui/union/union-derive-clone.stderr +++ b/src/test/ui/union/union-derive-clone.stderr @@ -23,5 +23,5 @@ LL | let w = u.clone(); error: aborting due to 2 previous errors -Some errors occurred: E0277, E0599. +Some errors have detailed explanations: E0277, E0599. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/union/union-fields-2.stderr b/src/test/ui/union/union-fields-2.stderr index b4d6ed9b02..68cb66d89d 100644 --- a/src/test/ui/union/union-fields-2.stderr +++ b/src/test/ui/union/union-fields-2.stderr @@ -80,5 +80,5 @@ LL | let U { a, .. } = u; error: aborting due to 13 previous errors -Some errors occurred: E0026, E0436, E0560. +Some errors have detailed explanations: E0026, E0436, E0560. For more information about an error, try `rustc --explain E0026`. diff --git a/src/test/ui/union/union-suggest-field.stderr b/src/test/ui/union/union-suggest-field.stderr index c737bc29d9..5050e4a986 100644 --- a/src/test/ui/union/union-suggest-field.stderr +++ b/src/test/ui/union/union-suggest-field.stderr @@ -18,5 +18,5 @@ LL | let y = u.calculate; error: aborting due to 3 previous errors -Some errors occurred: E0560, E0609, E0615. +Some errors have detailed explanations: E0560, E0609, E0615. For more information about an error, try `rustc --explain E0560`. diff --git a/src/test/ui/unknown-lint-tool-name.stderr b/src/test/ui/unknown-lint-tool-name.stderr index a127af633d..dd3070bbcb 100644 --- a/src/test/ui/unknown-lint-tool-name.stderr +++ b/src/test/ui/unknown-lint-tool-name.stderr @@ -12,4 +12,3 @@ LL | #[allow(foo::bar)] error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0710`. diff --git a/src/test/ui/unnecessary-extern-crate.rs b/src/test/ui/unnecessary-extern-crate.rs index e25b99bcb6..67eaaf4b6c 100644 --- a/src/test/ui/unnecessary-extern-crate.rs +++ b/src/test/ui/unnecessary-extern-crate.rs @@ -1,7 +1,7 @@ // edition:2018 #![deny(unused_extern_crates)] -#![feature(alloc, test, rustc_private, crate_visibility_modifier)] +#![feature(test, rustc_private, crate_visibility_modifier)] extern crate libc; //~^ ERROR unused extern crate diff --git a/src/test/ui/unop-move-semantics.nll.stderr b/src/test/ui/unop-move-semantics.nll.stderr deleted file mode 100644 index c11445c8ad..0000000000 --- a/src/test/ui/unop-move-semantics.nll.stderr +++ /dev/null @@ -1,52 +0,0 @@ -error[E0382]: borrow of moved value: `x` - --> $DIR/unop-move-semantics.rs:8:5 - | -LL | fn move_then_borrow + Clone>(x: T) { - | - - move occurs because `x` has type `T`, which does not implement the `Copy` trait - | | - | consider adding a `Copy` constraint to this type argument -LL | !x; - | - value moved here -LL | -LL | x.clone(); - | ^ value borrowed here after move - -error[E0505]: cannot move out of `x` because it is borrowed - --> $DIR/unop-move-semantics.rs:15:6 - | -LL | let m = &x; - | -- borrow of `x` occurs here -... -LL | !x; - | ^ move out of `x` occurs here -... -LL | use_mut(n); use_imm(m); - | - borrow later used here - -error[E0505]: cannot move out of `y` because it is borrowed - --> $DIR/unop-move-semantics.rs:17:6 - | -LL | let n = &mut y; - | ------ borrow of `y` occurs here -... -LL | !y; - | ^ move out of `y` occurs here -LL | use_mut(n); use_imm(m); - | - borrow later used here - -error[E0507]: cannot move out of borrowed content - --> $DIR/unop-move-semantics.rs:24:6 - | -LL | !*m; - | ^^ cannot move out of borrowed content - -error[E0507]: cannot move out of borrowed content - --> $DIR/unop-move-semantics.rs:26:6 - | -LL | !*n; - | ^^ cannot move out of borrowed content - -error: aborting due to 5 previous errors - -Some errors occurred: E0382, E0505, E0507. -For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/unop-move-semantics.rs b/src/test/ui/unop-move-semantics.rs index 24bd89d4c3..80f737e6c4 100644 --- a/src/test/ui/unop-move-semantics.rs +++ b/src/test/ui/unop-move-semantics.rs @@ -5,7 +5,7 @@ use std::ops::Not; fn move_then_borrow + Clone>(x: T) { !x; - x.clone(); //~ ERROR: use of moved value + x.clone(); //~ ERROR: borrow of moved value } fn move_borrowed>(x: T, mut y: T) { diff --git a/src/test/ui/unop-move-semantics.stderr b/src/test/ui/unop-move-semantics.stderr index e2fb425492..5122d16bd9 100644 --- a/src/test/ui/unop-move-semantics.stderr +++ b/src/test/ui/unop-move-semantics.stderr @@ -1,31 +1,38 @@ -error[E0382]: use of moved value: `x` +error[E0382]: borrow of moved value: `x` --> $DIR/unop-move-semantics.rs:8:5 | +LL | fn move_then_borrow + Clone>(x: T) { + | - - move occurs because `x` has type `T`, which does not implement the `Copy` trait + | | + | consider adding a `Copy` constraint to this type argument LL | !x; | - value moved here LL | LL | x.clone(); - | ^ value used here after move - | - = note: move occurs because `x` has type `T`, which does not implement the `Copy` trait + | ^ value borrowed here after move error[E0505]: cannot move out of `x` because it is borrowed --> $DIR/unop-move-semantics.rs:15:6 | LL | let m = &x; - | - borrow of `x` occurs here + | -- borrow of `x` occurs here ... LL | !x; | ^ move out of `x` occurs here +... +LL | use_mut(n); use_imm(m); + | - borrow later used here error[E0505]: cannot move out of `y` because it is borrowed --> $DIR/unop-move-semantics.rs:17:6 | LL | let n = &mut y; - | - borrow of `y` occurs here + | ------ borrow of `y` occurs here ... LL | !y; | ^ move out of `y` occurs here +LL | use_mut(n); use_imm(m); + | - borrow later used here error[E0507]: cannot move out of borrowed content --> $DIR/unop-move-semantics.rs:24:6 @@ -41,5 +48,5 @@ LL | !*n; error: aborting due to 5 previous errors -Some errors occurred: E0382, E0505, E0507. +Some errors have detailed explanations: E0382, E0505, E0507. For more information about an error, try `rustc --explain E0382`. diff --git a/src/test/ui/unreachable/unreachable-arm.rs b/src/test/ui/unreachable/unreachable-arm.rs index 9f1a5a3958..64c3896851 100644 --- a/src/test/ui/unreachable/unreachable-arm.rs +++ b/src/test/ui/unreachable/unreachable-arm.rs @@ -12,4 +12,3 @@ fn main() { _ => { } } } - diff --git a/src/test/ui/unreachable/unreachable-loop-patterns.rs b/src/test/ui/unreachable/unreachable-loop-patterns.rs index 9794806375..56ab1a270a 100644 --- a/src/test/ui/unreachable/unreachable-loop-patterns.rs +++ b/src/test/ui/unreachable/unreachable-loop-patterns.rs @@ -19,5 +19,5 @@ impl Iterator for Void { fn main() { for _ in unimplemented!() as Void {} //~^ ERROR unreachable pattern + //~^^ ERROR unreachable pattern } - diff --git a/src/test/ui/unreachable/unreachable-loop-patterns.stderr b/src/test/ui/unreachable/unreachable-loop-patterns.stderr index d2f255c3e1..254d1178d1 100644 --- a/src/test/ui/unreachable/unreachable-loop-patterns.stderr +++ b/src/test/ui/unreachable/unreachable-loop-patterns.stderr @@ -10,5 +10,11 @@ note: lint level defined here LL | #![deny(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error +error: unreachable pattern + --> $DIR/unreachable-loop-patterns.rs:20:14 + | +LL | for _ in unimplemented!() as Void {} + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 2 previous errors diff --git a/src/test/ui/unreachable/unreachable-try-pattern.rs b/src/test/ui/unreachable/unreachable-try-pattern.rs index 1c1e01ff0e..6665c58e45 100644 --- a/src/test/ui/unreachable/unreachable-try-pattern.rs +++ b/src/test/ui/unreachable/unreachable-try-pattern.rs @@ -39,4 +39,3 @@ fn main() { let _ = qux(Ok(123)); let _ = vom(Ok(123)); } - diff --git a/src/test/ui/unsafe/ranged_ints2_const.stderr b/src/test/ui/unsafe/ranged_ints2_const.stderr index 7d3e141ba7..6a47c5b141 100644 --- a/src/test/ui/unsafe/ranged_ints2_const.stderr +++ b/src/test/ui/unsafe/ranged_ints2_const.stderr @@ -1,17 +1,19 @@ -error[E0723]: mutable references in const fn are unstable (see issue #57563) +error[E0723]: mutable references in const fn are unstable --> $DIR/ranged_ints2_const.rs:11:9 | LL | let y = &mut x.0; | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable -error[E0723]: mutable references in const fn are unstable (see issue #57563) +error[E0723]: mutable references in const fn are unstable --> $DIR/ranged_ints2_const.rs:18:9 | LL | let y = unsafe { &mut x.0 }; | ^ | + = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 = help: add #![feature(const_fn)] to the crate attributes to enable error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block @@ -24,5 +26,5 @@ LL | let y = &mut x.0; error: aborting due to 3 previous errors -Some errors occurred: E0133, E0723. +Some errors have detailed explanations: E0133, E0723. For more information about an error, try `rustc --explain E0133`. diff --git a/src/test/ui/unsafe/ranged_ints3_const.stderr b/src/test/ui/unsafe/ranged_ints3_const.stderr index ea15cd5e90..d2eb3bc536 100644 --- a/src/test/ui/unsafe/ranged_ints3_const.stderr +++ b/src/test/ui/unsafe/ranged_ints3_const.stderr @@ -20,5 +20,5 @@ LL | let y = &x.0; error: aborting due to 3 previous errors -Some errors occurred: E0133, E0492. +Some errors have detailed explanations: E0133, E0492. For more information about an error, try `rustc --explain E0133`. diff --git a/src/test/ui/unsafe/unsafe-const-fn.rs b/src/test/ui/unsafe/unsafe-const-fn.rs index cadfdd064e..3b4becf17a 100644 --- a/src/test/ui/unsafe/unsafe-const-fn.rs +++ b/src/test/ui/unsafe/unsafe-const-fn.rs @@ -10,4 +10,3 @@ const VAL: u32 = dummy(0xFFFF); fn main() { assert_eq!(VAL, 0xFFFF0000); } - diff --git a/src/test/ui/unsized-locals/borrow-after-move.nll.stderr b/src/test/ui/unsized-locals/borrow-after-move.nll.stderr deleted file mode 100644 index 010e182674..0000000000 --- a/src/test/ui/unsized-locals/borrow-after-move.nll.stderr +++ /dev/null @@ -1,57 +0,0 @@ -error[E0382]: borrow of moved value: `x` - --> $DIR/borrow-after-move.rs:20:24 - | -LL | let y = *x; - | -- value moved here -LL | drop_unsized(y); -LL | println!("{}", &x); - | ^^ value borrowed here after partial move - | - = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait - -error[E0382]: borrow of moved value: `y` - --> $DIR/borrow-after-move.rs:22:24 - | -LL | let y = *x; - | - move occurs because `y` has type `str`, which does not implement the `Copy` trait -LL | drop_unsized(y); - | - value moved here -... -LL | println!("{}", &y); - | ^^ value borrowed here after move - -error[E0382]: borrow of moved value: `x` - --> $DIR/borrow-after-move.rs:30:24 - | -LL | let y = *x; - | -- value moved here -LL | y.foo(); -LL | println!("{}", &x); - | ^^ value borrowed here after partial move - | - = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait - -error[E0382]: borrow of moved value: `y` - --> $DIR/borrow-after-move.rs:32:24 - | -LL | let y = *x; - | - move occurs because `y` has type `str`, which does not implement the `Copy` trait -LL | y.foo(); - | - value moved here -... -LL | println!("{}", &y); - | ^^ value borrowed here after move - -error[E0382]: borrow of moved value: `x` - --> $DIR/borrow-after-move.rs:39:24 - | -LL | x.foo(); - | - value moved here -LL | println!("{}", &x); - | ^^ value borrowed here after partial move - | - = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait - -error: aborting due to 5 previous errors - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/unsized-locals/borrow-after-move.rs b/src/test/ui/unsized-locals/borrow-after-move.rs index 587a2180c1..3299fdf3a9 100644 --- a/src/test/ui/unsized-locals/borrow-after-move.rs +++ b/src/test/ui/unsized-locals/borrow-after-move.rs @@ -18,9 +18,9 @@ fn main() { let y = *x; drop_unsized(y); println!("{}", &x); - //~^ERROR use of moved value + //~^ERROR borrow of moved value println!("{}", &y); - //~^ERROR use of moved value + //~^ERROR borrow of moved value } { @@ -28,15 +28,15 @@ fn main() { let y = *x; y.foo(); println!("{}", &x); - //~^ERROR use of moved value + //~^ERROR borrow of moved value println!("{}", &y); - //~^ERROR use of moved value + //~^ERROR borrow of moved value } { let x = "hello".to_owned().into_boxed_str(); x.foo(); println!("{}", &x); - //~^ERROR use of moved value + //~^ERROR borrow of moved value } } diff --git a/src/test/ui/unsized-locals/borrow-after-move.stderr b/src/test/ui/unsized-locals/borrow-after-move.stderr index 8eea01f25c..010e182674 100644 --- a/src/test/ui/unsized-locals/borrow-after-move.stderr +++ b/src/test/ui/unsized-locals/borrow-after-move.stderr @@ -1,54 +1,54 @@ -error[E0382]: use of moved value: `x` - --> $DIR/borrow-after-move.rs:20:25 +error[E0382]: borrow of moved value: `x` + --> $DIR/borrow-after-move.rs:20:24 | LL | let y = *x; - | - value moved here + | -- value moved here LL | drop_unsized(y); LL | println!("{}", &x); - | ^ value used here after move + | ^^ value borrowed here after partial move | = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait -error[E0382]: use of moved value: `y` - --> $DIR/borrow-after-move.rs:22:25 +error[E0382]: borrow of moved value: `y` + --> $DIR/borrow-after-move.rs:22:24 | +LL | let y = *x; + | - move occurs because `y` has type `str`, which does not implement the `Copy` trait LL | drop_unsized(y); | - value moved here ... LL | println!("{}", &y); - | ^ value used here after move - | - = note: move occurs because `y` has type `str`, which does not implement the `Copy` trait + | ^^ value borrowed here after move -error[E0382]: use of moved value: `x` - --> $DIR/borrow-after-move.rs:30:25 +error[E0382]: borrow of moved value: `x` + --> $DIR/borrow-after-move.rs:30:24 | LL | let y = *x; - | - value moved here + | -- value moved here LL | y.foo(); LL | println!("{}", &x); - | ^ value used here after move + | ^^ value borrowed here after partial move | = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait -error[E0382]: use of moved value: `y` - --> $DIR/borrow-after-move.rs:32:25 +error[E0382]: borrow of moved value: `y` + --> $DIR/borrow-after-move.rs:32:24 | +LL | let y = *x; + | - move occurs because `y` has type `str`, which does not implement the `Copy` trait LL | y.foo(); | - value moved here ... LL | println!("{}", &y); - | ^ value used here after move - | - = note: move occurs because `y` has type `str`, which does not implement the `Copy` trait + | ^^ value borrowed here after move -error[E0382]: use of moved value: `x` - --> $DIR/borrow-after-move.rs:39:25 +error[E0382]: borrow of moved value: `x` + --> $DIR/borrow-after-move.rs:39:24 | LL | x.foo(); | - value moved here LL | println!("{}", &x); - | ^ value used here after move + | ^^ value borrowed here after partial move | = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait diff --git a/src/test/ui/unsized-locals/double-move.nll.stderr b/src/test/ui/unsized-locals/double-move.nll.stderr deleted file mode 100644 index 47fa0d4a43..0000000000 --- a/src/test/ui/unsized-locals/double-move.nll.stderr +++ /dev/null @@ -1,63 +0,0 @@ -error[E0382]: use of moved value: `y` - --> $DIR/double-move.rs:20:22 - | -LL | let y = *x; - | - move occurs because `y` has type `str`, which does not implement the `Copy` trait -LL | drop_unsized(y); - | - value moved here -LL | drop_unsized(y); - | ^ value used here after move - -error[E0382]: use of moved value: `x` - --> $DIR/double-move.rs:26:22 - | -LL | let _y = *x; - | -- value moved here -LL | drop_unsized(x); - | ^ value used here after partial move - | - = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `*x` - --> $DIR/double-move.rs:32:18 - | -LL | let x = "hello".to_owned().into_boxed_str(); - | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait -LL | drop_unsized(x); - | - value moved here -LL | let _y = *x; - | ^^ value used here after move - -error[E0382]: use of moved value: `y` - --> $DIR/double-move.rs:39:9 - | -LL | let y = *x; - | - move occurs because `y` has type `str`, which does not implement the `Copy` trait -LL | y.foo(); - | - value moved here -LL | y.foo(); - | ^ value used here after move - -error[E0382]: use of moved value: `*x` - --> $DIR/double-move.rs:45:9 - | -LL | let _y = *x; - | -- value moved here -LL | x.foo(); - | ^ value used here after move - | - = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait - -error[E0382]: use of moved value: `*x` - --> $DIR/double-move.rs:51:18 - | -LL | x.foo(); - | - value moved here -LL | let _y = *x; - | ^^ value used here after move - | - = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait - -error: aborting due to 6 previous errors - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/unsized-locals/double-move.stderr b/src/test/ui/unsized-locals/double-move.stderr index e6573af5a3..47fa0d4a43 100644 --- a/src/test/ui/unsized-locals/double-move.stderr +++ b/src/test/ui/unsized-locals/double-move.stderr @@ -1,60 +1,60 @@ error[E0382]: use of moved value: `y` --> $DIR/double-move.rs:20:22 | +LL | let y = *x; + | - move occurs because `y` has type `str`, which does not implement the `Copy` trait LL | drop_unsized(y); | - value moved here LL | drop_unsized(y); | ^ value used here after move - | - = note: move occurs because `y` has type `str`, which does not implement the `Copy` trait error[E0382]: use of moved value: `x` --> $DIR/double-move.rs:26:22 | LL | let _y = *x; - | -- value moved here + | -- value moved here LL | drop_unsized(x); - | ^ value used here after move + | ^ value used here after partial move | = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait error[E0382]: use of moved value: `*x` - --> $DIR/double-move.rs:32:13 + --> $DIR/double-move.rs:32:18 | +LL | let x = "hello".to_owned().into_boxed_str(); + | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait LL | drop_unsized(x); | - value moved here LL | let _y = *x; - | ^^ value used here after move - | - = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | ^^ value used here after move error[E0382]: use of moved value: `y` --> $DIR/double-move.rs:39:9 | +LL | let y = *x; + | - move occurs because `y` has type `str`, which does not implement the `Copy` trait LL | y.foo(); | - value moved here LL | y.foo(); | ^ value used here after move - | - = note: move occurs because `y` has type `str`, which does not implement the `Copy` trait error[E0382]: use of moved value: `*x` --> $DIR/double-move.rs:45:9 | LL | let _y = *x; - | -- value moved here + | -- value moved here LL | x.foo(); | ^ value used here after move | = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait error[E0382]: use of moved value: `*x` - --> $DIR/double-move.rs:51:13 + --> $DIR/double-move.rs:51:18 | LL | x.foo(); | - value moved here LL | let _y = *x; - | ^^ value used here after move + | ^^ value used here after move | = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait diff --git a/src/test/ui/unsized-locals/unsized-exprs2.nll.stderr b/src/test/ui/unsized-locals/unsized-exprs2.nll.stderr deleted file mode 100644 index a94414ef56..0000000000 --- a/src/test/ui/unsized-locals/unsized-exprs2.nll.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0508]: cannot move out of type `[u8]`, a non-copy slice - --> $DIR/unsized-exprs2.rs:22:19 - | -LL | udrop::<[u8]>(foo()[..]); - | ^^^^^^^^^ cannot move out of here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0508`. diff --git a/src/test/ui/unsized-locals/unsized-exprs2.rs b/src/test/ui/unsized-locals/unsized-exprs2.rs index 3fb5a002e0..534439aa6c 100644 --- a/src/test/ui/unsized-locals/unsized-exprs2.rs +++ b/src/test/ui/unsized-locals/unsized-exprs2.rs @@ -20,5 +20,5 @@ impl std::ops::Add for A<[u8]> { fn main() { udrop::<[u8]>(foo()[..]); - //~^ERROR cannot move out of indexed content + //~^ERROR cannot move out of type `[u8]`, a non-copy slice } diff --git a/src/test/ui/unsized-locals/unsized-exprs2.stderr b/src/test/ui/unsized-locals/unsized-exprs2.stderr index d7cb4bffb4..a94414ef56 100644 --- a/src/test/ui/unsized-locals/unsized-exprs2.stderr +++ b/src/test/ui/unsized-locals/unsized-exprs2.stderr @@ -1,9 +1,9 @@ -error[E0507]: cannot move out of indexed content +error[E0508]: cannot move out of type `[u8]`, a non-copy slice --> $DIR/unsized-exprs2.rs:22:19 | LL | udrop::<[u8]>(foo()[..]); - | ^^^^^^^^^ cannot move out of indexed content + | ^^^^^^^^^ cannot move out of here error: aborting due to previous error -For more information about this error, try `rustc --explain E0507`. +For more information about this error, try `rustc --explain E0508`. diff --git a/src/test/ui/unsized-locals/unsized-index.rs b/src/test/ui/unsized-locals/unsized-index.rs new file mode 100644 index 0000000000..2e6bd82bda --- /dev/null +++ b/src/test/ui/unsized-locals/unsized-index.rs @@ -0,0 +1,23 @@ +// compile-pass + +// `std::ops::Index` has an `: ?Sized` bound on the `Idx` type param. This is +// an accidental left-over from the times when it `Index` was by-reference. +// Tightening the bound now could be a breaking change. Although no crater +// regression were observed (https://github.com/rust-lang/rust/pull/59527), +// let's be conservative and just add a test for this. +#![feature(unsized_locals)] + +use std::ops; + +pub struct A; + +impl ops::Index for A { + type Output = (); + fn index(&self, _: str) -> &Self::Output { panic!() } +} + +impl ops::IndexMut for A { + fn index_mut(&mut self, _: str) -> &mut Self::Output { panic!() } +} + +fn main() {} diff --git a/src/test/ui/unsized/unsized-enum2.rs b/src/test/ui/unsized/unsized-enum2.rs index 0fe4a3acfb..60bfb5cb64 100644 --- a/src/test/ui/unsized/unsized-enum2.rs +++ b/src/test/ui/unsized/unsized-enum2.rs @@ -72,4 +72,3 @@ enum E { fn main() { } - diff --git a/src/test/ui/unspecified-self-in-trait-ref.stderr b/src/test/ui/unspecified-self-in-trait-ref.stderr index f894cd36a4..06370cec90 100644 --- a/src/test/ui/unspecified-self-in-trait-ref.stderr +++ b/src/test/ui/unspecified-self-in-trait-ref.stderr @@ -32,5 +32,5 @@ LL | let e = Bar::::lol(); error: aborting due to 5 previous errors -Some errors occurred: E0393, E0599. +Some errors have detailed explanations: E0393, E0599. For more information about an error, try `rustc --explain E0393`. diff --git a/src/test/ui/use/issue-18986.stderr b/src/test/ui/use/issue-18986.stderr index 6c23178c70..14e1bb6240 100644 --- a/src/test/ui/use/issue-18986.stderr +++ b/src/test/ui/use/issue-18986.stderr @@ -6,4 +6,3 @@ LL | Trait { x: 42 } => () error: aborting due to previous error -For more information about this error, try `rustc --explain E0574`. diff --git a/src/test/ui/use/use-after-move-based-on-type.nll.stderr b/src/test/ui/use/use-after-move-based-on-type.nll.stderr deleted file mode 100644 index 520f88f55d..0000000000 --- a/src/test/ui/use/use-after-move-based-on-type.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: borrow of moved value: `x` - --> $DIR/use-after-move-based-on-type.rs:4:20 - | -LL | let x = "Hello!".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait -LL | let _y = x; - | - value moved here -LL | println!("{}", x); - | ^ value borrowed here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/use/use-after-move-based-on-type.rs b/src/test/ui/use/use-after-move-based-on-type.rs index fc8ea6f79e..ba7aa0345e 100644 --- a/src/test/ui/use/use-after-move-based-on-type.rs +++ b/src/test/ui/use/use-after-move-based-on-type.rs @@ -1,5 +1,5 @@ fn main() { let x = "Hello!".to_string(); let _y = x; - println!("{}", x); //~ ERROR use of moved value + println!("{}", x); //~ ERROR borrow of moved value } diff --git a/src/test/ui/use/use-after-move-based-on-type.stderr b/src/test/ui/use/use-after-move-based-on-type.stderr index b9e0aaf1f8..520f88f55d 100644 --- a/src/test/ui/use/use-after-move-based-on-type.stderr +++ b/src/test/ui/use/use-after-move-based-on-type.stderr @@ -1,12 +1,12 @@ -error[E0382]: use of moved value: `x` +error[E0382]: borrow of moved value: `x` --> $DIR/use-after-move-based-on-type.rs:4:20 | +LL | let x = "Hello!".to_string(); + | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait LL | let _y = x; - | -- value moved here + | - value moved here LL | println!("{}", x); - | ^ value used here after move - | - = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | ^ value borrowed here after move error: aborting due to previous error diff --git a/src/test/ui/use/use-after-move-implicity-coerced-object.nll.stderr b/src/test/ui/use/use-after-move-implicity-coerced-object.nll.stderr deleted file mode 100644 index e16bca3806..0000000000 --- a/src/test/ui/use/use-after-move-implicity-coerced-object.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0382]: borrow of moved value: `n` - --> $DIR/use-after-move-implicity-coerced-object.rs:28:13 - | -LL | let n: Box<_> = box Number { n: 42 }; - | - move occurs because `n` has type `std::boxed::Box`, which does not implement the `Copy` trait -LL | let mut l: Box<_> = box List { list: Vec::new() }; -LL | l.push(n); - | - value moved here -LL | let x = n.to_string(); - | ^ value borrowed here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/use/use-after-move-implicity-coerced-object.rs b/src/test/ui/use/use-after-move-implicity-coerced-object.rs index e435069166..2e465ee896 100644 --- a/src/test/ui/use/use-after-move-implicity-coerced-object.rs +++ b/src/test/ui/use/use-after-move-implicity-coerced-object.rs @@ -26,5 +26,5 @@ fn main() { let mut l: Box<_> = box List { list: Vec::new() }; l.push(n); let x = n.to_string(); - //~^ ERROR: use of moved value: `n` + //~^ ERROR: borrow of moved value: `n` } diff --git a/src/test/ui/use/use-after-move-implicity-coerced-object.stderr b/src/test/ui/use/use-after-move-implicity-coerced-object.stderr index babff9be25..e16bca3806 100644 --- a/src/test/ui/use/use-after-move-implicity-coerced-object.stderr +++ b/src/test/ui/use/use-after-move-implicity-coerced-object.stderr @@ -1,12 +1,13 @@ -error[E0382]: use of moved value: `n` +error[E0382]: borrow of moved value: `n` --> $DIR/use-after-move-implicity-coerced-object.rs:28:13 | +LL | let n: Box<_> = box Number { n: 42 }; + | - move occurs because `n` has type `std::boxed::Box`, which does not implement the `Copy` trait +LL | let mut l: Box<_> = box List { list: Vec::new() }; LL | l.push(n); | - value moved here LL | let x = n.to_string(); - | ^ value used here after move - | - = note: move occurs because `n` has type `std::boxed::Box`, which does not implement the `Copy` trait + | ^ value borrowed here after move error: aborting due to previous error diff --git a/src/test/ui/use/use-after-move-self-based-on-type.nll.stderr b/src/test/ui/use/use-after-move-self-based-on-type.nll.stderr deleted file mode 100644 index 9bf1175430..0000000000 --- a/src/test/ui/use/use-after-move-self-based-on-type.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: use of moved value: `self` - --> $DIR/use-after-move-self-based-on-type.rs:12:16 - | -LL | pub fn foo(self) -> isize { - | ---- move occurs because `self` has type `S`, which does not implement the `Copy` trait -LL | self.bar(); - | ---- value moved here -LL | return self.x; - | ^^^^^^ value used here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/use/use-after-move-self-based-on-type.rs b/src/test/ui/use/use-after-move-self-based-on-type.rs index 4d84ae9b27..9325834954 100644 --- a/src/test/ui/use/use-after-move-self-based-on-type.rs +++ b/src/test/ui/use/use-after-move-self-based-on-type.rs @@ -9,7 +9,7 @@ impl Drop for S { impl S { pub fn foo(self) -> isize { self.bar(); - return self.x; //~ ERROR use of moved value: `self.x` + return self.x; //~ ERROR use of moved value: `self` } pub fn bar(self) {} diff --git a/src/test/ui/use/use-after-move-self-based-on-type.stderr b/src/test/ui/use/use-after-move-self-based-on-type.stderr index d1d26069fd..9bf1175430 100644 --- a/src/test/ui/use/use-after-move-self-based-on-type.stderr +++ b/src/test/ui/use/use-after-move-self-based-on-type.stderr @@ -1,12 +1,12 @@ -error[E0382]: use of moved value: `self.x` +error[E0382]: use of moved value: `self` --> $DIR/use-after-move-self-based-on-type.rs:12:16 | +LL | pub fn foo(self) -> isize { + | ---- move occurs because `self` has type `S`, which does not implement the `Copy` trait LL | self.bar(); | ---- value moved here LL | return self.x; | ^^^^^^ value used here after move - | - = note: move occurs because `self` has type `S`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/use/use-after-move-self.nll.stderr b/src/test/ui/use/use-after-move-self.nll.stderr deleted file mode 100644 index 3be0a65550..0000000000 --- a/src/test/ui/use/use-after-move-self.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: use of moved value: `self` - --> $DIR/use-after-move-self.rs:10:16 - | -LL | pub fn foo(self) -> isize { - | ---- move occurs because `self` has type `S`, which does not implement the `Copy` trait -LL | self.bar(); - | ---- value moved here -LL | return *self.x; - | ^^^^^^^ value used here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/use/use-after-move-self.rs b/src/test/ui/use/use-after-move-self.rs index 1337d61a6d..a6f6c45573 100644 --- a/src/test/ui/use/use-after-move-self.rs +++ b/src/test/ui/use/use-after-move-self.rs @@ -7,7 +7,7 @@ struct S { impl S { pub fn foo(self) -> isize { self.bar(); - return *self.x; //~ ERROR use of moved value: `*self.x` + return *self.x; //~ ERROR use of moved value: `self` } pub fn bar(self) {} diff --git a/src/test/ui/use/use-after-move-self.stderr b/src/test/ui/use/use-after-move-self.stderr index 2c4bd20268..3be0a65550 100644 --- a/src/test/ui/use/use-after-move-self.stderr +++ b/src/test/ui/use/use-after-move-self.stderr @@ -1,12 +1,12 @@ -error[E0382]: use of moved value: `*self.x` +error[E0382]: use of moved value: `self` --> $DIR/use-after-move-self.rs:10:16 | +LL | pub fn foo(self) -> isize { + | ---- move occurs because `self` has type `S`, which does not implement the `Copy` trait LL | self.bar(); | ---- value moved here LL | return *self.x; | ^^^^^^^ value used here after move - | - = note: move occurs because `self` has type `S`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/use/use-associated-const.rs b/src/test/ui/use/use-associated-const.rs new file mode 100644 index 0000000000..714fbdabb8 --- /dev/null +++ b/src/test/ui/use/use-associated-const.rs @@ -0,0 +1,13 @@ +#![allow(unused_imports)] + +pub mod foo { + pub struct Foo; + + impl Foo { + pub const BAR: i32 = 0; + } +} + +use foo::Foo::BAR; //~ ERROR unresolved import `foo::Foo` + +fn main() {} diff --git a/src/test/ui/use/use-associated-const.stderr b/src/test/ui/use/use-associated-const.stderr new file mode 100644 index 0000000000..4bc0d7e61c --- /dev/null +++ b/src/test/ui/use/use-associated-const.stderr @@ -0,0 +1,9 @@ +error[E0432]: unresolved import `foo::Foo` + --> $DIR/use-associated-const.rs:11:10 + | +LL | use foo::Foo::BAR; + | ^^^ `Foo` is a struct, not a module + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0432`. diff --git a/src/test/ui/use/use-from-trait-xc.stderr b/src/test/ui/use/use-from-trait-xc.stderr index 97dc603f9e..f7438cce22 100644 --- a/src/test/ui/use/use-from-trait-xc.stderr +++ b/src/test/ui/use/use-from-trait-xc.stderr @@ -20,19 +20,19 @@ error[E0432]: unresolved import `use_from_trait_xc::Foo` --> $DIR/use-from-trait-xc.rs:14:24 | LL | use use_from_trait_xc::Foo::new; - | ^^^ not a module `Foo` + | ^^^ `Foo` is a struct, not a module error[E0432]: unresolved import `use_from_trait_xc::Foo` --> $DIR/use-from-trait-xc.rs:17:24 | LL | use use_from_trait_xc::Foo::C; - | ^^^ not a module `Foo` + | ^^^ `Foo` is a struct, not a module error[E0432]: unresolved import `use_from_trait_xc::Bar` --> $DIR/use-from-trait-xc.rs:20:24 | LL | use use_from_trait_xc::Bar::new as bnew; - | ^^^ not a module `Bar` + | ^^^ `Bar` is a struct, not a module error[E0432]: unresolved import `use_from_trait_xc::Baz::new` --> $DIR/use-from-trait-xc.rs:23:5 @@ -54,5 +54,5 @@ LL | use use_from_trait_xc::Foo::C; error: aborting due to 9 previous errors -Some errors occurred: E0253, E0432, E0603. +Some errors have detailed explanations: E0253, E0432, E0603. For more information about an error, try `rustc --explain E0253`. diff --git a/src/test/ui/use/use-from-trait.rs b/src/test/ui/use/use-from-trait.rs index fe578723bd..eab4bb6e3b 100644 --- a/src/test/ui/use/use-from-trait.rs +++ b/src/test/ui/use/use-from-trait.rs @@ -1,17 +1,10 @@ -use Trait::foo; -//~^ ERROR `foo` is not directly importable -use Trait::Assoc; -//~^ ERROR `Assoc` is not directly importable -use Trait::C; -//~^ ERROR `C` is not directly importable +use Trait::foo; //~ ERROR `foo` is not directly importable +use Trait::Assoc; //~ ERROR `Assoc` is not directly importable +use Trait::C; //~ ERROR `C` is not directly importable -use Foo::new; -//~^ ERROR unresolved import `Foo` [E0432] -//~| not a module `Foo` +use Foo::new; //~ ERROR unresolved import `Foo` [E0432] -use Foo::C2; -//~^ ERROR unresolved import `Foo` [E0432] -//~| not a module `Foo` +use Foo::C2; //~ ERROR unresolved import `Foo` [E0432] pub trait Trait { fn foo(); diff --git a/src/test/ui/use/use-from-trait.stderr b/src/test/ui/use/use-from-trait.stderr index 9e138422a2..a5b0e356b3 100644 --- a/src/test/ui/use/use-from-trait.stderr +++ b/src/test/ui/use/use-from-trait.stderr @@ -5,30 +5,30 @@ LL | use Trait::foo; | ^^^^^^^^^^ cannot be imported directly error[E0253]: `Assoc` is not directly importable - --> $DIR/use-from-trait.rs:3:5 + --> $DIR/use-from-trait.rs:2:5 | LL | use Trait::Assoc; | ^^^^^^^^^^^^ cannot be imported directly error[E0253]: `C` is not directly importable - --> $DIR/use-from-trait.rs:5:5 + --> $DIR/use-from-trait.rs:3:5 | LL | use Trait::C; | ^^^^^^^^ cannot be imported directly error[E0432]: unresolved import `Foo` - --> $DIR/use-from-trait.rs:8:5 + --> $DIR/use-from-trait.rs:5:5 | LL | use Foo::new; - | ^^^ not a module `Foo` + | ^^^ `Foo` is a struct, not a module error[E0432]: unresolved import `Foo` - --> $DIR/use-from-trait.rs:12:5 + --> $DIR/use-from-trait.rs:7:5 | LL | use Foo::C2; - | ^^^ not a module `Foo` + | ^^^ `Foo` is a struct, not a module error: aborting due to 5 previous errors -Some errors occurred: E0253, E0432. +Some errors have detailed explanations: E0253, E0432. For more information about an error, try `rustc --explain E0253`. diff --git a/src/test/ui/use/use-keyword.stderr b/src/test/ui/use/use-keyword.stderr index 1cb30fa487..62b6a77fbf 100644 --- a/src/test/ui/use/use-keyword.stderr +++ b/src/test/ui/use/use-keyword.stderr @@ -18,5 +18,5 @@ LL | use super::{self as C}; error: aborting due to 3 previous errors -Some errors occurred: E0429, E0432. +Some errors have detailed explanations: E0429, E0432. For more information about an error, try `rustc --explain E0429`. diff --git a/src/test/ui/use/use-mod.stderr b/src/test/ui/use/use-mod.stderr index c23ab34eae..0cae5eb14a 100644 --- a/src/test/ui/use/use-mod.stderr +++ b/src/test/ui/use/use-mod.stderr @@ -29,5 +29,5 @@ LL | self error: aborting due to 3 previous errors -Some errors occurred: E0252, E0430, E0431. +Some errors have detailed explanations: E0252, E0430, E0431. For more information about an error, try `rustc --explain E0252`. diff --git a/src/test/ui/use/use-mod/use-mod-4.stderr b/src/test/ui/use/use-mod/use-mod-4.stderr index 99f5c35218..df9898844d 100644 --- a/src/test/ui/use/use-mod/use-mod-4.stderr +++ b/src/test/ui/use/use-mod/use-mod-4.stderr @@ -18,5 +18,5 @@ LL | use foo::self; error: aborting due to 3 previous errors -Some errors occurred: E0429, E0432. +Some errors have detailed explanations: E0429, E0432. For more information about an error, try `rustc --explain E0429`. diff --git a/src/test/ui/use/use-self-type.stderr b/src/test/ui/use/use-self-type.stderr index 38c09c2be7..0dd0e04267 100644 --- a/src/test/ui/use/use-self-type.stderr +++ b/src/test/ui/use/use-self-type.stderr @@ -12,5 +12,5 @@ LL | use Self::f; error: aborting due to 2 previous errors -Some errors occurred: E0432, E0433. +Some errors have detailed explanations: E0432, E0433. For more information about an error, try `rustc --explain E0432`. diff --git a/src/test/ui/use/use-super-global-path.stderr b/src/test/ui/use/use-super-global-path.stderr index a513d37738..72b3deaaec 100644 --- a/src/test/ui/use/use-super-global-path.stderr +++ b/src/test/ui/use/use-super-global-path.stderr @@ -22,5 +22,5 @@ LL | use main; error: aborting due to 3 previous errors -Some errors occurred: E0425, E0433. +Some errors have detailed explanations: E0425, E0433. For more information about an error, try `rustc --explain E0425`. diff --git a/src/test/ui/utf8_idents.stderr b/src/test/ui/utf8_idents.stderr index 330ba3e0a8..b65848cc58 100644 --- a/src/test/ui/utf8_idents.stderr +++ b/src/test/ui/utf8_idents.stderr @@ -1,33 +1,37 @@ -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/utf8_idents.rs:2:5 | LL | 'β, | ^^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/utf8_idents.rs:3:5 | LL | γ | ^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/utf8_idents.rs:8:5 | LL | δ: usize | ^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable -error[E0658]: non-ascii idents are not fully supported. (see issue #55467) +error[E0658]: non-ascii idents are not fully supported --> $DIR/utf8_idents.rs:12:9 | LL | let α = 0.00001f64; | ^ | + = note: for more information, see https://github.com/rust-lang/rust/issues/55467 = help: add #![feature(non_ascii_idents)] to the crate attributes to enable warning: type parameter `γ` should have an upper camel case name diff --git a/src/test/ui/variance/variance-associated-types.stderr b/src/test/ui/variance/variance-associated-types.stderr index c0231aead4..b9aa9695f6 100644 --- a/src/test/ui/variance/variance-associated-types.stderr +++ b/src/test/ui/variance/variance-associated-types.stderr @@ -16,4 +16,3 @@ LL | | } error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0208`. diff --git a/src/test/ui/variance/variance-btree-invariant-types.nll.stderr b/src/test/ui/variance/variance-btree-invariant-types.nll.stderr new file mode 100644 index 0000000000..344437f74e --- /dev/null +++ b/src/test/ui/variance/variance-btree-invariant-types.nll.stderr @@ -0,0 +1,106 @@ +error: lifetime may not live long enough + --> $DIR/variance-btree-invariant-types.rs:4:5 + | +LL | fn iter_cov_key<'a, 'new>(v: IterMut<'a, &'static (), ()>) -> IterMut<'a, &'new (), ()> { + | ---- lifetime `'new` defined here +LL | v + | ^ returning this value requires that `'new` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/variance-btree-invariant-types.rs:7:5 + | +LL | fn iter_cov_val<'a, 'new>(v: IterMut<'a, (), &'static ()>) -> IterMut<'a, (), &'new ()> { + | ---- lifetime `'new` defined here +LL | v + | ^ returning this value requires that `'new` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/variance-btree-invariant-types.rs:10:5 + | +LL | fn iter_contra_key<'a, 'new>(v: IterMut<'a, &'new (), ()>) -> IterMut<'a, &'static (), ()> { + | ---- lifetime `'new` defined here +LL | v + | ^ returning this value requires that `'new` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/variance-btree-invariant-types.rs:13:5 + | +LL | fn iter_contra_val<'a, 'new>(v: IterMut<'a, (), &'new ()>) -> IterMut<'a, (), &'static ()> { + | ---- lifetime `'new` defined here +LL | v + | ^ returning this value requires that `'new` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/variance-btree-invariant-types.rs:18:5 + | +LL | fn occ_cov_key<'a, 'new>(v: OccupiedEntry<'a, &'static (), ()>) + | ---- lifetime `'new` defined here +LL | -> OccupiedEntry<'a, &'new (), ()> { +LL | v + | ^ returning this value requires that `'new` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/variance-btree-invariant-types.rs:22:5 + | +LL | fn occ_cov_val<'a, 'new>(v: OccupiedEntry<'a, (), &'static ()>) + | ---- lifetime `'new` defined here +LL | -> OccupiedEntry<'a, (), &'new ()> { +LL | v + | ^ returning this value requires that `'new` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/variance-btree-invariant-types.rs:26:5 + | +LL | fn occ_contra_key<'a, 'new>(v: OccupiedEntry<'a, &'new (), ()>) + | ---- lifetime `'new` defined here +LL | -> OccupiedEntry<'a, &'static (), ()> { +LL | v + | ^ returning this value requires that `'new` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/variance-btree-invariant-types.rs:30:5 + | +LL | fn occ_contra_val<'a, 'new>(v: OccupiedEntry<'a, (), &'new ()>) + | ---- lifetime `'new` defined here +LL | -> OccupiedEntry<'a, (), &'static ()> { +LL | v + | ^ returning this value requires that `'new` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/variance-btree-invariant-types.rs:35:5 + | +LL | fn vac_cov_key<'a, 'new>(v: VacantEntry<'a, &'static (), ()>) + | ---- lifetime `'new` defined here +LL | -> VacantEntry<'a, &'new (), ()> { +LL | v + | ^ returning this value requires that `'new` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/variance-btree-invariant-types.rs:39:5 + | +LL | fn vac_cov_val<'a, 'new>(v: VacantEntry<'a, (), &'static ()>) + | ---- lifetime `'new` defined here +LL | -> VacantEntry<'a, (), &'new ()> { +LL | v + | ^ returning this value requires that `'new` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/variance-btree-invariant-types.rs:43:5 + | +LL | fn vac_contra_key<'a, 'new>(v: VacantEntry<'a, &'new (), ()>) + | ---- lifetime `'new` defined here +LL | -> VacantEntry<'a, &'static (), ()> { +LL | v + | ^ returning this value requires that `'new` must outlive `'static` + +error: lifetime may not live long enough + --> $DIR/variance-btree-invariant-types.rs:47:5 + | +LL | fn vac_contra_val<'a, 'new>(v: VacantEntry<'a, (), &'new ()>) + | ---- lifetime `'new` defined here +LL | -> VacantEntry<'a, (), &'static ()> { +LL | v + | ^ returning this value requires that `'new` must outlive `'static` + +error: aborting due to 12 previous errors + diff --git a/src/test/ui/variance/variance-cell-is-invariant.nll.stderr b/src/test/ui/variance/variance-cell-is-invariant.nll.stderr new file mode 100644 index 0000000000..a3ae5320c9 --- /dev/null +++ b/src/test/ui/variance/variance-cell-is-invariant.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/variance-cell-is-invariant.rs:14:12 + | +LL | fn use_<'short,'long>(c: Foo<'short>, + | ------ ----- lifetime `'long` defined here + | | + | lifetime `'short` defined here +... +LL | let _: Foo<'long> = c; + | ^^^^^^^^^^ type annotation requires that `'short` must outlive `'long` + +error: aborting due to previous error + diff --git a/src/test/ui/variance/variance-cell-is-invariant.stderr b/src/test/ui/variance/variance-cell-is-invariant.stderr index 6fcd6460fe..91f6d7659e 100644 --- a/src/test/ui/variance/variance-cell-is-invariant.stderr +++ b/src/test/ui/variance/variance-cell-is-invariant.stderr @@ -12,4 +12,3 @@ LL | let _: Foo<'long> = c; error: aborting due to previous error -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/variance/variance-contravariant-arg-object.nll.stderr b/src/test/ui/variance/variance-contravariant-arg-object.nll.stderr new file mode 100644 index 0000000000..8b5ecbe56f --- /dev/null +++ b/src/test/ui/variance/variance-contravariant-arg-object.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/variance-contravariant-arg-object.rs:14:5 + | +LL | fn get_min_from_max<'min, 'max>(v: Box>) + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | v + | ^ returning this value requires that `'min` must outlive `'max` + +error: lifetime may not live long enough + --> $DIR/variance-contravariant-arg-object.rs:22:5 + | +LL | fn get_max_from_min<'min, 'max, G>(v: Box>) + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | v + | ^ returning this value requires that `'min` must outlive `'max` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/variance/variance-contravariant-arg-trait-match.nll.stderr b/src/test/ui/variance/variance-contravariant-arg-trait-match.nll.stderr new file mode 100644 index 0000000000..dbd75cb52f --- /dev/null +++ b/src/test/ui/variance/variance-contravariant-arg-trait-match.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/variance-contravariant-arg-trait-match.rs:13:5 + | +LL | fn get_min_from_max<'min, 'max, G>() + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | impls_get::() + | ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max` + +error: lifetime may not live long enough + --> $DIR/variance-contravariant-arg-trait-match.rs:21:5 + | +LL | fn get_max_from_min<'min, 'max, G>() + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | impls_get::() + | ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/variance/variance-contravariant-self-trait-match.nll.stderr b/src/test/ui/variance/variance-contravariant-self-trait-match.nll.stderr new file mode 100644 index 0000000000..9212cf24be --- /dev/null +++ b/src/test/ui/variance/variance-contravariant-self-trait-match.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/variance-contravariant-self-trait-match.rs:13:5 + | +LL | fn get_min_from_max<'min, 'max, G>() + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | impls_get::<&'min G>(); + | ^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max` + +error: lifetime may not live long enough + --> $DIR/variance-contravariant-self-trait-match.rs:22:5 + | +LL | fn get_max_from_min<'min, 'max, G>() + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | impls_get::<&'max G>(); + | ^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/variance/variance-covariant-arg-object.nll.stderr b/src/test/ui/variance/variance-covariant-arg-object.nll.stderr new file mode 100644 index 0000000000..acf9f2e060 --- /dev/null +++ b/src/test/ui/variance/variance-covariant-arg-object.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/variance-covariant-arg-object.rs:15:5 + | +LL | fn get_min_from_max<'min, 'max>(v: Box>) + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | v + | ^ returning this value requires that `'min` must outlive `'max` + +error: lifetime may not live long enough + --> $DIR/variance-covariant-arg-object.rs:22:5 + | +LL | fn get_max_from_min<'min, 'max, G>(v: Box>) + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | v + | ^ returning this value requires that `'min` must outlive `'max` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/variance/variance-covariant-arg-trait-match.nll.stderr b/src/test/ui/variance/variance-covariant-arg-trait-match.nll.stderr new file mode 100644 index 0000000000..33589121c4 --- /dev/null +++ b/src/test/ui/variance/variance-covariant-arg-trait-match.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/variance-covariant-arg-trait-match.rs:14:5 + | +LL | fn get_min_from_max<'min, 'max, G>() + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | impls_get::() + | ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max` + +error: lifetime may not live long enough + --> $DIR/variance-covariant-arg-trait-match.rs:20:5 + | +LL | fn get_max_from_min<'min, 'max, G>() + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | impls_get::() + | ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/variance/variance-covariant-self-trait-match.nll.stderr b/src/test/ui/variance/variance-covariant-self-trait-match.nll.stderr new file mode 100644 index 0000000000..6b2413d68b --- /dev/null +++ b/src/test/ui/variance/variance-covariant-self-trait-match.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/variance-covariant-self-trait-match.rs:14:5 + | +LL | fn get_min_from_max<'min, 'max, G>() + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | impls_get::<&'min G>(); + | ^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max` + +error: lifetime may not live long enough + --> $DIR/variance-covariant-self-trait-match.rs:20:5 + | +LL | fn get_max_from_min<'min, 'max, G>() + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | impls_get::<&'max G>(); + | ^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/variance/variance-invariant-arg-object.nll.stderr b/src/test/ui/variance/variance-invariant-arg-object.nll.stderr new file mode 100644 index 0000000000..3c1ee7fc70 --- /dev/null +++ b/src/test/ui/variance/variance-invariant-arg-object.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/variance-invariant-arg-object.rs:11:5 + | +LL | fn get_min_from_max<'min, 'max>(v: Box>) + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | v + | ^ returning this value requires that `'min` must outlive `'max` + +error: lifetime may not live long enough + --> $DIR/variance-invariant-arg-object.rs:18:5 + | +LL | fn get_max_from_min<'min, 'max, G>(v: Box>) + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | v + | ^ returning this value requires that `'min` must outlive `'max` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/variance/variance-invariant-arg-trait-match.nll.stderr b/src/test/ui/variance/variance-invariant-arg-trait-match.nll.stderr new file mode 100644 index 0000000000..2ab44c54c7 --- /dev/null +++ b/src/test/ui/variance/variance-invariant-arg-trait-match.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/variance-invariant-arg-trait-match.rs:10:5 + | +LL | fn get_min_from_max<'min, 'max, G>() + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | impls_get::() + | ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max` + +error: lifetime may not live long enough + --> $DIR/variance-invariant-arg-trait-match.rs:16:5 + | +LL | fn get_max_from_min<'min, 'max, G>() + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | impls_get::() + | ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/variance/variance-invariant-self-trait-match.nll.stderr b/src/test/ui/variance/variance-invariant-self-trait-match.nll.stderr new file mode 100644 index 0000000000..7b7c42fea8 --- /dev/null +++ b/src/test/ui/variance/variance-invariant-self-trait-match.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/variance-invariant-self-trait-match.rs:10:5 + | +LL | fn get_min_from_max<'min, 'max, G>() + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | impls_get::<&'min G>(); + | ^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max` + +error: lifetime may not live long enough + --> $DIR/variance-invariant-self-trait-match.rs:16:5 + | +LL | fn get_max_from_min<'min, 'max, G>() + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | impls_get::<&'max G>(); + | ^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/variance/variance-issue-20533.nll.stderr b/src/test/ui/variance/variance-issue-20533.nll.stderr deleted file mode 100644 index 008e2a002b..0000000000 --- a/src/test/ui/variance/variance-issue-20533.nll.stderr +++ /dev/null @@ -1,33 +0,0 @@ -error[E0505]: cannot move out of `a` because it is borrowed - --> $DIR/variance-issue-20533.rs:28:14 - | -LL | let x = foo(&a); - | -- borrow of `a` occurs here -LL | drop(a); - | ^ move out of `a` occurs here -LL | drop(x); - | - borrow later used here - -error[E0505]: cannot move out of `a` because it is borrowed - --> $DIR/variance-issue-20533.rs:34:14 - | -LL | let x = bar(&a); - | -- borrow of `a` occurs here -LL | drop(a); - | ^ move out of `a` occurs here -LL | drop(x); - | - borrow later used here - -error[E0505]: cannot move out of `a` because it is borrowed - --> $DIR/variance-issue-20533.rs:40:14 - | -LL | let x = baz(&a); - | -- borrow of `a` occurs here -LL | drop(a); - | ^ move out of `a` occurs here -LL | drop(x); - | - borrow later used here - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0505`. diff --git a/src/test/ui/variance/variance-issue-20533.stderr b/src/test/ui/variance/variance-issue-20533.stderr index bcf99bcb96..008e2a002b 100644 --- a/src/test/ui/variance/variance-issue-20533.stderr +++ b/src/test/ui/variance/variance-issue-20533.stderr @@ -2,25 +2,31 @@ error[E0505]: cannot move out of `a` because it is borrowed --> $DIR/variance-issue-20533.rs:28:14 | LL | let x = foo(&a); - | - borrow of `a` occurs here + | -- borrow of `a` occurs here LL | drop(a); | ^ move out of `a` occurs here +LL | drop(x); + | - borrow later used here error[E0505]: cannot move out of `a` because it is borrowed --> $DIR/variance-issue-20533.rs:34:14 | LL | let x = bar(&a); - | - borrow of `a` occurs here + | -- borrow of `a` occurs here LL | drop(a); | ^ move out of `a` occurs here +LL | drop(x); + | - borrow later used here error[E0505]: cannot move out of `a` because it is borrowed --> $DIR/variance-issue-20533.rs:40:14 | LL | let x = baz(&a); - | - borrow of `a` occurs here + | -- borrow of `a` occurs here LL | drop(a); | ^ move out of `a` occurs here +LL | drop(x); + | - borrow later used here error: aborting due to 3 previous errors diff --git a/src/test/ui/variance/variance-object-types.stderr b/src/test/ui/variance/variance-object-types.stderr index 385d8dc5c7..be94a727a8 100644 --- a/src/test/ui/variance/variance-object-types.stderr +++ b/src/test/ui/variance/variance-object-types.stderr @@ -8,4 +8,3 @@ LL | | } error: aborting due to previous error -For more information about this error, try `rustc --explain E0208`. diff --git a/src/test/ui/variance/variance-regions-direct.stderr b/src/test/ui/variance/variance-regions-direct.stderr index bbc3479944..8c9c89955b 100644 --- a/src/test/ui/variance/variance-regions-direct.stderr +++ b/src/test/ui/variance/variance-regions-direct.stderr @@ -62,4 +62,3 @@ LL | | } error: aborting due to 7 previous errors -For more information about this error, try `rustc --explain E0208`. diff --git a/src/test/ui/variance/variance-regions-indirect.stderr b/src/test/ui/variance/variance-regions-indirect.stderr index ccd4335f50..17efc6231d 100644 --- a/src/test/ui/variance/variance-regions-indirect.stderr +++ b/src/test/ui/variance/variance-regions-indirect.stderr @@ -42,4 +42,3 @@ LL | | } error: aborting due to 5 previous errors -For more information about this error, try `rustc --explain E0208`. diff --git a/src/test/ui/variance/variance-regions-unused-direct.stderr b/src/test/ui/variance/variance-regions-unused-direct.stderr index ab5dce03fa..21ff475663 100644 --- a/src/test/ui/variance/variance-regions-unused-direct.stderr +++ b/src/test/ui/variance/variance-regions-unused-direct.stderr @@ -2,7 +2,7 @@ error[E0392]: parameter `'a` is never used --> $DIR/variance-regions-unused-direct.rs:5:18 | LL | struct Bivariant<'a>; - | ^^ unused type parameter + | ^^ unused parameter | = help: consider removing `'a` or using a marker such as `std::marker::PhantomData` @@ -10,7 +10,7 @@ error[E0392]: parameter `'d` is never used --> $DIR/variance-regions-unused-direct.rs:7:19 | LL | struct Struct<'a, 'd> { - | ^^ unused type parameter + | ^^ unused parameter | = help: consider removing `'d` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/variance/variance-regions-unused-indirect.stderr b/src/test/ui/variance/variance-regions-unused-indirect.stderr index 69631b4a50..fd66217f69 100644 --- a/src/test/ui/variance/variance-regions-unused-indirect.stderr +++ b/src/test/ui/variance/variance-regions-unused-indirect.stderr @@ -2,7 +2,7 @@ error[E0392]: parameter `'a` is never used --> $DIR/variance-regions-unused-indirect.rs:3:10 | LL | enum Foo<'a> { - | ^^ unused type parameter + | ^^ unused parameter | = help: consider removing `'a` or using a marker such as `std::marker::PhantomData` @@ -10,7 +10,7 @@ error[E0392]: parameter `'a` is never used --> $DIR/variance-regions-unused-indirect.rs:7:10 | LL | enum Bar<'a> { - | ^^ unused type parameter + | ^^ unused parameter | = help: consider removing `'a` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/variance/variance-trait-bounds.stderr b/src/test/ui/variance/variance-trait-bounds.stderr index f136bd121d..98bc1b003c 100644 --- a/src/test/ui/variance/variance-trait-bounds.stderr +++ b/src/test/ui/variance/variance-trait-bounds.stderr @@ -32,4 +32,3 @@ LL | | } error: aborting due to 4 previous errors -For more information about this error, try `rustc --explain E0208`. diff --git a/src/test/ui/variance/variance-trait-matching.nll.stderr b/src/test/ui/variance/variance-trait-matching.nll.stderr new file mode 100644 index 0000000000..3308cc6d25 --- /dev/null +++ b/src/test/ui/variance/variance-trait-matching.nll.stderr @@ -0,0 +1,12 @@ +error[E0621]: explicit lifetime required in the type of `get` + --> $DIR/variance-trait-matching.rs:24:5 + | +LL | fn get<'a, G>(get: &G) -> i32 + | -- help: add explicit lifetime `'a` to the type of `get`: `&'a G` +... +LL | pick(get, &22) + | ^^^^^^^^^^^^^^ lifetime `'a` required + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/variance/variance-trait-object-bound.stderr b/src/test/ui/variance/variance-trait-object-bound.stderr index 4fa4a2e8ab..503c087fb4 100644 --- a/src/test/ui/variance/variance-trait-object-bound.stderr +++ b/src/test/ui/variance/variance-trait-object-bound.stderr @@ -8,4 +8,3 @@ LL | | } error: aborting due to previous error -For more information about this error, try `rustc --explain E0208`. diff --git a/src/test/ui/variance/variance-types-bounds.stderr b/src/test/ui/variance/variance-types-bounds.stderr index 991bfd33a2..8e3e0515ae 100644 --- a/src/test/ui/variance/variance-types-bounds.stderr +++ b/src/test/ui/variance/variance-types-bounds.stderr @@ -44,4 +44,3 @@ LL | | } error: aborting due to 5 previous errors -For more information about this error, try `rustc --explain E0208`. diff --git a/src/test/ui/variance/variance-types.stderr b/src/test/ui/variance/variance-types.stderr index f68a266672..05bd4747cf 100644 --- a/src/test/ui/variance/variance-types.stderr +++ b/src/test/ui/variance/variance-types.stderr @@ -50,4 +50,3 @@ LL | | } error: aborting due to 6 previous errors -For more information about this error, try `rustc --explain E0208`. diff --git a/src/test/ui/variance/variance-unused-region-param.stderr b/src/test/ui/variance/variance-unused-region-param.stderr index 6c103f168f..a96b2338bf 100644 --- a/src/test/ui/variance/variance-unused-region-param.stderr +++ b/src/test/ui/variance/variance-unused-region-param.stderr @@ -2,7 +2,7 @@ error[E0392]: parameter `'a` is never used --> $DIR/variance-unused-region-param.rs:3:19 | LL | struct SomeStruct<'a> { x: u32 } - | ^^ unused type parameter + | ^^ unused parameter | = help: consider removing `'a` or using a marker such as `std::marker::PhantomData` @@ -10,7 +10,7 @@ error[E0392]: parameter `'a` is never used --> $DIR/variance-unused-region-param.rs:4:15 | LL | enum SomeEnum<'a> { Nothing } - | ^^ unused type parameter + | ^^ unused parameter | = help: consider removing `'a` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/variance/variance-unused-type-param.stderr b/src/test/ui/variance/variance-unused-type-param.stderr index 34c430f549..883db46298 100644 --- a/src/test/ui/variance/variance-unused-type-param.stderr +++ b/src/test/ui/variance/variance-unused-type-param.stderr @@ -2,7 +2,7 @@ error[E0392]: parameter `A` is never used --> $DIR/variance-unused-type-param.rs:6:19 | LL | struct SomeStruct { x: u32 } - | ^ unused type parameter + | ^ unused parameter | = help: consider removing `A` or using a marker such as `std::marker::PhantomData` @@ -10,7 +10,7 @@ error[E0392]: parameter `A` is never used --> $DIR/variance-unused-type-param.rs:9:15 | LL | enum SomeEnum { Nothing } - | ^ unused type parameter + | ^ unused parameter | = help: consider removing `A` or using a marker such as `std::marker::PhantomData` @@ -18,7 +18,7 @@ error[E0392]: parameter `T` is never used --> $DIR/variance-unused-type-param.rs:13:15 | LL | enum ListCell { - | ^ unused type parameter + | ^ unused parameter | = help: consider removing `T` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/variance/variance-use-contravariant-struct-1.nll.stderr b/src/test/ui/variance/variance-use-contravariant-struct-1.nll.stderr new file mode 100644 index 0000000000..8468448b27 --- /dev/null +++ b/src/test/ui/variance/variance-use-contravariant-struct-1.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/variance-use-contravariant-struct-1.rs:12:5 + | +LL | fn foo<'min,'max>(v: SomeStruct<&'max ()>) + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | v + | ^ returning this value requires that `'min` must outlive `'max` + +error: aborting due to previous error + diff --git a/src/test/ui/variance/variance-use-covariant-struct-1.nll.stderr b/src/test/ui/variance/variance-use-covariant-struct-1.nll.stderr new file mode 100644 index 0000000000..19a22f064b --- /dev/null +++ b/src/test/ui/variance/variance-use-covariant-struct-1.nll.stderr @@ -0,0 +1,13 @@ +error: lifetime may not live long enough + --> $DIR/variance-use-covariant-struct-1.rs:10:5 + | +LL | fn foo<'min,'max>(v: SomeStruct<&'min ()>) + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | v + | ^ returning this value requires that `'min` must outlive `'max` + +error: aborting due to previous error + diff --git a/src/test/ui/variance/variance-use-invariant-struct-1.nll.stderr b/src/test/ui/variance/variance-use-invariant-struct-1.nll.stderr new file mode 100644 index 0000000000..61f80fe77e --- /dev/null +++ b/src/test/ui/variance/variance-use-invariant-struct-1.nll.stderr @@ -0,0 +1,24 @@ +error: lifetime may not live long enough + --> $DIR/variance-use-invariant-struct-1.rs:12:5 + | +LL | fn foo<'min,'max>(v: SomeStruct<&'max ()>) + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | v + | ^ returning this value requires that `'min` must outlive `'max` + +error: lifetime may not live long enough + --> $DIR/variance-use-invariant-struct-1.rs:19:5 + | +LL | fn bar<'min,'max>(v: SomeStruct<&'min ()>) + | ---- ---- lifetime `'max` defined here + | | + | lifetime `'min` defined here +... +LL | v + | ^ returning this value requires that `'min` must outlive `'max` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/variants/variant-used-as-type.stderr b/src/test/ui/variants/variant-used-as-type.stderr index fdfc044d81..1138b69ae3 100644 --- a/src/test/ui/variants/variant-used-as-type.stderr +++ b/src/test/ui/variants/variant-used-as-type.stderr @@ -24,4 +24,3 @@ LL | impl Ty {} error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0573`. diff --git a/src/test/ui/vec/vec-mut-iter-borrow.nll.stderr b/src/test/ui/vec/vec-mut-iter-borrow.nll.stderr deleted file mode 100644 index 679fd89977..0000000000 --- a/src/test/ui/vec/vec-mut-iter-borrow.nll.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0499]: cannot borrow `xs` as mutable more than once at a time - --> $DIR/vec-mut-iter-borrow.rs:5:9 - | -LL | for x in &mut xs { - | ------- - | | - | first mutable borrow occurs here - | first borrow later used here -LL | xs.push(1) - | ^^ second mutable borrow occurs here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0499`. diff --git a/src/test/ui/vec/vec-mut-iter-borrow.stderr b/src/test/ui/vec/vec-mut-iter-borrow.stderr index ec16d2bebd..679fd89977 100644 --- a/src/test/ui/vec/vec-mut-iter-borrow.stderr +++ b/src/test/ui/vec/vec-mut-iter-borrow.stderr @@ -2,10 +2,10 @@ error[E0499]: cannot borrow `xs` as mutable more than once at a time --> $DIR/vec-mut-iter-borrow.rs:5:9 | LL | for x in &mut xs { - | -- - | || - | |first borrow ends here - | first mutable borrow occurs here + | ------- + | | + | first mutable borrow occurs here + | first borrow later used here LL | xs.push(1) | ^^ second mutable borrow occurs here diff --git a/src/test/ui/walk-struct-literal-with.nll.stderr b/src/test/ui/walk-struct-literal-with.nll.stderr deleted file mode 100644 index eeb594a21f..0000000000 --- a/src/test/ui/walk-struct-literal-with.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0382]: borrow of moved value: `start` - --> $DIR/walk-struct-literal-with.rs:16:20 - | -LL | let start = Mine{test:"Foo".to_string(), other_val:0}; - | ----- move occurs because `start` has type `Mine`, which does not implement the `Copy` trait -LL | let end = Mine{other_val:1, ..start.make_string_bar()}; - | ----- value moved here -LL | println!("{}", start.test); - | ^^^^^^^^^^ value borrowed here after move - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/walk-struct-literal-with.rs b/src/test/ui/walk-struct-literal-with.rs index 31dfd58fa9..ee1a77eb9a 100644 --- a/src/test/ui/walk-struct-literal-with.rs +++ b/src/test/ui/walk-struct-literal-with.rs @@ -13,5 +13,5 @@ impl Mine{ fn main(){ let start = Mine{test:"Foo".to_string(), other_val:0}; let end = Mine{other_val:1, ..start.make_string_bar()}; - println!("{}", start.test); //~ ERROR use of moved value: `start.test` + println!("{}", start.test); //~ ERROR borrow of moved value: `start` } diff --git a/src/test/ui/walk-struct-literal-with.stderr b/src/test/ui/walk-struct-literal-with.stderr index d5351eb0ce..eeb594a21f 100644 --- a/src/test/ui/walk-struct-literal-with.stderr +++ b/src/test/ui/walk-struct-literal-with.stderr @@ -1,12 +1,12 @@ -error[E0382]: use of moved value: `start.test` +error[E0382]: borrow of moved value: `start` --> $DIR/walk-struct-literal-with.rs:16:20 | +LL | let start = Mine{test:"Foo".to_string(), other_val:0}; + | ----- move occurs because `start` has type `Mine`, which does not implement the `Copy` trait LL | let end = Mine{other_val:1, ..start.make_string_bar()}; | ----- value moved here LL | println!("{}", start.test); - | ^^^^^^^^^^ value used here after move - | - = note: move occurs because `start` has type `Mine`, which does not implement the `Copy` trait + | ^^^^^^^^^^ value borrowed here after move error: aborting due to previous error diff --git a/src/test/ui/wasm-import-module.rs b/src/test/ui/wasm-import-module.rs index 618bf1952a..16d628a618 100644 --- a/src/test/ui/wasm-import-module.rs +++ b/src/test/ui/wasm-import-module.rs @@ -8,4 +8,3 @@ extern {} extern {} fn main() {} - diff --git a/src/test/ui/wf/wf-fn-where-clause.stderr b/src/test/ui/wf/wf-fn-where-clause.stderr index f1648aa12a..b50e895d86 100644 --- a/src/test/ui/wf/wf-fn-where-clause.stderr +++ b/src/test/ui/wf/wf-fn-where-clause.stderr @@ -33,5 +33,5 @@ LL | fn bar() where Vec:, {} error: aborting due to 3 previous errors -Some errors occurred: E0038, E0277. +Some errors have detailed explanations: E0038, E0277. For more information about an error, try `rustc --explain E0038`. diff --git a/src/test/ui/wf/wf-misc-methods-issue-28609.nll.stderr b/src/test/ui/wf/wf-misc-methods-issue-28609.nll.stderr deleted file mode 100644 index fc58984345..0000000000 --- a/src/test/ui/wf/wf-misc-methods-issue-28609.nll.stderr +++ /dev/null @@ -1,55 +0,0 @@ -error[E0515]: cannot return value referencing temporary value - --> $DIR/wf-misc-methods-issue-28609.rs:22:5 - | -LL | s.transmute_inherent(&mut 42) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^--^ - | | | - | | temporary value created here - | returns a value referencing data owned by the current function - -error[E0515]: cannot return value referencing local variable `four` - --> $DIR/wf-misc-methods-issue-28609.rs:36:5 - | -LL | s.bomb = Some(&four); - | ----- `four` is borrowed here -LL | &s - | ^^ returns a value referencing data owned by the current function - -error[E0515]: cannot return value referencing local variable `four` - --> $DIR/wf-misc-methods-issue-28609.rs:43:5 - | -LL | s.bomb = Some(&four); - | ----- `four` is borrowed here -LL | &*s - | ^^^ returns a value referencing data owned by the current function - -error[E0515]: cannot return value referencing temporary value - --> $DIR/wf-misc-methods-issue-28609.rs:53:5 - | -LL | s << &mut 3 - | ^^^^^^^^^^- - | | | - | | temporary value created here - | returns a value referencing data owned by the current function - -error[E0515]: cannot return value referencing temporary value - --> $DIR/wf-misc-methods-issue-28609.rs:58:5 - | -LL | s.shl(&mut 3) - | ^^^^^^^^^^^-^ - | | | - | | temporary value created here - | returns a value referencing data owned by the current function - -error[E0515]: cannot return value referencing temporary value - --> $DIR/wf-misc-methods-issue-28609.rs:63:5 - | -LL | S2::shl(s, &mut 3) - | ^^^^^^^^^^^^^^^^-^ - | | | - | | temporary value created here - | returns a value referencing data owned by the current function - -error: aborting due to 6 previous errors - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/wf/wf-misc-methods-issue-28609.rs b/src/test/ui/wf/wf-misc-methods-issue-28609.rs index 505d7d75d5..050f866e1c 100644 --- a/src/test/ui/wf/wf-misc-methods-issue-28609.rs +++ b/src/test/ui/wf/wf-misc-methods-issue-28609.rs @@ -19,7 +19,7 @@ impl<'a, 'b> S<'a, 'b> { fn return_dangling_pointer_inherent(s: S2) -> &u32 { let s = s; - s.transmute_inherent(&mut 42) //~ ERROR does not live long enough + s.transmute_inherent(&mut 42) //~ ERROR cannot return value referencing temporary value } impl<'a, 'b> Deref for S<'a, 'b> { @@ -32,15 +32,15 @@ impl<'a, 'b> Deref for S<'a, 'b> { fn return_dangling_pointer_coerce(s: S2) -> &u32 { let four = 4; let mut s = s; - s.bomb = Some(&four); //~ ERROR does not live long enough - &s + s.bomb = Some(&four); + &s //~ ERROR cannot return value referencing local variable `four` } fn return_dangling_pointer_unary_op(s: S2) -> &u32 { let four = 4; let mut s = s; - s.bomb = Some(&four); //~ ERROR does not live long enough - &*s + s.bomb = Some(&four); + &*s //~ ERROR cannot return value referencing local variable `four` } impl<'a, 'b> Shl<&'b u32> for S<'a, 'b> { @@ -50,17 +50,17 @@ impl<'a, 'b> Shl<&'b u32> for S<'a, 'b> { fn return_dangling_pointer_binary_op(s: S2) -> &u32 { let s = s; - s << &mut 3 //~ ERROR does not live long enough + s << &mut 3 //~ ERROR cannot return value referencing temporary value } fn return_dangling_pointer_method(s: S2) -> &u32 { let s = s; - s.shl(&mut 3) //~ ERROR does not live long enough + s.shl(&mut 3) //~ ERROR cannot return value referencing temporary value } fn return_dangling_pointer_ufcs(s: S2) -> &u32 { let s = s; - S2::shl(s, &mut 3) //~ ERROR does not live long enough + S2::shl(s, &mut 3) //~ ERROR cannot return value referencing temporary value } fn main() { diff --git a/src/test/ui/wf/wf-misc-methods-issue-28609.stderr b/src/test/ui/wf/wf-misc-methods-issue-28609.stderr index d470aecd26..fc58984345 100644 --- a/src/test/ui/wf/wf-misc-methods-issue-28609.stderr +++ b/src/test/ui/wf/wf-misc-methods-issue-28609.stderr @@ -1,111 +1,55 @@ -error[E0597]: borrowed value does not live long enough - --> $DIR/wf-misc-methods-issue-28609.rs:22:31 +error[E0515]: cannot return value referencing temporary value + --> $DIR/wf-misc-methods-issue-28609.rs:22:5 | LL | s.transmute_inherent(&mut 42) - | ^^ temporary value does not live long enough -LL | } - | - temporary value only lives until here - | -note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 20:1... - --> $DIR/wf-misc-methods-issue-28609.rs:20:1 - | -LL | / fn return_dangling_pointer_inherent(s: S2) -> &u32 { -LL | | let s = s; -LL | | s.transmute_inherent(&mut 42) -LL | | } - | |_^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^--^ + | | | + | | temporary value created here + | returns a value referencing data owned by the current function -error[E0597]: `four` does not live long enough - --> $DIR/wf-misc-methods-issue-28609.rs:35:20 +error[E0515]: cannot return value referencing local variable `four` + --> $DIR/wf-misc-methods-issue-28609.rs:36:5 | LL | s.bomb = Some(&four); - | ^^^^ borrowed value does not live long enough + | ----- `four` is borrowed here LL | &s -LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 32:1... - --> $DIR/wf-misc-methods-issue-28609.rs:32:1 - | -LL | / fn return_dangling_pointer_coerce(s: S2) -> &u32 { -LL | | let four = 4; -LL | | let mut s = s; -LL | | s.bomb = Some(&four); -LL | | &s -LL | | } - | |_^ + | ^^ returns a value referencing data owned by the current function -error[E0597]: `four` does not live long enough - --> $DIR/wf-misc-methods-issue-28609.rs:42:20 +error[E0515]: cannot return value referencing local variable `four` + --> $DIR/wf-misc-methods-issue-28609.rs:43:5 | LL | s.bomb = Some(&four); - | ^^^^ borrowed value does not live long enough + | ----- `four` is borrowed here LL | &*s -LL | } - | - borrowed value only lives until here - | -note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 39:1... - --> $DIR/wf-misc-methods-issue-28609.rs:39:1 - | -LL | / fn return_dangling_pointer_unary_op(s: S2) -> &u32 { -LL | | let four = 4; -LL | | let mut s = s; -LL | | s.bomb = Some(&four); -LL | | &*s -LL | | } - | |_^ + | ^^^ returns a value referencing data owned by the current function -error[E0597]: borrowed value does not live long enough - --> $DIR/wf-misc-methods-issue-28609.rs:53:15 +error[E0515]: cannot return value referencing temporary value + --> $DIR/wf-misc-methods-issue-28609.rs:53:5 | LL | s << &mut 3 - | ^ temporary value does not live long enough -LL | } - | - temporary value only lives until here - | -note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 51:1... - --> $DIR/wf-misc-methods-issue-28609.rs:51:1 - | -LL | / fn return_dangling_pointer_binary_op(s: S2) -> &u32 { -LL | | let s = s; -LL | | s << &mut 3 -LL | | } - | |_^ + | ^^^^^^^^^^- + | | | + | | temporary value created here + | returns a value referencing data owned by the current function -error[E0597]: borrowed value does not live long enough - --> $DIR/wf-misc-methods-issue-28609.rs:58:16 +error[E0515]: cannot return value referencing temporary value + --> $DIR/wf-misc-methods-issue-28609.rs:58:5 | LL | s.shl(&mut 3) - | ^ temporary value does not live long enough -LL | } - | - temporary value only lives until here - | -note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 56:1... - --> $DIR/wf-misc-methods-issue-28609.rs:56:1 - | -LL | / fn return_dangling_pointer_method(s: S2) -> &u32 { -LL | | let s = s; -LL | | s.shl(&mut 3) -LL | | } - | |_^ + | ^^^^^^^^^^^-^ + | | | + | | temporary value created here + | returns a value referencing data owned by the current function -error[E0597]: borrowed value does not live long enough - --> $DIR/wf-misc-methods-issue-28609.rs:63:21 +error[E0515]: cannot return value referencing temporary value + --> $DIR/wf-misc-methods-issue-28609.rs:63:5 | LL | S2::shl(s, &mut 3) - | ^ temporary value does not live long enough -LL | } - | - temporary value only lives until here - | -note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 61:1... - --> $DIR/wf-misc-methods-issue-28609.rs:61:1 - | -LL | / fn return_dangling_pointer_ufcs(s: S2) -> &u32 { -LL | | let s = s; -LL | | S2::shl(s, &mut 3) -LL | | } - | |_^ + | ^^^^^^^^^^^^^^^^-^ + | | | + | | temporary value created here + | returns a value referencing data owned by the current function error: aborting due to 6 previous errors -For more information about this error, try `rustc --explain E0597`. +For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.rs b/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.rs index 1c4cda261d..ac95cbab1f 100644 --- a/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.rs +++ b/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.rs @@ -20,4 +20,3 @@ impl<'a, T> Trait<'a, T> for u32 { } fn main() { } - diff --git a/src/test/ui/wf/wf-static-method.nll.stderr b/src/test/ui/wf/wf-static-method.nll.stderr new file mode 100644 index 0000000000..338de6db18 --- /dev/null +++ b/src/test/ui/wf/wf-static-method.nll.stderr @@ -0,0 +1,65 @@ +error: lifetime may not live long enough + --> $DIR/wf-static-method.rs:17:9 + | +LL | impl<'a, 'b> Foo<'a, 'b, Evil<'a, 'b>> for () { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | u + | ^ returning this value requires that `'b` must outlive `'a` + +error: lifetime may not live long enough + --> $DIR/wf-static-method.rs:26:18 + | +LL | impl<'a, 'b> Foo<'a, 'b, ()> for IndirectEvil<'a, 'b> { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | let me = Self::make_me(); + | ^^^^^^^^^^^^^ requires that `'b` must outlive `'a` + +error: lifetime may not live long enough + --> $DIR/wf-static-method.rs:33:9 + | +LL | impl<'a, 'b> Evil<'a, 'b> { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | fn inherent_evil(u: &'b u32) -> &'a u32 { +LL | u + | ^ returning this value requires that `'b` must outlive `'a` + +error: lifetime may not live long enough + --> $DIR/wf-static-method.rs:41:5 + | +LL | fn evil<'a, 'b>(b: &'b u32) -> &'a u32 { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | <()>::static_evil(b) + | ^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'b` must outlive `'a` + +error: lifetime may not live long enough + --> $DIR/wf-static-method.rs:45:5 + | +LL | fn indirect_evil<'a, 'b>(b: &'b u32) -> &'a u32 { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | ::static_evil(b) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'b` must outlive `'a` + +error: lifetime may not live long enough + --> $DIR/wf-static-method.rs:50:5 + | +LL | fn inherent_evil<'a, 'b>(b: &'b u32) -> &'a u32 { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +LL | ::inherent_evil(b) // bug? shouldn't this be an error + | ^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'b` must outlive `'a` + +error: aborting due to 6 previous errors + diff --git a/src/test/ui/wf/wf-static-method.stderr b/src/test/ui/wf/wf-static-method.stderr index 32832ceb79..f82526aa88 100644 --- a/src/test/ui/wf/wf-static-method.stderr +++ b/src/test/ui/wf/wf-static-method.stderr @@ -105,5 +105,4 @@ LL | ::static_evil(b) error: aborting due to 5 previous errors -Some errors occurred: E0312, E0478, E0495. -For more information about an error, try `rustc --explain E0312`. +For more information about this error, try `rustc --explain E0478`. diff --git a/src/test/ui/where-clauses/where-for-self.stderr b/src/test/ui/where-clauses/where-for-self.stderr index d06afc1e42..84430ffcf8 100644 --- a/src/test/ui/where-clauses/where-for-self.stderr +++ b/src/test/ui/where-clauses/where-for-self.stderr @@ -6,4 +6,3 @@ LL | where for<'a> &'a T: for<'b> Bar<'b> error: aborting due to previous error -For more information about this error, try `rustc --explain E0316`. diff --git a/src/test/ui/where-clauses/where-lifetime-resolution.stderr b/src/test/ui/where-clauses/where-lifetime-resolution.stderr index ce6354b0ae..babf8efc23 100644 --- a/src/test/ui/where-clauses/where-lifetime-resolution.stderr +++ b/src/test/ui/where-clauses/where-lifetime-resolution.stderr @@ -18,5 +18,4 @@ LL | for<'a> for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>, error: aborting due to 3 previous errors -Some errors occurred: E0261, E0316. -For more information about an error, try `rustc --explain E0261`. +For more information about this error, try `rustc --explain E0261`. diff --git a/src/test/ui/write-to-static-mut-in-static.stderr b/src/test/ui/write-to-static-mut-in-static.stderr index eba1c609d2..4349f6e89c 100644 --- a/src/test/ui/write-to-static-mut-in-static.stderr +++ b/src/test/ui/write-to-static-mut-in-static.stderr @@ -24,5 +24,5 @@ LL | pub static mut C: u32 = unsafe { C = 1; 0 }; error: aborting due to 2 previous errors -Some errors occurred: E0080, E0391. +Some errors have detailed explanations: E0080, E0391. For more information about an error, try `rustc --explain E0080`. diff --git a/src/test/ui/writing-to-immutable-vec.nll.stderr b/src/test/ui/writing-to-immutable-vec.nll.stderr deleted file mode 100644 index a65765c86c..0000000000 --- a/src/test/ui/writing-to-immutable-vec.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable - --> $DIR/writing-to-immutable-vec.rs:3:5 - | -LL | let v: Vec = vec![1, 2, 3]; - | - help: consider changing this to be mutable: `mut v` -LL | v[1] = 4; - | ^ cannot borrow as mutable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/writing-to-immutable-vec.rs b/src/test/ui/writing-to-immutable-vec.rs index ad2bf33fc2..dbcc3f0bbe 100644 --- a/src/test/ui/writing-to-immutable-vec.rs +++ b/src/test/ui/writing-to-immutable-vec.rs @@ -1,4 +1,4 @@ fn main() { let v: Vec = vec![1, 2, 3]; - v[1] = 4; //~ ERROR cannot borrow immutable local variable `v` as mutable + v[1] = 4; //~ ERROR cannot borrow `v` as mutable, as it is not declared as mutable } diff --git a/src/test/ui/writing-to-immutable-vec.stderr b/src/test/ui/writing-to-immutable-vec.stderr index 9bc82dfd35..a65765c86c 100644 --- a/src/test/ui/writing-to-immutable-vec.stderr +++ b/src/test/ui/writing-to-immutable-vec.stderr @@ -1,10 +1,10 @@ -error[E0596]: cannot borrow immutable local variable `v` as mutable +error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable --> $DIR/writing-to-immutable-vec.rs:3:5 | LL | let v: Vec = vec![1, 2, 3]; - | - help: make this binding mutable: `mut v` + | - help: consider changing this to be mutable: `mut v` LL | v[1] = 4; - | ^ cannot borrow mutably + | ^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/wrong-mul-method-signature.rs b/src/test/ui/wrong-mul-method-signature.rs index 54e2af5525..1c2f865599 100644 --- a/src/test/ui/wrong-mul-method-signature.rs +++ b/src/test/ui/wrong-mul-method-signature.rs @@ -61,9 +61,8 @@ pub fn main() { let x: Vec1 = Vec1 { x: 1.0 } * 2.0; // this is OK let x: Vec2 = Vec2 { x: 1.0, y: 2.0 } * 2.0; // trait had reversed order - // (we no longer signal a compile error here, since the - // error in the trait signature will cause compilation to - // abort before we bother looking at function bodies.) + //~^ ERROR mismatched types + //~| ERROR mismatched types let x: i32 = Vec3 { x: 1.0, y: 2.0, z: 3.0 } * 2.0; } diff --git a/src/test/ui/wrong-mul-method-signature.stderr b/src/test/ui/wrong-mul-method-signature.stderr index 8630ebcb58..2317bf8e82 100644 --- a/src/test/ui/wrong-mul-method-signature.stderr +++ b/src/test/ui/wrong-mul-method-signature.stderr @@ -25,6 +25,25 @@ LL | fn mul(self, s: f64) -> f64 { = note: expected type `fn(Vec3, f64) -> i32` found type `fn(Vec3, f64) -> f64` -error: aborting due to 3 previous errors +error[E0308]: mismatched types + --> $DIR/wrong-mul-method-signature.rs:63:45 + | +LL | let x: Vec2 = Vec2 { x: 1.0, y: 2.0 } * 2.0; // trait had reversed order + | ^^^ expected struct `Vec2`, found floating-point number + | + = note: expected type `Vec2` + found type `{float}` + +error[E0308]: mismatched types + --> $DIR/wrong-mul-method-signature.rs:63:19 + | +LL | let x: Vec2 = Vec2 { x: 1.0, y: 2.0 } * 2.0; // trait had reversed order + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Vec2`, found f64 + | + = note: expected type `Vec2` + found type `f64` + +error: aborting due to 5 previous errors -For more information about this error, try `rustc --explain E0053`. +Some errors have detailed explanations: E0053, E0308. +For more information about an error, try `rustc --explain E0053`. diff --git a/src/tools/build-manifest/Cargo.toml b/src/tools/build-manifest/Cargo.toml index 93d0f61e1d..63b6399bb9 100644 --- a/src/tools/build-manifest/Cargo.toml +++ b/src/tools/build-manifest/Cargo.toml @@ -7,4 +7,3 @@ edition = "2018" [dependencies] toml = "0.4" serde = { version = "1.0", features = ["derive"] } -serde_derive = "1.0" diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index 61cc78ad80..5efd51b65c 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -108,7 +108,7 @@ static TARGETS: &[&str] = &[ "thumbv8m.main-none-eabihf", "wasm32-unknown-emscripten", "wasm32-unknown-unknown", - "wasm32-unknown-wasi", + "wasm32-wasi", "x86_64-apple-darwin", "x86_64-apple-ios", "x86_64-fortanix-unknown-sgx", diff --git a/src/tools/compiletest/Cargo.toml b/src/tools/compiletest/Cargo.toml index 00e1a53473..e759ad1f35 100644 --- a/src/tools/compiletest/Cargo.toml +++ b/src/tools/compiletest/Cargo.toml @@ -7,13 +7,11 @@ edition = "2018" [dependencies] diff = "0.1.10" env_logger = { version = "0.5", default-features = false } -filetime = "0.2" getopts = "0.2" log = "0.4" regex = "1.0" -serde = "1.0" +serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -serde_derive = "1.0" rustfix = "0.4.1" lazy_static = "1.0" walkdir = "2" diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs index 089cbc7b78..4699dee171 100644 --- a/src/tools/compiletest/src/common.rs +++ b/src/tools/compiletest/src/common.rs @@ -144,6 +144,9 @@ pub struct Config { /// The LLVM `FileCheck` binary path. pub llvm_filecheck: Option, + /// Path to LLVM's bin directory. + pub llvm_bin_dir: Option, + /// The valgrind path. pub valgrind_path: Option, diff --git a/src/tools/compiletest/src/errors.rs b/src/tools/compiletest/src/errors.rs index 0329fb0db1..5b3936ffc1 100644 --- a/src/tools/compiletest/src/errors.rs +++ b/src/tools/compiletest/src/errors.rs @@ -7,6 +7,8 @@ use std::io::BufReader; use std::path::Path; use std::str::FromStr; +use log::*; + #[derive(Clone, Debug, PartialEq)] pub enum ErrorKind { Help, diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index d735d3351e..dbc477585c 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -4,6 +4,8 @@ use std::io::prelude::*; use std::io::BufReader; use std::path::{Path, PathBuf}; +use log::*; + use crate::common::{self, CompareMode, Config, Mode}; use crate::util; @@ -88,6 +90,9 @@ impl EarlyProps { } } + let rustc_has_profiler_support = env::var_os("RUSTC_PROFILER_SUPPORT").is_some(); + let rustc_has_sanitizer_support = env::var_os("RUSTC_SANITIZER_SUPPORT").is_some(); + iter_header(testfile, None, &mut |ln| { // we should check if any only- exists and if it exists // and does not matches the current platform, skip the test @@ -116,6 +121,16 @@ impl EarlyProps { config.parse_needs_matching_clang(ln) { props.ignore = Ignore::Ignore; } + + if !rustc_has_profiler_support && + config.parse_needs_profiler_support(ln) { + props.ignore = Ignore::Ignore; + } + + if !rustc_has_sanitizer_support && + config.parse_needs_sanitizer_support(ln) { + props.ignore = Ignore::Ignore; + } } if (config.mode == common::DebugInfoGdb || config.mode == common::DebugInfoBoth) && @@ -286,8 +301,15 @@ pub struct TestProps { // directory as the test, but for backwards compatibility reasons // we also check the auxiliary directory) pub aux_builds: Vec, + // A list of crates to pass '--extern-private name:PATH' flags for + // This should be a subset of 'aux_build' + // FIXME: Replace this with a better solution: https://github.com/rust-lang/rust/pull/54020 + pub extern_private: Vec, // Environment settings to use for compiling pub rustc_env: Vec<(String, String)>, + // Environment variables to unset prior to compiling. + // Variables are unset before applying 'rustc_env'. + pub unset_rustc_env: Vec, // Environment settings to use during execution pub exec_env: Vec<(String, String)>, // Lines to check if they appear in the expected debugger output @@ -303,6 +325,10 @@ pub struct TestProps { // For UI tests, allows compiler to generate arbitrary output to stderr pub dont_check_compiler_stderr: bool, // Don't force a --crate-type=dylib flag on the command line + // + // Set this for example if you have an auxiliary test file that contains + // a proc-macro and needs `#![crate_type = "proc-macro"]`. This ensures + // that the aux file is compiled as a `proc-macro` and not as a `dylib`. pub no_prefer_dynamic: bool, // Run --pretty expanded when running pretty printing tests pub pretty_expanded: bool, @@ -349,8 +375,10 @@ impl TestProps { run_flags: None, pp_exact: None, aux_builds: vec![], + extern_private: vec![], revisions: vec![], rustc_env: vec![], + unset_rustc_env: vec![], exec_env: vec![], check_lines: vec![], build_aux_docs: false, @@ -465,6 +493,10 @@ impl TestProps { self.aux_builds.push(ab); } + if let Some(ep) = config.parse_extern_private(ln) { + self.extern_private.push(ep); + } + if let Some(ee) = config.parse_env(ln, "exec-env") { self.exec_env.push(ee); } @@ -473,6 +505,10 @@ impl TestProps { self.rustc_env.push(ee); } + if let Some(ev) = config.parse_name_value_directive(ln, "unset-rustc-env") { + self.unset_rustc_env.push(ev); + } + if let Some(cl) = config.parse_check_line(ln) { self.check_lines.push(cl); } @@ -490,7 +526,7 @@ impl TestProps { } if !self.compile_pass { - // run-pass implies must_compile_successfully + // run-pass implies compile_pass self.compile_pass = config.parse_compile_pass(ln) || self.run_pass; } @@ -606,6 +642,10 @@ impl Config { .map(|r| r.trim().to_string()) } + fn parse_extern_private(&self, line: &str) -> Option { + self.parse_name_value_directive(line, "extern-private") + } + fn parse_compile_flags(&self, line: &str) -> Option { self.parse_name_value_directive(line, "compile-flags") } @@ -731,6 +771,14 @@ impl Config { self.parse_name_directive(line, "needs-matching-clang") } + fn parse_needs_profiler_support(&self, line: &str) -> bool { + self.parse_name_directive(line, "needs-profiler-support") + } + + fn parse_needs_sanitizer_support(&self, line: &str) -> bool { + self.parse_name_directive(line, "needs-sanitizer-support") + } + /// Parses a name-value directive which contains config-specific information, e.g., `ignore-x86` /// or `normalize-stderr-32bit`. fn parse_cfg_name_directive(&self, line: &str, prefix: &str) -> ParsedNameDirective { diff --git a/src/tools/compiletest/src/json.rs b/src/tools/compiletest/src/json.rs index 15d449260e..02b09e21ff 100644 --- a/src/tools/compiletest/src/json.rs +++ b/src/tools/compiletest/src/json.rs @@ -3,8 +3,9 @@ use crate::errors::{Error, ErrorKind}; use crate::runtest::ProcRes; +use serde::Deserialize; use serde_json; -use std::path::Path; +use std::path::{Path, PathBuf}; use std::str::FromStr; #[derive(Deserialize)] @@ -17,6 +18,12 @@ struct Diagnostic { rendered: Option, } +#[derive(Deserialize)] +struct ArtifactNotification { + #[allow(dead_code)] + artifact: PathBuf, +} + #[derive(Deserialize, Clone)] struct DiagnosticSpan { file_name: String, @@ -62,23 +69,26 @@ struct DiagnosticCode { explanation: Option, } -pub fn extract_rendered(output: &str, proc_res: &ProcRes) -> String { +pub fn extract_rendered(output: &str) -> String { output .lines() .filter_map(|line| { if line.starts_with('{') { - match serde_json::from_str::(line) { - Ok(diagnostic) => diagnostic.rendered, - Err(error) => { - proc_res.fatal(Some(&format!( - "failed to decode compiler output as json: \ - `{}`\nline: {}\noutput: {}", - error, line, output - ))); - } + if let Ok(diagnostic) = serde_json::from_str::(line) { + diagnostic.rendered + } else if let Ok(_) = serde_json::from_str::(line) { + // Ignore the notification. + None + } else { + print!( + "failed to decode compiler output as json: line: {}\noutput: {}", + line, output + ); + panic!() } } else { - None + // preserve non-JSON lines, such as ICEs + Some(format!("{}\n", line)) } }) .collect() diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index dfc023da97..442e58bfd7 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -1,22 +1,14 @@ #![crate_name = "compiletest"] #![feature(test)] +#![feature(vec_remove_item)] #![deny(warnings, rust_2018_idioms)] -#[cfg(unix)] -extern crate libc; -#[macro_use] -extern crate log; -#[macro_use] -extern crate lazy_static; -#[macro_use] -extern crate serde_derive; extern crate test; use crate::common::CompareMode; use crate::common::{expected_output_path, output_base_dir, output_relative_path, UI_EXTENSIONS}; use crate::common::{Config, TestPaths}; use crate::common::{DebugInfoBoth, DebugInfoGdb, DebugInfoLldb, Mode, Pretty}; -use filetime::FileTime; use getopts::Options; use std::env; use std::ffi::OsString; @@ -24,11 +16,13 @@ use std::fs; use std::io::{self, ErrorKind}; use std::path::{Path, PathBuf}; use std::process::Command; +use std::time::SystemTime; use test::ColorConfig; use crate::util::logv; use walkdir::WalkDir; use env_logger; use getopts; +use log::*; use self::header::{EarlyProps, Ignore}; @@ -220,6 +214,7 @@ pub fn parse_config(args: Vec) -> Config { "LIST", ) .reqopt("", "llvm-cxxflags", "C++ flags for LLVM", "FLAGS") + .optopt("", "llvm-bin-dir", "Path to LLVM's `bin` directory", "PATH") .optopt("", "nodejs", "the name of nodejs", "PATH") .optopt( "", @@ -305,7 +300,8 @@ pub fn parse_config(args: Vec) -> Config { valgrind_path: matches.opt_str("valgrind-path"), force_valgrind: matches.opt_present("force-valgrind"), run_clang_based_tests_with: matches.opt_str("run-clang-based-tests-with"), - llvm_filecheck: matches.opt_str("llvm-filecheck").map(|s| PathBuf::from(&s)), + llvm_filecheck: matches.opt_str("llvm-filecheck").map(PathBuf::from), + llvm_bin_dir: matches.opt_str("llvm-bin-dir").map(PathBuf::from), src_base, build_base: opt_path(matches, "build-base"), stage_id: matches.opt_str("stage-id").unwrap(), @@ -522,6 +518,7 @@ pub fn run_tests(config: &Config) { pub fn test_opts(config: &Config) -> test::TestOpts { test::TestOpts { + exclude_should_panic: false, filter: config.filter.clone(), filter_exact: config.filter_exact, run_ignored: if config.run_ignored { @@ -755,31 +752,36 @@ fn up_to_date( #[derive(Debug, PartialEq, PartialOrd, Ord, Eq)] struct Stamp { - time: FileTime, + time: SystemTime, file: PathBuf, } impl Stamp { fn from_path(p: &Path) -> Self { + let time = fs::metadata(p) + .and_then(|metadata| metadata.modified()) + .unwrap_or(SystemTime::UNIX_EPOCH); + Stamp { - time: mtime(&p), + time, file: p.into(), } } - fn from_dir(path: &Path) -> impl Iterator { + fn from_dir(path: &Path) -> impl Iterator { WalkDir::new(path) .into_iter() .map(|entry| entry.unwrap()) .filter(|entry| entry.file_type().is_file()) - .map(|entry| Stamp::from_path(entry.path())) - } -} + .map(|entry| { + let time = (|| -> io::Result<_> { entry.metadata()?.modified() })(); -fn mtime(path: &Path) -> FileTime { - fs::metadata(path) - .map(|f| FileTime::from_last_modification_time(&f)) - .unwrap_or_else(|_| FileTime::zero()) + Stamp { + time: time.unwrap_or(SystemTime::UNIX_EPOCH), + file: entry.path().into(), + } + }) + } } fn make_test_name( diff --git a/src/tools/compiletest/src/raise_fd_limit.rs b/src/tools/compiletest/src/raise_fd_limit.rs index 7f1d7e0d3c..e9c9109410 100644 --- a/src/tools/compiletest/src/raise_fd_limit.rs +++ b/src/tools/compiletest/src/raise_fd_limit.rs @@ -7,7 +7,6 @@ #[cfg(any(target_os = "macos", target_os = "ios"))] #[allow(non_camel_case_types)] pub unsafe fn raise_fd_limit() { - use libc; use std::cmp; use std::io; use std::mem::size_of_val; diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 2021dd513a..2082de7cbc 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1,3 +1,5 @@ +// ignore-tidy-filelength + use crate::common::CompareMode; use crate::common::{expected_output_path, UI_EXTENSIONS, UI_FIXED, UI_STDERR, UI_STDOUT}; use crate::common::{output_base_dir, output_base_name, output_testname_unique}; @@ -7,7 +9,6 @@ use crate::common::{Config, TestPaths}; use crate::common::{Incremental, MirOpt, RunMake, Ui, JsDocTest, Assembly}; use diff; use crate::errors::{self, Error, ErrorKind}; -use filetime::FileTime; use crate::header::TestProps; use crate::json; use regex::{Captures, Regex}; @@ -27,6 +28,9 @@ use std::path::{Path, PathBuf}; use std::process::{Child, Command, ExitStatus, Output, Stdio}; use std::str; +use lazy_static::lazy_static; +use log::*; + use crate::extract_gdb_version; use crate::is_android_gdb_target; @@ -74,6 +78,25 @@ pub fn dylib_env_var() -> &'static str { } } +/// The platform-specific library name +pub fn get_lib_name(lib: &str, dylib: bool) -> String { + // In some casess (e.g. MUSL), we build a static + // library, rather than a dynamic library. + // In this case, the only path we can pass + // with '--extern-meta' is the '.lib' file + if !dylib { + return format!("lib{}.rlib", lib); + } + + if cfg!(windows) { + format!("{}.dll", lib) + } else if cfg!(target_os = "macos") { + format!("lib{}.dylib", lib) + } else { + format!("lib{}.so", lib) + } +} + #[derive(Debug, PartialEq)] pub enum DiffLine { Context(String), @@ -1401,10 +1424,21 @@ impl<'test> TestCx<'test> { } fn compile_test(&self) -> ProcRes { - let mut rustc = self.make_compile_args( - &self.testpaths.file, - TargetLocation::ThisFile(self.make_exe_name()), - ); + // Only use `make_exe_name` when the test ends up being executed. + let will_execute = match self.config.mode { + RunPass | Ui => self.should_run_successfully(), + Incremental => self.revision.unwrap().starts_with("r"), + RunFail | RunPassValgrind | MirOpt | + DebugInfoBoth | DebugInfoGdb | DebugInfoLldb => true, + _ => false, + }; + let output_file = if will_execute { + TargetLocation::ThisFile(self.make_exe_name()) + } else { + TargetLocation::ThisDirectory(self.output_base_dir()) + }; + + let mut rustc = self.make_compile_args(&self.testpaths.file, output_file); rustc.arg("-L").arg(&self.aux_output_dir_name()); @@ -1585,6 +1619,16 @@ impl<'test> TestCx<'test> { create_dir_all(&aux_dir).unwrap(); } + // Use a Vec instead of a HashMap to preserve original order + let mut extern_priv = self.props.extern_private.clone(); + + let mut add_extern_priv = |priv_dep: &str, dylib: bool| { + let lib_name = get_lib_name(priv_dep, dylib); + rustc + .arg("--extern-private") + .arg(format!("{}={}", priv_dep, aux_dir.join(lib_name).to_str().unwrap())); + }; + for rel_ab in &self.props.aux_builds { let aux_testpaths = self.compute_aux_test_paths(rel_ab); let aux_props = @@ -1601,11 +1645,13 @@ impl<'test> TestCx<'test> { create_dir_all(aux_cx.output_base_dir()).unwrap(); let mut aux_rustc = aux_cx.make_compile_args(&aux_testpaths.file, aux_output); - let crate_type = if aux_props.no_prefer_dynamic { - None + let (dylib, crate_type) = if aux_props.no_prefer_dynamic { + (true, None) } else if self.config.target.contains("cloudabi") || self.config.target.contains("emscripten") - || (self.config.target.contains("musl") && !aux_props.force_host) + || (self.config.target.contains("musl") + && !aux_props.force_host + && !self.config.host.contains("musl")) || self.config.target.contains("wasm32") || self.config.target.contains("nvptx") { @@ -1618,11 +1664,20 @@ impl<'test> TestCx<'test> { // dynamic libraries so we just go back to building a normal library. Note, // however, that for MUSL if the library is built with `force_host` then // it's ok to be a dylib as the host should always support dylibs. - Some("lib") + (false, Some("lib")) } else { - Some("dylib") + (true, Some("dylib")) }; + let trimmed = rel_ab.trim_end_matches(".rs").to_string(); + + // Normally, every 'extern-private' has a correspodning 'aux-build' + // entry. If so, we remove it from our list of private crates, + // and add an '--extern-private' flag to rustc + if extern_priv.remove_item(&trimmed).is_some() { + add_extern_priv(&trimmed, dylib); + } + if let Some(crate_type) = crate_type { aux_rustc.args(&["--crate-type", crate_type]); } @@ -1646,6 +1701,15 @@ impl<'test> TestCx<'test> { } } + // Add any '--extern-private' entries without a matching + // 'aux-build' + for private_lib in extern_priv { + add_extern_priv(&private_lib, true); + } + + self.props.unset_rustc_env.clone() + .iter() + .fold(&mut rustc, |rustc, v| rustc.env_remove(v)); rustc.envs(self.props.rustc_env.clone()); self.compose_and_run( rustc, @@ -1836,16 +1900,21 @@ impl<'test> TestCx<'test> { rustc.arg("-o").arg(path); } TargetLocation::ThisDirectory(path) => { - rustc.arg("--out-dir").arg(path); + if is_rustdoc { + // `rustdoc` uses `-o` for the output directory. + rustc.arg("-o").arg(path); + } else { + rustc.arg("--out-dir").arg(path); + } } } match self.config.compare_mode { Some(CompareMode::Nll) => { - rustc.args(&["-Zborrowck=migrate", "-Ztwo-phase-borrows"]); + rustc.args(&["-Zborrowck=mir"]); } Some(CompareMode::Polonius) => { - rustc.args(&["-Zpolonius", "-Zborrowck=mir", "-Ztwo-phase-borrows"]); + rustc.args(&["-Zpolonius", "-Zborrowck=mir"]); } None => {} } @@ -1863,6 +1932,11 @@ impl<'test> TestCx<'test> { } } + // Use dynamic musl for tests because static doesn't allow creating dylibs + if self.config.host.contains("musl") { + rustc.arg("-Ctarget-feature=-crt-static"); + } + rustc.args(&self.props.compile_flags); rustc @@ -2046,50 +2120,10 @@ impl<'test> TestCx<'test> { } fn fatal_proc_rec(&self, err: &str, proc_res: &ProcRes) -> ! { - self.try_print_open_handles(); self.error(err); proc_res.fatal(None); } - // This function is a poor man's attempt to debug rust-lang/rust#38620, if - // that's closed then this should be deleted - // - // This is a very "opportunistic" debugging attempt, so we ignore all - // errors here. - fn try_print_open_handles(&self) { - if !cfg!(windows) { - return; - } - if self.config.mode != Incremental { - return; - } - - let filename = match self.testpaths.file.file_stem() { - Some(path) => path, - None => return, - }; - - let mut cmd = Command::new("handle.exe"); - cmd.arg("-a").arg("-u"); - cmd.arg(filename); - cmd.arg("-nobanner"); - cmd.stdout(Stdio::piped()); - cmd.stderr(Stdio::piped()); - let output = match cmd.spawn().and_then(read2_abbreviated) { - Ok(output) => output, - Err(_) => return, - }; - println!("---------------------------------------------------"); - println!("ran extra command to debug rust-lang/rust#38620: "); - println!("{:?}", cmd); - println!("result: {}", output.status); - println!("--- stdout ----------------------------------------"); - println!("{}", String::from_utf8_lossy(&output.stdout)); - println!("--- stderr ----------------------------------------"); - println!("{}", String::from_utf8_lossy(&output.stderr)); - println!("---------------------------------------------------"); - } - // codegen tests (using FileCheck) fn compile_test_and_save_ir(&self) -> ProcRes { @@ -2181,9 +2215,7 @@ impl<'test> TestCx<'test> { fn charset() -> &'static str { // FreeBSD 10.1 defaults to GDB 6.1.1 which doesn't support "auto" charset - if cfg!(target_os = "bitrig") { - "auto" - } else if cfg!(target_os = "freebsd") { + if cfg!(target_os = "freebsd") { "ISO-8859-1" } else { "UTF-8" @@ -2634,8 +2666,7 @@ impl<'test> TestCx<'test> { create_dir_all(&tmpdir).unwrap(); let host = &self.config.host; - let make = if host.contains("bitrig") - || host.contains("dragonfly") + let make = if host.contains("dragonfly") || host.contains("freebsd") || host.contains("netbsd") || host.contains("openbsd") @@ -2684,10 +2715,24 @@ impl<'test> TestCx<'test> { cmd.env("CLANG", clang); } + if let Some(ref filecheck) = self.config.llvm_filecheck { + cmd.env("LLVM_FILECHECK", filecheck); + } + + if let Some(ref llvm_bin_dir) = self.config.llvm_bin_dir { + cmd.env("LLVM_BIN_DIR", llvm_bin_dir); + } + // We don't want RUSTFLAGS set from the outside to interfere with // compiler flags set in the test cases: cmd.env_remove("RUSTFLAGS"); + // Use dynamic musl for tests because static doesn't allow creating dylibs + if self.config.host.contains("musl") { + cmd.env("RUSTFLAGS", "-Ctarget-feature=-crt-static") + .env("IS_MUSL_HOST", "1"); + } + if self.config.target.contains("msvc") && self.config.cc != "" { // We need to pass a path to `lib.exe`, so assume that `cc` is `cl.exe` // and that `lib.exe` lives next to it. @@ -2800,7 +2845,7 @@ impl<'test> TestCx<'test> { let stderr = if explicit { proc_res.stderr.clone() } else { - json::extract_rendered(&proc_res.stderr, &proc_res) + json::extract_rendered(&proc_res.stderr) }; let normalized_stderr = self.normalize_output(&stderr, &self.props.normalize_stderr); @@ -2982,7 +3027,7 @@ impl<'test> TestCx<'test> { } fn check_mir_test_timestamp(&self, test_name: &str, output_file: &Path) { - let t = |file| FileTime::from_last_modification_time(&fs::metadata(file).unwrap()); + let t = |file| fs::metadata(file).unwrap().modified().unwrap(); let source_file = &self.testpaths.file; let output_time = t(output_file); let source_time = t(source_file); @@ -3123,42 +3168,40 @@ impl<'test> TestCx<'test> { } fn normalize_output(&self, output: &str, custom_rules: &[(String, String)]) -> String { - let parent_dir = self.testpaths.file.parent().unwrap(); let cflags = self.props.compile_flags.join(" "); let json = cflags.contains("--error-format json") || cflags.contains("--error-format pretty-json") || cflags.contains("--error-format=json") || cflags.contains("--error-format=pretty-json"); - let parent_dir_str = if json { - parent_dir.display().to_string().replace("\\", "\\\\") - } else { - parent_dir.display().to_string() + + let mut normalized = output.to_string(); + + let mut normalize_path = |from: &Path, to: &str| { + let mut from = from.display().to_string(); + if json { + from = from.replace("\\", "\\\\"); + } + normalized = normalized.replace(&from, to); }; - let mut normalized = output.replace(&parent_dir_str, "$DIR"); + let parent_dir = self.testpaths.file.parent().unwrap(); + normalize_path(parent_dir, "$DIR"); // Paths into the libstd/libcore let src_dir = self.config.src_base.parent().unwrap().parent().unwrap(); - let src_dir_str = if json { - src_dir.display().to_string().replace("\\", "\\\\") - } else { - src_dir.display().to_string() - }; - normalized = normalized.replace(&src_dir_str, "$SRC_DIR"); + normalize_path(src_dir, "$SRC_DIR"); // Paths into the build directory let test_build_dir = &self.config.build_base; let parent_build_dir = test_build_dir.parent().unwrap().parent().unwrap().parent().unwrap(); // eg. /home/user/rust/build/x86_64-unknown-linux-gnu/test/ui - normalized = normalized.replace(test_build_dir.to_str().unwrap(), "$TEST_BUILD_DIR"); + normalize_path(test_build_dir, "$TEST_BUILD_DIR"); // eg. /home/user/rust/build - normalized = normalized.replace(&parent_build_dir.to_str().unwrap(), "$BUILD_DIR"); + normalize_path(parent_build_dir, "$BUILD_DIR"); // Paths into lib directory. - let mut lib_dir = parent_build_dir.parent().unwrap().to_path_buf(); - lib_dir.push("lib"); - normalized = normalized.replace(&lib_dir.to_str().unwrap(), "$LIB_DIR"); + normalize_path(&parent_build_dir.parent().unwrap().join("lib"), "$LIB_DIR"); if json { // escaped newlines in json strings should be readable @@ -3420,9 +3463,13 @@ impl ProcRes { {}\n\ ------------------------------------------\n\ \n", - self.status, self.cmdline, self.stdout, self.stderr + self.status, self.cmdline, + json::extract_rendered(&self.stdout), + json::extract_rendered(&self.stderr), ); - panic!(); + // Use resume_unwind instead of panic!() to prevent a panic message + backtrace from + // compiletest, which is unnecessary noise. + std::panic::resume_unwind(Box::new(())); } } diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs index 50dce4b55a..8caf5ca00f 100644 --- a/src/tools/compiletest/src/util.rs +++ b/src/tools/compiletest/src/util.rs @@ -3,11 +3,12 @@ use std::env; use std::path::PathBuf; use crate::common::Config; +use log::*; + /// Conversion table from triple OS name to Rust SYSNAME const OS_TABLE: &'static [(&'static str, &'static str)] = &[ ("android", "android"), ("androideabi", "android"), - ("bitrig", "bitrig"), ("cloudabi", "cloudabi"), ("cuda", "cuda"), ("darwin", "macos"), diff --git a/src/tools/error_index_generator/main.rs b/src/tools/error_index_generator/main.rs index 04986b59ea..38bd3fc006 100644 --- a/src/tools/error_index_generator/main.rs +++ b/src/tools/error_index_generator/main.rs @@ -15,6 +15,7 @@ use std::path::Path; use std::path::PathBuf; use std::cell::RefCell; +use syntax::edition::DEFAULT_EDITION; use syntax::diagnostics::metadata::{get_metadata_dir, ErrorMetadataMap, ErrorMetadata}; use rustdoc::html::markdown::{Markdown, IdMap, ErrorCodes, PLAYGROUND}; @@ -97,7 +98,8 @@ impl Formatter for HTMLFormatter { Some(ref desc) => { let mut id_map = self.0.borrow_mut(); write!(output, "{}", - Markdown(desc, &[], RefCell::new(&mut id_map), ErrorCodes::Yes))? + Markdown(desc, &[], RefCell::new(&mut id_map), + ErrorCodes::Yes, DEFAULT_EDITION))? }, None => write!(output, "

No description.

\n")?, } diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs index 9a6c97dbca..e2bcd4d40a 100644 --- a/src/tools/linkchecker/main.rs +++ b/src/tools/linkchecker/main.rs @@ -135,8 +135,8 @@ fn check(cache: &mut Cache, file.ends_with("ty/struct.Slice.html") || file.ends_with("ty/enum.Attributes.html") || file.ends_with("ty/struct.SymbolName.html") || - file.ends_with("io/struct.IoVec.html") || - file.ends_with("io/struct.IoVecMut.html") { + file.ends_with("io/struct.IoSlice.html") || + file.ends_with("io/struct.IoSliceMut.html") { return None; } // FIXME(#32553) diff --git a/src/tools/publish_toolstate.py b/src/tools/publish_toolstate.py index 93d7aa5c1e..7d359fdcac 100755 --- a/src/tools/publish_toolstate.py +++ b/src/tools/publish_toolstate.py @@ -16,8 +16,8 @@ except ImportError: MAINTAINERS = { 'miri': '@oli-obk @RalfJung @eddyb', 'clippy-driver': '@Manishearth @llogiq @mcarton @oli-obk @phansch', - 'rls': '@nrc @Xanewok', - 'rustfmt': '@nrc @topecongiro', + 'rls': '@Xanewok', + 'rustfmt': '@topecongiro', 'book': '@carols10cents @steveklabnik', 'nomicon': '@frewsxcv @Gankro', 'reference': '@steveklabnik @Havvy @matthewjasper @ehuss', diff --git a/src/tools/rustbook/Cargo.toml b/src/tools/rustbook/Cargo.toml index 5bf1553b22..d2b1a7bac6 100644 --- a/src/tools/rustbook/Cargo.toml +++ b/src/tools/rustbook/Cargo.toml @@ -2,7 +2,7 @@ authors = ["The Rust Project Developers"] name = "rustbook" version = "0.1.0" -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" edition = "2018" [dependencies] diff --git a/src/tools/rustc-std-workspace-alloc/Cargo.toml b/src/tools/rustc-std-workspace-alloc/Cargo.toml new file mode 100644 index 0000000000..05df1fddc7 --- /dev/null +++ b/src/tools/rustc-std-workspace-alloc/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "rustc-std-workspace-alloc" +version = "1.0.0" +authors = ["Alex Crichton "] +license = 'MIT OR Apache-2.0' +description = """ +Hack for the compiler's own build system +""" + +[lib] +path = "lib.rs" + +[dependencies] +alloc = { path = "../../liballoc" } diff --git a/src/tools/rustc-std-workspace-alloc/lib.rs b/src/tools/rustc-std-workspace-alloc/lib.rs new file mode 100644 index 0000000000..c38a8d2f20 --- /dev/null +++ b/src/tools/rustc-std-workspace-alloc/lib.rs @@ -0,0 +1,9 @@ +#![feature(no_core)] +#![no_core] + +// See rustc-std-workspace-core for why this crate is needed. + +// Rename the crate to avoid conflicting with the alloc module in liballoc. +extern crate alloc as foo; + +pub use foo::*; diff --git a/src/tools/rustc-std-workspace-core/Cargo.toml b/src/tools/rustc-std-workspace-core/Cargo.toml index d527ce12bc..38ca56a557 100644 --- a/src/tools/rustc-std-workspace-core/Cargo.toml +++ b/src/tools/rustc-std-workspace-core/Cargo.toml @@ -2,7 +2,7 @@ name = "rustc-std-workspace-core" version = "1.0.0" authors = ["Alex Crichton "] -license = 'MIT/Apache-2.0' +license = 'MIT OR Apache-2.0' description = """ Hack for the compiler's own build system """ diff --git a/src/tools/rustc-workspace-hack/Cargo.toml b/src/tools/rustc-workspace-hack/Cargo.toml index d51841cd65..290c4481c0 100644 --- a/src/tools/rustc-workspace-hack/Cargo.toml +++ b/src/tools/rustc-workspace-hack/Cargo.toml @@ -2,7 +2,7 @@ name = "rustc-workspace-hack" version = "1.0.0" authors = ["Alex Crichton "] -license = 'MIT/Apache-2.0' +license = 'MIT OR Apache-2.0' description = """ Hack for the compiler's own build system """ diff --git a/src/tools/tidy/Cargo.toml b/src/tools/tidy/Cargo.toml index f7b491823f..eeac6cfbb3 100644 --- a/src/tools/tidy/Cargo.toml +++ b/src/tools/tidy/Cargo.toml @@ -2,8 +2,9 @@ name = "tidy" version = "0.1.0" authors = ["Alex Crichton "] +edition = "2018" [dependencies] -serde = "1.0.8" -serde_derive = "1.0.8" +regex = "1" +serde = { version = "1.0.8", features = ["derive"] } serde_json = "1.0.2" diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs index 30fe327cac..8626ba060b 100644 --- a/src/tools/tidy/src/deps.rs +++ b/src/tools/tidy/src/deps.rs @@ -5,6 +5,7 @@ use std::fs; use std::path::Path; use std::process::Command; +use serde::Deserialize; use serde_json; const LICENSES: &[&str] = &[ @@ -96,6 +97,7 @@ const WHITELIST: &[Crate<'_>] = &[ Crate("lock_api"), Crate("log"), Crate("log_settings"), + Crate("measureme"), Crate("memchr"), Crate("memmap"), Crate("memoffset"), diff --git a/src/tools/tidy/src/errors.rs b/src/tools/tidy/src/errors.rs index 76ebc9b601..ef1000ee50 100644 --- a/src/tools/tidy/src/errors.rs +++ b/src/tools/tidy/src/errors.rs @@ -15,7 +15,7 @@ pub fn check(path: &Path, bad: &mut bool) { &mut |path| super::filter_dirs(path) || path.ends_with("src/test"), &mut |file| { let filename = file.file_name().unwrap().to_string_lossy(); - if filename != "diagnostics.rs" && filename != "diagnostic_list.rs" { + if filename != "error_codes.rs" { return } diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs index 1eab217027..637f10c5ae 100644 --- a/src/tools/tidy/src/features.rs +++ b/src/tools/tidy/src/features.rs @@ -7,6 +7,7 @@ //! * Library features have at most one stability level. //! * Library features have at most one `since` value. //! * All unstable lang features have tests to ensure they are actually unstable. +//! * Language features in a group are sorted by `since` value. use std::collections::HashMap; use std::fmt; @@ -14,6 +15,14 @@ use std::fs::{self, File}; use std::io::prelude::*; use std::path::Path; +use regex::{Regex, escape}; + +mod version; +use version::Version; + +const FEATURE_GROUP_START_PREFIX: &str = "// feature-group-start"; +const FEATURE_GROUP_END_PREFIX: &str = "// feature-group-end"; + #[derive(Debug, PartialEq, Clone)] pub enum Status { Stable, @@ -35,7 +44,7 @@ impl fmt::Display for Status { #[derive(Debug, Clone)] pub struct Feature { pub level: Status, - pub since: String, + pub since: Option, pub has_gate_test: bool, pub tracking_issue: Option, } @@ -129,20 +138,8 @@ pub fn check(path: &Path, bad: &mut bool, quiet: bool) { } let mut lines = Vec::new(); - for (name, feature) in features.iter() { - lines.push(format!("{:<32} {:<8} {:<12} {:<8}", - name, - "lang", - feature.level, - feature.since)); - } - for (name, feature) in lib_features { - lines.push(format!("{:<32} {:<8} {:<12} {:<8}", - name, - "lib", - feature.level, - feature.since)); - } + lines.extend(format_features(&features, "lang")); + lines.extend(format_features(&lib_features, "lib")); lines.sort(); for line in lines { @@ -150,11 +147,31 @@ pub fn check(path: &Path, bad: &mut bool, quiet: bool) { } } +fn format_features<'a>(features: &'a Features, family: &'a str) -> impl Iterator + 'a { + features.iter().map(move |(name, feature)| { + format!("{:<32} {:<8} {:<12} {:<8}", + name, + family, + feature.level, + feature.since.map_or("None".to_owned(), + |since| since.to_string())) + }) +} + fn find_attr_val<'a>(line: &'a str, attr: &str) -> Option<&'a str> { - line.find(attr) - .and_then(|i| line[i..].find('"').map(|j| i + j + 1)) - .and_then(|i| line[i..].find('"').map(|j| (i, i + j))) - .map(|(i, j)| &line[i..j]) + let r = Regex::new(&format!(r#"{}\s*=\s*"([^"]*)""#, escape(attr))) + .expect("malformed regex for find_attr_val"); + r.captures(line) + .and_then(|c| c.get(1)) + .map(|m| m.as_str()) +} + +#[test] +fn test_find_attr_val() { + let s = r#"#[unstable(feature = "checked_duration_since", issue = "58402")]"#; + assert_eq!(find_attr_val(s, "feature"), Some("checked_duration_since")); + assert_eq!(find_attr_val(s, "issue"), Some("58402")); + assert_eq!(find_attr_val(s, "since"), None); } fn test_filen_gate(filen_underscore: &str, features: &mut Features) -> bool { @@ -173,17 +190,46 @@ pub fn collect_lang_features(base_src_path: &Path, bad: &mut bool) -> Features { let contents = t!(fs::read_to_string(base_src_path.join("libsyntax/feature_gate.rs"))); // We allow rustc-internal features to omit a tracking issue. - // These features must be marked with a `// rustc internal` in its own group. - let mut next_feature_is_rustc_internal = false; + // To make tidy accept omitting a tracking issue, group the list of features + // without one inside `// no-tracking-issue` and `// no-tracking-issue-end`. + let mut next_feature_omits_tracking_issue = false; + + let mut in_feature_group = false; + let mut prev_since = None; contents.lines().zip(1..) .filter_map(|(line, line_number)| { let line = line.trim(); - if line.starts_with("// rustc internal") { - next_feature_is_rustc_internal = true; + + // Within -start and -end, the tracking issue can be omitted. + match line { + "// no-tracking-issue-start" => { + next_feature_omits_tracking_issue = true; + return None; + } + "// no-tracking-issue-end" => { + next_feature_omits_tracking_issue = false; + return None; + } + _ => {} + } + + if line.starts_with(FEATURE_GROUP_START_PREFIX) { + if in_feature_group { + tidy_error!( + bad, + // ignore-tidy-linelength + "libsyntax/feature_gate.rs:{}: new feature group is started without ending the previous one", + line_number, + ); + } + + in_feature_group = true; + prev_since = None; return None; - } else if line.is_empty() { - next_feature_is_rustc_internal = false; + } else if line.starts_with(FEATURE_GROUP_END_PREFIX) { + in_feature_group = false; + prev_since = None; return None; } @@ -195,10 +241,36 @@ pub fn collect_lang_features(base_src_path: &Path, bad: &mut bool) -> Features { _ => return None, }; let name = parts.next().unwrap().trim(); - let since = parts.next().unwrap().trim().trim_matches('"'); + + let since_str = parts.next().unwrap().trim().trim_matches('"'); + let since = match since_str.parse() { + Ok(since) => Some(since), + Err(err) => { + tidy_error!( + bad, + "libsyntax/feature_gate.rs:{}: failed to parse since: {} ({:?})", + line_number, + since_str, + err, + ); + None + } + }; + if in_feature_group { + if prev_since > since { + tidy_error!( + bad, + "libsyntax/feature_gate.rs:{}: feature {} is not sorted by since", + line_number, + name, + ); + } + prev_since = since; + } + let issue_str = parts.next().unwrap().trim(); let tracking_issue = if issue_str.starts_with("None") { - if level == Status::Unstable && !next_feature_is_rustc_internal { + if level == Status::Unstable && !next_feature_omits_tracking_issue { *bad = true; tidy_error!( bad, @@ -209,14 +281,13 @@ pub fn collect_lang_features(base_src_path: &Path, bad: &mut bool) -> Features { } None } else { - next_feature_is_rustc_internal = false; let s = issue_str.split('(').nth(1).unwrap().split(')').nth(0).unwrap(); Some(s.parse().unwrap()) }; Some((name.to_owned(), Feature { level, - since: since.to_owned(), + since, has_gate_test: false, tracking_issue, })) @@ -233,7 +304,7 @@ pub fn collect_lib_features(base_src_path: &Path) -> Features { // add it to the set of known library features so we can still generate docs. lib_features.insert("compiler_builtins_lib".to_owned(), Feature { level: Status::Unstable, - since: String::new(), + since: None, has_gate_test: false, tracking_issue: None, }); @@ -330,11 +401,11 @@ fn map_lib_features(base_src_path: &Path, // `const fn` features are handled specially. let feature_name = match find_attr_val(line, "feature") { Some(name) => name, - None => err!("malformed stability attribute"), + None => err!("malformed stability attribute: missing `feature` key"), }; let feature = Feature { level: Status::Unstable, - since: "None".to_owned(), + since: None, has_gate_test: false, // FIXME(#57563): #57563 is now used as a common tracking issue, // although we would like to have specific tracking issues for each @@ -353,20 +424,23 @@ fn map_lib_features(base_src_path: &Path, }; let feature_name = match find_attr_val(line, "feature") { Some(name) => name, - None => err!("malformed stability attribute"), + None => err!("malformed stability attribute: missing `feature` key"), }; - let since = match find_attr_val(line, "since") { - Some(name) => name, + let since = match find_attr_val(line, "since").map(|x| x.parse()) { + Some(Ok(since)) => Some(since), + Some(Err(_err)) => { + err!("malformed stability attribute: can't parse `since` key"); + }, None if level == Status::Stable => { - err!("malformed stability attribute"); + err!("malformed stability attribute: missing the `since` key"); } - None => "None", + None => None, }; let tracking_issue = find_attr_val(line, "issue").map(|s| s.parse().unwrap()); let feature = Feature { level, - since: since.to_owned(), + since, has_gate_test: false, tracking_issue, }; diff --git a/src/tools/tidy/src/features/version.rs b/src/tools/tidy/src/features/version.rs new file mode 100644 index 0000000000..1ce9fe127d --- /dev/null +++ b/src/tools/tidy/src/features/version.rs @@ -0,0 +1,90 @@ +use std::str::FromStr; +use std::num::ParseIntError; +use std::fmt; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] +pub struct Version { + parts: [u32; 3], +} + +impl fmt::Display for Version { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.pad(&format!("{}.{}.{}", self.parts[0], self.parts[1], self.parts[2])) + } +} + +#[derive(Debug, PartialEq, Eq)] +pub enum ParseVersionError { + ParseIntError(ParseIntError), + WrongNumberOfParts, +} + +impl From for ParseVersionError { + fn from(err: ParseIntError) -> Self { + ParseVersionError::ParseIntError(err) + } +} + +impl FromStr for Version { + type Err = ParseVersionError; + + fn from_str(s: &str) -> Result { + let mut iter = s.split('.').map(|part| Ok(part.parse()?)); + + let mut part = || { + iter.next() + .unwrap_or(Err(ParseVersionError::WrongNumberOfParts)) + }; + + let parts = [part()?, part()?, part()?]; + + if let Some(_) = iter.next() { + // Ensure we don't have more than 3 parts. + return Err(ParseVersionError::WrongNumberOfParts); + } + + Ok(Self { parts }) + } +} + +#[cfg(test)] +mod test { + use super::Version; + + #[test] + fn test_try_from_invalid_version() { + assert!("".parse::().is_err()); + assert!("hello".parse::().is_err()); + assert!("1.32.hi".parse::().is_err()); + assert!("1.32..1".parse::().is_err()); + assert!("1.32".parse::().is_err()); + assert!("1.32.0.1".parse::().is_err()); + } + + #[test] + fn test_try_from_single() { + assert_eq!("1.32.0".parse(), Ok(Version { parts: [1, 32, 0] })); + assert_eq!("1.0.0".parse(), Ok(Version { parts: [1, 0, 0] })); + } + + #[test] + fn test_compare() { + let v_1_0_0 = "1.0.0".parse::().unwrap(); + let v_1_32_0 = "1.32.0".parse::().unwrap(); + let v_1_32_1 = "1.32.1".parse::().unwrap(); + assert!(v_1_0_0 < v_1_32_1); + assert!(v_1_0_0 < v_1_32_0); + assert!(v_1_32_0 < v_1_32_1); + } + + #[test] + fn test_to_string() { + let v_1_0_0 = "1.0.0".parse::().unwrap(); + let v_1_32_1 = "1.32.1".parse::().unwrap(); + + assert_eq!(v_1_0_0.to_string(), "1.0.0"); + assert_eq!(v_1_32_1.to_string(), "1.32.1"); + assert_eq!(format!("{:<8}", v_1_32_1), "1.32.1 "); + assert_eq!(format!("{:>8}", v_1_32_1), " 1.32.1"); + } +} diff --git a/src/tools/tidy/src/lib.rs b/src/tools/tidy/src/lib.rs index c4a1246ffd..d06c99725b 100644 --- a/src/tools/tidy/src/lib.rs +++ b/src/tools/tidy/src/lib.rs @@ -3,12 +3,6 @@ //! This library contains the tidy lints and exposes it //! to be used by tools. -#![deny(rust_2018_idioms)] - -extern crate serde_json; -#[macro_use] -extern crate serde_derive; - use std::fs; use std::path::Path; diff --git a/src/tools/tidy/src/main.rs b/src/tools/tidy/src/main.rs index 6622403826..eef3719043 100644 --- a/src/tools/tidy/src/main.rs +++ b/src/tools/tidy/src/main.rs @@ -4,10 +4,8 @@ //! etc. This is run by default on `make check` and as part of the auto //! builders. -#![deny(rust_2018_idioms)] #![deny(warnings)] -extern crate tidy; use tidy::*; use std::process; diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs index a4321cd757..e860f2e9df 100644 --- a/src/tools/tidy/src/style.rs +++ b/src/tools/tidy/src/style.rs @@ -3,14 +3,15 @@ //! Example checks are: //! //! * No lines over 100 characters. +//! * No files with over 3000 lines. //! * No tabs. //! * No trailing whitespace. //! * No CR characters. //! * No `TODO` or `XXX` directives. //! * No unexplained ` ```ignore ` or ` ```rust,ignore ` doc tests. //! -//! A number of these checks can be opted-out of with various directives like -//! `// ignore-tidy-linelength`. +//! A number of these checks can be opted-out of with various directives of the form: +//! `// ignore-tidy-CHECK-NAME`. use std::fs::File; use std::io::prelude::*; @@ -18,6 +19,8 @@ use std::path::Path; const COLS: usize = 100; +const LINES: usize = 3000; + const UNEXPLAINED_IGNORE_DOCTEST_INFO: &str = r#"unexplained "```ignore" doctest; try one: * make the test actually pass, by adding necessary imports and declarations, or @@ -35,7 +38,7 @@ when executed when assertions are disabled. Use llvm::report_fatal_error for increased robustness."; /// Parser states for `line_is_url`. -#[derive(PartialEq)] +#[derive(Clone, Copy, PartialEq)] #[allow(non_camel_case_types)] enum LIUState { EXP_COMMENT_START, @@ -53,11 +56,12 @@ enum LIUState { fn line_is_url(line: &str) -> bool { use self::LIUState::*; let mut state: LIUState = EXP_COMMENT_START; + let is_url = |w: &str| w.starts_with("http://") || w.starts_with("https://"); for tok in line.split_whitespace() { match (state, tok) { - (EXP_COMMENT_START, "//") => state = EXP_LINK_LABEL_OR_URL, - (EXP_COMMENT_START, "///") => state = EXP_LINK_LABEL_OR_URL, + (EXP_COMMENT_START, "//") | + (EXP_COMMENT_START, "///") | (EXP_COMMENT_START, "//!") => state = EXP_LINK_LABEL_OR_URL, (EXP_LINK_LABEL_OR_URL, w) @@ -65,14 +69,18 @@ fn line_is_url(line: &str) -> bool { => state = EXP_URL, (EXP_LINK_LABEL_OR_URL, w) - if w.starts_with("http://") || w.starts_with("https://") + if is_url(w) => state = EXP_END, (EXP_URL, w) - if w.starts_with("http://") || w.starts_with("https://") || w.starts_with("../") + if is_url(w) || w.starts_with("../") + => state = EXP_END, + + (_, w) + if w.len() > COLS && is_url(w) => state = EXP_END, - (_, _) => return false, + (_, _) => {} } } @@ -90,6 +98,36 @@ fn long_line_is_ok(line: &str) -> bool { false } +enum Directive { + /// By default, tidy always warns against style issues. + Deny, + + /// `Ignore(false)` means that an `ignore-tidy-*` directive + /// has been provided, but is unnecessary. `Ignore(true)` + /// means that it is necessary (i.e. a warning would be + /// produced if `ignore-tidy-*` was not present). + Ignore(bool), +} + +fn contains_ignore_directive(contents: &String, check: &str) -> Directive { + if contents.contains(&format!("// ignore-tidy-{}", check)) || + contents.contains(&format!("# ignore-tidy-{}", check)) { + Directive::Ignore(false) + } else { + Directive::Deny + } +} + +macro_rules! suppressible_tidy_err { + ($err:ident, $skip:ident, $msg:expr) => { + if let Directive::Deny = $skip { + $err($msg); + } else { + $skip = Directive::Ignore(true); + } + }; +} + pub fn check(path: &Path, bad: &mut bool) { let mut contents = String::new(); super::walk(path, &mut super::filter_dirs, &mut |file| { @@ -107,28 +145,34 @@ pub fn check(path: &Path, bad: &mut bool) { tidy_error!(bad, "{}: empty file", file.display()); } - let skip_cr = contents.contains("ignore-tidy-cr"); - let skip_tab = contents.contains("ignore-tidy-tab"); - let skip_length = contents.contains("ignore-tidy-linelength"); - let skip_end_whitespace = contents.contains("ignore-tidy-end-whitespace"); - let skip_copyright = contents.contains("ignore-tidy-copyright"); + let mut skip_cr = contains_ignore_directive(&contents, "cr"); + let mut skip_tab = contains_ignore_directive(&contents, "tab"); + let mut skip_line_length = contains_ignore_directive(&contents, "linelength"); + let mut skip_file_length = contains_ignore_directive(&contents, "filelength"); + let mut skip_end_whitespace = contains_ignore_directive(&contents, "end-whitespace"); + let mut skip_copyright = contains_ignore_directive(&contents, "copyright"); + let mut leading_new_lines = false; let mut trailing_new_lines = 0; + let mut lines = 0; for (i, line) in contents.split('\n').enumerate() { let mut err = |msg: &str| { tidy_error!(bad, "{}:{}: {}", file.display(), i + 1, msg); }; - if !skip_length && line.chars().count() > COLS - && !long_line_is_ok(line) { - err(&format!("line longer than {} chars", COLS)); + if line.chars().count() > COLS && !long_line_is_ok(line) { + suppressible_tidy_err!( + err, + skip_line_length, + &format!("line longer than {} chars", COLS) + ); } - if !skip_tab && line.contains('\t') { - err("tab character"); + if line.contains('\t') { + suppressible_tidy_err!(err, skip_tab, "tab character"); } - if !skip_end_whitespace && (line.ends_with(' ') || line.ends_with('\t')) { - err("trailing whitespace"); + if line.ends_with(' ') || line.ends_with('\t') { + suppressible_tidy_err!(err, skip_end_whitespace, "trailing whitespace"); } - if !skip_cr && line.contains('\r') { - err("CR character"); + if line.contains('\r') { + suppressible_tidy_err!(err, skip_cr, "CR character"); } if filename != "style.rs" { if line.contains("TODO") { @@ -138,12 +182,16 @@ pub fn check(path: &Path, bad: &mut bool) { err("XXX is deprecated; use FIXME") } } - if !skip_copyright && (line.starts_with("// Copyright") || - line.starts_with("# Copyright") || - line.starts_with("Copyright")) - && (line.contains("Rust Developers") || - line.contains("Rust Project Developers")) { - err("copyright notices attributed to the Rust Project Developers are deprecated"); + if (line.starts_with("// Copyright") || + line.starts_with("# Copyright") || + line.starts_with("Copyright")) + && (line.contains("Rust Developers") || + line.contains("Rust Project Developers")) { + suppressible_tidy_err!( + err, + skip_copyright, + "copyright notices attributed to the Rust Project Developers are deprecated" + ); } if line.ends_with("```ignore") || line.ends_with("```rust,ignore") { err(UNEXPLAINED_IGNORE_DOCTEST_INFO); @@ -152,15 +200,53 @@ pub fn check(path: &Path, bad: &mut bool) { err(LLVM_UNREACHABLE_INFO); } if line.is_empty() { + if i == 0 { + leading_new_lines = true; + } trailing_new_lines += 1; } else { trailing_new_lines = 0; } + lines = i; + } + if leading_new_lines { + tidy_error!(bad, "{}: leading newline", file.display()); } match trailing_new_lines { 0 => tidy_error!(bad, "{}: missing trailing newline", file.display()), - 1 | 2 => {} + 1 => {} n => tidy_error!(bad, "{}: too many trailing newlines ({})", file.display(), n), }; + if lines > LINES { + let mut err = |_| { + tidy_error!( + bad, + "{}: too many lines ({}) (add `// \ + ignore-tidy-filelength` to the file to suppress this error)", + file.display(), + lines + ); + }; + suppressible_tidy_err!(err, skip_file_length, ""); + } + + if let Directive::Ignore(false) = skip_cr { + tidy_error!(bad, "{}: ignoring CR characters unnecessarily", file.display()); + } + if let Directive::Ignore(false) = skip_tab { + tidy_error!(bad, "{}: ignoring tab characters unnecessarily", file.display()); + } + if let Directive::Ignore(false) = skip_line_length { + tidy_error!(bad, "{}: ignoring line length unnecessarily", file.display()); + } + if let Directive::Ignore(false) = skip_file_length { + tidy_error!(bad, "{}: ignoring file length unnecessarily", file.display()); + } + if let Directive::Ignore(false) = skip_end_whitespace { + tidy_error!(bad, "{}: ignoring trailing whitespace unnecessarily", file.display()); + } + if let Directive::Ignore(false) = skip_copyright { + tidy_error!(bad, "{}: ignoring copyright unnecessarily", file.display()); + } }) } diff --git a/src/tools/tidy/src/unstable_book.rs b/src/tools/tidy/src/unstable_book.rs index cd60f36b1d..f7e40ce4ba 100644 --- a/src/tools/tidy/src/unstable_book.rs +++ b/src/tools/tidy/src/unstable_book.rs @@ -3,13 +3,13 @@ use std::fs; use std::path; use crate::features::{collect_lang_features, collect_lib_features, Features, Status}; -pub const PATH_STR: &str = "doc/unstable-book/src"; +pub const PATH_STR: &str = "doc/unstable-book"; -pub const COMPILER_FLAGS_DIR: &str = "compiler-flags"; +pub const COMPILER_FLAGS_DIR: &str = "src/compiler-flags"; -pub const LANG_FEATURES_DIR: &str = "language-features"; +pub const LANG_FEATURES_DIR: &str = "src/language-features"; -pub const LIB_FEATURES_DIR: &str = "library-features"; +pub const LIB_FEATURES_DIR: &str = "src/library-features"; /// Builds the path to the Unstable Book source directory from the Rust 'src' directory. pub fn unstable_book_path(base_src_path: &path::Path) -> path::PathBuf { diff --git a/src/tools/unstable-book-gen/Cargo.toml b/src/tools/unstable-book-gen/Cargo.toml index 3209de09ae..e43e4e6c7c 100644 --- a/src/tools/unstable-book-gen/Cargo.toml +++ b/src/tools/unstable-book-gen/Cargo.toml @@ -3,7 +3,7 @@ authors = ["est31 ", "The Rust Project Developers"] name = "unstable-book-gen" version = "0.1.0" -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" edition = "2018" [dependencies] diff --git a/src/tools/unstable-book-gen/src/main.rs b/src/tools/unstable-book-gen/src/main.rs index 427014ce7f..e92d174a4e 100644 --- a/src/tools/unstable-book-gen/src/main.rs +++ b/src/tools/unstable-book-gen/src/main.rs @@ -52,7 +52,7 @@ fn set_to_summary_str(set: &BTreeSet, dir: &str fn generate_summary(path: &Path, lang_features: &Features, lib_features: &Features) { let compiler_flags = collect_unstable_book_section_file_names( - &path.join("compiler-flags")); + &path.join("src/compiler-flags")); let compiler_flags_str = set_to_summary_str(&compiler_flags, "compiler-flags"); @@ -61,11 +61,11 @@ fn generate_summary(path: &Path, lang_features: &Features, lib_features: &Featur let unstable_lib_features = collect_unstable_feature_names(&lib_features); let lang_features_str = set_to_summary_str(&unstable_lang_features, - LANG_FEATURES_DIR); + "language-features"); let lib_features_str = set_to_summary_str(&unstable_lib_features, - LIB_FEATURES_DIR); + "library-features"); - let mut file = t!(File::create(&path.join("SUMMARY.md"))); + let mut file = t!(File::create(&path.join("src/SUMMARY.md"))); t!(file.write_fmt(format_args!(include_str!("SUMMARY.md"), compiler_flags = compiler_flags_str, language_features = lang_features_str, @@ -102,8 +102,8 @@ fn generate_unstable_book_files(src :&Path, out: &Path, features :&Features) { } } -fn copy_recursive(path: &Path, to: &Path) { - for entry in t!(fs::read_dir(path)) { +fn copy_recursive(from: &Path, to: &Path) { + for entry in t!(fs::read_dir(from)) { let e = t!(entry); let t = t!(e.metadata()); let dest = &to.join(e.file_name()); @@ -120,7 +120,7 @@ fn main() { let src_path_str = env::args_os().skip(1).next().expect("source path required"); let dest_path_str = env::args_os().skip(2).next().expect("destination path required"); let src_path = Path::new(&src_path_str); - let dest_path = Path::new(&dest_path_str).join("src"); + let dest_path = Path::new(&dest_path_str); let lang_features = collect_lang_features(src_path, &mut false); let lib_features = collect_lib_features(src_path).into_iter().filter(|&(ref name, _)| { diff --git a/vendor/aho-corasick/.cargo-checksum.json b/vendor/aho-corasick/.cargo-checksum.json index 7caae16dca..ab62a46939 100644 --- a/vendor/aho-corasick/.cargo-checksum.json +++ b/vendor/aho-corasick/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"2b5e42ae354311f29e53b600dffb398db134de1747c4ac96fd16fc16fbb9d4d1","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","README.md":"9fb3256ce6fc5b25c9a92fe3b8f7a82a26d380fcf6121c934c2bb6f85102fede","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","benches/bench.rs":"c74b297ed2217e4784614573a8b44c61dfe5173985c43616e43a3f608973ff2e","benches/random.txt":"9386fb3efedc7ffbd09fb49088347f1056bc2d90a861009fa2f804cdb714efcb","examples/dict-search.rs":"0dac88736039262dfb8df9ff85ece18de90dd4da9b8b895cf4d57bf33167b224","src/autiter.rs":"b3bd067bf6c25708109870afbb5d09e9a04d0f2f596f59c368e42ddbc7c65f93","src/full.rs":"acb6389d210e7bc4125f0ebb6f268b712e60ec50b58b9c4094a8083bb8f4caf2","src/lib.rs":"fdddbb688fbc71461242b94e1cfb3dfbf0a9f06b2c70a6e83de15a0e54804a28","src/main.rs":"fc867cb5f0b02d0f49ecab06b72c05a247cbcf3bf9228c235de8e787bda7bef5"},"package":"1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e"} \ No newline at end of file +{"files":{"COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"c56aa8bda01ff932315d495e4c62b504705494de787009ba17218140e649b18a","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","README.md":"29ee1d965d1866f25b5ab26c4b575a223483352a5dcce44b976784e1dbb3022f","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","appveyor.yml":"58611cb205ec8e1a26c0deabea4c11daa99ddf7feb7296f78ea406a9a8f04c18","src/ahocorasick.rs":"69b0f0c4fbe531572c2d4480d6e455676aea5fb939393ada5082303238c5159a","src/automaton.rs":"5120e3a981a975adfb8a5d092dd0a50b15f458823812c59fc942c240f7c45523","src/buffer.rs":"5eaabcbea8ea9f7effb57ee1d6740e51200efd13d80d9ccd7298b216590788e1","src/classes.rs":"4068c23cf18d6ce5e882dc21e284985537eaa72a8f1e4fdba798b5f76ad53c45","src/dfa.rs":"6bbb79dd568474d608db6a3833d28ff549209339d8cf28d3028665ece747f979","src/error.rs":"16152e279117880f8f51b12798c002cae9c3472ac7d77d103b0b40ab46228e3b","src/lib.rs":"9a852e08e603b266202d7a684a1884f221738cd672ad4031e68a6fc9d7d3865b","src/nfa.rs":"6b97f18dea0b2bd29d766c299e2279b6a97826c7cb7bbfef29b87462ebbe8a0f","src/prefilter.rs":"82bc5d372bf0f92894a47dc36e7f839f6db47398445263314f764563fb146e2b","src/state_id.rs":"a184112c0652bd637fab4547326fa5f959a0803bb4d43fca97be04d2757e97f2","src/tests.rs":"1deb7e946f5ffbe66cab5d474bbb41af13db19643c072f658d6e1e53564e13ae"},"package":"e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c"} \ No newline at end of file diff --git a/vendor/aho-corasick/Cargo.toml b/vendor/aho-corasick/Cargo.toml index 155d48e838..6bbcc16dae 100644 --- a/vendor/aho-corasick/Cargo.toml +++ b/vendor/aho-corasick/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,18 +12,17 @@ [package] name = "aho-corasick" -version = "0.6.9" +version = "0.7.3" authors = ["Andrew Gallant "] -exclude = ["/benches/sherlock.txt", "/ci/*", "/.travis.yml", "/Makefile", "/ctags.rust", "/session.vim"] -description = "Fast multiple substring searching with finite state machines." +exclude = ["/aho-corasick-debug", "/bench", "/ci/*", "/.travis.yml"] +autotests = false +description = "Fast multiple substring searching." homepage = "https://github.com/BurntSushi/aho-corasick" readme = "README.md" -keywords = ["string", "search", "text", "aho", "corasick"] +keywords = ["string", "search", "text", "aho", "multi"] +categories = ["text-processing"] license = "Unlicense/MIT" repository = "https://github.com/BurntSushi/aho-corasick" -[profile.test] -debug = true - [profile.bench] debug = true @@ -32,41 +31,15 @@ debug = true [lib] name = "aho_corasick" - -[[bin]] -name = "aho-corasick-dot" -path = "src/main.rs" -test = false -bench = false -doc = false - -[[bench]] -name = "bench" -path = "benches/bench.rs" -test = false -bench = true [dependencies.memchr] -version = "2" -[dev-dependencies.csv] -version = "1" - -[dev-dependencies.docopt] -version = "1" - -[dev-dependencies.memmap] -version = "0.6" - -[dev-dependencies.quickcheck] -version = "0.7" +version = "2.2.0" default-features = false -[dev-dependencies.rand] -version = "0.5" - -[dev-dependencies.serde] -version = "1" +[features] +default = ["std"] +std = ["memchr/use_std"] +[badges.appveyor] +repository = "BurntSushi/regex-automata" -[dev-dependencies.serde_derive] -version = "1" [badges.travis-ci] repository = "BurntSushi/aho-corasick" diff --git a/vendor/aho-corasick/README.md b/vendor/aho-corasick/README.md index 25e9ef9173..6134081d89 100644 --- a/vendor/aho-corasick/README.md +++ b/vendor/aho-corasick/README.md @@ -1,15 +1,14 @@ -This crate provides an implementation of the -[Aho-Corasick](http://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_string_matching_algorithm) -algorithm. Its intended use case is for fast substring matching, particularly -when matching multiple substrings in a search text. This is achieved by -compiling the substrings into a finite state machine. - -This implementation provides optimal algorithmic time complexity. Construction -of the finite state machine is `O(p)` where `p` is the length of the substrings -concatenated. Matching against search text is `O(n + p + m)`, where `n` is -the length of the search text and `m` is the number of matches. - -[![Build status](https://api.travis-ci.org/BurntSushi/aho-corasick.png)](https://travis-ci.org/BurntSushi/aho-corasick) +aho-corasick +============ +A library for finding occurrences of many patterns at once. This library +provides multiple pattern search principally through an implementation of the +[Aho-Corasick algorithm](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm), +which builds a fast finite state machine for executing searches in linear time. +Features include case insensitive matching, overlapping matches and search & +replace in streams. + +[![Linux build status](https://api.travis-ci.org/BurntSushi/aho-corasick.svg)](https://travis-ci.org/BurntSushi/aho-corasick) +[![Windows build status](https://ci.appveyor.com/api/projects/status/github/BurntSushi/aho-corasick?svg=true)](https://ci.appveyor.com/project/BurntSushi/aho-corasick) [![](http://meritbadge.herokuapp.com/aho-corasick)](https://crates.io/crates/aho-corasick) Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org). @@ -17,39 +16,175 @@ Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org). ### Documentation -[https://docs.rs/aho-corasick/](https://docs.rs/aho-corasick/). +https://docs.rs/aho-corasick + + +### Usage + +Add this to your `Cargo.toml`: + +```toml +[dependencies] +aho-corasick = "0.7" +``` + +and this to your crate root (if you're using Rust 2015): + +```rust +extern crate aho_corasick; +``` + + +### Example: basic searching + +This example shows how to search for occurrences of multiple patterns +simultaneously. Each match includes the pattern that matched along with the +byte offsets of the match. + +```rust +use aho_corasick::AhoCorasick; + +let patterns = &["apple", "maple", "Snapple"]; +let haystack = "Nobody likes maple in their apple flavored Snapple."; + +let ac = AhoCorasick::new(patterns); +let mut matches = vec![]; +for mat in ac.find_iter(haystack) { + matches.push((mat.pattern(), mat.start(), mat.end())); +} +assert_eq!(matches, vec![ + (1, 13, 18), + (0, 28, 33), + (2, 43, 50), +]); +``` + + +### Example: case insensitivity + +This is like the previous example, but matches `Snapple` case insensitively +using `AhoCorasickBuilder`: + +```rust +use aho_corasick::AhoCorasickBuilder; + +let patterns = &["apple", "maple", "snapple"]; +let haystack = "Nobody likes maple in their apple flavored Snapple."; + +let ac = AhoCorasickBuilder::new() + .ascii_case_insensitive(true) + .build(patterns); +let mut matches = vec![]; +for mat in ac.find_iter(haystack) { + matches.push((mat.pattern(), mat.start(), mat.end())); +} +assert_eq!(matches, vec![ + (1, 13, 18), + (0, 28, 33), + (2, 43, 50), +]); +``` + +### Example: replacing matches in a stream -### Example +This example shows how to execute a search and replace on a stream without +loading the entire stream into memory first. + +```rust +use aho_corasick::AhoCorasick; -The documentation contains several examples, and there is a more complete -example as a full program in `examples/dict-search.rs`. +# fn example() -> Result<(), ::std::io::Error> { +let patterns = &["fox", "brown", "quick"]; +let replace_with = &["sloth", "grey", "slow"]; + +// In a real example, these might be `std::fs::File`s instead. All you need to +// do is supply a pair of `std::io::Read` and `std::io::Write` implementations. +let rdr = "The quick brown fox."; +let mut wtr = vec![]; + +let ac = AhoCorasick::new(patterns); +ac.stream_replace_all(rdr.as_bytes(), &mut wtr, replace_with)?; +assert_eq!(b"The slow grey sloth.".to_vec(), wtr); +# Ok(()) }; example().unwrap() +``` -Here is a quick example showing simple substring matching: + +### Example: finding the leftmost first match + +In the textbook description of Aho-Corasick, its formulation is typically +structured such that it reports all possible matches, even when they overlap +with another. In many cases, overlapping matches may not be desired, such as +the case of finding all successive non-overlapping matches like you might with +a standard regular expression. + +Unfortunately the "obvious" way to modify the Aho-Corasick algorithm to do +this doesn't always work in the expected way, since it will report matches as +soon as they are seen. For example, consider matching the regex `Samwise|Sam` +against the text `Samwise`. Most regex engines (that are Perl-like, or +non-POSIX) will report `Samwise` as a match, but the standard Aho-Corasick +algorithm modified for reporting non-overlapping matches will report `Sam`. + +A novel contribution of this library is the ability to change the match +semantics of Aho-Corasick (without additional search time overhead) such that +`Samwise` is reported instead. For example, here's the standard approach: ```rust -use aho_corasick::{Automaton, AcAutomaton, Match}; - -let aut = AcAutomaton::new(vec!["apple", "maple"]); -let mut it = aut.find("I like maple apples."); -assert_eq!(it.next(), Some(Match { - pati: 1, - start: 7, - end: 12, -})); -assert_eq!(it.next(), Some(Match { - pati: 0, - start: 13, - end: 18, -})); -assert_eq!(it.next(), None); +use aho_corasick::AhoCorasick; + +let patterns = &["Samwise", "Sam"]; +let haystack = "Samwise"; + +let ac = AhoCorasick::new(patterns); +let mat = ac.find(haystack).expect("should have a match"); +assert_eq!("Sam", &haystack[mat.start()..mat.end()]); ``` +And now here's the leftmost-first version, which matches how a Perl-like +regex will work: + +```rust +use aho_corasick::{AhoCorasickBuilder, MatchKind}; + +let patterns = &["Samwise", "Sam"]; +let haystack = "Samwise"; + +let ac = AhoCorasickBuilder::new() + .match_kind(MatchKind::LeftmostFirst) + .build(patterns); +let mat = ac.find(haystack).expect("should have a match"); +assert_eq!("Samwise", &haystack[mat.start()..mat.end()]); +``` + +In addition to leftmost-first semantics, this library also supports +leftmost-longest semantics, which match the POSIX behavior of a regular +expression alternation. See `MatchKind` in the docs for more details. + + +### Minimum Rust version policy + +This crate's minimum supported `rustc` version is `1.24.1`. + +In general, this crate will be conservative with respect to the minimum +supported version of Rust. In general, it will follow the `regex` crate's +policy, since `regex` is an important dependent. + + +### Future work -### Alternatives +Here are some plans for the future: -Aho-Corasick is useful for matching multiple substrings against many long -strings. If your long string is fixed, then you might consider building a -[suffix array](https://github.com/BurntSushi/suffix) -of the search text (which takes `O(n)` time). Matches can then be found in -`O(plogn)` time. +* Assuming the current API is sufficient, I'd like to commit to it and release + a `1.0` version of this crate some time in the next 6-12 months. +* Despite the crate's name, it seems prudent to consolidate all + multi-pattern search optimizations into this crate so that they get the + widest possible use. A good place to start will be to move the regex + crate's Teddy algorithm into this one. (This is more than just a move. It + will require fleshing out the somewhat simplistic `Prefilter` design that + exists internally currently.) In the future, it would be good to loot + Hyperscan for some of its pertinent algorithms, such as FDR. +* Support stream searching with leftmost match semantics. Currently, only + standard match semantics are supported. Getting this right seems possible, + but is tricky since the match state needs to be propagated through multiple + searches. (With standard semantics, as soon as a match is seen the search + ends.) diff --git a/vendor/aho-corasick/appveyor.yml b/vendor/aho-corasick/appveyor.yml new file mode 100644 index 0000000000..e4442d46d5 --- /dev/null +++ b/vendor/aho-corasick/appveyor.yml @@ -0,0 +1,26 @@ +environment: + matrix: + - TARGET: x86_64-pc-windows-gnu + BITS: 64 + MSYS2: 1 + - TARGET: x86_64-pc-windows-msvc + BITS: 64 + - TARGET: i686-pc-windows-gnu + BITS: 32 + MSYS2: 1 + - TARGET: i686-pc-windows-msvc + BITS: 32 +install: + - curl -sSf -o rustup-init.exe https://win.rustup.rs/ + - rustup-init.exe -y --default-host %TARGET% + - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin + - if defined MSYS2 set PATH=C:\msys64\mingw%BITS%\bin;%PATH% + - rustc -V + - cargo -V +build: false +test_script: + - cargo build --verbose + - cargo test --verbose +branches: + only: + - master diff --git a/vendor/aho-corasick/benches/bench.rs b/vendor/aho-corasick/benches/bench.rs deleted file mode 100644 index 0e68e2af02..0000000000 --- a/vendor/aho-corasick/benches/bench.rs +++ /dev/null @@ -1,373 +0,0 @@ -#![feature(test)] - -extern crate aho_corasick; -extern crate test; - -use std::iter; - -use aho_corasick::{Automaton, AcAutomaton, Transitions}; -use test::Bencher; - -const HAYSTACK_RANDOM: &'static str = include_str!("random.txt"); -const HAYSTACK_SHERLOCK: &'static str = include_str!("sherlock.txt"); - -fn bench_aut_no_match, T: Transitions>( - b: &mut Bencher, - aut: AcAutomaton, - haystack: &str, -) { - b.bytes = haystack.len() as u64; - b.iter(|| assert!(aut.find(haystack).next().is_none())); -} - -fn bench_box_aut_no_match, T: Transitions>( - b: &mut Bencher, - aut: AcAutomaton, - haystack: &str, -) { - b.bytes = haystack.len() as u64; - let aut: &Automaton

= &aut; - b.iter(|| assert!(Automaton::find(&aut, haystack).next().is_none())); -} - -fn bench_full_aut_no_match, T: Transitions>( - b: &mut Bencher, - aut: AcAutomaton, - haystack: &str, -) { - let aut = aut.into_full(); - b.bytes = haystack.len() as u64; - b.iter(|| assert!(aut.find(haystack).next().is_none())); -} - -fn bench_full_aut_overlapping_no_match, T: Transitions>( - b: &mut Bencher, - aut: AcAutomaton, - haystack: &str, -) { - let aut = aut.into_full(); - b.bytes = haystack.len() as u64; - b.iter(|| assert!(aut.find_overlapping(haystack).count() == 0)); -} - -fn bench_naive_no_match(b: &mut Bencher, needles: Vec, haystack: &str) - where S: Into { - b.bytes = haystack.len() as u64; - let needles: Vec = needles.into_iter().map(Into::into).collect(); - b.iter(|| assert!(!naive_find(&needles, haystack))); -} - -#[bench] -fn bench_construction(b: &mut Bencher) { - b.iter(|| { - AcAutomaton::new(test::black_box( - [ - "ADL", "ADl", "AdL", "Adl", "BAK", "BAk", "BAK", "BaK", "Bak", "BaK", "HOL", - "HOl", "HoL", "Hol", "IRE", "IRe", "IrE", "Ire", "JOH", "JOh", "JoH", "Joh", "SHE", - "SHe", "ShE", "She", "WAT", "WAt", "WaT", "Wat", "aDL", "aDl", "adL", "adl", "bAK", - "bAk", "bAK", "baK", "bak", "baK", "hOL", "hOl", "hoL", "hol", "iRE", "iRe", - "irE", "ire", "jOH", "jOh", "joH", "joh", "sHE", "sHe", "shE", "she", "wAT", "wAt", - "waT", "wat", "ſHE", "ſHe", "ſhE", "ſhe", - ].iter() - .map(|x| *x), - )) - }) -} - -#[bench] -fn bench_full_construction(b: &mut Bencher) { - b.iter(|| { - AcAutomaton::new(test::black_box( - [ - "ADL", "ADl", "AdL", "Adl", "BAK", "BAk", "BAK", "BaK", "Bak", "BaK", "HOL", - "HOl", "HoL", "Hol", "IRE", "IRe", "IrE", "Ire", "JOH", "JOh", "JoH", "Joh", "SHE", - "SHe", "ShE", "She", "WAT", "WAt", "WaT", "Wat", "aDL", "aDl", "adL", "adl", "bAK", - "bAk", "bAK", "baK", "bak", "baK", "hOL", "hOl", "hoL", "hol", "iRE", "iRe", - "irE", "ire", "jOH", "jOh", "joH", "joh", "sHE", "sHe", "shE", "she", "wAT", "wAt", - "waT", "wat", "ſHE", "ſHe", "ſhE", "ſhe", - ].iter() - .map(|x| *x), - )).into_full() - }) -} - -fn haystack_same(letter: char) -> String { - iter::repeat(letter).take(10000).collect() -} - -macro_rules! aut_benches { - ($prefix:ident, $aut:expr, $bench:expr) => { - mod $prefix { -#![allow(unused_imports)] -use aho_corasick::{Automaton, AcAutomaton, Sparse}; -use test::Bencher; - -use super::{ - HAYSTACK_RANDOM, haystack_same, - bench_aut_no_match, bench_box_aut_no_match, - bench_full_aut_no_match, bench_full_aut_overlapping_no_match, -}; - -#[bench] -fn ac_one_byte(b: &mut Bencher) { - let aut = $aut(vec!["a"]); - $bench(b, aut, &haystack_same('z')); -} - -#[bench] -fn ac_one_prefix_byte_no_match(b: &mut Bencher) { - let aut = $aut(vec!["zbc"]); - $bench(b, aut, &haystack_same('y')); -} - -#[bench] -fn ac_one_prefix_byte_every_match(b: &mut Bencher) { - // We lose the benefit of `memchr` because the first byte matches - // in every position in the haystack. - let aut = $aut(vec!["zbc"]); - $bench(b, aut, &haystack_same('z')); -} - -#[bench] -fn ac_one_prefix_byte_random(b: &mut Bencher) { - let aut = $aut(vec!["zbc\x00"]); - $bench(b, aut, HAYSTACK_RANDOM); -} - -#[bench] -fn ac_two_bytes(b: &mut Bencher) { - let aut = $aut(vec!["a", "b"]); - $bench(b, aut, &haystack_same('z')); -} - -#[bench] -fn ac_two_diff_prefix(b: &mut Bencher) { - let aut = $aut(vec!["abcdef", "bmnopq"]); - $bench(b, aut, &haystack_same('z')); -} - -#[bench] -fn ac_two_one_prefix_byte_every_match(b: &mut Bencher) { - let aut = $aut(vec!["zbcdef", "zmnopq"]); - $bench(b, aut, &haystack_same('z')); -} - -#[bench] -fn ac_two_one_prefix_byte_no_match(b: &mut Bencher) { - let aut = $aut(vec!["zbcdef", "zmnopq"]); - $bench(b, aut, &haystack_same('y')); -} - -#[bench] -fn ac_two_one_prefix_byte_random(b: &mut Bencher) { - let aut = $aut(vec!["zbcdef\x00", "zmnopq\x00"]); - $bench(b, aut, HAYSTACK_RANDOM); -} - -#[bench] -fn ac_ten_bytes(b: &mut Bencher) { - let aut = $aut(vec!["a", "b", "c", "d", "e", - "f", "g", "h", "i", "j"]); - $bench(b, aut, &haystack_same('z')); -} - -#[bench] -fn ac_ten_diff_prefix(b: &mut Bencher) { - let aut = $aut(vec!["abcdef", "bbcdef", "cbcdef", "dbcdef", - "ebcdef", "fbcdef", "gbcdef", "hbcdef", - "ibcdef", "jbcdef"]); - $bench(b, aut, &haystack_same('z')); -} - -#[bench] -fn ac_ten_one_prefix_byte_every_match(b: &mut Bencher) { - let aut = $aut(vec!["zacdef", "zbcdef", "zccdef", "zdcdef", - "zecdef", "zfcdef", "zgcdef", "zhcdef", - "zicdef", "zjcdef"]); - $bench(b, aut, &haystack_same('z')); -} - -#[bench] -fn ac_ten_one_prefix_byte_no_match(b: &mut Bencher) { - let aut = $aut(vec!["zacdef", "zbcdef", "zccdef", "zdcdef", - "zecdef", "zfcdef", "zgcdef", "zhcdef", - "zicdef", "zjcdef"]); - $bench(b, aut, &haystack_same('y')); -} - -#[bench] -fn ac_ten_one_prefix_byte_random(b: &mut Bencher) { - let aut = $aut(vec!["zacdef\x00", "zbcdef\x00", "zccdef\x00", - "zdcdef\x00", "zecdef\x00", "zfcdef\x00", - "zgcdef\x00", "zhcdef\x00", "zicdef\x00", - "zjcdef\x00"]); - $bench(b, aut, HAYSTACK_RANDOM); -} - } - } -} - -aut_benches!(dense, AcAutomaton::new, bench_aut_no_match); -aut_benches!(dense_boxed, AcAutomaton::new, bench_box_aut_no_match); -aut_benches!(sparse, AcAutomaton::<&str, Sparse>::with_transitions, - bench_aut_no_match); -aut_benches!(full, AcAutomaton::new, bench_full_aut_no_match); -aut_benches!(full_overlap, AcAutomaton::new, bench_full_aut_overlapping_no_match); - -// A naive multi-pattern search. -// We use this to benchmark *throughput*, so it should never match anything. -fn naive_find(needles: &[String], haystack: &str) -> bool { - for hi in 0..haystack.len() { - let rest = &haystack.as_bytes()[hi..]; - for needle in needles { - let needle = needle.as_bytes(); - if needle.len() > rest.len() { - continue; - } - if needle == &rest[..needle.len()] { - // should never happen in throughput benchmarks. - return true; - } - } - } - false -} - -#[bench] -fn naive_one_byte(b: &mut Bencher) { - bench_naive_no_match(b, vec!["a"], &haystack_same('z')); -} - -#[bench] -fn naive_one_prefix_byte_no_match(b: &mut Bencher) { - bench_naive_no_match(b, vec!["zbc"], &haystack_same('y')); -} - -#[bench] -fn naive_one_prefix_byte_every_match(b: &mut Bencher) { - bench_naive_no_match(b, vec!["zbc"], &haystack_same('z')); -} - -#[bench] -fn naive_one_prefix_byte_random(b: &mut Bencher) { - bench_naive_no_match(b, vec!["zbc\x00"], HAYSTACK_RANDOM); -} - -#[bench] -fn naive_two_bytes(b: &mut Bencher) { - bench_naive_no_match(b, vec!["a", "b"], &haystack_same('z')); -} - -#[bench] -fn naive_two_diff_prefix(b: &mut Bencher) { - bench_naive_no_match(b, vec!["abcdef", "bmnopq"], &haystack_same('z')); -} - -#[bench] -fn naive_two_one_prefix_byte_every_match(b: &mut Bencher) { - bench_naive_no_match(b, vec!["zbcdef", "zmnopq"], &haystack_same('z')); -} - -#[bench] -fn naive_two_one_prefix_byte_no_match(b: &mut Bencher) { - bench_naive_no_match(b, vec!["zbcdef", "zmnopq"], &haystack_same('y')); -} - -#[bench] -fn naive_two_one_prefix_byte_random(b: &mut Bencher) { - bench_naive_no_match(b, vec!["zbcdef\x00", "zmnopq\x00"], HAYSTACK_RANDOM); -} - -#[bench] -fn naive_ten_bytes(b: &mut Bencher) { - let needles = vec!["a", "b", "c", "d", "e", - "f", "g", "h", "i", "j"]; - bench_naive_no_match(b, needles, &haystack_same('z')); -} - -#[bench] -fn naive_ten_diff_prefix(b: &mut Bencher) { - let needles = vec!["abcdef", "bbcdef", "cbcdef", "dbcdef", - "ebcdef", "fbcdef", "gbcdef", "hbcdef", - "ibcdef", "jbcdef"]; - bench_naive_no_match(b, needles, &haystack_same('z')); -} - -#[bench] -fn naive_ten_one_prefix_byte_every_match(b: &mut Bencher) { - let needles = vec!["zacdef", "zbcdef", "zccdef", "zdcdef", - "zecdef", "zfcdef", "zgcdef", "zhcdef", - "zicdef", "zjcdef"]; - bench_naive_no_match(b, needles, &haystack_same('z')); -} - -#[bench] -fn naive_ten_one_prefix_byte_no_match(b: &mut Bencher) { - let needles = vec!["zacdef", "zbcdef", "zccdef", "zdcdef", - "zecdef", "zfcdef", "zgcdef", "zhcdef", - "zicdef", "zjcdef"]; - bench_naive_no_match(b, needles, &haystack_same('y')); -} - -#[bench] -fn naive_ten_one_prefix_byte_random(b: &mut Bencher) { - let needles = vec!["zacdef\x00", "zbcdef\x00", "zccdef\x00", - "zdcdef\x00", "zecdef\x00", "zfcdef\x00", - "zgcdef\x00", "zhcdef\x00", "zicdef\x00", - "zjcdef\x00"]; - bench_naive_no_match(b, needles, HAYSTACK_RANDOM); -} - - -// The organization above is just awful. Let's start over... - -mod sherlock { - use aho_corasick::{Automaton, AcAutomaton}; - use test::Bencher; - use super::HAYSTACK_SHERLOCK; - - macro_rules! sherlock { - ($name:ident, $count:expr, $pats:expr) => { - #[bench] - fn $name(b: &mut Bencher) { - let haystack = HAYSTACK_SHERLOCK; - let aut = AcAutomaton::new($pats).into_full(); - b.bytes = haystack.len() as u64; - b.iter(|| assert_eq!($count, aut.find(haystack).count())); - } - } - } - - sherlock!(name_alt1, 158, vec!["Sherlock", "Street"]); - - sherlock!(name_alt2, 558, vec!["Sherlock", "Holmes"]); - - sherlock!(name_alt3, 740, vec![ - "Sherlock", "Holmes", "Watson", "Irene", "Adler", "John", "Baker", - ]); - - sherlock!(name_alt3_nocase, 1764, vec![ - "ADL", "ADl", "AdL", "Adl", "BAK", "BAk", "BAK", "BaK", "Bak", "BaK", - "HOL", "HOl", "HoL", "Hol", "IRE", "IRe", "IrE", "Ire", "JOH", "JOh", - "JoH", "Joh", "SHE", "SHe", "ShE", "She", "WAT", "WAt", "WaT", "Wat", - "aDL", "aDl", "adL", "adl", "bAK", "bAk", "bAK", "baK", "bak", "baK", - "hOL", "hOl", "hoL", "hol", "iRE", "iRe", "irE", "ire", "jOH", "jOh", - "joH", "joh", "sHE", "sHe", "shE", "she", "wAT", "wAt", "waT", "wat", - "ſHE", "ſHe", "ſhE", "ſhe", - ]); - - sherlock!(name_alt4, 582, vec!["Sher", "Hol"]); - - sherlock!(name_alt4_nocase, 1307, vec![ - "HOL", "HOl", "HoL", "Hol", "SHE", "SHe", "ShE", "She", "hOL", "hOl", - "hoL", "hol", "sHE", "sHe", "shE", "she", "ſHE", "ſHe", "ſhE", "ſhe", - ]); - - sherlock!(name_alt5, 639, vec!["Sherlock", "Holmes", "Watson"]); - - sherlock!(name_alt5_nocase, 1442, vec![ - "HOL", "HOl", "HoL", "Hol", "SHE", "SHe", "ShE", "She", "WAT", "WAt", - "WaT", "Wat", "hOL", "hOl", "hoL", "hol", "sHE", "sHe", "shE", "she", - "wAT", "wAt", "waT", "wat", "ſHE", "ſHe", "ſhE", "ſhe", - ]); -} diff --git a/vendor/aho-corasick/benches/random.txt b/vendor/aho-corasick/benches/random.txt deleted file mode 100644 index dfae5cd142..0000000000 --- a/vendor/aho-corasick/benches/random.txt +++ /dev/null @@ -1,513 +0,0 @@ - -mnxnsynfvuugtbxsxbfxwreuspglnplefzwsp -tacfqcwnmodnmgnyiuvqoco -z - -qjuozfkexn -zoaxzncje -sldhqtmgxzyurfyzwazmmu -bbeuv -mzsrihycwcb -xzfqozfmlnpmrzpxxxytqs -xrg -mcplby -nmslhfgjowhzfxsvyddydnsyehdskbydbjksqtpet -indvfw -bvjvvw - -pddufodyqtyixbndtumndyz -xjjhtuvmsxhuwqulqtjhqrdqrmtbcphvyuqllocrnkpfv -zemshhz -wss -xewlrxfmgxnwgphcgefa -mbgsgbzrtthxweimcqzcaaheurdmd -osqefupespvh -z -tvvlakwzwjbrgjzfgubsmmonav -pjdskxcfgapsm -zqktqgkrcdrlskx -zwwfebhguskho -zlvvw -czwm -gojnpmboehlsazbexjjnuscqftrfufngygjdxcydib -d -afigycivicnknfxl -ljuwuopctiftfwctxecwipjnljyef -jonwbkodomzhqvlf -jdkizhognqsdogunwedjsmsdzho -zxvni -oynfjf -muvokjuqz -azuwrwtuxzfopwrcex -ixrjinlvxjmn -blaegnmbhsgsbmebwazaeguugtkowexgnqtbfkldadddv -tzabyoftyov -ctbtqbzscxzviuvcigwuwusrdro -ljynr -gnnnyyxslrhsbj -hhzlw -hijalf -rxlfqk -mhaofforwznvmcgplinludpgkucpa -gvvxsqqfmu -xxqhoyosixjfhjuxpv -faadjpvamjekreepizurntvwdynozfawsfawyms - -lcbutr -aqyxvpozkjrecrkl -lfmochahrr -ptqyomjlwo -vcmslulznx -lmlsskcihrmxauztuarydlp -beiqsrfnmvmlmybmwpektjbikvpggthpabqsgmjhnthvysuhwbigillugjsp -dfsuegseffwcsnvsrqedytblbpzbfeyfsq -kypvqctrkuds -ylqeduokzgdqaxelhftxnxbidu -bprzyayfopxdsmfhhfqowa -ymiutdtlfaaxpbtaeslv -ggago - -owpbicekdeykzfgcbgzobdvvrtetvcv -xsrlgingstiez -gyncqvq -xasohmeiwyscpehctmzmsnjklg -xsudghakxlw -dzqlfptjogzpkvwuticcyugnyopypuqqc -wlxshxbhdvuherumoppcc - -znyaptivzncvkpeyeipynqefjxjjcsgfqbnezeebtowdrbjaqjlbxwvyikrmxjwoxngqgvfpbniftnmszuxg -umwpwwyvufy -pallkjtnrmtauqxauewgygwkjjwebbkabhtxticxmxfujpxlrpzlrozfslkzfdsswlmmsbdgjwmjnummk -dhsxylejzityahtqqzmohrpzjprrsraztpnuagtyzfjdekthvdogfidksrdppr -ybc -fyukknoqfnkllkwflwempjijxgo -dltvlau -rhvrvlwsribfctuzodfqkdczfzxnetqqzflnhiyl -goxmcasmq -wljbhwkpahdotqhhrbhqzijv -lszewkgdmkezvgmbmllhpksdkoiwgkvqjmurshrptlctqsosuurndcuzjfwherotv -dudxxihygxblhgchbgzyzffb -eht -fvwxvqoltdcsd -rkuig -e -axhsacsmnicugul -rubtdlhjqndxdzzwfnkuzy -swxteuyxxsktkjgv -hzwwodlqaq -vxgecev -qnwla -vdxjuzpyoqhpmuunyffptopmeauhycs -dkzo -awrfzatzohslgvqlaezepmli -qgxatixvpkkhvkumbwmwcagtgyfljdok -amdnzstpvcqj -xsrvwvhjirzfgkessve -qezwbfltfbikbmoasvoflozsjhrljnszqiciuqmflrlqowwkoevuumh -babskcvavmtvsxqsewirucwzajjcfcqwsydydqo -ywfurpsl -edacsjjkjjewkxfoh -dcgkfpcjezurnuhiatrczcp -xsatnimwbcciu -grzmbrsvvcyigcbmcqfwiiknrohveubhyijxeyzfm -kqyewccgcqrrrznwxmoztlyseagbpyho -najju -nis -awgzdvfjkzlrsjcqfeacx -oisuflfigrjaex -desbdulyuwqxuxianyypybxwlql -ekmqgspvqpftpwswayh -egbyj -fznzprhvnnwcxgcc -wfdsueieosmugirxbymbpmfrspvrktjzguxm -qkjrufshwnfwwpbhukdjlaqvljlgubmqmhnha -hwqpudgnblhlxppbrmbznotteivuzguuwlhtkytky -w -yofkyzbpg -cenolnfnllkvhikrpttcxgqxmufvorekjruyjxmr - -hyexmpjijgzumawp -cdbevdilgopbzlo -fivelagckslkugdxprjxkylizewcptwxfhomzuituujixchadmnjoktnqa -csojvlinzmmkkfzqueamnuwkanzdzsavgohposbuoamoevehqrmcxdsuyelvvctoejzoertqormhaaxwofvjzekwt -sbkghhnhutrvwtyjaxndzyjamrhx -jjyqy -majwbnrhveuhrsbbbjrwpwuplifeseylqh -wyvutpxnkrnkuxxetjkkifpqb -dyzucmbcvgnjeecm -hz -uhnuipthxrzkqluosvk -lwqqzsdwiwvwaqfwlvubadlyizlo -jbd -oyzjeu -kydjkbsqxnbfiuesc -smeubjqrcxdvhsabzceyglqjzbfmoacmwvwjbhhxbr -uabipgecujfdfxpmdzrscdyvefizabgspqjrrkmgjt -xgvdgzryz -lw -uimob -ifhn -bqph -ole -g -wt -k -yslzrkwkundxfdibwqvucemepqxlmlpyngabbeciuzhptpjdetyngrtxrdtzmvq -ccwapidp - -bwvrgvmtshevrophy -ni -fdkplu -mdykey -i -rhsrenoetdggpjb -djmkplpeabsholx -judxtub -fooakqwvocvpcrvxqhvtmpvhkrecy -uuxscjillynilbkrgt -evtinrmilniguarqritpeipwochmdw -sxaqzjybydyvnmmjtdcgkjnqfcklbfpkdfyewgcukqoiegyfp -kg -ovrwieqhy -jcxqtkerzjwhs -xeonglszbgypafhmqcaseimzjgebkvigbqwsayrnrprtuvhsxyitfqygohgorcdnufbcyvevvgzmjrgjqqquwkszplogx -zdketqqv -yebckucwayckeezfvtnavglpjh -zorkfrwk -pad -xqaquxudybwtgixbfktinctfirjfdayh -rieknj -ebk -qzbcfywfdmhsdruhopovemafijbscagllkmhmof - -asbsnbddlobwoqatfhkbhhsymzqxjuixwreheugvngmgcuqpkjhhfwpbarqaxrwgwnjbanljlds -etevdvlc -lqyjrnmenhn -k -tsf -zczgeavcexh -jlpuxywtsrvnvluruqhecjca -ir -rikrgkmhwaosodkxgcnrexfmdrszhnmutpvwztg -bffjqovvkemctnsgeh -weysbhzixiipfithjfsk -usyzvaiyuhmksfluoirfbnsu -o -cgawpdakaszeafdtbdkqtlzkrpnoqomqvuaqcfmzgvfegovtfaonelpv -izmrcjlk -xmzemniyrzy -knqexaafsdlimdamcrprlshq -qkmqw -dntgjwsibclvposdwjuklvtejjjdjibgpyynqpgprvvaetshhmvfkcpb -otvazkrkklrxfotpopyjte -fghkcnpi -rulyaihsowvcgbzeiblhuhhfbmncqsuuqcxvseorn -exirzfmojnxcoqom -zsgpgtokun -zvamxfocorganbtlafifwdqmqtsnktbwwtewborq - -cxlnaspjqvsitjyzyriqsuorjsrvzqenisprttudxntsbqrpjtdkxnwcwgjyxmgtqljcrmrbrmyvosojzlumcmjcgfjsdehec -mvx -mt -mckr -teulvroifk -laaicc -koufy -bexmwsvyarnznebdfy -ripvviosbqijsxnjilwddaqaqemzsdarnxmfooxghoypizwtbueo -ljycycuqwfnzbambibqdixmkkvwtubepla -cis -kcg -vmbbiuuoamenzepuagpfujevfstqtndjxjchdvycfrrrowochtjdmkklgnhf -pmorrwguxkvdxpluatagaziin - -uwvzbmkmykjkmknzppklx -pnzxuvsrjunqxercsnvayhykcazdeclomdsasgkpqpiufyfqsxhj -yceizkddwojgweegcllaagpvrpo -ek -kuxxgbezqyxvfaxdwnqdgqsmneijunxzlwxkrs -ldldbrxmvtjlqxifngmactzqcygkvuteffcmvphevilabgukatqakamjlridznodcvblvlogulmcixxfimh -iuzjootuywjqklolzzhpeaynydjwtufjavbozxnzckuzdodkvkjfmhinelv -swlfkcufscfcovmghqwcrtxjukwafoeogrkgubbqgwzm -gjcylkwgzroubdssuqeykqjcmguso -fzq -srfvysoxtlylctp - -pbfeiuzwoyixews -ocvvunfsjnrtklmuuzjojw -xdjcnrpqhmpmpcwacpcdtmbsczvhllkqapzjuaf -nfnuvjz -fwnuiyqpn -wshxxxpzzxp -hibrxcfeqca - -wqhlllarl -bukcbojv -plrytapy -xm -vlgfqoyzdczqbbaxjwbjjevjhxgopuqvqcrj -vpjqfbdnsdxlbuuiqocvrhap -mgumjbvnnzgnrdru -gcgzugazxdcamrhczfzhtmdjj -uislwq -vooai -zjuqfmebuzsqngzekyajujkopvayxtdzvugwwucvlsbrnhitfotmhhmgddlzlvqrkcponictrfweuilfjiuoabkfdvpjiqjrrgi -aptjfhmrnxaq -hbs -w -mwmoxqvucwygunplzvxtxpk -fgmqmtlorfzytjdzffsosfccnfwugrsrynuej -rpmpenrhsxoefnblyumjqwvuyszyppnttuyvazjdug -zdzxraxkroknkmqgvuoqeqdtvclsvvuwmdwzfugcpteohlogxubyoebvrzbqzklvehfcqadtdrkpubfhmokzwyosogepwragcpwxo -ax -dz -de - -thvkdmnbdws - -ejmubw -umvwkaubzurf -wyxtxeluaoox -wwbioobtgmkebxo -miglgnafmdarzkeblyjctuayzyoeqnfnbtrcbymdzkzg -loavxq -kzhllgsenxlbgdbfzwbg -yxflogzsohlcycbyzegeubfflouvtuatixhjvicjegltjiy -jigqfjppafdiarc -mcnmwtachgearonfcymvjbrnljjxmlzkudvzqsarnfysmxlfrtlvjxwvpdbhvwysnvcdozfcruhjwnucdzakkilmlfgjiolcatpfusm - -n -pdjunfcz -dc -edxkkxabsbvmvifiinnoccki -bc -gwtwsvorwzfqpz -exidmexstfflkhi -s -s -c -wtcjfywlayhpbqktcepoybowtkrmnumqsg -ozclkgjdmdk -jmegtbunyexurvfexhqptnqzie -tkoenpagzwqfawlxvzaijsjqhmg -swodqfjpdqcbkc -ujokogocyaygdibgpglecis -shlmdmgonvpuaxlhrymkxtiytmv -brhk -jmsyiuomiywxhegilycjprkyfgojdo - -wzdzrgpdiosdsvkcw -odlnmsfnjrcsnflviwvawybpczdkzvdocpwrmavz -p -ubowamlskcqhdxuckrxa -fawhntiwhmdwkddnahmtajqqazpdygttqivhdiodkcpcwv -gmxujmmaufmbipaiulhurzkfdg -eixjhmbaeoybiwk -kumntgrgiofcmujlzbcopuobambsw -mnjkqiyb -iktwnsnv -hfuzcl -tqiyqvagbqgtowpjbedgjot -dfemvamelxadkztogliizdtsddoboafawficudlefo -raecmxiiibljryswntpfed -mbwrtsebkeegw -x -epp -he - -vnztrswhiusokqdkmsnpuswucvfhcthjbtam -baxlwidsgbdpzvnlj -tcbjjoadrzo -aiidahyllzzsg - -igebuubweicbssgddpmqxunrawavuglmpxrtkqsvjjtscibqiejjfgfnovokodmqcqitlteiakooupvzkwucucrfdzjvjbqbkgutoybmpfvhbutigdxhfiqfplyciz -cnrhbjdnjftwfwlwzrdkwhajgsizsi -qfntnt -okqyfnbresp -asyg -mjqdkdyggdxzwuzglays -h -ifaqcazoy -fol -vvsusbnugduxsceozmsarbp -epjwtorx -bwiuxxiyc -cw -bwogruhctwkfvbexjnwircykxyzjmats -kygiochfwlpsvmxcgmtjrgvfdptd -q -qmpqe - -z -jghffhqfoecmszunhxmzmzhlmbrvjabhrkihgjmvckhkfpaygjkg - -kfiyfgounmhlvhupswqdgws -ezzdpyqucqoocsdcjtruqpokldfkmjhqzoynirybsifyaxnaxppthjoqy -nwetlgzwrhkhtuubbkbepuhbllxspvagxrqokwnrhkbwdwtp -hlazomrhqogoaxypqaszwfxxmutvbpuuvpdffuqskcbzlwyzcssnflkwiydoveyxjnzllzhyozbsa -hwnitkwbxcyibbqsluuqywbk - -ozpfjsdrc -yoepefuy -lvmspzepnetra -genbrcrmuqfvkaouvuymoxhcxotjjhk -pcshyqgbmqdubsdajnyfqvxkqvywffzn -ukhcbyzwslqeq -otfrmcbnhbyffxqregqoufdxucjunwdhlqqeiiawbxlpqeyzzopfungrryqdykgizrhqodirvazm -dhpfhzyq -cloz -eduupqifolfekve -qiec -ishnjukvomntmdthlkajxpiwk -y -axl -tmyskjqkjsvumizlal -wvvolwewsfxhhdieuagdcuhwsgqvswpbkdkpxskloalmr -ryfmhe -z -mmbpgsyrfvzdatbjrjhuipwt -llzwizmmuulgwocowwmugtaoewkhnqxparvtynlffffdfcocdbba - -pyczkzbmcgrdnxnmezsx -gsqe -mcocxcolcynhpecstsn -opnpplkccobjuhtbhirpzfxuktmpsiwbvsgiaavvdge -wpaldxzasnrbvtugjwytvtfttrh -zxecurevkjiyxy -wtnovebcmglkktic -fdpwfgvlvovxrwh -bmwgdullzy -uzwhagxinwqifxjbcntqzqoxkmpqxhe -jrfizsnwxwnnhb -inapddlahrp - -ndtvkceobe -buskgghihdjmjlwfc -j -rkvffxwtmzoeruhlsurwtnuh -cbvkhfepkdishfpqvijzrpleuy -jzdpxjhcgqnybssfegvrnpgyehdqpgjwudbwrjbavp -xzzvgqdrdwajmdmj -vfatwsxvwfdbdhnijdujoyotwvwjipuuetichcfmvgrsnjpqaaezjtkvc -lbfoqgfshrtwgdqufwnfuitdrjydqctqixlzufkdbp -zgau -qefdpmtkecvtj -kuphldkvnzdtpd -dti -fpd -gfrliyegxsb -i -qsddsrmkyfgzrjeqnitmnypbcakh -vfbvbrpuogzhzrbmklvhji -nkz -xlufbaoblbmeub -alwuzxzmobwdukvwnkiwmuqhuxfhevogdnqtmxjptqznrk -cngpoty - -ms -qvenfg -dmeaffm -jycfgnanbmoamhmarkmjcagbp -ysqmbhopgx -jczbzgwedsp - -zxzwjrxcwdtleizjlvifjwgxiibezwxhtzywqdi -mtgnlu -xboxirdchurkfnklnpkapnqfxnhrxyseiujrznjm - -zm -atddskbghcahlhql -szshwzmmvu -befdtpouamwhiisyybispkchpjhownatawjfbx - -ennkzbrlygd -zbt -upphzpdwzmlhhhbqvjsfmbnrar -ddcs -ipbxgzyudjyongtcyygncojdufnufqpdppgvq -gc -isu -foa -wf -jdlvqxgfbowhohhyyngbcs -zjuwjyucdwblatsnywaaoftlcamfbcnw -lzrioesuhoeevczuwrnltmkahfwiu -uicggfbddqltnjyxfltbnaekncnyxsit -zkxsqkqrwrzrxgxbsgxatybfr - -ptvmfyxdcglbfipcguqthjygzqnpqssscukzawynidtchjrrxwuxifoe -w -ohu -vg -zagpowezvbniybgold -lhqseqcxteiqtgnpanpvrmvvlltxh -mtfnxn -wyodtg - -rawpbgtpbaktqzmmpzxmrlwpvvmdsl -widcfbirvswraukbmkhf -vplrueuxomjkqrtjgyxjdkexttzyozawyq -hrpbahllznvmjudzxpbbv -tlavfrxygjfipkupwnbacltcfepeg -icu -otxcu -aewazy -hl - -fmrp -qaacthwzohenzjr -xbyebba -rvkph -mkhhmh -swme -zjmdoypaktglcyzobquunvthcdwegtbywpijxd -jvkuhnxqc -gibhqgjojsxt -bodbktzomiqujtbstqiyquwvqgufphqstenxvddkvtdh -bpusrxkfi -zgp -pmxvgamydyakituvvsucsuidrlznupcsinltmrahulhepxmhoqtfvpjkxzhrrinncuh -jzgkjjhjqykzelaszvcwvvwbnzsxdeaerfnaravk -ynanrqyrxo -zsmuxofullob -brklgrcqefdyoczy -qkpls -snhqumae -iqdtzjadzzvnqvdvjfsaf -nfqfdqiramueblxkaqxbbkxwywzgdbndjjiqk -tc -kp -cpuckbjsxhtxmomfesgxdpz -oseif -ybhxbvyxrpkrexrhjzoaxxohrhsniewsrktjnaztn -ggelspdzhzbchruhbjbjidgjwdlhdycetqaswh -jkgivsngygkbqtlmoj -dwpnanfvitxg -ospxbwxp -wgvmvrnjescemdoiralbkvemalifxnyhrbdgodml -hjtsnkzknkplbzsiwmneefdkihnhsamjsrxggclyjqgpqltizi - - -sykgbuypwwhweab -nvdkkkskmtiwpoerkon -sx -sbyflwwiqylbskdlxesmylpaz -dnwcjenaluwesyywfaezznwkdwpoesxpu -kie -dslccwfryol -gfhomgfn -zprjtfqvkotktzidmoyrivall -bunvsqkysdelozemnjoeqfolruulpbipm -ullyzfahpkhkja -hwd -kvyqtprpuulgsk -zotbkcadnxmfvqmtlbxalhughceyfcibtzzj -vvpjbgxygl -hpic -mhrqd -dv -thehuzdbaacoidjoljbysnqwrrxxplrdznmgiukkvjqbopb -moszjt -rmtbunktkywqirveeqfa -kse -wbfflnatgzobjrxghjgvcsyxoruenxhyomutbptswjajawqjpqafpdcstkiyjuilimecgejpqmyciolgcmdpcstzdozbmnza diff --git a/vendor/aho-corasick/examples/dict-search.rs b/vendor/aho-corasick/examples/dict-search.rs deleted file mode 100644 index b620cc284a..0000000000 --- a/vendor/aho-corasick/examples/dict-search.rs +++ /dev/null @@ -1,138 +0,0 @@ -// This example demonstrates how to use the Aho-Corasick algorithm to rapidly -// scan text for matches in a large dictionary of keywords. This example by -// default reads your system's dictionary (~120,000 words). -extern crate aho_corasick; -extern crate csv; -extern crate docopt; -extern crate memmap; -extern crate serde; -#[macro_use] -extern crate serde_derive; - -use std::error::Error; -use std::fs::File; -use std::io::{self, BufRead, Write}; -use std::process; - -use aho_corasick::{Automaton, AcAutomaton, Match}; -use docopt::Docopt; -use memmap::Mmap; - -static USAGE: &'static str = " -Usage: dict-search [options] - dict-search --help - -Options: - -d , --dict Path to dictionary of keywords to search. - [default: /usr/share/dict/words] - -m , --min-len The minimum length for a keyword in UTF-8 - encoded bytes. [default: 5] - --overlapping Report overlapping matches. - -c, --count Show only the numebr of matches. - --memory-usage Show memory usage of automaton. - --full Use fully expanded transition matrix. - Warning: may use lots of memory. - -h, --help Show this usage message. -"; - -#[derive(Clone, Debug, Deserialize)] -struct Args { - arg_input: String, - flag_dict: String, - flag_min_len: usize, - flag_overlapping: bool, - flag_memory_usage: bool, - flag_full: bool, - flag_count: bool, -} - -fn main() { - let args: Args = Docopt::new(USAGE) - .and_then(|d| d.deserialize()) - .unwrap_or_else(|e| e.exit()); - match run(&args) { - Ok(()) => {} - Err(err) => { - writeln!(&mut io::stderr(), "{}", err).unwrap(); - process::exit(1); - } - } -} - -fn run(args: &Args) -> Result<(), Box> { - let aut = try!(build_automaton(&args.flag_dict, args.flag_min_len)); - if args.flag_memory_usage { - let (bytes, states) = if args.flag_full { - let aut = aut.into_full(); - (aut.heap_bytes(), aut.num_states()) - } else { - (aut.heap_bytes(), aut.num_states()) - }; - println!("{} bytes, {} states", bytes, states); - return Ok(()); - } - - let rdr = try!(File::open(&args.arg_input)); - if args.flag_full { - let aut = aut.into_full(); - if args.flag_overlapping { - if args.flag_count { - let mmap = unsafe { try!(Mmap::map(&rdr)) }; - println!("{}", aut.find_overlapping(&*mmap).count()); - } else { - try!(write_matches(&aut, aut.stream_find_overlapping(rdr))); - } - } else { - if args.flag_count { - let mmap = unsafe { try!(Mmap::map(&rdr)) }; - println!("{}", aut.find(&*mmap).count()); - } else { - try!(write_matches(&aut, aut.stream_find(rdr))); - } - } - } else { - if args.flag_overlapping { - if args.flag_count { - let mmap = unsafe { try!(Mmap::map(&rdr)) }; - println!("{}", aut.find_overlapping(&*mmap).count()); - } else { - try!(write_matches(&aut, aut.stream_find_overlapping(rdr))); - } - } else { - if args.flag_count { - let mmap = unsafe { try!(Mmap::map(&rdr)) }; - println!("{}", aut.find(&*mmap).count()); - } else { - try!(write_matches(&aut, aut.stream_find(rdr))); - } - } - } - Ok(()) -} - -fn write_matches(aut: &A, it: I) -> Result<(), Box> - where A: Automaton, I: Iterator> { - let mut wtr = csv::Writer::from_writer(io::stdout()); - try!(wtr.serialize(("pattern", "start", "end"))); - for m in it { - let m = try!(m); - try!(wtr.serialize((aut.pattern(m.pati), m.start, m.end))); - } - try!(wtr.flush()); - Ok(()) -} - -fn build_automaton( - dict_path: &str, - min_len: usize, -) -> Result, Box> { - let buf = io::BufReader::new(try!(File::open(dict_path))); - let mut lines = Vec::with_capacity(1 << 10); - for line in buf.lines() { - let line = try!(line); - if line.len() >= min_len { - lines.push(line); - } - } - Ok(AcAutomaton::with_transitions(lines)) -} diff --git a/vendor/aho-corasick/src/ahocorasick.rs b/vendor/aho-corasick/src/ahocorasick.rs new file mode 100644 index 0000000000..fccd2b8b62 --- /dev/null +++ b/vendor/aho-corasick/src/ahocorasick.rs @@ -0,0 +1,2032 @@ +use std::io; + +use automaton::Automaton; +use buffer::Buffer; +use dfa::{self, DFA}; +use error::Result; +use nfa::{self, NFA}; +use prefilter::PrefilterState; +use state_id::StateID; +use Match; + +/// An automaton for searching multiple strings in linear time. +/// +/// The `AhoCorasick` type supports a few basic ways of constructing an +/// automaton, including +/// [`AhoCorasick::new`](struct.AhoCorasick.html#method.new) +/// and +/// [`AhoCorasick::new_auto_configured`](struct.AhoCorasick.html#method.new_auto_configured). +/// However, there are a fair number of configurable options that can be set +/// by using +/// [`AhoCorasickBuilder`](struct.AhoCorasickBuilder.html) +/// instead. Such options include, but are not limited to, how matches are +/// determined, simple case insensitivity, whether to use a DFA or not and +/// various knobs for controlling the space-vs-time trade offs taken when +/// building the automaton. +/// +/// If you aren't sure where to start, try beginning with +/// [`AhoCorasick::new_auto_configured`](struct.AhoCorasick.html#method.new_auto_configured). +/// +/// # Resource usage +/// +/// Aho-Corasick automatons are always constructed in `O(p)` time, where `p` +/// is the combined length of all patterns being searched. With that said, +/// building an automaton can be fairly costly because of high constant +/// factors, particularly when enabling the +/// [DFA](struct.AhoCorasickBuilder.html#method.dfa) +/// option (which is disabled by default). For this reason, it's generally a +/// good idea to build an automaton once and reuse it as much as possible. +/// +/// Aho-Corasick automatons can also use a fair bit of memory. To get a +/// concrete idea of how much memory is being used, try using the +/// [`AhoCorasick::heap_bytes`](struct.AhoCorasick.html#method.heap_bytes) +/// method. +/// +/// # Examples +/// +/// This example shows how to search for occurrences of multiple patterns +/// simultaneously in a case insensitive fashion. Each match includes the +/// pattern that matched along with the byte offsets of the match. +/// +/// ``` +/// use aho_corasick::AhoCorasickBuilder; +/// +/// let patterns = &["apple", "maple", "snapple"]; +/// let haystack = "Nobody likes maple in their apple flavored Snapple."; +/// +/// let ac = AhoCorasickBuilder::new() +/// .ascii_case_insensitive(true) +/// .build(patterns); +/// let mut matches = vec![]; +/// for mat in ac.find_iter(haystack) { +/// matches.push((mat.pattern(), mat.start(), mat.end())); +/// } +/// assert_eq!(matches, vec![ +/// (1, 13, 18), +/// (0, 28, 33), +/// (2, 43, 50), +/// ]); +/// ``` +/// +/// This example shows how to replace matches with some other string: +/// +/// ``` +/// use aho_corasick::AhoCorasick; +/// +/// let patterns = &["fox", "brown", "quick"]; +/// let haystack = "The quick brown fox."; +/// let replace_with = &["sloth", "grey", "slow"]; +/// +/// let ac = AhoCorasick::new(patterns); +/// let result = ac.replace_all(haystack, replace_with); +/// assert_eq!(result, "The slow grey sloth."); +/// ``` +#[derive(Clone, Debug)] +pub struct AhoCorasick { + imp: Imp, + match_kind: MatchKind, +} + +impl AhoCorasick { + /// Create a new Aho-Corasick automaton using the default configuration. + /// + /// The default configuration optimizes for less space usage, but at the + /// expense of longer search times. To change the configuration, use + /// [`AhoCorasickBuilder`](struct.AhoCorasickBuilder.html) + /// for fine-grained control, or + /// [`AhoCorasick::new_auto_configured`](struct.AhoCorasick.html#method.new_auto_configured) + /// for automatic configuration if you aren't sure which settings to pick. + /// + /// This uses the default + /// [`MatchKind::Standard`](enum.MatchKind.html#variant.Standard) + /// match semantics, which reports a match as soon as it is found. This + /// corresponds to the standard match semantics supported by textbook + /// descriptions of the Aho-Corasick algorithm. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::AhoCorasick; + /// + /// let ac = AhoCorasick::new(&[ + /// "foo", "bar", "baz", + /// ]); + /// assert_eq!(Some(1), ac.find("xxx bar xxx").map(|m| m.pattern())); + /// ``` + pub fn new( + patterns: I, + ) -> AhoCorasick + where I: IntoIterator, + P: AsRef<[u8]> + { + AhoCorasickBuilder::new().build(patterns) + } + + /// Build an Aho-Corasick automaton with an automatically determined + /// configuration. + /// + /// Specifically, this requires a slice of patterns instead of an iterator + /// since the configuration is determined by looking at the patterns before + /// constructing the automaton. The idea here is to balance space and time + /// automatically. That is, when searching a small number of patterns, this + /// will attempt to use the fastest possible configuration since the total + /// space required will be small anyway. As the number of patterns grows, + /// this will fall back to slower configurations that use less space. + /// + /// If you want auto configuration but with match semantics different from + /// the default `MatchKind::Standard`, then use + /// [`AhoCorasickBuilder::auto_configure`](struct.AhoCorasickBuilder.html#method.auto_configure). + /// + /// # Examples + /// + /// Basic usage is just like `new`, except you must provide a slice: + /// + /// ``` + /// use aho_corasick::AhoCorasick; + /// + /// let ac = AhoCorasick::new_auto_configured(&[ + /// "foo", "bar", "baz", + /// ]); + /// assert_eq!(Some(1), ac.find("xxx bar xxx").map(|m| m.pattern())); + /// ``` + pub fn new_auto_configured( + patterns: &[B], + ) -> AhoCorasick + where B: AsRef<[u8]> + { + AhoCorasickBuilder::new().auto_configure(patterns).build(patterns) + } +} + +impl AhoCorasick { + /// Returns true if and only if this automaton matches the haystack at any + /// position. + /// + /// `haystack` may be any type that is cheaply convertible to a `&[u8]`. + /// This includes, but is not limited to, `String`, `&str`, `Vec`, and + /// `&[u8]` itself. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::AhoCorasick; + /// + /// let ac = AhoCorasick::new(&[ + /// "foo", "bar", "quux", "baz", + /// ]); + /// assert!(ac.is_match("xxx bar xxx")); + /// assert!(!ac.is_match("xxx qux xxx")); + /// ``` + pub fn is_match>(&self, haystack: B) -> bool { + self.earliest_find(haystack).is_some() + } + + /// Returns the location of the first detected match in `haystack`. + /// + /// This method has the same behavior regardless of the + /// [`MatchKind`](enum.MatchKind.html) + /// of this automaton. + /// + /// `haystack` may be any type that is cheaply convertible to a `&[u8]`. + /// This includes, but is not limited to, `String`, `&str`, `Vec`, and + /// `&[u8]` itself. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::AhoCorasick; + /// + /// let ac = AhoCorasick::new(&[ + /// "abc", "b", + /// ]); + /// let mat = ac.earliest_find("abcd").expect("should have match"); + /// assert_eq!(1, mat.pattern()); + /// assert_eq!((1, 2), (mat.start(), mat.end())); + /// ``` + pub fn earliest_find>(&self, haystack: B) -> Option { + let mut prestate = PrefilterState::new(self.max_pattern_len()); + let mut start = self.imp.start_state(); + self.imp.earliest_find_at( + &mut prestate, haystack.as_ref(), 0, &mut start, + ) + } + + /// Returns the location of the first match according to the match + /// semantics that this automaton was constructed with. + /// + /// When using `MatchKind::Standard`, this corresponds precisely to the + /// same behavior as + /// [`earliest_find`](struct.AhoCorasick.html#method.earliest_find). + /// Otherwise, match semantics correspond to either + /// [leftmost-first](enum.MatchKind.html#variant.LeftmostFirst) + /// or + /// [leftmost-longest](enum.MatchKind.html#variant.LeftmostLongest). + /// + /// `haystack` may be any type that is cheaply convertible to a `&[u8]`. + /// This includes, but is not limited to, `String`, `&str`, `Vec`, and + /// `&[u8]` itself. + /// + /// # Examples + /// + /// Basic usage, with standard semantics: + /// + /// ``` + /// use aho_corasick::{AhoCorasickBuilder, MatchKind}; + /// + /// let patterns = &["b", "abc", "abcd"]; + /// let haystack = "abcd"; + /// + /// let ac = AhoCorasickBuilder::new() + /// .match_kind(MatchKind::Standard) // default, not necessary + /// .build(patterns); + /// let mat = ac.find(haystack).expect("should have a match"); + /// assert_eq!("b", &haystack[mat.start()..mat.end()]); + /// ``` + /// + /// Now with leftmost-first semantics: + /// + /// ``` + /// use aho_corasick::{AhoCorasickBuilder, MatchKind}; + /// + /// let patterns = &["b", "abc", "abcd"]; + /// let haystack = "abcd"; + /// + /// let ac = AhoCorasickBuilder::new() + /// .match_kind(MatchKind::LeftmostFirst) + /// .build(patterns); + /// let mat = ac.find(haystack).expect("should have a match"); + /// assert_eq!("abc", &haystack[mat.start()..mat.end()]); + /// ``` + /// + /// And finally, leftmost-longest semantics: + /// + /// ``` + /// use aho_corasick::{AhoCorasickBuilder, MatchKind}; + /// + /// let patterns = &["b", "abc", "abcd"]; + /// let haystack = "abcd"; + /// + /// let ac = AhoCorasickBuilder::new() + /// .match_kind(MatchKind::LeftmostLongest) + /// .build(patterns); + /// let mat = ac.find(haystack).expect("should have a match"); + /// assert_eq!("abcd", &haystack[mat.start()..mat.end()]); + /// ``` + pub fn find>(&self, haystack: B) -> Option { + let mut prestate = PrefilterState::new(self.max_pattern_len()); + let mut start = self.imp.start_state(); + self.imp.find_at(&mut prestate, haystack.as_ref(), 0, &mut start) + } + + /// Returns an iterator of non-overlapping matches, using the match + /// semantics that this automaton was constructed with. + /// + /// `haystack` may be any type that is cheaply convertible to a `&[u8]`. + /// This includes, but is not limited to, `String`, `&str`, `Vec`, and + /// `&[u8]` itself. + /// + /// # Examples + /// + /// Basic usage, with standard semantics: + /// + /// ``` + /// use aho_corasick::{AhoCorasickBuilder, MatchKind}; + /// + /// let patterns = &["append", "appendage", "app"]; + /// let haystack = "append the app to the appendage"; + /// + /// let ac = AhoCorasickBuilder::new() + /// .match_kind(MatchKind::Standard) // default, not necessary + /// .build(patterns); + /// let matches: Vec = ac + /// .find_iter(haystack) + /// .map(|mat| mat.pattern()) + /// .collect(); + /// assert_eq!(vec![2, 2, 2], matches); + /// ``` + /// + /// Now with leftmost-first semantics: + /// + /// ``` + /// use aho_corasick::{AhoCorasickBuilder, MatchKind}; + /// + /// let patterns = &["append", "appendage", "app"]; + /// let haystack = "append the app to the appendage"; + /// + /// let ac = AhoCorasickBuilder::new() + /// .match_kind(MatchKind::LeftmostFirst) + /// .build(patterns); + /// let matches: Vec = ac + /// .find_iter(haystack) + /// .map(|mat| mat.pattern()) + /// .collect(); + /// assert_eq!(vec![0, 2, 0], matches); + /// ``` + /// + /// And finally, leftmost-longest semantics: + /// + /// ``` + /// use aho_corasick::{AhoCorasickBuilder, MatchKind}; + /// + /// let patterns = &["append", "appendage", "app"]; + /// let haystack = "append the app to the appendage"; + /// + /// let ac = AhoCorasickBuilder::new() + /// .match_kind(MatchKind::LeftmostLongest) + /// .build(patterns); + /// let matches: Vec = ac + /// .find_iter(haystack) + /// .map(|mat| mat.pattern()) + /// .collect(); + /// assert_eq!(vec![0, 2, 1], matches); + /// ``` + pub fn find_iter<'a, 'b, B: ?Sized + AsRef<[u8]>>( + &'a self, + haystack: &'b B, + ) -> FindIter<'a, 'b, S> { + FindIter::new(self, haystack.as_ref()) + } + + /// Returns an iterator of overlapping matches in the given `haystack`. + /// + /// Overlapping matches can _only_ be detected using + /// `MatchKind::Standard` semantics. If this automaton was constructed with + /// leftmost semantics, then this method will panic. To determine whether + /// this will panic at runtime, use the + /// [`AhoCorasick::supports_overlapping`](struct.AhoCorasick.html#method.supports_overlapping) + /// method. + /// + /// `haystack` may be any type that is cheaply convertible to a `&[u8]`. + /// This includes, but is not limited to, `String`, `&str`, `Vec`, and + /// `&[u8]` itself. + /// + /// # Panics + /// + /// This panics when `AhoCorasick::supports_overlapping` returns `false`. + /// That is, this panics when this automaton's match semantics are not + /// `MatchKind::Standard`. + /// + /// # Examples + /// + /// Basic usage, with standard semantics: + /// + /// ``` + /// use aho_corasick::AhoCorasick; + /// + /// let patterns = &["append", "appendage", "app"]; + /// let haystack = "append the app to the appendage"; + /// + /// let ac = AhoCorasick::new(patterns); + /// let matches: Vec = ac + /// .find_overlapping_iter(haystack) + /// .map(|mat| mat.pattern()) + /// .collect(); + /// assert_eq!(vec![2, 0, 2, 2, 0, 1], matches); + /// ``` + pub fn find_overlapping_iter<'a, 'b, B: ?Sized + AsRef<[u8]>>( + &'a self, + haystack: &'b B, + ) -> FindOverlappingIter<'a, 'b, S> { + FindOverlappingIter::new(self, haystack.as_ref()) + } + + /// Replace all matches with a corresponding value in the `replace_with` + /// slice given. Matches correspond to the same matches as reported by + /// [`find_iter`](struct.AhoCorasick.html#method.find_iter). + /// + /// Replacements are determined by the index of the matching pattern. + /// For example, if the pattern with index `2` is found, then it is + /// replaced by `replace_with[2]`. + /// + /// # Panics + /// + /// This panics when `replace_with.len()` does not equal the total number + /// of patterns that are matched by this automaton. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::{AhoCorasickBuilder, MatchKind}; + /// + /// let patterns = &["append", "appendage", "app"]; + /// let haystack = "append the app to the appendage"; + /// + /// let ac = AhoCorasickBuilder::new() + /// .match_kind(MatchKind::LeftmostFirst) + /// .build(patterns); + /// let result = ac.replace_all(haystack, &["x", "y", "z"]); + /// assert_eq!("x the z to the xage", result); + /// ``` + pub fn replace_all( + &self, + haystack: &str, + replace_with: &[B], + ) -> String + where B: AsRef + { + assert_eq!( + replace_with.len(), self.pattern_count(), + "replace_all requires a replacement for every pattern \ + in the automaton" + ); + let mut dst = String::with_capacity(haystack.len()); + self.replace_all_with(haystack, &mut dst, |mat, _, dst| { + dst.push_str(replace_with[mat.pattern()].as_ref()); + true + }); + dst + } + + /// Replace all matches using raw bytes with a corresponding value in the + /// `replace_with` slice given. Matches correspond to the same matches as + /// reported by [`find_iter`](struct.AhoCorasick.html#method.find_iter). + /// + /// Replacements are determined by the index of the matching pattern. + /// For example, if the pattern with index `2` is found, then it is + /// replaced by `replace_with[2]`. + /// + /// # Panics + /// + /// This panics when `replace_with.len()` does not equal the total number + /// of patterns that are matched by this automaton. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::{AhoCorasickBuilder, MatchKind}; + /// + /// let patterns = &["append", "appendage", "app"]; + /// let haystack = b"append the app to the appendage"; + /// + /// let ac = AhoCorasickBuilder::new() + /// .match_kind(MatchKind::LeftmostFirst) + /// .build(patterns); + /// let result = ac.replace_all_bytes(haystack, &["x", "y", "z"]); + /// assert_eq!(b"x the z to the xage".to_vec(), result); + /// ``` + pub fn replace_all_bytes( + &self, + haystack: &[u8], + replace_with: &[B], + ) -> Vec + where B: AsRef<[u8]> + { + assert_eq!( + replace_with.len(), self.pattern_count(), + "replace_all_bytes requires a replacement for every pattern \ + in the automaton" + ); + let mut dst = Vec::with_capacity(haystack.len()); + self.replace_all_with_bytes(haystack, &mut dst, |mat, _, dst| { + dst.extend(replace_with[mat.pattern()].as_ref()); + true + }); + dst + } + + /// Replace all matches using a closure called on each match. + /// Matches correspond to the same matches as reported by + /// [`find_iter`](struct.AhoCorasick.html#method.find_iter). + /// + /// The closure accepts three parameters: the match found, the text of + /// the match and a string buffer with which to write the replaced text + /// (if any). If the closure returns `true`, then it continues to the next + /// match. If the closure returns false, then searching is stopped. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::{AhoCorasickBuilder, MatchKind}; + /// + /// let patterns = &["append", "appendage", "app"]; + /// let haystack = "append the app to the appendage"; + /// + /// let ac = AhoCorasickBuilder::new() + /// .match_kind(MatchKind::LeftmostFirst) + /// .build(patterns); + /// let mut result = String::new(); + /// ac.replace_all_with(haystack, &mut result, |mat, _, dst| { + /// dst.push_str(&mat.pattern().to_string()); + /// true + /// }); + /// assert_eq!("0 the 2 to the 0age", result); + /// ``` + pub fn replace_all_with( + &self, + haystack: &str, + dst: &mut String, + mut replace_with: F, + ) where F: FnMut(&Match, &str, &mut String) -> bool + { + let mut last_match = 0; + for mat in self.find_iter(haystack) { + dst.push_str(&haystack[last_match..mat.start()]); + last_match = mat.end(); + replace_with(&mat, &haystack[mat.start()..mat.end()], dst); + } + dst.push_str(&haystack[last_match..]); + } + + /// Replace all matches using raw bytes with a closure called on each + /// match. Matches correspond to the same matches as reported by + /// [`find_iter`](struct.AhoCorasick.html#method.find_iter). + /// + /// The closure accepts three parameters: the match found, the text of + /// the match and a byte buffer with which to write the replaced text + /// (if any). If the closure returns `true`, then it continues to the next + /// match. If the closure returns false, then searching is stopped. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::{AhoCorasickBuilder, MatchKind}; + /// + /// let patterns = &["append", "appendage", "app"]; + /// let haystack = b"append the app to the appendage"; + /// + /// let ac = AhoCorasickBuilder::new() + /// .match_kind(MatchKind::LeftmostFirst) + /// .build(patterns); + /// let mut result = vec![]; + /// ac.replace_all_with_bytes(haystack, &mut result, |mat, _, dst| { + /// dst.extend(mat.pattern().to_string().bytes()); + /// true + /// }); + /// assert_eq!(b"0 the 2 to the 0age".to_vec(), result); + /// ``` + pub fn replace_all_with_bytes( + &self, + haystack: &[u8], + dst: &mut Vec, + mut replace_with: F, + ) where F: FnMut(&Match, &[u8], &mut Vec) -> bool + { + let mut last_match = 0; + for mat in self.find_iter(haystack) { + dst.extend(&haystack[last_match..mat.start()]); + last_match = mat.end(); + replace_with(&mat, &haystack[mat.start()..mat.end()], dst); + } + dst.extend(&haystack[last_match..]); + } + + /// Returns an iterator of non-overlapping matches in the given + /// stream. Matches correspond to the same matches as reported by + /// [`find_iter`](struct.AhoCorasick.html#method.find_iter). + /// + /// The matches yielded by this iterator use absolute position offsets in + /// the stream given, where the first byte has index `0`. Matches are + /// yieled until the stream is exhausted. + /// + /// Each item yielded by the iterator is an `io::Result`, where an + /// error is yielded if there was a problem reading from the reader given. + /// + /// When searching a stream, an internal buffer is used. Therefore, callers + /// should avoiding providing a buffered reader, if possible. + /// + /// Searching a stream requires that the automaton was built with + /// `MatchKind::Standard` semantics. If this automaton was constructed + /// with leftmost semantics, then this method will panic. To determine + /// whether this will panic at runtime, use the + /// [`AhoCorasick::supports_stream`](struct.AhoCorasick.html#method.supports_stream) + /// method. + /// + /// # Memory usage + /// + /// In general, searching streams will use a constant amount of memory for + /// its internal buffer. The one requirement is that the internal buffer + /// must be at least the size of the longest possible match. In most use + /// cases, the default buffer size will be much larger than any individual + /// match. + /// + /// # Panics + /// + /// This panics when `AhoCorasick::supports_stream` returns `false`. + /// That is, this panics when this automaton's match semantics are not + /// `MatchKind::Standard`. This restriction may be lifted in the future. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::AhoCorasick; + /// + /// # fn example() -> Result<(), ::std::io::Error> { + /// let patterns = &["append", "appendage", "app"]; + /// let haystack = "append the app to the appendage"; + /// + /// let ac = AhoCorasick::new(patterns); + /// let mut matches = vec![]; + /// for result in ac.stream_find_iter(haystack.as_bytes()) { + /// let mat = result?; + /// matches.push(mat.pattern()); + /// } + /// assert_eq!(vec![2, 2, 2], matches); + /// # Ok(()) }; example().unwrap() + /// ``` + pub fn stream_find_iter<'a, R: io::Read>( + &'a self, + rdr: R, + ) -> StreamFindIter<'a, R, S> { + StreamFindIter::new(self, rdr) + } + + /// Search for and replace all matches of this automaton in + /// the given reader, and write the replacements to the given + /// writer. Matches correspond to the same matches as reported by + /// [`find_iter`](struct.AhoCorasick.html#method.find_iter). + /// + /// Replacements are determined by the index of the matching pattern. + /// For example, if the pattern with index `2` is found, then it is + /// replaced by `replace_with[2]`. + /// + /// After all matches are replaced, the writer is _not_ flushed. + /// + /// If there was a problem reading from the given reader or writing to the + /// given writer, then the corresponding `io::Error` is returned and all + /// replacement is stopped. + /// + /// When searching a stream, an internal buffer is used. Therefore, callers + /// should avoiding providing a buffered reader, if possible. However, + /// callers may want to provide a buffered writer. + /// + /// Searching a stream requires that the automaton was built with + /// `MatchKind::Standard` semantics. If this automaton was constructed + /// with leftmost semantics, then this method will panic. To determine + /// whether this will panic at runtime, use the + /// [`AhoCorasick::supports_stream`](struct.AhoCorasick.html#method.supports_stream) + /// method. + /// + /// # Memory usage + /// + /// In general, searching streams will use a constant amount of memory for + /// its internal buffer. The one requirement is that the internal buffer + /// must be at least the size of the longest possible match. In most use + /// cases, the default buffer size will be much larger than any individual + /// match. + /// + /// # Panics + /// + /// This panics when `AhoCorasick::supports_stream` returns `false`. + /// That is, this panics when this automaton's match semantics are not + /// `MatchKind::Standard`. This restriction may be lifted in the future. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::AhoCorasick; + /// + /// # fn example() -> Result<(), ::std::io::Error> { + /// let patterns = &["fox", "brown", "quick"]; + /// let haystack = "The quick brown fox."; + /// let replace_with = &["sloth", "grey", "slow"]; + /// + /// let ac = AhoCorasick::new(patterns); + /// let mut result = vec![]; + /// ac.stream_replace_all(haystack.as_bytes(), &mut result, replace_with)?; + /// assert_eq!(b"The slow grey sloth.".to_vec(), result); + /// # Ok(()) }; example().unwrap() + /// ``` + pub fn stream_replace_all( + &self, + rdr: R, + wtr: W, + replace_with: &[B], + ) -> io::Result<()> + where R: io::Read, + W: io::Write, + B: AsRef<[u8]> + { + assert_eq!( + replace_with.len(), self.pattern_count(), + "stream_replace_all requires a replacement for every pattern \ + in the automaton" + ); + self.stream_replace_all_with(rdr, wtr, |mat, _, wtr| { + wtr.write_all(replace_with[mat.pattern()].as_ref()) + }) + } + + /// Search the given reader and replace all matches of this automaton + /// using the given closure. The result is written to the given + /// writer. Matches correspond to the same matches as reported by + /// [`find_iter`](struct.AhoCorasick.html#method.find_iter). + /// + /// The closure accepts three parameters: the match found, the text of + /// the match and the writer with which to write the replaced text + /// (if any). If the closure returns `true`, then it continues to the next + /// match. If the closure returns false, then searching is stopped. + /// + /// After all matches are replaced, the writer is _not_ flushed. + /// + /// If there was a problem reading from the given reader or writing to the + /// given writer, then the corresponding `io::Error` is returned and all + /// replacement is stopped. + /// + /// When searching a stream, an internal buffer is used. Therefore, callers + /// should avoiding providing a buffered reader, if possible. However, + /// callers may want to provide a buffered writer. + /// + /// Searching a stream requires that the automaton was built with + /// `MatchKind::Standard` semantics. If this automaton was constructed + /// with leftmost semantics, then this method will panic. To determine + /// whether this will panic at runtime, use the + /// [`AhoCorasick::supports_stream`](struct.AhoCorasick.html#method.supports_stream) + /// method. + /// + /// # Memory usage + /// + /// In general, searching streams will use a constant amount of memory for + /// its internal buffer. The one requirement is that the internal buffer + /// must be at least the size of the longest possible match. In most use + /// cases, the default buffer size will be much larger than any individual + /// match. + /// + /// # Panics + /// + /// This panics when `AhoCorasick::supports_stream` returns `false`. + /// That is, this panics when this automaton's match semantics are not + /// `MatchKind::Standard`. This restriction may be lifted in the future. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use std::io::Write; + /// use aho_corasick::AhoCorasick; + /// + /// # fn example() -> Result<(), ::std::io::Error> { + /// let patterns = &["fox", "brown", "quick"]; + /// let haystack = "The quick brown fox."; + /// + /// let ac = AhoCorasick::new(patterns); + /// let mut result = vec![]; + /// ac.stream_replace_all_with( + /// haystack.as_bytes(), + /// &mut result, + /// |mat, _, wtr| { + /// wtr.write_all(mat.pattern().to_string().as_bytes()) + /// }, + /// )?; + /// assert_eq!(b"The 2 1 0.".to_vec(), result); + /// # Ok(()) }; example().unwrap() + /// ``` + pub fn stream_replace_all_with( + &self, + rdr: R, + mut wtr: W, + mut replace_with: F, + ) -> io::Result<()> + where R: io::Read, + W: io::Write, + F: FnMut(&Match, &[u8], &mut W) -> io::Result<()> + { + let mut it = StreamChunkIter::new(self, rdr); + while let Some(result) = it.next() { + let chunk = result?; + match chunk { + StreamChunk::NonMatch { bytes, .. } => { + wtr.write_all(bytes)?; + } + StreamChunk::Match { bytes, mat } => { + replace_with(&mat, bytes, &mut wtr)?; + } + } + } + Ok(()) + } + + /// Returns the match kind used by this automaton. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::{AhoCorasick, MatchKind}; + /// + /// let ac = AhoCorasick::new(&[ + /// "foo", "bar", "quux", "baz", + /// ]); + /// assert_eq!(&MatchKind::Standard, ac.match_kind()); + /// ``` + pub fn match_kind(&self) -> &MatchKind { + self.imp.match_kind() + } + + /// Returns the length of the longest pattern matched by this automaton. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::AhoCorasick; + /// + /// let ac = AhoCorasick::new(&[ + /// "foo", "bar", "quux", "baz", + /// ]); + /// assert_eq!(4, ac.max_pattern_len()); + /// ``` + pub fn max_pattern_len(&self) -> usize { + self.imp.max_pattern_len() + } + + /// Return the total number of patterns matched by this automaton. + /// + /// This includes patterns that may never participate in a match. For + /// example, if + /// [`MatchKind::LeftmostFirst`](enum.MatchKind.html#variant.LeftmostFirst) + /// match semantics are used, and the patterns `Sam` and `Samwise` were + /// used to build the automaton, then `Samwise` can never participate in a + /// match because `Sam` will always take priority. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::AhoCorasick; + /// + /// let ac = AhoCorasick::new(&[ + /// "foo", "bar", "baz", + /// ]); + /// assert_eq!(3, ac.pattern_count()); + /// ``` + pub fn pattern_count(&self) -> usize { + self.imp.pattern_count() + } + + /// Returns true if and only if this automaton supports reporting + /// overlapping matches. + /// + /// If this returns false and overlapping matches are requested, then it + /// will result in a panic. + /// + /// Since leftmost matching is inherently incompatible with overlapping + /// matches, only + /// [`MatchKind::Standard`](enum.MatchKind.html#variant.Standard) + /// supports overlapping matches. This is unlikely to change in the future. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::{AhoCorasickBuilder, MatchKind}; + /// + /// let ac = AhoCorasickBuilder::new() + /// .match_kind(MatchKind::Standard) + /// .build(&["foo", "bar", "baz"]); + /// assert!(ac.supports_overlapping()); + /// + /// let ac = AhoCorasickBuilder::new() + /// .match_kind(MatchKind::LeftmostFirst) + /// .build(&["foo", "bar", "baz"]); + /// assert!(!ac.supports_overlapping()); + /// ``` + pub fn supports_overlapping(&self) -> bool { + self.match_kind.supports_overlapping() + } + + /// Returns true if and only if this automaton supports stream searching. + /// + /// If this returns false and stream searching (or replacing) is attempted, + /// then it will result in a panic. + /// + /// Currently, only + /// [`MatchKind::Standard`](enum.MatchKind.html#variant.Standard) + /// supports streaming. This may be expanded in the future. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::{AhoCorasickBuilder, MatchKind}; + /// + /// let ac = AhoCorasickBuilder::new() + /// .match_kind(MatchKind::Standard) + /// .build(&["foo", "bar", "baz"]); + /// assert!(ac.supports_stream()); + /// + /// let ac = AhoCorasickBuilder::new() + /// .match_kind(MatchKind::LeftmostFirst) + /// .build(&["foo", "bar", "baz"]); + /// assert!(!ac.supports_stream()); + /// ``` + pub fn supports_stream(&self) -> bool { + self.match_kind.supports_stream() + } + + /// Returns the total amount of heap used by this automaton, in units of + /// bytes. + /// + /// # Examples + /// + /// This example shows the difference in heap usage between a few + /// configurations: + /// + /// ```ignore + /// use aho_corasick::{AhoCorasickBuilder, MatchKind}; + /// + /// let ac = AhoCorasickBuilder::new() + /// .dfa(false) // default + /// .build(&["foo", "bar", "baz"]); + /// assert_eq!(10_336, ac.heap_bytes()); + /// + /// let ac = AhoCorasickBuilder::new() + /// .dfa(false) // default + /// .ascii_case_insensitive(true) + /// .build(&["foo", "bar", "baz"]); + /// assert_eq!(10_384, ac.heap_bytes()); + /// + /// let ac = AhoCorasickBuilder::new() + /// .dfa(true) + /// .byte_classes(false) + /// .build(&["foo", "bar", "baz"]); + /// assert_eq!(20_768, ac.heap_bytes()); + /// + /// let ac = AhoCorasickBuilder::new() + /// .dfa(true) + /// .byte_classes(true) // default + /// .build(&["foo", "bar", "baz"]); + /// assert_eq!(1_248, ac.heap_bytes()); + /// + /// let ac = AhoCorasickBuilder::new() + /// .dfa(true) + /// .ascii_case_insensitive(true) + /// .build(&["foo", "bar", "baz"]); + /// assert_eq!(1_248, ac.heap_bytes()); + /// ``` + pub fn heap_bytes(&self) -> usize { + match self.imp { + Imp::NFA(ref nfa) => nfa.heap_bytes(), + Imp::DFA(ref dfa) => dfa.heap_bytes(), + } + } +} + +/// The internal implementation of Aho-Corasick, which is either an NFA or +/// a DFA. The NFA is slower but uses less memory. The DFA is faster but uses +/// more memory. +#[derive(Clone, Debug)] +enum Imp { + NFA(NFA), + DFA(DFA), +} + +impl Imp { + /// Returns the type of match semantics implemented by this automaton. + fn match_kind(&self) -> &MatchKind { + match *self { + Imp::NFA(ref nfa) => nfa.match_kind(), + Imp::DFA(ref dfa) => dfa.match_kind(), + } + } + + /// Returns the identifier of the start state. + fn start_state(&self) -> S { + match *self { + Imp::NFA(ref nfa) => nfa.start_state(), + Imp::DFA(ref dfa) => dfa.start_state(), + } + } + + /// The length, in bytes, of the longest pattern in this automaton. This + /// information is useful for maintaining correct buffer sizes when + /// searching on streams. + fn max_pattern_len(&self) -> usize { + match *self { + Imp::NFA(ref nfa) => nfa.max_pattern_len(), + Imp::DFA(ref dfa) => dfa.max_pattern_len(), + } + } + + /// The total number of patterns added to this automaton. This includes + /// patterns that may never match. The maximum matching pattern that can be + /// reported is exactly one less than this number. + fn pattern_count(&self) -> usize { + match *self { + Imp::NFA(ref nfa) => nfa.pattern_count(), + Imp::DFA(ref dfa) => dfa.pattern_count(), + } + } + + #[inline(always)] + fn overlapping_find_at( + &self, + prestate: &mut PrefilterState, + haystack: &[u8], + at: usize, + state_id: &mut S, + match_index: &mut usize, + ) -> Option { + match *self { + Imp::NFA(ref nfa) => { + nfa.overlapping_find_at( + prestate, haystack, at, state_id, match_index, + ) + } + Imp::DFA(ref dfa) => { + dfa.overlapping_find_at( + prestate, haystack, at, state_id, match_index, + ) + } + } + } + + #[inline(always)] + fn earliest_find_at( + &self, + prestate: &mut PrefilterState, + haystack: &[u8], + at: usize, + state_id: &mut S, + ) -> Option { + match *self { + Imp::NFA(ref nfa) => { + nfa.earliest_find_at(prestate, haystack, at, state_id) + } + Imp::DFA(ref dfa) => { + dfa.earliest_find_at(prestate, haystack, at, state_id) + } + } + } + + #[inline(always)] + fn find_at( + &self, + prestate: &mut PrefilterState, + haystack: &[u8], + at: usize, + state_id: &mut S, + ) -> Option { + match *self { + Imp::NFA(ref nfa) => { + nfa.find_at(prestate, haystack, at, state_id) + } + Imp::DFA(ref dfa) => { + dfa.find_at(prestate, haystack, at, state_id) + } + } + } +} + +/// An iterator of non-overlapping matches in a particular haystack. +/// +/// This iterator yields matches according to the +/// [`MatchKind`](enum.MatchKind.html) +/// used by this automaton. +/// +/// This iterator is constructed via the +/// [`AhoCorasick::find_iter`](struct.AhoCorasick.html#method.find_iter) +/// method. +/// +/// The type variable `S` refers to the representation used for state +/// identifiers. (By default, this is `usize`.) +/// +/// The lifetime `'a` refers to the lifetime of the `AhoCorasick` automaton. +/// +/// The lifetime `'b` refers to the lifetime of the haystack being searched. +#[derive(Debug)] +pub struct FindIter<'a, 'b, S: 'a + StateID> { + fsm: &'a Imp, + prestate: PrefilterState, + haystack: &'b [u8], + pos: usize, + start: S, +} + +impl<'a, 'b, S: StateID> FindIter<'a, 'b, S> { + fn new(ac: &'a AhoCorasick, haystack: &'b [u8]) -> FindIter<'a, 'b, S> { + let prestate = PrefilterState::new(ac.max_pattern_len()); + let start = ac.imp.start_state(); + FindIter { fsm: &ac.imp, prestate, haystack, pos: 0, start } + } +} + +impl<'a, 'b, S: StateID> Iterator for FindIter<'a, 'b, S> { + type Item = Match; + + fn next(&mut self) -> Option { + if self.pos > self.haystack.len() { + return None; + } + let mut start = self.start; + let result = self.fsm.find_at( + &mut self.prestate, self.haystack, self.pos, &mut start, + ); + let mat = match result { + None => return None, + Some(mat) => mat, + }; + if mat.end() == self.pos { + // If the automaton can match the empty string and if we found an + // empty match, then we need to forcefully move the position. + self.pos += 1; + } else { + self.pos = mat.end(); + } + Some(mat) + } +} + +/// An iterator of overlapping matches in a particular haystack. +/// +/// This iterator will report all possible matches in a particular haystack, +/// even when the matches overlap. +/// +/// This iterator is constructed via the +/// [`AhoCorasick::find_overlapping_iter`](struct.AhoCorasick.html#method.find_overlapping_iter) +/// method. +/// +/// The type variable `S` refers to the representation used for state +/// identifiers. (By default, this is `usize`.) +/// +/// The lifetime `'a` refers to the lifetime of the `AhoCorasick` automaton. +/// +/// The lifetime `'b` refers to the lifetime of the haystack being searched. +#[derive(Debug)] +pub struct FindOverlappingIter<'a, 'b, S: 'a + StateID> { + fsm: &'a Imp, + prestate: PrefilterState, + haystack: &'b [u8], + pos: usize, + last_match_end: usize, + state_id: S, + match_index: usize, +} + +impl<'a, 'b, S: StateID> FindOverlappingIter<'a, 'b, S> { + fn new( + ac: &'a AhoCorasick, + haystack: &'b [u8], + ) -> FindOverlappingIter<'a, 'b, S> { + assert!( + ac.supports_overlapping(), + "automaton does not support overlapping searches" + ); + let prestate = PrefilterState::new(ac.max_pattern_len()); + FindOverlappingIter { + fsm: &ac.imp, + prestate, + haystack, + pos: 0, + last_match_end: 0, + state_id: ac.imp.start_state(), + match_index: 0, + } + } +} + +impl<'a, 'b, S: StateID> Iterator for FindOverlappingIter<'a, 'b, S> { + type Item = Match; + + fn next(&mut self) -> Option { + let result = self.fsm.overlapping_find_at( + &mut self.prestate, + self.haystack, + self.pos, + &mut self.state_id, + &mut self.match_index, + ); + match result { + None => return None, + Some(m) => { + self.pos = m.end(); + Some(m) + } + } + } +} + +/// An iterator that reports Aho-Corasick matches in a stream. +/// +/// This iterator yields elements of type `io::Result`, where an error +/// is reported if there was a problem reading from the underlying stream. +/// The iterator terminates only when the underlying stream reaches `EOF`. +/// +/// This iterator is constructed via the +/// [`AhoCorasick::stream_find_iter`](struct.AhoCorasick.html#method.stream_find_iter) +/// method. +/// +/// The type variable `R` refers to the `io::Read` stream that is being read +/// from. +/// +/// The type variable `S` refers to the representation used for state +/// identifiers. (By default, this is `usize`.) +/// +/// The lifetime `'a` refers to the lifetime of the `AhoCorasick` automaton. +#[derive(Debug)] +pub struct StreamFindIter<'a, R, S: 'a + StateID> { + it: StreamChunkIter<'a, R, S>, +} + +impl<'a, R: io::Read, S: StateID> StreamFindIter<'a, R, S> { + fn new(ac: &'a AhoCorasick, rdr: R) -> StreamFindIter<'a, R, S> { + StreamFindIter { + it: StreamChunkIter::new(ac, rdr), + } + } +} + +impl<'a, R: io::Read, S: StateID> Iterator for StreamFindIter<'a, R, S> { + type Item = io::Result; + + fn next(&mut self) -> Option> { + loop { + match self.it.next() { + None => return None, + Some(Err(err)) => return Some(Err(err)), + Some(Ok(StreamChunk::NonMatch { .. })) => {} + Some(Ok(StreamChunk::Match { mat, .. })) => { + return Some(Ok(mat)); + } + } + } + } +} + +/// An iterator over chunks in an underlying reader. Each chunk either +/// corresponds to non-matching bytes or matching bytes, but all bytes from +/// the underlying reader are reported in sequence. There may be an arbitrary +/// number of non-matching chunks before seeing a matching chunk. +/// +/// N.B. This does not actually implement Iterator because we need to borrow +/// from the underlying reader. But conceptually, it's still an iterator. +#[derive(Debug)] +struct StreamChunkIter<'a, R, S: 'a + StateID> { + /// The AC automaton. + fsm: &'a Imp, + /// State associated with this automaton's prefilter. It is a heuristic + /// for stopping the prefilter if it's deemed ineffective. + prestate: PrefilterState, + /// The source of bytes we read from. + rdr: R, + /// A fixed size buffer. This is what we actually search. There are some + /// invariants around the buffer's size, namely, it must be big enough to + /// contain the longest possible match. + buf: Buffer, + /// The ID of the FSM state we're currently in. + state_id: S, + /// The current position at which to start the next search in `buf`. + search_pos: usize, + /// The absolute position of `search_pos`, where `0` corresponds to the + /// position of the first byte read from `rdr`. + absolute_pos: usize, + /// The ending position of the last StreamChunk that was returned to the + /// caller. This position is used to determine whether we need to emit + /// non-matching bytes before emitting a match. + report_pos: usize, + /// A match that should be reported on the next call. + pending_match: Option, + /// Enabled only when the automaton can match the empty string. When + /// enabled, we need to execute one final search after consuming the + /// reader to find the trailing empty match. + has_empty_match_at_end: bool, +} + +/// A single chunk yielded by the stream chunk iterator. +/// +/// The `'r` lifetime refers to the lifetime of the stream chunk iterator. +#[derive(Debug)] +enum StreamChunk<'r> { + /// A chunk that does not contain any matches. + NonMatch { bytes: &'r [u8], start: usize }, + /// A chunk that precisely contains a match. + Match { bytes: &'r [u8], mat: Match }, +} + +impl<'a, R: io::Read, S: StateID> StreamChunkIter<'a, R, S> { + fn new(ac: &'a AhoCorasick, rdr: R) -> StreamChunkIter<'a, R, S> { + assert!( + ac.supports_stream(), + "stream searching is only supported for Standard match semantics" + ); + + let prestate = PrefilterState::new(ac.max_pattern_len()); + let buf = Buffer::new(ac.imp.max_pattern_len()); + let state_id = ac.imp.start_state(); + StreamChunkIter { + fsm: &ac.imp, + prestate, + rdr, + buf, + state_id, + absolute_pos: 0, + report_pos: 0, + search_pos: 0, + pending_match: None, + has_empty_match_at_end: ac.is_match(""), + } + } + + fn next<'r>(&'r mut self) -> Option>> { + loop { + if let Some(mut mat) = self.pending_match.take() { + let bytes = &self.buf.buffer()[mat.start()..mat.end()]; + self.report_pos = mat.end(); + mat = mat.increment(self.absolute_pos); + return Some(Ok(StreamChunk::Match { bytes, mat })); + } + if self.search_pos >= self.buf.len() { + if let Some(end) = self.unreported() { + let bytes = &self.buf.buffer()[self.report_pos..end]; + let start = self.absolute_pos + self.report_pos; + self.report_pos = end; + return Some(Ok(StreamChunk::NonMatch { bytes, start })); + } + if self.buf.len() >= self.buf.min_buffer_len() { + // This is the point at which we roll our buffer, which we + // only do if our buffer has at least the minimum amount of + // bytes in it. Before rolling, we update our various + // positions to be consistent with the buffer after it has + // been rolled. + + self.report_pos -= + self.buf.len() - self.buf.min_buffer_len(); + self.absolute_pos += + self.search_pos - self.buf.min_buffer_len(); + self.search_pos = self.buf.min_buffer_len(); + self.buf.roll(); + } + match self.buf.fill(&mut self.rdr) { + Err(err) => return Some(Err(err)), + Ok(false) => { + // We've hit EOF, but if there are still some + // unreported bytes remaining, return them now. + if self.report_pos < self.buf.len() { + let bytes = &self.buf.buffer()[self.report_pos..]; + let start = self.absolute_pos + self.report_pos; + self.report_pos = self.buf.len(); + + let chunk = StreamChunk::NonMatch { bytes, start }; + return Some(Ok(chunk)); + } else { + // We've reported everything, but there might still + // be a match at the very last position. + if !self.has_empty_match_at_end { + return None; + } + // fallthrough for another search to get trailing + // empty matches + self.has_empty_match_at_end = false; + } + } + Ok(true) => {} + } + } + let result = self.fsm.earliest_find_at( + &mut self.prestate, + self.buf.buffer(), + self.search_pos, + &mut self.state_id, + ); + match result { + None => { + self.search_pos = self.buf.len(); + } + Some(mat) => { + self.state_id = self.fsm.start_state(); + if mat.end() == self.search_pos { + // If the automaton can match the empty string and if + // we found an empty match, then we need to forcefully + // move the position. + self.search_pos += 1; + } else { + self.search_pos = mat.end(); + } + self.pending_match = Some(mat.clone()); + if self.report_pos < mat.start() { + let bytes = + &self.buf.buffer()[self.report_pos..mat.start()]; + let start = self.absolute_pos + self.report_pos; + self.report_pos = mat.start(); + + let chunk = StreamChunk::NonMatch { bytes, start }; + return Some(Ok(chunk)); + } + } + } + } + } + + fn unreported(&self) -> Option { + let end = self.search_pos.saturating_sub(self.buf.min_buffer_len()); + if self.report_pos < end { + Some(end) + } else { + None + } + } +} + +/// A builder for configuring an Aho-Corasick automaton. +#[derive(Clone, Debug)] +pub struct AhoCorasickBuilder { + nfa_builder: nfa::Builder, + dfa_builder: dfa::Builder, + dfa: bool, +} + +impl Default for AhoCorasickBuilder { + fn default() -> AhoCorasickBuilder { + AhoCorasickBuilder::new() + } +} + +impl AhoCorasickBuilder { + /// Create a new builder for configuring an Aho-Corasick automaton. + /// + /// If you don't need fine grained configuration or aren't sure which knobs + /// to set, try using + /// [`AhoCorasick::new_auto_configured`](struct.AhoCorasick.html#method.new_auto_configured) + /// instead. + pub fn new() -> AhoCorasickBuilder { + AhoCorasickBuilder { + nfa_builder: nfa::Builder::new(), + dfa_builder: dfa::Builder::new(), + dfa: false, + } + } + + /// Build an Aho-Corasick automaton using the configuration set on this + /// builder. + /// + /// A builder may be reused to create more automatons. + /// + /// This method will use the default for representing internal state + /// identifiers, which is `usize`. This guarantees that building the + /// automaton will succeed and is generally a good default, but can make + /// the size of the automaton 2-8 times bigger than it needs to be, + /// depending on your target platform. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::AhoCorasickBuilder; + /// + /// let patterns = &["foo", "bar", "baz"]; + /// let ac = AhoCorasickBuilder::new() + /// .build(patterns); + /// assert_eq!(Some(1), ac.find("xxx bar xxx").map(|m| m.pattern())); + /// ``` + pub fn build( + &self, + patterns: I, + ) -> AhoCorasick + where I: IntoIterator, + P: AsRef<[u8]> + { + // The builder only returns an error if the chosen state ID + // representation is too small to fit all of the given patterns. In + // this case, since we fix the representation to usize, it will always + // work because it's impossible to overflow usize since the underlying + // storage would OOM long before that happens. + self.build_with_size::(patterns) + .expect("usize state ID type should always work") + } + + /// Build an Aho-Corasick automaton using the configuration set on this + /// builder with a specific state identifier representation. This only has + /// an effect when the `dfa` option is enabled. + /// + /// Generally, the choices for a state identifier representation are + /// `u8`, `u16`, `u32`, `u64` or `usize`, with `usize` being the default. + /// The advantage of choosing a smaller state identifier representation + /// is that the automaton produced will be smaller. This might be + /// beneficial for just generally using less space, or might even allow it + /// to fit more of the automaton in your CPU's cache, leading to overall + /// better search performance. + /// + /// Unlike the standard `build` method, this can report an error if the + /// state identifier representation cannot support the size of the + /// automaton. + /// + /// Note that the state identifier representation is determined by the + /// `S` type variable. This requires a type hint of some sort, either + /// by specifying the return type or using the turbofish, e.g., + /// `build_with_size::(...)`. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::{AhoCorasick, AhoCorasickBuilder}; + /// + /// # fn example() -> Result<(), ::aho_corasick::Error> { + /// let patterns = &["foo", "bar", "baz"]; + /// let ac: AhoCorasick = AhoCorasickBuilder::new() + /// .build_with_size(patterns)?; + /// assert_eq!(Some(1), ac.find("xxx bar xxx").map(|m| m.pattern())); + /// # Ok(()) }; example().unwrap() + /// ``` + /// + /// Or alternatively, with turbofish: + /// + /// ``` + /// use aho_corasick::AhoCorasickBuilder; + /// + /// # fn example() -> Result<(), ::aho_corasick::Error> { + /// let patterns = &["foo", "bar", "baz"]; + /// let ac = AhoCorasickBuilder::new() + /// .build_with_size::(patterns)?; + /// assert_eq!(Some(1), ac.find("xxx bar xxx").map(|m| m.pattern())); + /// # Ok(()) }; example().unwrap() + /// ``` + pub fn build_with_size( + &self, + patterns: I, + ) -> Result> + where S: StateID, + I: IntoIterator, + P: AsRef<[u8]> + { + let nfa = self.nfa_builder.build(patterns)?; + let match_kind = nfa.match_kind().clone(); + let imp = + if self.dfa { + let dfa = self.dfa_builder.build(&nfa)?; + Imp::DFA(dfa) + } else { + Imp::NFA(nfa) + }; + Ok(AhoCorasick { imp, match_kind }) + } + + /// Automatically configure the settings on this builder according to the + /// patterns that will be used to construct the automaton. + /// + /// The idea here is to balance space and time automatically. That is, when + /// searching a small number of patterns, this will attempt to use the + /// fastest possible configuration since the total space required will be + /// small anyway. As the number of patterns grows, this will fall back to + /// slower configurations that use less space. + /// + /// This is guaranteed to never set `match_kind`, but any other option may + /// be overridden. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::AhoCorasickBuilder; + /// + /// let patterns = &["foo", "bar", "baz"]; + /// let ac = AhoCorasickBuilder::new() + /// .auto_configure(patterns) + /// .build(patterns); + /// assert_eq!(Some(1), ac.find("xxx bar xxx").map(|m| m.pattern())); + /// ``` + pub fn auto_configure>( + &mut self, + patterns: &[B], + ) -> &mut AhoCorasickBuilder { + // N.B. Currently we only use the length of `patterns` to make a + // decision here, and could therefore ask for an `ExactSizeIterator` + // instead. But it's conceivable that we might adapt this to look at + // the total number of bytes, which would requires a second pass. + // + // The logic here is fairly rudimentary at the moment, but probably + // OK. The idea here is to use the fastest thing possible for a small + // number of patterns. That is, a DFA with no byte classes, since byte + // classes require an extra indirection for every byte searched. With a + // moderate number of patterns, we still want a DFA, but save on both + // space and compilation time by enabling byte classes. Finally, fall + // back to the slower but smaller NFA. + if patterns.len() <= 100 { + // N.B. Using byte classes can actually be faster by improving + // locality, but this only really applies for multi-megabyte + // automata (i.e., automata that don't fit in your CPU's cache). + self.dfa(true).byte_classes(false); + } else if patterns.len() <= 5000 { + self.dfa(true); + } + self + } + + /// Set the desired match semantics. + /// + /// The default is `MatchKind::Standard`, which corresponds to the match + /// semantics supported by the standard textbook description of the + /// Aho-Corasick algorithm. Namely, matches are reported as soon as they + /// are found. Moreover, this is the only way to get overlapping matches + /// or do stream searching. + /// + /// The other kinds of match semantics that are supported are + /// `MatchKind::LeftmostFirst` and `MatchKind::LeftmostLongest`. The former + /// corresponds to the match you would get if you were to try to match + /// each pattern at each position in the haystack in the same order that + /// you give to the automaton. That is, it returns the leftmost match + /// corresponding the earliest pattern given to the automaton. The latter + /// corresponds to finding the longest possible match among all leftmost + /// matches. + /// + /// For more details on match semantics, see the + /// [documentation for `MatchKind`](enum.MatchKind.html). + /// + /// # Examples + /// + /// In these examples, we demonstrate the differences between match + /// semantics for a particular set of patterns in a specific order: + /// `b`, `abc`, `abcd`. + /// + /// Standard semantics: + /// + /// ``` + /// use aho_corasick::{AhoCorasickBuilder, MatchKind}; + /// + /// let patterns = &["b", "abc", "abcd"]; + /// let haystack = "abcd"; + /// + /// let ac = AhoCorasickBuilder::new() + /// .match_kind(MatchKind::Standard) // default, not necessary + /// .build(patterns); + /// let mat = ac.find(haystack).expect("should have a match"); + /// assert_eq!("b", &haystack[mat.start()..mat.end()]); + /// ``` + /// + /// Leftmost-first semantics: + /// + /// ``` + /// use aho_corasick::{AhoCorasickBuilder, MatchKind}; + /// + /// let patterns = &["b", "abc", "abcd"]; + /// let haystack = "abcd"; + /// + /// let ac = AhoCorasickBuilder::new() + /// .match_kind(MatchKind::LeftmostFirst) + /// .build(patterns); + /// let mat = ac.find(haystack).expect("should have a match"); + /// assert_eq!("abc", &haystack[mat.start()..mat.end()]); + /// ``` + /// + /// Leftmost-longest semantics: + /// + /// ``` + /// use aho_corasick::{AhoCorasickBuilder, MatchKind}; + /// + /// let patterns = &["b", "abc", "abcd"]; + /// let haystack = "abcd"; + /// + /// let ac = AhoCorasickBuilder::new() + /// .match_kind(MatchKind::LeftmostLongest) + /// .build(patterns); + /// let mat = ac.find(haystack).expect("should have a match"); + /// assert_eq!("abcd", &haystack[mat.start()..mat.end()]); + /// ``` + pub fn match_kind(&mut self, kind: MatchKind) -> &mut AhoCorasickBuilder { + self.nfa_builder.match_kind(kind); + self + } + + /// Enable ASCII-aware case insensitive matching. + /// + /// When this option is enabled, searching will be performed without + /// respect to case for ASCII letters (`a-z` and `A-Z`) only. + /// + /// Enabling this option does not change the search algorithm, but it may + /// increase the size of the automaton. + /// + /// **NOTE:** In the future, support for full Unicode case insensitivity + /// may be added, but ASCII case insensitivity is comparatively much + /// simpler to add. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::AhoCorasickBuilder; + /// + /// let patterns = &["FOO", "bAr", "BaZ"]; + /// let haystack = "foo bar baz"; + /// + /// let ac = AhoCorasickBuilder::new() + /// .ascii_case_insensitive(true) + /// .build(patterns); + /// assert_eq!(3, ac.find_iter(haystack).count()); + /// ``` + pub fn ascii_case_insensitive( + &mut self, + yes: bool, + ) -> &mut AhoCorasickBuilder { + self.nfa_builder.ascii_case_insensitive(yes); + self + } + + /// Set the limit on how many NFA states use a dense representation for + /// their transitions. + /// + /// A dense representation uses more space, but supports faster access to + /// transitions at search time. Thus, this setting permits the control of a + /// space vs time trade off when using the NFA variant of Aho-Corasick. + /// + /// This limit is expressed in terms of the depth of a state, i.e., the + /// number of transitions from the starting state of the NFA. The idea is + /// that most of the time searching will be spent near the starting state + /// of the automaton, so states near the start state should use a dense + /// representation. States further away from the start state would then use + /// a sparse representation, which uses less space but is slower to access + /// transitions at search time. + /// + /// By default, this is set to a low but non-zero number. + /// + /// This setting has no effect if the `dfa` option is enabled. + pub fn dense_depth(&mut self, depth: usize) -> &mut AhoCorasickBuilder { + self.nfa_builder.dense_depth(depth); + self + } + + /// Compile the standard Aho-Corasick automaton into a deterministic finite + /// automaton (DFA). + /// + /// When this is disabled (which is the default), then a non-deterministic + /// finite automaton (NFA) is used instead. + /// + /// The main benefit to a DFA is that it can execute searches more quickly + /// than a DFA (perhaps 2-4 times as fast). The main drawback is that the + /// DFA uses more space and can take much longer to build. + /// + /// Enabling this option does not change the time complexity for + /// constructing the Aho-Corasick automaton (which is `O(p)` where + /// `p` is the total number of patterns being compiled). Enabling this + /// option does however reduce the time complexity of non-overlapping + /// searches from `O(n + p)` to `O(n)`, where `n` is the length of the + /// haystack. + /// + /// In general, it's a good idea to enable this if you're searching a + /// small number of fairly short patterns (~1000), or if you want the + /// fastest possible search without regard to compilation time or space + /// usage. + pub fn dfa(&mut self, yes: bool) -> &mut AhoCorasickBuilder { + self.dfa = yes; + self + } + + /// Enable heuristic prefilter optimizations. + /// + /// When enabled, searching will attempt to quickly skip to match + /// candidates using specialized literal search routines. A prefilter + /// cannot always be used, and is generally treated as a heuristic. It + /// can be useful to disable this if the prefilter is observed to be + /// sub-optimal for a particular workload. + /// + /// This is enabled by default. + pub fn prefilter(&mut self, yes: bool) -> &mut AhoCorasickBuilder { + self.nfa_builder.prefilter(yes); + self + } + + /// Shrink the size of the transition alphabet by mapping bytes to their + /// equivalence classes. This only has an effect when the `dfa` option is + /// enabled. + /// + /// When enabled, each a DFA will use a map from all possible bytes + /// to their corresponding equivalence class. Each equivalence class + /// represents a set of bytes that does not discriminate between a match + /// and a non-match in the DFA. For example, the patterns `bar` and `baz` + /// have at least five equivalence classes: singleton sets of `b`, `a`, `r` + /// and `z`, and a final set that contains every other byte. + /// + /// The advantage of this map is that the size of the transition table can + /// be reduced drastically from `#states * 256 * sizeof(id)` to + /// `#states * k * sizeof(id)` where `k` is the number of equivalence + /// classes. As a result, total space usage can decrease substantially. + /// Moreover, since a smaller alphabet is used, compilation becomes faster + /// as well. + /// + /// The disadvantage of this map is that every byte searched must be + /// passed through this map before it can be used to determine the next + /// transition. This has a small match time performance cost. However, if + /// the DFA is otherwise very large without byte classes, then using byte + /// classes can greatly improve memory locality and thus lead to better + /// overall performance. + /// + /// This option is enabled by default. + pub fn byte_classes(&mut self, yes: bool) -> &mut AhoCorasickBuilder { + self.dfa_builder.byte_classes(yes); + self + } + + /// Premultiply state identifiers in the transition table. This only has + /// an effect when the `dfa` option is enabled. + /// + /// When enabled, state identifiers are premultiplied to point to their + /// corresponding row in the transition table. That is, given the `i`th + /// state, its corresponding premultiplied identifier is `i * k` where `k` + /// is the alphabet size of the automaton. (The alphabet size is at most + /// 256, but is in practice smaller if byte classes is enabled.) + /// + /// When state identifiers are not premultiplied, then the identifier of + /// the `i`th state is `i`. + /// + /// The advantage of premultiplying state identifiers is that is saves a + /// multiplication instruction per byte when searching with a DFA. This has + /// been observed to lead to a 20% performance benefit in micro-benchmarks. + /// + /// The primary disadvantage of premultiplying state identifiers is + /// that they require a larger integer size to represent. For example, + /// if the DFA has 200 states, then its premultiplied form requires 16 + /// bits to represent every possible state identifier, where as its + /// non-premultiplied form only requires 8 bits. + /// + /// This option is enabled by default. + pub fn premultiply(&mut self, yes: bool) -> &mut AhoCorasickBuilder { + self.dfa_builder.premultiply(yes); + self + } +} + +/// A knob for controlling the match semantics of an Aho-Corasick automaton. +/// +/// There are two generally different ways that Aho-Corasick automatons can +/// report matches. The first way is the "standard" approach that results from +/// implementing most textbook explanations of Aho-Corasick. The second way is +/// to report only the leftmost non-overlapping matches. The leftmost approach +/// is in turn split into two different ways of resolving ambiguous matches: +/// leftmost-first and leftmost-longest. +/// +/// The `Standard` match kind is the default and is the only one that supports +/// overlapping matches and stream searching. (Trying to find overlapping +/// or streaming matches using leftmost match semantics will result in a +/// panic.) The `Standard` match kind will report matches as they are seen. +/// When searching for overlapping matches, then all possible matches are +/// reported. When searching for non-overlapping matches, the first match seen +/// is reported. For example, for non-overlapping matches, given the patterns +/// `abcd` and `b` and the subject string `abcdef`, only a match for `b` is +/// reported since it is detected first. The `abcd` match is never reported +/// since it overlaps with the `b` match. +/// +/// In contrast, the leftmost match kind always prefers the leftmost match +/// among all possible matches. Given the same example as above with `abcd` and +/// `b` as patterns and `abcdef` as the subject string, the leftmost match is +/// `abcd` since it begins before the `b` match, even though the `b` match is +/// detected before the `abcd` match. In this case, the `b` match is not +/// reported at all since it overlaps with the `abcd` match. +/// +/// The difference between leftmost-first and leftmost-longest is in how they +/// resolve ambiguous matches when there are multiple leftmost matches to +/// choose from. Leftmost-first always chooses the pattern that was provided +/// earliest, where as leftmost-longest always chooses the longest matching +/// pattern. For example, given the patterns `a` and `ab` and the subject +/// string `ab`, the leftmost-first match is `a` but the leftmost-longest match +/// is `ab`. Conversely, if the patterns were given in reverse order, i.e., +/// `ab` and `a`, then both the leftmost-first and leftmost-longest matches +/// would be `ab`. Stated differently, the leftmost-first match depends on the +/// order in which the patterns were given to the Aho-Corasick automaton. +/// Because of that, when leftmost-first matching is used, if a pattern `A` +/// that appears before a pattern `B` is a prefix of `B`, then it is impossible +/// to ever observe a match of `B`. +/// +/// If you're not sure which match kind to pick, then stick with the standard +/// kind, which is the default. In particular, if you need overlapping or +/// streaming matches, then you _must_ use the standard kind. The leftmost +/// kinds are useful in specific circumstances. For example, leftmost-first can +/// be very useful as a way to implement match priority based on the order of +/// patterns given and leftmost-longest can be useful for dictionary searching +/// such that only the longest matching words are reported. +/// +/// # Relationship with regular expression alternations +/// +/// Understanding match semantics can be a little tricky, and one easy way +/// to conceptualize non-overlapping matches from an Aho-Corasick automaton +/// is to think about them as a simple alternation of literals in a regular +/// expression. For example, let's say we wanted to match the strings +/// `Sam` and `Samwise`, which would turn into the regex `Sam|Samwise`. It +/// turns out that regular expression engines have two different ways of +/// matching this alternation. The first way, leftmost-longest, is commonly +/// found in POSIX compatible implementations of regular expressions (such as +/// `grep`). The second way, leftmost-first, is commonly found in backtracking +/// implementations such as Perl. (Some regex engines, such as RE2 and Rust's +/// regex engine do not use backtracking, but still implement leftmost-first +/// semantics in an effort to match the behavior of dominant backtracking +/// regex engines such as those found in Perl, Ruby, Python, Javascript and +/// PHP.) +/// +/// That is, when matching `Sam|Samwise` against `Samwise`, a POSIX regex +/// will match `Samwise` because it is the longest possible match, but a +/// Perl-like regex will match `Sam` since it appears earlier in the +/// alternation. Indeed, the regex `Sam|Samwise` in a Perl-like regex engine +/// will never match `Samwise` since `Sam` will always have higher priority. +/// Conversely, matching the regex `Samwise|Sam` against `Samwise` will lead to +/// a match of `Samwise` in both POSIX and Perl-like regexes since `Samwise` is +/// still longest match, but it also appears earlier than `Sam`. +/// +/// The "standard" match semantics of Aho-Corasick generally don't correspond +/// to the match semantics of any large group of regex implementations, so +/// there's no direct analogy that can be made here. Standard match semantics +/// are generally useful for overlapping matches, or if you just want to see +/// matches as they are detected. +/// +/// The main conclusion to draw from this section is that the match semantics +/// can be tweaked to precisely match either Perl-like regex alternations or +/// POSIX regex alternations. +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +pub enum MatchKind { + /// Use standard match semantics, which support overlapping matches. When + /// used with non-overlapping matches, matches are reported as they are + /// seen. + Standard, + /// Use leftmost-first match semantics, which reports leftmost matches. + /// When there are multiple possible leftmost matches, the match + /// corresponding to the pattern that appeared earlier when constructing + /// the automaton is reported. + /// + /// This does **not** support overlapping matches or stream searching. If + /// this match kind is used, attempting to find overlapping matches or + /// stream matches will panic. + LeftmostFirst, + /// Use leftmost-longest match semantics, which reports leftmost matches. + /// When there are multiple possible leftmost matches, the longest match + /// is chosen. + /// + /// This does **not** support overlapping matches or stream searching. If + /// this match kind is used, attempting to find overlapping matches or + /// stream matches will panic. + LeftmostLongest, + /// Hints that destructuring should not be exhaustive. + /// + /// This enum may grow additional variants, so this makes sure clients + /// don't count on exhaustive matching. (Otherwise, adding a new variant + /// could break existing code.) + #[doc(hidden)] + __Nonexhaustive, +} + +/// The default match kind is `MatchKind::Standard`. +impl Default for MatchKind { + fn default() -> MatchKind { + MatchKind::Standard + } +} + +impl MatchKind { + fn supports_overlapping(&self) -> bool { + self.is_standard() + } + + fn supports_stream(&self) -> bool { + // TODO: It may be possible to support this. It's hard. + // + // See: https://github.com/rust-lang/regex/issues/425#issuecomment-471367838 + self.is_standard() + } + + pub(crate) fn is_standard(&self) -> bool { + *self == MatchKind::Standard + } + + pub(crate) fn is_leftmost(&self) -> bool { + *self == MatchKind::LeftmostFirst + || *self == MatchKind::LeftmostLongest + } + + pub(crate) fn is_leftmost_first(&self) -> bool { + *self == MatchKind::LeftmostFirst + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn oibits() { + use std::panic::{RefUnwindSafe, UnwindSafe}; + + fn assert_send() {} + fn assert_sync() {} + fn assert_unwind_safe() {} + + assert_send::(); + assert_sync::(); + assert_unwind_safe::(); + assert_send::(); + assert_sync::(); + assert_unwind_safe::(); + } +} diff --git a/vendor/aho-corasick/src/autiter.rs b/vendor/aho-corasick/src/autiter.rs deleted file mode 100644 index dfad28f67a..0000000000 --- a/vendor/aho-corasick/src/autiter.rs +++ /dev/null @@ -1,530 +0,0 @@ -use std::io::{self, BufRead}; -use std::marker::PhantomData; - -use memchr::{memchr, memchr2, memchr3}; - -use super::{ROOT_STATE, StateIdx}; - -/// An abstraction over automatons and their corresponding iterators. -/// The type parameter `P` is the type of the pattern that was used to -/// construct this Automaton. -pub trait Automaton

{ - /// Return the next state given the current state and next character. - fn next_state(&self, si: StateIdx, b: u8) -> StateIdx; - - /// Return true if and only if the given state and current pattern index - /// indicate a match. - fn has_match(&self, si: StateIdx, outi: usize) -> bool; - - /// Build a match given the current state, pattern index and input index. - fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match; - - /// Return the set of bytes that have transitions in the root state. - fn start_bytes(&self) -> &[u8]; - - /// Returns all of the patterns matched by this automaton. - /// - /// The order of the patterns is the order in which they were added. - fn patterns(&self) -> &[P]; - - /// Returns the pattern indexed at `i`. - /// - /// The index corresponds to the position at which the pattern was added - /// to the automaton, starting at `0`. - fn pattern(&self, i: usize) -> &P; - - /// Return the number of patterns in the automaton. - #[inline] - fn len(&self) -> usize { - self.patterns().len() - } - - /// Returns true if the automaton has no patterns. - #[inline] - fn is_empty(&self) -> bool { - self.patterns().is_empty() - } - - /// Returns an iterator of non-overlapping matches in `s`. - fn find<'a, 's, Q: ?Sized + AsRef<[u8]>>( - &'a self, - s: &'s Q, - ) -> Matches<'a, 's, P, Self> - where Self: Sized { - Matches { - aut: self, - text: s.as_ref(), - texti: 0, - si: ROOT_STATE, - _m: PhantomData, - } - } - - /// Returns an iterator of overlapping matches in `s`. - fn find_overlapping<'a, 's, Q: ?Sized + AsRef<[u8]>>( - &'a self, - s: &'s Q, - ) -> MatchesOverlapping<'a, 's, P, Self> - where Self: Sized { - MatchesOverlapping { - aut: self, - text: s.as_ref(), - texti: 0, - si: ROOT_STATE, - outi: 0, - _m: PhantomData, - } - } - - /// Returns an iterator of non-overlapping matches in the given reader. - fn stream_find<'a, R: io::Read>( - &'a self, - rdr: R, - ) -> StreamMatches<'a, R, P, Self> - where Self: Sized { - StreamMatches { - aut: self, - buf: io::BufReader::new(rdr), - texti: 0, - si: ROOT_STATE, - _m: PhantomData, - } - } - - /// Returns an iterator of overlapping matches in the given reader. - fn stream_find_overlapping<'a, R: io::Read>( - &'a self, - rdr: R, - ) -> StreamMatchesOverlapping<'a, R, P, Self> - where Self: Sized { - StreamMatchesOverlapping { - aut: self, - buf: io::BufReader::new(rdr), - texti: 0, - si: ROOT_STATE, - outi: 0, - _m: PhantomData, - } - } -} - -impl<'a, P: AsRef<[u8]>, A: 'a + Automaton

+ ?Sized> - Automaton

for &'a A { - fn next_state(&self, si: StateIdx, b: u8) -> StateIdx { - (**self).next_state(si, b) - } - - fn has_match(&self, si: StateIdx, outi: usize) -> bool { - (**self).has_match(si, outi) - } - - fn start_bytes(&self) -> &[u8] { - (**self).start_bytes() - } - - fn patterns(&self) -> &[P] { - (**self).patterns() - } - - fn pattern(&self, i: usize) -> &P { - (**self).pattern(i) - } - - fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match { - (**self).get_match(si, outi, texti) - } -} - -/// Records a match in the search text. -#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)] -pub struct Match { - /// The pattern index. - /// - /// This corresponds to the ordering in which the matched pattern was - /// added to the automaton, starting at `0`. - pub pati: usize, - /// The starting byte offset of the match in the search text. - pub start: usize, - /// The ending byte offset of the match in the search text. - /// - /// (This can be re-captiulated with `pati` and adding the pattern's - /// length to `start`, but it is convenient to have it here.) - pub end: usize, -} - -/// An iterator of non-overlapping matches for in-memory text. -/// -/// This iterator yields `Match` values. -/// -/// `'a` is the lifetime of the automaton, `'s` is the lifetime of the -/// search text, and `P` is the type of the Automaton's pattern. -#[derive(Debug)] -pub struct Matches<'a, 's, P, A: 'a + Automaton

+ ?Sized> { - aut: &'a A, - text: &'s [u8], - texti: usize, - si: StateIdx, - _m: PhantomData

, -} - -// When there's an initial lone start byte, it is usually worth it -// to use `memchr` to skip along the input. The problem is that -// the skipping function is called in the inner match loop, which -// can be quite costly if the skipping condition is never met. -// Therefore, we lift the case analysis outside of the inner loop at -// the cost of repeating code. -// -// `step_to_match` is the version of the inner loop without skipping, -// and `skip_to_match` is the version with skipping. -#[inline(never)] -fn step_to_match + ?Sized>( - aut: &A, - text: &[u8], - mut texti: usize, - mut si: StateIdx -) -> Option<(usize, StateIdx)> { - while texti < text.len() { - si = aut.next_state(si, text[texti]); - if aut.has_match(si, 0) { - return Some((texti, si)); - } - texti += 1; - if texti + 4 < text.len() { - si = aut.next_state(si, text[texti]); - if aut.has_match(si, 0) { - return Some((texti, si)); - } - texti += 1; - si = aut.next_state(si, text[texti]); - if aut.has_match(si, 0) { - return Some((texti, si)); - } - texti += 1; - si = aut.next_state(si, text[texti]); - if aut.has_match(si, 0) { - return Some((texti, si)); - } - texti += 1; - si = aut.next_state(si, text[texti]); - if aut.has_match(si, 0) { - return Some((texti, si)); - } - texti += 1; - si = aut.next_state(si, text[texti]); - if aut.has_match(si, 0) { - return Some((texti, si)); - } - texti += 1; - } - } - None -} - -fn skip_to_match + ?Sized, F: Fn(&A, &[u8], usize) -> usize>( - aut: &A, - text: &[u8], - mut texti: usize, - mut si: StateIdx, - skip: F, -) -> Option<(usize, StateIdx)> { - if si == ROOT_STATE { - texti = skip(aut, text, texti); - } - while texti < text.len() { - si = aut.next_state(si, text[texti]); - if aut.has_match(si, 0) { - return Some((texti, si)); - } - if si == ROOT_STATE { - texti = skip(aut, text, texti + 1); - } else { - texti += 1; - if texti + 4 < text.len() { - si = aut.next_state(si, text[texti]); - if aut.has_match(si, 0) { - return Some((texti, si)); - } - texti += 1; - si = aut.next_state(si, text[texti]); - if aut.has_match(si, 0) { - return Some((texti, si)); - } - texti += 1; - si = aut.next_state(si, text[texti]); - if aut.has_match(si, 0) { - return Some((texti, si)); - } - texti += 1; - si = aut.next_state(si, text[texti]); - if aut.has_match(si, 0) { - return Some((texti, si)); - } - texti += 1; - si = aut.next_state(si, text[texti]); - if aut.has_match(si, 0) { - return Some((texti, si)); - } - texti += 1; - } - } - } - None -} - -#[inline] -fn skip1 + ?Sized>( - aut: &A, - text: &[u8], - at: usize, -) -> usize { - debug_assert!(aut.start_bytes().len() == 1); - let b = aut.start_bytes()[0]; - match memchr(b, &text[at..]) { - None => text.len(), - Some(i) => at + i, - } -} - -#[inline] -fn skip2 + ?Sized>( - aut: &A, - text: &[u8], - at: usize, -) -> usize { - debug_assert!(aut.start_bytes().len() == 2); - let (b1, b2) = (aut.start_bytes()[0], aut.start_bytes()[1]); - match memchr2(b1, b2, &text[at..]) { - None => text.len(), - Some(i) => at + i, - } -} - -#[inline] -fn skip3 + ?Sized>( - aut: &A, - text: &[u8], - at: usize, -) -> usize { - debug_assert!(aut.start_bytes().len() == 3); - let (b1, b2, b3) = ( - aut.start_bytes()[0], aut.start_bytes()[1], aut.start_bytes()[2], - ); - match memchr3(b1, b2, b3, &text[at..]) { - None => text.len(), - Some(i) => at + i, - } -} - -impl<'a, 's, P, A: Automaton

+ ?Sized> Iterator for Matches<'a, 's, P, A> { - type Item = Match; - - fn next(&mut self) -> Option { - if self.aut.start_bytes().len() == 1 { - let skip = skip_to_match( - self.aut, self.text, self.texti, self.si, skip1); - if let Some((texti, si)) = skip { - self.texti = texti + 1; - self.si = ROOT_STATE; - return Some(self.aut.get_match(si, 0, texti)); - } - } else if self.aut.start_bytes().len() == 2 { - let skip = skip_to_match( - self.aut, self.text, self.texti, self.si, skip2); - if let Some((texti, si)) = skip { - self.texti = texti + 1; - self.si = ROOT_STATE; - return Some(self.aut.get_match(si, 0, texti)); - } - } else if self.aut.start_bytes().len() == 3 { - let skip = skip_to_match( - self.aut, self.text, self.texti, self.si, skip3); - if let Some((texti, si)) = skip { - self.texti = texti + 1; - self.si = ROOT_STATE; - return Some(self.aut.get_match(si, 0, texti)); - } - } else { - let step = step_to_match(self.aut, self.text, self.texti, self.si); - if let Some((texti, si)) = step { - self.texti = texti + 1; - self.si = ROOT_STATE; - return Some(self.aut.get_match(si, 0, texti)); - } - } - None - } -} - -/// An iterator of non-overlapping matches for streaming text. -/// -/// This iterator yields `io::Result` values. -/// -/// `'a` is the lifetime of the automaton, `R` is the type of the underlying -/// `io::Read`er, and P is the type of the Automaton's pattern. -#[derive(Debug)] -pub struct StreamMatches<'a, R, P, A: 'a + Automaton

+ ?Sized> { - aut: &'a A, - buf: io::BufReader, - texti: usize, - si: StateIdx, - _m: PhantomData

, -} - -impl<'a, R: io::Read, P, A: Automaton

> - Iterator for StreamMatches<'a, R, P, A> { - type Item = io::Result; - - fn next(&mut self) -> Option> { - let mut m = None; - let mut consumed = 0; -'LOOP: loop { - self.buf.consume(consumed); - let bs = match self.buf.fill_buf() { - Err(err) => return Some(Err(err)), - Ok(bs) if bs.is_empty() => break, - Ok(bs) => bs, - }; - consumed = bs.len(); // is shortened if we find a match - for (i, &b) in bs.iter().enumerate() { - self.si = self.aut.next_state(self.si, b); - if self.aut.has_match(self.si, 0) { - m = Some(Ok(self.aut.get_match(self.si, 0, self.texti))); - consumed = i + 1; - self.texti += 1; - self.si = ROOT_STATE; - break 'LOOP; - } - self.texti += 1; - } - } - self.buf.consume(consumed); - m - } -} - -/// An iterator of overlapping matches for in-memory text. -/// -/// This iterator yields `Match` values. -/// -/// `'a` is the lifetime of the automaton, `'s` is the lifetime of the -/// search text, and `P` is the type of the Automaton's pattern. -#[derive(Debug)] -pub struct MatchesOverlapping<'a, 's, P, A: 'a + Automaton

+ ?Sized> { - aut: &'a A, - text: &'s [u8], - texti: usize, - si: StateIdx, - outi: usize, - _m: PhantomData

, -} - -impl<'a, 's, P, A: Automaton

+ ?Sized> - Iterator for MatchesOverlapping<'a, 's, P, A> { - type Item = Match; - - fn next(&mut self) -> Option { - if self.aut.has_match(self.si, self.outi) { - let m = self.aut.get_match(self.si, self.outi, self.texti); - self.outi += 1; - if !self.aut.has_match(self.si, self.outi) { - self.texti += 1; - } - return Some(m); - } - - self.outi = 0; - if self.aut.start_bytes().len() == 1 { - let skip = skip_to_match( - self.aut, self.text, self.texti, self.si, skip1); - if let Some((texti, si)) = skip { - self.texti = texti; - self.si = si; - return self.next(); - } - } else if self.aut.start_bytes().len() == 2 { - let skip = skip_to_match( - self.aut, self.text, self.texti, self.si, skip2); - if let Some((texti, si)) = skip { - self.texti = texti; - self.si = si; - return self.next(); - } - } else if self.aut.start_bytes().len() == 3 { - let skip = skip_to_match( - self.aut, self.text, self.texti, self.si, skip3); - if let Some((texti, si)) = skip { - self.texti = texti; - self.si = si; - return self.next(); - } - } else { - let step = step_to_match(self.aut, self.text, self.texti, self.si); - if let Some((texti, si)) = step { - self.texti = texti; - self.si = si; - return self.next(); - } - } - None - } -} - -/// An iterator of overlapping matches for streaming text. -/// -/// This iterator yields `io::Result` values. -/// -/// `'a` is the lifetime of the automaton, `R` is the type of the underlying -/// `io::Read`er, and P is the type of the Automaton's pattern. -#[derive(Debug)] -pub struct StreamMatchesOverlapping<'a, R, P, A: 'a + Automaton

+ ?Sized> { - aut: &'a A, - buf: io::BufReader, - texti: usize, - si: StateIdx, - outi: usize, - _m: PhantomData

, -} - -impl<'a, R: io::Read, P, A: Automaton

+ ?Sized> - Iterator for StreamMatchesOverlapping<'a, R, P, A> { - type Item = io::Result; - - fn next(&mut self) -> Option> { - if self.aut.has_match(self.si, self.outi) { - let m = self.aut.get_match(self.si, self.outi, self.texti); - self.outi += 1; - if !self.aut.has_match(self.si, self.outi) { - self.texti += 1; - } - return Some(Ok(m)); - } - let mut m = None; - let mut consumed = 0; - self.outi = 0; -'LOOP: loop { - self.buf.consume(consumed); - let bs = match self.buf.fill_buf() { - Err(err) => return Some(Err(err)), - Ok(bs) if bs.is_empty() => break, - Ok(bs) => bs, - }; - consumed = bs.len(); // is shortened if we find a match - for (i, &b) in bs.iter().enumerate() { - self.si = self.aut.next_state(self.si, b); - if self.aut.has_match(self.si, self.outi) { - m = Some(Ok(self.aut.get_match( - self.si, self.outi, self.texti))); - consumed = i + 1; - self.outi += 1; - if !self.aut.has_match(self.si, self.outi) { - self.texti += 1; - } - break 'LOOP; - } - self.texti += 1; - } - } - self.buf.consume(consumed); - m - } -} diff --git a/vendor/aho-corasick/src/automaton.rs b/vendor/aho-corasick/src/automaton.rs new file mode 100644 index 0000000000..d5935b5723 --- /dev/null +++ b/vendor/aho-corasick/src/automaton.rs @@ -0,0 +1,401 @@ +use ahocorasick::MatchKind; +use prefilter::{Prefilter, PrefilterState}; +use state_id::{StateID, dead_id, fail_id}; +use Match; + +// NOTE: This trait was essentially copied from regex-automata, with some +// wording changed since we use this trait for NFAs in addition to DFAs in this +// crate. Additionally, we do not export this trait. It's only used internally +// to reduce code duplication. The regex-automata crate needs to expose it +// because its Regex type is generic over implementations of this trait. In +// this crate, we can encapsulate everything behind the AhoCorasick type. + +/// A trait describing the interface of an Aho-Corasick finite state machine. +/// +/// Every automaton has exactly one fail state, one dead state and exactly one +/// start state. Generally, these correspond to the first, second and third +/// states, respectively. The failure state is always treated as a sentinel. +/// That is, no correct Aho-Corasick automaton will ever transition into the +/// fail state. The dead state, however, can be transitioned into, but only +/// when leftmost-first or leftmost-longest match semantics are enabled and +/// only when at least one match has been observed. +/// +/// Every automaton also has one or more match states, such that +/// `Automaton::is_match_state_unchecked(id)` returns `true` if and only if +/// `id` corresponds to a match state. +pub trait Automaton { + /// The representation used for state identifiers in this automaton. + /// + /// Typically, this is one of `u8`, `u16`, `u32`, `u64` or `usize`. + type ID: StateID; + + /// The type of matching that should be done. + fn match_kind(&self) -> &MatchKind; + + /// An optional prefilter for quickly skipping to the next candidate match. + /// A prefilter must report at least every match, although it may report + /// positions that do not correspond to a match. That is, it must not allow + /// false negatives, but can allow false positives. + /// + /// Currently, a prefilter only runs when the automaton is in the start + /// state. That is, the position reported by a prefilter should always + /// correspond to the start of a potential match. + fn prefilter(&self) -> Option<&Prefilter>; + + /// Return the identifier of this automaton's start state. + fn start_state(&self) -> Self::ID; + + /// Returns true if and only if the given state identifier refers to a + /// valid state. + fn is_valid(&self, id: Self::ID) -> bool; + + /// Returns true if and only if the given identifier corresponds to a match + /// state. + /// + /// The state ID given must be valid, or else implementors may panic. + fn is_match_state(&self, id: Self::ID) -> bool; + + /// Returns true if and only if the given identifier corresponds to a state + /// that is either the dead state or a match state. + /// + /// Depending on the implementation of the automaton, this routine can + /// be used to save a branch in the core matching loop. Nevertheless, + /// `is_match_state(id) || id == dead_id()` is always a valid + /// implementation. Indeed, this is the default implementation. + /// + /// The state ID given must be valid, or else implementors may panic. + fn is_match_or_dead_state(&self, id: Self::ID) -> bool { + id == dead_id() || self.is_match_state(id) + } + + /// If the given state is a match state, return the match corresponding + /// to the given match index. `end` must be the ending position of the + /// detected match. If no match exists or if `match_index` exceeds the + /// number of matches in this state, then `None` is returned. + /// + /// The state ID given must be valid, or else implementors may panic. + /// + /// If the given state ID is correct and if the `match_index` is less than + /// the number of matches for that state, then this is guaranteed to return + /// a match. + fn get_match( + &self, + id: Self::ID, + match_index: usize, + end: usize, + ) -> Option; + + /// Returns the number of matches for the given state. If the given state + /// is not a match state, then this returns 0. + /// + /// The state ID given must be valid, or else implementors must panic. + fn match_count(&self, id: Self::ID) -> usize; + + /// Given the current state that this automaton is in and the next input + /// byte, this method returns the identifier of the next state. The + /// identifier returned must always be valid and may never correspond to + /// the fail state. The returned identifier may, however, point to the + /// dead state. + /// + /// This is not safe so that implementors may look up the next state + /// without memory safety checks such as bounds checks. As such, callers + /// must ensure that the given identifier corresponds to a valid automaton + /// state. Implementors must, in turn, ensure that this routine is safe for + /// all valid state identifiers and for all possible `u8` values. + unsafe fn next_state_unchecked( + &self, + current: Self::ID, + input: u8, + ) -> Self::ID; + + /// Like next_state_unchecked, but debug_asserts that the underlying + /// implementation never returns a `fail_id()` for the next state. + unsafe fn next_state_unchecked_no_fail( + &self, + current: Self::ID, + input: u8, + ) -> Self::ID { + let next = self.next_state_unchecked(current, input); + // We should never see a transition to the failure state. + debug_assert!( + next != fail_id(), + "automaton should never return fail_id for next state" + ); + next + } + + /// Execute a search using standard match semantics. + /// + /// This can be used even when the automaton was constructed with leftmost + /// match semantics when you want to find the earliest possible match. This + /// can also be used as part of an overlapping search implementation. + /// + /// N.B. This does not report a match if `state_id` is given as a matching + /// state. As such, this should not be used directly. + #[inline(always)] + fn standard_find_at( + &self, + prestate: &mut PrefilterState, + haystack: &[u8], + at: usize, + state_id: &mut Self::ID, + ) -> Option { + if let Some(pre) = self.prefilter() { + self.standard_find_at_imp( + prestate, Some(pre), haystack, at, state_id, + ) + } else { + self.standard_find_at_imp( + prestate, None, haystack, at, state_id, + ) + } + } + + // It's important for this to always be inlined. Namely, it's only caller + // is standard_find_at, and the inlining should remove the case analysis + // for prefilter scanning when there is no prefilter available. + #[inline(always)] + fn standard_find_at_imp( + &self, + prestate: &mut PrefilterState, + prefilter: Option<&Prefilter>, + haystack: &[u8], + at: usize, + state_id: &mut Self::ID, + ) -> Option { + // This is necessary for guaranteeing a safe API, since we use the + // state ID below in a function that exhibits UB if called with an + // invalid state ID. + assert!( + self.is_valid(*state_id), + "{} is not a valid state ID", + state_id.to_usize() + ); + unsafe { + let start = haystack.as_ptr(); + let end = haystack[haystack.len()..].as_ptr(); + let mut ptr = haystack[at..].as_ptr(); + while ptr < end { + if let Some(pre) = prefilter { + if prestate.is_effective() + && *state_id == self.start_state() + { + let at = ptr as usize - start as usize; + match pre.next_candidate(haystack, at) { + None => return None, + Some(i) => { + prestate.update(i - at); + ptr = start.offset(i as isize); + } + } + } + } + // SAFETY: next_state is safe for all possible u8 values, + // so the only thing we're concerned about is the validity + // of `state_id`. `state_id` either comes from the caller + // (in which case, we assert above that it is valid), or it + // comes from the return value of next_state, which is also + // guaranteed to be valid. + *state_id = self.next_state_unchecked_no_fail(*state_id, *ptr); + ptr = ptr.offset(1); + // This routine always quits immediately after seeing a + // match, and since dead states can only come after seeing + // a match, seeing a dead state here is impossible. + debug_assert!( + *state_id != dead_id(), + "standard find should never see a dead state" + ); + + let end = ptr as usize - start as usize; + if let Some(m) = self.get_match(*state_id, 0, end) { + return Some(m); + } + } + None + } + } + + /// Execute a search using leftmost (either first or longest) match + /// semantics. + /// + /// The principle difference between searching with standard semantics and + /// searching with leftmost semantics is that leftmost searching will + /// continue searching even after a match has been found. Once a match + /// is found, the search does not stop until either the haystack has been + /// exhausted or a dead state is observed in the automaton. (Dead states + /// only exist in automatons constructed with leftmost semantics.) That is, + /// we rely on the construction of the automaton to tell us when to quit. + #[inline(never)] + fn leftmost_find_at( + &self, + prestate: &mut PrefilterState, + haystack: &[u8], + at: usize, + state_id: &mut Self::ID, + ) -> Option { + if let Some(pre) = self.prefilter() { + self.leftmost_find_at_imp( + prestate, Some(pre), haystack, at, state_id, + ) + } else { + self.leftmost_find_at_imp( + prestate, None, haystack, at, state_id, + ) + } + } + + // It's important for this to always be inlined. Namely, it's only caller + // is leftmost_find_at, and the inlining should remove the case analysis + // for prefilter scanning when there is no prefilter available. + #[inline(always)] + fn leftmost_find_at_imp( + &self, + prestate: &mut PrefilterState, + prefilter: Option<&Prefilter>, + haystack: &[u8], + at: usize, + state_id: &mut Self::ID, + ) -> Option { + debug_assert!(self.match_kind().is_leftmost()); + // This is necessary for guaranteeing a safe API, since we use the + // state ID below in a function that exhibits UB if called with an + // invalid state ID. + assert!( + self.is_valid(*state_id), + "{} is not a valid state ID", + state_id.to_usize() + ); + unsafe { + let start = haystack.as_ptr(); + let end = haystack[haystack.len()..].as_ptr(); + let mut ptr = haystack[at..].as_ptr(); + + let mut last_match = self.get_match(*state_id, 0, at); + while ptr < end { + if let Some(pre) = prefilter { + if prestate.is_effective() + && *state_id == self.start_state() + { + let at = ptr as usize - start as usize; + match pre.next_candidate(haystack, at) { + None => return None, + Some(i) => { + prestate.update(i - at); + ptr = start.offset(i as isize); + } + } + } + } + // SAFETY: next_state is safe for all possible u8 values, + // so the only thing we're concerned about is the validity + // of `state_id`. `state_id` either comes from the caller + // (in which case, we assert above that it is valid), or it + // comes from the return value of next_state, which is also + // guaranteed to be valid. + *state_id = self.next_state_unchecked_no_fail(*state_id, *ptr); + ptr = ptr.offset(1); + if self.is_match_or_dead_state(*state_id) { + if *state_id == dead_id() { + // The only way to enter into a dead state is if a + // match has been found, so we assert as much. This + // is different from normal automata, where you might + // enter a dead state if you know a subsequent match + // will never be found (regardless of whether a match + // has already been found). For Aho-Corasick, it is + // built so that we can match at any position, so the + // possibility of a match always exists. + debug_assert!( + last_match.is_some(), + "failure state should only be seen after match" + ); + return last_match; + } + let end = ptr as usize - start as usize; + last_match = self.get_match(*state_id, 0, end); + } + } + last_match + } + } + + /// Execute an overlapping search. + /// + /// When executing an overlapping match, the previous state ID in addition + /// to the previous match index should be given. If there are more matches + /// at the given state, then the match is reported and the given index is + /// incremented. + #[inline(always)] + fn overlapping_find_at( + &self, + prestate: &mut PrefilterState, + haystack: &[u8], + at: usize, + state_id: &mut Self::ID, + match_index: &mut usize, + ) -> Option { + let match_count = self.match_count(*state_id); + if *match_index < match_count { + // This is guaranteed to return a match since + // match_index < match_count. + let result = self.get_match( + *state_id, + *match_index, + at, + ); + debug_assert!(result.is_some(), "must be a match"); + *match_index += 1; + return result; + } + + *match_index = 0; + match self.standard_find_at(prestate, haystack, at, state_id) { + None => None, + Some(m) => { + *match_index = 1; + Some(m) + } + } + } + + /// Return the earliest match found. This returns as soon as we know that + /// we have a match. As such, this does not necessarily correspond to the + /// leftmost starting match, but rather, the leftmost position at which a + /// match ends. + #[inline(always)] + fn earliest_find_at( + &self, + prestate: &mut PrefilterState, + haystack: &[u8], + at: usize, + state_id: &mut Self::ID, + ) -> Option { + if *state_id == self.start_state() { + if let Some(m) = self.get_match(*state_id, 0, at) { + return Some(m); + } + } + self.standard_find_at(prestate, haystack, at, state_id) + } + + /// A convenience function for finding the next match according to the + /// match semantics of this automaton. For standard match semantics, this + /// finds the earliest match. Otherwise, the leftmost match is found. + #[inline(always)] + fn find_at( + &self, + prestate: &mut PrefilterState, + haystack: &[u8], + at: usize, + state_id: &mut Self::ID, + ) -> Option { + match *self.match_kind() { + MatchKind::Standard => { + self.earliest_find_at(prestate, haystack, at, state_id) + } + MatchKind::LeftmostFirst | MatchKind::LeftmostLongest => { + self.leftmost_find_at(prestate, haystack, at, state_id) + } + MatchKind::__Nonexhaustive => unreachable!(), + } + } +} diff --git a/vendor/aho-corasick/src/buffer.rs b/vendor/aho-corasick/src/buffer.rs new file mode 100644 index 0000000000..f3e632c468 --- /dev/null +++ b/vendor/aho-corasick/src/buffer.rs @@ -0,0 +1,131 @@ +use std::cmp; +use std::io; +use std::ptr; + +/// The default buffer capacity that we use for the stream buffer. +const DEFAULT_BUFFER_CAPACITY: usize = 8 * (1<<10); // 8 KB + +/// A fairly simple roll buffer for supporting stream searches. +/// +/// This buffer acts as a temporary place to store a fixed amount of data when +/// reading from a stream. Its central purpose is to allow "rolling" some +/// suffix of the data to the beginning of the buffer before refilling it with +/// more data from the stream. For example, let's say we are trying to match +/// "foobar" on a stream. When we report the match, we'd like to not only +/// report the correct offsets at which the match occurs, but also the matching +/// bytes themselves. So let's say our stream is a file with the following +/// contents: `test test foobar test test`. Now assume that we happen to read +/// the aforementioned file in two chunks: `test test foo` and `bar test test`. +/// Naively, it would not be possible to report a single contiguous `foobar` +/// match, but this roll buffer allows us to do that. Namely, after the second +/// read, the contents of the buffer should be `st foobar test test`, where the +/// search should ultimately resume immediately after `foo`. (The prefix `st ` +/// is included because the roll buffer saves N bytes at the end of the buffer, +/// where N is the maximum possible length of a match.) +/// +/// A lot of the logic for dealing with this is unfortunately split out between +/// this roll buffer and the `StreamChunkIter`. +#[derive(Debug)] +pub struct Buffer { + /// The raw buffer contents. This has a fixed size and never increases. + buf: Vec, + /// The minimum size of the buffer, which is equivalent to the maximum + /// possible length of a match. This corresponds to the amount that we + /// roll + min: usize, + /// The end of the contents of this buffer. + end: usize, +} + +impl Buffer { + /// Create a new buffer for stream searching. The minimum buffer length + /// given should be the size of the maximum possible match length. + pub fn new(min_buffer_len: usize) -> Buffer { + let min = cmp::max(1, min_buffer_len); + // The minimum buffer amount is also the amount that we roll our + // buffer in order to support incremental searching. To this end, + // our actual capacity needs to be at least 1 byte bigger than our + // minimum amount, otherwise we won't have any overlap. In actuality, + // we want our buffer to be a bit bigger than that for performance + // reasons, so we set a lower bound of `8 * min`. + // + // TODO: It would be good to find a way to test the streaming + // implementation with the minimal buffer size. + let capacity = cmp::max(min * 8, DEFAULT_BUFFER_CAPACITY); + Buffer { + buf: vec![0; capacity], + min, + end: 0, + } + } + + /// Return the contents of this buffer. + #[inline] + pub fn buffer(&self) -> &[u8] { + &self.buf[..self.end] + } + + /// Return the minimum size of the buffer. The only way a buffer may be + /// smaller than this is if the stream itself contains less than the + /// minimum buffer amount. + #[inline] + pub fn min_buffer_len(&self) -> usize { + self.min + } + + /// Return the total length of the contents in the buffer. + #[inline] + pub fn len(&self) -> usize { + self.end + } + + /// Return all free capacity in this buffer. + fn free_buffer(&mut self) -> &mut [u8] { + &mut self.buf[self.end..] + } + + /// Refill the contents of this buffer by reading as much as possible into + /// this buffer's free capacity. If no more bytes could be read, then this + /// returns false. Otherwise, this reads until it has filled the buffer + /// past the minimum amount. + pub fn fill(&mut self, mut rdr: R) -> io::Result { + let mut readany = false; + loop { + let readlen = rdr.read(self.free_buffer())?; + if readlen == 0 { + return Ok(readany); + } + readany = true; + self.end += readlen; + if self.len() >= self.min { + return Ok(true); + } + } + } + + /// Roll the contents of the buffer so that the suffix of this buffer is + /// moved to the front and all other contents are dropped. The size of the + /// suffix corresponds precisely to the minimum buffer length. + /// + /// This should only be called when the entire contents of this buffer have + /// been searched. + pub fn roll(&mut self) { + let roll_start = self.end + .checked_sub(self.min) + .expect("buffer capacity should be bigger than minimum amount"); + let roll_len = self.min; + + assert!(roll_start + roll_len <= self.end); + unsafe { + // SAFETY: A buffer contains Copy data, so there's no problem + // moving it around. Safety also depends on our indices being in + // bounds, which they always should be, given the assert above. + ptr::copy( + self.buf[roll_start..].as_ptr(), + self.buf.as_mut_ptr(), + roll_len, + ); + } + self.end = roll_len; + } +} diff --git a/vendor/aho-corasick/src/classes.rs b/vendor/aho-corasick/src/classes.rs new file mode 100644 index 0000000000..f1933c42af --- /dev/null +++ b/vendor/aho-corasick/src/classes.rs @@ -0,0 +1,243 @@ +use std::fmt; + +/// A representation of byte oriented equivalence classes. +/// +/// This is used in an FSM to reduce the size of the transition table. This can +/// have a particularly large impact not only on the total size of an FSM, but +/// also on compile times. +#[derive(Clone, Copy)] +pub struct ByteClasses([u8; 256]); + +impl ByteClasses { + /// Creates a new set of equivalence classes where all bytes are mapped to + /// the same class. + pub fn empty() -> ByteClasses { + ByteClasses([0; 256]) + } + + /// Creates a new set of equivalence classes where each byte belongs to + /// its own equivalence class. + pub fn singletons() -> ByteClasses { + let mut classes = ByteClasses::empty(); + for i in 0..256 { + classes.set(i as u8, i as u8); + } + classes + } + + /// Set the equivalence class for the given byte. + #[inline] + pub fn set(&mut self, byte: u8, class: u8) { + self.0[byte as usize] = class; + } + + /// Get the equivalence class for the given byte. + #[inline] + pub fn get(&self, byte: u8) -> u8 { + self.0[byte as usize] + } + + /// Get the equivalence class for the given byte while forcefully + /// eliding bounds checks. + #[inline] + pub unsafe fn get_unchecked(&self, byte: u8) -> u8 { + *self.0.get_unchecked(byte as usize) + } + + /// Return the total number of elements in the alphabet represented by + /// these equivalence classes. Equivalently, this returns the total number + /// of equivalence classes. + #[inline] + pub fn alphabet_len(&self) -> usize { + self.0[255] as usize + 1 + } + + /// Returns true if and only if every byte in this class maps to its own + /// equivalence class. Equivalently, there are 256 equivalence classes + /// and each class contains exactly one byte. + #[inline] + pub fn is_singleton(&self) -> bool { + self.alphabet_len() == 256 + } + + /// Returns an iterator over a sequence of representative bytes from each + /// equivalence class. Namely, this yields exactly N items, where N is + /// equivalent to the number of equivalence classes. Each item is an + /// arbitrary byte drawn from each equivalence class. + /// + /// This is useful when one is determinizing an NFA and the NFA's alphabet + /// hasn't been converted to equivalence classes yet. Picking an arbitrary + /// byte from each equivalence class then permits a full exploration of + /// the NFA instead of using every possible byte value. + pub fn representatives(&self) -> ByteClassRepresentatives { + ByteClassRepresentatives { classes: self, byte: 0, last_class: None } + } + + /// Returns all of the bytes in the given equivalence class. + /// + /// The second element in the tuple indicates the number of elements in + /// the array. + fn elements(&self, equiv: u8) -> ([u8; 256], usize) { + let (mut array, mut len) = ([0; 256], 0); + for b in 0..256 { + if self.get(b as u8) == equiv { + array[len] = b as u8; + len += 1; + } + } + (array, len) + } +} + +impl fmt::Debug for ByteClasses { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + if self.is_singleton() { + write!(f, "ByteClasses({{singletons}})") + } else { + write!(f, "ByteClasses(")?; + for equiv in 0..self.alphabet_len() { + let (members, len) = self.elements(equiv as u8); + write!(f, " {} => {:?}", equiv, &members[..len])?; + } + write!(f, ")") + } + } +} + +/// An iterator over representative bytes from each equivalence class. +#[derive(Debug)] +pub struct ByteClassRepresentatives<'a> { + classes: &'a ByteClasses, + byte: usize, + last_class: Option, +} + +impl<'a> Iterator for ByteClassRepresentatives<'a> { + type Item = u8; + + fn next(&mut self) -> Option { + while self.byte < 256 { + let byte = self.byte as u8; + let class = self.classes.get(byte); + self.byte += 1; + + if self.last_class != Some(class) { + self.last_class = Some(class); + return Some(byte); + } + } + None + } +} + +/// A byte class builder keeps track of an *approximation* of equivalence +/// classes of bytes during NFA construction. That is, every byte in an +/// equivalence class cannot discriminate between a match and a non-match. +/// +/// For example, in the literals `abc` and `xyz`, the bytes [\x00-`], [d-w] +/// and [{-\xFF] never discriminate between a match and a non-match, precisely +/// because they never occur in the literals anywhere. +/// +/// Note though that this does not necessarily compute the minimal set of +/// equivalence classes. For example, in the literals above, the byte ranges +/// [\x00-`], [d-w] and [{-\xFF] are all treated as distinct equivalence +/// classes even though they could be treated a single class. The reason for +/// this is implementation complexity. In the future, we should endeavor to +/// compute the minimal equivalence classes since they can have a rather large +/// impact on the size of the DFA. +/// +/// The representation here is 256 booleans, all initially set to false. Each +/// boolean maps to its corresponding byte based on position. A `true` value +/// indicates the end of an equivalence class, where its corresponding byte +/// and all of the bytes corresponding to all previous contiguous `false` +/// values are in the same equivalence class. +/// +/// This particular representation only permits contiguous ranges of bytes to +/// be in the same equivalence class, which means that we can never discover +/// the true minimal set of equivalence classes. +#[derive(Debug)] +pub struct ByteClassBuilder(Vec); + +impl ByteClassBuilder { + /// Create a new builder of byte classes where all bytes are part of the + /// same equivalence class. + pub fn new() -> ByteClassBuilder { + ByteClassBuilder(vec![false; 256]) + } + + /// Indicate the the range of byte given (inclusive) can discriminate a + /// match between it and all other bytes outside of the range. + pub fn set_range(&mut self, start: u8, end: u8) { + debug_assert!(start <= end); + if start > 0 { + self.0[start as usize - 1] = true; + } + self.0[end as usize] = true; + } + + /// Build byte classes that map all byte values to their corresponding + /// equivalence class. The last mapping indicates the largest equivalence + /// class identifier (which is never bigger than 255). + pub fn build(&self) -> ByteClasses { + let mut classes = ByteClasses::empty(); + let mut class = 0u8; + let mut i = 0; + loop { + classes.set(i as u8, class as u8); + if i >= 255 { + break; + } + if self.0[i] { + class = class.checked_add(1).unwrap(); + } + i += 1; + } + classes + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn byte_classes() { + let mut set = ByteClassBuilder::new(); + set.set_range(b'a', b'z'); + + let classes = set.build(); + assert_eq!(classes.get(0), 0); + assert_eq!(classes.get(1), 0); + assert_eq!(classes.get(2), 0); + assert_eq!(classes.get(b'a' - 1), 0); + assert_eq!(classes.get(b'a'), 1); + assert_eq!(classes.get(b'm'), 1); + assert_eq!(classes.get(b'z'), 1); + assert_eq!(classes.get(b'z' + 1), 2); + assert_eq!(classes.get(254), 2); + assert_eq!(classes.get(255), 2); + + let mut set = ByteClassBuilder::new(); + set.set_range(0, 2); + set.set_range(4, 6); + let classes = set.build(); + assert_eq!(classes.get(0), 0); + assert_eq!(classes.get(1), 0); + assert_eq!(classes.get(2), 0); + assert_eq!(classes.get(3), 1); + assert_eq!(classes.get(4), 2); + assert_eq!(classes.get(5), 2); + assert_eq!(classes.get(6), 2); + assert_eq!(classes.get(7), 3); + assert_eq!(classes.get(255), 3); + } + + #[test] + fn full_byte_classes() { + let mut set = ByteClassBuilder::new(); + for i in 0..256u16 { + set.set_range(i as u8, i as u8); + } + assert_eq!(set.build().alphabet_len(), 256); + } +} diff --git a/vendor/aho-corasick/src/dfa.rs b/vendor/aho-corasick/src/dfa.rs new file mode 100644 index 0000000000..64fcfa3e63 --- /dev/null +++ b/vendor/aho-corasick/src/dfa.rs @@ -0,0 +1,688 @@ +use std::mem::size_of; + +use ahocorasick::MatchKind; +use automaton::Automaton; +use classes::ByteClasses; +use error::Result; +use nfa::{NFA, PatternID, PatternLength}; +use prefilter::{Prefilter, PrefilterObj, PrefilterState}; +use state_id::{StateID, dead_id, fail_id, premultiply_overflow_error}; +use Match; + +#[derive(Clone, Debug)] +pub enum DFA { + Standard(Standard), + ByteClass(ByteClass), + Premultiplied(Premultiplied), + PremultipliedByteClass(PremultipliedByteClass), +} + +impl DFA { + fn repr(&self) -> &Repr { + match *self { + DFA::Standard(ref dfa) => dfa.repr(), + DFA::ByteClass(ref dfa) => dfa.repr(), + DFA::Premultiplied(ref dfa) => dfa.repr(), + DFA::PremultipliedByteClass(ref dfa) => dfa.repr(), + } + } + + pub fn match_kind(&self) -> &MatchKind { + &self.repr().match_kind + } + + pub fn heap_bytes(&self) -> usize { + self.repr().heap_bytes + } + + pub fn max_pattern_len(&self) -> usize { + self.repr().max_pattern_len + } + + pub fn pattern_count(&self) -> usize { + self.repr().pattern_count + } + + pub fn start_state(&self) -> S { + self.repr().start_id + } + + #[inline(always)] + pub fn overlapping_find_at( + &self, + prestate: &mut PrefilterState, + haystack: &[u8], + at: usize, + state_id: &mut S, + match_index: &mut usize, + ) -> Option { + match *self { + DFA::Standard(ref dfa) => { + dfa.overlapping_find_at( + prestate, haystack, at, state_id, match_index, + ) + } + DFA::ByteClass(ref dfa) => { + dfa.overlapping_find_at( + prestate, haystack, at, state_id, match_index, + ) + } + DFA::Premultiplied(ref dfa) => { + dfa.overlapping_find_at( + prestate, haystack, at, state_id, match_index, + ) + } + DFA::PremultipliedByteClass(ref dfa) => { + dfa.overlapping_find_at( + prestate, haystack, at, state_id, match_index, + ) + } + } + } + + #[inline(always)] + pub fn earliest_find_at( + &self, + prestate: &mut PrefilterState, + haystack: &[u8], + at: usize, + state_id: &mut S, + ) -> Option { + match *self { + DFA::Standard(ref dfa) => { + dfa.earliest_find_at(prestate, haystack, at, state_id) + } + DFA::ByteClass(ref dfa) => { + dfa.earliest_find_at(prestate, haystack, at, state_id) + } + DFA::Premultiplied(ref dfa) => { + dfa.earliest_find_at(prestate, haystack, at, state_id) + } + DFA::PremultipliedByteClass(ref dfa) => { + dfa.earliest_find_at(prestate, haystack, at, state_id) + } + } + } + + #[inline(always)] + pub fn find_at( + &self, + prestate: &mut PrefilterState, + haystack: &[u8], + at: usize, + state_id: &mut S, + ) -> Option { + match *self { + DFA::Standard(ref dfa) => { + dfa.find_at(prestate, haystack, at, state_id) + } + DFA::ByteClass(ref dfa) => { + dfa.find_at(prestate, haystack, at, state_id) + } + DFA::Premultiplied(ref dfa) => { + dfa.find_at(prestate, haystack, at, state_id) + } + DFA::PremultipliedByteClass(ref dfa) => { + dfa.find_at(prestate, haystack, at, state_id) + } + } + } +} + +#[derive(Clone, Debug)] +pub struct Standard(Repr); + +impl Standard { + fn repr(&self) -> &Repr { + &self.0 + } +} + +impl Automaton for Standard { + type ID = S; + + fn match_kind(&self) -> &MatchKind { + &self.repr().match_kind + } + + fn prefilter(&self) -> Option<&Prefilter> { + self.repr().prefilter.as_ref().map(|p| p.as_ref()) + } + + fn start_state(&self) -> S { + self.repr().start_id + } + + fn is_valid(&self, id: S) -> bool { + id.to_usize() < self.repr().state_count + } + + fn is_match_state(&self, id: S) -> bool { + self.repr().is_match_state(id) + } + + fn is_match_or_dead_state(&self, id: S) -> bool { + self.repr().is_match_or_dead_state(id) + } + + fn get_match( + &self, + id: S, + match_index: usize, + end: usize, + ) -> Option { + self.repr().get_match(id, match_index, end) + } + + fn match_count(&self, id: S) -> usize { + self.repr().match_count(id) + } + + unsafe fn next_state_unchecked(&self, current: S, input: u8) -> S { + let o = current.to_usize() * 256 + input as usize; + *self.repr().trans.get_unchecked(o) + } +} + +#[derive(Clone, Debug)] +pub struct ByteClass(Repr); + +impl ByteClass { + fn repr(&self) -> &Repr { + &self.0 + } +} + +impl Automaton for ByteClass { + type ID = S; + + fn match_kind(&self) -> &MatchKind { + &self.repr().match_kind + } + + fn prefilter(&self) -> Option<&Prefilter> { + self.repr().prefilter.as_ref().map(|p| p.as_ref()) + } + + fn start_state(&self) -> S { + self.repr().start_id + } + + fn is_valid(&self, id: S) -> bool { + id.to_usize() < self.repr().state_count + } + + fn is_match_state(&self, id: S) -> bool { + self.repr().is_match_state(id) + } + + fn is_match_or_dead_state(&self, id: S) -> bool { + self.repr().is_match_or_dead_state(id) + } + + fn get_match( + &self, + id: S, + match_index: usize, + end: usize, + ) -> Option { + self.repr().get_match(id, match_index, end) + } + + fn match_count(&self, id: S) -> usize { + self.repr().match_count(id) + } + + unsafe fn next_state_unchecked(&self, current: S, input: u8) -> S { + let alphabet_len = self.repr().byte_classes.alphabet_len(); + let input = self.repr().byte_classes.get_unchecked(input); + let o = current.to_usize() * alphabet_len + input as usize; + *self.repr().trans.get_unchecked(o) + } +} + +#[derive(Clone, Debug)] +pub struct Premultiplied(Repr); + +impl Premultiplied { + fn repr(&self) -> &Repr { + &self.0 + } +} + +impl Automaton for Premultiplied { + type ID = S; + + fn match_kind(&self) -> &MatchKind { + &self.repr().match_kind + } + + fn prefilter(&self) -> Option<&Prefilter> { + self.repr().prefilter.as_ref().map(|p| p.as_ref()) + } + + fn start_state(&self) -> S { + self.repr().start_id + } + + fn is_valid(&self, id: S) -> bool { + (id.to_usize() / 256) < self.repr().state_count + } + + fn is_match_state(&self, id: S) -> bool { + self.repr().is_match_state(id) + } + + fn is_match_or_dead_state(&self, id: S) -> bool { + self.repr().is_match_or_dead_state(id) + } + + fn get_match( + &self, + id: S, + match_index: usize, + end: usize, + ) -> Option { + if id > self.repr().max_match { + return None; + } + self.repr() + .matches + .get(id.to_usize() / 256) + .and_then(|m| m.get(match_index)) + .map(|&(id, len)| Match { pattern: id, len, end }) + } + + fn match_count(&self, id: S) -> usize { + let o = id.to_usize() / 256; + self.repr().matches[o].len() + } + + unsafe fn next_state_unchecked(&self, current: S, input: u8) -> S { + let o = current.to_usize() + input as usize; + *self.repr().trans.get_unchecked(o) + } +} + +#[derive(Clone, Debug)] +pub struct PremultipliedByteClass(Repr); + +impl PremultipliedByteClass { + fn repr(&self) -> &Repr { + &self.0 + } +} + +impl Automaton for PremultipliedByteClass { + type ID = S; + + fn match_kind(&self) -> &MatchKind { + &self.repr().match_kind + } + + fn prefilter(&self) -> Option<&Prefilter> { + self.repr().prefilter.as_ref().map(|p| p.as_ref()) + } + + fn start_state(&self) -> S { + self.repr().start_id + } + + fn is_valid(&self, id: S) -> bool { + (id.to_usize() / self.repr().alphabet_len()) < self.repr().state_count + } + + fn is_match_state(&self, id: S) -> bool { + self.repr().is_match_state(id) + } + + fn is_match_or_dead_state(&self, id: S) -> bool { + self.repr().is_match_or_dead_state(id) + } + + fn get_match( + &self, + id: S, + match_index: usize, + end: usize, + ) -> Option { + if id > self.repr().max_match { + return None; + } + self.repr() + .matches + .get(id.to_usize() / self.repr().alphabet_len()) + .and_then(|m| m.get(match_index)) + .map(|&(id, len)| Match { pattern: id, len, end }) + } + + fn match_count(&self, id: S) -> usize { + let o = id.to_usize() / self.repr().alphabet_len(); + self.repr().matches[o].len() + } + + unsafe fn next_state_unchecked(&self, current: S, input: u8) -> S { + let input = self.repr().byte_classes.get_unchecked(input); + let o = current.to_usize() + input as usize; + *self.repr().trans.get_unchecked(o) + } +} + +#[derive(Clone, Debug)] +pub struct Repr { + match_kind: MatchKind, + premultiplied: bool, + start_id: S, + /// The length, in bytes, of the longest pattern in this automaton. This + /// information is useful for keeping correct buffer sizes when searching + /// on streams. + max_pattern_len: usize, + /// The total number of patterns added to this automaton. This includes + /// patterns that may never match. + pattern_count: usize, + state_count: usize, + max_match: S, + /// The number of bytes of heap used by this NFA's transition table. + heap_bytes: usize, + /// A prefilter for quickly detecting candidate matchs, if pertinent. + prefilter: Option, + byte_classes: ByteClasses, + trans: Vec, + matches: Vec>, +} + +impl Repr { + /// Returns the total alphabet size for this DFA. + /// + /// If byte classes are enabled, then this corresponds to the number of + /// equivalence classes. If they are disabled, then this is always 256. + fn alphabet_len(&self) -> usize { + self.byte_classes.alphabet_len() + } + + /// Returns true only if the given state is a match state. + fn is_match_state(&self, id: S) -> bool { + id <= self.max_match && id > dead_id() + } + + /// Returns true only if the given state is either a dead state or a match + /// state. + fn is_match_or_dead_state(&self, id: S) -> bool { + id <= self.max_match + } + + /// Get the ith match for the given state, where the end position of a + /// match was found at `end`. + /// + /// # Panics + /// + /// The caller must ensure that the given state identifier is valid, + /// otherwise this may panic. The `match_index` need not be valid. That is, + /// if the given state has no matches then this returns `None`. + fn get_match( + &self, + id: S, + match_index: usize, + end: usize, + ) -> Option { + if id > self.max_match { + return None; + } + self.matches + .get(id.to_usize()) + .and_then(|m| m.get(match_index)) + .map(|&(id, len)| Match { pattern: id, len, end }) + } + + /// Return the total number of matches for the given state. + /// + /// # Panics + /// + /// The caller must ensure that the given identifier is valid, or else + /// this panics. + fn match_count(&self, id: S) -> usize { + self.matches[id.to_usize()].len() + } + + /// Get the next state given `from` as the current state and `byte` as the + /// current input byte. + fn next_state(&self, from: S, byte: u8) -> S { + let alphabet_len = self.alphabet_len(); + let byte = self.byte_classes.get(byte); + self.trans[from.to_usize() * alphabet_len + byte as usize] + } + + /// Set the `byte` transition for the `from` state to point to `to`. + fn set_next_state(&mut self, from: S, byte: u8, to: S) { + let alphabet_len = self.alphabet_len(); + let byte = self.byte_classes.get(byte); + self.trans[from.to_usize() * alphabet_len + byte as usize] = to; + } + + /// Swap the given states in place. + fn swap_states(&mut self, id1: S, id2: S) { + assert!(!self.premultiplied, "can't swap states in premultiplied DFA"); + + let o1 = id1.to_usize() * self.alphabet_len(); + let o2 = id2.to_usize() * self.alphabet_len(); + for b in 0..self.alphabet_len() { + self.trans.swap(o1 + b, o2 + b); + } + self.matches.swap(id1.to_usize(), id2.to_usize()); + } + + /// This routine shuffles all match states in this DFA to the beginning + /// of the DFA such that every non-match state appears after every match + /// state. (With one exception: the special fail and dead states remain as + /// the first two states.) + /// + /// The purpose of doing this shuffling is to avoid an extra conditional + /// in the search loop, and in particular, detecting whether a state is a + /// match or not does not need to access any memory. + /// + /// This updates `self.max_match` to point to the last matching state as + /// well as `self.start` if the starting state was moved. + fn shuffle_match_states(&mut self) { + assert!( + !self.premultiplied, + "cannot shuffle match states of premultiplied DFA" + ); + + if self.state_count <= 1 { + return; + } + + let mut first_non_match = self.start_id.to_usize(); + while first_non_match < self.state_count + && self.matches[first_non_match].len() > 0 + { + first_non_match += 1; + } + + let mut swaps: Vec = vec![fail_id(); self.state_count]; + let mut cur = self.state_count - 1; + while cur > first_non_match { + if self.matches[cur].len() > 0 { + self.swap_states( + S::from_usize(cur), + S::from_usize(first_non_match), + ); + swaps[cur] = S::from_usize(first_non_match); + swaps[first_non_match] = S::from_usize(cur); + + first_non_match += 1; + while first_non_match < cur + && self.matches[first_non_match].len() > 0 + { + first_non_match += 1; + } + } + cur -= 1; + } + for id in (0..self.state_count).map(S::from_usize) { + let alphabet_len = self.alphabet_len(); + let offset = id.to_usize() * alphabet_len; + for next in &mut self.trans[offset..offset + alphabet_len] { + if swaps[next.to_usize()] != fail_id() { + *next = swaps[next.to_usize()]; + } + } + } + if swaps[self.start_id.to_usize()] != fail_id() { + self.start_id = swaps[self.start_id.to_usize()]; + } + self.max_match = S::from_usize(first_non_match - 1); + } + + fn premultiply(&mut self) -> Result<()> { + if self.premultiplied || self.state_count <= 1 { + return Ok(()); + } + + let alpha_len = self.alphabet_len(); + premultiply_overflow_error( + S::from_usize(self.state_count - 1), + alpha_len, + )?; + + for id in (2..self.state_count).map(S::from_usize) { + let offset = id.to_usize() * alpha_len; + for next in &mut self.trans[offset..offset + alpha_len] { + if *next == dead_id() { + continue; + } + *next = S::from_usize(next.to_usize() * alpha_len); + } + } + self.premultiplied = true; + self.start_id = S::from_usize(self.start_id.to_usize() * alpha_len); + self.max_match = S::from_usize(self.max_match.to_usize() * alpha_len); + Ok(()) + } + + /// Computes the total amount of heap used by this NFA in bytes. + fn calculate_size(&mut self) { + let mut size = + (self.trans.len() * size_of::()) + + (self.matches.len() * + size_of::>()); + for state_matches in &self.matches { + size += + state_matches.len() * size_of::<(PatternID, PatternLength)>(); + } + self.heap_bytes = size; + } +} + +/// A builder for configuring the determinization of an NFA into a DFA. +#[derive(Clone, Debug)] +pub struct Builder { + premultiply: bool, + byte_classes: bool, +} + +impl Builder { + /// Create a new builder for a DFA. + pub fn new() -> Builder { + Builder { + premultiply: true, + byte_classes: true, + } + } + + /// Build a DFA from the given NFA. + /// + /// This returns an error if the state identifiers exceed their + /// representation size. This can only happen when state ids are + /// premultiplied (which is enabled by default). + pub fn build(&self, nfa: &NFA) -> Result> { + let byte_classes = + if self.byte_classes { + nfa.byte_classes().clone() + } else { + ByteClasses::singletons() + }; + let alphabet_len = byte_classes.alphabet_len(); + let trans = vec![fail_id(); alphabet_len * nfa.state_len()]; + let matches = vec![vec![]; nfa.state_len()]; + let mut repr = Repr { + match_kind: nfa.match_kind().clone(), + premultiplied: false, + start_id: nfa.start_state(), + max_pattern_len: nfa.max_pattern_len(), + pattern_count: nfa.pattern_count(), + state_count: nfa.state_len(), + max_match: fail_id(), + heap_bytes: 0, + prefilter: nfa.prefilter_obj().map(|p| p.clone()), + byte_classes: byte_classes.clone(), + trans: trans, + matches: matches, + }; + for id in (0..nfa.state_len()).map(S::from_usize) { + repr.matches[id.to_usize()].extend_from_slice(nfa.matches(id)); + + let fail = nfa.failure_transition(id); + nfa.iter_all_transitions(&byte_classes, id, |b, mut next| { + if next == fail_id() { + next = nfa_next_state_memoized(nfa, &repr, id, fail, b); + } + repr.set_next_state(id, b, next); + }); + } + repr.shuffle_match_states(); + repr.calculate_size(); + if self.premultiply { + repr.premultiply()?; + if byte_classes.is_singleton() { + Ok(DFA::Premultiplied(Premultiplied(repr))) + } else { + Ok(DFA::PremultipliedByteClass(PremultipliedByteClass(repr))) + } + } else { + if byte_classes.is_singleton() { + Ok(DFA::Standard(Standard(repr))) + } else { + Ok(DFA::ByteClass(ByteClass(repr))) + } + } + } + + /// Whether to use byte classes or in the DFA. + pub fn byte_classes(&mut self, yes: bool) -> &mut Builder { + self.byte_classes = yes; + self + } + + /// Whether to premultiply state identifier in the DFA. + pub fn premultiply(&mut self, yes: bool) -> &mut Builder { + self.premultiply = yes; + self + } +} + +/// This returns the next NFA transition (including resolving failure +/// transitions), except once it sees a state id less than the id of the DFA +/// state that is currently being populated, then we no longer need to follow +/// failure transitions and can instead query the pre-computed state id from +/// the DFA itself. +/// +/// In general, this should only be called when a failure transition is seen. +fn nfa_next_state_memoized( + nfa: &NFA, + dfa: &Repr, + populating: S, + mut current: S, + input: u8, +) -> S { + loop { + if current < populating { + return dfa.next_state(current, input); + } + let next = nfa.next_state(current, input); + if next != fail_id() { + return next; + } + current = nfa.failure_transition(current); + } +} diff --git a/vendor/aho-corasick/src/error.rs b/vendor/aho-corasick/src/error.rs new file mode 100644 index 0000000000..c9cb233e1f --- /dev/null +++ b/vendor/aho-corasick/src/error.rs @@ -0,0 +1,103 @@ +use std::error; +use std::fmt; +use std::result; + +pub type Result = result::Result; + +/// An error that occurred during the construction of an Aho-Corasick +/// automaton. +#[derive(Clone, Debug)] +pub struct Error { + kind: ErrorKind, +} + +/// The kind of error that occurred. +#[derive(Clone, Debug)] +pub enum ErrorKind { + /// An error that occurs when constructing an automaton would require the + /// use of a state ID that overflows the chosen state ID representation. + /// For example, if one is using `u8` for state IDs and builds a DFA with + /// 257 states, then the last state's ID will be `256` which cannot be + /// represented with `u8`. + StateIDOverflow { + /// The maximum possible state ID. + max: usize, + }, + /// An error that occurs when premultiplication of state IDs is requested + /// when constructing an Aho-Corasick DFA, but doing so would overflow the + /// chosen state ID representation. + /// + /// When `max == requested_max`, then the state ID would overflow `usize`. + PremultiplyOverflow { + /// The maximum possible state id. + max: usize, + /// The maximum ID required by premultiplication. + requested_max: usize, + } +} + +impl Error { + /// Return the kind of this error. + pub fn kind(&self) -> &ErrorKind { + &self.kind + } + + pub(crate) fn state_id_overflow(max: usize) -> Error { + Error { kind: ErrorKind::StateIDOverflow { max } } + } + + pub(crate) fn premultiply_overflow( + max: usize, + requested_max: usize, + ) -> Error { + Error { kind: ErrorKind::PremultiplyOverflow { max, requested_max } } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match self.kind { + ErrorKind::StateIDOverflow { .. } => { + "state id representation too small" + } + ErrorKind::PremultiplyOverflow { .. } => { + "state id representation too small for premultiplication" + } + } + } +} + +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match self.kind { + ErrorKind::StateIDOverflow { max } => { + write!( + f, + "building the automaton failed because it required \ + building more states that can be identified, where the \ + maximum ID for the chosen representation is {}", + max, + ) + } + ErrorKind::PremultiplyOverflow { max, requested_max } => { + if max == requested_max { + write!( + f, + "premultiplication of states requires the ability to \ + represent a state ID greater than what can fit on \ + this platform's usize, which is {}", + ::std::usize::MAX, + ) + } else { + write!( + f, + "premultiplication of states requires the ability to \ + represent at least a state ID of {}, but the chosen \ + representation only permits a maximum state ID of {}", + requested_max, max, + ) + } + } + } + } +} diff --git a/vendor/aho-corasick/src/full.rs b/vendor/aho-corasick/src/full.rs deleted file mode 100644 index 377940afab..0000000000 --- a/vendor/aho-corasick/src/full.rs +++ /dev/null @@ -1,145 +0,0 @@ -use std::fmt; -use std::mem; - -use super::{ - FAIL_STATE, - StateIdx, AcAutomaton, Transitions, Match, - usize_bytes, vec_bytes, -}; -use super::autiter::Automaton; - -/// A complete Aho-Corasick automaton. -/// -/// This uses a single transition matrix that permits each input character -/// to move to the next state with a single lookup in the matrix. -/// -/// This is as fast as it gets, but it is guaranteed to use a lot of memory. -/// Namely, it will use at least `4 * 256 * #states`, where the number of -/// states is capped at length of all patterns concatenated. -#[derive(Clone)] -pub struct FullAcAutomaton

{ - pats: Vec

, - trans: Vec, // row-major, where states are rows - out: Vec>, // indexed by StateIdx - start_bytes: Vec, -} - -impl> FullAcAutomaton

{ - /// Build a new expanded Aho-Corasick automaton from an existing - /// Aho-Corasick automaton. - pub fn new(ac: AcAutomaton) -> FullAcAutomaton

{ - let mut fac = FullAcAutomaton { - pats: vec![], - trans: vec![FAIL_STATE; 256 * ac.states.len()], - out: vec![vec![]; ac.states.len()], - start_bytes: vec![], - }; - fac.build_matrix(&ac); - fac.pats = ac.pats; - fac.start_bytes = ac.start_bytes; - fac - } - - #[doc(hidden)] - pub fn memory_usage(&self) -> usize { - self.pats.iter() - .map(|p| vec_bytes() + p.as_ref().len()) - .sum::() - + (4 * self.trans.len()) - + self.out.iter() - .map(|v| vec_bytes() + (usize_bytes() * v.len())) - .sum::() - + self.start_bytes.len() - } - - #[doc(hidden)] - pub fn heap_bytes(&self) -> usize { - self.pats.iter() - .map(|p| mem::size_of::

() + p.as_ref().len()) - .sum::() - + (4 * self.trans.len()) - + self.out.iter() - .map(|v| vec_bytes() + (usize_bytes() * v.len())) - .sum::() - + self.start_bytes.len() - } - - fn set(&mut self, si: StateIdx, i: u8, goto: StateIdx) { - let ns = self.num_states(); - self.trans[i as usize * ns + si as usize] = goto; - } - - #[doc(hidden)] - #[inline] - pub fn num_states(&self) -> usize { - self.out.len() - } -} - -impl> Automaton

for FullAcAutomaton

{ - #[inline] - fn next_state(&self, si: StateIdx, i: u8) -> StateIdx { - let at = i as usize * self.num_states() + si as usize; - unsafe { *self.trans.get_unchecked(at) } - } - - #[inline] - fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match { - let pati = self.out[si as usize][outi]; - let patlen = self.pats[pati].as_ref().len(); - let start = texti + 1 - patlen; - Match { - pati: pati, - start: start, - end: start + patlen, - } - } - - #[inline] - fn has_match(&self, si: StateIdx, outi: usize) -> bool { - unsafe { outi < self.out.get_unchecked(si as usize).len() } - } - - #[inline] - fn start_bytes(&self) -> &[u8] { - &self.start_bytes - } - - #[inline] - fn patterns(&self) -> &[P] { - &self.pats - } - - #[inline] - fn pattern(&self, i: usize) -> &P { - &self.pats[i] - } -} - -impl> FullAcAutomaton

{ - fn build_matrix(&mut self, ac: &AcAutomaton) { - for (si, s) in ac.states.iter().enumerate().skip(1) { - self.set_states(ac, si as StateIdx); - self.out[si].extend_from_slice(&s.out); - } - } - - fn set_states(&mut self, ac: &AcAutomaton, si: StateIdx) { - let current_state = &ac.states[si as usize]; - let first_fail_state = current_state.fail; - current_state.for_each_transition(move |b, maybe_si| { - let goto = if maybe_si == FAIL_STATE { - ac.memoized_next_state(self, si, first_fail_state, b) - } else { - maybe_si - }; - self.set(si, b, goto); - }); - } -} - -impl + fmt::Debug> fmt::Debug for FullAcAutomaton

{ - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "FullAcAutomaton({:?})", self.pats) - } -} diff --git a/vendor/aho-corasick/src/lib.rs b/vendor/aho-corasick/src/lib.rs index 6ceb206414..0294d12e74 100644 --- a/vendor/aho-corasick/src/lib.rs +++ b/vendor/aho-corasick/src/lib.rs @@ -1,1082 +1,289 @@ /*! -An implementation of the -[Aho-Corasick string search algorithm](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_string_matching_algorithm). +A library for finding occurrences of many patterns at once. This library +provides multiple pattern search principally through an implementation of the +[Aho-Corasick algorithm](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm), +which builds a fast finite state machine for executing searches in linear time. + +Additionally, this library provides a number of configuration options for +building the automaton that permit controlling the space versus time trade +off. Other features include simple ASCII case insensitive matching, finding +overlapping matches, replacements, searching streams and even searching and +replacing text in streams. + +Finally, unlike all other (known) Aho-Corasick implementations, this one +supports enabling +[leftmost-first](enum.MatchKind.html#variant.LeftmostFirst) +or +[leftmost-longest](enum.MatchKind.html#variant.LeftmostFirst) +match semantics, using a (seemingly) novel alternative construction algorithm. +For more details on what match semantics means, see the +[`MatchKind`](enum.MatchKind.html) +type. + +# Overview + +This section gives a brief overview of the primary types in this crate: + +* [`AhoCorasick`](struct.AhoCorasick.html) is the primary type and represents + an Aho-Corasick automaton. This is the type you use to execute searches. +* [`AhoCorasickBuilder`](struct.AhoCorasickBuilder.html) can be used to build + an Aho-Corasick automaton, and supports configuring a number of options. +* [`Match`](struct.Match.html) represents a single match reported by an + Aho-Corasick automaton. Each match has two pieces of information: the pattern + that matched and the start and end byte offsets corresponding to the position + in the haystack at which it matched. + +# Example: basic searching + +This example shows how to search for occurrences of multiple patterns +simultaneously. Each match includes the pattern that matched along with the +byte offsets of the match. -The Aho-Corasick algorithm is principally useful when you need to search many -large texts for a fixed (possibly large) set of keywords. In particular, the -Aho-Corasick algorithm preprocesses the set of keywords by constructing a -finite state machine. The search phase is then a quick linear scan through the -text. Each character in the search text causes a state transition in the -automaton. Matches are reported when the automaton enters a match state. - -# Examples - -The main type exposed by this crate is `AcAutomaton`, which can be constructed -from an iterator of pattern strings: - -```rust -use aho_corasick::{Automaton, AcAutomaton}; +``` +use aho_corasick::AhoCorasick; -let aut = AcAutomaton::new(vec!["apple", "maple"]); +let patterns = &["apple", "maple", "Snapple"]; +let haystack = "Nobody likes maple in their apple flavored Snapple."; -// AcAutomaton also implements `FromIterator`: -let aut: AcAutomaton<&str> = ["apple", "maple"].iter().cloned().collect(); +let ac = AhoCorasick::new(patterns); +let mut matches = vec![]; +for mat in ac.find_iter(haystack) { + matches.push((mat.pattern(), mat.start(), mat.end())); +} +assert_eq!(matches, vec![ + (1, 13, 18), + (0, 28, 33), + (2, 43, 50), +]); ``` -Finding matches can be done with `find`: +# Example: case insensitivity -```rust -use aho_corasick::{Automaton, AcAutomaton, Match}; +This is like the previous example, but matches `Snapple` case insensitively +using `AhoCorasickBuilder`: -let aut = AcAutomaton::new(vec!["apple", "maple"]); -let mut it = aut.find("I like maple apples."); -assert_eq!(it.next(), Some(Match { - pati: 1, - start: 7, - end: 12, -})); -assert_eq!(it.next(), Some(Match { - pati: 0, - start: 13, - end: 18, -})); -assert_eq!(it.next(), None); ``` +use aho_corasick::AhoCorasickBuilder; -Use `find_overlapping` if you want to report all matches, even if they -overlap with each other. - -```rust -use aho_corasick::{Automaton, AcAutomaton, Match}; +let patterns = &["apple", "maple", "snapple"]; +let haystack = "Nobody likes maple in their apple flavored Snapple."; -let aut = AcAutomaton::new(vec!["abc", "a"]); -let matches: Vec<_> = aut.find_overlapping("abc").collect(); +let ac = AhoCorasickBuilder::new() + .ascii_case_insensitive(true) + .build(patterns); +let mut matches = vec![]; +for mat in ac.find_iter(haystack) { + matches.push((mat.pattern(), mat.start(), mat.end())); +} assert_eq!(matches, vec![ - Match { pati: 1, start: 0, end: 1}, Match { pati: 0, start: 0, end: 3 }, + (1, 13, 18), + (0, 28, 33), + (2, 43, 50), ]); - -// Regular `find` will report only one match: -let matches: Vec<_> = aut.find("abc").collect(); -assert_eq!(matches, vec![Match { pati: 1, start: 0, end: 1}]); ``` -Finally, there are also methods for finding matches on *streams*. Namely, the -search text does not have to live in memory. It's useful to run this on files -that can't fit into memory: +# Example: replacing matches in a stream -```no_run -use std::fs::File; +This example shows how to execute a search and replace on a stream without +loading the entire stream into memory first. -use aho_corasick::{Automaton, AcAutomaton}; - -let aut = AcAutomaton::new(vec!["foo", "bar", "baz"]); -let rdr = File::open("search.txt").unwrap(); -for m in aut.stream_find(rdr) { - let m = m.unwrap(); // could be an IO error - println!("Pattern '{}' matched at: ({}, {})", - aut.pattern(m.pati), m.start, m.end); -} ``` +use aho_corasick::AhoCorasick; -There is also `stream_find_overlapping`, which is just like `find_overlapping`, -but it operates on streams. - -Please see `dict-search.rs` in this crate's `examples` directory for a more -complete example. It creates a large automaton from a dictionary and can do a -streaming match over arbitrarily large data. - -# Memory usage - -A key aspect of an Aho-Corasick implementation is how the state transitions -are represented. The easiest way to make the automaton fast is to store a -sparse 256-slot map in each state. It maps an input byte to a state index. -This makes the matching loop extremely fast, since it translates to a simple -pointer read. - -The problem is that as the automaton accumulates more states, you end up paying -a `256 * 4` (`4` is for the `u32` state index) byte penalty for every state -regardless of how many transitions it has. +# fn example() -> Result<(), ::std::io::Error> { +let patterns = &["fox", "brown", "quick"]; +let replace_with = &["sloth", "grey", "slow"]; -To solve this, only states near the root of the automaton have this sparse -map representation. States near the leaves of the automaton use a dense mapping -that requires a linear scan. +// In a real example, these might be `std::fs::File`s instead. All you need to +// do is supply a pair of `std::io::Read` and `std::io::Write` implementations. +let rdr = "The quick brown fox."; +let mut wtr = vec![]; -(The specific limit currently set is `3`, so that states with a depth less than -or equal to `3` are less memory efficient. The result is that the memory usage -of the automaton stops growing rapidly past ~60MB, even for automatons with -thousands of patterns.) - -If you'd like to opt for the less-memory-efficient-but-faster version, then -you can construct an `AcAutomaton` with a `Sparse` transition strategy: - -```rust -use aho_corasick::{Automaton, AcAutomaton, Match, Sparse}; - -let aut = AcAutomaton::<&str, Sparse>::with_transitions(vec!["abc", "a"]); -let matches: Vec<_> = aut.find("abc").collect(); -assert_eq!(matches, vec![Match { pati: 1, start: 0, end: 1}]); +let ac = AhoCorasick::new(patterns); +ac.stream_replace_all(rdr.as_bytes(), &mut wtr, replace_with)?; +assert_eq!(b"The slow grey sloth.".to_vec(), wtr); +# Ok(()) }; example().unwrap() ``` -*/ - -#![deny(missing_docs)] - -extern crate memchr; -#[cfg(test)] -extern crate quickcheck; -#[cfg(test)] -extern crate rand; - -use std::collections::VecDeque; -use std::fmt; -use std::iter::FromIterator; -use std::mem; - -pub use self::autiter::{ - Automaton, Match, - Matches, MatchesOverlapping, StreamMatches, StreamMatchesOverlapping, -}; -pub use self::full::FullAcAutomaton; - -// We're specifying paths explicitly so that we can use -// these modules simultaneously from `main.rs`. -// Should probably make just make `main.rs` a separate crate. -#[path = "autiter.rs"] -mod autiter; -#[path = "full.rs"] -mod full; -/// The integer type used for the state index. -/// -/// Limiting this to 32 bit integers can have a big impact on memory usage -/// when using the `Sparse` transition representation. -pub type StateIdx = u32; +# Example: finding the leftmost first match -// Constants for special state indexes. -const FAIL_STATE: u32 = 0; -const ROOT_STATE: u32 = 1; +In the textbook description of Aho-Corasick, its formulation is typically +structured such that it reports all possible matches, even when they overlap +with another. In many cases, overlapping matches may not be desired, such as +the case of finding all successive non-overlapping matches like you might with +a standard regular expression. -// Limit the depth at which we use a sparse alphabet map. Once the limit is -// reached, a dense set is used (and lookup becomes O(n)). -// -// This does have a performance hit, but the (straight forward) alternative -// is to have a `256 * 4` byte overhead for every state. -// Given that Aho-Corasick is typically used for dictionary searching, this -// can lead to dramatic memory bloat. -// -// This limit should only be increased at your peril. Namely, in the worst -// case, `256^DENSE_DEPTH_THRESHOLD * 4` corresponds to the memory usage in -// bytes. A value of `1` gives us a good balance. This is also a happy point -// in the benchmarks. A value of `0` gives considerably worse times on certain -// benchmarks (e.g., `ac_ten_one_prefix_byte_every_match`) than even a value -// of `1`. A value of `2` is slightly better than `1` and it looks like gains -// level off at that point with not much observable difference when set to -// `3`. -// -// Why not make this user configurable? Well, it doesn't make much sense -// because we pay for it with case analysis in the matching loop. Increasing it -// doesn't have much impact on performance (outside of pathological cases?). -// -// N.B. Someone else seems to have discovered an alternative, but I haven't -// grokked it yet: https://github.com/mischasan/aho-corasick -const DENSE_DEPTH_THRESHOLD: u32 = 1; +Unfortunately the "obvious" way to modify the Aho-Corasick algorithm to do +this doesn't always work in the expected way, since it will report matches as +soon as they are seen. For example, consider matching the regex `Samwise|Sam` +against the text `Samwise`. Most regex engines (that are Perl-like, or +non-POSIX) will report `Samwise` as a match, but the standard Aho-Corasick +algorithm modified for reporting non-overlapping matches will report `Sam`. -/// An Aho-Corasick finite automaton. -/// -/// The type parameter `P` is the type of the pattern that was used to -/// construct this AcAutomaton. -#[derive(Clone)] -pub struct AcAutomaton { - pats: Vec

, - states: Vec>, - start_bytes: Vec, -} - -#[derive(Clone)] -struct State { - out: Vec, - fail: StateIdx, - goto: T, - depth: u32, -} - -impl> AcAutomaton

{ - /// Create a new automaton from an iterator of patterns. - /// - /// The patterns must be convertible to bytes (`&[u8]`) via the `AsRef` - /// trait. - pub fn new(pats: I) -> AcAutomaton - where I: IntoIterator { - AcAutomaton::with_transitions(pats) - } -} - -impl, T: Transitions> AcAutomaton { - /// Create a new automaton from an iterator of patterns. - /// - /// This constructor allows one to choose the transition representation. - /// - /// The patterns must be convertible to bytes (`&[u8]`) via the `AsRef` - /// trait. - pub fn with_transitions(pats: I) -> AcAutomaton - where I: IntoIterator { - AcAutomaton { - pats: vec![], // filled in later, avoid wrath of borrow checker - states: vec![State::new(0), State::new(0)], // empty and root - start_bytes: vec![], // also filled in later - }.build(pats.into_iter().collect()) - } - - /// Build out the entire automaton into a single matrix. - /// - /// This will make searching as fast as possible at the expense of using - /// at least `4 * 256 * #states` bytes of memory. - pub fn into_full(self) -> FullAcAutomaton

{ - FullAcAutomaton::new(self) - } - - #[doc(hidden)] - pub fn num_states(&self) -> usize { - self.states.len() - } - - #[doc(hidden)] - pub fn heap_bytes(&self) -> usize { - self.pats.iter() - .map(|p| mem::size_of::

() + p.as_ref().len()) - .sum::() - + self.states.iter() - .map(|s| mem::size_of::>() + s.heap_bytes()) - .sum::() - + self.start_bytes.len() - } - - // The states of `full_automaton` should be set for all states < si - fn memoized_next_state( - &self, - full_automaton: &FullAcAutomaton

, - current_si: StateIdx, - mut si: StateIdx, - b: u8, - ) -> StateIdx { - loop { - if si < current_si { - return full_automaton.next_state(si, b); - } - let state = &self.states[si as usize]; - let maybe_si = state.goto(b); - if maybe_si != FAIL_STATE { - return maybe_si; - } else { - si = state.fail; - } - } - } -} - -impl, T: Transitions> Automaton

for AcAutomaton { - #[inline] - fn next_state(&self, mut si: StateIdx, b: u8) -> StateIdx { - loop { - let state = &self.states[si as usize]; - let maybe_si = state.goto(b); - if maybe_si != FAIL_STATE { - si = maybe_si; - break; - } else { - si = state.fail; - } - } - si - } - - #[inline] - fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match { - let pati = self.states[si as usize].out[outi]; - let patlen = self.pats[pati].as_ref().len(); - let start = texti + 1 - patlen; - Match { - pati: pati, - start: start, - end: start + patlen, - } - } +A novel contribution of this library is the ability to change the match +semantics of Aho-Corasick (without additional search time overhead) such that +`Samwise` is reported instead. For example, here's the standard approach: - #[inline] - fn has_match(&self, si: StateIdx, outi: usize) -> bool { - outi < self.states[si as usize].out.len() - } - - #[inline] - fn start_bytes(&self) -> &[u8] { - &self.start_bytes - } - - #[inline] - fn patterns(&self) -> &[P] { - &self.pats - } - - #[inline] - fn pattern(&self, i: usize) -> &P { - &self.pats[i] - } -} - -// `(0..256).map(|b| b as u8)` optimizes poorly in debug builds so -// we use this small explicit iterator instead -struct AllBytesIter(i32); -impl Iterator for AllBytesIter { - type Item = u8; - #[inline] - fn next(&mut self) -> Option { - if self.0 < 256 { - let b = self.0 as u8; - self.0 += 1; - Some(b) - } else { - None - } - } -} +``` +use aho_corasick::AhoCorasick; -impl AllBytesIter { - fn new() -> AllBytesIter { - AllBytesIter(0) - } -} +let patterns = &["Samwise", "Sam"]; +let haystack = "Samwise"; -// Below contains code for *building* the automaton. It's a reasonably faithful -// translation of the description/psuedo-code from: -// http://www.cs.uku.fi/~kilpelai/BSA05/lectures/slides04.pdf +let ac = AhoCorasick::new(patterns); +let mat = ac.find(haystack).expect("should have a match"); +assert_eq!("Sam", &haystack[mat.start()..mat.end()]); +``` -impl, T: Transitions> AcAutomaton { - // This is the first phase and builds the initial keyword tree. - fn build(mut self, pats: Vec

) -> AcAutomaton { - for (pati, pat) in pats.iter().enumerate() { - if pat.as_ref().is_empty() { - continue; - } - let mut previ = ROOT_STATE; - for &b in pat.as_ref() { - if self.states[previ as usize].goto(b) != FAIL_STATE { - previ = self.states[previ as usize].goto(b); - } else { - let depth = self.states[previ as usize].depth + 1; - let nexti = self.add_state(State::new(depth)); - self.states[previ as usize].set_goto(b, nexti); - previ = nexti; - } - } - self.states[previ as usize].out.push(pati); - } - { - let root_state = &mut self.states[ROOT_STATE as usize]; - for c in AllBytesIter::new() { - if root_state.goto(c) == FAIL_STATE { - root_state.set_goto(c, ROOT_STATE); - } else { - self.start_bytes.push(c); - } - } - } - // If any of the start bytes are non-ASCII, then remove them all, - // because we don't want to be calling memchr on non-ASCII bytes. - // (Well, we could, but it requires being more clever. Simply using - // the prefix byte isn't good enough.) - if self.start_bytes.iter().any(|&b| b > 0x7F) { - self.start_bytes.clear(); - } - self.pats = pats; - self.fill() - } +And now here's the leftmost-first version, which matches how a Perl-like +regex will work: - // The second phase that fills in the back links. - fn fill(mut self) -> AcAutomaton { - // Fill up the queue with all non-root transitions out of the root - // node. Then proceed by breadth first traversal. - let mut q = VecDeque::new(); - self.states[ROOT_STATE as usize].for_each_transition(|_, si| { - if si != ROOT_STATE { - q.push_front(si); - } - }); +``` +use aho_corasick::{AhoCorasickBuilder, MatchKind}; - let mut transitions = Vec::new(); +let patterns = &["Samwise", "Sam"]; +let haystack = "Samwise"; - while let Some(si) = q.pop_back() { - self.states[si as usize].for_each_ok_transition(|c, u| { - transitions.push((c, u)); - q.push_front(u); - }); +let ac = AhoCorasickBuilder::new() + .match_kind(MatchKind::LeftmostFirst) + .build(patterns); +let mat = ac.find(haystack).expect("should have a match"); +assert_eq!("Samwise", &haystack[mat.start()..mat.end()]); +``` - for (c, u) in transitions.drain(..) { - let mut v = self.states[si as usize].fail; - loop { - let state = &self.states[v as usize]; - if state.goto(c) == FAIL_STATE { - v = state.fail; - } else { - break; - } - } - let ufail = self.states[v as usize].goto(c); - self.states[u as usize].fail = ufail; +In addition to leftmost-first semantics, this library also supports +leftmost-longest semantics, which match the POSIX behavior of a regular +expression alternation. See +[`MatchKind`](enum.MatchKind.html) +for more details. - fn get_two(xs: &mut [T], i: usize, j: usize) -> (&mut T, &mut T) { - if i < j { - let (before, after) = xs.split_at_mut(j); - (&mut before[i], &mut after[0]) - } else { - let (before, after) = xs.split_at_mut(i); - (&mut after[0], &mut before[j]) - } - } +# Prefilters - let (ufail_out, out) = get_two(&mut self.states, ufail as usize, u as usize); - out.out.extend_from_slice(&ufail_out.out); - } - } - self - } +While an Aho-Corasick automaton can perform admirably when compared to more +naive solutions, it is generally slower than more specialized algorithms that +are accelerated using vector instructions such as SIMD. - fn add_state(&mut self, state: State) -> StateIdx { - let i = self.states.len(); - self.states.push(state); - i as StateIdx - } -} +For that reason, this library will internally use a "prefilter" to attempt +to accelerate searches when possible. Currently, this library has fairly +limited implementation that only applies when there are 3 or fewer unique +starting bytes among all patterns in an automaton. -impl State { - fn new(depth: u32) -> State { - State { - out: vec![], - fail: 1, - goto: Transitions::new(depth), - depth: depth, - } - } +In the future, it is intended for this prefilter to grow more sophisticated +by pushing applicable optimizations from the +[`regex`](http://docs.rs/regex) +crate (and other places) down into this library. - fn goto(&self, b: u8) -> StateIdx { - self.goto.goto(b) - } +While a prefilter is generally good to have on by default since it works well +in the common case, it can lead to less predictable or even sub-optimal +performance in some cases. For that reason, prefilters can be disabled via +[`AhoCorasickBuilder::prefilter`](struct.AhoCorasickBuilder.html#method.prefilter). +*/ - fn set_goto(&mut self, b: u8, si: StateIdx) { - self.goto.set_goto(b, si); - } +#![deny(missing_docs)] - fn heap_bytes(&self) -> usize { - (self.out.len() * usize_bytes()) - + self.goto.heap_bytes() - } +// We can never be truly no_std, but we could be alloc-only some day, so +// require the std feature for now. +#[cfg(not(feature = "std"))] +compile_error!("`std` feature is currently required to build this crate"); - fn for_each_transition(&self, f: F) - where F: FnMut(u8, StateIdx) - { - self.goto.for_each_transition(f) - } +extern crate memchr; - fn for_each_ok_transition(&self, f: F) - where F: FnMut(u8, StateIdx) - { - self.goto.for_each_ok_transition(f) - } -} +pub use ahocorasick::{ + AhoCorasick, AhoCorasickBuilder, MatchKind, + FindIter, FindOverlappingIter, StreamFindIter, +}; +pub use error::{Error, ErrorKind}; +pub use state_id::StateID; + +mod ahocorasick; +mod automaton; +mod buffer; +mod dfa; +mod error; +mod classes; +mod prefilter; +mod nfa; +mod state_id; +#[cfg(test)] +mod tests; -/// An abstraction over state transition strategies. +/// A representation of a match reported by an Aho-Corasick automaton. /// -/// This is an attempt to let the caller choose the space/time trade offs -/// used for state transitions. +/// A match has two essential pieces of information: the identifier of the +/// pattern that matched, along with the start and end offsets of the match +/// in the haystack. /// -/// (It's possible that this interface is merely good enough for just the two -/// implementations in this crate.) -pub trait Transitions { - /// Return a new state at the given depth. - fn new(depth: u32) -> Self; - /// Return the next state index given the next character. - fn goto(&self, alpha: u8) -> StateIdx; - /// Set the next state index for the character given. - fn set_goto(&mut self, alpha: u8, si: StateIdx); - /// The memory use in bytes (on the heap) of this set of transitions. - fn heap_bytes(&self) -> usize; - - /// Iterates over each state - fn for_each_transition(&self, mut f: F) - where F: FnMut(u8, StateIdx) - { - for b in AllBytesIter::new() { - f(b, self.goto(b)); - } - } - - /// Iterates over each non-fail state - fn for_each_ok_transition(&self, mut f: F) - where - F: FnMut(u8, StateIdx), - { - self.for_each_transition(|b, si| { - if si != FAIL_STATE { - f(b, si); - } - }); - } -} - -/// State transitions that can be stored either sparsely or densely. +/// # Examples /// -/// This uses less space but at the expense of slower matching. -#[derive(Clone, Debug)] -pub struct Dense(DenseChoice); - -#[derive(Clone, Debug)] -enum DenseChoice { - Sparse(Box), - Dense(Vec<(u8, StateIdx)>), -} - -impl Transitions for Dense { - fn new(depth: u32) -> Dense { - if depth <= DENSE_DEPTH_THRESHOLD { - Dense(DenseChoice::Sparse(Box::new(Sparse::new(depth)))) - } else { - Dense(DenseChoice::Dense(vec![])) - } - } - - fn goto(&self, b1: u8) -> StateIdx { - match self.0 { - DenseChoice::Sparse(ref m) => m.goto(b1), - DenseChoice::Dense(ref m) => { - for &(b2, si) in m { - if b1 == b2 { - return si; - } - } - FAIL_STATE - } - } - } - - fn set_goto(&mut self, b: u8, si: StateIdx) { - match self.0 { - DenseChoice::Sparse(ref mut m) => m.set_goto(b, si), - DenseChoice::Dense(ref mut m) => m.push((b, si)), - } - } - - fn heap_bytes(&self) -> usize { - match self.0 { - DenseChoice::Sparse(_) => mem::size_of::(), - DenseChoice::Dense(ref m) => m.len() * (1 + 4), - } - } - - fn for_each_transition(&self, mut f: F) - where F: FnMut(u8, StateIdx) - { - match self.0 { - DenseChoice::Sparse(ref m) => m.for_each_transition(f), - DenseChoice::Dense(ref m) => { - let mut iter = m.iter(); - let mut b = 0i32; - while let Some(&(next_b, next_si)) = iter.next() { - while (b as u8) < next_b { - f(b as u8, FAIL_STATE); - b += 1; - } - f(b as u8, next_si); - b += 1; - } - while b < 256 { - f(b as u8, FAIL_STATE); - b += 1; - } - } - } - } - fn for_each_ok_transition(&self, mut f: F) - where - F: FnMut(u8, StateIdx), - { - match self.0 { - DenseChoice::Sparse(ref m) => m.for_each_ok_transition(f), - DenseChoice::Dense(ref m) => for &(b, si) in m { - f(b, si) - } - } - } -} - -/// State transitions that are always sparse. +/// Basic usage: /// -/// This can use enormous amounts of memory when there are many patterns, -/// but matching is very fast. -pub struct Sparse([StateIdx; 256]); - -impl Clone for Sparse { - fn clone(&self) -> Sparse { - Sparse(self.0) - } -} - -impl fmt::Debug for Sparse { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.debug_tuple("Sparse").field(&&self.0[..]).finish() - } +/// ``` +/// use aho_corasick::AhoCorasick; +/// +/// let ac = AhoCorasick::new(&[ +/// "foo", "bar", "baz", +/// ]); +/// let mat = ac.find("xxx bar xxx").expect("should have a match"); +/// assert_eq!(1, mat.pattern()); +/// assert_eq!(4, mat.start()); +/// assert_eq!(7, mat.end()); +/// ``` +#[derive(Clone, Debug, Eq, Hash, PartialEq)] +pub struct Match { + /// The pattern id. + pattern: usize, + /// The length of this match, such that the starting position of the match + /// is `end - len`. + /// + /// We use length here because, other than the pattern id, the only + /// information about each pattern that the automaton stores is its length. + /// So using the length here is just a bit more natural. But it isn't + /// technically required. + len: usize, + /// The end offset of the match, exclusive. + end: usize, } -impl Transitions for Sparse { - fn new(_: u32) -> Sparse { - Sparse([0; 256]) - } - +impl Match { + /// Returns the identifier of the pattern that matched. + /// + /// The identifier of a pattern is derived from the position in which it + /// was originally inserted into the corresponding automaton. The first + /// pattern has identifier `0`, and each subsequent pattern is `1`, `2` + /// and so on. #[inline] - fn goto(&self, b: u8) -> StateIdx { - self.0[b as usize] - } - - fn set_goto(&mut self, b: u8, si: StateIdx) { - self.0[b as usize] = si; - } - - fn heap_bytes(&self) -> usize { - 0 - } -} - -impl> FromIterator for AcAutomaton { - /// Create an automaton from an iterator of strings. - fn from_iter(it: T) -> AcAutomaton where T: IntoIterator { - AcAutomaton::new(it) - } -} - -// Provide some question debug impls for viewing automatons. -// The custom impls mostly exist for special showing of sparse maps. - -impl + fmt::Debug, T: Transitions> - fmt::Debug for AcAutomaton { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - use std::iter::repeat; - - try!(writeln!(f, "{}", repeat('-').take(79).collect::())); - try!(writeln!(f, "Patterns: {:?}", self.pats)); - for (i, state) in self.states.iter().enumerate().skip(1) { - try!(writeln!(f, "{:3}: {}", i, state.debug(i == 1))); - } - write!(f, "{}", repeat('-').take(79).collect::()) - } -} - -impl State { - fn debug(&self, root: bool) -> String { - format!("State {{ depth: {:?}, out: {:?}, fail: {:?}, goto: {{{}}} }}", - self.depth, self.out, self.fail, self.goto_string(root)) - } - - fn goto_string(&self, root: bool) -> String { - let mut goto = vec![]; - for b in AllBytesIter::new() { - let si = self.goto(b); - if (!root && si == FAIL_STATE) || (root && si == ROOT_STATE) { - continue; - } - goto.push(format!("{} => {}", b as char, si)); - } - goto.join(", ") - } -} - -impl fmt::Debug for State { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{}", self.debug(false)) - } -} - -impl AcAutomaton { - #[doc(hidden)] - pub fn dot(&self) -> String { - use std::fmt::Write; - let mut out = String::new(); - macro_rules! w { - ($w:expr, $($tt:tt)*) => { {write!($w, $($tt)*)}.unwrap() } - } - - w!(out, r#" -digraph automaton {{ - label=<{}>; - labelloc="l"; - labeljust="l"; - rankdir="LR"; -"#, self.pats.join(", ")); - for (i, s) in self.states.iter().enumerate().skip(1) { - let i = i as u32; - if s.out.is_empty() { - w!(out, " {};\n", i); - } else { - w!(out, " {} [peripheries=2];\n", i); - } - w!(out, " {} -> {} [style=dashed];\n", i, s.fail); - for b in AllBytesIter::new() { - let si = s.goto(b); - if si == FAIL_STATE || (i == ROOT_STATE && si == ROOT_STATE) { - continue; - } - w!(out, " {} -> {} [label={}];\n", i, si, b as char); - } - } - w!(out, "}}"); - out - } -} - -fn vec_bytes() -> usize { - usize_bytes() * 3 -} - -fn usize_bytes() -> usize { - let bits = usize::max_value().count_ones() as usize; - bits / 8 -} - -#[cfg(test)] -mod tests { - use std::collections::HashSet; - use std::io; - - use quickcheck::{Arbitrary, Gen, quickcheck}; - use rand::Rng; - - use super::{AcAutomaton, Automaton, Match, AllBytesIter}; - - fn aut_find(xs: &[S], haystack: &str) -> Vec - where S: Clone + AsRef<[u8]> { - AcAutomaton::new(xs.to_vec()).find(&haystack).collect() - } - - fn aut_finds(xs: &[S], haystack: &str) -> Vec - where S: Clone + AsRef<[u8]> { - let cur = io::Cursor::new(haystack.as_bytes()); - AcAutomaton::new(xs.to_vec()) - .stream_find(cur).map(|r| r.unwrap()).collect() - } - - fn aut_findf(xs: &[S], haystack: &str) -> Vec - where S: Clone + AsRef<[u8]> { - AcAutomaton::new(xs.to_vec()).into_full().find(haystack).collect() - } - - fn aut_findfs(xs: &[S], haystack: &str) -> Vec - where S: Clone + AsRef<[u8]> { - let cur = io::Cursor::new(haystack.as_bytes()); - AcAutomaton::new(xs.to_vec()) - .into_full() - .stream_find(cur).map(|r| r.unwrap()).collect() - } - - fn aut_findo(xs: &[S], haystack: &str) -> Vec - where S: Clone + AsRef<[u8]> { - AcAutomaton::new(xs.to_vec()).find_overlapping(haystack).collect() - } - - fn aut_findos(xs: &[S], haystack: &str) -> Vec - where S: Clone + AsRef<[u8]> { - let cur = io::Cursor::new(haystack.as_bytes()); - AcAutomaton::new(xs.to_vec()) - .stream_find_overlapping(cur).map(|r| r.unwrap()).collect() - } - - fn aut_findfo(xs: &[S], haystack: &str) -> Vec - where S: Clone + AsRef<[u8]> { - AcAutomaton::new(xs.to_vec()) - .into_full().find_overlapping(haystack).collect() - } - - fn aut_findfos(xs: &[S], haystack: &str) -> Vec - where S: Clone + AsRef<[u8]> { - let cur = io::Cursor::new(haystack.as_bytes()); - AcAutomaton::new(xs.to_vec()) - .into_full() - .stream_find_overlapping(cur).map(|r| r.unwrap()).collect() - } - - #[test] - fn one_pattern_one_match() { - let ns = vec!["a"]; - let hay = "za"; - let matches = vec![ - Match { pati: 0, start: 1, end: 2 }, - ]; - assert_eq!(&aut_find(&ns, hay), &matches); - assert_eq!(&aut_finds(&ns, hay), &matches); - assert_eq!(&aut_findf(&ns, hay), &matches); - assert_eq!(&aut_findfs(&ns, hay), &matches); - } - - #[test] - fn one_pattern_many_match() { - let ns = vec!["a"]; - let hay = "zazazzzza"; - let matches = vec![ - Match { pati: 0, start: 1, end: 2 }, - Match { pati: 0, start: 3, end: 4 }, - Match { pati: 0, start: 8, end: 9 }, - ]; - assert_eq!(&aut_find(&ns, hay), &matches); - assert_eq!(&aut_finds(&ns, hay), &matches); - assert_eq!(&aut_findf(&ns, hay), &matches); - assert_eq!(&aut_findfs(&ns, hay), &matches); - } - - #[test] - fn one_longer_pattern_one_match() { - let ns = vec!["abc"]; - let hay = "zazabcz"; - let matches = vec![ Match { pati: 0, start: 3, end: 6 } ]; - assert_eq!(&aut_find(&ns, hay), &matches); - assert_eq!(&aut_finds(&ns, hay), &matches); - assert_eq!(&aut_findf(&ns, hay), &matches); - assert_eq!(&aut_findfs(&ns, hay), &matches); - } - - #[test] - fn one_longer_pattern_many_match() { - let ns = vec!["abc"]; - let hay = "zazabczzzzazzzabc"; - let matches = vec![ - Match { pati: 0, start: 3, end: 6 }, - Match { pati: 0, start: 14, end: 17 }, - ]; - assert_eq!(&aut_find(&ns, hay), &matches); - assert_eq!(&aut_finds(&ns, hay), &matches); - assert_eq!(&aut_findf(&ns, hay), &matches); - assert_eq!(&aut_findfs(&ns, hay), &matches); - } - - #[test] - fn many_pattern_one_match() { - let ns = vec!["a", "b"]; - let hay = "zb"; - let matches = vec![ Match { pati: 1, start: 1, end: 2 } ]; - assert_eq!(&aut_find(&ns, hay), &matches); - assert_eq!(&aut_finds(&ns, hay), &matches); - assert_eq!(&aut_findf(&ns, hay), &matches); - assert_eq!(&aut_findfs(&ns, hay), &matches); - } - - #[test] - fn many_pattern_many_match() { - let ns = vec!["a", "b"]; - let hay = "zbzazzzzb"; - let matches = vec![ - Match { pati: 1, start: 1, end: 2 }, - Match { pati: 0, start: 3, end: 4 }, - Match { pati: 1, start: 8, end: 9 }, - ]; - assert_eq!(&aut_find(&ns, hay), &matches); - assert_eq!(&aut_finds(&ns, hay), &matches); - assert_eq!(&aut_findf(&ns, hay), &matches); - assert_eq!(&aut_findfs(&ns, hay), &matches); - } - - #[test] - fn many_longer_pattern_one_match() { - let ns = vec!["abc", "xyz"]; - let hay = "zazxyzz"; - let matches = vec![ Match { pati: 1, start: 3, end: 6 } ]; - assert_eq!(&aut_find(&ns, hay), &matches); - assert_eq!(&aut_finds(&ns, hay), &matches); - assert_eq!(&aut_findf(&ns, hay), &matches); - assert_eq!(&aut_findfs(&ns, hay), &matches); - } - - #[test] - fn many_longer_pattern_many_match() { - let ns = vec!["abc", "xyz"]; - let hay = "zazxyzzzzzazzzabcxyz"; - let matches = vec![ - Match { pati: 1, start: 3, end: 6 }, - Match { pati: 0, start: 14, end: 17 }, - Match { pati: 1, start: 17, end: 20 }, - ]; - assert_eq!(&aut_find(&ns, hay), &matches); - assert_eq!(&aut_finds(&ns, hay), &matches); - assert_eq!(&aut_findf(&ns, hay), &matches); - assert_eq!(&aut_findfs(&ns, hay), &matches); - } - - #[test] - fn many_longer_pattern_overlap_one_match() { - let ns = vec!["abc", "bc"]; - let hay = "zazabcz"; - let matches = vec![ - Match { pati: 0, start: 3, end: 6 }, - Match { pati: 1, start: 4, end: 6 }, - ]; - assert_eq!(&aut_findo(&ns, hay), &matches); - assert_eq!(&aut_findos(&ns, hay), &matches); - assert_eq!(&aut_findfo(&ns, hay), &matches); - assert_eq!(&aut_findfos(&ns, hay), &matches); - } - - #[test] - fn many_longer_pattern_overlap_one_match_reverse() { - let ns = vec!["abc", "bc"]; - let hay = "xbc"; - let matches = vec![ Match { pati: 1, start: 1, end: 3 } ]; - assert_eq!(&aut_findo(&ns, hay), &matches); - assert_eq!(&aut_findos(&ns, hay), &matches); - assert_eq!(&aut_findfo(&ns, hay), &matches); - assert_eq!(&aut_findfos(&ns, hay), &matches); + pub fn pattern(&self) -> usize { + self.pattern } - #[test] - fn many_longer_pattern_overlap_many_match() { - let ns = vec!["abc", "bc", "c"]; - let hay = "zzzabczzzbczzzc"; - let matches = vec![ - Match { pati: 0, start: 3, end: 6 }, - Match { pati: 1, start: 4, end: 6 }, - Match { pati: 2, start: 5, end: 6 }, - Match { pati: 1, start: 9, end: 11 }, - Match { pati: 2, start: 10, end: 11 }, - Match { pati: 2, start: 14, end: 15 }, - ]; - assert_eq!(&aut_findo(&ns, hay), &matches); - assert_eq!(&aut_findos(&ns, hay), &matches); - assert_eq!(&aut_findfo(&ns, hay), &matches); - assert_eq!(&aut_findfos(&ns, hay), &matches); - } - - #[test] - fn many_longer_pattern_overlap_many_match_reverse() { - let ns = vec!["abc", "bc", "c"]; - let hay = "zzzczzzbczzzabc"; - let matches = vec![ - Match { pati: 2, start: 3, end: 4 }, - Match { pati: 1, start: 7, end: 9 }, - Match { pati: 2, start: 8, end: 9 }, - Match { pati: 0, start: 12, end: 15 }, - Match { pati: 1, start: 13, end: 15 }, - Match { pati: 2, start: 14, end: 15 }, - ]; - assert_eq!(&aut_findo(&ns, hay), &matches); - assert_eq!(&aut_findos(&ns, hay), &matches); - assert_eq!(&aut_findfo(&ns, hay), &matches); - assert_eq!(&aut_findfos(&ns, hay), &matches); - } - - #[test] - fn pattern_returns_original_type() { - let aut = AcAutomaton::new(vec!["apple", "maple"]); - - // Explicitly given this type to assert that the thing returned - // from the function is our original type. - let pat: &str = aut.pattern(0); - assert_eq!(pat, "apple"); - - // Also check the return type of the `patterns` function. - let pats: &[&str] = aut.patterns(); - assert_eq!(pats, &["apple", "maple"]); - } - - // Quickcheck time. - - // This generates very small ascii strings, which makes them more likely - // to interact in interesting ways with larger haystack strings. - #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] - pub struct SmallAscii(String); - - impl Arbitrary for SmallAscii { - fn arbitrary(g: &mut G) -> SmallAscii { - use std::char::from_u32; - SmallAscii((0..2) - .map(|_| from_u32(g.gen_range(97, 123)).unwrap()) - .collect()) - } - - fn shrink(&self) -> Box> { - Box::new(self.0.shrink().map(SmallAscii)) - } - } - - impl From for String { - fn from(s: SmallAscii) -> String { s.0 } - } - - impl AsRef<[u8]> for SmallAscii { - fn as_ref(&self) -> &[u8] { self.0.as_ref() } + /// The starting position of the match. + #[inline] + pub fn start(&self) -> usize { + self.end - self.len } - // This is the same arbitrary impl as `String`, except it has a bias toward - // ASCII characters. - #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] - pub struct BiasAscii(String); - - impl Arbitrary for BiasAscii { - fn arbitrary(g: &mut G) -> BiasAscii { - use std::char::from_u32; - let size = { let s = g.size(); g.gen_range(0, s) }; - let mut s = String::with_capacity(size); - for _ in 0..size { - if g.gen_bool(0.3) { - s.push(char::arbitrary(g)); - } else { - for _ in 0..5 { - s.push(from_u32(g.gen_range(97, 123)).unwrap()); - } - } - } - BiasAscii(s) - } - - fn shrink(&self) -> Box> { - Box::new(self.0.shrink().map(BiasAscii)) - } + /// The ending position of the match. + #[inline] + pub fn end(&self) -> usize { + self.end } - fn naive_find(xs: &[S], haystack: &str) -> Vec - where S: Clone + Into { - let needles: Vec = - xs.to_vec().into_iter().map(Into::into).collect(); - let mut matches = vec![]; - for hi in 0..haystack.len() { - for (pati, needle) in needles.iter().enumerate() { - let needle = needle.as_bytes(); - if needle.len() == 0 || needle.len() > haystack.len() - hi { - continue; - } - if needle == &haystack.as_bytes()[hi..hi+needle.len()] { - matches.push(Match { - pati: pati, - start: hi, - end: hi + needle.len(), - }); - } - } - } - matches + /// Returns true if and only if this match is empty. That is, when + /// `start() == end()`. + /// + /// An empty match can only be returned when the empty string was among + /// the patterns used to build the Aho-Corasick automaton. + #[inline] + pub fn is_empty(&self) -> bool { + self.len == 0 } - #[test] - fn qc_ac_equals_naive() { - fn prop(needles: Vec, haystack: BiasAscii) -> bool { - let aut_matches = aut_findo(&needles, &haystack.0); - let naive_matches = naive_find(&needles, &haystack.0); - // Ordering isn't always the same. I don't think we care, so do - // an unordered comparison. - let aset: HashSet = aut_matches.iter().cloned().collect(); - let nset: HashSet = naive_matches.iter().cloned().collect(); - aset == nset + #[inline] + fn increment(&self, by: usize) -> Match { + Match { + pattern: self.pattern, + len: self.len, + end: self.end + by, } - quickcheck(prop as fn(Vec, BiasAscii) -> bool); - } - - - #[test] - fn all_bytes_iter() { - let all_bytes = AllBytesIter::new().collect::>(); - assert_eq!(all_bytes[0], 0); - assert_eq!(all_bytes[255], 255); - assert!(AllBytesIter::new().enumerate().all(|(i, b)| b as usize == i)); } } diff --git a/vendor/aho-corasick/src/main.rs b/vendor/aho-corasick/src/main.rs deleted file mode 100644 index 60562ac6ad..0000000000 --- a/vendor/aho-corasick/src/main.rs +++ /dev/null @@ -1,13 +0,0 @@ -extern crate memchr; - -use std::env; - -use lib::AcAutomaton; - -#[allow(dead_code)] -mod lib; - -fn main() { - let aut = AcAutomaton::new(env::args().skip(1)); - println!("{}", aut.dot().trim()); -} diff --git a/vendor/aho-corasick/src/nfa.rs b/vendor/aho-corasick/src/nfa.rs new file mode 100644 index 0000000000..289ebaaa25 --- /dev/null +++ b/vendor/aho-corasick/src/nfa.rs @@ -0,0 +1,1230 @@ +use std::collections::VecDeque; +use std::cmp; +use std::fmt; +use std::mem::size_of; + +use ahocorasick::MatchKind; +use automaton::Automaton; +use classes::{ByteClasses, ByteClassBuilder}; +use error::Result; +use prefilter::{self, Prefilter, PrefilterObj}; +use state_id::{StateID, dead_id, fail_id, usize_to_state_id}; +use Match; + +/// The identifier for a pattern, which is simply the position of the pattern +/// in the sequence of patterns given by the caller. +pub type PatternID = usize; + +/// The length of a pattern, in bytes. +pub type PatternLength = usize; + +/// An Aho-Corasick automaton, represented as an NFA. +/// +/// This is the classical formulation of Aho-Corasick, which involves building +/// up a prefix trie of a given set of patterns, and then wiring up failure +/// transitions between states in order to guarantee linear time matching. The +/// standard formulation is, technically, an NFA because of these failure +/// transitions. That is, one can see them as enabling the automaton to be in +/// multiple states at once. Indeed, during search, it is possible to check +/// the transitions on multiple states for a single input byte. +/// +/// This particular implementation not only supports the standard style of +/// matching, but also provides a mode for choosing leftmost-first or +/// leftmost-longest match semantics. When a leftmost mode is chosen, some +/// failure transitions that would otherwise be added are elided. See +/// the documentation of `MatchKind` for more details and examples on how the +/// match semantics may differ. +/// +/// If one wants a DFA, then it is necessary to first build an NFA and convert +/// it into a DFA. Note, however, that because we've constrained ourselves to +/// matching literal patterns, this does not need to use subset construction +/// for determinization. Instead, the DFA has at most a number of states +/// equivalent to the number of NFA states. The only real difference between +/// them is that all failure transitions are followed and pre-computed. This +/// uses much more memory, but also executes searches more quickly. +#[derive(Clone)] +pub struct NFA { + /// The match semantics built into this NFA. + match_kind: MatchKind, + /// The start state id as an index into `states`. + start_id: S, + /// The length, in bytes, of the longest pattern in this automaton. This + /// information is useful for keeping correct buffer sizes when searching + /// on streams. + max_pattern_len: usize, + /// The total number of patterns added to this automaton, including + /// patterns that may never be matched. + pattern_count: usize, + /// The number of bytes of heap used by this NFA's transition table. + heap_bytes: usize, + /// A prefilter for quickly skipping to candidate matches, if pertinent. + prefilter: Option, + /// A set of equivalence classes in terms of bytes. We compute this while + /// building the NFA, but don't use it in the NFA's states. Instead, we + /// use this for building the DFA. We store it on the NFA since it's easy + /// to compute while visiting the the patterns. + byte_classes: ByteClasses, + /// A set of states. Each state defines its own transitions, a fail + /// transition and a set of indices corresponding to matches. + /// + /// The first state is always the fail state, which is used only as a + /// sentinel. Namely, in the final NFA, no transition into the fail state + /// exists. (Well, they do, but they aren't followed. Instead, the state's + /// failure transition is followed.) + /// + /// The second state (index 1) is always the dead state. Dead states are + /// in every automaton, but only used when leftmost-{first,longest} match + /// semantics are enabled. Specifically, they instruct search to stop + /// at specific points in order to report the correct match location. In + /// the standard Aho-Corasick construction, there are no transitions to + /// the dead state. + /// + /// The third state (index 2) is generally intended to be the starting or + /// "root" state. + states: Vec>, +} + +impl NFA { + /// Returns the equivalence classes of bytes found while constructing + /// this NFA. + /// + /// Note that the NFA doesn't actually make use of these equivalence + /// classes. Instead, these are useful for building the DFA when desired. + pub fn byte_classes(&self) -> &ByteClasses { + &self.byte_classes + } + + /// Returns a start byte prefilter, if one exists. + pub fn prefilter_obj(&self) -> Option<&PrefilterObj> { + self.prefilter.as_ref() + } + + /// Returns the total number of heap bytes used by this NFA's transition + /// table. + pub fn heap_bytes(&self) -> usize { + self.heap_bytes + } + + /// Return the length of the longest pattern in this automaton. + pub fn max_pattern_len(&self) -> usize { + self.max_pattern_len + } + + /// Return the total number of patterns added to this automaton. + pub fn pattern_count(&self) -> usize { + self.pattern_count + } + + /// Returns the total number of states in this NFA. + pub fn state_len(&self) -> usize { + self.states.len() + } + + /// Returns the matches for the given state. + pub fn matches(&self, id: S) -> &[(PatternID, PatternLength)] { + &self.states[id.to_usize()].matches + } + + /// Returns an iterator over all transitions in the given state according + /// to the given equivalence classes, including transitions to `fail_id()`. + /// The number of transitions returned is always equivalent to the number + /// of equivalence classes. + pub fn iter_all_transitions( + &self, + byte_classes: &ByteClasses, + id: S, + f: F, + ) { + self.states[id.to_usize()].trans.iter_all(byte_classes, f); + } + + /// Returns the failure transition for the given state. + pub fn failure_transition(&self, id: S) -> S { + self.states[id.to_usize()].fail + } + + /// Returns the next state for the given state and input byte. + /// + /// Note that this does not follow failure transitions. As such, the id + /// returned may be `fail_id`. + pub fn next_state(&self, current: S, input: u8) -> S { + self.states[current.to_usize()].next_state(input) + } + + fn state(&self, id: S) -> &State { + &self.states[id.to_usize()] + } + + fn state_mut(&mut self, id: S) -> &mut State { + &mut self.states[id.to_usize()] + } + + fn start(&self) -> &State { + self.state(self.start_id) + } + + fn start_mut(&mut self) -> &mut State { + let id = self.start_id; + self.state_mut(id) + } + + fn iter_transitions_mut(&mut self, id: S) -> IterTransitionsMut { + IterTransitionsMut::new(self, id) + } + + fn copy_matches(&mut self, src: S, dst: S) { + let (src, dst) = get_two_mut( + &mut self.states, src.to_usize(), dst.to_usize(), + ); + dst.matches.extend_from_slice(&src.matches); + } + + fn copy_empty_matches(&mut self, dst: S) { + let start_id = self.start_id; + self.copy_matches(start_id, dst); + } + + fn add_dense_state(&mut self, depth: usize) -> Result { + let trans = Transitions::Dense(vec![fail_id(); 256]); + let id = usize_to_state_id(self.states.len())?; + self.states.push(State { + trans, + fail: self.start_id, + depth: depth, + matches: vec![], + }); + Ok(id) + } + + fn add_sparse_state(&mut self, depth: usize) -> Result { + let trans = Transitions::Sparse(vec![]); + let id = usize_to_state_id(self.states.len())?; + self.states.push(State { + trans, + fail: self.start_id, + depth: depth, + matches: vec![], + }); + Ok(id) + } +} + +impl Automaton for NFA { + type ID = S; + + fn match_kind(&self) -> &MatchKind { + &self.match_kind + } + + fn prefilter(&self) -> Option<&Prefilter> { + self.prefilter.as_ref().map(|p| p.as_ref()) + } + + fn start_state(&self) -> S { + self.start_id + } + + fn is_valid(&self, id: S) -> bool { + id.to_usize() < self.states.len() + } + + fn is_match_state(&self, id: S) -> bool { + self.states[id.to_usize()].is_match() + } + + fn get_match( + &self, + id: S, + match_index: usize, + end: usize, + ) -> Option { + let state = match self.states.get(id.to_usize()) { + None => return None, + Some(state) => state, + }; + state.matches + .get(match_index) + .map(|&(id, len)| Match { pattern: id, len, end }) + } + + fn match_count(&self, id: S) -> usize { + self.states[id.to_usize()].matches.len() + } + + unsafe fn next_state_unchecked(&self, mut current: S, input: u8) -> S { + // This terminates since: + // + // 1. `State.fail` never points to fail_id(). + // 2. All `State.fail` values point to a state closer to `start`. + // 3. The start state has no transitions to fail_id(). + loop { + let state = self.states.get_unchecked(current.to_usize()); + let next = state.next_state(input); + if next != fail_id() { + return next; + } + current = state.fail; + } + } +} + +/// A representation of an NFA state for an Aho-Corasick automaton. +/// +/// It contains the transitions to the next state, a failure transition for +/// cases where there exists no other transition for the current input byte, +/// the matches implied by visiting this state (if any) and the depth of this +/// state. The depth of a state is simply the distance from it to the start +/// state in the automaton, where the depth of the start state is 0. +#[derive(Clone, Debug)] +pub struct State { + trans: Transitions, + fail: S, + matches: Vec<(PatternID, PatternLength)>, + // TODO: Strictly speaking, this isn't needed for searching. It's only + // used when building an NFA that supports leftmost match semantics. We + // could drop this from the state and dynamically build a map only when + // computing failure transitions, but it's not clear which is better. + // Benchmark this. + depth: usize, +} + +impl State { + fn heap_bytes(&self) -> usize { + self.trans.heap_bytes() + + (self.matches.len() * size_of::<(PatternID, PatternLength)>()) + } + + fn add_match(&mut self, i: PatternID, len: PatternLength) { + self.matches.push((i, len)); + } + + fn is_match(&self) -> bool { + !self.matches.is_empty() + } + + fn get_longest_match_len(&self) -> Option { + // Why is this true? Because the first match in any matching state + // will always correspond to the match added to it during trie + // construction (since when we copy matches due to failure transitions, + // we always append them). Therefore, it follows that the first match + // must always be longest since any subsequent match must be from a + // failure transition, and a failure transition by construction points + // to a proper suffix. A proper suffix is, by definition, smaller. + self.matches.get(0).map(|&(_, len)| len) + } + + fn next_state(&self, input: u8) -> S { + self.trans.next_state(input) + } + + fn set_next_state(&mut self, input: u8, next: S) { + self.trans.set_next_state(input, next); + } +} + +/// A representation of transitions in an NFA. +/// +/// Transitions have either a sparse representation, which is slower for +/// lookups but uses less memory, or a dense representation, which is faster +/// for lookups but uses more memory. In the sparse representation, the absence +/// of a state implies a transition to `fail_id()`. Transitions to `dead_id()` +/// are still explicitly represented. +/// +/// For the NFA, by default, we use a dense representation for transitions for +/// states close to the start state because it's likely these are the states +/// that will be most frequently visited. +#[derive(Clone, Debug)] +enum Transitions { + Sparse(Vec<(u8, S)>), + Dense(Vec), +} + +impl Transitions { + fn heap_bytes(&self) -> usize { + match *self { + Transitions::Sparse(ref sparse) => { + sparse.len() * size_of::<(u8, S)>() + } + Transitions::Dense(ref dense) => { + dense.len() * size_of::() + } + } + } + + fn next_state(&self, input: u8) -> S { + match *self { + Transitions::Sparse(ref sparse) => { + for &(b, id) in sparse { + if b == input { + return id; + } + } + fail_id() + } + Transitions::Dense(ref dense) => { + // SAFETY: This is safe because all dense transitions have + // exactly 256 elements, so all u8 values are valid indices. + unsafe { *dense.get_unchecked(input as usize) } + } + } + } + + fn set_next_state(&mut self, input: u8, next: S) { + match *self { + Transitions::Sparse(ref mut sparse) => { + match sparse.binary_search_by_key(&input, |&(b, _)| b) { + Ok(i) => sparse[i] = (input, next), + Err(i) => sparse.insert(i, (input, next)), + } + } + Transitions::Dense(ref mut dense) => { + dense[input as usize] = next; + } + } + } + + /// Iterate over transitions in this state while skipping over transitions + /// to `fail_id()`. + fn iter(&self, mut f: F) { + match *self { + Transitions::Sparse(ref sparse) => { + for &(b, id) in sparse { + f(b, id); + } + } + Transitions::Dense(ref dense) => { + for b in AllBytesIter::new() { + let id = dense[b as usize]; + if id != fail_id() { + f(b, id); + } + } + } + } + } + + /// Iterate over all transitions in this state according to the given + /// equivalence classes, including transitions to `fail_id()`. + fn iter_all(&self, classes: &ByteClasses, mut f: F) { + if classes.is_singleton() { + match *self { + Transitions::Sparse(ref sparse) => { + sparse_iter(sparse, f); + } + Transitions::Dense(ref dense) => { + for b in AllBytesIter::new() { + f(b, dense[b as usize]); + } + } + } + } else { + // In this case, we only want to yield a single byte for each + // equivalence class. + match *self { + Transitions::Sparse(ref sparse) => { + let mut last_class = None; + sparse_iter(sparse, |b, next| { + let class = classes.get(b); + if last_class != Some(class) { + last_class = Some(class); + f(b, next); + } + }) + } + Transitions::Dense(ref dense) => { + for b in classes.representatives() { + f(b, dense[b as usize]); + } + } + } + } + } +} + +/// Iterator over transitions in a state, skipping transitions to `fail_id()`. +/// +/// This abstracts over the representation of NFA transitions, which may be +/// either in a sparse or dense representation. +/// +/// This somewhat idiosyncratically borrows the NFA mutably, so that when one +/// is iterating over transitions, the caller can still mutate the NFA. This +/// is useful when creating failure transitions. +#[derive(Debug)] +struct IterTransitionsMut<'a, S: StateID + 'a> { + nfa: &'a mut NFA, + state_id: S, + cur: usize, +} + +impl<'a, S: StateID> IterTransitionsMut<'a, S> { + fn new(nfa: &'a mut NFA, state_id: S) -> IterTransitionsMut<'a, S> { + IterTransitionsMut { nfa, state_id, cur: 0 } + } + + fn nfa(&mut self) -> &mut NFA { + self.nfa + } +} + +impl<'a, S: StateID> Iterator for IterTransitionsMut<'a, S> { + type Item = (u8, S); + + fn next(&mut self) -> Option<(u8, S)> { + match self.nfa.states[self.state_id.to_usize()].trans { + Transitions::Sparse(ref sparse) => { + if self.cur >= sparse.len() { + return None; + } + let i = self.cur; + self.cur += 1; + Some(sparse[i]) + } + Transitions::Dense(ref dense) => { + while self.cur < dense.len() { + // There are always exactly 255 transitions in dense repr. + debug_assert!(self.cur < 256); + + let b = self.cur as u8; + let id = dense[self.cur]; + self.cur += 1; + if id != fail_id() { + return Some((b, id)); + } + } + None + } + } + } +} + +/// A simple builder for configuring the NFA construction of Aho-Corasick. +#[derive(Clone, Debug)] +pub struct Builder { + dense_depth: usize, + match_kind: MatchKind, + prefilter: bool, + ascii_case_insensitive: bool, +} + +impl Default for Builder { + fn default() -> Builder { + Builder { + dense_depth: 2, + match_kind: MatchKind::default(), + prefilter: true, + ascii_case_insensitive: false, + } + } +} + +impl Builder { + pub fn new() -> Builder { + Builder::default() + } + + pub fn build( + &self, + patterns: I, + ) -> Result> + where I: IntoIterator, + P: AsRef<[u8]> + { + Compiler::new(self)?.compile(patterns) + } + + pub fn match_kind(&mut self, kind: MatchKind) -> &mut Builder { + self.match_kind = kind; + self + } + + pub fn dense_depth(&mut self, depth: usize) -> &mut Builder { + self.dense_depth = depth; + self + } + + pub fn prefilter(&mut self, yes: bool) -> &mut Builder { + self.prefilter = yes; + self + } + + pub fn ascii_case_insensitive(&mut self, yes: bool) -> &mut Builder { + self.ascii_case_insensitive = yes; + self + } +} + +/// A compiler uses a builder configuration and builds up the NFA formulation +/// of an Aho-Corasick automaton. This roughly corresponds to the standard +/// formulation described in textbooks. +#[derive(Debug)] +struct Compiler<'a, S: StateID> { + builder: &'a Builder, + nfa: NFA, + byte_classes: ByteClassBuilder, +} + +impl<'a, S: StateID> Compiler<'a, S> { + fn new(builder: &'a Builder) -> Result> { + Ok(Compiler { + builder: builder, + nfa: NFA { + match_kind: builder.match_kind, + start_id: usize_to_state_id(2)?, + max_pattern_len: 0, + pattern_count: 0, + heap_bytes: 0, + prefilter: None, + byte_classes: ByteClasses::singletons(), + states: vec![], + }, + byte_classes: ByteClassBuilder::new(), + }) + } + + fn compile( + mut self, + patterns: I, + ) -> Result> + where I: IntoIterator, + P: AsRef<[u8]> + { + self.add_state(0)?; // the fail state, which is never entered + self.add_state(0)?; // the dead state, only used for leftmost + self.add_state(0)?; // the start state + self.build_trie(patterns)?; + self.add_start_state_loop(); + self.add_dead_state_loop(); + if self.match_kind().is_leftmost() { + self.fill_failure_transitions_leftmost(); + } else { + self.fill_failure_transitions_standard(); + } + self.close_start_state_loop(); + self.nfa.byte_classes = self.byte_classes.build(); + self.build_prefilters(); + self.calculate_size(); + Ok(self.nfa) + } + + /// This sets up the initial prefix trie that makes up the Aho-Corasick + /// automaton. Effectively, it creates the basic structure of the + /// automaton, where every pattern given has a path from the start state to + /// the end of the pattern. + fn build_trie( + &mut self, + patterns: I, + ) -> Result<()> + where I: IntoIterator, + P: AsRef<[u8]> + { + 'PATTERNS: + for (pati, pat) in patterns.into_iter().enumerate() { + let pat = pat.as_ref(); + self.nfa.max_pattern_len = cmp::max( + self.nfa.max_pattern_len, pat.len(), + ); + self.nfa.pattern_count += 1; + + let mut prev = self.nfa.start_id; + let mut saw_match = false; + for (depth, &b) in pat.iter().enumerate() { + // When leftmost-first match semantics are requested, we + // specifically stop adding patterns when a previously added + // pattern is a prefix of it. We avoid adding it because + // leftmost-first semantics imply that the pattern can never + // match. This is not just an optimization to save space! It + // is necessary for correctness. In fact, this is the only + // difference in the automaton between the implementations for + // leftmost-first and leftmost-longest. + saw_match = saw_match || self.nfa.state(prev).is_match(); + if self.builder.match_kind.is_leftmost_first() && saw_match { + // Skip to the next pattern immediately. This avoids + // incorrectly adding a match after this loop terminates. + continue 'PATTERNS; + } + + // Add this byte to our equivalence classes. We don't use these + // for NFA construction. These are instead used only if we're + // building a DFA. They would technically be useful for the + // NFA, but it would require a second pass over the patterns. + self.byte_classes.set_range(b, b); + + // If the transition from prev using the current byte already + // exists, then just move through it. Otherwise, add a new + // state. We track the depth here so that we can determine + // how to represent transitions. States near the start state + // use a dense representation that uses more memory but is + // faster. Other states use a sparse representation that uses + // less memory but is slower. + let next = self.nfa.state(prev).next_state(b); + if next != fail_id() { + prev = next; + } else { + let next = self.add_state(depth + 1)?; + self.nfa.state_mut(prev).set_next_state(b, next); + if self.builder.ascii_case_insensitive { + if b'A' <= b && b <= b'Z' { + let b = b.to_ascii_lowercase(); + self.nfa.state_mut(prev).set_next_state(b, next); + } else if b'a' <= b && b <= b'z' { + let b = b.to_ascii_uppercase(); + self.nfa.state_mut(prev).set_next_state(b, next); + } + } + prev = next; + } + } + // Once the pattern has been added, log the match in the final + // state that it reached. + self.nfa.state_mut(prev).add_match(pati, pat.len()); + } + Ok(()) + } + + /// This routine creates failure transitions according to the standard + /// textbook formulation of the Aho-Corasick algorithm. + /// + /// Building failure transitions is the most interesting part of building + /// the Aho-Corasick automaton, because they are what allow searches to + /// be performed in linear time. Specifically, a failure transition is + /// a single transition associated with each state that points back to + /// the longest proper suffix of the pattern being searched. The failure + /// transition is followed whenever there exists no transition on the + /// current state for the current input byte. If there is no other proper + /// suffix, then the failure transition points back to the starting state. + /// + /// For example, let's say we built an Aho-Corasick automaton with the + /// following patterns: 'abcd' and 'cef'. The trie looks like this: + /// + /// ```ignore + /// a - S1 - b - S2 - c - S3 - d - S4* + /// / + /// S0 - c - S5 - e - S6 - f - S7* + /// ``` + /// + /// At this point, it should be fairly straight-forward to see how this + /// trie can be used in a simplistic way. At any given position in the + /// text we're searching (called the "subject" string), all we need to do + /// is follow the transitions in the trie by consuming one transition for + /// each byte in the subject string. If we reach a match state, then we can + /// report that location as a match. + /// + /// The trick comes when searching a subject string like 'abcef'. We'll + /// initially follow the transition from S0 to S1 and wind up in S3 after + /// observng the 'c' byte. At this point, the next byte is 'e' but state + /// S3 has no transition for 'e', so the search fails. We then would need + /// to restart the search at the next position in 'abcef', which + /// corresponds to 'b'. The match would fail, but the next search starting + /// at 'c' would finally succeed. The problem with this approach is that + /// we wind up searching the subject string potentially many times. In + /// effect, this makes the algorithm have worst case `O(n * m)` complexity, + /// where `n ~ len(subject)` and `m ~ len(all patterns)`. We would instead + /// like to achieve a `O(n + m)` worst case complexity. + /// + /// This is where failure transitions come in. Instead of dying at S3 in + /// the first search, the automaton can instruct the search to move to + /// another part of the automaton that corresponds to a suffix of what + /// we've seen so far. Recall that we've seen 'abc' in the subject string, + /// and the automaton does indeed have a non-empty suffix, 'c', that could + /// potentially lead to another match. Thus, the actual Aho-Corasick + /// automaton for our patterns in this case looks like this: + /// + /// ```ignore + /// a - S1 - b - S2 - c - S3 - d - S4* + /// / / + /// / ---------------- + /// / / + /// S0 - c - S5 - e - S6 - f - S7* + /// ``` + /// + /// That is, we have a failure transition from S3 to S5, which is followed + /// exactly in cases when we are in state S3 but see any byte other than + /// 'd' (that is, we've "failed" to find a match in this portion of our + /// trie). We know we can transition back to S5 because we've already seen + /// a 'c' byte, so we don't need to re-scan it. We can then pick back up + /// with the search starting at S5 and complete our match. + /// + /// Adding failure transitions to a trie is fairly simple, but subtle. The + /// key issue is that you might have multiple failure transition that you + /// need to follow. For example, look at the trie for the patterns + /// 'abcd', 'b', 'bcd' and 'cd': + /// + /// ```ignore + /// - a - S1 - b - S2 - c - S3 - d - S4* + /// / + /// S0 - b - S5* - c - S6 - d - S7* + /// \ + /// - c - S8 - d - S9* + /// ``` + /// + /// The failure transitions for this trie are defined from S2 to S5, + /// S3 to S6 and S6 to S8. Moreover, state S2 needs to track that it + /// corresponds to a match, since its failure transition to S5 is itself + /// a match state. + /// + /// Perhaps simplest way to think about adding these failure transitions + /// is recursively. That is, if you know the failure transitions for every + /// possible previous state that could be visited (e.g., when computing the + /// failure transition for S3, you already know the failure transitions + /// for S0, S1 and S2), then you can simply follow the failure transition + /// of the previous state and check whether the incoming transition is + /// defined after following the failure transition. + /// + /// For example, when determining the failure state for S3, by our + /// assumptions, we already know that there is a failure transition from + /// S2 (the previous state) to S5. So we follow that transition and check + /// whether the transition connecting S2 to S3 is defined. Indeed, it is, + /// as there is a transition from S5 to S6 for the byte 'c'. If no such + /// transition existed, we could keep following the failure transitions + /// until we reach the start state, which is the failure transition for + /// every state that has no corresponding proper suffix. + /// + /// We don't actually use recursion to implement this, but instead, use a + /// breadth first search of the automaton. Our base case is the start + /// state, whose failure transition is just a transition to itself. + fn fill_failure_transitions_standard(&mut self) { + // Initialize the queue for breadth first search with all transitions + // out of the start state. We handle the start state specially because + // we only want to follow non-self transitions. If we followed self + // transitions, then this would never terminate. + let mut queue = VecDeque::new(); + for b in AllBytesIter::new() { + let next = self.nfa.start().next_state(b); + if next != self.nfa.start_id { + queue.push_back(next); + } + } + while let Some(id) = queue.pop_front() { + let mut it = self.nfa.iter_transitions_mut(id); + while let Some((b, next)) = it.next() { + queue.push_back(next); + + let mut fail = it.nfa().state(id).fail; + while it.nfa().state(fail).next_state(b) == fail_id() { + fail = it.nfa().state(fail).fail; + } + fail = it.nfa().state(fail).next_state(b); + it.nfa().state_mut(next).fail = fail; + it.nfa().copy_matches(fail, next); + } + // If the start state is a match state, then this automaton can + // match the empty string. This implies all states are match states + // since every position matches the empty string, so copy the + // matches from the start state to every state. Strictly speaking, + // this is only necessary for overlapping matches since each + // non-empty non-start match state needs to report empty matches + // in addition to its own. For the non-overlapping case, such + // states only report the first match, which is never empty since + // it isn't a start state. + it.nfa().copy_empty_matches(id); + } + } + + /// This routine is just like fill_failure_transitions_standard, except + /// it adds failure transitions in a way that preserves leftmost match + /// semantics (for both leftmost-first and leftmost-longest). + /// + /// The algorithms are so similar that it would be possible to write it + /// generically. But doing so without overhead would require a bit of + /// ceremony, so we just copy it and add in the extra leftmost logic. + /// Moreover, the standard algorithm above is so simple that it feels like + /// a crime to disturb it. + /// + /// In effect, this proceeds just like the standard approach, but we + /// specifically add only a subset of all failure transitions. Namely, we + /// only add failure transitions that either do not occur after a match + /// or failure transitions that do occur after a match but preserve the + /// match. The comments in the implementation below should help. + /// + /// N.B. The only differences in the automaton between leftmost-first and + /// leftmost-longest are in trie construction. Otherwise, both have exactly + /// the same set of failure transitions. leftmost-longest adds everything + /// to the trie, where as leftmost-first skips any patterns for which there + /// exists a prefix of it that was added earlier. + /// + /// N.B. I came up with this algorithm on my own, and after scouring all of + /// the other AC implementations I know of (Perl, Snort, many on GitHub). + /// I couldn't find any that implement leftmost semantics like this. + /// Perl of course needs leftmost-first semantics, but they implement it + /// with a seeming hack at *search* time instead of encoding it into the + /// automaton. There are also a couple Java libraries that support leftmost + /// longest semantics, but they do it by building a queue of matches at + /// search time, which is even worse than what Perl is doing. ---AG + fn fill_failure_transitions_leftmost(&mut self) { + /// Represents an item in our queue of states to process. + /// + /// Fundamentally, this queue serves the same purpose as the queue + /// for filling failure transitions using the standard formulation. + /// In the leftmost case, though, we need to track a bit more + /// information. See comments below. + #[derive(Clone, Copy, Debug)] + struct QueuedState { + /// The id of the state to visit. + id: S, + /// The depth at which the first match was observed in the path + /// to this state. Note that this corresponds to the depth at + /// which the beginning of the match was detected. If no match + /// has been seen, then this is None. + match_at_depth: Option, + } + + impl QueuedState { + /// Create a queued state corresponding to the given NFA's start + /// state. + fn start(nfa: &NFA) -> QueuedState { + let match_at_depth = + if nfa.start().is_match() { + Some(0) + } else { + None + }; + QueuedState { id: nfa.start_id, match_at_depth } + } + + /// Return the next state to queue up. The given id must be a state + /// corresponding to a single transition from this queued state. + fn next_queued_state( + &self, + nfa: &NFA, + id: S, + ) -> QueuedState { + let match_at_depth = self.next_match_at_depth(nfa, id); + QueuedState { id, match_at_depth } + } + + /// Return the earliest depth at which a match has occurred for + /// the given state. The given state must correspond to a single + /// transition from this queued state. + fn next_match_at_depth( + &self, + nfa: &NFA, + next: S, + ) -> Option { + // This is a little tricky. If the previous state has already + // seen a match or if `next` isn't a match state, then nothing + // needs to change since a later state cannot find an earlier + // match. + match self.match_at_depth { + Some(x) => return Some(x), + None if nfa.state(next).is_match() => {} + None => return None, + } + let depth = + nfa.state(next).depth + - nfa.state(next).get_longest_match_len().unwrap() + + 1; + Some(depth) + } + } + + // Initialize the queue for breadth first search with all transitions + // out of the start state. We handle the start state specially because + // we only want to follow non-self transitions. If we followed self + // transitions, then this would never terminate. + let mut queue: VecDeque> = VecDeque::new(); + let start = QueuedState::start(&self.nfa); + for b in AllBytesIter::new() { + let next = self.nfa.start().next_state(b); + if next != start.id { + queue.push_back(start.next_queued_state(&self.nfa, next)); + } + } + while let Some(item) = queue.pop_front() { + let mut any_trans = false; + let mut it = self.nfa.iter_transitions_mut(item.id); + while let Some((b, next_id)) = it.next() { + any_trans = true; + + // Queue up the next state. + let next = item.next_queued_state(it.nfa(), next_id); + queue.push_back(next); + + // Find the failure state for next. Same as standard. + let mut fail = it.nfa().state(item.id).fail; + while it.nfa().state(fail).next_state(b) == fail_id() { + fail = it.nfa().state(fail).fail; + } + fail = it.nfa().state(fail).next_state(b); + + // This is the key difference from the standard formulation. + // Namely, if we've seen a match, then we only want a failure + // transition if the failure transition preserves the match + // we've seen. In general, this is not true of all failure + // transitions since they can point back to any suffix of what + // we've seen so far. Instead, we only want to point back to + // suffixes that contain any match we've seen. + // + // We achieve this by comparing the depth of the failure + // transition with the number of states between this state + // and the beginning of the earliest match detected. If the + // depth of the failure state is smaller than this difference, + // then it cannot contain the match. If it's bigger or equal + // to the difference, then it necessarily includes the match + // we've seen since all failure transitions correspond to a + // suffix. + // + // If we've determined that we don't want the failure + // transition, then we set this state's failure transition to + // the dead state. In other words, when a search hits this + // state, it will not continue and correctly stop. (N.B. A + // dead state is different than a fail state. A dead state + // MUST be preceded by a match and acts as a sentinel to search + // routines to terminate.) + // + // Understanding this is tricky, and it took me several days + // to think through this and get it right. If you want to grok + // it, then I'd recommend: 1) switch the implementation to + // always use the standard algorithm for filling in failure + // transitions, 2) run the test suite and 3) examine the test + // failures. Write out the automatons for them and try to work + // backwards by figuring out which failure transitions should + // be removed. You should arrive at the same rule used below. + if let Some(match_depth) = next.match_at_depth { + let fail_depth = it.nfa().state(fail).depth; + let next_depth = it.nfa().state(next.id).depth; + if next_depth - match_depth + 1 > fail_depth { + it.nfa().state_mut(next.id).fail = dead_id(); + continue; + } + } + it.nfa().state_mut(next.id).fail = fail; + it.nfa().copy_matches(fail, next.id); + } + // If there are no transitions for this state and if it's a match + // state, then we must set its failure transition to the dead + // state since we never want it to restart the search. + if !any_trans && it.nfa().state(item.id).is_match() { + it.nfa().state_mut(item.id).fail = dead_id(); + } + // We don't need to copy empty matches from the start state here + // because that's only necessary for overlapping matches and + // leftmost match kinds don't support overlapping matches. + } + } + + /// Construct prefilters from the automaton, if applicable. + fn build_prefilters(&mut self) { + if !self.builder.prefilter { + return; + } + + let mut builder = prefilter::StartBytesBuilder::new(); + for b in AllBytesIter::new() { + if self.nfa.start().next_state(b) != self.nfa.start_id { + builder.add(b); + } + } + self.nfa.prefilter = builder.build(); + } + + /// Set the failure transitions on the start state to loop back to the + /// start state. This effectively permits the Aho-Corasick automaton to + /// match at any position. This is also required for finding the next + /// state to terminate, namely, finding the next state should never return + /// a fail_id. + /// + /// This must be done after building the initial trie, since trie + /// construction depends on transitions to `fail_id` to determine whether a + /// state already exists or not. + fn add_start_state_loop(&mut self) { + let start_id = self.nfa.start_id; + let start = self.nfa.start_mut(); + for b in AllBytesIter::new() { + if start.next_state(b) == fail_id() { + start.set_next_state(b, start_id); + } + } + } + + /// Remove the start state loop by rewriting any transitions on the start + /// state back to the start state with transitions to the dead state. + /// + /// The loop is only closed when two conditions are met: the start state + /// is a match state and the match kind is leftmost-first or + /// leftmost-longest. + /// + /// The reason for this is that under leftmost semantics, a start state + /// that is also a match implies that we should never restart the search + /// process. We allow normal transitions out of the start state, but if + /// none exist, we transition to the dead state, which signals that + /// searching should stop. + fn close_start_state_loop(&mut self) { + if self.match_kind().is_leftmost() && self.nfa.start().is_match() { + let start_id = self.nfa.start_id; + let start = self.nfa.start_mut(); + for b in AllBytesIter::new() { + if start.next_state(b) == start_id { + start.set_next_state(b, dead_id()); + } + } + } + } + + /// Sets all transitions on the dead state to point back to the dead state. + /// Normally, missing transitions map back to the failure state, but the + /// point of the dead state is to act as a sink that can never be escaped. + fn add_dead_state_loop(&mut self) { + let dead = self.nfa.state_mut(dead_id()); + for b in AllBytesIter::new() { + dead.set_next_state(b, dead_id()); + } + } + + /// Computes the total amount of heap used by this NFA in bytes. + fn calculate_size(&mut self) { + let mut size = 0; + for state in &self.nfa.states { + size += state.heap_bytes(); + } + self.nfa.heap_bytes = size; + } + + /// Add a new state to the underlying NFA with the given depth. The depth + /// is used to determine how to represent the transitions. + /// + /// If adding the new state would overflow the chosen state ID + /// representation, then this returns an error. + fn add_state(&mut self, depth: usize) -> Result { + if depth < self.builder.dense_depth { + self.nfa.add_dense_state(depth) + } else { + self.nfa.add_sparse_state(depth) + } + } + + /// Returns the match kind configured on the underlying builder. + fn match_kind(&self) -> MatchKind { + self.builder.match_kind + } +} + +/// An iterator over every byte value. +/// +/// We use this instead of (0..256).map(|b| b as u8) because this optimizes +/// better in debug builds. +/// +/// We also use this instead of 0..=255 because we're targeting Rust 1.24 and +/// inclusive range syntax was stabilized in Rust 1.26. We can get rid of this +/// once our MSRV is Rust 1.26 or newer. +#[derive(Debug)] +struct AllBytesIter(u16); + +impl AllBytesIter { + fn new() -> AllBytesIter { + AllBytesIter(0) + } +} + +impl Iterator for AllBytesIter { + type Item = u8; + + fn next(&mut self) -> Option { + if self.0 >= 256 { + None + } else { + let b = self.0 as u8; + self.0 += 1; + Some(b) + } + } +} + +impl fmt::Debug for NFA { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + writeln!(f, "NFA(")?; + writeln!(f, "match_kind: {:?}", self.match_kind)?; + writeln!(f, "{}", "-".repeat(79))?; + for (id, s) in self.states.iter().enumerate() { + let mut trans = vec![]; + s.trans.iter(|byte, next| { + // The start state has a bunch of uninteresting transitions + // back into itself. It's questionable to hide them since they + // are critical to understanding the automaton, but they are + // very noisy without better formatting for contiugous ranges + // to the same state. + if id == self.start_id.to_usize() && next == self.start_id { + return; + } + // Similarly, the dead state has a bunch of uninteresting + // transitions too. + if id == dead_id() { + return; + } + trans.push(format!("{} => {}", escape(byte), next.to_usize())); + }); + writeln!(f, "{:04}: {}", id, trans.join(", "))?; + + let matches: Vec = s.matches + .iter() + .map(|&(pattern_id, _)| pattern_id.to_string()) + .collect(); + writeln!(f, " matches: {}", matches.join(", "))?; + writeln!(f, " fail: {}", s.fail.to_usize())?; + writeln!(f, " depth: {}", s.depth)?; + } + writeln!(f, "{}", "-".repeat(79))?; + writeln!(f, ")")?; + Ok(()) + } +} + +/// Iterate over all possible byte transitions given a sparse set. +fn sparse_iter(trans: &[(u8, S)], mut f: F) { + let mut byte = 0u16; + for &(b, id) in trans { + while byte < (b as u16) { + f(byte as u8, fail_id()); + byte += 1; + } + f(b, id); + byte += 1; + } + for b in byte..256 { + f(b as u8, fail_id()); + } +} + +/// Safely return two mutable borrows to two different locations in the given +/// slice. +/// +/// This panics if i == j. +fn get_two_mut(xs: &mut [T], i: usize, j: usize) -> (&mut T, &mut T) { + assert!(i != j, "{} must not be equal to {}", i, j); + if i < j { + let (before, after) = xs.split_at_mut(j); + (&mut before[i], &mut after[0]) + } else { + let (before, after) = xs.split_at_mut(i); + (&mut after[0], &mut before[j]) + } +} + +/// Return the given byte as its escaped string form. +fn escape(b: u8) -> String { + use std::ascii; + + String::from_utf8(ascii::escape_default(b).collect::>()).unwrap() +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn scratch() { + let nfa: NFA = Builder::new() + .dense_depth(0) + // .match_kind(MatchKind::LeftmostShortest) + .match_kind(MatchKind::LeftmostLongest) + // .build(&["abcd", "ce", "b"]) + // .build(&["ab", "bc"]) + // .build(&["b", "bcd", "ce"]) + // .build(&["abc", "bx"]) + // .build(&["abc", "bd", "ab"]) + // .build(&["abcdefghi", "hz", "abcdefgh"]) + // .build(&["abcd", "bce", "b"]) + .build(&["a", "ababcde"]) + .unwrap(); + println!("{:?}", nfa); + } +} diff --git a/vendor/aho-corasick/src/prefilter.rs b/vendor/aho-corasick/src/prefilter.rs new file mode 100644 index 0000000000..d3e830d759 --- /dev/null +++ b/vendor/aho-corasick/src/prefilter.rs @@ -0,0 +1,251 @@ +use std::fmt; +use std::panic::{RefUnwindSafe, UnwindSafe}; + +use memchr::{memchr, memchr2, memchr3}; + +/// A prefilter describes the behavior of fast literal scanners for quickly +/// skipping past bytes in the haystack that we know cannot possibly +/// participate in a match. +pub trait Prefilter: Send + Sync + RefUnwindSafe + UnwindSafe + fmt::Debug { + /// Returns the next possible match candidate. This may yield false + /// positives, so callers must "confirm" a match starting at the position + /// returned. This, however, must never produce false negatives. That is, + /// this must, at minimum, return the starting position of the next match + /// in the given haystack after or at the given position. + fn next_candidate(&self, haystack: &[u8], at: usize) -> Option; + + /// A method for cloning a prefilter, to work-around the fact that Clone + /// is not object-safe. + fn clone_prefilter(&self) -> Box; +} + +/// A convenience object for representing any type that implements Prefilter +/// and is cloneable. +#[derive(Debug)] +pub struct PrefilterObj(Box); + +impl Clone for PrefilterObj { + fn clone(&self) -> Self { + PrefilterObj(self.0.clone_prefilter()) + } +} + +impl PrefilterObj { + /// Create a new prefilter object. + pub fn new(t: T) -> PrefilterObj { + PrefilterObj(Box::new(t)) + } + + /// Return the underlying prefilter trait object. + pub fn as_ref(&self) -> &Prefilter { + &*self.0 + } +} + +/// PrefilterState tracks state associated with the effectiveness of a +/// prefilter. It is used to track how many bytes, on average, are skipped by +/// the prefilter. If this average dips below a certain threshold over time, +/// then the state renders the prefilter inert and stops using it. +/// +/// A prefilter state should be created for each search. (Where creating an +/// iterator via, e.g., `find_iter`, is treated as a single search.) +#[derive(Clone, Debug)] +pub struct PrefilterState { + /// The number of skips that has been executed. + skips: usize, + /// The total number of bytes that have been skipped. + skipped: usize, + /// The maximum length of a match. This is used to help determine how many + /// bytes on average should be skipped in order for a prefilter to be + /// effective. + max_match_len: usize, + /// Once this heuristic has been deemed ineffective, it will be inert + /// throughout the rest of its lifetime. This serves as a cheap way to + /// check inertness. + inert: bool, +} + +impl PrefilterState { + /// The minimum number of skip attempts to try before considering whether + /// a prefilter is effective or not. + const MIN_SKIPS: usize = 40; + + /// The minimum amount of bytes that skipping must average, expressed as + /// a factor of the multiple of the length of a possible match. + /// + /// That is, after MIN_SKIPS have occurred, if the average number of bytes + /// skipped ever falls below MIN_AVG_FACTOR, then this searcher is rendered + /// inert. + const MIN_AVG_FACTOR: usize = 2; + + /// Create a fresh prefilter state. + pub fn new(max_match_len: usize) -> PrefilterState { + PrefilterState { skips: 0, skipped: 0, max_match_len, inert: false } + } + + /// Update this state with the number of bytes skipped on the last + /// invocation of the prefilter. + #[inline] + pub fn update(&mut self, skipped: usize) { + self.skips += 1; + self.skipped += skipped; + } + + /// Return true if and only if this state indicates that a prefilter is + /// still effective. + #[inline] + pub fn is_effective(&mut self) -> bool { + if self.inert { + return false; + } + if self.skips < PrefilterState::MIN_SKIPS { + return true; + } + + let min_avg = PrefilterState::MIN_AVG_FACTOR * self.max_match_len; + if self.skipped >= min_avg * self.skips { + return true; + } + + // We're inert. + self.inert = true; + false + } +} + +/// A builder for construction a starting byte prefilter. +/// +/// A starting byte prefilter is a simplistic prefilter that looks for possible +/// matches by reporting all positions corresponding to a particular byte. This +/// generally only takes affect when there are at most 3 distinct possible +/// starting bytes. e.g., the patterns `foo`, `bar`, and `baz` have two +/// distinct starting bytes (`f` and `b`), and this prefiler returns all +/// occurrences of either `f` or `b`. +/// +/// In some cases, a heuristic frequency analysis may determine that it would +/// be better not to use this prefilter even when there are 3 or fewer distinct +/// starting bytes. +#[derive(Clone, Debug)] +pub struct StartBytesBuilder { + byteset: Vec, +} + +impl StartBytesBuilder { + /// Create a new builder for constructing a start byte prefilter. + pub fn new() -> StartBytesBuilder { + StartBytesBuilder { byteset: vec![false; 256] } + } + + /// Build the starting bytes prefilter. + /// + /// If there are more than 3 distinct starting bytes, or if heuristics + /// otherwise determine that this prefilter should not be used, then `None` + /// is returned. + pub fn build(&self) -> Option { + let (mut bytes, mut len) = ([0; 3], 0); + for b in 0..256 { + if !self.byteset[b] { + continue; + } + // We've exceeded our limit, so bail. + if len == 3 { + return None; + } + // We don't handle non-ASCII bytes for now. Getting non-ASCII + // bytes right is trickier, since we generally don't want to put + // a leading UTF-8 code unit into a prefilter that isn't ASCII, + // since they can frequently. Instead, it would be better to use a + // continuation byte, but this requires more sophisticated analysis + // of the automaton and a richer prefilter API. + if b > 0x7F { + return None; + } + bytes[len] = b as u8; + len += 1; + } + match len { + 0 => None, + 1 => { + Some(PrefilterObj::new(StartBytesOne { + byte1: bytes[0], + })) + } + 2 => { + Some(PrefilterObj::new(StartBytesTwo { + byte1: bytes[0], + byte2: bytes[1], + })) + } + 3 => { + Some(PrefilterObj::new(StartBytesThree { + byte1: bytes[0], + byte2: bytes[1], + byte3: bytes[2], + })) + } + _ => unreachable!(), + } + } + + /// Add a starting byte to this builder. + /// + /// In general, all possible starting bytes for an automaton should be + /// added to this builder before attempting to construct the prefilter. + pub fn add(&mut self, byte: u8) { + self.byteset[byte as usize] = true; + } +} + +/// A prefilter for scanning for a single starting byte. +#[derive(Clone, Debug)] +pub struct StartBytesOne { + byte1: u8, +} + +impl Prefilter for StartBytesOne { + fn next_candidate(&self, haystack: &[u8], at: usize) -> Option { + memchr(self.byte1, &haystack[at..]) + .map(|i| at + i) + } + + fn clone_prefilter(&self) -> Box { + Box::new(self.clone()) + } +} + +/// A prefilter for scanning for two starting bytes. +#[derive(Clone, Debug)] +pub struct StartBytesTwo { + byte1: u8, + byte2: u8, +} + +impl Prefilter for StartBytesTwo { + fn next_candidate(&self, haystack: &[u8], at: usize) -> Option { + memchr2(self.byte1, self.byte2, &haystack[at..]) + .map(|i| at + i) + } + + fn clone_prefilter(&self) -> Box { + Box::new(self.clone()) + } +} + +/// A prefilter for scanning for three starting bytes. +#[derive(Clone, Debug)] +pub struct StartBytesThree { + byte1: u8, + byte2: u8, + byte3: u8, +} + +impl Prefilter for StartBytesThree { + fn next_candidate(&self, haystack: &[u8], at: usize) -> Option { + memchr3(self.byte1, self.byte2, self.byte3, &haystack[at..]) + .map(|i| at + i) + } + + fn clone_prefilter(&self) -> Box { + Box::new(self.clone()) + } +} diff --git a/vendor/aho-corasick/src/state_id.rs b/vendor/aho-corasick/src/state_id.rs new file mode 100644 index 0000000000..c7011f17e5 --- /dev/null +++ b/vendor/aho-corasick/src/state_id.rs @@ -0,0 +1,166 @@ +use std::fmt::Debug; +use std::hash::Hash; + +use error::{Error, Result}; + +// NOTE: Most of this code was copied from regex-automata, but without the +// (de)serialization specific stuff. + +/// Check that the premultiplication of the given state identifier can +/// fit into the representation indicated by `S`. If it cannot, or if it +/// overflows `usize` itself, then an error is returned. +pub fn premultiply_overflow_error( + last_state: S, + alphabet_len: usize, +) -> Result<()> { + let requested = match last_state.to_usize().checked_mul(alphabet_len) { + Some(requested) => requested, + None => return Err(Error::premultiply_overflow(0, 0)), + }; + if requested > S::max_id() { + return Err(Error::premultiply_overflow(S::max_id(), requested)); + } + Ok(()) +} + +/// Convert the given `usize` to the chosen state identifier +/// representation. If the given value cannot fit in the chosen +/// representation, then an error is returned. +pub fn usize_to_state_id(value: usize) -> Result { + if value > S::max_id() { + Err(Error::state_id_overflow(S::max_id())) + } else { + Ok(S::from_usize(value)) + } +} + +/// Return the unique identifier for an automaton's fail state in the chosen +/// representation indicated by `S`. +pub fn fail_id() -> S { + S::from_usize(0) +} + +/// Return the unique identifier for an automaton's fail state in the chosen +/// representation indicated by `S`. +pub fn dead_id() -> S { + S::from_usize(1) +} + +mod private { + /// Sealed stops crates other than aho-corasick from implementing any + /// traits that use it. + pub trait Sealed{} + impl Sealed for u8 {} + impl Sealed for u16 {} + impl Sealed for u32 {} + impl Sealed for u64 {} + impl Sealed for usize {} +} + +/// A trait describing the representation of an automaton's state identifier. +/// +/// The purpose of this trait is to safely express both the possible state +/// identifier representations that can be used in an automaton and to convert +/// between state identifier representations and types that can be used to +/// efficiently index memory (such as `usize`). +/// +/// In general, one should not need to implement this trait explicitly. Indeed, +/// for now, this trait is sealed such that it cannot be implemented by any +/// other type. In particular, this crate provides implementations for `u8`, +/// `u16`, `u32`, `u64` and `usize`. (`u32` and `u64` are only provided for +/// targets that can represent all corresponding values in a `usize`.) +/// +/// # Safety +/// +/// This trait is unsafe because the correctness of its implementations may be +/// relied upon by other unsafe code. For example, one possible way to +/// implement this trait incorrectly would be to return a maximum identifier +/// in `max_id` that is greater than the real maximum identifier. This will +/// likely result in wrap-on-overflow semantics in release mode, which can in +/// turn produce incorrect state identifiers. Those state identifiers may then +/// in turn access out-of-bounds memory in an automaton's search routine, where +/// bounds checks are explicitly elided for performance reasons. +pub unsafe trait StateID: + private::Sealed + + Clone + Copy + Debug + Eq + Hash + PartialEq + PartialOrd + Ord +{ + /// Convert from a `usize` to this implementation's representation. + /// + /// Implementors may assume that `n <= Self::max_id`. That is, implementors + /// do not need to check whether `n` can fit inside this implementation's + /// representation. + fn from_usize(n: usize) -> Self; + + /// Convert this implementation's representation to a `usize`. + /// + /// Implementors must not return a `usize` value greater than + /// `Self::max_id` and must not permit overflow when converting between the + /// implementor's representation and `usize`. In general, the preferred + /// way for implementors to achieve this is to simply not provide + /// implementations of `StateID` that cannot fit into the target platform's + /// `usize`. + fn to_usize(self) -> usize; + + /// Return the maximum state identifier supported by this representation. + /// + /// Implementors must return a correct bound. Doing otherwise may result + /// in memory unsafety. + fn max_id() -> usize; +} + +unsafe impl StateID for usize { + #[inline] + fn from_usize(n: usize) -> usize { n } + + #[inline] + fn to_usize(self) -> usize { self } + + #[inline] + fn max_id() -> usize { ::std::usize::MAX } +} + +unsafe impl StateID for u8 { + #[inline] + fn from_usize(n: usize) -> u8 { n as u8 } + + #[inline] + fn to_usize(self) -> usize { self as usize } + + #[inline] + fn max_id() -> usize { ::std::u8::MAX as usize } +} + +unsafe impl StateID for u16 { + #[inline] + fn from_usize(n: usize) -> u16 { n as u16 } + + #[inline] + fn to_usize(self) -> usize { self as usize } + + #[inline] + fn max_id() -> usize { ::std::u16::MAX as usize } +} + +#[cfg(any(target_pointer_width = "32", target_pointer_width = "64"))] +unsafe impl StateID for u32 { + #[inline] + fn from_usize(n: usize) -> u32 { n as u32 } + + #[inline] + fn to_usize(self) -> usize { self as usize } + + #[inline] + fn max_id() -> usize { ::std::u32::MAX as usize } +} + +#[cfg(target_pointer_width = "64")] +unsafe impl StateID for u64 { + #[inline] + fn from_usize(n: usize) -> u64 { n as u64 } + + #[inline] + fn to_usize(self) -> usize { self as usize } + + #[inline] + fn max_id() -> usize { ::std::u64::MAX as usize } +} diff --git a/vendor/aho-corasick/src/tests.rs b/vendor/aho-corasick/src/tests.rs new file mode 100644 index 0000000000..e3233a6a21 --- /dev/null +++ b/vendor/aho-corasick/src/tests.rs @@ -0,0 +1,694 @@ +use std::collections::HashMap; +use std::io; +use std::usize; + +use {AhoCorasickBuilder, Match, MatchKind}; + +/// A description of a single test against an Aho-Corasick automaton. +/// +/// A single test may not necessarily pass on every configuration of an +/// Aho-Corasick automaton. The tests are categorized and grouped appropriately +/// below. +#[derive(Clone, Debug, Eq, PartialEq)] +struct SearchTest { + /// The name of this test, for debugging. + name: &'static str, + /// The patterns to search for. + patterns: &'static [&'static str], + /// The text to search. + haystack: &'static str, + /// Each match is a triple of (pattern_index, start, end), where + /// pattern_index is an index into `patterns` and `start`/`end` are indices + /// into `haystack`. + matches: &'static [(usize, usize, usize)], +} + +/// Short-hand constructor for SearchTest. We use it a lot below. +macro_rules! t { + ($name:ident, $patterns:expr, $haystack:expr, $matches:expr) => { + SearchTest { + name: stringify!($name), + patterns: $patterns, + haystack: $haystack, + matches: $matches, + } + } +} + +/// A collection of test groups. +type TestCollection = &'static [&'static [SearchTest]]; + +// Define several collections corresponding to the different type of match +// semantics supported by Aho-Corasick. These collections have some overlap, +// but each collection should have some tests that no other collection has. + +/// Tests for Aho-Corasick's standard non-overlapping match semantics. +const AC_STANDARD_NON_OVERLAPPING: TestCollection = &[ + BASICS, NON_OVERLAPPING, STANDARD, REGRESSION, +]; + +/// Tests for Aho-Corasick's standard overlapping match semantics. +const AC_STANDARD_OVERLAPPING: TestCollection = &[ + BASICS, OVERLAPPING, REGRESSION, +]; + +/// Tests for Aho-Corasick's leftmost-first match semantics. +const AC_LEFTMOST_FIRST: TestCollection = &[ + BASICS, NON_OVERLAPPING, LEFTMOST, LEFTMOST_FIRST, REGRESSION, +]; + +/// Tests for Aho-Corasick's leftmost-longest match semantics. +const AC_LEFTMOST_LONGEST: TestCollection = &[ + BASICS, NON_OVERLAPPING, LEFTMOST, LEFTMOST_LONGEST, REGRESSION, +]; + +// Now define the individual tests that make up the collections above. + +/// A collection of tests for the Aho-Corasick algorithm that should always be +/// true regardless of match semantics. That is, all combinations of +/// leftmost-{shortest, first, longest} x {overlapping, non-overlapping} +/// should produce the same answer. +const BASICS: &'static [SearchTest] = &[ + t!(basic000, &["a"], "", &[]), + t!(basic010, &["a"], "a", &[(0, 0, 1)]), + t!(basic020, &["a"], "aa", &[(0, 0, 1), (0, 1, 2)]), + t!(basic030, &["a"], "aaa", &[(0, 0, 1), (0, 1, 2), (0, 2, 3)]), + t!(basic040, &["a"], "aba", &[(0, 0, 1), (0, 2, 3)]), + t!(basic050, &["a"], "bba", &[(0, 2, 3)]), + t!(basic060, &["a"], "bbb", &[]), + t!(basic070, &["a"], "bababbbba", &[(0, 1, 2), (0, 3, 4), (0, 8, 9)]), + + t!(basic100, &["aa"], "", &[]), + t!(basic110, &["aa"], "aa", &[(0, 0, 2)]), + t!(basic120, &["aa"], "aabbaa", &[(0, 0, 2), (0, 4, 6)]), + t!(basic130, &["aa"], "abbab", &[]), + t!(basic140, &["aa"], "abbabaa", &[(0, 5, 7)]), + + t!(basic200, &["abc"], "abc", &[(0, 0, 3)]), + t!(basic210, &["abc"], "zazabzabcz", &[(0, 6, 9)]), + t!(basic220, &["abc"], "zazabczabcz", &[(0, 3, 6), (0, 7, 10)]), + + t!(basic300, &["a", "b"], "", &[]), + t!(basic310, &["a", "b"], "z", &[]), + t!(basic320, &["a", "b"], "b", &[(1, 0, 1)]), + t!(basic330, &["a", "b"], "a", &[(0, 0, 1)]), + t!(basic340, &["a", "b"], "abba", &[ + (0, 0, 1), (1, 1, 2), (1, 2, 3), (0, 3, 4), + ]), + t!(basic350, &["b", "a"], "abba", &[ + (1, 0, 1), (0, 1, 2), (0, 2, 3), (1, 3, 4), + ]), + t!(nover360, &["abc", "bc"], "xbc", &[ + (1, 1, 3), + ]), + + t!(basic400, &["foo", "bar"], "", &[]), + t!(basic410, &["foo", "bar"], "foobar", &[ + (0, 0, 3), (1, 3, 6), + ]), + t!(basic420, &["foo", "bar"], "barfoo", &[ + (1, 0, 3), (0, 3, 6), + ]), + t!(basic430, &["foo", "bar"], "foofoo", &[ + (0, 0, 3), (0, 3, 6), + ]), + t!(basic440, &["foo", "bar"], "barbar", &[ + (1, 0, 3), (1, 3, 6), + ]), + t!(basic450, &["foo", "bar"], "bafofoo", &[ + (0, 4, 7), + ]), + t!(basic460, &["bar", "foo"], "bafofoo", &[ + (1, 4, 7), + ]), + t!(basic470, &["foo", "bar"], "fobabar", &[ + (1, 4, 7), + ]), + t!(basic480, &["bar", "foo"], "fobabar", &[ + (0, 4, 7), + ]), + + t!(basic600, &[""], "", &[(0, 0, 0)]), + t!(basic610, &[""], "a", &[(0, 0, 0), (0, 1, 1)]), + t!(basic620, &[""], "abc", &[(0, 0, 0), (0, 1, 1), (0, 2, 2), (0, 3, 3)]), + + t!(basic700, &["yabcdef", "abcdezghi"], "yabcdefghi", &[ + (0, 0, 7), + ]), + t!(basic710, &["yabcdef", "abcdezghi"], "yabcdezghi", &[ + (1, 1, 10), + ]), + t!(basic720, &["yabcdef", "bcdeyabc", "abcdezghi"], "yabcdezghi", &[ + (2, 1, 10), + ]), +]; + +/// Tests for non-overlapping standard match semantics. +/// +/// These tests generally shouldn't pass for leftmost-{first,longest}, although +/// some do in order to write clearer tests. For example, standard000 will +/// pass with leftmost-first semantics, but standard010 will not. We write +/// both to emphasize how the match semantics work. +const STANDARD: &'static [SearchTest] = &[ + t!(standard000, &["ab", "abcd"], "abcd", &[(0, 0, 2)]), + t!(standard010, &["abcd", "ab"], "abcd", &[(1, 0, 2)]), + t!(standard020, &["abcd", "ab", "abc"], "abcd", &[(1, 0, 2)]), + t!(standard030, &["abcd", "abc", "ab"], "abcd", &[(2, 0, 2)]), + t!(standard040, &["a", ""], "a", &[(1, 0, 0), (1, 1, 1)]), + + t!(standard400, &["abcd", "bcd", "cd", "b"], "abcd", &[ + (3, 1, 2), (2, 2, 4), + ]), + t!(standard410, &["", "a"], "a", &[ + (0, 0, 0), (0, 1, 1), + ]), + t!(standard420, &["", "a"], "aa", &[ + (0, 0, 0), (0, 1, 1), (0, 2, 2), + ]), + t!(standard430, &["", "a", ""], "a", &[ + (0, 0, 0), (0, 1, 1), + ]), + t!(standard440, &["a", "", ""], "a", &[ + (1, 0, 0), (1, 1, 1), + ]), + t!(standard450, &["", "", "a"], "a", &[ + (0, 0, 0), (0, 1, 1), + ]), +]; + +/// Tests for non-overlapping leftmost match semantics. These should pass for +/// both leftmost-first and leftmost-longest match kinds. Stated differently, +/// among ambiguous matches, the longest match and the match that appeared +/// first when constructing the automaton should always be the same. +const LEFTMOST: &'static [SearchTest] = &[ + t!(leftmost000, &["ab", "ab"], "abcd", &[(0, 0, 2)]), + t!(leftmost010, &["a", ""], "a", &[(0, 0, 1), (1, 1, 1)]), + t!(leftmost020, &["", ""], "a", &[(0, 0, 0), (0, 1, 1)]), + + t!(leftmost300, &["abcd", "bce", "b"], "abce", &[(1, 1, 4)]), + t!(leftmost310, &["abcd", "ce", "bc"], "abce", &[(2, 1, 3)]), + t!(leftmost320, &["abcd", "bce", "ce", "b"], "abce", &[(1, 1, 4)]), + t!(leftmost330, &["abcd", "bce", "cz", "bc"], "abcz", &[(3, 1, 3)]), + t!(leftmost340, &["bce", "cz", "bc"], "bcz", &[(2, 0, 2)]), + t!(leftmost350, &["abc", "bd", "ab"], "abd", &[(2, 0, 2)]), + t!(leftmost360, &["abcdefghi", "hz", "abcdefgh"], "abcdefghz", &[ + (2, 0, 8), + ]), + t!(leftmost370, &["abcdefghi", "cde", "hz", "abcdefgh"], "abcdefghz", &[ + (3, 0, 8), + ]), + t!(leftmost380, &["abcdefghi", "hz", "abcdefgh", "a"], "abcdefghz", &[ + (2, 0, 8), + ]), + t!(leftmost390, &["b", "abcdefghi", "hz", "abcdefgh"], "abcdefghz", &[ + (3, 0, 8), + ]), + t!(leftmost400, &["h", "abcdefghi", "hz", "abcdefgh"], "abcdefghz", &[ + (3, 0, 8), + ]), + t!(leftmost410, &["z", "abcdefghi", "hz", "abcdefgh"], "abcdefghz", &[ + (3, 0, 8), (0, 8, 9), + ]), +]; + +/// Tests for non-overlapping leftmost-first match semantics. These tests +/// should generally be specific to leftmost-first, which means they should +/// generally fail under leftmost-longest semantics. +const LEFTMOST_FIRST: &'static [SearchTest] = &[ + t!(leftfirst000, &["ab", "abcd"], "abcd", &[(0, 0, 2)]), + t!(leftfirst010, &["", "a"], "a", &[(0, 0, 0), (0, 1, 1)]), + t!(leftfirst011, &["", "a", ""], "a", &[ + (0, 0, 0), (0, 1, 1), + ]), + t!(leftfirst012, &["a", "", ""], "a", &[ + (0, 0, 1), (1, 1, 1), + ]), + t!(leftfirst013, &["", "", "a"], "a", &[ + (0, 0, 0), (0, 1, 1), + ]), + t!(leftfirst020, &["abcd", "ab"], "abcd", &[(0, 0, 4)]), + t!(leftfirst030, &["ab", "ab"], "abcd", &[(0, 0, 2)]), + + t!(leftlong100, &["abcdefg", "bcde", "bcdef"], "abcdef", &[(1, 1, 5)]), + t!(leftlong110, &["abcdefg", "bcdef", "bcde"], "abcdef", &[(1, 1, 6)]), + + t!(leftfirst300, &["abcd", "b", "bce"], "abce", &[(1, 1, 2)]), + t!(leftfirst310, &["abcd", "b", "bce", "ce"], "abce", &[ + (1, 1, 2), (3, 2, 4), + ]), + t!(leftfirst320, &["a", "abcdefghi", "hz", "abcdefgh"], "abcdefghz", &[ + (0, 0, 1), (2, 7, 9), + ]), + t!(leftfirst330, &["a", "abab"], "abab", &[(0, 0, 1), (0, 2, 3)]), +]; + +/// Tests for non-overlapping leftmost-longest match semantics. These tests +/// should generally be specific to leftmost-longest, which means they should +/// generally fail under leftmost-first semantics. +const LEFTMOST_LONGEST: &'static [SearchTest] = &[ + t!(leftlong000, &["ab", "abcd"], "abcd", &[(1, 0, 4)]), + t!(leftlong010, &["abcd", "bcd", "cd", "b"], "abcd", &[ + (0, 0, 4), + ]), + t!(leftlong020, &["", "a"], "a", &[ + (1, 0, 1), (0, 1, 1), + ]), + t!(leftlong021, &["", "a", ""], "a", &[ + (1, 0, 1), (0, 1, 1), + ]), + t!(leftlong022, &["a", "", ""], "a", &[ + (0, 0, 1), (1, 1, 1), + ]), + t!(leftlong023, &["", "", "a"], "a", &[ + (2, 0, 1), (0, 1, 1), + ]), + t!(leftlong030, &["", "a"], "aa", &[ + (1, 0, 1), (1, 1, 2), (0, 2, 2), + ]), + t!(leftlong040, &["a", "ab"], "a", &[(0, 0, 1)]), + t!(leftlong050, &["a", "ab"], "ab", &[(1, 0, 2)]), + t!(leftlong060, &["ab", "a"], "a", &[(1, 0, 1)]), + t!(leftlong070, &["ab", "a"], "ab", &[(0, 0, 2)]), + + t!(leftlong100, &["abcdefg", "bcde", "bcdef"], "abcdef", &[(2, 1, 6)]), + t!(leftlong110, &["abcdefg", "bcdef", "bcde"], "abcdef", &[(1, 1, 6)]), + + t!(leftlong300, &["abcd", "b", "bce"], "abce", &[(2, 1, 4)]), + t!(leftlong310, &["a", "abcdefghi", "hz", "abcdefgh"], "abcdefghz", &[ + (3, 0, 8), + ]), + t!(leftlong320, &["a", "abab"], "abab", &[(1, 0, 4)]), + t!(leftlong330, &["abcd", "b", "ce"], "abce", &[ + (1, 1, 2), (2, 2, 4), + ]), +]; + +/// Tests for non-overlapping match semantics. +/// +/// Generally these tests shouldn't pass when using overlapping semantics. +/// These should pass for both standard and leftmost match semantics. +const NON_OVERLAPPING: &'static [SearchTest] = &[ + t!(nover010, &["abcd", "bcd", "cd"], "abcd", &[ + (0, 0, 4), + ]), + t!(nover020, &["bcd", "cd", "abcd"], "abcd", &[ + (2, 0, 4), + ]), + t!(nover030, &["abc", "bc"], "zazabcz", &[ + (0, 3, 6), + ]), + + t!(nover100, &["ab", "ba"], "abababa", &[ + (0, 0, 2), (0, 2, 4), (0, 4, 6), + ]), + + t!(nover200, &["foo", "foo"], "foobarfoo", &[ + (0, 0, 3), (0, 6, 9), + ]), + + t!(nover300, &["", ""], "", &[ + (0, 0, 0), + ]), + t!(nover310, &["", ""], "a", &[ + (0, 0, 0), (0, 1, 1), + ]), +]; + +/// Tests for overlapping match semantics. +/// +/// This only supports standard match semantics, since leftmost-{first,longest} +/// do not support overlapping matches. +const OVERLAPPING: &'static [SearchTest] = &[ + t!(over000, &["abcd", "bcd", "cd", "b"], "abcd", &[ + (3, 1, 2), (0, 0, 4), (1, 1, 4), (2, 2, 4), + ]), + t!(over010, &["bcd", "cd", "b", "abcd"], "abcd", &[ + (2, 1, 2), (3, 0, 4), (0, 1, 4), (1, 2, 4), + ]), + t!(over020, &["abcd", "bcd", "cd"], "abcd", &[ + (0, 0, 4), (1, 1, 4), (2, 2, 4), + ]), + t!(over030, &["bcd", "abcd", "cd"], "abcd", &[ + (1, 0, 4), (0, 1, 4), (2, 2, 4), + ]), + t!(over040, &["bcd", "cd", "abcd"], "abcd", &[ + (2, 0, 4), (0, 1, 4), (1, 2, 4), + ]), + t!(over050, &["abc", "bc"], "zazabcz", &[ + (0, 3, 6), (1, 4, 6), + ]), + + t!(over100, &["ab", "ba"], "abababa", &[ + (0, 0, 2), (1, 1, 3), (0, 2, 4), (1, 3, 5), (0, 4, 6), (1, 5, 7), + ]), + + t!(over200, &["foo", "foo"], "foobarfoo", &[ + (0, 0, 3), (1, 0, 3), (0, 6, 9), (1, 6, 9), + ]), + + t!(over300, &["", ""], "", &[ + (0, 0, 0), (1, 0, 0), + ]), + t!(over310, &["", ""], "a", &[ + (0, 0, 0), (1, 0, 0), (0, 1, 1), (1, 1, 1), + ]), + t!(over320, &["", "a"], "a", &[ + (0, 0, 0), (1, 0, 1), (0, 1, 1), + ]), + t!(over330, &["", "a", ""], "a", &[ + (0, 0, 0), (2, 0, 0), (1, 0, 1), (0, 1, 1), (2, 1, 1), + ]), + t!(over340, &["a", "", ""], "a", &[ + (1, 0, 0), (2, 0, 0), (0, 0, 1), (1, 1, 1), (2, 1, 1), + ]), + t!(over350, &["", "", "a"], "a", &[ + (0, 0, 0), (1, 0, 0), (2, 0, 1), (0, 1, 1), (1, 1, 1), + ]), +]; + +/// Regression tests that are applied to all Aho-Corasick combinations. +/// +/// If regression tests are needed for specific match semantics, then add them +/// to the appropriate group above. +const REGRESSION: &'static [SearchTest] = &[ + t!(regression010, &["inf", "ind"], "infind", &[ + (0, 0, 3), (1, 3, 6), + ]), + t!(regression020, &["ind", "inf"], "infind", &[ + (1, 0, 3), (0, 3, 6), + ]), + t!(regression030, &["libcore/", "libstd/"], "libcore/char/methods.rs", &[ + (0, 0, 8), + ]), + t!(regression040, &["libstd/", "libcore/"], "libcore/char/methods.rs", &[ + (1, 0, 8), + ]), + t!(regression050, &["\x00\x00\x01", "\x00\x00\x00"], "\x00\x00\x00", &[ + (1, 0, 3), + ]), + t!(regression060, &["\x00\x00\x00", "\x00\x00\x01"], "\x00\x00\x00", &[ + (0, 0, 3), + ]), +]; + +// Now define a test for each combination of things above that we want to run. +// Since there are a few different combinations for each collection of tests, +// we define a couple of macros to avoid repetition drudgery. The testconfig +// macro constructs the automaton from a given match kind, and runs the search +// tests one-by-one over the given collection. The `with` parameter allows one +// to configure the builder with additional parameters. The testcombo macro +// invokes testconfig in precisely this way: it sets up several tests where +// each one turns a different knob on AhoCorasickBuilder. + +macro_rules! testconfig { + (overlapping, $name:ident, $collection:expr, $kind:ident, $with:expr) => { + #[test] + fn $name() { + run_search_tests($collection, |test| { + let mut builder = AhoCorasickBuilder::new(); + $with(&mut builder); + builder + .match_kind(MatchKind::$kind) + .build(test.patterns) + .find_overlapping_iter(test.haystack) + .collect() + }); + } + }; + (stream, $name:ident, $collection:expr, $kind:ident, $with:expr) => { + #[test] + fn $name() { + run_search_tests($collection, |test| { + let buf = io::BufReader::with_capacity( + 1, + test.haystack.as_bytes(), + ); + let mut builder = AhoCorasickBuilder::new(); + $with(&mut builder); + builder + .match_kind(MatchKind::$kind) + .build(test.patterns) + .stream_find_iter(buf) + .map(|result| result.unwrap()) + .collect() + }); + } + }; + ($name:ident, $collection:expr, $kind:ident, $with:expr) => { + #[test] + fn $name() { + run_search_tests($collection, |test| { + let mut builder = AhoCorasickBuilder::new(); + $with(&mut builder); + builder + .match_kind(MatchKind::$kind) + .build(test.patterns) + .find_iter(test.haystack) + .collect() + }); + } + }; +} + +macro_rules! testcombo { + ($name:ident, $collection:expr, $kind:ident) => { + mod $name { + use super::*; + + testconfig!(nfa_default, $collection, $kind, |_| ()); + testconfig!(nfa_no_prefilter, $collection, $kind, + |b: &mut AhoCorasickBuilder| { + b.prefilter(false); + }); + testconfig!(nfa_all_sparse, $collection, $kind, + |b: &mut AhoCorasickBuilder| { + b.dense_depth(0); + }); + testconfig!(nfa_all_dense, $collection, $kind, + |b: &mut AhoCorasickBuilder| { + b.dense_depth(usize::MAX); + }); + testconfig!(dfa_default, $collection, $kind, + |b: &mut AhoCorasickBuilder| { + b.dfa(true); + }); + testconfig!(dfa_no_prefilter, $collection, $kind, + |b: &mut AhoCorasickBuilder| { + b.dfa(true).prefilter(false); + }); + testconfig!(dfa_all_sparse, $collection, $kind, + |b: &mut AhoCorasickBuilder| { + b.dfa(true).dense_depth(0); + }); + testconfig!(dfa_all_dense, $collection, $kind, + |b: &mut AhoCorasickBuilder| { + b.dfa(true).dense_depth(usize::MAX); + }); + testconfig!(dfa_no_byte_class, $collection, $kind, + |b: &mut AhoCorasickBuilder| { + b.dfa(true).byte_classes(false); + }); + testconfig!(dfa_no_premultiply, $collection, $kind, + |b: &mut AhoCorasickBuilder| { + b.dfa(true).premultiply(false); + }); + testconfig!(dfa_no_byte_class_no_premultiply, $collection, $kind, + |b: &mut AhoCorasickBuilder| { + b.dfa(true).byte_classes(false).premultiply(false); + }); + } + }; +} + +// Write out the combinations. +testcombo!(search_leftmost_longest, AC_LEFTMOST_LONGEST, LeftmostLongest); +testcombo!(search_leftmost_first, AC_LEFTMOST_FIRST, LeftmostFirst); +testcombo!( + search_standard_nonoverlapping, AC_STANDARD_NON_OVERLAPPING, Standard +); + +// Write out the overlapping combo by hand since there is only one of them. +testconfig!( + overlapping, + search_standard_overlapping_nfa_default, + AC_STANDARD_OVERLAPPING, + Standard, + |_| () +); +testconfig!( + overlapping, + search_standard_overlapping_nfa_all_sparse, + AC_STANDARD_OVERLAPPING, + Standard, + |b: &mut AhoCorasickBuilder| { b.dense_depth(0); } +); +testconfig!( + overlapping, + search_standard_overlapping_nfa_all_dense, + AC_STANDARD_OVERLAPPING, + Standard, + |b: &mut AhoCorasickBuilder| { b.dense_depth(usize::MAX); } +); +testconfig!( + overlapping, + search_standard_overlapping_dfa_default, + AC_STANDARD_OVERLAPPING, + Standard, + |b: &mut AhoCorasickBuilder| { b.dfa(true); } +); +testconfig!( + overlapping, + search_standard_overlapping_dfa_all_sparse, + AC_STANDARD_OVERLAPPING, + Standard, + |b: &mut AhoCorasickBuilder| { b.dfa(true).dense_depth(0); } +); +testconfig!( + overlapping, + search_standard_overlapping_dfa_all_dense, + AC_STANDARD_OVERLAPPING, + Standard, + |b: &mut AhoCorasickBuilder| { b.dfa(true).dense_depth(usize::MAX); } +); +testconfig!( + overlapping, + search_standard_overlapping_dfa_no_byte_class, + AC_STANDARD_OVERLAPPING, + Standard, + |b: &mut AhoCorasickBuilder| { b.dfa(true).byte_classes(false); } +); +testconfig!( + overlapping, + search_standard_overlapping_dfa_no_premultiply, + AC_STANDARD_OVERLAPPING, + Standard, + |b: &mut AhoCorasickBuilder| { b.dfa(true).premultiply(false); } +); +testconfig!( + overlapping, + search_standard_overlapping_dfa_no_byte_class_no_premultiply, + AC_STANDARD_OVERLAPPING, + Standard, + |b: &mut AhoCorasickBuilder| { + b.dfa(true).byte_classes(false).premultiply(false); + } +); + +// Also write out tests manually for streams, since we only test the standard +// match semantics. We also don't bother testing different automaton +// configurations, since those are well covered by tests above. +testconfig!( + stream, + search_standard_stream_nfa_default, + AC_STANDARD_NON_OVERLAPPING, + Standard, + |_| () +); +testconfig!( + stream, + search_standard_stream_dfa_default, + AC_STANDARD_NON_OVERLAPPING, + Standard, + |b: &mut AhoCorasickBuilder| { b.dfa(true); } +); + +#[test] +fn search_tests_have_unique_names() { + let assert = |constname, tests: &[SearchTest]| { + let mut seen = HashMap::new(); // map from test name to position + for (i, test) in tests.iter().enumerate() { + if !seen.contains_key(test.name) { + seen.insert(test.name, i); + } else { + let last = seen[test.name]; + panic!( + "{} tests have duplicate names at positions {} and {}", + constname, last, i + ); + } + } + }; + assert("BASICS", BASICS); + assert("STANDARD", STANDARD); + assert("LEFTMOST", LEFTMOST); + assert("LEFTMOST_FIRST", LEFTMOST_FIRST); + assert("LEFTMOST_LONGEST", LEFTMOST_LONGEST); + assert("NON_OVERLAPPING", NON_OVERLAPPING); + assert("OVERLAPPING", OVERLAPPING); + assert("REGRESSION", REGRESSION); +} + +#[test] +#[should_panic] +fn stream_not_allowed_leftmost_first() { + let fsm = AhoCorasickBuilder::new() + .match_kind(MatchKind::LeftmostFirst) + .build(None::); + assert_eq!(fsm.stream_find_iter(&b""[..]).count(), 0); +} + +#[test] +#[should_panic] +fn stream_not_allowed_leftmost_longest() { + let fsm = AhoCorasickBuilder::new() + .match_kind(MatchKind::LeftmostLongest) + .build(None::); + assert_eq!(fsm.stream_find_iter(&b""[..]).count(), 0); +} + +#[test] +#[should_panic] +fn overlapping_not_allowed_leftmost_first() { + let fsm = AhoCorasickBuilder::new() + .match_kind(MatchKind::LeftmostFirst) + .build(None::); + assert_eq!(fsm.find_overlapping_iter("").count(), 0); +} + +#[test] +#[should_panic] +fn overlapping_not_allowed_leftmost_longest() { + let fsm = AhoCorasickBuilder::new() + .match_kind(MatchKind::LeftmostLongest) + .build(None::); + assert_eq!(fsm.find_overlapping_iter("").count(), 0); +} + +#[test] +fn state_id_too_small() { + let mut patterns = vec![]; + for c1 in (b'a'..b'z').map(|b| b as char) { + for c2 in (b'a'..b'z').map(|b| b as char) { + for c3 in (b'a'..b'z').map(|b| b as char) { + patterns.push(format!("{}{}{}", c1, c2, c3)); + } + } + } + let result = AhoCorasickBuilder::new() + .build_with_size::(&patterns); + assert!(result.is_err()); +} + +fn run_search_tests Vec>( + which: TestCollection, + mut f: F, +) { + let get_match_triples = + |matches: Vec| -> Vec<(usize, usize, usize)> { + matches.into_iter() + .map(|m| (m.pattern(), m.start(), m.end())) + .collect() + }; + for &tests in which { + for test in tests { + assert_eq!( + test.matches, + get_match_triples(f(&test)).as_slice(), + "test: {}, patterns: {:?}, haystack: {:?}", + test.name, + test.patterns, + test.haystack + ); + } + } +} diff --git a/vendor/cc/.cargo-checksum.json b/vendor/cc/.cargo-checksum.json index 161e71c4d4..5b6d303a13 100644 --- a/vendor/cc/.cargo-checksum.json +++ b/vendor/cc/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"fbef1cb94911147d635fe6a12889dd3ba15060e59447cff57892c65482c27073","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"3eeb4b0488908876c439a87cfe2bec6d550b37388993b2d8863fb1c587a84f46","src/bin/gcc-shim.rs":"d6be9137cb48b86891e7b263adbf492e1193ffe682db9ba4a88eb1079b874b58","src/com.rs":"8b9a54af5400c259f877126cc68ea63ada4fe66e84c9b840711c95e570b15774","src/lib.rs":"74b3e65bbb7999fd65de8a906ca4daa441742780b2e8d1eb557a1113e014de87","src/registry.rs":"3cc1b5a50879fa751572878ae1d0afbfc960c11665258492754b2c8bccb0ff5d","src/setup_config.rs":"f5c45afc99ad3b7c1311242bc4baf37e861d740ab81bf6ca90e2aa283672e65a","src/winapi.rs":"d7929b36130e33f1caa6bd444b378b83023b2b82d589c6e0ab38c4ff6c950da8","src/windows_registry.rs":"b1293868645ceea5ee8dfb1afed8cc8290e6735c4d25dc43ea7d387778167180","tests/cc_env.rs":"bf7b14aa52af04294f648b2934f0f1830c5a0bdac1676310b8aa1f61458e7782","tests/support/mod.rs":"80dc87e54025197104cfb62d1af7a3400a3a0ddf0f2d98ea4ef4111cb1f0c890","tests/test.rs":"d839b2bcdb367180e537c0d26cb2d918d5ddfc587801c7051f4955d25688ea7d"},"package":"bb4a8b715cb4597106ea87c7c84b2f1d452c7492033765df7f32651e66fcf749"} \ No newline at end of file +{"files":{"Cargo.toml":"f842584326b7b6e8b2e982eee74d800d7e9839e4ae2be5bf5bbc7ae6b03317c8","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"190336dc7613f3b991580c39170b72967cafbd4c2d96ca2681249a8d5df2b1af","azure-pipelines.yml":"741956d8ca8bf18565f31d28746536c8013c168fcd180bcdee5f78a0a8e5fd39","ci/azure-install-rust.yml":"358198fb3cb23dd145434f777edde39c652ae390a5d64caf634a00dd78007286","ci/azure-steps.yml":"14b3bb5cf8bf3e060e0070336e98013c29c6b356b15345c2c99985761caa5579","src/bin/gcc-shim.rs":"d6be9137cb48b86891e7b263adbf492e1193ffe682db9ba4a88eb1079b874b58","src/com.rs":"201d682441b1dbad1e798983d5aa11c32dcdcf9b0af481cdaaba0de99e84a52c","src/lib.rs":"4c1c6c101b1fdb152fcb03694f75b1a49e0784f5aadeba016b7319f099ba9ed6","src/registry.rs":"3cc1b5a50879fa751572878ae1d0afbfc960c11665258492754b2c8bccb0ff5d","src/setup_config.rs":"a5d0ca3445dada7dc0698770861cb593a9cf791b88d76db43e5d5c0966864f0b","src/winapi.rs":"ea8b7edbb9ff87957254f465c2334e714c5d6b3b19a8d757c48ea7ca0881c50c","src/windows_registry.rs":"adbc2bbe9e8a5e9517aa82105ac60de49a7d7df4eac70fa917eac0a5d984b761","tests/cc_env.rs":"69fe675ec2256eca06ff13293b66c2626cb2aa9b56a5a3721a8ae45386af1f58","tests/support/mod.rs":"dbc9677fe63715fdb888fbeab75818c70c682f9e01b943c358dc7802399c5adb","tests/test.rs":"bbc7846fa089f7307450789a9dfd9c81db8f2619daf3a567c9f04ffe0a0f1b67"},"package":"5e5f3fee5eeb60324c2781f1e41286bdee933850fff9b3c672587fed5ec58c83"} \ No newline at end of file diff --git a/vendor/cc/Cargo.toml b/vendor/cc/Cargo.toml index b60e6e962d..b137978e54 100644 --- a/vendor/cc/Cargo.toml +++ b/vendor/cc/Cargo.toml @@ -12,7 +12,7 @@ [package] name = "cc" -version = "1.0.28" +version = "1.0.35" authors = ["Alex Crichton "] exclude = ["/.travis.yml", "/appveyor.yml"] description = "A build-time dependency for Cargo build scripts to assist in invoking the native\nC compiler to compile native C code into a static archive to be linked into Rust\ncode.\n" @@ -20,7 +20,7 @@ homepage = "https://github.com/alexcrichton/cc-rs" documentation = "https://docs.rs/cc" readme = "README.md" keywords = ["build-dependencies"] -categories = ["development-tools"] +categories = ["development-tools::build-utils"] license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cc-rs" [dependencies.rayon] @@ -31,8 +31,3 @@ version = "0.3" [features] parallel = ["rayon"] -[badges.appveyor] -repository = "alexcrichton/cc-rs" - -[badges.travis-ci] -repository = "alexcrichton/cc-rs" diff --git a/vendor/cc/README.md b/vendor/cc/README.md index f65d0c058b..e3c6ad006c 100644 --- a/vendor/cc/README.md +++ b/vendor/cc/README.md @@ -2,8 +2,7 @@ A library to compile C/C++/assembly into a Rust library/application. -[![Build Status](https://travis-ci.org/alexcrichton/cc-rs.svg?branch=master)](https://travis-ci.org/alexcrichton/cc-rs) -[![Build status](https://ci.appveyor.com/api/projects/status/onu270iw98h81nwv?svg=true)](https://ci.appveyor.com/project/alexcrichton/cc-rs) +[![Build Status](https://dev.azure.com/alexcrichton/cc-rs/_apis/build/status/alexcrichton.cc-rs?branchName=master)](https://dev.azure.com/alexcrichton/cc-rs/_build/latest?definitionId=5&branchName=master) [Documentation](https://docs.rs/cc) @@ -77,6 +76,7 @@ number of different environment variables. certain `TARGET`s, it also is assumed to know about other flags (most common is `-fPIC`). * `AR` - the `ar` (archiver) executable to use to build the static library. +* `CRATE_CC_NO_DEFAULTS` - the default compiler flags may cause conflicts in some cross compiling scenarios. Setting this variable will disable the generation of default compiler flags. Each of these variables can also be supplied with certain prefixes and suffixes, in the following prioritized order: @@ -88,7 +88,7 @@ in the following prioritized order: If none of these variables exist, cc-rs uses built-in defaults -In addition to the the above optional environment variables, `cc-rs` has some +In addition to the above optional environment variables, `cc-rs` has some functions with hard requirements on some variables supplied by [cargo's build-script driver][cargo] that it has the `TARGET`, `OUT_DIR`, `OPT_LEVEL`, and `HOST` variables. diff --git a/vendor/cc/azure-pipelines.yml b/vendor/cc/azure-pipelines.yml new file mode 100644 index 0000000000..49d4d98072 --- /dev/null +++ b/vendor/cc/azure-pipelines.yml @@ -0,0 +1,89 @@ +trigger: + - master + +jobs: + - job: min + displayName: Minimum Rust + steps: + - template: ci/azure-install-rust.yml + parameters: + toolchain: 1.16.0 + - script: cargo build + + - job: Linux + pool: + vmImage: ubuntu-16.04 + steps: + - template: ci/azure-steps.yml + strategy: + matrix: + x86_64: + TARGET: x86_64-unknown-linux-gnu + i686: + TARGET: i686-unknown-linux-gnu + x86_64-beta: + TARGET: x86_64-unknown-linux-gnu + TOOLCHAIN: beta + x86_64-nightly: + TARGET: x86_64-unknown-linux-gnu + TOOLCHAIN: nightly + + - job: macOS + pool: + vmImage: macos-10.13 + steps: + - template: ci/azure-steps.yml + strategy: + matrix: + x86_64: + TARGET: x86_64-apple-darwin + aarch64-ios: + TARGET: aarch64-apple-ios + NO_RUN: --no-run + + - job: Windows_vs2019 + pool: + vmImage: windows-2019 + steps: + - template: ci/azure-steps.yml + strategy: + matrix: + x86_64-msvc: + TARGET: x86_64-pc-windows-msvc + + - job: Windows_vs2017 + pool: + vmImage: vs2017-win2016 + steps: + - template: ci/azure-steps.yml + strategy: + matrix: + x86_64-msvc: + TARGET: x86_64-pc-windows-msvc + i686-msvc: + TARGET: i686-pc-windows-msvc + x86_64-gnu: + TARGET: x86_64-pc-windows-gnu + i686-gnu: + TARGET: i686-pc-windows-gnu + + - job: Windows_vs2015 + pool: + vmImage: vs2015-win2012r2 + steps: + - template: ci/azure-steps.yml + strategy: + matrix: + x86_64-msvc: + TARGET: x86_64-pc-windows-msvc + i686-msvc: + TARGET: i686-pc-windows-msvc + + - job: docs + steps: + - template: ci/azure-install-rust.yml + - script: cargo doc --no-deps --all-features + - script: curl -LsSf https://git.io/fhJ8n | rustc - && (cd target/doc && ../../rust_out) + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) + env: + GITHUB_DEPLOY_KEY: $(GITHUB_DEPLOY_KEY) diff --git a/vendor/cc/ci/azure-install-rust.yml b/vendor/cc/ci/azure-install-rust.yml new file mode 100644 index 0000000000..fa7eae459b --- /dev/null +++ b/vendor/cc/ci/azure-install-rust.yml @@ -0,0 +1,23 @@ +steps: + - bash: | + set -e + toolchain=$TOOLCHAIN + if [ "$toolchain" = "" ]; then + toolchain=stable + fi + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $toolchain + echo "##vso[task.prependpath]$HOME/.cargo/bin" + displayName: Install rust (unix) + condition: ne( variables['Agent.OS'], 'Windows_NT' ) + + - script: | + curl -sSf -o rustup-init.exe https://win.rustup.rs + rustup-init.exe -y --default-toolchain stable-%TARGET% + echo ##vso[task.prependpath]%USERPROFILE%\.cargo\bin + displayName: Install rust (windows) + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + + - script: | + rustc -Vv + cargo -V + displayName: Query rust and cargo versions diff --git a/vendor/cc/ci/azure-steps.yml b/vendor/cc/ci/azure-steps.yml new file mode 100644 index 0000000000..c240ed0c8b --- /dev/null +++ b/vendor/cc/ci/azure-steps.yml @@ -0,0 +1,21 @@ +steps: + - template: azure-install-rust.yml + - bash: rustup target add $TARGET + displayName: Install Rust target + + - bash: sudo apt-get install g++-multilib + condition: eq( variables['Agent.OS'], 'Linux' ) + displayName: Install g++-multilib + + - script: cargo build + displayName: "Normal build" + - bash: cargo test $NO_RUN -- --test-threads 1 + displayName: "Crate tests" + - bash: cargo test $NO_RUN --features parallel -- --test-threads 1 + displayName: "Crate tests (parallel)" + - bash: cargo test $NO_RUN --manifest-path cc-test/Cargo.toml --target $TARGET + displayName: "cc-test tests" + - bash: cargo test $NO_RUN --manifest-path cc-test/Cargo.toml --target $TARGET --features parallel + displayName: "cc-test tests (parallel)" + - bash: cargo test $NO_RUN --manifest-path cc-test/Cargo.toml --target $TARGET --release + displayName: "cc-test tests (release)" diff --git a/vendor/cc/src/com.rs b/vendor/cc/src/com.rs index 2b16475a09..9b75d476db 100644 --- a/vendor/cc/src/com.rs +++ b/vendor/cc/src/com.rs @@ -13,12 +13,12 @@ use std::ops::Deref; use std::os::windows::ffi::{OsStrExt, OsStringExt}; use std::ptr::null_mut; use std::slice::from_raw_parts; +use winapi::CoInitializeEx; +use winapi::IUnknown; use winapi::Interface; use winapi::BSTR; -use winapi::CoInitializeEx; use winapi::COINIT_MULTITHREADED; use winapi::{SysFreeString, SysStringLen}; -use winapi::IUnknown; use winapi::{HRESULT, S_FALSE, S_OK}; pub fn initialize() -> Result<(), HRESULT> { diff --git a/vendor/cc/src/lib.rs b/vendor/cc/src/lib.rs index 5eebd07c09..989d8092ca 100644 --- a/vendor/cc/src/lib.rs +++ b/vendor/cc/src/lib.rs @@ -61,15 +61,15 @@ #[cfg(feature = "parallel")] extern crate rayon; +use std::collections::HashMap; use std::env; use std::ffi::{OsStr, OsString}; use std::fs; +use std::io::{self, BufRead, BufReader, Read, Write}; use std::path::{Path, PathBuf}; use std::process::{Child, Command, Stdio}; -use std::io::{self, BufRead, BufReader, Read, Write}; -use std::thread::{self, JoinHandle}; -use std::collections::HashMap; use std::sync::{Arc, Mutex}; +use std::thread::{self, JoinHandle}; // These modules are all glue to support reading the MSVC version from // the registry and from COM interfaces @@ -891,7 +891,7 @@ impl Build { return Err(Error::new( ErrorKind::IOError, "Getting object file details failed.", - )) + )); } }; @@ -956,7 +956,7 @@ impl Build { fn compile_objects(&self, objs: &[Object]) -> Result<(), Error> { use self::rayon::prelude::*; - if let Ok(amt) = env::var("NUM_JOBS") { + if let Some(amt) = self.getenv("NUM_JOBS") { if let Ok(amt) = amt.parse() { let _ = rayon::ThreadPoolBuilder::new() .num_threads(amt) @@ -1093,7 +1093,86 @@ impl Build { let target = self.get_target()?; let mut cmd = self.get_base_compiler()?; + let envflags = self.envflags(if self.cpp { "CXXFLAGS" } else { "CFLAGS" }); + + // Disable default flag generation via environment variable or when + // certain cross compiling arguments are set + let use_defaults = self.getenv("CRATE_CC_NO_DEFAULTS").is_none(); + + if use_defaults { + self.add_default_flags(&mut cmd, &target, &opt_level)?; + } else { + println!("Info: default compiler flags are disabled"); + } + + for arg in envflags { + cmd.push_cc_arg(arg.into()); + } + + for directory in self.include_directories.iter() { + cmd.args.push(cmd.family.include_flag().into()); + cmd.args.push(directory.into()); + } + + // If warnings and/or extra_warnings haven't been explicitly set, + // then we set them only if the environment doesn't already have + // CFLAGS/CXXFLAGS, since those variables presumably already contain + // the desired set of warnings flags. + + if self + .warnings + .unwrap_or(if self.has_flags() { false } else { true }) + { + let wflags = cmd.family.warnings_flags().into(); + cmd.push_cc_arg(wflags); + } + + if self + .extra_warnings + .unwrap_or(if self.has_flags() { false } else { true }) + { + if let Some(wflags) = cmd.family.extra_warnings_flags() { + cmd.push_cc_arg(wflags.into()); + } + } + + for flag in self.flags.iter() { + cmd.args.push(flag.into()); + } + for flag in self.flags_supported.iter() { + if self.is_flag_supported(flag).unwrap_or(false) { + cmd.push_cc_arg(flag.into()); + } + } + + for &(ref key, ref value) in self.definitions.iter() { + let lead = if let ToolFamily::Msvc { .. } = cmd.family { + "/" + } else { + "-" + }; + if let Some(ref value) = *value { + cmd.args.push(format!("{}D{}={}", lead, key, value).into()); + } else { + cmd.args.push(format!("{}D{}", lead, key).into()); + } + } + + if self.warnings_into_errors { + let warnings_to_errors_flag = cmd.family.warnings_to_errors_flag().into(); + cmd.push_cc_arg(warnings_to_errors_flag); + } + + Ok(cmd) + } + + fn add_default_flags( + &self, + cmd: &mut Tool, + target: &str, + opt_level: &str, + ) -> Result<(), Error> { // Non-target flags // If the flag is not conditioned on target variable, it belongs here :) match cmd.family { @@ -1107,8 +1186,9 @@ impl Build { Some(true) => "/MT", Some(false) => "/MD", None => { - let features = - env::var("CARGO_CFG_TARGET_FEATURE").unwrap_or(String::new()); + let features = self + .getenv("CARGO_CFG_TARGET_FEATURE") + .unwrap_or(String::new()); if features.contains("crt-static") { "/MT" } else { @@ -1120,9 +1200,9 @@ impl Build { match &opt_level[..] { // Msvc uses /O1 to enable all optimizations that minimize code size. - "z" | "s" | "1" => cmd.args.push("/O1".into()), + "z" | "s" | "1" => cmd.push_opt_unless_duplicate("/O1".into()), // -O3 is a valid value for gcc and clang compilers, but not msvc. Cap to /O2. - "2" | "3" => cmd.args.push("/O2".into()), + "2" | "3" => cmd.push_opt_unless_duplicate("/O2".into()), _ => {} } } @@ -1130,9 +1210,9 @@ impl Build { // arm-linux-androideabi-gcc 4.8 shipped with Android NDK does // not support '-Oz' if opt_level == "z" && cmd.family != ToolFamily::Clang { - cmd.args.push("-Os".into()); + cmd.push_opt_unless_duplicate("-Os".into()); } else { - cmd.args.push(format!("-O{}", opt_level).into()); + cmd.push_opt_unless_duplicate(format!("-O{}", opt_level).into()); } if !target.contains("-ios") { @@ -1149,9 +1229,6 @@ impl Build { } } } - for arg in self.envflags(if self.cpp { "CXXFLAGS" } else { "CFLAGS" }) { - cmd.args.push(arg.into()); - } if self.get_debug() { if self.cuda { @@ -1159,7 +1236,7 @@ impl Build { cmd.args.push(nvcc_debug_flag); } let family = cmd.family; - family.add_debug_flags(&mut cmd); + family.add_debug_flags(cmd); } // Target flags @@ -1171,11 +1248,11 @@ impl Build { if clang_cl { if target.contains("x86_64") { cmd.args.push("-m64".into()); - } else if target.contains("i586") { + } else if target.contains("86") { cmd.args.push("-m32".into()); cmd.args.push("/arch:IA32".into()); } else { - cmd.args.push("-m32".into()); + cmd.args.push(format!("--target={}", target).into()); } } else { if target.contains("i586") { @@ -1193,7 +1270,8 @@ impl Build { // the SDK, but for all released versions of the // Windows SDK it is required. if target.contains("arm") || target.contains("thumb") { - cmd.args.push("/D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1".into()); + cmd.args + .push("/D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1".into()); } } ToolFamily::Gnu => { @@ -1206,14 +1284,18 @@ impl Build { } if self.static_flag.is_none() { - let features = env::var("CARGO_CFG_TARGET_FEATURE").unwrap_or(String::new()); + let features = self + .getenv("CARGO_CFG_TARGET_FEATURE") + .unwrap_or(String::new()); if features.contains("crt-static") { cmd.args.push("-static".into()); } } // armv7 targets get to use armv7 instructions - if (target.starts_with("armv7") || target.starts_with("thumbv7")) && target.contains("-linux-") { + if (target.starts_with("armv7") || target.starts_with("thumbv7")) + && target.contains("-linux-") + { cmd.args.push("-march=armv7-a".into()); } @@ -1346,7 +1428,7 @@ impl Build { if target.contains("-ios") { // FIXME: potential bug. iOS is always compiled with Clang, but Gcc compiler may be // detected instead. - self.ios_flags(&mut cmd)?; + self.ios_flags(cmd)?; } if self.static_flag.unwrap_or(false) { @@ -1372,62 +1454,17 @@ impl Build { } } - for directory in self.include_directories.iter() { - cmd.args.push(cmd.family.include_flag().into()); - cmd.args.push(directory.into()); - } - - // If warnings and/or extra_warnings haven't been explicitly set, - // then we set them only if the environment doesn't already have - // CFLAGS/CXXFLAGS, since those variables presumably already contain - // the desired set of warnings flags. - - if self.warnings.unwrap_or(if self.has_flags() { false } else { true }) { - let wflags = cmd.family.warnings_flags().into(); - cmd.push_cc_arg(wflags); - } - - if self.extra_warnings.unwrap_or(if self.has_flags() { false } else { true }) { - if let Some(wflags) = cmd.family.extra_warnings_flags() { - cmd.push_cc_arg(wflags.into()); - } - } - - for flag in self.flags.iter() { - cmd.args.push(flag.into()); - } - - for flag in self.flags_supported.iter() { - if self.is_flag_supported(flag).unwrap_or(false) { - cmd.push_cc_arg(flag.into()); - } - } - - for &(ref key, ref value) in self.definitions.iter() { - let lead = if let ToolFamily::Msvc { .. } = cmd.family { - "/" - } else { - "-" - }; - if let Some(ref value) = *value { - cmd.args.push(format!("{}D{}={}", lead, key, value).into()); - } else { - cmd.args.push(format!("{}D{}", lead, key).into()); - } - } - - if self.warnings_into_errors { - let warnings_to_errors_flag = cmd.family.warnings_to_errors_flag().into(); - cmd.push_cc_arg(warnings_to_errors_flag); - } - - Ok(cmd) + Ok(()) } fn has_flags(&self) -> bool { let flags_env_var_name = if self.cpp { "CXXFLAGS" } else { "CFLAGS" }; let flags_env_var_value = self.get_var(flags_env_var_name); - if let Ok(_) = flags_env_var_value { true } else { false } + if let Ok(_) = flags_env_var_value { + true + } else { + false + } } fn msvc_macro_assembler(&self) -> Result<(Command, String), Error> { @@ -1471,12 +1508,7 @@ impl Build { let objects: Vec<_> = objs.iter().map(|obj| obj.dst.clone()).collect(); let target = self.get_target()?; if target.contains("msvc") { - let mut cmd = match self.archiver { - Some(ref s) => self.cmd(s), - None => windows_registry::find(&target, "lib.exe") - .unwrap_or_else(|| self.cmd("lib.exe")), - }; - + let (mut cmd, program) = self.get_ar()?; let mut out = OsString::from("/OUT:"); out.push(dst); cmd.arg(out).arg("/nologo"); @@ -1521,7 +1553,7 @@ impl Build { } else { cmd.args(&objects).args(&self.objects); } - run(&mut cmd, "lib.exe")?; + run(&mut cmd, &program)?; // The Rust compiler will look for libfoo.a and foo.lib, but the // MSVC linker will also be passed foo.lib, so be sure that both @@ -1537,7 +1569,7 @@ impl Build { return Err(Error::new( ErrorKind::IOError, "Could not copy or create a hard-link to the generated lib file.", - )) + )); } }; } else { @@ -1574,7 +1606,7 @@ impl Build { return Err(Error::new( ErrorKind::ArchitectureInvalid, "Unknown architecture for iOS target.", - )) + )); } }; @@ -1593,7 +1625,8 @@ impl Build { }; self.print(&format!("Detecting iOS SDK path for {}", sdk)); - let sdk_path = self.cmd("xcrun") + let sdk_path = self + .cmd("xcrun") .arg("--show-sdk-path") .arg("--sdk") .arg(sdk) @@ -1607,7 +1640,7 @@ impl Build { return Err(Error::new( ErrorKind::IOError, "Unable to determine iOS SDK path.", - )) + )); } }; @@ -1658,7 +1691,8 @@ impl Build { let cl_exe = windows_registry::find_tool(&target, "cl.exe"); - let tool_opt: Option = self.env_tool(env) + let tool_opt: Option = self + .env_tool(env) .map(|(tool, cc, args)| { // chop off leading/trailing whitespace to work around // semi-buggy build scripts which are shared in @@ -1717,6 +1751,8 @@ impl Build { } } else if target.contains("cloudabi") { format!("{}-{}", target, traditional) + } else if target == "wasm32-unknown-wasi" || target == "wasm32-unknown-unknown" { + "clang".to_string() } else if self.get_host()? != target { // CROSS_COMPILE is of the form: "arm-linux-gnueabi-" let cc_env = self.getenv("CROSS_COMPILE"); @@ -1818,9 +1854,9 @@ impl Build { // configure for invocations like `clang-cl` we still get a "works out // of the box" experience. if let Some(cl_exe) = cl_exe { - if tool.family == (ToolFamily::Msvc { clang_cl: true }) && - tool.env.len() == 0 && - target.contains("msvc") + if tool.family == (ToolFamily::Msvc { clang_cl: true }) + && tool.env.len() == 0 + && target.contains("msvc") { for &(ref k, ref v) in cl_exe.env.iter() { tool.env.push((k.to_owned(), v.to_owned())); @@ -1836,7 +1872,8 @@ impl Build { let host = self.get_host()?; let kind = if host == target { "HOST" } else { "TARGET" }; let target_u = target.replace("-", "_"); - let res = self.getenv(&format!("{}_{}", var_base, target)) + let res = self + .getenv(&format!("{}_{}", var_base, target)) .or_else(|| self.getenv(&format!("{}_{}", var_base, target_u))) .or_else(|| self.getenv(&format!("{}_{}", kind, var_base))) .or_else(|| self.getenv(var_base)); @@ -1961,9 +1998,10 @@ impl Build { if let Ok(p) = self.get_var("AR") { return Ok((self.cmd(&p), p)); } - let program = if self.get_target()?.contains("android") { - format!("{}-ar", self.get_target()?.replace("armv7", "arm")) - } else if self.get_target()?.contains("emscripten") { + let target = self.get_target()?; + let program = if target.contains("android") { + format!("{}-ar", target.replace("armv7", "arm")) + } else if target.contains("emscripten") { // Windows use bat files so we have to be a bit more specific if cfg!(windows) { let mut cmd = self.cmd("cmd"); @@ -1972,6 +2010,11 @@ impl Build { } "emar".to_string() + } else if target.contains("msvc") { + match windows_registry::find(&target, "lib.exe") { + Some(t) => return Ok((t, "lib.exe".to_string())), + None => "lib.exe".to_string(), + } } else { "ar".to_string() }; @@ -2021,7 +2064,7 @@ impl Build { fn getenv(&self, v: &str) -> Option { let mut cache = self.env_cache.lock().unwrap(); if let Some(val) = cache.get(v) { - return val.clone() + return val.clone(); } let r = env::var(v).ok(); self.print(&format!("{} = {:?}", v, r)); @@ -2062,10 +2105,11 @@ impl Tool { let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) { if fname.contains("clang-cl") { ToolFamily::Msvc { clang_cl: true } - } else if fname.contains("cl") && - !fname.contains("cloudabi") && - !fname.contains("uclibc") && - !fname.contains("clang") { + } else if fname.contains("cl") + && !fname.contains("cloudabi") + && !fname.contains("uclibc") + && !fname.contains("clang") + { ToolFamily::Msvc { clang_cl: false } } else if fname.contains("clang") { ToolFamily::Clang @@ -2104,6 +2148,42 @@ impl Tool { self.args.push(flag); } + fn is_duplicate_opt_arg(&self, flag: &OsString) -> bool { + let flag = flag.to_str().unwrap(); + let mut chars = flag.chars(); + + // Only duplicate check compiler flags + if self.is_like_msvc() { + if chars.next() != Some('/') { + return false; + } + } else if self.is_like_gnu() || self.is_like_clang() { + if chars.next() != Some('-') { + return false; + } + } + + // Check for existing optimization flags (-O, /O) + if chars.next() == Some('O') { + return self + .args() + .iter() + .any(|ref a| a.to_str().unwrap_or("").chars().nth(1) == Some('O')); + } + + // TODO Check for existing -m..., -m...=..., /arch:... flags + return false; + } + + /// Don't push optimization arg if it conflicts with existing args + fn push_opt_unless_duplicate(&mut self, flag: OsString) { + if self.is_duplicate_opt_arg(&flag) { + println!("Info: Ignoring duplicate arg {:?}", &flag); + } else { + self.push_cc_arg(flag); + } + } + /// Converts this compiler into a `Command` that's ready to be run. /// /// This is useful for when the compiler needs to be executed and the @@ -2120,7 +2200,11 @@ impl Tool { }; cmd.args(&self.cc_wrapper_args); - let value = self.args.iter().filter(|a| !self.removed_args.contains(a)).collect::>(); + let value = self + .args + .iter() + .filter(|a| !self.removed_args.contains(a)) + .collect::>(); cmd.args(&value); for &(ref k, ref v) in self.env.iter() { @@ -2215,7 +2299,7 @@ fn run(cmd: &mut Command, program: &str) -> Result<(), Error> { "Failed to wait on spawned child process, command {:?} with args {:?}.", cmd, program ), - )) + )); } }; print.join().unwrap(); @@ -2253,7 +2337,7 @@ fn run_output(cmd: &mut Command, program: &str) -> Result, Error> { "Failed to wait on spawned child process, command {:?} with args {:?}.", cmd, program ), - )) + )); } }; print.join().unwrap(); diff --git a/vendor/cc/src/setup_config.rs b/vendor/cc/src/setup_config.rs index 7c03d388fa..56fe114d7b 100644 --- a/vendor/cc/src/setup_config.rs +++ b/vendor/cc/src/setup_config.rs @@ -11,14 +11,14 @@ use std::ffi::OsString; use std::ptr::null_mut; use winapi::Interface; -use winapi::{LPFILETIME, ULONG}; -use winapi::S_FALSE; use winapi::BSTR; use winapi::LPCOLESTR; -use winapi::{CoCreateInstance, CLSCTX_ALL}; use winapi::LPSAFEARRAY; +use winapi::S_FALSE; +use winapi::{CoCreateInstance, CLSCTX_ALL}; use winapi::{IUnknown, IUnknownVtbl}; use winapi::{HRESULT, LCID, LPCWSTR, PULONGLONG}; +use winapi::{LPFILETIME, ULONG}; use com::{BStr, ComPtr}; @@ -31,7 +31,7 @@ pub const eRegistered: InstanceState = 2; pub const eNoRebootRequired: InstanceState = 4; pub const eComplete: InstanceState = -1i32 as u32; -RIDL!{#[uuid(0xb41463c3, 0x8866, 0x43b5, 0xbc, 0x33, 0x2b, 0x06, 0x76, 0xf7, 0xf4, 0x2e)] +RIDL! {#[uuid(0xb41463c3, 0x8866, 0x43b5, 0xbc, 0x33, 0x2b, 0x06, 0x76, 0xf7, 0xf4, 0x2e)] interface ISetupInstance(ISetupInstanceVtbl): IUnknown(IUnknownVtbl) { fn GetInstanceId( pbstrInstanceId: *mut BSTR, @@ -62,7 +62,7 @@ interface ISetupInstance(ISetupInstanceVtbl): IUnknown(IUnknownVtbl) { ) -> HRESULT, }} -RIDL!{#[uuid(0x89143c9a, 0x05af, 0x49b0, 0xb7, 0x17, 0x72, 0xe2, 0x18, 0xa2, 0x18, 0x5c)] +RIDL! {#[uuid(0x89143c9a, 0x05af, 0x49b0, 0xb7, 0x17, 0x72, 0xe2, 0x18, 0xa2, 0x18, 0x5c)] interface ISetupInstance2(ISetupInstance2Vtbl): ISetupInstance(ISetupInstanceVtbl) { fn GetState( pState: *mut InstanceState, @@ -78,7 +78,7 @@ interface ISetupInstance2(ISetupInstance2Vtbl): ISetupInstance(ISetupInstanceVtb ) -> HRESULT, }} -RIDL!{#[uuid(0x6380bcff, 0x41d3, 0x4b2e, 0x8b, 0x2e, 0xbf, 0x8a, 0x68, 0x10, 0xc8, 0x48)] +RIDL! {#[uuid(0x6380bcff, 0x41d3, 0x4b2e, 0x8b, 0x2e, 0xbf, 0x8a, 0x68, 0x10, 0xc8, 0x48)] interface IEnumSetupInstances(IEnumSetupInstancesVtbl): IUnknown(IUnknownVtbl) { fn Next( celt: ULONG, @@ -94,7 +94,7 @@ interface IEnumSetupInstances(IEnumSetupInstancesVtbl): IUnknown(IUnknownVtbl) { ) -> HRESULT, }} -RIDL!{#[uuid(0x42843719, 0xdb4c, 0x46c2, 0x8e, 0x7c, 0x64, 0xf1, 0x81, 0x6e, 0xfd, 0x5b)] +RIDL! {#[uuid(0x42843719, 0xdb4c, 0x46c2, 0x8e, 0x7c, 0x64, 0xf1, 0x81, 0x6e, 0xfd, 0x5b)] interface ISetupConfiguration(ISetupConfigurationVtbl): IUnknown(IUnknownVtbl) { fn EnumInstances( ppEnumInstances: *mut *mut IEnumSetupInstances, @@ -108,7 +108,7 @@ interface ISetupConfiguration(ISetupConfigurationVtbl): IUnknown(IUnknownVtbl) { ) -> HRESULT, }} -RIDL!{#[uuid(0x26aab78c, 0x4a60, 0x49d6, 0xaf, 0x3b, 0x3c, 0x35, 0xbc, 0x93, 0x36, 0x5d)] +RIDL! {#[uuid(0x26aab78c, 0x4a60, 0x49d6, 0xaf, 0x3b, 0x3c, 0x35, 0xbc, 0x93, 0x36, 0x5d)] interface ISetupConfiguration2(ISetupConfiguration2Vtbl): ISetupConfiguration(ISetupConfigurationVtbl) { fn EnumAllInstances( @@ -116,7 +116,7 @@ interface ISetupConfiguration2(ISetupConfiguration2Vtbl): ) -> HRESULT, }} -RIDL!{#[uuid(0xda8d8a16, 0xb2b6, 0x4487, 0xa2, 0xf1, 0x59, 0x4c, 0xcc, 0xcd, 0x6b, 0xf5)] +RIDL! {#[uuid(0xda8d8a16, 0xb2b6, 0x4487, 0xa2, 0xf1, 0x59, 0x4c, 0xcc, 0xcd, 0x6b, 0xf5)] interface ISetupPackageReference(ISetupPackageReferenceVtbl): IUnknown(IUnknownVtbl) { fn GetId( pbstrId: *mut BSTR, @@ -141,7 +141,7 @@ interface ISetupPackageReference(ISetupPackageReferenceVtbl): IUnknown(IUnknownV ) -> HRESULT, }} -RIDL!{#[uuid(0x42b21b78, 0x6192, 0x463e, 0x87, 0xbf, 0xd5, 0x77, 0x83, 0x8f, 0x1d, 0x5c)] +RIDL! {#[uuid(0x42b21b78, 0x6192, 0x463e, 0x87, 0xbf, 0xd5, 0x77, 0x83, 0x8f, 0x1d, 0x5c)] interface ISetupHelper(ISetupHelperVtbl): IUnknown(IUnknownVtbl) { fn ParseVersion( pwszVersion: LPCOLESTR, @@ -154,7 +154,7 @@ interface ISetupHelper(ISetupHelperVtbl): IUnknown(IUnknownVtbl) { ) -> HRESULT, }} -DEFINE_GUID!{CLSID_SetupConfiguration, +DEFINE_GUID! {CLSID_SetupConfiguration, 0x177f0c4a, 0x1cd3, 0x4de7, 0xa3, 0x2c, 0x71, 0xdb, 0xbb, 0x9f, 0xa3, 0x6d} // Safe wrapper around the COM interfaces diff --git a/vendor/cc/src/winapi.rs b/vendor/cc/src/winapi.rs index cc83963b6b..c416325b52 100644 --- a/vendor/cc/src/winapi.rs +++ b/vendor/cc/src/winapi.rs @@ -115,7 +115,7 @@ macro_rules! DEFINE_GUID { Data3: $w2, Data4: [$b1, $b2, $b3, $b4, $b5, $b6, $b7, $b8], }; - } + }; } macro_rules! RIDL { @@ -207,7 +207,7 @@ macro_rules! RIDL { ); } -RIDL!{#[uuid(0x00000000, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46)] +RIDL! {#[uuid(0x00000000, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46)] interface IUnknown(IUnknownVtbl) { fn QueryInterface( riid: REFIID, diff --git a/vendor/cc/src/windows_registry.rs b/vendor/cc/src/windows_registry.rs index ca6b9891c9..0d3ea6c123 100644 --- a/vendor/cc/src/windows_registry.rs +++ b/vendor/cc/src/windows_registry.rs @@ -17,10 +17,12 @@ use Tool; #[cfg(windows)] macro_rules! otry { - ($expr:expr) => (match $expr { - Some(val) => val, - None => return None, - }) + ($expr:expr) => { + match $expr { + Some(val) => val, + None => return None, + } + }; } /// Attempts to find a tool within an MSVC installation using the Windows @@ -103,6 +105,8 @@ pub enum VsVers { Vs14, /// Visual Studio 15 (2017) Vs15, + /// Visual Studio 16 (2019) + Vs16, /// Hidden variant that should not be matched on. Callers that want to /// handle an enumeration of `VsVers` instances should always have a default @@ -128,6 +132,7 @@ pub fn find_vs_version() -> Result { match env::var("VisualStudioVersion") { Ok(version) => match &version[..] { + "16.0" => Ok(VsVers::Vs16), "15.0" => Ok(VsVers::Vs15), "14.0" => Ok(VsVers::Vs14), "12.0" => Ok(VsVers::Vs12), @@ -144,7 +149,9 @@ pub fn find_vs_version() -> Result { _ => { // Check for the presense of a specific registry key // that indicates visual studio is installed. - if impl_::has_msbuild_version("15.0") { + if impl_::has_msbuild_version("16.0") { + Ok(VsVers::Vs16) + } else if impl_::has_msbuild_version("15.0") { Ok(VsVers::Vs15) } else if impl_::has_msbuild_version("14.0") { Ok(VsVers::Vs14) @@ -166,15 +173,16 @@ pub fn find_vs_version() -> Result { #[cfg(windows)] mod impl_ { + use com; + use registry::{RegistryKey, LOCAL_MACHINE}; + use setup_config::{EnumSetupInstances, SetupConfiguration, SetupInstance}; use std::env; use std::ffi::OsString; - use std::mem; - use std::path::{Path, PathBuf}; use std::fs::File; use std::io::Read; - use registry::{RegistryKey, LOCAL_MACHINE}; - use com; - use setup_config::{EnumSetupInstances, SetupConfiguration, SetupInstance}; + use std::mem; + use std::iter; + use std::path::{Path, PathBuf}; use Tool; @@ -210,6 +218,41 @@ mod impl_ { } } + fn vs16_instances() -> Box> { + let instances = if let Some(instances) = vs15_instances() { + instances + } else { + return Box::new(iter::empty()); + }; + Box::new(instances.filter_map(|instance| { + let instance = instance.ok()?; + let installation_name = instance.installation_name().ok()?; + if installation_name.to_str()?.starts_with("VisualStudio/16.") { + Some(PathBuf::from(instance.installation_path().ok()?)) + } else { + None + } + })) + } + + fn find_tool_in_vs16_path(tool: &str, target: &str) -> Option { + vs16_instances().find_map(|path| { + let path = path.join(tool); + if !path.is_file() { + return None; + } + let mut tool = Tool::new(path); + if target.contains("x86_64") { + tool.env.push(("Platform".into(), "X64".into())); + } + Some(tool) + }) + } + + fn find_msbuild_vs16(target: &str) -> Option { + find_tool_in_vs16_path(r"MSBuild\Current\Bin\MSBuild.exe", target) + } + // In MSVC 15 (2017) MS once again changed the scheme for locating // the tooling. Now we must go through some COM interfaces, which // is super fun for Rust. @@ -251,7 +294,8 @@ mod impl_ { instance .ok() .and_then(|instance| instance.installation_path().ok()) - }).map(|path| PathBuf::from(path).join(tool)) + }) + .map(|path| PathBuf::from(path).join(tool)) .find(|ref path| path.is_file()), None => None, }; @@ -319,13 +363,15 @@ mod impl_ { let path = instance_path.join(r"VC\Tools\MSVC").join(version); // This is the path to the toolchain for a particular target, running // on a given host - let bin_path = path.join("bin") + let bin_path = path + .join("bin") .join(&format!("Host{}", host)) .join(&target); // But! we also need PATH to contain the target directory for the host // architecture, because it contains dlls like mspdb140.dll compiled for // the host architecture. - let host_dylib_path = path.join("bin") + let host_dylib_path = path + .join("bin") .join(&format!("Host{}", host)) .join(&host.to_lowercase()); let lib_path = path.join("lib").join(&target); @@ -478,17 +524,16 @@ mod impl_ { let key = otry!(LOCAL_MACHINE.open(key.as_ref()).ok()); let root = otry!(key.query_str("KitsRoot10").ok()); let readdir = otry!(Path::new(&root).join("lib").read_dir().ok()); - let max_libdir = otry!( - readdir - .filter_map(|dir| dir.ok()) - .map(|dir| dir.path()) - .filter(|dir| dir.components() - .last() - .and_then(|c| c.as_os_str().to_str()) - .map(|c| c.starts_with("10.") && dir.join("ucrt").is_dir()) - .unwrap_or(false)) - .max() - ); + let max_libdir = otry!(readdir + .filter_map(|dir| dir.ok()) + .map(|dir| dir.path()) + .filter(|dir| dir + .components() + .last() + .and_then(|c| c.as_os_str().to_str()) + .map(|c| c.starts_with("10.") && dir.join("ucrt").is_dir()) + .unwrap_or(false)) + .max()); let version = max_libdir.components().last().unwrap(); let version = version.as_os_str().to_str().unwrap().to_string(); Some((root.into(), version)) @@ -512,12 +557,11 @@ mod impl_ { .map(|dir| dir.path()) .collect::>(); dirs.sort(); - let dir = otry!( - dirs.into_iter() - .rev() - .filter(|dir| dir.join("um").join("x64").join("kernel32.lib").is_file()) - .next() - ); + let dir = otry!(dirs + .into_iter() + .rev() + .filter(|dir| dir.join("um").join("x64").join("kernel32.lib").is_file()) + .next()); let version = dir.components().last().unwrap(); let version = version.as_os_str().to_str().unwrap().to_string(); Some((root.into(), version)) @@ -654,6 +698,10 @@ mod impl_ { pub fn has_msbuild_version(version: &str) -> bool { match version { + "16.0" => { + find_msbuild_vs16("x86_64-pc-windows-msvc").is_some() + || find_msbuild_vs16("i686-pc-windows-msvc").is_some() + } "15.0" => { find_msbuild_vs15("x86_64-pc-windows-msvc").is_some() || find_msbuild_vs15("i686-pc-windows-msvc").is_some() diff --git a/vendor/cc/tests/cc_env.rs b/vendor/cc/tests/cc_env.rs index f9386d7f59..e862fea7d9 100644 --- a/vendor/cc/tests/cc_env.rs +++ b/vendor/cc/tests/cc_env.rs @@ -2,8 +2,8 @@ extern crate cc; extern crate tempdir; use std::env; -use std::path::Path; use std::ffi::OsString; +use std::path::Path; mod support; use support::Test; @@ -63,14 +63,16 @@ fn ccache_env_flags() { .cflags_env() .into_string() .unwrap() - .contains("ccache") == false + .contains("ccache") + == false ); assert!( compiler .cflags_env() .into_string() .unwrap() - .contains(" lol-this-is-not-a-compiler") == false + .contains(" lol-this-is-not-a-compiler") + == false ); env::set_var("CC", ""); diff --git a/vendor/cc/tests/support/mod.rs b/vendor/cc/tests/support/mod.rs index cae81513b1..72ca3fa97c 100644 --- a/vendor/cc/tests/support/mod.rs +++ b/vendor/cc/tests/support/mod.rs @@ -113,10 +113,12 @@ impl Execution { } pub fn must_have_in_order(&self, before: &str, after: &str) -> &Execution { - let before_position = self.args + let before_position = self + .args .iter() .rposition(|x| OsStr::new(x) == OsStr::new(before)); - let after_position = self.args + let after_position = self + .args .iter() .rposition(|x| OsStr::new(x) == OsStr::new(after)); match (before_position, after_position) { diff --git a/vendor/cc/tests/test.rs b/vendor/cc/tests/test.rs index 573a99a7b8..5147b77cb8 100644 --- a/vendor/cc/tests/test.rs +++ b/vendor/cc/tests/test.rs @@ -115,9 +115,7 @@ fn gnu_warnings_overridable() { fn gnu_no_warnings_if_cflags() { env::set_var("CFLAGS", "-Wflag-does-not-exist"); let test = Test::gnu(); - test.gcc() - .file("foo.c") - .compile("foo"); + test.gcc().file("foo.c").compile("foo"); test.cmd(0).must_not_have("-Wall").must_not_have("-Wextra"); env::set_var("CFLAGS", ""); @@ -127,9 +125,7 @@ fn gnu_no_warnings_if_cflags() { fn gnu_no_warnings_if_cxxflags() { env::set_var("CXXFLAGS", "-Wflag-does-not-exist"); let test = Test::gnu(); - test.gcc() - .file("foo.c") - .compile("foo"); + test.gcc().file("foo.c").compile("foo"); test.cmd(0).must_not_have("-Wall").must_not_have("-Wextra"); env::set_var("CXXFLAGS", ""); diff --git a/vendor/cmake/.cargo-checksum.json b/vendor/cmake/.cargo-checksum.json index 5a0bea1bc6..1b8b0a086d 100644 --- a/vendor/cmake/.cargo-checksum.json +++ b/vendor/cmake/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"00615540fc82b5ccfecbc8c5731dc11f636e5d86ec7dc5c1b65ec42f52d1b40e","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"3dd1a1ffe9549c45a6da83f58069ba8665302714d0c77429c26d4748774f1f9b","src/lib.rs":"93fd92973c23640fb856362ab7aa777b57c7ce4fc5525880c02d38ae9b3b12d2"},"package":"704fbf3bb5149daab0afb255dbea24a1f08d2f4099cedb9baab6d470d4c5eefb"} \ No newline at end of file +{"files":{"Cargo.toml":"e4ffbb39a78f7948351089ccdd2bda917c0e4971081eb9211ca26fe8f5da949c","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"4644bfb37c46739179f9f4e73531df7c3c8a801078e7b8a72e3647d685d87912","src/lib.rs":"dbdde299d03dcf4411774f3c639181062d48626139017fab1491624f52b6a215"},"package":"96210eec534fc3fbfc0452a63769424eaa80205fda6cea98e5b61cb3d97bcec8"} \ No newline at end of file diff --git a/vendor/cmake/Cargo.toml b/vendor/cmake/Cargo.toml index bccd3343ff..2adeb6abbb 100644 --- a/vendor/cmake/Cargo.toml +++ b/vendor/cmake/Cargo.toml @@ -12,14 +12,15 @@ [package] name = "cmake" -version = "0.1.33" +version = "0.1.38" authors = ["Alex Crichton "] description = "A build dependency for running `cmake` to build a native library\n" homepage = "https://github.com/alexcrichton/cmake-rs" documentation = "https://docs.rs/cmake" readme = "README.md" keywords = ["build-dependencies"] +categories = ["development-tools::build-utils"] license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cmake-rs" [dependencies.cc] -version = "1.0" +version = "1.0.32" diff --git a/vendor/cmake/README.md b/vendor/cmake/README.md index 22d1f6ba24..b83a586996 100644 --- a/vendor/cmake/README.md +++ b/vendor/cmake/README.md @@ -1,6 +1,6 @@ # cmake -[![Build Status](https://travis-ci.org/alexcrichton/cmake-rs.svg?branch=master)](https://travis-ci.org/alexcrichton/cmake-rs) +[![Build Status](https://travis-ci.com/alexcrichton/cmake-rs.svg?branch=master)](https://travis-ci.com/alexcrichton/cmake-rs) [Documentation](https://docs.rs/cmake) @@ -30,5 +30,5 @@ at your option. ### Contribution Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in Serde by you, as defined in the Apache-2.0 license, shall be +for inclusion in cmake by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. diff --git a/vendor/cmake/src/lib.rs b/vendor/cmake/src/lib.rs old mode 100755 new mode 100644 index eed8808387..221ac75775 --- a/vendor/cmake/src/lib.rs +++ b/vendor/cmake/src/lib.rs @@ -47,10 +47,10 @@ extern crate cc; use std::env; -use std::ffi::{OsString, OsStr}; +use std::ffi::{OsStr, OsString}; use std::fs::{self, File}; -use std::io::ErrorKind; use std::io::prelude::*; +use std::io::ErrorKind; use std::path::{Path, PathBuf}; use std::process::Command; @@ -148,9 +148,12 @@ impl Config { /// Adds a new `-D` flag to pass to cmake during the generation step. pub fn define(&mut self, k: K, v: V) -> &mut Config - where K: AsRef, V: AsRef + where + K: AsRef, + V: AsRef, { - self.defines.push((k.as_ref().to_owned(), v.as_ref().to_owned())); + self.defines + .push((k.as_ref().to_owned(), v.as_ref().to_owned())); self } @@ -229,10 +232,12 @@ impl Config { /// Configure an environment variable for the `cmake` processes spawned by /// this crate in the `build` step. pub fn env(&mut self, key: K, value: V) -> &mut Config - where K: AsRef, - V: AsRef, + where + K: AsRef, + V: AsRef, { - self.env.push((key.as_ref().to_owned(), value.as_ref().to_owned())); + self.env + .push((key.as_ref().to_owned(), value.as_ref().to_owned())); self } @@ -286,19 +291,19 @@ impl Config { t } }; - let host = self.host.clone().unwrap_or_else(|| { - getenv_unwrap("HOST") - }); + let host = self.host.clone().unwrap_or_else(|| getenv_unwrap("HOST")); let msvc = target.contains("msvc"); let mut c_cfg = cc::Build::new(); - c_cfg.cargo_metadata(false) + c_cfg + .cargo_metadata(false) .opt_level(0) .debug(false) .target(&target) .warnings(false) .host(&host); let mut cxx_cfg = cc::Build::new(); - cxx_cfg.cargo_metadata(false) + cxx_cfg + .cargo_metadata(false) .cpp(true) .opt_level(0) .debug(false) @@ -312,9 +317,10 @@ impl Config { let c_compiler = c_cfg.get_compiler(); let cxx_compiler = cxx_cfg.get_compiler(); - let dst = self.out_dir.clone().unwrap_or_else(|| { - PathBuf::from(getenv_unwrap("OUT_DIR")) - }); + let dst = self + .out_dir + .clone() + .unwrap_or_else(|| PathBuf::from(getenv_unwrap("OUT_DIR"))); let build = dst.join("build"); self.maybe_clear(&build); let _ = fs::create_dir(&build); @@ -327,23 +333,24 @@ impl Config { cmake_prefix_path.push(PathBuf::from(root)); } } - let system_prefix = env::var_os("CMAKE_PREFIX_PATH") - .unwrap_or(OsString::new()); - cmake_prefix_path.extend(env::split_paths(&system_prefix) - .map(|s| s.to_owned())); + let system_prefix = env::var_os("CMAKE_PREFIX_PATH").unwrap_or(OsString::new()); + cmake_prefix_path.extend(env::split_paths(&system_prefix).map(|s| s.to_owned())); let cmake_prefix_path = env::join_paths(&cmake_prefix_path).unwrap(); // Build up the first cmake command to build the build system. let executable = env::var("CMAKE").unwrap_or("cmake".to_owned()); - let mut cmd = Command::new(executable); + let mut cmd = Command::new(&executable); if self.verbose_cmake { cmd.arg("-Wdev"); cmd.arg("--debug-output"); } - cmd.arg(&self.path) - .current_dir(&build); + cmd.arg(&self.path).current_dir(&build); + let mut is_ninja = false; + if let Some(ref generator) = self.generator { + is_ninja = generator.to_string_lossy().contains("Ninja"); + } if target.contains("windows-gnu") { if host.contains("windows") { // On MinGW we need to coerce cmake to not generate a visual @@ -353,10 +360,18 @@ impl Config { // If make.exe isn't found, that means we may be using a MinGW // toolchain instead of a MSYS2 toolchain. If neither is found, // the build cannot continue. - let has_msys2 = Command::new("make").arg("--version").output().err() - .map(|e| e.kind() != ErrorKind::NotFound).unwrap_or(true); - let has_mingw32 = Command::new("mingw32-make").arg("--version").output().err() - .map(|e| e.kind() != ErrorKind::NotFound).unwrap_or(true); + let has_msys2 = Command::new("make") + .arg("--version") + .output() + .err() + .map(|e| e.kind() != ErrorKind::NotFound) + .unwrap_or(true); + let has_mingw32 = Command::new("mingw32-make") + .arg("--version") + .output() + .err() + .map(|e| e.kind() != ErrorKind::NotFound) + .unwrap_or(true); let generator = match (has_msys2, has_mingw32) { (true, _) => "MSYS Makefiles", @@ -391,8 +406,16 @@ impl Config { // If we're on MSVC we need to be sure to use the right generator or // otherwise we won't get 32/64 bit correct automatically. // This also guarantees that NMake generator isn't chosen implicitly. + let using_nmake_generator; if self.generator.is_none() { cmd.arg("-G").arg(self.visual_studio_generator(&target)); + using_nmake_generator = false; + } else { + using_nmake_generator = self.generator.as_ref().unwrap() == "NMake Makefiles"; + } + if target.contains("x86_64") && !is_ninja && !using_nmake_generator { + cmd.arg("-Thost=x64"); + cmd.arg("-DCMAKE_GENERATOR_PLATFORM=x64"); } } else if target.contains("redox") { if !self.defined("CMAKE_SYSTEM_NAME") { @@ -403,10 +426,8 @@ impl Config { cmd.arg("-DCMAKE_SYSTEM_NAME=SunOS"); } } - let mut is_ninja = false; if let Some(ref generator) = self.generator { cmd.arg("-G").arg(generator); - is_ninja = generator.to_string_lossy().contains("Ninja"); } let profile = self.profile.clone().unwrap_or_else(|| { // Automatically set the `CMAKE_BUILD_TYPE` if the user did not @@ -458,10 +479,7 @@ impl Config { "false" => false, "true" => true, unknown => { - eprintln!( - "Warning: unknown debug={}; defaulting to `true`.", - unknown - ); + eprintln!("Warning: unknown debug={}; defaulting to `true`.", unknown); true } }; @@ -487,26 +505,24 @@ impl Config { cmd.arg(dstflag); } - let build_type = self.defines.iter().find(|&&(ref a, _)| { - a == "CMAKE_BUILD_TYPE" - }).map(|x| x.1.to_str().unwrap()).unwrap_or(&profile); - let build_type_upcase = build_type.chars() - .flat_map(|c| c.to_uppercase()) - .collect::(); + let build_type = self + .defines + .iter() + .find(|&&(ref a, _)| a == "CMAKE_BUILD_TYPE") + .map(|x| x.1.to_str().unwrap()) + .unwrap_or(&profile); + let build_type_upcase = build_type + .chars() + .flat_map(|c| c.to_uppercase()) + .collect::(); { // let cmake deal with optimization/debuginfo - let skip_arg = |arg: &OsStr| { - match arg.to_str() { - Some(s) => { - s.starts_with("-O") || s.starts_with("/O") || s == "-g" - } - None => false, - } + let skip_arg = |arg: &OsStr| match arg.to_str() { + Some(s) => s.starts_with("-O") || s.starts_with("/O") || s == "-g", + None => false, }; - let mut set_compiler = |kind: &str, - compiler: &cc::Tool, - extra: &OsString| { + let mut set_compiler = |kind: &str, compiler: &cc::Tool, extra: &OsString| { let flag_var = format!("CMAKE_{}_FLAGS", kind); let tool_var = format!("CMAKE_{}_COMPILER", kind); if !self.defined(&flag_var) { @@ -516,7 +532,7 @@ impl Config { flagsflag.push(extra); for arg in compiler.args() { if skip_arg(arg) { - continue + continue; } flagsflag.push(" "); flagsflag.push(arg); @@ -532,8 +548,7 @@ impl Config { // Note that for other generators, though, this *overrides* // things like the optimization flags, which is bad. if self.generator.is_none() && msvc { - let flag_var_alt = format!("CMAKE_{}_FLAGS_{}", kind, - build_type_upcase); + let flag_var_alt = format!("CMAKE_{}_FLAGS_{}", kind, build_type_upcase); if !self.defined(&flag_var_alt) { let mut flagsflag = OsString::from("-D"); flagsflag.push(&flag_var_alt); @@ -541,7 +556,7 @@ impl Config { flagsflag.push(extra); for arg in compiler.args() { if skip_arg(arg) { - continue + continue; } flagsflag.push(" "); flagsflag.push(arg); @@ -561,19 +576,27 @@ impl Config { // as it's not needed for MSVC with Visual Studio generators and // for MinGW it doesn't really vary. if !self.defined("CMAKE_TOOLCHAIN_FILE") - && !self.defined(&tool_var) - && (env::consts::FAMILY != "windows" || (msvc && is_ninja)) { + && !self.defined(&tool_var) + && (env::consts::FAMILY != "windows" || (msvc && is_ninja)) + { let mut ccompiler = OsString::from("-D"); ccompiler.push(&tool_var); ccompiler.push("="); ccompiler.push(find_exe(compiler.path())); - #[cfg(windows)] { + #[cfg(windows)] + { // CMake doesn't like unescaped `\`s in compiler paths // so we either have to escape them or replace with `/`s. use std::os::windows::ffi::{OsStrExt, OsStringExt}; - let wchars = ccompiler.encode_wide().map(|wchar| { - if wchar == b'\\' as u16 { '/' as u16 } else { wchar } - }).collect::>(); + let wchars = ccompiler + .encode_wide() + .map(|wchar| { + if wchar == b'\\' as u16 { + '/' as u16 + } else { + wchar + } + }).collect::>(); ccompiler = OsString::from_wide(&wchars); } cmd.arg(ccompiler); @@ -609,34 +632,38 @@ impl Config { } let mut makeflags = None; - let mut parallel_args = Vec::new(); + let mut parallel_flags = None; + if let Ok(s) = env::var("NUM_JOBS") { match self.generator.as_ref().map(|g| g.to_string_lossy()) { Some(ref g) if g.contains("Ninja") => { - parallel_args.push(format!("-j{}", s)); + parallel_flags = Some(format!("-j{}", s)); } Some(ref g) if g.contains("Visual Studio") => { - parallel_args.push(format!("/m:{}", s)); + parallel_flags = Some(format!("/m:{}", s)); } Some(ref g) if g.contains("NMake") => { // NMake creates `Makefile`s, but doesn't understand `-jN`. } - _ if fs::metadata(&dst.join("build/Makefile")).is_ok() => { + _ if fs::metadata(&build.join("Makefile")).is_ok() => { match env::var_os("CARGO_MAKEFLAGS") { // Only do this on non-windows and non-bsd // On Windows, we could be invoking make instead of // mingw32-make which doesn't work with our jobserver // bsdmake also does not work with our job server - Some(ref s) if !(cfg!(windows) || - cfg!(target_os = "openbsd") || - cfg!(target_os = "netbsd") || - cfg!(target_os = "freebsd") || - cfg!(target_os = "bitrig") || - cfg!(target_os = "dragonflybsd") - ) => makeflags = Some(s.clone()), + Some(ref s) + if !(cfg!(windows) + || cfg!(target_os = "openbsd") + || cfg!(target_os = "netbsd") + || cfg!(target_os = "freebsd") + || cfg!(target_os = "bitrig") + || cfg!(target_os = "dragonflybsd")) => + { + makeflags = Some(s.clone()) + } // This looks like `make`, let's hope it understands `-jN`. - _ => parallel_args.push(format!("-j{}", s)), + _ => makeflags = Some(OsString::from(format!("-j{}", s))), } } _ => {} @@ -645,10 +672,11 @@ impl Config { // And build! let target = self.cmake_target.clone().unwrap_or("install".to_string()); - let mut cmd = Command::new("cmake"); + let mut cmd = Command::new(&executable); for &(ref k, ref v) in c_compiler.env().iter().chain(&self.env) { cmd.env(k, v); } + if let Some(flags) = makeflags { cmd.env("MAKEFLAGS", flags); } @@ -658,33 +686,40 @@ impl Config { if !self.no_build_target { cmd.arg("--target").arg(target); } - cmd.arg("--config").arg(&profile) - .arg("--").args(&self.build_args) - .args(¶llel_args) + + cmd.arg("--config") + .arg(&profile) + .arg("--") + .args(&self.build_args) .current_dir(&build); + if let Some(flags) = parallel_flags { + cmd.arg(flags); + } + run(&mut cmd, "cmake"); println!("cargo:root={}", dst.display()); - return dst + return dst; } fn visual_studio_generator(&self, target: &str) -> String { use cc::windows_registry::{find_vs_version, VsVers}; let base = match find_vs_version() { + Ok(VsVers::Vs16) => "Visual Studio 16 2019", Ok(VsVers::Vs15) => "Visual Studio 15 2017", Ok(VsVers::Vs14) => "Visual Studio 14 2015", Ok(VsVers::Vs12) => "Visual Studio 12 2013", - Ok(_) => panic!("Visual studio version detected but this crate \ - doesn't know how to generate cmake files for it, \ - can the `cmake` crate be updated?"), + Ok(_) => panic!( + "Visual studio version detected but this crate \ + doesn't know how to generate cmake files for it, \ + can the `cmake` crate be updated?" + ), Err(msg) => panic!(msg), }; - if target.contains("i686") { + if target.contains("i686") || target.contains("x86_64") { base.to_string() - } else if target.contains("x86_64") { - format!("{} Win64", base) } else { panic!("unsupported msvc target: {}", target); } @@ -721,20 +756,20 @@ impl Config { for line in contents.lines() { if line.starts_with("CMAKE_HOME_DIRECTORY") { let needs_cleanup = match line.split('=').next_back() { - Some(cmake_home) => { - fs::canonicalize(cmake_home) - .ok() - .map(|cmake_home| cmake_home != path) - .unwrap_or(true) - }, - None => true + Some(cmake_home) => fs::canonicalize(cmake_home) + .ok() + .map(|cmake_home| cmake_home != path) + .unwrap_or(true), + None => true, }; if needs_cleanup { - println!("detected home dir change, cleaning out entire build \ - directory"); + println!( + "detected home dir change, cleaning out entire build \ + directory" + ); fs::remove_dir_all(dir).unwrap(); } - break + break; } } } @@ -745,13 +780,18 @@ fn run(cmd: &mut Command, program: &str) { let status = match cmd.status() { Ok(status) => status, Err(ref e) if e.kind() == ErrorKind::NotFound => { - fail(&format!("failed to execute command: {}\nis `{}` not installed?", - e, program)); + fail(&format!( + "failed to execute command: {}\nis `{}` not installed?", + e, program + )); } Err(e) => fail(&format!("failed to execute command: {}", e)), }; if !status.success() { - fail(&format!("command did not execute successfully, got: {}", status)); + fail(&format!( + "command did not execute successfully, got: {}", + status + )); } } diff --git a/vendor/compiler_builtins/.cargo-checksum.json b/vendor/compiler_builtins/.cargo-checksum.json index 86522eb015..8d95014195 100644 --- a/vendor/compiler_builtins/.cargo-checksum.json +++ b/vendor/compiler_builtins/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"41938c5a0b9499e6d0a37d9657b0e83b5b801af102dd12a4bdbd77e5ba4e9796","README.md":"3f38d798ea61e2e6fb402c0a5c46a882de3195dd28dee884b4ec87577379176d","build.rs":"0493ec3b0c127f2becb2e722315fd80b9de66976af0032846b660d6ed2cad9d6","compiler-rt/CMakeLists.txt":"568a3cde0581ad2a5dc21194faa770d45b6ff6fb52454b6f13690132eb8a5156","compiler-rt/CODE_OWNERS.TXT":"dbb19a1c9d46abc77fe5e8debab8be7c0fcc8782b19a079b069eaeee577d27dd","compiler-rt/CREDITS.TXT":"a9901f47a089da41e4690682d00ce4cedaa2baf41fedbe79beee366d43ac2461","compiler-rt/LICENSE.TXT":"417541d990edb3f96327ac03cb67e52eac80fc5c3e7afc69213cd04d7c3b9b27","compiler-rt/README.txt":"a9ed6807100a66fd5e44d4af4a2bf2cb25c9243c896e7bf1d4941b7353b388e3","compiler-rt/cmake/Modules/AddCompilerRT.cmake":"74ddde5202c51227972a7aacf66ac2db3c8ab0a5854a46a637455e2672865a63","compiler-rt/cmake/Modules/BuiltinTests.cmake":"641fd9c2af65f82a58288d5b6fa36aed4d2fcc88199eb0f04d8b28c38dc950cd","compiler-rt/cmake/Modules/CompilerRTCompile.cmake":"c0b080898ac46d97a14b902bae5b9055592064ab38b3bdb0b8c7671c06a6d3c1","compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake":"abc4850b332a543d1e2641d488f308e9a3b06934225a71a7f342ed3aaf2d10af","compiler-rt/cmake/Modules/CompilerRTLink.cmake":"c4c98662f8737346dcf9b5f593f59cf1042a4c774f622bd4b6151419382db39f","compiler-rt/cmake/Modules/CompilerRTUtils.cmake":"26c2e23dfd0fcb2cfa428db3108a69fd3e214188cb0dce92f49d41d3eb4e7533","compiler-rt/cmake/Modules/HandleCompilerRT.cmake":"5c273371b6cb7f3954bd02aed8b0e033733eca57dbd853839bc929c2ca8aa418","compiler-rt/cmake/Modules/SanitizerUtils.cmake":"5c79a6e38e5a912929e6df0ff1330bb55613ce769053857e7aef80dedeaa44f3","compiler-rt/cmake/base-config-ix.cmake":"811dfa58b01714ad58f1c64e3db60d5a8bba4fc68bb21e5f16991ae31d44b217","compiler-rt/cmake/builtin-config-ix.cmake":"e754daf608a556570351f050198380a4890def79d0b5efb557e3462f4d9c1908","compiler-rt/cmake/caches/Apple.cmake":"a897653dba4e944718d527585400fbb7b5475fbbc36f5319bc7f0d15eb7d0388","compiler-rt/cmake/config-ix.cmake":"90fb6774e28b53ae3b7658844b35d3a776ebd137f94b816eb24f68f6a3afe311","compiler-rt/docs/TestingGuide.rst":"c7d5231cca745b3243cca475d36e8fabb082c04c005c03c800f3acf86379d083","compiler-rt/include/CMakeLists.txt":"8e5585f6fdc02a323009e6e333d34d5452c1637758fdde721c03a7a7a45a7082","compiler-rt/include/sanitizer/allocator_interface.h":"9d7d062b4201fac55a6c9e7e18e99b14ee8d5665023bf13e6fbc5b810fe68c79","compiler-rt/include/sanitizer/asan_interface.h":"4095d321d4ffddd115b4aef35f913406aa2fabab0505e61b2732002b9845b196","compiler-rt/include/sanitizer/common_interface_defs.h":"8fa2b072a216020088b7409452f31da63c3ed655c3b02bbe9c00fd1638c8b14b","compiler-rt/include/sanitizer/coverage_interface.h":"101c19dd8527ed7e2c0dfef11d4d4e2bf2f6b160fac85eef436ed7987caae87d","compiler-rt/include/sanitizer/dfsan_interface.h":"dc04e69c0b2ec232ca313bd9a6a621212e45bb09eca9999a8fde05683f0c215a","compiler-rt/include/sanitizer/esan_interface.h":"1257d5b25e3a702e680716ed264c1a7f7a336cad6330d6d4dad7817c73477246","compiler-rt/include/sanitizer/hwasan_interface.h":"f4dc1d6905e4f48bac69ffdf7951a945d66f267815687c81a778b25e8228b09a","compiler-rt/include/sanitizer/linux_syscall_hooks.h":"dfce13bcf64cf16cacdd18c7a4f6ef04f53164420e4990d78f8b74b4929b23e6","compiler-rt/include/sanitizer/lsan_interface.h":"3794f8440c725da7a8cfbf9742deb338d69d36d144861d4701f9ec8a82ba60b1","compiler-rt/include/sanitizer/msan_interface.h":"7bc0c5202be7927d08956410fd0a97ce1982fe859eabf02e4dbe85b3cd280427","compiler-rt/include/sanitizer/netbsd_syscall_hooks.h":"c42a300f16fb06b3aa5ea251653c57a5ff7a8c6b3200a996be60d9ba33d04b71","compiler-rt/include/sanitizer/scudo_interface.h":"e8bf7631ce91ddd85b25c65a69d631b2cfcb7172106847110c0cc38e9795445f","compiler-rt/include/sanitizer/tsan_interface.h":"34b8b45aabbd093aea036124cfaeb82554cb4990f0136df30899bf8228cdd85b","compiler-rt/include/sanitizer/tsan_interface_atomic.h":"2d920db3ab242be9f5ef9dc1118694e9f9a42d97ce7338470afbce56a5ca93b7","compiler-rt/include/xray/xray_interface.h":"d8bc74260861b7144be17e8a6a66614e778b7190257d9649a3b114aba1bfca3e","compiler-rt/include/xray/xray_log_interface.h":"9c5fc5d466c2dce1d969012db1fbbde0714e5a475bc47c8628fdbf356ef430a7","compiler-rt/include/xray/xray_records.h":"1a84caf4427d0b24677542aa52349760e2af98dcac3537a971c111115f76833b","compiler-rt/lib/BlocksRuntime/Block.h":"b9865a1ced1d282626221af7bdb28c23378d788afeb43dfb80cd8014bb712034","compiler-rt/lib/BlocksRuntime/Block_private.h":"e29e0f94e4b544d65c0711cb20907411bb3674b1714efcfd2a42b07ae8817992","compiler-rt/lib/BlocksRuntime/data.c":"cce2ba6f5366fa59470cda56617aae97edca07753370335b28f7a702bb50fc29","compiler-rt/lib/BlocksRuntime/runtime.c":"30acfda75c053f720664cac4819455dc0060dfbc20f1cf5fb6966399c9a9e578","compiler-rt/lib/CMakeLists.txt":"b3a1a1542d28ab7192bac832db96c312fbb8cdedce8d3cc987b2af3b20e79420","compiler-rt/lib/asan/CMakeLists.txt":"47998074f2714d0598d135dcedc203006875c7dfe9019c4a73a7fabd8cb62d73","compiler-rt/lib/asan/README.txt":"4d17f7ef57c4e2d8338f5bf1e3fd22926fde239b0582c2f5a89d2f2d33f13fb4","compiler-rt/lib/asan/asan.syms.extra":"507d8973e1873100c81378b53ca6c425571d5344f68d3d6ecefe1ff43e30407f","compiler-rt/lib/asan/asan_activation.cc":"7311744032b9f42188b5f5611c426e0dc13af17b8dce1b5a8aa54116b29d1a2c","compiler-rt/lib/asan/asan_activation.h":"066ff58f0e43d4f803ba40cd2d46de6c4f7ba629ac582de4c2583ae33a5f9cc3","compiler-rt/lib/asan/asan_activation_flags.inc":"d8102de4692e05b7f9e82e93f1d2c3535567ebecad992024fd48f41532d41e3d","compiler-rt/lib/asan/asan_allocator.cc":"3d761de4fce61e2d285308b669abffb388d5a1b32910e23012b96bfae7a5c32a","compiler-rt/lib/asan/asan_allocator.h":"0f24a61351f91b7b3f778e6ed5eb975f94bfcf947eab83e18f9ad1168afdc109","compiler-rt/lib/asan/asan_blacklist.txt":"ef4a392b1c674df1c18586d45cf9c9d64ca55c554360ac8cd2f5ca1efaadc0c8","compiler-rt/lib/asan/asan_debugging.cc":"e52fa6543a3dab4b0c0efeb03646c98b8542a0cc3e2a1dd94da0dd24eeda4b34","compiler-rt/lib/asan/asan_descriptions.cc":"648db697837641b8202ba685613266534f9dbd7d7bc83e3dc3fb9710d2193027","compiler-rt/lib/asan/asan_descriptions.h":"37d6cd267965f14de0495c00cdeedf87be37cb72c5f2208d2678ef8ddfcb259e","compiler-rt/lib/asan/asan_errors.cc":"66f5ea4415b244efb5048c2df2c91304612698a927b97fd038a82ea2ef828376","compiler-rt/lib/asan/asan_errors.h":"bb3ed2c5c89d7334b789e2c148629750c980ac25e32527136532f57bfc2b2ee6","compiler-rt/lib/asan/asan_fake_stack.cc":"f39ee86d49352aadaf61dce4aba38a26ff94aa98832852cee5351cd7e628d44a","compiler-rt/lib/asan/asan_fake_stack.h":"5a99fde6fbb4ea56128388e759d14fa2160eb8a225d44b000db65d9baf69fdbd","compiler-rt/lib/asan/asan_flags.cc":"43a0115703cd51133e23077236e3288feb4354b325ba9962670d47d5219e7b53","compiler-rt/lib/asan/asan_flags.h":"443732afb5d6c945630acaf14e2c246d8236a312b9ab7bd85ae64d50a6125d3c","compiler-rt/lib/asan/asan_flags.inc":"ec37e97de82d2f1765c4d7cc1a45919984ff9429e4046f8b197feb17889151de","compiler-rt/lib/asan/asan_fuchsia.cc":"b481126a63e81c9a1324e5d6e278644b951ec5463bba4fdb2a21e4529e7fe8bf","compiler-rt/lib/asan/asan_globals.cc":"8b76ad965e5028d6b0b34b9a2818c20322ca4a56d5ac3ecce4322a166807fe40","compiler-rt/lib/asan/asan_globals_win.cc":"6c9c1823220ee106d74732bda35706935ca9150b1671a6b92441734a54e0244e","compiler-rt/lib/asan/asan_init_version.h":"0c24b7422e94a73315220ca359245162560723d0c00ad131091f2e33463e81de","compiler-rt/lib/asan/asan_interceptors.cc":"5ea5892203870cab6631bb761f008602ea2a3e7db1a136c5072fb5eb32fd1c13","compiler-rt/lib/asan/asan_interceptors.h":"ccc92f8784f28813818815d20e527a01fa150ce9a751ca6b76974c3b0def897d","compiler-rt/lib/asan/asan_interceptors_memintrinsics.cc":"6929398bc67e2530ffd69be4f2b4603284f60e733a452ef850e74d4ccab8cc61","compiler-rt/lib/asan/asan_interceptors_memintrinsics.h":"561f08a9cb9aff5abbe977ac50c0be458cf1ec5b0156fa0d0cb97f223ca30ed4","compiler-rt/lib/asan/asan_interface.inc":"ebca3bf6301e2a4cf2db3a5a4f76d6ced46c45b90202409a4ba160cc87a89d26","compiler-rt/lib/asan/asan_interface_internal.h":"9dd1f47faa4f46aaf7bb924e77af83dd807a9a893f8c768ffdc423393b6402d1","compiler-rt/lib/asan/asan_internal.h":"2dbc4c31b64f7fddbf99e1c0c42056a3c551775330bd3687f4db696bb3ba2722","compiler-rt/lib/asan/asan_linux.cc":"3b3ee9065aaa15072f132417ec48a2afb65c107fe56f4f15430b1dfd105b12fa","compiler-rt/lib/asan/asan_lock.h":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/lib/asan/asan_mac.cc":"53aadb2ac3558c4186ef2aef0021c74066864bac92070c038ab7af9659748c9a","compiler-rt/lib/asan/asan_malloc_linux.cc":"3390b68b217dfc4052f9cff85a9c3ad8dd1fa8ef275f7dd2ab1bb0fcc31c4e58","compiler-rt/lib/asan/asan_malloc_local.h":"595c6c331714d3ecb48dee2b7ce51fd57b58584517d0c76998cee1e32f693c27","compiler-rt/lib/asan/asan_malloc_mac.cc":"bf4800b17f947d2982dbc6c9df9725577bbfb5cbd816ff8fa8a2c3f5e4cbf96b","compiler-rt/lib/asan/asan_malloc_win.cc":"b13fd57c9bdd301a0cbc192fd3ee0b6d8c5a091049f8aec6947343482800a518","compiler-rt/lib/asan/asan_mapping.h":"2503778a25def18674e679fedf0dc01d58d83a9f231a0696dd874b20fa6d3b01","compiler-rt/lib/asan/asan_mapping_myriad.h":"0bf84b6b5dd76f8d2c50e3e440bfd6068ca9cee1aa7ca1773c55fb8706f4ed17","compiler-rt/lib/asan/asan_memory_profile.cc":"48881dff529b1630583f2cbc3d09c309574f17f59062cf2fbed0e984e9af7879","compiler-rt/lib/asan/asan_new_delete.cc":"e28b8724fb1231b06c70167c24415c6adecc13f71e1c49cb446ab7f8327f16d7","compiler-rt/lib/asan/asan_poisoning.cc":"d53d062e146e9c89df10190d67b48e184944814da489832e61c708ee188d0eeb","compiler-rt/lib/asan/asan_poisoning.h":"df629899b4cccebc14e4d93b14044ca0ac12166790fdd4e9b5886f62e49abd4e","compiler-rt/lib/asan/asan_posix.cc":"52f5ff901b587e04f3b5e6478378bc7567df623c2d0b604f4250c5ab9be9d91f","compiler-rt/lib/asan/asan_preinit.cc":"b61836e9cd8963b0495aa062e79fc72aa57c7f9d00d0df86537514ec24abf425","compiler-rt/lib/asan/asan_premap_shadow.cc":"f2b131a19f5f564200c1ba912d7a8e9545b4e1fc8847bbda72d951a2d6d7ca68","compiler-rt/lib/asan/asan_premap_shadow.h":"3f352441ee2ad2649e58370d0d30e199efcd4536d965111a96b515b52aee15b5","compiler-rt/lib/asan/asan_report.cc":"05c857df5bfac34bdfea638f8cdb71aae82be96e40a05ad2b68eec556a95247e","compiler-rt/lib/asan/asan_report.h":"87f55be81195ac2911917bd2cf6478f89e67e73fef2e5d1e9d0c8ee993b92e47","compiler-rt/lib/asan/asan_rtems.cc":"c7b65ce214e00d8fe3ce02704e8eff53970f9843bf52a4a4c2c954467021a887","compiler-rt/lib/asan/asan_rtl.cc":"2f05c12707b402c07ae6d34483facad051c66c7c79f9be373e86fc0a86f9abb4","compiler-rt/lib/asan/asan_scariness_score.h":"1960f7c34cc7aeec5d0a0e81803ef0c10cfce891abe5744e99d756a48bee7898","compiler-rt/lib/asan/asan_shadow_setup.cc":"22c4ea97cde550cefa71d8d29df0be08da4954dfe9ad11c49bc6e80f9801d7ab","compiler-rt/lib/asan/asan_stack.cc":"de9acc8e7168e7ac2792e2f6aa63de804a34b4e71882c6592dac7190147e7617","compiler-rt/lib/asan/asan_stack.h":"c4c7e4c2f489b4d73b3f1228cba5ba71bdac7c869227505e8048a17ba9a93498","compiler-rt/lib/asan/asan_stats.cc":"6979e6bcd27d8b6752f7df10c75db03cea5b20c9c4a1cc8508dc8b63641ac046","compiler-rt/lib/asan/asan_stats.h":"6abc3acc14f4dedcc2110aba079d53d29c549772d7a526999ac75c024ea5ac9a","compiler-rt/lib/asan/asan_suppressions.cc":"001ffca13909cca1fe0129ba40ca641b17aa4d950fa300fb4c115c6c5033020c","compiler-rt/lib/asan/asan_suppressions.h":"d777af9b2b8cbac05a2da0f70b2b77061b3b83fe92db257cf1ec9633fb427479","compiler-rt/lib/asan/asan_thread.cc":"259ec6f06fc95ec1f84584d05fd1a310f25ea0044c8915edd12f4836540e9d3b","compiler-rt/lib/asan/asan_thread.h":"5032a282081972687269ea029f1d7de347f8f2d20aa3470eefcf3ccda8801e34","compiler-rt/lib/asan/asan_win.cc":"b2db1dfb1e38843f89681cdc3ec1339c2ac36981eba9a74da220c90b9a8acaab","compiler-rt/lib/asan/asan_win_dll_thunk.cc":"0b05482b76f4c0bc4439f6b593f5868f98cfc9923974cfca802c2bd0135baeea","compiler-rt/lib/asan/asan_win_dynamic_runtime_thunk.cc":"548535728e1c91995a29e3478c5b34328d5a7033f7a0100b1c809661fe06482b","compiler-rt/lib/asan/asan_win_weak_interception.cc":"0547c0e2e89e606995322f36c71ac7c645b2a3f63bcb2939336722c2c0354e3d","compiler-rt/lib/asan/scripts/CMakeLists.txt":"c58b0d37893c6d73ec48960533d42c6f7ebd59d1da015263ebae9bd5685137e6","compiler-rt/lib/asan/scripts/asan_device_setup":"cb456795ed40d48aef01c1b5fb18010b0735ba728459e2e83486bcd07ebac5b3","compiler-rt/lib/asan/scripts/asan_symbolize.py":"a18eeaeb00c40100a4d0effcf266309b9a13bb4425135239260a82159ba21dd5","compiler-rt/lib/asan/tests/CMakeLists.txt":"51984e4f4ffb0f9483c5971af2b94bce5e57aa035932773e48b0b27d34664f78","compiler-rt/lib/asan/tests/asan_asm_test.cc":"f9802a1ec957587a8b7890da473bb1755862d311ef7ff5e7ea114ce50fd755db","compiler-rt/lib/asan/tests/asan_benchmarks_test.cc":"9cb91229e19348bcf722472ac26e63c9270889a401bafb89806a7d3078dac078","compiler-rt/lib/asan/tests/asan_exceptions_test.cc":"e68cc84f0c863736887dd1e97961a98816d3a4f80f4276d69138242f7d9e3b3c","compiler-rt/lib/asan/tests/asan_fake_stack_test.cc":"972c38ceaa3a9d1df22176e71cadd8b3fe3a1c38496dd1df0860b9ba465e42fc","compiler-rt/lib/asan/tests/asan_globals_test.cc":"ba8cd948d6d0f9c59522fb63d4f6f5007c10f3e1d88232695e0b0e676dd05fff","compiler-rt/lib/asan/tests/asan_interface_test.cc":"3b78c4048db28256729d4f226dd40f414e6be23698d90cc01a3f9f2c12129939","compiler-rt/lib/asan/tests/asan_internal_interface_test.cc":"b04160c7af365d167561e22ea2d79d1b5c3647e02859e20d5fd37bac1b611374","compiler-rt/lib/asan/tests/asan_mac_test.cc":"b06c9b993ece9b83f7e8e3b2f0ea542e5927567831a8138b1477bf6d958a4209","compiler-rt/lib/asan/tests/asan_mac_test.h":"4783e45dae3f3df18f0cfccc871d6903c1d4fa3ef834202f0a76201e0b0c5ddf","compiler-rt/lib/asan/tests/asan_mac_test_helpers.mm":"76c6ca8b11dad30fdb7c1f324733f65729fde14c923b972fe7d3aeda0f6a1406","compiler-rt/lib/asan/tests/asan_mem_test.cc":"bc742b67887d707fe557fdc6321157f5e3d0e287880c96a9d2484b98439490f4","compiler-rt/lib/asan/tests/asan_noinst_test.cc":"6abb664e6449986037727c3637852582b4627d90e45a32844b914850cc6cae80","compiler-rt/lib/asan/tests/asan_oob_test.cc":"df7749b50f0e659c50673b25036e8e274a9e10b9767d9543f8c70d65f3b29c8b","compiler-rt/lib/asan/tests/asan_racy_double_free_test.cc":"6c7680a0923e6b9343760afce39a1209574b46b019a6e3055843656fbb474ead","compiler-rt/lib/asan/tests/asan_str_test.cc":"a6b84ba027a88e7ab8355469be46a843ac4929844901a4f3fa91a78624f8df9c","compiler-rt/lib/asan/tests/asan_test.cc":"363768e7f5db8f3958969f82e359f5f16d8030c57a054473b182ba43e0a439c8","compiler-rt/lib/asan/tests/asan_test.ignore":"8c9a0db1016499cef5ebce45962fb0f7705677d9de3e6afce65bc0b21c61dea6","compiler-rt/lib/asan/tests/asan_test_config.h":"5b1c6d66dc6515a6dae75e6946d7230c8259ffb03366bd44d97b9fe7be14b0d4","compiler-rt/lib/asan/tests/asan_test_main.cc":"06b5ca6b35b63fc2d1706f5b8b88d15aa32e7c93ffda5194471eb285dbe25e61","compiler-rt/lib/asan/tests/asan_test_utils.h":"a900eb76c9e8c745f8dcbcee7be8c6fe9493c3faf6060965df16d50ff277887b","compiler-rt/lib/asan/weak_symbols.txt":"193e509bc20c2080670af7c15b2c0f5310705d8cb78427820cbacbe106f0fa35","compiler-rt/lib/builtins/CMakeLists.txt":"e35ec46465f43e5a58ff8bdeb62eab075e1332012d257dbcab241f4bc31752f4","compiler-rt/lib/builtins/Darwin-excludes/CMakeLists.txt":"00620fa370283794db606c2e574a804966fe6e744af542fa55e859c0462ce8ce","compiler-rt/lib/builtins/Darwin-excludes/README.TXT":"2811ddc8b31dde26103121e4ca07b87077990f72aa28ce230036a76886361a5d","compiler-rt/lib/builtins/Darwin-excludes/ios-armv7.txt":"8b802f7ce458a237fab3f099b6586453818c03605163644cb4afa46864c61d74","compiler-rt/lib/builtins/Darwin-excludes/ios-armv7s.txt":"43a4d5724f8d71c0997f86de6b6dd91e293f19a369e5dd6039aa7ce1f4085039","compiler-rt/lib/builtins/Darwin-excludes/ios.txt":"e98a35679756787a50ede9344956b2da8a3bb13348e7791e4daeb725cc885b32","compiler-rt/lib/builtins/Darwin-excludes/ios6-armv7.txt":"d1159eda53c3ecb36440da3a162ca3fb3c80e72150b3c32c129f5154790e6508","compiler-rt/lib/builtins/Darwin-excludes/ios6-armv7s.txt":"d1159eda53c3ecb36440da3a162ca3fb3c80e72150b3c32c129f5154790e6508","compiler-rt/lib/builtins/Darwin-excludes/ios7-arm64.txt":"b9d8102693c4752ffd1fabafd42412565fe482b1e87cd2b77822e3daf853dabd","compiler-rt/lib/builtins/Darwin-excludes/iossim-i386.txt":"8d4cfbb8b1603e1b0d097103f4ecd3a2caf53f3d749270c973f049962b7ec013","compiler-rt/lib/builtins/Darwin-excludes/iossim-x86_64.txt":"34b85d85d61c9dcbe15c3c616c25ae6f4d215a2f6269e654c0ec90bc71a4376d","compiler-rt/lib/builtins/Darwin-excludes/iossim.txt":"e98a35679756787a50ede9344956b2da8a3bb13348e7791e4daeb725cc885b32","compiler-rt/lib/builtins/Darwin-excludes/osx-i386.txt":"a9878e020d2a94cffbe0664b5bc57a8138ef6da32484e20770e52db164aa229e","compiler-rt/lib/builtins/Darwin-excludes/osx.txt":"0b850857f43fd20272840e56570e3962e379fe0191270514ef6cb7338477de1b","compiler-rt/lib/builtins/README.txt":"910fb217a0c6d5448a074b380e34da686e598b4c3be066b19bd96e1ba411a842","compiler-rt/lib/builtins/aarch64/chkstk.S":"c91015c7fce7fb9d780e2328ce0d90a238bfb154914178ff0e689d0f612d85e9","compiler-rt/lib/builtins/absvdi2.c":"7dc88335751f4948ea5e39ae7cd69f1a1d4fdfdfd0887b7aa850f2205361237d","compiler-rt/lib/builtins/absvsi2.c":"af781b7d4c3373e7af96887b291cfccadb1808302ee4979180dca58ae664d2f2","compiler-rt/lib/builtins/absvti2.c":"04294cf4a7d3362811567cf5967ab04cce1e0da9104a457c54e172ebac0cb436","compiler-rt/lib/builtins/adddf3.c":"b2d1b69e3e6bac34225b36b2ab03845aa61be981446821d60e9aab2766c5d171","compiler-rt/lib/builtins/addsf3.c":"c4ed605c7859a60cddfb3d91a3c886baab2b26a3bdb541b8cfc8768b1c83d25f","compiler-rt/lib/builtins/addtf3.c":"015e9836e33db433d1ff9760bf49786effe5fffb9e239ecbb343e348d1142589","compiler-rt/lib/builtins/addvdi3.c":"33503c0827801a201bb46243687b7931d8cb60fb65d227fcf185af2b5efa516a","compiler-rt/lib/builtins/addvsi3.c":"ee669f3a19eec3a91bee75174810d128c04d4ce4d3ee86e2ad26209f56f38576","compiler-rt/lib/builtins/addvti3.c":"4aac9e08c6819c89caad81258d7f5ead7a5c98a2e33d84283230513e2244cf25","compiler-rt/lib/builtins/apple_versioning.c":"555f7d346b9bea530b49655dfdf29c03526e83734f3caf5501087e87ebebc52f","compiler-rt/lib/builtins/arm/adddf3vfp.S":"186b61181cb4838ed8d144c083da3be989f25681105710dd71ea0207c6124ff3","compiler-rt/lib/builtins/arm/addsf3.S":"d0d8bff0dcb7354ca62b1968a0549cf20db677054802b741904c5dcb2d7a2403","compiler-rt/lib/builtins/arm/addsf3vfp.S":"99d5d6ab2e5d566c50c7bb34a86d592c729c750a235832980e90304449897f75","compiler-rt/lib/builtins/arm/aeabi_cdcmp.S":"30163803c0e2fbf898ff171e796e0ce956d64f2f3af32f204bc57d1a8f7b5f24","compiler-rt/lib/builtins/arm/aeabi_cdcmpeq_check_nan.c":"cccf538b17af25ccff2a7150a42ba80167bdd4d874d96862714035fffb611cba","compiler-rt/lib/builtins/arm/aeabi_cfcmp.S":"b1e1e5d2accde59539103538b72882542acec018ff1680b0276dea33632dba64","compiler-rt/lib/builtins/arm/aeabi_cfcmpeq_check_nan.c":"8775df1c56d5506134950db46f88222483c659d3cee046e9d6310a089122f85b","compiler-rt/lib/builtins/arm/aeabi_dcmp.S":"0f45c056156c5e16c2fbbad7580c1a46e0e3d488bdcbdf571cd20c33d4d86ec4","compiler-rt/lib/builtins/arm/aeabi_div0.c":"fdce03880aa8dea8b4a30f09299a54e08eaa80a798169f5f9add130abc3900a7","compiler-rt/lib/builtins/arm/aeabi_drsub.c":"85348a1ab18c1a7da680d9a313f7953b90b1546164d282b6aa4486762f6f19f1","compiler-rt/lib/builtins/arm/aeabi_fcmp.S":"0a55f116e0484341dcee5e90c3ac781fbc394f3e1a50fcdc50f11913b338e77b","compiler-rt/lib/builtins/arm/aeabi_frsub.c":"0aef6ed49845c4ba8beae403805cfb60ac8afc3968ed80df48f0a56a7ea7b4fe","compiler-rt/lib/builtins/arm/aeabi_idivmod.S":"fbe811f6c02ed1f6a79daa183c8905fbf02f93f6b84d7a1c6386bd00a5488202","compiler-rt/lib/builtins/arm/aeabi_ldivmod.S":"be11da492487cc174295a34621dc200f22881b795daa1681f92e19b8e6575f3e","compiler-rt/lib/builtins/arm/aeabi_memcmp.S":"524e6ba890b640214eee3ba6633ca4df34d00baaa0029f3bc05112371298f0f6","compiler-rt/lib/builtins/arm/aeabi_memcpy.S":"4f4c01c9f0e01b3eaa2af745429e638db08e8ecd6ed8df3e3146b25083b53647","compiler-rt/lib/builtins/arm/aeabi_memmove.S":"510eef952f896f7a63e78e08734e5a87fa2bfc1a677dc6dc61cbedd4c62205b0","compiler-rt/lib/builtins/arm/aeabi_memset.S":"f1347dea2c2fb3e3c78d5723cd6fd2a29a337f3726aaf29a4bb09e3d426e6da3","compiler-rt/lib/builtins/arm/aeabi_uidivmod.S":"7acca42b97c80ac9588d332739c6da8175a613defb0369fb690b80fade927771","compiler-rt/lib/builtins/arm/aeabi_uldivmod.S":"928402c2440f262b4d67bd1a62bc7d653d36ce9c4e5254d44ef99c3f50d4f108","compiler-rt/lib/builtins/arm/bswapdi2.S":"a902f47a6f0d063943a14009c6c34ff8b5a9dd16663b4de66cda0b064df56172","compiler-rt/lib/builtins/arm/bswapsi2.S":"6db24b56b7db58653c0f28920041f933a3f5f71d522b7aa54b143ad7fd625f47","compiler-rt/lib/builtins/arm/chkstk.S":"010383f5d15ff6bd17ea2e7a942c7da38f66874158d75b53208dae6eda717ae2","compiler-rt/lib/builtins/arm/clzdi2.S":"9349280d7af3afef29e5e8a3ebeab957db5cd0663af56bd8357767f2a58a94e4","compiler-rt/lib/builtins/arm/clzsi2.S":"9755c78477904ff2ea54f8cccdb45afc328d3301883563fd276965a12e057c96","compiler-rt/lib/builtins/arm/comparesf2.S":"4ebf4065ec6cc448ca638eed9e747cdf032df70a1760b47cf7fe1c41a7cc6341","compiler-rt/lib/builtins/arm/divdf3vfp.S":"28520a6941d75f5a11c985a94e2ac4792ffbb5eda8fc00264fb6c2cdc0af945d","compiler-rt/lib/builtins/arm/divmodsi4.S":"4d9faf02f9fdde120ed53e39cfd4ac2f6c0518eab79cd9f4ccebe7c457647df9","compiler-rt/lib/builtins/arm/divsf3vfp.S":"e40d60b73a097d152507521a033cceae0c18efb50730e3b5afcad5148d4fcd20","compiler-rt/lib/builtins/arm/divsi3.S":"0d2697313a61da084299898fab517e0addba8782cd0b077bab007aae045cf27f","compiler-rt/lib/builtins/arm/eqdf2vfp.S":"260ed0d6f03ae4e052e61eea839ff72098186c46df0127340d1ec1733c7b87a1","compiler-rt/lib/builtins/arm/eqsf2vfp.S":"a5589df6af71e76aeb2045fa6da7a341594525198961ff9d5f0233772800936a","compiler-rt/lib/builtins/arm/extendsfdf2vfp.S":"c221f8980fd216e7762752cac1e2172805421da9597ac27b3e3b5f69df6701ea","compiler-rt/lib/builtins/arm/fixdfsivfp.S":"42ab2d0e3d59171d4893193896790b68eb403615a10248a377f006660677ca5d","compiler-rt/lib/builtins/arm/fixsfsivfp.S":"b8872e3677cd57007df3b1d2316741455b193695a9ef9b88542745bfd0957b6b","compiler-rt/lib/builtins/arm/fixunsdfsivfp.S":"5f4ca62711116e83bf9663c7ff51878774abe023922d5eeb5442c0556539ace5","compiler-rt/lib/builtins/arm/fixunssfsivfp.S":"30673245704b5d666d54c632924517cb6801707c76c5d9f4e109f3e37864e2b1","compiler-rt/lib/builtins/arm/floatsidfvfp.S":"ed57e4767379b32de614eeeed04343514f2ff91d3dea9482ea7d10f893aec071","compiler-rt/lib/builtins/arm/floatsisfvfp.S":"a72abfe62d329c9afacc456577171e150dde8849ab56315f98b64888e6363e61","compiler-rt/lib/builtins/arm/floatunssidfvfp.S":"76cb302bb6ba80916c306009847d54c2702669196a2fa253ba23aacf11fb049d","compiler-rt/lib/builtins/arm/floatunssisfvfp.S":"9d645916204bff2bb4f443c868a3103d17370db4c7351853bcc543a3551f8f82","compiler-rt/lib/builtins/arm/gedf2vfp.S":"cf60dc52e0a892b6a4173944097ea8ab81ea8fd2bc79e97f646567241ee5ff62","compiler-rt/lib/builtins/arm/gesf2vfp.S":"336662289776c7b60808bb3c2b2600e8aa1089450205a150b155d8b9810bff96","compiler-rt/lib/builtins/arm/gtdf2vfp.S":"949aecb2c5bda708aafd9aa61f839b6680646eb7ef44caf6da2d58bba47715de","compiler-rt/lib/builtins/arm/gtsf2vfp.S":"8b038c299f192bb8d2aec49672c5a9821e78475fb71a4bdf736db86ff7899402","compiler-rt/lib/builtins/arm/ledf2vfp.S":"fd0cd046e826176e6fff0f0a63fb497ac05832011e46f5fab4205016daa3672b","compiler-rt/lib/builtins/arm/lesf2vfp.S":"667501cbf894b6be85a09e8bb70a94b7506784f020b81bb2dcc9aad81c226b62","compiler-rt/lib/builtins/arm/ltdf2vfp.S":"b4305561e7f2a654b1eda41642ffa7b46120dd15f0d66aceeb5555196524668d","compiler-rt/lib/builtins/arm/ltsf2vfp.S":"1578e3889fdb0a00541f46b58897b184526c3bbf50839469cf4ad57abd9c1df1","compiler-rt/lib/builtins/arm/modsi3.S":"440c542ae72ea060396656caf66822118f2d43980adc23e54b795eed54c21ce3","compiler-rt/lib/builtins/arm/muldf3vfp.S":"646e7a483c9870331ea1d4a00aea08d396c6ad5a696016505db6869cd62975b3","compiler-rt/lib/builtins/arm/mulsf3vfp.S":"4f8131c767d9ab5eda9c409ccd022227c3c645ddf39e5426ff4734297850336e","compiler-rt/lib/builtins/arm/nedf2vfp.S":"ad31f2153842191cfeefe11d01da54d5a2a0c202c3365ede0d209672b616517f","compiler-rt/lib/builtins/arm/negdf2vfp.S":"7346e2603021863c5daca904b916a72017f586b7ff0cf8cec71d70edc5e45081","compiler-rt/lib/builtins/arm/negsf2vfp.S":"086bfede507ca60748467805389ffdcf510a52d127c302491aa3f278e344d03a","compiler-rt/lib/builtins/arm/nesf2vfp.S":"41d87bb066afdb8c0161a0ec569b54f93aa8efa0fd3f81eeb43cb3c0e1f3539b","compiler-rt/lib/builtins/arm/restore_vfp_d8_d15_regs.S":"4ab516b1f9ff13c0997fd77ad752389a7319f6af4ca45facc1f999b1eb93b73e","compiler-rt/lib/builtins/arm/save_vfp_d8_d15_regs.S":"4e179f765a72240728aba4325c362ee3d5c804072735cd105fb9753d0badb086","compiler-rt/lib/builtins/arm/softfloat-alias.list":"148348a7f82e5f4251f40ca7bb3eca4867fbfc25b79466d601347f8177fa1a07","compiler-rt/lib/builtins/arm/subdf3vfp.S":"a1c2a8b849e1709be62df2c2df48dc661466a76c8adb9f3cd6290d76b98c496d","compiler-rt/lib/builtins/arm/subsf3vfp.S":"7b8ffbe67e32aa19aeec97deb9aef44870321b920a0e2d91bb6e67e144a58c1c","compiler-rt/lib/builtins/arm/switch16.S":"759c7773dcd81ef32fcc54ebbb49ed5969756b5de4f4d06f31c5a18f3d862916","compiler-rt/lib/builtins/arm/switch32.S":"f7b8a7853ad62dbb7170adb919039bd0ff635f2c44217d08813bf45d688b6874","compiler-rt/lib/builtins/arm/switch8.S":"1b855347363bdbb03b8281ec4eb4601e9b55140e518929f08bc24b55b0d4debe","compiler-rt/lib/builtins/arm/switchu8.S":"814b43944cb952ed03c72524474985c77f96899d1af4c28a27ed2115e411caf6","compiler-rt/lib/builtins/arm/sync-ops.h":"37188472c4b6f1b95f4121f598ef4df26bd24b0211d3f5d3d0903c969fe0add4","compiler-rt/lib/builtins/arm/sync_fetch_and_add_4.S":"a4a3ea4e9a9471438b7f74fffc3d7949506633533aa195cecb29b3626c3f4e80","compiler-rt/lib/builtins/arm/sync_fetch_and_add_8.S":"81e6273ad834e11d5d4c87c0c8cf49c596829fe2b5a7de6375bb623c2b17e482","compiler-rt/lib/builtins/arm/sync_fetch_and_and_4.S":"d6ef12828392ebf868498a1023c41eb2ab5aef81c5710d566df9b967904f231f","compiler-rt/lib/builtins/arm/sync_fetch_and_and_8.S":"2984ffee8e040a347f172c30bb70f454133baad91a079374d85efd9e504aa893","compiler-rt/lib/builtins/arm/sync_fetch_and_max_4.S":"e4be9daa7f8b69c778a66ad14241fdc7d9c7ce55519fe125b96f16afe9449141","compiler-rt/lib/builtins/arm/sync_fetch_and_max_8.S":"c13c4109c8c70048642dc2b214458d22263e7269f8466cf192bbad652075e446","compiler-rt/lib/builtins/arm/sync_fetch_and_min_4.S":"e61631bd559d0bead13d2c96cb04471909d968e9edcb320a60430d0c5ff05802","compiler-rt/lib/builtins/arm/sync_fetch_and_min_8.S":"dac676788e28a4a7b4ecb5986452c5c295772f6ea5dee34ce1432afa20cc56d2","compiler-rt/lib/builtins/arm/sync_fetch_and_nand_4.S":"16261e48a81f26be18eb30eaae365ff806317bd2d085e3c0206989d96fe25b73","compiler-rt/lib/builtins/arm/sync_fetch_and_nand_8.S":"887e6b8399b8d57a84e53fdf2933f4ad19f1ee1cf684ebbbd6644a662343e470","compiler-rt/lib/builtins/arm/sync_fetch_and_or_4.S":"d42c73c9b5db6c6db2628b8ceea46789dc7bda599597b54bfb1fd0efc13842bd","compiler-rt/lib/builtins/arm/sync_fetch_and_or_8.S":"bbc5200fde7dc052207dac27f8854d61d0e31a92835b91acaf3cc4ba3faa2c9c","compiler-rt/lib/builtins/arm/sync_fetch_and_sub_4.S":"b4359dbb334590a83873f678c4a7809730d9199fcd7ea192bae43d8ff615a4ac","compiler-rt/lib/builtins/arm/sync_fetch_and_sub_8.S":"519b55fa650a03f13d75b24a9f576f9f3a75a4c07e2abf97158dc22b790e98e6","compiler-rt/lib/builtins/arm/sync_fetch_and_umax_4.S":"c3531610bcd2cb053c681637cd5aa9b62a861c5a22fe5cd474955211633bbd1a","compiler-rt/lib/builtins/arm/sync_fetch_and_umax_8.S":"dfa80e578b8827544574e065dee19ef90516dce9a15e3785580051229c68e5b4","compiler-rt/lib/builtins/arm/sync_fetch_and_umin_4.S":"769c0bc64f6962538d5072c5b1d87f3ee22f3f1b27f3d07ffd0f340adcbd6b3b","compiler-rt/lib/builtins/arm/sync_fetch_and_umin_8.S":"03278f76e1a62c5755ebf57d650405378b408b09ebdb50ab67cbae06b2d78226","compiler-rt/lib/builtins/arm/sync_fetch_and_xor_4.S":"8b472d542d149ad0f1f2f796195817d2b2f0052f7fc90dce710ba90452bc9532","compiler-rt/lib/builtins/arm/sync_fetch_and_xor_8.S":"75e6cbf7718667a0dc0a8ef3d4dcdeb99ee7a061c7c76877c78069900c7b215c","compiler-rt/lib/builtins/arm/sync_synchronize.S":"86f9a3543eb6952fbaf764f2112f7a6cb9076915b62cb74496fbc49667dd3493","compiler-rt/lib/builtins/arm/truncdfsf2vfp.S":"bd9714b9baedea3423e3391aa37eb7c947fc6d7a766606632055efc05edd1106","compiler-rt/lib/builtins/arm/udivmodsi4.S":"b35933638d0bdf67c064f10e0baf628041284070855bb8122d09e432624a794a","compiler-rt/lib/builtins/arm/udivsi3.S":"1b89ad2d3d85aa3d989083fe5413a5c2047337a8669b0c5aa8f57c1450a90f44","compiler-rt/lib/builtins/arm/umodsi3.S":"ab463d744d1050ea9d9eec324e0e2e90fae794d4150961e002e585aa9ed293b3","compiler-rt/lib/builtins/arm/unorddf2vfp.S":"a5a11d6f54f13c3d98a860f82ff109541b97ad40ecf75f81b729e72869bbfee8","compiler-rt/lib/builtins/arm/unordsf2vfp.S":"2919b1fee122509398b2df38056cd91ae8a17252e394a6ee3622fefe593c2508","compiler-rt/lib/builtins/ashldi3.c":"29c4fda4270f84aacd18c8010fa0660d490d44b59fbc8dfe6ef4c079619030c7","compiler-rt/lib/builtins/ashlti3.c":"ddeab715fdf0d52e5fa9a4befc970af29fe66e5b521e84c35496cd8fdcb28945","compiler-rt/lib/builtins/ashrdi3.c":"700be565b8e66a82650177ed274d5847cc3938440b06b3fb56ed56218e85c614","compiler-rt/lib/builtins/ashrti3.c":"9fa76c03d61a0fd20722d0e9faba6c16400ccfa3466d6f96e7394fa0a81f5bc2","compiler-rt/lib/builtins/assembly.h":"b8996a79b389496a51dd251c05f1875ffc7d98947f99e69fbc4d90f398fd644a","compiler-rt/lib/builtins/atomic.c":"1c317ab73fc0d3083ffd26b4545ba63db944141edf09df87d2b7050615cf8093","compiler-rt/lib/builtins/atomic_flag_clear.c":"1b43ff063434c3a112ff11d0ab2403f11c82059d9aedc1cc70c4c056aaf18292","compiler-rt/lib/builtins/atomic_flag_clear_explicit.c":"90e66bad1d8c9fd1c619957635ccdfd3342fe6b898043c9a56b799d0b5ddfe93","compiler-rt/lib/builtins/atomic_flag_test_and_set.c":"851a928907539a891ad245f7cb56fe88f7915b271d5cfbbfc717b8b06055aac8","compiler-rt/lib/builtins/atomic_flag_test_and_set_explicit.c":"c6dc9d5143b75c62a35972314b08304875a24881bd9054cc15f5f6ca87e05264","compiler-rt/lib/builtins/atomic_signal_fence.c":"bf0c7f0adcab81be838790345fe7cfc2e0db784de133a3743b1f91365f7cf9b6","compiler-rt/lib/builtins/atomic_thread_fence.c":"8dffd2636d6ba4871a888d459f34eb36b7ecf1aef8011ff60b8162af6ec77a73","compiler-rt/lib/builtins/bswapdi2.c":"5accf73a78c7472b4d51fe65606d380c288362f69a1bf77b596065e33d4c36cf","compiler-rt/lib/builtins/bswapsi2.c":"b914410a0c2247da08a3474cad77f9383d7a6271b1a0fa7a184588d8fc04fb9c","compiler-rt/lib/builtins/clear_cache.c":"cfcf8856c0ed6636d667675fd3bdbe833db2a69ad0e5a2ae1447f5d1e7de1b9d","compiler-rt/lib/builtins/clzdi2.c":"5d3e88693967d76f511623274a28338ff7dc7a92e11135c2260e38117a42e547","compiler-rt/lib/builtins/clzsi2.c":"d7ef6c1a52c68aea1e9ffb16678c3c3b81c6736f86599000ca661f56b96aa163","compiler-rt/lib/builtins/clzti2.c":"a55748f4fc9c6121c6206c3a583018e62d1b02672266498e2749046de52547f5","compiler-rt/lib/builtins/cmpdi2.c":"7e2ea3ba9fd575057d4f2604b7b5d74def10c53abac1d2e6b6def7ea9b2c30b5","compiler-rt/lib/builtins/cmpti2.c":"c2533553dbed0b239239d60847d3f6877f129a909e90939688e845149d886bea","compiler-rt/lib/builtins/comparedf2.c":"08530eba128d6c6d612a705cd0e80666e5b6bcdf6069a5210820e63c7f44c542","compiler-rt/lib/builtins/comparesf2.c":"cc4a3e9e6007509d7708f07540a83b2b58b84dde46ba638e74906f9abea88c51","compiler-rt/lib/builtins/comparetf2.c":"dc854e135b7a97e06a87b08d4225cf82776a288ef3f3a21b581efd7846d77759","compiler-rt/lib/builtins/cpu_model.c":"2cb7611c31f6c00b65aed7ac7797556b2783cca78415dd1bf8747e01fc1d07df","compiler-rt/lib/builtins/ctzdi2.c":"800faf2fde49280d6c0f5a5a170224e92102a2e71ed329cb0cd2d93ccb6cda47","compiler-rt/lib/builtins/ctzsi2.c":"c81f79e50527ed22f214aa10bbf4737ed43e752d6af2f311e75af6519ceef021","compiler-rt/lib/builtins/ctzti2.c":"0e2434e6d8a7c6710ff6e0a4470bea5c08c026c6303146f75f4840383f1b3b42","compiler-rt/lib/builtins/divdc3.c":"7143bb83fce0063cfea172ee8fe2d2e41b01dfe71854387cba2d07ff608f5c88","compiler-rt/lib/builtins/divdf3.c":"1ff8bf7c93cd5898a10c3aa99f6bc4254c919a7dbda98d35e71f09e2ebe30d96","compiler-rt/lib/builtins/divdi3.c":"43285639eee6d8bb00943824027aa461febdc91e4977ab0e5eec2a6eb77fdafe","compiler-rt/lib/builtins/divmoddi4.c":"eab394639ae1c7d09bd4260da54fbf7d019416575dba166530e92587c588c1bd","compiler-rt/lib/builtins/divmodsi4.c":"066e2c55620176ff8752267857e342b803e66daab049e3354604080e487c35a5","compiler-rt/lib/builtins/divsc3.c":"8a601703b26998a2429c804c233fc06a3f66caefd5e25a959bf87a7ba15c841b","compiler-rt/lib/builtins/divsf3.c":"17dcd7a7aa40ea76f3b9cec93d5527c306ce07386d479207531cab37bfa72667","compiler-rt/lib/builtins/divsi3.c":"bf55c37f477457722b7ae29ddb670a5d726776d25a7965b665ab6d056cba1fbc","compiler-rt/lib/builtins/divtc3.c":"340400b04a35999132f3a6919e7b70f57c458a50557caf32e6c2a6cc955319b3","compiler-rt/lib/builtins/divtf3.c":"aaafff17e4701c82caa54e46552bc6afb5778ea067fbfb40528d17fc3a779158","compiler-rt/lib/builtins/divti3.c":"4ae28ab8246e5e71f363c43469d36c8b9f3509007f236d83eeece158dbdfc4c0","compiler-rt/lib/builtins/divxc3.c":"ce7ac8aa93318c9bffbd75916cb8b9632f1495418fb28a2bf5dfa8a310646f33","compiler-rt/lib/builtins/emutls.c":"4ab279834594417d5a135a8d8f8c0ce3b6d1573a5dbc80ea23884ac9e12d9a3f","compiler-rt/lib/builtins/enable_execute_stack.c":"0dd7a8791e0807e203e5c6d31808411df245c4d6ccd274a322eab25fd66f025f","compiler-rt/lib/builtins/eprintf.c":"298d31f381a44c61c57d21a8d6027ec7935ee1245ea340b5c8f6949449be9181","compiler-rt/lib/builtins/extenddftf2.c":"86e30ec76f9cfff0653288ed6ea557d4a915d68142443add31f8b43c737ca7f9","compiler-rt/lib/builtins/extendhfsf2.c":"7d184f88873053d99a84471eeadba41b0fcc252929f9c7852759063f55973a1a","compiler-rt/lib/builtins/extendsfdf2.c":"efaf378e6e79f504c24381b94d15f5ef2585c518f20025a340f3f1d99954b224","compiler-rt/lib/builtins/extendsftf2.c":"0449886abd6e8b1201efafd9aca60db0aff3d1bd1c0ef5a2549f7fea3f2115d4","compiler-rt/lib/builtins/ffsdi2.c":"cfe3059d087cff20afc0b4d73d764cb4e09fb3f7d9615f59e4db8b593c94d67c","compiler-rt/lib/builtins/ffssi2.c":"5cd42d2a5a9168dbbe67473d45aaa00cab6214b1cbf08668d2c11c28fb13fb98","compiler-rt/lib/builtins/ffsti2.c":"2c81dd9dcad450e3310c7cca5b74784befe5acd19cb3d66a20afc31af3f14fdf","compiler-rt/lib/builtins/fixdfdi.c":"93b560d5131f746a378f8a56bcf64e033c1023f3626f82188f0cac0bc9c21c3e","compiler-rt/lib/builtins/fixdfsi.c":"c8c66abb2a6c6c1916ae7069ae60027d8d5e6a7bee2c27f272df4d03bc88a321","compiler-rt/lib/builtins/fixdfti.c":"7598ff3ab76df2c75299ca19f9ae9a1d03640e110f3cf467641ab367512b839b","compiler-rt/lib/builtins/fixsfdi.c":"663c144470af96e7cf1ecdb29265ea4323112a249cb06755343b654c538faec7","compiler-rt/lib/builtins/fixsfsi.c":"291ff5f8f1c0b3006da155c844bce1b794cbae44c466aa8cfad40d5d213fc15d","compiler-rt/lib/builtins/fixsfti.c":"5ed27aec1807af8b30243cd6e9a5497259f8097e60957b33e4f3aef74ce1c7d4","compiler-rt/lib/builtins/fixtfdi.c":"6fe0df6ca317aa0f05cd5061ea75730384b687946d838b2d8e343647f4d68049","compiler-rt/lib/builtins/fixtfsi.c":"761178f703f61ffb1c3bd293b73ca482f885e25d8bdd553785db1101b9f816d8","compiler-rt/lib/builtins/fixtfti.c":"e257e2314e085d4771af666996fd4157837f32f8bb17363a27323443c78293e4","compiler-rt/lib/builtins/fixunsdfdi.c":"2e9280f9c437d3334e4eb26a797d0a4bf8ca47da8626f5774c91e86716d97b02","compiler-rt/lib/builtins/fixunsdfsi.c":"0d22a29be01cac81c87379ca1e9fd27526ef51268b5cd69f4e50823feb4d1f03","compiler-rt/lib/builtins/fixunsdfti.c":"4b361f697f7eb8bbb49d829b5cb1cf2fbf6f39f78bb6dca28dca0eeddaa4d277","compiler-rt/lib/builtins/fixunssfdi.c":"7b43aa07a924f5bd8803521156b17597e07656b76a012990953277ba3b291f2a","compiler-rt/lib/builtins/fixunssfsi.c":"bae9a831b90b0c0fb407005cb66d512bbf2ffc1668efb5d02f25cef1d1ca773d","compiler-rt/lib/builtins/fixunssfti.c":"0821633a0b91ee3ff3d387d41b8dc04499ae5db1625167face069984901a1693","compiler-rt/lib/builtins/fixunstfdi.c":"43c23ec751076340bd1c8e61ccba872b136bf523f10f4735b40b1f55fee2568d","compiler-rt/lib/builtins/fixunstfsi.c":"04bfd3d8755224d6581e4352bc2b94832e0546d7d39b1de60ab033b29c79e652","compiler-rt/lib/builtins/fixunstfti.c":"c03538e1118226d8acd7b2273a373ecf016a66db54f746188a73b23a7ab78825","compiler-rt/lib/builtins/fixunsxfdi.c":"d7d641c3934de110e02a1e21480fe6b6d373c11eab6e1e9167632f73a7256d0b","compiler-rt/lib/builtins/fixunsxfsi.c":"56804b934a683864500523117ae16908e1ab5fdbc0b4a12d30d1b1bc30173792","compiler-rt/lib/builtins/fixunsxfti.c":"90831c3961da7a700887ea424f83eb38def227dce3a981de7b3144a1839266a8","compiler-rt/lib/builtins/fixxfdi.c":"8b7fa08061e10d3015999e4166ab7f92e507cba64fe9d4911f7c2816dd9a6107","compiler-rt/lib/builtins/fixxfti.c":"07294e2e494be47f3bf3fa401967439159484c4e01c48eeff454fd5257ecfff0","compiler-rt/lib/builtins/floatdidf.c":"acefb62469c9a0ddc5ffe49ae46ca957a1e41f36374e54cce140688192fbb4c7","compiler-rt/lib/builtins/floatdisf.c":"899181251abb3efc67d3517d4469f3670c529120bb149deb57a4984343604788","compiler-rt/lib/builtins/floatditf.c":"8af11e2f8a628bf79cbd569aba323b094d5c731ec9349980cc746b6693a31b7a","compiler-rt/lib/builtins/floatdixf.c":"7bdf02ecf61351d316011190963bd79c6781310b495850759eb77eb7dc1c7ef9","compiler-rt/lib/builtins/floatsidf.c":"9739cdfd496ad7f47493b7124429e05f943f60045d936b214790bb37230fddec","compiler-rt/lib/builtins/floatsisf.c":"8b2a0cabef6108244697920d695f21893b1d84e673f165c1c4a05a5d6fc6cefd","compiler-rt/lib/builtins/floatsitf.c":"e345ea5666b27c88f3bf669501785fa1e5006ddbf30d1c2990681234b486b653","compiler-rt/lib/builtins/floattidf.c":"508747da9e63d8f03746166d765985126edf34fbfa5358fb392a3fb8f967389f","compiler-rt/lib/builtins/floattisf.c":"191ec2bfe6ce8a17a96aa9cd1d1a325e817c5b8784adfdec959782108cc0c3f8","compiler-rt/lib/builtins/floattitf.c":"3a908bbfef1368b767df0807edc15477cbb063faa3e505a02bd9515224eb4647","compiler-rt/lib/builtins/floattixf.c":"68442381648887f25b8e5cc32d74d97374402f10cd87d3160c27292f4e83422e","compiler-rt/lib/builtins/floatundidf.c":"7970b2eeb4b11f93de43d722d9cd895a2961563860016bd88bb2e49cd62cc4d9","compiler-rt/lib/builtins/floatundisf.c":"138686253eb24174e608951409b71ec2c04006737dd9266eee1302e46bfaf19d","compiler-rt/lib/builtins/floatunditf.c":"1b44c87a8b4e88129ef8680f1ecbc25c1595fc5db98ac6d79b853daae92e541b","compiler-rt/lib/builtins/floatundixf.c":"54d22d277a4456d691770f570cb59b681f7d224c27957cbf5f338ab05cdd095e","compiler-rt/lib/builtins/floatunsidf.c":"635b738d4d6dd5867d52f527274779b176b1ff42f987f517a070e116ead1dd58","compiler-rt/lib/builtins/floatunsisf.c":"1bd72961320e6c43052a73adc674f4fa9ce6d0d608fb83b1bb8c3fb2b29294d7","compiler-rt/lib/builtins/floatunsitf.c":"07336ee4741e5512e81633859e60393d21089325d26aa7db0f78aec6d87c8526","compiler-rt/lib/builtins/floatuntidf.c":"c88b1403ec54a99ebd296f08a4e9fe50f00a760901a3a663d861dea2c4e61ae3","compiler-rt/lib/builtins/floatuntisf.c":"cd7eff7001e175ce4d23567cbbe473226fb7ca8711f1b8ddc6e9a42796209729","compiler-rt/lib/builtins/floatuntitf.c":"e9cca4f0007c36ee31baaeca7a4079f1faf58464b384f8a064788df8160afcfd","compiler-rt/lib/builtins/floatuntixf.c":"1b651def9a2df928ef5550129ebc0049dc8eddb085224eb5eb2e9410d61c2b93","compiler-rt/lib/builtins/fp_add_impl.inc":"ab027959934d5079e56b7a9e7df2216eedd8f75086baec54ea2238dcd245f98a","compiler-rt/lib/builtins/fp_extend.h":"fb8726a1205c02ebbb9b9de85caaa6b06ac9a38c0348045fe8b4dfac385e3845","compiler-rt/lib/builtins/fp_extend_impl.inc":"a697f2134e861fdc407ca138e5bd040ce50a46f89f46d29565b5c0eb2878dd27","compiler-rt/lib/builtins/fp_fixint_impl.inc":"588900ec9c6580f215d13be7b42bf1bd2d9a8541b040c7fb710c9db61c3eac24","compiler-rt/lib/builtins/fp_fixuint_impl.inc":"e53acafce5bd97c9d27399fcf2452479832c112f1020fd62ebff3d9804472e5e","compiler-rt/lib/builtins/fp_lib.h":"afd0dacdc9d15893b63ce595cdbbe596c7785fb103ef606f027c2f0a3348898c","compiler-rt/lib/builtins/fp_mul_impl.inc":"cf7205f177de4c05a902b218316a8b39e53bf6090d5a3bba8a1fc21e05d1dddb","compiler-rt/lib/builtins/fp_trunc.h":"387be281a358dbabe245f2921214c9305709d147c086abdbc4d9780e791ad43f","compiler-rt/lib/builtins/fp_trunc_impl.inc":"76bf50ee8cc435388ed14c0dceebf080eeadc67e887caa782c227cfc6883a4da","compiler-rt/lib/builtins/gcc_personality_v0.c":"96b22207f1bb189ef6d77ad3e4f70ea408d7f651082d8621f757c1c44f93e496","compiler-rt/lib/builtins/hexagon/common_entry_exit_abi1.S":"ea45ca5149070855cf4091fd8ddfedfc606710739ae5cd63028ff15eca11bc18","compiler-rt/lib/builtins/hexagon/common_entry_exit_abi2.S":"9edb8dfbe8be17353c3c74fc81e015d52e2a918949be3a0d38676a37a5db2820","compiler-rt/lib/builtins/hexagon/common_entry_exit_legacy.S":"07f27708c2f50699829c51b32341cff51e33ef102f9e74ec54732f25d02d0616","compiler-rt/lib/builtins/hexagon/dfaddsub.S":"70e36679275d517f064c72fe8b55d20dd62850fe79b1492d7db9951ae4bddc21","compiler-rt/lib/builtins/hexagon/dfdiv.S":"89480e6ae2b60ea8309c75a864dab874dce5e63e183579ff24cd344bfa396fe9","compiler-rt/lib/builtins/hexagon/dffma.S":"ab98a621f795f9c47492b6230443d6dd1ea2545ead73b4a8d73c10baf0e66fac","compiler-rt/lib/builtins/hexagon/dfminmax.S":"c0a6a63dfe4d336b80c82ff719c9e9d7a8e79f2b33ded243977802a50997ffe9","compiler-rt/lib/builtins/hexagon/dfmul.S":"f7349d75cd65ddf8fbd38859cfc598c6111d39916709ab403b377caaa265b80a","compiler-rt/lib/builtins/hexagon/dfsqrt.S":"af7ddd89ec0a132a04bb8f92bd65d7094f59d9bfcaef2150b16e6fbc0026c734","compiler-rt/lib/builtins/hexagon/divdi3.S":"93c17ee41ec458843de9e12166e56141824ab6ce79bdf4232a00999a5be4cd87","compiler-rt/lib/builtins/hexagon/divsi3.S":"c229751b1821e94af1ce32b143ce600d7cf5370e0a33a201d8c08f5b2a90a3bd","compiler-rt/lib/builtins/hexagon/fabs_opt.S":"b31585e77f31c48b4ee62b47fd327741de51d6340a167d16c98b7d7de0002eee","compiler-rt/lib/builtins/hexagon/fastmath2_dlib_asm.S":"d7ba2093d6c1172574d59ba9cfa900ce5e1c627679fb8280fe9d96db827696c7","compiler-rt/lib/builtins/hexagon/fastmath2_ldlib_asm.S":"997e060adff2ebb4f4f7fe7fa3bceb5d83c412d467551cfd719342d0c111ae2a","compiler-rt/lib/builtins/hexagon/fastmath_dlib_asm.S":"f6d341affa7c163ec94e04b1470331b480afc8e08dbf2670bd3eab41617ddfbb","compiler-rt/lib/builtins/hexagon/fma_opt.S":"bfa5bc972bc6cb18be5f6a46bd5ba6101d654dd3fb0d45ad4aba598649ad5f4d","compiler-rt/lib/builtins/hexagon/fmax_opt.S":"494ecb9cfa1f8602e4cd2188c83a6b949b89b2f100846496a9ad39e5684db4b3","compiler-rt/lib/builtins/hexagon/fmin_opt.S":"cf6b64756a8b4f829bea52b23722a31adc2e998872c4d1d06ec65919ae3fa66d","compiler-rt/lib/builtins/hexagon/memcpy_forward_vp4cp4n2.S":"e4bb57e9d9c79b6c1af39d478605cb80ae7ebd856e3c1fc46f179945a5878dfb","compiler-rt/lib/builtins/hexagon/memcpy_likely_aligned.S":"6df2de9046397d39d8af4ac789b763e59c68a8e4e8fe50935fd5533cb5c4c1bc","compiler-rt/lib/builtins/hexagon/moddi3.S":"21b37069b4e67aad74920a780153544b0df8de97b60897ee6fef23dafcafe584","compiler-rt/lib/builtins/hexagon/modsi3.S":"c3042ce6d286614a26cf5d2a8c24ca0e39a76b92335e05a07b0d381141c48e4e","compiler-rt/lib/builtins/hexagon/sfdiv_opt.S":"672dcacd119afaea6847ec8c2d34382c7947833225b7fa05f3fee873ad204307","compiler-rt/lib/builtins/hexagon/sfsqrt_opt.S":"c4899d218fe34588b96738f19a9f582b9e9ae476e130b206f7493c037d3f112c","compiler-rt/lib/builtins/hexagon/udivdi3.S":"d98c6a997457da23a059fead85b1ebdd8369a07a9d3c74464ff144727bf13a81","compiler-rt/lib/builtins/hexagon/udivmoddi4.S":"9b80e89c74302f25fa9ad7c7c2d2eef99c1a886ad0e902cf82f453ae04420994","compiler-rt/lib/builtins/hexagon/udivmodsi4.S":"95227ff5eaf2ab554df4c532c4165c56da379c3ef986b64cdde0faa52bc5e3f8","compiler-rt/lib/builtins/hexagon/udivsi3.S":"b3d462bf399e21cea6ca06337f01725d1fb7af75c8e424dd1409436ccc30f5d1","compiler-rt/lib/builtins/hexagon/umoddi3.S":"2c79a5bbae32f7c389e243c36d9c4b29944196ebd6ccf93ed34e3c07b758dd72","compiler-rt/lib/builtins/hexagon/umodsi3.S":"7a9b009eef5cdbe4189976a57e0c3706473750c24c648a3b6e2fe11e6c1dfcd5","compiler-rt/lib/builtins/i386/ashldi3.S":"3daae35291ac0b014da5829a9ebf5681935b1a199bf33c2acbba92747f519256","compiler-rt/lib/builtins/i386/ashrdi3.S":"3786c5f5096af9c44ba7aa3ad4555698f5dedf264c5b39eea89bb3db8d4435d5","compiler-rt/lib/builtins/i386/chkstk.S":"a95b15ad2a1317226626feb224aac919ae87f61072c6f322b59e835966a7e429","compiler-rt/lib/builtins/i386/chkstk2.S":"9ec0d7871d4738a4206ffbce81f0d115cc359a854cab25d7e8d1b9470ca0dd8b","compiler-rt/lib/builtins/i386/divdi3.S":"2272601ccffcddd0de42aa19fb81850fae9d95fc3e9a0478f33cf9955e6df7a0","compiler-rt/lib/builtins/i386/floatdidf.S":"4f24aa22300c6614dfccffe00f8d188c0e2bcf15206eca3f4f35ec592f1ba0f6","compiler-rt/lib/builtins/i386/floatdisf.S":"8144f9ff138ada26a1c5214f288db4db695c7ad5f1299d8fd67199101d043bc7","compiler-rt/lib/builtins/i386/floatdixf.S":"7242a50a5be3516fea83a73499ae59dedce3de650e6fa98cb50cc47e2dd85a23","compiler-rt/lib/builtins/i386/floatundidf.S":"ff0d437810dc959e6dbcc7ef0280e6bf049ca56b3a3585327e6efc28ef7f32fb","compiler-rt/lib/builtins/i386/floatundisf.S":"fd73721697349feaebda9ec533e78d552efb583463465c6a9f6c135e0bd594da","compiler-rt/lib/builtins/i386/floatundixf.S":"dd2b540a83e94012eaec85e8568a8c1c5c33450f777dd124055f1132d836e36e","compiler-rt/lib/builtins/i386/lshrdi3.S":"16fb322cdde675f9b19d74af4147041d33c3478da4537a105dec684a34bbc0c3","compiler-rt/lib/builtins/i386/moddi3.S":"76bf5c6bb5d0d772d26ab4b965bdd1b36c924cc82c10e5ec8084fb7d8270ba97","compiler-rt/lib/builtins/i386/muldi3.S":"4b534a5372c64c0800f94d983ae27959de07f8063298db6f548ee090031f1a69","compiler-rt/lib/builtins/i386/udivdi3.S":"48dcaa50d1edc6a7fb83cc7a9da980e39357803e2607702c0979362c55dcd85e","compiler-rt/lib/builtins/i386/umoddi3.S":"1cc6d60b326214ea4e79613f562a298b1a9a0f42366c515df865aba2a62809d9","compiler-rt/lib/builtins/int_endianness.h":"2b7d3cfcef61a394a82878083cd32abe27e7c63bf12af140ac1f6523a5d03ea8","compiler-rt/lib/builtins/int_lib.h":"cdae1d1852c9a2cdf39fdcf18c33b6112ed8263d6a890457d1c265c75eaa4413","compiler-rt/lib/builtins/int_math.h":"f1c97ae3d527b14488f22a3be10cdc2567fbd7fda4d52a595f3d106b01653880","compiler-rt/lib/builtins/int_types.h":"24c4cdc771f1d69c07f0d6018f801ddc1c7359c93e625073505f249710dcfa87","compiler-rt/lib/builtins/int_util.c":"66e76e0e8016a6a4e5d5b0a4a08a83051b24699047bda3a54dc18593cfef7801","compiler-rt/lib/builtins/int_util.h":"5b02f00e0077110338a3b4b4168b06026a23c766a9d926c27b904b87a38e2a89","compiler-rt/lib/builtins/lshrdi3.c":"4492bb0828e8db10b063b81086c594bdc1f65aca976c2c76a3ac0f4057a8b25f","compiler-rt/lib/builtins/lshrti3.c":"776d53787428264b0fc7e4242a617f6187da0ed9dedb74c830fe48af8b658dd6","compiler-rt/lib/builtins/macho_embedded/CMakeLists.txt":"00620fa370283794db606c2e574a804966fe6e744af542fa55e859c0462ce8ce","compiler-rt/lib/builtins/macho_embedded/arm.txt":"a1ee411731310ee381f5aa5b0661e87ed323ce6f6fee391d8c2e5138edd1042a","compiler-rt/lib/builtins/macho_embedded/common.txt":"a77c8be194391cb3d78ab3fa946e68faeab7032f4904e67557f65616383fd8cc","compiler-rt/lib/builtins/macho_embedded/i386.txt":"e51de1271cfe3b6b32e165ab724b04f2454bfa740025d761bca0c8fb7282f48d","compiler-rt/lib/builtins/macho_embedded/thumb2-64.txt":"645ba5762fda6e01bb943ee98c96fdb3b99b01612704c893db331e644f146c26","compiler-rt/lib/builtins/macho_embedded/thumb2.txt":"1db0140d269fb1d1400c1d89b17052837a40f714bfaf7611f4d2e89e32990445","compiler-rt/lib/builtins/mingw_fixfloat.c":"103744b3563a05bf34b3b4b6ea0de49de6828439e56f6dcb5772cd7d0aff2d0a","compiler-rt/lib/builtins/moddi3.c":"d3a7d04bcea7ac03a5e027b5aaf6e466b9245df360a6055ba7095a73c3b8d51f","compiler-rt/lib/builtins/modsi3.c":"66e21612d1cbf388c0fe2e388a197cf110e6a87dc86f9e5f22a1761c20158ea0","compiler-rt/lib/builtins/modti3.c":"543ff46a5c928799e177a54e297de75ad533ff75dfb2f2bf59fb895dea2876bd","compiler-rt/lib/builtins/muldc3.c":"e978dfdf0126c9c0ce22edf7334f9bae21782254ca4272a2cd9b279d8eb944a9","compiler-rt/lib/builtins/muldf3.c":"4bbc23469dc117700e8947804e2533c10444e440cdc5dee1e57966cb26b48b69","compiler-rt/lib/builtins/muldi3.c":"6fb140334de95e257f0c04617f3c6389a96db048a5070a9148ef2e657dcc23fb","compiler-rt/lib/builtins/mulodi4.c":"24533c80a19ff83c78eb18c24d10d8ec6f0d76ece6e418acebde217e3373b4ed","compiler-rt/lib/builtins/mulosi4.c":"53af5fca27668aec7fe3ffbdfe715ee5f2ac78e604ff990862d9dcf29e6d69e6","compiler-rt/lib/builtins/muloti4.c":"f78d638034fd2ec08d1a676aef5a0dd121ab5b747d878a3404fe9677a139f783","compiler-rt/lib/builtins/mulsc3.c":"999bb7525843274106a141ffe0e9d828d7c789c48c7705007c1828f03d06051c","compiler-rt/lib/builtins/mulsf3.c":"35f4741afff14b3d10cdc228f2e3ee15dc7d54ea4e1bc8dbb8edeea68206e8fe","compiler-rt/lib/builtins/multc3.c":"fbe763225be5f2f185c2dbe2bbae6a25f02c31fe7da7b764b623e73bf236c20f","compiler-rt/lib/builtins/multf3.c":"9696a34ad921379a5cbe1223f6cd529a57755e9349fc18b04de96ff75099da69","compiler-rt/lib/builtins/multi3.c":"886eb84e4f1b15b6aad46d176e3540607649a1a49c5a9fa64a273442d7de111d","compiler-rt/lib/builtins/mulvdi3.c":"4055d9854c72c494bdce6090f9097eccec57037db9eef1d00295650ab9d5ab5f","compiler-rt/lib/builtins/mulvsi3.c":"f1c8f91161bc3404ccce16292f11cfa5e71d7b7ab6048bfc58994f885920355b","compiler-rt/lib/builtins/mulvti3.c":"d9d8bd3b2d81946bd8e02d7f7eabba3a7d2e2664ba7ee624387feec5d11530d2","compiler-rt/lib/builtins/mulxc3.c":"55e08a0bbed3ac5263f0bd3d4cfe45a30222912677b750af193c89f42ed7a27b","compiler-rt/lib/builtins/negdf2.c":"2fb9620ecff427e1d8529d8b843e40858945c65a97eaef0dedbd3b5d84496010","compiler-rt/lib/builtins/negdi2.c":"666431d130aafd71961ee52874b21b78ad91b69eda0b8e61be6a4c2e2cdd357d","compiler-rt/lib/builtins/negsf2.c":"fb3a606355ba9444cab4ed777742400a81a0e994f6d5b16430f6afc879826134","compiler-rt/lib/builtins/negti2.c":"9d7babd49cd913360bf341f9391a304450a2ce471e2805261eae8f51315fe82d","compiler-rt/lib/builtins/negvdi2.c":"557514cd462922192f4095dd1169a094e92bc5d241586212054c338befdab860","compiler-rt/lib/builtins/negvsi2.c":"d70fe48f06dd197a1fdc7ab5b0993f18a0b5ebd9e615abea32e3ac1c4eed7111","compiler-rt/lib/builtins/negvti2.c":"76333e81317b0b3675adabb3663ffd67f2a994391e5f37cea16558ee78df3461","compiler-rt/lib/builtins/os_version_check.c":"0412cadf737bd40f89a5e591a710d12df68c3fb6aa73529d75160341ca146abe","compiler-rt/lib/builtins/paritydi2.c":"6ff731421601e1bcaf22410eb36b9a5bf6ebdf96c7ff670d47c54fb8a97c976d","compiler-rt/lib/builtins/paritysi2.c":"61d21b6d0ba12a27765e37e5e09e720c03fed717f93902fac98289eb3475ad67","compiler-rt/lib/builtins/parityti2.c":"b72f63ff66dda3de8f4beb75211abc8d586fe374c75c0c6360fa256a21cb6631","compiler-rt/lib/builtins/popcountdi2.c":"6333b4641a44cf012e47e3c4d9f025fecc3383d92b4a74e8578c63991368aeb0","compiler-rt/lib/builtins/popcountsi2.c":"d77000e99bacea9d1a0af07dc2d7c5642d3d106a2b071289884cdc9d9b59d3ba","compiler-rt/lib/builtins/popcountti2.c":"e47739b28d406624c23630bbc9bc9fff14b1fe2655c3420dfd3789940e779987","compiler-rt/lib/builtins/powidf2.c":"51d962abb4fd0d9cf679123923aa47bf0173dfabcbf34f060d0bf31fedd3ffac","compiler-rt/lib/builtins/powisf2.c":"3e1c628afabaf4a792ff28b0f6099b2c225077c1a9cc5c14dfce8c2df1520942","compiler-rt/lib/builtins/powitf2.c":"84f469ec8da1316ada6f08eee7d61fc0fee7724dd36efdd8a7f307eaa48055bd","compiler-rt/lib/builtins/powixf2.c":"4b0bec5316af07e32115cdaa5ec3ab33eb1dc17610d3b0e138afccb2739f725c","compiler-rt/lib/builtins/ppc/DD.h":"9937374ae3cdc0400db552bfc7bd16d7de60579f2cfb5a28690514b3048fc3be","compiler-rt/lib/builtins/ppc/divtc3.c":"07f8bdbcdc1399b9d820efcea641b573a568dfa3335442e9fe0aa81524ce1020","compiler-rt/lib/builtins/ppc/fixtfdi.c":"1ff700029be9a47066c773322b6abdf21cacc186791d5e5a3521370ddc2b67e6","compiler-rt/lib/builtins/ppc/fixunstfdi.c":"236ac6069faeed80e5ffc8e83504be28db609ecf900cab00f7dc1fd48fe52672","compiler-rt/lib/builtins/ppc/floatditf.c":"33a5078a2560f4be86bd18235fbe6c63fc0557773583544845c7cfad1f1cae97","compiler-rt/lib/builtins/ppc/floatunditf.c":"97100f3814f10cee6c7eccc3feed3ce9abf9dc5f7dcd69f29de8744d48d63111","compiler-rt/lib/builtins/ppc/gcc_qadd.c":"648cf34cbf6a2e7774728d6ec7fa9d8ad77ddf8f89da990c95a71af7c2081bb8","compiler-rt/lib/builtins/ppc/gcc_qdiv.c":"368bf2db4a335977f63075887adfa3bf290a090e28282d206c6b897398796cf7","compiler-rt/lib/builtins/ppc/gcc_qmul.c":"b5334eb25890c5149135e81cf9f8f4bb0520091b367641988ac82e18b0bc9851","compiler-rt/lib/builtins/ppc/gcc_qsub.c":"a9e0df52e702ed2f2c2405d4807f06981412b4e731dc5282228fb8c2cd642fbe","compiler-rt/lib/builtins/ppc/multc3.c":"55a643639294fb0901b32d4781453f8aabc19d638f43cd7c0ce470c3de8f3691","compiler-rt/lib/builtins/ppc/restFP.S":"674f3bd5098683e11e2f8d2a02eaf8b3ce7944cd3790b946dc10dcd78c9c834c","compiler-rt/lib/builtins/ppc/saveFP.S":"0e5bbf72b047a392bb08668b8b6d772c9954af59940d84e0ad175b3bf3d0be38","compiler-rt/lib/builtins/riscv/mulsi3.S":"4170c1a679e93c269f8f8ddbd7ff571c5508fb2606510843702ae2897d25b16a","compiler-rt/lib/builtins/subdf3.c":"889de5d26d5c8c6aa6d509332a2beb8e41d394ee393fb7979fbb9276dc36df69","compiler-rt/lib/builtins/subsf3.c":"893d6853c0ec412a720dce8afc85aa9502ba9e1ca95d9e5c1b85f5b66dd54469","compiler-rt/lib/builtins/subtf3.c":"08f76086fce8a5773d5a01de26a5768aa3becec5a88453e5514e9470ae6c2ae4","compiler-rt/lib/builtins/subvdi3.c":"f4b4fd91ed1f8fa70fc1bd824f76c0c602e6e4a564291ffb17de82def5c1db2d","compiler-rt/lib/builtins/subvsi3.c":"89e0a293289287cece569d87071f12cc96ec386bc197773521f226c51b026e1a","compiler-rt/lib/builtins/subvti3.c":"63a245e120522ffabcbf597dcb977be0a6432ce5bb85cf158ff31161f2649ce1","compiler-rt/lib/builtins/trampoline_setup.c":"f664cc4d972420f9ee45843d4441f1336eb53e1b0d96cfe812cd4f7197a8502e","compiler-rt/lib/builtins/truncdfhf2.c":"90ecaf1fff27f8a53cb4e0f54632a0bd2eaf2e2a4c0a488606a46b96a97b158a","compiler-rt/lib/builtins/truncdfsf2.c":"9fba756ae730ba15b9b164dd2911a17cb31bbf3ee932e9927d2ad7cf6e8d879f","compiler-rt/lib/builtins/truncsfhf2.c":"648c6f2bd501e380db39b24d16cfa6416b37db6e33a972ebc562dd259ebec174","compiler-rt/lib/builtins/trunctfdf2.c":"663a0dbe84082c588dae68b3e293b0a4ff651a019cee5726ba08c92566eb9879","compiler-rt/lib/builtins/trunctfsf2.c":"4a2f8ada8629bfba08639311a3cc1d82c5aa44156fc50163382348e506fa96bc","compiler-rt/lib/builtins/ucmpdi2.c":"e77665ff49ffcccb0927ba6672ba938a871d127089b385a9f3e2a99fa724eaf6","compiler-rt/lib/builtins/ucmpti2.c":"13d49d1c6fdee51c10b297490a2ce5270a71a5a0495cd384c39e2b324fd84cf4","compiler-rt/lib/builtins/udivdi3.c":"3ddfb205852b02fa4e7c5e372337a2cc9658386dea211f7b9f59e06c53665a9f","compiler-rt/lib/builtins/udivmoddi4.c":"1d27a31f5e3c4cd1851daffed0791738892b2182322c04b7d94425ee0b0291ba","compiler-rt/lib/builtins/udivmodsi4.c":"dab1e47e77849d7fddcf8ff0c6ad32c6b8cb0a5f3a42e263650f57ff5db61f46","compiler-rt/lib/builtins/udivmodti4.c":"0cbb62ea33917cfcac22317a6f407aea0e340a0c627e7bdb4fdfa20ddcb66ec7","compiler-rt/lib/builtins/udivsi3.c":"3a5ebaa2de13f9d10a351e436fa4f514453743d43c008ddc7f4e7cdf9e59a3b0","compiler-rt/lib/builtins/udivti3.c":"efc650ac227336da68b86eae8a85c37acd587a64ff9e5bc3d127d00890212648","compiler-rt/lib/builtins/umoddi3.c":"47f847579af17498ec124f42749d90a544adb9955d1ac82fc40c02f47e35d461","compiler-rt/lib/builtins/umodsi3.c":"2406d78365ed94eab23c0ced6a9649248248ec807841fdacaba7a9b1cb427745","compiler-rt/lib/builtins/umodti3.c":"742588aa54a942ef8d26f3a2f1589632e5726159560022c2af05570a26c66fa9","compiler-rt/lib/builtins/unwind-ehabi-helpers.h":"ac92ca5020ee0f810362bd298afad9e1122be4a791f7af907fcffbb95c8d145b","compiler-rt/lib/builtins/x86_64/chkstk.S":"85ff7d802a83b7dc4c7715e3ee7ca7ea9996d1ba81a54c008e88efab466bdd5d","compiler-rt/lib/builtins/x86_64/chkstk2.S":"8d0dfce07d03232833c0e21199be188ae38429e39e81fbf65cf1e14a2ff6a627","compiler-rt/lib/builtins/x86_64/floatdidf.c":"6f20204105c1e4fe94e02b3006ff04a1775ba16d2478a1f60c37ca1f0a923d2d","compiler-rt/lib/builtins/x86_64/floatdisf.c":"e5eb6e9bfde72359c5c898e61302e8846e53234a347d9fac32273a5769856df0","compiler-rt/lib/builtins/x86_64/floatdixf.c":"f0e3de0078e1bb983106501ae5a97ba5d80f64846c734c3f7d6f862c83ab4214","compiler-rt/lib/builtins/x86_64/floatundidf.S":"238d787dcedbe9567dfa76d36d3722152a14a2f4a12437185ca85d78506bbd80","compiler-rt/lib/builtins/x86_64/floatundisf.S":"3d6609ebb19336c02476d250050321b04e25e11522cbc25ec3d5da2966e25101","compiler-rt/lib/builtins/x86_64/floatundixf.S":"5a22534368fc7b725aae6d33319ea3bd46de40e01a65fa35b712ec7566d96a58","compiler-rt/lib/cfi/CMakeLists.txt":"bded396dd4e4914c397b526c40b407a3eac960a55b777f032682839067c8fa60","compiler-rt/lib/cfi/cfi.cc":"6778ffd5cb641c1ab1b74548b1de88ca126975afa8b892d7bcb8a1b5fc7b2b29","compiler-rt/lib/cfi/cfi_blacklist.txt":"be8abf240e598b5ede59c02f52901c965746476f0dc5eaabdddb0455bfdeb3b1","compiler-rt/lib/dfsan/CMakeLists.txt":"a2dbcba435ea1dc5ee90d13e375b3dad13836eda1bb9869003794d7d932c03a8","compiler-rt/lib/dfsan/dfsan.cc":"0cae1f93302c8e851a0cfb34f1168b1f1fc33ca6fc0e03590ef5186e89e3e56d","compiler-rt/lib/dfsan/dfsan.h":"ce16ba29a24d25653126f717128900f568a64ea4ac30808c4314a307f09c5eca","compiler-rt/lib/dfsan/dfsan.syms.extra":"830e4c28c199394dc5d52f310e727c4ec5adf1ba17b7b42870913dd05208976e","compiler-rt/lib/dfsan/dfsan_custom.cc":"c1b64ccc0efef86d3ee03e678bdf863038d56ef5fe18c36ee7cad9117c79c8fc","compiler-rt/lib/dfsan/dfsan_flags.inc":"24095792bbf11b62d42e26bf8c412015420c46205c95e54145b4d1b17daf37cb","compiler-rt/lib/dfsan/dfsan_interceptors.cc":"53afb0128dd23f43abb7ceda5c741e496c5dbb63a3ed73372d482111ee644b7b","compiler-rt/lib/dfsan/dfsan_platform.h":"b7f04b522b3b59206a61cfa12750da516063b666c16d5bf32c9f7b516688369a","compiler-rt/lib/dfsan/done_abilist.txt":"3c1174447f7fe0b32e2882e999c8ef7d366b50632b626fdbfc3c963aa8638c23","compiler-rt/lib/dfsan/libc_ubuntu1404_abilist.txt":"eac91e69e8d803f407c485dd8fe46052ffbe543e5bfdc7c08ae60648df947d9a","compiler-rt/lib/dfsan/scripts/build-libc-list.py":"3620cebb340a8d19a65270f5e740112bd04f3ed8251179fec7383fff368e5967","compiler-rt/lib/dfsan/scripts/check_custom_wrappers.sh":"50ca6f3e5aa6816f1f58d1615dc4daefd1d18ebbcc0ccf6d56efd12c1cf33d75","compiler-rt/lib/esan/CMakeLists.txt":"3cee2d7b8aa56a93006cd2f7043474e77a44ac7a996ed3e1a818191a9507be6f","compiler-rt/lib/esan/cache_frag.cpp":"a563e0c983c8a7cd70408db3d7772d634820bd11b9b1f8cb4162c31053e8b144","compiler-rt/lib/esan/cache_frag.h":"07a88e8c03ca8e7e3540a605df06fefb1dca4c5e3a0fd3e739007b2476409e86","compiler-rt/lib/esan/esan.cpp":"101e68082e3183be36542ccc2c7dcf10530bf9262d99ee8954e0112383a3a3a8","compiler-rt/lib/esan/esan.h":"0fce3eeea6eeef5c67133e9ea2ae035609cf2bb130cfb95cb759d90013ba891f","compiler-rt/lib/esan/esan.syms.extra":"63a8edc5d603baa190f3526cbf7e55582183f7fe5bc54afe2b2bcaf9333222d6","compiler-rt/lib/esan/esan_circular_buffer.h":"cf189e3193b1028ecfc9498f352489898d73824efa98f10541c7c9e3de281216","compiler-rt/lib/esan/esan_flags.cpp":"d4b6bdf4b6c1e9e62a6a0cf295e3bac6a55fae35450399dd80a2ffd771bcb1e0","compiler-rt/lib/esan/esan_flags.h":"ccdb0e9df0ce50d7ec5066e6de2668d74e617b456332a00ef75ff8c9c18558be","compiler-rt/lib/esan/esan_flags.inc":"f0b928ac56437c66b345092e89776199e16c13fb9b5d29ce32e3a5586ed99363","compiler-rt/lib/esan/esan_hashtable.h":"557e3458b0652e0ae0562c206e3672dbe4409000a26b4b456772ef2af11f41b6","compiler-rt/lib/esan/esan_interceptors.cpp":"dfa2bed32a9b3fb1d73bd36adaf9263a3c7904fd9a76fd4a566571739a207d9f","compiler-rt/lib/esan/esan_interface.cpp":"bc22db10f104e48ca0bffa6d9b54bb4ce2942148cfe45834573382422802c13b","compiler-rt/lib/esan/esan_interface_internal.h":"debc860439217fe5bb4ae66e051d375f31144e5025fda98e1b3c890e833f955c","compiler-rt/lib/esan/esan_linux.cpp":"d3de0f920bb01d5de68823186cac6c94cfdbf897752efd93ef8f5efcc8ec5c6b","compiler-rt/lib/esan/esan_shadow.h":"082e955043fa70ca7e72d75576ef7c6ff0fa0b384b5513adb2338d966146cfc6","compiler-rt/lib/esan/esan_sideline.h":"056473aebe3f513cd0d4dbf289b043ccdd0c575ecc9959a44ae7f6391c2e6b31","compiler-rt/lib/esan/esan_sideline_bsd.cpp":"360cf3988e38dd7fbab1291e124544c71a73ceaa7cab898d79d6b0df10ce30c8","compiler-rt/lib/esan/esan_sideline_linux.cpp":"b3267041231f97636cd112b2708e9584da0ac410db6316a18917e263c1e2b28a","compiler-rt/lib/esan/working_set.cpp":"a033573b57378d7d0a0669ecfd499e7b26649b824ca9416c3023600f3e9d1248","compiler-rt/lib/esan/working_set.h":"e7dfed74279db96c6f202aa8f5f72a29f027f5844f140487be9ef5e0fe2da127","compiler-rt/lib/esan/working_set_posix.cpp":"30eb5af11f11c85d0bc30aadd3daf2425fbebada11d4d9342b7fb43190e0a8e2","compiler-rt/lib/fuzzer/CMakeLists.txt":"4e0f370e42d19cad74180fa7cb3e57f92424e6ac2035051bc3762053ce0e4b0e","compiler-rt/lib/fuzzer/FuzzerCommand.h":"b1b39c943eb9e3560e7a61dba95d24b54d8f8cfb923eee7dc87bc4dcb200ba1b","compiler-rt/lib/fuzzer/FuzzerCorpus.h":"c75f121ae7084427572c2a1f3c0b7a02a9f6acfb131096433de8e275aba6427a","compiler-rt/lib/fuzzer/FuzzerCrossOver.cpp":"f7476d44c372d6755a0b99aa8ffb4be38a48e304595adfcc250354d54a0853f3","compiler-rt/lib/fuzzer/FuzzerDataFlowTrace.cpp":"385530c51613f3464372f51ded116c3f6ea14bb31ba152e2b446cf6046343cc5","compiler-rt/lib/fuzzer/FuzzerDataFlowTrace.h":"449c4f7c991265503e9d21e0ddd1553aab48d57f2d15c04880d00c52787b7f43","compiler-rt/lib/fuzzer/FuzzerDefs.h":"49f9154130d685d67a5724ce7825605e421a2dc0cdb839a65860c1a49b8defb4","compiler-rt/lib/fuzzer/FuzzerDictionary.h":"9a3a099e7fdd5a5988f575f78604f445524e704770d494d5ee1faad3c4a72ea2","compiler-rt/lib/fuzzer/FuzzerDriver.cpp":"78918d2e909c3aaf8d3cee743006b5b2a0fd2a724c79f0c87ec589eb85cabe17","compiler-rt/lib/fuzzer/FuzzerExtFunctions.def":"a7d60034163ad88fd07eebb8cfaf4b76d8e7348e7eb1b2e65aa88b202830a7cc","compiler-rt/lib/fuzzer/FuzzerExtFunctions.h":"c1cb4090a8f4638b81e580b14c8b76e4b4042a742981984fd39f516ebd75c505","compiler-rt/lib/fuzzer/FuzzerExtFunctionsDlsym.cpp":"d0251ef1eb58b36366c380b8bdd9f99ae53360ac8c8cd81be6e49b16d41089b2","compiler-rt/lib/fuzzer/FuzzerExtFunctionsWeak.cpp":"1a902da827b6ab034618aea4af83214d842d2afe613db0d2c274b326ee5d3674","compiler-rt/lib/fuzzer/FuzzerExtFunctionsWeakAlias.cpp":"3ef8321303ffa15bd85534ff633b1f9e79c9d9dccc0eed98fa85d16fd7c1c08e","compiler-rt/lib/fuzzer/FuzzerExtraCounters.cpp":"68985971fbaedc149a4ebb474191be252a041c08c96747c1fab6db1271bdab50","compiler-rt/lib/fuzzer/FuzzerFlags.def":"ed12c0a35b3732243c1f3b6041f1f657248cb318708334cc03d9ca6be6bb4864","compiler-rt/lib/fuzzer/FuzzerIO.cpp":"66498b5f4867cb730689d0ff1d8226abfe7f4c28a03d1e84584db567ac50183a","compiler-rt/lib/fuzzer/FuzzerIO.h":"14a7decc20a84a9414b519b70759fe4ffc525a66c367c6846043c60859ac32c2","compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp":"0b43bb80c944d3146a71f5e62daa3bcd0dd6f7d502dee0dd56881b4c33abd321","compiler-rt/lib/fuzzer/FuzzerIOWindows.cpp":"de56d2239787e665b73d6ee43345c88e6394d558c505dccce6e7c62ddd231415","compiler-rt/lib/fuzzer/FuzzerInterface.h":"ce0570be300b8f9358779197cd8602e8e85917436da1f67732446482933caac8","compiler-rt/lib/fuzzer/FuzzerInternal.h":"47e9eb06db643aff4a22dcfb47d20d6df52be0a9d048b94b780d127654fe0d29","compiler-rt/lib/fuzzer/FuzzerLoop.cpp":"753e65a6818865aec189c556e80cb04eeb122519336ed595abf5b371505889a1","compiler-rt/lib/fuzzer/FuzzerMain.cpp":"05b6a3673c051db6156bbda68c370d49952fd159b1ada05bd6816ad8e2cd85b8","compiler-rt/lib/fuzzer/FuzzerMerge.cpp":"1b80e1b139f04edaa623b1fcef6fbd8c6bb8922ac555de3df1d8fa6e2333e03a","compiler-rt/lib/fuzzer/FuzzerMerge.h":"548619e382c788fb98a077bf06875845e8978fac82eb172bc6f32808f6ae601e","compiler-rt/lib/fuzzer/FuzzerMutate.cpp":"a8fbe76e3a053f755a5ddae6f63e810f2fddee0b4e4b42347814da5670b9dee0","compiler-rt/lib/fuzzer/FuzzerMutate.h":"02b1a797e5e1ade933bad85be503fc2e5debca9c4c8e0f5501879e69db44ea15","compiler-rt/lib/fuzzer/FuzzerOptions.h":"d5f3488eb5acb00d00a448f700d00e2f3e87155f0a0fb11e7be297dbb15ad984","compiler-rt/lib/fuzzer/FuzzerRandom.h":"751e55d91b0e580b68d3cf3192709818923747b5dcc1962b2465ccf534bcf632","compiler-rt/lib/fuzzer/FuzzerSHA1.cpp":"048e4d3da996724d813eeb565aeee79ddf951470cf8de204362d6094f65237ce","compiler-rt/lib/fuzzer/FuzzerSHA1.h":"6725a1a71bfec6f11c548da52c234d7dd71a45bbf275e62212e1b1bd222685d7","compiler-rt/lib/fuzzer/FuzzerShmem.h":"2790613c559be322baa5eb4b5f22d6316f5e86da8ab4ed7557c287f0346eab29","compiler-rt/lib/fuzzer/FuzzerShmemFuchsia.cpp":"0a2a2b882e43f3d319733d7fc5e4a6289fca20238cf78676b35e9df4793ec7bd","compiler-rt/lib/fuzzer/FuzzerShmemPosix.cpp":"fcba01d72f0ad1377b0297ec820728671aed0784d6ad22cedf99b1b5a477f3f6","compiler-rt/lib/fuzzer/FuzzerShmemWindows.cpp":"59907558eed2669a1497cc3f8a75c7a7e671ec2401e7088a5ac96ebe811df336","compiler-rt/lib/fuzzer/FuzzerTracePC.cpp":"a014006f341e16a55ca0294986a1ccb160d2b67d8d41f767ab1aab3f50f27c46","compiler-rt/lib/fuzzer/FuzzerTracePC.h":"6b50238c817dcd45fff18049a2a6c835d54776bd71776e84cf562062d6b417a2","compiler-rt/lib/fuzzer/FuzzerUtil.cpp":"76fd08f4e69c3b8880c898c05f530c968f35b18751f1a3b7100bc95454a61d10","compiler-rt/lib/fuzzer/FuzzerUtil.h":"7951849f444d984757b2325717edd4c1305f4db3b42385b7e1ef6a6ee4175c23","compiler-rt/lib/fuzzer/FuzzerUtilDarwin.cpp":"d5d7342986369d6a879436efa3f4042738f9961afb51f8d69dea18a90d515dae","compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp":"548d9a3941409459175b6546d369cbbf4ddec64f90b1b93ee31ef30b7c6fdd3f","compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp":"98f96fa98c8f42eb0e2efd0660264cd2d63f27bfd9e96521ad3dba7c9d64386d","compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp":"edefd848b2e0aa323ac863420efd82fc158dabbabeda567227cf0d9725b8150e","compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp":"e8d62c4dac9e4129bae3ce398ef54e8426df310d8d1c6220ea6521fe046577cc","compiler-rt/lib/fuzzer/FuzzerValueBitMap.h":"3dcb95d4bd1cf3ae32fc3782485a6469149a226ff4330ad673e967f42d343b0c","compiler-rt/lib/fuzzer/README.txt":"f1d3f05793b5ea2993be318f882afba3d4035442ed8fdffee841603ae3ea944d","compiler-rt/lib/fuzzer/afl/afl_driver.cpp":"a2567cfd898e8594735889593ebf2bf8208ac8f4ac2fd827b228184f1ea5c0d6","compiler-rt/lib/fuzzer/build.sh":"5d091a02c389b67fed966521052316535393265d4a7eac830dbede409941c58d","compiler-rt/lib/fuzzer/dataflow/DataFlow.cpp":"420681c0a30876d64c93002ff184cf1df0ba95fbb5f96d2957cc81923e0e4e21","compiler-rt/lib/fuzzer/scripts/collect_data_flow.py":"05534959081f625a59454bd859a3f202d3ae06fff826f50af860a815c2a23b4a","compiler-rt/lib/fuzzer/scripts/merge_data_flow.py":"30117db7707146c3f657369fd4211214c915d5ab31af4b57a05aa57ab2d121a8","compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py":"ec21b40b51d96068e92f76e3870842c81286b042a95c469754833a3f3fd07bd6","compiler-rt/lib/fuzzer/standalone/StandaloneFuzzTargetMain.c":"374edcf0399c3070f679fe9d30c10e0b595ea207fe60f1761eaaba4d0a531f81","compiler-rt/lib/fuzzer/tests/CMakeLists.txt":"ce5413a7a6a5bec771246ee75ae257711b85809c006b1ef145e801164906fb3b","compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp":"f093bdcb2bc34b2baa0e1ede740aa9206980b99ecac9238aef3763a1df136d3e","compiler-rt/lib/hwasan/CMakeLists.txt":"b7245c80c8b971c4fc2b55800cd3014878d81bf16446df55ad6cfa40ea779a8f","compiler-rt/lib/hwasan/hwasan.cc":"73cd1c02fa327f35855ac9ffa690c2e73c722000929b00b7fb44cd985c64acb9","compiler-rt/lib/hwasan/hwasan.h":"77728cc7ca85e0335f2deccf524445b787eee1a2bb9329c7ee767e9fb5ce5829","compiler-rt/lib/hwasan/hwasan.syms.extra":"49b0fab26189c23d5f4fb170b0617edef00995aabbf55dd1e79c135ebe26b923","compiler-rt/lib/hwasan/hwasan_allocator.cc":"0a79335425ca0ad27df9db6ebcd9edd44786c73af5fbd7d086124989fdbe2578","compiler-rt/lib/hwasan/hwasan_allocator.h":"db6c02dcd4a7ca30d424a04636fc98ed5bdccbe4c3f7fd36a2ec28e78ef67f89","compiler-rt/lib/hwasan/hwasan_blacklist.txt":"d5c30e2a69e9e3ca4ca3cff8fc1caac791b7d8d04612f3fafc841fb672b2ae8f","compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cc":"9efe0cc3d176671ee4fd1a1fb3222340de678c7d7faf0eed2734287be53ed470","compiler-rt/lib/hwasan/hwasan_dynamic_shadow.h":"1f8b586cdae26769278fc198188a0f73a10c4abf1cd4bbc929f32b829ace2716","compiler-rt/lib/hwasan/hwasan_flags.h":"a537d00d7969c2026f249b335699f8d495ed6c9b71123475cde0208b8c0fc836","compiler-rt/lib/hwasan/hwasan_flags.inc":"44f1fc6fb174ecfbee208ddc7e487f1fdd848f7af5b247e3a14d426eaef5b570","compiler-rt/lib/hwasan/hwasan_interceptors.cc":"dafe054d8a9ae889d1f2b95b9e512d47567fa89b5aea8a0d1c5bb673379b2633","compiler-rt/lib/hwasan/hwasan_interface_internal.h":"de4888ff828b94b2348f76caa1bdfd0e3208c55995aec7605465d39c31a65eaf","compiler-rt/lib/hwasan/hwasan_linux.cc":"b165169784d53ce764ddbb04db2c991fad597e6e42f68e52cc9ef7d8b059603d","compiler-rt/lib/hwasan/hwasan_mapping.h":"a33b8bb9f7e710ffbcdff69d7eb85bacbf83f329e126085ad949cde2fe1d2e35","compiler-rt/lib/hwasan/hwasan_new_delete.cc":"d2adad3e58ef1db2ec268724a933a19e1f33f8187a88c3b9dfa545d45b91bb2a","compiler-rt/lib/hwasan/hwasan_poisoning.cc":"e2b9b8579ad112c29b43a29f2e17fbefee2ac074b6955359581066ad7d61a749","compiler-rt/lib/hwasan/hwasan_poisoning.h":"c78c7638e7aa8995ad5da464b3dd2b2e38ad27a13a8734cb357c48b08dbdb8af","compiler-rt/lib/hwasan/hwasan_report.cc":"c5c5ddf4280d378b8c62f302ca3fe8e39e331ec0f92acfbf540eb9f7c4187a02","compiler-rt/lib/hwasan/hwasan_report.h":"7ec1cc94be72bffb01d597c579bc02f8229960b109dc945ec522b1948873e6a0","compiler-rt/lib/hwasan/hwasan_thread.cc":"05ad5f973cfea49fcb7d1b50a08720ccb7f933734266d44f34658f9eefa8f884","compiler-rt/lib/hwasan/hwasan_thread.h":"df2451dfcf1ee7788bb5696afda69e65846610c32ca826cb403971a21398cae0","compiler-rt/lib/hwasan/hwasan_thread_list.cc":"074f545aff71b482243a3fa5a6d1076c747b53bda0004b4eed681e1b0b070acb","compiler-rt/lib/hwasan/hwasan_thread_list.h":"a696be6325e566b9a82417b7d772e416f8f8bf231d955ceb8277808a57e5ba5d","compiler-rt/lib/interception/CMakeLists.txt":"2727204d25e57993dcf30b39cc9d2a6c6daddbb6d087d07673179bb459c58a39","compiler-rt/lib/interception/interception.h":"d49ced0ff618eeeda93e8254a7c6c40fcddcef8c1b5d7e27c3ea265e6c82617b","compiler-rt/lib/interception/interception_linux.cc":"1e029f293671b23373fb33d7d1dd09caaa55500710f86221e7a4fb69db20156b","compiler-rt/lib/interception/interception_linux.h":"dcd497a830a7e60b91d24f494237929c7138500b140ab87099dacc6b36a3f404","compiler-rt/lib/interception/interception_mac.cc":"03492f3f41a3807a7e6cf0b69911540bb84278cbf0215d32c6b56c5fea37f782","compiler-rt/lib/interception/interception_mac.h":"78177098b48d81375e28c2090fa76a5ef7f3c60a8c785ec5916e7b488a031ad1","compiler-rt/lib/interception/interception_type_test.cc":"59cf81eb56a450b000072adbc4b001ffddc4c5486fcec813c226ea3946cfc751","compiler-rt/lib/interception/interception_win.cc":"c47e71b62ca47e945d015eb4646a8dc701a3e39b5a920832dadbc27131037ec8","compiler-rt/lib/interception/interception_win.h":"576df881312a850aee55060ce762152843e300058e984f035c7f74d4ed4233ca","compiler-rt/lib/interception/tests/CMakeLists.txt":"5ccf8cba0717299f693b7bb526411598456e51f61ff2a91a93534b3aaefdc260","compiler-rt/lib/interception/tests/interception_linux_test.cc":"c0571fa87373a92fbedf74941aa9666cfc6939c4ce3193a53a4b1fc3be7b6029","compiler-rt/lib/interception/tests/interception_test_main.cc":"f253db37e1c7dc7d619ed473d81212e77a804225371c43fd67b61c5a15ad1edc","compiler-rt/lib/interception/tests/interception_win_test.cc":"b664f5df0a122eb3adeb73a462303dfa9e34be9b5e6c24a2b06009d5c5c70c24","compiler-rt/lib/lsan/CMakeLists.txt":"ed5267287e72d60b8271fd767e05970804d04dbe2fe2a068360b0d32807635bb","compiler-rt/lib/lsan/lsan.cc":"4ef127d9df2dc78df6e3a9e8b85f1845360629513c8be71f1facdb5c284b8651","compiler-rt/lib/lsan/lsan.h":"4d9d2437ae15d52643ec988e24b3ba18007de8f5ff1401b20268ad79a9851ba7","compiler-rt/lib/lsan/lsan_allocator.cc":"6d414adf326d0a14a957ff3bebb6439119d86f3fd512b062830378bb290a269f","compiler-rt/lib/lsan/lsan_allocator.h":"01f340ec637f72c9fe443027ef9deae554c7d9197edffbbc58d715d135f0ab16","compiler-rt/lib/lsan/lsan_common.cc":"e3ca9e0ac5c8620187129ac590363c543baec80e316fca9b09f8f78ac0cb2668","compiler-rt/lib/lsan/lsan_common.h":"c44c76f9dc976e89fedfb93bd5cd1c0c2c41aecd56382473ce99ccf2987dbd15","compiler-rt/lib/lsan/lsan_common_linux.cc":"a663ef462e04f73b68078e9a38c7f50ad4a93fc0aad270556a4a86b7f63fe092","compiler-rt/lib/lsan/lsan_common_mac.cc":"7817e1c0f7130ab7e2f2a6de291e3adfb712dd75761eeede8859643becbc1936","compiler-rt/lib/lsan/lsan_flags.inc":"23ced4051c51338af27986c1f5a92e666f2b87393e94831c39febf556d831ddd","compiler-rt/lib/lsan/lsan_interceptors.cc":"c271b67865dbf390a592adf7f82f9c19ec024ac6205e11593a05f3f376a4ac05","compiler-rt/lib/lsan/lsan_linux.cc":"5c59ea506d2b615f1891a78e4895c771ac0cd75de91ea46261e1accd906933df","compiler-rt/lib/lsan/lsan_mac.cc":"52c4b02f5747349747bc169dd345eb0f66c17c463391b4ac7bbe77c29d6929a9","compiler-rt/lib/lsan/lsan_malloc_mac.cc":"c6d40d4bb1a5afb58073776bfd4b3a4766c7d4e71204b73a2307777a0a576c9d","compiler-rt/lib/lsan/lsan_preinit.cc":"33797b47256ad054466f157d63b7910e55ef9a76d2e67df42fb4d30d5373e4cd","compiler-rt/lib/lsan/lsan_thread.cc":"4a733ea7fa58c5d55e93406089d01aa6cef2048255d2d936e93c5ef6c1f6eb97","compiler-rt/lib/lsan/lsan_thread.h":"324e145f85f8edf72952f3fc1e41bdcc72ef7277a0b78ed880d07d6d43fa2033","compiler-rt/lib/lsan/weak_symbols.txt":"c54630bbe43bd0151656b597682544a1c645c9367446f2ab678b3dcc76093ea7","compiler-rt/lib/msan/CMakeLists.txt":"735f66b4310bc40b83e2f742c355930e6ac3f3aae55c666c2194ef82e5ed33a8","compiler-rt/lib/msan/msan.cc":"dbe45961e3359ee9e8362fd3e82ce195cc51df014d60c679189553a724a29456","compiler-rt/lib/msan/msan.h":"5ae1e7166d33750ff12848166c42fa4d9918cb3095a6cf67b000c883b5eb3929","compiler-rt/lib/msan/msan.syms.extra":"9cd132a1b4f81a6df0ce29b8256b92940bc8d7f6cc764bce66401578d68f0a26","compiler-rt/lib/msan/msan_allocator.cc":"e8c0be06c033754da6f45ae37b6b7791204ce55a6fe468d91feb290e53f07e4c","compiler-rt/lib/msan/msan_allocator.h":"4d6a557159e44ffd1b807014128a488f5d49313392beeb01a54e0f2d6c4598cd","compiler-rt/lib/msan/msan_blacklist.txt":"cd53ed9b1d6672ba3d83774f3e0bfbcf837d58a666e614cf35ba86fd0678c34b","compiler-rt/lib/msan/msan_chained_origin_depot.cc":"5490f6fd944507e6aa7f9f9dc6d25ef4176c50835f38a6432e5854d24c463673","compiler-rt/lib/msan/msan_chained_origin_depot.h":"b46ebdb3d7872f4dfa191573dd201160436888e8d6a8d64fc32b00a228e2d95b","compiler-rt/lib/msan/msan_flags.h":"438964ab39e2826bfc14c3607cae85ebabd280e5cee6f9a900d9ed1399ee6463","compiler-rt/lib/msan/msan_flags.inc":"a43707449bb0131b34458892a9a73e942c799098edc552f8345907c3ed7b13b5","compiler-rt/lib/msan/msan_interceptors.cc":"061116d817cada9037f4b0ae379f9a383606f8663f3901f6dc20bd8e78f3f336","compiler-rt/lib/msan/msan_interface_internal.h":"20c5be22826e486c6185c717a72980fdf97e23d59bc6cefb557de72aec768313","compiler-rt/lib/msan/msan_linux.cc":"a46720c4b0d36094e29ff55ba84ebaa53656da8667d44109f4da55a1f1a43c8b","compiler-rt/lib/msan/msan_new_delete.cc":"dbeef24bad5dd1a4865f057f8e67ab645b7960fc95d15918b2f74b94d044de34","compiler-rt/lib/msan/msan_origin.h":"4fa5484da4e47e7e2aefe922c91e9967a0688b5f84460d2e60330d1b68d2768e","compiler-rt/lib/msan/msan_poisoning.cc":"c61d5715982baf1847505565de1f04886e13a47da4407eb8c606906bb53a4c84","compiler-rt/lib/msan/msan_poisoning.h":"147ca031f7a1285ef1617f85c97347f7587bc6904ca566d23d334b789d0d1217","compiler-rt/lib/msan/msan_report.cc":"a52de944327c3fa6742b4aff3e32003f2a2d38fb7bb8216d878f6d3acb909c7d","compiler-rt/lib/msan/msan_report.h":"1df974dd5c9978cda296b7ed5b0f45b1aec17348cb8e0f3c1eb9c5b1994cde49","compiler-rt/lib/msan/msan_thread.cc":"8ab4280692d773c08262534e055eeeb06a49620ec69152978717c064dd86cde6","compiler-rt/lib/msan/msan_thread.h":"7d472df120c1230587bf13e3f337c0c6ebaf27419638802e6c590051df382bb4","compiler-rt/lib/msan/tests/CMakeLists.txt":"a36c9e3dbb8efeeaa0c196083f885b6efcaec2e99e2f2846b8fc0bffc919fdf8","compiler-rt/lib/msan/tests/msan_loadable.cc":"8a335fe493bbc4a051588c9ffeb8d5f7d420b38225cf3e64a773174f5692a5c9","compiler-rt/lib/msan/tests/msan_test.cc":"5fe3c1f5c04de4fc6e690692548cc36a88cf266419d462f899c835ced46df773","compiler-rt/lib/msan/tests/msan_test_config.h":"09f1e9909421e02622d554fe5d965efce23bb6f64bb9a1a56ffa2dacb19f2ce7","compiler-rt/lib/msan/tests/msan_test_main.cc":"dbf816fdf8476da0424b7a76ee02a8cc5896a09a9fe6e48771ff3819ac3b106b","compiler-rt/lib/profile/CMakeLists.txt":"398bd5c855fd61e2c305c43a720d5b482dcd59e690d6fefd8ca1e0369f19d3a5","compiler-rt/lib/profile/GCDAProfiling.c":"17f292640c4d8e584761df0f55ef389c44efa677060d929476da78310687ed44","compiler-rt/lib/profile/InstrProfData.inc":"164d4a04bfd8c7fda3fc42bbb1c1dd12d2ab9077cf84cd5e6e0169a3e0e70387","compiler-rt/lib/profile/InstrProfiling.c":"6585bd9167ebb1038df1cdaf28714e98f9035411367880fd574ceae5d22a5c89","compiler-rt/lib/profile/InstrProfiling.h":"71cde3396aa7df2816e49992047c24a9fa386c54b72820b960dfa1040a2901da","compiler-rt/lib/profile/InstrProfilingBuffer.c":"73c4994d455ec831a465a3ea702d3fb140d36f06f89ee8c7b459f8a2de161dc4","compiler-rt/lib/profile/InstrProfilingFile.c":"8b40ee9d86609babdc8a70bc9acc95386d5cc956459d4917d7893bdb38b2418a","compiler-rt/lib/profile/InstrProfilingInternal.h":"e14a2f90d69d8bf70528d89c052e4f00786c4f3351c7780fd6ec482ae376bdc3","compiler-rt/lib/profile/InstrProfilingMerge.c":"170c94c46cdfbb003756f5aa7a62adf70817a99d4e11be52ea3bdd92bf1265f3","compiler-rt/lib/profile/InstrProfilingMergeFile.c":"894c44eeda8bb19b35dc8619c69248a63af7357c82d0bc069deaf3c736be57a4","compiler-rt/lib/profile/InstrProfilingNameVar.c":"9e06287a748dc13b7e90ecd9dbb5d65f9f7a256ce6d690237b810bede735a8e2","compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c":"3be25342fe514ababbc706a5fdcd10558ff51544f71f7c1f7fcef90727ab85f0","compiler-rt/lib/profile/InstrProfilingPlatformFuchsia.c":"e839ec3b0859cf3ae435dd72f62c92102962cb92ca4f6045d1b649cb91f9dd68","compiler-rt/lib/profile/InstrProfilingPlatformLinux.c":"ae16bfca66b76ad37bd2b5bd7df4c4ed440f8b937e4606759e30882a28c483e1","compiler-rt/lib/profile/InstrProfilingPlatformOther.c":"68752936e817ef9bf04fd0b0292d1c5b970672bb797ac370dea53f52e5f518c7","compiler-rt/lib/profile/InstrProfilingPort.h":"0b7db9f5b6cc08d44c9456ed64f1d194f2ac4a3219a05098c5165281664f461a","compiler-rt/lib/profile/InstrProfilingRuntime.cc":"882b86ba8dbb09762ce08dd2f76f173778806070c95a5ce4b5656f0fab8e8b93","compiler-rt/lib/profile/InstrProfilingUtil.c":"95839e993de66b87166986e479dcf0d85921a80d51843111b95ade963744b6df","compiler-rt/lib/profile/InstrProfilingUtil.h":"dc040ca0aad5a3b0cc0ce428aa1361a4b598968925834d00b140f21598167078","compiler-rt/lib/profile/InstrProfilingValue.c":"b560f367ed90036de0a1481a02c7bbb28f2ac378ca6d37211ced5dfed749f2c2","compiler-rt/lib/profile/InstrProfilingWriter.c":"c796a66a65f6fef1d94b47bdd989157c4e11b4d20f68000fad1ec0388d20d20a","compiler-rt/lib/profile/WindowsMMap.c":"8419b59ce719ef02dddcc2ffcb85790b5a049d98a20b4ec71b296333c0b3cdd8","compiler-rt/lib/profile/WindowsMMap.h":"dd78e8c3e7dadccfc80e3ca8ce16d1923281cafef5dbee9a9f977897df37ea74","compiler-rt/lib/safestack/CMakeLists.txt":"ff67a24df6b2a8690ffe1d13b1ed172155759910f5e81ccf13c516fe08e0947e","compiler-rt/lib/safestack/safestack.cc":"a31f26e127abf31804020e52099336ce10dafdadd621242179280a3d71725227","compiler-rt/lib/sanitizer_common/CMakeLists.txt":"256718f16d0f5fc28fe37ecc5d7e558936bb9f222d925f84545b43c061ea1562","compiler-rt/lib/sanitizer_common/sancov_begin.S":"ce88eabd44ba7c89fded509cf6c987a5c2c90f71429090bfd6c25097c14f184f","compiler-rt/lib/sanitizer_common/sancov_end.S":"c334b70571f691c7a5335aa41548af088fc8d9b189ecb998101a3a337092984d","compiler-rt/lib/sanitizer_common/sancov_flags.cc":"71e148332446f5684c8ae9e6b74ad3b0ed2fed06e4cdd8b2382efa61f4b94298","compiler-rt/lib/sanitizer_common/sancov_flags.h":"392dc342e8e7993a0cb778b06299a20f7ef3b442b9c4496099166bd188bcd6a6","compiler-rt/lib/sanitizer_common/sancov_flags.inc":"e034efeef2c601702213db25e1402f7768f7f30283fa1605fcb2981b25d86a65","compiler-rt/lib/sanitizer_common/sanitizer_addrhashmap.h":"8540c95ef4edf9d24bc080821e5f3fce1120b57a35ab42b037ff80c6a191cdae","compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc":"5430f168b345f5bc9b9b5e1a5369ce773bd469163dafb08fcbb20e5475b2a47d","compiler-rt/lib/sanitizer_common/sanitizer_allocator.h":"4afd0edaef39f8d1edf03ea42cbe8f70543f6c0f74da2752faab9e3683a0c613","compiler-rt/lib/sanitizer_common/sanitizer_allocator_bytemap.h":"e1233cfd18c4aa443a3974e04dfb89da0de97b3b5fdb3aee8bd185ad710c82b7","compiler-rt/lib/sanitizer_common/sanitizer_allocator_checks.cc":"ceff90bb439637cd7fefb038fde40a39cc4410c57726f2063db32d335687b1e4","compiler-rt/lib/sanitizer_common/sanitizer_allocator_checks.h":"3dc7f038be1eafde72a2902c3d0a0b9165e2782dfba43dafbe30626ee8353211","compiler-rt/lib/sanitizer_common/sanitizer_allocator_combined.h":"54fde239bf056e700d81848515c50a9e13c1bde7c77041a034041276f65f951a","compiler-rt/lib/sanitizer_common/sanitizer_allocator_interface.h":"a12b84d262d1df8f4a50fb0dd78fb32949811d864bc42a963fb22d624b9ec2f0","compiler-rt/lib/sanitizer_common/sanitizer_allocator_internal.h":"5b31f3ce1a469ee392a7189c1dcba98ac81097b3194eb21b8dfb422e3964c78e","compiler-rt/lib/sanitizer_common/sanitizer_allocator_local_cache.h":"94e1dd83f8756a4cb0f9684495569aa3d1d58bf6895e714bdd70d1c869072159","compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary32.h":"a50ea37fd0bc8cae34fb17609605602722798a0f04ffe0f09f36258a3d1db9c0","compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h":"9004ad38bf058d0c0246e25f9c6030e9053b5dff02c16fa10d9257a46bf00548","compiler-rt/lib/sanitizer_common/sanitizer_allocator_report.cc":"5174457c2097bd08c60755e92a9d7e6517070b99f5e7f6d6935e42fd9a71b1d4","compiler-rt/lib/sanitizer_common/sanitizer_allocator_report.h":"fc030000492ad78c4e4960185d2d9ded2ffcfd402bc11489bb736fb51caffe3f","compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h":"5f3d791fda8ec3a43b04f16d0034b6ec12da5baf82639f69c3ab7535d8ad2dd4","compiler-rt/lib/sanitizer_common/sanitizer_allocator_size_class_map.h":"53d92265657047983882cc2b6ab7c74fa3dadd495469c1521653e2ef88f9f5a9","compiler-rt/lib/sanitizer_common/sanitizer_allocator_stats.h":"b1750e95b01a114b4abf3942c9807a3cc946c39b0beb546ebd70a121eed3670e","compiler-rt/lib/sanitizer_common/sanitizer_asm.h":"edf9ba5450c11460832b709987493ac4cb1b39a0d44bf892039324ff8778d214","compiler-rt/lib/sanitizer_common/sanitizer_atomic.h":"269ed881f6e2fcda6f07012b301135f60efcface424d967a76d94bc55b449a3d","compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang.h":"76eff3bc03d510d2e3f7b8fd7f8b26e83bd98bfb83be58f17aa3ca257735ebd0","compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_mips.h":"7acb5c338c4f60a4796e600a3acb1421e87ea8bbf640ddc2755583e563e41603","compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_other.h":"8e46633eecdbe08d04712abacc0ba1d15315f71222be4824a9cf9e0aaa4177f5","compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_x86.h":"f52971c2d597ace6910601a2bfcc7899d29d01e144da0bd074b399680879c556","compiler-rt/lib/sanitizer_common/sanitizer_atomic_msvc.h":"c85ea2730c03983dcfe5af60b5d1171f8f964d9d913f5332dcee7c3961283de4","compiler-rt/lib/sanitizer_common/sanitizer_bitvector.h":"210ab60b00a7c86646407715398740c88ac111ab476c41c4f425f5e443530bcd","compiler-rt/lib/sanitizer_common/sanitizer_bvgraph.h":"6804302643d0b15ad7e83865032ed5485a2d9829787de513b833d215f1b776b8","compiler-rt/lib/sanitizer_common/sanitizer_common.cc":"65876e319eec41368bf33a7ce6c1934870e70797eaa6d6041b8339840dca2a0f","compiler-rt/lib/sanitizer_common/sanitizer_common.h":"ce59561744d6624cdcc8adcb1b14ee53d929da053a0ea74e674ab899a1bea40e","compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc":"6a933ee927cdc998b3b003489da0ac186ece363128795b98f01a57fb5fd9d7a7","compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_format.inc":"72dc9021c2e4cc69e54b591634b6e437ac0ae09a41575d7951c0da9661b7271c","compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc":"f884ec5ce074cd60439636d4aa1863b4272c88f684ba739300bca92b1ce30066","compiler-rt/lib/sanitizer_common/sanitizer_common_interface.inc":"17f2becfa954f1a4871d9376055cceb9f6abaf16e257e7507892631984f0c103","compiler-rt/lib/sanitizer_common/sanitizer_common_interface_posix.inc":"800b28dda446d3e27a1053bcaed4488bf86c6f72f8e550b966fe204a183abf39","compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cc":"ee4fcd93554a87e5c006abf3d19ba163dfeea855021dd2fd27a60ddedb784b0a","compiler-rt/lib/sanitizer_common/sanitizer_common_nolibc.cc":"4a462f53a6da5e7aa5835b12f189f2f890886e1477eaf3eac21adb65c0e00aa6","compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc":"5d426600a3b25a67d6a4cf93332c09e8f42e111b5306560edc500500b73d77b8","compiler-rt/lib/sanitizer_common/sanitizer_coverage_fuchsia.cc":"5655675c93ee594ed75740a8f60a08349d48994e2cd9c1d832f92177aa50705f","compiler-rt/lib/sanitizer_common/sanitizer_coverage_interface.inc":"38a6e868d9e2f71d8f936b6c7c81f5eb1491e0821de7f21ecfc9af8af14ac187","compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc":"0080383782aa64fa090487d5097028c34cb4bc56bd4ee835a1b903f8af094578","compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_dll_thunk.cc":"d7a78650277c6bb9ecb70a205577819eb34d5ef6276fb48cf1882964f8d1988c","compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_dynamic_runtime_thunk.cc":"1f8dd842b033e07bdb7a39c2d771edda88fbc97f62a349f193c67f74c530d592","compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_sections.cc":"7a49575ad2670cd4b90b72201d21ecc334aa3d3eda96219760cb3a3526d7b8ae","compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_weak_interception.cc":"88fa4f64cd6fc72c65428dcd6866be860699de4a97699faa28dbe75edc39f964","compiler-rt/lib/sanitizer_common/sanitizer_dbghelp.h":"2dabe339f583408a479f081636b38fefd113391650a94917eb1eb43ef0895e93","compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector.h":"9c4916945a31e13b7084354eebcc1c4d250090b770dd48bb33ed903ce66575d7","compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector1.cc":"4a5c0146311dc6a76ebb6145ba6141cbda5c835639f5d193b2d9569ede5e698e","compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector2.cc":"5fc4ce4445167c09471c33088061db69cd6ba3eb0bf9e76ebc6bcac4a5c75d99","compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector_interface.h":"e6a0ee35cb606d3b7c02ce22258047fee8005776c8753ca02fa5ffb9480dbb34","compiler-rt/lib/sanitizer_common/sanitizer_errno.cc":"951bfef15b1a6742c5d5ab0822297b60706f892e47bf57f25075360d6a0fb7d3","compiler-rt/lib/sanitizer_common/sanitizer_errno.h":"473bbdfb3fff1855deb4efa7deedf300b9aabe8f0ac5718d9debce497c372961","compiler-rt/lib/sanitizer_common/sanitizer_errno_codes.h":"5ab5b91e225426ba58c0ed0f546267c21a5dba66f7e82a3e84f20a82785ad338","compiler-rt/lib/sanitizer_common/sanitizer_file.cc":"3daef2b7caa4fd347e806a6312a3d80ccc570b7c62b92d6555a82de468e8379a","compiler-rt/lib/sanitizer_common/sanitizer_file.h":"c4e34a1268262e93117529618fd7e50dd0e5c5b75d6c5aa956a966fb85164a22","compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cc":"4a9f56957a38002715d0be80e2f586869b1ec58de76f32e3cf9fc7bd1b25046a","compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.h":"87b82221880015b107bfabf787cdd752ff6e79b3660d59ffe53d139cd7c3602e","compiler-rt/lib/sanitizer_common/sanitizer_flags.cc":"63191307698e8f5362d505500825b57ddde030b55cbd762687157a4098b67a02","compiler-rt/lib/sanitizer_common/sanitizer_flags.h":"83f8cb4ce5b5e34bc4b3905d6bdb21692e840f01f61b1511630031a77ebc8f73","compiler-rt/lib/sanitizer_common/sanitizer_flags.inc":"c5f4f334caa78dd3295e618e5ba331ec98c9a29ee9b9cb983271186123c416cf","compiler-rt/lib/sanitizer_common/sanitizer_freebsd.h":"9b35a78a268d5223793484acf06b5a1ed4ac7e41a3c6169c951abe42b78e9ef9","compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc":"adf2093b51a2cec3ed4d2457c071438deb08b49681f501e3d8f7683c7d3f9f18","compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.h":"af551f3c4efb4b85ab3ef3bc25272ef3af0a962b24e7fb7df5055f525c0399a2","compiler-rt/lib/sanitizer_common/sanitizer_getauxval.h":"020c678159deebd98bb5edf7ab67a4cdfd5a29465c2b792f9467e75dbdaf5b85","compiler-rt/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc":"3b50ab0d45703cefcdc705fb5bb82386549bf5b54a31028492e14b783bf174ab","compiler-rt/lib/sanitizer_common/sanitizer_interface_internal.h":"01d6f159857e903bc6ab0c69fa2b9a3e9cbd8f96bbe6c83d6df629aa7104a384","compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h":"44d31da5c082d010c1d0125900b048105bf71718b741ca3d4732507d0e64ca5c","compiler-rt/lib/sanitizer_common/sanitizer_lfstack.h":"9f9af8fdb1df3062810e03659bfe903db9bea3912d4e8ea9e6528be0aa19d9f1","compiler-rt/lib/sanitizer_common/sanitizer_libc.cc":"3952899b0171d1f8b5301a64600ecd66cadd4eb9555b8dbe0e4c0fbf75b5d1ee","compiler-rt/lib/sanitizer_common/sanitizer_libc.h":"3174d0ac6d02e92f6c06ddb0e6c360869eebaaabcc08d496f63bde0e0b78bf22","compiler-rt/lib/sanitizer_common/sanitizer_libignore.cc":"ed2ee5e31715254596274e90959e12e00f5164776094e328b1e2389725a061b0","compiler-rt/lib/sanitizer_common/sanitizer_libignore.h":"f5974ddf0832e37ed5f19322dabaf650047e2a3a73d66e744215ff8f151d9fbf","compiler-rt/lib/sanitizer_common/sanitizer_linux.cc":"b80570210f171a1ca201b11ccd3aa3f9c9d8b14178ab0436c428315faa43324a","compiler-rt/lib/sanitizer_common/sanitizer_linux.h":"5122933899b1878cb83a2d9f8171a94ebc6d1c96df83ae4d8d9d3713ca295f40","compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc":"742a586aaf4aff0f1cb4e096db82fa9f07c52f161c2e24dd63f4426326c3e839","compiler-rt/lib/sanitizer_common/sanitizer_linux_mips64.S":"cac045f28f1e20b9e10c381ecc706a332362bc59d2e9a4ad8d06f0e22cd07b1f","compiler-rt/lib/sanitizer_common/sanitizer_linux_s390.cc":"cab8d1a2d585eb5df0b5266979c5e35c4b9a9580e584a131e8436e0da7b38a77","compiler-rt/lib/sanitizer_common/sanitizer_linux_x86_64.S":"453d0998613650d93ec7beda7248adfa5a2bed6a08996aa6821bd31ba363c575","compiler-rt/lib/sanitizer_common/sanitizer_list.h":"792378c453e9e9ec34595222649cee4957228cfad84e7062ee5c5416f1a421dd","compiler-rt/lib/sanitizer_common/sanitizer_mac.cc":"a0936fa28cbdcd0970c24059ced7d5372d97c5c5928f3bb2f64e7a661db5a5ad","compiler-rt/lib/sanitizer_common/sanitizer_mac.h":"8b87304ebc1b774f2089d41beccfbf0bf86587bbcc6289a7517c8ea478670c5e","compiler-rt/lib/sanitizer_common/sanitizer_mac_libcdep.cc":"0f32f4055bcb3e0735c4725d0d437618c20c2636bbbce1e1f027e81d72508d2a","compiler-rt/lib/sanitizer_common/sanitizer_malloc_mac.inc":"1e160c44f0004e67bb83fa6732158454682e2bdde4e91b59e4d87a2cb1abba81","compiler-rt/lib/sanitizer_common/sanitizer_mutex.h":"faa23ec41c040fa95f51a9a4a144f2a86821fa5bb8bae731039191ffdefe745a","compiler-rt/lib/sanitizer_common/sanitizer_netbsd.cc":"70d79a84cd09c6a85b7f1e1ac83d6c705f5bab4635298e25565c3d0863e6388f","compiler-rt/lib/sanitizer_common/sanitizer_openbsd.cc":"0fcdb81afd49f4989db47f7536e27a66e1dc264af935de092e8b349e3402c503","compiler-rt/lib/sanitizer_common/sanitizer_persistent_allocator.cc":"3be7759c67d9d2683de81789cae183eb6c4e64abbf365a782ca3c92c57adc18e","compiler-rt/lib/sanitizer_common/sanitizer_persistent_allocator.h":"35220d3e52e6acbe1d27df50680a7ac3fe5667852190bd533846230429427207","compiler-rt/lib/sanitizer_common/sanitizer_placement_new.h":"72d473e44149de8a3490f42a32c247f08ce2a47bfea2d36b91ee0c8d7fc32eec","compiler-rt/lib/sanitizer_common/sanitizer_platform.h":"5de069e68a7689d241d22ce8e3e5b9f991ab3eac109ad54321f1dd41a6f54202","compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h":"36977eac3f9fa2eeaa971dcca557932eb5bfd7327cfa34a52418a098f2080b87","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc":"1b078939d800dfc908d931229b1c717b6e40a444991f3b6d1773afd382481ce7","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc":"cd933e1b9b233dfc397e15e379f4df78eb988fab13f2308f864243e3345ad353","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h":"08641ac6bd86f6f32ea452d44b63c54a6f804e3fc471a54f62cfdffb893aef37","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_openbsd.cc":"fe537efddf49f4c9a51cf6c434cdb28c4ed2e293b4a8b5429c70ab9fa008956b","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_openbsd.h":"1c0a14d7a2b9f091327a59d602e147a1186af6868555ea76537e0e3fe39392fc","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc":"2a16aa25567578d5c1e78bf6c0aaefdfe0ec6991fce1c8fcb7c85cdbbb7b0905","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h":"086e0f7b70544a0649f031ead238fbb658446db254923b28ee02ff2128f70ca6","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cc":"236d8c0e40f3c9f73036fa84bcb1328b1239f60039572c88cdf533e2deee705e","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.h":"76505f57fa3772fbefd210a505d34e3050ec7c46e9740326f4c2cf2af08b2042","compiler-rt/lib/sanitizer_common/sanitizer_posix.cc":"ea517cf5c1bb69171f789eea9fe7706f15ee60696d5bb52e2a5f9498f87e97c5","compiler-rt/lib/sanitizer_common/sanitizer_posix.h":"b452c51d44dd66cd45af27e5900578ffd1c4d0b44ba0f0f9c335c8796e0357ab","compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc":"09b0d2d1da24b32346aa26bb65761463493823ac945b928322da8620bdc0bcec","compiler-rt/lib/sanitizer_common/sanitizer_printf.cc":"3c31d2a50b2082b70bdf3537d8debf66e589e87198f4bc858a223d18d64b15c9","compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h":"f7213b4b0490fcfeb053bd947e217731d2bc416e98a720c737e568691a16a0c2","compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cc":"8519c743e3fa47eef7133735bd1325087b941d3555fa91215d72a70cec782bfd","compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc":"4e990d5d060c73e273f90774cef87053ccda5e3a18ac3dc467504d4dc0aa9f0f","compiler-rt/lib/sanitizer_common/sanitizer_procmaps_linux.cc":"1b6cb944a60b9838f107acb91b31a10bf1751de3c8628c565e67ba048d01a60b","compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cc":"e5f930adb29ea8123715f9a0ebdd8d2fae54a213331cc005c92bbaf9c86bcdb3","compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cc":"6e72578c02141a3107d24b8dceea232d8db1596792eabc5f77412af45a86e3de","compiler-rt/lib/sanitizer_common/sanitizer_quarantine.h":"781d7b5b05cea542a2a924fbe2ccd0240e276556235e1f6bfca43d2068debc9d","compiler-rt/lib/sanitizer_common/sanitizer_report_decorator.h":"12d83a20e43498b78a9c6689bd288c45698c60e732ffab7477c33520edefe568","compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h":"aea5bb173207e822af02bd6ae555a77eaf040644d905c0a24780d11bc4426888","compiler-rt/lib/sanitizer_common/sanitizer_rtems.cc":"258acb97d721dc0438c1e1bedfc7a3d689ee24b0ba5294e3cff7d1f64ffbc6f8","compiler-rt/lib/sanitizer_common/sanitizer_rtems.h":"95a5bb2e2ce83b815e36a8e7b37faa6fbe9caf1e6a310cbb5f526368442d7e14","compiler-rt/lib/sanitizer_common/sanitizer_signal_interceptors.inc":"4e60c39b3b64b66c36bbd704f4b9801dfeb995f7c1cff7089eb79995227b7cca","compiler-rt/lib/sanitizer_common/sanitizer_solaris.cc":"0e3e1da7e8cad726bd0dcd59ea29415889f420159c7f0a4f02772ec92ee043f3","compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cc":"a6ffcaf93d3c8c3be39c0ecbe611822b67e23701ff8219c8bba7742124a43d18","compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.h":"77ff13edfb2cb8068314872c90cd79c96f36a6abb5f0c175b7084a17ab03dfa6","compiler-rt/lib/sanitizer_common/sanitizer_stackdepotbase.h":"25f1738758f944028f6f08e9dca00163348a2d84413719f11d114be82813cd76","compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc":"39b5c8b0016be40d57025b351d19cb39f2bdf0daaf01d68a142a3db37b17a717","compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h":"3fdf1983c7292f627cb084268433eec32f3c2d0b8f916074271bf690685cc716","compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc":"11ec57b207e5ef530b356f5af876b7fdb2317398ab3d09378c1bc43dbb4cbbd2","compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cc":"9c7c6d321b8ae2d123d67776772e83842931faa779719d0476217b1ba7a0a210","compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.h":"c85b98d87767cdc0d112d3ca1cac3e8afce54327276cd858549c25f460df0335","compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_sparc.cc":"ac82c3caf9302de869ff8a11295ef81930d854fa474b496138863f16189d6ec5","compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld.h":"9edc3b2f0904cd948f3fd347e88e808ec8699f5a9923eef5b0b959e6fc2ce67e","compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc":"5c5f3df80462ab64771dfa81810ba39d5bb9eae8f3725f777290718448c1affa","compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc":"761f6260d9fcdc74829d579f894f9845c2ef42533eb7c3665a9b69c08d1fc387","compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cc":"d659c1853678c90b981761d04609f8bad65a262d55d026e140b5ee3753a126df","compiler-rt/lib/sanitizer_common/sanitizer_suppressions.h":"bbc670d60e3f91fea80211dfbaa7d32cef9b03e9e99c8274c14de9cb038eb44c","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc":"a34dd45f916249c0add0339ec37f573468136c9df2e52ea2dbc7aae1a8f1a44e","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h":"79fe86be9cd0828da1ac6d3e92ab0bc13160453c076a15365c1867e858e3a0d6","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_fuchsia.h":"8f881cd370fc97f22e86ea614a2b9ccf770e90f0f1d211cb168dda831b997f4e","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_internal.h":"bf3dfbf948617d0ae75b40231eee5a77691a0f90690f56c3c523c31fe30907d3","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc":"db82397f21127d5da1fdbc83e471c4ece40bac354d0d9c06745355bab4828842","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libbacktrace.h":"ba3c296a15e9879e23adc94a182adb27eac1764973cdf3b0059c12ec2f085fed","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc":"bab9d59ba14f77294987935063124414b688f53d4e6524658f401ad165ea935b","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.cc":"e89b0d8d95dd2cfc506d514b8daaf88d5cc134ad016b4bc44765c8614c0ef780","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.h":"636a7d31c365f5bd584b0922dd7ea88459a701c1f72328c2954cbf508acfc7cb","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cc":"1c446c0036416396727649bc56da518caba3e9acead3ada30f58642eb019fe5a","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc":"460b988b90b5ee3a073726f5bad2e16252492cf790d01461d41ed8e3cc9367c0","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cc":"6503ea71d9379e4308ce02b03d4dd1c98a527d6e0805d598d1a883e022cffec1","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_rtems.h":"78c697950693eecbd5d622d1d152021ed01945b85005f0996c43dea7b9d18449","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc":"93d0d13f652b7ceec293d56c738035102e24cf0e81920f5674fa35902b7313de","compiler-rt/lib/sanitizer_common/sanitizer_syscall_generic.inc":"ad50bbafa452b3467cba79030faafd6c15ab16a01e0900dfc98b157ee69c60f1","compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_aarch64.inc":"ea00ae6e34b61715b397ef1d94d047f29abd531aebd48cecafdd4ffbb5c2f997","compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_arm.inc":"344b5b25f1e7c86cdf0e64b3757ece91634aec39868acfca92043a9e102b8434","compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_x86_64.inc":"de58c6657e4c6570306c55438db6c1e4d9242792112c091c9d80c0f26e6f5715","compiler-rt/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc":"b56c36da4f98276c338f4944385c87389ff89a28bab25aeb6d4d182e863c2298","compiler-rt/lib/sanitizer_common/sanitizer_termination.cc":"93d4801140f75ed170c28691152633c56f44f4b7e323a3e0d30ef94fcffa9269","compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.cc":"3368d2d8c5e3028f468190982104895c43aeb7b2b3de40f49e0b0d39e67215ac","compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.h":"ec4d2da083e2ebbe49a279c18bbc4dfdaff0ac22e00e98636bf0713e89d6128e","compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cc":"8834624f5d38ce21d813dd5834945a4f5678b6ebc4693d65ed6e65020e0b19cc","compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.h":"7bee447c4d2fa3352920889e65df1dbc046eb92d1ef40dd4e8685e4a5c49a704","compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc":"68e4fe8fa94517a9a560b27b0b1871ce74963bd361021c47c8859bb6657c449c","compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cc":"012411ee6a804fc5274f7b2974c7ebfbcbd93bcd2ee1c087969757dd6ce50654","compiler-rt/lib/sanitizer_common/sanitizer_vector.h":"a09ffbf40308a816a3754ccdb905d48a4ff8889508bde504ea03436f27ff8e6f","compiler-rt/lib/sanitizer_common/sanitizer_win.cc":"77c7b05e22e2e0e429c272519977c45ffb5fe8f8edfcc4c73a7926432cdf557a","compiler-rt/lib/sanitizer_common/sanitizer_win.h":"2ff2a2c6b65ebf960fe987cc5e523fd34c6a7553c37f15fc43857953e6f0ab93","compiler-rt/lib/sanitizer_common/sanitizer_win_defs.h":"476d114279ba497dc5120e5254443648be99e28e1a0537496fbecd0901c13c9f","compiler-rt/lib/sanitizer_common/sanitizer_win_dll_thunk.cc":"6d10b53545eed305ce378db480a246be98496fbf7e218fcfd91523fde95297e3","compiler-rt/lib/sanitizer_common/sanitizer_win_dll_thunk.h":"9fa8e1254bc988cf00cc8a667a3e38a5cff98bf0a64ded68ee975e4627340e9f","compiler-rt/lib/sanitizer_common/sanitizer_win_dynamic_runtime_thunk.cc":"f6c55b0087787b8562ae8491b4ab94c164ff2ceabc622609e5f480501d175453","compiler-rt/lib/sanitizer_common/sanitizer_win_weak_interception.cc":"c5a4c19f48e5df3836d1c77180edd4884da1684c2c795ae02abea8074d6e2595","compiler-rt/lib/sanitizer_common/sanitizer_win_weak_interception.h":"548061d4a3aeec833a55690c217df516e4c3f93d67773777c6f1b5085d26d358","compiler-rt/lib/sanitizer_common/scripts/check_lint.sh":"3bb03ea83aadd1de994e09fc7122939f101844847cb20287dc916cd60405f921","compiler-rt/lib/sanitizer_common/scripts/cpplint.py":"e02be7ccd2e6c8e91ec23d775cf0d51f9392a51905590db4d61abd3c90005af8","compiler-rt/lib/sanitizer_common/scripts/gen_dynamic_list.py":"ad372d4fc483ea8872439172acfbdac46b90908682e9c21574af9013fd6afbc2","compiler-rt/lib/sanitizer_common/scripts/litlint.py":"b00692c6b49723930488667fdb4c7b04469df1597b0ef78f9b3d45ba38ec93cf","compiler-rt/lib/sanitizer_common/scripts/litlint_test.py":"be3231b384cf8e9913de50f74c6edf687358e499541d70cdd99959618f8e91ca","compiler-rt/lib/sanitizer_common/scripts/sancov.py":"f296ac670e2bc5b5bcdcdb89714b9f3fdd2ec17213980c941ad84207c6616592","compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cc":"38b11a70cb04f1cbac59be6822d06024c467289cacbd0cdfc98ee11ee771a541","compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_wrappers.cc":"a44792223b8f11f07e4c9daa9ed7060df5c9e26a07f52e7f11137f0241269c3d","compiler-rt/lib/sanitizer_common/symbolizer/scripts/ar_to_bc.sh":"9e331e5aea305b34f4ed7d37d61c5bdfb779bb013b60c83b947dc822a7e02525","compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh":"3f43f335868d6bbea2d9f02b20bc28919c28eb902bfc19fed6f805960b74a315","compiler-rt/lib/sanitizer_common/symbolizer/scripts/global_symbols.txt":"f1e53d6af044a342861ab027f6edb82e1ef0f64cd21d34b827883a1afc6aa20e","compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt":"790d83a5007a332ef89ffc3a8806be086989e21b6fa639b934b3e4b50d69eadf","compiler-rt/lib/sanitizer_common/tests/malloc_stress_transfer_test.cc":"fc93c7fa46d672eb8bcd36318c9cbd6158fbc8817a6319bafad7bae4a91b1045","compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc":"d1b1e70b3877f1791cce5233b8e4dfeb7ac770a33e45f17c91979c75d565328e","compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_testlib.cc":"c762c02bb0e6b2a9df443de40fa91a29efb857d832c21d7ad84c0b9123170127","compiler-rt/lib/sanitizer_common/tests/sanitizer_atomic_test.cc":"01d75021055b1f8c0d2a1e5e41b79faf0ca7b65f09bc59bf49752898343ad298","compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cc":"6371123f8800e968285996fa6f8fe00c6a9654081119eb2115a607757c6511f5","compiler-rt/lib/sanitizer_common/tests/sanitizer_bvgraph_test.cc":"aaa09033fd46af1abf7da9deaad6dd15c647c12dc5b8754c87c693f9d7f0f6ef","compiler-rt/lib/sanitizer_common/tests/sanitizer_common_test.cc":"a06cee15433b021361b8c7ec0bdda5f9323eb52c5a608eedd8cae831122755fc","compiler-rt/lib/sanitizer_common/tests/sanitizer_deadlock_detector_test.cc":"7de4599c73a02459ff4bedd7114a7c64a394a2a5554b6564a7cd7815d7a1bc7b","compiler-rt/lib/sanitizer_common/tests/sanitizer_flags_test.cc":"5bd4c3cc90a4ba43873053d1ae78840cf1a6916ccf503c22e2f1716ab2dd7376","compiler-rt/lib/sanitizer_common/tests/sanitizer_format_interceptor_test.cc":"0dfbc7cfe2af74114d49e95e90cce5f312e52c06387f044eb8ee020d8f09416a","compiler-rt/lib/sanitizer_common/tests/sanitizer_ioctl_test.cc":"ebee96e0724b6615e42ed06d8db7d61ce8f3d8695116862c267686e57d39faca","compiler-rt/lib/sanitizer_common/tests/sanitizer_libc_test.cc":"175f49d4c4106a48fe40e3988141145eb4e653aac2377771b011d0128e20e20b","compiler-rt/lib/sanitizer_common/tests/sanitizer_linux_test.cc":"ed487746089cc66c9abe8206a297525beb9cedd42c99ee4fec89584c6e707f09","compiler-rt/lib/sanitizer_common/tests/sanitizer_list_test.cc":"0e1b90c73dbd788b26f16158c6bbf10996ccb23be9c1a2df46b7a60da8272260","compiler-rt/lib/sanitizer_common/tests/sanitizer_mutex_test.cc":"cb769c5cb6da21e8cf6e5d5930f4782231962f2378f6edb51df15b7e75a60d52","compiler-rt/lib/sanitizer_common/tests/sanitizer_nolibc_test.cc":"ba654a33ad73e35dfd31eae216d506577310b82906fe81360fac10e77ae7c542","compiler-rt/lib/sanitizer_common/tests/sanitizer_nolibc_test_main.cc":"b2506073c460faecae7b1aa6c422195c37b33ba027e9cc10512739dfba933d59","compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cc":"e96dcba21ca2f5656daa888cb972863a89737f896fa7a5863253a61957314868","compiler-rt/lib/sanitizer_common/tests/sanitizer_printf_test.cc":"fc5fa9e805ed0a7664317681c6fd6e36da6b53e638af2438f268d8bf4780de2c","compiler-rt/lib/sanitizer_common/tests/sanitizer_procmaps_test.cc":"80503857337a9a2723d88eba021cd2a9d4df37adac3da3af497a6209b50f85e4","compiler-rt/lib/sanitizer_common/tests/sanitizer_pthread_wrappers.h":"69cd1d8ac65546c4f17b188c7af5cb438f83b6998c995ca83b015ac2bcae42e0","compiler-rt/lib/sanitizer_common/tests/sanitizer_quarantine_test.cc":"1ba8331efd1cc7b4f63d7462583c47c5bfa802c408f06ffc09f075b6801547b3","compiler-rt/lib/sanitizer_common/tests/sanitizer_ring_buffer_test.cc":"ab51899a2ce5454e578dcf6a778ea08d99811242fb3654710acd4694329a7706","compiler-rt/lib/sanitizer_common/tests/sanitizer_stackdepot_test.cc":"35e5aab76f9030ea313a00a3b66b1aa327091697a8605c5780a7052a67cb8d5f","compiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_printer_test.cc":"213b7d4ec7f60da9de5c6ea99fb1714099119afef50263e3381f1cae6f9859e9","compiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cc":"57d02708586dfac4fe61ce329db0e7a7117dd879865ca89e96b198b7fd2a32c0","compiler-rt/lib/sanitizer_common/tests/sanitizer_stoptheworld_test.cc":"96a0a8c84f61e5f398e6d5fd62e6267aa83ba7ae0ab7f477e2a9db6bf62d6bb5","compiler-rt/lib/sanitizer_common/tests/sanitizer_stoptheworld_testlib.cc":"1603d94036e8905a60dd7250ff39f1c93427b8577582839d713c5d28ba789318","compiler-rt/lib/sanitizer_common/tests/sanitizer_suppressions_test.cc":"a020faa475392fef4cd2d8b1800622e9a33ffa44529b9eb2386f74cd192f79fe","compiler-rt/lib/sanitizer_common/tests/sanitizer_symbolizer_test.cc":"3561efff309d41842ede5904bcb4b27533a396d83a34692d30421a27f44b7b1b","compiler-rt/lib/sanitizer_common/tests/sanitizer_test_config.h":"3c0dc7a0e070b21d289ea00f0ed7acc2d4da773e276ac713a3ca175bf035e28a","compiler-rt/lib/sanitizer_common/tests/sanitizer_test_main.cc":"5642a64c8d22c0fe5444a7439df3a85d68f28a0970332df921a8d6f8e74e374a","compiler-rt/lib/sanitizer_common/tests/sanitizer_test_utils.h":"8657070df7fdeeaec7771dfa86d82c05d27d4e76916c2ed67f66300d13c2a70d","compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc":"b6521de7a367ad704bb6e3c9455e64bd59353dfe5e3ac7b8b457c7033ec4cea5","compiler-rt/lib/sanitizer_common/tests/sanitizer_vector_test.cc":"9d7db0275c46843b9569503b50e795e6bf00b18b79f7a0ec210587c4360493ec","compiler-rt/lib/sanitizer_common/tests/standalone_malloc_test.cc":"578f7b9854b55eee1c3a200e2446d91c55ef0d3a2805235fcbf98f49e6ff905f","compiler-rt/lib/sanitizer_common/weak_symbols.txt":"88cf274d627fe3370af475880fa36463f55a79bf2770421a40b3f6fdfe74a182","compiler-rt/lib/scudo/CMakeLists.txt":"081f9014f0e25e23c11bced34bc288ebe15301d03ee31952241c5800454ecfc1","compiler-rt/lib/scudo/scudo_allocator.cpp":"1232ef865db483e34a4e00396388e66a018f64b18c33cf4932567b1b33aee987","compiler-rt/lib/scudo/scudo_allocator.h":"db7c9df4aa098aea044fc4e8e7d7d678428ee8a4fe18a5148b98bae0ebda40fb","compiler-rt/lib/scudo/scudo_allocator_combined.h":"230ed3815a06ff278e30ba2fff7c9f151c6743e79c8e0748ab968d6a1d500756","compiler-rt/lib/scudo/scudo_allocator_secondary.h":"078f5a448bbd2702aa774cdb2c518d4a9e4d7b44e0bdb2f8a748df2a9f53e4a4","compiler-rt/lib/scudo/scudo_crc32.cpp":"4dcab7ce72a78c743ecbe50b68e733fee785c8ad08266e6f99dbbdf16552aba6","compiler-rt/lib/scudo/scudo_crc32.h":"b06c90b9afb9845ac64b9f1f26daa6208d297ced0e7b2e7c38a705c125402832","compiler-rt/lib/scudo/scudo_errors.cpp":"087770a0d09b0a4ecf7d0d39feb620b5b63ae9028e9d4ed0f97c117ffb492ff1","compiler-rt/lib/scudo/scudo_errors.h":"bfa45ea9848373144a4565f703e76b64ad0f928f3009c0247454fc44d02b0727","compiler-rt/lib/scudo/scudo_flags.cpp":"33fa67e6fe6e1ed558f7a15bb27122a2b41f6aea06fa8050e71e249d577c073c","compiler-rt/lib/scudo/scudo_flags.h":"03afa8f40bf924973ac81a4beb557cc1dc8f4a7292690d252f38ecdeb7850d95","compiler-rt/lib/scudo/scudo_flags.inc":"89e873bca02a2d5421c95c87046fc46074803ca24901aed994ee9bad8ba40194","compiler-rt/lib/scudo/scudo_interface_internal.h":"874b4934cca88165aab7ebbd990e753477f67ec8ebff41a53b83fc66de4cf6f1","compiler-rt/lib/scudo/scudo_malloc.cpp":"0ccac82cb0f2637ee817e119e22a5b4e4c1fb9409109fede527b0753d8fab3ed","compiler-rt/lib/scudo/scudo_new_delete.cpp":"417128c9ca8b20faee6c25239087af87f85763ef6b594c851afbaae9bb3e24d3","compiler-rt/lib/scudo/scudo_platform.h":"0adf65ef8752b133981420fd9919a459597063c443e2a2d89490e92835933c59","compiler-rt/lib/scudo/scudo_termination.cpp":"a702bb18c03853f263303006e94803ff077aec80548d5e5a99a2767dc7867c4b","compiler-rt/lib/scudo/scudo_tsd.h":"a970c91ff1960f9b1c143158e408bd9a8869d08af8b21f68b2ce42117f52afe5","compiler-rt/lib/scudo/scudo_tsd_exclusive.cpp":"537249f8f6e99666ae4429a85bc1ebcac707bbdfad9d60c4130292f3d998f76b","compiler-rt/lib/scudo/scudo_tsd_exclusive.inc":"b4c72dfdb573ca7dc84fa0ff68c2668b3425e16acd2fd88ca5a0db8db7400537","compiler-rt/lib/scudo/scudo_tsd_shared.cpp":"21acd22a696e45c3794b3b0e3dbf344e07ce55a354ec0d59d0f2c39e2b922747","compiler-rt/lib/scudo/scudo_tsd_shared.inc":"df97c085b44bd2620235c71fad74e628ee662fc09ba518643db918609de2039c","compiler-rt/lib/scudo/scudo_utils.cpp":"3f65f31e742161175bbc38e284cee749b04a2391187dd6a36cdf5c52443c2efc","compiler-rt/lib/scudo/scudo_utils.h":"309b7b973ac51a5fa3bcff394ca9f964826749571fb9f4d258a27b2d79afa00c","compiler-rt/lib/stats/CMakeLists.txt":"09b890d1c540241d321fb127e4caf2cccad1e778c050737a5ae9915dbac7ee0d","compiler-rt/lib/stats/stats.cc":"ef5b2de240659d369adb202c1c04283aaa672832b5865eb9310ddbb4e51b4e43","compiler-rt/lib/stats/stats.h":"e99ff7de1155d28f4d3b1b9987b94128a095a2e2320ce51e6c06dd64b8ca611b","compiler-rt/lib/stats/stats_client.cc":"e4c91f4815aabf70d20f7544167dfe4544bbe4868a6420d01908303492d094d0","compiler-rt/lib/tsan/CMakeLists.txt":"70b9bc55d309ff1eab75906db73b2071eb164924e3b76b703797d8d6107405c4","compiler-rt/lib/tsan/analyze_libtsan.sh":"e095ecec7de00e720c00b720e2aaecd0427c770cacd021cb787bd1455527e919","compiler-rt/lib/tsan/benchmarks/mini_bench_local.cc":"674ed842f62bcec850d1e26d206c01e9641b82d759923ae59dd3ee89cd00fbd8","compiler-rt/lib/tsan/benchmarks/mini_bench_shared.cc":"627c86de70b6802ec8499588de5dc34da6ac00bf88976f5d30cf128155f5a186","compiler-rt/lib/tsan/benchmarks/start_many_threads.cc":"2ea12220140b77cce9102f8e58101956f32a4803aac6a91f4f33375451bdd005","compiler-rt/lib/tsan/benchmarks/vts_many_threads_bench.cc":"70ddfa51d811c000f6018a6116b2f1fb7b1ed9c0193fe46be25335eee03e04a1","compiler-rt/lib/tsan/check_analyze.sh":"1dc7d635be2924889175fcf2f100b54ab70d0c9f2a4d1354fb38b0e1d80a5fd5","compiler-rt/lib/tsan/check_cmake.sh":"0b27168f3225a4bcba14d19faffb8b12d0ed59f959eb38115713246f68f6e30b","compiler-rt/lib/tsan/dd/CMakeLists.txt":"7a054d5b85297636733068eb4d3fccda0f17c8370a74aa26f57849fa5f5fcf1a","compiler-rt/lib/tsan/dd/dd_interceptors.cc":"567fe2cb1d0892f393865c30c3b6e039bf7dc4c0b40265dc6ace5d505e5fbd8a","compiler-rt/lib/tsan/dd/dd_rtl.cc":"da56992be8d96a78cc6b7566b51969b2d87cf25df3e1a6888a27e17795c055b7","compiler-rt/lib/tsan/dd/dd_rtl.h":"5fd380b8fe81d8cb416b8facb386f5b31ca59342e8963d211f6d34b59ea2cc52","compiler-rt/lib/tsan/go/build.bat":"4ec1a2c6d8d5d5d8bc62338cf393f6d1758b1fb7f358152727a5c7d074a41a52","compiler-rt/lib/tsan/go/buildgo.sh":"a4e2be1f421102163e8d4d4e4eee5ddbe011c6a8c4e88886be09ddb54e035d36","compiler-rt/lib/tsan/go/test.c":"019e888c4c232005fcf011173fbb55dfcc8f1015b39ce54ce4c296f587419e72","compiler-rt/lib/tsan/go/tsan_go.cc":"780f30aa3dd9af748b93b32967b2b0c4bc2f476fe80c19124aa81866d019cb48","compiler-rt/lib/tsan/rtl/tsan.syms.extra":"f56f80276a35b9183d20bfdc7b1f7ecdcd879d087e91ff994f5eb46c62941384","compiler-rt/lib/tsan/rtl/tsan_clock.cc":"d099dcc40ae7dd87bbeafafdea8451c1f411e096855a1995f3db74fa52e303a5","compiler-rt/lib/tsan/rtl/tsan_clock.h":"fa2a962307727bc2f2e3ea43d2909630c68490c68a98fbb80025aadade482027","compiler-rt/lib/tsan/rtl/tsan_debugging.cc":"ff1dd3932f25c986304758552d34e9987ead14cd520addf3357879a721e55e7f","compiler-rt/lib/tsan/rtl/tsan_defs.h":"baa5938a32d5824bafb7ceb6feeb393b67c0afcdc1a1ce30441c0820e67f82c1","compiler-rt/lib/tsan/rtl/tsan_dense_alloc.h":"b6743216a3b9f11812f24de638d372c27ca4ffbfa0a6d0f55a9ed2b57926abb8","compiler-rt/lib/tsan/rtl/tsan_external.cc":"cbf7210e1349645505412bb28981a205022573fcada570febe45eec4af09ddb2","compiler-rt/lib/tsan/rtl/tsan_fd.cc":"57885465923d9fc277c27598d4ea1264f74353e14d7d64f2391e3b839a0c1159","compiler-rt/lib/tsan/rtl/tsan_fd.h":"00158e476aae5794bef1fcaa4cb7ed0c003dd9890113825de6dae8b2a02487be","compiler-rt/lib/tsan/rtl/tsan_flags.cc":"fa2bf354db219642d18fcdde37ec37553973f4771981caf839f8cdcc29a8ad85","compiler-rt/lib/tsan/rtl/tsan_flags.h":"2e41bd42c3241207f958fa5998e0a71ce7ac745f2e9265ed84a1e717c89b30c8","compiler-rt/lib/tsan/rtl/tsan_flags.inc":"4238781e29e801e76776efd2e2ae011f32082433471968d27cb1452cdc7e3a92","compiler-rt/lib/tsan/rtl/tsan_ignoreset.cc":"239f3d92c2a63c9ef607df139e9502614daef5bd0851e8fcdea022038ed8042e","compiler-rt/lib/tsan/rtl/tsan_ignoreset.h":"d81c8d209436bacbfd3b0b62f97930aca3c6014397babb4bf958891019cabec8","compiler-rt/lib/tsan/rtl/tsan_interceptors.cc":"08a84de16bb9b6547493cc35ceb8b440fb8c83717bcd34ca5d7f1b754eca2341","compiler-rt/lib/tsan/rtl/tsan_interceptors.h":"7e2b0f7aaa18a38f7d9c9e4ffd16f40490b131b888d19a0d168b6306abb9ff39","compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc":"e05f4c54c4bdc4722f3e2a461d906ef1428b754d8ff3a7d5046d53c9c0b3f5c0","compiler-rt/lib/tsan/rtl/tsan_interface.cc":"9ae2f1e2d68c74616ce5995882b7033d64c57737f331456a4c5d988d018b0cac","compiler-rt/lib/tsan/rtl/tsan_interface.h":"0555a5790509c50cc655b6111c3ab4e4adbba2309d17dc9a99e8d478ce4f4708","compiler-rt/lib/tsan/rtl/tsan_interface_ann.cc":"067738267f6d1c0fad3f0f1275c4e6b244950e032b4153b4482a71f70fdaae63","compiler-rt/lib/tsan/rtl/tsan_interface_ann.h":"dddeb9db1b0b55e2666204da913c01672c95bb5ce714bb61f3be234c2099bc8b","compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cc":"44ca7f5b270d44f6057e67a82cb5635e70564486cbff420a8732833d9553bc74","compiler-rt/lib/tsan/rtl/tsan_interface_inl.h":"c8fe707e80cc893b3accb19789a0116e83df18ff5156a7c36a8aa64ed6110b3a","compiler-rt/lib/tsan/rtl/tsan_interface_java.cc":"b4fda20439fc7e845baea059bd7e26398afce4fd65b2c72bc6a4bc1fc0a84ba0","compiler-rt/lib/tsan/rtl/tsan_interface_java.h":"ad3aa8d49842812d56e4c2a269beb1785f9697b9b1188b3b78286f3d625a15c5","compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc":"85b7679a4c8114366598963bf0580c3ca5427df490b008d228f847fd9f57ca2a","compiler-rt/lib/tsan/rtl/tsan_malloc_mac.cc":"98c3fe23004ed9f87d1ffb6755608401c43e44c7d723e51af647aa7269b3f751","compiler-rt/lib/tsan/rtl/tsan_md5.cc":"0dfb2e9de66a91a3746076acecc12ca35c971790c9010325aa8e42075abbfd07","compiler-rt/lib/tsan/rtl/tsan_mman.cc":"93f72cbc5678a6b73b85b9892cd473299cf9e60fcb2478c83ca4f2be34e8a794","compiler-rt/lib/tsan/rtl/tsan_mman.h":"0d44bdfae4de6f6c8bf7fdcdc22698245eb5b6916138a9f506746e9486cba81b","compiler-rt/lib/tsan/rtl/tsan_mutex.cc":"ae1e458efe6621ee3be1bc6f2642b270c53b6448cce6b49edf672b902b55bcc6","compiler-rt/lib/tsan/rtl/tsan_mutex.h":"9d0809b7d5f5c0074aac277714ddf51fc399a2088394af87e505e0aff1628e8c","compiler-rt/lib/tsan/rtl/tsan_mutexset.cc":"851dc06e627bac06387a0aa86b296325c63f7aa9e64395caefcca24cc7b15484","compiler-rt/lib/tsan/rtl/tsan_mutexset.h":"d026195e6374be58642406fdb900829a0de9db1c8cbe868addaf147cf6adba5c","compiler-rt/lib/tsan/rtl/tsan_new_delete.cc":"414fbbe7088a981c386e03204474d244d552831c2e274c08c2ae6d628c5a8f8b","compiler-rt/lib/tsan/rtl/tsan_platform.h":"893623e93b0936e4c5e9fbc73d105f19c59735e88d29ec033c286edcbbe238bf","compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc":"dcfa2dd51a2aca899defe97d06b0b4064d7f2f91f14f89ba7fd91c42f24297c3","compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc":"86f50ba198beff3e75e614c7637f63c16fe25c3a99f92542a951842efd7fe81e","compiler-rt/lib/tsan/rtl/tsan_platform_posix.cc":"5aef1db6ed62cf9624bf6900d733b261607b1f856eff02b7ac6c7cf20747f70d","compiler-rt/lib/tsan/rtl/tsan_platform_windows.cc":"f17ed48ed43f8dff410be462ac24fc97acd55358b66fedfcb40533fba6c817d6","compiler-rt/lib/tsan/rtl/tsan_ppc_regs.h":"18647971a4a8266177130226d20756aaf543e96953bdcd4014b5c3a0d563759d","compiler-rt/lib/tsan/rtl/tsan_preinit.cc":"5e8b57a8f71a40fba2b43a888ac3c191100abb56fe94746d9d17f5f608d81474","compiler-rt/lib/tsan/rtl/tsan_report.cc":"61007337a23f9c1544709f9bc18858a3673d59585c798b74ff9ad4af4053b534","compiler-rt/lib/tsan/rtl/tsan_report.h":"7411d3b9fa8bdc1d09ea1dbe1663298f7d5412bc52fd4fc4f65a148117adb376","compiler-rt/lib/tsan/rtl/tsan_rtl.cc":"c937ec5f258682b5cde08d6b7f3ced7b998526a7866def83ad34161ad481b5c4","compiler-rt/lib/tsan/rtl/tsan_rtl.h":"d7e73f3f57af8bfde8cbbbd08f007b01f17e774f1fa687e61f5b1b6f79057b38","compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S":"f031f9a3f35a40350b98dcbeab52135f72363421fc9163ae04a10fa5db087336","compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S":"98c04271b51b54b8351dab8049c0c4f2b6611b06a95bb2a9bc713d69d78c063b","compiler-rt/lib/tsan/rtl/tsan_rtl_mips64.S":"42c5f09c96650f989742192fb1f1bd69f2f86e4005ad8e50ceda66fe7be99c80","compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cc":"ce70bae402c7e79a296fe197c9cdfbb19781d8cbb777c8227e415c4fd584fa77","compiler-rt/lib/tsan/rtl/tsan_rtl_ppc64.S":"452783702ef44182a1e3cadeedeccc747a3f36fce77dd7531012bdafac434528","compiler-rt/lib/tsan/rtl/tsan_rtl_proc.cc":"70d12c7c4c1ada4a86db4d7693a0fb50fc44ec5c20392f6a55de4c53dc5e173b","compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc":"52d74f8cc72c3e80467691abe97a450d417ab697b329994083d8f260f438cc42","compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc":"15dd8f25538065d3716d0a3b2ba65e3204c054f2f4018cf6cd46dcec31e51405","compiler-rt/lib/tsan/rtl/tsan_stack_trace.cc":"246e879debffc31c21734e29919e23ffe1ca8c66ea880f3241878ebca2283f81","compiler-rt/lib/tsan/rtl/tsan_stack_trace.h":"555cbefcf24ed1bba33283af89615e7507ccbee49481853fd4b7c41e280ea8b0","compiler-rt/lib/tsan/rtl/tsan_stat.cc":"30a9c8ea9015ed6eb2bb787d9fadb1d9ee967cd9c3178542281e48cbfc9001a1","compiler-rt/lib/tsan/rtl/tsan_stat.h":"61d802d9dcce36231a0d936b9cab6abb6568beac24650ad755b0706153f408ad","compiler-rt/lib/tsan/rtl/tsan_suppressions.cc":"555c8c3acab32923f2db9020a149ab16e1a7736bdf91349716ca0db51b56b9c3","compiler-rt/lib/tsan/rtl/tsan_suppressions.h":"fbc9bdfd74dd133d2284b8291f36769a03b6ba88c5d652e2938546a95913237a","compiler-rt/lib/tsan/rtl/tsan_symbolize.cc":"b87b6894c5d5871cfb88efb830e6574cb725c1917c23a48c4330e418837d45c0","compiler-rt/lib/tsan/rtl/tsan_symbolize.h":"5a31604d0f2e093d5616157ee7dc030c59db3e50f3c7f46dbdb99945ec8fd563","compiler-rt/lib/tsan/rtl/tsan_sync.cc":"c950ea3b9a7b407c63bda801054cea7c096fad2595e24a2c7d6f7e9cad36bd04","compiler-rt/lib/tsan/rtl/tsan_sync.h":"4cd45a14cbba9cf0138afec86f3617881e86b6506e9f062a10329f9350910f03","compiler-rt/lib/tsan/rtl/tsan_trace.h":"5bba4cc247d62adc10e792932f7a66dda564440ae84a4df70ecd9a0d48b5b13d","compiler-rt/lib/tsan/rtl/tsan_update_shadow_word_inl.h":"b9989f1ec64429b94b394a6759cf7758befa680c11a241755b7e9407762be75a","compiler-rt/lib/tsan/tests/CMakeLists.txt":"5d60078905acc870db16d792f17d9cc477021238e788511300b89c651c485325","compiler-rt/lib/tsan/tests/rtl/CMakeLists.txt":"5cbe2ac1b4e69605b66229cdb53d32ec2f0daca8c2a6ddb707fa12fdfba94454","compiler-rt/lib/tsan/tests/rtl/tsan_bench.cc":"93d0144accd4a8dfa88d3e60b77ed9fbb17d5f4c02387b61e00e811325d29b64","compiler-rt/lib/tsan/tests/rtl/tsan_mop.cc":"b1f7c8ba70d29f7b39936dceb7eae385fdc5e2703a5910fc41dfdda0e324a4d3","compiler-rt/lib/tsan/tests/rtl/tsan_mutex.cc":"0e493bc9d7cdcb936fd75348bfccdb1b55bd810fb0fb23d8413ef6aa3d7421a7","compiler-rt/lib/tsan/tests/rtl/tsan_posix.cc":"5e247fd2521829ca4b85fd6abab3fa0276c8efed202d8073ad83a7c7cd42853e","compiler-rt/lib/tsan/tests/rtl/tsan_posix_util.h":"722de1fa9ff81503449e7c72842973adfbb165628a5ae03c08bfdc1d6f81ab20","compiler-rt/lib/tsan/tests/rtl/tsan_string.cc":"100a8c3876458104322d91a990079f6a0c9502174d40fb9f1d6f5b2becce46e0","compiler-rt/lib/tsan/tests/rtl/tsan_test.cc":"798d330ef908f780fef3d01a8bb1a95c23ae499bda3c1da62e894e0a1f970ea0","compiler-rt/lib/tsan/tests/rtl/tsan_test_util.h":"5140b7f3f7f73b2fc4339ad2028bd1730b79b00799aa817709fc27ea27afca86","compiler-rt/lib/tsan/tests/rtl/tsan_test_util_posix.cc":"ac7717ee49e12a4c5a7767e19e38b0548fd5bef7a3a77a0d18d1db92804d8587","compiler-rt/lib/tsan/tests/rtl/tsan_thread.cc":"963cd176e88d0db0d8b169e53b86a738e65a7d3d75e7a346c447badef75fd78b","compiler-rt/lib/tsan/tests/unit/CMakeLists.txt":"3c4aff1fe2dfe430b40f5c6bd59c46eb11690919a24eb648fce7c342c1a1b887","compiler-rt/lib/tsan/tests/unit/tsan_clock_test.cc":"f89a0ea56230c1e5105d021d82d8570f0eefda88635ac23215d284b1f3bd1606","compiler-rt/lib/tsan/tests/unit/tsan_dense_alloc_test.cc":"e7c6876792bf74d8fdc2280ded51bd7bd32eb85c6ea437c8195ed21927d75805","compiler-rt/lib/tsan/tests/unit/tsan_flags_test.cc":"5743dd2a1395e1bc0d823f53933418d9f57e46efd3d8db4814852a55ce2d7e18","compiler-rt/lib/tsan/tests/unit/tsan_mman_test.cc":"1ebaa3b5aa49fd465aebb8101c430f1a2caa197f1feb844fd01e337dc136de13","compiler-rt/lib/tsan/tests/unit/tsan_mutex_test.cc":"f3c929e42f2ce222e97cc7f6a63789a4fd44ad246c5e142c4256796a252a074d","compiler-rt/lib/tsan/tests/unit/tsan_mutexset_test.cc":"a0400e289ac2584a9eef17d18693a783bb59f1ca4fca526e1bc2b66e58ed62db","compiler-rt/lib/tsan/tests/unit/tsan_shadow_test.cc":"33cf49fa9b3b93299d5cb2901611bf20f207051fea448178ac26b43bcb121dfd","compiler-rt/lib/tsan/tests/unit/tsan_stack_test.cc":"e98e1f5794a410d663d5814fde45f308a5b12887bee972b1168649546427c962","compiler-rt/lib/tsan/tests/unit/tsan_sync_test.cc":"3994eafc9ff1ccd82713e902859e683a2510dafb5eee91056809c4d81b85770a","compiler-rt/lib/tsan/tests/unit/tsan_unit_test_main.cc":"7cc43582158e525454469defeaf4fcfac03ceb97a7ba015133828ce6d63a43dc","compiler-rt/lib/ubsan/CMakeLists.txt":"4dbea695d35d6602cab3340efc636b528770822320a682b606f200bd5d899c6f","compiler-rt/lib/ubsan/ubsan.syms.extra":"4681f7eb2dafb0d87438357b7370d3305f80e769a5a246233b6b11d93fdf28ea","compiler-rt/lib/ubsan/ubsan_checks.inc":"330229eced60cf48d3fbd52a5f7287ad206f7cfa80b09676eddb25500ba8d2bd","compiler-rt/lib/ubsan/ubsan_diag.cc":"b24522b8dd34900ba037c4bc2e5497b20d3335609495be9b95566466f3ac7462","compiler-rt/lib/ubsan/ubsan_diag.h":"29e83bfecb2531c7ca509326ebb52601ccf0648497098af6074317a8d68a3ab7","compiler-rt/lib/ubsan/ubsan_diag_standalone.cc":"a99f5516d42683137d2627d625e13bb221dfebc1211b42031483f90c8fe71444","compiler-rt/lib/ubsan/ubsan_flags.cc":"8d8bb3f7ab5a97d48462210eca21b7e0881bbe70072dff8f1a8d67e7a22ea5da","compiler-rt/lib/ubsan/ubsan_flags.h":"6d500633d0802b1340ef2028a3501a280c165e914e6f8cc286f3aa1a4207c38e","compiler-rt/lib/ubsan/ubsan_flags.inc":"d6b94e2fce44edea223fb36cd4ddd952a8267f01b9766991d91b0587a7456cc3","compiler-rt/lib/ubsan/ubsan_handlers.cc":"ff5b9aa0ab5fd78e604f39a7966d55d385683c611211e141acb0e0e5882e0efc","compiler-rt/lib/ubsan/ubsan_handlers.h":"ea1208f92d77db293d25995c51465379802de218f73738b3fae750fa94fd92b9","compiler-rt/lib/ubsan/ubsan_handlers_cxx.cc":"efc2e0660f68212821ed20b713c85eec0bb5dbfab57ac3e2bb361007b27673a0","compiler-rt/lib/ubsan/ubsan_handlers_cxx.h":"187901cc5d28bca31dacaf55ee33bcacbcc814eeea6190ba536a64a79fad2884","compiler-rt/lib/ubsan/ubsan_init.cc":"bcad9a6df3debd0b847e8503d578858fe9536adfcf350e1aa55d4101a233fb29","compiler-rt/lib/ubsan/ubsan_init.h":"0b1cc1fd3134668b29ae0342fd53e0c4fe57f66a71300d0dee630e0cf0d805f6","compiler-rt/lib/ubsan/ubsan_init_standalone.cc":"cfedf8f0c536ebea29050b7e353c336134efe9596936acad062be745b8770975","compiler-rt/lib/ubsan/ubsan_init_standalone_preinit.cc":"d87cb5394ee4f430524959ec1b445dc03499cd91414096e5ce5f056ad1774aec","compiler-rt/lib/ubsan/ubsan_interface.inc":"09a03f94fc4f6645c8ab42f5554af39862daa7dc41fe82041ca942910c805dbb","compiler-rt/lib/ubsan/ubsan_monitor.cc":"77e04d67fa7cb1bb6a7c9779e27a0240409308a9ae7f4b171dba739e0a6e856c","compiler-rt/lib/ubsan/ubsan_monitor.h":"0f0f087e50d70a1e24d0506f7cda7933fa9e34f0de4515609e17470a4af76399","compiler-rt/lib/ubsan/ubsan_platform.h":"843888614939ccb035453cc9f688fe9219d4d890f517aa7bc3d9e9da84e0127a","compiler-rt/lib/ubsan/ubsan_signals_standalone.cc":"d784978d5f921936f6a5564f31bb1f73513f7895e71e1228263eed62e0d9c509","compiler-rt/lib/ubsan/ubsan_signals_standalone.h":"c8d6a3b284b7dbfcdb63506df3952b2ae9a41734a69c3a45b183fb06c9b816ff","compiler-rt/lib/ubsan/ubsan_type_hash.cc":"f95a264c0393352ec7d25e576c05c2b29d468df53ce67625400d7c3068ec1589","compiler-rt/lib/ubsan/ubsan_type_hash.h":"d65d43ed8acba3d2178ac8205ec716e8b9b4439864797fab4b647c7f5db9c5de","compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc":"238fd6fc0e99f072dc1f076f36b821faac1bc3ca86b0f885320176f13d2e03e0","compiler-rt/lib/ubsan/ubsan_type_hash_win.cc":"19e6fd0914cf743d995b7e0e0686ce928ee103380d12c78d16c59b8a757b0e3f","compiler-rt/lib/ubsan/ubsan_value.cc":"63786d0fb15caeefdd1213ca6a4065f14c2c770092cd5a7ddf3d28fd4474bd11","compiler-rt/lib/ubsan/ubsan_value.h":"f56eed16ba92c2e62ad481e80425b522e3320f83d1359c3b587e8d5dc0d33d69","compiler-rt/lib/ubsan/ubsan_win_dll_thunk.cc":"dff18c552784aa0f346fcb19640fb32752835d5ca3105e2a60692e838da91ed1","compiler-rt/lib/ubsan/ubsan_win_dynamic_runtime_thunk.cc":"7cc87e05472281287c5ed83ce28eb01b7688b3539afdbc6f6c2840d9dffc8b7e","compiler-rt/lib/ubsan/ubsan_win_weak_interception.cc":"3bc9310bf22658b3842e6265af5c787b5c5f8e2e4fc67add06470f3aecb72ac2","compiler-rt/lib/ubsan/weak_symbols.txt":"76e9876ecfac2f77f06f3fba527e96feaef158f665e650eeac68e828f79b0629","compiler-rt/lib/ubsan_minimal/CMakeLists.txt":"bff29592e2b3adff79ca0d22bda3dcd6b05b7e2de253781f183355778b2acbc0","compiler-rt/lib/ubsan_minimal/ubsan.syms.extra":"4681f7eb2dafb0d87438357b7370d3305f80e769a5a246233b6b11d93fdf28ea","compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cc":"52e8942d765157579b041ba946beb58b0bbd2e3c59d10a677c678ca4b0fe2806","compiler-rt/lib/xray/CMakeLists.txt":"23ebae6627998563de97206c2277ebf77a70dbf79637ae93ffdbf92191e7138e","compiler-rt/lib/xray/tests/CMakeLists.txt":"6e2fcd97205b7398d87180da90f552190c87f71528639dadeb89dc93f5043f7e","compiler-rt/lib/xray/tests/unit/CMakeLists.txt":"a96ba6d4dcf2afc775d5b999a53c4e4fe387f3ba31049dab0333a630f70cdd9d","compiler-rt/lib/xray/tests/unit/allocator_test.cc":"56a89ca5d713ad57b62611b33e9b2ccafe5a771cd89a6992cc5f5f212ccbd841","compiler-rt/lib/xray/tests/unit/buffer_queue_test.cc":"960c7d16bc59f2f55bd94421428968990b6e372e9a710cc6921103bfa4b3a480","compiler-rt/lib/xray/tests/unit/fdr_controller_test.cc":"5d49a3d6387551e78cf3e6a3ee26f24a47c2717429b0231097bdb183c19028e9","compiler-rt/lib/xray/tests/unit/fdr_log_writer_test.cc":"7ad2498e612cd7623212b3e7c5cebdd7723e121b73d69f684be9e7465c205316","compiler-rt/lib/xray/tests/unit/function_call_trie_test.cc":"6beb3a14145fa3378da44b7f6d27d5d3f882ce53a937f9ecdcd4071cc9378119","compiler-rt/lib/xray/tests/unit/profile_collector_test.cc":"a916a2f377b4af14e9f41eda034521a7403fa10c84f2446e498ac585879b20d8","compiler-rt/lib/xray/tests/unit/segmented_array_test.cc":"662d6c3591d0b96e49edbd0cfc23f98db7338009f5721b9a955286499e4d1be5","compiler-rt/lib/xray/tests/unit/test_helpers.cc":"8968dbdba9692fa4fa571e16833eab8db255c54a091a8019026417fdb1c323a0","compiler-rt/lib/xray/tests/unit/test_helpers.h":"b68e71709cd5b2771b03877c9fbfcd165b5c6a1ae8266be2bf99f4055c5767f9","compiler-rt/lib/xray/tests/unit/xray_unit_test_main.cc":"001bb20cbe38c696d044367cab46d1d12df0c9581b96284e8e0e1c39c04fb506","compiler-rt/lib/xray/weak_symbols.txt":"554b88f8b5a9724667b7e6ca4d220f939aeec635c7b7f5f3e7b2ccb7eb6fdde0","compiler-rt/lib/xray/xray_AArch64.cc":"71e15a585d4b90a83dc79664ba81d69fed380a7f10b54d1ff033ecf0a35719b6","compiler-rt/lib/xray/xray_allocator.h":"f9136958faa2b1f456e8fa98cc10a309aab4a7833eef6d52eb8cdbafa1754d91","compiler-rt/lib/xray/xray_always_instrument.txt":"e33e430336664b6bdf8844c15d56ee3b901035e57c0207495acf1202e5e75702","compiler-rt/lib/xray/xray_arm.cc":"12ae95ceac00bd8ccc3e83ab46cdd1d99f838ef14d44d6cafabe55793ef067a4","compiler-rt/lib/xray/xray_basic_flags.cc":"c2ed8d3f03fcae5f88ff55a873aa61f0164b840fbd3e280301220099c29ea264","compiler-rt/lib/xray/xray_basic_flags.h":"ddbb3e402076897fd689b022c35b27b1b3cd9a3ca059848559c249329fed6126","compiler-rt/lib/xray/xray_basic_flags.inc":"5508bed78405157c7a84b7bad1ec4fd26edd794e248840ec88911a1d983700a5","compiler-rt/lib/xray/xray_basic_logging.cc":"ed8898ab3213b92d55e8a50acc76f1ff2598815ad341fff9bc09ffea9d87ea13","compiler-rt/lib/xray/xray_basic_logging.h":"dcec4afa87f2e134aa17693ed926151c72a93646cbaa0ae7d0cea3391f23d06c","compiler-rt/lib/xray/xray_buffer_queue.cc":"7abd8b3a6955422cb56be1286c549112ca182d514d62f878e2a140bf436a6c4a","compiler-rt/lib/xray/xray_buffer_queue.h":"cc58f1d8ef2012b0392f41d4912217fec0899c8e40259e1b8f52051a877b2f3f","compiler-rt/lib/xray/xray_defs.h":"00c22e04f19f35d7e5d2fc9de87ca0a2fc55a9ffc979a66d0ce2b9ca96c9f415","compiler-rt/lib/xray/xray_fdr_controller.h":"2ab16e9f5c08265ab20bd7a7c5eb59c0bbd55e7ea6f384c8bde65f347691372a","compiler-rt/lib/xray/xray_fdr_flags.cc":"93e9b1bf2ef6e7cc10c45fc0cedbe65793a66a902d54d2efe714213049e45d7c","compiler-rt/lib/xray/xray_fdr_flags.h":"66dd5ef611378698ecd1441108fbcd0f59a479abf71dae04f735cfeaa665b71c","compiler-rt/lib/xray/xray_fdr_flags.inc":"1bab7464f7d54bb6ff603dc952b41fb413bb2ebd606bef1f4d7b237130238e49","compiler-rt/lib/xray/xray_fdr_log_records.h":"0a5d70e95e80f82fede50a8b58344219e93a718e188211e65f2e6fc263e39bc0","compiler-rt/lib/xray/xray_fdr_log_writer.h":"059035f44c31486c7119ede01d422b1b04f521d1420620e6f25ef7c3ae7fef46","compiler-rt/lib/xray/xray_fdr_logging.cc":"a40414fa5e373ffd9f8348d8edbf9eccef070074be51b1605b91ea7f32193191","compiler-rt/lib/xray/xray_fdr_logging.h":"5b6b26ab1b68cf7334e36f5be693355009863eba7c39170181374fd57acdb813","compiler-rt/lib/xray/xray_flags.cc":"b270c51b5537a2a19d90594ec0f8913860f0b93d6a6526e23e1951d9a8980063","compiler-rt/lib/xray/xray_flags.h":"3569ac9adb086171c8ab6267aba1cd98647bdc0b021dcaf406d2ecba2b4dd2e4","compiler-rt/lib/xray/xray_flags.inc":"6015664c434d4f36842e5c16ac82b242be8facebdddbc9d4ed070b90831731f4","compiler-rt/lib/xray/xray_function_call_trie.h":"7183b65deb1527d38097187e2de7fd5233ac09fde74b58175ba490a486960dba","compiler-rt/lib/xray/xray_init.cc":"17f3f78f89a58d73e85def328ea3502320d88068dbc783c9f3b87a908a216871","compiler-rt/lib/xray/xray_interface.cc":"c8c5b19f003723240d260e999e2af6f5f836add4a515fcb0b1392d4f49b003bc","compiler-rt/lib/xray/xray_interface_internal.h":"b29607d70b83f30df9475fb088ec1a3d6e8c2f11a087f45ebb5f22f9afe2d512","compiler-rt/lib/xray/xray_log_interface.cc":"8de7b14cc23563d373f53a3b55ac97e87d9c7e5e0589ecfe201b755c2fde8a80","compiler-rt/lib/xray/xray_mips.cc":"0dd2f60fc8f72a368dabff30a8aa45edd3eadb24574922d04ff06b6697f6ea9d","compiler-rt/lib/xray/xray_mips64.cc":"137b9089c373c94bab25edb55710b5ed755dea5ebd935277b35da1ddcc2da443","compiler-rt/lib/xray/xray_never_instrument.txt":"47c9ebe2511236511761f4171e2d5833b9f5a9acdd6563dc951b372a2664fd7f","compiler-rt/lib/xray/xray_powerpc64.cc":"38c169fd867d3694ee5097fc3d6d8068d276b118effc8818ea8148964c348d72","compiler-rt/lib/xray/xray_powerpc64.inc":"e6a800e77bdec7a3a0b6a80c6a6266efdf270bc47ae83f99a87689f01ac532e4","compiler-rt/lib/xray/xray_profile_collector.cc":"d51f73b2130207217ec8d383d2be1a72a3ea5dea33fbbd4569302f73f6d56a53","compiler-rt/lib/xray/xray_profile_collector.h":"1464d6a4bf7258a2be7fa154232653cb6b89798d1438a52e04fe27d0cb1637e4","compiler-rt/lib/xray/xray_profiling.cc":"c1e3c843348f13f78c7eb14b3ed5f6b7f05b95750e86d1ab9f555180d9dd35cc","compiler-rt/lib/xray/xray_profiling_flags.cc":"ba7a84b75bd6fd60aa202b00354c52c4dc90c9eb4221d0e7d153c0d9ce80dbe1","compiler-rt/lib/xray/xray_profiling_flags.h":"f6e805649a320a0d52c35c148b0fdf057fff4e7a6ddd41242228f0502a5edf13","compiler-rt/lib/xray/xray_profiling_flags.inc":"3a9e7ba78f05e20d38fcaa528b5e40cc9f4b869b1018c66b07c535c46e854350","compiler-rt/lib/xray/xray_recursion_guard.h":"bff3c163aceb4ba66df91a3601e99892a3a11693a6ba5f68a1070b16b95b6f2e","compiler-rt/lib/xray/xray_segmented_array.h":"0f2534df9be8e7c4223e278c8d02aba3aec52e9d5a74fb4c8bffb7c7314befc4","compiler-rt/lib/xray/xray_trampoline_AArch64.S":"214c14b7b7241b9ca3804c94f53379b79d653e99ce05d365f709a82bc8ebdb5a","compiler-rt/lib/xray/xray_trampoline_arm.S":"380cf301b2664e40a68c91dde86769d6cb64e6d50dd659c8ace72c4076ee76f7","compiler-rt/lib/xray/xray_trampoline_mips.S":"63489f1e40ed915b0bf184d1f2468a23ac5a68f9658e564460090f188a8366cf","compiler-rt/lib/xray/xray_trampoline_mips64.S":"99a8f9d28e32addc2d61a5b9be207abf93e6f93665bc393472a506f6d2aa6e21","compiler-rt/lib/xray/xray_trampoline_powerpc64.cc":"9d89558e7e7687a34e7718ede9768c9993461b33ff8e8e998108ef6391d624cd","compiler-rt/lib/xray/xray_trampoline_powerpc64_asm.S":"884d776ed2976cc4e10b888f2121d3b5294406605801cc9266d2706f9629e574","compiler-rt/lib/xray/xray_trampoline_x86_64.S":"9662473567d4ef72baa6a0bd0cb9059464810b5d80c2e0d523edef68707f53f0","compiler-rt/lib/xray/xray_tsc.h":"50557be8df4a82f1f18cde6459d19e7534978cb92bb37910ee6d412332184a6d","compiler-rt/lib/xray/xray_utils.cc":"dcdc22da018b00551fb9c8b742205baba3661a29b2a5b931997f2fc00967a3c9","compiler-rt/lib/xray/xray_utils.h":"fe37693b7691e58f5125a727a4849dce9c3e5e60a603a7bd2ab3e1469a298d69","compiler-rt/lib/xray/xray_x86_64.cc":"52d58b9a4422a2f873ee7915f0a9f5940f17ea97dbd1640fa08abf6edac783f1","compiler-rt/lib/xray/xray_x86_64.inc":"af682b8b852310860bd309062eef80e18f692a940c5d89388281d3035edcf70b","compiler-rt/test/BlocksRuntime/block-static.c":"cee77a545c10b3910d48a621e102a5986bcc60b413537b9b491e076ddfbb7443","compiler-rt/test/BlocksRuntime/blockimport.c":"d1466b6d2f89182bc51c301abacc06bb38a081cf7e3119c7d53496379f4ac6f7","compiler-rt/test/BlocksRuntime/byrefaccess.c":"9fee6236dbe9674856fffe9221140d3f930393b576dfb7b2dafa5382ef8e29a7","compiler-rt/test/BlocksRuntime/byrefcopy.c":"4435857ccb1e6039bff0a8d538447019c6381c2f3b924ae7ab20c4f24639ef82","compiler-rt/test/BlocksRuntime/byrefcopycopy.c":"100678d9ef4d5d910c9f479f165f74c6c16efc433b6112b080516638f6854806","compiler-rt/test/BlocksRuntime/byrefcopyinner.c":"dd7205708b6d657efbe8380e5230e5497113121d3a95b4a9ae39e1e6fb9f21e8","compiler-rt/test/BlocksRuntime/byrefcopyint.c":"8a3581298d0fca32d8433597904e8225ab8b7aea66b761708f3976aa5bd91c64","compiler-rt/test/BlocksRuntime/byrefcopystack.c":"faa896670791a22db83d97d4ff34a8581a135a37a351906f11ff890107cb79fb","compiler-rt/test/BlocksRuntime/byrefsanity.c":"6bec3c269855408d1f31e8dddcb6ac0af00ce3655f17154f13119e6fcf8f2631","compiler-rt/test/BlocksRuntime/byrefstruct.c":"c3a9ce296d74737f36b279a41b89707ce5bef3cbc492de9d958afeea297fc285","compiler-rt/test/BlocksRuntime/c99.c":"a957556cfe1741470a89ce288d7a72723d81af0fc014142a18f75a645a294475","compiler-rt/test/BlocksRuntime/cast.c":"3ed8449cb9689a9c1dc524e224e4215db71efe6df226445f7e3018819638daf4","compiler-rt/test/BlocksRuntime/constassign.c":"ffb3cde6732da7f36c5208cc8fe81d8ef8420ae91de6e69edb1faaf0afdedb28","compiler-rt/test/BlocksRuntime/copy-block-literal-rdar6439600.c":"0799396dd7afb955bf66f191bebaed798fc456f427ecf03cb8abcf1d73829b8d","compiler-rt/test/BlocksRuntime/copyconstructor.C":"9e1c6d9dd3a0515ee6cc2b7999a161ae4e5118fbdffe9d9ea3f59abc23373fa2","compiler-rt/test/BlocksRuntime/copynull.c":"4bfbc493ddb58911a6b0f3b1c6eecfd6d9991dbe914c88bf525ac72b3a7bbe7c","compiler-rt/test/BlocksRuntime/dispatch_async.c":"c48d6b0c046215856f8a879b6233847173174eead5dd5ec7db89187c99ff69cf","compiler-rt/test/BlocksRuntime/dispatch_call_Block_with_release.c":"989d29ebed6e8becd880f0347a524f7c957360ecff43b54f21da0802361af556","compiler-rt/test/BlocksRuntime/fail.c":"fb0bc3299bdab8d2fbd25fe8f95576b672c8e2f3c048a4b1371faf5820aff887","compiler-rt/test/BlocksRuntime/flagsisa.c":"9410e5627cc5a512fefd268b6edc36df2eb7a4322b6f099f6e0acfe061c816f4","compiler-rt/test/BlocksRuntime/globalexpression.c":"f6e3893ee949c7126591c310edb101a693970ae46e0ecb257ae5c88d2c03bf37","compiler-rt/test/BlocksRuntime/goto.c":"c0ac882eccfa273c93bd30456feed13240c7a03aa18422ea5aff7ff5b0182b2e","compiler-rt/test/BlocksRuntime/hasdescriptor.c":"1e8b16dbef6a6d663c046cd37a19a1c5d6e7e19e136f2109bf0480ac78d6f63b","compiler-rt/test/BlocksRuntime/josh.C":"2918ff334f20a07a3ec71b46d70255b6444abb39c098dec3589f2946f2e5f998","compiler-rt/test/BlocksRuntime/k-and-r.c":"db46435a8f49d740d8ad861dd34b3260fd578d8a065d3c5ddfede18f9713d21e","compiler-rt/test/BlocksRuntime/large-struct.c":"a55e02837d3cfc0f82c4ea1e1b02b387dece5d6ab40c0b634ae5849d45abf47a","compiler-rt/test/BlocksRuntime/localisglobal.c":"65d3965053a00efe515f7834f891cccaa49e880a19af4b1ccac9b89c0d17b7ee","compiler-rt/test/BlocksRuntime/macro.c":"a8fe2cb1b0300f68cdec7b728b9f87d93a1e6d557d69a7e383afe5d94f8b6caa","compiler-rt/test/BlocksRuntime/makefile":"d996a1e67143d81a7081d88342062639b9f0c783d5875eff1a5a6f924cd0683c","compiler-rt/test/BlocksRuntime/modglobal.c":"b59e38cf658250599cd92f4b0ba4308a4f815b83ab5433f47c13c108aa70a67b","compiler-rt/test/BlocksRuntime/nestedimport.c":"f5e2f17707946be41a7f47c5b265b229e21b34c8151b62081ca663fea4941a59","compiler-rt/test/BlocksRuntime/nullblockisa.c":"473e6529af6b2c7f32dcc43660bb9c13234f54b8322fa6a9830e94f29aff42ae","compiler-rt/test/BlocksRuntime/objectRRGC.c":"62320e4059598ddd7db52564031dfffd73797ecab17352f3c831293302e0c765","compiler-rt/test/BlocksRuntime/objectassign.c":"42e7f4084008e0757dc11f531303520b3d2cc69e53208e31d4bd438bf490faa3","compiler-rt/test/BlocksRuntime/orbars.c":"eff578332c9895bfb6f3583a799ffee7c920c77f3770dd2e8eb68006c3efbf60","compiler-rt/test/BlocksRuntime/rdar6396238.c":"e94e6658f7549b7e39979e543b18005c92bd61d2fd2993714f4357111f98298c","compiler-rt/test/BlocksRuntime/rdar6405500.c":"9d12447bedfcd664d9ecdf5a895b4ec7e3633f6f0970bb21b38f4b99efc4cf37","compiler-rt/test/BlocksRuntime/rdar6414583.c":"1087db49bcf94b92636e59402b80d14d595b7bbdd04c9d0ecd4077472c8b095c","compiler-rt/test/BlocksRuntime/recursive-block.c":"a07da4ff771d378565f6a45340b1a571d3750928247caffc5b962636ce874cd4","compiler-rt/test/BlocksRuntime/recursive-test.c":"b26749ddde4902be6a0e9c177f28a36f8af896150d7720ba085a16102b08278c","compiler-rt/test/BlocksRuntime/recursiveassign.c":"b517d37559d32ad749e0835e5323fb2544d22998e2d15ead913a9d51b6488172","compiler-rt/test/BlocksRuntime/reference.C":"7f1aca477092bdc70155f1384dcb66ac0285e5c178d2cc2f66e5b0e2bce98984","compiler-rt/test/BlocksRuntime/rettypepromotion.c":"a503f34645345a25492c4e2e43270bb2bfd21a1b99e612c8296d4618dc5c5a89","compiler-rt/test/BlocksRuntime/returnfunctionptr.c":"dee535f279c2efeac9f405b7619e360e2f9cb1c6f2e6350b4e64f9eb87f997d1","compiler-rt/test/BlocksRuntime/shorthandexpression.c":"6a9262753a1bb8455efd7c5572494e69734b1ccdfbea9b2e01734393965a7088","compiler-rt/test/BlocksRuntime/sizeof.c":"0820adcf3dacaae3e93cfa27aef650e19d522e61782345c602f6aaab1f124271","compiler-rt/test/BlocksRuntime/small-struct.c":"23bc259e9b5598446ced3bd2ecde34cfe7724e4c8be3dc4a46b5b29c3e916cff","compiler-rt/test/BlocksRuntime/structmember.c":"10f5ea01a882426c11c01a4bdd2cf2d19392de50f6dfd5cade5947f32f08e556","compiler-rt/test/BlocksRuntime/testfilerunner.h":"80fd789e8485ada859f35504b9c57536cf28e6945f4f5885621c79fe7335b285","compiler-rt/test/BlocksRuntime/testfilerunner.m":"123d965e4389d15656c188051ea486b4c538f3df37f036a604c196510b22e37c","compiler-rt/test/BlocksRuntime/varargs-bad-assign.c":"dfe8ce3c9ac5f2e75bcf8e522b823472b2ed4dc08dd0e1a1b02a31ac3c7e909f","compiler-rt/test/BlocksRuntime/varargs.c":"95da62d6dc450d3c7df99c04a40a496291a6cc10e51699bdd7506e1a45c88504","compiler-rt/test/BlocksRuntime/variadic.c":"de4aa6a7a0cd3439a26b9aa54c28e7f6edfb93f75a802455f0201833273d5963","compiler-rt/test/BlocksRuntime/voidarg.c":"b3c702b49645add456c07260ac3c7e2ecb841c3ca4ac74a260f2da1c5363c4af","compiler-rt/test/CMakeLists.txt":"6d1d6977c84713ff42e3408c08e9f6c47407801157580824f3a38f3d25c596f7","compiler-rt/test/asan/CMakeLists.txt":"2162e47bbaad628bbaea8fce344d912340cf7b9e0186e1d5cce14d498c210f26","compiler-rt/test/asan/TestCases/Android/lit.local.cfg":"49d9ed17ed24f2134c1d641befd6ec89bdfab8564f4e088f18582b5b03a59677","compiler-rt/test/asan/TestCases/Darwin/abort_on_error.cc":"bb5495fc6911e96a2541f3150d936c6631951d97a5fdf6286609ec3ff802895a","compiler-rt/test/asan/TestCases/Darwin/address-range-limit.mm":"8f0edccbddb3a2bbed2163920c102948eddbb1f45b79470f45de8744b19c9837","compiler-rt/test/asan/TestCases/Darwin/asan_gen_prefixes.cc":"5575efee5702efc036b9361ae50e846942d3466b171efdc574384b9ec6331bd3","compiler-rt/test/asan/TestCases/Darwin/atos-symbolizer-dyld-root-path.cc":"a31f85101d181751487e63fe2e149ad5cd0ea8a3b178c2d22e8108766bc14043","compiler-rt/test/asan/TestCases/Darwin/atos-symbolizer.cc":"c9c189c165ea88fc3cd4884470f5b906e46ae77d27b5e45b8738331aa8aac71c","compiler-rt/test/asan/TestCases/Darwin/crashlog-stacktraces.c":"829d7bbc5bcf1f8c1a2400266e6d638be2a6bf30ca5754bed99ba9a0b4c1541b","compiler-rt/test/asan/TestCases/Darwin/cstring_literals_regtest.mm":"a5db583dc0cd2037b943a8843e332fde6119e2a7b7840840c1b77ae273ee1f61","compiler-rt/test/asan/TestCases/Darwin/cstring_section.c":"d0783b81eb2a3d7fbe9da2ec915e29f22eb02555c7a0bb0bd3ba57fa86154296","compiler-rt/test/asan/TestCases/Darwin/dead-strip.c":"19a164ee77b52727a7b99321ea6100bd662b57d43091ebe3d4cebf7693bd9e9e","compiler-rt/test/asan/TestCases/Darwin/dladdr-demangling.cc":"4b8ba809d37f75963d5267684fb4e1b5651655ac64fa5a2918a6324bcd5c7413","compiler-rt/test/asan/TestCases/Darwin/dump_registers.cc":"f8734b38151bb935a0982e88168cf6e74d731067f291098976506f1739ca7599","compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cc":"35a659dc969c7bee8f7f3f975ae5dfec7448da493aa7c0d7f4f726fd2300af4c","compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_remove.cc":"8fea90c77cc17c5b93cbcbaa1fe8af28155e75dab8a975ce1088a5f8e8b821a1","compiler-rt/test/asan/TestCases/Darwin/empty-section.cc":"071b75c4a3500c1295033d0dd5082f471bc6b58dc6afbc37cf9d4d1826bc87ef","compiler-rt/test/asan/TestCases/Darwin/fclose.c":"ace982feb19be2a6fda51baeb475e8d7c4b95c1e3865257e28b212812f3d76d0","compiler-rt/test/asan/TestCases/Darwin/getpwnam.c":"7211ebd6c6d59468fc31bcdbdc9258d4d754ebe932c039036967c51c29667880","compiler-rt/test/asan/TestCases/Darwin/haswell-symbolication.cc":"2f6cf79ab8e0f736cd5cd8a1c93a9718f4a2b4e5498671ba5a4df05133534c31","compiler-rt/test/asan/TestCases/Darwin/interface_symbols_darwin.cc":"1dcef4ecbbfabe9183d8d59d00605c5de4ed3bcd540e4b58fd094c8ebdb10c0c","compiler-rt/test/asan/TestCases/Darwin/linked-only.cc":"d9bfb6333bc8982c1b2cef6deeef5c311c285786d75899d4e727a1a378792af8","compiler-rt/test/asan/TestCases/Darwin/lit.local.cfg":"67ea8448cf3507eda12a63f0981890bfcb7959532eab5a4c303900daa5788a30","compiler-rt/test/asan/TestCases/Darwin/malloc_destroy_zone.cc":"bcfa620d941d96ce4c83ced9a55ef5c77ebdd835f0a8987938a070842cc53219","compiler-rt/test/asan/TestCases/Darwin/malloc_set_zone_name-mprotect.cc":"b7aad93f0899d8f1f57c1f4c60730e35292b9d53d3b65fd20e0e4e9eecf743a4","compiler-rt/test/asan/TestCases/Darwin/malloc_size_crash.mm":"74cfba8334af989b70c9a4d99fd303941f33313cbeb2388d1aeb364e3371077e","compiler-rt/test/asan/TestCases/Darwin/malloc_zone-protected.cc":"90c25478f3829f4b9801c9cf2b8a02a03aef4c89ff90023523966aac0255a122","compiler-rt/test/asan/TestCases/Darwin/mixing-global-constructors.cc":"53b9718c49330fd8b129d44a8f3da412faeece8cb2e2542cea074ef0d3e46fdc","compiler-rt/test/asan/TestCases/Darwin/nil-return-struct.mm":"25f1de6e380aa47c06d8213512235ea93d2c9362c755185d9f07fb656c6fda05","compiler-rt/test/asan/TestCases/Darwin/objc-odr.mm":"2963eb01b6739f30b58e457a3091f236b0d942f3ba07c7de29b0ca00d4a3902a","compiler-rt/test/asan/TestCases/Darwin/odr-lto.cc":"aa74fbdf81da9e5cc0bc4a538c08a4ad58ecdff6ca6cc96bcccbeca8ac8da6be","compiler-rt/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc":"28c43f6e190011a25c605a68ea8d433a480d46091b6447a1fc462990423638d2","compiler-rt/test/asan/TestCases/Darwin/sandbox-symbolizer.cc":"355847e415be2c5929782df549aa61c732906c0f472aad43b15005884f7e83e5","compiler-rt/test/asan/TestCases/Darwin/scribble.cc":"df7c86382d83be2a6dd0ee863ab98c1207089232e38cc6cebc0984a4d3bf603f","compiler-rt/test/asan/TestCases/Darwin/segv_read_write.c":"8f4f8013734d3d3b1ac10e9ff0b119a1be0187c3b6882406539163a2f1740fd7","compiler-rt/test/asan/TestCases/Darwin/suppressions-darwin.cc":"81fd00ea8335a8dc114d423f5fb69c3bd39ee6051b6f3fc16d3891828a3a01a0","compiler-rt/test/asan/TestCases/Darwin/suppressions-function.cc":"33ca20dfbf11dd7e594f8baf7594c242cbda66682034681aa52ca6907ec34352","compiler-rt/test/asan/TestCases/Darwin/suppressions-sandbox.cc":"0f921e871a1791746e45e6e2fe723d17b630b09a7c7140eab8f27c6838132361","compiler-rt/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc":"fada1962049db11305345fdacefa60e7c2c1e1bdf4557b977d8183910a1d9313","compiler-rt/test/asan/TestCases/Darwin/uuid.cc":"a302061f35da2f3e44d96e302b529f6bb13bb70ba6eab3fbef9cf70c64da43b7","compiler-rt/test/asan/TestCases/Helpers/blacklist-extra.cc":"21a09d2e916be90a5a82f291eb67c6c4121ac79e30490cb3a09f21f6b1a4a0e9","compiler-rt/test/asan/TestCases/Helpers/echo-env.cc":"47eeec3c5edc4bd773f1e366703be47a776f092b78541b6d5248cd2992dea482","compiler-rt/test/asan/TestCases/Helpers/init-order-atexit-extra.cc":"03a4f9a01d9ee3a269c7bbe252cc15b93528d4d42bf7d054f687fe513dc7b0db","compiler-rt/test/asan/TestCases/Helpers/initialization-blacklist-extra.cc":"6fb6834316b80629095d3cc21e98ad83d458f451298de2ab9e1da11db7a8e8c1","compiler-rt/test/asan/TestCases/Helpers/initialization-blacklist-extra2.cc":"1ea11d70cd1476a35f49e18e4a8c934cdfabe926deda995c0f5981e55882ce82","compiler-rt/test/asan/TestCases/Helpers/initialization-blacklist.txt":"eb848ccbccaae1523a46c4a969c945e4e58f4623317ba9a379e1cd0a6f2e17de","compiler-rt/test/asan/TestCases/Helpers/initialization-bug-extra.cc":"35ac566377881bc31117587eb26f25d2a6d4cc48e3a7868a080313d1adf3e143","compiler-rt/test/asan/TestCases/Helpers/initialization-bug-extra2.cc":"82b1ad8297d20a93b3e58d640de0a58c937b58c7dc800b952789a179d4a75fb5","compiler-rt/test/asan/TestCases/Helpers/initialization-constexpr-extra.cc":"86c8e1c4c0a7f71b74caf49fb49ba74b2c30ee3549c423a5f0c167df4d4a9f64","compiler-rt/test/asan/TestCases/Helpers/initialization-nobug-extra.cc":"7999e2662927e51541d601719d87087a983389247aef6ed11ebf74e6efb152cc","compiler-rt/test/asan/TestCases/Helpers/lit.local.cfg":"e95496aa25143645f3c76a82cabbfa7edb7e7e6342cf7c3c1cdde1a836924d16","compiler-rt/test/asan/TestCases/Helpers/underflow.cc":"3117a6e8e395627cbba004b20cbc5dc78cdabe99a049ff4064b31a2eb64ff0bc","compiler-rt/test/asan/TestCases/Linux/abort_on_error.cc":"5392aaf012b52c3c681a4549ae69d490dad7390a8c300252c393e9f0e4bc4f07","compiler-rt/test/asan/TestCases/Linux/activation-options.cc":"61da60a42330b116a8e8b365947e529021a2cad5dfb1bfee0cd5f77b06c786c6","compiler-rt/test/asan/TestCases/Linux/aligned_delete_test.cc":"6371e5fce2b3ae04f56b73bd0ee25446fcadeea235ea93bc2c548e2d9a3b8919","compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cc":"532ff2f41bb24f8a7ae9f9501f0ab9268a74b773cc2354fd3a97ff5a23e3a147","compiler-rt/test/asan/TestCases/Linux/asan-asm-stacktrace-test.cc":"093b12ad5e152b43220a4c8e568fb29d9f8e26fe82021a3c4f89ba5030226b88","compiler-rt/test/asan/TestCases/Linux/asan_default_suppressions.cc":"4adecd4ec9c245f9f990c26accf859c504e44316e323f32c9b743c8ee1b17cd2","compiler-rt/test/asan/TestCases/Linux/asan_dlopen_test.cc":"db23251ed9358d94ae0d776851a5ed710f9412e3e2efa1314135f7b6005d2344","compiler-rt/test/asan/TestCases/Linux/asan_prelink_test.cc":"9bdc7433380131b9ce3ec2a1f6ee9d470e1db793252d4df896b6fd3efa942335","compiler-rt/test/asan/TestCases/Linux/asan_preload_test-1.cc":"5e968988212145fdea66a737e82a7377062b0c639e4d5756359db4adb3d5de75","compiler-rt/test/asan/TestCases/Linux/asan_preload_test-2.cc":"bbd134cf3821ed4e5421a28b2675bfa869e4f1faa37b5481a5030313a8473bad","compiler-rt/test/asan/TestCases/Linux/asan_preload_test-3.cc":"d59e0947402d259279f8668c4689d7e57003d649b14420c9ea781d90dbcbcb22","compiler-rt/test/asan/TestCases/Linux/asan_rt_confict_test-1.cc":"48d28f0707421ffdaac2ae5a12484d4e91bb71aa94827949b42b549e28786abf","compiler-rt/test/asan/TestCases/Linux/asan_rt_confict_test-2.cc":"926cefaf55f8f95cc24e09ea164cfc1117cafe117305f770e78c0a2c1634a52e","compiler-rt/test/asan/TestCases/Linux/auto_memory_profile_test.cc":"56d03a34a67df89d588a32c2898a1e083f82f62f95ed0c10a72cfafd4e8ba66d","compiler-rt/test/asan/TestCases/Linux/calloc-preload.c":"cabe4729467744468330ef608c76cac7f416a93032ee41ae0fa2d452e70bafb2","compiler-rt/test/asan/TestCases/Linux/clang_gcc_abi.cc":"8dcd920be3064b3cf9c4f39e95dfea82d9a52e344d083b0bd415f1fafb0215df","compiler-rt/test/asan/TestCases/Linux/clone_test.cc":"564b78141be40403faa907e73068a59b17bad6b18b77d5d5ca9d57339d142a6f","compiler-rt/test/asan/TestCases/Linux/coverage-missing.cc":"e353aae756617d37bed5cefdadb4d07a45e6cab522d03fea6e7b8a8b7bbe1379","compiler-rt/test/asan/TestCases/Linux/cuda_test.cc":"0a7d3b86e9bf2951ddab62d0f0ead5327b34f7c1d653f0edc7659dedf157ebd6","compiler-rt/test/asan/TestCases/Linux/function-sections-are-bad.cc":"d040bac3e775c79806ae5bbd17483236bbebe32a4c9aa2da6c08d43f07d0209d","compiler-rt/test/asan/TestCases/Linux/global-overflow-bfd.cc":"f3f441752cbfc20b7465837cb5617bc651cfc4c62835da86f67814c0bcce927c","compiler-rt/test/asan/TestCases/Linux/global-overflow-lld.cc":"5ea7efb38be38bb18eec8b0abee49bce96800f3d8ee45b93ddb5ea3bb65fce2c","compiler-rt/test/asan/TestCases/Linux/globals-gc-sections-lld.cc":"a20571931a2a1c76160b8e69ea68fbec3cb0c65cff145f0c95d7485c2b4f4e71","compiler-rt/test/asan/TestCases/Linux/init-order-dlopen.cc":"375e909ea81b095f1ae4a256aa6725d3b583f30958a27836984105e138cc53b0","compiler-rt/test/asan/TestCases/Linux/init_fini_sections.cc":"fda46441d29515be6100bf88526b778d40011eb8b6926e4fcb39c0790a81ad67","compiler-rt/test/asan/TestCases/Linux/initialization-bug-any-order.cc":"f7bc09ad978a17e850e1b338aaa415d4429a4f3b18c6b09d06febb2e919afe05","compiler-rt/test/asan/TestCases/Linux/interception_malloc_test.cc":"04f9fa9a0ac397d4141bd7ffd16c763c65792ecb4780d694600d211f68ea4db5","compiler-rt/test/asan/TestCases/Linux/interception_readdir_r_test.cc":"5bb4fda6ccd23e93c4194ae2378c3b78c7574f07725a1f27c2fe1b7906954c80","compiler-rt/test/asan/TestCases/Linux/interception_test.cc":"f4267fc926240471012197889296ad474cfb8425836f985bc4c2e023ace6fce1","compiler-rt/test/asan/TestCases/Linux/interface_symbols_linux.cc":"c599c90889303a9c6a875b3e8d68b583b860b6bd4b829c11a7bdce1381ab028b","compiler-rt/test/asan/TestCases/Linux/kernel-area.cc":"8097c3c407e5745a864c6a78c87ac51c0e532961b92bc734e04e8d15c3bdcd7e","compiler-rt/test/asan/TestCases/Linux/leak.cc":"677613fd5e361f0af01e0e55db9b2d29430e53c73670ae11ea63d41556dbcfa5","compiler-rt/test/asan/TestCases/Linux/leak_check_segv.cc":"f57b0c42f08fd2cf40f1f050604f6ee1d9c232aaa918cd3d80267d805af06062","compiler-rt/test/asan/TestCases/Linux/lit.local.cfg":"752f9f465d546875972dbfeb1fce9b5ecdfa3ab1d0b6b756efb1047f93298b01","compiler-rt/test/asan/TestCases/Linux/local_alias.cc":"54904251f97ac939b7e41081a6335a787225f89661b8594140f0770f0555ffa1","compiler-rt/test/asan/TestCases/Linux/long-object-path.cc":"6ea698037f91ad1ee3df7939c3e7fc70e31c39d728e2431e2a9087f5560d3a68","compiler-rt/test/asan/TestCases/Linux/longjmp_chk.c":"b8511801e0c291373ed0649ed27efac8e83559b2be01237bc8034a8ab4e54918","compiler-rt/test/asan/TestCases/Linux/malloc-in-qsort.cc":"c6f33c58d19a9c3dfec89632a396705e1f85f33a6f5465d95d4fb8de0cf7405b","compiler-rt/test/asan/TestCases/Linux/malloc_delete_mismatch.cc":"25544ba3333348c68756b7c80bac208a6a1ed9a4879a7d5aba84b014c1861f99","compiler-rt/test/asan/TestCases/Linux/memmem_test.cc":"c783aae5ce9f3f396b72be20a582cfce5faf364cd608ecf37a7d362ace5fd037","compiler-rt/test/asan/TestCases/Linux/mincore.cc":"1b627bb23a1e3cd6fabb9325399bbea81938120fe2daa5a9824059cfe751f586","compiler-rt/test/asan/TestCases/Linux/new_delete_mismatch.cc":"599d68fb70439ef22fe4cda27c8b799c9199dce0f5b82e1b27d326fd6dc6f93e","compiler-rt/test/asan/TestCases/Linux/nohugepage_test.cc":"4b65f14146296f47aa187f9e6c42c08c70670a1e1ec803785d1a7bd7111cdd0d","compiler-rt/test/asan/TestCases/Linux/odr-violation.cc":"0b4aca627c6a2c94da733a30f6455c60b7dd407aabac5fa598ee0ee5e5fc4f65","compiler-rt/test/asan/TestCases/Linux/odr_c_test.c":"a44f7b50649736494af8021eaa3021da20b381d78bd7cfee63d1e189db6df29d","compiler-rt/test/asan/TestCases/Linux/overflow-in-qsort.cc":"bb074c65b4ecffabe037293f1c3b55cf9ab45963c21d0051333d10278f77708a","compiler-rt/test/asan/TestCases/Linux/preinit_test.cc":"78182babc052538daf42acc5799aea24fd3c06e53d3bf6e0a4eddd9c968077b7","compiler-rt/test/asan/TestCases/Linux/preinstalled_signal.cc":"c1ee40201db599824e996143809424eb5ff09a6f4543a4cc302f443ab1c1ff5e","compiler-rt/test/asan/TestCases/Linux/print_memory_profile_test.cc":"ef1560b20e925cf56e79d60123e262a7f0f67cd0582523e142a9243b20f93b28","compiler-rt/test/asan/TestCases/Linux/printf-fortify-1.c":"6f2b45f9305bbc0720d407b466e4d36c9fb53f066249a413d1da523ee34864b9","compiler-rt/test/asan/TestCases/Linux/printf-fortify-2.c":"aa978cbacb49477ee040e6d1ac83dcc90cb0ecc451c6bac8273bd94de5c75c2c","compiler-rt/test/asan/TestCases/Linux/printf-fortify-3.c":"9d1e495e0dadc18c80386ebe4b1c7315cc5f5756070e08e131b4219150812d99","compiler-rt/test/asan/TestCases/Linux/printf-fortify-4.c":"aabc8c7c2345c239ea4995ce4fa97f188a5cbc318038ff81629a8f7bb1a42685","compiler-rt/test/asan/TestCases/Linux/printf-fortify-5.c":"c26bc8cd92471672576d2564f0ef3d3e5d8aed789bba30f89992a7c88e4f42af","compiler-rt/test/asan/TestCases/Linux/pthread_create_from_constructor.cc":"0b45a246663cc70da5e38eac23104925af03a550884fcd5a177ea65553d7a176","compiler-rt/test/asan/TestCases/Linux/pthread_create_version.cc":"08ca4b98ebee5708ff991cdeb5453555b8149ca6682f9305bb8265f71a2defe6","compiler-rt/test/asan/TestCases/Linux/ptrace.cc":"d78813be0ab3e5192622de164c414ffde8f1b8c56e2462f39104d0a94d359333","compiler-rt/test/asan/TestCases/Linux/quarantine_size_mb.cc":"f418087a2200a67deb297087a9deb49d663b4a7617162e6b2b6d8bd0f50bffa6","compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c":"9793dcfa5382825d7a57e250f3fa80e452d9d3624fbc39959f3b182ca2408a7b","compiler-rt/test/asan/TestCases/Linux/recoverable-lsan.cc":"c8b1930755553de375aa1bb5cd12a90b8da01993ce4a666e0dd7216fbae703a8","compiler-rt/test/asan/TestCases/Linux/recvfrom.cc":"1f238a845a16e1903d7829822712df13e759a0c96c66f23dd21ecfa6f691da39","compiler-rt/test/asan/TestCases/Linux/release_to_os_test.cc":"a25a72ec6abb3ea453d1b3adddfcf5e2fb11863309e62713a67e1514ed8a492c","compiler-rt/test/asan/TestCases/Linux/rlimit_mmap_test.cc":"431a8769b575ea828a4d1b1cd405a854db7cd487eae27ba2895a99790a2e1b83","compiler-rt/test/asan/TestCases/Linux/sanbox_read_proc_self_maps_test.cc":"5cb3208797ddf62559ad2f401143f4aabbf90963de251934c93e577c786a59ad","compiler-rt/test/asan/TestCases/Linux/segv_read_write.c":"94a5cac6c2f8b440f2898a7e6c954501a9d7ceb396fd51fc5cb81a0e7f573538","compiler-rt/test/asan/TestCases/Linux/shmctl.cc":"19c41585c298efaf1a8eda021910dd20311d2863e6753117f144f468cdedee8b","compiler-rt/test/asan/TestCases/Linux/signal_during_stop_the_world.cc":"1f64ae548c443d86167d84caf03b09db12d263dfc4dc5e55a10e53f72adc7e59","compiler-rt/test/asan/TestCases/Linux/sized_delete_test.cc":"2b8e8c0f08401c30433850ce15e043aa345af17843ca2ed5fa994c6b153b919b","compiler-rt/test/asan/TestCases/Linux/stack-overflow-recovery-mode.cc":"386a79fb828cad8fa5277072ea963e4a80f1ba298caee1fd64bf01a5d7e6bc41","compiler-rt/test/asan/TestCases/Linux/stack-overflow-sigbus.cc":"aa12690676ba706a39169f9d44dc7a4cfdf0da9af81ea13c6a600e466efe6422","compiler-rt/test/asan/TestCases/Linux/stack-trace-dlclose.cc":"018f84bfd44ac7f5cdb2a2f8426ecedc3917c55f3a21881d904b7d5c024785d1","compiler-rt/test/asan/TestCases/Linux/static_tls.cc":"3b584c9a115f9de01cafef95d31661e2ce643837107fb8d6147a3b997f2a633a","compiler-rt/test/asan/TestCases/Linux/stress_dtls.c":"cf09540a4019933d510ec5f99259ce971dcedf2370863fa033a2a0cbacfb9345","compiler-rt/test/asan/TestCases/Linux/swapcontext_annotation.cc":"8e6e9ba4ac8293a3f90ff136107f62b0241a5eae04f5b51a578f7c179acb2aa3","compiler-rt/test/asan/TestCases/Linux/swapcontext_test.cc":"2a8bb1c6d9f1810c2191404e83ad26b2199aac7caddeaccf34c2b10f91fd9b88","compiler-rt/test/asan/TestCases/Linux/syscalls.cc":"f319f29bb692429fa3e0ca5e0e7bcc551c03d06f063ac45b3dd6dd75d78bfeeb","compiler-rt/test/asan/TestCases/Linux/textdomain.c":"841eb84f8595c776b68ef8f2a82375e233cce1102b69f1341b3cee63c2577407","compiler-rt/test/asan/TestCases/Linux/thread_local_quarantine_pthread_join.cc":"04119797f2473e39354bad08212f3b558a79bcb493dffb0be951000af5ef8838","compiler-rt/test/asan/TestCases/Linux/thread_local_quarantine_size_kb.cc":"bb614a842f9de0e7afd0e498878bf8c5e67fb4180a76cb208d4086c945d51861","compiler-rt/test/asan/TestCases/Linux/uar_signals.cc":"09fa276d196d9d99f90bc2c5ba6c2d3db963c1cf7a71093133a416fe4e65dc0e","compiler-rt/test/asan/TestCases/Linux/unpoison_tls.cc":"7d7223ac8e424d8b84c1dc95e92fd615d76b541b7af5c75c0af7bdb95635a01e","compiler-rt/test/asan/TestCases/Posix/asan-sigbus.cpp":"e0d85524fc1eff666f9b2952d1a686a60b413fdb2e43d47b736d81d61e972068","compiler-rt/test/asan/TestCases/Posix/asan-symbolize-bad-path.cc":"626c1345f46d7798b755199d78afc67694b5856b08529ffd0cda9ebdeec071b6","compiler-rt/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cc":"28c0325cc2b8f4dcaf46a8970d58c1c3e4510a97ac431e30803dfd68043c4627","compiler-rt/test/asan/TestCases/Posix/asprintf.cc":"08f07e5933cc2ba14f2e615f06cd990366732102fb912c9bd8400acda98b83fa","compiler-rt/test/asan/TestCases/Posix/assign_large_valloc_to_global.cc":"71a38bac40bf208d69ad579bf42f8cbf81350fcb1ba371b818c922da8be873cd","compiler-rt/test/asan/TestCases/Posix/closed-fds.cc":"0d613a64ab468ddc6df9946d70fb87d53b41baf8333328d84352118a11158c41","compiler-rt/test/asan/TestCases/Posix/concurrent_overflow.cc":"abfb11853dc3e371bd9b3e5a0fafe8eae98b4a75e7d433fb61dfcd957935f003","compiler-rt/test/asan/TestCases/Posix/coverage-fork.cc":"f7dd9feddd3b349ab3af6cadaad109e9e8cb8e16fbe7a7e5af56a819177f9055","compiler-rt/test/asan/TestCases/Posix/coverage-module-unloaded.cc":"583b47935b7b0172f55e598b8c92f43bef04b765b9b95ecbeb1ffb54435a61da","compiler-rt/test/asan/TestCases/Posix/coverage-reset.cc":"77ed8eacdf65df0f3a88c501bf0f59b9b8453186ab5b93d7dfeb44056d386ffc","compiler-rt/test/asan/TestCases/Posix/coverage.cc":"47e83ef148ebe2c4df0083858f266ab22c90ccf155a87e60d530bd3b2bddd7ba","compiler-rt/test/asan/TestCases/Posix/current_allocated_bytes.cc":"12ff4ba221731e5b1e68780f2adc825c78642e5a2dfe9ec2f088207c1a104cf8","compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cc":"10e875810f6871ba43464b1e06b419e15b1141b27986138e5d7f00641a58a711","compiler-rt/test/asan/TestCases/Posix/deep_thread_stack.cc":"ceade360eae87123b9ba32e60b0e9be1d01df91b1c359afd0bd1c057d3fdbba1","compiler-rt/test/asan/TestCases/Posix/dlclose-test.cc":"6cc294c1b5616743507999039b14773c77ff0bb67baace137af1c2b9bf33389b","compiler-rt/test/asan/TestCases/Posix/fgets_fputs.cc":"c96cc05971b0cacfa01e8f727ea0edc717c92e3b518d082e06a00ed155737a5b","compiler-rt/test/asan/TestCases/Posix/fread_fwrite.cc":"02a7723ab4f024e0071dbddd423cefc4e6c3509aa5e6be6e7fa8f3e77a259bba","compiler-rt/test/asan/TestCases/Posix/free_hook_realloc.cc":"d05300f0bdc1c1556dbd54c6956eb164fdf3d6d27915e8cf2814b9b4729fdb8b","compiler-rt/test/asan/TestCases/Posix/freopen.cc":"6097f7c6e14c9c0fb9226d80ad06439b5d12eca72774ff0805311e7d8ca97647","compiler-rt/test/asan/TestCases/Posix/gc-test.cc":"292754756a6470bbc153236874452724bb9f2f2e8f8ec8b8f8b73f14dcf6789e","compiler-rt/test/asan/TestCases/Posix/glob.cc":"b93711d2294691e199217941c069022d656216ff07c43fe4ce6a804422d3332a","compiler-rt/test/asan/TestCases/Posix/glob_test_root/aa":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/asan/TestCases/Posix/glob_test_root/ab":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/asan/TestCases/Posix/glob_test_root/ba":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/asan/TestCases/Posix/global-registration.c":"de2982b8d1d59884bea697e6d6e7489a7e8262804e6322d9e50a588452981f82","compiler-rt/test/asan/TestCases/Posix/halt_on_error-signals.c":"d7065f900ff91f4f0fb3b1ac077bae5d60c0ff3045e452612810aebc226e8fe2","compiler-rt/test/asan/TestCases/Posix/halt_on_error-torture.cc":"99c3895ceea9a2cebef0f2a39156e2b8c4030a972ef73c4d6fc672e29df69445","compiler-rt/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc":"03b9120045c82d1346866e1c526f0df72634917c03dd610b10e284b80aff7947","compiler-rt/test/asan/TestCases/Posix/handle_abort_on_error.cc":"866636dde2d3bc03d71485dcf644e066c8a93c0929376d86a0012b9b7d2f603b","compiler-rt/test/asan/TestCases/Posix/init-order-pthread-create.cc":"a7f2bdc75ff5312f800fdc3e0f886655ee54a94e847137a29600095b5440cde8","compiler-rt/test/asan/TestCases/Posix/interception-in-shared-lib-test.cc":"1d74ab34735b3a96dd3bce60ab48a6fcc077e5377d8e4cb4486796b0081f1a1c","compiler-rt/test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cc":"98b429a9d086dee1d73fcc53ba3b538b19c9c805f063745be0fa2cc10d4047fc","compiler-rt/test/asan/TestCases/Posix/ioctl.cc":"a9ad018d64b7cf3303b3402299a7747c7ddee9c55ee0ffc7a2c6f6d00c3cb998","compiler-rt/test/asan/TestCases/Posix/large_allocator_unpoisons_on_free.cc":"8190d810fc4cb35493bcf8a5433617c711411b91c533de78fe8f3da7e43086d2","compiler-rt/test/asan/TestCases/Posix/lit.local.cfg":"3c6afec951edaa5e426ac1590d3e67e4136b5ce61803cabf17f3c775a7279daa","compiler-rt/test/asan/TestCases/Posix/log_path_fork_test.cc.disabled":"42cfbccf92a854fe17a115d21196069e85ab78cddfa4b3bc39a9b42fc0c1caef","compiler-rt/test/asan/TestCases/Posix/lto-constmerge-odr.cc":"b94e7a7176b63ffd68a8bc17974ef829daf31ca7800cb5eef26325c7a8596b95","compiler-rt/test/asan/TestCases/Posix/mmap_limit_mb.cc":"a0e8b1b2287ade3b61c7516bb9bfb71234e7bb18b3de1a4d91983d4d2e417058","compiler-rt/test/asan/TestCases/Posix/new_array_cookie_test.cc":"6b8bed6336522f7e7ebe117c8a47750ee49ed6250ea0cf2210fff4a42e492aa0","compiler-rt/test/asan/TestCases/Posix/new_array_cookie_uaf_test.cc":"c6a7e5e85d7ff4efffcf91363fc57046eba9515d69f0b3f5a30fecc8ee35229a","compiler-rt/test/asan/TestCases/Posix/new_array_cookie_with_new_from_class.cc":"9eefa092df84bb5a45bf78efdaea027e7c40a33f55e38a5f2f2614bc5a7122db","compiler-rt/test/asan/TestCases/Posix/no_asan_gen_globals.c":"38572792b07a6bd4387b3fcfa7516860fa04913f391579fd11d7ce3bfa219293","compiler-rt/test/asan/TestCases/Posix/print_cmdline.cc":"f713bae6b244578b1744e7d69a9a320f976e810a2cd5c4ce9da2733dcf849bf7","compiler-rt/test/asan/TestCases/Posix/readv.cc":"922b0c06aa013c9488d37859616c00e74c241365335c1d5fecf02b36fe542c54","compiler-rt/test/asan/TestCases/Posix/shared-lib-test.cc":"a5e5ba5cdeb28166538bb3d22358109721f0a6b33204a988380f4ab1992441ab","compiler-rt/test/asan/TestCases/Posix/stack-overflow.cc":"82ca83fb092b14fd94cb563ea745c4c4fc58ed8cb702524ec44561f1daa5640a","compiler-rt/test/asan/TestCases/Posix/stack-use-after-return.cc":"7e7ff62fde5658fc170aa51f1b041e74ef937a10a7f450bb1c3e3b26873113fe","compiler-rt/test/asan/TestCases/Posix/start-deactivated.cc":"2cd4b753453867550e3a72e3eeab34b76be22dd84e18a00d818d271f0d5f7a69","compiler-rt/test/asan/TestCases/Posix/strchr.c":"83f226dbdc9a9e8afd594c4cd8e9272e7b3cb16c66c8189f687ca19ae876dc7b","compiler-rt/test/asan/TestCases/Posix/strerror_r_test.cc":"ebc43446c342247e742f23156355129cb43304092a96adb981be1d966eefd831","compiler-rt/test/asan/TestCases/Posix/strndup_oob_test.cc":"1015ca07d813efa51a37a6f68bd42f4ed85213777e8cd7c1f52583b1d463e3cd","compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cc":"4e2d20d584a6e59fff24d3eb123ef0155b13ab87ebd7a107245cf275a781472f","compiler-rt/test/asan/TestCases/Posix/tsd_dtor_leak.cc":"68b8dea070211aaf3ae1c91e3ee114d372332dcef09144a06d63ca004d3c2baa","compiler-rt/test/asan/TestCases/Posix/wait.cc":"c46b2ff7937a37d1a5c886504a28eb09768fe131639d7a80381abf0dd9db15d1","compiler-rt/test/asan/TestCases/Posix/wait3.cc":"a920197d523187dc6fcbd7e2e2cf0bef7b703886468ed70ae11053213672b145","compiler-rt/test/asan/TestCases/Posix/wait4.cc":"26142eab308e3ec4042b2a1fe50393f0496e2755919c80d4476406e3e920ac89","compiler-rt/test/asan/TestCases/Posix/waitid.cc":"8769be4053751683f5da062c00091dee0d09b55667df1f448d9e150ef2ee53de","compiler-rt/test/asan/TestCases/Windows/aligned_mallocs.cc":"589cce5ffff6eb4e294597e685a6e354e285b3403dd0fc1e2c1e2af84596041e","compiler-rt/test/asan/TestCases/Windows/allocators_sanity.cc":"b7a133a0b7067a91899495e5d83abc2ae8d2e6b3f16cd98b153c094947c872bd","compiler-rt/test/asan/TestCases/Windows/beginthreadex.cc":"7abde4af8599d4af165ee0391d740c2b6607a32663195c21fcf496fe0c67b360","compiler-rt/test/asan/TestCases/Windows/bind_io_completion_callback.cc":"34642e32ff3134259ecad00f3f528030c34e316b6a2251939c6f2c99e000d3bd","compiler-rt/test/asan/TestCases/Windows/bitfield.cc":"3d7f24cc024babdf58212f08ffa165364a5099593191d1d1b7dbb9f36b8d8c0d","compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cc":"95e68a9a5bcf717f8c69323d9d128f89f147dae7d4d4b494ae51ef5b57add33e","compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cc":"64d7eba40b297fc1e730f8057338be207c6410eb77bfac35d25b421766029e18","compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cc":"2e75d50162c5ecdd028c71146589bb1fff979c8543fa2d593283eaf95ab71167","compiler-rt/test/asan/TestCases/Windows/calloc_uaf.cc":"03ec87825af3d690fa5f6b7ab07637d6f4e932a779e29b63bca9e76d70e83c5c","compiler-rt/test/asan/TestCases/Windows/coverage-basic.cc":"3eb1d5b0ff038bb7a940f92c001fef2f49a8dc7316e1d07dc6cded579e9ab046","compiler-rt/test/asan/TestCases/Windows/coverage-dll-stdio.cc":"4cf5c7ecbe1a7532d5375fe512aa397722f56daaa44b28c98eb2eca16f2b7ba4","compiler-rt/test/asan/TestCases/Windows/crash_read_write.cc":"9b85e1a45d61d3606e2c1fea37c3ddfd460a60622d2d1b094dbcbd120310c11f","compiler-rt/test/asan/TestCases/Windows/crt_initializers.cc":"2618d79746f2f32738182cb5f341a7c8f7c8da1fc05a0906b39aa517b3422271","compiler-rt/test/asan/TestCases/Windows/delay_dbghelp.cc":"29933132a43d9c43b40362a07d39ad98bc479a688ab4dd2a6e1267bd4828ea40","compiler-rt/test/asan/TestCases/Windows/demangled_names.cc":"918685c66162399bd933fa46f8e5ab64e9db11d49b5dc80a687a0d8e85c3b9fe","compiler-rt/test/asan/TestCases/Windows/dll_aligned_mallocs.cc":"57745be417016a16c7ef8710ed0ecf588fe2cf98e7043775ea922d235bc428de","compiler-rt/test/asan/TestCases/Windows/dll_allocators_sanity.cc":"4eef4ba3949251d44d8266e590ad532e26db72bafec86bee073ea377054fd98f","compiler-rt/test/asan/TestCases/Windows/dll_and_lib.cc":"39cc337657a27a36147a127151c3a29e84426488d26d37876ff5df043064badf","compiler-rt/test/asan/TestCases/Windows/dll_cerr.cc":"8b5601e6d04e37c2aca5d0bfe57ca7d8271ac124bd97e7110ef3f22b290d028b","compiler-rt/test/asan/TestCases/Windows/dll_control_c.cc":"34b5f1c30e3a9b5c897dd405e66e2beeb19098b30b54490b752cbc7074c7ab94","compiler-rt/test/asan/TestCases/Windows/dll_global_dead_strip.c":"963afe69f43cda480e20cc24bc9bb3a92f668f48bfea561e43d7855de23d43f2","compiler-rt/test/asan/TestCases/Windows/dll_heap_allocation.cc":"734262a896cb8566cb44c2e531377c2fc73898a3c6f0eeb8a3501b6b6e49ff1d","compiler-rt/test/asan/TestCases/Windows/dll_host.cc":"5c3cacafb592811090d45ef1bb434a124fe07faf48cf3dcb329ca9d33d68109b","compiler-rt/test/asan/TestCases/Windows/dll_intercept_memchr.cc":"581b6ccf99676d819260e4c2cd554d21342bfec4ad4c1c21c71984db48b35c58","compiler-rt/test/asan/TestCases/Windows/dll_intercept_memcpy.cc":"9b77cc3cc9a41dbbca3736a3d8f6288b3a7959279d5e7d0be076b6be3a5c29bd","compiler-rt/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cc":"09a9e226a73bbc77e49d28bcdc28eddd9fad4516bc8cfb70d7094fd0e13715fc","compiler-rt/test/asan/TestCases/Windows/dll_intercept_memset.cc":"27748b0604bf39379231b6d7ca8a45a99e200a01aa597548f67aa4c46300719a","compiler-rt/test/asan/TestCases/Windows/dll_intercept_strlen.cc":"e1a929fae28717ea2a079dc6ac14591e667e8cd9db5403e02a3dacb3df945723","compiler-rt/test/asan/TestCases/Windows/dll_large_function.cc":"0398af627a324f79712c37efde98b32e8e6353625734a6bce782508f752c5675","compiler-rt/test/asan/TestCases/Windows/dll_malloc_left_oob.cc":"c4c2d5dbd008b34afea5b277e0da32f40da6bd5bde3a5f043708be430dd0db9f","compiler-rt/test/asan/TestCases/Windows/dll_malloc_uaf.cc":"bbdccbe2fd01016ef89ced3fe8e19a9079b035f0ff3c6d4011075c2b901cc502","compiler-rt/test/asan/TestCases/Windows/dll_noreturn.cc":"273afd9aef20ef62f6994259ae7d4078d5cfc7d1e991472e71929e68668b1a62","compiler-rt/test/asan/TestCases/Windows/dll_null_deref.cc":"a86acadb06b8f1005b2e02a272b2776568d7f27b0aa9823ebc02af0b6c18f931","compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc":"9613d6fe648d623cb1a17cf75f46fd5edd22c69380ff831ebf3036da82215c56","compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc":"92c94358cbb1557fb74657bc50776521fb6b910f9f39870b2e97454a256e69d4","compiler-rt/test/asan/TestCases/Windows/dll_poison_unpoison.cc":"47a946e4df962526b06d7affe7f3e3da7ed319362783c551bbf2d144756efdbc","compiler-rt/test/asan/TestCases/Windows/dll_report_globals_symbolization_at_startup.cc":"20ad7670ec7d6b478b37abb98424a50ee00840a2bcad860ad57e0a552e7127a2","compiler-rt/test/asan/TestCases/Windows/dll_seh.cc":"eda3d5d1620aa235ac09b2c3498daaaf4e5769cd1e258b9243fa8123c88df521","compiler-rt/test/asan/TestCases/Windows/dll_stack_use_after_return.cc":"45966a12120813eb170b669df14fd1faefb1bf802b7afcdec1af4538d07556e7","compiler-rt/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc":"aece7df35aad39042508ff5ad97f2eba5d45166e5c575dc799e7ec6755da354a","compiler-rt/test/asan/TestCases/Windows/double_free.cc":"5a4dc55721620d6394b21785277818ae00d4981a7b5f1625d172fadd73a4535c","compiler-rt/test/asan/TestCases/Windows/double_operator_delete.cc":"05e64ba3f12f0bd6149083b3b5dd9bcbe287c29218c68c0fdc666ad2017a04db","compiler-rt/test/asan/TestCases/Windows/free_hook_realloc.cc":"d00665c6a09b7e585ac9878ad7c1ca55efe63fb3bcecab74263b2eaab4a78bf5","compiler-rt/test/asan/TestCases/Windows/fuse-lld-globals.cc":"ad4ff3ef46c2608f51b1394563a8231e2032812647f372c746917226f00dae56","compiler-rt/test/asan/TestCases/Windows/fuse-lld.cc":"605ccadf4fc23a403d274763e4c6f19bba1ccbdcdd25d6bcf2a559681338fefe","compiler-rt/test/asan/TestCases/Windows/global_const_string.cc":"fe810d0c05551d0c582228b89e3d4ca35992433c982746b52486ce98203444c2","compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cc":"5df748916191496d1b941d5468557d83359876d9fda9e6b67f33b660f26345d5","compiler-rt/test/asan/TestCases/Windows/global_dead_strip.c":"33020f65f4c4f01ba02ab4cc4243baffe249b5847dcd99541096211164d1de2e","compiler-rt/test/asan/TestCases/Windows/hello_world.cc":"49826859a6f0c823640308294e61316c7a622cae80b67554f3c695c85ad1b610","compiler-rt/test/asan/TestCases/Windows/intercept_memcpy.cc":"64349b1215a2a7e0d05aeef18fa21bed7ab683c3650fce0b2b8ae575c68348ac","compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cc":"4af588df1dab46ce51d6308f9715080a8affd10ffacbd1593c3eb67f4837633c","compiler-rt/test/asan/TestCases/Windows/intercept_strlen.cc":"8463799ae98f34b8acd025207f2d6d3d783d5dafed8c8e9c3d5d9caf86a61680","compiler-rt/test/asan/TestCases/Windows/interface_symbols_windows.cc":"726d8ce261d55b1d2ae57b7c71a467d9cf0d8533ffd39774e3474b578be5c189","compiler-rt/test/asan/TestCases/Windows/iostream_sbo.cc":"3485bedd6795f946433046747417550bf185d6e3c89c6cd0923d17f61aad8964","compiler-rt/test/asan/TestCases/Windows/lit.local.cfg":"0e00bb6ddcb858c9d5eeed94923974e2325c1e749efef40aa728a7c76a5f6e93","compiler-rt/test/asan/TestCases/Windows/longjmp.cc":"891e4d3df2dc900d3afda74d51064bb44cb04f54253b4f5e772c664ea2115b2b","compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cc":"148eea538c0504a902f81c1db1ecfa1fffffb16e7a485cb5e17ff22c3dba197a","compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cc":"a5a9716afed7fac2941af1ae9aa46c25c40b06f255d51ef581e7b3d8b6684c00","compiler-rt/test/asan/TestCases/Windows/malloc_uaf.cc":"b211b9570502e13361f52d781fe4d2c82b51823a4f3697fb12857575676ab186","compiler-rt/test/asan/TestCases/Windows/null_deref.cc":"888350f32e6f28d29df5526ddbe7dfb8b5ba6156dae15c68f27967a11b5965ef","compiler-rt/test/asan/TestCases/Windows/null_deref_multiple_dlls.cc":"35affc0ee8f43ddb1bc569b6c7a90d7b34733699216a05e2c2a16f4daecf1b6e","compiler-rt/test/asan/TestCases/Windows/oom.cc":"14007f91c1f2b2564d72a6c75114d107b2f3f07a7ca4f938c6d66fecbae41126","compiler-rt/test/asan/TestCases/Windows/operator_array_new_left_oob.cc":"b14fc10a14540697f7004e6a7f10f6c801fed33d9c4377ace93a9cad686e622d","compiler-rt/test/asan/TestCases/Windows/operator_array_new_right_oob.cc":"cfdd2cfeee07b15fb4bd8ab833f6decb336f92848ad0cc062e306fb295ef8745","compiler-rt/test/asan/TestCases/Windows/operator_array_new_uaf.cc":"08abcf75503a1f7105009f41e0a5d7596dee7194e9d8a548e03d50fc1475ccf6","compiler-rt/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc":"be914cbb665dcbe1d1a528fe175063f805751adc058b6669a96040458a522933","compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc":"f327f00c4d4479f4f01fce9d879d3315b9f311c9ed3605b84fd5432e2b9a4340","compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cc":"1d4c1b9f9ee52974ece79a812674e29099a7bf2c795db1703079cab1ef7988e7","compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cc":"a6187ec59b025df769bb38b88909650cd253797345c5a6bedeb2625c8f402874","compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cc":"3f3c424a8797fe4c47fc9410ca4815608af70beb471f2ee9d3d261eea099fcc7","compiler-rt/test/asan/TestCases/Windows/queue_user_work_item.cc":"55a7c7fb8baa47c6f61e77a766edb94ea7e668ce8e9634767429c08f38bafcdf","compiler-rt/test/asan/TestCases/Windows/queue_user_work_item_report.cc":"ddae83f92d8abac1992409cc37114f3f8985e2d0d44faed6a214464462e014f3","compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cc":"ec3cd36dd9bbe9870a05cdd12f1c10ffc436c441d0319b71731756adb6ad74a9","compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cc":"551a97f2744bbbd0e92530e82e0b506011596eb100d5aa43c937376264be4fb3","compiler-rt/test/asan/TestCases/Windows/realloc_uaf.cc":"672ec658ae69971220a9178a33c6ee320fc7474d2ac7f3adbdb1a686382b2d7e","compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cc":"c320e480f3db137cb74dba2c1d78cdd0c945e22225d8903a37234df2c286d418","compiler-rt/test/asan/TestCases/Windows/report_globals_reload_dll.cc":"13234e7d190afbd41a9fe2c7be9f457dbab470c4051cb7132687f2d8e7b2b007","compiler-rt/test/asan/TestCases/Windows/report_globals_vs_freelibrary.cc":"4b6ff98aac3f33c8abb060cfd95fa1da2005cb17d8e90c62f93b6a56ead4b527","compiler-rt/test/asan/TestCases/Windows/seh.cc":"e72aba1ac868ea82113458e64883c1394e8d31d11cd941a8f98caf0e62862d45","compiler-rt/test/asan/TestCases/Windows/shadow_conflict_32.cc":"2d18adb857efd1295218ec425934888a142eee8290afea0e0f52a827de18fc98","compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cc":"c446ed3054bfb5b2996f27638c36836f8abff0141f2be2be02ca7ae0f9a71ddc","compiler-rt/test/asan/TestCases/Windows/stack_array_left_oob.cc":"52e58241fd7166d8ba7de0dec602436a09f175784a2c2bb0ed9d4287990b7940","compiler-rt/test/asan/TestCases/Windows/stack_array_right_oob.cc":"9d79e18acadf251a920622dbfddbcf8ffc0f5aa5bcc852be37b893138f853fd9","compiler-rt/test/asan/TestCases/Windows/stack_array_sanity.cc":"546a5ddc69aed500449e020714ca3d60dbf87e76af485b7b877c81978f901976","compiler-rt/test/asan/TestCases/Windows/stack_use_after_return.cc":"dfd64205b57cf858ca587100bb200765059d69200a57a35e0e78a88a76afa2e4","compiler-rt/test/asan/TestCases/Windows/symbols_path.cc":"920900bb72661439ddeb8404497f3b1d32a1d064893fb2b7a16f35279d592f5c","compiler-rt/test/asan/TestCases/Windows/thread_simple.cc":"d8ef9055ba68aea4558760399ce82680121565f9aade7be007a240077814f620","compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc":"9a902c8436e3cd7c8c802069935d61e546f5a6f3929d59db5bcb2d04b565c27d","compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc":"0cc17f7483d47465333f43715a64af85618e4a60e466ceb625bfc30e9c787aea","compiler-rt/test/asan/TestCases/Windows/thread_stack_reuse.cc":"cecf894707d31ddb8bd160e730e9ea296f538a9e9eb165ae46eacbd867d4ef5f","compiler-rt/test/asan/TestCases/Windows/thread_stress.cc":"4c467e907120224729793c4722ea8ecf2156ed48120f211c73a8a98b95d85b46","compiler-rt/test/asan/TestCases/Windows/thread_suspended.cc":"c32c14b918c6c8eb0a3535bcda6f5c306dd326ce17dc80782fcacb7c81b228c8","compiler-rt/test/asan/TestCases/Windows/tls_init.cc":"3d4572109ca3aedf9a36e2ddc035edcd46f907997795903b8f6e0cd3d3111a7b","compiler-rt/test/asan/TestCases/Windows/unsymbolized.cc":"a62044491aca2f21795bbfa0120690da0d26624ef3743457409e046e003b9c90","compiler-rt/test/asan/TestCases/Windows/use_after_realloc.cc":"704091b5e795bc5de3a594d4b3bc64770f8f01eba7cb62edc15ffba8be9102ca","compiler-rt/test/asan/TestCases/Windows/use_after_return_linkage.cc":"fc6c4f3aa48f49d0a9b6312e4f6dbe69a69032a98422e5c335829120c28ea8f8","compiler-rt/test/asan/TestCases/Windows/user-exception.cc":"99b912094fd580a0dc56905183b4452c3416c64dd2a0110a7126cd3ac2442e64","compiler-rt/test/asan/TestCases/Windows/windows_h.cc":"021d94947f1c6ccbd512e9c5e58ca1cde3226391cf904d0964d0dad1e6d76978","compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cc":"572e3ecfee1c0ecac6b672e2a90ff0142f72705703e3935d86c63a315b0874a8","compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_stack.cc":"70464720e2ddf591996a49862b74753fd7f8f0edda92b9eeb30b69eea35c298f","compiler-rt/test/asan/TestCases/alloca_big_alignment.cc":"aee396a3bfdb28fb4b29f6fb03c358109aed600df0a6586283419b452434c877","compiler-rt/test/asan/TestCases/alloca_constant_size.cc":"9b49857dda00254a105c1787cbb66c4c923ec0927f9ae1c489e0d59a3a33fd91","compiler-rt/test/asan/TestCases/alloca_detect_custom_size_.cc":"552cd3ca2f24b56d6f417d178d477a939f3f56dbe9ae86ebe24f637e2631e1ca","compiler-rt/test/asan/TestCases/alloca_instruments_all_paddings.cc":"b35a323874705e9eba86253eedbd7f932b9b9419d5e6cbe4f19748279e642bed","compiler-rt/test/asan/TestCases/alloca_loop_unpoisoning.cc":"781e0b357835222d52c780b8684de546a87004f0f784465a2b56d7e0350311d9","compiler-rt/test/asan/TestCases/alloca_overflow_partial.cc":"69091ece9e84a7ecd84d0190de9172b5bd6d513c0475d9da6e4fcf1e1bac4e96","compiler-rt/test/asan/TestCases/alloca_overflow_right.cc":"dce3b72b4ce90bb7f150a6970f504321fd5d4b6a6b6a8cdbec94bc836572f76d","compiler-rt/test/asan/TestCases/alloca_safe_access.cc":"537e32bbe1e58ad4d687382bb79c33aa9f652588c80afcf3e4a0f5b0b5d47297","compiler-rt/test/asan/TestCases/alloca_underflow_left.cc":"62b2fb9cf0419e2a0d0fe740fda2f4b642e4838e5b86a0b4170f3b1b57382227","compiler-rt/test/asan/TestCases/alloca_vla_interact.cc":"0d457bd907d5888bfc3ff639c4b4c5edc31fadec79cc5a029f3a9c2b54f79b1c","compiler-rt/test/asan/TestCases/asan_and_llvm_coverage_test.cc":"e5e7d3d53d55a5e3bfda39cc9a4d77fbb70f140129554a5bd156f726d221c18d","compiler-rt/test/asan/TestCases/asan_options-help.cc":"3e0763f2040b96fd4e5cd33b519b6051043bc84f0d38a1dbc57b54799d32b261","compiler-rt/test/asan/TestCases/atexit_stats.cc":"f8dbcb87a9015792a961cc53c42dcfde21e1757ff1311a4264c1151f639dcb8b","compiler-rt/test/asan/TestCases/atoi_strict.c":"d30e93980c8c57e48d54f7fbdec60164e72a3067a309e271bda228e39d130a99","compiler-rt/test/asan/TestCases/atol_strict.c":"fb477d32198564f0ea0b1346847458ef65428ee78ea316c73386d19562335c6c","compiler-rt/test/asan/TestCases/atoll_strict.c":"781e9304fcafae74e67c2d1cea8cbf2bde7af88ccbb2b6236ac51ca76ffcd076","compiler-rt/test/asan/TestCases/blacklist.cc":"e75ada3c1bde3fff923178c733bb031e024e6cc3ddad479281c4e5a8099585a2","compiler-rt/test/asan/TestCases/calloc-overflow.cc":"17da8a4eaa2aa5f2cbe7213d4cc73c6ad15ebf2e086cd7bcbf41ffb227e6d46d","compiler-rt/test/asan/TestCases/contiguous_container.cc":"b0f94c7dafeb2491c84723e3f1bba42194b0afa4a1081c55ea29134411bca981","compiler-rt/test/asan/TestCases/contiguous_container_crash.cc":"8fced96c20fababb3e84c5a4c73040e87a4c5cac14c48086bca011807ba913a4","compiler-rt/test/asan/TestCases/coverage-and-lsan.cc":"10bf5c8f4adbb9fb111cdcd0250df2e0ba08d3c527eb07f59d48696d5d116370","compiler-rt/test/asan/TestCases/coverage-disabled.cc":"d3f66ab514b2e399ae7c026b8c3a37832222f0faf8e247178748522bd61c9dc4","compiler-rt/test/asan/TestCases/coverage-trace-pc.cc":"97cc6011711bf7743506b105c7314d24a84eebe147722772ebe3a6b8ba648d0e","compiler-rt/test/asan/TestCases/debug_double_free.cc":"45f257e4e2bd21d291e557af81e96b1c4c5b16feb7687c2e8224721f050bb01e","compiler-rt/test/asan/TestCases/debug_locate.cc":"037880af57f1da29caa352fe00419b621d4b96e9bde5e1f612b5c905e1f77525","compiler-rt/test/asan/TestCases/debug_mapping.cc":"f0ecd9f3ba14fec22d65ffb45339c6265cef2b2a579204251d7b5bb513922686","compiler-rt/test/asan/TestCases/debug_ppc64_mapping.cc":"1c6f880682330fdc0d32941a7c72c41248d051e3d51256ae4fcb684efe307deb","compiler-rt/test/asan/TestCases/debug_report.cc":"ccdcfa52600fff9ec698fa7d503de2d401f59b9f9cff90f080c311f53eee3fb5","compiler-rt/test/asan/TestCases/debug_stacks.cc":"6b062e8697114a3d2cc7afb4a5951dd7aaa13a9129191dbc757da57d48824d9e","compiler-rt/test/asan/TestCases/deep_stack_uaf.cc":"169c97ca78884e0a81079a53e197fbb81456bcf9a21aaa475096e97d1ebc01bd","compiler-rt/test/asan/TestCases/deep_tail_call.cc":"e3183c2fe82db4eef6ec4829546dc265973ae9d1d6263daf38dcfd9b121e68a3","compiler-rt/test/asan/TestCases/default_blacklist.cc":"c9a4ba9752bf89ce32465d0d94b6d8e42e8a83bc08aa3372647d13402fb7069c","compiler-rt/test/asan/TestCases/default_options.cc":"d9a1649c932b5a81a73db11267527483c1c841545a29382a09fba13d4007a2fc","compiler-rt/test/asan/TestCases/describe_address.cc":"a4b349104d1539912ee166076b05e0660dbc4c43e6daebb9a17216de74f4d1da","compiler-rt/test/asan/TestCases/double-free.cc":"c10c4c5a63d1f6c4204ea8a913cbe1b43167529c00e6d47fa69499b1c0da948a","compiler-rt/test/asan/TestCases/error_report_callback.cc":"66a23bee070741b1979988f54ac0d1b8fa4b6d482b5f35a91667647ec8050123","compiler-rt/test/asan/TestCases/exitcode.cc":"eadc611a94844fbb5ddc6ea7b4a1edf1ea4e0b7625a839b650c15e7b97456cae","compiler-rt/test/asan/TestCases/force_inline_opt0.cc":"95b2919bb055476b3104632d3e1a983e07d6b3586284b00950886b44ba2b3df8","compiler-rt/test/asan/TestCases/frexp_interceptor.cc":"b3a21dc4d7688a9ee4f35491e90166647775291086f22fcf5d6619a5544f8451","compiler-rt/test/asan/TestCases/global-address.cpp":"544aabd574efedfa08643fe81819c487e87d6d68af3cdd120ad94cde469d393e","compiler-rt/test/asan/TestCases/global-demangle.cc":"68b4548c1080c634d7a9569b127d51dc8f0a326a457441ca3b053141553b2e6a","compiler-rt/test/asan/TestCases/global-location.cc":"3a22fadcd1cd1cb6cc85a6840b5fd80b8bc535c0257602060574128b7957ca19","compiler-rt/test/asan/TestCases/global-overflow.cc":"fc5556983e7b416b410aeb80d5ef151068923686f65c072473c8e004520470cd","compiler-rt/test/asan/TestCases/global-underflow.cc":"1a067205e35548cd811244cde1a8bef7e4d28d762166623b567d4243df02df27","compiler-rt/test/asan/TestCases/halt_on_error-1.c":"2e21671a513ff231696e3d58b499f5e8ae19395763f3a4b185466d206520da5d","compiler-rt/test/asan/TestCases/handle_noreturn_bug.cc":"4dc88e40954ef09b9936482a21203561b14aa511cb5c536f9bd1260607e37a07","compiler-rt/test/asan/TestCases/heap-overflow-large.cc":"a74c53598849b679324cefa630a85c2ee65543db218f14db7578ad846753ff8d","compiler-rt/test/asan/TestCases/heap-overflow.cc":"fa81ff561dd3d7a62bd1a8b5b9384ba9c3a65f645dc815577b85b764bd394833","compiler-rt/test/asan/TestCases/heavy_uar_test.cc":"7755a363e623d5f9a28a4e5092c84e8994948b230da0fa89d51ad26117ed8e49","compiler-rt/test/asan/TestCases/huge_negative_hea_oob.cc":"3fd42949a8e8b4a70dad95804c4acc0705f94f1dce1b2d8e3c884ffc3285208e","compiler-rt/test/asan/TestCases/ill.cc":"dcaa95a9a550570e3284019de49ca32b9d420767262b9077e10d3ca82f5da4cc","compiler-rt/test/asan/TestCases/init-order-atexit.cc":"045b484b630cb3ca87d8f46d634714150d435403b613db30cda57dfd4907baa5","compiler-rt/test/asan/TestCases/initialization-blacklist.cc":"9b83b40ea9591a5ee8916cab7be3e7f941fce785f6a0a97fd2815262ca8c8127","compiler-rt/test/asan/TestCases/initialization-bug.cc":"311344b7a3b71fe39830e0e8296d05e2651c08ea1ad29097fed3e90322fad763","compiler-rt/test/asan/TestCases/initialization-constexpr.cc":"1cb5c12ac4f1f862cdf4319a4192c43b3e719fecf5bd1f294b388e903eb22aa1","compiler-rt/test/asan/TestCases/initialization-nobug.cc":"bbd2781f73483e30c041c95d88c9c75a1e34e455f3be45600d4cd21aba488629","compiler-rt/test/asan/TestCases/inline.cc":"60a029d0d806b7944b2e019b6cced08d2736981f281ce4fa32eb9d1dde5c805f","compiler-rt/test/asan/TestCases/intercept-rethrow-exception.cc":"195a5850da954640568f0316f69a3d224ada0aabb0bedcbe247046527aaca88e","compiler-rt/test/asan/TestCases/interception_failure_test.cc":"f396c575ba4daac7e2a5b9a4bbf622893bd6771e4acff94f268ef5895a6e9369","compiler-rt/test/asan/TestCases/interface_test.cc":"6fc0a60183f7dce0951c191df2dd8d82539d33835e73220051db6cdffec0f75d","compiler-rt/test/asan/TestCases/intra-object-overflow.cc":"fd21b6d96d997c34426aba0b53a9c281ecc2ffe5bee04ee45129da1b0da5e664","compiler-rt/test/asan/TestCases/invalid-free.cc":"f43a10bf89f440fdb412fdd626dd729a0aab3a277347aea7f3ac4096e7f4d6a7","compiler-rt/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc":"cd5259c9a1dc0310508311546ffb187d60c60cfd3c7689795b6ee59d64d36186","compiler-rt/test/asan/TestCases/invalid-pointer-pairs-compare-null.cc":"327945d24e3ff381c43bfc2bb8c88fba8557db4ac2dc76ba77a2b6f8993790e0","compiler-rt/test/asan/TestCases/invalid-pointer-pairs-compare-success.cc":"ebcc297e3b8aa7f918392012148d01c98205339855f5598a0b448c3d5ba7d092","compiler-rt/test/asan/TestCases/invalid-pointer-pairs-subtract-errors.cc":"f968ec76199c7c380cc4fe9c5fc0eb2cea1e7981bf6791364bac5d29fe76715a","compiler-rt/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cc":"65058b186ad702b7cd45a74f0ccc20291115248e6d49ac0b8fcb6805813cac63","compiler-rt/test/asan/TestCases/invalid-pointer-pairs.cc":"6ba49a1ae9d1c54b3e059e962206eecd9fc02443a50d2dbaea8ac9b3f357bd8d","compiler-rt/test/asan/TestCases/large_func_test.cc":"9dcc20cc1a32e1cb0e6e2e6f6c8157120e4e25af105a88c7dc1b8de638cb451a","compiler-rt/test/asan/TestCases/log-path_test.cc":"19d5cad6fb5b9af1bf15b1840aa9bfc6b6905cf988dbf5bc3dbf2958cbf66788","compiler-rt/test/asan/TestCases/longjmp.cc":"5e8cfba11c55b4ab573d49e56e42340b09ebb8777d1bb2d0e211af1178fc40ef","compiler-rt/test/asan/TestCases/lsan_annotations.cc":"92d80d38264e6c13137f0b4f6ca4c353e6788f55f5a57a4d4779dcf1aba6382f","compiler-rt/test/asan/TestCases/malloc-no-intercept.c":"2bbfb848f361910805de489f2b2f9e3ea4ed3dcc202594370fc2c055fad1d83b","compiler-rt/test/asan/TestCases/malloc-size-too-big.cc":"44b36815c7943fcfb357e40bca06e699c45c5450fbc47267dad555842f89cc81","compiler-rt/test/asan/TestCases/malloc_context_size.cc":"ce2fa614a2a6931a5b2218efd82213fdb3e61fcdef89e8fb8066ca32dd9f95c5","compiler-rt/test/asan/TestCases/malloc_fill.cc":"ecd1c350cc7229d788be5f1f07b0113d41a8646719aa2ca55ce93d18c821e992","compiler-rt/test/asan/TestCases/max_redzone.cc":"cfda685a9e2763e0018b72991c858f08086a3b5cb9450e1a9acf09be2d7caa3e","compiler-rt/test/asan/TestCases/memcmp_strict_test.cc":"89e8436c9876cbd8aaec3fcd1c05fae2de670a1cc83367978b136ac5b1e3c188","compiler-rt/test/asan/TestCases/memcmp_test.cc":"1b052c85868611ddc3628e51eb153f7035170cff16acf3ff1cd722dc89efc036","compiler-rt/test/asan/TestCases/memset_test.cc":"e79fb96e1090f5808243ffdb3b0a97ff0178fd3bc4a3591b4cc8c66396cee39b","compiler-rt/test/asan/TestCases/non-executable-pc.cpp":"b74d861981fc2b7fa72bf9edb245d51caece8e5ca59c0bca5fb9607d7ea1263b","compiler-rt/test/asan/TestCases/null_deref.cc":"48f4f80c8d536b6fbfb7e90e150f465a6351faece4d24bd924ec9620a7bb0cc4","compiler-rt/test/asan/TestCases/on_error_callback.cc":"e92640a234bd8520efffd81347a55642b31543174663c6a646824cd03fd32898","compiler-rt/test/asan/TestCases/partial_right.cc":"a589de7476a485e6e0bed6edcc27d683b96976b25563f61d0564e35bf7a79696","compiler-rt/test/asan/TestCases/pass-object-byval.cc":"d7006e6edebbda1216c3f8fc2805ed878eafec6df0c3d0763620d0689ffdc3af","compiler-rt/test/asan/TestCases/pass-struct-byval-uar.cc":"45a89a938d575ac7fab105ea903ecbf1ad9eaa57428c49ea88a889a1705df346","compiler-rt/test/asan/TestCases/pass-struct-byval.cc":"2ad43f75e8b5807ef8828e749070522a817e3182637820778290c6d5c06e0085","compiler-rt/test/asan/TestCases/poison_partial.cc":"6e6ac770d602a6219bfd0b3896c86b0bf309f47cd3bde2d80ea3b677a331fb1b","compiler-rt/test/asan/TestCases/pr33372.cc":"bd21a4a2a3fd7176daa35e5dfc9e4627d8e9de2748baf47426bfc3589944ae19","compiler-rt/test/asan/TestCases/print_summary.cc":"89ca06c561b1b9830a323f7aed8ecb77a789e93b94926f10ba3a57cbed55c9e0","compiler-rt/test/asan/TestCases/printf-1.c":"eee389078b139d3dc20a8d4dcc1786db03c05e08225233361ccdaa0606ef4422","compiler-rt/test/asan/TestCases/printf-2.c":"8d32fe0945439fe6239c5ca92b99dde1c8872bb9735f371143ec02a7de5adac5","compiler-rt/test/asan/TestCases/printf-3.c":"72049cea35113b234c614dabdcf09c315dce717db562ea88005477110241b84e","compiler-rt/test/asan/TestCases/printf-4.c":"a9c048f4f4465504a848e77ded8edbf9fc1406d949fab127726e962fceb0344c","compiler-rt/test/asan/TestCases/printf-5.c":"55a7771c416483d5f72fe69f051b659c4b56fc5d304c97beeba4f2794410b26a","compiler-rt/test/asan/TestCases/printf-m.c":"387a1b9fc524c39a0e970a9e0b3480936593e3b5c36231a8bf7fe8d3a6e7adb9","compiler-rt/test/asan/TestCases/realloc.cc":"1b78b7cafcd8378b85e88083e7b27f7c1c8302eb136b989b8e8c2be4b4a81b4a","compiler-rt/test/asan/TestCases/sanity_check_pure_c.c":"252a96dff10f9ac06e4b7eb828b3d6309b977b4cefe62350fc4bb1c905051c2b","compiler-rt/test/asan/TestCases/scariness_score_test.cc":"909c5df808ad69070d70f4ea0833731aba34628025625541051ef4a681057fdd","compiler-rt/test/asan/TestCases/set_shadow_test.c":"2ab88e2829d998d77067cac25f7495abe8bc0ca81bfbadbe60f7e4cbca3c8556","compiler-rt/test/asan/TestCases/sleep_after_init.c":"1c022e69a0f2a6010bb8fd21120563f1a76302a07cb6fb919b5d69750e17c59b","compiler-rt/test/asan/TestCases/sleep_before_dying.c":"42f1b548e2ce5d7fb2de0d34d2f43032e221a98ea6182dfb1353f9fce2a4cf6a","compiler-rt/test/asan/TestCases/small_memcpy_test.cc":"8c50c62a92a2d9ad210ee9cc7cb30708c08e97775b545b35618a339538b571e2","compiler-rt/test/asan/TestCases/speculative_load.cc":"56c0562e921e7ef366125a0a2b65521b802d6195faa4cefb99db94a384bbb74f","compiler-rt/test/asan/TestCases/speculative_load2.cc":"d37a67574df3b5ababa38cb5038af7e6c9f652371677674abfe79a761903139b","compiler-rt/test/asan/TestCases/stack-buffer-overflow-with-position.cc":"7cdfab70de98fefef0464486a4c81b5719b178c5ad65bd06c581f4437f9be4f7","compiler-rt/test/asan/TestCases/stack-buffer-overflow.cc":"e2d5365720ecd82088f9a616b05cf7a9a15eefbaabdc9f3590b4716b274bdd31","compiler-rt/test/asan/TestCases/stack-frame-demangle.cc":"ef0e857dcf1fe90b11352eac828e90089545d0aa5bba0386883f88026a7546d1","compiler-rt/test/asan/TestCases/stack-oob-frames.cc":"5509eed3e07d55388bb741b128cec309208f91f4aee678a9c54a67b04fce4122","compiler-rt/test/asan/TestCases/strcasestr-1.c":"6a2298cca2cd6782f3ceced62015d994b3ec3215d359c12bd86a08787f03d615","compiler-rt/test/asan/TestCases/strcasestr-2.c":"016cf9f6eb09ad742cf03ac92f84569eb5003c9ce9f4f038fd806192cbbe8481","compiler-rt/test/asan/TestCases/strcasestr_strict.c":"d655e9e3b9dcf253d294c23ac61af12f431f5852588e72aeb19b78b80c065cb1","compiler-rt/test/asan/TestCases/strcat-overlap.cc":"fcda5d5d023c83aa806693fd03c9c68793973b5d20d9798c7a7217be00b12265","compiler-rt/test/asan/TestCases/strcat_strict.c":"34b14df26fda2a6b88b874074309b8fd49dab23e2eee96f43123d31003498706","compiler-rt/test/asan/TestCases/strchr_strict.c":"e2c99dbd4a9483069a1f7ed19bef4cbc107c585f75fa478caf673745e23ae6ca","compiler-rt/test/asan/TestCases/strcmp_strict.c":"7f80c53c59d36512b3a6fe3013c935115656ebf859da80abe8be5edb7957d8c7","compiler-rt/test/asan/TestCases/strcpy-overlap.cc":"0149f63e748b1257cf6e82a8a653ded28828d9207f3fa656e87834c86181f875","compiler-rt/test/asan/TestCases/strcspn-1.c":"2f2a1b008841f7990ff2925c50639c3b32bef44c91fa9fc152b52f754767bedb","compiler-rt/test/asan/TestCases/strcspn-2.c":"b285dbe5e521a85bbbeb23dbdacf282885e8805c7cfcf9e885a41e346bf2b4ad","compiler-rt/test/asan/TestCases/strcspn_strict.c":"d7d9b770588e0edb67132cdc80f73a5cdbc8eaccf2242e9542366fe25593b9fa","compiler-rt/test/asan/TestCases/strdup_oob_test.cc":"ae251ff34d69490376909f411fa607e5a1328d181730c7b047a8ab896beb28cd","compiler-rt/test/asan/TestCases/strip_path_prefix.c":"934df07ad5497f38a8aec112d7abf94ffea4349b58745c62dc681d4e7839540c","compiler-rt/test/asan/TestCases/strncasecmp_strict.c":"46d32c3076e1aa3cb2b7182895ac6b841a47fcd9e495ce097a43df1810243f0c","compiler-rt/test/asan/TestCases/strncat-overlap.cc":"283184d57b5fb5fe070a1550d8a4cae76d34b0ad51b234b7d4fa0b940feed756","compiler-rt/test/asan/TestCases/strncat_strict.c":"dd7d3a7c4387e71adaf38851b7efd4803c970a62adcd3a3ff1b1cdec87c75419","compiler-rt/test/asan/TestCases/strncmp_strict.c":"3422859b98130126e4166b1ab3df38168c8160e3301aec1f6503096b9ce53e12","compiler-rt/test/asan/TestCases/strncpy-overflow.cc":"9bb987646cdffc128981e3ed2d64f2b8167d6058bd8be6918ff0a9a7c01df708","compiler-rt/test/asan/TestCases/strncpy-overlap.cc":"947c77a6e0056d2114938a165c414b3c8249a80efae805a98d9d5a60496c58c4","compiler-rt/test/asan/TestCases/strpbrk-1.c":"2672e3903f269c7285404a1a7ece39626238ecd6ae417af0cd3794f4d1e61d44","compiler-rt/test/asan/TestCases/strpbrk-2.c":"17373065ba33a993a2266fa904a07393cff9f1693dd1229ece36d54bf6e0b9d1","compiler-rt/test/asan/TestCases/strpbrk_strict.c":"8ab08b4625890da781184add5361a371e53953b4f7460c3abbfe7c4e4fa43d87","compiler-rt/test/asan/TestCases/strspn-1.c":"1c9f3eaccd68e70a451e62d2a92205abb0a38d582fac12c2aab03bb17817f08f","compiler-rt/test/asan/TestCases/strspn-2.c":"3112555c59801c1aa5f1fc76af2902109c3bcd88ed7447dfcd1284bef7a8b3a2","compiler-rt/test/asan/TestCases/strspn_strict.c":"ac7d3f5d7638f82281329525fb856c3861a4fb604b8317b451321524bcb974c9","compiler-rt/test/asan/TestCases/strstr-1.c":"985006146a888caed243a8af3bb9b01513f122bb56d478f51b21d2e996da26af","compiler-rt/test/asan/TestCases/strstr-2.c":"f166fd2ba9008765501d6c7188551dbfc0ffa493b0ca0366206ddd835a063bde","compiler-rt/test/asan/TestCases/strstr_strict.c":"af98d756c33274436bc5141669349325ec907ef1d3af658bd7724256a9385dca","compiler-rt/test/asan/TestCases/strtok.c":"45778984c7d4a18df35122add7bb078c0d8f00b2f15e1db422ad80df60efdf9d","compiler-rt/test/asan/TestCases/strtol_strict.c":"a6d458fa5b7808509c81f6cab2e3865b6ec1ad9958c2439c708dda7423e994d0","compiler-rt/test/asan/TestCases/strtoll_strict.c":"b1c6164bdec42990723b5027b0205426b6e3a3a74c4c8de0f51c64ca60f07ed2","compiler-rt/test/asan/TestCases/suppressions-exec-relative-location.cc":"471d256632656c0fb51a908a5558da46830f66ebaddd94d13fde5c72ca661061","compiler-rt/test/asan/TestCases/suppressions-function.cc":"6e0ff85ac55bc8c9c538c1c79079145a177c2d5b8de098cd1769e03d13a4c93b","compiler-rt/test/asan/TestCases/suppressions-interceptor.cc":"5f35d44b7125fffd4614d789c5bcad69ab33189304e64aefb18ab9f319c0f80f","compiler-rt/test/asan/TestCases/suppressions-library.cc":"8f7612533d66d9a7b505c2be48be94f5fe371aa04ac69cb1b53ad038773da969","compiler-rt/test/asan/TestCases/throw_call_test.cc":"f2038c524066104f8f32d73c0cde887ad2b19a41f19be27cef880e51a2f3ade9","compiler-rt/test/asan/TestCases/throw_catch.cc":"41ee4d22210ada1616feadb5c2db227121a1d065dbaab4c46ee94c5329c77d52","compiler-rt/test/asan/TestCases/throw_invoke_test.cc":"f4fea58e48d56b9d7f749d10bb1852ae53168e5cc0d452e0d41149f686670032","compiler-rt/test/asan/TestCases/time_interceptor.cc":"7c1129bc997cb0f05e27281eee63e9128df75ed40865c38d47b7f8c1b235710f","compiler-rt/test/asan/TestCases/uar_and_exceptions.cc":"585dec2fa2f14283f0d1b12273a5ccf67cc318facd858b3df8805796fd3d84fb","compiler-rt/test/asan/TestCases/unaligned_loads_and_stores.cc":"b4c8247362dbea4da4556411edc560f0add60f38b157fad27413f73382493cbf","compiler-rt/test/asan/TestCases/use-after-delete.cc":"4d7556c43ca1b28467788a7823e1a05a0c35e13496001eb43b10faf764b43a6f","compiler-rt/test/asan/TestCases/use-after-free-right.cc":"1cfe01c6b10b5c230b66d1d24a14c69c2345c52f11efcd88aacc3c47131d18fc","compiler-rt/test/asan/TestCases/use-after-free.cc":"1f86661c506646d77088b19cab0adc2f7fc8188f3535ed93acd1aefc7c17e25a","compiler-rt/test/asan/TestCases/use-after-poison.cc":"ee1cd5540a7790a25e1f58f1b67bc4e6b0894ea22d4f708770b4ce9af326e9b3","compiler-rt/test/asan/TestCases/use-after-scope-capture.cc":"109ffeab2657df3e2d31d363ca439dd9a71c833fc4b19bcf421b0a9d2d0db565","compiler-rt/test/asan/TestCases/use-after-scope-conversion.cc":"a9cda4c7f0f147b76df4e4fc38b934c14a5276dd881b9662f8dafe71a20e7120","compiler-rt/test/asan/TestCases/use-after-scope-dtor-order.cc":"5ad008a769c9d79aace316cdaa379624ad0ca87dc16b334197746b85723620d5","compiler-rt/test/asan/TestCases/use-after-scope-goto.cc":"3f2acb4ba3580c26b642c005e22067d8c81d5960f498ee07d578ac86a199f06b","compiler-rt/test/asan/TestCases/use-after-scope-if.cc":"eeb3ff961927aa1e4df3910a118f7d10209565378b6bbfdc8eaf3672097fdcd6","compiler-rt/test/asan/TestCases/use-after-scope-inlined.cc":"2e33e938bbf12950ccc1e34494058df740c8ddc7e594d8301eb47fe61adf95b8","compiler-rt/test/asan/TestCases/use-after-scope-loop-bug.cc":"4f3a0189659a4f7926358a2c1a980c9db439811b216be0bda88385435b5d3b6a","compiler-rt/test/asan/TestCases/use-after-scope-loop-removed.cc":"767379a791cf671806be1c393cd664ff73f6373619ef7543bb60463d5da17ef5","compiler-rt/test/asan/TestCases/use-after-scope-loop.cc":"69a7b129bd930f4c6260e28c0633e99e8deaa624af6f32fd2952c1320ed17d10","compiler-rt/test/asan/TestCases/use-after-scope-nobug.cc":"3819177ad782485bc6330714f1ebafa6315877ff588833a615f63b4ada21201d","compiler-rt/test/asan/TestCases/use-after-scope-temp.cc":"d994457f94652d6dcbd2080b17720ceeec11a5307eccb0b81df1f19ea542cc43","compiler-rt/test/asan/TestCases/use-after-scope-temp2.cc":"40561a33679184baa7f6243db9929f30468b33464a5ed965f42065e619682352","compiler-rt/test/asan/TestCases/use-after-scope-types.cc":"c2897266c9611b255c27f4bb43a5aa50bc38fdb09382890b6240943c3fea300a","compiler-rt/test/asan/TestCases/use-after-scope.cc":"249d7c13941dcad62b10a62c24464b3737f73f791bdbf5a5197e8197a3cb2a04","compiler-rt/test/asan/TestCases/verbose-log-path_test.cc":"60d955be71dec23a4d40174c90e2ef4ccbd19b8f773a685fa54554ae4789df8e","compiler-rt/test/asan/TestCases/vla_chrome_testcase.cc":"a4e138ac2ec8da5be7721d650c1aead473991e88a8831d30e81f73ca7f01562f","compiler-rt/test/asan/TestCases/vla_condition_overflow.cc":"4983d0412b741725bb53cff25e4d4b49c88205ec401b81eafad93ac93f19ec1a","compiler-rt/test/asan/TestCases/vla_loop_overfow.cc":"2e4ae3fd0495d204bed2c18f00c647dfb10a28dbc8703d0c5142d3d4c08970f3","compiler-rt/test/asan/TestCases/zero_page_pc.cc":"29ba63c0822ae2955a03a48aa9b005f6bbcb0bf2e0da8636034b93eefa407c70","compiler-rt/test/asan/Unit/lit.site.cfg.in":"df2fc7d9d132df7fb3ce7b51ddd901959b7c0b4a4f420b4a64c8974d2c4790f6","compiler-rt/test/asan/lit.cfg":"726ca9c8560d4593a1f8f39d4a2f515ae99e5d7dbc1e57942100b82c7bde8cfc","compiler-rt/test/asan/lit.site.cfg.in":"d84b151df27a85b805d58f973485f699809561aa8bc90f6935b042ee5e5edb2f","compiler-rt/test/builtins/CMakeLists.txt":"11451c8003bbf6c369607b8540c3f3c8f4e01045ead0c1231610ea051b24a42f","compiler-rt/test/builtins/TestCases/Darwin/lit.local.cfg":"67ea8448cf3507eda12a63f0981890bfcb7959532eab5a4c303900daa5788a30","compiler-rt/test/builtins/TestCases/Darwin/os_version_check_test.c":"df24897921d0a618b1e6f8a8223d254030af1abf0ca4bf1b24e6c760dcbeb261","compiler-rt/test/builtins/TestCases/Darwin/os_version_check_test_no_core_foundation.c":"acd5f2e9a9622f7833bfa4d98f3fb101eed7ba3e9369ca99ae68cb69354839ef","compiler-rt/test/builtins/Unit/absvdi2_test.c":"4a7cb95fb454aad7272674faebf85c54d4d8eab667b1d3e73846459db818bbfb","compiler-rt/test/builtins/Unit/absvsi2_test.c":"465c01274e5dbc1dd0888cb678359fe3c9934870164e6703dcb01c3004772431","compiler-rt/test/builtins/Unit/absvti2_test.c":"a742ae3fe9fabbc92d3e6441cd5f1e52fb665739f591805b9bb821ada5fd31ee","compiler-rt/test/builtins/Unit/adddf3vfp_test.c":"8981e6fba6392a6c3e1489b5c169874abf21c52abe5953a02e43a8aa68452e27","compiler-rt/test/builtins/Unit/addsf3vfp_test.c":"89b6c18160bf7b09e0ff078f8914796ebd63b11af1fb4cd8e0b1521655a20be5","compiler-rt/test/builtins/Unit/addtf3_test.c":"d32fcb6c5209366f9481ec75a92928b7fe9ff8d5350a9615ef8201ff48622b30","compiler-rt/test/builtins/Unit/addvdi3_test.c":"6b38bd7318eef6c73cf6870db8ad93a74924db2f47965982632909427b97415b","compiler-rt/test/builtins/Unit/addvsi3_test.c":"c71efcf1eccb6490f1efb8a52928e1151ac356de83faff2630aecfb6a1fe9d37","compiler-rt/test/builtins/Unit/addvti3_test.c":"dbecebb55a3950e2532f33fba25b55633fa1b8facfb46ea1f828dde0eb4c6f57","compiler-rt/test/builtins/Unit/arm/aeabi_cdcmpeq_test.c":"b61d7a744a6bc03fd83eb808ad7f014b836e2002ba575fec22d1c6af404ec27d","compiler-rt/test/builtins/Unit/arm/aeabi_cdcmple_test.c":"db1cb8f4207ef4707ae23ceaa5d4e779e49b08aee8749d99a2d24531e1226721","compiler-rt/test/builtins/Unit/arm/aeabi_cfcmpeq_test.c":"c42b303a031d053c3a8e17053942053f803a7af726bd7b36267bd25d9ef30c43","compiler-rt/test/builtins/Unit/arm/aeabi_cfcmple_test.c":"202f0ac47cba8cbe46ec997e196808541f727505f8a9b6fd5faa701af099ce21","compiler-rt/test/builtins/Unit/arm/aeabi_drsub_test.c":"49d4090a32a53c6ddebe6e98cc3e46614a9915a57fda2ca44e28f913dd61fa2e","compiler-rt/test/builtins/Unit/arm/aeabi_frsub_test.c":"3cadb89a40101d136305e4b61e4341544ea05e8f5999bb3a0a7d95796708027f","compiler-rt/test/builtins/Unit/arm/aeabi_idivmod_test.c":"70a15ff947bc591d58d19a821f1407153c903c975de7529db41f13fc38b0931a","compiler-rt/test/builtins/Unit/arm/aeabi_uidivmod_test.c":"24b160ca82f911064e4a88657b7ddd7369f305ed389c105dd87cf024c4fbb13a","compiler-rt/test/builtins/Unit/arm/aeabi_uldivmod_test.c":"af1978a456417810fe4b9d29e0a51cd82c7805f3264b27e028ae6411f456d523","compiler-rt/test/builtins/Unit/arm/call_apsr.S":"e6826483bedcf2123bc44ab385676fc0bb05c539f0084c495c8653a4181a21b0","compiler-rt/test/builtins/Unit/arm/call_apsr.h":"a8209b717e20d065b00100e81cc30f00569cd135e1b0e9f8bd2cee554b937038","compiler-rt/test/builtins/Unit/ashldi3_test.c":"2b9145f3971e767f381e4fb7f6a53b832968939edd06f0e909534ebbb6da6769","compiler-rt/test/builtins/Unit/ashlti3_test.c":"82755aa9914be3aaf18db56780fef123891d0b53469ccb3ef67381ef7121a6fa","compiler-rt/test/builtins/Unit/ashrdi3_test.c":"fc2085b5cc04f45fda1bdb3881721a2aac1ecaa8d45f5531b1cb683019079b3b","compiler-rt/test/builtins/Unit/ashrti3_test.c":"3241785a1d107f6fe5524695dc63c1d53ef6d8b4f9dbfaeffcc9e27c4bf9443f","compiler-rt/test/builtins/Unit/bswapdi2_test.c":"c0b7166d35e6249384e263c85b89214d5a08d590d6c3645fa51ba5f82bfcdb2e","compiler-rt/test/builtins/Unit/bswapsi2_test.c":"a0f99c0cc8434031111fcd093db52612e2a59635275ee3dd75cd8f081fd643d9","compiler-rt/test/builtins/Unit/clear_cache_test.c":"f668b21140a34c0dbfec37f0c42290636698b7c6ea469fa38d06fa5e7fb23319","compiler-rt/test/builtins/Unit/clzdi2_test.c":"d109f01354d384ce6a6276076bf9216fa0f41ca88b398db8f65a446649e55836","compiler-rt/test/builtins/Unit/clzsi2_test.c":"3e11f2a796c975c936e00ef013ca1e2892c1935daa632f3deac57650b6bd7dc7","compiler-rt/test/builtins/Unit/clzti2_test.c":"5f745c8a0846a5d7acf5a9e8e622b9a78ce1b5ac371c17ecd22b8ab146685f14","compiler-rt/test/builtins/Unit/cmpdi2_test.c":"48fc7aa7e4e4e25ff108dcff1f3e401eae0be2e18b1e7109e19db6d87c6d08e6","compiler-rt/test/builtins/Unit/cmpti2_test.c":"d3012d3b38a40e390aafd8f6251fb3f5ce1b50f1b362611f6a10131c4307fab7","compiler-rt/test/builtins/Unit/comparedf2_test.c":"96685b2a68fab0276bc94a078a2f42a18368d06655b818e5ddfead2e8fdd85ae","compiler-rt/test/builtins/Unit/comparesf2_test.c":"9d437d1d1145fa34e661dace492f7e81c4eec3861c3317ada7bf2da43765d1fd","compiler-rt/test/builtins/Unit/compiler_rt_logb_test.c":"f8a77440272f9302046560fedd3f435e1b7321d3accd6ec5f9e5cbc1b238ee65","compiler-rt/test/builtins/Unit/compiler_rt_logbf_test.c":"180931a90b5af5186e9334f581ccc8a751550d34c62dd0ace30ca18a850e229d","compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c":"0622c136b53c777cb25ec910b7da8b30a59657375c84274e7b076fe5d6543b44","compiler-rt/test/builtins/Unit/cpu_model_test.c":"0dd326d1fdd87e773deb7152f8b6dfe45c39f87978cf9fbc4a3e0827329fb0f7","compiler-rt/test/builtins/Unit/ctzdi2_test.c":"9039bca0396395cc2034ef8f989fea0cd2c8c0409fb827d55372973768518491","compiler-rt/test/builtins/Unit/ctzsi2_test.c":"04be83262a16716bfbba552fcd38f5a412621c7d5803bfd44491bfbdb43ff815","compiler-rt/test/builtins/Unit/ctzti2_test.c":"1660de345c93c8623850e5c1b233d97ef7ffa65f53c54c5a154934faa10f5b82","compiler-rt/test/builtins/Unit/divdc3_test.c":"fd72176489d556dabda64eebb5819e6d5461e605ef7e8dfe1a440d3e54fde388","compiler-rt/test/builtins/Unit/divdf3vfp_test.c":"dd2994fbe24c6a7f155562f5482b30e90461fa4bd88b0f3ced9fd4a0d14644c6","compiler-rt/test/builtins/Unit/divdi3_test.c":"a8d8840c52d0e3e94f0fae14cf82c239db72408d3dab848fccf313150275d8c4","compiler-rt/test/builtins/Unit/divmodsi4_test.c":"7052d9fbdf19d2d0056e65512f685aaee4d0aa2f0f92c00cd5bea973ea500639","compiler-rt/test/builtins/Unit/divsc3_test.c":"db924819947d32891d168bbc0f489bb532cfa9caa5899392b866a9a314b72f8e","compiler-rt/test/builtins/Unit/divsf3vfp_test.c":"18d52cb897542fb9dadee0dddcecdd194b783e49818763fe90de2be06a3ff0fe","compiler-rt/test/builtins/Unit/divsi3_test.c":"555e823e9213ef45042a8f2977734dd759ca8992f12731833ade5c22cb558138","compiler-rt/test/builtins/Unit/divtc3_test.c":"ad70113d70de3f50463db58c1997b853d798f7d18c56dc5bdfc5d1c175624fb0","compiler-rt/test/builtins/Unit/divtf3_test.c":"add463234dddfc66299cca49ad1d791b3715a19fec3959a30ed9393b0c4b3ebc","compiler-rt/test/builtins/Unit/divti3_test.c":"d388ded34aa60148e9a312142209c8b35d93cbbaad85daa2dcecd959ce1dbd4b","compiler-rt/test/builtins/Unit/divxc3_test.c":"baa38febe5ea3fed9b1ff2f9115c6082d3f7777db65878b1f3eaaca2863b2ec9","compiler-rt/test/builtins/Unit/enable_execute_stack_test.c":"f5f21cb2c961da7133dc30cfc8f1f1a270ad7107bf67672f9163030aa7eea2d2","compiler-rt/test/builtins/Unit/endianness.h":"c1432312da43df1076b2799433e97aa2edb08d3cc56bbd5028389e1ce70e35fa","compiler-rt/test/builtins/Unit/eqdf2vfp_test.c":"8865ff90a0ff8dba775a0898b82988277e1b1272b942eae934f5d82a7dddc6c3","compiler-rt/test/builtins/Unit/eqsf2vfp_test.c":"a9fa8c054e0d420a5f981fed5695a94b29b3f2bcf2437c4f2626503d82261c56","compiler-rt/test/builtins/Unit/eqtf2_test.c":"248c31b09f3bff9f545d3e8dd84cadc970ae039878704f62d82c5897f9f1c126","compiler-rt/test/builtins/Unit/extebdsfdf2vfp_test.c":"5918807eccff0354583059168727a1e1e04003433d5b5824d910386a9903e0ed","compiler-rt/test/builtins/Unit/extenddftf2_test.c":"49d70f3af1e27ab6f2aa3bd3c437a6406d337f17ba073850190012eafb56c87b","compiler-rt/test/builtins/Unit/extendhfsf2_test.c":"1574830122d5bb8044396a837023753dcc52c28be7d44486f034fc821fb96078","compiler-rt/test/builtins/Unit/extendsftf2_test.c":"0e9a671e949449e3c3e3be5e36f909b6992dbdf1c492632ac7f627054f175a0c","compiler-rt/test/builtins/Unit/ffsdi2_test.c":"57539faedd86a5960c75980d0e132a9645307297e47f22238f3822027f1ed2df","compiler-rt/test/builtins/Unit/ffssi2_test.c":"24a52e426a550cffcd2f79c93d9f29603aed3eb4f10f37b67c831d1617ec29b0","compiler-rt/test/builtins/Unit/ffsti2_test.c":"87e914df294833c211784cc9ac2bdce7ba25378579cf222713fa17d9610bf24d","compiler-rt/test/builtins/Unit/fixdfdi_test.c":"fd5cbcc3f47519a5e7f0a1e2331bf78069c6f5443d90c228f80dcef61a7bf012","compiler-rt/test/builtins/Unit/fixdfsivfp_test.c":"488cd6e77c476bbba05066e1b07f4df389955019c839668aa2dbb7040cc591b7","compiler-rt/test/builtins/Unit/fixdfti_test.c":"d6ea4395bba47ebcd2f6157fce8ca2a1172c41a90b3c6ed70026582a8299c861","compiler-rt/test/builtins/Unit/fixsfdi_test.c":"9028baa845bab8ee411c40a7f3e1cf6ab6cc37c16312eddac7fa953f2b086be5","compiler-rt/test/builtins/Unit/fixsfsivfp_test.c":"5a1621ba3c85705dd9b2b5a16fa9c436b2337ffd170f70bc5a2f2da4f37edb2c","compiler-rt/test/builtins/Unit/fixsfti_test.c":"c1d90b78057e5b5df66d13bffe4414347511084a2eb2aaefb6eb5f6ae3da4939","compiler-rt/test/builtins/Unit/fixtfdi_test.c":"43f58ea4f5d87bcdddf8dfb1a956eb446337c8a2ea08b4de1d738e46db4faaa5","compiler-rt/test/builtins/Unit/fixtfsi_test.c":"f01a61f575efda8d0c7e8c2725f65805d5e4821140505886755306ec45979afc","compiler-rt/test/builtins/Unit/fixtfti_test.c":"79ddc0158cc859a213011cb917909f42af401b74beb17a5f5bc944431f73e28b","compiler-rt/test/builtins/Unit/fixunsdfdi_test.c":"af3f26e24d589d193ee2f344d4bd04052379a77ed5d0ba016b68136294dc62ea","compiler-rt/test/builtins/Unit/fixunsdfsi_test.c":"77a44169011a89dda0a225c51e7dda1458ee67b137b6c03c233cea3e967ec212","compiler-rt/test/builtins/Unit/fixunsdfsivfp_test.c":"bca9e6bf957fcb90e9e4e9b5e0ae9d2cefe8435ffb251fef25b46da80ccb6fde","compiler-rt/test/builtins/Unit/fixunsdfti_test.c":"19e091a81508a54f074892aa9863ddbc8d8924a69da4df573d6cd9365be66f98","compiler-rt/test/builtins/Unit/fixunssfdi_test.c":"52465d378e20faac73574ae2f55af45184f056897adb2fbe0e1bde1e6dfc5597","compiler-rt/test/builtins/Unit/fixunssfsi_test.c":"30541edd85ed20d2d0bd2bcb467c14b74cbe0fa34feaa556d3809b6d54bb54d2","compiler-rt/test/builtins/Unit/fixunssfsivfp_test.c":"4568104fde495bdc577725e31b77e3e2db90bba3efbcecfd2cc2d1d599e252f9","compiler-rt/test/builtins/Unit/fixunssfti_test.c":"fbdcae0367cb197673aaf20fe4a4d036c5b9a8ca571f3b67237460562d4b0c14","compiler-rt/test/builtins/Unit/fixunstfdi_test.c":"b8b31d5e6f1b68555cb8af984f43f3cb78b91f9f444833d9d9782a18f4e94e76","compiler-rt/test/builtins/Unit/fixunstfsi_test.c":"232230eee1d12b0b2bf6c3543a88b511f31f0cbbcc9526c0bf4bdaeb8e3b513c","compiler-rt/test/builtins/Unit/fixunstfti_test.c":"962bad7a53e4fef9b6b2795450ddc37887bc66148a4026113ddbc39f29567cfa","compiler-rt/test/builtins/Unit/fixunsxfdi_test.c":"12d32d3ce0cc391d1ab438ae8118076a9f8e6b03bb29c5130d081edff56f36f6","compiler-rt/test/builtins/Unit/fixunsxfsi_test.c":"90a45f2d16f438fccdb6f8eadc43c2018d63bc745b10a18a4e2c4d48d426bf3d","compiler-rt/test/builtins/Unit/fixunsxfti_test.c":"a6151a81e4c0d388544c6818c2444270692fc1bbe3324eaaa9f34d4ac0438bf8","compiler-rt/test/builtins/Unit/fixxfdi_test.c":"dde85ac0b8ddee357287d85e3ffc510cf8f3e21c83f85c2370c3b8cf1cdb8edf","compiler-rt/test/builtins/Unit/fixxfti_test.c":"e3c1b75c7deb7f325bd6f20c771b0222fbf4c13865f5160677fec99747fd07fd","compiler-rt/test/builtins/Unit/floatdidf_test.c":"e03748405b7e7717f8636225b0af389e51ebff18754cd54ce4f5f2db9d32f760","compiler-rt/test/builtins/Unit/floatdisf_test.c":"a312430c0756c65dfc8105249ca9f65f47cfbd058e207162ec5693524eaca8ab","compiler-rt/test/builtins/Unit/floatditf_test.c":"9376b9d89b28bffceb4a00564193ab1ef2c563c7385c97f62b4ff2447ff13c9a","compiler-rt/test/builtins/Unit/floatdixf_test.c":"b0d52aec7c6b978b1f36d3526f983dd7e6ad2d818237156a2400d5bd6d8b72c7","compiler-rt/test/builtins/Unit/floatsidfvfp_test.c":"1e72ea7269a0d9f287c6a1a478bb7f83199a34ee4dbd4892606e3271464f91b4","compiler-rt/test/builtins/Unit/floatsisfvfp_test.c":"d76dcee068b1cf42d6f0fb000f458ca279ad32d0bb3d6364662ee1ef263a82a5","compiler-rt/test/builtins/Unit/floatsitf_test.c":"2d654d2ada9fca0606ac3cd872f212f5cba03617a6875baa0243fdf5536cafe5","compiler-rt/test/builtins/Unit/floattidf_test.c":"8d55d035f7fa41a6c343ee1e747d009e289fedbf483efd0ac9cbeeffbf0dd954","compiler-rt/test/builtins/Unit/floattisf_test.c":"65ccebf9a946eea4685b5caa4cc5b80c8c1124f7c3a09cc99ff1c489afa98c4e","compiler-rt/test/builtins/Unit/floattitf_test.c":"332faeb316f06fa401933cc564307ba566281044e0918c73a2756b2de51413fa","compiler-rt/test/builtins/Unit/floattixf_test.c":"822e5438f111e988b03ebe043ef8431c77b18b58c406961f9b9c8256f72fe885","compiler-rt/test/builtins/Unit/floatundidf_test.c":"92adfacaa85d95d24150f0d10c3d8bf90ceeb260a13601ecae00f693279c02ef","compiler-rt/test/builtins/Unit/floatundisf_test.c":"f8387bbd7dadf8eb326ee939d26b385507495b6ab5d8b4dda1efb801fd7a6adc","compiler-rt/test/builtins/Unit/floatunditf_test.c":"6c804c49efb42511695210af934392da321a146655742c0ce99b8e8a97de24a0","compiler-rt/test/builtins/Unit/floatundixf_test.c":"18a64fc512ebd5d4d10a546b5d5b5d19a0e1cd3895c6850388b9493568ec2a43","compiler-rt/test/builtins/Unit/floatunsitf_test.c":"9f4243cb2e493293ff5d4065b5f29b11e1a9f197c1368619362660e1ea01bd7f","compiler-rt/test/builtins/Unit/floatunssidfvfp_test.c":"544d47fb14cebc4d28a3c7a971fcca6b654cbf39d4334b2e8e8ea51f5f6d0041","compiler-rt/test/builtins/Unit/floatunssisfvfp_test.c":"4fe7dc66585295392f9cd654782388162a2574a78358c7a7dc60a99ee181f18e","compiler-rt/test/builtins/Unit/floatuntidf_test.c":"022c1a60df76ab6d33a959813648af3cb4cd93430e054b6bcf8859ae55f72e8c","compiler-rt/test/builtins/Unit/floatuntisf_test.c":"4c04506ce8282f9c21cefe905729ef3cbb0c7914a39b3228c5fa29f4732d83ae","compiler-rt/test/builtins/Unit/floatuntitf_test.c":"6ada58e57d440677fcd3ffb1e3d383b390f96b1f81f2259bdc9060039717d8f1","compiler-rt/test/builtins/Unit/floatuntixf_test.c":"cd5f5943681a5b2faacfe554c2c70f10bcf02e5e8896da45a31e9a1d85645208","compiler-rt/test/builtins/Unit/fp_test.h":"e4a4f834c8396a65a9d63688c426f4c446345c60ce3d1e37ae2be337e864a8c1","compiler-rt/test/builtins/Unit/gcc_personality_test.c":"68f6e3218fc9c4912d7330ae21a797fc64da907b95b4182afd77c04e4136c496","compiler-rt/test/builtins/Unit/gcc_personality_test_helper.cxx":"9dba7502677f38249195f50f64d7a87012436b3b5cde5d9d3cd471e1b6245db7","compiler-rt/test/builtins/Unit/gedf2vfp_test.c":"86aa2d2821c5142d750d51a43ebcac3af5441b8ea803dac5f3ccbb77ab5bc390","compiler-rt/test/builtins/Unit/gesf2vfp_test.c":"dd98e69689da77a06a833e35c217649740ba420bab5ddcf8b811e2064e749eb4","compiler-rt/test/builtins/Unit/getf2_test.c":"138a8542cb951aa80b12a26ad6eea2e42c573ad6142f19aa39f2298053d2a127","compiler-rt/test/builtins/Unit/gtdf2vfp_test.c":"935e8eb928e2406b101cd637cb51d0da8c5e36fce7bccbcd4d6b681e08c1b75d","compiler-rt/test/builtins/Unit/gtsf2vfp_test.c":"c2e70f10364114ab2adcc702f980afd19e5eee77cd026cebcf721ff37ecf7430","compiler-rt/test/builtins/Unit/gttf2_test.c":"b40c28fa9a10cc353ad34102f629792a276c71e01da25a6bc14044af4144f686","compiler-rt/test/builtins/Unit/ledf2vfp_test.c":"f0f183beeb2241763966ac74eeeab04c84502760177f48481a4d3e0cbd4b3ada","compiler-rt/test/builtins/Unit/lesf2vfp_test.c":"d95ad287d4c78edadf5f830f97b3563b4ad2d35aef75717f50280f0a87863489","compiler-rt/test/builtins/Unit/letf2_test.c":"8f2e0eeaa6709be618cd14604f26acefc5d0b88d853d0d1401ea12fd73e1710d","compiler-rt/test/builtins/Unit/lit.cfg":"bb6d26609bb390f70f04c69f8927198d8069b40679c3ac5819fd8ae4aee4369c","compiler-rt/test/builtins/Unit/lit.site.cfg.in":"6a2b46866fceefa340bb4e53a1453a1428eeda03c9028263ae390f99b03ddfa5","compiler-rt/test/builtins/Unit/lshrdi3_test.c":"9b83145abb8d9dbd62f03c34e5976eb36f5e7e94cddf62e5afaa49d5f14b2699","compiler-rt/test/builtins/Unit/lshrti3_test.c":"b78a9b0ed50de1343b524a1a9b380fd5fd633e8ddf7be7af78976266a79c8f89","compiler-rt/test/builtins/Unit/ltdf2vfp_test.c":"d72f9b51c94574ab77313bd9fb3540e3af7f2630c45885e658707324442e3622","compiler-rt/test/builtins/Unit/ltsf2vfp_test.c":"a152be4487796fb10da9fda1942c9738242f8b6687f981a5c07227a80397a8ce","compiler-rt/test/builtins/Unit/lttf2_test.c":"128198025226dd8c95b45a33907057c9e6e514c8d6101bcb504068c447fb0642","compiler-rt/test/builtins/Unit/moddi3_test.c":"c305dd7deb5cbbea86b83edccf0b06ba0a4fdfec82afa925fbe6b5a378a1d374","compiler-rt/test/builtins/Unit/modsi3_test.c":"8fb82463b9ab880767ea51c1c6b87dcf9e7bcd3ca38360903f58e047fa185d60","compiler-rt/test/builtins/Unit/modti3_test.c":"e53324fd31b3fb79a99ff58307018269c0717ae97f4b922d3cba86492fed2e06","compiler-rt/test/builtins/Unit/muldc3_test.c":"d40ccd7f0c07dbdd68b94677e5aef6da95135cc64c7b94ea7e3e648ef3b4975b","compiler-rt/test/builtins/Unit/muldf3vfp_test.c":"14730e2fc4b3b2aab7e33c9d0127d7725314655f3a9560fd787960d5a7d8f6d6","compiler-rt/test/builtins/Unit/muldi3_test.c":"f312497b793c05ecd22845021c7573e34c6f77f22d2fc51d4ee8754799eb3696","compiler-rt/test/builtins/Unit/mulodi4_test.c":"0a9417b9693ac49f15601f200e365a3b8d92c7679f8c972ed7a2d61d0ff5c2d5","compiler-rt/test/builtins/Unit/mulosi4_test.c":"94073985860be4ad38fa967885ae078910f0483a13a0bd0ad1a64078a691125b","compiler-rt/test/builtins/Unit/muloti4_test.c":"d1035eeb928c22e34c31f806725989029cad549eb730810ef7e370aa3fd92981","compiler-rt/test/builtins/Unit/mulsc3_test.c":"dff7f1c66ab2591fa95ba52c4bbd6079ff94f0fd99640ff66e32711863747e91","compiler-rt/test/builtins/Unit/mulsf3vfp_test.c":"40e60ad98a1d2482d2984df4253a8a895851b4181eb4ce49d0f0852aa1d35439","compiler-rt/test/builtins/Unit/multc3_test.c":"91c6f428b877884a59e147c95390d7b9c74a4b129c07741cbab491735b3dd62a","compiler-rt/test/builtins/Unit/multf3_test.c":"e5850020cbf5e4004275591027ca9e7576db7ed74fb1ec2059ea19d355399ab7","compiler-rt/test/builtins/Unit/multi3_test.c":"a033317a659c67a11fb914282331273411c195d9cf029ccbf680a843d24f02b3","compiler-rt/test/builtins/Unit/mulvdi3_test.c":"7682a3719a14be60dd6781b75a2cdb6db449f64ba5662ed8467380aeeeb030b8","compiler-rt/test/builtins/Unit/mulvsi3_test.c":"2e8642b7aecb5a3e81417ebdb297cd6b26536f91ff0749fb785c82502689d4b6","compiler-rt/test/builtins/Unit/mulvti3_test.c":"4d26fe17ffbd5db2190656170946e641affcffe9d4d98ce65d46939bbe7f7e87","compiler-rt/test/builtins/Unit/mulxc3_test.c":"5396d19a4b3b5ba8c52d39a4560268d881ba9e8ad7be7aa0e966019dba0fd64a","compiler-rt/test/builtins/Unit/nedf2vfp_test.c":"e16bbf60f432afeae4c468f8e779c59fb6d73cd806c9c539e18e5b931d8ff160","compiler-rt/test/builtins/Unit/negdf2vfp_test.c":"fbf34741eea11e2b3021de83431f0210b64dc3372e39f4cf5373eda374451010","compiler-rt/test/builtins/Unit/negdi2_test.c":"495bd1ac7a65ae2526f77a176a6dd379cd5be8026140208669a84c9921cafd00","compiler-rt/test/builtins/Unit/negsf2vfp_test.c":"276fb3ee93d5d6ba440a9b789826c88999328e16881275ec3e4dc39691a17e0b","compiler-rt/test/builtins/Unit/negti2_test.c":"02b450d15f643ef228c906b304cad42694fb51eb50110f6d34457c970878ed17","compiler-rt/test/builtins/Unit/negvdi2_test.c":"12fd87910189aebbe0f621000492dba0748ba413e9057cfc6085f785833096e7","compiler-rt/test/builtins/Unit/negvsi2_test.c":"c0ef8c7387cf0eb8ffd3ab4a4e2a1fb020c997d9492d2429bfe31245d0e6168d","compiler-rt/test/builtins/Unit/negvti2_test.c":"ff8a020cd1abd1a2620a4a5d66a6e6f335744c155aed312974b9accc69d9fd11","compiler-rt/test/builtins/Unit/nesf2vfp_test.c":"ff2937f2bf09a66e744a61fd365c1afe7ae1c417efee7e2437447b018408910a","compiler-rt/test/builtins/Unit/netf2_test.c":"a8a7d77f6db65f18a9de7ff46a51b8d5a2f5d7517a15943dc6b7fdd264de2fb1","compiler-rt/test/builtins/Unit/paritydi2_test.c":"b9762a81eacdd7ab62e1a611d4f921318af88d8f90d7a71ce941dfeece711811","compiler-rt/test/builtins/Unit/paritysi2_test.c":"9d3870484602622c2a777744da3ecc58e4c26085618ec8c29ed81d0831a9b42f","compiler-rt/test/builtins/Unit/parityti2_test.c":"b08a3256bb43ced53dc74c728651e27cfe5bdb771957f7b8ded145c87018f5e4","compiler-rt/test/builtins/Unit/popcountdi2_test.c":"1e8515dd322c5f1588692ced089a7114196aa47a0f3a11a42e71704059bdde76","compiler-rt/test/builtins/Unit/popcountsi2_test.c":"119f89dd70d046454ccda2e8a3afcbe205c1ad08c73a2af5261d73dd81b3a842","compiler-rt/test/builtins/Unit/popcountti2_test.c":"5f806c26ca32c5e5ab7245304971fa5b1a4eec089290e24d2bfd598dfce5946b","compiler-rt/test/builtins/Unit/powidf2_test.c":"9b6f8ea5e5df706c2a193648111a434cb8cb3fa6a1f75f9a6a305fd714298bf6","compiler-rt/test/builtins/Unit/powisf2_test.c":"86a28c7f8fc249925bc5b816f95febe535495477eb95f1d2291c652548304e35","compiler-rt/test/builtins/Unit/powitf2_test.c":"5cbb9c19dba96b869a1c4663439d8725d17057d261f73e874d15b17da46431e5","compiler-rt/test/builtins/Unit/powixf2_test.c":"41b0fcae1328b95c0389e6e1e5a77bca010c217f24032189bba8fc5d97b92bee","compiler-rt/test/builtins/Unit/ppc/DD.h":"6e3ec83ffc7914bca47160b189f179d27dcc7e4bb5701a8f1f9167cd5d4a41a4","compiler-rt/test/builtins/Unit/ppc/fixtfdi_test.c":"4e3cf3d2d6cb3f9f9b002bb8ad2b35cb2dc613d6ab247482a345242758de6b43","compiler-rt/test/builtins/Unit/ppc/floatditf_test.c":"d20be15ff9a8475c64d5a7434c2eec3d02b32029471bc894254bb0dd08936de6","compiler-rt/test/builtins/Unit/ppc/floatditf_test.h":"abcde060503cfbf0780470473da3032b707336cf4533f3bf243b3f402602a09c","compiler-rt/test/builtins/Unit/ppc/floatunditf_test.c":"5ff46d79932c914b4e97a226c557577b6154ce6701306dbc5e57f62276c7aef5","compiler-rt/test/builtins/Unit/ppc/floatunditf_test.h":"5f2e5d9eab3e313976fbb89b876f791bd17f91c581d209a8be3e328fa282dee5","compiler-rt/test/builtins/Unit/ppc/qadd_test.c":"13dee11896d9951129d641c93cb34573c218511d403f8e395bbc945d0fd92ba3","compiler-rt/test/builtins/Unit/ppc/qdiv_test.c":"e73fef7e3668963da64d543ba50338bea37498dc9651973b95787856dfa9ef86","compiler-rt/test/builtins/Unit/ppc/qmul_test.c":"c72a8c8ec3b73aac6b4440f6509c2abe48b9db444240445d4592dc2624d520e3","compiler-rt/test/builtins/Unit/ppc/qsub_test.c":"a4fa80e62a33d72c0dbf3a4af19d5d79dc667582087d73fde2d00be355847dc6","compiler-rt/test/builtins/Unit/ppc/test":"4b63607e390b658cb892ead8c3d5f990ccf95afd8c26b3ac14712c2778a8098d","compiler-rt/test/builtins/Unit/riscv/mulsi3_test.c":"20bb61adc7d91d3da4a65024dd627888aecef88779b6db6399d511c878e92dfb","compiler-rt/test/builtins/Unit/subdf3vfp_test.c":"6fd3803c494fb51e993151275ce63cd9e04a0755b4ca91447a0ebe5bcf12feb2","compiler-rt/test/builtins/Unit/subsf3vfp_test.c":"af4a19faa930ffa966996f82b1ee18971fb3fbd1c141a23000bb66d9fec38020","compiler-rt/test/builtins/Unit/subtf3_test.c":"70ec10ee1b7034e817104e2e017236d6a0e6bdb66751bb48ea1f48bc77f8d343","compiler-rt/test/builtins/Unit/subvdi3_test.c":"ae739cbb6a70446aaeda69276adf492585743d7fe44d001b15d949622b8ad764","compiler-rt/test/builtins/Unit/subvsi3_test.c":"01fe16bb87aca83618fe135153fb0ceba9e6150f0f0bb0b6ae8972a71c239c6a","compiler-rt/test/builtins/Unit/subvti3_test.c":"1af53c98be627c50b9891fa984122879a6c85243e8f346f4c8f6585503544a5c","compiler-rt/test/builtins/Unit/test":"6e7235f8fe2b00bb4e811487270a44d6bb99fa398b3214dfbba47e1566a611cc","compiler-rt/test/builtins/Unit/trampoline_setup_test.c":"8895526ad25a7c325002e2263405ed1575e942843312f42117f098f30a572cc3","compiler-rt/test/builtins/Unit/truncdfhf2_test.c":"cede03e4b7f9fc12f73eebfc0451af0e9d96667602a487e76b5ccb99fb97c1a7","compiler-rt/test/builtins/Unit/truncdfsf2_test.c":"fc8f4bccd4f73349a47f1fd2f0413cfd8c7df1391e584bcbd9d93a1514753fa6","compiler-rt/test/builtins/Unit/truncdfsf2vfp_test.c":"32a0b4f2faaf5197694d2bea0411d9e46f10d6e05b91e1595486280d12dd654f","compiler-rt/test/builtins/Unit/truncsfhf2_test.c":"4a52200ccbc428300ef073525e747ad30edd0440a0e8ab59ce7b2fcb8dc6c79d","compiler-rt/test/builtins/Unit/trunctfdf2_test.c":"733e3ff16337a98a1a7b578454cb058585d8cdcc6d64fc3f7df8f06b6803e8c8","compiler-rt/test/builtins/Unit/trunctfsf2_test.c":"8d1346adefcf950ee5d0159206c51e1195ba938913fccb89f6c17f2f80640768","compiler-rt/test/builtins/Unit/ucmpdi2_test.c":"0c6370d4a33b2d5aef1610d8480c0e24c7771932f73fd1ea54dafc0d98b24838","compiler-rt/test/builtins/Unit/ucmpti2_test.c":"07e9a25c6b4d46f0b3fe08d1481afe97a36ae14e2f798d0a4e045f90dd26be0f","compiler-rt/test/builtins/Unit/udivdi3_test.c":"dd1267a9cfcac8bfb118fe7ace3e4ee849fdb5f6c0e620c62ca01c2e87a7ec1a","compiler-rt/test/builtins/Unit/udivmoddi4_test.c":"e93e9d6b13ac85b95a3cef4669606f2dcd5113f0a7a67b3ea27b71fcc5339626","compiler-rt/test/builtins/Unit/udivmodsi4_test.c":"522c2cb944afb6ca0c3ed10e3184d425d15bb8a6295946c89523f08aa5fe87c7","compiler-rt/test/builtins/Unit/udivmodti4_test.c":"b0d63153e950c4171ee0971afb96c55c554041156dfa833f9807ea413089d4d8","compiler-rt/test/builtins/Unit/udivsi3_test.c":"568f39633383e0466dfebfc4af670e420cfadfceab36bb9815cca9c9ffa3985b","compiler-rt/test/builtins/Unit/udivti3_test.c":"8036e2dda8e94d9acd9c800d2513f9e08342910b9cdda7de6dc5477d62d08fc8","compiler-rt/test/builtins/Unit/umoddi3_test.c":"c570e67c5fcf4aff667cac26995bf19543325ce68f20616bd7333024ca50f4c6","compiler-rt/test/builtins/Unit/umodsi3_test.c":"cc451025c12ba85346a797cbbd2a2dbda07726210f3f09a5d9574ed40f6b201e","compiler-rt/test/builtins/Unit/umodti3_test.c":"1be7cc3d11d94390337a4febeaffe1f9a25225b4f208f1022a8a0cd609d2f06e","compiler-rt/test/builtins/Unit/unorddf2vfp_test.c":"1a0e568dc91bd958051a987679b40ae7b1fb9aca8671e4e6672e60c114c82df9","compiler-rt/test/builtins/Unit/unordsf2vfp_test.c":"5f4fa06bd7cd5a58347aaf3522720f791b5f1439447f084df529fe2d3ad33b82","compiler-rt/test/builtins/Unit/unordtf2_test.c":"518f9e7622566ab260068f965b540fba2e68929abc1eaadc971e78790d1d1bf7","compiler-rt/test/builtins/lit.cfg":"155ae5b655cad95e987d320a97ad697ab4f536508e40964262b3db1b8e8015bd","compiler-rt/test/builtins/lit.site.cfg.in":"d0eed33e5f09dd1f24cee5d5c8e452f1929c19fc6c45ad8109bcf3eae6eea8dc","compiler-rt/test/builtins/timing/ashldi3.c":"e78cae3ee8b3d3d2b6d02689850a2b26d32bff6b5dfa9719618cbed501984e10","compiler-rt/test/builtins/timing/ashrdi3.c":"e56828d55721f1bdc92b1c897b03337ced0e587e48c2e014f86c9cc68dd8b02e","compiler-rt/test/builtins/timing/divdi3.c":"d31f103e4a4caa95931005e225699915c1c613265dc326b69d434247d72a4952","compiler-rt/test/builtins/timing/floatdidf.c":"9cc0fa9c5f5e7b66d720298e482c7fd5a047410d909a69e48626d81d999c1d07","compiler-rt/test/builtins/timing/floatdisf.c":"bc90f0145fae2a58bab2d33f1a4facd4a76412223c3d38e2256735beca7f1c4c","compiler-rt/test/builtins/timing/floatdixf.c":"4b163a816f5ab80ea3dd79f155501404c2f1b5e89bf8bcda41666eec5cfd2960","compiler-rt/test/builtins/timing/floatundidf.c":"db0b0c47e43084994619b9fe2fc5378c95de990889ca309ddb8e751a263d76bf","compiler-rt/test/builtins/timing/floatundisf.c":"763151bc228f7f9ef96ed6f25a17411b68415e33191d4a1ba5fd8e679b97c6e7","compiler-rt/test/builtins/timing/floatundixf.c":"4ded50c1439844e8fe2977b4dadfcc88fbab6c09545beb1b37cc213e05ea3575","compiler-rt/test/builtins/timing/lshrdi3.c":"ef9cda77008cf43b9a5a9a7667d6b8f72635c2f2011581b9ee0771efdbccfcb5","compiler-rt/test/builtins/timing/moddi3.c":"41288833f547afc81154dccc4c53383ca5884ebaaf8e91192d3a98e7408f2bc3","compiler-rt/test/builtins/timing/modsi3.c":"b4d104274c4e0ef65a2d52807014ac7a8ea687c2f2ee97ecc5deac57555cf669","compiler-rt/test/builtins/timing/muldi3.c":"d6fd3b8f174f0ac90de498a95c670314bb97415eca9d274394a08e3ee780c0f0","compiler-rt/test/builtins/timing/negdi2.c":"241dccbdcf1317153357f20e18148a9f80e69248900c62d12afb4902a25ce8c2","compiler-rt/test/builtins/timing/time":"57214ae82537531fc8d7f99b8a834a26aa270ab4f9e397fd2f6a4a76c0c10c73","compiler-rt/test/builtins/timing/timing.h":"903d7a3ce53aced6a8d4a42ac029883f098af63fa67026d32965c666974830c4","compiler-rt/test/builtins/timing/udivdi3.c":"3f3892ceb53946b35892334cf4a46f8f1dd9830cac42204193a80becdd034b10","compiler-rt/test/builtins/timing/umoddi3.c":"4843f417828c33bb1473824a1ad2f70c41588692ef835c5280ebc34b9555e567","compiler-rt/test/cfi/CMakeLists.txt":"2730fba1c9c0da53696e9e51dfe40af0d6b54e53c92e1d23bd31650b83c3afca","compiler-rt/test/cfi/README.txt":"3377322ab2fb184815c24ca973b8fc9b6157c7c8f37ee1a3bf373bb5b847f4f3","compiler-rt/test/cfi/anon-namespace.cpp":"521fce7f0052cf2d3e3de93d3de6bd7b871eeb60cd3c25e5bf0cf772d6e24d8c","compiler-rt/test/cfi/bad-cast.cpp":"57e7b78b6c8ed8cc3266f64a6f4f049333355b1f1b5fb9dbe940a9240020ce60","compiler-rt/test/cfi/bad-split.cpp":"1dd80cc5e6452c6f71e4ba8ef0c68b2420ef956175997e2b9dada6a3b9634b0c","compiler-rt/test/cfi/base-derived-destructor.cpp":"d12f5126037c1329ab52dbfede91f848749db4f5381c9de98ed36d29c489bd96","compiler-rt/test/cfi/create-derivers.test":"e3a106a547d822a72ad088f9c8c69248d8a04446da646b461c1c637f7f0e2300","compiler-rt/test/cfi/cross-dso-diagnostic.cpp":"a7c1a82732242fd8686c4ddab084dc8376f3d5ee3238ce35a8cc4a01c75491e5","compiler-rt/test/cfi/cross-dso/icall/diag.cpp":"e62ccb75f58dfff5e3faf5604fe7987abbcafbd1fa623aa5af225521cd4da60f","compiler-rt/test/cfi/cross-dso/icall/dlopen.cpp":"a4e847f6ec5a802d49931531b874ad4d17d4d821145b7f75bce7747b8f7d0751","compiler-rt/test/cfi/cross-dso/icall/icall-from-dso.cpp":"52f0c4c61d16043c9d779b2edc9cf7f9118fffcbb498acbb762c891bffffee89","compiler-rt/test/cfi/cross-dso/icall/icall.cpp":"2d10276bef9c97ded4b7c22d95c638d17d320b10b83c13ae01189410213a9a12","compiler-rt/test/cfi/cross-dso/icall/lit.local.cfg":"297a3f2ddf40ec256784446492b16ee9c6d0686a82d6fda63dff1b44b3c65427","compiler-rt/test/cfi/cross-dso/lit.local.cfg":"cba98026dde291c25f382aca788cc0abbd66c47e206fb1768d9fc70e01de0537","compiler-rt/test/cfi/cross-dso/shadow_is_read_only.cpp":"447d309b5de8a3234b6830db25dec96fbb50e57a92f87e82cb5bcd42dc08017e","compiler-rt/test/cfi/cross-dso/simple-fail.cpp":"19f7bc960838b3385582c8c97a349b60e76643244d48e9c7670f54f7c0a21121","compiler-rt/test/cfi/cross-dso/simple-pass.cpp":"9738bb14372f9aba4605ba574ced94864fa1a6ccc3c886ed316675c7e71bf76f","compiler-rt/test/cfi/cross-dso/stats.cpp":"9d86b2f654a6eb902816ccd93601289232355dce7c072e26d6e631992b98a128","compiler-rt/test/cfi/cross-dso/target_out_of_bounds.cpp":"ad63dc3d78a649964a107d233974874d41ea261e11785ba915b2c00ba6290fed","compiler-rt/test/cfi/cross-dso/util/cfi_stubs.h":"9f1339580d2930bd1a1227fa89e33ba326ddae12018d75ffdb882010048c60d4","compiler-rt/test/cfi/icall/bad-signature.c":"02c1465dd09ca412ec081c2d3d36d053c5dd74a401e6914e22545d61855b9255","compiler-rt/test/cfi/icall/external-call.c":"23dacd7a6c787dacc8e4e8fc876af2d2a645bcca0263d52bf0d51157b0f5987b","compiler-rt/test/cfi/icall/lit.local.cfg":"297a3f2ddf40ec256784446492b16ee9c6d0686a82d6fda63dff1b44b3c65427","compiler-rt/test/cfi/icall/weak.c":"bca4008261665e7bbd3963709c2c909d4ff79e9f2ced3ef948c95aa92372e343","compiler-rt/test/cfi/icall/wrong-signature-mixed-lto.c":"346066dbc479370d0627ef83d8dbcea13461d2af62bd47567bd14db74d1a4395","compiler-rt/test/cfi/lit.cfg":"5c6a39814f5af3f05decf60ff82a583dae7e053134515e785be42c48301865ef","compiler-rt/test/cfi/lit.site.cfg.in":"70e4e5b2ad200208df0b19854375ccb1ee8871755fcf15bc28ca73473a77c52e","compiler-rt/test/cfi/mfcall.cpp":"a586c9bf58b35846e95ea8009c6ed84b5130f6a009b3b3e12e31657d9a97ac70","compiler-rt/test/cfi/multiple-inheritance.cpp":"c52e24f484dbf21a1829bf12c58565e4ced1555fc9b1b146074c909d1aed1936","compiler-rt/test/cfi/nvcall.cpp":"e6c7b2504a07a35c5c4f2df2834eb2fd40dddbdcda6a68f05a7e89c290e91bc7","compiler-rt/test/cfi/overwrite.cpp":"e3870323f62d0854bd1469b4e75410c70775030b3845d47c58ad1d3c6994a9c6","compiler-rt/test/cfi/sibling.cpp":"2453a743a067856416183222a622022d7a8d4bc9bf29b8d24dd3f65d359f0dfb","compiler-rt/test/cfi/simple-fail.cpp":"5b7ae2af7d606994eb758b40909c58e3a0ac98d57a5482ee409facf0ff96dd7c","compiler-rt/test/cfi/simple-pass.cpp":"3a61de16b82be9711892d9ed41a1a88efb99aeeef3bbba886ba74169da4b3ba1","compiler-rt/test/cfi/stats.cpp":"718c2a4c550caba77bfde098c96e6f493a538b7cc0271b282fec128cd95d9bce","compiler-rt/test/cfi/target_uninstrumented.cpp":"9aa4c239fc16bd0fcdfbd4b03d7835a5b9d3b8f5e8fa14fb2e1e217b20bb2dcb","compiler-rt/test/cfi/two-vcalls.cpp":"94f8067c1183165d9f1b3ccd45570095fb678ffb67c17d2e328412fb83bc9699","compiler-rt/test/cfi/utils.h":"12f8984b0a3789e6f03bf2a67343abb190a3f60721165cfd7df1a272a1a41e6a","compiler-rt/test/cfi/vdtor.cpp":"9d006eb809116f905eea22b95c6c3723c7ee9c9eb2da92f3bfda0e2036301f22","compiler-rt/test/cfi/vtable-may-alias.cpp":"9350fb085ae891128f61b6ea47cb011a659bfb8743e40dff39e61c51b3c00b68","compiler-rt/test/dfsan/CMakeLists.txt":"cae12e21cc875c7caad32081edb76a4508a1fca285f099647ccf08ff890f8a8b","compiler-rt/test/dfsan/Inputs/flags_abilist.txt":"bc392d2a8b6e850762563fe13eae1e0e4632c7526a0629c6f4f830e332fdd437","compiler-rt/test/dfsan/basic.c":"6a1c75d37c0fc16b08831d3cbeed4e97ceb3eb351987c72701c6c662508a45e4","compiler-rt/test/dfsan/custom.cc":"83c27816624d6bacb29094584885a8b0acc6e400e693b939bf874c7247621d72","compiler-rt/test/dfsan/dump_labels.c":"ad6dccd7d4b3bd7b6531015c7f52ffa0a24a5cf5fde132f705d7d3290b0d6db3","compiler-rt/test/dfsan/flags.c":"ebf282969e3596d611a900395b6ac67d1b409bf663a57caeda49e634482f9800","compiler-rt/test/dfsan/fncall.c":"b37d0139400bf0c293e9238b11916bbfe8306da9ce7e40abba8329e8d075378f","compiler-rt/test/dfsan/label_count.c":"7853ca7d32ffd0a5ffdb301cc5a920d1c1b3a06289f2e8767ff69ff820d856f5","compiler-rt/test/dfsan/lit.cfg":"c84145f2174c15376f5044d20e7cf97208586bf8ca1a92b98433fbd1a52545ce","compiler-rt/test/dfsan/lit.site.cfg.in":"9e65e555c5a7715b896b1afe418b96704db5366783471d30ea0490c10a944256","compiler-rt/test/dfsan/propagate.c":"27044ab769ad354fc62dc63333de099ceb60bdf8ffa56bef7a45925d72226a6d","compiler-rt/test/dfsan/trace-cmp.c":"9402c8b680bc509eaf780112ea5f17f547e102129711f1964f5b57ddfa78275f","compiler-rt/test/dfsan/vararg.c":"332f0586510aaa54ebd2b86c586f39104fc85848115a78caa2bdba4de78d6699","compiler-rt/test/dfsan/write_callback.c":"4448904321134ffd19ed03f9ca1ef30d9d39f924d9d9c5c3acb4f88f102099ee","compiler-rt/test/esan/CMakeLists.txt":"35db910239350ef8050f2bdabfe76c7efa6eed761c9d249942431f8136d73201","compiler-rt/test/esan/TestCases/large-stack-linux.c":"aa474b099cb75aa0607659ebd6c7773f8b5389da094dadf18c6219b005bf65a2","compiler-rt/test/esan/TestCases/libc-intercept.c":"9b1b45ab0c1c8d260323bdd8878055b748365b3945bc528aa9c1aa4c11cb9f6d","compiler-rt/test/esan/TestCases/mmap-shadow-conflict.c":"bca905c45a9e595c42b0489b2fc2df9a49e49e0488c0f2aeaf57377933a4bb75","compiler-rt/test/esan/TestCases/struct-simple.cpp":"498b2f43cf51eeb1392693da3a916c0b0a7735053891500808b6f5e6a7841a1c","compiler-rt/test/esan/TestCases/verbose-simple.c":"5bc7f79dbd74cb9f7fbf88ddc569c46d986ba48bb8052c9d27180deea70811e6","compiler-rt/test/esan/TestCases/workingset-early-fault.c":"53d53a01c625dee1cc5e30015d4bd4c88ef167a1432e80fd10abe03eb4e6ed3e","compiler-rt/test/esan/TestCases/workingset-memset.cpp":"e974e2dc9c1f41f84b98c445de858e781dcf00fafca074a1ca2c18167fa3526d","compiler-rt/test/esan/TestCases/workingset-midreport.cpp":"7a883909fafbf0c91c2cacbe498fa8568637d8100b5f5b3cf225957e0a7743f6","compiler-rt/test/esan/TestCases/workingset-samples.cpp":"80c3e1ede3ba79579de720f3e4a7475ce6e2ed62d5cba56c4feb050b6704ab77","compiler-rt/test/esan/TestCases/workingset-signal-posix.cpp":"f82e45c3c69a2e1176d4680506f34a562bc1b8ce40aac51ba1f364fa8064a827","compiler-rt/test/esan/TestCases/workingset-simple.cpp":"1e586bc1883c3b6f492d0ca04deb73f4ea63a09fab1ebf81c323ccd456825081","compiler-rt/test/esan/Unit/circular_buffer.cpp":"5ab6438f50fba242475882efd3b0e196fa50d19cde0ff42808daa1703a45f1b9","compiler-rt/test/esan/Unit/hashtable.cpp":"f31981e11b1acc6f204c49ef80ab4c1c51a737fb8d02cf671c0060d38633f376","compiler-rt/test/esan/lit.cfg":"ef2788e268928a9ff762c0eda9feef4c5a18d5cb0e2256ce284e0c3a5c99b241","compiler-rt/test/esan/lit.site.cfg.in":"c4e93cf48cb9db29517bc41c996adf568e39b2f29486ad64fd46c86150b51365","compiler-rt/test/fuzzer/AFLDriverTest.cpp":"0265f5a3f2cfd5fec0a8646c5b882a290185f84311657fe69d6d2badb6ae84f5","compiler-rt/test/fuzzer/AbsNegAndConstant64Test.cpp":"29facc65734c4ee894d02da2134552b5a96eccf806113cce71974a825127d7d6","compiler-rt/test/fuzzer/AbsNegAndConstantTest.cpp":"0eb1493e5c0520071af0585d6cb209597ffdc3f45ac0d0217e57f980998d5ae8","compiler-rt/test/fuzzer/AccumulateAllocationsTest.cpp":"2714b4eef5aed3c00de0a518ab15fcb56e74a76ad50b475742b4f3630de52adc","compiler-rt/test/fuzzer/AcquireCrashStateTest.cpp":"ebad196388b89b45240ea05c3b6747c25face9904e70dca0dd455d39f8b5aa3d","compiler-rt/test/fuzzer/BadStrcmpTest.cpp":"ddb6549c40e46a6cadd930e8f026a3e15b9d8fa5786d397dc8f21c45bf6a2190","compiler-rt/test/fuzzer/Bingo.h":"4dd0b37785876c7a611ce3a76a5b63622a977ec258ff94e2e04a66fa6eac7e21","compiler-rt/test/fuzzer/BogusInitializeTest.cpp":"89bba1010da0ec33398c883f611903dd8e37a8fbec87fafea7fb1df9bd7815e3","compiler-rt/test/fuzzer/BufferOverflowOnInput.cpp":"777dac9480415fba3feea02f9774b7f4bcbcf85e183224e4a39e1c00844f8178","compiler-rt/test/fuzzer/CMakeLists.txt":"c9e1fe2bd38f574ff5bcec5bc1aa7afe9637c32ad4a90d10286906170e8f659c","compiler-rt/test/fuzzer/CallerCalleeTest.cpp":"26da6b933d0d86f3196374a1848a968724e510fb49923d2d983ba129ac4dfd6b","compiler-rt/test/fuzzer/CleanseTest.cpp":"b4783b77d84eba85fba53c681f5966cbbac0e69392e9058e0ceaaa3c3b9e9986","compiler-rt/test/fuzzer/CounterTest.cpp":"ae0a091987fc722b310592fe6fa63c66ab4c74e84dcd7f9e73f80d61e708bcb9","compiler-rt/test/fuzzer/CustomCrossOverAndMutateTest.cpp":"89647138ebf6d44c0ea15f5f26770037ce7a528a52f4439978562efd1f8926b7","compiler-rt/test/fuzzer/CustomCrossOverTest.cpp":"710a507734baa548f4455833e60d67b11f88a7156552896c86d27833a1c50b2c","compiler-rt/test/fuzzer/CustomMutatorTest.cpp":"03ba76fa2847897370584637873cc2b31ab1d818bec5e02acf540556ae67521c","compiler-rt/test/fuzzer/CxxStringEqTest.cpp":"766c1d36b2e4c493992ac3f4e48c419ead88572681603f33f81c40783d3e3e33","compiler-rt/test/fuzzer/DSO1.cpp":"ba73c4018bd3fb45b861bc0375888bd4e7b310bac0275fbeb3751d2f5d046d44","compiler-rt/test/fuzzer/DSO2.cpp":"632e829125d8ede7760c991db82f7defa095919c9c7f21092c5fffc7bbffbed3","compiler-rt/test/fuzzer/DSOTestExtra.cpp":"45629f7e449bfb345a4de9d34bf5d1d1d36ed1dea872fabe4e1b0c1471197b71","compiler-rt/test/fuzzer/DSOTestMain.cpp":"bf2021893228a0617c8c9aaf53320f918407e0da82eaa95715214f24c351ea78","compiler-rt/test/fuzzer/DeepRecursionTest.cpp":"dc3bff5012717088dd0b2bc618f9cc943a02d2415270fedce60de34af158d99f","compiler-rt/test/fuzzer/DivTest.cpp":"6f82a81cd7128c2d69da71e8af21c41d278fe7402bd882f1e1790f0989d4604a","compiler-rt/test/fuzzer/EmptyTest.cpp":"6c8edf440fadbbb5a4e9f8982329bf881a146ba0f36a92299f80826996823165","compiler-rt/test/fuzzer/EquivalenceATest.cpp":"f6931769f8728782c8ad65534361d0a892f211eabd46012b608575718cb8467d","compiler-rt/test/fuzzer/EquivalenceBTest.cpp":"5eedbb7b73a777f5d94f24823c34b4950d610ece888a21c0ba33de4365f21f02","compiler-rt/test/fuzzer/ExplodeDFSanLabelsTest.cpp":"530334071adfbaa9a466e0d7c998496f0e6af00af9c71b91068ca95200659f56","compiler-rt/test/fuzzer/FlagsTest.cpp":"a7d254d77456454e6f6762cf803948f2a89ed610bce9629bec001e9953b714e6","compiler-rt/test/fuzzer/FourIndependentBranchesTest.cpp":"53f07446e212578bad1ff62c455a51652135a4f82884a90bf1b7e213c5346bae","compiler-rt/test/fuzzer/FullCoverageSetTest.cpp":"5a15d00118d282428b72fce810628d547f09a7fd0f603bf7ab4a8b843e16f087","compiler-rt/test/fuzzer/GcSectionsTest.cpp":"502a7489635a3153b75a8175a25f926d10d5d8e698e95d6524e3fa953380565a","compiler-rt/test/fuzzer/ImplicitIntegerSignChangeTest.cpp":"1b66d22a877e23c688c1db1ee54cea0c90560943100bdb920aa00a3fc54559f1","compiler-rt/test/fuzzer/ImplicitSignedIntegerTruncationOrSignChangeTest.cpp":"811f835b07a26db79dbad90e5aa5ac2180885714c24b9ad8616f8b3115ddb04e","compiler-rt/test/fuzzer/ImplicitSignedIntegerTruncationTest.cpp":"3a674e979e873ee3c5b4e1f5e20df0996b8577a9cda2e575193eb5863fa9c89f","compiler-rt/test/fuzzer/ImplicitUnsignedIntegerTruncationTest.cpp":"d80ef64e9ef62dff56f549b71efc248a9fd44d13d1f6a4dad5c9247ede465ab1","compiler-rt/test/fuzzer/InitializeTest.cpp":"3633da2be160660b8d90696d072fdde75330e64217ab9d6819a2208a47e43208","compiler-rt/test/fuzzer/LargeTest.cpp":"80d4c19ca628632571682cdfdb07a42d08dfcedff05a1884139dee3e0afe63da","compiler-rt/test/fuzzer/LeakTest.cpp":"c24365169c218282804ccc60cfe5a8264c014a08056623a6d5595c035218aa87","compiler-rt/test/fuzzer/LeakTimeoutTest.cpp":"0a1900c39808f0db40065f449450ae2c57dd6992c4ac2a3c57a81a5f9b3cee4c","compiler-rt/test/fuzzer/LoadTest.cpp":"3a1bcc70f6e549041ccaa669c59d5d1adda9117921d20641cf2930460f103a8f","compiler-rt/test/fuzzer/Memcmp64BytesTest.cpp":"8db0b5ab55b570a8da6712eff236d4c4b407c848d5b549d23c754179ea64a835","compiler-rt/test/fuzzer/MemcmpTest.cpp":"4ec8f58c0c482253434633df1d5c9cb5dafba2ceb9a8bafc95ce303681f18068","compiler-rt/test/fuzzer/MultipleConstraintsOnSmallInputTest.cpp":"ec5aa9bedb7d3538832a1ea44d4fceca036940e965f6ac351f1d2360c25f3821","compiler-rt/test/fuzzer/NotinstrumentedTest.cpp":"4eab0acf7689fbcb6202feb1cde6743e34ea3ecc770adc377ce982dcfa4a1520","compiler-rt/test/fuzzer/NthRunCrashTest.cpp":"06bae68b40db97b39dd15ae90d4f1030d634f468ae3290d1981fae87feb096e6","compiler-rt/test/fuzzer/NullDerefOnEmptyTest.cpp":"811610fb80ad7e53d9bbbeba037cf7289c600c302546b48cc033c59fc843358e","compiler-rt/test/fuzzer/NullDerefTest.cpp":"d9561dee8941d87c6bd2658f1337306e5b0686787e959d505358153848cfd411","compiler-rt/test/fuzzer/OneHugeAllocTest.cpp":"32f67567c5bf6f67a56635535f9b353b287eedab79bbaff796560ad0caf62d0a","compiler-rt/test/fuzzer/OnlySomeBytesTest.cpp":"58a6919b99dd5972795323f336bec3d7157702a3ffefdc2918fc89a8fc08fb52","compiler-rt/test/fuzzer/OutOfMemorySingleLargeMallocTest.cpp":"6004002e7d6cfbf1c589b27d58e57c6d88d61ecc592f5e7c99fdd01ffd1155bb","compiler-rt/test/fuzzer/OutOfMemoryTest.cpp":"8c4e25bfa44d81717ba720a42ddaff48b5e462632325381444a330cce34c2dd4","compiler-rt/test/fuzzer/OverwriteInputTest.cpp":"2f59de3f2c1013f73afdee12e6ac0f8356d09f5b6bdcd717461ff80efb812b35","compiler-rt/test/fuzzer/PrintFuncTest.cpp":"1f3457a3c3c5515282c79d1e738a3435160710451de006925341b4c5986498fa","compiler-rt/test/fuzzer/PrintUnstableStatsTest.cpp":"7d1127ea5f66e85e38cee1642dcbb86430152c9f599305be1fe4751112e3c70a","compiler-rt/test/fuzzer/ReadBinaryTest.cpp":"862eb1e5723d4e7069a54d361b97ecb951fda12f46a50231e7cc769ffb6d11ad","compiler-rt/test/fuzzer/RepeatedBytesTest.cpp":"b6fef96b13e279c96ce137b0e942bdefb4e3a1265dcb8e34c36540977b8835be","compiler-rt/test/fuzzer/RepeatedMemcmp.cpp":"797dd207f4c553d72b58c14c7124bd3b499903bc044707907b60dd1e8466af3a","compiler-rt/test/fuzzer/ShrinkControlFlowSimpleTest.cpp":"97ee470c9f893915b95b1d79f8904741f2f523912ee4f7f2d705a7cf1f9be1ed","compiler-rt/test/fuzzer/ShrinkControlFlowTest.cpp":"814eb4ab1a7a126e8c81c23a19a2cca4e3433e8b5ab75ac9435ee0361256c731","compiler-rt/test/fuzzer/ShrinkValueProfileTest.cpp":"5dad5e4961ea734a53621c5d67660efbc67b6e37df74ce73c1ff989d50df455a","compiler-rt/test/fuzzer/SignedIntOverflowTest.cpp":"8af1213f9157193846ce5846d5e7ab2c5d38516df48f6c0651bdbad47f4b86f2","compiler-rt/test/fuzzer/SimpleCmpTest.cpp":"734be997ed875c8ab3bed51c4e6c28d183da68a6ec1bf16231e1760a9cb9b910","compiler-rt/test/fuzzer/SimpleDictionaryTest.cpp":"1dcac4a8758dfe01981160d41be65d1c9257f05ade98ef59757a67f32f5a82d8","compiler-rt/test/fuzzer/SimpleHashTest.cpp":"8a1088534753976f23e9e0388230c18dc3a17913592f7ec56f39ca06d4f8ccb4","compiler-rt/test/fuzzer/SimpleTest.cpp":"3f26c2727025d54f010859522eda412085a3324b09db6fc165705179e89b41eb","compiler-rt/test/fuzzer/SimpleTestStdio.cpp":"508ed47f78243aeadd5726fd5692407fbbbe83a0a2deb18ac3c4e2a100c3ced1","compiler-rt/test/fuzzer/SimpleThreadedTest.cpp":"331ac59d7e55edc0099f4d4ae7ebca52423199383e310e2371fc1b8134a91aae","compiler-rt/test/fuzzer/SingleByteInputTest.cpp":"cd77be832960b9e19b48cb6c1aa064e0a81b8ec088f38fae8ccd93901299fc10","compiler-rt/test/fuzzer/SingleMemcmpTest.cpp":"45ede54cbc83c32bb656d5ed8dfb0283aec59bd180cc2d384ae0cfdc477f5c00","compiler-rt/test/fuzzer/SingleStrcmpTest.cpp":"3f265d43b6539c064cd47be80a6ee7b77b9b9a084a9b7b91f94bbc824e02cd08","compiler-rt/test/fuzzer/SingleStrncmpTest.cpp":"4767c61e456df48fbe7255dca4cc22595757f711fabe8939443027190cfdb028","compiler-rt/test/fuzzer/SleepOneSecondTest.cpp":"595a539d251eb837c4b15f6ea7e26f8bbfc8651387edea82a12a29f602f84213","compiler-rt/test/fuzzer/SpamyTest.cpp":"a6c77de82a50a30a4fe69356f9f74b3990da7a13152d50e38ba57780d605e5f1","compiler-rt/test/fuzzer/StrcmpTest.cpp":"651bdb96f4a333ee87aec86532cb67f2b55fcee7d988a32fbc62d26888866bcd","compiler-rt/test/fuzzer/StrncmpOOBTest.cpp":"e032d7b1755e35b936d1cab6269bddf733bd1492c939259f35a475385946eecd","compiler-rt/test/fuzzer/StrncmpTest.cpp":"cc70af206801eab50b5c1f0f9e0d37b1fa937e3c2b37e071a810eacc6717300a","compiler-rt/test/fuzzer/StrstrTest.cpp":"032d9c5cf986f019aaaa8cec1119718d791bd98048ea78ebe0cb95f8d3903926","compiler-rt/test/fuzzer/SwapCmpTest.cpp":"8720f44d3ff2ab4f2fd37c24390d11ba535a6de509dd836e705a7256e1271981","compiler-rt/test/fuzzer/Switch2Test.cpp":"c11c84a08c97f4e4c6ddfd422ea5d4073cd12fcf9638cb0e6b643d9f26edb6e2","compiler-rt/test/fuzzer/SwitchTest.cpp":"2d2766b0377dbea8554958ecf847109a24a1e69eade66b17a61d67cdc3214eef","compiler-rt/test/fuzzer/SymbolizeDeadlock.cpp":"e093668a65ee641dcedf09823ce31a4960f65db4d8888f34c736c658b349076a","compiler-rt/test/fuzzer/TableLookupTest.cpp":"7b954a1d212d643bbb70faab8bae4bcd4843dbacd792ead4f688441003135029","compiler-rt/test/fuzzer/ThreadedLeakTest.cpp":"7263a4b348b288f73b830c229fcf9716f6988fed8bdcafa47d03d7d628c15374","compiler-rt/test/fuzzer/ThreadedTest.cpp":"595a1065b46c01ec3f6c745839f50f20b08b274da33ef3e8d380e9e2cdb831ad","compiler-rt/test/fuzzer/ThreeBytes.cpp":"b14fd0ce86f1d23347af5d3007d8ea5a682aa0de60c356d53492dbf1ad240586","compiler-rt/test/fuzzer/ThreeFunctionsTest.cpp":"a8e7c4d0da7703b656d0a7f0a97e1387a21470ae4027d1b4102d1300c87746f2","compiler-rt/test/fuzzer/TimeoutEmptyTest.cpp":"5560f0e4f08b06111b7bbab4ce058fa9b3684f16a565881bc486904436dacdaa","compiler-rt/test/fuzzer/TimeoutTest.cpp":"3155a0530eba17e2cdc3bd2675640e30da18842e856dcabc7bc0e143203797e0","compiler-rt/test/fuzzer/TraceMallocTest.cpp":"10f27372cff79dda93b5cb80b0c7e5cbf315a62fd4788d9ae93845294ece29d2","compiler-rt/test/fuzzer/TraceMallocThreadedTest.cpp":"02aabac8d353a88b6114921666b0bb751c993e38a99aee16cd370bab6a297316","compiler-rt/test/fuzzer/TwoDifferentBugsTest.cpp":"02a04803364482f76af9085d177ff268f234124e155f1420a7e50e9a63c09344","compiler-rt/test/fuzzer/UninitializedStrlen.cpp":"da39f42151fe6e8c309ba898ba5c605918ece11e9a1c07975113a1531c7c62bb","compiler-rt/test/fuzzer/UseAfterDtor.cpp":"0949c47e71ff839c766cb044f0b4d4c9c02f7ec14b48686827e61b892a411e95","compiler-rt/test/fuzzer/acquire-crash-state.test":"2287c3fd6ac43337a72953b1bf21200a0616ad785f28c5fd1157801b6fa749ab","compiler-rt/test/fuzzer/afl-driver-extra-stats.test":"e53ab3381745ddbb1e987fca25add83c531f57a9837552a5b664c5d855848d97","compiler-rt/test/fuzzer/afl-driver-stderr.test":"7468fe6e4192c4ca32886e1e148e7d21ca06c489952169c28119e56adb619f52","compiler-rt/test/fuzzer/afl-driver.test":"130458ed483e40f96db6b80b3d4aa81bb2b100fbb0d5cd6da0c56000a4b0835c","compiler-rt/test/fuzzer/bad-strcmp.test":"1d9dd318e897ce4e76acd98a39148dfb378b58ed981b530001cedffa56f2a9c4","compiler-rt/test/fuzzer/bogus-initialize.test":"13d783bf64256d011a22b8df864bc46a37cbaaa1ef188e791380b17ff0834308","compiler-rt/test/fuzzer/buffer-overflow-on-input.test":"58d75771d10a91f8bf731ff22736e00698cd7e4c16efcb415ace050fabb5b06e","compiler-rt/test/fuzzer/caller-callee.test":"1a053313532918f5b5d7706ad7113617e045046405ea5b48768503b9a0cb5530","compiler-rt/test/fuzzer/cleanse.test":"b48a404f32ecec3c8914e2355a5cc6d8aebb0509b9d3fe8d91f063edeb546e5f","compiler-rt/test/fuzzer/counters.test":"809c4ffaa0ae5510b22386b91f63f7629bfd7ac25520f3ec380b6583277e104d","compiler-rt/test/fuzzer/coverage.test":"43da7036909a5374de5de747d0f66ba1024c3fb8b190a8b5b0394d7bd4e52a55","compiler-rt/test/fuzzer/cxxstring.test":"2a556f49c3c6042e83643b09d5e3ff7ab4d3d7bdd604fd50fcaac3de8b766087","compiler-rt/test/fuzzer/dataflow.test":"f6c4d2eca71d594f5df811aaaac3b12574cf6cf37cedc884dbd68b1c2cf9a202","compiler-rt/test/fuzzer/dead-stripping.test":"c55677f13e5d39a33b6f178931739296dc68a4e4c985cb77aec1e3c279419404","compiler-rt/test/fuzzer/deep-recursion.test":"72b2bd06342e6b2a7069df0c233340c7d919f3f245d39daa31d0a5da12466141","compiler-rt/test/fuzzer/dict1.txt":"36d49adb61f86381c1e98e42cdb14001b57e4fa795083a9695b9fb03e446dae9","compiler-rt/test/fuzzer/disable-leaks.test":"186b8daccecf48957e5599718b08189d994b3826cd781fd8beda1579c9f4c94d","compiler-rt/test/fuzzer/dso.test":"510361062f5468067cf6d9213fa3e32c1bd7be62358b4896157b602a386a2f43","compiler-rt/test/fuzzer/dump_coverage.test":"57da9f34349cd4deb993c6b92b054f22e34e0920d471ffd446738e86583b02ec","compiler-rt/test/fuzzer/equivalence-signals.test":"433796d5fc5f8b9620429fe2ee6b583baa9cfcf39ed3e4c55c323451efd238f2","compiler-rt/test/fuzzer/equivalence.test":"56cdf94e8f60e034d61acbb49dc4b513f918b0e61322025f0e663002cd032680","compiler-rt/test/fuzzer/exit-report.test":"243e8509d4b9df3bb650c1d86b2c000fde3d84860aea81b2a4a1d72492c4dcd4","compiler-rt/test/fuzzer/exit_on_src_pos.test":"418aaa551fe5278847e23e1e15507722636c6b9a2efcbd4a3db2aed728cdc4ef","compiler-rt/test/fuzzer/extra-counters.test":"5af83bc0095a89566deaea58f24f77fe2d1d796ca2770e5083a30776cbdbab38","compiler-rt/test/fuzzer/full-coverage-set.test":"e1192786fea98cd9d10c90e68bbcdce7501e551a1be94976bdc56bb355b554f0","compiler-rt/test/fuzzer/fuzzer-customcrossover.test":"c392da7f8ac1514fb90e6d2200a46fb89e4232671cdc4d8cc1f5a2fb6db541a4","compiler-rt/test/fuzzer/fuzzer-customcrossoverandmutate.test":"1bb1321e1408b9a2119c8837f8f66a343430b5be56c32eb4985386cc56e05191","compiler-rt/test/fuzzer/fuzzer-custommutator.test":"8da9a46864f7d7039d3e8fadcbc17a96a06f64f66a40d96e7d82ff03d61db517","compiler-rt/test/fuzzer/fuzzer-dict.test":"f7bdfbe60240c68642ec948eae6f239ef2a2b96d8555175343daf8ffc4ffbe59","compiler-rt/test/fuzzer/fuzzer-dirs.test":"754a3246f2f228cdf841828b23bf4485d6b3fe0ef3c1d4c297dd3e19498aed94","compiler-rt/test/fuzzer/fuzzer-fdmask.test":"a967fe7e50e9175203bf9c34386a9216dc0b49924aff94046627f874a1310974","compiler-rt/test/fuzzer/fuzzer-finalstats.test":"d8645dc63bf5d6fb077ee62f66a63131c8757f0a8e958973bf43bd50b5f4acd3","compiler-rt/test/fuzzer/fuzzer-flags.test":"19e3a5ae657a5f72b139b76c43e3d5f65831e85c60fecbcd48856ed48d5851db","compiler-rt/test/fuzzer/fuzzer-implicit-integer-sign-change.test":"286e509368058375da8cbec6f987e4d077af6aaab3dbd415096b788ad769008d","compiler-rt/test/fuzzer/fuzzer-implicit-signed-integer-truncation-or-sign-change.test":"009f5fdb49e2b9556ec214f755e1d45ebe4af88f51d0888c7094d4922a4702ef","compiler-rt/test/fuzzer/fuzzer-implicit-signed-integer-truncation.test":"deb3087e4d9ab9a51c47d3fde767bfe92009fd954433cea4be0f0473496b72ef","compiler-rt/test/fuzzer/fuzzer-implicit-unsigned-integer-truncation.test":"0a35da44e9b981dd8c026554a11f27c9f6e590d9f827af594808a096a2bc4659","compiler-rt/test/fuzzer/fuzzer-leak.test":"bd2042323eca0f93a4bfd0ecfb0c0dc9d06add5c93d9c3756a06ff6dc86ec0a2","compiler-rt/test/fuzzer/fuzzer-oom-with-profile.test":"23d462d996235c6ec8e98275197a74de98bf63b201747c423cf2ac9e06cd418a","compiler-rt/test/fuzzer/fuzzer-oom.test":"157c5e25dd5d414be773b37a2bb64cf499e9f053332a91b4c7b7638d064740a0","compiler-rt/test/fuzzer/fuzzer-printcovpcs.test":"192e82f63fb6a218b916096a666db004f81d91c92c78a7f5e2005b435be39b97","compiler-rt/test/fuzzer/fuzzer-runs.test":"b75bab6afbe04a40d26630979260fb8120008b38a65e10e339bed373d87bda0a","compiler-rt/test/fuzzer/fuzzer-seed.test":"7e2c31c68ad21a057cac8567c690748fd36b24cf1c3ae47c7327babe7829ccdd","compiler-rt/test/fuzzer/fuzzer-segv.test":"de42beb86d73ddbdb37bc53ca494822373107b869195a704490251ea77877b18","compiler-rt/test/fuzzer/fuzzer-singleinputs.test":"c18b18ba6dda0fe9835e63ff1d0c42b20468c7b67412795d518ca9f77c2f915c","compiler-rt/test/fuzzer/fuzzer-threaded.test":"e87623f6be24591467ed16540d816dc4cc2c0fa478dab658d44e646fecd5fb58","compiler-rt/test/fuzzer/fuzzer-timeout.test":"b1dd0f1bd7c51ae511a16c0b2acc9115a933797e1f3820c1f4eb83a4d4b73148","compiler-rt/test/fuzzer/fuzzer-ubsan.test":"657e3473b3c879b2939eccaa707777437957ded4497f006ec99ffb94ab3bb51f","compiler-rt/test/fuzzer/gc-sections.test":"29b862dc87327933192eb6b7cbaebdbdd91250573d1ffab3314d633fa57a85a6","compiler-rt/test/fuzzer/handle-unstable.test":"849a6d3f464a5a3f1f0192d7b01cd1c9329bf726167b74102c296acc8371ad50","compiler-rt/test/fuzzer/hi.txt":"ca51ce1fb15acc6d69b8a5700256172fcc507e02073e6f19592e341bd6508ab8","compiler-rt/test/fuzzer/initialize.test":"7712387a1781376bb6947054a804c3342b327933cdba2f4a276d6a614c1ac65d","compiler-rt/test/fuzzer/lit.cfg":"19597477327ca05f2fe118de504f5b143dc2256c3f2119155c789abc5dd6e005","compiler-rt/test/fuzzer/lit.site.cfg.in":"ad2ede590cc280fe9658579f299896c3aa13095640ca1484cb4c7a01692d9d5b","compiler-rt/test/fuzzer/max-number-of-runs.test":"57693b41839f17dcf62491df7f76a97a430b597b8beb560bf210600190ac98c2","compiler-rt/test/fuzzer/memcmp.test":"b0ed72482747b050b68f2dc0c32ee8b9022817fff46ee1b95a73ad1e15b23b07","compiler-rt/test/fuzzer/memcmp64.test":"ff81fca3cc9a1611c24e5f0fb62a44277411154761a70084d1d641c6c0be9f73","compiler-rt/test/fuzzer/merge-control-file.test":"dc11bb7bdf48658659979036a9d5007d3f65f59ee22e4f3d8b9e790bff1143b4","compiler-rt/test/fuzzer/merge-posix.test":"ff0eb7b95cddba053cdc6a5e4bfaab7606ae111f37d9f79ff797a09dc665d629","compiler-rt/test/fuzzer/merge-sigusr.test":"8867a34a421867b92b5e6aeb59b5676a216fe2fbea8b458654c58597a4990b1b","compiler-rt/test/fuzzer/merge-summary.test":"4b9a7f0a26fff21ffbdeb9374503bbe0668c47a5486f09ae66f1ef0d3fe9a250","compiler-rt/test/fuzzer/merge.test":"6658702174003c50a57a57611bb3de41adf26186c9ceed82e48594a6bb9cc716","compiler-rt/test/fuzzer/minimize_crash.test":"fd73c3272d78caf4539edd42ce878b0c7aafa5b5f806b5970ab2c3b2bcbf798a","compiler-rt/test/fuzzer/minimize_two_crashes.test":"783efb2c4e4e852c295629241cdbd4808f13fb82527966d864c92783bc015e98","compiler-rt/test/fuzzer/msan.test":"f663b80c1058c881676b843c95109593b7ce3593e8d8925f12c78bdc3d037b67","compiler-rt/test/fuzzer/not-instrumented.test":"d1b797508adb9ece58d839143c05aa561e6022fa1b0813792d3beec8fa562e4c","compiler-rt/test/fuzzer/null-deref-on-empty.test":"292d736ca0909389fabb22bdb3d2c5208699f4212ba65b56eaf6c9dacf9f0d10","compiler-rt/test/fuzzer/null-deref.test":"f81ff66de6911103cc72308bfda50f7191f1bf9eda32290fa573391d3d189a71","compiler-rt/test/fuzzer/only-some-bytes.test":"b82f451680b604a56bd49334436891350a3d7a29584f8f183596cd53509583d3","compiler-rt/test/fuzzer/overwrite-input.test":"de9f596bb85c431fc15cd8c1aeeebddd14948d657fba94faa0bbc1acb2dceaa4","compiler-rt/test/fuzzer/print-func.test":"55fdaad3cbaab36f0d7354ad163e1493a33a4937fb223b23479a707c6672769e","compiler-rt/test/fuzzer/print_unstable_stats.test":"0de51734b196622f17560eee341abb005bd7024718b3c77a1ad8728a224e4a11","compiler-rt/test/fuzzer/read-binary.test":"9c2884fed4c9aafa40c0dca499e6c9efb40d9b72cbfa241c106f26223955e049","compiler-rt/test/fuzzer/recommended-dictionary.test":"98111265759fc80a725493f2a3be31efd9b4cf8a0e9f1d8627c6fcfe0cdc9f82","compiler-rt/test/fuzzer/reduce_inputs.test":"dd5120c973921c98f13b779be22250cb72c93d940fa16867ca73e3a850353a0c","compiler-rt/test/fuzzer/repeated-bytes.test":"f08f288fcf79b8688a130ea6784d1bb5639d02cebcbbdf359ba9c1bd82341606","compiler-rt/test/fuzzer/shrink.test":"63f9bf532826ad606123d72fb652b2ba96ee27238301147447ddf393c8cb356c","compiler-rt/test/fuzzer/sigusr.test":"691a5b38af51d8426580ef3e25392e0b1652f51ae69317ea4fc88913b523fe19","compiler-rt/test/fuzzer/simple-cmp.test":"a6df13e416ffb4323489ba47e59a10c76977596500d3c4c1fbd6283ed0d1d69d","compiler-rt/test/fuzzer/simple.test":"18cee6169c39288ad639c49fc7ce8522148bc65ceb2d83c95d9a75509a0fc679","compiler-rt/test/fuzzer/standalone.test":"cc743b79a61dfa56bf7710a5ef6163cfc00af5978b39f0754a4e080869220979","compiler-rt/test/fuzzer/strcmp.test":"02648cfbac159761907ba1c2dd956bb9a0283f736bb368bf5ba78e36a1465c9e","compiler-rt/test/fuzzer/strncmp-oob.test":"45796f0e351cb7e138e09f1df34b781e8a4a97a58d8f14c5c544c87e1d9d584d","compiler-rt/test/fuzzer/strncmp.test":"fef6c5e60a305a5acd8f979e1d1aa3ba0a1f02d2793a4ba2df42bbd3dc70498e","compiler-rt/test/fuzzer/strstr.test":"383684f5514cfba9c20f474f09616d608df894de811bd1f6c94bfcca2a4f0d62","compiler-rt/test/fuzzer/swap-cmp.test":"d8bd70ccf5c4ff89a53d938cef34336ff03b1cbd8b6335c6df76a88a140f703c","compiler-rt/test/fuzzer/symbolize-deadlock.test":"9474011b74938526a78cfec211371cc870601686ff7b0316c738520f79f041b5","compiler-rt/test/fuzzer/target-function.test":"e13d8484a9dca376e85653e3c0bfc221f125ac82423ea89d0c47d30dc5473177","compiler-rt/test/fuzzer/three-bytes.test":"19ce9f147689f403260aef32eab70706e71adeea19cd982f2c2ba5892ccaec09","compiler-rt/test/fuzzer/trace-malloc-2.test":"160199a9c752077d92436bdcee56155450ffffa7e7aaee9e0a4d575c3ea280de","compiler-rt/test/fuzzer/trace-malloc-threaded.test":"5864900c44272bc4f97e2bf024105e7cfbda54e63a5d43d76938f4c1820282a2","compiler-rt/test/fuzzer/trace-malloc-unbalanced.test":"4e29b084ab8530b9d7594112f0a7064ad2117b6260dcd468e5063afad2f1cfdf","compiler-rt/test/fuzzer/trace-malloc.test":"cd2e8422b5f2f3acdf91d69cb0ba818212e68966d50cf52108f62806fad74862","compiler-rt/test/fuzzer/trace-pc.test":"4d1e630ac544b2dae00014cc5b1f97032f598320ddcf7e190f2d180586969c0a","compiler-rt/test/fuzzer/ulimit.test":"678e9499a6fe5daf9c19abeecb8d5c2e5e50a09a1dac57c49c02a04ab3a7963d","compiler-rt/test/fuzzer/unit/lit.site.cfg.in":"4aaf6f0e572b8cd3b6bc1bedd2556dde748a231a5991c7e2a51d2f0b3928b72b","compiler-rt/test/fuzzer/value-profile-cmp.test":"cf8411c20f395f30c704d20495d9b8b467e4c71047b2741165edf9352775d7b4","compiler-rt/test/fuzzer/value-profile-cmp2.test":"f4c626ec9e299477ef0d9f61aa93fe0edf2a6e8670aa1d81df822ff02a70d812","compiler-rt/test/fuzzer/value-profile-cmp3.test":"53f3eb037a67cc25a6f88a610b27cfd2cf3dd4bb0c71555c00c3366dee1cc0ca","compiler-rt/test/fuzzer/value-profile-cmp4.test":"270179ad7f1a611317dc5bc17bbd56f7f4e75feb82b2b926c0f1d7255ef627d1","compiler-rt/test/fuzzer/value-profile-div.test":"f4b7e405a2f29f3d0df0eb2da6ed349ad7b3f3f1fb60e4cd450374478193a912","compiler-rt/test/fuzzer/value-profile-load.test":"cb8933bc6a1b87bb7bddbeabd6a825d9ad63f44245548743b2a857cbf0dee01f","compiler-rt/test/fuzzer/value-profile-mem.test":"a2a462d39b5eb26e44363b62490c277b10bdf86aca6ecbfaf189445e3ad5fe11","compiler-rt/test/fuzzer/value-profile-set.test":"791606fab94bc07c7c06c5623a86f804189b907c3d0949291b3034cf839a8717","compiler-rt/test/fuzzer/value-profile-strcmp.test":"ad7263e34174067ef6748ba68ccb7fda9c2353d0a4ae23e12521456b46619a36","compiler-rt/test/fuzzer/value-profile-strncmp.test":"9c32e58c8b12647fe61e61c6d956a0ff8198f67c72e7ec347c979d67256a3d31","compiler-rt/test/fuzzer/value-profile-switch.test":"023aff95f4d3e6916ffd23bfa3f8e4b8794e47171c894510d449f219d6252f60","compiler-rt/test/fuzzer/windows-opt-ref.test":"f9944a0e0080e2676e44247596f39484abc1bbb912474c344f97bbfe0a71e284","compiler-rt/test/hwasan/CMakeLists.txt":"fa3d7404edf04bbb30b3ebfa619d8e3b1ca6c6dc237f2843794f491d5d3a1f14","compiler-rt/test/hwasan/TestCases/Linux/aligned_alloc-alignment.cc":"7785ccc7189b31e00148669bdc5a76488335ef15f472c5c1aed5825386e1c36b","compiler-rt/test/hwasan/TestCases/Linux/lit.local.cfg":"752f9f465d546875972dbfeb1fce9b5ecdfa3ab1d0b6b756efb1047f93298b01","compiler-rt/test/hwasan/TestCases/Linux/pvalloc-overflow.cc":"bf416bab78ece9816790f7a83c05a2352f59d83c9cb989f3b6d8935b05f24bf5","compiler-rt/test/hwasan/TestCases/Posix/lit.local.cfg":"3c6afec951edaa5e426ac1590d3e67e4136b5ce61803cabf17f3c775a7279daa","compiler-rt/test/hwasan/TestCases/Posix/posix_memalign-alignment.cc":"fbba9ddaba71109855d3c43d57f36c92c11ad2793ec26b7bcd00f5d674ebd819","compiler-rt/test/hwasan/TestCases/allocator_returns_null.cc":"f03009a42ca1489c7f7871b5f70c956b882134b2f6a2993371edb309439b25f8","compiler-rt/test/hwasan/TestCases/check-interface.cc":"95eb21d2c676046d38e43cc1b0e429b240fa7e2cbad6272ef9d7a99fe38327fe","compiler-rt/test/hwasan/TestCases/deep-recursion.c":"3a58feaf951c7339ad433446fa832668b6f1ebd461214ca31254bde181d721bb","compiler-rt/test/hwasan/TestCases/double-free.c":"a563494b43940d7225d8e3b4bc14d65e454bce974cf97aa7476677a3a43ea5f7","compiler-rt/test/hwasan/TestCases/halt-on-error.cc":"db6cf4f6977ffa472ba5e428c78b9c7187b41ab793b0d16f8e2f661e328e8df9","compiler-rt/test/hwasan/TestCases/heap-buffer-overflow.c":"f9e640014fee5b0ad7b9c9da68458d498a0a6a770813b1fce720eb0a1687b42a","compiler-rt/test/hwasan/TestCases/hwasan-print-shadow.cc":"a88fffa5bbfc98e690f4a9f4c383a4795d5baf06d9a7a6ab5710be3278cfcd4f","compiler-rt/test/hwasan/TestCases/longjmp.c":"a46eb69190c517f513782936ced963dfbdc8a6d892a53a3b958665026397912d","compiler-rt/test/hwasan/TestCases/malloc-test.c":"2f268efb4f192d26cd913546e34dae4c241b8e1e88316e78ccf69528d4d5985c","compiler-rt/test/hwasan/TestCases/malloc_fill.cc":"44320b57398521c5596355b4d5025f0ff2d53703d2c2720ec972e68712e58857","compiler-rt/test/hwasan/TestCases/many-threads-uaf.c":"1b1352ecf9f9c9cd5c44008a74c1362d2f13d7c8b759802ea6fbf59ec37739b6","compiler-rt/test/hwasan/TestCases/new-test.cc":"8251155ed0b72497f7fdb347eb65b5615d3756fe663e108fe77ae2fd3bb70de9","compiler-rt/test/hwasan/TestCases/print-memory-usage-android.c":"fc90541ce930fa8d99ff2c8188a87625469fb8c52bbe0e0cbf892bc996130614","compiler-rt/test/hwasan/TestCases/print-memory-usage.c":"c0f95e01f2051951772f1b3b8ecaa6de9f76baa08ab98def7ad66ed51d1a29ef","compiler-rt/test/hwasan/TestCases/pthread_exit.c":"66c62fff2a5f06d604e8743ea20413486fbbd180490014bc8fca0df59c0072cd","compiler-rt/test/hwasan/TestCases/realloc-after-free.c":"ddd6e2a97b44d2ca1e17edca7b39a4aad20945afe11ed9a4a0765cff65ba2848","compiler-rt/test/hwasan/TestCases/realloc-test.cc":"9189fcd9495297a6ef9ad73b34bcf5be4a1056cc39ff31406dd7af70368b5a1e","compiler-rt/test/hwasan/TestCases/rich-stack.c":"c77a757e9796f82f07a4d7a5d5b369fb1e72e66a06060d8e627278894a316c0f","compiler-rt/test/hwasan/TestCases/sanitizer_malloc.cc":"4704ddc22681ef69c6b5f39ed5416cefb6bbdcf1acc497878fbf98ca52dcc698","compiler-rt/test/hwasan/TestCases/sizes.cpp":"4ee9814a8ead74406b0ca2bd047a5e0e9c1f028f54eb96ba9b0adf94e32aabc9","compiler-rt/test/hwasan/TestCases/stack-history-length.c":"522356074dfc3ddb5663b18857d40ca5b89572756a6b54d64338664f584b8ad2","compiler-rt/test/hwasan/TestCases/stack-oob.c":"eed266aa6868bdc66df735ff49ddeb85e6b5f35020ef7f866fa191a4cc1d770c","compiler-rt/test/hwasan/TestCases/stack-uar.c":"35adaea2b889733ef606cdfc230cf1d6568f03d65dd9f0e76b62b62bcedd1a59","compiler-rt/test/hwasan/TestCases/thread-uaf.c":"783671a263de9ca04d97fdc1b2e162a42ef0ecc71821797403914af429391e21","compiler-rt/test/hwasan/TestCases/uaf_with_rb_distance.c":"0f65c4447413c83308cc05d1685ded897259a6578e31f229e7381ed2bd97b734","compiler-rt/test/hwasan/TestCases/use-after-free.c":"cc70b4f2e58608396a78bdc4a315e82fe728bcec8247108d5544f43f4d19090c","compiler-rt/test/hwasan/lit.cfg":"b08eb01267e6f548fdf3b5817f845f50b00441c7287c5ad7ef4c0c8b0e507a6e","compiler-rt/test/hwasan/lit.site.cfg.in":"e58f15dc7b60288e93d1342e5b257747151f22395caa4382724d0ad1e11a41a1","compiler-rt/test/interception/CMakeLists.txt":"5b6ac181334978e6b99239e0272ef06d515b54f32aa6e7a2b6c372cb7e2760d4","compiler-rt/test/interception/Unit/lit.site.cfg.in":"47304c34b850dcdb79c098a9d0e9fbdfa11418292a915846f573f85b646938b6","compiler-rt/test/lit.common.cfg":"0fdf7a6c27430533a14540f5f8b443771ca6ce1ab07bcc2d7314353cb38785bb","compiler-rt/test/lit.common.configured.in":"c8a8a7c024fee579cecc6cfb2bd156f20c83e36e470d648730803f154f04325b","compiler-rt/test/lsan/CMakeLists.txt":"e3054d3b0eb5e7754112ee37ce659b915ebfe1be09de348455c5bd7dffa6ebde","compiler-rt/test/lsan/TestCases/Darwin/dispatch.mm":"84c5aa8da03d89543d7570281c79a92226d7012eaba036af950f72ba9fcc00ad","compiler-rt/test/lsan/TestCases/Darwin/lit.local.cfg":"67ea8448cf3507eda12a63f0981890bfcb7959532eab5a4c303900daa5788a30","compiler-rt/test/lsan/TestCases/Linux/cleanup_in_tsd_destructor.c":"73c8a57258e0dca4a372ceb61d9110dbac7b1adcfb3b8f591f77c65baf1a5791","compiler-rt/test/lsan/TestCases/Linux/disabler_in_tsd_destructor.c":"e2dd7927e63b47c7ba4f76642cdb7ed7cecc20f56076a0bb95b067be808cc47c","compiler-rt/test/lsan/TestCases/Linux/fork.cc":"2758ff78eea28df6fc62e2b872bb948c0f0f36f57bcd67d463daf453e1b81255","compiler-rt/test/lsan/TestCases/Linux/fork_and_leak.cc":"740509a244ce3a1ea6a07d86b41330b650ca0ab009a893b6519003a1d24df49c","compiler-rt/test/lsan/TestCases/Linux/fork_threaded.cc":"71430996d9d7bbaff3b95576ff9d6cb4c43ea9d6609499e62d569bbf85bf1653","compiler-rt/test/lsan/TestCases/Linux/guard-page.c":"e1192eb9305bda86416383d664616ce401436b3052c5984a5753012bda787758","compiler-rt/test/lsan/TestCases/Linux/lit.local.cfg":"752f9f465d546875972dbfeb1fce9b5ecdfa3ab1d0b6b756efb1047f93298b01","compiler-rt/test/lsan/TestCases/Linux/log-path_test.cc":"c86d2b2b61ae5c0c88292a9fac6af63f5ad6f6d960970762d4795dae13eb84f5","compiler-rt/test/lsan/TestCases/Linux/use_tls_dynamic.cc":"a061da747f19daaafd4587649961b17a3d9d25b6119909c5e20dcce10664d693","compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_dynamic.cc":"acaa592bc76a78ed6f49c7bf95b72f456ac636739ddbb22465f9e7e47bcf81ac","compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_static.cc":"93dd4581173eade7574df4a120e9d327970eccf912aefc957407bd3175ce89f8","compiler-rt/test/lsan/TestCases/Linux/use_tls_static.cc":"a6b83932ae3d2ebca82052c082b071847651df396d6194394bf2d1a1139d501b","compiler-rt/test/lsan/TestCases/Posix/lit.local.cfg":"3c6afec951edaa5e426ac1590d3e67e4136b5ce61803cabf17f3c775a7279daa","compiler-rt/test/lsan/TestCases/default_options.cc":"372ebd7e61b4fbd71fa3b0c883b54259c22bbb58920e9ae07aaf5c4d332577e3","compiler-rt/test/lsan/TestCases/disabler.c":"9b8fe4ad21ff68a52e8df70fbcdf01301b99d60a3807a2f3c3ee709b598fb28a","compiler-rt/test/lsan/TestCases/disabler.cc":"c524754967379b7c1a60ab84b183611459aef7a78fe7321a1162bd9b81d5e75c","compiler-rt/test/lsan/TestCases/do_leak_check_override.cc":"325da9ae3dcd8b85dbe6e610a453f1ae07905dd8413227724fcd6f8e2183da86","compiler-rt/test/lsan/TestCases/high_allocator_contention.cc":"ebbdfd4041fcba9c8b451d895ecfb67bb472875fe6f02f427a3959e558655045","compiler-rt/test/lsan/TestCases/ignore_object.c":"49b5b6d3ac2ece574dee4dbf90d50cebb949f0e814400aac8d6e8402408883f1","compiler-rt/test/lsan/TestCases/ignore_object_errors.cc":"c5e0debf23410f866e54c1e0e56d4ff9ced0ef534b899ae8575d185991eb0d9a","compiler-rt/test/lsan/TestCases/large_allocation_leak.cc":"fb7448ce3154e2647a6acb665c6ea4de3c006f2422de937e2f82f501e9f3e764","compiler-rt/test/lsan/TestCases/leak_check_at_exit.cc":"d0a7ea2e4727ff8ba93c2fed83bdbf55eb18d1719ca6aad76e2442553453fcd5","compiler-rt/test/lsan/TestCases/leak_check_before_thread_started.cc":"0f78cf9eef02f21f94372e6eb8207c3cc1910202967c8955af0a0cc9a1ce8779","compiler-rt/test/lsan/TestCases/link_turned_off.cc":"a745c3414883c3ba9ceb34be59ca34434709414532dd23504b5d9c2d74b38bbf","compiler-rt/test/lsan/TestCases/many_tls_keys.cc":"111c716462cd6e7ca8d5b851bf40d6d20787ae3495b4bc212f608b03ebda4ce6","compiler-rt/test/lsan/TestCases/new_array_with_dtor_0.cc":"7061158dca9748f6d122717c436108fbf8e2566da6040d05468691996062fca3","compiler-rt/test/lsan/TestCases/pointer_to_self.cc":"ec471c111d07beadbe3ea4db377443fbcdbec90df20dfbc5885a30aa4b1d5168","compiler-rt/test/lsan/TestCases/print_suppressions.cc":"4bfa90c742070e3748dbc07cc47a4dfefc404dfec2d454945c31234983e8c34f","compiler-rt/test/lsan/TestCases/recoverable_leak_check.cc":"c8a9bce778e7ba5045c05616d49b1991cf82ffd735870610f5aeb0b60851ec16","compiler-rt/test/lsan/TestCases/register_root_region.cc":"1746d0a18c8a2fee81ed3744dce34c7a81121ba679d57566eb32a547e70c8263","compiler-rt/test/lsan/TestCases/sanity_check_pure_c.c":"81ebf6d285e21767d4ecc44182e5daed870df32006eb8ee3f5c99449cfa8e650","compiler-rt/test/lsan/TestCases/stale_stack_leak.cc":"399f81191957c3d00eb6bf0e87ec04be2aaacb0c4d228ec92e808aa1e78023e1","compiler-rt/test/lsan/TestCases/strace_test.cc":"273e3696fcc71ce4616a59d597c3eb6ef62bb373f3d686fe6c4685b36281186e","compiler-rt/test/lsan/TestCases/suppressions_default.cc":"82e687b6da84cceaf9a999577b0c3baec4a8f349a60902eafa86acab4ad3bc3a","compiler-rt/test/lsan/TestCases/suppressions_file.cc":"ce5fd0f0c07c5cf9d988c93913613957d718e371242b5cae4d9cd7217773e6c3","compiler-rt/test/lsan/TestCases/swapcontext.cc":"d3b5375ef67f04f044080dad392bd369e51217afc358d70b8b991615f49c246d","compiler-rt/test/lsan/TestCases/use_after_return.cc":"cc5d2f78366d1816de623a99bc1a334ffbed90bdb1bf1cc50c1db34389bdb758","compiler-rt/test/lsan/TestCases/use_globals_initialized.cc":"e8841f605a9950db8129d4e672244a4aa58a62cc165259b5d34722bce73d499f","compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cc":"83f980e3b521083c2d1c4c68b2b018d37938b1aaa6ad5adbff3fa7c3627b4769","compiler-rt/test/lsan/TestCases/use_poisoned_asan.cc":"cc95fcab19d60a5d71a43b9097d6f0e9c6d58312958f72df3fc1f14a719f2a2f","compiler-rt/test/lsan/TestCases/use_registers.cc":"abb690402690cca8fe9078bd3dd3897f95f0cc4769d3a017f3c432ae01a6983d","compiler-rt/test/lsan/TestCases/use_stacks.cc":"aa38272e036e8919e2e113a6ad16ecf9a07baffd76f5a8cd64c4f7351cc7a561","compiler-rt/test/lsan/TestCases/use_stacks_threaded.cc":"30b9a9b93035736c5cb8d0b4e7e6133cd87de99036bd726918d7dada2d286ae2","compiler-rt/test/lsan/TestCases/use_unaligned.cc":"36c35a7d64226b20fb1c8bd58d288765357667cd2db6d6316298657624791bfb","compiler-rt/test/lsan/lit.common.cfg":"329c7fd81e772897d0ddbc2f64ee3182de93831af6229c4392f2c30dd7659101","compiler-rt/test/lsan/lit.site.cfg.in":"71838d911bad370977219407dfe318becde3c651579bc4e78686d63c0c86cc20","compiler-rt/test/msan/CMakeLists.txt":"a8736cb445c671ba685417e1dd7cfc21dd57104aaae949e1297ffff161696276","compiler-rt/test/msan/Linux/cmsghdr.cc":"a86e6173d6060bb45a1dd13beca713fc14b86d9841c94806c9fb5d27de57fd6d","compiler-rt/test/msan/Linux/eventfd.cc":"de1cd04e5c9728a0a06967b694a89a4b2d9304fbf460338634fbb04cd8658137","compiler-rt/test/msan/Linux/fopencookie.cc":"8af167285a77bd47b015aeef4e439e0dd1f26a8b2a20dc5bfe4039cb566b0f6f","compiler-rt/test/msan/Linux/forkpty.cc":"87140fbe3004b9d93970a2bf9bfa2d8dbdbab4530d9632e5bb02d5f119366040","compiler-rt/test/msan/Linux/getresid.cc":"807ad78ec9b2aacc40473dfce208d5628d30342005accd231bc00ad19fdc1c6b","compiler-rt/test/msan/Linux/glob.cc":"c945d9793451e16047f24e8876c5bd64214cf023484b7119eb9282390bee6674","compiler-rt/test/msan/Linux/glob_altdirfunc.cc":"55cea7d9eb722071dbd843ac6d163602d37664915aa4da7c018ad3e53eb5bb2d","compiler-rt/test/msan/Linux/glob_nomatch.cc":"e238f6316c62e3f12870f648a3f0b3ada3a1746b53886d720da0b8552eeff560","compiler-rt/test/msan/Linux/glob_test_root/aa":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/msan/Linux/glob_test_root/ab":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/msan/Linux/glob_test_root/ba":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/msan/Linux/ioctl_sound.cc":"eb3736570e290d0451e94008347420aae915ca0e6a5cf322c6d6f09a38a2032a","compiler-rt/test/msan/Linux/lit.local.cfg":"752f9f465d546875972dbfeb1fce9b5ecdfa3ab1d0b6b756efb1047f93298b01","compiler-rt/test/msan/Linux/mallinfo.cc":"f7cfb65a4948ee521ea16ce0fa00ec4fac2490fa7213878f9f167888b54fe46a","compiler-rt/test/msan/Linux/mincore.cc":"093ea2ae62b4b905410b451e13566283cf7502fa3626c3b9f1f95213e7884084","compiler-rt/test/msan/Linux/name_to_handle_at.cc":"15e808353d03bafee56f4ba90520b41a721dd5a1d4cea242806004768c65ac7e","compiler-rt/test/msan/Linux/obstack.cc":"5ce900437fcb09d3e456423b9a5bb78a04e0b6e07386828c3f69910ccff72642","compiler-rt/test/msan/Linux/poll.cc":"6904c31248f68e8af1902488df95da8e14aba91ca48239a987ad58f6a87685da","compiler-rt/test/msan/Linux/process_vm_readv.cc":"e8a5230944f78e47982e8e26159face992399c388b9cbea87d02a6bbecfd3bb2","compiler-rt/test/msan/Linux/reexec_unlimited_stack.cc":"dad7b631020094fa302c9361075601968148ba2abc2e11fd3a4d3aabb29ad428","compiler-rt/test/msan/Linux/sendmsg.cc":"956ab0fce2c154c5b1e790f3dcfba40e99b4777fa0dacfc477de2c809af880a6","compiler-rt/test/msan/Linux/strerror_r.cc":"b8479b6de14a3bb6fdf872cb944c260ea509c2d2a78369716f3fcc829b9a575f","compiler-rt/test/msan/Linux/sunrpc.cc":"c330ecd91d60082155b513016af3306de62e0f6435486a80d23ea4d7141c1126","compiler-rt/test/msan/Linux/sunrpc_bytes.cc":"a258c1a0112d3ddfb6a561adf9b34bd8e0ffc37cc31a6f45ff4f1b44f697d8a8","compiler-rt/test/msan/Linux/sunrpc_string.cc":"dd0a72021e7ec19dcbd9f36e99f94ea7a6c3ae957b00dc8463247a9fdcd7aebb","compiler-rt/test/msan/Linux/syscalls.cc":"631ff22e11e04dfb2a9296d98c3a16cf08e8004cb355ebe0dafccbf122cda996","compiler-rt/test/msan/Linux/syscalls_sigaction.cc":"c13490e067eed49ec6ce216626b2c43ee74653b6b670391269ecd0d6977f1ec2","compiler-rt/test/msan/Linux/tcgetattr.cc":"822cffad4d1b9863743691d8a1f335dec6b4a0df105d6dd5a6e9637562baade5","compiler-rt/test/msan/Linux/xattr.cc":"bff1f2fc7bec062ad4c4e36e342991c3e76edb602f6ae45bf9cd2f49f7781119","compiler-rt/test/msan/Linux/xattr_test_root/a":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/msan/Unit/lit.site.cfg.in":"8e4836fa12df92168d1f5cc98c61f6434b32ffb80f40e82e3ef5aacb485622ed","compiler-rt/test/msan/__strxfrm_l.cc":"9269967eec803f47db84dae1f5499e31cb2a8be9ff1e32e8d66009a09eb4a645","compiler-rt/test/msan/alloca.cc":"751fb5ca87c873e246858760562b06e7f92c7fc5571c66a49ffb2c03578bf68e","compiler-rt/test/msan/allocator_mapping.cc":"c1d578e548053f089cd7cc31a30c07a4d11669b62f3862fbc74059b7f630e580","compiler-rt/test/msan/backtrace.cc":"c1ae4c2b248e99f9cddc2f4d329fda78065b261ab0944c455409dfc1f34f7102","compiler-rt/test/msan/c-strdup.c":"66268b2b7633c8b21858014ad031da819fb1294c2320c9c63f5def5388b68e66","compiler-rt/test/msan/chained_origin.cc":"f11c96b860f8f0156bbb66507b8a0b9dbdce83ac0d616de9e47cb7820de4952b","compiler-rt/test/msan/chained_origin_empty_stack.cc":"5c504a3107434497830c062b9f68b1f3d890dddf317880bfdea711a4d58fc820","compiler-rt/test/msan/chained_origin_limits.cc":"5ee5886bd0743fb553eba2346f5b0e69a210050ab3ed85442ca11e873d5c7dc3","compiler-rt/test/msan/chained_origin_memcpy.cc":"fcd01f4be03a5f4f98b62ec5bb5aa9d8f891e081dda9b25489044a1173c4c317","compiler-rt/test/msan/chained_origin_with_signals.cc":"955e6d4bd04c230a776cd49d416121d4446875af7097095a7bfbfadaf5e7e623","compiler-rt/test/msan/check-handler.cc":"67d894a250d040e1aff95ee1c50107434ce5255ee4cb664e9c429d9f6e140e0b","compiler-rt/test/msan/check_mem_is_initialized.cc":"9fbdfd01961a7fbf36c4e69fdaa45816ac41f531861d0643795afce8903d7b36","compiler-rt/test/msan/coverage-levels.cc":"9c9bf2a560113e7239334f863949b0ac56b0977c5ac0e0c3ec82c2e6b9ae3d25","compiler-rt/test/msan/ctermid.cc":"589efdceed5a8865a31b031eab5a1511c2317f8310b225ae83db86b3a6358503","compiler-rt/test/msan/cxa_atexit.cc":"8ba0fb3a4a5e900439cc74c6b518e32bcb550ca97f7d6707b4cea8650db1d66f","compiler-rt/test/msan/death-callback.cc":"bf4b5bcc822c495aa00837d449343028d97c8c2363618ae8baa4459068d9ec38","compiler-rt/test/msan/default_blacklist.cc":"0221ecd56cd58e0007ea1b9a8d01ce4f19e5b3104b8ce7cede8d366891e5449f","compiler-rt/test/msan/dlerror.cc":"e093ac5521e594b4b83e8cf8a14d4dbfd796ac8b6b3b3bcd58a50b62ca574c9b","compiler-rt/test/msan/dlopen_executable.cc":"db041cd390363bc684412dab334050c1e1858904d2d1f94a1e2854de11d14997","compiler-rt/test/msan/dso-origin.cc":"68ee502cf21b999bf29ae77495543f8e26362ced91fd71e8a68b234052c2f49e","compiler-rt/test/msan/dtls_test.c":"134d4a494b4a6f82a9e2203036c07699f4b5b2c672ed115f85cc65bf2bd86574","compiler-rt/test/msan/dtor-base-access.cc":"4b18382607db27b2cf0ba78184fdf7b5f5b04e1092dbb19618fd16e04c6b670a","compiler-rt/test/msan/dtor-bit-fields.cc":"ef51e411b21c53d39e18b901311cec2f590f8d5c950f9b72570457c72c2d1928","compiler-rt/test/msan/dtor-derived-class.cc":"17caea7a6991044f5a10e22611cf3ad43658dd22648fe00f75a235e75360fae9","compiler-rt/test/msan/dtor-member.cc":"f97e60e6a9148fe7e7ce5712046748e7602565ecd14a8c02dfaaa1aacf43a8d2","compiler-rt/test/msan/dtor-multiple-inheritance-nontrivial-class-members.cc":"b2372e7df41bbe203018afe22a7d99987fa52758b12d17a721c787bb493167c3","compiler-rt/test/msan/dtor-multiple-inheritance.cc":"c57a3400f55410491d1c91d4364be068392a61efdcb8ac708b9bbeda7030e254","compiler-rt/test/msan/dtor-trivial-class-members.cc":"ca2505bf69e0bfe09c049d6b11844cb689e80ff5b4ede8caa3ca27a01ef8c0e6","compiler-rt/test/msan/dtor-trivial.cpp":"29d88cebbfa4910edaddcffd409861a1aa29d3c376d4e008b5cdd1cb79fed7aa","compiler-rt/test/msan/dtor-vtable-multiple-inheritance.cc":"995b2617ec705811a66465bda9613f2bbe71a57356f39dab9555a18c9393ef06","compiler-rt/test/msan/dtor-vtable.cc":"e0a03bb6a9cc5ac5c3e2dd07fbd73446e217c778715e5bf04579c10fcf7e6785","compiler-rt/test/msan/errno.cc":"763aaa8325aceefdbd962f106c05e2a1fd6b32aaca30ca9d1006fc295866241a","compiler-rt/test/msan/fgets_fputs.cc":"3990b7fc772e229b49bce27b796b18eb10b7fd80e31218021fbd3554f4329465","compiler-rt/test/msan/fork.cc":"68f46c561446e0ff926ba584681d109a0bae3dd0552bfa5fb2d5b2b8c2ddc7d4","compiler-rt/test/msan/fread_fwrite.cc":"cf11bc28c6ce9f7264e2d5f7556ef69a2102e5f661be29fc8aad046931c30f29","compiler-rt/test/msan/fstat.cc":"9ad70620d304865be9049f33229cba52476502c0640569f0dd49cf7198ad7740","compiler-rt/test/msan/ftime.cc":"043833d5bc8c3bf82fd888e2215e0bc6c615fdf8cb94c1696b33c452d94cfa9a","compiler-rt/test/msan/getaddrinfo-positive.cc":"f6b5f6f7cf423642dcde76abb54279cd94056dc2faf132e1ad12b66418ccf3ca","compiler-rt/test/msan/getaddrinfo.cc":"f81d44f320ba028447dea0037e58a2e15a852fd430001d4c11c161fa93834ae8","compiler-rt/test/msan/getc_unlocked.c":"63c3a2e4d233f1443e6605a040a008d1cd933ffbcaf54d913d69acd79bdbc12b","compiler-rt/test/msan/getline.cc":"8272a5f60e08f209b55f91584c660ecfc5c84ab060891d39435e59b2b3943a4e","compiler-rt/test/msan/getloadavg.cc":"66e342402b71af17b57e62f3566a790b2eb11982152517b52c653c5f1c7c0fc2","compiler-rt/test/msan/getutent.cc":"bc230b883fadce50683fc8fc12b43f45c3521871ac2173cfce6a71bb4075f3cb","compiler-rt/test/msan/heap-origin.cc":"45d715ea1527a74dce69b55a2e1862ef1949e2f98e26913a8a8e6409375d9a53","compiler-rt/test/msan/icmp_slt_allones.cc":"53bcd9881e682f5dff50eeb2b062c081c7cea7bacfba6dc40184aac8460621b8","compiler-rt/test/msan/iconv.cc":"a3fb0c229887573d5b4a5a4acc25485bdc60ac5222eaca314beaf3c22d976562","compiler-rt/test/msan/if_indextoname.cc":"6a6444ee7b1d6f784deb0c6ed424b2c2751620d98adc4c590719a9d02fd64f23","compiler-rt/test/msan/ifaddrs.cc":"9b7ae37df3c5e33a1863d88a74fae7091ceb08c693fbc1e2c72abc2f3f43e581","compiler-rt/test/msan/initgroups.cc":"a970fd72730ab3b2d92837452e86ef7e8bcacb29a47284a2b81164b959068b32","compiler-rt/test/msan/inline.cc":"1e6be781f38ebc3e3cab4f4d60fb53ea6698d346d70cdd85303eb003fbb0c764","compiler-rt/test/msan/insertvalue_origin.cc":"27f2773833ce30ecf52d2487f4f351e9e851d4d74e3a9460def64f5e30735a81","compiler-rt/test/msan/ioctl.cc":"ee36fbd5f7ccad8cbdf2d9e09fdb404722f44f82a50e3e166425982635de685d","compiler-rt/test/msan/ioctl_custom.cc":"a56a496b18e8e1912ced21a0f7585e0d93db2331b56c44704c1fa00afb173c61","compiler-rt/test/msan/lit.cfg":"10469ddabab220f12215a3c5750e620470be23bb5fb863a4fd75163263d32b87","compiler-rt/test/msan/lit.site.cfg.in":"52e66c7009b28cc087b014fb98f9d0e5c888852175e157159de459a46719454f","compiler-rt/test/msan/memcmp_test.cc":"3965f09121879458686722a8780b107b41de9bb24b28e42ec529d04e835fec25","compiler-rt/test/msan/mktime.cc":"dfb410b8fbd50c899b5c75fe3a5391d96f6fb2eccec7d058bcc3eb921298914a","compiler-rt/test/msan/mmap.cc":"718a3708e7315ce94e1a7f02be9ea25560efa0e8ee5ae845c7ff4fe954708c55","compiler-rt/test/msan/mmap_below_shadow.cc":"be4793bda98a7f18db1df2083f467d1f6fbf17de4be9cfa5d7b5aa49cf69b8da","compiler-rt/test/msan/msan_check_mem_is_initialized.cc":"11f7a28c1fc4a4fea9b6bf14125ff31a4d2c4e39f6a3d31538508ded83d00de0","compiler-rt/test/msan/msan_copy_shadow.cc":"67d54ca2ed6824e8cf1e8bc2d7058ab8134ed1ac5157ea82ec3126d64accfae5","compiler-rt/test/msan/msan_dump_shadow.cc":"3d21c2e2b89f9a362efff90e17349abba8af2350755317364642ae8ef11eedd8","compiler-rt/test/msan/msan_print_shadow.cc":"7ae6a590fbd2ed34326e3a0ffede605096c5a708c7f3da54d6324809bbdcabeb","compiler-rt/test/msan/msan_print_shadow2.cc":"f247c37eddf1bbaaf9117a70b914a102b9884ac5b84dfcec71472eac5fb47312","compiler-rt/test/msan/msan_print_shadow3.cc":"d02cf0d7ab9774962ad6851a8b487a386ae346c864bbfab98a438e8a6594dc3c","compiler-rt/test/msan/mul_by_const.cc":"9442818bf9135a6d196a91f996e49f34bcd0d7cc000c790f4e5b26b4348c1acf","compiler-rt/test/msan/no_sanitize_memory.cc":"4efffb4be34f5ebca72c0d4efe589199f0486f84e5c9fe40982617524fd0583a","compiler-rt/test/msan/no_sanitize_memory_prop.cc":"81336979cff5cbab7247676266fcfa6a75789cbed1b1e718673bcb7100b5f504","compiler-rt/test/msan/origin-store-long.cc":"a99f42d393c167da17506c5404ec2fec387c30a7f920861610180dcc14764fce","compiler-rt/test/msan/param_tls_limit.cc":"f56ca925812f165a2b6d1d74c5016e79e73e29f76d63e6d22a52b3173b96a175","compiler-rt/test/msan/poison_in_free.cc":"b876db699ae332927727c7334133ab2f75d90af6654b5697311ee45c5314b13d","compiler-rt/test/msan/pr32842.c":"17d541131b6b1e30ca3ee29c9a0ad32aceac07d070b80b524bdfaf0bde7e39e1","compiler-rt/test/msan/print_stats.cc":"18986a8fb7e1f66181ffaccc695c48490a4e2325704a274e50b821f1eea5e52d","compiler-rt/test/msan/pthread_getattr_np_deadlock.cc":"e7c851bfc3cbdf19acc2631fc90875809670a6b8cd14fec788b5140c98c75827","compiler-rt/test/msan/pthread_getname_np.cc":"d58e557a1f06ecf57b0ea7557b790fdcaa5da1580f2cc6b58059a7a3c2130172","compiler-rt/test/msan/pthread_setcancelstate.cc":"24bbf19dd236592cd035fc480e3fa97c9346988998068640b9e9797eff7a0dea","compiler-rt/test/msan/rand_r.cc":"bfa3a389a8090267d6343c8fd1f27cb65d61dd4fa2b45ee5ea78edbf63cce9b9","compiler-rt/test/msan/readdir64.cc":"bf8e2c31c3fe06e07fb3ea88dac765385aaa031872bc25a75991e9fa1f642ebe","compiler-rt/test/msan/realloc-large-origin.cc":"31f7d4306f44421fad8da7024f7fe8229e7b26dcd02edff5d813ae16a1cb27b4","compiler-rt/test/msan/realloc-origin.cc":"57f39afe1d44158a735ec30aa221e1a9faf77a4e16c0dddaf8c657feaa6680ff","compiler-rt/test/msan/recover-dso.cc":"cd574fc72edddf4d559a803bc5ece273a34f0becd56082dc7a63d73d7a6dc1d0","compiler-rt/test/msan/recover.cc":"46d4c496c317e13dc35decbcaa53c8627b8054a836830f7d89f5a384f42264aa","compiler-rt/test/msan/report-demangling.cc":"64046c08e29b8517929eee307e1c43610bf74ea730a0074fb24d0eeb0f2bc399","compiler-rt/test/msan/scandir.cc":"2bb5d3a2bdb4b047c4a36df784309ef962883a110347672afb6148261fe833f9","compiler-rt/test/msan/scandir_null.cc":"2015ff663768bcb665657fd950a4a37bffde31c92bc2742db452315c9c4bfabe","compiler-rt/test/msan/scandir_test_root/aaa":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/msan/scandir_test_root/aab":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/msan/scandir_test_root/bbb":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/msan/scoped-interceptors.cc":"b484c8a632ef968dd831ba0bf2e6e45d734a823ebc8e9765f57240c6681c3656","compiler-rt/test/msan/select.cc":"e6bfacdcda3795ff2367e011abea9e8597cdf1cc85714986c63c2ebcbb35fe9d","compiler-rt/test/msan/select_float_origin.cc":"448e20bb0449d591396de41a6a185702469760e94d9ecddf30cf6ac69834468b","compiler-rt/test/msan/select_origin.cc":"3abd810a279a329d86634bf850a5ced8cfe16318f073682b7e918de45969db1a","compiler-rt/test/msan/sem_getvalue.cc":"995367e00856dca0077f467e97ba3b3ece550bdfa3ab71f61bcc08bd31f5ba87","compiler-rt/test/msan/setlocale.cc":"608414450ba34712f0f9685b459171b18573605112b2d2e72a5c5d2be9557314","compiler-rt/test/msan/sigaction.cc":"ec3c125fc3d8e014fcf3b64082a12b2ac65cdcb88b13496a789c94c0c7ad37e4","compiler-rt/test/msan/signal_stress_test.cc":"f551aefbbbbcf3cf2b9d10721a705781c4aa49e3ff0f9fb500a7fa2317822d1e","compiler-rt/test/msan/sigwait.cc":"ae17c4e78860fb671fbb6e9af0830ab4cc1832430e2f43f21924d059b08a3758","compiler-rt/test/msan/sigwaitinfo.cc":"5febe8d08c878ff0e45c9dec491c0877576b08ce9732b8e4b2a2310730aceada","compiler-rt/test/msan/stack-origin.cc":"abdda1493571bbeb86f3c5723f316de5fc46ff9ccc1339cfc8e4868043267cc2","compiler-rt/test/msan/stack-origin2.cc":"9998718ed4be00d4c8e7c747578458753716adc165105111270aaf63e3d6fc5c","compiler-rt/test/msan/strerror_r-non-gnu.c":"5c908c0cf4d555b15619f4d15f7812d901255230b9f3dcd5c3650e802b30276c","compiler-rt/test/msan/strlen_of_shadow.cc":"90fdfedaaa10b98eff3a5239b447041b1c801a654bae4da7e56c7da90485d97f","compiler-rt/test/msan/strndup.cc":"2a754b7cf3fc59d89422eca04d68b01315016d4d9f495fa56f832f5d4415ff06","compiler-rt/test/msan/strxfrm.cc":"9f5dbbdff2f23e69f6e66253e1d3864149e8a7a8e688a7fa8405030a3ed98d60","compiler-rt/test/msan/sync_lock_set_and_test.cc":"4b7e69f2579626728a864756508eed376688d15b074d2734fe28078c87433b6a","compiler-rt/test/msan/test.h":"b200f81eb341fc87a45ed7f176cbaa981d1e5b1c2d5f1f8dc233c16c34110b76","compiler-rt/test/msan/textdomain.cc":"93099022abe8fd011efcb1164c932d551e9d17b9998e96a009411ec1a2296e84","compiler-rt/test/msan/times.cc":"e8242feff5b118b54acadb127dd55062fac24aaef4faa3b201ebdfc048740633","compiler-rt/test/msan/tls_reuse.cc":"1a43a0560965b8f29dfd50015cd9360cdad62f88023c540b97e70595b2270f6f","compiler-rt/test/msan/tsearch.cc":"1b5d1ad8ddc8152e845be20f09b3ce4b6616564c11b79c40e6f7c646766fd223","compiler-rt/test/msan/tzset.cc":"e9f626e6c3c7367e3f6b6b957ed14527b45239218ca1fefe2b8a46e606755ea5","compiler-rt/test/msan/unaligned_read_origin.cc":"71e91e8de2d80550a4e888699a64ecfc1386f1e1a79da488df6a4736f20f27be","compiler-rt/test/msan/unpoison_string.cc":"b510b8e081cf18bf33f935a68c966457bee1fcba076f66a5f53acb5c645f6f48","compiler-rt/test/msan/use-after-dtor.cc":"00a6dcce6d6b2f74ce5a527fd0a206a2b47c9679919b6755a8dd6de41615459a","compiler-rt/test/msan/use-after-free.cc":"ce3d27b44a5b1543ebb518a80c41e1750abea12fea5c580d920de2c104d2160e","compiler-rt/test/msan/vararg.cc":"60960a501c816955eeac69099af6415089afdc67d4e9cee9551c4a26cf67cd8e","compiler-rt/test/msan/vector_cvt.cc":"80d3054ae0c2a95abd72fb6b992ecf564d04763aa9221a72a0bb48b69f6c1f62","compiler-rt/test/msan/vector_div.cc":"df708521fa1e3a3edae28ab9e3e56ec61a4cf73e3659a68663887f328ee4d3b4","compiler-rt/test/msan/vector_select.cc":"14c5b2674b818206276010492b78ad64af17a65eb94bc4c97b0618fde351dd14","compiler-rt/test/msan/wcsncpy.cc":"0a030ebf866ec56595bae22eb6751711bb3ce4da22073be83d67ccd60dcd7ba0","compiler-rt/test/msan/wcsxfrm.cc":"6cc8753e7ddc59d0b79068265f722cfbd9b1708d250f1e46cd23e12b4c27c9bb","compiler-rt/test/profile/CMakeLists.txt":"41d4168cf096a84e89863ada2d51f6f55aa5e1f64f28217727ace4ccfe3dbb52","compiler-rt/test/profile/Inputs/comdat_rename.h":"104f52ff68eda54406de377f2d582adec7b50b74e1926a0d82c2b8a9deeb3a74","compiler-rt/test/profile/Inputs/comdat_rename_1.cc":"0fae3d7922448baa189c4d4e5c499de601cfe2887f82a9dea0d8061d8dc5162f","compiler-rt/test/profile/Inputs/comdat_rename_2.cc":"027a6aafa422b221148b813eaf7c658fb845f1a3b066a62fccf2f9dd58f22237","compiler-rt/test/profile/Inputs/extern_template.cpp":"b1166e7fba8d70d28874f6faa953f8388c618a2002e6a5f1741236791edcf04f","compiler-rt/test/profile/Inputs/extern_template.h":"758e2986cd50f0bb6a4309ca45144a228af6694244ea29e0ed775c99f5a76706","compiler-rt/test/profile/Inputs/extern_template1.cpp":"f93cf9e4fd8ccb012fc981dd782fe502ac7d8211d2a81cde4b89be5d4db33c3f","compiler-rt/test/profile/Inputs/extern_template2.cpp":"cd3e39c8fcf2ef990e3c39a6942363690c2d6e6e2220fa0e382ad1fe361579e5","compiler-rt/test/profile/Inputs/gcc-flag-compatibility.c":"73e13c89d221ce8bca7e2442fd4e8f0de4ed85bc087520f0814847cdeb15747a","compiler-rt/test/profile/Inputs/instrprof-alloc.c":"438635449fe9dbdef30eb184a38ae26bb7bcae700fc379ea6d27d3f7b6c296e5","compiler-rt/test/profile/Inputs/instrprof-comdat-1.cpp":"d745dcbdfb4abbdd274012117f4a047c0d775aef7ab5492c8ff7175ef5bdef51","compiler-rt/test/profile/Inputs/instrprof-comdat-2.cpp":"96784f5fa9081965df140da22eacf3bfdab02a2d128c317c4561686d3fb570da","compiler-rt/test/profile/Inputs/instrprof-comdat.h":"7bc89d2eed0584e6bbfe7da7f118c7e274c0d43ca463d5639f2068a1dd8ec1b3","compiler-rt/test/profile/Inputs/instrprof-dlopen-dlclose-main.c":"45deb30e56956ea5074617fc75b218386cfd39732d5df699471302188ad9f4e2","compiler-rt/test/profile/Inputs/instrprof-dlopen-dlclose-main.c.gcov":"83d6c155e6b2b57317dd089d37aa3a8c3fdb645fdaeb236634bcae02d12f316c","compiler-rt/test/profile/Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov":"a961e9b1aa43c09b1f00e1379c75a6a92100850eff73762c44a435816258a98b","compiler-rt/test/profile/Inputs/instrprof-dlopen-func.c":"7bd0bebd3ef26d3658f7aa5636d247a29c7b2f51443666397a291ea1d9f7ebbe","compiler-rt/test/profile/Inputs/instrprof-dlopen-func.c.gcov":"46cd1649c2b920f2ed6fa1452759a021e037a5ec4f3e2c0c8cc62fc266027813","compiler-rt/test/profile/Inputs/instrprof-dlopen-func2.c":"9b207d0881282913e8edca9d426ad92f6704bdd3aa41c3b911b4f7d6ab2035e0","compiler-rt/test/profile/Inputs/instrprof-dlopen-func2.c.gcov":"c5df559ae868a9c3c12d2070ecee1ec66e350a5c4b8e58f90d1672081b349c99","compiler-rt/test/profile/Inputs/instrprof-dlopen-func3.c":"223386316d058651861cd93909444f35d9cfca4d679950e4c5d32c846bc44101","compiler-rt/test/profile/Inputs/instrprof-dlopen-func3.c.gcov":"c5df559ae868a9c3c12d2070ecee1ec66e350a5c4b8e58f90d1672081b349c99","compiler-rt/test/profile/Inputs/instrprof-dlopen-main.c":"128cd3e39b53f96ccbd3dd3c8bdda799125016f035f886183b08c5b53fcb5a84","compiler-rt/test/profile/Inputs/instrprof-dynamic-a.cpp":"722786fca9758c938456ebd3ce07d5255d3dc80a7b5659c579dbb1d3a22c8d90","compiler-rt/test/profile/Inputs/instrprof-dynamic-b.cpp":"09688c83c0a56aff5dc9d594104f80bf719c63c85776bd413ba6f0232afecf61","compiler-rt/test/profile/Inputs/instrprof-dynamic-header.h":"3fd61711b13eaac1baafec762eef82b817188a93fe80f9fda48fa3791bdec938","compiler-rt/test/profile/Inputs/instrprof-dynamic-main.cpp":"d26f133d3764f316af688a3ef4916e6921bb2d0f2e3b6eaea2c16554adb33815","compiler-rt/test/profile/Inputs/instrprof-file_ex.c":"3a0f681b63f1e5c51d3adfa4078bef376b5324e2cd59734a0807c7953115e58e","compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-multiple.c":"bacf47631eae2f5f81c9ddc27051a647d02d2b5d850b1b4846ad75db56045c8f","compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-multiple.c.gcov":"f1ea6ec9bed3d04a7e8cdf902c4ddcc18461a22debca0cded299dea6cc09d09f","compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-terminate.c":"c8eef64d033c6bc2038acf43249aaddf34710c5098f2f6d66b07f0ff7255355b","compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-terminate.c.gcov":"d3a8caa44e0650b55df4b81290061ddf015b0e3da3cdfbe04715d75deaa7220a","compiler-rt/test/profile/Inputs/instrprof-gcov-exceptions.cpp":"b25f6ebd39c69ce02a7ce05a53e1479089ed463b33400ba4d0a96af37d360c3b","compiler-rt/test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov":"f26a90e45459341c6cf072f69d087a4fca554f9e431e6aaef476d81792296fcc","compiler-rt/test/profile/Inputs/instrprof-gcov-execlp.c":"ab1fc894b84ae6c6df63cdec30de79fbeac883c76d0ffe3379d5caa296ae575b","compiler-rt/test/profile/Inputs/instrprof-gcov-execlp.c.gcov":"20da34629176849bdb959d02936c8297e2df6161d5a2bfca2dd81972b8d088dc","compiler-rt/test/profile/Inputs/instrprof-gcov-execvp.c":"19552fe8f8d5448d659ed968bf45083c3229dc442137e098c5ddde7bda5a7222","compiler-rt/test/profile/Inputs/instrprof-gcov-execvp.c.gcov":"2441ac1d08232da81499e0b3a94ff3dae372d770b5f75bac744d59969ad4454f","compiler-rt/test/profile/Inputs/instrprof-gcov-fork.c":"2ea37e0740b6bb4322dc14c333fb2028daca32fbe94ab90a881e0ebd33150e0d","compiler-rt/test/profile/Inputs/instrprof-gcov-fork.c.gcov":"8e139cd39a73edaca1991eb366b300f3c74fabb51e1258c95e31e810eca8697e","compiler-rt/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c":"df9ca9402227332db1973b6ad99be61c0560d91063767711c67d4f6c4fe6f555","compiler-rt/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov":"3061e6762bc8e9c838cff442937c55cd1caaa718138831bc7fabf63fe1760fb7","compiler-rt/test/profile/Inputs/instrprof-gcov-one-line-function.c":"db95aa0f2a7ac1ef374a613ea73aa9e64f5352ef0f2e156027118abdc4bb29f7","compiler-rt/test/profile/Inputs/instrprof-gcov-one-line-function.c.gcov":"2c9103a3200a5b2cb9c5b12380347326c5ffec55c6a567acaf6e64675e91e046","compiler-rt/test/profile/Inputs/instrprof-gcov-switch1.c":"26c8ce198c030fe4a07b3cec4f0ac5c9b9d5c6e0dabc6cca24fac3a5505f17b2","compiler-rt/test/profile/Inputs/instrprof-gcov-switch1.c.gcov":"6d5f79321a60a191255889d6f584ca7127e1f69daaec440b6d18a5da7eb6c5b7","compiler-rt/test/profile/Inputs/instrprof-gcov-switch2.c":"ab5ffdb4f9ff0e0dbff98b51b23b6ebedc7d6ca90d28f7ac3772c1ad56826925","compiler-rt/test/profile/Inputs/instrprof-gcov-switch2.c.gcov":"1452ee9ca7dfcb598d8f2dad067857577484a85b39a4cb8d7928969c99d3e1ac","compiler-rt/test/profile/Inputs/instrprof-icall-promo.h":"df7748d30f5a2634f73f48370eb09864899de3400f652a2fce9ec34846d6c05e","compiler-rt/test/profile/Inputs/instrprof-icall-promo_1.cc":"ed72d8d1071067566c6ca5e82f9d6a497d4142727a0fab3141b1d6118b729d20","compiler-rt/test/profile/Inputs/instrprof-icall-promo_2.cc":"ffa25ed40bd90e1b00482f915641ff196c2645c1e736df4460243b24e6e9b8f1","compiler-rt/test/profile/Inputs/instrprof-merge-match-lib.c":"205043a69a11bb76f25a2205f737774dbb25896ae65e6436e234095c5585d06e","compiler-rt/test/profile/Inputs/instrprof-merge-match.c":"f3cc5f3807fc91424fb5ac419a3a61b9fb233ae003d585added7ee68566d3879","compiler-rt/test/profile/Inputs/instrprof-shared-lib.c":"2055b6e27391f1acc55a25882512d50366556ced122d88b3ecd34f75ec03ae42","compiler-rt/test/profile/Inputs/instrprof-shared-lib.c.gcov":"1cafaafe8c9e52dab1969adcc675557a0ed1587a566ceb9bf1964a27dfea8efc","compiler-rt/test/profile/Inputs/instrprof-shared-lib_called-twice.c.gcov":"2d40b19cf7a64dec4462545b43ecf8b58fe337a284f35eefac806d2292aa456b","compiler-rt/test/profile/Inputs/instrprof-shared-lib_in-loop.c.gcov":"3174172755a394dbbdfcac45fd44d284d16e7d4d2cfd044497f315cb48812fb5","compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush.c":"07ac479267019a345b9c9c3d2465f4ed0ef0fe13d6a2a6681af5807b818d7ea8","compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov":"01c214e6711641c5b56c98ce22cc72779f568f0aa909a41ecbb2bc343c3bae87","compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov":"f099cf64413dcd11ee6d54d981badb86b4e6b4671429d3aeecc8f811a5d92268","compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov":"7f222980ade6e3e83de5682f762d6653feb9881beff6e07c73b37448652a4780","compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov":"0ca723457b067241efb11960ed6dec2ce59f36e8b3e5409d716f459d10e67ffd","compiler-rt/test/profile/Inputs/instrprof-shared-main.c":"a5c8d1878a5f2dfcfebdd98c84a205a6ca80dd350c32c01fbb4d56921ab552e7","compiler-rt/test/profile/Inputs/instrprof-shared-main.c.gcov":"7503ac2907091a7414d2254839ac97efbe756f782c1bee299657c47b3e76ecce","compiler-rt/test/profile/Inputs/instrprof-value-prof-evict.c":"8e46fddaf5c083d69c11e42d3663c8add373ca552115601320841d15851563a9","compiler-rt/test/profile/Inputs/instrprof-value-prof-real.c":"2370fe63a24750b52ed9a4e587d8ed15db89a139984c3b2bb2567469d94b1ab9","compiler-rt/test/profile/Inputs/instrprof-visibility-helper.cpp":"c20d43b92581171faa5fced63b9723a8fe3136dee8ad6f04e1a8e65cb108c270","compiler-rt/test/profile/Linux/comdat_rename.test":"cf2f632a09c1a3a3fe25d34bb86b8b112d86237fee6adaf30c6960b9904a1cd0","compiler-rt/test/profile/Linux/counter_promo_for.c":"3ce0b0ccf0b9ace8e22c4bfb9f6f31aaae25f431b284455d0e5ddb5b45569645","compiler-rt/test/profile/Linux/counter_promo_nest.c":"6d780b9c3fb2f7de7021dd9c44d6bf492bf6cf8c61c9ff64e290d5b728da697e","compiler-rt/test/profile/Linux/counter_promo_while.c":"7d0dab2237b13118da1a4eb9d556e5be939edffd92ba26bdffc952e74fd9a17c","compiler-rt/test/profile/Linux/coverage_ctors.cpp":"f5a07809af1fa710a67867648eecbe2c3cac8622795ad599d7eaf7392356d397","compiler-rt/test/profile/Linux/coverage_dtor.cpp":"5cd122abb7ecde27f6c508883f68f70562fc6dc7023e44b3aca69501dd9cbbf2","compiler-rt/test/profile/Linux/coverage_shared.test":"b07b6d599eeef4c7a9600c3393dcc1f818e34c2347416e07813dda4476fb2514","compiler-rt/test/profile/Linux/coverage_test.cpp":"7a1c835e6b66705260be1de8741c6906b872397665a9bee07766e67b2e804952","compiler-rt/test/profile/Linux/extern_template.test":"78c44ac25f69bd00bb0d2eb3fe3835666d8829fedfb50b8b32cd88f7d260a8d5","compiler-rt/test/profile/Linux/instrprof-alloc.test":"26450b48bb2b7651c98d484f071da61e78f68a877d4cd1e719a06dd87deffd67","compiler-rt/test/profile/Linux/instrprof-basic.c":"91113ef973ec04c8c22b8edce52e6d344912589bf81380ce0c646a1914bfc745","compiler-rt/test/profile/Linux/instrprof-comdat.test":"dd311506c5963ece9fd18c229359ae482849387142ed3e5501fef50206daec40","compiler-rt/test/profile/Linux/instrprof-cs.c":"f501c4be7a6fbf0fe71009d980e78c30d9917304b83cab46336f9f8d7dd8b542","compiler-rt/test/profile/Linux/instrprof-dir.c":"c519983e0d123ae68a3dec7a7cc70fb6f76dbf2c839da062f4a3c57594d02a8f","compiler-rt/test/profile/Linux/instrprof-dlopen.test":"a8be49eb6cc52fa286636cfa7eb349fce8b4ec6519f394dfaa67253ef74a151d","compiler-rt/test/profile/Linux/instrprof-dynamic-one-shared.test":"2e0bcf0ba3d0cb3b8fed469b7c96c86e060034db2adce8b6c66ef8a7c8987a11","compiler-rt/test/profile/Linux/instrprof-dynamic-two-shared.test":"8ca08db18bdc6336bcc6e07512ddb088f64ca06cb753fa33708e0344f2ed3755","compiler-rt/test/profile/Linux/instrprof-file_ex.test":"d8777db1589d1ce1c48f760526104c772a0fe30774496ae36b1b301d73a2ce4f","compiler-rt/test/profile/Linux/instrprof-merge-vp.c":"144ac33ef53478bad736bc53593af2795060a46f802c85650f9b0804f36b1c68","compiler-rt/test/profile/Linux/instrprof-value-merge.c":"88ce27e0693e1bc9ebee67827684fad0b63da27c0f757dce7ace4dddc2cb5e19","compiler-rt/test/profile/Linux/instrprof-value-prof-warn.test":"db5eb2dfb8fe83c0eb0573bccee5fdfa473ad190af88c78ccf8ca7ffbfa9a7d3","compiler-rt/test/profile/Linux/lit.local.cfg":"4240b1b461c22ae2839f2872af3f7473023a5af29b4dc5dcc1305b352662cb0a","compiler-rt/test/profile/Posix/instrprof-gcov-execlp.test":"bbbb4727a758af3231e99201391c30b93b395d916fbfaf46ac670f197a22d57e","compiler-rt/test/profile/Posix/instrprof-gcov-execvp.test":"bf76b4acc9ddd566d5ca219e90700cb4b12e94970084fa0ed830490e0ddf9a10","compiler-rt/test/profile/Posix/instrprof-gcov-fork.test":"bbac17e18aa1d95499517f6f45e02da933c208160f681916e3c1010408f96258","compiler-rt/test/profile/gcc-flag-compatibility.test":"e48e3665d8e533680be2d045047804ab69af20857f85b00fc15b0dc79c724b27","compiler-rt/test/profile/infinite_loop.c":"5dadea4b806ddb7e36b722c6710da7a873ddf036666c44058ec991d56c95da0f","compiler-rt/test/profile/instrprof-basic.c":"4b3dee69c34f131df469629ab0279e3384c73db0bc91cfe79772ab31c6bb5fdd","compiler-rt/test/profile/instrprof-bufferio.c":"278ed0c1cd0004bd6dee7b3158c5ee26281742ee3a40ad4b9615033a4663dcff","compiler-rt/test/profile/instrprof-darwin-dead-strip.c":"e0d9e986a799c01f2678e3dfbf64b9edab563150b9967c954e0b63721c19b441","compiler-rt/test/profile/instrprof-darwin-exports.c":"2513265432a4f1e19ac23b6cad62c5e0c620704efd28bf30b2e6d541b1cfc717","compiler-rt/test/profile/instrprof-dlopen-dlclose-gcov.test":"5ba0ff5b6d5d64ddca5b578156549385cf0d1854eca02d1512ff618fa1289f34","compiler-rt/test/profile/instrprof-dlopen.test":"5658b4c41b8346d71feb8d9119d3ceb09f499a2d3257414c23b4fa68447a2efb","compiler-rt/test/profile/instrprof-dump.c":"976afcb6bc6fd48426ec5601945a537fbbb3885981de41ab38ebe31fc41c9f07","compiler-rt/test/profile/instrprof-dynamic-one-shared.test":"7410ae449263df423fdfa625a6e096af40eafb9232245c947dac8fadb97e72e5","compiler-rt/test/profile/instrprof-dynamic-two-shared.test":"0f7dda91a7232bd195eed93abb2b7cee99f345d6e923a14f2ad65d9329ea9731","compiler-rt/test/profile/instrprof-error.c":"dd653d54643707b0f956a8555a21ed556743272e105afa2654f740cf2c80702d","compiler-rt/test/profile/instrprof-gcov-__gcov_flush-multiple.test":"ca05c33e7e1abf4a4858a806405b0960d463b15394ae7630ed9b9c88d7f28a40","compiler-rt/test/profile/instrprof-gcov-__gcov_flush-terminate.test":"69498658d9956e1f43bc17f6c470a18e4e38784a539428a79a17b5d4a125f523","compiler-rt/test/profile/instrprof-gcov-exceptions.test":"186272c16b8eae01f676c81075286c355fbf5c3ad95ba36c20b0c4e4000e3812","compiler-rt/test/profile/instrprof-gcov-multiple-bbs-single-line.test":"7198d20eb2c1c18c4486ba280954ee1edac5dabd26a02fe8fc91243933ca053e","compiler-rt/test/profile/instrprof-gcov-one-line-function.test":"d06856838d834491aefa1c680d1ca1e70ce54fac1dba36f9b5831df72b26f340","compiler-rt/test/profile/instrprof-gcov-switch.test":"6a2bf75eafda0efb42a404c7fd1f07c0f947715f5db47eb5695f476aae4c796d","compiler-rt/test/profile/instrprof-gcov-two-objects.test":"3c658ec15e17ef6a71e62bf63bceb45c8049971d2e10fc27740532814139e589","compiler-rt/test/profile/instrprof-get-filename.c":"548ef3d3c27c0a42f7d08c0d0f1eb9fff65c3300cb01e18b50396a19e128cd24","compiler-rt/test/profile/instrprof-hostname.c":"ef4b58001a3f6105548e45481fb737dea44721cd8783a82687c08b4ed3f90cf5","compiler-rt/test/profile/instrprof-icall-promo.test":"d5f01d670b56cafc864c7e3fd01e881578c9a62206ef98568afba3b38dd7b4ac","compiler-rt/test/profile/instrprof-merge-match.test":"b97ad8aac6bbece9420ef2d4d1cdae4d5973a141af8a12846d88315f7c6d40cf","compiler-rt/test/profile/instrprof-merge.c":"5e1a56e178893844778390132d1e13214ea7b7a91c31511b5b0597d4b8ea7bf6","compiler-rt/test/profile/instrprof-merging.cpp":"d31c4959a4ce6bcb4f6fce965d374ebac525407f9296041d09b60de92a4e82f1","compiler-rt/test/profile/instrprof-override-filename-then-reset-default.c":"ba15e97cb06f00f55d280666b7f8e3bd608d6f9c9c732f0d935c081cf01a77ce","compiler-rt/test/profile/instrprof-override-filename-with-env.c":"2baa11e1e1267118c8b89553fa146cb88f459aa1241537c8b97c5dd29493e57a","compiler-rt/test/profile/instrprof-override-filename.c":"49ca9e3624fb409e3709d5ec09a8a436429358841f1d8d14f084c544e1915ece","compiler-rt/test/profile/instrprof-path.c":"737479f920109ef856591348f5749200212acd43c91db902cc15050062f831c4","compiler-rt/test/profile/instrprof-reset-counters.c":"1ae114ebe5e9960dfafa5fd1d60cf4139cbbf82f8eac1ded0537c699c42cd9c7","compiler-rt/test/profile/instrprof-set-dir-mode.c":"95c3079adbabc3416aa1990128f8bff6c79985897e351121bd7cde95dddb6df3","compiler-rt/test/profile/instrprof-set-filename-shared.test":"f602c87b03f9bd78d3617d871dc2e08c0b2e1eade1ffe8dd9e67faf64efedefb","compiler-rt/test/profile/instrprof-set-filename-then-reset-default.c":"d32de58f99e9d45c4845d182172a6f2cc1458c75bfbfcf8e9f8cfe23b94c97ac","compiler-rt/test/profile/instrprof-set-filename.c":"bb1b9c024551224d50e5f15647d4efbd9b0ed8307cfae4751da42accfa95deeb","compiler-rt/test/profile/instrprof-shared-gcov-flush.test":"b1c4287b4f9943abdee89e047b9f6928034eb911c90a89ffa945530c03ddfb74","compiler-rt/test/profile/instrprof-shared.test":"fa9ba8ae7a7daaa79f06216d348eff8cb60e03daeb91894adbd4bb733e86e63b","compiler-rt/test/profile/instrprof-value-prof-2.c":"ff219e723f6776526c9425689b0d3558794a01d740c27bd065e469247e65256a","compiler-rt/test/profile/instrprof-value-prof-evict.test":"1ea70f12dfb5e37946654fb72901a43e09b357a0afb37452bbe46931688140b2","compiler-rt/test/profile/instrprof-value-prof-reset.c":"38fb006210fcbe170bbd7dd1d28cc06c7dad5468487f13640195f8062a88c835","compiler-rt/test/profile/instrprof-value-prof-shared.test":"873c33945796462bad4a3a40fd73c6c23547272d44d0742c323a0af5d127f0ae","compiler-rt/test/profile/instrprof-value-prof.c":"d85fcf81074d27d1004549254b19ab95542761a47ebea00702f6856b5be3b971","compiler-rt/test/profile/instrprof-value-prof.test":"d674e4c3652978bd0b4bc163cf3a509968f7847fa48a9057d215dccc1f08694f","compiler-rt/test/profile/instrprof-version-mismatch.c":"2a9ef862da3e998432ac5f471d71d6dc8a99e315ea7d1420b974dc5f9a28c250","compiler-rt/test/profile/instrprof-visibility-kinds.inc":"bd3ac4e2ee5213af4e7d126947ccc6b037457c3ec14450445b76e24c31d1e631","compiler-rt/test/profile/instrprof-visibility.cpp":"23516e377904f5b1938fa738f1d8ca92418071f94569210cfe4018a61cc07011","compiler-rt/test/profile/instrprof-without-libc.c":"a80954f2be3af6f8e28035e4221d926a88306780eaf7762f07283c41c77089f0","compiler-rt/test/profile/instrprof-write-file-atexit-explicitly.c":"a4b9f8e8c7cc375fceafa0c62ad5ea22283b2d045ec2e2dc386ea0aed36e33d5","compiler-rt/test/profile/instrprof-write-file-only.c":"056c426b54ed077800b60d5d407035e09e939b1ce1aa86c965e4d24ae5b2bf27","compiler-rt/test/profile/instrprof-write-file.c":"df8bc578c49199f8cd16cbe0309cf0d67a49f0a1b7012ba7e223d0b7ce83b832","compiler-rt/test/profile/lit.cfg":"c59909c5f7b7272d8e9342f73abee4fbac96bfd5910f20ae487d89df279496e1","compiler-rt/test/profile/lit.site.cfg.in":"263b8d04015acdf7abe1495c4b5cd40f338d39e6a05b7a5ed730b749c258cfb5","compiler-rt/test/profile/runtime_infinite.c":"7b74f14d5f3d641bb5fe0640766a4111bd03b07d5c182d22ddf4a8df7fd37876","compiler-rt/test/safestack/CMakeLists.txt":"a45ddf99e750cdff3f8b9a9b94485d91637e09b198dbfa6d831dc4784e39f08e","compiler-rt/test/safestack/buffer-copy-vla.c":"f05781cc2802308ef5040cd8062f8b2d7fc285a05000423a8866a6098062195b","compiler-rt/test/safestack/buffer-copy.c":"6158997f109400d7690b6e29ad1d310f62c14d90b06eb3f2387546786f9f5870","compiler-rt/test/safestack/canary.c":"d4de1aa08dda9fd13bb03e96a4f0ac90ae9309b5fa1373c9172407cecc9b25d2","compiler-rt/test/safestack/init.c":"6d6f6609c421aef3e75e25c5d70269c3886a0178017e1b3d89ccf2144a2c6574","compiler-rt/test/safestack/lit.cfg":"09f08710d5ec7f9c631ac86923a8b83c3f79b832647a2f4a4f3f5696b07f27a7","compiler-rt/test/safestack/lit.site.cfg.in":"af92c03d02ec2751acb1925c9d46fb48e5b2cbd7498fb05a32a8074236269c9f","compiler-rt/test/safestack/lto.c":"ccf8f74e3740c198bf226327c915c823a106da3a0fa883e8b0eebe9c425fdcb4","compiler-rt/test/safestack/overflow.c":"99d2b665719f78f9f8e62ce34507518aaef4cbfde0a934f81629a6a2bbcf5651","compiler-rt/test/safestack/pthread-cleanup.c":"e333fa78383337131873aacd1e336d2f6c666bacff9642ad17165fd90f85bea5","compiler-rt/test/safestack/pthread-stack-size.c":"b2fd1cb696ce84fd03d27a9a061eeba1994b92cf5cb020c805101496ab5ad4f1","compiler-rt/test/safestack/pthread.c":"42458e654972d3294d9016bca07debcc4eb3314a63f88dd083da5deb8ad5ba80","compiler-rt/test/safestack/utils.h":"4055427e17ca04812620ecf98c4892ad4bb331f299906a0e58cf7934d9ce428c","compiler-rt/test/sanitizer_common/CMakeLists.txt":"7b7b1a39c004b639bb31ca83679035e616e9d85a16f3e73224a744d63efbc44d","compiler-rt/test/sanitizer_common/TestCases/Darwin/abort_on_error.cc":"953aa6c3b7d9c8d22c1f2282e7563047a5e9c0d11ea40d57949103fe3385a862","compiler-rt/test/sanitizer_common/TestCases/Darwin/lit.local.cfg":"67ea8448cf3507eda12a63f0981890bfcb7959532eab5a4c303900daa5788a30","compiler-rt/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc":"a64f7276878dceb2ebd013b1ac91d96fc6fc33b58946eff68cba854e7cd8bc9f","compiler-rt/test/sanitizer_common/TestCases/Linux/abort_on_error.cc":"2a837e1df7d189b5fd976635c8b72680afb35635fce9c252db194829bd4905e1","compiler-rt/test/sanitizer_common/TestCases/Linux/aligned_alloc-alignment.cc":"e92c9529f9f97a4ec57076717a438a84a02a7ea4dbf13e0b3d7f423957f01dc2","compiler-rt/test/sanitizer_common/TestCases/Linux/aligned_alloc.c":"d6f7be5bc1a5c6571cfff3bb15f9960e391b3c1b8cd8c0e4566fe141817e257a","compiler-rt/test/sanitizer_common/TestCases/Linux/allow_user_segv.cc":"c17b34f9112631dc397a110636bdd9818d5cc4a6a86bdc9f4476fda4c557aa2b","compiler-rt/test/sanitizer_common/TestCases/Linux/assert.cc":"1b42b23f2bb7a47b63897a51e3669a33841dbb7b5a091c612c6b106383069079","compiler-rt/test/sanitizer_common/TestCases/Linux/clock_gettime.c":"b62403d90ec6230e94a49e897f39891f61c22f64029b5b5e3bd09b80a6fa1dad","compiler-rt/test/sanitizer_common/TestCases/Linux/closedir.c":"88c571d2964ad63702339cf2f443946e9716ff45e6ae3822eb6d652c8ae03d3f","compiler-rt/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cc":"6a75fd929c186c8522e03353ed16e5464e72d1647c35b1405407ef007bb59e73","compiler-rt/test/sanitizer_common/TestCases/Linux/deepbind.cc":"9dbc4c4abb76161d81a9c96984690caaf0d4599efed5c9baa6f045210be860f9","compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cc":"2adee70a1b5ceff6c282eea1d06838f186c9149a0062de38ba9e994b720b6af6","compiler-rt/test/sanitizer_common/TestCases/Linux/hard_rss_limit_mb_test.cc":"4e2874711177de461b634adbcb5ef2848703f51e5d5db6590c09f066e8fb7938","compiler-rt/test/sanitizer_common/TestCases/Linux/iconv_test.c":"ca06192773372be0ac9e224293b2fb023f9b52ba01a4ee9e04c9aaff5c496395","compiler-rt/test/sanitizer_common/TestCases/Linux/ill.cc":"4c556db06daae103e2be3f6526d7c856dc8a0403f6b6220d114809823cd2853f","compiler-rt/test/sanitizer_common/TestCases/Linux/lit.local.cfg":"752f9f465d546875972dbfeb1fce9b5ecdfa3ab1d0b6b756efb1047f93298b01","compiler-rt/test/sanitizer_common/TestCases/Linux/mallopt.cc":"b9f73b3d7230e09c9a5ceb256be58323f697234f01abb56146e74c1e95442ec4","compiler-rt/test/sanitizer_common/TestCases/Linux/mlock_test.cc":"0cb8a225900daf32078ce753da847d6f8ceb1e1246a90b9b2fbb96f08526d1f8","compiler-rt/test/sanitizer_common/TestCases/Linux/mmap64_test.c":"8caf1f4dae78b14a81e05723d791acf36c612b93a9f2ab12213a5780091ff57e","compiler-rt/test/sanitizer_common/TestCases/Linux/mmap_write_exec.cpp":"b6daa1e6f7d4dea2a2a75b814b23b07cf43e56282884cb4384e0e30d1ff9c6fa","compiler-rt/test/sanitizer_common/TestCases/Linux/mprobe.cc":"01150f4fb0e0cd91f2d8c38bb6d8f91500e3f8b935164fecca4e930b6e945e12","compiler-rt/test/sanitizer_common/TestCases/Linux/name_to_handle_at.cc":"73a6c366ec01319f15dbd1445c725b2627c456a42c53ca480d321ce4ec70bc17","compiler-rt/test/sanitizer_common/TestCases/Linux/new_delete_test.cc":"499442c71007e6795fc236520912d4b14877b21fe3c3c4279a64f430c04c3be7","compiler-rt/test/sanitizer_common/TestCases/Linux/open_memstream.cc":"0a7b66f389780d1b2877d512291d880fdd1f6e7004e23e85a3c8f2e0321c1503","compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cc":"66002fb6c9e4bbb15329d53743bc1b95cf9947c91d935df3937211fdd73d816c","compiler-rt/test/sanitizer_common/TestCases/Linux/ptrace.cc":"d76b3e31a810c2bcba3822a3d25a9b09ba08863c70354208b2873c03e7fa9155","compiler-rt/test/sanitizer_common/TestCases/Linux/pvalloc-overflow.cc":"4465d28246695d5ff6a27c4a15c47733a06647516d01dc179945aeed8c8f9c07","compiler-rt/test/sanitizer_common/TestCases/Linux/recv_msg_trunc.cc":"d3ceb1c289eefdba0f64adef02fc4fe197a64f8a046690c06366fc71494505b2","compiler-rt/test/sanitizer_common/TestCases/Linux/sched_getparam.cc":"8fdbdc38c984a9c8d6b1c3595911b9c8df11fdff4113611dba877f015e155a17","compiler-rt/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc":"66025bb7a53f5c3b62ecdf15f72a41a334df65fb2cbf1ebd00fe3b344800104e","compiler-rt/test/sanitizer_common/TestCases/Linux/signal_segv_handler.cc":"faefd7142c869b35d6216669982491d6332af1b618dcea23a3ad7c5bbea7f2a7","compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cc":"b5e8c541d921ec5f4dc073ff92465e590d3396b723f98f8ee1b8df77a26ed2af","compiler-rt/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc":"2c692a39d28a0fd495141dc2de092dc180e04f54fb24eca0ee6ceeb7c13c9c08","compiler-rt/test/sanitizer_common/TestCases/Linux/timerfd.cc":"a894ec13e88c96e668d4cc3cf1ab6fc09eede4dad8b0e66c03a1765758cff530","compiler-rt/test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cc":"0fb1240939db6ce0145f9f7587cf036c019ca063fb1f7930fed286d5e28b0a3f","compiler-rt/test/sanitizer_common/TestCases/NetBSD/faccessat.cc":"32de9708bd69a7cc384bc45aca2d9fd1fcd84995fa34ff312d622c7e4e8d401f","compiler-rt/test/sanitizer_common/TestCases/NetBSD/getgrouplist.cc":"2f3c89338c7641cc00d03616366e7b242a0ccf586413e840fd771beffce64c47","compiler-rt/test/sanitizer_common/TestCases/NetBSD/getgroupmembership.cc":"349e6a12c836f76861546d0fdd60c91c6839626800be2b9d04259e48c7c2d397","compiler-rt/test/sanitizer_common/TestCases/NetBSD/gid_from_group.cc":"72ec0150d465e0103005bdb5aa1d4dfd2e51bb98a208922432cedae08e64db76","compiler-rt/test/sanitizer_common/TestCases/NetBSD/group_from_gid.cc":"5a10d5bef13d5807e14ed9d8c51142b4ff1dfc6b3760fe908810f042945666ba","compiler-rt/test/sanitizer_common/TestCases/NetBSD/lit.local.cfg":"7dd7a8bd0f3394492b65c3a05590a5a147eec3142e784dcee536658ad7744ae7","compiler-rt/test/sanitizer_common/TestCases/NetBSD/netent.cc":"87f447c63cfc0308d683cb9cdcbcd084eee040537a6fa496e44dd530979ad2ab","compiler-rt/test/sanitizer_common/TestCases/NetBSD/paccept.cc":"50dfb64ff85d4fab68a4a78aa618600555973b8161ebeacd9dbfe3204272ce19","compiler-rt/test/sanitizer_common/TestCases/NetBSD/protoent.cc":"216f5521dec86723db908b93d18c1d9ab588d2d80092c8da3e86253dadae4586","compiler-rt/test/sanitizer_common/TestCases/NetBSD/strmode.cc":"a02b9495f4a7966658b0e96eb9105a690416931293b4ccb41f68c68ca8a1924f","compiler-rt/test/sanitizer_common/TestCases/NetBSD/ttyent.cc":"5fc46353514a36f1fc33750b2caa6df9705d85313ef9864a38a1d353fbf54b68","compiler-rt/test/sanitizer_common/TestCases/NetBSD/uid_from_user.cc":"64c74f2930456a2baea290399803ba95a093d21f370d4e571f9a4f2420663354","compiler-rt/test/sanitizer_common/TestCases/NetBSD/user_from_uid.cc":"65b5482426bb6a1df1d594c916ee9fda85d65fdca4694464c7aab4c787d589f5","compiler-rt/test/sanitizer_common/TestCases/Posix/access.cc":"a2839dffd12b674d8580837c0d49efd4b22809c49dc5152e341dc9624356319e","compiler-rt/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc":"8155c832835c8db5414c4929a788f85c7ddefa9d93ae37603184bac3ac939b5e","compiler-rt/test/sanitizer_common/TestCases/Posix/devname.cc":"7e342500ed31bef65f26ac71c9a271a26c10f0e210977a0138a5836d2828db9c","compiler-rt/test/sanitizer_common/TestCases/Posix/devname_r.cc":"6af12e633dcf5b9254e1aecaef08d84af942ad1e4550f6bf71f95255191f9f6d","compiler-rt/test/sanitizer_common/TestCases/Posix/dump_instruction_bytes.cc":"8f620acf3b082d00b9e5063fc06a64a735813e2fde1b6817cf8a43587641d9de","compiler-rt/test/sanitizer_common/TestCases/Posix/dump_registers.cc":"6ff847a4aa23f41a462f0ba687103a92723b1b31cd1902b2113d2205efb76826","compiler-rt/test/sanitizer_common/TestCases/Posix/fgetln.cc":"8be46b92200be73fb958673769c38c15cb766a266a88a4601d50d40577c3f666","compiler-rt/test/sanitizer_common/TestCases/Posix/fgets.cc":"b6ba05588d177ebaa4aaf0a49b522f879e70989ab45f432dad9bf1cb9d9cd851","compiler-rt/test/sanitizer_common/TestCases/Posix/fpe.cc":"6bdb122783be08242a070f6a2f9d07af4ccc5ad75c25307e79f97386c63840c0","compiler-rt/test/sanitizer_common/TestCases/Posix/fputs_puts.cc":"0f0a22d32ec7a2b81bdabcdb250ac69797b9c6a4a1221b0d622a74944bac2bae","compiler-rt/test/sanitizer_common/TestCases/Posix/getpass.cc":"cc935b5e7fc1dfb55e75cdfbc0fcdc7d2a65717cd6f57a4ee5730503f032efd0","compiler-rt/test/sanitizer_common/TestCases/Posix/illegal_read_test.cc":"aa270214425a43e8cb3296a602da94d4a4699ea6c98de9f12d01b48551892e9c","compiler-rt/test/sanitizer_common/TestCases/Posix/illegal_write_test.cc":"64f4247e23281596b13155d4cebab2f048f16d271bd5bf8daaeaf850d7e29286","compiler-rt/test/sanitizer_common/TestCases/Posix/lit.local.cfg":"3c6afec951edaa5e426ac1590d3e67e4136b5ce61803cabf17f3c775a7279daa","compiler-rt/test/sanitizer_common/TestCases/Posix/lstat.cc":"dab1f40c0cf789b428a4837b5dfcd5c119eaf4c2cdb3e45b7a2509573c647ccf","compiler-rt/test/sanitizer_common/TestCases/Posix/mmap_test.c":"afb565b5770c0afacc9132db9ed95f59eb928356938102a7ea8b9853d49100b8","compiler-rt/test/sanitizer_common/TestCases/Posix/posix_memalign-alignment.cc":"2f67a50633d739fcdf178f1fef4c2c7dc24a783819c79fce9b87452f03d12981","compiler-rt/test/sanitizer_common/TestCases/Posix/readlink.c":"1f49f9dc7e8a718ed191000ef42cee23c3c53e5405200a532a5fcb9f01b8fb52","compiler-rt/test/sanitizer_common/TestCases/Posix/readlinkat.c":"4e1ac8958e6cc2da904557a5559d5717885f4337409213e73c224d2ad618fd07","compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc":"08c36dd42f216386a84f3a68cbc2409da2cb2a5dd7220a23299c81977c4c4daa","compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_fd_test.cc":"efffc8fa5e01ce1757736c59e4ffceb8a8b2c063344cbb3c21d69061f1fa788d","compiler-rt/test/sanitizer_common/TestCases/Posix/strlcat.cc":"d403852d79825b2f4a3adeb09af1b817b67416709dd48c773015a01a4d3f23a2","compiler-rt/test/sanitizer_common/TestCases/Posix/strlcpy.cc":"d9e69b61cf6eb69079815edaca18aac7ae97cd901d053a38cb1be94b712fac20","compiler-rt/test/sanitizer_common/TestCases/Posix/strxfrm.c":"2a0f98962c66a8278af9789048ad4fc529e7f3ead178566dd1774433a9a091ea","compiler-rt/test/sanitizer_common/TestCases/Posix/wcsxfrm.c":"646f5d4524322d3db37916399bb6c9ce02110f0059203814a0d44a536a246fda","compiler-rt/test/sanitizer_common/TestCases/Posix/weak_hook_test.cc":"d319227e8b937f34f4c124a194f8626d87224185a5927745eef20dade8753d17","compiler-rt/test/sanitizer_common/TestCases/allocator_returns_null.cc":"843ab99616e37a3e79fa4f196f78c23526db6cd7b50b7c8ac3f1ad511b68e7dd","compiler-rt/test/sanitizer_common/TestCases/corelimit.cc":"31d2766f3ff72be163f478ab4103cf2d301b1222e92e743e976fc9f49e74e751","compiler-rt/test/sanitizer_common/TestCases/ctype.c":"615d934f2ff25fc1f496c01e16bf57a7b21736c58d2eebbf18ab80cf5ae5def9","compiler-rt/test/sanitizer_common/TestCases/fopen_nullptr.c":"4cc46b75a3194ab47199ff061a6ac214361b237567828012f5edc82ecf4415e5","compiler-rt/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cc":"cf588b33e5e9056b5ab8deacdade25d7677d7eb2ae1b0ef08c5f3ab1fb7e56f0","compiler-rt/test/sanitizer_common/TestCases/malloc_hook.cc":"aa82ea28a872eec9b4ab8390fa4acccf7564b25207a8d1f205b14ee2fc071a8f","compiler-rt/test/sanitizer_common/TestCases/options-help.cc":"ddcadae1d8c24a74c83fde7045c1703a568f1fbd1639a8d0356869f35c15c1c1","compiler-rt/test/sanitizer_common/TestCases/options-include.cc":"09433417d58c6c249f5809dcb8349d3e2c6287e8a24a700090157cfb047a4235","compiler-rt/test/sanitizer_common/TestCases/options-invalid.cc":"4f048cc45be0b22ce08b1a0df175146bd89b5bc58b590233c17f6265b57c9a9e","compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc":"0d4ff12b2e6e27fd670ce700c9eadebd1eb9c565b610538038d233e5534a8126","compiler-rt/test/sanitizer_common/TestCases/printf-ldbl.c":"3c2451a4afc5d30313d15dfbe2cee7e8e9ac986783bc07b62522cbe08d882894","compiler-rt/test/sanitizer_common/TestCases/pthread_mutexattr_get.cc":"4780ee7b98f5c199dbb4870fa9273e2bca0bf03edddaf1287df1f017d96c1690","compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc":"d3229a3d2243c14df594179546440ddf375422d877eebc171a982a45770684f8","compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cc":"774b5ce6adcdd85409c90e9576e98f487e7e1456e33381e7e3de74e9726be14e","compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_stack_depth.cc":"054df5f5b7ff1f0fc7a4a5a4a8b2d4dcca8b6749c0ec79e8d7cb577a9864ba4a","compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_symbolize.cc":"d905e05c84663a24311c1877e3a24024fb7fc47fa9dbc0ffe2e02d97c76ab1ea","compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cc":"2b8fd8d841fa1151b832e75c55d0f22fead8f75b0945b43df6cefdc792e15bfb","compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-init.cc":"6bf86ddd469ef3777d56f881035ee1dd69551dfd89e6aaa84fb5b627ee3b6389","compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cc":"18225de3d959181509c5acd8ce56c4fa188cf105cec873648e9a74f85796f129","compiler-rt/test/sanitizer_common/TestCases/scanf-ldbl.c":"795c16df5d61372550a84b9e196bb7164b4843d83a5f97759ce66888cb6688e4","compiler-rt/test/sanitizer_common/TestCases/strcasestr.c":"ee863e6d69bdd0b9e40e144da3c9bbb27b93fd903c0f91bfdf1b081bc71ae372","compiler-rt/test/sanitizer_common/TestCases/strcspn.c":"fbaf8c80b9c5b3f8517fd62daa318dd1fdf03e5684bc4d0ac298e73d2fd12532","compiler-rt/test/sanitizer_common/TestCases/strnlen.c":"c6d1bf321d1c9cb445ba81ddc36540d01bf332fbf0204b976188dcbb0dd844b7","compiler-rt/test/sanitizer_common/TestCases/strpbrk.c":"ae7badbd972d568ec60f4f0d28459fcd76c570cf7905311298941df2e3f022cf","compiler-rt/test/sanitizer_common/TestCases/strspn.c":"01e1bf021c1b0e2a8a8007ea7f303d9ee1b9315c0e52a2c2ca82c260a92f10b8","compiler-rt/test/sanitizer_common/TestCases/strstr.c":"ca7559d931121e5301865a100f3d0ace4c28ca1d39369b1a2bf70ca0e2e44f4c","compiler-rt/test/sanitizer_common/TestCases/symbolize_pc.cc":"3462aa633a79b7cf56b8e650b4aaef1e6c1ba3bb6c559a5699f5090f02b3e370","compiler-rt/test/sanitizer_common/TestCases/symbolize_pc_inline.cc":"7ffb5d79db33b4fb0862ae6748f203c1d4b82db60c474a5744bb88c46b13b334","compiler-rt/test/sanitizer_common/TestCases/symbolize_stack.cc":"e9127b49a10e8266d4809121aef8554e1d85539c23642d5e5de76fcb27820493","compiler-rt/test/sanitizer_common/Unit/lit.site.cfg.in":"7aa7cd70cf8cca6a49fe617727fd4b16ebbb8576f3c023d078bec1360b5415a8","compiler-rt/test/sanitizer_common/android_commands/android_common.py":"8d34b7469e30f832c2dc5a1134a2ce3466f9b174b61d5af33062d31b95850b0a","compiler-rt/test/sanitizer_common/android_commands/android_compile.py":"7096c08f994c9c5eb5cd57a5b166c5d8b398d179de506eae122b70b6e6f18a7d","compiler-rt/test/sanitizer_common/android_commands/android_run.py":"5cdc26fc9904735884e1dbbfda83cc83653d1e9c867f7bc7ada3161fb4017aa1","compiler-rt/test/sanitizer_common/ios_commands/iossim_compile.py":"654eb9d12803a7bbc29abc78b3d2a2ee94ad53eb899bbd04599ca2895470b49c","compiler-rt/test/sanitizer_common/ios_commands/iossim_env.py":"35796852886559d254bf17adc418a4d4c72a9238e85f2e802b3fd44d0b8df496","compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py":"f20e0c63c1d9c18ff2dc16ccf63f424ee5dc3722ba6d8570f564c6040eadb6cf","compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py":"d3105f4580eff77a60c1e75aabce02e580192c3d49672a1409adf14c2ea72f18","compiler-rt/test/sanitizer_common/lit.common.cfg":"9e3c08199a0e06fe67fa73370a20dec705a93fca16fefa21a82664cbd2f8fc15","compiler-rt/test/sanitizer_common/lit.site.cfg.in":"ad2bd5c3447fa3638e29e741e2e023d7ec1c986b1d593e7776d8e3f413642616","compiler-rt/test/sanitizer_common/print_address.h":"e3b937ed013cafc49a6c1a9800670098d8e186cd99bfec97af9e2baf186d9905","compiler-rt/test/scudo/CMakeLists.txt":"3b692e113359f161d2f47bcfbee15323fb0c3431fd8f18a5b93848a32a9528c4","compiler-rt/test/scudo/aligned-new.cpp":"0201705ba5fd4cd9f2f5822a79e1c64c6d09ba7999fd2047a5df07d7ff4503b1","compiler-rt/test/scudo/alignment.c":"882f19662747bc9efe6e3366d62c73a51cd6f26d841813eed4c0ea7930828273","compiler-rt/test/scudo/dealloc-race.c":"204a8ee4d4c97bad07b1c11a2036dda7837f8450e535cf1b83b295b2b1907cbe","compiler-rt/test/scudo/double-free.cpp":"448261f5a5d74200980896b4729e334b486ebe92902c898713215b55a5fb771a","compiler-rt/test/scudo/fsanitize.c":"d44f95294c7207b20d1148104bd46e3b6f90303f555d481031a0d4122de9daad","compiler-rt/test/scudo/interface.cpp":"5e075a4f5c6706eaacca3e42c1ee3f4b57afe1e9142d9109453a3769d4c8ca22","compiler-rt/test/scudo/lit.cfg":"d916cad369045d98d792593cbe7a2be8c93de95a0800a78faa7a996339e0cfb4","compiler-rt/test/scudo/lit.site.cfg.in":"2686fb5d4c9a53219095827d18bb6e277c429f795f97aa4ad4666c3233322c3b","compiler-rt/test/scudo/malloc.cpp":"5c3dfc323fc4be229d9956caf610561e0f145f86ecfc99a62d3ea4f146445cf7","compiler-rt/test/scudo/memalign.c":"2546f7eae00c18c145b3a1030b9b78179c76e16bac806633c9e64445c0f42a44","compiler-rt/test/scudo/mismatch.cpp":"922d88287f9cb45fc88899f47bfb05110269dccd42942877d51f8afadacc00b0","compiler-rt/test/scudo/options.cpp":"d00289c4957c3b6945de36cc7a50c61b6146506c86dff10b91c9253dd54f3b2a","compiler-rt/test/scudo/overflow.c":"97bac5544d509338101e913e481cb38e5fac6b3e1d5313360791ce2db73596bf","compiler-rt/test/scudo/preinit.c":"29dba16b79eecfba441fa50ac49e3ef4e925ec733109a95f24e237e42c6f4684","compiler-rt/test/scudo/preload.cpp":"c2aad5c94a73f7b0e5f809192319306211ba78c4e495393f57e682626f7b981f","compiler-rt/test/scudo/quarantine.c":"95abb3f88a0539ea2f239ec21a8b099782249ad71cf39f847c57eb26392db699","compiler-rt/test/scudo/random_shuffle.cpp":"85b834f2c6f6dcb5c74dd5e6892b6aee42a85cedb91f8b8c7513cd36ffa09c1f","compiler-rt/test/scudo/realloc.cpp":"eeef558d0cda8cac00173493e1774c970d64be8248efaca5ac28d86768516a52","compiler-rt/test/scudo/rss.c":"fdd656fa7d890bf2b820831f100dfdb0837e5e3d92a90f101cd0af92d0e0a95d","compiler-rt/test/scudo/secondary.c":"02b27ef5657e9ec097527ae509ce0dd8398b0ece67eea92ed48fb03559aa4b2d","compiler-rt/test/scudo/sized-delete.cpp":"e11b9df2eca50ad4cd0eb999a741f0d24075979819f13bc109fd6e4c060aebdb","compiler-rt/test/scudo/sizes.cpp":"2e629f918df0d0200432a6ebc35972b1f497271732a51fd5a2d5ba6ead6b4fc1","compiler-rt/test/scudo/stats.c":"19775da6640c096f3502dc54ff9e029baec161b71cb6a4d89e89f413fa4b2f56","compiler-rt/test/scudo/symbols.test":"560d3ad8797c426793b29c07930f7daec29894e460abc47759a8a8dbeb211b97","compiler-rt/test/scudo/threads.c":"109a274032c22b9d16a64a12f6cbc3313e7664ddc1ed85048430fbc3206aabdf","compiler-rt/test/scudo/tsd_destruction.c":"3992e230aedfccd7731305a29be0ad5ded8cbc3ea18ca861ace31555143f81d0","compiler-rt/test/scudo/valloc.c":"7be92c39bf90d8adb1e8af2efa96f353625604e4c0f68541d7563f204a57f2f6","compiler-rt/test/shadowcallstack/CMakeLists.txt":"a26ed7fa26f38678060e72c24f815d3e6f0121c00148204f37cf37861ba3a326","compiler-rt/test/shadowcallstack/init.c":"71f01575b1776259b444bf8a8c9afaf69ce1bea22b1ad9e0ba13e9f2822c8bd2","compiler-rt/test/shadowcallstack/libc_support.h":"16d49b7bc4972e2cc0347730c409dc9889337d05b13f7b20eed900f2eb7f04c1","compiler-rt/test/shadowcallstack/lit.cfg":"8527278732ff36e0b5383e55146075168b0ba325194ba06ae58c4709e1b34580","compiler-rt/test/shadowcallstack/lit.site.cfg.in":"3bc9e93b268680d1079af9816e906aa74409db16f869039f3598a4f24c54773c","compiler-rt/test/shadowcallstack/minimal_runtime.h":"e0fd43eb27684bdad39c4d701bea60471d6e12a8b42d00e9e470ed348f8b30e5","compiler-rt/test/shadowcallstack/overflow-aarch64.c":"29dabfdc81ba4a4c533b1bcb2bf02b4fe1807dd807bf20f52b1811ac3093bdff","compiler-rt/test/shadowcallstack/overflow-x86_64.c":"e47a4dd70973b222ccb502e7ea6d5efbacc4fa0ab283bf652692018c8819bdf9","compiler-rt/test/shadowcallstack/overflow.c":"9df24fcb8aed59d265b28cfd032b38431fa519e7b4a9db34dd5e85dca05400a5","compiler-rt/test/tsan/CMakeLists.txt":"79bee5f703d1470dd08b3fe8c8aa9310eebfc798ced3c46aece72e6b90daa04d","compiler-rt/test/tsan/Darwin/deadlock.mm":"ccb3ce8f56b39e3534905223243f5e76ffa7faccbe5bc1d0c1ea77d189348f28","compiler-rt/test/tsan/Darwin/debug_external.cc":"05c387d0a978123d4c7de80e718c6e58bba7647d93318f43d5fbd6394a015faa","compiler-rt/test/tsan/Darwin/dispatch_main.mm":"2a0b76d84126b31d920e858ff91beb8480e0c1ff005b81fc11c9dab873abcbb8","compiler-rt/test/tsan/Darwin/dispatch_once_deadlock.mm":"101698f654bb6cfb87419f530993447d636c3b38cb11b81ab2adf734cbf9f2b2","compiler-rt/test/tsan/Darwin/dlopen.cc":"a0c15a8ef8d6b232ab1d8a7e5d12f38a4a3e049217bbb971b4bee6394d616a96","compiler-rt/test/tsan/Darwin/external-dups.cc":"c2028f87fd3e17933deffb3caf67ce74a19581f18fdf229ed5738bc4ab704549","compiler-rt/test/tsan/Darwin/external-ignore-noninstrumented.cc":"3fab28d177c3689b3bb825f87a6d945bc169550c9591730071418a2e0f78b11c","compiler-rt/test/tsan/Darwin/external-lib.cc":"63a8112215da54c41802ce5ea4d61335aab30b2982fb8a721056e2b66455d1dd","compiler-rt/test/tsan/Darwin/external-noninstrumented-module.cc":"3c048ea8e3dfe6930b1f2996db21a89225a06ce15924f072cdf431398fae11ad","compiler-rt/test/tsan/Darwin/external-swift-debugging.cc":"3f83300ae93e0da10fa48ca475eaae6149b75c9b202c099df7be71aa8ed6d10e","compiler-rt/test/tsan/Darwin/external-swift.cc":"a0631e14b667c9c2795e9de5f601d88b010e38e496708d348fd22b53cc898f67","compiler-rt/test/tsan/Darwin/external.cc":"a41b8ae100ff8992e17b8cce0315bf6936b7d7f22ce391a1f6897a64d872330f","compiler-rt/test/tsan/Darwin/gcd-after.mm":"72a44fa9cdec5c57beca5069dd7c3cb824af6a23c029926694a9f577857cdc4d","compiler-rt/test/tsan/Darwin/gcd-apply-race.mm":"2635e693239e6cddd5a3faaa216e73917a20c84ba8ad2ca07550eda6c0c0d3e3","compiler-rt/test/tsan/Darwin/gcd-apply.mm":"1fc3d5ab49fcac34ddd29a0154926b51a333aa6c75ef464cd566235ec5e0b7e9","compiler-rt/test/tsan/Darwin/gcd-async-norace.mm":"42053df71bf6ff25f11443c459c6bc7d19bed5292da92e43952ef81e304c23d1","compiler-rt/test/tsan/Darwin/gcd-async-race.mm":"7a397c6a13b281b03675dd794a6ef44c2e33c26cd21f9edf68f07b8720b79eb4","compiler-rt/test/tsan/Darwin/gcd-barrier-race.mm":"38176f9dcbeea90ae9b424c9d2b1392bc54f6a59ce40efed059960026d879624","compiler-rt/test/tsan/Darwin/gcd-barrier.mm":"80be6e1d17021f7137a5b6ba6647822306906a56eb2345898ac47e17c670e1b6","compiler-rt/test/tsan/Darwin/gcd-blocks.mm":"e642965c9badccb9b586ad36d22e759b79f1c99d1bfe7cfdb560443ace7730b9","compiler-rt/test/tsan/Darwin/gcd-data.mm":"1dd93636d4e8de0b6d9094dfd352373e504e61530989a2a190b626424d1414b9","compiler-rt/test/tsan/Darwin/gcd-fd.mm":"a93c7bbd06c11b6347b8491704e88c1a32fc19232182b241f6b147ae257f717d","compiler-rt/test/tsan/Darwin/gcd-groups-destructor.mm":"83fb145e1db2d70d913580162e1579d94587ef4d95e6b4cc7b27b7b47ff25a59","compiler-rt/test/tsan/Darwin/gcd-groups-leave.mm":"3baa94dfdab6d60577adb60ed1fc015a8ce00f15ca65699dfebef9585c7a891f","compiler-rt/test/tsan/Darwin/gcd-groups-norace.mm":"0bff41b2a8e5a59de39928d2594ee17e742a7487fd953136f73e1360760cb345","compiler-rt/test/tsan/Darwin/gcd-groups-stress.mm":"3d295b407b3e3f327ada682c74b76649881d5f555308a249c3bb6251cc39acf4","compiler-rt/test/tsan/Darwin/gcd-io-barrier-race.mm":"c73137acd048a080282b79d8b2efed3ef083fadd77f4b17e689a75ded8013e40","compiler-rt/test/tsan/Darwin/gcd-io-barrier.mm":"4e721f5162e76582bb7755240b91b3163c0a6ff6db1212475eb54e8b90b18695","compiler-rt/test/tsan/Darwin/gcd-io-cleanup.mm":"eeaca5071950dc3c0f0f0054e27838b22ec741d6d0620b5a11fb180c22e31b74","compiler-rt/test/tsan/Darwin/gcd-io-race.mm":"59128aad1a0ccd83ff0a2f323f7e0e05fbe9d004bcf0499b512f827a9e0ad816","compiler-rt/test/tsan/Darwin/gcd-io.mm":"3ea38ab8338b0840fc4daac70c3e8099748918308ee66e09c86dea111d034d44","compiler-rt/test/tsan/Darwin/gcd-once.mm":"91699dd0485059954aafe07684360ac2c1cc2ae30c025427d8bd83bbac496cfb","compiler-rt/test/tsan/Darwin/gcd-semaphore-norace.mm":"0224a1c80f6480ef6510cc2a6c7160a3f7555fe22b026d9231170295e02448d8","compiler-rt/test/tsan/Darwin/gcd-serial-queue-norace.mm":"87d5b0d229ec3dfeee7f3864d138b8e82f3ad46024427c303b26b6b1eadb60cc","compiler-rt/test/tsan/Darwin/gcd-source-cancel.mm":"5049f668e7dd4c9b80fb3027811173ed28e917cf7c5f1f61c92ceea4f35a381d","compiler-rt/test/tsan/Darwin/gcd-source-cancel2.mm":"346e6ed315a82d24041b13ba69dcf42dc6ac807fd8be437d40a14342b92310cd","compiler-rt/test/tsan/Darwin/gcd-source-event.mm":"dd8b4f890df50cd51f144456cb0588474a455e8214743bf056bb72ae191026fc","compiler-rt/test/tsan/Darwin/gcd-source-event2.mm":"2a21c6eee42719a35d9e8ec78fbd64f621a6e7fdc16bdd5dbc3d511e63f71bfd","compiler-rt/test/tsan/Darwin/gcd-source-registration.mm":"181dca8979333040913446e16448e27bea4891d21dfd3ceee1da2be5fbbdfbcf","compiler-rt/test/tsan/Darwin/gcd-source-registration2.mm":"6633179e66dfdcb2eac4d6c84131e8f0980f4fe32fd94b8c90669cf78d32ed30","compiler-rt/test/tsan/Darwin/gcd-source-serial.mm":"a5477c7c4f5ea20d2cb9b20e80b0746499aa0ff7cfd7373bd5c6e388d93bbaa6","compiler-rt/test/tsan/Darwin/gcd-suspend.mm":"b7912a990f4b9f7a15fbef96927f1bb68db6577b8c8d66d665985767dd026751","compiler-rt/test/tsan/Darwin/gcd-sync-block-copy.mm":"ddd9ee7bf7a936fad3c6db6abf73a6bf46787bf9f41202a211af3cf23a1e8773","compiler-rt/test/tsan/Darwin/gcd-sync-norace.mm":"e7aae676eadb5e1864d738f6c248f9f6d20562526048f228b6b1b65df9e44d82","compiler-rt/test/tsan/Darwin/gcd-sync-race.mm":"027f7e2d480d916fcec434ceffbacc51395cfdd47658e3183e805db2c1dd16a6","compiler-rt/test/tsan/Darwin/gcd-target-queue-norace.mm":"328a99b3982547edb554b0ed9d468eb9881eaf0b8c0e6b6e948285ae32b5b740","compiler-rt/test/tsan/Darwin/ignore-noninstrumented.mm":"d81d0906c8c429514906cb830ed26ba3c60a3c58a00ff7df8203afdea3df914b","compiler-rt/test/tsan/Darwin/ignored-interceptors.mm":"97f1a50b7bb76179f9c62797a92e2ce649167a5901a49725fbe2c38c502d413f","compiler-rt/test/tsan/Darwin/libcxx-call-once.mm":"bcbea02b0b5b3e29792381639a255df5023d433be3f8e614e59f8658644dba12","compiler-rt/test/tsan/Darwin/libcxx-future.mm":"2657252ec2ea2734ae584e85bd8cd728b616f3fd9907cd69b771e09cd8c53b0c","compiler-rt/test/tsan/Darwin/libcxx-shared-ptr-recursive.mm":"aeebbe1226ed960e630029c845dfe8a8a9bb04326328d0189dfec23604862217","compiler-rt/test/tsan/Darwin/libcxx-shared-ptr-stress.mm":"92c77d451daf519d86f7e6037e5bf8d5bdf1f3561c69220d2730e5719878e9f5","compiler-rt/test/tsan/Darwin/libcxx-shared-ptr.mm":"e7da78746223de759ed3ceab2f73026f8784ae19c4c019fe09c212d16da51d3e","compiler-rt/test/tsan/Darwin/lit.local.cfg":"206f4742f66c928c287f55feff397fd3ff5f691593e4ce9e825fd80e53fa2f80","compiler-rt/test/tsan/Darwin/main_tid.mm":"626e477f2ad01b1f3bb1e0a49a018bf7cd9cb4c8b0173375869f9886ff793243","compiler-rt/test/tsan/Darwin/malloc-stack-logging.cc":"6bac25569ac53e87f921af35b73805c9deaa5399c4adef2297b674f4e3d172a1","compiler-rt/test/tsan/Darwin/malloc_size.mm":"26361fa831a8b96e60012da954e617708b1296bca25c3be2c4c23d16009a8534","compiler-rt/test/tsan/Darwin/norace-objcxx-run-time.mm":"e94c11df00c0c0c3e14b3fa6b4a9ff429d6fc547a18bbb2643a28e92dadbfe03","compiler-rt/test/tsan/Darwin/objc-double-property.mm":"e49814da2274d7d5892eaf375e01cd8c9415a118edab39d7f76bca2fd0059b39","compiler-rt/test/tsan/Darwin/objc-race.mm":"daf02201c0f6863e53876ebe85f2c732896d278f98e70fadee90258e891aeb9c","compiler-rt/test/tsan/Darwin/objc-simple.mm":"60ba10ff245411fc1d144a4949591b78cac25b42d1bde654429add660a0dd738","compiler-rt/test/tsan/Darwin/objc-synchronize-tagged.mm":"389cd8b0758b86091209383b7af367983aedd207fead19430f93385eb3f5311c","compiler-rt/test/tsan/Darwin/objc-synchronize.mm":"f308d2d212877a463f105bee9d3d3d95118964607a64883e86b5fc7317fad851","compiler-rt/test/tsan/Darwin/osatomics-add.mm":"114fc2f7f09a938e2a86b3c620af1b5e99b2e8f8339953b3cfaa2c91a9836634","compiler-rt/test/tsan/Darwin/osatomics-bitops.mm":"61c5c7d3e1b2a82aaed8d21282dcc5a266d7af7f178abca61ce9a0212f158baf","compiler-rt/test/tsan/Darwin/osatomics-list.mm":"52dfef1022ae2cca58700ced7bb53969730362c332651fa3b814b9f94d6b2178","compiler-rt/test/tsan/Darwin/osspinlock-norace.cc":"17786b888e8c31ed751f54f5e1e6c20d3651ad1b741e27804b715c025b4f7746","compiler-rt/test/tsan/Darwin/realloc-zero.cc":"df9adffec887ba06a1511a207b68424c90c7fd923382d3218ff84d8cf87808c6","compiler-rt/test/tsan/Darwin/signals-blocked.cc":"77e4c439cd6a75eb89b1f45f0e731da7de8041cf16c60b2e044296d638fdb326","compiler-rt/test/tsan/Darwin/symbolizer-atos.cc":"6b4efb4a6673d7a0b8738b038a15116d1cd9bbbe262d6b29ef3e042a386d0940","compiler-rt/test/tsan/Darwin/symbolizer-dladdr.cc":"d1ba6bdc8537858a13847cd317a63e4b385496a63870249ebac9a4572d1e43e6","compiler-rt/test/tsan/Darwin/workerthreads.mm":"bb85f16b7356d881c85dec5bb1e71c75e208f45685e0be89323282dd015b29ea","compiler-rt/test/tsan/Darwin/xpc-cancel.mm":"7b37d76a0ae884497636d103035e3b36c99e454fa574c6651fb0be4136a30ee1","compiler-rt/test/tsan/Darwin/xpc-race.mm":"3a11fc2f496d9e44636d049d7b71638bd28a45432217c240f82c96769e0b4f36","compiler-rt/test/tsan/Darwin/xpc.mm":"2336932325975030ad433c749812f7fc1d5360117cb6ff0fc9e7c042bfe4d75e","compiler-rt/test/tsan/Linux/check_memcpy.cc":"fe9a5a60d533eeb80fd70271981b7c28c2f38ca6eb51f4738ba70e1e04743cc0","compiler-rt/test/tsan/Linux/check_preinit.cc":"0efa66b43f87157b5410e3dc6a459854340808a748bfc3976e0c60075f955202","compiler-rt/test/tsan/Linux/double_race.cc":"e78d407faa783dab0750970e3f5e30f66567e84766e9256427b7106f3a3ab23a","compiler-rt/test/tsan/Linux/lit.local.cfg":"752f9f465d546875972dbfeb1fce9b5ecdfa3ab1d0b6b756efb1047f93298b01","compiler-rt/test/tsan/Linux/mutex_robust.cc":"18a3de5683436d79ae081a9a1248f99625af804fa865f9c056d4bb6e0c28a5fd","compiler-rt/test/tsan/Linux/mutex_robust2.cc":"0ca547edfcbb2f616c9a029fec09531daa74832676586288c7315477734af5c1","compiler-rt/test/tsan/Linux/pie_no_aslr.cc":"cd9aa764c16aec8f226dc7b0ad40027a3d724ae656d7ea14f2c96bf4789f5da3","compiler-rt/test/tsan/Linux/user_fopen.cc":"40f654ba2b005337b28554ec2509531d501f9f634072773855101bec1b231afe","compiler-rt/test/tsan/Linux/user_malloc.cc":"816dfbb17a07f7a085eb2b74b6b80ffa8d832c2b80fd3886b9d46a198860a061","compiler-rt/test/tsan/Unit/lit.site.cfg.in":"195013c64fbda6fb9f7b585fb6cd82a4bb1b8a3ee6cbd97043c3389b4b385962","compiler-rt/test/tsan/aligned_vs_unaligned_race.cc":"1f0ce6c26eb4c6b9b0922d31af6c98d259d9b17a60fb7a768becb72940ea3eaf","compiler-rt/test/tsan/annotate_happens_before.cc":"b6a9a712db78f0347869da8dd2706051fdeb33754c1a8da542cf015b6e88ab07","compiler-rt/test/tsan/atexit.cc":"70dce1e3c4274a0e465f5b1518958e2e27ae7c8e5dcfe16e91b687ee4650e198","compiler-rt/test/tsan/atexit2.cc":"6c0304d8346d5b67279af98522436be351c94d1e30d333ac888ebb5c52309e74","compiler-rt/test/tsan/atexit3.cc":"dd3ce8b6d8c94969ebedaaf973d224efcbf2296930e52b63751f0fa585219147","compiler-rt/test/tsan/atomic_free.cc":"cd6895580814a1a5b4ed0b097c8e77aaa8265db1065c88a005f38514d2790c63","compiler-rt/test/tsan/atomic_free2.cc":"5c9af9a725d7ca9fa435b230c8136767809687241bcbeb5320efbcd38e9f034b","compiler-rt/test/tsan/atomic_free3.cc":"11ed7e08fc0d10bd5b55b9c43c3e71c1c7e7b443d2ee6836b6b080b4287e3c8b","compiler-rt/test/tsan/atomic_hle.cc":"c02ffe3bd6b640a2d11d180b28d4be20c446cd0e064d84effd299e81328bc007","compiler-rt/test/tsan/atomic_norace.cc":"e5d917b21db414ee44442f588a0a2924059c01fe639010b3bc5a47d0c2adc28d","compiler-rt/test/tsan/atomic_race.cc":"b306ce93efceba54cda6e3a262f749fdb9bf3d11eca0144bba729035ff189417","compiler-rt/test/tsan/atomic_stack.cc":"55103a8859d38c05a8d4596835af431465bf36e485368313dbb9913a9d8e3e3c","compiler-rt/test/tsan/atomic_store.cc":"a9b20e47fb7f7f8cae9d23bd4ae175b2b97f11b7f417bc3ec237fe62514d463e","compiler-rt/test/tsan/barrier.cc":"e6c927b8f910db364f254ab755db3180651f812297ec36414a09ade66738451f","compiler-rt/test/tsan/bench.h":"979ed7b34ef3872bf422ac2611dd413779769978103adfe086e5c3f19be4d75e","compiler-rt/test/tsan/bench_acquire_only.cc":"d6c225306d4cdab3194ea5ee1af036ed845beb6acf94b1dbd5d89eca480de299","compiler-rt/test/tsan/bench_acquire_release.cc":"dfc76dd53c45fc3e69a050b3d15837522bced0a3ef80315928528aed6d8a4d0d","compiler-rt/test/tsan/bench_local_mutex.cc":"0d2ffba63bd1943c9a0b1d43ecdd843489506033dc0f71f1655d292d95382340","compiler-rt/test/tsan/bench_mutex.cc":"b4ffe5268464baba3842390116b2ae56f84dbcf4597be5d7537c0d4de274f8c6","compiler-rt/test/tsan/bench_release_only.cc":"b04d1562d975bdd842c8e7225c0084fe26ed18396fadb5f626d6ede0864db19a","compiler-rt/test/tsan/bench_rwmutex.cc":"6a19369e2ebe036f9216d49e12de36aecc444f3864f6a4c6ccec0ba7cb5f6ee8","compiler-rt/test/tsan/bench_shadow_flush.cc":"65440c3350a9f3191d2eb8bf37d5b13d8254669be44c7a6b3884f75dc8dba8c5","compiler-rt/test/tsan/bench_single_writer.cc":"c1ee32ec72e2f631cfe5a9045b43e2d5afbcedb26d17be144801effb85f5e48e","compiler-rt/test/tsan/bench_ten_mutexes.cc":"71ee27b57425ec33ea79c4354597a2a34b12a2717c4b174b71c48a57a94e9dba","compiler-rt/test/tsan/benign_race.cc":"71076d6fe1ced7d00f827d022c8646ae97f8ff4e8764f7d30f7e9acb6f177c0a","compiler-rt/test/tsan/blacklist.cc":"ba54eb2b18faf0f98c48173fdea9625373b0b872b375dc9d6a260a57eced1dfd","compiler-rt/test/tsan/blacklist2.cc":"7796bb9c0cdda9e31bdecdde4821be6e84d6b032583fac0bd4016229c8ef0d57","compiler-rt/test/tsan/cond.c":"5fb4f64492684a199d49023854e5c9abc90e24f13787a395aa358bf9e246332b","compiler-rt/test/tsan/cond_cancel.c":"d40feed18c1d9dedd112f3024d3678735ec523e3ad4845b1d1681febde0ba787","compiler-rt/test/tsan/cond_destruction.cc":"1f7feb73b3f393544ed9fafcc41fcfc73db8691e2c4e87be436d5e85c0cb8193","compiler-rt/test/tsan/cond_race.cc":"e7a104c9059bca662700b6f79adf75412a28ea500d4a86bafd7459f6d0567ec7","compiler-rt/test/tsan/cond_version.c":"264fc24bb81215f0d3d231746d94c8bd4650097cdb106a0f8faa315653299ac3","compiler-rt/test/tsan/custom_mutex.h":"74446806a2b2b661048973cdaa527450871a2be68b700bec82d35c0db064886a","compiler-rt/test/tsan/custom_mutex0.cc":"7ee06dec78b05ce8a6857bd28684808ffe195dbfcdcad92fb58d4f90391b73f8","compiler-rt/test/tsan/custom_mutex1.cc":"306e442bbd10e26b49dd0dd61a66878ebed0dc693a3a57bc6480034bfbc6a320","compiler-rt/test/tsan/custom_mutex2.cc":"e178e2a83664d27e11db5206c9807d61d2c8b28ae4499187f6c2ceb2aa007d21","compiler-rt/test/tsan/custom_mutex3.cc":"4d2a057724f81099bfef63218ccb9e56977948c9242860439baebf213051e01d","compiler-rt/test/tsan/custom_mutex4.cc":"b5ec2c18d646b9a279f10ebde790b7efb41560a29016d2f6eb36b7520fc75f39","compiler-rt/test/tsan/custom_mutex5.cc":"e9d9fff0b9353fffb797fc99aeaaa28b52ba10a7ca0da23e33d0ae07efaeb90b","compiler-rt/test/tsan/deadlock_detector_stress_test.cc":"7058042f0eb900908fdcdc329a4eba64875612cd3270d0e131158cb8330e0e49","compiler-rt/test/tsan/debug_alloc_stack.cc":"9fe2aa2c52c106058ce597803b6f5fcba8d689d7f2583f9a82513d9ffcfcff02","compiler-rt/test/tsan/debug_locate.cc":"da10a1155664958f16fec4bd7e527c3addaf318fe01254409ddc87ff228e097f","compiler-rt/test/tsan/debugging.cc":"57fb82da1677637a7ff7c4cf81fb28868a306f12bed42bba730b829ec822ccec","compiler-rt/test/tsan/deep_stack1.cc":"3cb11384f8f937d5978680c190c7254029dfc7dfda8b88b625f8061bd5442be9","compiler-rt/test/tsan/default_options.cc":"13e1b23f97b5c27bb7846a27e66de89a7f3ca740e7d1d1c33d57bf145c54fb99","compiler-rt/test/tsan/deflake.bash":"f8bdfe1e11cf9f9f5b99dc048df125eaac68051bd2c8a3ab76e02177aab9de9b","compiler-rt/test/tsan/dl_iterate_phdr.cc":"cbfb4eccc3220d6faef86fdf06b296c9e092c1fca29678432c1306a13d146b68","compiler-rt/test/tsan/dlclose.cc":"cc46d426fb07d63ff2a8be21083ab99e1024387a7cc76d2948dc0f1865c1640c","compiler-rt/test/tsan/dtls.c":"7775d40175b3b7f0796e916170faadf980e7b4381ecc9206dd75cd3ade6de410","compiler-rt/test/tsan/exceptions.cc":"b833adb573ed55d323358a0ac5b7bcbe44201c75da7cf8e51143bdcfaf197df1","compiler-rt/test/tsan/fd_close_norace.cc":"239cdcce1b657e1fce0770bf212c15a5de4232c20d64dc0502f4b31220d5103f","compiler-rt/test/tsan/fd_close_norace2.cc":"a86924f0ad88fac565b04cedc1a7e825c635208f7355e574cd16d8699168129c","compiler-rt/test/tsan/fd_dup_norace.cc":"7166e4559292559ad189954cc3f2ebdac24eea45cf12da5a10cdc81825674682","compiler-rt/test/tsan/fd_dup_norace2.cc":"bd0a94f0a7f659b853b1fe395e545205291d2e89f0b169afdc51d610114d0772","compiler-rt/test/tsan/fd_dup_race.cc":"6f720b0415a5a14f9940098c6f615b7b2f9061dd89f0f1d65accad1c40642250","compiler-rt/test/tsan/fd_location.cc":"4a1d00483c68019859aa086c2420e70e09948d99ca92b7734300915d8c19da1f","compiler-rt/test/tsan/fd_pipe_norace.cc":"14e989290a975ee16f48af849e264aa167fb19bc7023560bc5c67a4d28772013","compiler-rt/test/tsan/fd_pipe_race.cc":"29094948fbaa43552acfe8ba32041e44941941d77b1091b3eb4ce1594d1d90a3","compiler-rt/test/tsan/fd_socket_connect_norace.cc":"ff73711334b7d2e2165223a5cc605237f3484d285d73fe99373b407eb2c92b08","compiler-rt/test/tsan/fd_socket_norace.cc":"3e1de9c43d09f8a3dab80af8edca30d99c0f0719a24a929c26407a65767f86d4","compiler-rt/test/tsan/fd_socketpair_norace.cc":"8a6e927b9fddefbb0cc03c3e353db906c67b1c5abe4fba3f4b9588dc76c41a39","compiler-rt/test/tsan/fd_stdout_race.cc":"fcd0b57df9a878db29be18d7e44b235632ef8fd5a3e769124906e484f42c012d","compiler-rt/test/tsan/fd_tid_recycled.cc":"c8791243476ab8e0f9ebb9b895c48ca39d37a0652c9c69cc6346035b56832f19","compiler-rt/test/tsan/fork_atexit.cc":"3d24fc4336b59655f712794ef68304b6c02734da39d609e116249c4c25f4829b","compiler-rt/test/tsan/fork_deadlock.cc":"9dfc88f37ae5ba2902d4f2a7ea80992182b578188a8f5e6e7960167446a8a812","compiler-rt/test/tsan/fork_multithreaded.cc":"61e07afe308e518674f2ad2f356e397cea4e935ceca7f45f0ae7c07b344e7b2c","compiler-rt/test/tsan/fork_multithreaded3.cc":"5500f3a8d292badf10adde1bb6efa4fa589626c3a94f2d4d76a9722635adf0a1","compiler-rt/test/tsan/free_race.c":"d9f017ac18659149bf2cd69d002c18b1603626e44657dced058c9ce0e6ea3a21","compiler-rt/test/tsan/free_race.c.supp":"b1b43bcefedea23271ff7871f58373f47be019f45682cf6f33d46df1949bce97","compiler-rt/test/tsan/free_race2.c":"2e5379bd310759fff87e6e7edadaea334425ef3b26c196fb5b6799b517ba92cf","compiler-rt/test/tsan/getline_nohang.cc":"6a70ac44d0484025bf19f601c5f972ef8dd9d626267ff0576cfd3edd3c55d6ed","compiler-rt/test/tsan/global_race.cc":"6348f392d14501f7e57ac82c039191e803ee3f33af15d1d2e59eb6be0e86bfb8","compiler-rt/test/tsan/global_race2.cc":"0d25db1fc1e95846945ee10dd548d652692b7c32362283b44900b84399dc78bb","compiler-rt/test/tsan/global_race3.cc":"1b86d8a6b22ed149978cf32631fa2abcad456dcbe9109d50063a55307e093bf6","compiler-rt/test/tsan/halt_on_error.cc":"a673af3a47862888f15563130d05ec293bc181c9bfbe634f67f0942033609879","compiler-rt/test/tsan/heap_race.cc":"a65b888a39277df34dfaf40c981cd1ceee88f2fd88a0791d08200749bc42592a","compiler-rt/test/tsan/ignore_free.cc":"9c79ce633e938bb00f50826eb7dc173f09503fde376d626f4371d4e18d783771","compiler-rt/test/tsan/ignore_lib0.cc":"40957135e3182055a283cc60f3e5748e967fbfa7216841249c05c870399cd2de","compiler-rt/test/tsan/ignore_lib0.cc.supp":"996e86ecddb6f46d28c408cf117f16c14166de077a2633124258a9bab1692a72","compiler-rt/test/tsan/ignore_lib1.cc":"541a0931cbe85b6512031ebda56a95e6afbf66c108e0440518d0dfa408da1e9d","compiler-rt/test/tsan/ignore_lib1.cc.supp":"61e74818ac1b2c8bf150243ec933af9d8e729a66baa443b6f534ecbed7f9225c","compiler-rt/test/tsan/ignore_lib2.cc":"6470377f0ab837cecf6e941dbcffebf89da672f3a800f9cc984e5603d00eea40","compiler-rt/test/tsan/ignore_lib2.cc.supp":"b9e9f505401517241e77ccf1c1eac2c31d99dbd0ab80d2087fc5541fc7a198e3","compiler-rt/test/tsan/ignore_lib3.cc":"c24ce4e1757cfe2845d3258a5b9f94a710d3d9c4a69f0f315b0ae19a97c92470","compiler-rt/test/tsan/ignore_lib3.cc.supp":"ba8aa4b5aac1a5236b0fe8c54856bf385cc55daad86e2341087e718206a5a4ef","compiler-rt/test/tsan/ignore_lib4.cc":"30a3c78225b2462153d7f77031e83744a9f8c6bf1a75d4ee945d36f22d6b6630","compiler-rt/test/tsan/ignore_lib5.cc":"6efc50845906f1aed6001acc9d8dd68ad11fef266c197170a44267c76b4cadf6","compiler-rt/test/tsan/ignore_lib5.cc.supp":"61e74818ac1b2c8bf150243ec933af9d8e729a66baa443b6f534ecbed7f9225c","compiler-rt/test/tsan/ignore_lib_lib.h":"ec18520d660a6bea2025ba12d145a0c6bf69586f9938fd17b17268af76e50465","compiler-rt/test/tsan/ignore_malloc.cc":"b6e2daa7af71c457d89676ebc65f1f253f507ca38db4b0caa21ddc670454f011","compiler-rt/test/tsan/ignore_race.cc":"1ccc7c63ff0f630abc195570b69f00564455b5cf1f0dc7a34822f801aee88a62","compiler-rt/test/tsan/ignore_sync.cc":"338540eaaaa4060b147c9f2cec49834f7c209aa718bc402ce4d1ae2cadc9b9fe","compiler-rt/test/tsan/ignored-interceptors-mmap.cc":"f836fc25a07b6c691b1f426d346124fcc7f60ef5c1ce693a7a46224f612b6580","compiler-rt/test/tsan/inlined_memcpy_race.cc":"d2a0f143f242c6cef6f31651fba7a8d292611c6d9b1799920ccc77e501ac5cc2","compiler-rt/test/tsan/inlined_memcpy_race2.cc":"01725429a78c352f2f4f302ad7fc390c8136746734cf6434cadc8f16e0b681ff","compiler-rt/test/tsan/interface_atomic_test.c":"758d06ec2e40386bd58365cd239289d9e4f099f62262a3c995ebbb70f628db95","compiler-rt/test/tsan/java.h":"154099cdec7121d93842ba7b0a89fd43ce84bc3aae1b080752561378c7b73321","compiler-rt/test/tsan/java_alloc.cc":"425778b8166f5b0818af1465133dc56d0b12e4db98a0e33394ac88bf87155e92","compiler-rt/test/tsan/java_finalizer.cc":"7e804b88bf59cf838f2a0fd3ec716ffaaba035aa61d47448e939621b2b616baa","compiler-rt/test/tsan/java_find.cc":"f9c7125e4e6cf3911517d362f9d4b44476ff087d5bd2cfcec9adb6b4444ae41c","compiler-rt/test/tsan/java_heap_init.cc":"87f503f5ae9fc4be781fd9e7daa31630f72aee709071875325c8ad1ff4c0d985","compiler-rt/test/tsan/java_lock.cc":"4c8dc0fd7a358ac60922a96e73a03d2c05eac780a4cd913b5ab4dc86af8dd31e","compiler-rt/test/tsan/java_lock_move.cc":"ea1afe0025c8c4920818935cc6e8a94f1402e671d4936e7c7e821b9ac831f31a","compiler-rt/test/tsan/java_lock_rec.cc":"0f92d3bd7af36f9ae411d9a5b5ce81488148e359e9db2a77f4686155f6099a07","compiler-rt/test/tsan/java_lock_rec_race.cc":"ac4f9b70f4d36e0ec05da67659525be2c19f60f5fc10accc334e5ce691fe2003","compiler-rt/test/tsan/java_move_overlap.cc":"fb3842bcfaaa203f456256d06f0986cf745a3abecc301507b8232610a4efd5e3","compiler-rt/test/tsan/java_move_overlap_race.cc":"dffe910bb271b98880216b0925602f4fc5bc811a7c71692170d40b0340af353d","compiler-rt/test/tsan/java_race.cc":"9d80520f9fccfc742b6264a0cab6ad154e3ad74bb0e7b896e9d768d119da8871","compiler-rt/test/tsan/java_race_move.cc":"42c6bd0a21db46f40d65837949651af397293810feac1a72a46ff49f279d0b9c","compiler-rt/test/tsan/java_race_pc.cc":"2e9e861329f3e50f66cb4222a4c13908116d1d49bac30d244db5be418b64f7cc","compiler-rt/test/tsan/java_rwlock.cc":"fd45ecfa6c8c95538fa3416d1cb4237779d4bf0032d93306294d4dd11c05c3b0","compiler-rt/test/tsan/java_symbolization.cc":"1db4eb70b5d7095e2e5d223bfb16731a6242200f72226db2696ca28bb909d31b","compiler-rt/test/tsan/java_symbolization_legacy.cc":"52f7751bfbdbb1c82cfb7cf8af89ae34f20b018b68dbabcd903891d50ad6eb3e","compiler-rt/test/tsan/java_volatile.cc":"0da5951b63227877c0a97cb1022468f7a140dac4b79997d7fb2be26988ff6b02","compiler-rt/test/tsan/large_malloc_meta.cc":"059a47c9f9de45a75262a1e9fac6bf00d1440c2d3fde7e3c746c71a2ee83042d","compiler-rt/test/tsan/libcxx/lit.local.cfg":"f3f1666b7f33e13772213533532c93c527fb912cff81dc0c7a22a728f177f91d","compiler-rt/test/tsan/libcxx/std_shared_ptr.cc":"f23f629bf21ef30ca1df2464a3dd729e965fc4d6d43e8beadedf2f8e6b90f670","compiler-rt/test/tsan/lit.cfg":"2d3bc33df6cdda3bd42dea39e19f49f52e6ec34fdac8ccd341645063e7b7f9b3","compiler-rt/test/tsan/lit.site.cfg.in":"47bef7d4beec6413b3baccc75fff1b9c81778a3895e408a4a07b794f2d309656","compiler-rt/test/tsan/load_shared_lib.cc":"c95eab7e0646ca0f0976312ac180055c6128add4886d9c69ff69f94784f6d791","compiler-rt/test/tsan/longjmp.cc":"cd7b73371b35d220a3a25ec7bc84568c68701e75a25c39dfc756a5d6e1f061be","compiler-rt/test/tsan/longjmp2.cc":"4e2ce9e6cf059bcf8647ee42b07144af8306daf8f1932ccba99260efcb922df9","compiler-rt/test/tsan/longjmp3.cc":"59666309e9cf285b9cc8137df49e5ed405b7b6a8ea4313207323cf10a773ebfa","compiler-rt/test/tsan/longjmp4.cc":"8c0a178265bb8e0d1fffe1bb28c758a537fbeeb256685fbf1789e8cb95155236","compiler-rt/test/tsan/lots_of_threads.c":"0d3b69a2acb2322c605b4a8373f929e4ed074a23ec55efc940b13fb7444dfd83","compiler-rt/test/tsan/malloc_overflow.cc":"d8fd93905d18294a05eee79178625218d4a5a8963bcbd3613214be9d537e07e2","compiler-rt/test/tsan/malloc_stack.cc":"b9ab79d9c3091c83f2e5d140c7687e8e6d2074ad840ae2e3bef6d9da71de364b","compiler-rt/test/tsan/map32bit.cc":"f2e0cb701d78d94d852feece2f014f8a4e2e24ce73eca579a90796c78097e620","compiler-rt/test/tsan/memcmp_race.cc":"7e38213e9b72bd263d57cfed7b409554e5ff87adb04864297fbcb4dcd6dffad2","compiler-rt/test/tsan/memcpy_race.cc":"898bd77f926316622c64c724850ad8e02d9a68a30ab3b18a72d7cc0e79785ce2","compiler-rt/test/tsan/mmap_large.cc":"75b0ba2fff05bba5574ebb785481fa8da1b99f711405fbbaa7e8ca99676f5212","compiler-rt/test/tsan/mmap_stress.cc":"6e2dce3ad10ff637fd28619cf2d1514f1662bf4dfc6cce229d1aae497bb2db81","compiler-rt/test/tsan/mop1.c":"16f0faafb8cf1dd98558867f202ea5a60a7fa35367cf258d79d4e21c89509bbd","compiler-rt/test/tsan/mop_with_offset.cc":"927bb5bd3f8b8e049c66b820c97812d27d8e10743d547a1e8b48b0ade32d71d8","compiler-rt/test/tsan/mop_with_offset2.cc":"40c164bc13cc82e99e7ca148e1e15a08ddfc5d2827b955c85f9cc5d1a62bc3ad","compiler-rt/test/tsan/must_deadlock.cc":"4ae3991fcfefc0d9aa4eb50e17dee5f9b7e6655d94f9d59e7ed9bcc344d8c370","compiler-rt/test/tsan/mutex_annotations.cc":"4c679ba2070438e4dd25e9c1d4889feb9aba21baba1e3ae7e5bcd74e750ac92a","compiler-rt/test/tsan/mutex_bad_read_lock.cc":"a7733a13190fb5ea0715dd722924fd1444e901e1a8c2b306d44e379e781c1a5c","compiler-rt/test/tsan/mutex_bad_read_unlock.cc":"fca58ece7abd699ee1762dbb8f918faf1fa5d8bc358100db6f968ddb48d74426","compiler-rt/test/tsan/mutex_bad_unlock.cc":"dde8fe009bc1cd17e4b93df958b879f6cdd37e58f6a3c73627f10cf8ac864066","compiler-rt/test/tsan/mutex_cycle2.c":"dd5f0f147db4c00ef50a05145d952b594ac239d03d49b91b6ad97f1f67877608","compiler-rt/test/tsan/mutex_cycle_long.c":"c15b6c51a23a7ea3ac367cd82781484e78509b3dce0dfe515674d3b9da0fa2eb","compiler-rt/test/tsan/mutex_destroy_locked.cc":"3814807eb575aa680efb907d214fec4d395bcb8b1145c59278c3169004c313d3","compiler-rt/test/tsan/mutex_destroy_locked2.cc":"ac9456be7cb9c2f54a11e566d51f6141a5acabf815a84ac6909f2b814ef3ed0c","compiler-rt/test/tsan/mutex_double_lock.cc":"5b24c6239b02e9dfcdbf7d3b4e2ad3ffedf8d87781006d1fc12442bb4f8632a6","compiler-rt/test/tsan/mutex_lock_destroyed.cc":"4342e140c033cbcd1ab069f4a04112d46b7e58ed42148dd3401d147bce031fe9","compiler-rt/test/tsan/mutexset1.cc":"d12b3f949468f84fb2a49f0f0458520757f29439894df7d7a4e0726a539a4ff3","compiler-rt/test/tsan/mutexset2.cc":"fbb317bcd16428fbfaf1b19bf6be5db12fb1ba9b595daf17401f9ff914991e12","compiler-rt/test/tsan/mutexset3.cc":"304b79c20079e8a75c03992af014321f7f7ae53a9b0f4b4cae560516c0a46362","compiler-rt/test/tsan/mutexset4.cc":"e47ff759f9387e2fa1c49e937faa3a0c1f568b85d182fbeb780141d465393456","compiler-rt/test/tsan/mutexset5.cc":"49731bce4b9dc163a28bab4ee4ce8dfb757bee85777d9859152fd6095bae24a8","compiler-rt/test/tsan/mutexset6.cc":"8c1cb33582455cb483c6e157de6057125f82f746c8c58ca8e559869ed58e953c","compiler-rt/test/tsan/mutexset7.cc":"3460f22ce9d677b81caf4658291343fc1319a341b2fe77036069d67593296e09","compiler-rt/test/tsan/mutexset8.cc":"4dd8eb11b519ad7ea43d075b9a4c2cd4142db1048b87367521d02cf56c00c8a2","compiler-rt/test/tsan/pie_test.cc":"27874b40d0cb1a7bc39f9a362e2396125c655710acc5741f96e01b1112630f67","compiler-rt/test/tsan/printf-1.c":"2e9f67519ca57d6c6744a694b5c56dec5e99b90a6187c04c90f11001f252c3ec","compiler-rt/test/tsan/pthread_atfork_deadlock.c":"1fbe562177d50b867e2fcc570ace8c949876df7477bc7523433d76f48a142e35","compiler-rt/test/tsan/pthread_key.cc":"48162a678165afc80dd2ef00dd62b3209f450741f5db12b975cac58a8a95c0ff","compiler-rt/test/tsan/race_on_barrier.c":"818c1e4885068be9af06b60e0560e5a1ca756c0800867ad3e96710ea678d0d8b","compiler-rt/test/tsan/race_on_barrier2.c":"b4fac9df7f31e20734da54f48053cd6f859cbe137b9b2d36acbc958e507329bc","compiler-rt/test/tsan/race_on_fputs.cc":"530ce6cab279a52514656ec2ce23b147f93c72cc6b0219b1c297838f92aa2d1f","compiler-rt/test/tsan/race_on_heap.cc":"06f50400ae6bd62b2758c2db82d5927d6d937db6e168a9f4356c22358c7b37aa","compiler-rt/test/tsan/race_on_mutex.c":"1cd039a09c26c336b2edfd8758d8f8b035b1abf8eab3a20dd4653f7c876d0585","compiler-rt/test/tsan/race_on_mutex2.c":"6994d47dbd17ea251e040a10cd48a4caa0af83b40cd5c6244e76b92237f38af2","compiler-rt/test/tsan/race_on_puts.cc":"186ccd14df33dcffa23115d617b3621bec80b545129fa1dae4c87c77b422b54e","compiler-rt/test/tsan/race_on_read.cc":"1650a3ec956677855bd140a3aff906f9cf25073c290e532aaa6fce70b611888e","compiler-rt/test/tsan/race_on_speculative_load.cc":"1ae9fb1422661f272dc7a93a4b25824ee374960c39aea376ec8faf3c3f9784b7","compiler-rt/test/tsan/race_on_write.cc":"00779b61be5d4dfb1d80f7788152b395502059c99c88787c56094da076e6f9fa","compiler-rt/test/tsan/race_stress.cc":"f9109d49ffdccd563f2415c160570659727cbf81268101c64c04e0439a4eea98","compiler-rt/test/tsan/race_top_suppression.cc":"44d40da7ee7bfbd684b00eaa0c3cc34197d7e183c80183d19b990c334cdb4757","compiler-rt/test/tsan/race_top_suppression1.cc":"23c53c76e21541015d4826ee26416c0e2eab519b8b23670cd5ad6b5a423647c3","compiler-rt/test/tsan/race_with_finished_thread.cc":"90381b6fa5cc169feba827f8640196aecf54fae05f564a80d3816fff71ecaf09","compiler-rt/test/tsan/real_deadlock_detector_stress_test.cc":"bf7cbd79733119ddb0a97e96abba026e3f74a9abf7366c8112642ba4258a000a","compiler-rt/test/tsan/restore_stack.cc":"883159a67da2479db60a7edc5d03456c1d7cec7cd93849dc12a0330475a447ff","compiler-rt/test/tsan/setuid.c":"f85711eb2a131b3a3d77db391d67a91de36413bc1d9402f632c5150cdd378038","compiler-rt/test/tsan/setuid2.c":"24e2a4196595a48ac62f3b801b785ced67197099ad4f7f171071498971b7af6c","compiler-rt/test/tsan/signal_block.cc":"26edc9b04e3ae1b7390d88904f30a031b19901dc655436178235a69acbac5d9c","compiler-rt/test/tsan/signal_cond.cc":"13cd5eb807775c9f21ebc97d05a55383276a65b7fb4438e25c09c65e187b3286","compiler-rt/test/tsan/signal_errno.cc":"ee6f3fdb11cf69bbe04f63e9b8091b2fe399eb8fdfc8299d4243e2b5ab6a2b8e","compiler-rt/test/tsan/signal_longjmp.cc":"83005a442b97408abc9d9d4a0aaa595defca0d1bd9f88ff5b93841fedbe0d74e","compiler-rt/test/tsan/signal_malloc.cc":"be5cc4486333eac6df23b4445889e751a86c774df196f55b0cef8face55a2825","compiler-rt/test/tsan/signal_pause.cc":"3d99dbea6ac94ec568b796c51afd090c7e00ac32e679d67b7342beb0deae1870","compiler-rt/test/tsan/signal_recursive.cc":"42425f00df34d58a1f1911a3e789627f454d5ebdfe5ac6cce04dd00fa339b5ca","compiler-rt/test/tsan/signal_reset.cc":"3a11e0f98bd59d0dd330b9756eae4c1b83654c27f4208421f00457d24d8ec65d","compiler-rt/test/tsan/signal_sync.cc":"c045150ed73184ec0f2122bf8ad532c8e49741b6ae6fd3ba7e0630c1e5a00f80","compiler-rt/test/tsan/signal_sync2.cc":"ad1d976e9428367be40b3534687c242829ff6ff3bedde8d401b1c4b5705a23c3","compiler-rt/test/tsan/signal_thread.cc":"032232299c3a8a4ff0aaba044f2fbf42f22d0af4df7b5f06ad97b3f1f3ac84e2","compiler-rt/test/tsan/signal_write.cc":"c3649cb4115244a649052fbbc946a71d4e7a7d54211c184c3d0d45b00614e399","compiler-rt/test/tsan/sigsuspend.cc":"f92e42e741fcff46793288351a205ecd632658f1780016f2228a957809454756","compiler-rt/test/tsan/simple_race.c":"a96d8a5b394e45324f3eedafc548a323801b0b32e214e31a7f2aa4f628f0dda5","compiler-rt/test/tsan/simple_race.cc":"4df0baa0c6fa4b7f5041b98c8e5d3f651218430723b1ccfc7d54aa243949673d","compiler-rt/test/tsan/simple_stack.c":"48ddb5d7e9af81b0ff9cfc132f1a550be141cdbad47f2608f00189b8cda3421b","compiler-rt/test/tsan/simple_stack2.cc":"59b27cd2ef23aabc2ce07d955b1697f924b2a3fda413edd694b052fb8655217d","compiler-rt/test/tsan/sleep_sync.cc":"7cfe7e045f16b6ac7dd6f161fb7d2fddb6b43b43b5b7018c5e70099c2a7de9e1","compiler-rt/test/tsan/sleep_sync2.cc":"705fae477b23f5724ba31f42fdfa26dd37ad3415c9b381e25feb13e59758771c","compiler-rt/test/tsan/stack_race.cc":"181266332205b282c3eb59ab7969bb567d1a1186c6901546dfe172203bdc7cd6","compiler-rt/test/tsan/stack_race2.cc":"df3c70cddcc2f96d82f3d809fb6810f3479d605d9c5b2386832929a9ae2829f3","compiler-rt/test/tsan/stack_sync_reuse.cc":"bac23ee612af6d5b0bab2e75da2556f242fb1157d82d9f37eeb258a46df4e43d","compiler-rt/test/tsan/static_init1.cc":"16c72ac1e570dd238f64270c29f1ee92673c7de416c47444b009ac6d1c5ae9ac","compiler-rt/test/tsan/static_init2.cc":"eaf09a37066634684be3c4a151e3ab2b44e0ce5c474e65f66e7f17926864b6b9","compiler-rt/test/tsan/static_init3.cc":"e868cf5fb6c69eb7f42ca30c5b0cf6feab5eb2d7872473c39a22a98217425ecc","compiler-rt/test/tsan/static_init4.cc":"a16f9c8ea3499bfa633854aab8d3cb99b8ab63c921052ba92fdcbeeef2e1ecde","compiler-rt/test/tsan/static_init5.cc":"b8bf4b0049b4f394c64d31c389e7089de2c24ab0077d9a42df3ba6a33774832c","compiler-rt/test/tsan/static_init6.cc":"c4ec38186e81ecb112fa08c8bc70d1b00ee56fb4b5c8622cef53b80c5d703de8","compiler-rt/test/tsan/strerror_r.cc":"39ecdca45956930014a658fd4b037048be6bd0a90b1543591cb61ea17bde1164","compiler-rt/test/tsan/sunrpc.cc":"3c3e06905cdc821bcbe2451396f7cbc90e1d4ef2b40a7a0180d211b4b815762c","compiler-rt/test/tsan/suppress_same_address.cc":"bf7efc0fb6ee1d2398b1e0eeca4089b46cdd4451b008866eac919c23426a1fa9","compiler-rt/test/tsan/suppress_same_stacks.cc":"2a832e9e787bddf4ab1a872fe79bcb51b6de6c629c9fb93edb36db1f65d467dd","compiler-rt/test/tsan/suppressions_global.cc":"fa804ea8b7619a1c536bfcee28e75a4bb0d348e067d48828768d1eb378e7d8fc","compiler-rt/test/tsan/suppressions_global.cc.supp":"76a66cef431fe059b1b5cc12e17149384629909e73c9e7d79bab247be9b365ee","compiler-rt/test/tsan/suppressions_mutex.cc":"ef95312c8f973f5f421087b59d7f8340fd2a18d94fedde0bd9b1242d270c0c93","compiler-rt/test/tsan/suppressions_mutex.cc.supp":"7ff83db0b08726ddb2b848bdea213477876ef10376956369aabc2445d78d6ab6","compiler-rt/test/tsan/suppressions_race.cc":"f653a9bf39c5e3865fa79b0f536c5539178ef70c22bd10949729690cffc4f5c0","compiler-rt/test/tsan/suppressions_race.cc.supp":"0846b7d777cb632574041efc0608d2498c3cb987d71a6a255fed07b691d6d87d","compiler-rt/test/tsan/suppressions_race2.cc":"ca22228166c427be6671b048b9180783ac10e07bcadae006f79a1bb1a1e04c3f","compiler-rt/test/tsan/suppressions_race2.cc.supp":"9af302455978ee5d7eb6d2c85caefe875a37b629faa9c048241e76dee64647bb","compiler-rt/test/tsan/test.h":"b9508d87d676b33198b797d4601bcfb2326ccc5cbf3d17a44d4e7d2fa1cf72f0","compiler-rt/test/tsan/thread_detach.c":"d114639698cf3d5a305d994093d2ef5a502949c5e781496da43ec072f8fa554f","compiler-rt/test/tsan/thread_detach2.c":"ff098064a8c3580f4f9f053e71fc4cbd01b81064e76a5d31155672212b5510c7","compiler-rt/test/tsan/thread_end_with_ignore.cc":"0382186d35fd316e7fc73a199bf0e065605ea11b13f6832ff0ff8651e5ec5228","compiler-rt/test/tsan/thread_end_with_ignore2.cc":"f688a394b502b4603dc5b5f6a64b1acdebfe4c768a2e93a7d00f86fe1fa83a53","compiler-rt/test/tsan/thread_end_with_ignore3.cc":"61fd329ae6af45aa64630404cb482b1b8a0e8bd2922dd889100f4af98be0c311","compiler-rt/test/tsan/thread_leak.c":"3f0960ad5b02ba7063aaa53fffd458efea24acc738d27cec60b61b9d14623c0f","compiler-rt/test/tsan/thread_leak2.c":"523e41187144592b215694f1fad5dd46c7093beba2cee0fa9dcc88c69d9a6241","compiler-rt/test/tsan/thread_leak3.c":"879e1305ea8feb04549a6495b11b93e80a0da5965befc0e6d5225a1a3b416e09","compiler-rt/test/tsan/thread_leak4.c":"36eba65b6b109c9627467cdffa8a78e6c01a7b4c624f26c693c7dc2d61aa0412","compiler-rt/test/tsan/thread_leak5.c":"287d214db1e4eb4eeaf1360897d2bc231e4915c2f6a240d0fce190b1d9650133","compiler-rt/test/tsan/thread_name.cc":"76b9a29051a202ecd68d28a04332f9361f4a451ce350b9f07d0fb4dd1687e111","compiler-rt/test/tsan/thread_name2.cc":"dd97bda9492557cffe1679b4e3164d088255ca2c21867ad0987e4045c99c7f0a","compiler-rt/test/tsan/tiny_race.c":"37751927e7209e2492ff9388bb7f91c18843264b0b675d5e8541dce65730663a","compiler-rt/test/tsan/tls_race.cc":"8a29cec3dfa9b3319671761a058c9aacbe449da0e155a4b34865f7c1a15a4b09","compiler-rt/test/tsan/tls_race2.cc":"d06f425d13779ce28c7f2e6c66f8c07d5eed4a4bcb8d9b543c99e01162391448","compiler-rt/test/tsan/tsan-vs-gvn.cc":"27facc1950f59583de9e9bd25f1cb2e43b3b9a614ab3a493318b9c997fc82a41","compiler-rt/test/tsan/unaligned_norace.cc":"731d4c8b97218aec7efcfdd80736d3261ba40de189a7b4aea4612f0cb9114627","compiler-rt/test/tsan/unaligned_race.cc":"df302db7274dada25761e788a0f57493c0da343d9d5d6d471d1e50a82143779f","compiler-rt/test/tsan/vfork.cc":"0b8d07448e5ba24d4a5e57ee09af7c34708177b017b9fe6e288beccc5545de75","compiler-rt/test/tsan/virtual_inheritance_compile_bug.cc":"d09c8c50a34cd86148ccf5672aa8a9526d259b8f8445ec06885fe267edab0323","compiler-rt/test/tsan/vptr_benign_race.cc":"e402951a8e0628f6edaee78d0948198c0563f2edcf2e3eaa59640ac3865acff4","compiler-rt/test/tsan/vptr_harmful_race.cc":"a722abf6e9855ea9cd0a45d52b786a9e6bbd38f776244dfee2126e6fb72711d5","compiler-rt/test/tsan/vptr_harmful_race2.cc":"60e30437f1a30cf9c25b3f10cc808aab36ee83130b998059b12d7d901e052547","compiler-rt/test/tsan/vptr_harmful_race3.cc":"a699d893499cc009b9787aa2dce5eba390b2a625ba666c59603cc464409ca05e","compiler-rt/test/tsan/vptr_harmful_race4.cc":"7717cb321a45c916b9c701962f611254937504d72a4e45f6192a0ca44fdbf9d4","compiler-rt/test/tsan/write_in_reader_lock.cc":"a04b77d2e244a6d6da4d19f61e783cbb61eb65fcf6b536ffbed059a9bdd2e3f9","compiler-rt/test/ubsan/CMakeLists.txt":"d061d55183c9eebf4b4d4e9dedd23be201ffddfd60f16aff2254217d3d5e3662","compiler-rt/test/ubsan/TestCases/Float/cast-overflow.cpp":"f73c9992db68f1700ed12bfae2c8797106ec3cebdb3415da40b6112dc7cce4d6","compiler-rt/test/ubsan/TestCases/ImplicitConversion/integer-arithmetic-value-change.c":"240fc561fef838b9701d5f766ed8aea071b101d0ec143272c56c2de3e516c864","compiler-rt/test/ubsan/TestCases/ImplicitConversion/integer-conversion.c":"e3540a628ad3ab3af207ab61bea69444eec4fee7efc3c52081b41a8f1d935626","compiler-rt/test/ubsan/TestCases/ImplicitConversion/integer-sign-change-blacklist.c":"f594bd200de7b8b7ea9875e165d28ebe7e68dbb97dba4d1629dead24edd524b6","compiler-rt/test/ubsan/TestCases/ImplicitConversion/integer-sign-change-summary.cpp":"c760841dc07d47140fe2016a5a4de5f1943618915fff0321ba64a4766271eaf0","compiler-rt/test/ubsan/TestCases/ImplicitConversion/integer-sign-change.c":"51f12f146f215a61478468b718a12baf6504a83429bc91b17d834039444627ba","compiler-rt/test/ubsan/TestCases/ImplicitConversion/integer-truncation.c":"27e511c5c792224fe7b15f2d8a80c080c1503e7c2113261ab217d8beab96408b","compiler-rt/test/ubsan/TestCases/ImplicitConversion/signed-integer-truncation-blacklist.c":"b26898b00f1e4fe6c5ad49fbeff1d5aef59457383a14ddb75625e327704ab508","compiler-rt/test/ubsan/TestCases/ImplicitConversion/signed-integer-truncation-or-sign-change-blacklist.c":"ae9369b2656b12eba7537038f64955d39864dcef1f48d45f65e46ed8614ec1f5","compiler-rt/test/ubsan/TestCases/ImplicitConversion/signed-integer-truncation-or-sign-change-summary.cpp":"27b3e0fdfe6886aa1770fbe3db6fec1ec8210672bef474a44fffe41a1735aff3","compiler-rt/test/ubsan/TestCases/ImplicitConversion/signed-integer-truncation-summary.cpp":"0c7b55bd1501572da8c0dd681b65cf414c8ae3a1479af831892bece5bd0a8d0e","compiler-rt/test/ubsan/TestCases/ImplicitConversion/signed-integer-truncation.c":"670d40a09433319d1b1f1986de0b86066c393e857991889787d21253dfc85342","compiler-rt/test/ubsan/TestCases/ImplicitConversion/unsigned-integer-truncation-blacklist.c":"7b41aa567314f002f740af0f6fbd7f142b9223ed03a5a28a46ad6608f1c9b059","compiler-rt/test/ubsan/TestCases/ImplicitConversion/unsigned-integer-truncation-summary.cpp":"1d9de0240df10096476893e1dc548a7faaafc0968be638908c4e377a5da8632b","compiler-rt/test/ubsan/TestCases/ImplicitConversion/unsigned-integer-truncation.c":"8ab669bfa5aaff970484263abeadbd7eb3ed900128f72110cc6ffa94764c7b9c","compiler-rt/test/ubsan/TestCases/Integer/add-overflow.cpp":"37263d3e6158d598f35ea4742fb0e9d9fca17e0b9634c8a2d1c6d2b76506be94","compiler-rt/test/ubsan/TestCases/Integer/div-overflow.cpp":"612e4dfbf9f42900d3b5d358a700540a885b610cbd279a49e857015398d8eb30","compiler-rt/test/ubsan/TestCases/Integer/div-zero.cpp":"879e86d3000bb9e4d1652485528f49853da149b984b2ade388d6808c1fa54aa3","compiler-rt/test/ubsan/TestCases/Integer/incdec-overflow.cpp":"b7fa14502d87a011563fddffed7d69d491a0d45c76b61e7982e147f6047f27c0","compiler-rt/test/ubsan/TestCases/Integer/mul-overflow.cpp":"6b6b2815cb7dd8c1922a20b0568b26c25e2aa621a03d4ab0d46dbdf530f9ad17","compiler-rt/test/ubsan/TestCases/Integer/negate-overflow.cpp":"298ecc7fb9f7c07d98c8582db1688f2b51f1fa2ec3e7c3a0fe0a4294a163f4b0","compiler-rt/test/ubsan/TestCases/Integer/no-recover.cpp":"f3f688e54ecdd3ce481f2cfe2548bb2f2778d0da44ceb2c9a6b50a1d71c90482","compiler-rt/test/ubsan/TestCases/Integer/shift.cpp":"322f1f230c8d93e5df4ff288d3cb1101a0e90120fdf678ed2a8f7f4b1b87ab3d","compiler-rt/test/ubsan/TestCases/Integer/sub-overflow.cpp":"52a0745f8e627cb57e29bb5f6dad0ee8f60814a97c1efa42b6ae85bae44fa27e","compiler-rt/test/ubsan/TestCases/Integer/summary.cpp":"3001c501dc4d18d2555ee6d473a32e0c79355ab3b5278660b7544b26eb5ad93a","compiler-rt/test/ubsan/TestCases/Integer/suppressions.cpp":"efa652762afcfaaa88daa6b50bd5390cc88035b156c9c6d44e0bd7604c83fd65","compiler-rt/test/ubsan/TestCases/Integer/uadd-overflow.cpp":"8744e7bf682221fb92b8e1c5f4135878ccedffcf21b5dca8dcc3468d345ac7bc","compiler-rt/test/ubsan/TestCases/Integer/uincdec-overflow.cpp":"a318d41fc567dc1facfa1f62df4be594070cfae47b628ba3dcae8508f66a2089","compiler-rt/test/ubsan/TestCases/Integer/umul-overflow.cpp":"046c8ff0d2b85c8b756d79cc67f9a2608f55cd6d2f1306c9c459210e26f7520d","compiler-rt/test/ubsan/TestCases/Integer/usub-overflow.cpp":"66d2858d03f95ccc7983caa88ebbe9d773c18c86d071ee42d5936dfa794efb2a","compiler-rt/test/ubsan/TestCases/Misc/Inputs/no-interception-dso.c":"e053d840579744f96095e31b2d8e01463264062c32862f6917a6f2fd39fe49b1","compiler-rt/test/ubsan/TestCases/Misc/Inputs/returns-unexpectedly.c":"ed7a66e18e6231a62d4d15b5ce106055266484956683fc19459e252c99e6d0ca","compiler-rt/test/ubsan/TestCases/Misc/Linux/lit.local.cfg":"752f9f465d546875972dbfeb1fce9b5ecdfa3ab1d0b6b756efb1047f93298b01","compiler-rt/test/ubsan/TestCases/Misc/Linux/print_stack_trace.cc":"eebb14444ce328f45a0ca2211968ded1c1ab262b9faf3ab951ddc151c917cc1a","compiler-rt/test/ubsan/TestCases/Misc/Linux/ubsan_options.cc":"1ec048c8723ab1f304a8833a15eca6dd07e0181e7ad7cd4e92abd9abf3066be7","compiler-rt/test/ubsan/TestCases/Misc/bool.cpp":"63d2a4b9b96317473ce0b960583faad86e070d42459715c7755ae2d14e34eb01","compiler-rt/test/ubsan/TestCases/Misc/bool.m":"a8f80794d6a7c9c88573908de6a19a8e1717e08e0a6197efa25b3abc7baa5891","compiler-rt/test/ubsan/TestCases/Misc/bounds.cpp":"cf1f0aace595e3a19c3ffb297006d877bd0facda072135169397b4578b84c63c","compiler-rt/test/ubsan/TestCases/Misc/builtins.cpp":"4a7c197e70db16049fa3aa61dc215664a3e46013ff408ee7ac0b2c6fead6ac91","compiler-rt/test/ubsan/TestCases/Misc/coverage-levels.cc":"b4e86914f9f80270bd17fab88621c46bd3e124d4367ca8684176b123c108892a","compiler-rt/test/ubsan/TestCases/Misc/deduplication.cpp":"058b98ae359075b670aaca7ac071dcea9d8e77fc1a335a0c2f615e60d2224f4e","compiler-rt/test/ubsan/TestCases/Misc/enum.cpp":"0ada8a7edfd60409bdc30508f473fdaebdce298570d4d436f30467017aa5e5c3","compiler-rt/test/ubsan/TestCases/Misc/log-path_test.cc":"c83c0670f5fc809b6998f5c996c46d096e9182e9ce7bd18b69baadb9ef291177","compiler-rt/test/ubsan/TestCases/Misc/missing_return.cpp":"d30520114eeb0b3eba66126c64f2e59601d9f696b4e1325f7edf816a0ceee662","compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp":"329c014e923654e17724cda88f2b963d569c688939001fc0b160dbbee544dad6","compiler-rt/test/ubsan/TestCases/Misc/no-interception.cpp":"a1e8465e1864ed48ebf2e244f1639bb9b9d9622ef116ab6291726a6527ab2457","compiler-rt/test/ubsan/TestCases/Misc/nonnull-arg.cpp":"65a26ddb1c1bd61c36df41a749dc0ae718570df44231f55b9bf23a1bee1a7d8f","compiler-rt/test/ubsan/TestCases/Misc/nonnull.cpp":"47728e040a01de78bf5a82d1056fbb9110d0450fa5b1058154a53f3cbde91c7e","compiler-rt/test/ubsan/TestCases/Misc/nullability.c":"4c99384afdbad13564eb954ab6e6904d07dd04fc1e4b724d5a7f7aa6af0bfbeb","compiler-rt/test/ubsan/TestCases/Misc/unreachable.cpp":"4ca5c5a21e564d37f707c98eb256068dd840df8c89f7f69ba1866982b8251608","compiler-rt/test/ubsan/TestCases/Misc/vla.c":"9a2fa477c70673c0b43cb5ed729cb68a931c3b644cb30fa4a7cc9fe70c4312b1","compiler-rt/test/ubsan/TestCases/Pointer/index-overflow.cpp":"c6cf0d9d96b3240194a1e2babbac3264e8cc8953189d08f545a823b4590adedb","compiler-rt/test/ubsan/TestCases/Pointer/unsigned-index-expression.cpp":"3ddee39a35b841fcca6b554fde2072c6476bb53c350145fcac4a91a4205a6212","compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp":"95a1b8c8c2ec76971e9cadc2423e945d128ac5802b199043c7b124154cb4d2fd","compiler-rt/test/ubsan/TestCases/TypeCheck/Function/lit.local.cfg":"2b46b9c55abeed861805be813af9e8b19767c15ca6d90de849455193d0293bd1","compiler-rt/test/ubsan/TestCases/TypeCheck/Linux/PR33221.cpp":"a5a7f717443f28b41e6a572610bb547e2aad152f692918f53e3dfaf7a09e7571","compiler-rt/test/ubsan/TestCases/TypeCheck/Linux/lit.local.cfg":"752f9f465d546875972dbfeb1fce9b5ecdfa3ab1d0b6b756efb1047f93298b01","compiler-rt/test/ubsan/TestCases/TypeCheck/PR33221.cpp":"00e344c30354a3fe59bef63814380f85c110ed5c93c1b789828013f4de6b493f","compiler-rt/test/ubsan/TestCases/TypeCheck/misaligned.cpp":"db4d0a781704b97c07845c5fff0b36c963e526317c266cd9bfa3daa0258c3f2f","compiler-rt/test/ubsan/TestCases/TypeCheck/null.cpp":"cd15b9ccfe01c14868f741743cdb2c28f3893e66759f3048ee92bfe8c70f3de7","compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-corrupted-vtable-itanium.cpp":"c2c521fde9c688f7891e48b579b3354fdfb2354c4fb9c8497e922dc7654705c2","compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp":"ac6451cb4b8447da4aa6608be02004a1bc71577125cca62a47a9bf363284da35","compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base-construction.cpp":"cc371b973337af98d3fe34d92dc5010c2ecdf2346012c319d53023d0557a0b29","compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp":"7350ce1fdb7001a33de9077569d854d6db3ba573d41f7d0cf03f8b27c4a9ed11","compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp":"7cf9d8583d1cadfcdc414fe2654c7038a1b7d246e6bc7cdb3501eaadab62e304","compiler-rt/test/ubsan/lit.common.cfg":"4d0594ae78f89ba5de67f15b5f7102f4d41058278c498fcc799d93212d37ae4d","compiler-rt/test/ubsan/lit.site.cfg.in":"976e50ba8f892f880aa8809e5f3c16ace645a12357493dfbfb74731b37039a98","compiler-rt/test/ubsan_minimal/CMakeLists.txt":"9085d3a81c0e084fc5df31d4c12bd88f7744535178a3ac07dee7b203c08be4f5","compiler-rt/test/ubsan_minimal/TestCases/implicit-integer-sign-change.c":"fbe0c9ded3594c18053fb07ebc50a1f7fd5d5f485d08cbb92533049d7368946d","compiler-rt/test/ubsan_minimal/TestCases/implicit-signed-integer-truncation-or-sign-change.c":"14a40cace354bd80be6cf3a416b943558816208037d40b5767c834ed391d20b3","compiler-rt/test/ubsan_minimal/TestCases/implicit-signed-integer-truncation.c":"b894f449d0eafafb06a2f02b324aaa6c5e24e688d4e95a2211f56a9bc6b50d0e","compiler-rt/test/ubsan_minimal/TestCases/implicit-unsigned-integer-truncation.c":"24e329b4a1ab4022edfe0a23a9f4d2c79febe269eb8f5256c60882d9a0d98d22","compiler-rt/test/ubsan_minimal/TestCases/recover-dedup-limit.cpp":"83ece559f0ced548620500e413e01446e56566cf3337c1d3c889c264fa9f90c6","compiler-rt/test/ubsan_minimal/TestCases/recover-dedup.cpp":"9273a9cbc6296d063a09cd6e0f10357fe750bf3d1e99edda2cfea4cb13d77a3d","compiler-rt/test/ubsan_minimal/TestCases/test-darwin-interface.c":"f434acc257b28e38613d6281f3492f7002e23f6e4d85e559902be9d8b2061dfb","compiler-rt/test/ubsan_minimal/TestCases/uadd-overflow.cpp":"4b17af6af189bf8f9a30c49ca0d3444cdef77f68e1fbcdc1f566013928ba0871","compiler-rt/test/ubsan_minimal/lit.common.cfg":"c22d1754aa879372ff17ab89e80a09932adb7a18f528612b250e196d28c257ee","compiler-rt/test/ubsan_minimal/lit.site.cfg.in":"edeb6e782933772951bdc5d6a7ec77f3ff49872d4ce54d7764c73e15852926e7","compiler-rt/test/xray/CMakeLists.txt":"6525b80bce3e33c1c1964e5d3ed7afd952b3a2e9e5812dbe08aff9ecaf47a479","compiler-rt/test/xray/TestCases/Posix/always-never-instrument.cc":"f65f5102bb8248210ed520d8f65f72094285f2485ecae26e1dd019eb4cec806e","compiler-rt/test/xray/TestCases/Posix/arg1-arg0-logging.cc":"d6a3b25042d3951d6f0771526d4260d9b4fe02c0ea1dd10d7277e703b7b21afd","compiler-rt/test/xray/TestCases/Posix/arg1-logger.cc":"59da4b4a4634401659f1385cce59966f1fb55bdbb977c0dc65305016d51ad43b","compiler-rt/test/xray/TestCases/Posix/arg1-logging-implicit-this.cc":"b042b2c5089e4ebfe73c37ba20bce62a4d6e0d35c242ba525b2d6db316648d4e","compiler-rt/test/xray/TestCases/Posix/argv0-log-file-name.cc":"25ea0535a0f692048210dcd2da7bc4d0a2f970f47b3d7af54a020f4bb3b6dadc","compiler-rt/test/xray/TestCases/Posix/basic-filtering.cc":"388ce13bf1f63bd0cdd82910151c08a4b4aab43bdb692e394c5fa9070bd85173","compiler-rt/test/xray/TestCases/Posix/c-test.cc":"be2ed26ea88008f3befe42279eba1e9b1898214ecff801d98f5816443e06fefa","compiler-rt/test/xray/TestCases/Posix/clang-no-xray-instrument.cc":"0781d59c9668d04f36621e609e3f5d4300046e93daa3d77357ddd2a892e44d4f","compiler-rt/test/xray/TestCases/Posix/common-trampoline-alignment.cc":"4fd661f289dfa2e434ae62f6a35cfa1429976e217faa0820cad3b8d60cd656ba","compiler-rt/test/xray/TestCases/Posix/coverage-sample.cc":"6541ef3dc61ac564b72c1ea04812c0d11531c9f4bec584905fadcefa1a58d723","compiler-rt/test/xray/TestCases/Posix/custom-event-handler-alignment.cc":"9acb1496f91a37d50814ad6df1cd1d1556a0510723bd73a6f37317b690746523","compiler-rt/test/xray/TestCases/Posix/custom-event-logging.cc":"8d160c048a721d6331bb9c4b4aee97ebf848ad982104d0c0931f582c58dbff98","compiler-rt/test/xray/TestCases/Posix/fdr-mode-inmemory.cc":"9c7055b8ffded304258fa9df10af7fda26ac4c9aa31b4afbb15f5db20cc0767d","compiler-rt/test/xray/TestCases/Posix/fdr-mode-multiple.cc":"a4062781f1ac3b9cde6be78e09639805023344aeda6caa717ca0c7c5746a736f","compiler-rt/test/xray/TestCases/Posix/fdr-mode.cc":"25fbf4c745c98fb3a31b70121b854e5a06a166542c84b175eac6e4f2c7814f4f","compiler-rt/test/xray/TestCases/Posix/fdr-single-thread.cc":"7b2717b3f9abbabe5c2079a03db33160cd32866683960db0aa121e441c47beb6","compiler-rt/test/xray/TestCases/Posix/fdr-thread-order.cc":"5d996d29bc01d84175ccca0e9115a5867fb5888930cd87fd5f4df698a1248175","compiler-rt/test/xray/TestCases/Posix/fixedsize-logging.cc":"ebb97a4c96d15ec64eb985457f6c204d9fee8bb41e11af848ea43c8e4d9ed45e","compiler-rt/test/xray/TestCases/Posix/fork_basic_logging.cc":"24271487ccd3cabe807659af7ecc5dc5ffda41ac5645cc2942885ec11c4fbf99","compiler-rt/test/xray/TestCases/Posix/func-id-utils.cc":"39b86d15e793f638914a1330c17d0d9bc38664b8fdef30a01f1e117a72661d4b","compiler-rt/test/xray/TestCases/Posix/logging-modes.cc":"fad5ee2af9cef19cd1c41a97447d4f06771eb3108b602627d5db2211c923af70","compiler-rt/test/xray/TestCases/Posix/optional-inmemory-log.cc":"c367b4734b3bdfb957ed01915b06fa7e491d778b4c5146d2c5a6512fd3226cbf","compiler-rt/test/xray/TestCases/Posix/patching-unpatching.cc":"c727ece8c0343c6100b762a30a8e11dc5bbf2bec9ef09a583d0bd174697376cd","compiler-rt/test/xray/TestCases/Posix/pic_test.cc":"7cf321b44036cad796a96a120c91315b95b0e53299599756b6bd65577d9863cd","compiler-rt/test/xray/TestCases/Posix/profiling-multi-threaded.cc":"6d6149406e9de2b21076d902c0c10f65dda105844c1edc5376d61f0cdb389f1f","compiler-rt/test/xray/TestCases/Posix/profiling-single-threaded.cc":"572d9a304885d2523fb166a7bf2ea7521374a7d1a855b65046c3ec6c5d3c448b","compiler-rt/test/xray/TestCases/Posix/quiet-start.cc":"f8fa4017095b814459d9b3dab2e87506be2b5505c0da64256259e82270072310","compiler-rt/test/xray/Unit/lit.site.cfg.in":"168842960de61e4f86191f05b7cefd638a0c235b7d22c45c727c6d4bd24ac63f","compiler-rt/test/xray/lit.cfg":"3bf1911511b63b3a3b70b34cf8f4efd5e25b74949b988c6f919bc61716855a38","compiler-rt/test/xray/lit.site.cfg.in":"05bef68d57b3760b9fe330ef702fcc799723a6e6b32109999aba6ee4ce1c6963","compiler-rt/unittests/CMakeLists.txt":"b38b1944f0444e7652cb2cb08f0222f9752387dd342fcd0491ee193f5d15ed8d","compiler-rt/unittests/lit.common.unit.cfg":"7b216d266fcf44d7e3370830cfa9d5040e99f6eb398f8f155da3a27bbf6a734f","compiler-rt/unittests/lit.common.unit.configured.in":"883c660273a7e120cbf511b2735da58e1ed0a93b952fb61f11ddd353b51860ba","compiler-rt/unittests/lit_unittest_cfg_utils.py":"011e4baada3839f3b0ac9bf81f8b2a9e2edb70ac65b2dcb04b7181758d093a48","compiler-rt/utils/generate_netbsd_ioctls.awk":"5fe215c2bdc111f66c01fabf53d5e518aff25772975f552e834a23c555f894ce","compiler-rt/utils/generate_netbsd_syscalls.awk":"01bb546309f3bfa69fe6402333761648c9aeaebd1dd35dd2ebdcecbb0b1e6432","compiler-rt/www/content.css":"e81046dcfa9744f316a13dce738639734d3407efd66b067ab6e17c554ec772e4","compiler-rt/www/index.html":"6ff9e67b6cdb8c2e48d1127162fd68c078b26b9a63546d37a4841fcf9b7ac601","compiler-rt/www/menu.css":"0fbb4e518187e1b08def50f199ad8dca437577b1a37c5280c9876159be37764d","compiler-rt/www/menu.html.incl":"924777e8c3fc3f1caa3f3d16310531d5a4ef77963fa2bd6f658db541cc511389","examples/intrinsics.rs":"2b343b902b0a1c477d1cf6db9d369621a2acee9814ce8b87e538223f905c3bf4","libm/src/math/acos.rs":"ee414f5adf3ab03700f04f93875b555e115169a48035b624d7dc7832ef825d0e","libm/src/math/acosf.rs":"7dca3cfb649385ed9357225bff6ba8056e48e21d1854bb91ec91fb3253dd5d6c","libm/src/math/asin.rs":"b0f880f20ccf33618706631caf10ca9996a0a16ffad7edd828fc48372499d4b2","libm/src/math/asinf.rs":"7b1004abd86fe24a56f6da32d0f553ad9b4a418c52de9ae85233740788bd8399","libm/src/math/atan.rs":"2ad4a4ccf8a84841d3707a4fb90a0e6ce8f64e7499d5fed3257aff1f81763a92","libm/src/math/atan2.rs":"b4efecd254ec77eb780c9b19bc1f7e39e0ad90f93b8b52e39cdc329b934ede2e","libm/src/math/atan2f.rs":"02b8af6ec4bb22680359846ae1f8012b5917072dcc6b938174378b586196f3f7","libm/src/math/atanf.rs":"f55bb4391bcb34216631c91493b2b7159d30d41b864eccb6026854a00bb4bb32","libm/src/math/cbrt.rs":"95f22e73f924c27e33a6f1014619cbe607a92697c4e5a64a84d987f5afa382b2","libm/src/math/cbrtf.rs":"00a9f181f7c634701525fcbffb53369a57cbade04dcd77a7872f092b09f99f9a","libm/src/math/ceil.rs":"6489559c1aa24b484f0ae52a2e6f617c1bdb11beff9f6fb31a96c715b0550613","libm/src/math/ceilf.rs":"a50e65bd21077857f1ef83f70c79f281fde4549525cd5371193d9f25397191f4","libm/src/math/cos.rs":"b5f068b768e4cad0428e40709ffcf74a51b573500a1b59990c66665aab2a7ac3","libm/src/math/cosf.rs":"1405cca332664e34bc585753ffacd82dc7dfa9084b6cec222bd6f92c3c8a7983","libm/src/math/cosh.rs":"3ae4094c3b2b1c6e39bc99d23d39ad8697fc7d9d9aa7c59e62ad765babf56e73","libm/src/math/coshf.rs":"f16ae30e9317268a401feaa4b5fa3026f4b695dda02977efbc3c3ba4ca205746","libm/src/math/exp.rs":"34bd8fe8bf37a29bc074f8bda55269817677be3dbd13b85d31dc91f3fce18bc5","libm/src/math/exp2.rs":"9e70bf59bd9c79383a515c83d68c3aa4392a5ae80cb3af4a879a659bc64b8902","libm/src/math/exp2f.rs":"6291c35d2097f61ecda6d768961fd6d2fb6d79241eabeb06e7c780e35996f89c","libm/src/math/expf.rs":"3b79e3691284c923d49a4c554832395f0fa91a282fa64df4d7251007683a14a2","libm/src/math/expm1.rs":"771ec9bffca6720e6b542737e009a4314376366176cf953a8000f51111cd3a1e","libm/src/math/expm1f.rs":"685b51d7f5111c3ab66b7cb5608ef29c1b8691b4b6a2fe8d377d5847593a8e0d","libm/src/math/expo2.rs":"b7fff769277357438c26a23a0dfceeb801ae3f404fcbe1807bdf4d358b49440b","libm/src/math/fabs.rs":"4e3c4f11692f655ab8debeb57423bc43313fa38c08615c2c6d109a5f67a81995","libm/src/math/fabsf.rs":"87b523d0db9013a5243401e525e404a990734829faae18161528eea3ec72ac85","libm/src/math/fdim.rs":"c00280c2df40e0944e2128c2aaf3d07734c6182da55aa987eb04a1a70c7ab7da","libm/src/math/fdimf.rs":"81909484f2555c26f49c6e3216cfa012a91c722d5d3e6f13938e282f50b8349b","libm/src/math/fenv.rs":"a8a835b195f880094bd9fb46762aef869e5f5925569ebbf71cceeafa2524a909","libm/src/math/floor.rs":"08328e45ab0ccb1c264ab421f513a8636a83eec923fe263a28306da53c6a388f","libm/src/math/floorf.rs":"10757434b905ef50214594a766df54375b6dcadee7446f6be4b51c634b61eeac","libm/src/math/fma.rs":"366b19756ef7917d5dd793a060802a69177e738e6509c2ab451d9c7f38fa715b","libm/src/math/fmaf.rs":"68f5caa2909c8263df784bfe9ba2787f47ecf4249cdf396508361f328db69591","libm/src/math/fmod.rs":"ca02745c29b00d0471cbbfb36ac525a8a94d1235bed05811865d4922978ec049","libm/src/math/fmodf.rs":"f812b2abab98c79b2ae5b6ae247797a3c0c84cb11db34919c152b19634208840","libm/src/math/hypot.rs":"6bc5a37b739cd234e7312838b5abcca52f8399a51b411957fd93a1c6ba4cbfa0","libm/src/math/hypotf.rs":"cef5083110217ecfc35112740f8060a5ae4248e886aff9cd87d310d8a03842da","libm/src/math/k_cos.rs":"80d2f2c566f21f66d9b9e3ee04f14c18ce721cd3445f59039670ef6cf8fc4a85","libm/src/math/k_cosf.rs":"c1bf7674d13b9c7c7e81af37e874a2521473ff9cd75e2027d9bb6ab04e5a5bf4","libm/src/math/k_expo2.rs":"6034d7cd33ef153b8a5ecb79f133cf41357a6436db370ad74ed5e623113e304c","libm/src/math/k_expo2f.rs":"7221643f73894c6b5dfd285eacc6c01b564da547bd0c86ed24691b146ef5466e","libm/src/math/k_sin.rs":"b09d1984ce2ec785713c6984ca3d131b9b0ec02faa6d169b6cb759f982e7d968","libm/src/math/k_sinf.rs":"7e5c1f0b9ff7cc589db35978f520b4d665db66e47b33297e137f27ec17086e72","libm/src/math/k_tan.rs":"238d82ed0c967da443f8a2351c6c9f60a05eba3a053dac3792342b82a97c80cf","libm/src/math/k_tanf.rs":"b90bd3666e9537796263fb361aa768279018e2edf06ec44483045d2753cd6aa9","libm/src/math/log.rs":"d65c787d507d6ce679b76069f29d81929a5edbc3a64bf68a881b3e844a98bb9c","libm/src/math/log10.rs":"40cc496f8ddf94bbb517405abe60668a37275aab498c14e381d0e9162d506f3c","libm/src/math/log10f.rs":"025ffb471e24a5b8cfe7d162e3fed51595938bf2ce55d6e6e4865075cb6c9069","libm/src/math/log1p.rs":"675e52ba347a42b21a81a3bee28d74ba734d1c687342c27d33054d231417db1a","libm/src/math/log1pf.rs":"8ea12ba881bde5d469380c22bc75304145d4c84481bddcb6c86036006c1daab3","libm/src/math/log2.rs":"f146722ca9a6cc5ae24807f96cfa99c9af970f739847e940e08899125213c847","libm/src/math/log2f.rs":"563a1e10973e86b9bc0e629757745cc26e9f3d4fc53404d36b0cfa92d3eb27a7","libm/src/math/logf.rs":"d881003e89932d36376e788db70b10272ee78a1b063560fd11d4b3204020082c","libm/src/math/mod.rs":"adedb00479e7e7891204bfa6b1ad7bbe2337544a17563b84c0d9ae75d033338a","libm/src/math/pow.rs":"316a3e37d5ff7df3d76c102bc96427764594d98ed172c77f51e829f361585f2c","libm/src/math/powf.rs":"7bf06a88ae8a9671d0c231d42485dec1e0a9350790373c3f35be366febbccd00","libm/src/math/rem_pio2.rs":"54ae12076ee99f2d8da72b7cc56e442ca6fcd74d81d99156ab5b8401b00caa04","libm/src/math/rem_pio2_large.rs":"e4c71312e0990423dae43304d6421ddd54b806fdc55b769c20cd460483d5887a","libm/src/math/rem_pio2f.rs":"4443cab720513106135f521aa17208033ddd7a35a697c7c105a95166126ded9a","libm/src/math/round.rs":"489c784a8d1e58394bb056a457a904774b81f48956de25f4d15e33437d218ed9","libm/src/math/roundf.rs":"ba1130d6ed26fcd22bc175210ef16fe142867e3695d843d79110468ac8897507","libm/src/math/scalbn.rs":"d5544fb204cf323ba636ef626c652b486956a4173999aeb53e2ae09b07951451","libm/src/math/scalbnf.rs":"1e5eb0a4ae41b2aca4cf9f17b5f1d24e1c76703130307bf6b666d352351b46d9","libm/src/math/sin.rs":"5e3b4d6f4a54292dbc7f6072ff4c1fb7784cf205243ad38732b1ce38b55644a2","libm/src/math/sinf.rs":"ae78cd72e90a132d32f5a3f51bad13bf2f7a7cd1c3e6914bc6c4255c2c0c76cc","libm/src/math/sinh.rs":"c98340c8bd6d43d0b79bd29d351f6a4e5e93812f11b32d04421f85931987e30e","libm/src/math/sinhf.rs":"37b6ca9cbbcffd293b21b43cbfbe4c8f960136c39d4cebb4db777e19a01525a2","libm/src/math/sqrt.rs":"ae653a93587a385adb744b1027b73819e936359dc87c5dd290813224bd5bb2f7","libm/src/math/sqrtf.rs":"d836025048114374a0f16ec0d492b375583dddac9289fc1361d633a61fc8e0f6","libm/src/math/tan.rs":"1d72193405de87b2239a8db9c7d6b9d2451c99065754c8b757753faff35b5b47","libm/src/math/tanf.rs":"06a49b282f2cf0f55e7429566f46233fe28319469ae16f538672de982629e67f","libm/src/math/tanh.rs":"da5474c99b0bfb8464a247cd2f16f577d08afe3a69f36ebb2cec5d5e6a354dde","libm/src/math/tanhf.rs":"ea41ed860dd5f4e3a06240736a531228a557b1c777798f0cb03bbf51abc0dfd5","libm/src/math/trunc.rs":"5678828366f9aaa46633a891c5fb57bced17cfcad1b0dbe305944563415c6553","libm/src/math/truncf.rs":"90c5982f12bc9f1614774d5bed3fbaf61ebd9227a20d58c2d3f09394f0b2ecdc","src/arm.rs":"604c75ed883a5f27b2291375b215d92d20dfd2a48845f4ca516c6b5bdf0bcc36","src/arm_linux.rs":"93383ed0d89dc1775ff1eda931228840c0a46f253e9f0d9035e8fa2ed96d3e6f","src/float/add.rs":"651a29e3e25e22cd77fd7ff477aa4386cdd01e4d4183adb31f5b5ff5c4ba63c8","src/float/cmp.rs":"c0632d9237d9b8ffd1971b709fb885be97186e2d582ad4dcb2d9e02be211ad26","src/float/conv.rs":"9a5f26788b6022d581f599d14c1174e2444d3b3d0742f7f0e1b30ef5a2aa617a","src/float/div.rs":"49a1da3f3ed6c6abc9c540eee420952f6720b1c4b8772b1308a6706e7ee9be63","src/float/extend.rs":"1426431f05de2415777d3f9191b4a8d5a150d0142b57fa762bde58ee565529fc","src/float/mod.rs":"5ab604f1879e0ccae33bb50b9f6337656daf1c438f41c1218b561de4694194d1","src/float/mul.rs":"cd2907d2971d77969298985335c415a35c5556d5ee05942db5be32c6e8331f9a","src/float/pow.rs":"b81f1358c6aba86ed14439ccf5ea94562ddda3a4845789a1f9da335fce6bece3","src/float/sub.rs":"dc83d3dd63312d28a59533c0c53156f42e8f9ddf192402cad194160d217f1125","src/int/addsub.rs":"83912fd0da8c69850a98dbf5dd4badd6430be2f647660cfd0c6fa026a40785e3","src/int/mod.rs":"8ac26ba718cebfbb14f37c7da0b8824385c10b1f92047932a3477e765812461e","src/int/mul.rs":"e218a46fb61db057af8bb704d70b14fb22025ff5004f077bf5815cf9748b69c8","src/int/sdiv.rs":"85c4510cca730061029fb455fc87a0ce99585b2cf3b5555dd8913d06e126ad71","src/int/shift.rs":"82e51b067422417e70322f1bca9a6faade266e4c9ee235198b7e6a9269494eb5","src/int/udiv.rs":"cf2636408a48424dbe08cb2a66b87a374a49951bf929ecb180a7e43096a57262","src/lib.rs":"e626509c65a7fdaa79665f368b5b6fab34569aaf7827b56aee79f368dc584db6","src/macros.rs":"3e85198cac01112f0e696ab175ed81732a5297086a89b18767e614bb74200d5a","src/math.rs":"4200f4c7498ccd7d3cc6b232af133ab938db940c731b844e9f3af213a875b7d2","src/mem.rs":"8c5c26e389dfcd458d0f3d601cc96f8e3edb91d21414bfbdd2ebfc28870c0587","src/probestack.rs":"d22c389267e8032140a143b5d8fda67da8a3015ba1ab9a8a91e189cf8fddd0e8","src/riscv32.rs":"b9b433d248fce35e43a7df430697545f39898fad46be7d0197284764e44993b2","src/x86.rs":"cfae51814619da70fafa0ce912198e8d697e9337c76a7467baed2bb0cda388a9","src/x86_64.rs":"d6be9614a56cb5757b31d1371c37bf847dd4764cd13e1016850743a8d054b8e1"},"package":"d7de11892d9f9f1bc76d43011c8233d27d58300d629dc9dfb51b6626ef7f6077"} \ No newline at end of file +{"files":{"Cargo.toml":"7c89904df0920c3e3f2c91dad127f98612d75c9d33e5f0f690b14baee0fc2772","README.md":"937842d6ea24680511673d3558ffb2c114bfe6b0ffb6905915da27ec5d6136be","build.rs":"20e1cfc45b2be27889ff263178dd7599a57a8c040c09e6f4a34ee9929826ab4c","compiler-rt/CMakeLists.txt":"83da5a27ba638f9e9140d4847f74c506b7b91924156e49a83d01a08d3e51f688","compiler-rt/CODE_OWNERS.TXT":"dbb19a1c9d46abc77fe5e8debab8be7c0fcc8782b19a079b069eaeee577d27dd","compiler-rt/CREDITS.TXT":"a9901f47a089da41e4690682d00ce4cedaa2baf41fedbe79beee366d43ac2461","compiler-rt/LICENSE.TXT":"dd27f8c290bcdc8368549cd7cd98710a9dbdc34122f2e096a1edb97824ed4148","compiler-rt/README.txt":"a9ed6807100a66fd5e44d4af4a2bf2cb25c9243c896e7bf1d4941b7353b388e3","compiler-rt/cmake/Modules/AddCompilerRT.cmake":"74ddde5202c51227972a7aacf66ac2db3c8ab0a5854a46a637455e2672865a63","compiler-rt/cmake/Modules/BuiltinTests.cmake":"641fd9c2af65f82a58288d5b6fa36aed4d2fcc88199eb0f04d8b28c38dc950cd","compiler-rt/cmake/Modules/CompilerRTCompile.cmake":"c0b080898ac46d97a14b902bae5b9055592064ab38b3bdb0b8c7671c06a6d3c1","compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake":"abc4850b332a543d1e2641d488f308e9a3b06934225a71a7f342ed3aaf2d10af","compiler-rt/cmake/Modules/CompilerRTLink.cmake":"c4c98662f8737346dcf9b5f593f59cf1042a4c774f622bd4b6151419382db39f","compiler-rt/cmake/Modules/CompilerRTUtils.cmake":"e738810d1c34cb13bb906e93bc0f894b8bf08341680bc7782c692214f983b7f8","compiler-rt/cmake/Modules/HandleCompilerRT.cmake":"d2c85f13f9d0fb2b5845fbdfaa3b27120716f84a0a78215ff1fac20d7e60834c","compiler-rt/cmake/Modules/SanitizerUtils.cmake":"3333ce8ebdce6ceaa74d16d7abe85fde57f761ef291d9f5d4e07bd6950f26a27","compiler-rt/cmake/base-config-ix.cmake":"e0380966b5588929430d3efb875835131e798848b17946dcf21a5ff05871ae4b","compiler-rt/cmake/builtin-config-ix.cmake":"e754daf608a556570351f050198380a4890def79d0b5efb557e3462f4d9c1908","compiler-rt/cmake/caches/Apple.cmake":"a897653dba4e944718d527585400fbb7b5475fbbc36f5319bc7f0d15eb7d0388","compiler-rt/cmake/config-ix.cmake":"6de9057e85799547dc7990e16a86e395ab17f26755f24715bba5d96d161904a9","compiler-rt/docs/TestingGuide.rst":"c7d5231cca745b3243cca475d36e8fabb082c04c005c03c800f3acf86379d083","compiler-rt/include/CMakeLists.txt":"8e5585f6fdc02a323009e6e333d34d5452c1637758fdde721c03a7a7a45a7082","compiler-rt/include/sanitizer/allocator_interface.h":"9d7d062b4201fac55a6c9e7e18e99b14ee8d5665023bf13e6fbc5b810fe68c79","compiler-rt/include/sanitizer/asan_interface.h":"4095d321d4ffddd115b4aef35f913406aa2fabab0505e61b2732002b9845b196","compiler-rt/include/sanitizer/common_interface_defs.h":"8fa2b072a216020088b7409452f31da63c3ed655c3b02bbe9c00fd1638c8b14b","compiler-rt/include/sanitizer/coverage_interface.h":"101c19dd8527ed7e2c0dfef11d4d4e2bf2f6b160fac85eef436ed7987caae87d","compiler-rt/include/sanitizer/dfsan_interface.h":"dc04e69c0b2ec232ca313bd9a6a621212e45bb09eca9999a8fde05683f0c215a","compiler-rt/include/sanitizer/esan_interface.h":"1257d5b25e3a702e680716ed264c1a7f7a336cad6330d6d4dad7817c73477246","compiler-rt/include/sanitizer/hwasan_interface.h":"f4dc1d6905e4f48bac69ffdf7951a945d66f267815687c81a778b25e8228b09a","compiler-rt/include/sanitizer/linux_syscall_hooks.h":"dfce13bcf64cf16cacdd18c7a4f6ef04f53164420e4990d78f8b74b4929b23e6","compiler-rt/include/sanitizer/lsan_interface.h":"3794f8440c725da7a8cfbf9742deb338d69d36d144861d4701f9ec8a82ba60b1","compiler-rt/include/sanitizer/msan_interface.h":"7bc0c5202be7927d08956410fd0a97ce1982fe859eabf02e4dbe85b3cd280427","compiler-rt/include/sanitizer/netbsd_syscall_hooks.h":"c42a300f16fb06b3aa5ea251653c57a5ff7a8c6b3200a996be60d9ba33d04b71","compiler-rt/include/sanitizer/scudo_interface.h":"e8bf7631ce91ddd85b25c65a69d631b2cfcb7172106847110c0cc38e9795445f","compiler-rt/include/sanitizer/tsan_interface.h":"34b8b45aabbd093aea036124cfaeb82554cb4990f0136df30899bf8228cdd85b","compiler-rt/include/sanitizer/tsan_interface_atomic.h":"2d920db3ab242be9f5ef9dc1118694e9f9a42d97ce7338470afbce56a5ca93b7","compiler-rt/include/xray/xray_interface.h":"d8bc74260861b7144be17e8a6a66614e778b7190257d9649a3b114aba1bfca3e","compiler-rt/include/xray/xray_log_interface.h":"9c5fc5d466c2dce1d969012db1fbbde0714e5a475bc47c8628fdbf356ef430a7","compiler-rt/include/xray/xray_records.h":"1a84caf4427d0b24677542aa52349760e2af98dcac3537a971c111115f76833b","compiler-rt/lib/BlocksRuntime/Block.h":"b9865a1ced1d282626221af7bdb28c23378d788afeb43dfb80cd8014bb712034","compiler-rt/lib/BlocksRuntime/Block_private.h":"e29e0f94e4b544d65c0711cb20907411bb3674b1714efcfd2a42b07ae8817992","compiler-rt/lib/BlocksRuntime/data.c":"cce2ba6f5366fa59470cda56617aae97edca07753370335b28f7a702bb50fc29","compiler-rt/lib/BlocksRuntime/runtime.c":"30acfda75c053f720664cac4819455dc0060dfbc20f1cf5fb6966399c9a9e578","compiler-rt/lib/CMakeLists.txt":"b3a1a1542d28ab7192bac832db96c312fbb8cdedce8d3cc987b2af3b20e79420","compiler-rt/lib/asan/CMakeLists.txt":"47998074f2714d0598d135dcedc203006875c7dfe9019c4a73a7fabd8cb62d73","compiler-rt/lib/asan/README.txt":"4d17f7ef57c4e2d8338f5bf1e3fd22926fde239b0582c2f5a89d2f2d33f13fb4","compiler-rt/lib/asan/asan.syms.extra":"507d8973e1873100c81378b53ca6c425571d5344f68d3d6ecefe1ff43e30407f","compiler-rt/lib/asan/asan_activation.cc":"7311744032b9f42188b5f5611c426e0dc13af17b8dce1b5a8aa54116b29d1a2c","compiler-rt/lib/asan/asan_activation.h":"066ff58f0e43d4f803ba40cd2d46de6c4f7ba629ac582de4c2583ae33a5f9cc3","compiler-rt/lib/asan/asan_activation_flags.inc":"d8102de4692e05b7f9e82e93f1d2c3535567ebecad992024fd48f41532d41e3d","compiler-rt/lib/asan/asan_allocator.cc":"3d761de4fce61e2d285308b669abffb388d5a1b32910e23012b96bfae7a5c32a","compiler-rt/lib/asan/asan_allocator.h":"5f26eb19f1440ea91167e33fab2554c801f87879d7fc2b532c14f5794d32c042","compiler-rt/lib/asan/asan_blacklist.txt":"ef4a392b1c674df1c18586d45cf9c9d64ca55c554360ac8cd2f5ca1efaadc0c8","compiler-rt/lib/asan/asan_debugging.cc":"e52fa6543a3dab4b0c0efeb03646c98b8542a0cc3e2a1dd94da0dd24eeda4b34","compiler-rt/lib/asan/asan_descriptions.cc":"648db697837641b8202ba685613266534f9dbd7d7bc83e3dc3fb9710d2193027","compiler-rt/lib/asan/asan_descriptions.h":"37d6cd267965f14de0495c00cdeedf87be37cb72c5f2208d2678ef8ddfcb259e","compiler-rt/lib/asan/asan_errors.cc":"72bc00f56f5bd49a9828640733e8d6d53d66af3769a35756804c16ee4825ffcd","compiler-rt/lib/asan/asan_errors.h":"75019215ab1f4d0acffc6cdac3501898a55101e058778029191f06c3537839dd","compiler-rt/lib/asan/asan_fake_stack.cc":"f39ee86d49352aadaf61dce4aba38a26ff94aa98832852cee5351cd7e628d44a","compiler-rt/lib/asan/asan_fake_stack.h":"5a99fde6fbb4ea56128388e759d14fa2160eb8a225d44b000db65d9baf69fdbd","compiler-rt/lib/asan/asan_flags.cc":"43a0115703cd51133e23077236e3288feb4354b325ba9962670d47d5219e7b53","compiler-rt/lib/asan/asan_flags.h":"443732afb5d6c945630acaf14e2c246d8236a312b9ab7bd85ae64d50a6125d3c","compiler-rt/lib/asan/asan_flags.inc":"a3c09fd476bc91d9322410bfdc073c4fb510c735addd5011576d35d5444728dd","compiler-rt/lib/asan/asan_fuchsia.cc":"4c22622a9257f139e9765c5e3a728f178a5ed93043b6ddfaa98723c73c52c9b6","compiler-rt/lib/asan/asan_globals.cc":"9528dbe2790aaf53eb80e8dd7df45c91eded9e529f114e265563107b1bb629c5","compiler-rt/lib/asan/asan_globals_win.cc":"6c9c1823220ee106d74732bda35706935ca9150b1671a6b92441734a54e0244e","compiler-rt/lib/asan/asan_init_version.h":"0c24b7422e94a73315220ca359245162560723d0c00ad131091f2e33463e81de","compiler-rt/lib/asan/asan_interceptors.cc":"5ea5892203870cab6631bb761f008602ea2a3e7db1a136c5072fb5eb32fd1c13","compiler-rt/lib/asan/asan_interceptors.h":"ccc92f8784f28813818815d20e527a01fa150ce9a751ca6b76974c3b0def897d","compiler-rt/lib/asan/asan_interceptors_memintrinsics.cc":"6929398bc67e2530ffd69be4f2b4603284f60e733a452ef850e74d4ccab8cc61","compiler-rt/lib/asan/asan_interceptors_memintrinsics.h":"561f08a9cb9aff5abbe977ac50c0be458cf1ec5b0156fa0d0cb97f223ca30ed4","compiler-rt/lib/asan/asan_interface.inc":"ebca3bf6301e2a4cf2db3a5a4f76d6ced46c45b90202409a4ba160cc87a89d26","compiler-rt/lib/asan/asan_interface_internal.h":"9dd1f47faa4f46aaf7bb924e77af83dd807a9a893f8c768ffdc423393b6402d1","compiler-rt/lib/asan/asan_internal.h":"8e23da840915073afff7cd6f2367bfc7f3f0b3b927a786bda13f6ca4b5ae7639","compiler-rt/lib/asan/asan_linux.cc":"32b20df232758cda068ce27f3e6909c6798a8cef5ec5f8bbe85f7297e65bffa3","compiler-rt/lib/asan/asan_lock.h":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/lib/asan/asan_mac.cc":"53aadb2ac3558c4186ef2aef0021c74066864bac92070c038ab7af9659748c9a","compiler-rt/lib/asan/asan_malloc_linux.cc":"3390b68b217dfc4052f9cff85a9c3ad8dd1fa8ef275f7dd2ab1bb0fcc31c4e58","compiler-rt/lib/asan/asan_malloc_local.h":"595c6c331714d3ecb48dee2b7ce51fd57b58584517d0c76998cee1e32f693c27","compiler-rt/lib/asan/asan_malloc_mac.cc":"cc2be3df82d83cec87d856aaf9c328b7b140441109b095cf93beca8c5a61eee7","compiler-rt/lib/asan/asan_malloc_win.cc":"6e57c1cc80a7b30b88b4b0fd836a523e853f9cd04aa01ff5a25732e121022596","compiler-rt/lib/asan/asan_mapping.h":"2503778a25def18674e679fedf0dc01d58d83a9f231a0696dd874b20fa6d3b01","compiler-rt/lib/asan/asan_mapping_myriad.h":"0bf84b6b5dd76f8d2c50e3e440bfd6068ca9cee1aa7ca1773c55fb8706f4ed17","compiler-rt/lib/asan/asan_memory_profile.cc":"48881dff529b1630583f2cbc3d09c309574f17f59062cf2fbed0e984e9af7879","compiler-rt/lib/asan/asan_new_delete.cc":"e28b8724fb1231b06c70167c24415c6adecc13f71e1c49cb446ab7f8327f16d7","compiler-rt/lib/asan/asan_poisoning.cc":"d53d062e146e9c89df10190d67b48e184944814da489832e61c708ee188d0eeb","compiler-rt/lib/asan/asan_poisoning.h":"df629899b4cccebc14e4d93b14044ca0ac12166790fdd4e9b5886f62e49abd4e","compiler-rt/lib/asan/asan_posix.cc":"e3c31984834dba55507c90ea4c3373db9df6a9b8fbfae4a1ba279b3d7f8975ca","compiler-rt/lib/asan/asan_preinit.cc":"b61836e9cd8963b0495aa062e79fc72aa57c7f9d00d0df86537514ec24abf425","compiler-rt/lib/asan/asan_premap_shadow.cc":"f2b131a19f5f564200c1ba912d7a8e9545b4e1fc8847bbda72d951a2d6d7ca68","compiler-rt/lib/asan/asan_premap_shadow.h":"3f352441ee2ad2649e58370d0d30e199efcd4536d965111a96b515b52aee15b5","compiler-rt/lib/asan/asan_report.cc":"05c857df5bfac34bdfea638f8cdb71aae82be96e40a05ad2b68eec556a95247e","compiler-rt/lib/asan/asan_report.h":"87f55be81195ac2911917bd2cf6478f89e67e73fef2e5d1e9d0c8ee993b92e47","compiler-rt/lib/asan/asan_rtems.cc":"5c20157c314142ba2f120a928c3faa3efa0c03c4fdf45935b7103fea42b51daa","compiler-rt/lib/asan/asan_rtl.cc":"2e416f0fa50f9ad8a67bb80b40474f45741e421e5545053b05c90726f15c1960","compiler-rt/lib/asan/asan_scariness_score.h":"1960f7c34cc7aeec5d0a0e81803ef0c10cfce891abe5744e99d756a48bee7898","compiler-rt/lib/asan/asan_shadow_setup.cc":"22c4ea97cde550cefa71d8d29df0be08da4954dfe9ad11c49bc6e80f9801d7ab","compiler-rt/lib/asan/asan_stack.cc":"de9acc8e7168e7ac2792e2f6aa63de804a34b4e71882c6592dac7190147e7617","compiler-rt/lib/asan/asan_stack.h":"c4c7e4c2f489b4d73b3f1228cba5ba71bdac7c869227505e8048a17ba9a93498","compiler-rt/lib/asan/asan_stats.cc":"6979e6bcd27d8b6752f7df10c75db03cea5b20c9c4a1cc8508dc8b63641ac046","compiler-rt/lib/asan/asan_stats.h":"6abc3acc14f4dedcc2110aba079d53d29c549772d7a526999ac75c024ea5ac9a","compiler-rt/lib/asan/asan_suppressions.cc":"001ffca13909cca1fe0129ba40ca641b17aa4d950fa300fb4c115c6c5033020c","compiler-rt/lib/asan/asan_suppressions.h":"d777af9b2b8cbac05a2da0f70b2b77061b3b83fe92db257cf1ec9633fb427479","compiler-rt/lib/asan/asan_thread.cc":"fdd6a01b44470786724cc1ab73266feca240dd092b60fca38f3df7f63b512820","compiler-rt/lib/asan/asan_thread.h":"5032a282081972687269ea029f1d7de347f8f2d20aa3470eefcf3ccda8801e34","compiler-rt/lib/asan/asan_win.cc":"18c792fab4b9b9652cab3a46b0371a57927145e43718512fb228f99ed01c6c7e","compiler-rt/lib/asan/asan_win_dll_thunk.cc":"4d995610df72344d09979357733a853bad63d47ee01d0c7628b5650e5dfebff8","compiler-rt/lib/asan/asan_win_dynamic_runtime_thunk.cc":"548535728e1c91995a29e3478c5b34328d5a7033f7a0100b1c809661fe06482b","compiler-rt/lib/asan/asan_win_weak_interception.cc":"0547c0e2e89e606995322f36c71ac7c645b2a3f63bcb2939336722c2c0354e3d","compiler-rt/lib/asan/scripts/CMakeLists.txt":"c58b0d37893c6d73ec48960533d42c6f7ebd59d1da015263ebae9bd5685137e6","compiler-rt/lib/asan/scripts/asan_device_setup":"cb456795ed40d48aef01c1b5fb18010b0735ba728459e2e83486bcd07ebac5b3","compiler-rt/lib/asan/scripts/asan_symbolize.py":"8e233d9c7736197d94d938c45e9522faf7d34464149be9d3d44adc20f36787d2","compiler-rt/lib/asan/tests/CMakeLists.txt":"51984e4f4ffb0f9483c5971af2b94bce5e57aa035932773e48b0b27d34664f78","compiler-rt/lib/asan/tests/asan_asm_test.cc":"f9802a1ec957587a8b7890da473bb1755862d311ef7ff5e7ea114ce50fd755db","compiler-rt/lib/asan/tests/asan_benchmarks_test.cc":"9cb91229e19348bcf722472ac26e63c9270889a401bafb89806a7d3078dac078","compiler-rt/lib/asan/tests/asan_exceptions_test.cc":"e68cc84f0c863736887dd1e97961a98816d3a4f80f4276d69138242f7d9e3b3c","compiler-rt/lib/asan/tests/asan_fake_stack_test.cc":"972c38ceaa3a9d1df22176e71cadd8b3fe3a1c38496dd1df0860b9ba465e42fc","compiler-rt/lib/asan/tests/asan_globals_test.cc":"ba8cd948d6d0f9c59522fb63d4f6f5007c10f3e1d88232695e0b0e676dd05fff","compiler-rt/lib/asan/tests/asan_interface_test.cc":"3b78c4048db28256729d4f226dd40f414e6be23698d90cc01a3f9f2c12129939","compiler-rt/lib/asan/tests/asan_internal_interface_test.cc":"b04160c7af365d167561e22ea2d79d1b5c3647e02859e20d5fd37bac1b611374","compiler-rt/lib/asan/tests/asan_mac_test.cc":"b06c9b993ece9b83f7e8e3b2f0ea542e5927567831a8138b1477bf6d958a4209","compiler-rt/lib/asan/tests/asan_mac_test.h":"4783e45dae3f3df18f0cfccc871d6903c1d4fa3ef834202f0a76201e0b0c5ddf","compiler-rt/lib/asan/tests/asan_mac_test_helpers.mm":"76c6ca8b11dad30fdb7c1f324733f65729fde14c923b972fe7d3aeda0f6a1406","compiler-rt/lib/asan/tests/asan_mem_test.cc":"bc742b67887d707fe557fdc6321157f5e3d0e287880c96a9d2484b98439490f4","compiler-rt/lib/asan/tests/asan_noinst_test.cc":"6abb664e6449986037727c3637852582b4627d90e45a32844b914850cc6cae80","compiler-rt/lib/asan/tests/asan_oob_test.cc":"df7749b50f0e659c50673b25036e8e274a9e10b9767d9543f8c70d65f3b29c8b","compiler-rt/lib/asan/tests/asan_racy_double_free_test.cc":"6c7680a0923e6b9343760afce39a1209574b46b019a6e3055843656fbb474ead","compiler-rt/lib/asan/tests/asan_str_test.cc":"a6b84ba027a88e7ab8355469be46a843ac4929844901a4f3fa91a78624f8df9c","compiler-rt/lib/asan/tests/asan_test.cc":"363768e7f5db8f3958969f82e359f5f16d8030c57a054473b182ba43e0a439c8","compiler-rt/lib/asan/tests/asan_test.ignore":"8c9a0db1016499cef5ebce45962fb0f7705677d9de3e6afce65bc0b21c61dea6","compiler-rt/lib/asan/tests/asan_test_config.h":"5b1c6d66dc6515a6dae75e6946d7230c8259ffb03366bd44d97b9fe7be14b0d4","compiler-rt/lib/asan/tests/asan_test_main.cc":"06b5ca6b35b63fc2d1706f5b8b88d15aa32e7c93ffda5194471eb285dbe25e61","compiler-rt/lib/asan/tests/asan_test_utils.h":"a900eb76c9e8c745f8dcbcee7be8c6fe9493c3faf6060965df16d50ff277887b","compiler-rt/lib/asan/weak_symbols.txt":"193e509bc20c2080670af7c15b2c0f5310705d8cb78427820cbacbe106f0fa35","compiler-rt/lib/builtins/CMakeLists.txt":"cbcb17c665583702fe612ae39b0c7e438ef9c0a1fd7c5ac0af2d39b8a0000ebf","compiler-rt/lib/builtins/Darwin-excludes/CMakeLists.txt":"00620fa370283794db606c2e574a804966fe6e744af542fa55e859c0462ce8ce","compiler-rt/lib/builtins/Darwin-excludes/README.TXT":"2811ddc8b31dde26103121e4ca07b87077990f72aa28ce230036a76886361a5d","compiler-rt/lib/builtins/Darwin-excludes/ios-armv7.txt":"8b802f7ce458a237fab3f099b6586453818c03605163644cb4afa46864c61d74","compiler-rt/lib/builtins/Darwin-excludes/ios-armv7s.txt":"43a4d5724f8d71c0997f86de6b6dd91e293f19a369e5dd6039aa7ce1f4085039","compiler-rt/lib/builtins/Darwin-excludes/ios.txt":"e98a35679756787a50ede9344956b2da8a3bb13348e7791e4daeb725cc885b32","compiler-rt/lib/builtins/Darwin-excludes/ios6-armv7.txt":"d1159eda53c3ecb36440da3a162ca3fb3c80e72150b3c32c129f5154790e6508","compiler-rt/lib/builtins/Darwin-excludes/ios6-armv7s.txt":"d1159eda53c3ecb36440da3a162ca3fb3c80e72150b3c32c129f5154790e6508","compiler-rt/lib/builtins/Darwin-excludes/ios7-arm64.txt":"b9d8102693c4752ffd1fabafd42412565fe482b1e87cd2b77822e3daf853dabd","compiler-rt/lib/builtins/Darwin-excludes/iossim-i386.txt":"8d4cfbb8b1603e1b0d097103f4ecd3a2caf53f3d749270c973f049962b7ec013","compiler-rt/lib/builtins/Darwin-excludes/iossim-x86_64.txt":"34b85d85d61c9dcbe15c3c616c25ae6f4d215a2f6269e654c0ec90bc71a4376d","compiler-rt/lib/builtins/Darwin-excludes/iossim.txt":"e98a35679756787a50ede9344956b2da8a3bb13348e7791e4daeb725cc885b32","compiler-rt/lib/builtins/Darwin-excludes/osx-i386.txt":"a9878e020d2a94cffbe0664b5bc57a8138ef6da32484e20770e52db164aa229e","compiler-rt/lib/builtins/Darwin-excludes/osx.txt":"0b850857f43fd20272840e56570e3962e379fe0191270514ef6cb7338477de1b","compiler-rt/lib/builtins/README.txt":"910fb217a0c6d5448a074b380e34da686e598b4c3be066b19bd96e1ba411a842","compiler-rt/lib/builtins/aarch64/chkstk.S":"c91015c7fce7fb9d780e2328ce0d90a238bfb154914178ff0e689d0f612d85e9","compiler-rt/lib/builtins/absvdi2.c":"7dc88335751f4948ea5e39ae7cd69f1a1d4fdfdfd0887b7aa850f2205361237d","compiler-rt/lib/builtins/absvsi2.c":"af781b7d4c3373e7af96887b291cfccadb1808302ee4979180dca58ae664d2f2","compiler-rt/lib/builtins/absvti2.c":"04294cf4a7d3362811567cf5967ab04cce1e0da9104a457c54e172ebac0cb436","compiler-rt/lib/builtins/adddf3.c":"b2d1b69e3e6bac34225b36b2ab03845aa61be981446821d60e9aab2766c5d171","compiler-rt/lib/builtins/addsf3.c":"c4ed605c7859a60cddfb3d91a3c886baab2b26a3bdb541b8cfc8768b1c83d25f","compiler-rt/lib/builtins/addtf3.c":"015e9836e33db433d1ff9760bf49786effe5fffb9e239ecbb343e348d1142589","compiler-rt/lib/builtins/addvdi3.c":"33503c0827801a201bb46243687b7931d8cb60fb65d227fcf185af2b5efa516a","compiler-rt/lib/builtins/addvsi3.c":"ee669f3a19eec3a91bee75174810d128c04d4ce4d3ee86e2ad26209f56f38576","compiler-rt/lib/builtins/addvti3.c":"4aac9e08c6819c89caad81258d7f5ead7a5c98a2e33d84283230513e2244cf25","compiler-rt/lib/builtins/apple_versioning.c":"555f7d346b9bea530b49655dfdf29c03526e83734f3caf5501087e87ebebc52f","compiler-rt/lib/builtins/arm/adddf3vfp.S":"186b61181cb4838ed8d144c083da3be989f25681105710dd71ea0207c6124ff3","compiler-rt/lib/builtins/arm/addsf3.S":"d0d8bff0dcb7354ca62b1968a0549cf20db677054802b741904c5dcb2d7a2403","compiler-rt/lib/builtins/arm/addsf3vfp.S":"99d5d6ab2e5d566c50c7bb34a86d592c729c750a235832980e90304449897f75","compiler-rt/lib/builtins/arm/aeabi_cdcmp.S":"30163803c0e2fbf898ff171e796e0ce956d64f2f3af32f204bc57d1a8f7b5f24","compiler-rt/lib/builtins/arm/aeabi_cdcmpeq_check_nan.c":"cccf538b17af25ccff2a7150a42ba80167bdd4d874d96862714035fffb611cba","compiler-rt/lib/builtins/arm/aeabi_cfcmp.S":"b1e1e5d2accde59539103538b72882542acec018ff1680b0276dea33632dba64","compiler-rt/lib/builtins/arm/aeabi_cfcmpeq_check_nan.c":"8775df1c56d5506134950db46f88222483c659d3cee046e9d6310a089122f85b","compiler-rt/lib/builtins/arm/aeabi_dcmp.S":"0f45c056156c5e16c2fbbad7580c1a46e0e3d488bdcbdf571cd20c33d4d86ec4","compiler-rt/lib/builtins/arm/aeabi_div0.c":"fdce03880aa8dea8b4a30f09299a54e08eaa80a798169f5f9add130abc3900a7","compiler-rt/lib/builtins/arm/aeabi_drsub.c":"85348a1ab18c1a7da680d9a313f7953b90b1546164d282b6aa4486762f6f19f1","compiler-rt/lib/builtins/arm/aeabi_fcmp.S":"0a55f116e0484341dcee5e90c3ac781fbc394f3e1a50fcdc50f11913b338e77b","compiler-rt/lib/builtins/arm/aeabi_frsub.c":"0aef6ed49845c4ba8beae403805cfb60ac8afc3968ed80df48f0a56a7ea7b4fe","compiler-rt/lib/builtins/arm/aeabi_idivmod.S":"fbe811f6c02ed1f6a79daa183c8905fbf02f93f6b84d7a1c6386bd00a5488202","compiler-rt/lib/builtins/arm/aeabi_ldivmod.S":"be11da492487cc174295a34621dc200f22881b795daa1681f92e19b8e6575f3e","compiler-rt/lib/builtins/arm/aeabi_memcmp.S":"524e6ba890b640214eee3ba6633ca4df34d00baaa0029f3bc05112371298f0f6","compiler-rt/lib/builtins/arm/aeabi_memcpy.S":"4f4c01c9f0e01b3eaa2af745429e638db08e8ecd6ed8df3e3146b25083b53647","compiler-rt/lib/builtins/arm/aeabi_memmove.S":"510eef952f896f7a63e78e08734e5a87fa2bfc1a677dc6dc61cbedd4c62205b0","compiler-rt/lib/builtins/arm/aeabi_memset.S":"f1347dea2c2fb3e3c78d5723cd6fd2a29a337f3726aaf29a4bb09e3d426e6da3","compiler-rt/lib/builtins/arm/aeabi_uidivmod.S":"7acca42b97c80ac9588d332739c6da8175a613defb0369fb690b80fade927771","compiler-rt/lib/builtins/arm/aeabi_uldivmod.S":"928402c2440f262b4d67bd1a62bc7d653d36ce9c4e5254d44ef99c3f50d4f108","compiler-rt/lib/builtins/arm/bswapdi2.S":"a902f47a6f0d063943a14009c6c34ff8b5a9dd16663b4de66cda0b064df56172","compiler-rt/lib/builtins/arm/bswapsi2.S":"6db24b56b7db58653c0f28920041f933a3f5f71d522b7aa54b143ad7fd625f47","compiler-rt/lib/builtins/arm/chkstk.S":"010383f5d15ff6bd17ea2e7a942c7da38f66874158d75b53208dae6eda717ae2","compiler-rt/lib/builtins/arm/clzdi2.S":"9349280d7af3afef29e5e8a3ebeab957db5cd0663af56bd8357767f2a58a94e4","compiler-rt/lib/builtins/arm/clzsi2.S":"9755c78477904ff2ea54f8cccdb45afc328d3301883563fd276965a12e057c96","compiler-rt/lib/builtins/arm/comparesf2.S":"4ebf4065ec6cc448ca638eed9e747cdf032df70a1760b47cf7fe1c41a7cc6341","compiler-rt/lib/builtins/arm/divdf3vfp.S":"28520a6941d75f5a11c985a94e2ac4792ffbb5eda8fc00264fb6c2cdc0af945d","compiler-rt/lib/builtins/arm/divmodsi4.S":"4d9faf02f9fdde120ed53e39cfd4ac2f6c0518eab79cd9f4ccebe7c457647df9","compiler-rt/lib/builtins/arm/divsf3vfp.S":"e40d60b73a097d152507521a033cceae0c18efb50730e3b5afcad5148d4fcd20","compiler-rt/lib/builtins/arm/divsi3.S":"0d2697313a61da084299898fab517e0addba8782cd0b077bab007aae045cf27f","compiler-rt/lib/builtins/arm/eqdf2vfp.S":"260ed0d6f03ae4e052e61eea839ff72098186c46df0127340d1ec1733c7b87a1","compiler-rt/lib/builtins/arm/eqsf2vfp.S":"a5589df6af71e76aeb2045fa6da7a341594525198961ff9d5f0233772800936a","compiler-rt/lib/builtins/arm/extendsfdf2vfp.S":"c221f8980fd216e7762752cac1e2172805421da9597ac27b3e3b5f69df6701ea","compiler-rt/lib/builtins/arm/fixdfsivfp.S":"42ab2d0e3d59171d4893193896790b68eb403615a10248a377f006660677ca5d","compiler-rt/lib/builtins/arm/fixsfsivfp.S":"b8872e3677cd57007df3b1d2316741455b193695a9ef9b88542745bfd0957b6b","compiler-rt/lib/builtins/arm/fixunsdfsivfp.S":"5f4ca62711116e83bf9663c7ff51878774abe023922d5eeb5442c0556539ace5","compiler-rt/lib/builtins/arm/fixunssfsivfp.S":"30673245704b5d666d54c632924517cb6801707c76c5d9f4e109f3e37864e2b1","compiler-rt/lib/builtins/arm/floatsidfvfp.S":"ed57e4767379b32de614eeeed04343514f2ff91d3dea9482ea7d10f893aec071","compiler-rt/lib/builtins/arm/floatsisfvfp.S":"a72abfe62d329c9afacc456577171e150dde8849ab56315f98b64888e6363e61","compiler-rt/lib/builtins/arm/floatunssidfvfp.S":"76cb302bb6ba80916c306009847d54c2702669196a2fa253ba23aacf11fb049d","compiler-rt/lib/builtins/arm/floatunssisfvfp.S":"9d645916204bff2bb4f443c868a3103d17370db4c7351853bcc543a3551f8f82","compiler-rt/lib/builtins/arm/gedf2vfp.S":"cf60dc52e0a892b6a4173944097ea8ab81ea8fd2bc79e97f646567241ee5ff62","compiler-rt/lib/builtins/arm/gesf2vfp.S":"336662289776c7b60808bb3c2b2600e8aa1089450205a150b155d8b9810bff96","compiler-rt/lib/builtins/arm/gtdf2vfp.S":"949aecb2c5bda708aafd9aa61f839b6680646eb7ef44caf6da2d58bba47715de","compiler-rt/lib/builtins/arm/gtsf2vfp.S":"8b038c299f192bb8d2aec49672c5a9821e78475fb71a4bdf736db86ff7899402","compiler-rt/lib/builtins/arm/ledf2vfp.S":"fd0cd046e826176e6fff0f0a63fb497ac05832011e46f5fab4205016daa3672b","compiler-rt/lib/builtins/arm/lesf2vfp.S":"667501cbf894b6be85a09e8bb70a94b7506784f020b81bb2dcc9aad81c226b62","compiler-rt/lib/builtins/arm/ltdf2vfp.S":"b4305561e7f2a654b1eda41642ffa7b46120dd15f0d66aceeb5555196524668d","compiler-rt/lib/builtins/arm/ltsf2vfp.S":"1578e3889fdb0a00541f46b58897b184526c3bbf50839469cf4ad57abd9c1df1","compiler-rt/lib/builtins/arm/modsi3.S":"440c542ae72ea060396656caf66822118f2d43980adc23e54b795eed54c21ce3","compiler-rt/lib/builtins/arm/muldf3vfp.S":"646e7a483c9870331ea1d4a00aea08d396c6ad5a696016505db6869cd62975b3","compiler-rt/lib/builtins/arm/mulsf3vfp.S":"4f8131c767d9ab5eda9c409ccd022227c3c645ddf39e5426ff4734297850336e","compiler-rt/lib/builtins/arm/nedf2vfp.S":"ad31f2153842191cfeefe11d01da54d5a2a0c202c3365ede0d209672b616517f","compiler-rt/lib/builtins/arm/negdf2vfp.S":"7346e2603021863c5daca904b916a72017f586b7ff0cf8cec71d70edc5e45081","compiler-rt/lib/builtins/arm/negsf2vfp.S":"086bfede507ca60748467805389ffdcf510a52d127c302491aa3f278e344d03a","compiler-rt/lib/builtins/arm/nesf2vfp.S":"41d87bb066afdb8c0161a0ec569b54f93aa8efa0fd3f81eeb43cb3c0e1f3539b","compiler-rt/lib/builtins/arm/restore_vfp_d8_d15_regs.S":"4ab516b1f9ff13c0997fd77ad752389a7319f6af4ca45facc1f999b1eb93b73e","compiler-rt/lib/builtins/arm/save_vfp_d8_d15_regs.S":"4e179f765a72240728aba4325c362ee3d5c804072735cd105fb9753d0badb086","compiler-rt/lib/builtins/arm/softfloat-alias.list":"148348a7f82e5f4251f40ca7bb3eca4867fbfc25b79466d601347f8177fa1a07","compiler-rt/lib/builtins/arm/subdf3vfp.S":"a1c2a8b849e1709be62df2c2df48dc661466a76c8adb9f3cd6290d76b98c496d","compiler-rt/lib/builtins/arm/subsf3vfp.S":"7b8ffbe67e32aa19aeec97deb9aef44870321b920a0e2d91bb6e67e144a58c1c","compiler-rt/lib/builtins/arm/switch16.S":"759c7773dcd81ef32fcc54ebbb49ed5969756b5de4f4d06f31c5a18f3d862916","compiler-rt/lib/builtins/arm/switch32.S":"f7b8a7853ad62dbb7170adb919039bd0ff635f2c44217d08813bf45d688b6874","compiler-rt/lib/builtins/arm/switch8.S":"1b855347363bdbb03b8281ec4eb4601e9b55140e518929f08bc24b55b0d4debe","compiler-rt/lib/builtins/arm/switchu8.S":"814b43944cb952ed03c72524474985c77f96899d1af4c28a27ed2115e411caf6","compiler-rt/lib/builtins/arm/sync-ops.h":"37188472c4b6f1b95f4121f598ef4df26bd24b0211d3f5d3d0903c969fe0add4","compiler-rt/lib/builtins/arm/sync_fetch_and_add_4.S":"a4a3ea4e9a9471438b7f74fffc3d7949506633533aa195cecb29b3626c3f4e80","compiler-rt/lib/builtins/arm/sync_fetch_and_add_8.S":"81e6273ad834e11d5d4c87c0c8cf49c596829fe2b5a7de6375bb623c2b17e482","compiler-rt/lib/builtins/arm/sync_fetch_and_and_4.S":"d6ef12828392ebf868498a1023c41eb2ab5aef81c5710d566df9b967904f231f","compiler-rt/lib/builtins/arm/sync_fetch_and_and_8.S":"2984ffee8e040a347f172c30bb70f454133baad91a079374d85efd9e504aa893","compiler-rt/lib/builtins/arm/sync_fetch_and_max_4.S":"e4be9daa7f8b69c778a66ad14241fdc7d9c7ce55519fe125b96f16afe9449141","compiler-rt/lib/builtins/arm/sync_fetch_and_max_8.S":"c13c4109c8c70048642dc2b214458d22263e7269f8466cf192bbad652075e446","compiler-rt/lib/builtins/arm/sync_fetch_and_min_4.S":"e61631bd559d0bead13d2c96cb04471909d968e9edcb320a60430d0c5ff05802","compiler-rt/lib/builtins/arm/sync_fetch_and_min_8.S":"dac676788e28a4a7b4ecb5986452c5c295772f6ea5dee34ce1432afa20cc56d2","compiler-rt/lib/builtins/arm/sync_fetch_and_nand_4.S":"16261e48a81f26be18eb30eaae365ff806317bd2d085e3c0206989d96fe25b73","compiler-rt/lib/builtins/arm/sync_fetch_and_nand_8.S":"887e6b8399b8d57a84e53fdf2933f4ad19f1ee1cf684ebbbd6644a662343e470","compiler-rt/lib/builtins/arm/sync_fetch_and_or_4.S":"d42c73c9b5db6c6db2628b8ceea46789dc7bda599597b54bfb1fd0efc13842bd","compiler-rt/lib/builtins/arm/sync_fetch_and_or_8.S":"bbc5200fde7dc052207dac27f8854d61d0e31a92835b91acaf3cc4ba3faa2c9c","compiler-rt/lib/builtins/arm/sync_fetch_and_sub_4.S":"b4359dbb334590a83873f678c4a7809730d9199fcd7ea192bae43d8ff615a4ac","compiler-rt/lib/builtins/arm/sync_fetch_and_sub_8.S":"519b55fa650a03f13d75b24a9f576f9f3a75a4c07e2abf97158dc22b790e98e6","compiler-rt/lib/builtins/arm/sync_fetch_and_umax_4.S":"c3531610bcd2cb053c681637cd5aa9b62a861c5a22fe5cd474955211633bbd1a","compiler-rt/lib/builtins/arm/sync_fetch_and_umax_8.S":"dfa80e578b8827544574e065dee19ef90516dce9a15e3785580051229c68e5b4","compiler-rt/lib/builtins/arm/sync_fetch_and_umin_4.S":"769c0bc64f6962538d5072c5b1d87f3ee22f3f1b27f3d07ffd0f340adcbd6b3b","compiler-rt/lib/builtins/arm/sync_fetch_and_umin_8.S":"03278f76e1a62c5755ebf57d650405378b408b09ebdb50ab67cbae06b2d78226","compiler-rt/lib/builtins/arm/sync_fetch_and_xor_4.S":"8b472d542d149ad0f1f2f796195817d2b2f0052f7fc90dce710ba90452bc9532","compiler-rt/lib/builtins/arm/sync_fetch_and_xor_8.S":"75e6cbf7718667a0dc0a8ef3d4dcdeb99ee7a061c7c76877c78069900c7b215c","compiler-rt/lib/builtins/arm/sync_synchronize.S":"86f9a3543eb6952fbaf764f2112f7a6cb9076915b62cb74496fbc49667dd3493","compiler-rt/lib/builtins/arm/truncdfsf2vfp.S":"bd9714b9baedea3423e3391aa37eb7c947fc6d7a766606632055efc05edd1106","compiler-rt/lib/builtins/arm/udivmodsi4.S":"b35933638d0bdf67c064f10e0baf628041284070855bb8122d09e432624a794a","compiler-rt/lib/builtins/arm/udivsi3.S":"1b89ad2d3d85aa3d989083fe5413a5c2047337a8669b0c5aa8f57c1450a90f44","compiler-rt/lib/builtins/arm/umodsi3.S":"ab463d744d1050ea9d9eec324e0e2e90fae794d4150961e002e585aa9ed293b3","compiler-rt/lib/builtins/arm/unorddf2vfp.S":"a5a11d6f54f13c3d98a860f82ff109541b97ad40ecf75f81b729e72869bbfee8","compiler-rt/lib/builtins/arm/unordsf2vfp.S":"2919b1fee122509398b2df38056cd91ae8a17252e394a6ee3622fefe593c2508","compiler-rt/lib/builtins/ashldi3.c":"29c4fda4270f84aacd18c8010fa0660d490d44b59fbc8dfe6ef4c079619030c7","compiler-rt/lib/builtins/ashlti3.c":"ddeab715fdf0d52e5fa9a4befc970af29fe66e5b521e84c35496cd8fdcb28945","compiler-rt/lib/builtins/ashrdi3.c":"700be565b8e66a82650177ed274d5847cc3938440b06b3fb56ed56218e85c614","compiler-rt/lib/builtins/ashrti3.c":"9fa76c03d61a0fd20722d0e9faba6c16400ccfa3466d6f96e7394fa0a81f5bc2","compiler-rt/lib/builtins/assembly.h":"b8996a79b389496a51dd251c05f1875ffc7d98947f99e69fbc4d90f398fd644a","compiler-rt/lib/builtins/atomic.c":"1c317ab73fc0d3083ffd26b4545ba63db944141edf09df87d2b7050615cf8093","compiler-rt/lib/builtins/atomic_flag_clear.c":"1b43ff063434c3a112ff11d0ab2403f11c82059d9aedc1cc70c4c056aaf18292","compiler-rt/lib/builtins/atomic_flag_clear_explicit.c":"90e66bad1d8c9fd1c619957635ccdfd3342fe6b898043c9a56b799d0b5ddfe93","compiler-rt/lib/builtins/atomic_flag_test_and_set.c":"851a928907539a891ad245f7cb56fe88f7915b271d5cfbbfc717b8b06055aac8","compiler-rt/lib/builtins/atomic_flag_test_and_set_explicit.c":"c6dc9d5143b75c62a35972314b08304875a24881bd9054cc15f5f6ca87e05264","compiler-rt/lib/builtins/atomic_signal_fence.c":"bf0c7f0adcab81be838790345fe7cfc2e0db784de133a3743b1f91365f7cf9b6","compiler-rt/lib/builtins/atomic_thread_fence.c":"8dffd2636d6ba4871a888d459f34eb36b7ecf1aef8011ff60b8162af6ec77a73","compiler-rt/lib/builtins/bswapdi2.c":"5accf73a78c7472b4d51fe65606d380c288362f69a1bf77b596065e33d4c36cf","compiler-rt/lib/builtins/bswapsi2.c":"b914410a0c2247da08a3474cad77f9383d7a6271b1a0fa7a184588d8fc04fb9c","compiler-rt/lib/builtins/clear_cache.c":"cfcf8856c0ed6636d667675fd3bdbe833db2a69ad0e5a2ae1447f5d1e7de1b9d","compiler-rt/lib/builtins/clzdi2.c":"5d3e88693967d76f511623274a28338ff7dc7a92e11135c2260e38117a42e547","compiler-rt/lib/builtins/clzsi2.c":"d7ef6c1a52c68aea1e9ffb16678c3c3b81c6736f86599000ca661f56b96aa163","compiler-rt/lib/builtins/clzti2.c":"a55748f4fc9c6121c6206c3a583018e62d1b02672266498e2749046de52547f5","compiler-rt/lib/builtins/cmpdi2.c":"7e2ea3ba9fd575057d4f2604b7b5d74def10c53abac1d2e6b6def7ea9b2c30b5","compiler-rt/lib/builtins/cmpti2.c":"c2533553dbed0b239239d60847d3f6877f129a909e90939688e845149d886bea","compiler-rt/lib/builtins/comparedf2.c":"08530eba128d6c6d612a705cd0e80666e5b6bcdf6069a5210820e63c7f44c542","compiler-rt/lib/builtins/comparesf2.c":"cc4a3e9e6007509d7708f07540a83b2b58b84dde46ba638e74906f9abea88c51","compiler-rt/lib/builtins/comparetf2.c":"dc854e135b7a97e06a87b08d4225cf82776a288ef3f3a21b581efd7846d77759","compiler-rt/lib/builtins/cpu_model.c":"21a8dc95534d87adab8cd76debb5f8201d78cde7caa74a2efebef7d5c758928e","compiler-rt/lib/builtins/ctzdi2.c":"800faf2fde49280d6c0f5a5a170224e92102a2e71ed329cb0cd2d93ccb6cda47","compiler-rt/lib/builtins/ctzsi2.c":"c81f79e50527ed22f214aa10bbf4737ed43e752d6af2f311e75af6519ceef021","compiler-rt/lib/builtins/ctzti2.c":"0e2434e6d8a7c6710ff6e0a4470bea5c08c026c6303146f75f4840383f1b3b42","compiler-rt/lib/builtins/divdc3.c":"7143bb83fce0063cfea172ee8fe2d2e41b01dfe71854387cba2d07ff608f5c88","compiler-rt/lib/builtins/divdf3.c":"da2c471af4bfaf2d2432f91c576e31f81b94c09ea04e537772f65d8c500fcd8b","compiler-rt/lib/builtins/divdi3.c":"43285639eee6d8bb00943824027aa461febdc91e4977ab0e5eec2a6eb77fdafe","compiler-rt/lib/builtins/divmoddi4.c":"eab394639ae1c7d09bd4260da54fbf7d019416575dba166530e92587c588c1bd","compiler-rt/lib/builtins/divmodsi4.c":"066e2c55620176ff8752267857e342b803e66daab049e3354604080e487c35a5","compiler-rt/lib/builtins/divsc3.c":"8a601703b26998a2429c804c233fc06a3f66caefd5e25a959bf87a7ba15c841b","compiler-rt/lib/builtins/divsf3.c":"ab528b8edb814e0eeddc81d73f0ff5a4a17b1aa62ba30f0cd33b7ffadd355569","compiler-rt/lib/builtins/divsi3.c":"bf55c37f477457722b7ae29ddb670a5d726776d25a7965b665ab6d056cba1fbc","compiler-rt/lib/builtins/divtc3.c":"340400b04a35999132f3a6919e7b70f57c458a50557caf32e6c2a6cc955319b3","compiler-rt/lib/builtins/divtf3.c":"aaafff17e4701c82caa54e46552bc6afb5778ea067fbfb40528d17fc3a779158","compiler-rt/lib/builtins/divti3.c":"4ae28ab8246e5e71f363c43469d36c8b9f3509007f236d83eeece158dbdfc4c0","compiler-rt/lib/builtins/divxc3.c":"ce7ac8aa93318c9bffbd75916cb8b9632f1495418fb28a2bf5dfa8a310646f33","compiler-rt/lib/builtins/emutls.c":"4ab279834594417d5a135a8d8f8c0ce3b6d1573a5dbc80ea23884ac9e12d9a3f","compiler-rt/lib/builtins/enable_execute_stack.c":"0dd7a8791e0807e203e5c6d31808411df245c4d6ccd274a322eab25fd66f025f","compiler-rt/lib/builtins/eprintf.c":"298d31f381a44c61c57d21a8d6027ec7935ee1245ea340b5c8f6949449be9181","compiler-rt/lib/builtins/extenddftf2.c":"86e30ec76f9cfff0653288ed6ea557d4a915d68142443add31f8b43c737ca7f9","compiler-rt/lib/builtins/extendhfsf2.c":"7d184f88873053d99a84471eeadba41b0fcc252929f9c7852759063f55973a1a","compiler-rt/lib/builtins/extendsfdf2.c":"efaf378e6e79f504c24381b94d15f5ef2585c518f20025a340f3f1d99954b224","compiler-rt/lib/builtins/extendsftf2.c":"0449886abd6e8b1201efafd9aca60db0aff3d1bd1c0ef5a2549f7fea3f2115d4","compiler-rt/lib/builtins/ffsdi2.c":"cfe3059d087cff20afc0b4d73d764cb4e09fb3f7d9615f59e4db8b593c94d67c","compiler-rt/lib/builtins/ffssi2.c":"5cd42d2a5a9168dbbe67473d45aaa00cab6214b1cbf08668d2c11c28fb13fb98","compiler-rt/lib/builtins/ffsti2.c":"2c81dd9dcad450e3310c7cca5b74784befe5acd19cb3d66a20afc31af3f14fdf","compiler-rt/lib/builtins/fixdfdi.c":"93b560d5131f746a378f8a56bcf64e033c1023f3626f82188f0cac0bc9c21c3e","compiler-rt/lib/builtins/fixdfsi.c":"c8c66abb2a6c6c1916ae7069ae60027d8d5e6a7bee2c27f272df4d03bc88a321","compiler-rt/lib/builtins/fixdfti.c":"7598ff3ab76df2c75299ca19f9ae9a1d03640e110f3cf467641ab367512b839b","compiler-rt/lib/builtins/fixsfdi.c":"663c144470af96e7cf1ecdb29265ea4323112a249cb06755343b654c538faec7","compiler-rt/lib/builtins/fixsfsi.c":"291ff5f8f1c0b3006da155c844bce1b794cbae44c466aa8cfad40d5d213fc15d","compiler-rt/lib/builtins/fixsfti.c":"5ed27aec1807af8b30243cd6e9a5497259f8097e60957b33e4f3aef74ce1c7d4","compiler-rt/lib/builtins/fixtfdi.c":"6fe0df6ca317aa0f05cd5061ea75730384b687946d838b2d8e343647f4d68049","compiler-rt/lib/builtins/fixtfsi.c":"761178f703f61ffb1c3bd293b73ca482f885e25d8bdd553785db1101b9f816d8","compiler-rt/lib/builtins/fixtfti.c":"e257e2314e085d4771af666996fd4157837f32f8bb17363a27323443c78293e4","compiler-rt/lib/builtins/fixunsdfdi.c":"2e9280f9c437d3334e4eb26a797d0a4bf8ca47da8626f5774c91e86716d97b02","compiler-rt/lib/builtins/fixunsdfsi.c":"0d22a29be01cac81c87379ca1e9fd27526ef51268b5cd69f4e50823feb4d1f03","compiler-rt/lib/builtins/fixunsdfti.c":"4b361f697f7eb8bbb49d829b5cb1cf2fbf6f39f78bb6dca28dca0eeddaa4d277","compiler-rt/lib/builtins/fixunssfdi.c":"7b43aa07a924f5bd8803521156b17597e07656b76a012990953277ba3b291f2a","compiler-rt/lib/builtins/fixunssfsi.c":"bae9a831b90b0c0fb407005cb66d512bbf2ffc1668efb5d02f25cef1d1ca773d","compiler-rt/lib/builtins/fixunssfti.c":"0821633a0b91ee3ff3d387d41b8dc04499ae5db1625167face069984901a1693","compiler-rt/lib/builtins/fixunstfdi.c":"43c23ec751076340bd1c8e61ccba872b136bf523f10f4735b40b1f55fee2568d","compiler-rt/lib/builtins/fixunstfsi.c":"04bfd3d8755224d6581e4352bc2b94832e0546d7d39b1de60ab033b29c79e652","compiler-rt/lib/builtins/fixunstfti.c":"c03538e1118226d8acd7b2273a373ecf016a66db54f746188a73b23a7ab78825","compiler-rt/lib/builtins/fixunsxfdi.c":"d7d641c3934de110e02a1e21480fe6b6d373c11eab6e1e9167632f73a7256d0b","compiler-rt/lib/builtins/fixunsxfsi.c":"56804b934a683864500523117ae16908e1ab5fdbc0b4a12d30d1b1bc30173792","compiler-rt/lib/builtins/fixunsxfti.c":"90831c3961da7a700887ea424f83eb38def227dce3a981de7b3144a1839266a8","compiler-rt/lib/builtins/fixxfdi.c":"8b7fa08061e10d3015999e4166ab7f92e507cba64fe9d4911f7c2816dd9a6107","compiler-rt/lib/builtins/fixxfti.c":"07294e2e494be47f3bf3fa401967439159484c4e01c48eeff454fd5257ecfff0","compiler-rt/lib/builtins/floatdidf.c":"acefb62469c9a0ddc5ffe49ae46ca957a1e41f36374e54cce140688192fbb4c7","compiler-rt/lib/builtins/floatdisf.c":"899181251abb3efc67d3517d4469f3670c529120bb149deb57a4984343604788","compiler-rt/lib/builtins/floatditf.c":"8af11e2f8a628bf79cbd569aba323b094d5c731ec9349980cc746b6693a31b7a","compiler-rt/lib/builtins/floatdixf.c":"7bdf02ecf61351d316011190963bd79c6781310b495850759eb77eb7dc1c7ef9","compiler-rt/lib/builtins/floatsidf.c":"9739cdfd496ad7f47493b7124429e05f943f60045d936b214790bb37230fddec","compiler-rt/lib/builtins/floatsisf.c":"8b2a0cabef6108244697920d695f21893b1d84e673f165c1c4a05a5d6fc6cefd","compiler-rt/lib/builtins/floatsitf.c":"e345ea5666b27c88f3bf669501785fa1e5006ddbf30d1c2990681234b486b653","compiler-rt/lib/builtins/floattidf.c":"508747da9e63d8f03746166d765985126edf34fbfa5358fb392a3fb8f967389f","compiler-rt/lib/builtins/floattisf.c":"191ec2bfe6ce8a17a96aa9cd1d1a325e817c5b8784adfdec959782108cc0c3f8","compiler-rt/lib/builtins/floattitf.c":"3a908bbfef1368b767df0807edc15477cbb063faa3e505a02bd9515224eb4647","compiler-rt/lib/builtins/floattixf.c":"68442381648887f25b8e5cc32d74d97374402f10cd87d3160c27292f4e83422e","compiler-rt/lib/builtins/floatundidf.c":"7970b2eeb4b11f93de43d722d9cd895a2961563860016bd88bb2e49cd62cc4d9","compiler-rt/lib/builtins/floatundisf.c":"138686253eb24174e608951409b71ec2c04006737dd9266eee1302e46bfaf19d","compiler-rt/lib/builtins/floatunditf.c":"1b44c87a8b4e88129ef8680f1ecbc25c1595fc5db98ac6d79b853daae92e541b","compiler-rt/lib/builtins/floatundixf.c":"54d22d277a4456d691770f570cb59b681f7d224c27957cbf5f338ab05cdd095e","compiler-rt/lib/builtins/floatunsidf.c":"635b738d4d6dd5867d52f527274779b176b1ff42f987f517a070e116ead1dd58","compiler-rt/lib/builtins/floatunsisf.c":"1bd72961320e6c43052a73adc674f4fa9ce6d0d608fb83b1bb8c3fb2b29294d7","compiler-rt/lib/builtins/floatunsitf.c":"07336ee4741e5512e81633859e60393d21089325d26aa7db0f78aec6d87c8526","compiler-rt/lib/builtins/floatuntidf.c":"c88b1403ec54a99ebd296f08a4e9fe50f00a760901a3a663d861dea2c4e61ae3","compiler-rt/lib/builtins/floatuntisf.c":"cd7eff7001e175ce4d23567cbbe473226fb7ca8711f1b8ddc6e9a42796209729","compiler-rt/lib/builtins/floatuntitf.c":"e9cca4f0007c36ee31baaeca7a4079f1faf58464b384f8a064788df8160afcfd","compiler-rt/lib/builtins/floatuntixf.c":"1b651def9a2df928ef5550129ebc0049dc8eddb085224eb5eb2e9410d61c2b93","compiler-rt/lib/builtins/fp_add_impl.inc":"ab027959934d5079e56b7a9e7df2216eedd8f75086baec54ea2238dcd245f98a","compiler-rt/lib/builtins/fp_extend.h":"fb8726a1205c02ebbb9b9de85caaa6b06ac9a38c0348045fe8b4dfac385e3845","compiler-rt/lib/builtins/fp_extend_impl.inc":"a697f2134e861fdc407ca138e5bd040ce50a46f89f46d29565b5c0eb2878dd27","compiler-rt/lib/builtins/fp_fixint_impl.inc":"588900ec9c6580f215d13be7b42bf1bd2d9a8541b040c7fb710c9db61c3eac24","compiler-rt/lib/builtins/fp_fixuint_impl.inc":"e53acafce5bd97c9d27399fcf2452479832c112f1020fd62ebff3d9804472e5e","compiler-rt/lib/builtins/fp_lib.h":"afd0dacdc9d15893b63ce595cdbbe596c7785fb103ef606f027c2f0a3348898c","compiler-rt/lib/builtins/fp_mul_impl.inc":"cf7205f177de4c05a902b218316a8b39e53bf6090d5a3bba8a1fc21e05d1dddb","compiler-rt/lib/builtins/fp_trunc.h":"387be281a358dbabe245f2921214c9305709d147c086abdbc4d9780e791ad43f","compiler-rt/lib/builtins/fp_trunc_impl.inc":"76bf50ee8cc435388ed14c0dceebf080eeadc67e887caa782c227cfc6883a4da","compiler-rt/lib/builtins/gcc_personality_v0.c":"cecde3c3a76ad864819843a4516f7b8885afd142d0b2616e1dbdfae6b0d96a12","compiler-rt/lib/builtins/hexagon/common_entry_exit_abi1.S":"ea45ca5149070855cf4091fd8ddfedfc606710739ae5cd63028ff15eca11bc18","compiler-rt/lib/builtins/hexagon/common_entry_exit_abi2.S":"9edb8dfbe8be17353c3c74fc81e015d52e2a918949be3a0d38676a37a5db2820","compiler-rt/lib/builtins/hexagon/common_entry_exit_legacy.S":"07f27708c2f50699829c51b32341cff51e33ef102f9e74ec54732f25d02d0616","compiler-rt/lib/builtins/hexagon/dfaddsub.S":"70e36679275d517f064c72fe8b55d20dd62850fe79b1492d7db9951ae4bddc21","compiler-rt/lib/builtins/hexagon/dfdiv.S":"89480e6ae2b60ea8309c75a864dab874dce5e63e183579ff24cd344bfa396fe9","compiler-rt/lib/builtins/hexagon/dffma.S":"ab98a621f795f9c47492b6230443d6dd1ea2545ead73b4a8d73c10baf0e66fac","compiler-rt/lib/builtins/hexagon/dfminmax.S":"c0a6a63dfe4d336b80c82ff719c9e9d7a8e79f2b33ded243977802a50997ffe9","compiler-rt/lib/builtins/hexagon/dfmul.S":"f7349d75cd65ddf8fbd38859cfc598c6111d39916709ab403b377caaa265b80a","compiler-rt/lib/builtins/hexagon/dfsqrt.S":"af7ddd89ec0a132a04bb8f92bd65d7094f59d9bfcaef2150b16e6fbc0026c734","compiler-rt/lib/builtins/hexagon/divdi3.S":"93c17ee41ec458843de9e12166e56141824ab6ce79bdf4232a00999a5be4cd87","compiler-rt/lib/builtins/hexagon/divsi3.S":"c229751b1821e94af1ce32b143ce600d7cf5370e0a33a201d8c08f5b2a90a3bd","compiler-rt/lib/builtins/hexagon/fabs_opt.S":"b31585e77f31c48b4ee62b47fd327741de51d6340a167d16c98b7d7de0002eee","compiler-rt/lib/builtins/hexagon/fastmath2_dlib_asm.S":"d7ba2093d6c1172574d59ba9cfa900ce5e1c627679fb8280fe9d96db827696c7","compiler-rt/lib/builtins/hexagon/fastmath2_ldlib_asm.S":"997e060adff2ebb4f4f7fe7fa3bceb5d83c412d467551cfd719342d0c111ae2a","compiler-rt/lib/builtins/hexagon/fastmath_dlib_asm.S":"f6d341affa7c163ec94e04b1470331b480afc8e08dbf2670bd3eab41617ddfbb","compiler-rt/lib/builtins/hexagon/fma_opt.S":"bfa5bc972bc6cb18be5f6a46bd5ba6101d654dd3fb0d45ad4aba598649ad5f4d","compiler-rt/lib/builtins/hexagon/fmax_opt.S":"494ecb9cfa1f8602e4cd2188c83a6b949b89b2f100846496a9ad39e5684db4b3","compiler-rt/lib/builtins/hexagon/fmin_opt.S":"cf6b64756a8b4f829bea52b23722a31adc2e998872c4d1d06ec65919ae3fa66d","compiler-rt/lib/builtins/hexagon/memcpy_forward_vp4cp4n2.S":"e4bb57e9d9c79b6c1af39d478605cb80ae7ebd856e3c1fc46f179945a5878dfb","compiler-rt/lib/builtins/hexagon/memcpy_likely_aligned.S":"6df2de9046397d39d8af4ac789b763e59c68a8e4e8fe50935fd5533cb5c4c1bc","compiler-rt/lib/builtins/hexagon/moddi3.S":"21b37069b4e67aad74920a780153544b0df8de97b60897ee6fef23dafcafe584","compiler-rt/lib/builtins/hexagon/modsi3.S":"c3042ce6d286614a26cf5d2a8c24ca0e39a76b92335e05a07b0d381141c48e4e","compiler-rt/lib/builtins/hexagon/sfdiv_opt.S":"672dcacd119afaea6847ec8c2d34382c7947833225b7fa05f3fee873ad204307","compiler-rt/lib/builtins/hexagon/sfsqrt_opt.S":"c4899d218fe34588b96738f19a9f582b9e9ae476e130b206f7493c037d3f112c","compiler-rt/lib/builtins/hexagon/udivdi3.S":"d98c6a997457da23a059fead85b1ebdd8369a07a9d3c74464ff144727bf13a81","compiler-rt/lib/builtins/hexagon/udivmoddi4.S":"9b80e89c74302f25fa9ad7c7c2d2eef99c1a886ad0e902cf82f453ae04420994","compiler-rt/lib/builtins/hexagon/udivmodsi4.S":"95227ff5eaf2ab554df4c532c4165c56da379c3ef986b64cdde0faa52bc5e3f8","compiler-rt/lib/builtins/hexagon/udivsi3.S":"b3d462bf399e21cea6ca06337f01725d1fb7af75c8e424dd1409436ccc30f5d1","compiler-rt/lib/builtins/hexagon/umoddi3.S":"2c79a5bbae32f7c389e243c36d9c4b29944196ebd6ccf93ed34e3c07b758dd72","compiler-rt/lib/builtins/hexagon/umodsi3.S":"7a9b009eef5cdbe4189976a57e0c3706473750c24c648a3b6e2fe11e6c1dfcd5","compiler-rt/lib/builtins/i386/ashldi3.S":"3daae35291ac0b014da5829a9ebf5681935b1a199bf33c2acbba92747f519256","compiler-rt/lib/builtins/i386/ashrdi3.S":"3786c5f5096af9c44ba7aa3ad4555698f5dedf264c5b39eea89bb3db8d4435d5","compiler-rt/lib/builtins/i386/chkstk.S":"a95b15ad2a1317226626feb224aac919ae87f61072c6f322b59e835966a7e429","compiler-rt/lib/builtins/i386/chkstk2.S":"9ec0d7871d4738a4206ffbce81f0d115cc359a854cab25d7e8d1b9470ca0dd8b","compiler-rt/lib/builtins/i386/divdi3.S":"2272601ccffcddd0de42aa19fb81850fae9d95fc3e9a0478f33cf9955e6df7a0","compiler-rt/lib/builtins/i386/floatdidf.S":"4f24aa22300c6614dfccffe00f8d188c0e2bcf15206eca3f4f35ec592f1ba0f6","compiler-rt/lib/builtins/i386/floatdisf.S":"8144f9ff138ada26a1c5214f288db4db695c7ad5f1299d8fd67199101d043bc7","compiler-rt/lib/builtins/i386/floatdixf.S":"7242a50a5be3516fea83a73499ae59dedce3de650e6fa98cb50cc47e2dd85a23","compiler-rt/lib/builtins/i386/floatundidf.S":"ff0d437810dc959e6dbcc7ef0280e6bf049ca56b3a3585327e6efc28ef7f32fb","compiler-rt/lib/builtins/i386/floatundisf.S":"fd73721697349feaebda9ec533e78d552efb583463465c6a9f6c135e0bd594da","compiler-rt/lib/builtins/i386/floatundixf.S":"dd2b540a83e94012eaec85e8568a8c1c5c33450f777dd124055f1132d836e36e","compiler-rt/lib/builtins/i386/lshrdi3.S":"16fb322cdde675f9b19d74af4147041d33c3478da4537a105dec684a34bbc0c3","compiler-rt/lib/builtins/i386/moddi3.S":"76bf5c6bb5d0d772d26ab4b965bdd1b36c924cc82c10e5ec8084fb7d8270ba97","compiler-rt/lib/builtins/i386/muldi3.S":"4b534a5372c64c0800f94d983ae27959de07f8063298db6f548ee090031f1a69","compiler-rt/lib/builtins/i386/udivdi3.S":"48dcaa50d1edc6a7fb83cc7a9da980e39357803e2607702c0979362c55dcd85e","compiler-rt/lib/builtins/i386/umoddi3.S":"1cc6d60b326214ea4e79613f562a298b1a9a0f42366c515df865aba2a62809d9","compiler-rt/lib/builtins/int_endianness.h":"2b7d3cfcef61a394a82878083cd32abe27e7c63bf12af140ac1f6523a5d03ea8","compiler-rt/lib/builtins/int_lib.h":"cdae1d1852c9a2cdf39fdcf18c33b6112ed8263d6a890457d1c265c75eaa4413","compiler-rt/lib/builtins/int_math.h":"9ba91194b7871d08a146ab60bd8b161bee6ce0d7221f13a3ae458bb5553fcb13","compiler-rt/lib/builtins/int_types.h":"24c4cdc771f1d69c07f0d6018f801ddc1c7359c93e625073505f249710dcfa87","compiler-rt/lib/builtins/int_util.c":"66e76e0e8016a6a4e5d5b0a4a08a83051b24699047bda3a54dc18593cfef7801","compiler-rt/lib/builtins/int_util.h":"5b02f00e0077110338a3b4b4168b06026a23c766a9d926c27b904b87a38e2a89","compiler-rt/lib/builtins/lshrdi3.c":"4492bb0828e8db10b063b81086c594bdc1f65aca976c2c76a3ac0f4057a8b25f","compiler-rt/lib/builtins/lshrti3.c":"776d53787428264b0fc7e4242a617f6187da0ed9dedb74c830fe48af8b658dd6","compiler-rt/lib/builtins/macho_embedded/CMakeLists.txt":"00620fa370283794db606c2e574a804966fe6e744af542fa55e859c0462ce8ce","compiler-rt/lib/builtins/macho_embedded/arm.txt":"a1ee411731310ee381f5aa5b0661e87ed323ce6f6fee391d8c2e5138edd1042a","compiler-rt/lib/builtins/macho_embedded/common.txt":"a77c8be194391cb3d78ab3fa946e68faeab7032f4904e67557f65616383fd8cc","compiler-rt/lib/builtins/macho_embedded/i386.txt":"e51de1271cfe3b6b32e165ab724b04f2454bfa740025d761bca0c8fb7282f48d","compiler-rt/lib/builtins/macho_embedded/thumb2-64.txt":"645ba5762fda6e01bb943ee98c96fdb3b99b01612704c893db331e644f146c26","compiler-rt/lib/builtins/macho_embedded/thumb2.txt":"1db0140d269fb1d1400c1d89b17052837a40f714bfaf7611f4d2e89e32990445","compiler-rt/lib/builtins/mingw_fixfloat.c":"103744b3563a05bf34b3b4b6ea0de49de6828439e56f6dcb5772cd7d0aff2d0a","compiler-rt/lib/builtins/moddi3.c":"d3a7d04bcea7ac03a5e027b5aaf6e466b9245df360a6055ba7095a73c3b8d51f","compiler-rt/lib/builtins/modsi3.c":"66e21612d1cbf388c0fe2e388a197cf110e6a87dc86f9e5f22a1761c20158ea0","compiler-rt/lib/builtins/modti3.c":"543ff46a5c928799e177a54e297de75ad533ff75dfb2f2bf59fb895dea2876bd","compiler-rt/lib/builtins/muldc3.c":"e978dfdf0126c9c0ce22edf7334f9bae21782254ca4272a2cd9b279d8eb944a9","compiler-rt/lib/builtins/muldf3.c":"4bbc23469dc117700e8947804e2533c10444e440cdc5dee1e57966cb26b48b69","compiler-rt/lib/builtins/muldi3.c":"6fb140334de95e257f0c04617f3c6389a96db048a5070a9148ef2e657dcc23fb","compiler-rt/lib/builtins/mulodi4.c":"24533c80a19ff83c78eb18c24d10d8ec6f0d76ece6e418acebde217e3373b4ed","compiler-rt/lib/builtins/mulosi4.c":"53af5fca27668aec7fe3ffbdfe715ee5f2ac78e604ff990862d9dcf29e6d69e6","compiler-rt/lib/builtins/muloti4.c":"f78d638034fd2ec08d1a676aef5a0dd121ab5b747d878a3404fe9677a139f783","compiler-rt/lib/builtins/mulsc3.c":"999bb7525843274106a141ffe0e9d828d7c789c48c7705007c1828f03d06051c","compiler-rt/lib/builtins/mulsf3.c":"35f4741afff14b3d10cdc228f2e3ee15dc7d54ea4e1bc8dbb8edeea68206e8fe","compiler-rt/lib/builtins/multc3.c":"fbe763225be5f2f185c2dbe2bbae6a25f02c31fe7da7b764b623e73bf236c20f","compiler-rt/lib/builtins/multf3.c":"9696a34ad921379a5cbe1223f6cd529a57755e9349fc18b04de96ff75099da69","compiler-rt/lib/builtins/multi3.c":"886eb84e4f1b15b6aad46d176e3540607649a1a49c5a9fa64a273442d7de111d","compiler-rt/lib/builtins/mulvdi3.c":"4055d9854c72c494bdce6090f9097eccec57037db9eef1d00295650ab9d5ab5f","compiler-rt/lib/builtins/mulvsi3.c":"f1c8f91161bc3404ccce16292f11cfa5e71d7b7ab6048bfc58994f885920355b","compiler-rt/lib/builtins/mulvti3.c":"d9d8bd3b2d81946bd8e02d7f7eabba3a7d2e2664ba7ee624387feec5d11530d2","compiler-rt/lib/builtins/mulxc3.c":"55e08a0bbed3ac5263f0bd3d4cfe45a30222912677b750af193c89f42ed7a27b","compiler-rt/lib/builtins/negdf2.c":"2fb9620ecff427e1d8529d8b843e40858945c65a97eaef0dedbd3b5d84496010","compiler-rt/lib/builtins/negdi2.c":"666431d130aafd71961ee52874b21b78ad91b69eda0b8e61be6a4c2e2cdd357d","compiler-rt/lib/builtins/negsf2.c":"fb3a606355ba9444cab4ed777742400a81a0e994f6d5b16430f6afc879826134","compiler-rt/lib/builtins/negti2.c":"9d7babd49cd913360bf341f9391a304450a2ce471e2805261eae8f51315fe82d","compiler-rt/lib/builtins/negvdi2.c":"557514cd462922192f4095dd1169a094e92bc5d241586212054c338befdab860","compiler-rt/lib/builtins/negvsi2.c":"d70fe48f06dd197a1fdc7ab5b0993f18a0b5ebd9e615abea32e3ac1c4eed7111","compiler-rt/lib/builtins/negvti2.c":"76333e81317b0b3675adabb3663ffd67f2a994391e5f37cea16558ee78df3461","compiler-rt/lib/builtins/os_version_check.c":"0412cadf737bd40f89a5e591a710d12df68c3fb6aa73529d75160341ca146abe","compiler-rt/lib/builtins/paritydi2.c":"6ff731421601e1bcaf22410eb36b9a5bf6ebdf96c7ff670d47c54fb8a97c976d","compiler-rt/lib/builtins/paritysi2.c":"61d21b6d0ba12a27765e37e5e09e720c03fed717f93902fac98289eb3475ad67","compiler-rt/lib/builtins/parityti2.c":"b72f63ff66dda3de8f4beb75211abc8d586fe374c75c0c6360fa256a21cb6631","compiler-rt/lib/builtins/popcountdi2.c":"6333b4641a44cf012e47e3c4d9f025fecc3383d92b4a74e8578c63991368aeb0","compiler-rt/lib/builtins/popcountsi2.c":"d77000e99bacea9d1a0af07dc2d7c5642d3d106a2b071289884cdc9d9b59d3ba","compiler-rt/lib/builtins/popcountti2.c":"e47739b28d406624c23630bbc9bc9fff14b1fe2655c3420dfd3789940e779987","compiler-rt/lib/builtins/powidf2.c":"51d962abb4fd0d9cf679123923aa47bf0173dfabcbf34f060d0bf31fedd3ffac","compiler-rt/lib/builtins/powisf2.c":"3e1c628afabaf4a792ff28b0f6099b2c225077c1a9cc5c14dfce8c2df1520942","compiler-rt/lib/builtins/powitf2.c":"84f469ec8da1316ada6f08eee7d61fc0fee7724dd36efdd8a7f307eaa48055bd","compiler-rt/lib/builtins/powixf2.c":"4b0bec5316af07e32115cdaa5ec3ab33eb1dc17610d3b0e138afccb2739f725c","compiler-rt/lib/builtins/ppc/DD.h":"9937374ae3cdc0400db552bfc7bd16d7de60579f2cfb5a28690514b3048fc3be","compiler-rt/lib/builtins/ppc/divtc3.c":"07f8bdbcdc1399b9d820efcea641b573a568dfa3335442e9fe0aa81524ce1020","compiler-rt/lib/builtins/ppc/fixtfdi.c":"1ff700029be9a47066c773322b6abdf21cacc186791d5e5a3521370ddc2b67e6","compiler-rt/lib/builtins/ppc/fixunstfdi.c":"236ac6069faeed80e5ffc8e83504be28db609ecf900cab00f7dc1fd48fe52672","compiler-rt/lib/builtins/ppc/fixunstfti.c":"d99a938a316412d24137676c8d4479c5a649d4e203660495cf94c401c67d32a2","compiler-rt/lib/builtins/ppc/floatditf.c":"33a5078a2560f4be86bd18235fbe6c63fc0557773583544845c7cfad1f1cae97","compiler-rt/lib/builtins/ppc/floattitf.c":"6e31855374a88bbbf7ad3a353bd258a41db54fed62855cab69fb89988cfa9c83","compiler-rt/lib/builtins/ppc/floatunditf.c":"97100f3814f10cee6c7eccc3feed3ce9abf9dc5f7dcd69f29de8744d48d63111","compiler-rt/lib/builtins/ppc/gcc_qadd.c":"648cf34cbf6a2e7774728d6ec7fa9d8ad77ddf8f89da990c95a71af7c2081bb8","compiler-rt/lib/builtins/ppc/gcc_qdiv.c":"368bf2db4a335977f63075887adfa3bf290a090e28282d206c6b897398796cf7","compiler-rt/lib/builtins/ppc/gcc_qmul.c":"b5334eb25890c5149135e81cf9f8f4bb0520091b367641988ac82e18b0bc9851","compiler-rt/lib/builtins/ppc/gcc_qsub.c":"a9e0df52e702ed2f2c2405d4807f06981412b4e731dc5282228fb8c2cd642fbe","compiler-rt/lib/builtins/ppc/multc3.c":"55a643639294fb0901b32d4781453f8aabc19d638f43cd7c0ce470c3de8f3691","compiler-rt/lib/builtins/ppc/restFP.S":"674f3bd5098683e11e2f8d2a02eaf8b3ce7944cd3790b946dc10dcd78c9c834c","compiler-rt/lib/builtins/ppc/saveFP.S":"0e5bbf72b047a392bb08668b8b6d772c9954af59940d84e0ad175b3bf3d0be38","compiler-rt/lib/builtins/riscv/mulsi3.S":"4170c1a679e93c269f8f8ddbd7ff571c5508fb2606510843702ae2897d25b16a","compiler-rt/lib/builtins/subdf3.c":"889de5d26d5c8c6aa6d509332a2beb8e41d394ee393fb7979fbb9276dc36df69","compiler-rt/lib/builtins/subsf3.c":"893d6853c0ec412a720dce8afc85aa9502ba9e1ca95d9e5c1b85f5b66dd54469","compiler-rt/lib/builtins/subtf3.c":"08f76086fce8a5773d5a01de26a5768aa3becec5a88453e5514e9470ae6c2ae4","compiler-rt/lib/builtins/subvdi3.c":"f4b4fd91ed1f8fa70fc1bd824f76c0c602e6e4a564291ffb17de82def5c1db2d","compiler-rt/lib/builtins/subvsi3.c":"89e0a293289287cece569d87071f12cc96ec386bc197773521f226c51b026e1a","compiler-rt/lib/builtins/subvti3.c":"63a245e120522ffabcbf597dcb977be0a6432ce5bb85cf158ff31161f2649ce1","compiler-rt/lib/builtins/trampoline_setup.c":"f664cc4d972420f9ee45843d4441f1336eb53e1b0d96cfe812cd4f7197a8502e","compiler-rt/lib/builtins/truncdfhf2.c":"90ecaf1fff27f8a53cb4e0f54632a0bd2eaf2e2a4c0a488606a46b96a97b158a","compiler-rt/lib/builtins/truncdfsf2.c":"9fba756ae730ba15b9b164dd2911a17cb31bbf3ee932e9927d2ad7cf6e8d879f","compiler-rt/lib/builtins/truncsfhf2.c":"648c6f2bd501e380db39b24d16cfa6416b37db6e33a972ebc562dd259ebec174","compiler-rt/lib/builtins/trunctfdf2.c":"663a0dbe84082c588dae68b3e293b0a4ff651a019cee5726ba08c92566eb9879","compiler-rt/lib/builtins/trunctfsf2.c":"4a2f8ada8629bfba08639311a3cc1d82c5aa44156fc50163382348e506fa96bc","compiler-rt/lib/builtins/ucmpdi2.c":"e77665ff49ffcccb0927ba6672ba938a871d127089b385a9f3e2a99fa724eaf6","compiler-rt/lib/builtins/ucmpti2.c":"13d49d1c6fdee51c10b297490a2ce5270a71a5a0495cd384c39e2b324fd84cf4","compiler-rt/lib/builtins/udivdi3.c":"3ddfb205852b02fa4e7c5e372337a2cc9658386dea211f7b9f59e06c53665a9f","compiler-rt/lib/builtins/udivmoddi4.c":"1d27a31f5e3c4cd1851daffed0791738892b2182322c04b7d94425ee0b0291ba","compiler-rt/lib/builtins/udivmodsi4.c":"dab1e47e77849d7fddcf8ff0c6ad32c6b8cb0a5f3a42e263650f57ff5db61f46","compiler-rt/lib/builtins/udivmodti4.c":"0cbb62ea33917cfcac22317a6f407aea0e340a0c627e7bdb4fdfa20ddcb66ec7","compiler-rt/lib/builtins/udivsi3.c":"3a5ebaa2de13f9d10a351e436fa4f514453743d43c008ddc7f4e7cdf9e59a3b0","compiler-rt/lib/builtins/udivti3.c":"efc650ac227336da68b86eae8a85c37acd587a64ff9e5bc3d127d00890212648","compiler-rt/lib/builtins/umoddi3.c":"47f847579af17498ec124f42749d90a544adb9955d1ac82fc40c02f47e35d461","compiler-rt/lib/builtins/umodsi3.c":"2406d78365ed94eab23c0ced6a9649248248ec807841fdacaba7a9b1cb427745","compiler-rt/lib/builtins/umodti3.c":"742588aa54a942ef8d26f3a2f1589632e5726159560022c2af05570a26c66fa9","compiler-rt/lib/builtins/unwind-ehabi-helpers.h":"ac92ca5020ee0f810362bd298afad9e1122be4a791f7af907fcffbb95c8d145b","compiler-rt/lib/builtins/x86_64/chkstk.S":"85ff7d802a83b7dc4c7715e3ee7ca7ea9996d1ba81a54c008e88efab466bdd5d","compiler-rt/lib/builtins/x86_64/chkstk2.S":"8d0dfce07d03232833c0e21199be188ae38429e39e81fbf65cf1e14a2ff6a627","compiler-rt/lib/builtins/x86_64/floatdidf.c":"6f20204105c1e4fe94e02b3006ff04a1775ba16d2478a1f60c37ca1f0a923d2d","compiler-rt/lib/builtins/x86_64/floatdisf.c":"e5eb6e9bfde72359c5c898e61302e8846e53234a347d9fac32273a5769856df0","compiler-rt/lib/builtins/x86_64/floatdixf.c":"f0e3de0078e1bb983106501ae5a97ba5d80f64846c734c3f7d6f862c83ab4214","compiler-rt/lib/builtins/x86_64/floatundidf.S":"238d787dcedbe9567dfa76d36d3722152a14a2f4a12437185ca85d78506bbd80","compiler-rt/lib/builtins/x86_64/floatundisf.S":"3d6609ebb19336c02476d250050321b04e25e11522cbc25ec3d5da2966e25101","compiler-rt/lib/builtins/x86_64/floatundixf.S":"5a22534368fc7b725aae6d33319ea3bd46de40e01a65fa35b712ec7566d96a58","compiler-rt/lib/cfi/CMakeLists.txt":"bded396dd4e4914c397b526c40b407a3eac960a55b777f032682839067c8fa60","compiler-rt/lib/cfi/cfi.cc":"6778ffd5cb641c1ab1b74548b1de88ca126975afa8b892d7bcb8a1b5fc7b2b29","compiler-rt/lib/cfi/cfi_blacklist.txt":"be8abf240e598b5ede59c02f52901c965746476f0dc5eaabdddb0455bfdeb3b1","compiler-rt/lib/dfsan/CMakeLists.txt":"a2dbcba435ea1dc5ee90d13e375b3dad13836eda1bb9869003794d7d932c03a8","compiler-rt/lib/dfsan/dfsan.cc":"0cae1f93302c8e851a0cfb34f1168b1f1fc33ca6fc0e03590ef5186e89e3e56d","compiler-rt/lib/dfsan/dfsan.h":"ce16ba29a24d25653126f717128900f568a64ea4ac30808c4314a307f09c5eca","compiler-rt/lib/dfsan/dfsan.syms.extra":"830e4c28c199394dc5d52f310e727c4ec5adf1ba17b7b42870913dd05208976e","compiler-rt/lib/dfsan/dfsan_custom.cc":"c1b64ccc0efef86d3ee03e678bdf863038d56ef5fe18c36ee7cad9117c79c8fc","compiler-rt/lib/dfsan/dfsan_flags.inc":"24095792bbf11b62d42e26bf8c412015420c46205c95e54145b4d1b17daf37cb","compiler-rt/lib/dfsan/dfsan_interceptors.cc":"53afb0128dd23f43abb7ceda5c741e496c5dbb63a3ed73372d482111ee644b7b","compiler-rt/lib/dfsan/dfsan_platform.h":"b7f04b522b3b59206a61cfa12750da516063b666c16d5bf32c9f7b516688369a","compiler-rt/lib/dfsan/done_abilist.txt":"3c1174447f7fe0b32e2882e999c8ef7d366b50632b626fdbfc3c963aa8638c23","compiler-rt/lib/dfsan/libc_ubuntu1404_abilist.txt":"eac91e69e8d803f407c485dd8fe46052ffbe543e5bfdc7c08ae60648df947d9a","compiler-rt/lib/dfsan/scripts/build-libc-list.py":"3620cebb340a8d19a65270f5e740112bd04f3ed8251179fec7383fff368e5967","compiler-rt/lib/dfsan/scripts/check_custom_wrappers.sh":"50ca6f3e5aa6816f1f58d1615dc4daefd1d18ebbcc0ccf6d56efd12c1cf33d75","compiler-rt/lib/esan/CMakeLists.txt":"3cee2d7b8aa56a93006cd2f7043474e77a44ac7a996ed3e1a818191a9507be6f","compiler-rt/lib/esan/cache_frag.cpp":"a563e0c983c8a7cd70408db3d7772d634820bd11b9b1f8cb4162c31053e8b144","compiler-rt/lib/esan/cache_frag.h":"07a88e8c03ca8e7e3540a605df06fefb1dca4c5e3a0fd3e739007b2476409e86","compiler-rt/lib/esan/esan.cpp":"101e68082e3183be36542ccc2c7dcf10530bf9262d99ee8954e0112383a3a3a8","compiler-rt/lib/esan/esan.h":"0fce3eeea6eeef5c67133e9ea2ae035609cf2bb130cfb95cb759d90013ba891f","compiler-rt/lib/esan/esan.syms.extra":"63a8edc5d603baa190f3526cbf7e55582183f7fe5bc54afe2b2bcaf9333222d6","compiler-rt/lib/esan/esan_circular_buffer.h":"cf189e3193b1028ecfc9498f352489898d73824efa98f10541c7c9e3de281216","compiler-rt/lib/esan/esan_flags.cpp":"d4b6bdf4b6c1e9e62a6a0cf295e3bac6a55fae35450399dd80a2ffd771bcb1e0","compiler-rt/lib/esan/esan_flags.h":"ccdb0e9df0ce50d7ec5066e6de2668d74e617b456332a00ef75ff8c9c18558be","compiler-rt/lib/esan/esan_flags.inc":"f0b928ac56437c66b345092e89776199e16c13fb9b5d29ce32e3a5586ed99363","compiler-rt/lib/esan/esan_hashtable.h":"557e3458b0652e0ae0562c206e3672dbe4409000a26b4b456772ef2af11f41b6","compiler-rt/lib/esan/esan_interceptors.cpp":"dfa2bed32a9b3fb1d73bd36adaf9263a3c7904fd9a76fd4a566571739a207d9f","compiler-rt/lib/esan/esan_interface.cpp":"bc22db10f104e48ca0bffa6d9b54bb4ce2942148cfe45834573382422802c13b","compiler-rt/lib/esan/esan_interface_internal.h":"debc860439217fe5bb4ae66e051d375f31144e5025fda98e1b3c890e833f955c","compiler-rt/lib/esan/esan_linux.cpp":"d3de0f920bb01d5de68823186cac6c94cfdbf897752efd93ef8f5efcc8ec5c6b","compiler-rt/lib/esan/esan_shadow.h":"082e955043fa70ca7e72d75576ef7c6ff0fa0b384b5513adb2338d966146cfc6","compiler-rt/lib/esan/esan_sideline.h":"5a96d907bf9f0ae7efe6a375aa9c683caca32521db7bedd411f3af80746d69da","compiler-rt/lib/esan/esan_sideline_bsd.cpp":"360cf3988e38dd7fbab1291e124544c71a73ceaa7cab898d79d6b0df10ce30c8","compiler-rt/lib/esan/esan_sideline_linux.cpp":"b3267041231f97636cd112b2708e9584da0ac410db6316a18917e263c1e2b28a","compiler-rt/lib/esan/working_set.cpp":"a033573b57378d7d0a0669ecfd499e7b26649b824ca9416c3023600f3e9d1248","compiler-rt/lib/esan/working_set.h":"e7dfed74279db96c6f202aa8f5f72a29f027f5844f140487be9ef5e0fe2da127","compiler-rt/lib/esan/working_set_posix.cpp":"30eb5af11f11c85d0bc30aadd3daf2425fbebada11d4d9342b7fb43190e0a8e2","compiler-rt/lib/fuzzer/CMakeLists.txt":"ca88f06a2e7a355914404f57c3cfa272f4fdfe412ef741a9e3771172bab46c89","compiler-rt/lib/fuzzer/FuzzerBuiltins.h":"2517373aa303c31aa841788d696591eadfca1ad7d1689481b104515b810f90be","compiler-rt/lib/fuzzer/FuzzerBuiltinsMsvc.h":"969208f69d345e02a5c5b71a0602b1dbb98d71fcd376ebc95eac027f8d9d552d","compiler-rt/lib/fuzzer/FuzzerCommand.h":"b1b39c943eb9e3560e7a61dba95d24b54d8f8cfb923eee7dc87bc4dcb200ba1b","compiler-rt/lib/fuzzer/FuzzerCorpus.h":"c203506982fe1af3ec97b18496be38b21cf452ec60e1a5173407295751803e55","compiler-rt/lib/fuzzer/FuzzerCrossOver.cpp":"f7476d44c372d6755a0b99aa8ffb4be38a48e304595adfcc250354d54a0853f3","compiler-rt/lib/fuzzer/FuzzerDataFlowTrace.cpp":"385530c51613f3464372f51ded116c3f6ea14bb31ba152e2b446cf6046343cc5","compiler-rt/lib/fuzzer/FuzzerDataFlowTrace.h":"449c4f7c991265503e9d21e0ddd1553aab48d57f2d15c04880d00c52787b7f43","compiler-rt/lib/fuzzer/FuzzerDefs.h":"5e455c680d0a0300ecc443abf95ed0c57392fbfb1598ac03b54b93494b5f3e0f","compiler-rt/lib/fuzzer/FuzzerDictionary.h":"9a3a099e7fdd5a5988f575f78604f445524e704770d494d5ee1faad3c4a72ea2","compiler-rt/lib/fuzzer/FuzzerDriver.cpp":"f0910963a0e88eb4e9fe2c9694e930c3319842970a580ba4385fe91e5ed9f658","compiler-rt/lib/fuzzer/FuzzerExtFunctions.def":"a7d60034163ad88fd07eebb8cfaf4b76d8e7348e7eb1b2e65aa88b202830a7cc","compiler-rt/lib/fuzzer/FuzzerExtFunctions.h":"c1cb4090a8f4638b81e580b14c8b76e4b4042a742981984fd39f516ebd75c505","compiler-rt/lib/fuzzer/FuzzerExtFunctionsDlsym.cpp":"d0251ef1eb58b36366c380b8bdd9f99ae53360ac8c8cd81be6e49b16d41089b2","compiler-rt/lib/fuzzer/FuzzerExtFunctionsWeak.cpp":"1a902da827b6ab034618aea4af83214d842d2afe613db0d2c274b326ee5d3674","compiler-rt/lib/fuzzer/FuzzerExtFunctionsWindows.cpp":"a5041d5f17b6300c11cb33eb271e36a86578e4fad2d575fa3f100103c96b7942","compiler-rt/lib/fuzzer/FuzzerExtraCounters.cpp":"68985971fbaedc149a4ebb474191be252a041c08c96747c1fab6db1271bdab50","compiler-rt/lib/fuzzer/FuzzerFlags.def":"3750afe019ab0f2c7465a17bef6e0bfdd8308b5d3321bf899ebe2b2739f1b422","compiler-rt/lib/fuzzer/FuzzerIO.cpp":"66498b5f4867cb730689d0ff1d8226abfe7f4c28a03d1e84584db567ac50183a","compiler-rt/lib/fuzzer/FuzzerIO.h":"14a7decc20a84a9414b519b70759fe4ffc525a66c367c6846043c60859ac32c2","compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp":"0b43bb80c944d3146a71f5e62daa3bcd0dd6f7d502dee0dd56881b4c33abd321","compiler-rt/lib/fuzzer/FuzzerIOWindows.cpp":"de56d2239787e665b73d6ee43345c88e6394d558c505dccce6e7c62ddd231415","compiler-rt/lib/fuzzer/FuzzerInterface.h":"ce0570be300b8f9358779197cd8602e8e85917436da1f67732446482933caac8","compiler-rt/lib/fuzzer/FuzzerInternal.h":"0897ec96684736688ee45b5df528747e11a374b15288fb1bdd77602100b3af4d","compiler-rt/lib/fuzzer/FuzzerLoop.cpp":"2c708ba89cd0385690ea977a304051a4db7dd9a9f2fb0d0bacbc3a89ce166603","compiler-rt/lib/fuzzer/FuzzerMain.cpp":"05b6a3673c051db6156bbda68c370d49952fd159b1ada05bd6816ad8e2cd85b8","compiler-rt/lib/fuzzer/FuzzerMerge.cpp":"1b80e1b139f04edaa623b1fcef6fbd8c6bb8922ac555de3df1d8fa6e2333e03a","compiler-rt/lib/fuzzer/FuzzerMerge.h":"548619e382c788fb98a077bf06875845e8978fac82eb172bc6f32808f6ae601e","compiler-rt/lib/fuzzer/FuzzerMutate.cpp":"a8fbe76e3a053f755a5ddae6f63e810f2fddee0b4e4b42347814da5670b9dee0","compiler-rt/lib/fuzzer/FuzzerMutate.h":"02b1a797e5e1ade933bad85be503fc2e5debca9c4c8e0f5501879e69db44ea15","compiler-rt/lib/fuzzer/FuzzerOptions.h":"14e14b1ab9436991aa478d02cc9e1580c80603decc7566bf3987f343399da802","compiler-rt/lib/fuzzer/FuzzerRandom.h":"751e55d91b0e580b68d3cf3192709818923747b5dcc1962b2465ccf534bcf632","compiler-rt/lib/fuzzer/FuzzerSHA1.cpp":"048e4d3da996724d813eeb565aeee79ddf951470cf8de204362d6094f65237ce","compiler-rt/lib/fuzzer/FuzzerSHA1.h":"6725a1a71bfec6f11c548da52c234d7dd71a45bbf275e62212e1b1bd222685d7","compiler-rt/lib/fuzzer/FuzzerShmem.h":"2790613c559be322baa5eb4b5f22d6316f5e86da8ab4ed7557c287f0346eab29","compiler-rt/lib/fuzzer/FuzzerShmemFuchsia.cpp":"0a2a2b882e43f3d319733d7fc5e4a6289fca20238cf78676b35e9df4793ec7bd","compiler-rt/lib/fuzzer/FuzzerShmemPosix.cpp":"fcba01d72f0ad1377b0297ec820728671aed0784d6ad22cedf99b1b5a477f3f6","compiler-rt/lib/fuzzer/FuzzerShmemWindows.cpp":"59907558eed2669a1497cc3f8a75c7a7e671ec2401e7088a5ac96ebe811df336","compiler-rt/lib/fuzzer/FuzzerTracePC.cpp":"19401dee554424be63f1c5413e1328d6467b39e5160bf4e56d9a47243d2c5399","compiler-rt/lib/fuzzer/FuzzerTracePC.h":"8d0257113b965f6f40eab970059062a404e7c9cc8db8b22a92eff872da1aa827","compiler-rt/lib/fuzzer/FuzzerUtil.cpp":"76fd08f4e69c3b8880c898c05f530c968f35b18751f1a3b7100bc95454a61d10","compiler-rt/lib/fuzzer/FuzzerUtil.h":"264f02a4eca9dcec26413bd18811ab23051739afb33eb8ec769ab94213f9387d","compiler-rt/lib/fuzzer/FuzzerUtilDarwin.cpp":"d5d7342986369d6a879436efa3f4042738f9961afb51f8d69dea18a90d515dae","compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp":"548d9a3941409459175b6546d369cbbf4ddec64f90b1b93ee31ef30b7c6fdd3f","compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp":"98f96fa98c8f42eb0e2efd0660264cd2d63f27bfd9e96521ad3dba7c9d64386d","compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp":"edefd848b2e0aa323ac863420efd82fc158dabbabeda567227cf0d9725b8150e","compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp":"e8d62c4dac9e4129bae3ce398ef54e8426df310d8d1c6220ea6521fe046577cc","compiler-rt/lib/fuzzer/FuzzerValueBitMap.h":"3dcb95d4bd1cf3ae32fc3782485a6469149a226ff4330ad673e967f42d343b0c","compiler-rt/lib/fuzzer/README.txt":"f1d3f05793b5ea2993be318f882afba3d4035442ed8fdffee841603ae3ea944d","compiler-rt/lib/fuzzer/afl/afl_driver.cpp":"a2567cfd898e8594735889593ebf2bf8208ac8f4ac2fd827b228184f1ea5c0d6","compiler-rt/lib/fuzzer/build.sh":"5d091a02c389b67fed966521052316535393265d4a7eac830dbede409941c58d","compiler-rt/lib/fuzzer/dataflow/DataFlow.cpp":"420681c0a30876d64c93002ff184cf1df0ba95fbb5f96d2957cc81923e0e4e21","compiler-rt/lib/fuzzer/scripts/collect_data_flow.py":"05534959081f625a59454bd859a3f202d3ae06fff826f50af860a815c2a23b4a","compiler-rt/lib/fuzzer/scripts/merge_data_flow.py":"30117db7707146c3f657369fd4211214c915d5ab31af4b57a05aa57ab2d121a8","compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py":"ec21b40b51d96068e92f76e3870842c81286b042a95c469754833a3f3fd07bd6","compiler-rt/lib/fuzzer/standalone/StandaloneFuzzTargetMain.c":"374edcf0399c3070f679fe9d30c10e0b595ea207fe60f1761eaaba4d0a531f81","compiler-rt/lib/fuzzer/tests/CMakeLists.txt":"fca8f96c93c4aabd183c568b108bb2742c4f00e01318b6a3ba9639c8e692ef81","compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp":"f093bdcb2bc34b2baa0e1ede740aa9206980b99ecac9238aef3763a1df136d3e","compiler-rt/lib/hwasan/CMakeLists.txt":"1c5641b69b65db870230bb48fd8f7472bb47c34358c17e7a1ca442c52a81ef91","compiler-rt/lib/hwasan/hwasan.cc":"9c1df7615fe6938768fcac6a478539edb580cdf868e0607f3528afae58f33e0e","compiler-rt/lib/hwasan/hwasan.h":"d3852eadd1e96dc6339030a32a698144da912a17f0d94d5931a7b8bff3052679","compiler-rt/lib/hwasan/hwasan.syms.extra":"49b0fab26189c23d5f4fb170b0617edef00995aabbf55dd1e79c135ebe26b923","compiler-rt/lib/hwasan/hwasan_allocator.cc":"6ece55db99a0481aec526c05590194b77b51426e0370d553825c156e6a30d35e","compiler-rt/lib/hwasan/hwasan_allocator.h":"95be07ad19a497da57f2fccfa0babec3aa1b7e88f6b9a447f2f7b71935fa0580","compiler-rt/lib/hwasan/hwasan_blacklist.txt":"d5c30e2a69e9e3ca4ca3cff8fc1caac791b7d8d04612f3fafc841fb672b2ae8f","compiler-rt/lib/hwasan/hwasan_checks.h":"93afaf208f91dae29026df64ed9bde4f193dd6d91f261908eb0650468a1b9a52","compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cc":"9efe0cc3d176671ee4fd1a1fb3222340de678c7d7faf0eed2734287be53ed470","compiler-rt/lib/hwasan/hwasan_dynamic_shadow.h":"1f8b586cdae26769278fc198188a0f73a10c4abf1cd4bbc929f32b829ace2716","compiler-rt/lib/hwasan/hwasan_flags.h":"a537d00d7969c2026f249b335699f8d495ed6c9b71123475cde0208b8c0fc836","compiler-rt/lib/hwasan/hwasan_flags.inc":"229cbe1311f5cb78ab342f29ec29402dd32e98dd94e07a8e9291240e9f4801a7","compiler-rt/lib/hwasan/hwasan_interceptors.cc":"7d8c2032468657f0be48d39fe1bb8d7cdfc76c9f13c6064038d976d7a80dcd61","compiler-rt/lib/hwasan/hwasan_interface_internal.h":"e09ef432be8102595a62084eee431f87eb115e367993dbc71954cc72ef9ebc4b","compiler-rt/lib/hwasan/hwasan_linux.cc":"a079c3369e68ea3681fe7d52d7fe0f60876cd623360c96a18b1fd83eabbff68d","compiler-rt/lib/hwasan/hwasan_mapping.h":"a33b8bb9f7e710ffbcdff69d7eb85bacbf83f329e126085ad949cde2fe1d2e35","compiler-rt/lib/hwasan/hwasan_memintrinsics.cc":"4a0bba51469a06dee4460b2514a2a148d2f501c9f836dde4432526c756308c09","compiler-rt/lib/hwasan/hwasan_new_delete.cc":"5a01356802b1031f9262d82f037c5f0a3c81fd33d9bfde2c1c1e49228669b2be","compiler-rt/lib/hwasan/hwasan_poisoning.cc":"e2b9b8579ad112c29b43a29f2e17fbefee2ac074b6955359581066ad7d61a749","compiler-rt/lib/hwasan/hwasan_poisoning.h":"c78c7638e7aa8995ad5da464b3dd2b2e38ad27a13a8734cb357c48b08dbdb8af","compiler-rt/lib/hwasan/hwasan_report.cc":"4fa545803fab557a67d6057d830a13819bbf0b2c1b6d53bba8fc1b0a2c8078e4","compiler-rt/lib/hwasan/hwasan_report.h":"ef4dd34486d0bef3e5c440c5bf06271d11f8e73a9092f118a9fc3d8ff682dafb","compiler-rt/lib/hwasan/hwasan_thread.cc":"570647b3ace17d2f1f13e3315615661dc4c00bdec8ca7fa4ab9356a4f052bc0e","compiler-rt/lib/hwasan/hwasan_thread.h":"df2451dfcf1ee7788bb5696afda69e65846610c32ca826cb403971a21398cae0","compiler-rt/lib/hwasan/hwasan_thread_list.cc":"074f545aff71b482243a3fa5a6d1076c747b53bda0004b4eed681e1b0b070acb","compiler-rt/lib/hwasan/hwasan_thread_list.h":"a696be6325e566b9a82417b7d772e416f8f8bf231d955ceb8277808a57e5ba5d","compiler-rt/lib/interception/CMakeLists.txt":"2727204d25e57993dcf30b39cc9d2a6c6daddbb6d087d07673179bb459c58a39","compiler-rt/lib/interception/interception.h":"d49ced0ff618eeeda93e8254a7c6c40fcddcef8c1b5d7e27c3ea265e6c82617b","compiler-rt/lib/interception/interception_linux.cc":"1e029f293671b23373fb33d7d1dd09caaa55500710f86221e7a4fb69db20156b","compiler-rt/lib/interception/interception_linux.h":"dcd497a830a7e60b91d24f494237929c7138500b140ab87099dacc6b36a3f404","compiler-rt/lib/interception/interception_mac.cc":"03492f3f41a3807a7e6cf0b69911540bb84278cbf0215d32c6b56c5fea37f782","compiler-rt/lib/interception/interception_mac.h":"78177098b48d81375e28c2090fa76a5ef7f3c60a8c785ec5916e7b488a031ad1","compiler-rt/lib/interception/interception_type_test.cc":"59cf81eb56a450b000072adbc4b001ffddc4c5486fcec813c226ea3946cfc751","compiler-rt/lib/interception/interception_win.cc":"c47e71b62ca47e945d015eb4646a8dc701a3e39b5a920832dadbc27131037ec8","compiler-rt/lib/interception/interception_win.h":"576df881312a850aee55060ce762152843e300058e984f035c7f74d4ed4233ca","compiler-rt/lib/interception/tests/CMakeLists.txt":"5ccf8cba0717299f693b7bb526411598456e51f61ff2a91a93534b3aaefdc260","compiler-rt/lib/interception/tests/interception_linux_test.cc":"c0571fa87373a92fbedf74941aa9666cfc6939c4ce3193a53a4b1fc3be7b6029","compiler-rt/lib/interception/tests/interception_test_main.cc":"f253db37e1c7dc7d619ed473d81212e77a804225371c43fd67b61c5a15ad1edc","compiler-rt/lib/interception/tests/interception_win_test.cc":"b664f5df0a122eb3adeb73a462303dfa9e34be9b5e6c24a2b06009d5c5c70c24","compiler-rt/lib/lsan/CMakeLists.txt":"ed5267287e72d60b8271fd767e05970804d04dbe2fe2a068360b0d32807635bb","compiler-rt/lib/lsan/lsan.cc":"4ef127d9df2dc78df6e3a9e8b85f1845360629513c8be71f1facdb5c284b8651","compiler-rt/lib/lsan/lsan.h":"4d9d2437ae15d52643ec988e24b3ba18007de8f5ff1401b20268ad79a9851ba7","compiler-rt/lib/lsan/lsan_allocator.cc":"9d3897db85c8802ee677a497cc0151e838e5393a2ffbbd60e335347a35495fec","compiler-rt/lib/lsan/lsan_allocator.h":"5a47500685baf39a8204801bcd352647ab63f7bf579b048e740de04c99c762c3","compiler-rt/lib/lsan/lsan_common.cc":"e3ca9e0ac5c8620187129ac590363c543baec80e316fca9b09f8f78ac0cb2668","compiler-rt/lib/lsan/lsan_common.h":"c44c76f9dc976e89fedfb93bd5cd1c0c2c41aecd56382473ce99ccf2987dbd15","compiler-rt/lib/lsan/lsan_common_linux.cc":"a663ef462e04f73b68078e9a38c7f50ad4a93fc0aad270556a4a86b7f63fe092","compiler-rt/lib/lsan/lsan_common_mac.cc":"bc9bb18375b95d36990856ba03b133dc81efd5b1e7e8b91a46e1d3043f46f386","compiler-rt/lib/lsan/lsan_flags.inc":"23ced4051c51338af27986c1f5a92e666f2b87393e94831c39febf556d831ddd","compiler-rt/lib/lsan/lsan_interceptors.cc":"c271b67865dbf390a592adf7f82f9c19ec024ac6205e11593a05f3f376a4ac05","compiler-rt/lib/lsan/lsan_linux.cc":"5c59ea506d2b615f1891a78e4895c771ac0cd75de91ea46261e1accd906933df","compiler-rt/lib/lsan/lsan_mac.cc":"52c4b02f5747349747bc169dd345eb0f66c17c463391b4ac7bbe77c29d6929a9","compiler-rt/lib/lsan/lsan_malloc_mac.cc":"c6d40d4bb1a5afb58073776bfd4b3a4766c7d4e71204b73a2307777a0a576c9d","compiler-rt/lib/lsan/lsan_preinit.cc":"33797b47256ad054466f157d63b7910e55ef9a76d2e67df42fb4d30d5373e4cd","compiler-rt/lib/lsan/lsan_thread.cc":"4a733ea7fa58c5d55e93406089d01aa6cef2048255d2d936e93c5ef6c1f6eb97","compiler-rt/lib/lsan/lsan_thread.h":"324e145f85f8edf72952f3fc1e41bdcc72ef7277a0b78ed880d07d6d43fa2033","compiler-rt/lib/lsan/weak_symbols.txt":"c54630bbe43bd0151656b597682544a1c645c9367446f2ab678b3dcc76093ea7","compiler-rt/lib/msan/CMakeLists.txt":"735f66b4310bc40b83e2f742c355930e6ac3f3aae55c666c2194ef82e5ed33a8","compiler-rt/lib/msan/msan.cc":"dbe45961e3359ee9e8362fd3e82ce195cc51df014d60c679189553a724a29456","compiler-rt/lib/msan/msan.h":"5ae1e7166d33750ff12848166c42fa4d9918cb3095a6cf67b000c883b5eb3929","compiler-rt/lib/msan/msan.syms.extra":"9cd132a1b4f81a6df0ce29b8256b92940bc8d7f6cc764bce66401578d68f0a26","compiler-rt/lib/msan/msan_allocator.cc":"aa68824dd295208658b7e746f6a6631972f5bc16ba6af1d82180e326dfb3574d","compiler-rt/lib/msan/msan_allocator.h":"4d6a557159e44ffd1b807014128a488f5d49313392beeb01a54e0f2d6c4598cd","compiler-rt/lib/msan/msan_blacklist.txt":"cd53ed9b1d6672ba3d83774f3e0bfbcf837d58a666e614cf35ba86fd0678c34b","compiler-rt/lib/msan/msan_chained_origin_depot.cc":"5490f6fd944507e6aa7f9f9dc6d25ef4176c50835f38a6432e5854d24c463673","compiler-rt/lib/msan/msan_chained_origin_depot.h":"b46ebdb3d7872f4dfa191573dd201160436888e8d6a8d64fc32b00a228e2d95b","compiler-rt/lib/msan/msan_flags.h":"438964ab39e2826bfc14c3607cae85ebabd280e5cee6f9a900d9ed1399ee6463","compiler-rt/lib/msan/msan_flags.inc":"a43707449bb0131b34458892a9a73e942c799098edc552f8345907c3ed7b13b5","compiler-rt/lib/msan/msan_interceptors.cc":"4a88cbee6997af744267dbaa64d39756dadaf407f6c82375de1e880403eb46d4","compiler-rt/lib/msan/msan_interface_internal.h":"20c5be22826e486c6185c717a72980fdf97e23d59bc6cefb557de72aec768313","compiler-rt/lib/msan/msan_linux.cc":"ca7e2d346e64b1f9b62d18ffb4f0b6025df8e44f1b73f02b1128740a82e7576e","compiler-rt/lib/msan/msan_new_delete.cc":"dbeef24bad5dd1a4865f057f8e67ab645b7960fc95d15918b2f74b94d044de34","compiler-rt/lib/msan/msan_origin.h":"4fa5484da4e47e7e2aefe922c91e9967a0688b5f84460d2e60330d1b68d2768e","compiler-rt/lib/msan/msan_poisoning.cc":"c61d5715982baf1847505565de1f04886e13a47da4407eb8c606906bb53a4c84","compiler-rt/lib/msan/msan_poisoning.h":"147ca031f7a1285ef1617f85c97347f7587bc6904ca566d23d334b789d0d1217","compiler-rt/lib/msan/msan_report.cc":"a52de944327c3fa6742b4aff3e32003f2a2d38fb7bb8216d878f6d3acb909c7d","compiler-rt/lib/msan/msan_report.h":"1df974dd5c9978cda296b7ed5b0f45b1aec17348cb8e0f3c1eb9c5b1994cde49","compiler-rt/lib/msan/msan_thread.cc":"8ab4280692d773c08262534e055eeeb06a49620ec69152978717c064dd86cde6","compiler-rt/lib/msan/msan_thread.h":"7d472df120c1230587bf13e3f337c0c6ebaf27419638802e6c590051df382bb4","compiler-rt/lib/msan/tests/CMakeLists.txt":"a36c9e3dbb8efeeaa0c196083f885b6efcaec2e99e2f2846b8fc0bffc919fdf8","compiler-rt/lib/msan/tests/msan_loadable.cc":"8a335fe493bbc4a051588c9ffeb8d5f7d420b38225cf3e64a773174f5692a5c9","compiler-rt/lib/msan/tests/msan_test.cc":"5fe3c1f5c04de4fc6e690692548cc36a88cf266419d462f899c835ced46df773","compiler-rt/lib/msan/tests/msan_test_config.h":"09f1e9909421e02622d554fe5d965efce23bb6f64bb9a1a56ffa2dacb19f2ce7","compiler-rt/lib/msan/tests/msan_test_main.cc":"dbf816fdf8476da0424b7a76ee02a8cc5896a09a9fe6e48771ff3819ac3b106b","compiler-rt/lib/profile/CMakeLists.txt":"398bd5c855fd61e2c305c43a720d5b482dcd59e690d6fefd8ca1e0369f19d3a5","compiler-rt/lib/profile/GCDAProfiling.c":"17f292640c4d8e584761df0f55ef389c44efa677060d929476da78310687ed44","compiler-rt/lib/profile/InstrProfData.inc":"8a383b39072b1265734efce6c43b704a3abc7e0bb79acaa340d65546d96019a6","compiler-rt/lib/profile/InstrProfiling.c":"6585bd9167ebb1038df1cdaf28714e98f9035411367880fd574ceae5d22a5c89","compiler-rt/lib/profile/InstrProfiling.h":"71cde3396aa7df2816e49992047c24a9fa386c54b72820b960dfa1040a2901da","compiler-rt/lib/profile/InstrProfilingBuffer.c":"73c4994d455ec831a465a3ea702d3fb140d36f06f89ee8c7b459f8a2de161dc4","compiler-rt/lib/profile/InstrProfilingFile.c":"8b40ee9d86609babdc8a70bc9acc95386d5cc956459d4917d7893bdb38b2418a","compiler-rt/lib/profile/InstrProfilingInternal.h":"e14a2f90d69d8bf70528d89c052e4f00786c4f3351c7780fd6ec482ae376bdc3","compiler-rt/lib/profile/InstrProfilingMerge.c":"170c94c46cdfbb003756f5aa7a62adf70817a99d4e11be52ea3bdd92bf1265f3","compiler-rt/lib/profile/InstrProfilingMergeFile.c":"894c44eeda8bb19b35dc8619c69248a63af7357c82d0bc069deaf3c736be57a4","compiler-rt/lib/profile/InstrProfilingNameVar.c":"9e06287a748dc13b7e90ecd9dbb5d65f9f7a256ce6d690237b810bede735a8e2","compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c":"3be25342fe514ababbc706a5fdcd10558ff51544f71f7c1f7fcef90727ab85f0","compiler-rt/lib/profile/InstrProfilingPlatformFuchsia.c":"e839ec3b0859cf3ae435dd72f62c92102962cb92ca4f6045d1b649cb91f9dd68","compiler-rt/lib/profile/InstrProfilingPlatformLinux.c":"38148b73944f256369ea3895ade59437aee73903ffc84451f5719d0e6cc35069","compiler-rt/lib/profile/InstrProfilingPlatformOther.c":"d3007308ad250fc05185ef93c0854173deeae597329f090bc70fdabbea53b4c4","compiler-rt/lib/profile/InstrProfilingPort.h":"0b7db9f5b6cc08d44c9456ed64f1d194f2ac4a3219a05098c5165281664f461a","compiler-rt/lib/profile/InstrProfilingRuntime.cc":"882b86ba8dbb09762ce08dd2f76f173778806070c95a5ce4b5656f0fab8e8b93","compiler-rt/lib/profile/InstrProfilingUtil.c":"95839e993de66b87166986e479dcf0d85921a80d51843111b95ade963744b6df","compiler-rt/lib/profile/InstrProfilingUtil.h":"dc040ca0aad5a3b0cc0ce428aa1361a4b598968925834d00b140f21598167078","compiler-rt/lib/profile/InstrProfilingValue.c":"b560f367ed90036de0a1481a02c7bbb28f2ac378ca6d37211ced5dfed749f2c2","compiler-rt/lib/profile/InstrProfilingWriter.c":"c796a66a65f6fef1d94b47bdd989157c4e11b4d20f68000fad1ec0388d20d20a","compiler-rt/lib/profile/WindowsMMap.c":"8419b59ce719ef02dddcc2ffcb85790b5a049d98a20b4ec71b296333c0b3cdd8","compiler-rt/lib/profile/WindowsMMap.h":"dd78e8c3e7dadccfc80e3ca8ce16d1923281cafef5dbee9a9f977897df37ea74","compiler-rt/lib/safestack/CMakeLists.txt":"ff67a24df6b2a8690ffe1d13b1ed172155759910f5e81ccf13c516fe08e0947e","compiler-rt/lib/safestack/safestack.cc":"a31f26e127abf31804020e52099336ce10dafdadd621242179280a3d71725227","compiler-rt/lib/sanitizer_common/CMakeLists.txt":"3428d805a2fe0c56f93bfc1be54c9903129893ca2f1173c641d48bab06f401bd","compiler-rt/lib/sanitizer_common/sancov_begin.S":"ce88eabd44ba7c89fded509cf6c987a5c2c90f71429090bfd6c25097c14f184f","compiler-rt/lib/sanitizer_common/sancov_end.S":"c334b70571f691c7a5335aa41548af088fc8d9b189ecb998101a3a337092984d","compiler-rt/lib/sanitizer_common/sancov_flags.cc":"71e148332446f5684c8ae9e6b74ad3b0ed2fed06e4cdd8b2382efa61f4b94298","compiler-rt/lib/sanitizer_common/sancov_flags.h":"392dc342e8e7993a0cb778b06299a20f7ef3b442b9c4496099166bd188bcd6a6","compiler-rt/lib/sanitizer_common/sancov_flags.inc":"e034efeef2c601702213db25e1402f7768f7f30283fa1605fcb2981b25d86a65","compiler-rt/lib/sanitizer_common/sanitizer_addrhashmap.h":"8540c95ef4edf9d24bc080821e5f3fce1120b57a35ab42b037ff80c6a191cdae","compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc":"5430f168b345f5bc9b9b5e1a5369ce773bd469163dafb08fcbb20e5475b2a47d","compiler-rt/lib/sanitizer_common/sanitizer_allocator.h":"9fc378cf5269562403ca8eb6901e952bccf80ad235c412cd893fe3ed5a699904","compiler-rt/lib/sanitizer_common/sanitizer_allocator_bytemap.h":"100e591d316e1a79f0af793df306b6c9b7724fe87357e90898d8cfaf115c75d1","compiler-rt/lib/sanitizer_common/sanitizer_allocator_checks.cc":"ceff90bb439637cd7fefb038fde40a39cc4410c57726f2063db32d335687b1e4","compiler-rt/lib/sanitizer_common/sanitizer_allocator_checks.h":"3dc7f038be1eafde72a2902c3d0a0b9165e2782dfba43dafbe30626ee8353211","compiler-rt/lib/sanitizer_common/sanitizer_allocator_combined.h":"aaf0d03ca08ccf33275f25f341a602f49f208e3bccc34b2cfe68532c8d8d4520","compiler-rt/lib/sanitizer_common/sanitizer_allocator_interface.h":"a12b84d262d1df8f4a50fb0dd78fb32949811d864bc42a963fb22d624b9ec2f0","compiler-rt/lib/sanitizer_common/sanitizer_allocator_internal.h":"c3a368ab734a6af633c6d3edc8bb57eb4862ea55e3b4fe97e536c9b613319335","compiler-rt/lib/sanitizer_common/sanitizer_allocator_local_cache.h":"94e1dd83f8756a4cb0f9684495569aa3d1d58bf6895e714bdd70d1c869072159","compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary32.h":"c431bf8c17ce07e6a83c97993c673a6aa7d4b30dd44b21cb6d3a73275717f529","compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h":"910c7d93cc8d5b772d33f5deb3b518135d1df031a993d5246761a00fa08a24d0","compiler-rt/lib/sanitizer_common/sanitizer_allocator_report.cc":"5174457c2097bd08c60755e92a9d7e6517070b99f5e7f6d6935e42fd9a71b1d4","compiler-rt/lib/sanitizer_common/sanitizer_allocator_report.h":"fc030000492ad78c4e4960185d2d9ded2ffcfd402bc11489bb736fb51caffe3f","compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h":"5079f2ed3b14da86d467f89760f03108cafca865a00818e366f10083206c65c1","compiler-rt/lib/sanitizer_common/sanitizer_allocator_size_class_map.h":"3d1fd08d289fb75a6d065fdbac9a2640f4d77711084960d3a85fbc169933aa74","compiler-rt/lib/sanitizer_common/sanitizer_allocator_stats.h":"b1750e95b01a114b4abf3942c9807a3cc946c39b0beb546ebd70a121eed3670e","compiler-rt/lib/sanitizer_common/sanitizer_asm.h":"edf9ba5450c11460832b709987493ac4cb1b39a0d44bf892039324ff8778d214","compiler-rt/lib/sanitizer_common/sanitizer_atomic.h":"269ed881f6e2fcda6f07012b301135f60efcface424d967a76d94bc55b449a3d","compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang.h":"76eff3bc03d510d2e3f7b8fd7f8b26e83bd98bfb83be58f17aa3ca257735ebd0","compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_mips.h":"7acb5c338c4f60a4796e600a3acb1421e87ea8bbf640ddc2755583e563e41603","compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_other.h":"8e46633eecdbe08d04712abacc0ba1d15315f71222be4824a9cf9e0aaa4177f5","compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_x86.h":"f52971c2d597ace6910601a2bfcc7899d29d01e144da0bd074b399680879c556","compiler-rt/lib/sanitizer_common/sanitizer_atomic_msvc.h":"c85ea2730c03983dcfe5af60b5d1171f8f964d9d913f5332dcee7c3961283de4","compiler-rt/lib/sanitizer_common/sanitizer_bitvector.h":"210ab60b00a7c86646407715398740c88ac111ab476c41c4f425f5e443530bcd","compiler-rt/lib/sanitizer_common/sanitizer_bvgraph.h":"6804302643d0b15ad7e83865032ed5485a2d9829787de513b833d215f1b776b8","compiler-rt/lib/sanitizer_common/sanitizer_common.cc":"65876e319eec41368bf33a7ce6c1934870e70797eaa6d6041b8339840dca2a0f","compiler-rt/lib/sanitizer_common/sanitizer_common.h":"270d9bbf671228181b52306586e47a5f76cdf8e7b4a4f8ca7f4d4e25fd1482f5","compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc":"498574a7cd0d572d2605e010b97fc9d0c54ee7131b4ae59c5a35d8670fc38ab1","compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_format.inc":"72dc9021c2e4cc69e54b591634b6e437ac0ae09a41575d7951c0da9661b7271c","compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc":"f884ec5ce074cd60439636d4aa1863b4272c88f684ba739300bca92b1ce30066","compiler-rt/lib/sanitizer_common/sanitizer_common_interface.inc":"17f2becfa954f1a4871d9376055cceb9f6abaf16e257e7507892631984f0c103","compiler-rt/lib/sanitizer_common/sanitizer_common_interface_posix.inc":"800b28dda446d3e27a1053bcaed4488bf86c6f72f8e550b966fe204a183abf39","compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cc":"cc463c743eaf41342dcbf4761536dd8e6ae98d9577b830fedd5a02791216755e","compiler-rt/lib/sanitizer_common/sanitizer_common_nolibc.cc":"4a462f53a6da5e7aa5835b12f189f2f890886e1477eaf3eac21adb65c0e00aa6","compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc":"5d426600a3b25a67d6a4cf93332c09e8f42e111b5306560edc500500b73d77b8","compiler-rt/lib/sanitizer_common/sanitizer_coverage_fuchsia.cc":"5223f201011455278c61d14d3bd07352b8b68186da9c05d37275d2bf76a876f7","compiler-rt/lib/sanitizer_common/sanitizer_coverage_interface.inc":"38a6e868d9e2f71d8f936b6c7c81f5eb1491e0821de7f21ecfc9af8af14ac187","compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc":"0080383782aa64fa090487d5097028c34cb4bc56bd4ee835a1b903f8af094578","compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_dll_thunk.cc":"d7a78650277c6bb9ecb70a205577819eb34d5ef6276fb48cf1882964f8d1988c","compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_dynamic_runtime_thunk.cc":"1f8dd842b033e07bdb7a39c2d771edda88fbc97f62a349f193c67f74c530d592","compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_sections.cc":"7a49575ad2670cd4b90b72201d21ecc334aa3d3eda96219760cb3a3526d7b8ae","compiler-rt/lib/sanitizer_common/sanitizer_coverage_win_weak_interception.cc":"88fa4f64cd6fc72c65428dcd6866be860699de4a97699faa28dbe75edc39f964","compiler-rt/lib/sanitizer_common/sanitizer_dbghelp.h":"2dabe339f583408a479f081636b38fefd113391650a94917eb1eb43ef0895e93","compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector.h":"9c4916945a31e13b7084354eebcc1c4d250090b770dd48bb33ed903ce66575d7","compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector1.cc":"4a5c0146311dc6a76ebb6145ba6141cbda5c835639f5d193b2d9569ede5e698e","compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector2.cc":"5fc4ce4445167c09471c33088061db69cd6ba3eb0bf9e76ebc6bcac4a5c75d99","compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector_interface.h":"e6a0ee35cb606d3b7c02ce22258047fee8005776c8753ca02fa5ffb9480dbb34","compiler-rt/lib/sanitizer_common/sanitizer_errno.cc":"951bfef15b1a6742c5d5ab0822297b60706f892e47bf57f25075360d6a0fb7d3","compiler-rt/lib/sanitizer_common/sanitizer_errno.h":"473bbdfb3fff1855deb4efa7deedf300b9aabe8f0ac5718d9debce497c372961","compiler-rt/lib/sanitizer_common/sanitizer_errno_codes.h":"5ab5b91e225426ba58c0ed0f546267c21a5dba66f7e82a3e84f20a82785ad338","compiler-rt/lib/sanitizer_common/sanitizer_file.cc":"3daef2b7caa4fd347e806a6312a3d80ccc570b7c62b92d6555a82de468e8379a","compiler-rt/lib/sanitizer_common/sanitizer_file.h":"e0b9f5faceb0a2f3cf2df36e6e5bba38d41041fd927c2cdcca2597ae16588cab","compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cc":"4a9f56957a38002715d0be80e2f586869b1ec58de76f32e3cf9fc7bd1b25046a","compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.h":"87b82221880015b107bfabf787cdd752ff6e79b3660d59ffe53d139cd7c3602e","compiler-rt/lib/sanitizer_common/sanitizer_flags.cc":"63191307698e8f5362d505500825b57ddde030b55cbd762687157a4098b67a02","compiler-rt/lib/sanitizer_common/sanitizer_flags.h":"83f8cb4ce5b5e34bc4b3905d6bdb21692e840f01f61b1511630031a77ebc8f73","compiler-rt/lib/sanitizer_common/sanitizer_flags.inc":"8e57722eebfc17715dc0caae556b14f8697aa831e7c3fd072d7e0cfc1d4fcd42","compiler-rt/lib/sanitizer_common/sanitizer_freebsd.h":"9b35a78a268d5223793484acf06b5a1ed4ac7e41a3c6169c951abe42b78e9ef9","compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc":"4a586f3cefc71e5f21e11e11acaa60a049e3afb2d7f933d2efde31410410298d","compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.h":"af551f3c4efb4b85ab3ef3bc25272ef3af0a962b24e7fb7df5055f525c0399a2","compiler-rt/lib/sanitizer_common/sanitizer_getauxval.h":"020c678159deebd98bb5edf7ab67a4cdfd5a29465c2b792f9467e75dbdaf5b85","compiler-rt/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc":"7336c75a0edaa584d17480ac29e408531bcce5ecd263d8b2303cc49e37351f27","compiler-rt/lib/sanitizer_common/sanitizer_interface_internal.h":"01d6f159857e903bc6ab0c69fa2b9a3e9cbd8f96bbe6c83d6df629aa7104a384","compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h":"c4a6f2a44b744cabbe84a715b7f5e03153b456f1d0d8998222f5183e9de0a439","compiler-rt/lib/sanitizer_common/sanitizer_lfstack.h":"9f9af8fdb1df3062810e03659bfe903db9bea3912d4e8ea9e6528be0aa19d9f1","compiler-rt/lib/sanitizer_common/sanitizer_libc.cc":"3952899b0171d1f8b5301a64600ecd66cadd4eb9555b8dbe0e4c0fbf75b5d1ee","compiler-rt/lib/sanitizer_common/sanitizer_libc.h":"3174d0ac6d02e92f6c06ddb0e6c360869eebaaabcc08d496f63bde0e0b78bf22","compiler-rt/lib/sanitizer_common/sanitizer_libignore.cc":"ed2ee5e31715254596274e90959e12e00f5164776094e328b1e2389725a061b0","compiler-rt/lib/sanitizer_common/sanitizer_libignore.h":"f5974ddf0832e37ed5f19322dabaf650047e2a3a73d66e744215ff8f151d9fbf","compiler-rt/lib/sanitizer_common/sanitizer_linux.cc":"0d3bf9454aa3f807bed73d62738684e90b095e5789c9f3f6735475913acf14e9","compiler-rt/lib/sanitizer_common/sanitizer_linux.h":"2d4dc60e2131f30466d68335ac1fb65a219e251f6cd2e74ea5a8193eeb701cd2","compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc":"0f467ebc8f01bbe289add08825463930f500098912f9b749d960c737d0bcfff1","compiler-rt/lib/sanitizer_common/sanitizer_linux_mips64.S":"cac045f28f1e20b9e10c381ecc706a332362bc59d2e9a4ad8d06f0e22cd07b1f","compiler-rt/lib/sanitizer_common/sanitizer_linux_s390.cc":"cab8d1a2d585eb5df0b5266979c5e35c4b9a9580e584a131e8436e0da7b38a77","compiler-rt/lib/sanitizer_common/sanitizer_linux_x86_64.S":"453d0998613650d93ec7beda7248adfa5a2bed6a08996aa6821bd31ba363c575","compiler-rt/lib/sanitizer_common/sanitizer_list.h":"792378c453e9e9ec34595222649cee4957228cfad84e7062ee5c5416f1a421dd","compiler-rt/lib/sanitizer_common/sanitizer_local_address_space_view.h":"cb6ad2771897cac13d49d13d2645af1e9cd7c7c254bd5006c6032880df4fb3b7","compiler-rt/lib/sanitizer_common/sanitizer_mac.cc":"b81c2fb489c82e1272511f8e4e4bf494640a06623e5e4b0fd7c23a04cf747c6a","compiler-rt/lib/sanitizer_common/sanitizer_mac.h":"8b87304ebc1b774f2089d41beccfbf0bf86587bbcc6289a7517c8ea478670c5e","compiler-rt/lib/sanitizer_common/sanitizer_mac_libcdep.cc":"0f32f4055bcb3e0735c4725d0d437618c20c2636bbbce1e1f027e81d72508d2a","compiler-rt/lib/sanitizer_common/sanitizer_malloc_mac.inc":"206a743e1afba1a6ae77d10791d8c93fd11a22e342b39eaf81f4064171bd6151","compiler-rt/lib/sanitizer_common/sanitizer_mutex.h":"faa23ec41c040fa95f51a9a4a144f2a86821fa5bb8bae731039191ffdefe745a","compiler-rt/lib/sanitizer_common/sanitizer_netbsd.cc":"b328dee0108bf7f1c7a6a39161507b092d2bf3bf97c38188370774efa6f3ed7c","compiler-rt/lib/sanitizer_common/sanitizer_openbsd.cc":"0fcdb81afd49f4989db47f7536e27a66e1dc264af935de092e8b349e3402c503","compiler-rt/lib/sanitizer_common/sanitizer_persistent_allocator.cc":"3be7759c67d9d2683de81789cae183eb6c4e64abbf365a782ca3c92c57adc18e","compiler-rt/lib/sanitizer_common/sanitizer_persistent_allocator.h":"35220d3e52e6acbe1d27df50680a7ac3fe5667852190bd533846230429427207","compiler-rt/lib/sanitizer_common/sanitizer_placement_new.h":"72d473e44149de8a3490f42a32c247f08ce2a47bfea2d36b91ee0c8d7fc32eec","compiler-rt/lib/sanitizer_common/sanitizer_platform.h":"d67815daebde8ce56cf5f9494ae85cf4f28466e591c4c94dab91d41a3c99709c","compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h":"04608437c5f946b723a2dba69012e49caf567ce57f89a41c778fb8308cca432e","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.cc":"9f255b4dc29eaf67ba5567cffa980b13d65467f51acf2520812947602c526892","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h":"49a945f8188a23fbb91010ef8231fff1a7ab9e1c170e9e50a943731f10a5761b","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc":"1b078939d800dfc908d931229b1c717b6e40a444991f3b6d1773afd382481ce7","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc":"9a2e3bc9596e6cdecc9cca01632eefc4019e3c89534cf21cdbe18c50b919c59a","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h":"d6f9f7e5f24205fe974d8f726800e70b3904e731687065152c09e40fcbbcfcb1","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_openbsd.cc":"fe537efddf49f4c9a51cf6c434cdb28c4ed2e293b4a8b5429c70ab9fa008956b","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_openbsd.h":"1c0a14d7a2b9f091327a59d602e147a1186af6868555ea76537e0e3fe39392fc","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc":"83ebc5047b581f3f4ffc598c361c1ec57c8da2daee847986de6a53e1bfc856a5","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h":"17cf1ccddf8550be95fa4ca5322cda65e1ef81d8e39059f879dbc4ecb858178c","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cc":"236d8c0e40f3c9f73036fa84bcb1328b1239f60039572c88cdf533e2deee705e","compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.h":"76505f57fa3772fbefd210a505d34e3050ec7c46e9740326f4c2cf2af08b2042","compiler-rt/lib/sanitizer_common/sanitizer_posix.cc":"e56ce738462aed6bb02921958cc1875a0e63ece4bd1e96d30c8b2f823370ee5c","compiler-rt/lib/sanitizer_common/sanitizer_posix.h":"908877fb9c69b95a1c7e798558bfaaa77a204d2ef507a98e05c9cb2e881440aa","compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc":"09b0d2d1da24b32346aa26bb65761463493823ac945b928322da8620bdc0bcec","compiler-rt/lib/sanitizer_common/sanitizer_printf.cc":"3c31d2a50b2082b70bdf3537d8debf66e589e87198f4bc858a223d18d64b15c9","compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h":"cd1458561483bb1cd8406c07515fa59e621a80e8ac3688f6081916472d786cf8","compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cc":"f63eba57d11cd7377d16bf9c8842f65c4c665f4e5267b328a70ac1186f1d5cc5","compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc":"20605377f6d794f8aaa6a47d8d1d41109b55c7264c63fe85af2619c0fc48ac22","compiler-rt/lib/sanitizer_common/sanitizer_procmaps_linux.cc":"47f4d3dd46a92ad3340fcbc26d6f84138e6fe9e0d68e6ee0d7d44fdfa284dfff","compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cc":"e8a6107be622e0e2ea1446e8f6eda814de1c4fda35d60966de3ec55c59982380","compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cc":"71d0a2a65cbdc29051e423ba837b9b3f10ebc5209ea7857f91f2aa8391e5637f","compiler-rt/lib/sanitizer_common/sanitizer_quarantine.h":"781d7b5b05cea542a2a924fbe2ccd0240e276556235e1f6bfca43d2068debc9d","compiler-rt/lib/sanitizer_common/sanitizer_report_decorator.h":"12d83a20e43498b78a9c6689bd288c45698c60e732ffab7477c33520edefe568","compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h":"aea5bb173207e822af02bd6ae555a77eaf040644d905c0a24780d11bc4426888","compiler-rt/lib/sanitizer_common/sanitizer_rtems.cc":"9b169b8550982a099ce45dfb0f4b9bde7bbad1b81538cc108c1dc8cacb09cbb5","compiler-rt/lib/sanitizer_common/sanitizer_rtems.h":"95a5bb2e2ce83b815e36a8e7b37faa6fbe9caf1e6a310cbb5f526368442d7e14","compiler-rt/lib/sanitizer_common/sanitizer_signal_interceptors.inc":"4e60c39b3b64b66c36bbd704f4b9801dfeb995f7c1cff7089eb79995227b7cca","compiler-rt/lib/sanitizer_common/sanitizer_solaris.cc":"85af9cc6615df95edf1405ef4a555bff953140ba68e2297a99e7257da98eb613","compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cc":"5e9359102ec23fc0a22b045320c7a4919b2f42e1b8116d55720d6dffb3236994","compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.h":"7781d39675f7c7509e5cc6edd71126a9b1ccc95c41f7373808d3b93c384d50d7","compiler-rt/lib/sanitizer_common/sanitizer_stackdepotbase.h":"25f1738758f944028f6f08e9dca00163348a2d84413719f11d114be82813cd76","compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc":"39b5c8b0016be40d57025b351d19cb39f2bdf0daaf01d68a142a3db37b17a717","compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h":"3fdf1983c7292f627cb084268433eec32f3c2d0b8f916074271bf690685cc716","compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc":"11ec57b207e5ef530b356f5af876b7fdb2317398ab3d09378c1bc43dbb4cbbd2","compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cc":"9c7c6d321b8ae2d123d67776772e83842931faa779719d0476217b1ba7a0a210","compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.h":"c85b98d87767cdc0d112d3ca1cac3e8afce54327276cd858549c25f460df0335","compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_sparc.cc":"ac82c3caf9302de869ff8a11295ef81930d854fa474b496138863f16189d6ec5","compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld.h":"9edc3b2f0904cd948f3fd347e88e808ec8699f5a9923eef5b0b959e6fc2ce67e","compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc":"5c5f3df80462ab64771dfa81810ba39d5bb9eae8f3725f777290718448c1affa","compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc":"761f6260d9fcdc74829d579f894f9845c2ef42533eb7c3665a9b69c08d1fc387","compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cc":"d659c1853678c90b981761d04609f8bad65a262d55d026e140b5ee3753a126df","compiler-rt/lib/sanitizer_common/sanitizer_suppressions.h":"bbc670d60e3f91fea80211dfbaa7d32cef9b03e9e99c8274c14de9cb038eb44c","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc":"a34dd45f916249c0add0339ec37f573468136c9df2e52ea2dbc7aae1a8f1a44e","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h":"79fe86be9cd0828da1ac6d3e92ab0bc13160453c076a15365c1867e858e3a0d6","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_fuchsia.h":"35e23c96df7885e3414c3a059cb56ab30f6bcf2cafc89a83a08b61c09f599602","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_internal.h":"bf3dfbf948617d0ae75b40231eee5a77691a0f90690f56c3c523c31fe30907d3","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc":"db82397f21127d5da1fdbc83e471c4ece40bac354d0d9c06745355bab4828842","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libbacktrace.h":"ba3c296a15e9879e23adc94a182adb27eac1764973cdf3b0059c12ec2f085fed","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc":"bab9d59ba14f77294987935063124414b688f53d4e6524658f401ad165ea935b","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.cc":"e89b0d8d95dd2cfc506d514b8daaf88d5cc134ad016b4bc44765c8614c0ef780","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.h":"636a7d31c365f5bd584b0922dd7ea88459a701c1f72328c2954cbf508acfc7cb","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cc":"1c446c0036416396727649bc56da518caba3e9acead3ada30f58642eb019fe5a","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc":"460b988b90b5ee3a073726f5bad2e16252492cf790d01461d41ed8e3cc9367c0","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cc":"6503ea71d9379e4308ce02b03d4dd1c98a527d6e0805d598d1a883e022cffec1","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_rtems.h":"78c697950693eecbd5d622d1d152021ed01945b85005f0996c43dea7b9d18449","compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc":"93d0d13f652b7ceec293d56c738035102e24cf0e81920f5674fa35902b7313de","compiler-rt/lib/sanitizer_common/sanitizer_syscall_generic.inc":"ad50bbafa452b3467cba79030faafd6c15ab16a01e0900dfc98b157ee69c60f1","compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_aarch64.inc":"ea00ae6e34b61715b397ef1d94d047f29abd531aebd48cecafdd4ffbb5c2f997","compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_arm.inc":"344b5b25f1e7c86cdf0e64b3757ece91634aec39868acfca92043a9e102b8434","compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_x86_64.inc":"de58c6657e4c6570306c55438db6c1e4d9242792112c091c9d80c0f26e6f5715","compiler-rt/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc":"b56c36da4f98276c338f4944385c87389ff89a28bab25aeb6d4d182e863c2298","compiler-rt/lib/sanitizer_common/sanitizer_termination.cc":"93d4801140f75ed170c28691152633c56f44f4b7e323a3e0d30ef94fcffa9269","compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.cc":"0ea1c58b55d7bfc778ea225e9a1e801171acdbcb2c44971f2765a7386a0b5990","compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.h":"23a61df50683666f78422fe8e87eec5047fe393cc01898b32efa5e7b1fa80863","compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cc":"8834624f5d38ce21d813dd5834945a4f5678b6ebc4693d65ed6e65020e0b19cc","compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.h":"7bee447c4d2fa3352920889e65df1dbc046eb92d1ef40dd4e8685e4a5c49a704","compiler-rt/lib/sanitizer_common/sanitizer_type_traits.cc":"446017bb0d9866d65d78d3fbc71956869739fa78e07da0399da41d8b081677bc","compiler-rt/lib/sanitizer_common/sanitizer_type_traits.h":"e442556c28f110d31802b10485dfd41ca5c9884871760c66df212a0a55e1789d","compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc":"68e4fe8fa94517a9a560b27b0b1871ce74963bd361021c47c8859bb6657c449c","compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cc":"012411ee6a804fc5274f7b2974c7ebfbcbd93bcd2ee1c087969757dd6ce50654","compiler-rt/lib/sanitizer_common/sanitizer_vector.h":"a09ffbf40308a816a3754ccdb905d48a4ff8889508bde504ea03436f27ff8e6f","compiler-rt/lib/sanitizer_common/sanitizer_win.cc":"066ef7c87856d45a2c70d74ab938b66ba5a9d372e4b9a162095ad3fc3994bbf5","compiler-rt/lib/sanitizer_common/sanitizer_win.h":"2ff2a2c6b65ebf960fe987cc5e523fd34c6a7553c37f15fc43857953e6f0ab93","compiler-rt/lib/sanitizer_common/sanitizer_win_defs.h":"476d114279ba497dc5120e5254443648be99e28e1a0537496fbecd0901c13c9f","compiler-rt/lib/sanitizer_common/sanitizer_win_dll_thunk.cc":"6d10b53545eed305ce378db480a246be98496fbf7e218fcfd91523fde95297e3","compiler-rt/lib/sanitizer_common/sanitizer_win_dll_thunk.h":"9fa8e1254bc988cf00cc8a667a3e38a5cff98bf0a64ded68ee975e4627340e9f","compiler-rt/lib/sanitizer_common/sanitizer_win_dynamic_runtime_thunk.cc":"f6c55b0087787b8562ae8491b4ab94c164ff2ceabc622609e5f480501d175453","compiler-rt/lib/sanitizer_common/sanitizer_win_weak_interception.cc":"c5a4c19f48e5df3836d1c77180edd4884da1684c2c795ae02abea8074d6e2595","compiler-rt/lib/sanitizer_common/sanitizer_win_weak_interception.h":"548061d4a3aeec833a55690c217df516e4c3f93d67773777c6f1b5085d26d358","compiler-rt/lib/sanitizer_common/scripts/check_lint.sh":"3bb03ea83aadd1de994e09fc7122939f101844847cb20287dc916cd60405f921","compiler-rt/lib/sanitizer_common/scripts/cpplint.py":"e02be7ccd2e6c8e91ec23d775cf0d51f9392a51905590db4d61abd3c90005af8","compiler-rt/lib/sanitizer_common/scripts/gen_dynamic_list.py":"cbf36b31bab5dd358455a82c48564dc287b5bdd38fd2c043f7806e4a48241144","compiler-rt/lib/sanitizer_common/scripts/litlint.py":"b00692c6b49723930488667fdb4c7b04469df1597b0ef78f9b3d45ba38ec93cf","compiler-rt/lib/sanitizer_common/scripts/litlint_test.py":"be3231b384cf8e9913de50f74c6edf687358e499541d70cdd99959618f8e91ca","compiler-rt/lib/sanitizer_common/scripts/sancov.py":"f296ac670e2bc5b5bcdcdb89714b9f3fdd2ec17213980c941ad84207c6616592","compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cc":"38b11a70cb04f1cbac59be6822d06024c467289cacbd0cdfc98ee11ee771a541","compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_wrappers.cc":"a44792223b8f11f07e4c9daa9ed7060df5c9e26a07f52e7f11137f0241269c3d","compiler-rt/lib/sanitizer_common/symbolizer/scripts/ar_to_bc.sh":"9e331e5aea305b34f4ed7d37d61c5bdfb779bb013b60c83b947dc822a7e02525","compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh":"3f43f335868d6bbea2d9f02b20bc28919c28eb902bfc19fed6f805960b74a315","compiler-rt/lib/sanitizer_common/symbolizer/scripts/global_symbols.txt":"68d4e139cbdd47751efa1e8084dbab1725797c1718d58a26c6c5f8f4eb92718e","compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt":"5649797420d80de7f29d0bad897e4c5198ae59d799c855f48b53a1a711d2209d","compiler-rt/lib/sanitizer_common/tests/malloc_stress_transfer_test.cc":"fc93c7fa46d672eb8bcd36318c9cbd6158fbc8817a6319bafad7bae4a91b1045","compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc":"f8615456566ae6461aaa3e1ac33fb79e9bb484270986c21e608c1041f8247159","compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_testlib.cc":"c762c02bb0e6b2a9df443de40fa91a29efb857d832c21d7ad84c0b9123170127","compiler-rt/lib/sanitizer_common/tests/sanitizer_atomic_test.cc":"01d75021055b1f8c0d2a1e5e41b79faf0ca7b65f09bc59bf49752898343ad298","compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cc":"6371123f8800e968285996fa6f8fe00c6a9654081119eb2115a607757c6511f5","compiler-rt/lib/sanitizer_common/tests/sanitizer_bvgraph_test.cc":"aaa09033fd46af1abf7da9deaad6dd15c647c12dc5b8754c87c693f9d7f0f6ef","compiler-rt/lib/sanitizer_common/tests/sanitizer_common_test.cc":"a06cee15433b021361b8c7ec0bdda5f9323eb52c5a608eedd8cae831122755fc","compiler-rt/lib/sanitizer_common/tests/sanitizer_deadlock_detector_test.cc":"7de4599c73a02459ff4bedd7114a7c64a394a2a5554b6564a7cd7815d7a1bc7b","compiler-rt/lib/sanitizer_common/tests/sanitizer_flags_test.cc":"5bd4c3cc90a4ba43873053d1ae78840cf1a6916ccf503c22e2f1716ab2dd7376","compiler-rt/lib/sanitizer_common/tests/sanitizer_format_interceptor_test.cc":"0dfbc7cfe2af74114d49e95e90cce5f312e52c06387f044eb8ee020d8f09416a","compiler-rt/lib/sanitizer_common/tests/sanitizer_ioctl_test.cc":"ebee96e0724b6615e42ed06d8db7d61ce8f3d8695116862c267686e57d39faca","compiler-rt/lib/sanitizer_common/tests/sanitizer_libc_test.cc":"175f49d4c4106a48fe40e3988141145eb4e653aac2377771b011d0128e20e20b","compiler-rt/lib/sanitizer_common/tests/sanitizer_linux_test.cc":"ed487746089cc66c9abe8206a297525beb9cedd42c99ee4fec89584c6e707f09","compiler-rt/lib/sanitizer_common/tests/sanitizer_list_test.cc":"0e1b90c73dbd788b26f16158c6bbf10996ccb23be9c1a2df46b7a60da8272260","compiler-rt/lib/sanitizer_common/tests/sanitizer_mutex_test.cc":"cb769c5cb6da21e8cf6e5d5930f4782231962f2378f6edb51df15b7e75a60d52","compiler-rt/lib/sanitizer_common/tests/sanitizer_nolibc_test.cc":"ba654a33ad73e35dfd31eae216d506577310b82906fe81360fac10e77ae7c542","compiler-rt/lib/sanitizer_common/tests/sanitizer_nolibc_test_main.cc":"b2506073c460faecae7b1aa6c422195c37b33ba027e9cc10512739dfba933d59","compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cc":"e96dcba21ca2f5656daa888cb972863a89737f896fa7a5863253a61957314868","compiler-rt/lib/sanitizer_common/tests/sanitizer_printf_test.cc":"fc5fa9e805ed0a7664317681c6fd6e36da6b53e638af2438f268d8bf4780de2c","compiler-rt/lib/sanitizer_common/tests/sanitizer_procmaps_test.cc":"80503857337a9a2723d88eba021cd2a9d4df37adac3da3af497a6209b50f85e4","compiler-rt/lib/sanitizer_common/tests/sanitizer_pthread_wrappers.h":"69cd1d8ac65546c4f17b188c7af5cb438f83b6998c995ca83b015ac2bcae42e0","compiler-rt/lib/sanitizer_common/tests/sanitizer_quarantine_test.cc":"1ba8331efd1cc7b4f63d7462583c47c5bfa802c408f06ffc09f075b6801547b3","compiler-rt/lib/sanitizer_common/tests/sanitizer_ring_buffer_test.cc":"ab51899a2ce5454e578dcf6a778ea08d99811242fb3654710acd4694329a7706","compiler-rt/lib/sanitizer_common/tests/sanitizer_stackdepot_test.cc":"35e5aab76f9030ea313a00a3b66b1aa327091697a8605c5780a7052a67cb8d5f","compiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_printer_test.cc":"213b7d4ec7f60da9de5c6ea99fb1714099119afef50263e3381f1cae6f9859e9","compiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cc":"57d02708586dfac4fe61ce329db0e7a7117dd879865ca89e96b198b7fd2a32c0","compiler-rt/lib/sanitizer_common/tests/sanitizer_stoptheworld_test.cc":"96a0a8c84f61e5f398e6d5fd62e6267aa83ba7ae0ab7f477e2a9db6bf62d6bb5","compiler-rt/lib/sanitizer_common/tests/sanitizer_stoptheworld_testlib.cc":"1603d94036e8905a60dd7250ff39f1c93427b8577582839d713c5d28ba789318","compiler-rt/lib/sanitizer_common/tests/sanitizer_suppressions_test.cc":"a020faa475392fef4cd2d8b1800622e9a33ffa44529b9eb2386f74cd192f79fe","compiler-rt/lib/sanitizer_common/tests/sanitizer_symbolizer_test.cc":"3561efff309d41842ede5904bcb4b27533a396d83a34692d30421a27f44b7b1b","compiler-rt/lib/sanitizer_common/tests/sanitizer_test_config.h":"3c0dc7a0e070b21d289ea00f0ed7acc2d4da773e276ac713a3ca175bf035e28a","compiler-rt/lib/sanitizer_common/tests/sanitizer_test_main.cc":"5642a64c8d22c0fe5444a7439df3a85d68f28a0970332df921a8d6f8e74e374a","compiler-rt/lib/sanitizer_common/tests/sanitizer_test_utils.h":"8657070df7fdeeaec7771dfa86d82c05d27d4e76916c2ed67f66300d13c2a70d","compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc":"b6521de7a367ad704bb6e3c9455e64bd59353dfe5e3ac7b8b457c7033ec4cea5","compiler-rt/lib/sanitizer_common/tests/sanitizer_type_traits_test.cc":"90233fa4bbf70786fc178e68603c908a5406f0d8a75e726d4c3370bc4f0938dd","compiler-rt/lib/sanitizer_common/tests/sanitizer_vector_test.cc":"9d7db0275c46843b9569503b50e795e6bf00b18b79f7a0ec210587c4360493ec","compiler-rt/lib/sanitizer_common/tests/standalone_malloc_test.cc":"578f7b9854b55eee1c3a200e2446d91c55ef0d3a2805235fcbf98f49e6ff905f","compiler-rt/lib/sanitizer_common/weak_symbols.txt":"88cf274d627fe3370af475880fa36463f55a79bf2770421a40b3f6fdfe74a182","compiler-rt/lib/scudo/CMakeLists.txt":"081f9014f0e25e23c11bced34bc288ebe15301d03ee31952241c5800454ecfc1","compiler-rt/lib/scudo/scudo_allocator.cpp":"1232ef865db483e34a4e00396388e66a018f64b18c33cf4932567b1b33aee987","compiler-rt/lib/scudo/scudo_allocator.h":"3e9dc742e9a421c410e1d1e9fa5df0c0d132f82dc15cef15484f423bab6a28c9","compiler-rt/lib/scudo/scudo_allocator_combined.h":"230ed3815a06ff278e30ba2fff7c9f151c6743e79c8e0748ab968d6a1d500756","compiler-rt/lib/scudo/scudo_allocator_secondary.h":"078f5a448bbd2702aa774cdb2c518d4a9e4d7b44e0bdb2f8a748df2a9f53e4a4","compiler-rt/lib/scudo/scudo_crc32.cpp":"4dcab7ce72a78c743ecbe50b68e733fee785c8ad08266e6f99dbbdf16552aba6","compiler-rt/lib/scudo/scudo_crc32.h":"b06c90b9afb9845ac64b9f1f26daa6208d297ced0e7b2e7c38a705c125402832","compiler-rt/lib/scudo/scudo_errors.cpp":"087770a0d09b0a4ecf7d0d39feb620b5b63ae9028e9d4ed0f97c117ffb492ff1","compiler-rt/lib/scudo/scudo_errors.h":"bfa45ea9848373144a4565f703e76b64ad0f928f3009c0247454fc44d02b0727","compiler-rt/lib/scudo/scudo_flags.cpp":"33fa67e6fe6e1ed558f7a15bb27122a2b41f6aea06fa8050e71e249d577c073c","compiler-rt/lib/scudo/scudo_flags.h":"03afa8f40bf924973ac81a4beb557cc1dc8f4a7292690d252f38ecdeb7850d95","compiler-rt/lib/scudo/scudo_flags.inc":"89e873bca02a2d5421c95c87046fc46074803ca24901aed994ee9bad8ba40194","compiler-rt/lib/scudo/scudo_interface_internal.h":"874b4934cca88165aab7ebbd990e753477f67ec8ebff41a53b83fc66de4cf6f1","compiler-rt/lib/scudo/scudo_malloc.cpp":"0ccac82cb0f2637ee817e119e22a5b4e4c1fb9409109fede527b0753d8fab3ed","compiler-rt/lib/scudo/scudo_new_delete.cpp":"417128c9ca8b20faee6c25239087af87f85763ef6b594c851afbaae9bb3e24d3","compiler-rt/lib/scudo/scudo_platform.h":"0adf65ef8752b133981420fd9919a459597063c443e2a2d89490e92835933c59","compiler-rt/lib/scudo/scudo_termination.cpp":"a702bb18c03853f263303006e94803ff077aec80548d5e5a99a2767dc7867c4b","compiler-rt/lib/scudo/scudo_tsd.h":"a970c91ff1960f9b1c143158e408bd9a8869d08af8b21f68b2ce42117f52afe5","compiler-rt/lib/scudo/scudo_tsd_exclusive.cpp":"537249f8f6e99666ae4429a85bc1ebcac707bbdfad9d60c4130292f3d998f76b","compiler-rt/lib/scudo/scudo_tsd_exclusive.inc":"b4c72dfdb573ca7dc84fa0ff68c2668b3425e16acd2fd88ca5a0db8db7400537","compiler-rt/lib/scudo/scudo_tsd_shared.cpp":"21acd22a696e45c3794b3b0e3dbf344e07ce55a354ec0d59d0f2c39e2b922747","compiler-rt/lib/scudo/scudo_tsd_shared.inc":"df97c085b44bd2620235c71fad74e628ee662fc09ba518643db918609de2039c","compiler-rt/lib/scudo/scudo_utils.cpp":"3f65f31e742161175bbc38e284cee749b04a2391187dd6a36cdf5c52443c2efc","compiler-rt/lib/scudo/scudo_utils.h":"309b7b973ac51a5fa3bcff394ca9f964826749571fb9f4d258a27b2d79afa00c","compiler-rt/lib/stats/CMakeLists.txt":"09b890d1c540241d321fb127e4caf2cccad1e778c050737a5ae9915dbac7ee0d","compiler-rt/lib/stats/stats.cc":"ef5b2de240659d369adb202c1c04283aaa672832b5865eb9310ddbb4e51b4e43","compiler-rt/lib/stats/stats.h":"e99ff7de1155d28f4d3b1b9987b94128a095a2e2320ce51e6c06dd64b8ca611b","compiler-rt/lib/stats/stats_client.cc":"e4c91f4815aabf70d20f7544167dfe4544bbe4868a6420d01908303492d094d0","compiler-rt/lib/tsan/CMakeLists.txt":"3e0b77ac45ef4cfee582fe2e90b69548951b76e4fdd13daf37f3688ce88e79a2","compiler-rt/lib/tsan/analyze_libtsan.sh":"e095ecec7de00e720c00b720e2aaecd0427c770cacd021cb787bd1455527e919","compiler-rt/lib/tsan/benchmarks/mini_bench_local.cc":"674ed842f62bcec850d1e26d206c01e9641b82d759923ae59dd3ee89cd00fbd8","compiler-rt/lib/tsan/benchmarks/mini_bench_shared.cc":"627c86de70b6802ec8499588de5dc34da6ac00bf88976f5d30cf128155f5a186","compiler-rt/lib/tsan/benchmarks/start_many_threads.cc":"2ea12220140b77cce9102f8e58101956f32a4803aac6a91f4f33375451bdd005","compiler-rt/lib/tsan/benchmarks/vts_many_threads_bench.cc":"70ddfa51d811c000f6018a6116b2f1fb7b1ed9c0193fe46be25335eee03e04a1","compiler-rt/lib/tsan/check_analyze.sh":"bc5ab50f8bbec9863476f64bfa17229d6e63086c2ae988280fba016e75fcbffc","compiler-rt/lib/tsan/check_cmake.sh":"0b27168f3225a4bcba14d19faffb8b12d0ed59f959eb38115713246f68f6e30b","compiler-rt/lib/tsan/dd/CMakeLists.txt":"7a054d5b85297636733068eb4d3fccda0f17c8370a74aa26f57849fa5f5fcf1a","compiler-rt/lib/tsan/dd/dd_interceptors.cc":"567fe2cb1d0892f393865c30c3b6e039bf7dc4c0b40265dc6ace5d505e5fbd8a","compiler-rt/lib/tsan/dd/dd_rtl.cc":"da56992be8d96a78cc6b7566b51969b2d87cf25df3e1a6888a27e17795c055b7","compiler-rt/lib/tsan/dd/dd_rtl.h":"5fd380b8fe81d8cb416b8facb386f5b31ca59342e8963d211f6d34b59ea2cc52","compiler-rt/lib/tsan/go/build.bat":"4ec1a2c6d8d5d5d8bc62338cf393f6d1758b1fb7f358152727a5c7d074a41a52","compiler-rt/lib/tsan/go/buildgo.sh":"a4e2be1f421102163e8d4d4e4eee5ddbe011c6a8c4e88886be09ddb54e035d36","compiler-rt/lib/tsan/go/test.c":"019e888c4c232005fcf011173fbb55dfcc8f1015b39ce54ce4c296f587419e72","compiler-rt/lib/tsan/go/tsan_go.cc":"780f30aa3dd9af748b93b32967b2b0c4bc2f476fe80c19124aa81866d019cb48","compiler-rt/lib/tsan/rtl/tsan.syms.extra":"f56f80276a35b9183d20bfdc7b1f7ecdcd879d087e91ff994f5eb46c62941384","compiler-rt/lib/tsan/rtl/tsan_clock.cc":"d099dcc40ae7dd87bbeafafdea8451c1f411e096855a1995f3db74fa52e303a5","compiler-rt/lib/tsan/rtl/tsan_clock.h":"fa2a962307727bc2f2e3ea43d2909630c68490c68a98fbb80025aadade482027","compiler-rt/lib/tsan/rtl/tsan_debugging.cc":"52d501ab953e8ae8778ff0ce82a08f7868709e9ac04ba6650e06d6fce4b5835c","compiler-rt/lib/tsan/rtl/tsan_defs.h":"baa5938a32d5824bafb7ceb6feeb393b67c0afcdc1a1ce30441c0820e67f82c1","compiler-rt/lib/tsan/rtl/tsan_dense_alloc.h":"b6743216a3b9f11812f24de638d372c27ca4ffbfa0a6d0f55a9ed2b57926abb8","compiler-rt/lib/tsan/rtl/tsan_external.cc":"cbf7210e1349645505412bb28981a205022573fcada570febe45eec4af09ddb2","compiler-rt/lib/tsan/rtl/tsan_fd.cc":"57885465923d9fc277c27598d4ea1264f74353e14d7d64f2391e3b839a0c1159","compiler-rt/lib/tsan/rtl/tsan_fd.h":"00158e476aae5794bef1fcaa4cb7ed0c003dd9890113825de6dae8b2a02487be","compiler-rt/lib/tsan/rtl/tsan_flags.cc":"dc4db493cdc75b8feda831c1cc71f9dbb9caeb17a2a3e5c95d0f42e3f5b71832","compiler-rt/lib/tsan/rtl/tsan_flags.h":"2e41bd42c3241207f958fa5998e0a71ce7ac745f2e9265ed84a1e717c89b30c8","compiler-rt/lib/tsan/rtl/tsan_flags.inc":"2291f14e320d005000e0e36603c7164bf33e8db40bdf089ade22b5ee8bf49877","compiler-rt/lib/tsan/rtl/tsan_ignoreset.cc":"239f3d92c2a63c9ef607df139e9502614daef5bd0851e8fcdea022038ed8042e","compiler-rt/lib/tsan/rtl/tsan_ignoreset.h":"d81c8d209436bacbfd3b0b62f97930aca3c6014397babb4bf958891019cabec8","compiler-rt/lib/tsan/rtl/tsan_interceptors.cc":"70252b83e6e03c7bb041a2522df21618d9bf015888c38a9b539479bc0b8238c6","compiler-rt/lib/tsan/rtl/tsan_interceptors.h":"7e2b0f7aaa18a38f7d9c9e4ffd16f40490b131b888d19a0d168b6306abb9ff39","compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc":"42244bd139fae9ca6a272bf83b0ce24712b2ccabd3d5351566ff18f1002b95d9","compiler-rt/lib/tsan/rtl/tsan_interface.cc":"9ae2f1e2d68c74616ce5995882b7033d64c57737f331456a4c5d988d018b0cac","compiler-rt/lib/tsan/rtl/tsan_interface.h":"0555a5790509c50cc655b6111c3ab4e4adbba2309d17dc9a99e8d478ce4f4708","compiler-rt/lib/tsan/rtl/tsan_interface_ann.cc":"067738267f6d1c0fad3f0f1275c4e6b244950e032b4153b4482a71f70fdaae63","compiler-rt/lib/tsan/rtl/tsan_interface_ann.h":"dddeb9db1b0b55e2666204da913c01672c95bb5ce714bb61f3be234c2099bc8b","compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cc":"44ca7f5b270d44f6057e67a82cb5635e70564486cbff420a8732833d9553bc74","compiler-rt/lib/tsan/rtl/tsan_interface_inl.h":"c8fe707e80cc893b3accb19789a0116e83df18ff5156a7c36a8aa64ed6110b3a","compiler-rt/lib/tsan/rtl/tsan_interface_java.cc":"b4fda20439fc7e845baea059bd7e26398afce4fd65b2c72bc6a4bc1fc0a84ba0","compiler-rt/lib/tsan/rtl/tsan_interface_java.h":"ad3aa8d49842812d56e4c2a269beb1785f9697b9b1188b3b78286f3d625a15c5","compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc":"85b7679a4c8114366598963bf0580c3ca5427df490b008d228f847fd9f57ca2a","compiler-rt/lib/tsan/rtl/tsan_malloc_mac.cc":"98c3fe23004ed9f87d1ffb6755608401c43e44c7d723e51af647aa7269b3f751","compiler-rt/lib/tsan/rtl/tsan_md5.cc":"0dfb2e9de66a91a3746076acecc12ca35c971790c9010325aa8e42075abbfd07","compiler-rt/lib/tsan/rtl/tsan_mman.cc":"93f72cbc5678a6b73b85b9892cd473299cf9e60fcb2478c83ca4f2be34e8a794","compiler-rt/lib/tsan/rtl/tsan_mman.h":"0d44bdfae4de6f6c8bf7fdcdc22698245eb5b6916138a9f506746e9486cba81b","compiler-rt/lib/tsan/rtl/tsan_mutex.cc":"ae1e458efe6621ee3be1bc6f2642b270c53b6448cce6b49edf672b902b55bcc6","compiler-rt/lib/tsan/rtl/tsan_mutex.h":"9d0809b7d5f5c0074aac277714ddf51fc399a2088394af87e505e0aff1628e8c","compiler-rt/lib/tsan/rtl/tsan_mutexset.cc":"851dc06e627bac06387a0aa86b296325c63f7aa9e64395caefcca24cc7b15484","compiler-rt/lib/tsan/rtl/tsan_mutexset.h":"d026195e6374be58642406fdb900829a0de9db1c8cbe868addaf147cf6adba5c","compiler-rt/lib/tsan/rtl/tsan_new_delete.cc":"414fbbe7088a981c386e03204474d244d552831c2e274c08c2ae6d628c5a8f8b","compiler-rt/lib/tsan/rtl/tsan_platform.h":"893623e93b0936e4c5e9fbc73d105f19c59735e88d29ec033c286edcbbe238bf","compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc":"dcfa2dd51a2aca899defe97d06b0b4064d7f2f91f14f89ba7fd91c42f24297c3","compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc":"86f50ba198beff3e75e614c7637f63c16fe25c3a99f92542a951842efd7fe81e","compiler-rt/lib/tsan/rtl/tsan_platform_posix.cc":"5aef1db6ed62cf9624bf6900d733b261607b1f856eff02b7ac6c7cf20747f70d","compiler-rt/lib/tsan/rtl/tsan_platform_windows.cc":"f17ed48ed43f8dff410be462ac24fc97acd55358b66fedfcb40533fba6c817d6","compiler-rt/lib/tsan/rtl/tsan_ppc_regs.h":"18647971a4a8266177130226d20756aaf543e96953bdcd4014b5c3a0d563759d","compiler-rt/lib/tsan/rtl/tsan_preinit.cc":"5e8b57a8f71a40fba2b43a888ac3c191100abb56fe94746d9d17f5f608d81474","compiler-rt/lib/tsan/rtl/tsan_report.cc":"f74038b45d1ebc26af1a9e094716760929f57766cb5d80876f415a60797d7311","compiler-rt/lib/tsan/rtl/tsan_report.h":"7411d3b9fa8bdc1d09ea1dbe1663298f7d5412bc52fd4fc4f65a148117adb376","compiler-rt/lib/tsan/rtl/tsan_rtl.cc":"c937ec5f258682b5cde08d6b7f3ced7b998526a7866def83ad34161ad481b5c4","compiler-rt/lib/tsan/rtl/tsan_rtl.h":"9f4643b374b89af3afbfb10b0a09b13cf7f2a7bc68745eb88b77935574463297","compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S":"f031f9a3f35a40350b98dcbeab52135f72363421fc9163ae04a10fa5db087336","compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S":"98c04271b51b54b8351dab8049c0c4f2b6611b06a95bb2a9bc713d69d78c063b","compiler-rt/lib/tsan/rtl/tsan_rtl_mips64.S":"42c5f09c96650f989742192fb1f1bd69f2f86e4005ad8e50ceda66fe7be99c80","compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cc":"ce70bae402c7e79a296fe197c9cdfbb19781d8cbb777c8227e415c4fd584fa77","compiler-rt/lib/tsan/rtl/tsan_rtl_ppc64.S":"452783702ef44182a1e3cadeedeccc747a3f36fce77dd7531012bdafac434528","compiler-rt/lib/tsan/rtl/tsan_rtl_proc.cc":"70d12c7c4c1ada4a86db4d7693a0fb50fc44ec5c20392f6a55de4c53dc5e173b","compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc":"52d74f8cc72c3e80467691abe97a450d417ab697b329994083d8f260f438cc42","compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc":"13c759718f6f450ca32c7dc63d858e462d63a5a5ffbcac294e2137252e96f150","compiler-rt/lib/tsan/rtl/tsan_stack_trace.cc":"246e879debffc31c21734e29919e23ffe1ca8c66ea880f3241878ebca2283f81","compiler-rt/lib/tsan/rtl/tsan_stack_trace.h":"555cbefcf24ed1bba33283af89615e7507ccbee49481853fd4b7c41e280ea8b0","compiler-rt/lib/tsan/rtl/tsan_stat.cc":"30a9c8ea9015ed6eb2bb787d9fadb1d9ee967cd9c3178542281e48cbfc9001a1","compiler-rt/lib/tsan/rtl/tsan_stat.h":"61d802d9dcce36231a0d936b9cab6abb6568beac24650ad755b0706153f408ad","compiler-rt/lib/tsan/rtl/tsan_suppressions.cc":"09339f2b0e2a001528a45c866649a9e3f0a55763e50bc95a59abfa23ace9221c","compiler-rt/lib/tsan/rtl/tsan_suppressions.h":"fbc9bdfd74dd133d2284b8291f36769a03b6ba88c5d652e2938546a95913237a","compiler-rt/lib/tsan/rtl/tsan_symbolize.cc":"b87b6894c5d5871cfb88efb830e6574cb725c1917c23a48c4330e418837d45c0","compiler-rt/lib/tsan/rtl/tsan_symbolize.h":"5a31604d0f2e093d5616157ee7dc030c59db3e50f3c7f46dbdb99945ec8fd563","compiler-rt/lib/tsan/rtl/tsan_sync.cc":"c950ea3b9a7b407c63bda801054cea7c096fad2595e24a2c7d6f7e9cad36bd04","compiler-rt/lib/tsan/rtl/tsan_sync.h":"4cd45a14cbba9cf0138afec86f3617881e86b6506e9f062a10329f9350910f03","compiler-rt/lib/tsan/rtl/tsan_trace.h":"5bba4cc247d62adc10e792932f7a66dda564440ae84a4df70ecd9a0d48b5b13d","compiler-rt/lib/tsan/rtl/tsan_update_shadow_word_inl.h":"b9989f1ec64429b94b394a6759cf7758befa680c11a241755b7e9407762be75a","compiler-rt/lib/tsan/tests/CMakeLists.txt":"5d60078905acc870db16d792f17d9cc477021238e788511300b89c651c485325","compiler-rt/lib/tsan/tests/rtl/CMakeLists.txt":"5cbe2ac1b4e69605b66229cdb53d32ec2f0daca8c2a6ddb707fa12fdfba94454","compiler-rt/lib/tsan/tests/rtl/tsan_bench.cc":"93d0144accd4a8dfa88d3e60b77ed9fbb17d5f4c02387b61e00e811325d29b64","compiler-rt/lib/tsan/tests/rtl/tsan_mop.cc":"b1f7c8ba70d29f7b39936dceb7eae385fdc5e2703a5910fc41dfdda0e324a4d3","compiler-rt/lib/tsan/tests/rtl/tsan_mutex.cc":"0e493bc9d7cdcb936fd75348bfccdb1b55bd810fb0fb23d8413ef6aa3d7421a7","compiler-rt/lib/tsan/tests/rtl/tsan_posix.cc":"5e247fd2521829ca4b85fd6abab3fa0276c8efed202d8073ad83a7c7cd42853e","compiler-rt/lib/tsan/tests/rtl/tsan_posix_util.h":"722de1fa9ff81503449e7c72842973adfbb165628a5ae03c08bfdc1d6f81ab20","compiler-rt/lib/tsan/tests/rtl/tsan_string.cc":"100a8c3876458104322d91a990079f6a0c9502174d40fb9f1d6f5b2becce46e0","compiler-rt/lib/tsan/tests/rtl/tsan_test.cc":"798d330ef908f780fef3d01a8bb1a95c23ae499bda3c1da62e894e0a1f970ea0","compiler-rt/lib/tsan/tests/rtl/tsan_test_util.h":"5140b7f3f7f73b2fc4339ad2028bd1730b79b00799aa817709fc27ea27afca86","compiler-rt/lib/tsan/tests/rtl/tsan_test_util_posix.cc":"ac7717ee49e12a4c5a7767e19e38b0548fd5bef7a3a77a0d18d1db92804d8587","compiler-rt/lib/tsan/tests/rtl/tsan_thread.cc":"963cd176e88d0db0d8b169e53b86a738e65a7d3d75e7a346c447badef75fd78b","compiler-rt/lib/tsan/tests/unit/CMakeLists.txt":"3c4aff1fe2dfe430b40f5c6bd59c46eb11690919a24eb648fce7c342c1a1b887","compiler-rt/lib/tsan/tests/unit/tsan_clock_test.cc":"f89a0ea56230c1e5105d021d82d8570f0eefda88635ac23215d284b1f3bd1606","compiler-rt/lib/tsan/tests/unit/tsan_dense_alloc_test.cc":"e7c6876792bf74d8fdc2280ded51bd7bd32eb85c6ea437c8195ed21927d75805","compiler-rt/lib/tsan/tests/unit/tsan_flags_test.cc":"5743dd2a1395e1bc0d823f53933418d9f57e46efd3d8db4814852a55ce2d7e18","compiler-rt/lib/tsan/tests/unit/tsan_mman_test.cc":"1ebaa3b5aa49fd465aebb8101c430f1a2caa197f1feb844fd01e337dc136de13","compiler-rt/lib/tsan/tests/unit/tsan_mutex_test.cc":"f3c929e42f2ce222e97cc7f6a63789a4fd44ad246c5e142c4256796a252a074d","compiler-rt/lib/tsan/tests/unit/tsan_mutexset_test.cc":"a0400e289ac2584a9eef17d18693a783bb59f1ca4fca526e1bc2b66e58ed62db","compiler-rt/lib/tsan/tests/unit/tsan_shadow_test.cc":"33cf49fa9b3b93299d5cb2901611bf20f207051fea448178ac26b43bcb121dfd","compiler-rt/lib/tsan/tests/unit/tsan_stack_test.cc":"e98e1f5794a410d663d5814fde45f308a5b12887bee972b1168649546427c962","compiler-rt/lib/tsan/tests/unit/tsan_sync_test.cc":"3994eafc9ff1ccd82713e902859e683a2510dafb5eee91056809c4d81b85770a","compiler-rt/lib/tsan/tests/unit/tsan_unit_test_main.cc":"7cc43582158e525454469defeaf4fcfac03ceb97a7ba015133828ce6d63a43dc","compiler-rt/lib/ubsan/CMakeLists.txt":"4dbea695d35d6602cab3340efc636b528770822320a682b606f200bd5d899c6f","compiler-rt/lib/ubsan/ubsan.syms.extra":"4681f7eb2dafb0d87438357b7370d3305f80e769a5a246233b6b11d93fdf28ea","compiler-rt/lib/ubsan/ubsan_checks.inc":"10dfd940a6ebbeace290eab16152c3983205c5de1e7b22091b06f21024542f59","compiler-rt/lib/ubsan/ubsan_diag.cc":"b24522b8dd34900ba037c4bc2e5497b20d3335609495be9b95566466f3ac7462","compiler-rt/lib/ubsan/ubsan_diag.h":"29e83bfecb2531c7ca509326ebb52601ccf0648497098af6074317a8d68a3ab7","compiler-rt/lib/ubsan/ubsan_diag_standalone.cc":"a99f5516d42683137d2627d625e13bb221dfebc1211b42031483f90c8fe71444","compiler-rt/lib/ubsan/ubsan_flags.cc":"8d8bb3f7ab5a97d48462210eca21b7e0881bbe70072dff8f1a8d67e7a22ea5da","compiler-rt/lib/ubsan/ubsan_flags.h":"6d500633d0802b1340ef2028a3501a280c165e914e6f8cc286f3aa1a4207c38e","compiler-rt/lib/ubsan/ubsan_flags.inc":"9244b5ab4294215c327a99728bd310068ee8a6754e2b92867c6d98ace6e37dd6","compiler-rt/lib/ubsan/ubsan_handlers.cc":"23bea43b80cfba66157ef392447d10a226034482dee57aad6d88ef040d04e445","compiler-rt/lib/ubsan/ubsan_handlers.h":"11a8d0687fa50ac5068bbc3d36d4dea3668f97fb3aca67381460aeac867345c9","compiler-rt/lib/ubsan/ubsan_handlers_cxx.cc":"efc2e0660f68212821ed20b713c85eec0bb5dbfab57ac3e2bb361007b27673a0","compiler-rt/lib/ubsan/ubsan_handlers_cxx.h":"187901cc5d28bca31dacaf55ee33bcacbcc814eeea6190ba536a64a79fad2884","compiler-rt/lib/ubsan/ubsan_init.cc":"bcad9a6df3debd0b847e8503d578858fe9536adfcf350e1aa55d4101a233fb29","compiler-rt/lib/ubsan/ubsan_init.h":"0b1cc1fd3134668b29ae0342fd53e0c4fe57f66a71300d0dee630e0cf0d805f6","compiler-rt/lib/ubsan/ubsan_init_standalone.cc":"cfedf8f0c536ebea29050b7e353c336134efe9596936acad062be745b8770975","compiler-rt/lib/ubsan/ubsan_init_standalone_preinit.cc":"d87cb5394ee4f430524959ec1b445dc03499cd91414096e5ce5f056ad1774aec","compiler-rt/lib/ubsan/ubsan_interface.inc":"f32f9c756e70118a671050ece96787fc770f99ffb6447c9debcf4a3033ce1357","compiler-rt/lib/ubsan/ubsan_monitor.cc":"77e04d67fa7cb1bb6a7c9779e27a0240409308a9ae7f4b171dba739e0a6e856c","compiler-rt/lib/ubsan/ubsan_monitor.h":"0f0f087e50d70a1e24d0506f7cda7933fa9e34f0de4515609e17470a4af76399","compiler-rt/lib/ubsan/ubsan_platform.h":"843888614939ccb035453cc9f688fe9219d4d890f517aa7bc3d9e9da84e0127a","compiler-rt/lib/ubsan/ubsan_signals_standalone.cc":"d784978d5f921936f6a5564f31bb1f73513f7895e71e1228263eed62e0d9c509","compiler-rt/lib/ubsan/ubsan_signals_standalone.h":"c8d6a3b284b7dbfcdb63506df3952b2ae9a41734a69c3a45b183fb06c9b816ff","compiler-rt/lib/ubsan/ubsan_type_hash.cc":"f95a264c0393352ec7d25e576c05c2b29d468df53ce67625400d7c3068ec1589","compiler-rt/lib/ubsan/ubsan_type_hash.h":"d65d43ed8acba3d2178ac8205ec716e8b9b4439864797fab4b647c7f5db9c5de","compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc":"238fd6fc0e99f072dc1f076f36b821faac1bc3ca86b0f885320176f13d2e03e0","compiler-rt/lib/ubsan/ubsan_type_hash_win.cc":"19e6fd0914cf743d995b7e0e0686ce928ee103380d12c78d16c59b8a757b0e3f","compiler-rt/lib/ubsan/ubsan_value.cc":"63786d0fb15caeefdd1213ca6a4065f14c2c770092cd5a7ddf3d28fd4474bd11","compiler-rt/lib/ubsan/ubsan_value.h":"f56eed16ba92c2e62ad481e80425b522e3320f83d1359c3b587e8d5dc0d33d69","compiler-rt/lib/ubsan/ubsan_win_dll_thunk.cc":"dff18c552784aa0f346fcb19640fb32752835d5ca3105e2a60692e838da91ed1","compiler-rt/lib/ubsan/ubsan_win_dynamic_runtime_thunk.cc":"7cc87e05472281287c5ed83ce28eb01b7688b3539afdbc6f6c2840d9dffc8b7e","compiler-rt/lib/ubsan/ubsan_win_weak_interception.cc":"3bc9310bf22658b3842e6265af5c787b5c5f8e2e4fc67add06470f3aecb72ac2","compiler-rt/lib/ubsan/weak_symbols.txt":"76e9876ecfac2f77f06f3fba527e96feaef158f665e650eeac68e828f79b0629","compiler-rt/lib/ubsan_minimal/CMakeLists.txt":"bff29592e2b3adff79ca0d22bda3dcd6b05b7e2de253781f183355778b2acbc0","compiler-rt/lib/ubsan_minimal/ubsan.syms.extra":"4681f7eb2dafb0d87438357b7370d3305f80e769a5a246233b6b11d93fdf28ea","compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cc":"edd10d594aa66f166b1d19ba73e206a10fe7087f8cde8b7a12bb056c47d169ed","compiler-rt/lib/xray/CMakeLists.txt":"64e48fcd040a2fbfeb6690907e378a955d480b51d307e8d3452969243f96b119","compiler-rt/lib/xray/tests/CMakeLists.txt":"94cb9da92f018f51286effde841d10a88502a7a9148840d7e82531d3ce79f3c6","compiler-rt/lib/xray/tests/unit/CMakeLists.txt":"3f25e98e1f6686a713e6fea1179b1996e17a2242dc4c015b38afbaf75bee6fa2","compiler-rt/lib/xray/tests/unit/allocator_test.cc":"3a2e3095f04597fea04146e118aa408818166961acd98f83cec791f91872f724","compiler-rt/lib/xray/tests/unit/buffer_queue_test.cc":"960c7d16bc59f2f55bd94421428968990b6e372e9a710cc6921103bfa4b3a480","compiler-rt/lib/xray/tests/unit/fdr_controller_test.cc":"5d49a3d6387551e78cf3e6a3ee26f24a47c2717429b0231097bdb183c19028e9","compiler-rt/lib/xray/tests/unit/fdr_log_writer_test.cc":"7ad2498e612cd7623212b3e7c5cebdd7723e121b73d69f684be9e7465c205316","compiler-rt/lib/xray/tests/unit/function_call_trie_test.cc":"61e1f29561c883d36abf2a37c552c97d98bd32daed9299bba5679a59719da199","compiler-rt/lib/xray/tests/unit/profile_collector_test.cc":"d9e953b8c5f0009ad9234c9b16154e351d2624d23489a6315bc6da720248283e","compiler-rt/lib/xray/tests/unit/segmented_array_test.cc":"da7f420bc90d0b2a7eb6e506fdd8dffb90de8e7f7b33628da5ca0aba7c7de226","compiler-rt/lib/xray/tests/unit/test_helpers.cc":"04178350cd86c594f0b260607392c527c0821dbcc2d8f57cca366a565c7fb2f0","compiler-rt/lib/xray/tests/unit/test_helpers.h":"b68e71709cd5b2771b03877c9fbfcd165b5c6a1ae8266be2bf99f4055c5767f9","compiler-rt/lib/xray/tests/unit/xray_unit_test_main.cc":"001bb20cbe38c696d044367cab46d1d12df0c9581b96284e8e0e1c39c04fb506","compiler-rt/lib/xray/weak_symbols.txt":"554b88f8b5a9724667b7e6ca4d220f939aeec635c7b7f5f3e7b2ccb7eb6fdde0","compiler-rt/lib/xray/xray_AArch64.cc":"71e15a585d4b90a83dc79664ba81d69fed380a7f10b54d1ff033ecf0a35719b6","compiler-rt/lib/xray/xray_allocator.h":"d302c4f119518281fd04c6d0155c6dc8e1fa1335ccfdc8607411da7fe626bf56","compiler-rt/lib/xray/xray_always_instrument.txt":"e33e430336664b6bdf8844c15d56ee3b901035e57c0207495acf1202e5e75702","compiler-rt/lib/xray/xray_arm.cc":"12ae95ceac00bd8ccc3e83ab46cdd1d99f838ef14d44d6cafabe55793ef067a4","compiler-rt/lib/xray/xray_basic_flags.cc":"c2ed8d3f03fcae5f88ff55a873aa61f0164b840fbd3e280301220099c29ea264","compiler-rt/lib/xray/xray_basic_flags.h":"ddbb3e402076897fd689b022c35b27b1b3cd9a3ca059848559c249329fed6126","compiler-rt/lib/xray/xray_basic_flags.inc":"5508bed78405157c7a84b7bad1ec4fd26edd794e248840ec88911a1d983700a5","compiler-rt/lib/xray/xray_basic_logging.cc":"12e314464c3412138f5e4f1fc7582deed25c5e1def56b51f6f7ecdebbd136c26","compiler-rt/lib/xray/xray_basic_logging.h":"dcec4afa87f2e134aa17693ed926151c72a93646cbaa0ae7d0cea3391f23d06c","compiler-rt/lib/xray/xray_buffer_queue.cc":"940a4275b5cc8a254dc8fcd1414b42862cefc494fbd76ca7aac210387fd4d253","compiler-rt/lib/xray/xray_buffer_queue.h":"1c261de0139d774345e78bd68876f894b251fc6fe988e7b57c80fbbf5bf46409","compiler-rt/lib/xray/xray_defs.h":"4c232f1e0afd491ee651682b479d799f3f9b78c11ac4c282392708422adf0bbf","compiler-rt/lib/xray/xray_fdr_controller.h":"c44aca37ed1eacd0674dffe0b27e87d9a492e2139f65b09bb7e7703af9f5dde6","compiler-rt/lib/xray/xray_fdr_flags.cc":"93e9b1bf2ef6e7cc10c45fc0cedbe65793a66a902d54d2efe714213049e45d7c","compiler-rt/lib/xray/xray_fdr_flags.h":"66dd5ef611378698ecd1441108fbcd0f59a479abf71dae04f735cfeaa665b71c","compiler-rt/lib/xray/xray_fdr_flags.inc":"1bab7464f7d54bb6ff603dc952b41fb413bb2ebd606bef1f4d7b237130238e49","compiler-rt/lib/xray/xray_fdr_log_records.h":"0a5d70e95e80f82fede50a8b58344219e93a718e188211e65f2e6fc263e39bc0","compiler-rt/lib/xray/xray_fdr_log_writer.h":"24042802edb543cee37f10da56193325ad09c969e2667f42d90d95811e594603","compiler-rt/lib/xray/xray_fdr_logging.cc":"d9cd06ee5a7c3bdb16ebfc4fb36396262b79f367df0723b4b9bad6cdb4675608","compiler-rt/lib/xray/xray_fdr_logging.h":"5b6b26ab1b68cf7334e36f5be693355009863eba7c39170181374fd57acdb813","compiler-rt/lib/xray/xray_flags.cc":"b270c51b5537a2a19d90594ec0f8913860f0b93d6a6526e23e1951d9a8980063","compiler-rt/lib/xray/xray_flags.h":"3569ac9adb086171c8ab6267aba1cd98647bdc0b021dcaf406d2ecba2b4dd2e4","compiler-rt/lib/xray/xray_flags.inc":"6015664c434d4f36842e5c16ac82b242be8facebdddbc9d4ed070b90831731f4","compiler-rt/lib/xray/xray_function_call_trie.h":"95272f41a6b289904df3d22c1867308a00751b8b8fc069f3042be2e5900427e6","compiler-rt/lib/xray/xray_init.cc":"856074dbb20bc2505747ba7d2d97044174154027c147d2c69a0de50917885ec4","compiler-rt/lib/xray/xray_interface.cc":"c3b6f0cef2568e5e722de3419e6f874fc7f953bb167bb9623d2540122737cde4","compiler-rt/lib/xray/xray_interface_internal.h":"b29607d70b83f30df9475fb088ec1a3d6e8c2f11a087f45ebb5f22f9afe2d512","compiler-rt/lib/xray/xray_log_interface.cc":"8de7b14cc23563d373f53a3b55ac97e87d9c7e5e0589ecfe201b755c2fde8a80","compiler-rt/lib/xray/xray_mips.cc":"0dd2f60fc8f72a368dabff30a8aa45edd3eadb24574922d04ff06b6697f6ea9d","compiler-rt/lib/xray/xray_mips64.cc":"137b9089c373c94bab25edb55710b5ed755dea5ebd935277b35da1ddcc2da443","compiler-rt/lib/xray/xray_never_instrument.txt":"47c9ebe2511236511761f4171e2d5833b9f5a9acdd6563dc951b372a2664fd7f","compiler-rt/lib/xray/xray_powerpc64.cc":"38c169fd867d3694ee5097fc3d6d8068d276b118effc8818ea8148964c348d72","compiler-rt/lib/xray/xray_powerpc64.inc":"e6a800e77bdec7a3a0b6a80c6a6266efdf270bc47ae83f99a87689f01ac532e4","compiler-rt/lib/xray/xray_profile_collector.cc":"2491e8aa1fea1773ab31b8f3f106ff2b776dccb6563eccdc8212107bfb7a1576","compiler-rt/lib/xray/xray_profile_collector.h":"a014e80c95706de7f79d74070099f528d7ed3dd431fc1ee109f6772225a8e9a1","compiler-rt/lib/xray/xray_profiling.cc":"04888ab387e905337004085e32cf1bd13f365b0d15ea1a469ff72d02b2c86d79","compiler-rt/lib/xray/xray_profiling_flags.cc":"ba7a84b75bd6fd60aa202b00354c52c4dc90c9eb4221d0e7d153c0d9ce80dbe1","compiler-rt/lib/xray/xray_profiling_flags.h":"f6e805649a320a0d52c35c148b0fdf057fff4e7a6ddd41242228f0502a5edf13","compiler-rt/lib/xray/xray_profiling_flags.inc":"612c3cc8d7bdf96c089cf40c69eae93710c066f1512a5e274690d22cf99a9fde","compiler-rt/lib/xray/xray_recursion_guard.h":"bff3c163aceb4ba66df91a3601e99892a3a11693a6ba5f68a1070b16b95b6f2e","compiler-rt/lib/xray/xray_segmented_array.h":"3faee51f6925f8958a6e6e7a7ebbbd179194eb4ad95c8bd65d628abe27a95e2c","compiler-rt/lib/xray/xray_trampoline_AArch64.S":"214c14b7b7241b9ca3804c94f53379b79d653e99ce05d365f709a82bc8ebdb5a","compiler-rt/lib/xray/xray_trampoline_arm.S":"380cf301b2664e40a68c91dde86769d6cb64e6d50dd659c8ace72c4076ee76f7","compiler-rt/lib/xray/xray_trampoline_mips.S":"63489f1e40ed915b0bf184d1f2468a23ac5a68f9658e564460090f188a8366cf","compiler-rt/lib/xray/xray_trampoline_mips64.S":"99a8f9d28e32addc2d61a5b9be207abf93e6f93665bc393472a506f6d2aa6e21","compiler-rt/lib/xray/xray_trampoline_powerpc64.cc":"9d89558e7e7687a34e7718ede9768c9993461b33ff8e8e998108ef6391d624cd","compiler-rt/lib/xray/xray_trampoline_powerpc64_asm.S":"884d776ed2976cc4e10b888f2121d3b5294406605801cc9266d2706f9629e574","compiler-rt/lib/xray/xray_trampoline_x86_64.S":"8b7b7910582173ba3a155eb189d770de8f41ec7b4a09a5dd611ba341b5c1aa3c","compiler-rt/lib/xray/xray_tsc.h":"0b82240a1a8cd0c2e31d0a5ae364dcab53ff3d7cfd6ee3f3a132992d6f58b5dc","compiler-rt/lib/xray/xray_utils.cc":"3f53878f583cc38b0aa63ac97801562a09442a261f71a361018ef3bed24cd47a","compiler-rt/lib/xray/xray_utils.h":"9968c7b6b7622d4a2cdc575c3b2dd5a1a398dcd0d81d3fd760775919fbfe0024","compiler-rt/lib/xray/xray_x86_64.cc":"27ae1cf1d6f9bd03532e39e1b49e52122a9dbd2a14bca311a2236066d379e144","compiler-rt/lib/xray/xray_x86_64.inc":"af682b8b852310860bd309062eef80e18f692a940c5d89388281d3035edcf70b","compiler-rt/test/BlocksRuntime/block-static.c":"cee77a545c10b3910d48a621e102a5986bcc60b413537b9b491e076ddfbb7443","compiler-rt/test/BlocksRuntime/blockimport.c":"d1466b6d2f89182bc51c301abacc06bb38a081cf7e3119c7d53496379f4ac6f7","compiler-rt/test/BlocksRuntime/byrefaccess.c":"9fee6236dbe9674856fffe9221140d3f930393b576dfb7b2dafa5382ef8e29a7","compiler-rt/test/BlocksRuntime/byrefcopy.c":"4435857ccb1e6039bff0a8d538447019c6381c2f3b924ae7ab20c4f24639ef82","compiler-rt/test/BlocksRuntime/byrefcopycopy.c":"100678d9ef4d5d910c9f479f165f74c6c16efc433b6112b080516638f6854806","compiler-rt/test/BlocksRuntime/byrefcopyinner.c":"dd7205708b6d657efbe8380e5230e5497113121d3a95b4a9ae39e1e6fb9f21e8","compiler-rt/test/BlocksRuntime/byrefcopyint.c":"8a3581298d0fca32d8433597904e8225ab8b7aea66b761708f3976aa5bd91c64","compiler-rt/test/BlocksRuntime/byrefcopystack.c":"faa896670791a22db83d97d4ff34a8581a135a37a351906f11ff890107cb79fb","compiler-rt/test/BlocksRuntime/byrefsanity.c":"6bec3c269855408d1f31e8dddcb6ac0af00ce3655f17154f13119e6fcf8f2631","compiler-rt/test/BlocksRuntime/byrefstruct.c":"c3a9ce296d74737f36b279a41b89707ce5bef3cbc492de9d958afeea297fc285","compiler-rt/test/BlocksRuntime/c99.c":"a957556cfe1741470a89ce288d7a72723d81af0fc014142a18f75a645a294475","compiler-rt/test/BlocksRuntime/cast.c":"3ed8449cb9689a9c1dc524e224e4215db71efe6df226445f7e3018819638daf4","compiler-rt/test/BlocksRuntime/constassign.c":"ffb3cde6732da7f36c5208cc8fe81d8ef8420ae91de6e69edb1faaf0afdedb28","compiler-rt/test/BlocksRuntime/copy-block-literal-rdar6439600.c":"0799396dd7afb955bf66f191bebaed798fc456f427ecf03cb8abcf1d73829b8d","compiler-rt/test/BlocksRuntime/copyconstructor.C":"9e1c6d9dd3a0515ee6cc2b7999a161ae4e5118fbdffe9d9ea3f59abc23373fa2","compiler-rt/test/BlocksRuntime/copynull.c":"4bfbc493ddb58911a6b0f3b1c6eecfd6d9991dbe914c88bf525ac72b3a7bbe7c","compiler-rt/test/BlocksRuntime/dispatch_async.c":"c48d6b0c046215856f8a879b6233847173174eead5dd5ec7db89187c99ff69cf","compiler-rt/test/BlocksRuntime/dispatch_call_Block_with_release.c":"989d29ebed6e8becd880f0347a524f7c957360ecff43b54f21da0802361af556","compiler-rt/test/BlocksRuntime/fail.c":"fb0bc3299bdab8d2fbd25fe8f95576b672c8e2f3c048a4b1371faf5820aff887","compiler-rt/test/BlocksRuntime/flagsisa.c":"9410e5627cc5a512fefd268b6edc36df2eb7a4322b6f099f6e0acfe061c816f4","compiler-rt/test/BlocksRuntime/globalexpression.c":"f6e3893ee949c7126591c310edb101a693970ae46e0ecb257ae5c88d2c03bf37","compiler-rt/test/BlocksRuntime/goto.c":"c0ac882eccfa273c93bd30456feed13240c7a03aa18422ea5aff7ff5b0182b2e","compiler-rt/test/BlocksRuntime/hasdescriptor.c":"1e8b16dbef6a6d663c046cd37a19a1c5d6e7e19e136f2109bf0480ac78d6f63b","compiler-rt/test/BlocksRuntime/josh.C":"2918ff334f20a07a3ec71b46d70255b6444abb39c098dec3589f2946f2e5f998","compiler-rt/test/BlocksRuntime/k-and-r.c":"db46435a8f49d740d8ad861dd34b3260fd578d8a065d3c5ddfede18f9713d21e","compiler-rt/test/BlocksRuntime/large-struct.c":"a55e02837d3cfc0f82c4ea1e1b02b387dece5d6ab40c0b634ae5849d45abf47a","compiler-rt/test/BlocksRuntime/localisglobal.c":"65d3965053a00efe515f7834f891cccaa49e880a19af4b1ccac9b89c0d17b7ee","compiler-rt/test/BlocksRuntime/macro.c":"a8fe2cb1b0300f68cdec7b728b9f87d93a1e6d557d69a7e383afe5d94f8b6caa","compiler-rt/test/BlocksRuntime/makefile":"d996a1e67143d81a7081d88342062639b9f0c783d5875eff1a5a6f924cd0683c","compiler-rt/test/BlocksRuntime/modglobal.c":"b59e38cf658250599cd92f4b0ba4308a4f815b83ab5433f47c13c108aa70a67b","compiler-rt/test/BlocksRuntime/nestedimport.c":"f5e2f17707946be41a7f47c5b265b229e21b34c8151b62081ca663fea4941a59","compiler-rt/test/BlocksRuntime/nullblockisa.c":"473e6529af6b2c7f32dcc43660bb9c13234f54b8322fa6a9830e94f29aff42ae","compiler-rt/test/BlocksRuntime/objectRRGC.c":"62320e4059598ddd7db52564031dfffd73797ecab17352f3c831293302e0c765","compiler-rt/test/BlocksRuntime/objectassign.c":"42e7f4084008e0757dc11f531303520b3d2cc69e53208e31d4bd438bf490faa3","compiler-rt/test/BlocksRuntime/orbars.c":"eff578332c9895bfb6f3583a799ffee7c920c77f3770dd2e8eb68006c3efbf60","compiler-rt/test/BlocksRuntime/rdar6396238.c":"e94e6658f7549b7e39979e543b18005c92bd61d2fd2993714f4357111f98298c","compiler-rt/test/BlocksRuntime/rdar6405500.c":"9d12447bedfcd664d9ecdf5a895b4ec7e3633f6f0970bb21b38f4b99efc4cf37","compiler-rt/test/BlocksRuntime/rdar6414583.c":"1087db49bcf94b92636e59402b80d14d595b7bbdd04c9d0ecd4077472c8b095c","compiler-rt/test/BlocksRuntime/recursive-block.c":"a07da4ff771d378565f6a45340b1a571d3750928247caffc5b962636ce874cd4","compiler-rt/test/BlocksRuntime/recursive-test.c":"b26749ddde4902be6a0e9c177f28a36f8af896150d7720ba085a16102b08278c","compiler-rt/test/BlocksRuntime/recursiveassign.c":"b517d37559d32ad749e0835e5323fb2544d22998e2d15ead913a9d51b6488172","compiler-rt/test/BlocksRuntime/reference.C":"7f1aca477092bdc70155f1384dcb66ac0285e5c178d2cc2f66e5b0e2bce98984","compiler-rt/test/BlocksRuntime/rettypepromotion.c":"a503f34645345a25492c4e2e43270bb2bfd21a1b99e612c8296d4618dc5c5a89","compiler-rt/test/BlocksRuntime/returnfunctionptr.c":"dee535f279c2efeac9f405b7619e360e2f9cb1c6f2e6350b4e64f9eb87f997d1","compiler-rt/test/BlocksRuntime/shorthandexpression.c":"6a9262753a1bb8455efd7c5572494e69734b1ccdfbea9b2e01734393965a7088","compiler-rt/test/BlocksRuntime/sizeof.c":"0820adcf3dacaae3e93cfa27aef650e19d522e61782345c602f6aaab1f124271","compiler-rt/test/BlocksRuntime/small-struct.c":"23bc259e9b5598446ced3bd2ecde34cfe7724e4c8be3dc4a46b5b29c3e916cff","compiler-rt/test/BlocksRuntime/structmember.c":"10f5ea01a882426c11c01a4bdd2cf2d19392de50f6dfd5cade5947f32f08e556","compiler-rt/test/BlocksRuntime/testfilerunner.h":"80fd789e8485ada859f35504b9c57536cf28e6945f4f5885621c79fe7335b285","compiler-rt/test/BlocksRuntime/testfilerunner.m":"123d965e4389d15656c188051ea486b4c538f3df37f036a604c196510b22e37c","compiler-rt/test/BlocksRuntime/varargs-bad-assign.c":"dfe8ce3c9ac5f2e75bcf8e522b823472b2ed4dc08dd0e1a1b02a31ac3c7e909f","compiler-rt/test/BlocksRuntime/varargs.c":"95da62d6dc450d3c7df99c04a40a496291a6cc10e51699bdd7506e1a45c88504","compiler-rt/test/BlocksRuntime/variadic.c":"de4aa6a7a0cd3439a26b9aa54c28e7f6edfb93f75a802455f0201833273d5963","compiler-rt/test/BlocksRuntime/voidarg.c":"b3c702b49645add456c07260ac3c7e2ecb841c3ca4ac74a260f2da1c5363c4af","compiler-rt/test/CMakeLists.txt":"3895ff1dfbe58f29d780ea5a20429fc4c7696dc4aaa292270c4677ad9811cef2","compiler-rt/test/asan/CMakeLists.txt":"2162e47bbaad628bbaea8fce344d912340cf7b9e0186e1d5cce14d498c210f26","compiler-rt/test/asan/TestCases/Android/lit.local.cfg":"49d9ed17ed24f2134c1d641befd6ec89bdfab8564f4e088f18582b5b03a59677","compiler-rt/test/asan/TestCases/Darwin/abort_on_error.cc":"bb5495fc6911e96a2541f3150d936c6631951d97a5fdf6286609ec3ff802895a","compiler-rt/test/asan/TestCases/Darwin/address-range-limit.mm":"8f0edccbddb3a2bbed2163920c102948eddbb1f45b79470f45de8744b19c9837","compiler-rt/test/asan/TestCases/Darwin/asan_gen_prefixes.cc":"5575efee5702efc036b9361ae50e846942d3466b171efdc574384b9ec6331bd3","compiler-rt/test/asan/TestCases/Darwin/atos-symbolizer-dyld-root-path.cc":"a31f85101d181751487e63fe2e149ad5cd0ea8a3b178c2d22e8108766bc14043","compiler-rt/test/asan/TestCases/Darwin/atos-symbolizer.cc":"c9c189c165ea88fc3cd4884470f5b906e46ae77d27b5e45b8738331aa8aac71c","compiler-rt/test/asan/TestCases/Darwin/crashlog-stacktraces.c":"829d7bbc5bcf1f8c1a2400266e6d638be2a6bf30ca5754bed99ba9a0b4c1541b","compiler-rt/test/asan/TestCases/Darwin/cstring_literals_regtest.mm":"a5db583dc0cd2037b943a8843e332fde6119e2a7b7840840c1b77ae273ee1f61","compiler-rt/test/asan/TestCases/Darwin/cstring_section.c":"d0783b81eb2a3d7fbe9da2ec915e29f22eb02555c7a0bb0bd3ba57fa86154296","compiler-rt/test/asan/TestCases/Darwin/dead-strip.c":"19a164ee77b52727a7b99321ea6100bd662b57d43091ebe3d4cebf7693bd9e9e","compiler-rt/test/asan/TestCases/Darwin/dladdr-demangling.cc":"4b8ba809d37f75963d5267684fb4e1b5651655ac64fa5a2918a6324bcd5c7413","compiler-rt/test/asan/TestCases/Darwin/dump_registers.cc":"f8734b38151bb935a0982e88168cf6e74d731067f291098976506f1739ca7599","compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cc":"35a659dc969c7bee8f7f3f975ae5dfec7448da493aa7c0d7f4f726fd2300af4c","compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_remove.cc":"8fea90c77cc17c5b93cbcbaa1fe8af28155e75dab8a975ce1088a5f8e8b821a1","compiler-rt/test/asan/TestCases/Darwin/empty-section.cc":"071b75c4a3500c1295033d0dd5082f471bc6b58dc6afbc37cf9d4d1826bc87ef","compiler-rt/test/asan/TestCases/Darwin/fclose.c":"ace982feb19be2a6fda51baeb475e8d7c4b95c1e3865257e28b212812f3d76d0","compiler-rt/test/asan/TestCases/Darwin/getpwnam.c":"7211ebd6c6d59468fc31bcdbdc9258d4d754ebe932c039036967c51c29667880","compiler-rt/test/asan/TestCases/Darwin/haswell-symbolication.cc":"2f6cf79ab8e0f736cd5cd8a1c93a9718f4a2b4e5498671ba5a4df05133534c31","compiler-rt/test/asan/TestCases/Darwin/init_for_dlopen.cc":"302dff8c0fd46795f0476532961ada0c2016b052acaa33a457798b98651e5c3d","compiler-rt/test/asan/TestCases/Darwin/interface_symbols_darwin.cc":"1dcef4ecbbfabe9183d8d59d00605c5de4ed3bcd540e4b58fd094c8ebdb10c0c","compiler-rt/test/asan/TestCases/Darwin/linked-only.cc":"d9bfb6333bc8982c1b2cef6deeef5c311c285786d75899d4e727a1a378792af8","compiler-rt/test/asan/TestCases/Darwin/lit.local.cfg":"67ea8448cf3507eda12a63f0981890bfcb7959532eab5a4c303900daa5788a30","compiler-rt/test/asan/TestCases/Darwin/malloc_destroy_zone.cc":"bcfa620d941d96ce4c83ced9a55ef5c77ebdd835f0a8987938a070842cc53219","compiler-rt/test/asan/TestCases/Darwin/malloc_set_zone_name-mprotect.cc":"b7aad93f0899d8f1f57c1f4c60730e35292b9d53d3b65fd20e0e4e9eecf743a4","compiler-rt/test/asan/TestCases/Darwin/malloc_size_crash.mm":"74cfba8334af989b70c9a4d99fd303941f33313cbeb2388d1aeb364e3371077e","compiler-rt/test/asan/TestCases/Darwin/malloc_zone-protected.cc":"90c25478f3829f4b9801c9cf2b8a02a03aef4c89ff90023523966aac0255a122","compiler-rt/test/asan/TestCases/Darwin/mixing-global-constructors.cc":"53b9718c49330fd8b129d44a8f3da412faeece8cb2e2542cea074ef0d3e46fdc","compiler-rt/test/asan/TestCases/Darwin/nil-return-struct.mm":"25f1de6e380aa47c06d8213512235ea93d2c9362c755185d9f07fb656c6fda05","compiler-rt/test/asan/TestCases/Darwin/objc-odr.mm":"2963eb01b6739f30b58e457a3091f236b0d942f3ba07c7de29b0ca00d4a3902a","compiler-rt/test/asan/TestCases/Darwin/odr-lto.cc":"d0b150132647a05cbb3787a34e4629629d543452cbc2b126ee433e68983556b1","compiler-rt/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc":"28c43f6e190011a25c605a68ea8d433a480d46091b6447a1fc462990423638d2","compiler-rt/test/asan/TestCases/Darwin/sandbox-symbolizer.cc":"355847e415be2c5929782df549aa61c732906c0f472aad43b15005884f7e83e5","compiler-rt/test/asan/TestCases/Darwin/scribble.cc":"df7c86382d83be2a6dd0ee863ab98c1207089232e38cc6cebc0984a4d3bf603f","compiler-rt/test/asan/TestCases/Darwin/segv_read_write.c":"8f4f8013734d3d3b1ac10e9ff0b119a1be0187c3b6882406539163a2f1740fd7","compiler-rt/test/asan/TestCases/Darwin/suppressions-darwin.cc":"81fd00ea8335a8dc114d423f5fb69c3bd39ee6051b6f3fc16d3891828a3a01a0","compiler-rt/test/asan/TestCases/Darwin/suppressions-function.cc":"33ca20dfbf11dd7e594f8baf7594c242cbda66682034681aa52ca6907ec34352","compiler-rt/test/asan/TestCases/Darwin/suppressions-sandbox.cc":"0f921e871a1791746e45e6e2fe723d17b630b09a7c7140eab8f27c6838132361","compiler-rt/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc":"fada1962049db11305345fdacefa60e7c2c1e1bdf4557b977d8183910a1d9313","compiler-rt/test/asan/TestCases/Darwin/uuid.cc":"a302061f35da2f3e44d96e302b529f6bb13bb70ba6eab3fbef9cf70c64da43b7","compiler-rt/test/asan/TestCases/Helpers/blacklist-extra.cc":"21a09d2e916be90a5a82f291eb67c6c4121ac79e30490cb3a09f21f6b1a4a0e9","compiler-rt/test/asan/TestCases/Helpers/echo-env.cc":"47eeec3c5edc4bd773f1e366703be47a776f092b78541b6d5248cd2992dea482","compiler-rt/test/asan/TestCases/Helpers/init-order-atexit-extra.cc":"03a4f9a01d9ee3a269c7bbe252cc15b93528d4d42bf7d054f687fe513dc7b0db","compiler-rt/test/asan/TestCases/Helpers/initialization-blacklist-extra.cc":"6fb6834316b80629095d3cc21e98ad83d458f451298de2ab9e1da11db7a8e8c1","compiler-rt/test/asan/TestCases/Helpers/initialization-blacklist-extra2.cc":"1ea11d70cd1476a35f49e18e4a8c934cdfabe926deda995c0f5981e55882ce82","compiler-rt/test/asan/TestCases/Helpers/initialization-blacklist.txt":"eb848ccbccaae1523a46c4a969c945e4e58f4623317ba9a379e1cd0a6f2e17de","compiler-rt/test/asan/TestCases/Helpers/initialization-bug-extra.cc":"35ac566377881bc31117587eb26f25d2a6d4cc48e3a7868a080313d1adf3e143","compiler-rt/test/asan/TestCases/Helpers/initialization-bug-extra2.cc":"82b1ad8297d20a93b3e58d640de0a58c937b58c7dc800b952789a179d4a75fb5","compiler-rt/test/asan/TestCases/Helpers/initialization-constexpr-extra.cc":"86c8e1c4c0a7f71b74caf49fb49ba74b2c30ee3549c423a5f0c167df4d4a9f64","compiler-rt/test/asan/TestCases/Helpers/initialization-nobug-extra.cc":"7999e2662927e51541d601719d87087a983389247aef6ed11ebf74e6efb152cc","compiler-rt/test/asan/TestCases/Helpers/lit.local.cfg":"e95496aa25143645f3c76a82cabbfa7edb7e7e6342cf7c3c1cdde1a836924d16","compiler-rt/test/asan/TestCases/Helpers/underflow.cc":"3117a6e8e395627cbba004b20cbc5dc78cdabe99a049ff4064b31a2eb64ff0bc","compiler-rt/test/asan/TestCases/Linux/abort_on_error.cc":"5392aaf012b52c3c681a4549ae69d490dad7390a8c300252c393e9f0e4bc4f07","compiler-rt/test/asan/TestCases/Linux/activation-options.cc":"61da60a42330b116a8e8b365947e529021a2cad5dfb1bfee0cd5f77b06c786c6","compiler-rt/test/asan/TestCases/Linux/aligned_delete_test.cc":"6371e5fce2b3ae04f56b73bd0ee25446fcadeea235ea93bc2c548e2d9a3b8919","compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cc":"532ff2f41bb24f8a7ae9f9501f0ab9268a74b773cc2354fd3a97ff5a23e3a147","compiler-rt/test/asan/TestCases/Linux/asan-asm-stacktrace-test.cc":"093b12ad5e152b43220a4c8e568fb29d9f8e26fe82021a3c4f89ba5030226b88","compiler-rt/test/asan/TestCases/Linux/asan_default_suppressions.cc":"4adecd4ec9c245f9f990c26accf859c504e44316e323f32c9b743c8ee1b17cd2","compiler-rt/test/asan/TestCases/Linux/asan_dlopen_test.cc":"db23251ed9358d94ae0d776851a5ed710f9412e3e2efa1314135f7b6005d2344","compiler-rt/test/asan/TestCases/Linux/asan_prelink_test.cc":"9bdc7433380131b9ce3ec2a1f6ee9d470e1db793252d4df896b6fd3efa942335","compiler-rt/test/asan/TestCases/Linux/asan_preload_test-1.cc":"5e968988212145fdea66a737e82a7377062b0c639e4d5756359db4adb3d5de75","compiler-rt/test/asan/TestCases/Linux/asan_preload_test-2.cc":"bbd134cf3821ed4e5421a28b2675bfa869e4f1faa37b5481a5030313a8473bad","compiler-rt/test/asan/TestCases/Linux/asan_preload_test-3.cc":"d59e0947402d259279f8668c4689d7e57003d649b14420c9ea781d90dbcbcb22","compiler-rt/test/asan/TestCases/Linux/asan_rt_confict_test-1.cc":"48d28f0707421ffdaac2ae5a12484d4e91bb71aa94827949b42b549e28786abf","compiler-rt/test/asan/TestCases/Linux/asan_rt_confict_test-2.cc":"e9fcad098dffc7e0b9a67fbe87dfa62c701527630a4952cd3b7e083a4e2bd34c","compiler-rt/test/asan/TestCases/Linux/auto_memory_profile_test.cc":"56d03a34a67df89d588a32c2898a1e083f82f62f95ed0c10a72cfafd4e8ba66d","compiler-rt/test/asan/TestCases/Linux/calloc-preload.c":"cabe4729467744468330ef608c76cac7f416a93032ee41ae0fa2d452e70bafb2","compiler-rt/test/asan/TestCases/Linux/clang_gcc_abi.cc":"8dcd920be3064b3cf9c4f39e95dfea82d9a52e344d083b0bd415f1fafb0215df","compiler-rt/test/asan/TestCases/Linux/clone_test.cc":"564b78141be40403faa907e73068a59b17bad6b18b77d5d5ca9d57339d142a6f","compiler-rt/test/asan/TestCases/Linux/coverage-missing.cc":"e353aae756617d37bed5cefdadb4d07a45e6cab522d03fea6e7b8a8b7bbe1379","compiler-rt/test/asan/TestCases/Linux/cuda_test.cc":"0a7d3b86e9bf2951ddab62d0f0ead5327b34f7c1d653f0edc7659dedf157ebd6","compiler-rt/test/asan/TestCases/Linux/function-sections-are-bad.cc":"d040bac3e775c79806ae5bbd17483236bbebe32a4c9aa2da6c08d43f07d0209d","compiler-rt/test/asan/TestCases/Linux/global-overflow-bfd.cc":"f3f441752cbfc20b7465837cb5617bc651cfc4c62835da86f67814c0bcce927c","compiler-rt/test/asan/TestCases/Linux/global-overflow-lld.cc":"5ea7efb38be38bb18eec8b0abee49bce96800f3d8ee45b93ddb5ea3bb65fce2c","compiler-rt/test/asan/TestCases/Linux/globals-gc-sections-lld.cc":"a20571931a2a1c76160b8e69ea68fbec3cb0c65cff145f0c95d7485c2b4f4e71","compiler-rt/test/asan/TestCases/Linux/init-order-dlopen.cc":"375e909ea81b095f1ae4a256aa6725d3b583f30958a27836984105e138cc53b0","compiler-rt/test/asan/TestCases/Linux/init_fini_sections.cc":"fda46441d29515be6100bf88526b778d40011eb8b6926e4fcb39c0790a81ad67","compiler-rt/test/asan/TestCases/Linux/initialization-bug-any-order.cc":"f7bc09ad978a17e850e1b338aaa415d4429a4f3b18c6b09d06febb2e919afe05","compiler-rt/test/asan/TestCases/Linux/interception_malloc_test.cc":"04f9fa9a0ac397d4141bd7ffd16c763c65792ecb4780d694600d211f68ea4db5","compiler-rt/test/asan/TestCases/Linux/interception_readdir_r_test.cc":"5bb4fda6ccd23e93c4194ae2378c3b78c7574f07725a1f27c2fe1b7906954c80","compiler-rt/test/asan/TestCases/Linux/interception_test.cc":"f4267fc926240471012197889296ad474cfb8425836f985bc4c2e023ace6fce1","compiler-rt/test/asan/TestCases/Linux/interface_symbols_linux.cc":"c599c90889303a9c6a875b3e8d68b583b860b6bd4b829c11a7bdce1381ab028b","compiler-rt/test/asan/TestCases/Linux/kernel-area.cc":"8097c3c407e5745a864c6a78c87ac51c0e532961b92bc734e04e8d15c3bdcd7e","compiler-rt/test/asan/TestCases/Linux/leak.cc":"677613fd5e361f0af01e0e55db9b2d29430e53c73670ae11ea63d41556dbcfa5","compiler-rt/test/asan/TestCases/Linux/leak_check_segv.cc":"f57b0c42f08fd2cf40f1f050604f6ee1d9c232aaa918cd3d80267d805af06062","compiler-rt/test/asan/TestCases/Linux/lit.local.cfg":"752f9f465d546875972dbfeb1fce9b5ecdfa3ab1d0b6b756efb1047f93298b01","compiler-rt/test/asan/TestCases/Linux/local_alias.cc":"22b14669473f7f1c8b026c43a53781f6e4eb3e93533451337b2157b13fa372ad","compiler-rt/test/asan/TestCases/Linux/long-object-path.cc":"6ea698037f91ad1ee3df7939c3e7fc70e31c39d728e2431e2a9087f5560d3a68","compiler-rt/test/asan/TestCases/Linux/longjmp_chk.c":"b8511801e0c291373ed0649ed27efac8e83559b2be01237bc8034a8ab4e54918","compiler-rt/test/asan/TestCases/Linux/malloc-in-qsort.cc":"c6f33c58d19a9c3dfec89632a396705e1f85f33a6f5465d95d4fb8de0cf7405b","compiler-rt/test/asan/TestCases/Linux/malloc_delete_mismatch.cc":"25544ba3333348c68756b7c80bac208a6a1ed9a4879a7d5aba84b014c1861f99","compiler-rt/test/asan/TestCases/Linux/memmem_test.cc":"c783aae5ce9f3f396b72be20a582cfce5faf364cd608ecf37a7d362ace5fd037","compiler-rt/test/asan/TestCases/Linux/mincore.cc":"1b627bb23a1e3cd6fabb9325399bbea81938120fe2daa5a9824059cfe751f586","compiler-rt/test/asan/TestCases/Linux/new_delete_mismatch.cc":"b3449870fbcc96e23946e613a4def44e423f403bcfb6d02f7aa6cafd0c11fdf1","compiler-rt/test/asan/TestCases/Linux/new_delete_mismatch_global.cc":"d069ba303d98db053013b2f581f56e8e3c3f0fa0f86d2f75c18efd96f21d7792","compiler-rt/test/asan/TestCases/Linux/new_delete_mismatch_stack.cc":"b60e60908ac163d41baae6d71456e633ec5c37ed0f4d8ee6927c83193b1ce0c3","compiler-rt/test/asan/TestCases/Linux/nohugepage_test.cc":"4b65f14146296f47aa187f9e6c42c08c70670a1e1ec803785d1a7bd7111cdd0d","compiler-rt/test/asan/TestCases/Linux/odr-violation.cc":"31b06c217907c38d242e74e28577a6b9d7d26362e5a3ef7853f66a68171df669","compiler-rt/test/asan/TestCases/Linux/odr-vtable.cc":"b2cdb17d035f4031b4ab679366db2fc5644b0f78bcfd567b548c2d9cbeb989c4","compiler-rt/test/asan/TestCases/Linux/odr_c_test.c":"453cd017ff188c558bf044bc7c30e2b5efd96807c09942372aa3a2c44c816ed1","compiler-rt/test/asan/TestCases/Linux/odr_indicators.cc":"65a94d585466f951af12c9702fe7730a21380845f706a1b33f938c6ac3f00efb","compiler-rt/test/asan/TestCases/Linux/overflow-in-qsort.cc":"bb074c65b4ecffabe037293f1c3b55cf9ab45963c21d0051333d10278f77708a","compiler-rt/test/asan/TestCases/Linux/preinit_test.cc":"b475862991a11828dbc45578e19336fe5e5ae7f6f05681e5c3d5f593862515ff","compiler-rt/test/asan/TestCases/Linux/preinstalled_signal.cc":"fdeb8c6261c7ab770a663765b3be61c17169ae03eb62da32c80c40e96874e685","compiler-rt/test/asan/TestCases/Linux/print_memory_profile_test.cc":"ef1560b20e925cf56e79d60123e262a7f0f67cd0582523e142a9243b20f93b28","compiler-rt/test/asan/TestCases/Linux/printf-fortify-1.c":"6f2b45f9305bbc0720d407b466e4d36c9fb53f066249a413d1da523ee34864b9","compiler-rt/test/asan/TestCases/Linux/printf-fortify-2.c":"aa978cbacb49477ee040e6d1ac83dcc90cb0ecc451c6bac8273bd94de5c75c2c","compiler-rt/test/asan/TestCases/Linux/printf-fortify-3.c":"9d1e495e0dadc18c80386ebe4b1c7315cc5f5756070e08e131b4219150812d99","compiler-rt/test/asan/TestCases/Linux/printf-fortify-4.c":"aabc8c7c2345c239ea4995ce4fa97f188a5cbc318038ff81629a8f7bb1a42685","compiler-rt/test/asan/TestCases/Linux/printf-fortify-5.c":"c26bc8cd92471672576d2564f0ef3d3e5d8aed789bba30f89992a7c88e4f42af","compiler-rt/test/asan/TestCases/Linux/pthread_create_from_constructor.cc":"0b45a246663cc70da5e38eac23104925af03a550884fcd5a177ea65553d7a176","compiler-rt/test/asan/TestCases/Linux/pthread_create_version.cc":"08ca4b98ebee5708ff991cdeb5453555b8149ca6682f9305bb8265f71a2defe6","compiler-rt/test/asan/TestCases/Linux/ptrace.cc":"d78813be0ab3e5192622de164c414ffde8f1b8c56e2462f39104d0a94d359333","compiler-rt/test/asan/TestCases/Linux/quarantine_size_mb.cc":"f418087a2200a67deb297087a9deb49d663b4a7617162e6b2b6d8bd0f50bffa6","compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c":"9793dcfa5382825d7a57e250f3fa80e452d9d3624fbc39959f3b182ca2408a7b","compiler-rt/test/asan/TestCases/Linux/recoverable-lsan.cc":"c8b1930755553de375aa1bb5cd12a90b8da01993ce4a666e0dd7216fbae703a8","compiler-rt/test/asan/TestCases/Linux/recvfrom.cc":"1f238a845a16e1903d7829822712df13e759a0c96c66f23dd21ecfa6f691da39","compiler-rt/test/asan/TestCases/Linux/release_to_os_test.cc":"a25a72ec6abb3ea453d1b3adddfcf5e2fb11863309e62713a67e1514ed8a492c","compiler-rt/test/asan/TestCases/Linux/rlimit_mmap_test.cc":"431a8769b575ea828a4d1b1cd405a854db7cd487eae27ba2895a99790a2e1b83","compiler-rt/test/asan/TestCases/Linux/sanbox_read_proc_self_maps_test.cc":"5cb3208797ddf62559ad2f401143f4aabbf90963de251934c93e577c786a59ad","compiler-rt/test/asan/TestCases/Linux/segv_read_write.c":"94a5cac6c2f8b440f2898a7e6c954501a9d7ceb396fd51fc5cb81a0e7f573538","compiler-rt/test/asan/TestCases/Linux/shmctl.cc":"19c41585c298efaf1a8eda021910dd20311d2863e6753117f144f468cdedee8b","compiler-rt/test/asan/TestCases/Linux/signal_during_stop_the_world.cc":"1f64ae548c443d86167d84caf03b09db12d263dfc4dc5e55a10e53f72adc7e59","compiler-rt/test/asan/TestCases/Linux/sized_delete_test.cc":"2b8e8c0f08401c30433850ce15e043aa345af17843ca2ed5fa994c6b153b919b","compiler-rt/test/asan/TestCases/Linux/stack-overflow-recovery-mode.cc":"386a79fb828cad8fa5277072ea963e4a80f1ba298caee1fd64bf01a5d7e6bc41","compiler-rt/test/asan/TestCases/Linux/stack-overflow-sigbus.cc":"aa12690676ba706a39169f9d44dc7a4cfdf0da9af81ea13c6a600e466efe6422","compiler-rt/test/asan/TestCases/Linux/stack-trace-dlclose.cc":"018f84bfd44ac7f5cdb2a2f8426ecedc3917c55f3a21881d904b7d5c024785d1","compiler-rt/test/asan/TestCases/Linux/static_tls.cc":"3b584c9a115f9de01cafef95d31661e2ce643837107fb8d6147a3b997f2a633a","compiler-rt/test/asan/TestCases/Linux/stress_dtls.c":"cf09540a4019933d510ec5f99259ce971dcedf2370863fa033a2a0cbacfb9345","compiler-rt/test/asan/TestCases/Linux/swapcontext_annotation.cc":"8e6e9ba4ac8293a3f90ff136107f62b0241a5eae04f5b51a578f7c179acb2aa3","compiler-rt/test/asan/TestCases/Linux/swapcontext_test.cc":"2a8bb1c6d9f1810c2191404e83ad26b2199aac7caddeaccf34c2b10f91fd9b88","compiler-rt/test/asan/TestCases/Linux/syscalls.cc":"f319f29bb692429fa3e0ca5e0e7bcc551c03d06f063ac45b3dd6dd75d78bfeeb","compiler-rt/test/asan/TestCases/Linux/textdomain.c":"841eb84f8595c776b68ef8f2a82375e233cce1102b69f1341b3cee63c2577407","compiler-rt/test/asan/TestCases/Linux/thread_local_quarantine_pthread_join.cc":"04119797f2473e39354bad08212f3b558a79bcb493dffb0be951000af5ef8838","compiler-rt/test/asan/TestCases/Linux/thread_local_quarantine_size_kb.cc":"bb614a842f9de0e7afd0e498878bf8c5e67fb4180a76cb208d4086c945d51861","compiler-rt/test/asan/TestCases/Linux/uar_signals.cc":"09fa276d196d9d99f90bc2c5ba6c2d3db963c1cf7a71093133a416fe4e65dc0e","compiler-rt/test/asan/TestCases/Linux/unpoison_tls.cc":"7d7223ac8e424d8b84c1dc95e92fd615d76b541b7af5c75c0af7bdb95635a01e","compiler-rt/test/asan/TestCases/Posix/asan-sigbus.cpp":"e0d85524fc1eff666f9b2952d1a686a60b413fdb2e43d47b736d81d61e972068","compiler-rt/test/asan/TestCases/Posix/asan-symbolize-bad-path.cc":"626c1345f46d7798b755199d78afc67694b5856b08529ffd0cda9ebdeec071b6","compiler-rt/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cc":"28c0325cc2b8f4dcaf46a8970d58c1c3e4510a97ac431e30803dfd68043c4627","compiler-rt/test/asan/TestCases/Posix/asprintf.cc":"08f07e5933cc2ba14f2e615f06cd990366732102fb912c9bd8400acda98b83fa","compiler-rt/test/asan/TestCases/Posix/assign_large_valloc_to_global.cc":"71a38bac40bf208d69ad579bf42f8cbf81350fcb1ba371b818c922da8be873cd","compiler-rt/test/asan/TestCases/Posix/closed-fds.cc":"0d613a64ab468ddc6df9946d70fb87d53b41baf8333328d84352118a11158c41","compiler-rt/test/asan/TestCases/Posix/concurrent_overflow.cc":"abfb11853dc3e371bd9b3e5a0fafe8eae98b4a75e7d433fb61dfcd957935f003","compiler-rt/test/asan/TestCases/Posix/coverage-fork.cc":"f7dd9feddd3b349ab3af6cadaad109e9e8cb8e16fbe7a7e5af56a819177f9055","compiler-rt/test/asan/TestCases/Posix/coverage-module-unloaded.cc":"583b47935b7b0172f55e598b8c92f43bef04b765b9b95ecbeb1ffb54435a61da","compiler-rt/test/asan/TestCases/Posix/coverage-reset.cc":"77ed8eacdf65df0f3a88c501bf0f59b9b8453186ab5b93d7dfeb44056d386ffc","compiler-rt/test/asan/TestCases/Posix/coverage.cc":"47e83ef148ebe2c4df0083858f266ab22c90ccf155a87e60d530bd3b2bddd7ba","compiler-rt/test/asan/TestCases/Posix/current_allocated_bytes.cc":"12ff4ba221731e5b1e68780f2adc825c78642e5a2dfe9ec2f088207c1a104cf8","compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cc":"10e875810f6871ba43464b1e06b419e15b1141b27986138e5d7f00641a58a711","compiler-rt/test/asan/TestCases/Posix/deep_thread_stack.cc":"ceade360eae87123b9ba32e60b0e9be1d01df91b1c359afd0bd1c057d3fdbba1","compiler-rt/test/asan/TestCases/Posix/dlclose-test.cc":"6cc294c1b5616743507999039b14773c77ff0bb67baace137af1c2b9bf33389b","compiler-rt/test/asan/TestCases/Posix/fgets_fputs.cc":"c96cc05971b0cacfa01e8f727ea0edc717c92e3b518d082e06a00ed155737a5b","compiler-rt/test/asan/TestCases/Posix/fread_fwrite.cc":"02a7723ab4f024e0071dbddd423cefc4e6c3509aa5e6be6e7fa8f3e77a259bba","compiler-rt/test/asan/TestCases/Posix/free_hook_realloc.cc":"d05300f0bdc1c1556dbd54c6956eb164fdf3d6d27915e8cf2814b9b4729fdb8b","compiler-rt/test/asan/TestCases/Posix/freopen.cc":"6097f7c6e14c9c0fb9226d80ad06439b5d12eca72774ff0805311e7d8ca97647","compiler-rt/test/asan/TestCases/Posix/gc-test.cc":"292754756a6470bbc153236874452724bb9f2f2e8f8ec8b8f8b73f14dcf6789e","compiler-rt/test/asan/TestCases/Posix/glob.cc":"b93711d2294691e199217941c069022d656216ff07c43fe4ce6a804422d3332a","compiler-rt/test/asan/TestCases/Posix/glob_test_root/aa":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/asan/TestCases/Posix/glob_test_root/ab":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/asan/TestCases/Posix/glob_test_root/ba":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/asan/TestCases/Posix/global-registration.c":"de2982b8d1d59884bea697e6d6e7489a7e8262804e6322d9e50a588452981f82","compiler-rt/test/asan/TestCases/Posix/halt_on_error-signals.c":"d7065f900ff91f4f0fb3b1ac077bae5d60c0ff3045e452612810aebc226e8fe2","compiler-rt/test/asan/TestCases/Posix/halt_on_error-torture.cc":"99c3895ceea9a2cebef0f2a39156e2b8c4030a972ef73c4d6fc672e29df69445","compiler-rt/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc":"03b9120045c82d1346866e1c526f0df72634917c03dd610b10e284b80aff7947","compiler-rt/test/asan/TestCases/Posix/handle_abort_on_error.cc":"866636dde2d3bc03d71485dcf644e066c8a93c0929376d86a0012b9b7d2f603b","compiler-rt/test/asan/TestCases/Posix/init-order-pthread-create.cc":"a7f2bdc75ff5312f800fdc3e0f886655ee54a94e847137a29600095b5440cde8","compiler-rt/test/asan/TestCases/Posix/interception-in-shared-lib-test.cc":"1d74ab34735b3a96dd3bce60ab48a6fcc077e5377d8e4cb4486796b0081f1a1c","compiler-rt/test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cc":"98b429a9d086dee1d73fcc53ba3b538b19c9c805f063745be0fa2cc10d4047fc","compiler-rt/test/asan/TestCases/Posix/ioctl.cc":"a9ad018d64b7cf3303b3402299a7747c7ddee9c55ee0ffc7a2c6f6d00c3cb998","compiler-rt/test/asan/TestCases/Posix/large_allocator_unpoisons_on_free.cc":"8190d810fc4cb35493bcf8a5433617c711411b91c533de78fe8f3da7e43086d2","compiler-rt/test/asan/TestCases/Posix/lit.local.cfg":"3c6afec951edaa5e426ac1590d3e67e4136b5ce61803cabf17f3c775a7279daa","compiler-rt/test/asan/TestCases/Posix/log_path_fork_test.cc.disabled":"42cfbccf92a854fe17a115d21196069e85ab78cddfa4b3bc39a9b42fc0c1caef","compiler-rt/test/asan/TestCases/Posix/lto-constmerge-odr.cc":"b94e7a7176b63ffd68a8bc17974ef829daf31ca7800cb5eef26325c7a8596b95","compiler-rt/test/asan/TestCases/Posix/mmap_limit_mb.cc":"a0e8b1b2287ade3b61c7516bb9bfb71234e7bb18b3de1a4d91983d4d2e417058","compiler-rt/test/asan/TestCases/Posix/new_array_cookie_test.cc":"6b8bed6336522f7e7ebe117c8a47750ee49ed6250ea0cf2210fff4a42e492aa0","compiler-rt/test/asan/TestCases/Posix/new_array_cookie_uaf_test.cc":"c6a7e5e85d7ff4efffcf91363fc57046eba9515d69f0b3f5a30fecc8ee35229a","compiler-rt/test/asan/TestCases/Posix/new_array_cookie_with_new_from_class.cc":"9eefa092df84bb5a45bf78efdaea027e7c40a33f55e38a5f2f2614bc5a7122db","compiler-rt/test/asan/TestCases/Posix/no-fd.cc":"f700f67101438834d0f73cf4d5501c1c4c2e994d672b9dc498eb7ddbd82b558e","compiler-rt/test/asan/TestCases/Posix/no_asan_gen_globals.c":"38572792b07a6bd4387b3fcfa7516860fa04913f391579fd11d7ce3bfa219293","compiler-rt/test/asan/TestCases/Posix/print_cmdline.cc":"f713bae6b244578b1744e7d69a9a320f976e810a2cd5c4ce9da2733dcf849bf7","compiler-rt/test/asan/TestCases/Posix/readv.cc":"922b0c06aa013c9488d37859616c00e74c241365335c1d5fecf02b36fe542c54","compiler-rt/test/asan/TestCases/Posix/shared-lib-test.cc":"a5e5ba5cdeb28166538bb3d22358109721f0a6b33204a988380f4ab1992441ab","compiler-rt/test/asan/TestCases/Posix/stack-overflow.cc":"82ca83fb092b14fd94cb563ea745c4c4fc58ed8cb702524ec44561f1daa5640a","compiler-rt/test/asan/TestCases/Posix/stack-use-after-return.cc":"7e7ff62fde5658fc170aa51f1b041e74ef937a10a7f450bb1c3e3b26873113fe","compiler-rt/test/asan/TestCases/Posix/start-deactivated.cc":"2cd4b753453867550e3a72e3eeab34b76be22dd84e18a00d818d271f0d5f7a69","compiler-rt/test/asan/TestCases/Posix/strchr.c":"83f226dbdc9a9e8afd594c4cd8e9272e7b3cb16c66c8189f687ca19ae876dc7b","compiler-rt/test/asan/TestCases/Posix/strerror_r_test.cc":"ebc43446c342247e742f23156355129cb43304092a96adb981be1d966eefd831","compiler-rt/test/asan/TestCases/Posix/strndup_oob_test.cc":"1015ca07d813efa51a37a6f68bd42f4ed85213777e8cd7c1f52583b1d463e3cd","compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cc":"4e2d20d584a6e59fff24d3eb123ef0155b13ab87ebd7a107245cf275a781472f","compiler-rt/test/asan/TestCases/Posix/tsd_dtor_leak.cc":"1d376582762ded1ac4ac8a8720a2ddf90e5fe08d1703800d329c5cb0dabc31b0","compiler-rt/test/asan/TestCases/Posix/wait.cc":"c46b2ff7937a37d1a5c886504a28eb09768fe131639d7a80381abf0dd9db15d1","compiler-rt/test/asan/TestCases/Posix/wait3.cc":"a920197d523187dc6fcbd7e2e2cf0bef7b703886468ed70ae11053213672b145","compiler-rt/test/asan/TestCases/Posix/wait4.cc":"26142eab308e3ec4042b2a1fe50393f0496e2755919c80d4476406e3e920ac89","compiler-rt/test/asan/TestCases/Posix/waitid.cc":"8769be4053751683f5da062c00091dee0d09b55667df1f448d9e150ef2ee53de","compiler-rt/test/asan/TestCases/Windows/aligned_mallocs.cc":"589cce5ffff6eb4e294597e685a6e354e285b3403dd0fc1e2c1e2af84596041e","compiler-rt/test/asan/TestCases/Windows/allocators_sanity.cc":"b7a133a0b7067a91899495e5d83abc2ae8d2e6b3f16cd98b153c094947c872bd","compiler-rt/test/asan/TestCases/Windows/beginthreadex.cc":"7abde4af8599d4af165ee0391d740c2b6607a32663195c21fcf496fe0c67b360","compiler-rt/test/asan/TestCases/Windows/bind_io_completion_callback.cc":"34642e32ff3134259ecad00f3f528030c34e316b6a2251939c6f2c99e000d3bd","compiler-rt/test/asan/TestCases/Windows/bitfield.cc":"3d7f24cc024babdf58212f08ffa165364a5099593191d1d1b7dbb9f36b8d8c0d","compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cc":"95e68a9a5bcf717f8c69323d9d128f89f147dae7d4d4b494ae51ef5b57add33e","compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cc":"64d7eba40b297fc1e730f8057338be207c6410eb77bfac35d25b421766029e18","compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cc":"2e75d50162c5ecdd028c71146589bb1fff979c8543fa2d593283eaf95ab71167","compiler-rt/test/asan/TestCases/Windows/calloc_uaf.cc":"03ec87825af3d690fa5f6b7ab07637d6f4e932a779e29b63bca9e76d70e83c5c","compiler-rt/test/asan/TestCases/Windows/coverage-basic.cc":"3eb1d5b0ff038bb7a940f92c001fef2f49a8dc7316e1d07dc6cded579e9ab046","compiler-rt/test/asan/TestCases/Windows/coverage-dll-stdio.cc":"4cf5c7ecbe1a7532d5375fe512aa397722f56daaa44b28c98eb2eca16f2b7ba4","compiler-rt/test/asan/TestCases/Windows/crash_read_write.cc":"9b85e1a45d61d3606e2c1fea37c3ddfd460a60622d2d1b094dbcbd120310c11f","compiler-rt/test/asan/TestCases/Windows/crt_initializers.cc":"2618d79746f2f32738182cb5f341a7c8f7c8da1fc05a0906b39aa517b3422271","compiler-rt/test/asan/TestCases/Windows/delay_dbghelp.cc":"29933132a43d9c43b40362a07d39ad98bc479a688ab4dd2a6e1267bd4828ea40","compiler-rt/test/asan/TestCases/Windows/demangled_names.cc":"918685c66162399bd933fa46f8e5ab64e9db11d49b5dc80a687a0d8e85c3b9fe","compiler-rt/test/asan/TestCases/Windows/dll_aligned_mallocs.cc":"57745be417016a16c7ef8710ed0ecf588fe2cf98e7043775ea922d235bc428de","compiler-rt/test/asan/TestCases/Windows/dll_allocators_sanity.cc":"4eef4ba3949251d44d8266e590ad532e26db72bafec86bee073ea377054fd98f","compiler-rt/test/asan/TestCases/Windows/dll_and_lib.cc":"39cc337657a27a36147a127151c3a29e84426488d26d37876ff5df043064badf","compiler-rt/test/asan/TestCases/Windows/dll_cerr.cc":"8b5601e6d04e37c2aca5d0bfe57ca7d8271ac124bd97e7110ef3f22b290d028b","compiler-rt/test/asan/TestCases/Windows/dll_control_c.cc":"34b5f1c30e3a9b5c897dd405e66e2beeb19098b30b54490b752cbc7074c7ab94","compiler-rt/test/asan/TestCases/Windows/dll_global_dead_strip.c":"963afe69f43cda480e20cc24bc9bb3a92f668f48bfea561e43d7855de23d43f2","compiler-rt/test/asan/TestCases/Windows/dll_heap_allocation.cc":"734262a896cb8566cb44c2e531377c2fc73898a3c6f0eeb8a3501b6b6e49ff1d","compiler-rt/test/asan/TestCases/Windows/dll_host.cc":"5c3cacafb592811090d45ef1bb434a124fe07faf48cf3dcb329ca9d33d68109b","compiler-rt/test/asan/TestCases/Windows/dll_intercept_memchr.cc":"581b6ccf99676d819260e4c2cd554d21342bfec4ad4c1c21c71984db48b35c58","compiler-rt/test/asan/TestCases/Windows/dll_intercept_memcpy.cc":"9b77cc3cc9a41dbbca3736a3d8f6288b3a7959279d5e7d0be076b6be3a5c29bd","compiler-rt/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cc":"09a9e226a73bbc77e49d28bcdc28eddd9fad4516bc8cfb70d7094fd0e13715fc","compiler-rt/test/asan/TestCases/Windows/dll_intercept_memset.cc":"27748b0604bf39379231b6d7ca8a45a99e200a01aa597548f67aa4c46300719a","compiler-rt/test/asan/TestCases/Windows/dll_intercept_strlen.cc":"e1a929fae28717ea2a079dc6ac14591e667e8cd9db5403e02a3dacb3df945723","compiler-rt/test/asan/TestCases/Windows/dll_large_function.cc":"0398af627a324f79712c37efde98b32e8e6353625734a6bce782508f752c5675","compiler-rt/test/asan/TestCases/Windows/dll_malloc_left_oob.cc":"c4c2d5dbd008b34afea5b277e0da32f40da6bd5bde3a5f043708be430dd0db9f","compiler-rt/test/asan/TestCases/Windows/dll_malloc_uaf.cc":"bbdccbe2fd01016ef89ced3fe8e19a9079b035f0ff3c6d4011075c2b901cc502","compiler-rt/test/asan/TestCases/Windows/dll_noreturn.cc":"273afd9aef20ef62f6994259ae7d4078d5cfc7d1e991472e71929e68668b1a62","compiler-rt/test/asan/TestCases/Windows/dll_null_deref.cc":"a86acadb06b8f1005b2e02a272b2776568d7f27b0aa9823ebc02af0b6c18f931","compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc":"9613d6fe648d623cb1a17cf75f46fd5edd22c69380ff831ebf3036da82215c56","compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc":"92c94358cbb1557fb74657bc50776521fb6b910f9f39870b2e97454a256e69d4","compiler-rt/test/asan/TestCases/Windows/dll_poison_unpoison.cc":"47a946e4df962526b06d7affe7f3e3da7ed319362783c551bbf2d144756efdbc","compiler-rt/test/asan/TestCases/Windows/dll_report_globals_symbolization_at_startup.cc":"20ad7670ec7d6b478b37abb98424a50ee00840a2bcad860ad57e0a552e7127a2","compiler-rt/test/asan/TestCases/Windows/dll_seh.cc":"eda3d5d1620aa235ac09b2c3498daaaf4e5769cd1e258b9243fa8123c88df521","compiler-rt/test/asan/TestCases/Windows/dll_stack_use_after_return.cc":"45966a12120813eb170b669df14fd1faefb1bf802b7afcdec1af4538d07556e7","compiler-rt/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc":"aece7df35aad39042508ff5ad97f2eba5d45166e5c575dc799e7ec6755da354a","compiler-rt/test/asan/TestCases/Windows/double_free.cc":"5a4dc55721620d6394b21785277818ae00d4981a7b5f1625d172fadd73a4535c","compiler-rt/test/asan/TestCases/Windows/double_operator_delete.cc":"05e64ba3f12f0bd6149083b3b5dd9bcbe287c29218c68c0fdc666ad2017a04db","compiler-rt/test/asan/TestCases/Windows/free_hook_realloc.cc":"d00665c6a09b7e585ac9878ad7c1ca55efe63fb3bcecab74263b2eaab4a78bf5","compiler-rt/test/asan/TestCases/Windows/fuse-lld-globals.cc":"ad4ff3ef46c2608f51b1394563a8231e2032812647f372c746917226f00dae56","compiler-rt/test/asan/TestCases/Windows/fuse-lld.cc":"605ccadf4fc23a403d274763e4c6f19bba1ccbdcdd25d6bcf2a559681338fefe","compiler-rt/test/asan/TestCases/Windows/global_const_string.cc":"fe810d0c05551d0c582228b89e3d4ca35992433c982746b52486ce98203444c2","compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cc":"5df748916191496d1b941d5468557d83359876d9fda9e6b67f33b660f26345d5","compiler-rt/test/asan/TestCases/Windows/global_dead_strip.c":"33020f65f4c4f01ba02ab4cc4243baffe249b5847dcd99541096211164d1de2e","compiler-rt/test/asan/TestCases/Windows/hello_world.cc":"49826859a6f0c823640308294e61316c7a622cae80b67554f3c695c85ad1b610","compiler-rt/test/asan/TestCases/Windows/intercept_memcpy.cc":"64349b1215a2a7e0d05aeef18fa21bed7ab683c3650fce0b2b8ae575c68348ac","compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cc":"4af588df1dab46ce51d6308f9715080a8affd10ffacbd1593c3eb67f4837633c","compiler-rt/test/asan/TestCases/Windows/intercept_strlen.cc":"8463799ae98f34b8acd025207f2d6d3d783d5dafed8c8e9c3d5d9caf86a61680","compiler-rt/test/asan/TestCases/Windows/interface_symbols_windows.cc":"726d8ce261d55b1d2ae57b7c71a467d9cf0d8533ffd39774e3474b578be5c189","compiler-rt/test/asan/TestCases/Windows/iostream_sbo.cc":"3485bedd6795f946433046747417550bf185d6e3c89c6cd0923d17f61aad8964","compiler-rt/test/asan/TestCases/Windows/lit.local.cfg":"0e00bb6ddcb858c9d5eeed94923974e2325c1e749efef40aa728a7c76a5f6e93","compiler-rt/test/asan/TestCases/Windows/longjmp.cc":"891e4d3df2dc900d3afda74d51064bb44cb04f54253b4f5e772c664ea2115b2b","compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cc":"148eea538c0504a902f81c1db1ecfa1fffffb16e7a485cb5e17ff22c3dba197a","compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cc":"a5a9716afed7fac2941af1ae9aa46c25c40b06f255d51ef581e7b3d8b6684c00","compiler-rt/test/asan/TestCases/Windows/malloc_uaf.cc":"b211b9570502e13361f52d781fe4d2c82b51823a4f3697fb12857575676ab186","compiler-rt/test/asan/TestCases/Windows/null_deref.cc":"888350f32e6f28d29df5526ddbe7dfb8b5ba6156dae15c68f27967a11b5965ef","compiler-rt/test/asan/TestCases/Windows/null_deref_multiple_dlls.cc":"35affc0ee8f43ddb1bc569b6c7a90d7b34733699216a05e2c2a16f4daecf1b6e","compiler-rt/test/asan/TestCases/Windows/oom.cc":"14007f91c1f2b2564d72a6c75114d107b2f3f07a7ca4f938c6d66fecbae41126","compiler-rt/test/asan/TestCases/Windows/operator_array_new_left_oob.cc":"b14fc10a14540697f7004e6a7f10f6c801fed33d9c4377ace93a9cad686e622d","compiler-rt/test/asan/TestCases/Windows/operator_array_new_right_oob.cc":"cfdd2cfeee07b15fb4bd8ab833f6decb336f92848ad0cc062e306fb295ef8745","compiler-rt/test/asan/TestCases/Windows/operator_array_new_uaf.cc":"08abcf75503a1f7105009f41e0a5d7596dee7194e9d8a548e03d50fc1475ccf6","compiler-rt/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc":"be914cbb665dcbe1d1a528fe175063f805751adc058b6669a96040458a522933","compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc":"f327f00c4d4479f4f01fce9d879d3315b9f311c9ed3605b84fd5432e2b9a4340","compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cc":"1d4c1b9f9ee52974ece79a812674e29099a7bf2c795db1703079cab1ef7988e7","compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cc":"a6187ec59b025df769bb38b88909650cd253797345c5a6bedeb2625c8f402874","compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cc":"3f3c424a8797fe4c47fc9410ca4815608af70beb471f2ee9d3d261eea099fcc7","compiler-rt/test/asan/TestCases/Windows/queue_user_work_item.cc":"55a7c7fb8baa47c6f61e77a766edb94ea7e668ce8e9634767429c08f38bafcdf","compiler-rt/test/asan/TestCases/Windows/queue_user_work_item_report.cc":"ddae83f92d8abac1992409cc37114f3f8985e2d0d44faed6a214464462e014f3","compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cc":"ec3cd36dd9bbe9870a05cdd12f1c10ffc436c441d0319b71731756adb6ad74a9","compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cc":"551a97f2744bbbd0e92530e82e0b506011596eb100d5aa43c937376264be4fb3","compiler-rt/test/asan/TestCases/Windows/realloc_uaf.cc":"672ec658ae69971220a9178a33c6ee320fc7474d2ac7f3adbdb1a686382b2d7e","compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cc":"c320e480f3db137cb74dba2c1d78cdd0c945e22225d8903a37234df2c286d418","compiler-rt/test/asan/TestCases/Windows/report_globals_reload_dll.cc":"13234e7d190afbd41a9fe2c7be9f457dbab470c4051cb7132687f2d8e7b2b007","compiler-rt/test/asan/TestCases/Windows/report_globals_vs_freelibrary.cc":"4b6ff98aac3f33c8abb060cfd95fa1da2005cb17d8e90c62f93b6a56ead4b527","compiler-rt/test/asan/TestCases/Windows/seh.cc":"e72aba1ac868ea82113458e64883c1394e8d31d11cd941a8f98caf0e62862d45","compiler-rt/test/asan/TestCases/Windows/shadow_conflict_32.cc":"2d18adb857efd1295218ec425934888a142eee8290afea0e0f52a827de18fc98","compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cc":"c446ed3054bfb5b2996f27638c36836f8abff0141f2be2be02ca7ae0f9a71ddc","compiler-rt/test/asan/TestCases/Windows/stack_array_left_oob.cc":"52e58241fd7166d8ba7de0dec602436a09f175784a2c2bb0ed9d4287990b7940","compiler-rt/test/asan/TestCases/Windows/stack_array_right_oob.cc":"9d79e18acadf251a920622dbfddbcf8ffc0f5aa5bcc852be37b893138f853fd9","compiler-rt/test/asan/TestCases/Windows/stack_array_sanity.cc":"546a5ddc69aed500449e020714ca3d60dbf87e76af485b7b877c81978f901976","compiler-rt/test/asan/TestCases/Windows/stack_use_after_return.cc":"dfd64205b57cf858ca587100bb200765059d69200a57a35e0e78a88a76afa2e4","compiler-rt/test/asan/TestCases/Windows/symbols_path.cc":"920900bb72661439ddeb8404497f3b1d32a1d064893fb2b7a16f35279d592f5c","compiler-rt/test/asan/TestCases/Windows/thread_simple.cc":"d8ef9055ba68aea4558760399ce82680121565f9aade7be007a240077814f620","compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc":"9a902c8436e3cd7c8c802069935d61e546f5a6f3929d59db5bcb2d04b565c27d","compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc":"0cc17f7483d47465333f43715a64af85618e4a60e466ceb625bfc30e9c787aea","compiler-rt/test/asan/TestCases/Windows/thread_stack_reuse.cc":"cecf894707d31ddb8bd160e730e9ea296f538a9e9eb165ae46eacbd867d4ef5f","compiler-rt/test/asan/TestCases/Windows/thread_stress.cc":"4c467e907120224729793c4722ea8ecf2156ed48120f211c73a8a98b95d85b46","compiler-rt/test/asan/TestCases/Windows/thread_suspended.cc":"c32c14b918c6c8eb0a3535bcda6f5c306dd326ce17dc80782fcacb7c81b228c8","compiler-rt/test/asan/TestCases/Windows/tls_init.cc":"3d4572109ca3aedf9a36e2ddc035edcd46f907997795903b8f6e0cd3d3111a7b","compiler-rt/test/asan/TestCases/Windows/unsymbolized.cc":"a62044491aca2f21795bbfa0120690da0d26624ef3743457409e046e003b9c90","compiler-rt/test/asan/TestCases/Windows/use_after_realloc.cc":"704091b5e795bc5de3a594d4b3bc64770f8f01eba7cb62edc15ffba8be9102ca","compiler-rt/test/asan/TestCases/Windows/use_after_return_linkage.cc":"fc6c4f3aa48f49d0a9b6312e4f6dbe69a69032a98422e5c335829120c28ea8f8","compiler-rt/test/asan/TestCases/Windows/user-exception.cc":"99b912094fd580a0dc56905183b4452c3416c64dd2a0110a7126cd3ac2442e64","compiler-rt/test/asan/TestCases/Windows/windows_h.cc":"021d94947f1c6ccbd512e9c5e58ca1cde3226391cf904d0964d0dad1e6d76978","compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cc":"572e3ecfee1c0ecac6b672e2a90ff0142f72705703e3935d86c63a315b0874a8","compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_stack.cc":"70464720e2ddf591996a49862b74753fd7f8f0edda92b9eeb30b69eea35c298f","compiler-rt/test/asan/TestCases/alloca_big_alignment.cc":"aee396a3bfdb28fb4b29f6fb03c358109aed600df0a6586283419b452434c877","compiler-rt/test/asan/TestCases/alloca_constant_size.cc":"9b49857dda00254a105c1787cbb66c4c923ec0927f9ae1c489e0d59a3a33fd91","compiler-rt/test/asan/TestCases/alloca_detect_custom_size_.cc":"552cd3ca2f24b56d6f417d178d477a939f3f56dbe9ae86ebe24f637e2631e1ca","compiler-rt/test/asan/TestCases/alloca_instruments_all_paddings.cc":"b35a323874705e9eba86253eedbd7f932b9b9419d5e6cbe4f19748279e642bed","compiler-rt/test/asan/TestCases/alloca_loop_unpoisoning.cc":"781e0b357835222d52c780b8684de546a87004f0f784465a2b56d7e0350311d9","compiler-rt/test/asan/TestCases/alloca_overflow_partial.cc":"69091ece9e84a7ecd84d0190de9172b5bd6d513c0475d9da6e4fcf1e1bac4e96","compiler-rt/test/asan/TestCases/alloca_overflow_right.cc":"dce3b72b4ce90bb7f150a6970f504321fd5d4b6a6b6a8cdbec94bc836572f76d","compiler-rt/test/asan/TestCases/alloca_safe_access.cc":"537e32bbe1e58ad4d687382bb79c33aa9f652588c80afcf3e4a0f5b0b5d47297","compiler-rt/test/asan/TestCases/alloca_underflow_left.cc":"62b2fb9cf0419e2a0d0fe740fda2f4b642e4838e5b86a0b4170f3b1b57382227","compiler-rt/test/asan/TestCases/alloca_vla_interact.cc":"0d457bd907d5888bfc3ff639c4b4c5edc31fadec79cc5a029f3a9c2b54f79b1c","compiler-rt/test/asan/TestCases/asan_and_llvm_coverage_test.cc":"03bb8d1f00aec4c0e032c28e471e3f938ce50b1a03c87bf39669770092edc75b","compiler-rt/test/asan/TestCases/asan_options-help.cc":"3e0763f2040b96fd4e5cd33b519b6051043bc84f0d38a1dbc57b54799d32b261","compiler-rt/test/asan/TestCases/atexit_stats.cc":"f8dbcb87a9015792a961cc53c42dcfde21e1757ff1311a4264c1151f639dcb8b","compiler-rt/test/asan/TestCases/atoi_strict.c":"d30e93980c8c57e48d54f7fbdec60164e72a3067a309e271bda228e39d130a99","compiler-rt/test/asan/TestCases/atol_strict.c":"fb477d32198564f0ea0b1346847458ef65428ee78ea316c73386d19562335c6c","compiler-rt/test/asan/TestCases/atoll_strict.c":"781e9304fcafae74e67c2d1cea8cbf2bde7af88ccbb2b6236ac51ca76ffcd076","compiler-rt/test/asan/TestCases/blacklist.cc":"e75ada3c1bde3fff923178c733bb031e024e6cc3ddad479281c4e5a8099585a2","compiler-rt/test/asan/TestCases/calloc-overflow.cc":"17da8a4eaa2aa5f2cbe7213d4cc73c6ad15ebf2e086cd7bcbf41ffb227e6d46d","compiler-rt/test/asan/TestCases/contiguous_container.cc":"b0f94c7dafeb2491c84723e3f1bba42194b0afa4a1081c55ea29134411bca981","compiler-rt/test/asan/TestCases/contiguous_container_crash.cc":"8fced96c20fababb3e84c5a4c73040e87a4c5cac14c48086bca011807ba913a4","compiler-rt/test/asan/TestCases/coverage-and-lsan.cc":"10bf5c8f4adbb9fb111cdcd0250df2e0ba08d3c527eb07f59d48696d5d116370","compiler-rt/test/asan/TestCases/coverage-disabled.cc":"d3f66ab514b2e399ae7c026b8c3a37832222f0faf8e247178748522bd61c9dc4","compiler-rt/test/asan/TestCases/coverage-trace-pc.cc":"97cc6011711bf7743506b105c7314d24a84eebe147722772ebe3a6b8ba648d0e","compiler-rt/test/asan/TestCases/debug_double_free.cc":"45f257e4e2bd21d291e557af81e96b1c4c5b16feb7687c2e8224721f050bb01e","compiler-rt/test/asan/TestCases/debug_locate.cc":"037880af57f1da29caa352fe00419b621d4b96e9bde5e1f612b5c905e1f77525","compiler-rt/test/asan/TestCases/debug_mapping.cc":"f0ecd9f3ba14fec22d65ffb45339c6265cef2b2a579204251d7b5bb513922686","compiler-rt/test/asan/TestCases/debug_ppc64_mapping.cc":"1c6f880682330fdc0d32941a7c72c41248d051e3d51256ae4fcb684efe307deb","compiler-rt/test/asan/TestCases/debug_report.cc":"ccdcfa52600fff9ec698fa7d503de2d401f59b9f9cff90f080c311f53eee3fb5","compiler-rt/test/asan/TestCases/debug_stacks.cc":"6b062e8697114a3d2cc7afb4a5951dd7aaa13a9129191dbc757da57d48824d9e","compiler-rt/test/asan/TestCases/deep_stack_uaf.cc":"169c97ca78884e0a81079a53e197fbb81456bcf9a21aaa475096e97d1ebc01bd","compiler-rt/test/asan/TestCases/deep_tail_call.cc":"e3183c2fe82db4eef6ec4829546dc265973ae9d1d6263daf38dcfd9b121e68a3","compiler-rt/test/asan/TestCases/default_blacklist.cc":"c9a4ba9752bf89ce32465d0d94b6d8e42e8a83bc08aa3372647d13402fb7069c","compiler-rt/test/asan/TestCases/default_options.cc":"d9a1649c932b5a81a73db11267527483c1c841545a29382a09fba13d4007a2fc","compiler-rt/test/asan/TestCases/describe_address.cc":"a4b349104d1539912ee166076b05e0660dbc4c43e6daebb9a17216de74f4d1da","compiler-rt/test/asan/TestCases/double-free.cc":"c10c4c5a63d1f6c4204ea8a913cbe1b43167529c00e6d47fa69499b1c0da948a","compiler-rt/test/asan/TestCases/error_report_callback.cc":"66a23bee070741b1979988f54ac0d1b8fa4b6d482b5f35a91667647ec8050123","compiler-rt/test/asan/TestCases/exitcode.cc":"eadc611a94844fbb5ddc6ea7b4a1edf1ea4e0b7625a839b650c15e7b97456cae","compiler-rt/test/asan/TestCases/force_inline_opt0.cc":"95b2919bb055476b3104632d3e1a983e07d6b3586284b00950886b44ba2b3df8","compiler-rt/test/asan/TestCases/frexp_interceptor.cc":"b3a21dc4d7688a9ee4f35491e90166647775291086f22fcf5d6619a5544f8451","compiler-rt/test/asan/TestCases/global-address.cpp":"544aabd574efedfa08643fe81819c487e87d6d68af3cdd120ad94cde469d393e","compiler-rt/test/asan/TestCases/global-demangle.cc":"68b4548c1080c634d7a9569b127d51dc8f0a326a457441ca3b053141553b2e6a","compiler-rt/test/asan/TestCases/global-location.cc":"3a22fadcd1cd1cb6cc85a6840b5fd80b8bc535c0257602060574128b7957ca19","compiler-rt/test/asan/TestCases/global-overflow.cc":"fc5556983e7b416b410aeb80d5ef151068923686f65c072473c8e004520470cd","compiler-rt/test/asan/TestCases/global-underflow.cc":"1a067205e35548cd811244cde1a8bef7e4d28d762166623b567d4243df02df27","compiler-rt/test/asan/TestCases/halt_on_error-1.c":"2e21671a513ff231696e3d58b499f5e8ae19395763f3a4b185466d206520da5d","compiler-rt/test/asan/TestCases/handle_noreturn_bug.cc":"4dc88e40954ef09b9936482a21203561b14aa511cb5c536f9bd1260607e37a07","compiler-rt/test/asan/TestCases/heap-overflow-large.cc":"a74c53598849b679324cefa630a85c2ee65543db218f14db7578ad846753ff8d","compiler-rt/test/asan/TestCases/heap-overflow.cc":"fa81ff561dd3d7a62bd1a8b5b9384ba9c3a65f645dc815577b85b764bd394833","compiler-rt/test/asan/TestCases/heavy_uar_test.cc":"7755a363e623d5f9a28a4e5092c84e8994948b230da0fa89d51ad26117ed8e49","compiler-rt/test/asan/TestCases/huge_negative_hea_oob.cc":"3fd42949a8e8b4a70dad95804c4acc0705f94f1dce1b2d8e3c884ffc3285208e","compiler-rt/test/asan/TestCases/ill.cc":"dcaa95a9a550570e3284019de49ca32b9d420767262b9077e10d3ca82f5da4cc","compiler-rt/test/asan/TestCases/init-order-atexit.cc":"045b484b630cb3ca87d8f46d634714150d435403b613db30cda57dfd4907baa5","compiler-rt/test/asan/TestCases/initialization-blacklist.cc":"9b83b40ea9591a5ee8916cab7be3e7f941fce785f6a0a97fd2815262ca8c8127","compiler-rt/test/asan/TestCases/initialization-bug.cc":"311344b7a3b71fe39830e0e8296d05e2651c08ea1ad29097fed3e90322fad763","compiler-rt/test/asan/TestCases/initialization-constexpr.cc":"1cb5c12ac4f1f862cdf4319a4192c43b3e719fecf5bd1f294b388e903eb22aa1","compiler-rt/test/asan/TestCases/initialization-nobug.cc":"bbd2781f73483e30c041c95d88c9c75a1e34e455f3be45600d4cd21aba488629","compiler-rt/test/asan/TestCases/inline.cc":"60a029d0d806b7944b2e019b6cced08d2736981f281ce4fa32eb9d1dde5c805f","compiler-rt/test/asan/TestCases/intercept-rethrow-exception.cc":"195a5850da954640568f0316f69a3d224ada0aabb0bedcbe247046527aaca88e","compiler-rt/test/asan/TestCases/interception_failure_test.cc":"95bdfed3e572c0b17356343da0da7c9be7903375d06cba2047da2712b7a1eb80","compiler-rt/test/asan/TestCases/interface_test.cc":"6fc0a60183f7dce0951c191df2dd8d82539d33835e73220051db6cdffec0f75d","compiler-rt/test/asan/TestCases/intra-object-overflow.cc":"fd21b6d96d997c34426aba0b53a9c281ecc2ffe5bee04ee45129da1b0da5e664","compiler-rt/test/asan/TestCases/invalid-free.cc":"f43a10bf89f440fdb412fdd626dd729a0aab3a277347aea7f3ac4096e7f4d6a7","compiler-rt/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc":"cd5259c9a1dc0310508311546ffb187d60c60cfd3c7689795b6ee59d64d36186","compiler-rt/test/asan/TestCases/invalid-pointer-pairs-compare-null.cc":"327945d24e3ff381c43bfc2bb8c88fba8557db4ac2dc76ba77a2b6f8993790e0","compiler-rt/test/asan/TestCases/invalid-pointer-pairs-compare-success.cc":"ebcc297e3b8aa7f918392012148d01c98205339855f5598a0b448c3d5ba7d092","compiler-rt/test/asan/TestCases/invalid-pointer-pairs-subtract-errors.cc":"f968ec76199c7c380cc4fe9c5fc0eb2cea1e7981bf6791364bac5d29fe76715a","compiler-rt/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cc":"65058b186ad702b7cd45a74f0ccc20291115248e6d49ac0b8fcb6805813cac63","compiler-rt/test/asan/TestCases/invalid-pointer-pairs.cc":"6ba49a1ae9d1c54b3e059e962206eecd9fc02443a50d2dbaea8ac9b3f357bd8d","compiler-rt/test/asan/TestCases/large_func_test.cc":"9dcc20cc1a32e1cb0e6e2e6f6c8157120e4e25af105a88c7dc1b8de638cb451a","compiler-rt/test/asan/TestCases/log-path_test.cc":"19d5cad6fb5b9af1bf15b1840aa9bfc6b6905cf988dbf5bc3dbf2958cbf66788","compiler-rt/test/asan/TestCases/longjmp.cc":"5e8cfba11c55b4ab573d49e56e42340b09ebb8777d1bb2d0e211af1178fc40ef","compiler-rt/test/asan/TestCases/lsan_annotations.cc":"92d80d38264e6c13137f0b4f6ca4c353e6788f55f5a57a4d4779dcf1aba6382f","compiler-rt/test/asan/TestCases/malloc-no-intercept.c":"2bbfb848f361910805de489f2b2f9e3ea4ed3dcc202594370fc2c055fad1d83b","compiler-rt/test/asan/TestCases/malloc-size-too-big.cc":"44b36815c7943fcfb357e40bca06e699c45c5450fbc47267dad555842f89cc81","compiler-rt/test/asan/TestCases/malloc_context_size.cc":"ce2fa614a2a6931a5b2218efd82213fdb3e61fcdef89e8fb8066ca32dd9f95c5","compiler-rt/test/asan/TestCases/malloc_fill.cc":"ecd1c350cc7229d788be5f1f07b0113d41a8646719aa2ca55ce93d18c821e992","compiler-rt/test/asan/TestCases/max_redzone.cc":"cfda685a9e2763e0018b72991c858f08086a3b5cb9450e1a9acf09be2d7caa3e","compiler-rt/test/asan/TestCases/memcmp_strict_test.cc":"89e8436c9876cbd8aaec3fcd1c05fae2de670a1cc83367978b136ac5b1e3c188","compiler-rt/test/asan/TestCases/memcmp_test.cc":"1b052c85868611ddc3628e51eb153f7035170cff16acf3ff1cd722dc89efc036","compiler-rt/test/asan/TestCases/memset_test.cc":"e79fb96e1090f5808243ffdb3b0a97ff0178fd3bc4a3591b4cc8c66396cee39b","compiler-rt/test/asan/TestCases/non-executable-pc.cpp":"b74d861981fc2b7fa72bf9edb245d51caece8e5ca59c0bca5fb9607d7ea1263b","compiler-rt/test/asan/TestCases/null_deref.cc":"48f4f80c8d536b6fbfb7e90e150f465a6351faece4d24bd924ec9620a7bb0cc4","compiler-rt/test/asan/TestCases/on_error_callback.cc":"e92640a234bd8520efffd81347a55642b31543174663c6a646824cd03fd32898","compiler-rt/test/asan/TestCases/partial_right.cc":"a589de7476a485e6e0bed6edcc27d683b96976b25563f61d0564e35bf7a79696","compiler-rt/test/asan/TestCases/pass-object-byval.cc":"d7006e6edebbda1216c3f8fc2805ed878eafec6df0c3d0763620d0689ffdc3af","compiler-rt/test/asan/TestCases/pass-struct-byval-uar.cc":"45a89a938d575ac7fab105ea903ecbf1ad9eaa57428c49ea88a889a1705df346","compiler-rt/test/asan/TestCases/pass-struct-byval.cc":"2ad43f75e8b5807ef8828e749070522a817e3182637820778290c6d5c06e0085","compiler-rt/test/asan/TestCases/poison_partial.cc":"6e6ac770d602a6219bfd0b3896c86b0bf309f47cd3bde2d80ea3b677a331fb1b","compiler-rt/test/asan/TestCases/pr33372.cc":"bd21a4a2a3fd7176daa35e5dfc9e4627d8e9de2748baf47426bfc3589944ae19","compiler-rt/test/asan/TestCases/print_summary.cc":"89ca06c561b1b9830a323f7aed8ecb77a789e93b94926f10ba3a57cbed55c9e0","compiler-rt/test/asan/TestCases/printf-1.c":"eee389078b139d3dc20a8d4dcc1786db03c05e08225233361ccdaa0606ef4422","compiler-rt/test/asan/TestCases/printf-2.c":"8d32fe0945439fe6239c5ca92b99dde1c8872bb9735f371143ec02a7de5adac5","compiler-rt/test/asan/TestCases/printf-3.c":"cfbc89de4e2df54be58134c573841c6ecda0cfdc401f30bf72a7ad91e5d425b7","compiler-rt/test/asan/TestCases/printf-4.c":"a9c048f4f4465504a848e77ded8edbf9fc1406d949fab127726e962fceb0344c","compiler-rt/test/asan/TestCases/printf-5.c":"55a7771c416483d5f72fe69f051b659c4b56fc5d304c97beeba4f2794410b26a","compiler-rt/test/asan/TestCases/printf-m.c":"387a1b9fc524c39a0e970a9e0b3480936593e3b5c36231a8bf7fe8d3a6e7adb9","compiler-rt/test/asan/TestCases/realloc.cc":"1b78b7cafcd8378b85e88083e7b27f7c1c8302eb136b989b8e8c2be4b4a81b4a","compiler-rt/test/asan/TestCases/sanity_check_pure_c.c":"252a96dff10f9ac06e4b7eb828b3d6309b977b4cefe62350fc4bb1c905051c2b","compiler-rt/test/asan/TestCases/scariness_score_test.cc":"909c5df808ad69070d70f4ea0833731aba34628025625541051ef4a681057fdd","compiler-rt/test/asan/TestCases/set_shadow_test.c":"2ab88e2829d998d77067cac25f7495abe8bc0ca81bfbadbe60f7e4cbca3c8556","compiler-rt/test/asan/TestCases/sleep_after_init.c":"1c022e69a0f2a6010bb8fd21120563f1a76302a07cb6fb919b5d69750e17c59b","compiler-rt/test/asan/TestCases/sleep_before_dying.c":"42f1b548e2ce5d7fb2de0d34d2f43032e221a98ea6182dfb1353f9fce2a4cf6a","compiler-rt/test/asan/TestCases/small_memcpy_test.cc":"8c50c62a92a2d9ad210ee9cc7cb30708c08e97775b545b35618a339538b571e2","compiler-rt/test/asan/TestCases/speculative_load.cc":"56c0562e921e7ef366125a0a2b65521b802d6195faa4cefb99db94a384bbb74f","compiler-rt/test/asan/TestCases/speculative_load2.cc":"d37a67574df3b5ababa38cb5038af7e6c9f652371677674abfe79a761903139b","compiler-rt/test/asan/TestCases/stack-buffer-overflow-with-position.cc":"7cdfab70de98fefef0464486a4c81b5719b178c5ad65bd06c581f4437f9be4f7","compiler-rt/test/asan/TestCases/stack-buffer-overflow.cc":"e2d5365720ecd82088f9a616b05cf7a9a15eefbaabdc9f3590b4716b274bdd31","compiler-rt/test/asan/TestCases/stack-frame-demangle.cc":"ef0e857dcf1fe90b11352eac828e90089545d0aa5bba0386883f88026a7546d1","compiler-rt/test/asan/TestCases/stack-oob-frames.cc":"5509eed3e07d55388bb741b128cec309208f91f4aee678a9c54a67b04fce4122","compiler-rt/test/asan/TestCases/strcasestr-1.c":"6a2298cca2cd6782f3ceced62015d994b3ec3215d359c12bd86a08787f03d615","compiler-rt/test/asan/TestCases/strcasestr-2.c":"016cf9f6eb09ad742cf03ac92f84569eb5003c9ce9f4f038fd806192cbbe8481","compiler-rt/test/asan/TestCases/strcasestr_strict.c":"d655e9e3b9dcf253d294c23ac61af12f431f5852588e72aeb19b78b80c065cb1","compiler-rt/test/asan/TestCases/strcat-overlap.cc":"fcda5d5d023c83aa806693fd03c9c68793973b5d20d9798c7a7217be00b12265","compiler-rt/test/asan/TestCases/strcat_strict.c":"34b14df26fda2a6b88b874074309b8fd49dab23e2eee96f43123d31003498706","compiler-rt/test/asan/TestCases/strchr_strict.c":"e2c99dbd4a9483069a1f7ed19bef4cbc107c585f75fa478caf673745e23ae6ca","compiler-rt/test/asan/TestCases/strcmp_strict.c":"7f80c53c59d36512b3a6fe3013c935115656ebf859da80abe8be5edb7957d8c7","compiler-rt/test/asan/TestCases/strcpy-overlap.cc":"0149f63e748b1257cf6e82a8a653ded28828d9207f3fa656e87834c86181f875","compiler-rt/test/asan/TestCases/strcspn-1.c":"2f2a1b008841f7990ff2925c50639c3b32bef44c91fa9fc152b52f754767bedb","compiler-rt/test/asan/TestCases/strcspn-2.c":"b285dbe5e521a85bbbeb23dbdacf282885e8805c7cfcf9e885a41e346bf2b4ad","compiler-rt/test/asan/TestCases/strcspn_strict.c":"d7d9b770588e0edb67132cdc80f73a5cdbc8eaccf2242e9542366fe25593b9fa","compiler-rt/test/asan/TestCases/strdup_oob_test.cc":"ae251ff34d69490376909f411fa607e5a1328d181730c7b047a8ab896beb28cd","compiler-rt/test/asan/TestCases/strip_path_prefix.c":"934df07ad5497f38a8aec112d7abf94ffea4349b58745c62dc681d4e7839540c","compiler-rt/test/asan/TestCases/strncasecmp_strict.c":"46d32c3076e1aa3cb2b7182895ac6b841a47fcd9e495ce097a43df1810243f0c","compiler-rt/test/asan/TestCases/strncat-overlap.cc":"283184d57b5fb5fe070a1550d8a4cae76d34b0ad51b234b7d4fa0b940feed756","compiler-rt/test/asan/TestCases/strncat_strict.c":"dd7d3a7c4387e71adaf38851b7efd4803c970a62adcd3a3ff1b1cdec87c75419","compiler-rt/test/asan/TestCases/strncmp_strict.c":"3422859b98130126e4166b1ab3df38168c8160e3301aec1f6503096b9ce53e12","compiler-rt/test/asan/TestCases/strncpy-overflow.cc":"9bb987646cdffc128981e3ed2d64f2b8167d6058bd8be6918ff0a9a7c01df708","compiler-rt/test/asan/TestCases/strncpy-overlap.cc":"947c77a6e0056d2114938a165c414b3c8249a80efae805a98d9d5a60496c58c4","compiler-rt/test/asan/TestCases/strpbrk-1.c":"2672e3903f269c7285404a1a7ece39626238ecd6ae417af0cd3794f4d1e61d44","compiler-rt/test/asan/TestCases/strpbrk-2.c":"17373065ba33a993a2266fa904a07393cff9f1693dd1229ece36d54bf6e0b9d1","compiler-rt/test/asan/TestCases/strpbrk_strict.c":"8ab08b4625890da781184add5361a371e53953b4f7460c3abbfe7c4e4fa43d87","compiler-rt/test/asan/TestCases/strspn-1.c":"1c9f3eaccd68e70a451e62d2a92205abb0a38d582fac12c2aab03bb17817f08f","compiler-rt/test/asan/TestCases/strspn-2.c":"3112555c59801c1aa5f1fc76af2902109c3bcd88ed7447dfcd1284bef7a8b3a2","compiler-rt/test/asan/TestCases/strspn_strict.c":"ac7d3f5d7638f82281329525fb856c3861a4fb604b8317b451321524bcb974c9","compiler-rt/test/asan/TestCases/strstr-1.c":"985006146a888caed243a8af3bb9b01513f122bb56d478f51b21d2e996da26af","compiler-rt/test/asan/TestCases/strstr-2.c":"f166fd2ba9008765501d6c7188551dbfc0ffa493b0ca0366206ddd835a063bde","compiler-rt/test/asan/TestCases/strstr_strict.c":"af98d756c33274436bc5141669349325ec907ef1d3af658bd7724256a9385dca","compiler-rt/test/asan/TestCases/strtok.c":"45778984c7d4a18df35122add7bb078c0d8f00b2f15e1db422ad80df60efdf9d","compiler-rt/test/asan/TestCases/strtol_strict.c":"a6d458fa5b7808509c81f6cab2e3865b6ec1ad9958c2439c708dda7423e994d0","compiler-rt/test/asan/TestCases/strtoll_strict.c":"b1c6164bdec42990723b5027b0205426b6e3a3a74c4c8de0f51c64ca60f07ed2","compiler-rt/test/asan/TestCases/suppressions-exec-relative-location.cc":"471d256632656c0fb51a908a5558da46830f66ebaddd94d13fde5c72ca661061","compiler-rt/test/asan/TestCases/suppressions-function.cc":"6e0ff85ac55bc8c9c538c1c79079145a177c2d5b8de098cd1769e03d13a4c93b","compiler-rt/test/asan/TestCases/suppressions-interceptor.cc":"5f35d44b7125fffd4614d789c5bcad69ab33189304e64aefb18ab9f319c0f80f","compiler-rt/test/asan/TestCases/suppressions-library.cc":"8f7612533d66d9a7b505c2be48be94f5fe371aa04ac69cb1b53ad038773da969","compiler-rt/test/asan/TestCases/throw_call_test.cc":"f2038c524066104f8f32d73c0cde887ad2b19a41f19be27cef880e51a2f3ade9","compiler-rt/test/asan/TestCases/throw_catch.cc":"41ee4d22210ada1616feadb5c2db227121a1d065dbaab4c46ee94c5329c77d52","compiler-rt/test/asan/TestCases/throw_invoke_test.cc":"f4fea58e48d56b9d7f749d10bb1852ae53168e5cc0d452e0d41149f686670032","compiler-rt/test/asan/TestCases/time_interceptor.cc":"7c1129bc997cb0f05e27281eee63e9128df75ed40865c38d47b7f8c1b235710f","compiler-rt/test/asan/TestCases/uar_and_exceptions.cc":"585dec2fa2f14283f0d1b12273a5ccf67cc318facd858b3df8805796fd3d84fb","compiler-rt/test/asan/TestCases/unaligned_loads_and_stores.cc":"b4c8247362dbea4da4556411edc560f0add60f38b157fad27413f73382493cbf","compiler-rt/test/asan/TestCases/use-after-delete.cc":"4d7556c43ca1b28467788a7823e1a05a0c35e13496001eb43b10faf764b43a6f","compiler-rt/test/asan/TestCases/use-after-free-right.cc":"1cfe01c6b10b5c230b66d1d24a14c69c2345c52f11efcd88aacc3c47131d18fc","compiler-rt/test/asan/TestCases/use-after-free.cc":"1f86661c506646d77088b19cab0adc2f7fc8188f3535ed93acd1aefc7c17e25a","compiler-rt/test/asan/TestCases/use-after-poison.cc":"ee1cd5540a7790a25e1f58f1b67bc4e6b0894ea22d4f708770b4ce9af326e9b3","compiler-rt/test/asan/TestCases/use-after-scope-capture.cc":"109ffeab2657df3e2d31d363ca439dd9a71c833fc4b19bcf421b0a9d2d0db565","compiler-rt/test/asan/TestCases/use-after-scope-conversion.cc":"a9cda4c7f0f147b76df4e4fc38b934c14a5276dd881b9662f8dafe71a20e7120","compiler-rt/test/asan/TestCases/use-after-scope-dtor-order.cc":"5ad008a769c9d79aace316cdaa379624ad0ca87dc16b334197746b85723620d5","compiler-rt/test/asan/TestCases/use-after-scope-goto.cc":"3f2acb4ba3580c26b642c005e22067d8c81d5960f498ee07d578ac86a199f06b","compiler-rt/test/asan/TestCases/use-after-scope-if.cc":"eeb3ff961927aa1e4df3910a118f7d10209565378b6bbfdc8eaf3672097fdcd6","compiler-rt/test/asan/TestCases/use-after-scope-inlined.cc":"2e33e938bbf12950ccc1e34494058df740c8ddc7e594d8301eb47fe61adf95b8","compiler-rt/test/asan/TestCases/use-after-scope-loop-bug.cc":"4f3a0189659a4f7926358a2c1a980c9db439811b216be0bda88385435b5d3b6a","compiler-rt/test/asan/TestCases/use-after-scope-loop-removed.cc":"767379a791cf671806be1c393cd664ff73f6373619ef7543bb60463d5da17ef5","compiler-rt/test/asan/TestCases/use-after-scope-loop.cc":"69a7b129bd930f4c6260e28c0633e99e8deaa624af6f32fd2952c1320ed17d10","compiler-rt/test/asan/TestCases/use-after-scope-nobug.cc":"3819177ad782485bc6330714f1ebafa6315877ff588833a615f63b4ada21201d","compiler-rt/test/asan/TestCases/use-after-scope-temp.cc":"d994457f94652d6dcbd2080b17720ceeec11a5307eccb0b81df1f19ea542cc43","compiler-rt/test/asan/TestCases/use-after-scope-temp2.cc":"40561a33679184baa7f6243db9929f30468b33464a5ed965f42065e619682352","compiler-rt/test/asan/TestCases/use-after-scope-types.cc":"c2897266c9611b255c27f4bb43a5aa50bc38fdb09382890b6240943c3fea300a","compiler-rt/test/asan/TestCases/use-after-scope.cc":"249d7c13941dcad62b10a62c24464b3737f73f791bdbf5a5197e8197a3cb2a04","compiler-rt/test/asan/TestCases/verbose-log-path_test.cc":"60d955be71dec23a4d40174c90e2ef4ccbd19b8f773a685fa54554ae4789df8e","compiler-rt/test/asan/TestCases/vla_chrome_testcase.cc":"a4e138ac2ec8da5be7721d650c1aead473991e88a8831d30e81f73ca7f01562f","compiler-rt/test/asan/TestCases/vla_condition_overflow.cc":"4983d0412b741725bb53cff25e4d4b49c88205ec401b81eafad93ac93f19ec1a","compiler-rt/test/asan/TestCases/vla_loop_overfow.cc":"2e4ae3fd0495d204bed2c18f00c647dfb10a28dbc8703d0c5142d3d4c08970f3","compiler-rt/test/asan/TestCases/zero_page_pc.cc":"29ba63c0822ae2955a03a48aa9b005f6bbcb0bf2e0da8636034b93eefa407c70","compiler-rt/test/asan/Unit/lit.site.cfg.in":"df2fc7d9d132df7fb3ce7b51ddd901959b7c0b4a4f420b4a64c8974d2c4790f6","compiler-rt/test/asan/lit.cfg":"c10fd1baad84657796c54a334a0a2baedd3108ab971b760f396357f68899b9df","compiler-rt/test/asan/lit.site.cfg.in":"d84b151df27a85b805d58f973485f699809561aa8bc90f6935b042ee5e5edb2f","compiler-rt/test/builtins/CMakeLists.txt":"11451c8003bbf6c369607b8540c3f3c8f4e01045ead0c1231610ea051b24a42f","compiler-rt/test/builtins/TestCases/Darwin/lit.local.cfg":"67ea8448cf3507eda12a63f0981890bfcb7959532eab5a4c303900daa5788a30","compiler-rt/test/builtins/TestCases/Darwin/os_version_check_test.c":"df24897921d0a618b1e6f8a8223d254030af1abf0ca4bf1b24e6c760dcbeb261","compiler-rt/test/builtins/TestCases/Darwin/os_version_check_test_no_core_foundation.c":"acd5f2e9a9622f7833bfa4d98f3fb101eed7ba3e9369ca99ae68cb69354839ef","compiler-rt/test/builtins/Unit/absvdi2_test.c":"4a7cb95fb454aad7272674faebf85c54d4d8eab667b1d3e73846459db818bbfb","compiler-rt/test/builtins/Unit/absvsi2_test.c":"465c01274e5dbc1dd0888cb678359fe3c9934870164e6703dcb01c3004772431","compiler-rt/test/builtins/Unit/absvti2_test.c":"a742ae3fe9fabbc92d3e6441cd5f1e52fb665739f591805b9bb821ada5fd31ee","compiler-rt/test/builtins/Unit/adddf3vfp_test.c":"8981e6fba6392a6c3e1489b5c169874abf21c52abe5953a02e43a8aa68452e27","compiler-rt/test/builtins/Unit/addsf3vfp_test.c":"89b6c18160bf7b09e0ff078f8914796ebd63b11af1fb4cd8e0b1521655a20be5","compiler-rt/test/builtins/Unit/addtf3_test.c":"d32fcb6c5209366f9481ec75a92928b7fe9ff8d5350a9615ef8201ff48622b30","compiler-rt/test/builtins/Unit/addvdi3_test.c":"6b38bd7318eef6c73cf6870db8ad93a74924db2f47965982632909427b97415b","compiler-rt/test/builtins/Unit/addvsi3_test.c":"c71efcf1eccb6490f1efb8a52928e1151ac356de83faff2630aecfb6a1fe9d37","compiler-rt/test/builtins/Unit/addvti3_test.c":"dbecebb55a3950e2532f33fba25b55633fa1b8facfb46ea1f828dde0eb4c6f57","compiler-rt/test/builtins/Unit/arm/aeabi_cdcmpeq_test.c":"b61d7a744a6bc03fd83eb808ad7f014b836e2002ba575fec22d1c6af404ec27d","compiler-rt/test/builtins/Unit/arm/aeabi_cdcmple_test.c":"db1cb8f4207ef4707ae23ceaa5d4e779e49b08aee8749d99a2d24531e1226721","compiler-rt/test/builtins/Unit/arm/aeabi_cfcmpeq_test.c":"c42b303a031d053c3a8e17053942053f803a7af726bd7b36267bd25d9ef30c43","compiler-rt/test/builtins/Unit/arm/aeabi_cfcmple_test.c":"202f0ac47cba8cbe46ec997e196808541f727505f8a9b6fd5faa701af099ce21","compiler-rt/test/builtins/Unit/arm/aeabi_drsub_test.c":"49d4090a32a53c6ddebe6e98cc3e46614a9915a57fda2ca44e28f913dd61fa2e","compiler-rt/test/builtins/Unit/arm/aeabi_frsub_test.c":"3cadb89a40101d136305e4b61e4341544ea05e8f5999bb3a0a7d95796708027f","compiler-rt/test/builtins/Unit/arm/aeabi_idivmod_test.c":"70a15ff947bc591d58d19a821f1407153c903c975de7529db41f13fc38b0931a","compiler-rt/test/builtins/Unit/arm/aeabi_uidivmod_test.c":"24b160ca82f911064e4a88657b7ddd7369f305ed389c105dd87cf024c4fbb13a","compiler-rt/test/builtins/Unit/arm/aeabi_uldivmod_test.c":"af1978a456417810fe4b9d29e0a51cd82c7805f3264b27e028ae6411f456d523","compiler-rt/test/builtins/Unit/arm/call_apsr.S":"e6826483bedcf2123bc44ab385676fc0bb05c539f0084c495c8653a4181a21b0","compiler-rt/test/builtins/Unit/arm/call_apsr.h":"a8209b717e20d065b00100e81cc30f00569cd135e1b0e9f8bd2cee554b937038","compiler-rt/test/builtins/Unit/ashldi3_test.c":"2b9145f3971e767f381e4fb7f6a53b832968939edd06f0e909534ebbb6da6769","compiler-rt/test/builtins/Unit/ashlti3_test.c":"82755aa9914be3aaf18db56780fef123891d0b53469ccb3ef67381ef7121a6fa","compiler-rt/test/builtins/Unit/ashrdi3_test.c":"fc2085b5cc04f45fda1bdb3881721a2aac1ecaa8d45f5531b1cb683019079b3b","compiler-rt/test/builtins/Unit/ashrti3_test.c":"3241785a1d107f6fe5524695dc63c1d53ef6d8b4f9dbfaeffcc9e27c4bf9443f","compiler-rt/test/builtins/Unit/bswapdi2_test.c":"c0b7166d35e6249384e263c85b89214d5a08d590d6c3645fa51ba5f82bfcdb2e","compiler-rt/test/builtins/Unit/bswapsi2_test.c":"a0f99c0cc8434031111fcd093db52612e2a59635275ee3dd75cd8f081fd643d9","compiler-rt/test/builtins/Unit/clear_cache_test.c":"f668b21140a34c0dbfec37f0c42290636698b7c6ea469fa38d06fa5e7fb23319","compiler-rt/test/builtins/Unit/clzdi2_test.c":"d109f01354d384ce6a6276076bf9216fa0f41ca88b398db8f65a446649e55836","compiler-rt/test/builtins/Unit/clzsi2_test.c":"3e11f2a796c975c936e00ef013ca1e2892c1935daa632f3deac57650b6bd7dc7","compiler-rt/test/builtins/Unit/clzti2_test.c":"5f745c8a0846a5d7acf5a9e8e622b9a78ce1b5ac371c17ecd22b8ab146685f14","compiler-rt/test/builtins/Unit/cmpdi2_test.c":"48fc7aa7e4e4e25ff108dcff1f3e401eae0be2e18b1e7109e19db6d87c6d08e6","compiler-rt/test/builtins/Unit/cmpti2_test.c":"d3012d3b38a40e390aafd8f6251fb3f5ce1b50f1b362611f6a10131c4307fab7","compiler-rt/test/builtins/Unit/comparedf2_test.c":"96685b2a68fab0276bc94a078a2f42a18368d06655b818e5ddfead2e8fdd85ae","compiler-rt/test/builtins/Unit/comparesf2_test.c":"9d437d1d1145fa34e661dace492f7e81c4eec3861c3317ada7bf2da43765d1fd","compiler-rt/test/builtins/Unit/compiler_rt_logb_test.c":"f8a77440272f9302046560fedd3f435e1b7321d3accd6ec5f9e5cbc1b238ee65","compiler-rt/test/builtins/Unit/compiler_rt_logbf_test.c":"180931a90b5af5186e9334f581ccc8a751550d34c62dd0ace30ca18a850e229d","compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c":"0622c136b53c777cb25ec910b7da8b30a59657375c84274e7b076fe5d6543b44","compiler-rt/test/builtins/Unit/cpu_model_test.c":"0dd326d1fdd87e773deb7152f8b6dfe45c39f87978cf9fbc4a3e0827329fb0f7","compiler-rt/test/builtins/Unit/ctzdi2_test.c":"9039bca0396395cc2034ef8f989fea0cd2c8c0409fb827d55372973768518491","compiler-rt/test/builtins/Unit/ctzsi2_test.c":"04be83262a16716bfbba552fcd38f5a412621c7d5803bfd44491bfbdb43ff815","compiler-rt/test/builtins/Unit/ctzti2_test.c":"1660de345c93c8623850e5c1b233d97ef7ffa65f53c54c5a154934faa10f5b82","compiler-rt/test/builtins/Unit/divdc3_test.c":"fd72176489d556dabda64eebb5819e6d5461e605ef7e8dfe1a440d3e54fde388","compiler-rt/test/builtins/Unit/divdf3vfp_test.c":"dd2994fbe24c6a7f155562f5482b30e90461fa4bd88b0f3ced9fd4a0d14644c6","compiler-rt/test/builtins/Unit/divdi3_test.c":"a8d8840c52d0e3e94f0fae14cf82c239db72408d3dab848fccf313150275d8c4","compiler-rt/test/builtins/Unit/divmodsi4_test.c":"7052d9fbdf19d2d0056e65512f685aaee4d0aa2f0f92c00cd5bea973ea500639","compiler-rt/test/builtins/Unit/divsc3_test.c":"db924819947d32891d168bbc0f489bb532cfa9caa5899392b866a9a314b72f8e","compiler-rt/test/builtins/Unit/divsf3vfp_test.c":"18d52cb897542fb9dadee0dddcecdd194b783e49818763fe90de2be06a3ff0fe","compiler-rt/test/builtins/Unit/divsi3_test.c":"555e823e9213ef45042a8f2977734dd759ca8992f12731833ade5c22cb558138","compiler-rt/test/builtins/Unit/divtc3_test.c":"ad70113d70de3f50463db58c1997b853d798f7d18c56dc5bdfc5d1c175624fb0","compiler-rt/test/builtins/Unit/divtf3_test.c":"add463234dddfc66299cca49ad1d791b3715a19fec3959a30ed9393b0c4b3ebc","compiler-rt/test/builtins/Unit/divti3_test.c":"d388ded34aa60148e9a312142209c8b35d93cbbaad85daa2dcecd959ce1dbd4b","compiler-rt/test/builtins/Unit/divxc3_test.c":"baa38febe5ea3fed9b1ff2f9115c6082d3f7777db65878b1f3eaaca2863b2ec9","compiler-rt/test/builtins/Unit/enable_execute_stack_test.c":"f5f21cb2c961da7133dc30cfc8f1f1a270ad7107bf67672f9163030aa7eea2d2","compiler-rt/test/builtins/Unit/endianness.h":"c1432312da43df1076b2799433e97aa2edb08d3cc56bbd5028389e1ce70e35fa","compiler-rt/test/builtins/Unit/eqdf2vfp_test.c":"8865ff90a0ff8dba775a0898b82988277e1b1272b942eae934f5d82a7dddc6c3","compiler-rt/test/builtins/Unit/eqsf2vfp_test.c":"a9fa8c054e0d420a5f981fed5695a94b29b3f2bcf2437c4f2626503d82261c56","compiler-rt/test/builtins/Unit/eqtf2_test.c":"248c31b09f3bff9f545d3e8dd84cadc970ae039878704f62d82c5897f9f1c126","compiler-rt/test/builtins/Unit/extebdsfdf2vfp_test.c":"5918807eccff0354583059168727a1e1e04003433d5b5824d910386a9903e0ed","compiler-rt/test/builtins/Unit/extenddftf2_test.c":"49d70f3af1e27ab6f2aa3bd3c437a6406d337f17ba073850190012eafb56c87b","compiler-rt/test/builtins/Unit/extendhfsf2_test.c":"1574830122d5bb8044396a837023753dcc52c28be7d44486f034fc821fb96078","compiler-rt/test/builtins/Unit/extendsftf2_test.c":"0e9a671e949449e3c3e3be5e36f909b6992dbdf1c492632ac7f627054f175a0c","compiler-rt/test/builtins/Unit/ffsdi2_test.c":"57539faedd86a5960c75980d0e132a9645307297e47f22238f3822027f1ed2df","compiler-rt/test/builtins/Unit/ffssi2_test.c":"24a52e426a550cffcd2f79c93d9f29603aed3eb4f10f37b67c831d1617ec29b0","compiler-rt/test/builtins/Unit/ffsti2_test.c":"87e914df294833c211784cc9ac2bdce7ba25378579cf222713fa17d9610bf24d","compiler-rt/test/builtins/Unit/fixdfdi_test.c":"fd5cbcc3f47519a5e7f0a1e2331bf78069c6f5443d90c228f80dcef61a7bf012","compiler-rt/test/builtins/Unit/fixdfsivfp_test.c":"488cd6e77c476bbba05066e1b07f4df389955019c839668aa2dbb7040cc591b7","compiler-rt/test/builtins/Unit/fixdfti_test.c":"d6ea4395bba47ebcd2f6157fce8ca2a1172c41a90b3c6ed70026582a8299c861","compiler-rt/test/builtins/Unit/fixsfdi_test.c":"9028baa845bab8ee411c40a7f3e1cf6ab6cc37c16312eddac7fa953f2b086be5","compiler-rt/test/builtins/Unit/fixsfsivfp_test.c":"5a1621ba3c85705dd9b2b5a16fa9c436b2337ffd170f70bc5a2f2da4f37edb2c","compiler-rt/test/builtins/Unit/fixsfti_test.c":"c1d90b78057e5b5df66d13bffe4414347511084a2eb2aaefb6eb5f6ae3da4939","compiler-rt/test/builtins/Unit/fixtfdi_test.c":"43f58ea4f5d87bcdddf8dfb1a956eb446337c8a2ea08b4de1d738e46db4faaa5","compiler-rt/test/builtins/Unit/fixtfsi_test.c":"f01a61f575efda8d0c7e8c2725f65805d5e4821140505886755306ec45979afc","compiler-rt/test/builtins/Unit/fixtfti_test.c":"79ddc0158cc859a213011cb917909f42af401b74beb17a5f5bc944431f73e28b","compiler-rt/test/builtins/Unit/fixunsdfdi_test.c":"af3f26e24d589d193ee2f344d4bd04052379a77ed5d0ba016b68136294dc62ea","compiler-rt/test/builtins/Unit/fixunsdfsi_test.c":"77a44169011a89dda0a225c51e7dda1458ee67b137b6c03c233cea3e967ec212","compiler-rt/test/builtins/Unit/fixunsdfsivfp_test.c":"bca9e6bf957fcb90e9e4e9b5e0ae9d2cefe8435ffb251fef25b46da80ccb6fde","compiler-rt/test/builtins/Unit/fixunsdfti_test.c":"19e091a81508a54f074892aa9863ddbc8d8924a69da4df573d6cd9365be66f98","compiler-rt/test/builtins/Unit/fixunssfdi_test.c":"52465d378e20faac73574ae2f55af45184f056897adb2fbe0e1bde1e6dfc5597","compiler-rt/test/builtins/Unit/fixunssfsi_test.c":"30541edd85ed20d2d0bd2bcb467c14b74cbe0fa34feaa556d3809b6d54bb54d2","compiler-rt/test/builtins/Unit/fixunssfsivfp_test.c":"4568104fde495bdc577725e31b77e3e2db90bba3efbcecfd2cc2d1d599e252f9","compiler-rt/test/builtins/Unit/fixunssfti_test.c":"fbdcae0367cb197673aaf20fe4a4d036c5b9a8ca571f3b67237460562d4b0c14","compiler-rt/test/builtins/Unit/fixunstfdi_test.c":"b8b31d5e6f1b68555cb8af984f43f3cb78b91f9f444833d9d9782a18f4e94e76","compiler-rt/test/builtins/Unit/fixunstfsi_test.c":"232230eee1d12b0b2bf6c3543a88b511f31f0cbbcc9526c0bf4bdaeb8e3b513c","compiler-rt/test/builtins/Unit/fixunstfti_test.c":"962bad7a53e4fef9b6b2795450ddc37887bc66148a4026113ddbc39f29567cfa","compiler-rt/test/builtins/Unit/fixunsxfdi_test.c":"12d32d3ce0cc391d1ab438ae8118076a9f8e6b03bb29c5130d081edff56f36f6","compiler-rt/test/builtins/Unit/fixunsxfsi_test.c":"90a45f2d16f438fccdb6f8eadc43c2018d63bc745b10a18a4e2c4d48d426bf3d","compiler-rt/test/builtins/Unit/fixunsxfti_test.c":"a6151a81e4c0d388544c6818c2444270692fc1bbe3324eaaa9f34d4ac0438bf8","compiler-rt/test/builtins/Unit/fixxfdi_test.c":"dde85ac0b8ddee357287d85e3ffc510cf8f3e21c83f85c2370c3b8cf1cdb8edf","compiler-rt/test/builtins/Unit/fixxfti_test.c":"e3c1b75c7deb7f325bd6f20c771b0222fbf4c13865f5160677fec99747fd07fd","compiler-rt/test/builtins/Unit/floatdidf_test.c":"e03748405b7e7717f8636225b0af389e51ebff18754cd54ce4f5f2db9d32f760","compiler-rt/test/builtins/Unit/floatdisf_test.c":"a312430c0756c65dfc8105249ca9f65f47cfbd058e207162ec5693524eaca8ab","compiler-rt/test/builtins/Unit/floatditf_test.c":"9376b9d89b28bffceb4a00564193ab1ef2c563c7385c97f62b4ff2447ff13c9a","compiler-rt/test/builtins/Unit/floatdixf_test.c":"b0d52aec7c6b978b1f36d3526f983dd7e6ad2d818237156a2400d5bd6d8b72c7","compiler-rt/test/builtins/Unit/floatsidfvfp_test.c":"1e72ea7269a0d9f287c6a1a478bb7f83199a34ee4dbd4892606e3271464f91b4","compiler-rt/test/builtins/Unit/floatsisfvfp_test.c":"d76dcee068b1cf42d6f0fb000f458ca279ad32d0bb3d6364662ee1ef263a82a5","compiler-rt/test/builtins/Unit/floatsitf_test.c":"2d654d2ada9fca0606ac3cd872f212f5cba03617a6875baa0243fdf5536cafe5","compiler-rt/test/builtins/Unit/floattidf_test.c":"8d55d035f7fa41a6c343ee1e747d009e289fedbf483efd0ac9cbeeffbf0dd954","compiler-rt/test/builtins/Unit/floattisf_test.c":"65ccebf9a946eea4685b5caa4cc5b80c8c1124f7c3a09cc99ff1c489afa98c4e","compiler-rt/test/builtins/Unit/floattitf_test.c":"332faeb316f06fa401933cc564307ba566281044e0918c73a2756b2de51413fa","compiler-rt/test/builtins/Unit/floattixf_test.c":"822e5438f111e988b03ebe043ef8431c77b18b58c406961f9b9c8256f72fe885","compiler-rt/test/builtins/Unit/floatundidf_test.c":"92adfacaa85d95d24150f0d10c3d8bf90ceeb260a13601ecae00f693279c02ef","compiler-rt/test/builtins/Unit/floatundisf_test.c":"f8387bbd7dadf8eb326ee939d26b385507495b6ab5d8b4dda1efb801fd7a6adc","compiler-rt/test/builtins/Unit/floatunditf_test.c":"6c804c49efb42511695210af934392da321a146655742c0ce99b8e8a97de24a0","compiler-rt/test/builtins/Unit/floatundixf_test.c":"18a64fc512ebd5d4d10a546b5d5b5d19a0e1cd3895c6850388b9493568ec2a43","compiler-rt/test/builtins/Unit/floatunsitf_test.c":"9f4243cb2e493293ff5d4065b5f29b11e1a9f197c1368619362660e1ea01bd7f","compiler-rt/test/builtins/Unit/floatunssidfvfp_test.c":"544d47fb14cebc4d28a3c7a971fcca6b654cbf39d4334b2e8e8ea51f5f6d0041","compiler-rt/test/builtins/Unit/floatunssisfvfp_test.c":"4fe7dc66585295392f9cd654782388162a2574a78358c7a7dc60a99ee181f18e","compiler-rt/test/builtins/Unit/floatuntidf_test.c":"022c1a60df76ab6d33a959813648af3cb4cd93430e054b6bcf8859ae55f72e8c","compiler-rt/test/builtins/Unit/floatuntisf_test.c":"4c04506ce8282f9c21cefe905729ef3cbb0c7914a39b3228c5fa29f4732d83ae","compiler-rt/test/builtins/Unit/floatuntitf_test.c":"6ada58e57d440677fcd3ffb1e3d383b390f96b1f81f2259bdc9060039717d8f1","compiler-rt/test/builtins/Unit/floatuntixf_test.c":"cd5f5943681a5b2faacfe554c2c70f10bcf02e5e8896da45a31e9a1d85645208","compiler-rt/test/builtins/Unit/fp_test.h":"e4a4f834c8396a65a9d63688c426f4c446345c60ce3d1e37ae2be337e864a8c1","compiler-rt/test/builtins/Unit/gcc_personality_test.c":"68f6e3218fc9c4912d7330ae21a797fc64da907b95b4182afd77c04e4136c496","compiler-rt/test/builtins/Unit/gcc_personality_test_helper.cxx":"9dba7502677f38249195f50f64d7a87012436b3b5cde5d9d3cd471e1b6245db7","compiler-rt/test/builtins/Unit/gedf2vfp_test.c":"86aa2d2821c5142d750d51a43ebcac3af5441b8ea803dac5f3ccbb77ab5bc390","compiler-rt/test/builtins/Unit/gesf2vfp_test.c":"dd98e69689da77a06a833e35c217649740ba420bab5ddcf8b811e2064e749eb4","compiler-rt/test/builtins/Unit/getf2_test.c":"138a8542cb951aa80b12a26ad6eea2e42c573ad6142f19aa39f2298053d2a127","compiler-rt/test/builtins/Unit/gtdf2vfp_test.c":"935e8eb928e2406b101cd637cb51d0da8c5e36fce7bccbcd4d6b681e08c1b75d","compiler-rt/test/builtins/Unit/gtsf2vfp_test.c":"c2e70f10364114ab2adcc702f980afd19e5eee77cd026cebcf721ff37ecf7430","compiler-rt/test/builtins/Unit/gttf2_test.c":"b40c28fa9a10cc353ad34102f629792a276c71e01da25a6bc14044af4144f686","compiler-rt/test/builtins/Unit/ledf2vfp_test.c":"f0f183beeb2241763966ac74eeeab04c84502760177f48481a4d3e0cbd4b3ada","compiler-rt/test/builtins/Unit/lesf2vfp_test.c":"d95ad287d4c78edadf5f830f97b3563b4ad2d35aef75717f50280f0a87863489","compiler-rt/test/builtins/Unit/letf2_test.c":"8f2e0eeaa6709be618cd14604f26acefc5d0b88d853d0d1401ea12fd73e1710d","compiler-rt/test/builtins/Unit/lit.cfg":"bb6d26609bb390f70f04c69f8927198d8069b40679c3ac5819fd8ae4aee4369c","compiler-rt/test/builtins/Unit/lit.site.cfg.in":"6a2b46866fceefa340bb4e53a1453a1428eeda03c9028263ae390f99b03ddfa5","compiler-rt/test/builtins/Unit/lshrdi3_test.c":"9b83145abb8d9dbd62f03c34e5976eb36f5e7e94cddf62e5afaa49d5f14b2699","compiler-rt/test/builtins/Unit/lshrti3_test.c":"b78a9b0ed50de1343b524a1a9b380fd5fd633e8ddf7be7af78976266a79c8f89","compiler-rt/test/builtins/Unit/ltdf2vfp_test.c":"d72f9b51c94574ab77313bd9fb3540e3af7f2630c45885e658707324442e3622","compiler-rt/test/builtins/Unit/ltsf2vfp_test.c":"a152be4487796fb10da9fda1942c9738242f8b6687f981a5c07227a80397a8ce","compiler-rt/test/builtins/Unit/lttf2_test.c":"128198025226dd8c95b45a33907057c9e6e514c8d6101bcb504068c447fb0642","compiler-rt/test/builtins/Unit/moddi3_test.c":"c305dd7deb5cbbea86b83edccf0b06ba0a4fdfec82afa925fbe6b5a378a1d374","compiler-rt/test/builtins/Unit/modsi3_test.c":"8fb82463b9ab880767ea51c1c6b87dcf9e7bcd3ca38360903f58e047fa185d60","compiler-rt/test/builtins/Unit/modti3_test.c":"e53324fd31b3fb79a99ff58307018269c0717ae97f4b922d3cba86492fed2e06","compiler-rt/test/builtins/Unit/muldc3_test.c":"d40ccd7f0c07dbdd68b94677e5aef6da95135cc64c7b94ea7e3e648ef3b4975b","compiler-rt/test/builtins/Unit/muldf3vfp_test.c":"14730e2fc4b3b2aab7e33c9d0127d7725314655f3a9560fd787960d5a7d8f6d6","compiler-rt/test/builtins/Unit/muldi3_test.c":"f312497b793c05ecd22845021c7573e34c6f77f22d2fc51d4ee8754799eb3696","compiler-rt/test/builtins/Unit/mulodi4_test.c":"0a9417b9693ac49f15601f200e365a3b8d92c7679f8c972ed7a2d61d0ff5c2d5","compiler-rt/test/builtins/Unit/mulosi4_test.c":"94073985860be4ad38fa967885ae078910f0483a13a0bd0ad1a64078a691125b","compiler-rt/test/builtins/Unit/muloti4_test.c":"d1035eeb928c22e34c31f806725989029cad549eb730810ef7e370aa3fd92981","compiler-rt/test/builtins/Unit/mulsc3_test.c":"dff7f1c66ab2591fa95ba52c4bbd6079ff94f0fd99640ff66e32711863747e91","compiler-rt/test/builtins/Unit/mulsf3vfp_test.c":"40e60ad98a1d2482d2984df4253a8a895851b4181eb4ce49d0f0852aa1d35439","compiler-rt/test/builtins/Unit/multc3_test.c":"91c6f428b877884a59e147c95390d7b9c74a4b129c07741cbab491735b3dd62a","compiler-rt/test/builtins/Unit/multf3_test.c":"e5850020cbf5e4004275591027ca9e7576db7ed74fb1ec2059ea19d355399ab7","compiler-rt/test/builtins/Unit/multi3_test.c":"a033317a659c67a11fb914282331273411c195d9cf029ccbf680a843d24f02b3","compiler-rt/test/builtins/Unit/mulvdi3_test.c":"7682a3719a14be60dd6781b75a2cdb6db449f64ba5662ed8467380aeeeb030b8","compiler-rt/test/builtins/Unit/mulvsi3_test.c":"2e8642b7aecb5a3e81417ebdb297cd6b26536f91ff0749fb785c82502689d4b6","compiler-rt/test/builtins/Unit/mulvti3_test.c":"4d26fe17ffbd5db2190656170946e641affcffe9d4d98ce65d46939bbe7f7e87","compiler-rt/test/builtins/Unit/mulxc3_test.c":"5396d19a4b3b5ba8c52d39a4560268d881ba9e8ad7be7aa0e966019dba0fd64a","compiler-rt/test/builtins/Unit/nedf2vfp_test.c":"e16bbf60f432afeae4c468f8e779c59fb6d73cd806c9c539e18e5b931d8ff160","compiler-rt/test/builtins/Unit/negdf2vfp_test.c":"fbf34741eea11e2b3021de83431f0210b64dc3372e39f4cf5373eda374451010","compiler-rt/test/builtins/Unit/negdi2_test.c":"495bd1ac7a65ae2526f77a176a6dd379cd5be8026140208669a84c9921cafd00","compiler-rt/test/builtins/Unit/negsf2vfp_test.c":"276fb3ee93d5d6ba440a9b789826c88999328e16881275ec3e4dc39691a17e0b","compiler-rt/test/builtins/Unit/negti2_test.c":"02b450d15f643ef228c906b304cad42694fb51eb50110f6d34457c970878ed17","compiler-rt/test/builtins/Unit/negvdi2_test.c":"12fd87910189aebbe0f621000492dba0748ba413e9057cfc6085f785833096e7","compiler-rt/test/builtins/Unit/negvsi2_test.c":"c0ef8c7387cf0eb8ffd3ab4a4e2a1fb020c997d9492d2429bfe31245d0e6168d","compiler-rt/test/builtins/Unit/negvti2_test.c":"ff8a020cd1abd1a2620a4a5d66a6e6f335744c155aed312974b9accc69d9fd11","compiler-rt/test/builtins/Unit/nesf2vfp_test.c":"ff2937f2bf09a66e744a61fd365c1afe7ae1c417efee7e2437447b018408910a","compiler-rt/test/builtins/Unit/netf2_test.c":"a8a7d77f6db65f18a9de7ff46a51b8d5a2f5d7517a15943dc6b7fdd264de2fb1","compiler-rt/test/builtins/Unit/paritydi2_test.c":"b9762a81eacdd7ab62e1a611d4f921318af88d8f90d7a71ce941dfeece711811","compiler-rt/test/builtins/Unit/paritysi2_test.c":"9d3870484602622c2a777744da3ecc58e4c26085618ec8c29ed81d0831a9b42f","compiler-rt/test/builtins/Unit/parityti2_test.c":"b08a3256bb43ced53dc74c728651e27cfe5bdb771957f7b8ded145c87018f5e4","compiler-rt/test/builtins/Unit/popcountdi2_test.c":"1e8515dd322c5f1588692ced089a7114196aa47a0f3a11a42e71704059bdde76","compiler-rt/test/builtins/Unit/popcountsi2_test.c":"119f89dd70d046454ccda2e8a3afcbe205c1ad08c73a2af5261d73dd81b3a842","compiler-rt/test/builtins/Unit/popcountti2_test.c":"5f806c26ca32c5e5ab7245304971fa5b1a4eec089290e24d2bfd598dfce5946b","compiler-rt/test/builtins/Unit/powidf2_test.c":"9b6f8ea5e5df706c2a193648111a434cb8cb3fa6a1f75f9a6a305fd714298bf6","compiler-rt/test/builtins/Unit/powisf2_test.c":"86a28c7f8fc249925bc5b816f95febe535495477eb95f1d2291c652548304e35","compiler-rt/test/builtins/Unit/powitf2_test.c":"5cbb9c19dba96b869a1c4663439d8725d17057d261f73e874d15b17da46431e5","compiler-rt/test/builtins/Unit/powixf2_test.c":"41b0fcae1328b95c0389e6e1e5a77bca010c217f24032189bba8fc5d97b92bee","compiler-rt/test/builtins/Unit/ppc/DD.h":"6e3ec83ffc7914bca47160b189f179d27dcc7e4bb5701a8f1f9167cd5d4a41a4","compiler-rt/test/builtins/Unit/ppc/fixtfdi_test.c":"decf74e62f9530e75483808cb23b0acae18288c986c1ff5a73ab0da1dd5886ba","compiler-rt/test/builtins/Unit/ppc/fixunstfti_test.c":"0e3554c973154564772342a86d5610cd6c11431468f871663feead9768326eb8","compiler-rt/test/builtins/Unit/ppc/fixunstfti_test.h":"c7ba8c7d65d4b0cffc22bbff44a032a546cd17d2b7d2bf5aea1c9345c6d9147b","compiler-rt/test/builtins/Unit/ppc/floatditf_test.c":"98c7b887353eaed2d8af18fddfa4b4bc57cfa256a92aa5cdc69f5f72f3dc1d17","compiler-rt/test/builtins/Unit/ppc/floatditf_test.h":"abcde060503cfbf0780470473da3032b707336cf4533f3bf243b3f402602a09c","compiler-rt/test/builtins/Unit/ppc/floattitf_test.c":"40395aab3146879da6858bc2382f1953515f911b3a4f773862636a4c9daeb294","compiler-rt/test/builtins/Unit/ppc/floattitf_test.h":"4e58349aaf67d925edfe61beb81db4a74d15e5d27f2d14d73a725a4bb3fccddb","compiler-rt/test/builtins/Unit/ppc/floatunditf_test.c":"98b46b1cfea76255c3981372fdca1c7070ed604a741ab1c739da98a8662cf8f5","compiler-rt/test/builtins/Unit/ppc/floatunditf_test.h":"5f2e5d9eab3e313976fbb89b876f791bd17f91c581d209a8be3e328fa282dee5","compiler-rt/test/builtins/Unit/ppc/qadd_test.c":"f2e146ab057ca4b4253f767d2e74ff53382441bb39b2ce51ebde8c3b52956dd2","compiler-rt/test/builtins/Unit/ppc/qdiv_test.c":"7d757aed9ed62e73fd06579dc0cb5261005562d335439004aaf221874622bc8d","compiler-rt/test/builtins/Unit/ppc/qmul_test.c":"0cea8750344c588fb2e88213e9f7b75d56e5104551fc855f942703dc81afb930","compiler-rt/test/builtins/Unit/ppc/qsub_test.c":"e26fd35205278a120c7c4217d1ccfd4359f05ea3958e9986f36b755248688a59","compiler-rt/test/builtins/Unit/ppc/test":"4b63607e390b658cb892ead8c3d5f990ccf95afd8c26b3ac14712c2778a8098d","compiler-rt/test/builtins/Unit/riscv/mulsi3_test.c":"20bb61adc7d91d3da4a65024dd627888aecef88779b6db6399d511c878e92dfb","compiler-rt/test/builtins/Unit/subdf3vfp_test.c":"6fd3803c494fb51e993151275ce63cd9e04a0755b4ca91447a0ebe5bcf12feb2","compiler-rt/test/builtins/Unit/subsf3vfp_test.c":"af4a19faa930ffa966996f82b1ee18971fb3fbd1c141a23000bb66d9fec38020","compiler-rt/test/builtins/Unit/subtf3_test.c":"70ec10ee1b7034e817104e2e017236d6a0e6bdb66751bb48ea1f48bc77f8d343","compiler-rt/test/builtins/Unit/subvdi3_test.c":"ae739cbb6a70446aaeda69276adf492585743d7fe44d001b15d949622b8ad764","compiler-rt/test/builtins/Unit/subvsi3_test.c":"01fe16bb87aca83618fe135153fb0ceba9e6150f0f0bb0b6ae8972a71c239c6a","compiler-rt/test/builtins/Unit/subvti3_test.c":"1af53c98be627c50b9891fa984122879a6c85243e8f346f4c8f6585503544a5c","compiler-rt/test/builtins/Unit/test":"6e7235f8fe2b00bb4e811487270a44d6bb99fa398b3214dfbba47e1566a611cc","compiler-rt/test/builtins/Unit/trampoline_setup_test.c":"8895526ad25a7c325002e2263405ed1575e942843312f42117f098f30a572cc3","compiler-rt/test/builtins/Unit/truncdfhf2_test.c":"cede03e4b7f9fc12f73eebfc0451af0e9d96667602a487e76b5ccb99fb97c1a7","compiler-rt/test/builtins/Unit/truncdfsf2_test.c":"fc8f4bccd4f73349a47f1fd2f0413cfd8c7df1391e584bcbd9d93a1514753fa6","compiler-rt/test/builtins/Unit/truncdfsf2vfp_test.c":"32a0b4f2faaf5197694d2bea0411d9e46f10d6e05b91e1595486280d12dd654f","compiler-rt/test/builtins/Unit/truncsfhf2_test.c":"4a52200ccbc428300ef073525e747ad30edd0440a0e8ab59ce7b2fcb8dc6c79d","compiler-rt/test/builtins/Unit/trunctfdf2_test.c":"733e3ff16337a98a1a7b578454cb058585d8cdcc6d64fc3f7df8f06b6803e8c8","compiler-rt/test/builtins/Unit/trunctfsf2_test.c":"8d1346adefcf950ee5d0159206c51e1195ba938913fccb89f6c17f2f80640768","compiler-rt/test/builtins/Unit/ucmpdi2_test.c":"0c6370d4a33b2d5aef1610d8480c0e24c7771932f73fd1ea54dafc0d98b24838","compiler-rt/test/builtins/Unit/ucmpti2_test.c":"07e9a25c6b4d46f0b3fe08d1481afe97a36ae14e2f798d0a4e045f90dd26be0f","compiler-rt/test/builtins/Unit/udivdi3_test.c":"dd1267a9cfcac8bfb118fe7ace3e4ee849fdb5f6c0e620c62ca01c2e87a7ec1a","compiler-rt/test/builtins/Unit/udivmoddi4_test.c":"e93e9d6b13ac85b95a3cef4669606f2dcd5113f0a7a67b3ea27b71fcc5339626","compiler-rt/test/builtins/Unit/udivmodsi4_test.c":"522c2cb944afb6ca0c3ed10e3184d425d15bb8a6295946c89523f08aa5fe87c7","compiler-rt/test/builtins/Unit/udivmodti4_test.c":"b0d63153e950c4171ee0971afb96c55c554041156dfa833f9807ea413089d4d8","compiler-rt/test/builtins/Unit/udivsi3_test.c":"568f39633383e0466dfebfc4af670e420cfadfceab36bb9815cca9c9ffa3985b","compiler-rt/test/builtins/Unit/udivti3_test.c":"8036e2dda8e94d9acd9c800d2513f9e08342910b9cdda7de6dc5477d62d08fc8","compiler-rt/test/builtins/Unit/umoddi3_test.c":"c570e67c5fcf4aff667cac26995bf19543325ce68f20616bd7333024ca50f4c6","compiler-rt/test/builtins/Unit/umodsi3_test.c":"cc451025c12ba85346a797cbbd2a2dbda07726210f3f09a5d9574ed40f6b201e","compiler-rt/test/builtins/Unit/umodti3_test.c":"1be7cc3d11d94390337a4febeaffe1f9a25225b4f208f1022a8a0cd609d2f06e","compiler-rt/test/builtins/Unit/unorddf2vfp_test.c":"1a0e568dc91bd958051a987679b40ae7b1fb9aca8671e4e6672e60c114c82df9","compiler-rt/test/builtins/Unit/unordsf2vfp_test.c":"5f4fa06bd7cd5a58347aaf3522720f791b5f1439447f084df529fe2d3ad33b82","compiler-rt/test/builtins/Unit/unordtf2_test.c":"518f9e7622566ab260068f965b540fba2e68929abc1eaadc971e78790d1d1bf7","compiler-rt/test/builtins/lit.cfg":"155ae5b655cad95e987d320a97ad697ab4f536508e40964262b3db1b8e8015bd","compiler-rt/test/builtins/lit.site.cfg.in":"d0eed33e5f09dd1f24cee5d5c8e452f1929c19fc6c45ad8109bcf3eae6eea8dc","compiler-rt/test/builtins/timing/ashldi3.c":"e78cae3ee8b3d3d2b6d02689850a2b26d32bff6b5dfa9719618cbed501984e10","compiler-rt/test/builtins/timing/ashrdi3.c":"e56828d55721f1bdc92b1c897b03337ced0e587e48c2e014f86c9cc68dd8b02e","compiler-rt/test/builtins/timing/divdi3.c":"d31f103e4a4caa95931005e225699915c1c613265dc326b69d434247d72a4952","compiler-rt/test/builtins/timing/floatdidf.c":"9cc0fa9c5f5e7b66d720298e482c7fd5a047410d909a69e48626d81d999c1d07","compiler-rt/test/builtins/timing/floatdisf.c":"bc90f0145fae2a58bab2d33f1a4facd4a76412223c3d38e2256735beca7f1c4c","compiler-rt/test/builtins/timing/floatdixf.c":"4b163a816f5ab80ea3dd79f155501404c2f1b5e89bf8bcda41666eec5cfd2960","compiler-rt/test/builtins/timing/floatundidf.c":"db0b0c47e43084994619b9fe2fc5378c95de990889ca309ddb8e751a263d76bf","compiler-rt/test/builtins/timing/floatundisf.c":"763151bc228f7f9ef96ed6f25a17411b68415e33191d4a1ba5fd8e679b97c6e7","compiler-rt/test/builtins/timing/floatundixf.c":"4ded50c1439844e8fe2977b4dadfcc88fbab6c09545beb1b37cc213e05ea3575","compiler-rt/test/builtins/timing/lshrdi3.c":"ef9cda77008cf43b9a5a9a7667d6b8f72635c2f2011581b9ee0771efdbccfcb5","compiler-rt/test/builtins/timing/moddi3.c":"41288833f547afc81154dccc4c53383ca5884ebaaf8e91192d3a98e7408f2bc3","compiler-rt/test/builtins/timing/modsi3.c":"b4d104274c4e0ef65a2d52807014ac7a8ea687c2f2ee97ecc5deac57555cf669","compiler-rt/test/builtins/timing/muldi3.c":"d6fd3b8f174f0ac90de498a95c670314bb97415eca9d274394a08e3ee780c0f0","compiler-rt/test/builtins/timing/negdi2.c":"241dccbdcf1317153357f20e18148a9f80e69248900c62d12afb4902a25ce8c2","compiler-rt/test/builtins/timing/time":"57214ae82537531fc8d7f99b8a834a26aa270ab4f9e397fd2f6a4a76c0c10c73","compiler-rt/test/builtins/timing/timing.h":"903d7a3ce53aced6a8d4a42ac029883f098af63fa67026d32965c666974830c4","compiler-rt/test/builtins/timing/udivdi3.c":"3f3892ceb53946b35892334cf4a46f8f1dd9830cac42204193a80becdd034b10","compiler-rt/test/builtins/timing/umoddi3.c":"4843f417828c33bb1473824a1ad2f70c41588692ef835c5280ebc34b9555e567","compiler-rt/test/cfi/CMakeLists.txt":"2730fba1c9c0da53696e9e51dfe40af0d6b54e53c92e1d23bd31650b83c3afca","compiler-rt/test/cfi/README.txt":"3377322ab2fb184815c24ca973b8fc9b6157c7c8f37ee1a3bf373bb5b847f4f3","compiler-rt/test/cfi/anon-namespace.cpp":"521fce7f0052cf2d3e3de93d3de6bd7b871eeb60cd3c25e5bf0cf772d6e24d8c","compiler-rt/test/cfi/bad-cast.cpp":"57e7b78b6c8ed8cc3266f64a6f4f049333355b1f1b5fb9dbe940a9240020ce60","compiler-rt/test/cfi/bad-split.cpp":"1dd80cc5e6452c6f71e4ba8ef0c68b2420ef956175997e2b9dada6a3b9634b0c","compiler-rt/test/cfi/base-derived-destructor.cpp":"d12f5126037c1329ab52dbfede91f848749db4f5381c9de98ed36d29c489bd96","compiler-rt/test/cfi/create-derivers.test":"e3a106a547d822a72ad088f9c8c69248d8a04446da646b461c1c637f7f0e2300","compiler-rt/test/cfi/cross-dso-diagnostic.cpp":"a7c1a82732242fd8686c4ddab084dc8376f3d5ee3238ce35a8cc4a01c75491e5","compiler-rt/test/cfi/cross-dso/icall/diag.cpp":"e62ccb75f58dfff5e3faf5604fe7987abbcafbd1fa623aa5af225521cd4da60f","compiler-rt/test/cfi/cross-dso/icall/dlopen.cpp":"a4e847f6ec5a802d49931531b874ad4d17d4d821145b7f75bce7747b8f7d0751","compiler-rt/test/cfi/cross-dso/icall/icall-from-dso.cpp":"52f0c4c61d16043c9d779b2edc9cf7f9118fffcbb498acbb762c891bffffee89","compiler-rt/test/cfi/cross-dso/icall/icall.cpp":"2d10276bef9c97ded4b7c22d95c638d17d320b10b83c13ae01189410213a9a12","compiler-rt/test/cfi/cross-dso/icall/lit.local.cfg":"297a3f2ddf40ec256784446492b16ee9c6d0686a82d6fda63dff1b44b3c65427","compiler-rt/test/cfi/cross-dso/lit.local.cfg":"cba98026dde291c25f382aca788cc0abbd66c47e206fb1768d9fc70e01de0537","compiler-rt/test/cfi/cross-dso/shadow_is_read_only.cpp":"447d309b5de8a3234b6830db25dec96fbb50e57a92f87e82cb5bcd42dc08017e","compiler-rt/test/cfi/cross-dso/simple-fail.cpp":"19f7bc960838b3385582c8c97a349b60e76643244d48e9c7670f54f7c0a21121","compiler-rt/test/cfi/cross-dso/simple-pass.cpp":"9738bb14372f9aba4605ba574ced94864fa1a6ccc3c886ed316675c7e71bf76f","compiler-rt/test/cfi/cross-dso/stats.cpp":"9d86b2f654a6eb902816ccd93601289232355dce7c072e26d6e631992b98a128","compiler-rt/test/cfi/cross-dso/target_out_of_bounds.cpp":"ad63dc3d78a649964a107d233974874d41ea261e11785ba915b2c00ba6290fed","compiler-rt/test/cfi/cross-dso/util/cfi_stubs.h":"9f1339580d2930bd1a1227fa89e33ba326ddae12018d75ffdb882010048c60d4","compiler-rt/test/cfi/icall/bad-signature.c":"02c1465dd09ca412ec081c2d3d36d053c5dd74a401e6914e22545d61855b9255","compiler-rt/test/cfi/icall/external-call.c":"23dacd7a6c787dacc8e4e8fc876af2d2a645bcca0263d52bf0d51157b0f5987b","compiler-rt/test/cfi/icall/lit.local.cfg":"297a3f2ddf40ec256784446492b16ee9c6d0686a82d6fda63dff1b44b3c65427","compiler-rt/test/cfi/icall/weak.c":"bca4008261665e7bbd3963709c2c909d4ff79e9f2ced3ef948c95aa92372e343","compiler-rt/test/cfi/icall/wrong-signature-mixed-lto.c":"346066dbc479370d0627ef83d8dbcea13461d2af62bd47567bd14db74d1a4395","compiler-rt/test/cfi/lit.cfg":"5c6a39814f5af3f05decf60ff82a583dae7e053134515e785be42c48301865ef","compiler-rt/test/cfi/lit.site.cfg.in":"70e4e5b2ad200208df0b19854375ccb1ee8871755fcf15bc28ca73473a77c52e","compiler-rt/test/cfi/mfcall.cpp":"a586c9bf58b35846e95ea8009c6ed84b5130f6a009b3b3e12e31657d9a97ac70","compiler-rt/test/cfi/multiple-inheritance.cpp":"c52e24f484dbf21a1829bf12c58565e4ced1555fc9b1b146074c909d1aed1936","compiler-rt/test/cfi/nvcall.cpp":"e6c7b2504a07a35c5c4f2df2834eb2fd40dddbdcda6a68f05a7e89c290e91bc7","compiler-rt/test/cfi/overwrite.cpp":"e3870323f62d0854bd1469b4e75410c70775030b3845d47c58ad1d3c6994a9c6","compiler-rt/test/cfi/sibling.cpp":"2453a743a067856416183222a622022d7a8d4bc9bf29b8d24dd3f65d359f0dfb","compiler-rt/test/cfi/simple-fail.cpp":"5b7ae2af7d606994eb758b40909c58e3a0ac98d57a5482ee409facf0ff96dd7c","compiler-rt/test/cfi/simple-pass.cpp":"3a61de16b82be9711892d9ed41a1a88efb99aeeef3bbba886ba74169da4b3ba1","compiler-rt/test/cfi/stats.cpp":"718c2a4c550caba77bfde098c96e6f493a538b7cc0271b282fec128cd95d9bce","compiler-rt/test/cfi/target_uninstrumented.cpp":"9aa4c239fc16bd0fcdfbd4b03d7835a5b9d3b8f5e8fa14fb2e1e217b20bb2dcb","compiler-rt/test/cfi/two-vcalls.cpp":"94f8067c1183165d9f1b3ccd45570095fb678ffb67c17d2e328412fb83bc9699","compiler-rt/test/cfi/utils.h":"12f8984b0a3789e6f03bf2a67343abb190a3f60721165cfd7df1a272a1a41e6a","compiler-rt/test/cfi/vdtor.cpp":"9d006eb809116f905eea22b95c6c3723c7ee9c9eb2da92f3bfda0e2036301f22","compiler-rt/test/cfi/vtable-may-alias.cpp":"9350fb085ae891128f61b6ea47cb011a659bfb8743e40dff39e61c51b3c00b68","compiler-rt/test/dfsan/CMakeLists.txt":"cae12e21cc875c7caad32081edb76a4508a1fca285f099647ccf08ff890f8a8b","compiler-rt/test/dfsan/Inputs/flags_abilist.txt":"bc392d2a8b6e850762563fe13eae1e0e4632c7526a0629c6f4f830e332fdd437","compiler-rt/test/dfsan/basic.c":"6a1c75d37c0fc16b08831d3cbeed4e97ceb3eb351987c72701c6c662508a45e4","compiler-rt/test/dfsan/custom.cc":"83c27816624d6bacb29094584885a8b0acc6e400e693b939bf874c7247621d72","compiler-rt/test/dfsan/dump_labels.c":"ad6dccd7d4b3bd7b6531015c7f52ffa0a24a5cf5fde132f705d7d3290b0d6db3","compiler-rt/test/dfsan/flags.c":"ebf282969e3596d611a900395b6ac67d1b409bf663a57caeda49e634482f9800","compiler-rt/test/dfsan/fncall.c":"b37d0139400bf0c293e9238b11916bbfe8306da9ce7e40abba8329e8d075378f","compiler-rt/test/dfsan/label_count.c":"7853ca7d32ffd0a5ffdb301cc5a920d1c1b3a06289f2e8767ff69ff820d856f5","compiler-rt/test/dfsan/lit.cfg":"c84145f2174c15376f5044d20e7cf97208586bf8ca1a92b98433fbd1a52545ce","compiler-rt/test/dfsan/lit.site.cfg.in":"9e65e555c5a7715b896b1afe418b96704db5366783471d30ea0490c10a944256","compiler-rt/test/dfsan/propagate.c":"27044ab769ad354fc62dc63333de099ceb60bdf8ffa56bef7a45925d72226a6d","compiler-rt/test/dfsan/trace-cmp.c":"9402c8b680bc509eaf780112ea5f17f547e102129711f1964f5b57ddfa78275f","compiler-rt/test/dfsan/vararg.c":"332f0586510aaa54ebd2b86c586f39104fc85848115a78caa2bdba4de78d6699","compiler-rt/test/dfsan/write_callback.c":"4448904321134ffd19ed03f9ca1ef30d9d39f924d9d9c5c3acb4f88f102099ee","compiler-rt/test/esan/CMakeLists.txt":"35db910239350ef8050f2bdabfe76c7efa6eed761c9d249942431f8136d73201","compiler-rt/test/esan/TestCases/large-stack-linux.c":"aa474b099cb75aa0607659ebd6c7773f8b5389da094dadf18c6219b005bf65a2","compiler-rt/test/esan/TestCases/libc-intercept.c":"9b1b45ab0c1c8d260323bdd8878055b748365b3945bc528aa9c1aa4c11cb9f6d","compiler-rt/test/esan/TestCases/mmap-shadow-conflict.c":"bca905c45a9e595c42b0489b2fc2df9a49e49e0488c0f2aeaf57377933a4bb75","compiler-rt/test/esan/TestCases/struct-simple.cpp":"498b2f43cf51eeb1392693da3a916c0b0a7735053891500808b6f5e6a7841a1c","compiler-rt/test/esan/TestCases/verbose-simple.c":"5bc7f79dbd74cb9f7fbf88ddc569c46d986ba48bb8052c9d27180deea70811e6","compiler-rt/test/esan/TestCases/workingset-early-fault.c":"53d53a01c625dee1cc5e30015d4bd4c88ef167a1432e80fd10abe03eb4e6ed3e","compiler-rt/test/esan/TestCases/workingset-memset.cpp":"e974e2dc9c1f41f84b98c445de858e781dcf00fafca074a1ca2c18167fa3526d","compiler-rt/test/esan/TestCases/workingset-midreport.cpp":"7a883909fafbf0c91c2cacbe498fa8568637d8100b5f5b3cf225957e0a7743f6","compiler-rt/test/esan/TestCases/workingset-samples.cpp":"80c3e1ede3ba79579de720f3e4a7475ce6e2ed62d5cba56c4feb050b6704ab77","compiler-rt/test/esan/TestCases/workingset-signal-posix.cpp":"f82e45c3c69a2e1176d4680506f34a562bc1b8ce40aac51ba1f364fa8064a827","compiler-rt/test/esan/TestCases/workingset-simple.cpp":"1e586bc1883c3b6f492d0ca04deb73f4ea63a09fab1ebf81c323ccd456825081","compiler-rt/test/esan/Unit/circular_buffer.cpp":"5ab6438f50fba242475882efd3b0e196fa50d19cde0ff42808daa1703a45f1b9","compiler-rt/test/esan/Unit/hashtable.cpp":"f31981e11b1acc6f204c49ef80ab4c1c51a737fb8d02cf671c0060d38633f376","compiler-rt/test/esan/lit.cfg":"ef2788e268928a9ff762c0eda9feef4c5a18d5cb0e2256ce284e0c3a5c99b241","compiler-rt/test/esan/lit.site.cfg.in":"c4e93cf48cb9db29517bc41c996adf568e39b2f29486ad64fd46c86150b51365","compiler-rt/test/fuzzer/AFLDriverTest.cpp":"0265f5a3f2cfd5fec0a8646c5b882a290185f84311657fe69d6d2badb6ae84f5","compiler-rt/test/fuzzer/AbsNegAndConstant64Test.cpp":"29facc65734c4ee894d02da2134552b5a96eccf806113cce71974a825127d7d6","compiler-rt/test/fuzzer/AbsNegAndConstantTest.cpp":"0eb1493e5c0520071af0585d6cb209597ffdc3f45ac0d0217e57f980998d5ae8","compiler-rt/test/fuzzer/AccumulateAllocationsTest.cpp":"2714b4eef5aed3c00de0a518ab15fcb56e74a76ad50b475742b4f3630de52adc","compiler-rt/test/fuzzer/AcquireCrashStateTest.cpp":"ebad196388b89b45240ea05c3b6747c25face9904e70dca0dd455d39f8b5aa3d","compiler-rt/test/fuzzer/AlignmentAssumptionTest.cpp":"614a758f8a59981a64cb52d59fad98166862b9c51962e7fc462f02bb38f650bb","compiler-rt/test/fuzzer/BadStrcmpTest.cpp":"ddb6549c40e46a6cadd930e8f026a3e15b9d8fa5786d397dc8f21c45bf6a2190","compiler-rt/test/fuzzer/Bingo.h":"4dd0b37785876c7a611ce3a76a5b63622a977ec258ff94e2e04a66fa6eac7e21","compiler-rt/test/fuzzer/BogusInitializeTest.cpp":"89bba1010da0ec33398c883f611903dd8e37a8fbec87fafea7fb1df9bd7815e3","compiler-rt/test/fuzzer/BufferOverflowOnInput.cpp":"777dac9480415fba3feea02f9774b7f4bcbcf85e183224e4a39e1c00844f8178","compiler-rt/test/fuzzer/CMakeLists.txt":"c9e1fe2bd38f574ff5bcec5bc1aa7afe9637c32ad4a90d10286906170e8f659c","compiler-rt/test/fuzzer/CallerCalleeTest.cpp":"26da6b933d0d86f3196374a1848a968724e510fb49923d2d983ba129ac4dfd6b","compiler-rt/test/fuzzer/CleanseTest.cpp":"b4783b77d84eba85fba53c681f5966cbbac0e69392e9058e0ceaaa3c3b9e9986","compiler-rt/test/fuzzer/CounterTest.cpp":"ae0a091987fc722b310592fe6fa63c66ab4c74e84dcd7f9e73f80d61e708bcb9","compiler-rt/test/fuzzer/CustomCrossOverAndMutateTest.cpp":"89647138ebf6d44c0ea15f5f26770037ce7a528a52f4439978562efd1f8926b7","compiler-rt/test/fuzzer/CustomCrossOverTest.cpp":"710a507734baa548f4455833e60d67b11f88a7156552896c86d27833a1c50b2c","compiler-rt/test/fuzzer/CustomMutatorTest.cpp":"03ba76fa2847897370584637873cc2b31ab1d818bec5e02acf540556ae67521c","compiler-rt/test/fuzzer/CxxStringEqTest.cpp":"766c1d36b2e4c493992ac3f4e48c419ead88572681603f33f81c40783d3e3e33","compiler-rt/test/fuzzer/DSO1.cpp":"ba73c4018bd3fb45b861bc0375888bd4e7b310bac0275fbeb3751d2f5d046d44","compiler-rt/test/fuzzer/DSO2.cpp":"632e829125d8ede7760c991db82f7defa095919c9c7f21092c5fffc7bbffbed3","compiler-rt/test/fuzzer/DSOTestExtra.cpp":"45629f7e449bfb345a4de9d34bf5d1d1d36ed1dea872fabe4e1b0c1471197b71","compiler-rt/test/fuzzer/DSOTestMain.cpp":"bf2021893228a0617c8c9aaf53320f918407e0da82eaa95715214f24c351ea78","compiler-rt/test/fuzzer/DeepRecursionTest.cpp":"dc3bff5012717088dd0b2bc618f9cc943a02d2415270fedce60de34af158d99f","compiler-rt/test/fuzzer/DivTest.cpp":"6f82a81cd7128c2d69da71e8af21c41d278fe7402bd882f1e1790f0989d4604a","compiler-rt/test/fuzzer/EmptyTest.cpp":"6c8edf440fadbbb5a4e9f8982329bf881a146ba0f36a92299f80826996823165","compiler-rt/test/fuzzer/EquivalenceATest.cpp":"f6931769f8728782c8ad65534361d0a892f211eabd46012b608575718cb8467d","compiler-rt/test/fuzzer/EquivalenceBTest.cpp":"5eedbb7b73a777f5d94f24823c34b4950d610ece888a21c0ba33de4365f21f02","compiler-rt/test/fuzzer/ExplodeDFSanLabelsTest.cpp":"530334071adfbaa9a466e0d7c998496f0e6af00af9c71b91068ca95200659f56","compiler-rt/test/fuzzer/FlagsTest.cpp":"a7d254d77456454e6f6762cf803948f2a89ed610bce9629bec001e9953b714e6","compiler-rt/test/fuzzer/FourIndependentBranchesTest.cpp":"53f07446e212578bad1ff62c455a51652135a4f82884a90bf1b7e213c5346bae","compiler-rt/test/fuzzer/FullCoverageSetTest.cpp":"5a15d00118d282428b72fce810628d547f09a7fd0f603bf7ab4a8b843e16f087","compiler-rt/test/fuzzer/GcSectionsTest.cpp":"502a7489635a3153b75a8175a25f926d10d5d8e698e95d6524e3fa953380565a","compiler-rt/test/fuzzer/ImplicitIntegerSignChangeTest.cpp":"1b66d22a877e23c688c1db1ee54cea0c90560943100bdb920aa00a3fc54559f1","compiler-rt/test/fuzzer/ImplicitSignedIntegerTruncationOrSignChangeTest.cpp":"811f835b07a26db79dbad90e5aa5ac2180885714c24b9ad8616f8b3115ddb04e","compiler-rt/test/fuzzer/ImplicitSignedIntegerTruncationTest.cpp":"3a674e979e873ee3c5b4e1f5e20df0996b8577a9cda2e575193eb5863fa9c89f","compiler-rt/test/fuzzer/ImplicitUnsignedIntegerTruncationTest.cpp":"d80ef64e9ef62dff56f549b71efc248a9fd44d13d1f6a4dad5c9247ede465ab1","compiler-rt/test/fuzzer/InitializeTest.cpp":"3633da2be160660b8d90696d072fdde75330e64217ab9d6819a2208a47e43208","compiler-rt/test/fuzzer/LargeTest.cpp":"80d4c19ca628632571682cdfdb07a42d08dfcedff05a1884139dee3e0afe63da","compiler-rt/test/fuzzer/LeakTest.cpp":"c24365169c218282804ccc60cfe5a8264c014a08056623a6d5595c035218aa87","compiler-rt/test/fuzzer/LeakTimeoutTest.cpp":"0a1900c39808f0db40065f449450ae2c57dd6992c4ac2a3c57a81a5f9b3cee4c","compiler-rt/test/fuzzer/LoadTest.cpp":"3a1bcc70f6e549041ccaa669c59d5d1adda9117921d20641cf2930460f103a8f","compiler-rt/test/fuzzer/Memcmp64BytesTest.cpp":"8db0b5ab55b570a8da6712eff236d4c4b407c848d5b549d23c754179ea64a835","compiler-rt/test/fuzzer/MemcmpTest.cpp":"4ec8f58c0c482253434633df1d5c9cb5dafba2ceb9a8bafc95ce303681f18068","compiler-rt/test/fuzzer/MultipleConstraintsOnSmallInputTest.cpp":"ec5aa9bedb7d3538832a1ea44d4fceca036940e965f6ac351f1d2360c25f3821","compiler-rt/test/fuzzer/NotinstrumentedTest.cpp":"4eab0acf7689fbcb6202feb1cde6743e34ea3ecc770adc377ce982dcfa4a1520","compiler-rt/test/fuzzer/NthRunCrashTest.cpp":"06bae68b40db97b39dd15ae90d4f1030d634f468ae3290d1981fae87feb096e6","compiler-rt/test/fuzzer/NullDerefOnEmptyTest.cpp":"811610fb80ad7e53d9bbbeba037cf7289c600c302546b48cc033c59fc843358e","compiler-rt/test/fuzzer/NullDerefTest.cpp":"d9561dee8941d87c6bd2658f1337306e5b0686787e959d505358153848cfd411","compiler-rt/test/fuzzer/OneHugeAllocTest.cpp":"32f67567c5bf6f67a56635535f9b353b287eedab79bbaff796560ad0caf62d0a","compiler-rt/test/fuzzer/OnlySomeBytesTest.cpp":"58a6919b99dd5972795323f336bec3d7157702a3ffefdc2918fc89a8fc08fb52","compiler-rt/test/fuzzer/OutOfMemorySingleLargeMallocTest.cpp":"6004002e7d6cfbf1c589b27d58e57c6d88d61ecc592f5e7c99fdd01ffd1155bb","compiler-rt/test/fuzzer/OutOfMemoryTest.cpp":"8c4e25bfa44d81717ba720a42ddaff48b5e462632325381444a330cce34c2dd4","compiler-rt/test/fuzzer/OverwriteInputTest.cpp":"2f59de3f2c1013f73afdee12e6ac0f8356d09f5b6bdcd717461ff80efb812b35","compiler-rt/test/fuzzer/PrintFuncTest.cpp":"1f3457a3c3c5515282c79d1e738a3435160710451de006925341b4c5986498fa","compiler-rt/test/fuzzer/ReadBinaryTest.cpp":"862eb1e5723d4e7069a54d361b97ecb951fda12f46a50231e7cc769ffb6d11ad","compiler-rt/test/fuzzer/RepeatedBytesTest.cpp":"b6fef96b13e279c96ce137b0e942bdefb4e3a1265dcb8e34c36540977b8835be","compiler-rt/test/fuzzer/RepeatedMemcmp.cpp":"797dd207f4c553d72b58c14c7124bd3b499903bc044707907b60dd1e8466af3a","compiler-rt/test/fuzzer/ShrinkControlFlowSimpleTest.cpp":"97ee470c9f893915b95b1d79f8904741f2f523912ee4f7f2d705a7cf1f9be1ed","compiler-rt/test/fuzzer/ShrinkControlFlowTest.cpp":"814eb4ab1a7a126e8c81c23a19a2cca4e3433e8b5ab75ac9435ee0361256c731","compiler-rt/test/fuzzer/ShrinkValueProfileTest.cpp":"5dad5e4961ea734a53621c5d67660efbc67b6e37df74ce73c1ff989d50df455a","compiler-rt/test/fuzzer/SignedIntOverflowTest.cpp":"8af1213f9157193846ce5846d5e7ab2c5d38516df48f6c0651bdbad47f4b86f2","compiler-rt/test/fuzzer/SimpleCmpTest.cpp":"734be997ed875c8ab3bed51c4e6c28d183da68a6ec1bf16231e1760a9cb9b910","compiler-rt/test/fuzzer/SimpleDictionaryTest.cpp":"1dcac4a8758dfe01981160d41be65d1c9257f05ade98ef59757a67f32f5a82d8","compiler-rt/test/fuzzer/SimpleHashTest.cpp":"8a1088534753976f23e9e0388230c18dc3a17913592f7ec56f39ca06d4f8ccb4","compiler-rt/test/fuzzer/SimpleTest.cpp":"3f26c2727025d54f010859522eda412085a3324b09db6fc165705179e89b41eb","compiler-rt/test/fuzzer/SimpleTestStdio.cpp":"508ed47f78243aeadd5726fd5692407fbbbe83a0a2deb18ac3c4e2a100c3ced1","compiler-rt/test/fuzzer/SimpleThreadedTest.cpp":"331ac59d7e55edc0099f4d4ae7ebca52423199383e310e2371fc1b8134a91aae","compiler-rt/test/fuzzer/SingleByteInputTest.cpp":"cd77be832960b9e19b48cb6c1aa064e0a81b8ec088f38fae8ccd93901299fc10","compiler-rt/test/fuzzer/SingleMemcmpTest.cpp":"45ede54cbc83c32bb656d5ed8dfb0283aec59bd180cc2d384ae0cfdc477f5c00","compiler-rt/test/fuzzer/SingleStrcmpTest.cpp":"3f265d43b6539c064cd47be80a6ee7b77b9b9a084a9b7b91f94bbc824e02cd08","compiler-rt/test/fuzzer/SingleStrncmpTest.cpp":"4767c61e456df48fbe7255dca4cc22595757f711fabe8939443027190cfdb028","compiler-rt/test/fuzzer/SleepOneSecondTest.cpp":"595a539d251eb837c4b15f6ea7e26f8bbfc8651387edea82a12a29f602f84213","compiler-rt/test/fuzzer/SpamyTest.cpp":"a6c77de82a50a30a4fe69356f9f74b3990da7a13152d50e38ba57780d605e5f1","compiler-rt/test/fuzzer/StrcmpTest.cpp":"651bdb96f4a333ee87aec86532cb67f2b55fcee7d988a32fbc62d26888866bcd","compiler-rt/test/fuzzer/StrncmpOOBTest.cpp":"e032d7b1755e35b936d1cab6269bddf733bd1492c939259f35a475385946eecd","compiler-rt/test/fuzzer/StrncmpTest.cpp":"cc70af206801eab50b5c1f0f9e0d37b1fa937e3c2b37e071a810eacc6717300a","compiler-rt/test/fuzzer/StrstrTest.cpp":"032d9c5cf986f019aaaa8cec1119718d791bd98048ea78ebe0cb95f8d3903926","compiler-rt/test/fuzzer/SwapCmpTest.cpp":"8720f44d3ff2ab4f2fd37c24390d11ba535a6de509dd836e705a7256e1271981","compiler-rt/test/fuzzer/Switch2Test.cpp":"c11c84a08c97f4e4c6ddfd422ea5d4073cd12fcf9638cb0e6b643d9f26edb6e2","compiler-rt/test/fuzzer/SwitchTest.cpp":"2d2766b0377dbea8554958ecf847109a24a1e69eade66b17a61d67cdc3214eef","compiler-rt/test/fuzzer/SymbolizeDeadlock.cpp":"e093668a65ee641dcedf09823ce31a4960f65db4d8888f34c736c658b349076a","compiler-rt/test/fuzzer/TableLookupTest.cpp":"7b954a1d212d643bbb70faab8bae4bcd4843dbacd792ead4f688441003135029","compiler-rt/test/fuzzer/ThreadedLeakTest.cpp":"7263a4b348b288f73b830c229fcf9716f6988fed8bdcafa47d03d7d628c15374","compiler-rt/test/fuzzer/ThreadedTest.cpp":"595a1065b46c01ec3f6c745839f50f20b08b274da33ef3e8d380e9e2cdb831ad","compiler-rt/test/fuzzer/ThreeBytes.cpp":"b14fd0ce86f1d23347af5d3007d8ea5a682aa0de60c356d53492dbf1ad240586","compiler-rt/test/fuzzer/ThreeFunctionsTest.cpp":"a8e7c4d0da7703b656d0a7f0a97e1387a21470ae4027d1b4102d1300c87746f2","compiler-rt/test/fuzzer/TimeoutEmptyTest.cpp":"5560f0e4f08b06111b7bbab4ce058fa9b3684f16a565881bc486904436dacdaa","compiler-rt/test/fuzzer/TimeoutTest.cpp":"3155a0530eba17e2cdc3bd2675640e30da18842e856dcabc7bc0e143203797e0","compiler-rt/test/fuzzer/TraceMallocTest.cpp":"10f27372cff79dda93b5cb80b0c7e5cbf315a62fd4788d9ae93845294ece29d2","compiler-rt/test/fuzzer/TraceMallocThreadedTest.cpp":"02aabac8d353a88b6114921666b0bb751c993e38a99aee16cd370bab6a297316","compiler-rt/test/fuzzer/TwoDifferentBugsTest.cpp":"02a04803364482f76af9085d177ff268f234124e155f1420a7e50e9a63c09344","compiler-rt/test/fuzzer/UninitializedStrlen.cpp":"da39f42151fe6e8c309ba898ba5c605918ece11e9a1c07975113a1531c7c62bb","compiler-rt/test/fuzzer/UseAfterDtor.cpp":"0949c47e71ff839c766cb044f0b4d4c9c02f7ec14b48686827e61b892a411e95","compiler-rt/test/fuzzer/acquire-crash-state.test":"2287c3fd6ac43337a72953b1bf21200a0616ad785f28c5fd1157801b6fa749ab","compiler-rt/test/fuzzer/afl-driver-extra-stats.test":"e53ab3381745ddbb1e987fca25add83c531f57a9837552a5b664c5d855848d97","compiler-rt/test/fuzzer/afl-driver-stderr.test":"7468fe6e4192c4ca32886e1e148e7d21ca06c489952169c28119e56adb619f52","compiler-rt/test/fuzzer/afl-driver.test":"130458ed483e40f96db6b80b3d4aa81bb2b100fbb0d5cd6da0c56000a4b0835c","compiler-rt/test/fuzzer/bad-strcmp.test":"1d9dd318e897ce4e76acd98a39148dfb378b58ed981b530001cedffa56f2a9c4","compiler-rt/test/fuzzer/bogus-initialize.test":"13d783bf64256d011a22b8df864bc46a37cbaaa1ef188e791380b17ff0834308","compiler-rt/test/fuzzer/buffer-overflow-on-input.test":"58d75771d10a91f8bf731ff22736e00698cd7e4c16efcb415ace050fabb5b06e","compiler-rt/test/fuzzer/caller-callee.test":"1a053313532918f5b5d7706ad7113617e045046405ea5b48768503b9a0cb5530","compiler-rt/test/fuzzer/cleanse.test":"b48a404f32ecec3c8914e2355a5cc6d8aebb0509b9d3fe8d91f063edeb546e5f","compiler-rt/test/fuzzer/counters.test":"809c4ffaa0ae5510b22386b91f63f7629bfd7ac25520f3ec380b6583277e104d","compiler-rt/test/fuzzer/coverage.test":"43da7036909a5374de5de747d0f66ba1024c3fb8b190a8b5b0394d7bd4e52a55","compiler-rt/test/fuzzer/cxxstring.test":"2a556f49c3c6042e83643b09d5e3ff7ab4d3d7bdd604fd50fcaac3de8b766087","compiler-rt/test/fuzzer/dataflow.test":"f6c4d2eca71d594f5df811aaaac3b12574cf6cf37cedc884dbd68b1c2cf9a202","compiler-rt/test/fuzzer/dead-stripping.test":"c55677f13e5d39a33b6f178931739296dc68a4e4c985cb77aec1e3c279419404","compiler-rt/test/fuzzer/deep-recursion.test":"72b2bd06342e6b2a7069df0c233340c7d919f3f245d39daa31d0a5da12466141","compiler-rt/test/fuzzer/dict1.txt":"36d49adb61f86381c1e98e42cdb14001b57e4fa795083a9695b9fb03e446dae9","compiler-rt/test/fuzzer/disable-leaks.test":"186b8daccecf48957e5599718b08189d994b3826cd781fd8beda1579c9f4c94d","compiler-rt/test/fuzzer/dso.test":"510361062f5468067cf6d9213fa3e32c1bd7be62358b4896157b602a386a2f43","compiler-rt/test/fuzzer/dump_coverage.test":"57da9f34349cd4deb993c6b92b054f22e34e0920d471ffd446738e86583b02ec","compiler-rt/test/fuzzer/equivalence-signals.test":"433796d5fc5f8b9620429fe2ee6b583baa9cfcf39ed3e4c55c323451efd238f2","compiler-rt/test/fuzzer/equivalence.test":"56cdf94e8f60e034d61acbb49dc4b513f918b0e61322025f0e663002cd032680","compiler-rt/test/fuzzer/exit-report.test":"243e8509d4b9df3bb650c1d86b2c000fde3d84860aea81b2a4a1d72492c4dcd4","compiler-rt/test/fuzzer/exit_on_src_pos.test":"418aaa551fe5278847e23e1e15507722636c6b9a2efcbd4a3db2aed728cdc4ef","compiler-rt/test/fuzzer/extra-counters.test":"5af83bc0095a89566deaea58f24f77fe2d1d796ca2770e5083a30776cbdbab38","compiler-rt/test/fuzzer/full-coverage-set.test":"e1192786fea98cd9d10c90e68bbcdce7501e551a1be94976bdc56bb355b554f0","compiler-rt/test/fuzzer/fuzzer-alignment-assumption.test":"f25417c305b1346f5a2c7b52a26aabb7aa630159a0531f9c03492278f8f73315","compiler-rt/test/fuzzer/fuzzer-customcrossover.test":"c392da7f8ac1514fb90e6d2200a46fb89e4232671cdc4d8cc1f5a2fb6db541a4","compiler-rt/test/fuzzer/fuzzer-customcrossoverandmutate.test":"1bb1321e1408b9a2119c8837f8f66a343430b5be56c32eb4985386cc56e05191","compiler-rt/test/fuzzer/fuzzer-custommutator.test":"8da9a46864f7d7039d3e8fadcbc17a96a06f64f66a40d96e7d82ff03d61db517","compiler-rt/test/fuzzer/fuzzer-dict.test":"f7bdfbe60240c68642ec948eae6f239ef2a2b96d8555175343daf8ffc4ffbe59","compiler-rt/test/fuzzer/fuzzer-dirs.test":"754a3246f2f228cdf841828b23bf4485d6b3fe0ef3c1d4c297dd3e19498aed94","compiler-rt/test/fuzzer/fuzzer-fdmask.test":"a967fe7e50e9175203bf9c34386a9216dc0b49924aff94046627f874a1310974","compiler-rt/test/fuzzer/fuzzer-finalstats.test":"d8645dc63bf5d6fb077ee62f66a63131c8757f0a8e958973bf43bd50b5f4acd3","compiler-rt/test/fuzzer/fuzzer-flags.test":"19e3a5ae657a5f72b139b76c43e3d5f65831e85c60fecbcd48856ed48d5851db","compiler-rt/test/fuzzer/fuzzer-implicit-integer-sign-change.test":"286e509368058375da8cbec6f987e4d077af6aaab3dbd415096b788ad769008d","compiler-rt/test/fuzzer/fuzzer-implicit-signed-integer-truncation-or-sign-change.test":"009f5fdb49e2b9556ec214f755e1d45ebe4af88f51d0888c7094d4922a4702ef","compiler-rt/test/fuzzer/fuzzer-implicit-signed-integer-truncation.test":"deb3087e4d9ab9a51c47d3fde767bfe92009fd954433cea4be0f0473496b72ef","compiler-rt/test/fuzzer/fuzzer-implicit-unsigned-integer-truncation.test":"0a35da44e9b981dd8c026554a11f27c9f6e590d9f827af594808a096a2bc4659","compiler-rt/test/fuzzer/fuzzer-leak.test":"bd2042323eca0f93a4bfd0ecfb0c0dc9d06add5c93d9c3756a06ff6dc86ec0a2","compiler-rt/test/fuzzer/fuzzer-oom-with-profile.test":"23d462d996235c6ec8e98275197a74de98bf63b201747c423cf2ac9e06cd418a","compiler-rt/test/fuzzer/fuzzer-oom.test":"157c5e25dd5d414be773b37a2bb64cf499e9f053332a91b4c7b7638d064740a0","compiler-rt/test/fuzzer/fuzzer-printcovpcs.test":"192e82f63fb6a218b916096a666db004f81d91c92c78a7f5e2005b435be39b97","compiler-rt/test/fuzzer/fuzzer-runs.test":"b75bab6afbe04a40d26630979260fb8120008b38a65e10e339bed373d87bda0a","compiler-rt/test/fuzzer/fuzzer-seed.test":"7e2c31c68ad21a057cac8567c690748fd36b24cf1c3ae47c7327babe7829ccdd","compiler-rt/test/fuzzer/fuzzer-segv.test":"de42beb86d73ddbdb37bc53ca494822373107b869195a704490251ea77877b18","compiler-rt/test/fuzzer/fuzzer-singleinputs.test":"c18b18ba6dda0fe9835e63ff1d0c42b20468c7b67412795d518ca9f77c2f915c","compiler-rt/test/fuzzer/fuzzer-threaded.test":"e87623f6be24591467ed16540d816dc4cc2c0fa478dab658d44e646fecd5fb58","compiler-rt/test/fuzzer/fuzzer-timeout.test":"b1dd0f1bd7c51ae511a16c0b2acc9115a933797e1f3820c1f4eb83a4d4b73148","compiler-rt/test/fuzzer/fuzzer-ubsan.test":"657e3473b3c879b2939eccaa707777437957ded4497f006ec99ffb94ab3bb51f","compiler-rt/test/fuzzer/gc-sections.test":"29b862dc87327933192eb6b7cbaebdbdd91250573d1ffab3314d633fa57a85a6","compiler-rt/test/fuzzer/hi.txt":"ca51ce1fb15acc6d69b8a5700256172fcc507e02073e6f19592e341bd6508ab8","compiler-rt/test/fuzzer/initialize.test":"7712387a1781376bb6947054a804c3342b327933cdba2f4a276d6a614c1ac65d","compiler-rt/test/fuzzer/lit.cfg":"19597477327ca05f2fe118de504f5b143dc2256c3f2119155c789abc5dd6e005","compiler-rt/test/fuzzer/lit.site.cfg.in":"ad2ede590cc280fe9658579f299896c3aa13095640ca1484cb4c7a01692d9d5b","compiler-rt/test/fuzzer/max-number-of-runs.test":"57693b41839f17dcf62491df7f76a97a430b597b8beb560bf210600190ac98c2","compiler-rt/test/fuzzer/memcmp.test":"b0ed72482747b050b68f2dc0c32ee8b9022817fff46ee1b95a73ad1e15b23b07","compiler-rt/test/fuzzer/memcmp64.test":"ff81fca3cc9a1611c24e5f0fb62a44277411154761a70084d1d641c6c0be9f73","compiler-rt/test/fuzzer/merge-control-file.test":"dc11bb7bdf48658659979036a9d5007d3f65f59ee22e4f3d8b9e790bff1143b4","compiler-rt/test/fuzzer/merge-posix.test":"ff0eb7b95cddba053cdc6a5e4bfaab7606ae111f37d9f79ff797a09dc665d629","compiler-rt/test/fuzzer/merge-sigusr.test":"8867a34a421867b92b5e6aeb59b5676a216fe2fbea8b458654c58597a4990b1b","compiler-rt/test/fuzzer/merge-summary.test":"4b9a7f0a26fff21ffbdeb9374503bbe0668c47a5486f09ae66f1ef0d3fe9a250","compiler-rt/test/fuzzer/merge.test":"6658702174003c50a57a57611bb3de41adf26186c9ceed82e48594a6bb9cc716","compiler-rt/test/fuzzer/minimize_crash.test":"fd73c3272d78caf4539edd42ce878b0c7aafa5b5f806b5970ab2c3b2bcbf798a","compiler-rt/test/fuzzer/minimize_two_crashes.test":"783efb2c4e4e852c295629241cdbd4808f13fb82527966d864c92783bc015e98","compiler-rt/test/fuzzer/msan.test":"f663b80c1058c881676b843c95109593b7ce3593e8d8925f12c78bdc3d037b67","compiler-rt/test/fuzzer/not-instrumented.test":"d1b797508adb9ece58d839143c05aa561e6022fa1b0813792d3beec8fa562e4c","compiler-rt/test/fuzzer/null-deref-on-empty.test":"292d736ca0909389fabb22bdb3d2c5208699f4212ba65b56eaf6c9dacf9f0d10","compiler-rt/test/fuzzer/null-deref.test":"f81ff66de6911103cc72308bfda50f7191f1bf9eda32290fa573391d3d189a71","compiler-rt/test/fuzzer/only-some-bytes.test":"b82f451680b604a56bd49334436891350a3d7a29584f8f183596cd53509583d3","compiler-rt/test/fuzzer/overwrite-input.test":"de9f596bb85c431fc15cd8c1aeeebddd14948d657fba94faa0bbc1acb2dceaa4","compiler-rt/test/fuzzer/print-func.test":"55fdaad3cbaab36f0d7354ad163e1493a33a4937fb223b23479a707c6672769e","compiler-rt/test/fuzzer/read-binary.test":"9c2884fed4c9aafa40c0dca499e6c9efb40d9b72cbfa241c106f26223955e049","compiler-rt/test/fuzzer/recommended-dictionary.test":"98111265759fc80a725493f2a3be31efd9b4cf8a0e9f1d8627c6fcfe0cdc9f82","compiler-rt/test/fuzzer/reduce_inputs.test":"dd5120c973921c98f13b779be22250cb72c93d940fa16867ca73e3a850353a0c","compiler-rt/test/fuzzer/repeated-bytes.test":"f08f288fcf79b8688a130ea6784d1bb5639d02cebcbbdf359ba9c1bd82341606","compiler-rt/test/fuzzer/shrink.test":"63f9bf532826ad606123d72fb652b2ba96ee27238301147447ddf393c8cb356c","compiler-rt/test/fuzzer/sigusr.test":"691a5b38af51d8426580ef3e25392e0b1652f51ae69317ea4fc88913b523fe19","compiler-rt/test/fuzzer/simple-cmp.test":"a6df13e416ffb4323489ba47e59a10c76977596500d3c4c1fbd6283ed0d1d69d","compiler-rt/test/fuzzer/simple.test":"18cee6169c39288ad639c49fc7ce8522148bc65ceb2d83c95d9a75509a0fc679","compiler-rt/test/fuzzer/standalone.test":"cc743b79a61dfa56bf7710a5ef6163cfc00af5978b39f0754a4e080869220979","compiler-rt/test/fuzzer/strcmp.test":"02648cfbac159761907ba1c2dd956bb9a0283f736bb368bf5ba78e36a1465c9e","compiler-rt/test/fuzzer/strncmp-oob.test":"45796f0e351cb7e138e09f1df34b781e8a4a97a58d8f14c5c544c87e1d9d584d","compiler-rt/test/fuzzer/strncmp.test":"fef6c5e60a305a5acd8f979e1d1aa3ba0a1f02d2793a4ba2df42bbd3dc70498e","compiler-rt/test/fuzzer/strstr.test":"383684f5514cfba9c20f474f09616d608df894de811bd1f6c94bfcca2a4f0d62","compiler-rt/test/fuzzer/swap-cmp.test":"d8bd70ccf5c4ff89a53d938cef34336ff03b1cbd8b6335c6df76a88a140f703c","compiler-rt/test/fuzzer/symbolize-deadlock.test":"9474011b74938526a78cfec211371cc870601686ff7b0316c738520f79f041b5","compiler-rt/test/fuzzer/target-function.test":"e13d8484a9dca376e85653e3c0bfc221f125ac82423ea89d0c47d30dc5473177","compiler-rt/test/fuzzer/three-bytes.test":"19ce9f147689f403260aef32eab70706e71adeea19cd982f2c2ba5892ccaec09","compiler-rt/test/fuzzer/trace-malloc-2.test":"160199a9c752077d92436bdcee56155450ffffa7e7aaee9e0a4d575c3ea280de","compiler-rt/test/fuzzer/trace-malloc-threaded.test":"5864900c44272bc4f97e2bf024105e7cfbda54e63a5d43d76938f4c1820282a2","compiler-rt/test/fuzzer/trace-malloc-unbalanced.test":"4e29b084ab8530b9d7594112f0a7064ad2117b6260dcd468e5063afad2f1cfdf","compiler-rt/test/fuzzer/trace-malloc.test":"cd2e8422b5f2f3acdf91d69cb0ba818212e68966d50cf52108f62806fad74862","compiler-rt/test/fuzzer/trace-pc.test":"4d1e630ac544b2dae00014cc5b1f97032f598320ddcf7e190f2d180586969c0a","compiler-rt/test/fuzzer/ulimit.test":"678e9499a6fe5daf9c19abeecb8d5c2e5e50a09a1dac57c49c02a04ab3a7963d","compiler-rt/test/fuzzer/unit/lit.site.cfg.in":"4aaf6f0e572b8cd3b6bc1bedd2556dde748a231a5991c7e2a51d2f0b3928b72b","compiler-rt/test/fuzzer/value-profile-cmp.test":"cf8411c20f395f30c704d20495d9b8b467e4c71047b2741165edf9352775d7b4","compiler-rt/test/fuzzer/value-profile-cmp2.test":"f4c626ec9e299477ef0d9f61aa93fe0edf2a6e8670aa1d81df822ff02a70d812","compiler-rt/test/fuzzer/value-profile-cmp3.test":"53f3eb037a67cc25a6f88a610b27cfd2cf3dd4bb0c71555c00c3366dee1cc0ca","compiler-rt/test/fuzzer/value-profile-cmp4.test":"270179ad7f1a611317dc5bc17bbd56f7f4e75feb82b2b926c0f1d7255ef627d1","compiler-rt/test/fuzzer/value-profile-div.test":"f4b7e405a2f29f3d0df0eb2da6ed349ad7b3f3f1fb60e4cd450374478193a912","compiler-rt/test/fuzzer/value-profile-load.test":"cb8933bc6a1b87bb7bddbeabd6a825d9ad63f44245548743b2a857cbf0dee01f","compiler-rt/test/fuzzer/value-profile-mem.test":"a2a462d39b5eb26e44363b62490c277b10bdf86aca6ecbfaf189445e3ad5fe11","compiler-rt/test/fuzzer/value-profile-set.test":"791606fab94bc07c7c06c5623a86f804189b907c3d0949291b3034cf839a8717","compiler-rt/test/fuzzer/value-profile-strcmp.test":"ad7263e34174067ef6748ba68ccb7fda9c2353d0a4ae23e12521456b46619a36","compiler-rt/test/fuzzer/value-profile-strncmp.test":"9c32e58c8b12647fe61e61c6d956a0ff8198f67c72e7ec347c979d67256a3d31","compiler-rt/test/fuzzer/value-profile-switch.test":"023aff95f4d3e6916ffd23bfa3f8e4b8794e47171c894510d449f219d6252f60","compiler-rt/test/fuzzer/windows-opt-ref.test":"f9944a0e0080e2676e44247596f39484abc1bbb912474c344f97bbfe0a71e284","compiler-rt/test/hwasan/CMakeLists.txt":"0eeb29504743388a006ca3e5f3a466555b7c4632e2b87c86f6f365bea508b57f","compiler-rt/test/hwasan/TestCases/Linux/aligned_alloc-alignment.cc":"7785ccc7189b31e00148669bdc5a76488335ef15f472c5c1aed5825386e1c36b","compiler-rt/test/hwasan/TestCases/Linux/lit.local.cfg":"752f9f465d546875972dbfeb1fce9b5ecdfa3ab1d0b6b756efb1047f93298b01","compiler-rt/test/hwasan/TestCases/Linux/pvalloc-overflow.cc":"bf416bab78ece9816790f7a83c05a2352f59d83c9cb989f3b6d8935b05f24bf5","compiler-rt/test/hwasan/TestCases/Posix/lit.local.cfg":"3c6afec951edaa5e426ac1590d3e67e4136b5ce61803cabf17f3c775a7279daa","compiler-rt/test/hwasan/TestCases/Posix/posix_memalign-alignment.cc":"fbba9ddaba71109855d3c43d57f36c92c11ad2793ec26b7bcd00f5d674ebd819","compiler-rt/test/hwasan/TestCases/Posix/system-allocator-fallback.cc":"c64e5ce71c1e2d312d4fd5526b3a3faad171f9a5680677ffc86a87bd72c0ddbe","compiler-rt/test/hwasan/TestCases/abort-message-android.cc":"bcf24bd2fbd761836ea8534bb5017498f6599ac324c2761374432111ec737832","compiler-rt/test/hwasan/TestCases/allocator_returns_null.cc":"f03009a42ca1489c7f7871b5f70c956b882134b2f6a2993371edb309439b25f8","compiler-rt/test/hwasan/TestCases/cfi.cc":"d10cd4f0b1d0e29e41a75fd8d30590ec35dc4e0d50b3d40f1b7e516cc7044d1b","compiler-rt/test/hwasan/TestCases/check-interface.cc":"95eb21d2c676046d38e43cc1b0e429b240fa7e2cbad6272ef9d7a99fe38327fe","compiler-rt/test/hwasan/TestCases/deep-recursion.c":"8cc296e701a17ccfffed0aa8b40cf94630c06b5c9535cd1892ec3b7acc906779","compiler-rt/test/hwasan/TestCases/double-free.c":"a563494b43940d7225d8e3b4bc14d65e454bce974cf97aa7476677a3a43ea5f7","compiler-rt/test/hwasan/TestCases/halt-on-error.cc":"db6cf4f6977ffa472ba5e428c78b9c7187b41ab793b0d16f8e2f661e328e8df9","compiler-rt/test/hwasan/TestCases/heap-buffer-overflow.c":"f633d69a165a2cdf174aadee7f19ebab73167ddd61fc8c904dd421146daf3b29","compiler-rt/test/hwasan/TestCases/hwasan-print-shadow.cc":"a88fffa5bbfc98e690f4a9f4c383a4795d5baf06d9a7a6ab5710be3278cfcd4f","compiler-rt/test/hwasan/TestCases/longjmp.c":"a46eb69190c517f513782936ced963dfbdc8a6d892a53a3b958665026397912d","compiler-rt/test/hwasan/TestCases/malloc-test.c":"2f268efb4f192d26cd913546e34dae4c241b8e1e88316e78ccf69528d4d5985c","compiler-rt/test/hwasan/TestCases/malloc_fill.cc":"44320b57398521c5596355b4d5025f0ff2d53703d2c2720ec972e68712e58857","compiler-rt/test/hwasan/TestCases/many-threads-uaf.c":"1b1352ecf9f9c9cd5c44008a74c1362d2f13d7c8b759802ea6fbf59ec37739b6","compiler-rt/test/hwasan/TestCases/mem-intrinsics-zero-size.c":"41add28780932815d7c233cc0c92fe8dc87fdeba6a25eb1f2640c110f4a88410","compiler-rt/test/hwasan/TestCases/mem-intrinsics.c":"3ccec66b60a967fba69d018cf98d11330d8d2fe8635ff14fba10edd277941d3d","compiler-rt/test/hwasan/TestCases/new-test.cc":"8251155ed0b72497f7fdb347eb65b5615d3756fe663e108fe77ae2fd3bb70de9","compiler-rt/test/hwasan/TestCases/print-memory-usage-android.c":"fc90541ce930fa8d99ff2c8188a87625469fb8c52bbe0e0cbf892bc996130614","compiler-rt/test/hwasan/TestCases/print-memory-usage.c":"c0f95e01f2051951772f1b3b8ecaa6de9f76baa08ab98def7ad66ed51d1a29ef","compiler-rt/test/hwasan/TestCases/pthread_exit.c":"66c62fff2a5f06d604e8743ea20413486fbbd180490014bc8fca0df59c0072cd","compiler-rt/test/hwasan/TestCases/random-align-right.c":"9e3694184f91da5b3186066ce78c05c5089663956b742f523de6391286c63fa8","compiler-rt/test/hwasan/TestCases/realloc-after-free.c":"ddd6e2a97b44d2ca1e17edca7b39a4aad20945afe11ed9a4a0765cff65ba2848","compiler-rt/test/hwasan/TestCases/realloc-test.cc":"9189fcd9495297a6ef9ad73b34bcf5be4a1056cc39ff31406dd7af70368b5a1e","compiler-rt/test/hwasan/TestCases/rich-stack.c":"c77a757e9796f82f07a4d7a5d5b369fb1e72e66a06060d8e627278894a316c0f","compiler-rt/test/hwasan/TestCases/sanitizer_malloc.cc":"4704ddc22681ef69c6b5f39ed5416cefb6bbdcf1acc497878fbf98ca52dcc698","compiler-rt/test/hwasan/TestCases/sizes.cpp":"4ee9814a8ead74406b0ca2bd047a5e0e9c1f028f54eb96ba9b0adf94e32aabc9","compiler-rt/test/hwasan/TestCases/stack-history-length.c":"9cdb01f54b6d879b9fd000bf288bc65c495461bdb10477d4c1e970279a4f7d23","compiler-rt/test/hwasan/TestCases/stack-oob.c":"eed266aa6868bdc66df735ff49ddeb85e6b5f35020ef7f866fa191a4cc1d770c","compiler-rt/test/hwasan/TestCases/stack-uar.c":"d15012aacaab2953159c0dba76e4c5842a8d729637133997cca59e1d3e22b670","compiler-rt/test/hwasan/TestCases/tail-magic.c":"787125514145b35471e5899d9ac06dbc8bb8ca21252919482815032bc2498188","compiler-rt/test/hwasan/TestCases/thread-uaf.c":"783671a263de9ca04d97fdc1b2e162a42ef0ecc71821797403914af429391e21","compiler-rt/test/hwasan/TestCases/uaf_with_rb_distance.c":"0f65c4447413c83308cc05d1685ded897259a6578e31f229e7381ed2bd97b734","compiler-rt/test/hwasan/TestCases/use-after-free.c":"cc7fc63da87d5b8ed281ce254ff5a9947af28e996f43d023afb042a6e8b7e088","compiler-rt/test/hwasan/lit.cfg":"0b9c7a83b5039667373df8e2d6c13f41ae91d9b1742d0b801dc700aa5d2967b3","compiler-rt/test/hwasan/lit.site.cfg.in":"0e8e5f7a2a78d89f46e1c5989dedfe41063940770898b3df247feded3a3ab4b8","compiler-rt/test/interception/CMakeLists.txt":"5b6ac181334978e6b99239e0272ef06d515b54f32aa6e7a2b6c372cb7e2760d4","compiler-rt/test/interception/Unit/lit.site.cfg.in":"47304c34b850dcdb79c098a9d0e9fbdfa11418292a915846f573f85b646938b6","compiler-rt/test/lit.common.cfg":"88f4505c30c8775c5158735910b24db92ab42aeb6461a15659a6793a71ef162d","compiler-rt/test/lit.common.configured.in":"c092c8ed9df98e382906a4877cb656ec6b0c95ee735a18146893be1307899c62","compiler-rt/test/lsan/CMakeLists.txt":"e3054d3b0eb5e7754112ee37ce659b915ebfe1be09de348455c5bd7dffa6ebde","compiler-rt/test/lsan/TestCases/Darwin/dispatch.mm":"84c5aa8da03d89543d7570281c79a92226d7012eaba036af950f72ba9fcc00ad","compiler-rt/test/lsan/TestCases/Darwin/lit.local.cfg":"67ea8448cf3507eda12a63f0981890bfcb7959532eab5a4c303900daa5788a30","compiler-rt/test/lsan/TestCases/Linux/cleanup_in_tsd_destructor.c":"73c8a57258e0dca4a372ceb61d9110dbac7b1adcfb3b8f591f77c65baf1a5791","compiler-rt/test/lsan/TestCases/Linux/disabler_in_tsd_destructor.c":"e2dd7927e63b47c7ba4f76642cdb7ed7cecc20f56076a0bb95b067be808cc47c","compiler-rt/test/lsan/TestCases/Linux/fork.cc":"2758ff78eea28df6fc62e2b872bb948c0f0f36f57bcd67d463daf453e1b81255","compiler-rt/test/lsan/TestCases/Linux/fork_and_leak.cc":"740509a244ce3a1ea6a07d86b41330b650ca0ab009a893b6519003a1d24df49c","compiler-rt/test/lsan/TestCases/Linux/fork_threaded.cc":"71430996d9d7bbaff3b95576ff9d6cb4c43ea9d6609499e62d569bbf85bf1653","compiler-rt/test/lsan/TestCases/Linux/guard-page.c":"e1192eb9305bda86416383d664616ce401436b3052c5984a5753012bda787758","compiler-rt/test/lsan/TestCases/Linux/lit.local.cfg":"752f9f465d546875972dbfeb1fce9b5ecdfa3ab1d0b6b756efb1047f93298b01","compiler-rt/test/lsan/TestCases/Linux/log-path_test.cc":"c86d2b2b61ae5c0c88292a9fac6af63f5ad6f6d960970762d4795dae13eb84f5","compiler-rt/test/lsan/TestCases/Linux/use_tls_dynamic.cc":"d67755cc4eae2d97d89d7a6d8076288cc4c91b8a62fc779f8fe6198e3db3d525","compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_dynamic.cc":"acaa592bc76a78ed6f49c7bf95b72f456ac636739ddbb22465f9e7e47bcf81ac","compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_static.cc":"93dd4581173eade7574df4a120e9d327970eccf912aefc957407bd3175ce89f8","compiler-rt/test/lsan/TestCases/Linux/use_tls_static.cc":"a6b83932ae3d2ebca82052c082b071847651df396d6194394bf2d1a1139d501b","compiler-rt/test/lsan/TestCases/Posix/lit.local.cfg":"3c6afec951edaa5e426ac1590d3e67e4136b5ce61803cabf17f3c775a7279daa","compiler-rt/test/lsan/TestCases/default_options.cc":"372ebd7e61b4fbd71fa3b0c883b54259c22bbb58920e9ae07aaf5c4d332577e3","compiler-rt/test/lsan/TestCases/disabler.c":"9b8fe4ad21ff68a52e8df70fbcdf01301b99d60a3807a2f3c3ee709b598fb28a","compiler-rt/test/lsan/TestCases/disabler.cc":"c524754967379b7c1a60ab84b183611459aef7a78fe7321a1162bd9b81d5e75c","compiler-rt/test/lsan/TestCases/do_leak_check_override.cc":"325da9ae3dcd8b85dbe6e610a453f1ae07905dd8413227724fcd6f8e2183da86","compiler-rt/test/lsan/TestCases/high_allocator_contention.cc":"ebbdfd4041fcba9c8b451d895ecfb67bb472875fe6f02f427a3959e558655045","compiler-rt/test/lsan/TestCases/ignore_object.c":"49b5b6d3ac2ece574dee4dbf90d50cebb949f0e814400aac8d6e8402408883f1","compiler-rt/test/lsan/TestCases/ignore_object_errors.cc":"c5e0debf23410f866e54c1e0e56d4ff9ced0ef534b899ae8575d185991eb0d9a","compiler-rt/test/lsan/TestCases/large_allocation_leak.cc":"fb7448ce3154e2647a6acb665c6ea4de3c006f2422de937e2f82f501e9f3e764","compiler-rt/test/lsan/TestCases/leak_check_at_exit.cc":"d0a7ea2e4727ff8ba93c2fed83bdbf55eb18d1719ca6aad76e2442553453fcd5","compiler-rt/test/lsan/TestCases/leak_check_before_thread_started.cc":"0f78cf9eef02f21f94372e6eb8207c3cc1910202967c8955af0a0cc9a1ce8779","compiler-rt/test/lsan/TestCases/link_turned_off.cc":"a745c3414883c3ba9ceb34be59ca34434709414532dd23504b5d9c2d74b38bbf","compiler-rt/test/lsan/TestCases/many_tls_keys.cc":"111c716462cd6e7ca8d5b851bf40d6d20787ae3495b4bc212f608b03ebda4ce6","compiler-rt/test/lsan/TestCases/new_array_with_dtor_0.cc":"7061158dca9748f6d122717c436108fbf8e2566da6040d05468691996062fca3","compiler-rt/test/lsan/TestCases/pointer_to_self.cc":"ec471c111d07beadbe3ea4db377443fbcdbec90df20dfbc5885a30aa4b1d5168","compiler-rt/test/lsan/TestCases/print_suppressions.cc":"4bfa90c742070e3748dbc07cc47a4dfefc404dfec2d454945c31234983e8c34f","compiler-rt/test/lsan/TestCases/recoverable_leak_check.cc":"c8a9bce778e7ba5045c05616d49b1991cf82ffd735870610f5aeb0b60851ec16","compiler-rt/test/lsan/TestCases/register_root_region.cc":"1746d0a18c8a2fee81ed3744dce34c7a81121ba679d57566eb32a547e70c8263","compiler-rt/test/lsan/TestCases/sanity_check_pure_c.c":"81ebf6d285e21767d4ecc44182e5daed870df32006eb8ee3f5c99449cfa8e650","compiler-rt/test/lsan/TestCases/stale_stack_leak.cc":"399f81191957c3d00eb6bf0e87ec04be2aaacb0c4d228ec92e808aa1e78023e1","compiler-rt/test/lsan/TestCases/strace_test.cc":"273e3696fcc71ce4616a59d597c3eb6ef62bb373f3d686fe6c4685b36281186e","compiler-rt/test/lsan/TestCases/suppressions_default.cc":"82e687b6da84cceaf9a999577b0c3baec4a8f349a60902eafa86acab4ad3bc3a","compiler-rt/test/lsan/TestCases/suppressions_file.cc":"ce5fd0f0c07c5cf9d988c93913613957d718e371242b5cae4d9cd7217773e6c3","compiler-rt/test/lsan/TestCases/swapcontext.cc":"d3b5375ef67f04f044080dad392bd369e51217afc358d70b8b991615f49c246d","compiler-rt/test/lsan/TestCases/use_after_return.cc":"cc5d2f78366d1816de623a99bc1a334ffbed90bdb1bf1cc50c1db34389bdb758","compiler-rt/test/lsan/TestCases/use_globals_initialized.cc":"e8841f605a9950db8129d4e672244a4aa58a62cc165259b5d34722bce73d499f","compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cc":"83f980e3b521083c2d1c4c68b2b018d37938b1aaa6ad5adbff3fa7c3627b4769","compiler-rt/test/lsan/TestCases/use_poisoned_asan.cc":"cc95fcab19d60a5d71a43b9097d6f0e9c6d58312958f72df3fc1f14a719f2a2f","compiler-rt/test/lsan/TestCases/use_registers.cc":"abb690402690cca8fe9078bd3dd3897f95f0cc4769d3a017f3c432ae01a6983d","compiler-rt/test/lsan/TestCases/use_stacks.cc":"aa38272e036e8919e2e113a6ad16ecf9a07baffd76f5a8cd64c4f7351cc7a561","compiler-rt/test/lsan/TestCases/use_stacks_threaded.cc":"30b9a9b93035736c5cb8d0b4e7e6133cd87de99036bd726918d7dada2d286ae2","compiler-rt/test/lsan/TestCases/use_unaligned.cc":"36c35a7d64226b20fb1c8bd58d288765357667cd2db6d6316298657624791bfb","compiler-rt/test/lsan/lit.common.cfg":"329c7fd81e772897d0ddbc2f64ee3182de93831af6229c4392f2c30dd7659101","compiler-rt/test/lsan/lit.site.cfg.in":"71838d911bad370977219407dfe318becde3c651579bc4e78686d63c0c86cc20","compiler-rt/test/msan/CMakeLists.txt":"a8736cb445c671ba685417e1dd7cfc21dd57104aaae949e1297ffff161696276","compiler-rt/test/msan/Linux/cmsghdr.cc":"a86e6173d6060bb45a1dd13beca713fc14b86d9841c94806c9fb5d27de57fd6d","compiler-rt/test/msan/Linux/eventfd.cc":"de1cd04e5c9728a0a06967b694a89a4b2d9304fbf460338634fbb04cd8658137","compiler-rt/test/msan/Linux/fopencookie.cc":"8af167285a77bd47b015aeef4e439e0dd1f26a8b2a20dc5bfe4039cb566b0f6f","compiler-rt/test/msan/Linux/forkpty.cc":"87140fbe3004b9d93970a2bf9bfa2d8dbdbab4530d9632e5bb02d5f119366040","compiler-rt/test/msan/Linux/getresid.cc":"807ad78ec9b2aacc40473dfce208d5628d30342005accd231bc00ad19fdc1c6b","compiler-rt/test/msan/Linux/glob.cc":"c945d9793451e16047f24e8876c5bd64214cf023484b7119eb9282390bee6674","compiler-rt/test/msan/Linux/glob_altdirfunc.cc":"55cea7d9eb722071dbd843ac6d163602d37664915aa4da7c018ad3e53eb5bb2d","compiler-rt/test/msan/Linux/glob_nomatch.cc":"e238f6316c62e3f12870f648a3f0b3ada3a1746b53886d720da0b8552eeff560","compiler-rt/test/msan/Linux/glob_test_root/aa":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/msan/Linux/glob_test_root/ab":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/msan/Linux/glob_test_root/ba":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/msan/Linux/ioctl_sound.cc":"eb3736570e290d0451e94008347420aae915ca0e6a5cf322c6d6f09a38a2032a","compiler-rt/test/msan/Linux/lit.local.cfg":"752f9f465d546875972dbfeb1fce9b5ecdfa3ab1d0b6b756efb1047f93298b01","compiler-rt/test/msan/Linux/mallinfo.cc":"f7cfb65a4948ee521ea16ce0fa00ec4fac2490fa7213878f9f167888b54fe46a","compiler-rt/test/msan/Linux/mincore.cc":"093ea2ae62b4b905410b451e13566283cf7502fa3626c3b9f1f95213e7884084","compiler-rt/test/msan/Linux/name_to_handle_at.cc":"e27253308efebf81a426373a3e5e559ac8b328faeb878d8dc2fd3084b86d301b","compiler-rt/test/msan/Linux/obstack.cc":"5ce900437fcb09d3e456423b9a5bb78a04e0b6e07386828c3f69910ccff72642","compiler-rt/test/msan/Linux/poll.cc":"6904c31248f68e8af1902488df95da8e14aba91ca48239a987ad58f6a87685da","compiler-rt/test/msan/Linux/process_vm_readv.cc":"e8a5230944f78e47982e8e26159face992399c388b9cbea87d02a6bbecfd3bb2","compiler-rt/test/msan/Linux/reexec_unlimited_stack.cc":"dad7b631020094fa302c9361075601968148ba2abc2e11fd3a4d3aabb29ad428","compiler-rt/test/msan/Linux/sendmsg.cc":"956ab0fce2c154c5b1e790f3dcfba40e99b4777fa0dacfc477de2c809af880a6","compiler-rt/test/msan/Linux/strerror_r.cc":"b8479b6de14a3bb6fdf872cb944c260ea509c2d2a78369716f3fcc829b9a575f","compiler-rt/test/msan/Linux/sunrpc.cc":"034c9ca50a675dbfd3fb82494572f4d44bf042b6947be5e2e8a7586303e03968","compiler-rt/test/msan/Linux/sunrpc_bytes.cc":"0647acdb64317a212e1cb1cc732f8da66b01c2b1782090f7bbb9b0a526090a0c","compiler-rt/test/msan/Linux/sunrpc_string.cc":"9ccedf44ff8b1df2445bfb81a75e4cc80a8099ca35691ea3b3952f720cc52c3c","compiler-rt/test/msan/Linux/syscalls.cc":"631ff22e11e04dfb2a9296d98c3a16cf08e8004cb355ebe0dafccbf122cda996","compiler-rt/test/msan/Linux/syscalls_sigaction.cc":"c13490e067eed49ec6ce216626b2c43ee74653b6b670391269ecd0d6977f1ec2","compiler-rt/test/msan/Linux/tcgetattr.cc":"822cffad4d1b9863743691d8a1f335dec6b4a0df105d6dd5a6e9637562baade5","compiler-rt/test/msan/Linux/xattr.cc":"bff1f2fc7bec062ad4c4e36e342991c3e76edb602f6ae45bf9cd2f49f7781119","compiler-rt/test/msan/Linux/xattr_test_root/a":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/msan/Unit/lit.site.cfg.in":"8e4836fa12df92168d1f5cc98c61f6434b32ffb80f40e82e3ef5aacb485622ed","compiler-rt/test/msan/__strxfrm_l.cc":"9269967eec803f47db84dae1f5499e31cb2a8be9ff1e32e8d66009a09eb4a645","compiler-rt/test/msan/alloca.cc":"751fb5ca87c873e246858760562b06e7f92c7fc5571c66a49ffb2c03578bf68e","compiler-rt/test/msan/allocator_mapping.cc":"c1d578e548053f089cd7cc31a30c07a4d11669b62f3862fbc74059b7f630e580","compiler-rt/test/msan/backtrace.cc":"c1ae4c2b248e99f9cddc2f4d329fda78065b261ab0944c455409dfc1f34f7102","compiler-rt/test/msan/c-strdup.c":"66268b2b7633c8b21858014ad031da819fb1294c2320c9c63f5def5388b68e66","compiler-rt/test/msan/chained_origin.cc":"f11c96b860f8f0156bbb66507b8a0b9dbdce83ac0d616de9e47cb7820de4952b","compiler-rt/test/msan/chained_origin_empty_stack.cc":"5c504a3107434497830c062b9f68b1f3d890dddf317880bfdea711a4d58fc820","compiler-rt/test/msan/chained_origin_limits.cc":"5ee5886bd0743fb553eba2346f5b0e69a210050ab3ed85442ca11e873d5c7dc3","compiler-rt/test/msan/chained_origin_memcpy.cc":"fcd01f4be03a5f4f98b62ec5bb5aa9d8f891e081dda9b25489044a1173c4c317","compiler-rt/test/msan/chained_origin_with_signals.cc":"955e6d4bd04c230a776cd49d416121d4446875af7097095a7bfbfadaf5e7e623","compiler-rt/test/msan/check-handler.cc":"67d894a250d040e1aff95ee1c50107434ce5255ee4cb664e9c429d9f6e140e0b","compiler-rt/test/msan/check_mem_is_initialized.cc":"9fbdfd01961a7fbf36c4e69fdaa45816ac41f531861d0643795afce8903d7b36","compiler-rt/test/msan/coverage-levels.cc":"9c9bf2a560113e7239334f863949b0ac56b0977c5ac0e0c3ec82c2e6b9ae3d25","compiler-rt/test/msan/ctermid.cc":"589efdceed5a8865a31b031eab5a1511c2317f8310b225ae83db86b3a6358503","compiler-rt/test/msan/cxa_atexit.cc":"8ba0fb3a4a5e900439cc74c6b518e32bcb550ca97f7d6707b4cea8650db1d66f","compiler-rt/test/msan/death-callback.cc":"bf4b5bcc822c495aa00837d449343028d97c8c2363618ae8baa4459068d9ec38","compiler-rt/test/msan/default_blacklist.cc":"0221ecd56cd58e0007ea1b9a8d01ce4f19e5b3104b8ce7cede8d366891e5449f","compiler-rt/test/msan/dlerror.cc":"e093ac5521e594b4b83e8cf8a14d4dbfd796ac8b6b3b3bcd58a50b62ca574c9b","compiler-rt/test/msan/dlopen_executable.cc":"db041cd390363bc684412dab334050c1e1858904d2d1f94a1e2854de11d14997","compiler-rt/test/msan/dso-origin.cc":"68ee502cf21b999bf29ae77495543f8e26362ced91fd71e8a68b234052c2f49e","compiler-rt/test/msan/dtls_test.c":"974c578d4ba4923ed1435e1e1d35ac9ad6d320f870a21d11b25f432bde6bb65c","compiler-rt/test/msan/dtor-base-access.cc":"4b18382607db27b2cf0ba78184fdf7b5f5b04e1092dbb19618fd16e04c6b670a","compiler-rt/test/msan/dtor-bit-fields.cc":"ef51e411b21c53d39e18b901311cec2f590f8d5c950f9b72570457c72c2d1928","compiler-rt/test/msan/dtor-derived-class.cc":"17caea7a6991044f5a10e22611cf3ad43658dd22648fe00f75a235e75360fae9","compiler-rt/test/msan/dtor-member.cc":"f97e60e6a9148fe7e7ce5712046748e7602565ecd14a8c02dfaaa1aacf43a8d2","compiler-rt/test/msan/dtor-multiple-inheritance-nontrivial-class-members.cc":"b2372e7df41bbe203018afe22a7d99987fa52758b12d17a721c787bb493167c3","compiler-rt/test/msan/dtor-multiple-inheritance.cc":"c57a3400f55410491d1c91d4364be068392a61efdcb8ac708b9bbeda7030e254","compiler-rt/test/msan/dtor-trivial-class-members.cc":"ca2505bf69e0bfe09c049d6b11844cb689e80ff5b4ede8caa3ca27a01ef8c0e6","compiler-rt/test/msan/dtor-trivial.cpp":"29d88cebbfa4910edaddcffd409861a1aa29d3c376d4e008b5cdd1cb79fed7aa","compiler-rt/test/msan/dtor-vtable-multiple-inheritance.cc":"995b2617ec705811a66465bda9613f2bbe71a57356f39dab9555a18c9393ef06","compiler-rt/test/msan/dtor-vtable.cc":"e0a03bb6a9cc5ac5c3e2dd07fbd73446e217c778715e5bf04579c10fcf7e6785","compiler-rt/test/msan/errno.cc":"763aaa8325aceefdbd962f106c05e2a1fd6b32aaca30ca9d1006fc295866241a","compiler-rt/test/msan/fgets_fputs.cc":"3990b7fc772e229b49bce27b796b18eb10b7fd80e31218021fbd3554f4329465","compiler-rt/test/msan/fork.cc":"68f46c561446e0ff926ba584681d109a0bae3dd0552bfa5fb2d5b2b8c2ddc7d4","compiler-rt/test/msan/fread_fwrite.cc":"cf11bc28c6ce9f7264e2d5f7556ef69a2102e5f661be29fc8aad046931c30f29","compiler-rt/test/msan/fstat.cc":"9ad70620d304865be9049f33229cba52476502c0640569f0dd49cf7198ad7740","compiler-rt/test/msan/ftime.cc":"043833d5bc8c3bf82fd888e2215e0bc6c615fdf8cb94c1696b33c452d94cfa9a","compiler-rt/test/msan/getaddrinfo-positive.cc":"f6b5f6f7cf423642dcde76abb54279cd94056dc2faf132e1ad12b66418ccf3ca","compiler-rt/test/msan/getaddrinfo.cc":"f81d44f320ba028447dea0037e58a2e15a852fd430001d4c11c161fa93834ae8","compiler-rt/test/msan/getc_unlocked.c":"63c3a2e4d233f1443e6605a040a008d1cd933ffbcaf54d913d69acd79bdbc12b","compiler-rt/test/msan/getline.cc":"8272a5f60e08f209b55f91584c660ecfc5c84ab060891d39435e59b2b3943a4e","compiler-rt/test/msan/getloadavg.cc":"66e342402b71af17b57e62f3566a790b2eb11982152517b52c653c5f1c7c0fc2","compiler-rt/test/msan/getutent.cc":"bc230b883fadce50683fc8fc12b43f45c3521871ac2173cfce6a71bb4075f3cb","compiler-rt/test/msan/heap-origin.cc":"45d715ea1527a74dce69b55a2e1862ef1949e2f98e26913a8a8e6409375d9a53","compiler-rt/test/msan/icmp_slt_allones.cc":"53bcd9881e682f5dff50eeb2b062c081c7cea7bacfba6dc40184aac8460621b8","compiler-rt/test/msan/iconv.cc":"a3fb0c229887573d5b4a5a4acc25485bdc60ac5222eaca314beaf3c22d976562","compiler-rt/test/msan/if_indextoname.cc":"6a6444ee7b1d6f784deb0c6ed424b2c2751620d98adc4c590719a9d02fd64f23","compiler-rt/test/msan/ifaddrs.cc":"9b7ae37df3c5e33a1863d88a74fae7091ceb08c693fbc1e2c72abc2f3f43e581","compiler-rt/test/msan/initgroups.cc":"a970fd72730ab3b2d92837452e86ef7e8bcacb29a47284a2b81164b959068b32","compiler-rt/test/msan/inline.cc":"1e6be781f38ebc3e3cab4f4d60fb53ea6698d346d70cdd85303eb003fbb0c764","compiler-rt/test/msan/insertvalue_origin.cc":"27f2773833ce30ecf52d2487f4f351e9e851d4d74e3a9460def64f5e30735a81","compiler-rt/test/msan/ioctl.cc":"ee36fbd5f7ccad8cbdf2d9e09fdb404722f44f82a50e3e166425982635de685d","compiler-rt/test/msan/ioctl_custom.cc":"a56a496b18e8e1912ced21a0f7585e0d93db2331b56c44704c1fa00afb173c61","compiler-rt/test/msan/lit.cfg":"10469ddabab220f12215a3c5750e620470be23bb5fb863a4fd75163263d32b87","compiler-rt/test/msan/lit.site.cfg.in":"52e66c7009b28cc087b014fb98f9d0e5c888852175e157159de459a46719454f","compiler-rt/test/msan/memcmp_test.cc":"3965f09121879458686722a8780b107b41de9bb24b28e42ec529d04e835fec25","compiler-rt/test/msan/mktime.cc":"dfb410b8fbd50c899b5c75fe3a5391d96f6fb2eccec7d058bcc3eb921298914a","compiler-rt/test/msan/mmap.cc":"718a3708e7315ce94e1a7f02be9ea25560efa0e8ee5ae845c7ff4fe954708c55","compiler-rt/test/msan/mmap_below_shadow.cc":"be4793bda98a7f18db1df2083f467d1f6fbf17de4be9cfa5d7b5aa49cf69b8da","compiler-rt/test/msan/msan_check_mem_is_initialized.cc":"11f7a28c1fc4a4fea9b6bf14125ff31a4d2c4e39f6a3d31538508ded83d00de0","compiler-rt/test/msan/msan_copy_shadow.cc":"67d54ca2ed6824e8cf1e8bc2d7058ab8134ed1ac5157ea82ec3126d64accfae5","compiler-rt/test/msan/msan_dump_shadow.cc":"3d21c2e2b89f9a362efff90e17349abba8af2350755317364642ae8ef11eedd8","compiler-rt/test/msan/msan_print_shadow.cc":"7ae6a590fbd2ed34326e3a0ffede605096c5a708c7f3da54d6324809bbdcabeb","compiler-rt/test/msan/msan_print_shadow2.cc":"f247c37eddf1bbaaf9117a70b914a102b9884ac5b84dfcec71472eac5fb47312","compiler-rt/test/msan/msan_print_shadow3.cc":"d02cf0d7ab9774962ad6851a8b487a386ae346c864bbfab98a438e8a6594dc3c","compiler-rt/test/msan/mul_by_const.cc":"9442818bf9135a6d196a91f996e49f34bcd0d7cc000c790f4e5b26b4348c1acf","compiler-rt/test/msan/no_sanitize_memory.cc":"4efffb4be34f5ebca72c0d4efe589199f0486f84e5c9fe40982617524fd0583a","compiler-rt/test/msan/no_sanitize_memory_prop.cc":"81336979cff5cbab7247676266fcfa6a75789cbed1b1e718673bcb7100b5f504","compiler-rt/test/msan/origin-store-long.cc":"a99f42d393c167da17506c5404ec2fec387c30a7f920861610180dcc14764fce","compiler-rt/test/msan/param_tls_limit.cc":"f56ca925812f165a2b6d1d74c5016e79e73e29f76d63e6d22a52b3173b96a175","compiler-rt/test/msan/poison_in_free.cc":"b876db699ae332927727c7334133ab2f75d90af6654b5697311ee45c5314b13d","compiler-rt/test/msan/pr32842.c":"17d541131b6b1e30ca3ee29c9a0ad32aceac07d070b80b524bdfaf0bde7e39e1","compiler-rt/test/msan/print_stats.cc":"18986a8fb7e1f66181ffaccc695c48490a4e2325704a274e50b821f1eea5e52d","compiler-rt/test/msan/pthread_getattr_np_deadlock.cc":"e7c851bfc3cbdf19acc2631fc90875809670a6b8cd14fec788b5140c98c75827","compiler-rt/test/msan/pthread_getname_np.cc":"585d0e22da3d8c324a96e2c80443de9110a0f648c1e956f8663209a8a82f80ef","compiler-rt/test/msan/pthread_setcancelstate.cc":"24bbf19dd236592cd035fc480e3fa97c9346988998068640b9e9797eff7a0dea","compiler-rt/test/msan/rand_r.cc":"bfa3a389a8090267d6343c8fd1f27cb65d61dd4fa2b45ee5ea78edbf63cce9b9","compiler-rt/test/msan/readdir64.cc":"bf8e2c31c3fe06e07fb3ea88dac765385aaa031872bc25a75991e9fa1f642ebe","compiler-rt/test/msan/realloc-large-origin.cc":"31f7d4306f44421fad8da7024f7fe8229e7b26dcd02edff5d813ae16a1cb27b4","compiler-rt/test/msan/realloc-origin.cc":"57f39afe1d44158a735ec30aa221e1a9faf77a4e16c0dddaf8c657feaa6680ff","compiler-rt/test/msan/recover-dso.cc":"cd574fc72edddf4d559a803bc5ece273a34f0becd56082dc7a63d73d7a6dc1d0","compiler-rt/test/msan/recover.cc":"46d4c496c317e13dc35decbcaa53c8627b8054a836830f7d89f5a384f42264aa","compiler-rt/test/msan/report-demangling.cc":"64046c08e29b8517929eee307e1c43610bf74ea730a0074fb24d0eeb0f2bc399","compiler-rt/test/msan/scandir.cc":"2bb5d3a2bdb4b047c4a36df784309ef962883a110347672afb6148261fe833f9","compiler-rt/test/msan/scandir_null.cc":"2015ff663768bcb665657fd950a4a37bffde31c92bc2742db452315c9c4bfabe","compiler-rt/test/msan/scandir_test_root/aaa":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/msan/scandir_test_root/aab":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/msan/scandir_test_root/bbb":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","compiler-rt/test/msan/scoped-interceptors.cc":"b484c8a632ef968dd831ba0bf2e6e45d734a823ebc8e9765f57240c6681c3656","compiler-rt/test/msan/select.cc":"e6bfacdcda3795ff2367e011abea9e8597cdf1cc85714986c63c2ebcbb35fe9d","compiler-rt/test/msan/select_float_origin.cc":"448e20bb0449d591396de41a6a185702469760e94d9ecddf30cf6ac69834468b","compiler-rt/test/msan/select_origin.cc":"3abd810a279a329d86634bf850a5ced8cfe16318f073682b7e918de45969db1a","compiler-rt/test/msan/sem_getvalue.cc":"995367e00856dca0077f467e97ba3b3ece550bdfa3ab71f61bcc08bd31f5ba87","compiler-rt/test/msan/setlocale.cc":"608414450ba34712f0f9685b459171b18573605112b2d2e72a5c5d2be9557314","compiler-rt/test/msan/sigaction.cc":"ec3c125fc3d8e014fcf3b64082a12b2ac65cdcb88b13496a789c94c0c7ad37e4","compiler-rt/test/msan/signal_stress_test.cc":"f551aefbbbbcf3cf2b9d10721a705781c4aa49e3ff0f9fb500a7fa2317822d1e","compiler-rt/test/msan/sigwait.cc":"ae17c4e78860fb671fbb6e9af0830ab4cc1832430e2f43f21924d059b08a3758","compiler-rt/test/msan/sigwaitinfo.cc":"5febe8d08c878ff0e45c9dec491c0877576b08ce9732b8e4b2a2310730aceada","compiler-rt/test/msan/stack-origin.cc":"abdda1493571bbeb86f3c5723f316de5fc46ff9ccc1339cfc8e4868043267cc2","compiler-rt/test/msan/stack-origin2.cc":"9998718ed4be00d4c8e7c747578458753716adc165105111270aaf63e3d6fc5c","compiler-rt/test/msan/strerror_r-non-gnu.c":"5c908c0cf4d555b15619f4d15f7812d901255230b9f3dcd5c3650e802b30276c","compiler-rt/test/msan/strlen_of_shadow.cc":"90fdfedaaa10b98eff3a5239b447041b1c801a654bae4da7e56c7da90485d97f","compiler-rt/test/msan/strndup.cc":"2a754b7cf3fc59d89422eca04d68b01315016d4d9f495fa56f832f5d4415ff06","compiler-rt/test/msan/strxfrm.cc":"9f5dbbdff2f23e69f6e66253e1d3864149e8a7a8e688a7fa8405030a3ed98d60","compiler-rt/test/msan/sync_lock_set_and_test.cc":"4b7e69f2579626728a864756508eed376688d15b074d2734fe28078c87433b6a","compiler-rt/test/msan/test.h":"b200f81eb341fc87a45ed7f176cbaa981d1e5b1c2d5f1f8dc233c16c34110b76","compiler-rt/test/msan/textdomain.cc":"93099022abe8fd011efcb1164c932d551e9d17b9998e96a009411ec1a2296e84","compiler-rt/test/msan/times.cc":"e8242feff5b118b54acadb127dd55062fac24aaef4faa3b201ebdfc048740633","compiler-rt/test/msan/tls_reuse.cc":"1a43a0560965b8f29dfd50015cd9360cdad62f88023c540b97e70595b2270f6f","compiler-rt/test/msan/tsearch.cc":"1b5d1ad8ddc8152e845be20f09b3ce4b6616564c11b79c40e6f7c646766fd223","compiler-rt/test/msan/tzset.cc":"e9f626e6c3c7367e3f6b6b957ed14527b45239218ca1fefe2b8a46e606755ea5","compiler-rt/test/msan/unaligned_read_origin.cc":"71e91e8de2d80550a4e888699a64ecfc1386f1e1a79da488df6a4736f20f27be","compiler-rt/test/msan/unpoison_string.cc":"b510b8e081cf18bf33f935a68c966457bee1fcba076f66a5f53acb5c645f6f48","compiler-rt/test/msan/use-after-dtor.cc":"00a6dcce6d6b2f74ce5a527fd0a206a2b47c9679919b6755a8dd6de41615459a","compiler-rt/test/msan/use-after-free.cc":"ce3d27b44a5b1543ebb518a80c41e1750abea12fea5c580d920de2c104d2160e","compiler-rt/test/msan/vararg.cc":"60960a501c816955eeac69099af6415089afdc67d4e9cee9551c4a26cf67cd8e","compiler-rt/test/msan/vector_cvt.cc":"80d3054ae0c2a95abd72fb6b992ecf564d04763aa9221a72a0bb48b69f6c1f62","compiler-rt/test/msan/vector_div.cc":"df708521fa1e3a3edae28ab9e3e56ec61a4cf73e3659a68663887f328ee4d3b4","compiler-rt/test/msan/vector_select.cc":"14c5b2674b818206276010492b78ad64af17a65eb94bc4c97b0618fde351dd14","compiler-rt/test/msan/wcsncpy.cc":"0a030ebf866ec56595bae22eb6751711bb3ce4da22073be83d67ccd60dcd7ba0","compiler-rt/test/msan/wcsxfrm.cc":"6cc8753e7ddc59d0b79068265f722cfbd9b1708d250f1e46cd23e12b4c27c9bb","compiler-rt/test/profile/CMakeLists.txt":"41d4168cf096a84e89863ada2d51f6f55aa5e1f64f28217727ace4ccfe3dbb52","compiler-rt/test/profile/Inputs/comdat_rename.h":"104f52ff68eda54406de377f2d582adec7b50b74e1926a0d82c2b8a9deeb3a74","compiler-rt/test/profile/Inputs/comdat_rename_1.cc":"0fae3d7922448baa189c4d4e5c499de601cfe2887f82a9dea0d8061d8dc5162f","compiler-rt/test/profile/Inputs/comdat_rename_2.cc":"027a6aafa422b221148b813eaf7c658fb845f1a3b066a62fccf2f9dd58f22237","compiler-rt/test/profile/Inputs/extern_template.cpp":"b1166e7fba8d70d28874f6faa953f8388c618a2002e6a5f1741236791edcf04f","compiler-rt/test/profile/Inputs/extern_template.h":"758e2986cd50f0bb6a4309ca45144a228af6694244ea29e0ed775c99f5a76706","compiler-rt/test/profile/Inputs/extern_template1.cpp":"f93cf9e4fd8ccb012fc981dd782fe502ac7d8211d2a81cde4b89be5d4db33c3f","compiler-rt/test/profile/Inputs/extern_template2.cpp":"cd3e39c8fcf2ef990e3c39a6942363690c2d6e6e2220fa0e382ad1fe361579e5","compiler-rt/test/profile/Inputs/gcc-flag-compatibility.c":"73e13c89d221ce8bca7e2442fd4e8f0de4ed85bc087520f0814847cdeb15747a","compiler-rt/test/profile/Inputs/instrprof-alloc.c":"438635449fe9dbdef30eb184a38ae26bb7bcae700fc379ea6d27d3f7b6c296e5","compiler-rt/test/profile/Inputs/instrprof-comdat-1.cpp":"d745dcbdfb4abbdd274012117f4a047c0d775aef7ab5492c8ff7175ef5bdef51","compiler-rt/test/profile/Inputs/instrprof-comdat-2.cpp":"96784f5fa9081965df140da22eacf3bfdab02a2d128c317c4561686d3fb570da","compiler-rt/test/profile/Inputs/instrprof-comdat.h":"7bc89d2eed0584e6bbfe7da7f118c7e274c0d43ca463d5639f2068a1dd8ec1b3","compiler-rt/test/profile/Inputs/instrprof-dlopen-dlclose-main.c":"45deb30e56956ea5074617fc75b218386cfd39732d5df699471302188ad9f4e2","compiler-rt/test/profile/Inputs/instrprof-dlopen-dlclose-main.c.gcov":"83d6c155e6b2b57317dd089d37aa3a8c3fdb645fdaeb236634bcae02d12f316c","compiler-rt/test/profile/Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov":"a961e9b1aa43c09b1f00e1379c75a6a92100850eff73762c44a435816258a98b","compiler-rt/test/profile/Inputs/instrprof-dlopen-func.c":"7bd0bebd3ef26d3658f7aa5636d247a29c7b2f51443666397a291ea1d9f7ebbe","compiler-rt/test/profile/Inputs/instrprof-dlopen-func.c.gcov":"46cd1649c2b920f2ed6fa1452759a021e037a5ec4f3e2c0c8cc62fc266027813","compiler-rt/test/profile/Inputs/instrprof-dlopen-func2.c":"9b207d0881282913e8edca9d426ad92f6704bdd3aa41c3b911b4f7d6ab2035e0","compiler-rt/test/profile/Inputs/instrprof-dlopen-func2.c.gcov":"c5df559ae868a9c3c12d2070ecee1ec66e350a5c4b8e58f90d1672081b349c99","compiler-rt/test/profile/Inputs/instrprof-dlopen-func3.c":"223386316d058651861cd93909444f35d9cfca4d679950e4c5d32c846bc44101","compiler-rt/test/profile/Inputs/instrprof-dlopen-func3.c.gcov":"c5df559ae868a9c3c12d2070ecee1ec66e350a5c4b8e58f90d1672081b349c99","compiler-rt/test/profile/Inputs/instrprof-dlopen-main.c":"128cd3e39b53f96ccbd3dd3c8bdda799125016f035f886183b08c5b53fcb5a84","compiler-rt/test/profile/Inputs/instrprof-dynamic-a.cpp":"722786fca9758c938456ebd3ce07d5255d3dc80a7b5659c579dbb1d3a22c8d90","compiler-rt/test/profile/Inputs/instrprof-dynamic-b.cpp":"09688c83c0a56aff5dc9d594104f80bf719c63c85776bd413ba6f0232afecf61","compiler-rt/test/profile/Inputs/instrprof-dynamic-header.h":"3fd61711b13eaac1baafec762eef82b817188a93fe80f9fda48fa3791bdec938","compiler-rt/test/profile/Inputs/instrprof-dynamic-main.cpp":"d26f133d3764f316af688a3ef4916e6921bb2d0f2e3b6eaea2c16554adb33815","compiler-rt/test/profile/Inputs/instrprof-file_ex.c":"3a0f681b63f1e5c51d3adfa4078bef376b5324e2cd59734a0807c7953115e58e","compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-multiple.c":"bacf47631eae2f5f81c9ddc27051a647d02d2b5d850b1b4846ad75db56045c8f","compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-multiple.c.gcov":"f1ea6ec9bed3d04a7e8cdf902c4ddcc18461a22debca0cded299dea6cc09d09f","compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-terminate.c":"c8eef64d033c6bc2038acf43249aaddf34710c5098f2f6d66b07f0ff7255355b","compiler-rt/test/profile/Inputs/instrprof-gcov-__gcov_flush-terminate.c.gcov":"d3a8caa44e0650b55df4b81290061ddf015b0e3da3cdfbe04715d75deaa7220a","compiler-rt/test/profile/Inputs/instrprof-gcov-exceptions.cpp":"b25f6ebd39c69ce02a7ce05a53e1479089ed463b33400ba4d0a96af37d360c3b","compiler-rt/test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov":"f26a90e45459341c6cf072f69d087a4fca554f9e431e6aaef476d81792296fcc","compiler-rt/test/profile/Inputs/instrprof-gcov-execlp.c":"ab1fc894b84ae6c6df63cdec30de79fbeac883c76d0ffe3379d5caa296ae575b","compiler-rt/test/profile/Inputs/instrprof-gcov-execlp.c.gcov":"20da34629176849bdb959d02936c8297e2df6161d5a2bfca2dd81972b8d088dc","compiler-rt/test/profile/Inputs/instrprof-gcov-execvp.c":"19552fe8f8d5448d659ed968bf45083c3229dc442137e098c5ddde7bda5a7222","compiler-rt/test/profile/Inputs/instrprof-gcov-execvp.c.gcov":"2441ac1d08232da81499e0b3a94ff3dae372d770b5f75bac744d59969ad4454f","compiler-rt/test/profile/Inputs/instrprof-gcov-fork.c":"2ea37e0740b6bb4322dc14c333fb2028daca32fbe94ab90a881e0ebd33150e0d","compiler-rt/test/profile/Inputs/instrprof-gcov-fork.c.gcov":"8e139cd39a73edaca1991eb366b300f3c74fabb51e1258c95e31e810eca8697e","compiler-rt/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c":"df9ca9402227332db1973b6ad99be61c0560d91063767711c67d4f6c4fe6f555","compiler-rt/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov":"3061e6762bc8e9c838cff442937c55cd1caaa718138831bc7fabf63fe1760fb7","compiler-rt/test/profile/Inputs/instrprof-gcov-one-line-function.c":"db95aa0f2a7ac1ef374a613ea73aa9e64f5352ef0f2e156027118abdc4bb29f7","compiler-rt/test/profile/Inputs/instrprof-gcov-one-line-function.c.gcov":"2c9103a3200a5b2cb9c5b12380347326c5ffec55c6a567acaf6e64675e91e046","compiler-rt/test/profile/Inputs/instrprof-gcov-switch1.c":"26c8ce198c030fe4a07b3cec4f0ac5c9b9d5c6e0dabc6cca24fac3a5505f17b2","compiler-rt/test/profile/Inputs/instrprof-gcov-switch1.c.gcov":"6d5f79321a60a191255889d6f584ca7127e1f69daaec440b6d18a5da7eb6c5b7","compiler-rt/test/profile/Inputs/instrprof-gcov-switch2.c":"ab5ffdb4f9ff0e0dbff98b51b23b6ebedc7d6ca90d28f7ac3772c1ad56826925","compiler-rt/test/profile/Inputs/instrprof-gcov-switch2.c.gcov":"1452ee9ca7dfcb598d8f2dad067857577484a85b39a4cb8d7928969c99d3e1ac","compiler-rt/test/profile/Inputs/instrprof-icall-promo.h":"df7748d30f5a2634f73f48370eb09864899de3400f652a2fce9ec34846d6c05e","compiler-rt/test/profile/Inputs/instrprof-icall-promo_1.cc":"ed72d8d1071067566c6ca5e82f9d6a497d4142727a0fab3141b1d6118b729d20","compiler-rt/test/profile/Inputs/instrprof-icall-promo_2.cc":"ffa25ed40bd90e1b00482f915641ff196c2645c1e736df4460243b24e6e9b8f1","compiler-rt/test/profile/Inputs/instrprof-merge-match-lib.c":"205043a69a11bb76f25a2205f737774dbb25896ae65e6436e234095c5585d06e","compiler-rt/test/profile/Inputs/instrprof-merge-match.c":"f3cc5f3807fc91424fb5ac419a3a61b9fb233ae003d585added7ee68566d3879","compiler-rt/test/profile/Inputs/instrprof-shared-lib.c":"2055b6e27391f1acc55a25882512d50366556ced122d88b3ecd34f75ec03ae42","compiler-rt/test/profile/Inputs/instrprof-shared-lib.c.gcov":"1cafaafe8c9e52dab1969adcc675557a0ed1587a566ceb9bf1964a27dfea8efc","compiler-rt/test/profile/Inputs/instrprof-shared-lib_called-twice.c.gcov":"2d40b19cf7a64dec4462545b43ecf8b58fe337a284f35eefac806d2292aa456b","compiler-rt/test/profile/Inputs/instrprof-shared-lib_in-loop.c.gcov":"3174172755a394dbbdfcac45fd44d284d16e7d4d2cfd044497f315cb48812fb5","compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush.c":"07ac479267019a345b9c9c3d2465f4ed0ef0fe13d6a2a6681af5807b818d7ea8","compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov":"01c214e6711641c5b56c98ce22cc72779f568f0aa909a41ecbb2bc343c3bae87","compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov":"f099cf64413dcd11ee6d54d981badb86b4e6b4671429d3aeecc8f811a5d92268","compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov":"7f222980ade6e3e83de5682f762d6653feb9881beff6e07c73b37448652a4780","compiler-rt/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov":"0ca723457b067241efb11960ed6dec2ce59f36e8b3e5409d716f459d10e67ffd","compiler-rt/test/profile/Inputs/instrprof-shared-main.c":"a5c8d1878a5f2dfcfebdd98c84a205a6ca80dd350c32c01fbb4d56921ab552e7","compiler-rt/test/profile/Inputs/instrprof-shared-main.c.gcov":"7503ac2907091a7414d2254839ac97efbe756f782c1bee299657c47b3e76ecce","compiler-rt/test/profile/Inputs/instrprof-value-prof-evict.c":"8e46fddaf5c083d69c11e42d3663c8add373ca552115601320841d15851563a9","compiler-rt/test/profile/Inputs/instrprof-value-prof-real.c":"2370fe63a24750b52ed9a4e587d8ed15db89a139984c3b2bb2567469d94b1ab9","compiler-rt/test/profile/Inputs/instrprof-visibility-helper.cpp":"c20d43b92581171faa5fced63b9723a8fe3136dee8ad6f04e1a8e65cb108c270","compiler-rt/test/profile/Linux/comdat_rename.test":"cf2f632a09c1a3a3fe25d34bb86b8b112d86237fee6adaf30c6960b9904a1cd0","compiler-rt/test/profile/Linux/counter_promo_for.c":"3ce0b0ccf0b9ace8e22c4bfb9f6f31aaae25f431b284455d0e5ddb5b45569645","compiler-rt/test/profile/Linux/counter_promo_nest.c":"6d780b9c3fb2f7de7021dd9c44d6bf492bf6cf8c61c9ff64e290d5b728da697e","compiler-rt/test/profile/Linux/counter_promo_while.c":"7d0dab2237b13118da1a4eb9d556e5be939edffd92ba26bdffc952e74fd9a17c","compiler-rt/test/profile/Linux/coverage_ctors.cpp":"f5a07809af1fa710a67867648eecbe2c3cac8622795ad599d7eaf7392356d397","compiler-rt/test/profile/Linux/coverage_dtor.cpp":"5cd122abb7ecde27f6c508883f68f70562fc6dc7023e44b3aca69501dd9cbbf2","compiler-rt/test/profile/Linux/coverage_shared.test":"b07b6d599eeef4c7a9600c3393dcc1f818e34c2347416e07813dda4476fb2514","compiler-rt/test/profile/Linux/coverage_test.cpp":"7a1c835e6b66705260be1de8741c6906b872397665a9bee07766e67b2e804952","compiler-rt/test/profile/Linux/extern_template.test":"78c44ac25f69bd00bb0d2eb3fe3835666d8829fedfb50b8b32cd88f7d260a8d5","compiler-rt/test/profile/Linux/instrprof-alloc.test":"26450b48bb2b7651c98d484f071da61e78f68a877d4cd1e719a06dd87deffd67","compiler-rt/test/profile/Linux/instrprof-basic.c":"91113ef973ec04c8c22b8edce52e6d344912589bf81380ce0c646a1914bfc745","compiler-rt/test/profile/Linux/instrprof-comdat.test":"dd311506c5963ece9fd18c229359ae482849387142ed3e5501fef50206daec40","compiler-rt/test/profile/Linux/instrprof-cs.c":"f501c4be7a6fbf0fe71009d980e78c30d9917304b83cab46336f9f8d7dd8b542","compiler-rt/test/profile/Linux/instrprof-dir.c":"c519983e0d123ae68a3dec7a7cc70fb6f76dbf2c839da062f4a3c57594d02a8f","compiler-rt/test/profile/Linux/instrprof-dlopen.test":"a8be49eb6cc52fa286636cfa7eb349fce8b4ec6519f394dfaa67253ef74a151d","compiler-rt/test/profile/Linux/instrprof-dynamic-one-shared.test":"2e0bcf0ba3d0cb3b8fed469b7c96c86e060034db2adce8b6c66ef8a7c8987a11","compiler-rt/test/profile/Linux/instrprof-dynamic-two-shared.test":"8ca08db18bdc6336bcc6e07512ddb088f64ca06cb753fa33708e0344f2ed3755","compiler-rt/test/profile/Linux/instrprof-file_ex.test":"d8777db1589d1ce1c48f760526104c772a0fe30774496ae36b1b301d73a2ce4f","compiler-rt/test/profile/Linux/instrprof-merge-vp.c":"144ac33ef53478bad736bc53593af2795060a46f802c85650f9b0804f36b1c68","compiler-rt/test/profile/Linux/instrprof-value-merge.c":"88ce27e0693e1bc9ebee67827684fad0b63da27c0f757dce7ace4dddc2cb5e19","compiler-rt/test/profile/Linux/instrprof-value-prof-warn.test":"db5eb2dfb8fe83c0eb0573bccee5fdfa473ad190af88c78ccf8ca7ffbfa9a7d3","compiler-rt/test/profile/Linux/lit.local.cfg":"4240b1b461c22ae2839f2872af3f7473023a5af29b4dc5dcc1305b352662cb0a","compiler-rt/test/profile/Posix/instrprof-gcov-execlp.test":"bbbb4727a758af3231e99201391c30b93b395d916fbfaf46ac670f197a22d57e","compiler-rt/test/profile/Posix/instrprof-gcov-execvp.test":"bf76b4acc9ddd566d5ca219e90700cb4b12e94970084fa0ed830490e0ddf9a10","compiler-rt/test/profile/Posix/instrprof-gcov-fork.test":"635aa8916d34978ea3cc1f069051b1fbf1fdcd0ca0c2d32af0c4ff8313e87f59","compiler-rt/test/profile/gcc-flag-compatibility.test":"e48e3665d8e533680be2d045047804ab69af20857f85b00fc15b0dc79c724b27","compiler-rt/test/profile/infinite_loop.c":"5dadea4b806ddb7e36b722c6710da7a873ddf036666c44058ec991d56c95da0f","compiler-rt/test/profile/instrprof-basic.c":"4b3dee69c34f131df469629ab0279e3384c73db0bc91cfe79772ab31c6bb5fdd","compiler-rt/test/profile/instrprof-bufferio.c":"278ed0c1cd0004bd6dee7b3158c5ee26281742ee3a40ad4b9615033a4663dcff","compiler-rt/test/profile/instrprof-darwin-dead-strip.c":"e0d9e986a799c01f2678e3dfbf64b9edab563150b9967c954e0b63721c19b441","compiler-rt/test/profile/instrprof-darwin-exports.c":"4666a8dfc3133ec5893fe23b8a16a8874ba34a3289ba56f2f3e20e4e9ddc6580","compiler-rt/test/profile/instrprof-dlopen-dlclose-gcov.test":"fd1683076baec38b305db7e23e822f4a46eb86a445db188f1f44fcca180e0d69","compiler-rt/test/profile/instrprof-dlopen.test":"5658b4c41b8346d71feb8d9119d3ceb09f499a2d3257414c23b4fa68447a2efb","compiler-rt/test/profile/instrprof-dump.c":"976afcb6bc6fd48426ec5601945a537fbbb3885981de41ab38ebe31fc41c9f07","compiler-rt/test/profile/instrprof-dynamic-one-shared.test":"7410ae449263df423fdfa625a6e096af40eafb9232245c947dac8fadb97e72e5","compiler-rt/test/profile/instrprof-dynamic-two-shared.test":"0f7dda91a7232bd195eed93abb2b7cee99f345d6e923a14f2ad65d9329ea9731","compiler-rt/test/profile/instrprof-error.c":"dd653d54643707b0f956a8555a21ed556743272e105afa2654f740cf2c80702d","compiler-rt/test/profile/instrprof-gcov-__gcov_flush-multiple.test":"ca05c33e7e1abf4a4858a806405b0960d463b15394ae7630ed9b9c88d7f28a40","compiler-rt/test/profile/instrprof-gcov-__gcov_flush-terminate.test":"69498658d9956e1f43bc17f6c470a18e4e38784a539428a79a17b5d4a125f523","compiler-rt/test/profile/instrprof-gcov-exceptions.test":"186272c16b8eae01f676c81075286c355fbf5c3ad95ba36c20b0c4e4000e3812","compiler-rt/test/profile/instrprof-gcov-multiple-bbs-single-line.test":"7198d20eb2c1c18c4486ba280954ee1edac5dabd26a02fe8fc91243933ca053e","compiler-rt/test/profile/instrprof-gcov-one-line-function.test":"d06856838d834491aefa1c680d1ca1e70ce54fac1dba36f9b5831df72b26f340","compiler-rt/test/profile/instrprof-gcov-switch.test":"6a2bf75eafda0efb42a404c7fd1f07c0f947715f5db47eb5695f476aae4c796d","compiler-rt/test/profile/instrprof-gcov-two-objects.test":"3c658ec15e17ef6a71e62bf63bceb45c8049971d2e10fc27740532814139e589","compiler-rt/test/profile/instrprof-get-filename.c":"548ef3d3c27c0a42f7d08c0d0f1eb9fff65c3300cb01e18b50396a19e128cd24","compiler-rt/test/profile/instrprof-hostname.c":"ef4b58001a3f6105548e45481fb737dea44721cd8783a82687c08b4ed3f90cf5","compiler-rt/test/profile/instrprof-icall-promo.test":"d5f01d670b56cafc864c7e3fd01e881578c9a62206ef98568afba3b38dd7b4ac","compiler-rt/test/profile/instrprof-merge-match.test":"b97ad8aac6bbece9420ef2d4d1cdae4d5973a141af8a12846d88315f7c6d40cf","compiler-rt/test/profile/instrprof-merge.c":"5e1a56e178893844778390132d1e13214ea7b7a91c31511b5b0597d4b8ea7bf6","compiler-rt/test/profile/instrprof-merging.cpp":"d31c4959a4ce6bcb4f6fce965d374ebac525407f9296041d09b60de92a4e82f1","compiler-rt/test/profile/instrprof-override-filename-then-reset-default.c":"ba15e97cb06f00f55d280666b7f8e3bd608d6f9c9c732f0d935c081cf01a77ce","compiler-rt/test/profile/instrprof-override-filename-with-env.c":"2baa11e1e1267118c8b89553fa146cb88f459aa1241537c8b97c5dd29493e57a","compiler-rt/test/profile/instrprof-override-filename.c":"49ca9e3624fb409e3709d5ec09a8a436429358841f1d8d14f084c544e1915ece","compiler-rt/test/profile/instrprof-path.c":"737479f920109ef856591348f5749200212acd43c91db902cc15050062f831c4","compiler-rt/test/profile/instrprof-reset-counters.c":"1ae114ebe5e9960dfafa5fd1d60cf4139cbbf82f8eac1ded0537c699c42cd9c7","compiler-rt/test/profile/instrprof-set-dir-mode.c":"95c3079adbabc3416aa1990128f8bff6c79985897e351121bd7cde95dddb6df3","compiler-rt/test/profile/instrprof-set-filename-shared.test":"f602c87b03f9bd78d3617d871dc2e08c0b2e1eade1ffe8dd9e67faf64efedefb","compiler-rt/test/profile/instrprof-set-filename-then-reset-default.c":"d32de58f99e9d45c4845d182172a6f2cc1458c75bfbfcf8e9f8cfe23b94c97ac","compiler-rt/test/profile/instrprof-set-filename.c":"bb1b9c024551224d50e5f15647d4efbd9b0ed8307cfae4751da42accfa95deeb","compiler-rt/test/profile/instrprof-shared-gcov-flush.test":"b1c4287b4f9943abdee89e047b9f6928034eb911c90a89ffa945530c03ddfb74","compiler-rt/test/profile/instrprof-shared.test":"fa9ba8ae7a7daaa79f06216d348eff8cb60e03daeb91894adbd4bb733e86e63b","compiler-rt/test/profile/instrprof-value-prof-2.c":"ff219e723f6776526c9425689b0d3558794a01d740c27bd065e469247e65256a","compiler-rt/test/profile/instrprof-value-prof-evict.test":"1ea70f12dfb5e37946654fb72901a43e09b357a0afb37452bbe46931688140b2","compiler-rt/test/profile/instrprof-value-prof-reset.c":"38fb006210fcbe170bbd7dd1d28cc06c7dad5468487f13640195f8062a88c835","compiler-rt/test/profile/instrprof-value-prof-shared.test":"873c33945796462bad4a3a40fd73c6c23547272d44d0742c323a0af5d127f0ae","compiler-rt/test/profile/instrprof-value-prof.c":"d85fcf81074d27d1004549254b19ab95542761a47ebea00702f6856b5be3b971","compiler-rt/test/profile/instrprof-value-prof.test":"d674e4c3652978bd0b4bc163cf3a509968f7847fa48a9057d215dccc1f08694f","compiler-rt/test/profile/instrprof-version-mismatch.c":"2a9ef862da3e998432ac5f471d71d6dc8a99e315ea7d1420b974dc5f9a28c250","compiler-rt/test/profile/instrprof-visibility-kinds.inc":"bd3ac4e2ee5213af4e7d126947ccc6b037457c3ec14450445b76e24c31d1e631","compiler-rt/test/profile/instrprof-visibility.cpp":"23516e377904f5b1938fa738f1d8ca92418071f94569210cfe4018a61cc07011","compiler-rt/test/profile/instrprof-without-libc.c":"a80954f2be3af6f8e28035e4221d926a88306780eaf7762f07283c41c77089f0","compiler-rt/test/profile/instrprof-write-file-atexit-explicitly.c":"a4b9f8e8c7cc375fceafa0c62ad5ea22283b2d045ec2e2dc386ea0aed36e33d5","compiler-rt/test/profile/instrprof-write-file-only.c":"056c426b54ed077800b60d5d407035e09e939b1ce1aa86c965e4d24ae5b2bf27","compiler-rt/test/profile/instrprof-write-file.c":"df8bc578c49199f8cd16cbe0309cf0d67a49f0a1b7012ba7e223d0b7ce83b832","compiler-rt/test/profile/lit.cfg":"008d3438e46c81dd2cba8533f11b2fc191480dafb0e3a0f842a0c00dc6166b4e","compiler-rt/test/profile/lit.site.cfg.in":"263b8d04015acdf7abe1495c4b5cd40f338d39e6a05b7a5ed730b749c258cfb5","compiler-rt/test/profile/runtime_infinite.c":"7b74f14d5f3d641bb5fe0640766a4111bd03b07d5c182d22ddf4a8df7fd37876","compiler-rt/test/safestack/CMakeLists.txt":"a45ddf99e750cdff3f8b9a9b94485d91637e09b198dbfa6d831dc4784e39f08e","compiler-rt/test/safestack/buffer-copy-vla.c":"f05781cc2802308ef5040cd8062f8b2d7fc285a05000423a8866a6098062195b","compiler-rt/test/safestack/buffer-copy.c":"6158997f109400d7690b6e29ad1d310f62c14d90b06eb3f2387546786f9f5870","compiler-rt/test/safestack/canary.c":"d4de1aa08dda9fd13bb03e96a4f0ac90ae9309b5fa1373c9172407cecc9b25d2","compiler-rt/test/safestack/init.c":"6d6f6609c421aef3e75e25c5d70269c3886a0178017e1b3d89ccf2144a2c6574","compiler-rt/test/safestack/lit.cfg":"09f08710d5ec7f9c631ac86923a8b83c3f79b832647a2f4a4f3f5696b07f27a7","compiler-rt/test/safestack/lit.site.cfg.in":"af92c03d02ec2751acb1925c9d46fb48e5b2cbd7498fb05a32a8074236269c9f","compiler-rt/test/safestack/lto.c":"ccf8f74e3740c198bf226327c915c823a106da3a0fa883e8b0eebe9c425fdcb4","compiler-rt/test/safestack/overflow.c":"99d2b665719f78f9f8e62ce34507518aaef4cbfde0a934f81629a6a2bbcf5651","compiler-rt/test/safestack/pthread-cleanup.c":"e333fa78383337131873aacd1e336d2f6c666bacff9642ad17165fd90f85bea5","compiler-rt/test/safestack/pthread-stack-size.c":"b2fd1cb696ce84fd03d27a9a061eeba1994b92cf5cb020c805101496ab5ad4f1","compiler-rt/test/safestack/pthread.c":"42458e654972d3294d9016bca07debcc4eb3314a63f88dd083da5deb8ad5ba80","compiler-rt/test/safestack/utils.h":"4055427e17ca04812620ecf98c4892ad4bb331f299906a0e58cf7934d9ce428c","compiler-rt/test/sanitizer_common/CMakeLists.txt":"d697dcb98a5d6e31b5e7885d0165aea982266acb0dc99d24004339a598aca8bb","compiler-rt/test/sanitizer_common/TestCases/Darwin/abort_on_error.cc":"953aa6c3b7d9c8d22c1f2282e7563047a5e9c0d11ea40d57949103fe3385a862","compiler-rt/test/sanitizer_common/TestCases/Darwin/lit.local.cfg":"67ea8448cf3507eda12a63f0981890bfcb7959532eab5a4c303900daa5788a30","compiler-rt/test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc":"a64f7276878dceb2ebd013b1ac91d96fc6fc33b58946eff68cba854e7cd8bc9f","compiler-rt/test/sanitizer_common/TestCases/FreeBSD/capsicum.cc":"ef879c10db64b22ef37f81f1324bdef2bb37a34bfb7661f4c8097af35b34f42f","compiler-rt/test/sanitizer_common/TestCases/FreeBSD/fdevname.cc":"db298bd3048e18048246f25e2aaa1addddc4c9dd92eb18fcebd7925cd20665d9","compiler-rt/test/sanitizer_common/TestCases/FreeBSD/lit.local.cfg":"de9f6cf96c6ff2f64f9bef2ed65be484b2b9c62cbabe19f816ef477fe689cbe0","compiler-rt/test/sanitizer_common/TestCases/Linux/abort_on_error.cc":"2a837e1df7d189b5fd976635c8b72680afb35635fce9c252db194829bd4905e1","compiler-rt/test/sanitizer_common/TestCases/Linux/aligned_alloc-alignment.cc":"e92c9529f9f97a4ec57076717a438a84a02a7ea4dbf13e0b3d7f423957f01dc2","compiler-rt/test/sanitizer_common/TestCases/Linux/aligned_alloc.c":"d6f7be5bc1a5c6571cfff3bb15f9960e391b3c1b8cd8c0e4566fe141817e257a","compiler-rt/test/sanitizer_common/TestCases/Linux/allow_user_segv.cc":"8020a62822d1da175cc7e7a90b50278bca6e5126711e6f09a0ac6bf7d3125689","compiler-rt/test/sanitizer_common/TestCases/Linux/assert.cc":"90490fcdba01482cd4f9ce68b1e18bbf8b5089f9dba59c5a3f3d5574f7826a68","compiler-rt/test/sanitizer_common/TestCases/Linux/clock_gettime.c":"b62403d90ec6230e94a49e897f39891f61c22f64029b5b5e3bd09b80a6fa1dad","compiler-rt/test/sanitizer_common/TestCases/Linux/closedir.c":"88c571d2964ad63702339cf2f443946e9716ff45e6ae3822eb6d652c8ae03d3f","compiler-rt/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cc":"6a75fd929c186c8522e03353ed16e5464e72d1647c35b1405407ef007bb59e73","compiler-rt/test/sanitizer_common/TestCases/Linux/deepbind.cc":"9dbc4c4abb76161d81a9c96984690caaf0d4599efed5c9baa6f045210be860f9","compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cc":"2adee70a1b5ceff6c282eea1d06838f186c9149a0062de38ba9e994b720b6af6","compiler-rt/test/sanitizer_common/TestCases/Linux/iconv_test.c":"ca06192773372be0ac9e224293b2fb023f9b52ba01a4ee9e04c9aaff5c496395","compiler-rt/test/sanitizer_common/TestCases/Linux/ill.cc":"7ec0e960129071f587704ac6d760ec7a1dfe3545aad7afc0ffec754b188a4a96","compiler-rt/test/sanitizer_common/TestCases/Linux/lit.local.cfg":"752f9f465d546875972dbfeb1fce9b5ecdfa3ab1d0b6b756efb1047f93298b01","compiler-rt/test/sanitizer_common/TestCases/Linux/mallopt.cc":"b9f73b3d7230e09c9a5ceb256be58323f697234f01abb56146e74c1e95442ec4","compiler-rt/test/sanitizer_common/TestCases/Linux/mlock_test.cc":"0cb8a225900daf32078ce753da847d6f8ceb1e1246a90b9b2fbb96f08526d1f8","compiler-rt/test/sanitizer_common/TestCases/Linux/mmap64_test.c":"8caf1f4dae78b14a81e05723d791acf36c612b93a9f2ab12213a5780091ff57e","compiler-rt/test/sanitizer_common/TestCases/Linux/mmap_write_exec.cpp":"b6daa1e6f7d4dea2a2a75b814b23b07cf43e56282884cb4384e0e30d1ff9c6fa","compiler-rt/test/sanitizer_common/TestCases/Linux/mprobe.cc":"01150f4fb0e0cd91f2d8c38bb6d8f91500e3f8b935164fecca4e930b6e945e12","compiler-rt/test/sanitizer_common/TestCases/Linux/name_to_handle_at.cc":"73a6c366ec01319f15dbd1445c725b2627c456a42c53ca480d321ce4ec70bc17","compiler-rt/test/sanitizer_common/TestCases/Linux/new_delete_test.cc":"499442c71007e6795fc236520912d4b14877b21fe3c3c4279a64f430c04c3be7","compiler-rt/test/sanitizer_common/TestCases/Linux/open_memstream.cc":"0a7b66f389780d1b2877d512291d880fdd1f6e7004e23e85a3c8f2e0321c1503","compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cc":"66002fb6c9e4bbb15329d53743bc1b95cf9947c91d935df3937211fdd73d816c","compiler-rt/test/sanitizer_common/TestCases/Linux/ptrace.cc":"d76b3e31a810c2bcba3822a3d25a9b09ba08863c70354208b2873c03e7fa9155","compiler-rt/test/sanitizer_common/TestCases/Linux/pvalloc-overflow.cc":"4465d28246695d5ff6a27c4a15c47733a06647516d01dc179945aeed8c8f9c07","compiler-rt/test/sanitizer_common/TestCases/Linux/recv_msg_trunc.cc":"d3ceb1c289eefdba0f64adef02fc4fe197a64f8a046690c06366fc71494505b2","compiler-rt/test/sanitizer_common/TestCases/Linux/sched_getparam.cc":"8fdbdc38c984a9c8d6b1c3595911b9c8df11fdff4113611dba877f015e155a17","compiler-rt/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc":"66025bb7a53f5c3b62ecdf15f72a41a334df65fb2cbf1ebd00fe3b344800104e","compiler-rt/test/sanitizer_common/TestCases/Linux/signal_segv_handler.cc":"d598ad93ca32085e331bcc3727e0c78cd35e0413ed93601026267e806e001271","compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cc":"b5e8c541d921ec5f4dc073ff92465e590d3396b723f98f8ee1b8df77a26ed2af","compiler-rt/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc":"2c692a39d28a0fd495141dc2de092dc180e04f54fb24eca0ee6ceeb7c13c9c08","compiler-rt/test/sanitizer_common/TestCases/Linux/timerfd.cc":"a894ec13e88c96e668d4cc3cf1ab6fc09eede4dad8b0e66c03a1765758cff530","compiler-rt/test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cc":"0fb1240939db6ce0145f9f7587cf036c019ca063fb1f7930fed286d5e28b0a3f","compiler-rt/test/sanitizer_common/TestCases/NetBSD/asysctl.cc":"9a8cb4d8d79f191cc4a3bcda41eded32df3f76e2b1b22f457abf14126228571d","compiler-rt/test/sanitizer_common/TestCases/NetBSD/cdb.cc":"44c53ee6196680d3046d368a13b2018e8779f09a056e740480c89795647a10a7","compiler-rt/test/sanitizer_common/TestCases/NetBSD/faccessat.cc":"32de9708bd69a7cc384bc45aca2d9fd1fcd84995fa34ff312d622c7e4e8d401f","compiler-rt/test/sanitizer_common/TestCases/NetBSD/fparseln.cc":"7ab374a481564b2f17f6b8eb3b7149184a4b2b656d6e56a6361d97206064a0ed","compiler-rt/test/sanitizer_common/TestCases/NetBSD/funopen2.cc":"2df7cd815f2ca70608db1424d00ee8d7c76910541ea18818af6a5c3093350fed","compiler-rt/test/sanitizer_common/TestCases/NetBSD/getgrouplist.cc":"2f3c89338c7641cc00d03616366e7b242a0ccf586413e840fd771beffce64c47","compiler-rt/test/sanitizer_common/TestCases/NetBSD/getgroupmembership.cc":"349e6a12c836f76861546d0fdd60c91c6839626800be2b9d04259e48c7c2d397","compiler-rt/test/sanitizer_common/TestCases/NetBSD/getvfsstat.cc":"ba67a64f9417e85a20938acd8a4b3e0e739b0ce588fbce6c6f8e7e69e54b5918","compiler-rt/test/sanitizer_common/TestCases/NetBSD/gid_from_group.cc":"72ec0150d465e0103005bdb5aa1d4dfd2e51bb98a208922432cedae08e64db76","compiler-rt/test/sanitizer_common/TestCases/NetBSD/group_from_gid.cc":"5a10d5bef13d5807e14ed9d8c51142b4ff1dfc6b3760fe908810f042945666ba","compiler-rt/test/sanitizer_common/TestCases/NetBSD/lit.local.cfg":"7dd7a8bd0f3394492b65c3a05590a5a147eec3142e784dcee536658ad7744ae7","compiler-rt/test/sanitizer_common/TestCases/NetBSD/md2.cc":"a44fde90a4aa36b757d12479dcb1a2d0b40bf2989fe252b352361bdc1039bb02","compiler-rt/test/sanitizer_common/TestCases/NetBSD/md4.cc":"8039ca7f95c00e819ec4e6a053c34ecc71966b61b85ab47a9757a8d3affcb538","compiler-rt/test/sanitizer_common/TestCases/NetBSD/md5.cc":"2b2b162d134e0899ca863a7162b280d61e81463bcb397e56d9fba192b1986207","compiler-rt/test/sanitizer_common/TestCases/NetBSD/mi_vector_hash.cc":"c9c65cdb53bd0a17087922b50a5aa5450d208ea25599e0d3e22a2b2da4748672","compiler-rt/test/sanitizer_common/TestCases/NetBSD/netent.cc":"87f447c63cfc0308d683cb9cdcbcd084eee040537a6fa496e44dd530979ad2ab","compiler-rt/test/sanitizer_common/TestCases/NetBSD/paccept.cc":"50dfb64ff85d4fab68a4a78aa618600555973b8161ebeacd9dbfe3204272ce19","compiler-rt/test/sanitizer_common/TestCases/NetBSD/protoent.cc":"216f5521dec86723db908b93d18c1d9ab588d2d80092c8da3e86253dadae4586","compiler-rt/test/sanitizer_common/TestCases/NetBSD/rmd160.cc":"cbbb361d2a6f19600c3eb5ef3f9a351992501be5bc73470b974dce68036b9c89","compiler-rt/test/sanitizer_common/TestCases/NetBSD/sha1.cc":"789fc9a74e6c58d88b913daba483b80f47067e3bed285a7d2843ea81f381ec6d","compiler-rt/test/sanitizer_common/TestCases/NetBSD/sha2.cc":"f462ec29be624300875efa9dd508bde8a7265088e62129021e2eb7a6c75de31a","compiler-rt/test/sanitizer_common/TestCases/NetBSD/statvfs1.cc":"57e0a8d165307f32388c7aece28fd43612651675f282fdeaabc4cb858042faf8","compiler-rt/test/sanitizer_common/TestCases/NetBSD/strmode.cc":"a02b9495f4a7966658b0e96eb9105a690416931293b4ccb41f68c68ca8a1924f","compiler-rt/test/sanitizer_common/TestCases/NetBSD/strtoi.cc":"e35ff46736a546e5b2eb5d479f3400bf2a7a95b6cd7d48af014d5bc0829ba0fe","compiler-rt/test/sanitizer_common/TestCases/NetBSD/sysctlgetmibinfo.cc":"e6a50602e5de5c3f48ad44dbc6be7d3a468910256c61edbea20375eca06a0bf2","compiler-rt/test/sanitizer_common/TestCases/NetBSD/ttyent.cc":"5fc46353514a36f1fc33750b2caa6df9705d85313ef9864a38a1d353fbf54b68","compiler-rt/test/sanitizer_common/TestCases/NetBSD/uid_from_user.cc":"64c74f2930456a2baea290399803ba95a093d21f370d4e571f9a4f2420663354","compiler-rt/test/sanitizer_common/TestCases/NetBSD/user_from_uid.cc":"65b5482426bb6a1df1d594c916ee9fda85d65fdca4694464c7aab4c787d589f5","compiler-rt/test/sanitizer_common/TestCases/Posix/access.cc":"a2839dffd12b674d8580837c0d49efd4b22809c49dc5152e341dc9624356319e","compiler-rt/test/sanitizer_common/TestCases/Posix/arc4random.cc":"751c241a77fe4901ab58d974c9dd8ba8a3eaf3d6e713bc33503fc4359fd6ed23","compiler-rt/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc":"8155c832835c8db5414c4929a788f85c7ddefa9d93ae37603184bac3ac939b5e","compiler-rt/test/sanitizer_common/TestCases/Posix/devname.cc":"91a63f9d3cbe6001411db851dbacbe492f5cfea7664c86cd05aee4467706c5a4","compiler-rt/test/sanitizer_common/TestCases/Posix/devname_r.cc":"20f77e12c01d4993295a90dcad4b4c5183270934cb07baf6acc3c931ec81b576","compiler-rt/test/sanitizer_common/TestCases/Posix/dump_instruction_bytes.cc":"ec568d6dff7aa7814ea90716dd4b435f8a48326358ab93c91bc58b9c884ca34e","compiler-rt/test/sanitizer_common/TestCases/Posix/dump_registers.cc":"6ff847a4aa23f41a462f0ba687103a92723b1b31cd1902b2113d2205efb76826","compiler-rt/test/sanitizer_common/TestCases/Posix/feof_fileno_ferror.cc":"e14477a1b1baa9824835694c98abb3f837602dbb079cc34a44d8aff484913a35","compiler-rt/test/sanitizer_common/TestCases/Posix/fgetc_ungetc_getc.cc":"049e3f7dafbf55f4edcd8ad0e9ac3ab75b86f18a9395f05ce023b8e51002e52d","compiler-rt/test/sanitizer_common/TestCases/Posix/fgetln.cc":"576182c504d36c08498e7e3dbac2088d3830f7c7eb0f89205b7d835653d824a3","compiler-rt/test/sanitizer_common/TestCases/Posix/fgets.cc":"8793ead3a84252a2a1d4256b7c23a4b28e2848339f9eba49d88ba95ccd14fc02","compiler-rt/test/sanitizer_common/TestCases/Posix/fpe.cc":"6bdb122783be08242a070f6a2f9d07af4ccc5ad75c25307e79f97386c63840c0","compiler-rt/test/sanitizer_common/TestCases/Posix/fputc_putc_putchar.cc":"1d398714376064812980d5794a2e8e74128507d5f22cfa158b46f4d4d2e09972","compiler-rt/test/sanitizer_common/TestCases/Posix/fputs_puts.cc":"ebe70aa2a59009d48f24ce9ebe6b30d9b58e1344ec33efc1903ce3a8e9d229fe","compiler-rt/test/sanitizer_common/TestCases/Posix/fseek.cc":"dd08ea0d4dd3fbed5f08ac42a555cee95fcb787eb21b78a4baf063fa56c51707","compiler-rt/test/sanitizer_common/TestCases/Posix/fts.cc":"7d60cb36e8177a1aa52af787537ace52445947084b63cfc5b84868c5de1afb0c","compiler-rt/test/sanitizer_common/TestCases/Posix/funopen.cc":"0da28d868f485f2423e0e1a5e64dc2857a059663406d8f3cbe8f7d2332c3440e","compiler-rt/test/sanitizer_common/TestCases/Posix/getc_unlocked.cc":"aa896913871235d78eda7c4fe4c94a5d3b8fcb9197386fa763136ca56dd058d1","compiler-rt/test/sanitizer_common/TestCases/Posix/getfsent.cc":"cd6ceefb93130adb3cc42d22879a3db839426724dd6cf7fac4dbc53b8fb122df","compiler-rt/test/sanitizer_common/TestCases/Posix/getmntinfo.cc":"8077f6c1c0259e49726645c645813ea1e5785575aa035e75c333b2fd281ed1a8","compiler-rt/test/sanitizer_common/TestCases/Posix/getpass.cc":"cc935b5e7fc1dfb55e75cdfbc0fcdc7d2a65717cd6f57a4ee5730503f032efd0","compiler-rt/test/sanitizer_common/TestCases/Posix/getusershell.cc":"0f9664c791d9d2ec1e9740e432de7b1e14c97edef83f558c09d30a2ddff0cf52","compiler-rt/test/sanitizer_common/TestCases/Posix/illegal_read_test.cc":"aa270214425a43e8cb3296a602da94d4a4699ea6c98de9f12d01b48551892e9c","compiler-rt/test/sanitizer_common/TestCases/Posix/illegal_write_test.cc":"64f4247e23281596b13155d4cebab2f048f16d271bd5bf8daaeaf850d7e29286","compiler-rt/test/sanitizer_common/TestCases/Posix/lit.local.cfg":"3c6afec951edaa5e426ac1590d3e67e4136b5ce61803cabf17f3c775a7279daa","compiler-rt/test/sanitizer_common/TestCases/Posix/lstat.cc":"2a63aaedcbf2211709c629df87e2a51f1af20d1a402b5a6a49332307e39a1735","compiler-rt/test/sanitizer_common/TestCases/Posix/mmap_test.c":"afb565b5770c0afacc9132db9ed95f59eb928356938102a7ea8b9853d49100b8","compiler-rt/test/sanitizer_common/TestCases/Posix/nl_langinfo.cc":"3ef6ebc055dcbef410a2dafc5caa2fa57350b034c7e921e934289d9f0fb2271c","compiler-rt/test/sanitizer_common/TestCases/Posix/popen.cc":"41984ff76833e5a51b5fa4102a11054273deac0a58dfce77dbf55c0e9f99298d","compiler-rt/test/sanitizer_common/TestCases/Posix/posix_memalign-alignment.cc":"2f67a50633d739fcdf178f1fef4c2c7dc24a783819c79fce9b87452f03d12981","compiler-rt/test/sanitizer_common/TestCases/Posix/putc_putchar_unlocked.cc":"31bc63aaa0d5a5c97823ed9faeb77c51ca6b46ec40c5b946d20a5b04b84c8f4e","compiler-rt/test/sanitizer_common/TestCases/Posix/readlink.c":"1f49f9dc7e8a718ed191000ef42cee23c3c53e5405200a532a5fcb9f01b8fb52","compiler-rt/test/sanitizer_common/TestCases/Posix/readlinkat.c":"4e1ac8958e6cc2da904557a5559d5717885f4337409213e73c224d2ad618fd07","compiler-rt/test/sanitizer_common/TestCases/Posix/regex.cc":"be834afc5844ba983859a42b1ee720ebcf6c20b59f734eb791dd28e1ca49379d","compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc":"08c36dd42f216386a84f3a68cbc2409da2cb2a5dd7220a23299c81977c4c4daa","compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_fd_test.cc":"efffc8fa5e01ce1757736c59e4ffceb8a8b2c063344cbb3c21d69061f1fa788d","compiler-rt/test/sanitizer_common/TestCases/Posix/setvbuf.cc":"46b85d081fdcd526ddb4f1764fbd183db3277680f05359157e0793ceb76e0846","compiler-rt/test/sanitizer_common/TestCases/Posix/sl_add.cc":"c0e082db93453603989d4280d9005f4626978b0e3ba8436fe4beb59d26952224","compiler-rt/test/sanitizer_common/TestCases/Posix/strlcat.cc":"d403852d79825b2f4a3adeb09af1b817b67416709dd48c773015a01a4d3f23a2","compiler-rt/test/sanitizer_common/TestCases/Posix/strlcpy.cc":"d9e69b61cf6eb69079815edaca18aac7ae97cd901d053a38cb1be94b712fac20","compiler-rt/test/sanitizer_common/TestCases/Posix/strtonum.cc":"45c86514c711e54d5bb8c6355325bde313e98e64aaabd38abe168cf88278c682","compiler-rt/test/sanitizer_common/TestCases/Posix/strxfrm.c":"2a0f98962c66a8278af9789048ad4fc529e7f3ead178566dd1774433a9a091ea","compiler-rt/test/sanitizer_common/TestCases/Posix/sysctl.cc":"0974f6da7e71de41360f3f57b1e6e070f5aebf6fed97f2e45fe9ee60c9509ee4","compiler-rt/test/sanitizer_common/TestCases/Posix/vis.cc":"7c61012b71e766ee128854bb07d6d4d7b035f275ba248d036d7d3dde56d26fb4","compiler-rt/test/sanitizer_common/TestCases/Posix/wcsxfrm.c":"646f5d4524322d3db37916399bb6c9ce02110f0059203814a0d44a536a246fda","compiler-rt/test/sanitizer_common/TestCases/Posix/weak_hook_test.cc":"d319227e8b937f34f4c124a194f8626d87224185a5927745eef20dade8753d17","compiler-rt/test/sanitizer_common/TestCases/allocator_returns_null.cc":"843ab99616e37a3e79fa4f196f78c23526db6cd7b50b7c8ac3f1ad511b68e7dd","compiler-rt/test/sanitizer_common/TestCases/corelimit.cc":"31d2766f3ff72be163f478ab4103cf2d301b1222e92e743e976fc9f49e74e751","compiler-rt/test/sanitizer_common/TestCases/ctype.c":"615d934f2ff25fc1f496c01e16bf57a7b21736c58d2eebbf18ab80cf5ae5def9","compiler-rt/test/sanitizer_common/TestCases/fopen_nullptr.c":"4cc46b75a3194ab47199ff061a6ac214361b237567828012f5edc82ecf4415e5","compiler-rt/test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cc":"23f214f0907b4aa1bd0a0ef491e9b178fece128412fb153fb92fb9ae3fe19115","compiler-rt/test/sanitizer_common/TestCases/hard_rss_limit_mb_test.cc":"5bebc4be2f846806a2823cca405093bea65fc272fa2f050136da86b4d0b2f0b2","compiler-rt/test/sanitizer_common/TestCases/malloc_hook.cc":"aa82ea28a872eec9b4ab8390fa4acccf7564b25207a8d1f205b14ee2fc071a8f","compiler-rt/test/sanitizer_common/TestCases/options-help.cc":"ddcadae1d8c24a74c83fde7045c1703a568f1fbd1639a8d0356869f35c15c1c1","compiler-rt/test/sanitizer_common/TestCases/options-include.cc":"09433417d58c6c249f5809dcb8349d3e2c6287e8a24a700090157cfb047a4235","compiler-rt/test/sanitizer_common/TestCases/options-invalid.cc":"4f048cc45be0b22ce08b1a0df175146bd89b5bc58b590233c17f6265b57c9a9e","compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc":"0d4ff12b2e6e27fd670ce700c9eadebd1eb9c565b610538038d233e5534a8126","compiler-rt/test/sanitizer_common/TestCases/printf-ldbl.c":"3c2451a4afc5d30313d15dfbe2cee7e8e9ac986783bc07b62522cbe08d882894","compiler-rt/test/sanitizer_common/TestCases/pthread_mutexattr_get.cc":"4780ee7b98f5c199dbb4870fa9273e2bca0bf03edddaf1287df1f017d96c1690","compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc":"d3229a3d2243c14df594179546440ddf375422d877eebc171a982a45770684f8","compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cc":"774b5ce6adcdd85409c90e9576e98f487e7e1456e33381e7e3de74e9726be14e","compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_stack_depth.cc":"054df5f5b7ff1f0fc7a4a5a4a8b2d4dcca8b6749c0ec79e8d7cb577a9864ba4a","compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_symbolize.cc":"d905e05c84663a24311c1877e3a24024fb7fc47fa9dbc0ffe2e02d97c76ab1ea","compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cc":"2b8fd8d841fa1151b832e75c55d0f22fead8f75b0945b43df6cefdc792e15bfb","compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-init.cc":"6bf86ddd469ef3777d56f881035ee1dd69551dfd89e6aaa84fb5b627ee3b6389","compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cc":"18225de3d959181509c5acd8ce56c4fa188cf105cec873648e9a74f85796f129","compiler-rt/test/sanitizer_common/TestCases/scanf-ldbl.c":"795c16df5d61372550a84b9e196bb7164b4843d83a5f97759ce66888cb6688e4","compiler-rt/test/sanitizer_common/TestCases/strcasestr.c":"ee863e6d69bdd0b9e40e144da3c9bbb27b93fd903c0f91bfdf1b081bc71ae372","compiler-rt/test/sanitizer_common/TestCases/strcspn.c":"fbaf8c80b9c5b3f8517fd62daa318dd1fdf03e5684bc4d0ac298e73d2fd12532","compiler-rt/test/sanitizer_common/TestCases/strnlen.c":"c6d1bf321d1c9cb445ba81ddc36540d01bf332fbf0204b976188dcbb0dd844b7","compiler-rt/test/sanitizer_common/TestCases/strpbrk.c":"ae7badbd972d568ec60f4f0d28459fcd76c570cf7905311298941df2e3f022cf","compiler-rt/test/sanitizer_common/TestCases/strspn.c":"01e1bf021c1b0e2a8a8007ea7f303d9ee1b9315c0e52a2c2ca82c260a92f10b8","compiler-rt/test/sanitizer_common/TestCases/strstr.c":"ca7559d931121e5301865a100f3d0ace4c28ca1d39369b1a2bf70ca0e2e44f4c","compiler-rt/test/sanitizer_common/TestCases/symbolize_pc.cc":"3462aa633a79b7cf56b8e650b4aaef1e6c1ba3bb6c559a5699f5090f02b3e370","compiler-rt/test/sanitizer_common/TestCases/symbolize_pc_inline.cc":"7ffb5d79db33b4fb0862ae6748f203c1d4b82db60c474a5744bb88c46b13b334","compiler-rt/test/sanitizer_common/TestCases/symbolize_stack.cc":"e9127b49a10e8266d4809121aef8554e1d85539c23642d5e5de76fcb27820493","compiler-rt/test/sanitizer_common/Unit/lit.site.cfg.in":"7aa7cd70cf8cca6a49fe617727fd4b16ebbb8576f3c023d078bec1360b5415a8","compiler-rt/test/sanitizer_common/android_commands/android_common.py":"8d34b7469e30f832c2dc5a1134a2ce3466f9b174b61d5af33062d31b95850b0a","compiler-rt/test/sanitizer_common/android_commands/android_compile.py":"7096c08f994c9c5eb5cd57a5b166c5d8b398d179de506eae122b70b6e6f18a7d","compiler-rt/test/sanitizer_common/android_commands/android_run.py":"5cdc26fc9904735884e1dbbfda83cc83653d1e9c867f7bc7ada3161fb4017aa1","compiler-rt/test/sanitizer_common/ios_commands/iossim_compile.py":"654eb9d12803a7bbc29abc78b3d2a2ee94ad53eb899bbd04599ca2895470b49c","compiler-rt/test/sanitizer_common/ios_commands/iossim_env.py":"35796852886559d254bf17adc418a4d4c72a9238e85f2e802b3fd44d0b8df496","compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py":"f20e0c63c1d9c18ff2dc16ccf63f424ee5dc3722ba6d8570f564c6040eadb6cf","compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py":"1c7bac34833092af5e7c81aadcd1788f7d6298891fc275c68735aa11d92df291","compiler-rt/test/sanitizer_common/lit.common.cfg":"9e3c08199a0e06fe67fa73370a20dec705a93fca16fefa21a82664cbd2f8fc15","compiler-rt/test/sanitizer_common/lit.site.cfg.in":"ad2bd5c3447fa3638e29e741e2e023d7ec1c986b1d593e7776d8e3f413642616","compiler-rt/test/sanitizer_common/print_address.h":"e3b937ed013cafc49a6c1a9800670098d8e186cd99bfec97af9e2baf186d9905","compiler-rt/test/scudo/CMakeLists.txt":"3b692e113359f161d2f47bcfbee15323fb0c3431fd8f18a5b93848a32a9528c4","compiler-rt/test/scudo/aligned-new.cpp":"0201705ba5fd4cd9f2f5822a79e1c64c6d09ba7999fd2047a5df07d7ff4503b1","compiler-rt/test/scudo/alignment.c":"882f19662747bc9efe6e3366d62c73a51cd6f26d841813eed4c0ea7930828273","compiler-rt/test/scudo/dealloc-race.c":"204a8ee4d4c97bad07b1c11a2036dda7837f8450e535cf1b83b295b2b1907cbe","compiler-rt/test/scudo/double-free.cpp":"448261f5a5d74200980896b4729e334b486ebe92902c898713215b55a5fb771a","compiler-rt/test/scudo/fsanitize.c":"d44f95294c7207b20d1148104bd46e3b6f90303f555d481031a0d4122de9daad","compiler-rt/test/scudo/interface.cpp":"5e075a4f5c6706eaacca3e42c1ee3f4b57afe1e9142d9109453a3769d4c8ca22","compiler-rt/test/scudo/lit.cfg":"d916cad369045d98d792593cbe7a2be8c93de95a0800a78faa7a996339e0cfb4","compiler-rt/test/scudo/lit.site.cfg.in":"2686fb5d4c9a53219095827d18bb6e277c429f795f97aa4ad4666c3233322c3b","compiler-rt/test/scudo/malloc.cpp":"5c3dfc323fc4be229d9956caf610561e0f145f86ecfc99a62d3ea4f146445cf7","compiler-rt/test/scudo/memalign.c":"2546f7eae00c18c145b3a1030b9b78179c76e16bac806633c9e64445c0f42a44","compiler-rt/test/scudo/mismatch.cpp":"922d88287f9cb45fc88899f47bfb05110269dccd42942877d51f8afadacc00b0","compiler-rt/test/scudo/options.cpp":"d00289c4957c3b6945de36cc7a50c61b6146506c86dff10b91c9253dd54f3b2a","compiler-rt/test/scudo/overflow.c":"97bac5544d509338101e913e481cb38e5fac6b3e1d5313360791ce2db73596bf","compiler-rt/test/scudo/preinit.c":"29dba16b79eecfba441fa50ac49e3ef4e925ec733109a95f24e237e42c6f4684","compiler-rt/test/scudo/preload.cpp":"c2aad5c94a73f7b0e5f809192319306211ba78c4e495393f57e682626f7b981f","compiler-rt/test/scudo/quarantine.c":"95abb3f88a0539ea2f239ec21a8b099782249ad71cf39f847c57eb26392db699","compiler-rt/test/scudo/random_shuffle.cpp":"85b834f2c6f6dcb5c74dd5e6892b6aee42a85cedb91f8b8c7513cd36ffa09c1f","compiler-rt/test/scudo/realloc.cpp":"eeef558d0cda8cac00173493e1774c970d64be8248efaca5ac28d86768516a52","compiler-rt/test/scudo/rss.c":"fdd656fa7d890bf2b820831f100dfdb0837e5e3d92a90f101cd0af92d0e0a95d","compiler-rt/test/scudo/secondary.c":"02b27ef5657e9ec097527ae509ce0dd8398b0ece67eea92ed48fb03559aa4b2d","compiler-rt/test/scudo/sized-delete.cpp":"e11b9df2eca50ad4cd0eb999a741f0d24075979819f13bc109fd6e4c060aebdb","compiler-rt/test/scudo/sizes.cpp":"2e629f918df0d0200432a6ebc35972b1f497271732a51fd5a2d5ba6ead6b4fc1","compiler-rt/test/scudo/stats.c":"19775da6640c096f3502dc54ff9e029baec161b71cb6a4d89e89f413fa4b2f56","compiler-rt/test/scudo/symbols.test":"560d3ad8797c426793b29c07930f7daec29894e460abc47759a8a8dbeb211b97","compiler-rt/test/scudo/threads.c":"109a274032c22b9d16a64a12f6cbc3313e7664ddc1ed85048430fbc3206aabdf","compiler-rt/test/scudo/tsd_destruction.c":"3992e230aedfccd7731305a29be0ad5ded8cbc3ea18ca861ace31555143f81d0","compiler-rt/test/scudo/valloc.c":"7be92c39bf90d8adb1e8af2efa96f353625604e4c0f68541d7563f204a57f2f6","compiler-rt/test/shadowcallstack/CMakeLists.txt":"a26ed7fa26f38678060e72c24f815d3e6f0121c00148204f37cf37861ba3a326","compiler-rt/test/shadowcallstack/init.c":"71f01575b1776259b444bf8a8c9afaf69ce1bea22b1ad9e0ba13e9f2822c8bd2","compiler-rt/test/shadowcallstack/libc_support.h":"16d49b7bc4972e2cc0347730c409dc9889337d05b13f7b20eed900f2eb7f04c1","compiler-rt/test/shadowcallstack/lit.cfg":"8527278732ff36e0b5383e55146075168b0ba325194ba06ae58c4709e1b34580","compiler-rt/test/shadowcallstack/lit.site.cfg.in":"3bc9e93b268680d1079af9816e906aa74409db16f869039f3598a4f24c54773c","compiler-rt/test/shadowcallstack/minimal_runtime.h":"e0fd43eb27684bdad39c4d701bea60471d6e12a8b42d00e9e470ed348f8b30e5","compiler-rt/test/shadowcallstack/overflow-aarch64.c":"29dabfdc81ba4a4c533b1bcb2bf02b4fe1807dd807bf20f52b1811ac3093bdff","compiler-rt/test/shadowcallstack/overflow-x86_64.c":"e47a4dd70973b222ccb502e7ea6d5efbacc4fa0ab283bf652692018c8819bdf9","compiler-rt/test/shadowcallstack/overflow.c":"9df24fcb8aed59d265b28cfd032b38431fa519e7b4a9db34dd5e85dca05400a5","compiler-rt/test/tsan/CMakeLists.txt":"79bee5f703d1470dd08b3fe8c8aa9310eebfc798ced3c46aece72e6b90daa04d","compiler-rt/test/tsan/Darwin/deadlock.mm":"ccb3ce8f56b39e3534905223243f5e76ffa7faccbe5bc1d0c1ea77d189348f28","compiler-rt/test/tsan/Darwin/debug_external.cc":"05c387d0a978123d4c7de80e718c6e58bba7647d93318f43d5fbd6394a015faa","compiler-rt/test/tsan/Darwin/dispatch_main.mm":"2a0b76d84126b31d920e858ff91beb8480e0c1ff005b81fc11c9dab873abcbb8","compiler-rt/test/tsan/Darwin/dispatch_once_deadlock.mm":"101698f654bb6cfb87419f530993447d636c3b38cb11b81ab2adf734cbf9f2b2","compiler-rt/test/tsan/Darwin/dlopen.cc":"a0c15a8ef8d6b232ab1d8a7e5d12f38a4a3e049217bbb971b4bee6394d616a96","compiler-rt/test/tsan/Darwin/external-dups.cc":"c2028f87fd3e17933deffb3caf67ce74a19581f18fdf229ed5738bc4ab704549","compiler-rt/test/tsan/Darwin/external-ignore-noninstrumented.cc":"3fab28d177c3689b3bb825f87a6d945bc169550c9591730071418a2e0f78b11c","compiler-rt/test/tsan/Darwin/external-lib.cc":"63a8112215da54c41802ce5ea4d61335aab30b2982fb8a721056e2b66455d1dd","compiler-rt/test/tsan/Darwin/external-noninstrumented-module.cc":"3c048ea8e3dfe6930b1f2996db21a89225a06ce15924f072cdf431398fae11ad","compiler-rt/test/tsan/Darwin/external-swift-debugging.cc":"3f83300ae93e0da10fa48ca475eaae6149b75c9b202c099df7be71aa8ed6d10e","compiler-rt/test/tsan/Darwin/external-swift.cc":"a0631e14b667c9c2795e9de5f601d88b010e38e496708d348fd22b53cc898f67","compiler-rt/test/tsan/Darwin/external.cc":"a41b8ae100ff8992e17b8cce0315bf6936b7d7f22ce391a1f6897a64d872330f","compiler-rt/test/tsan/Darwin/gcd-after.mm":"72a44fa9cdec5c57beca5069dd7c3cb824af6a23c029926694a9f577857cdc4d","compiler-rt/test/tsan/Darwin/gcd-apply-race.mm":"2635e693239e6cddd5a3faaa216e73917a20c84ba8ad2ca07550eda6c0c0d3e3","compiler-rt/test/tsan/Darwin/gcd-apply.mm":"1fc3d5ab49fcac34ddd29a0154926b51a333aa6c75ef464cd566235ec5e0b7e9","compiler-rt/test/tsan/Darwin/gcd-async-norace.mm":"42053df71bf6ff25f11443c459c6bc7d19bed5292da92e43952ef81e304c23d1","compiler-rt/test/tsan/Darwin/gcd-async-race.mm":"7a397c6a13b281b03675dd794a6ef44c2e33c26cd21f9edf68f07b8720b79eb4","compiler-rt/test/tsan/Darwin/gcd-barrier-race.mm":"38176f9dcbeea90ae9b424c9d2b1392bc54f6a59ce40efed059960026d879624","compiler-rt/test/tsan/Darwin/gcd-barrier.mm":"80be6e1d17021f7137a5b6ba6647822306906a56eb2345898ac47e17c670e1b6","compiler-rt/test/tsan/Darwin/gcd-blocks.mm":"e642965c9badccb9b586ad36d22e759b79f1c99d1bfe7cfdb560443ace7730b9","compiler-rt/test/tsan/Darwin/gcd-data.mm":"1dd93636d4e8de0b6d9094dfd352373e504e61530989a2a190b626424d1414b9","compiler-rt/test/tsan/Darwin/gcd-fd.mm":"a93c7bbd06c11b6347b8491704e88c1a32fc19232182b241f6b147ae257f717d","compiler-rt/test/tsan/Darwin/gcd-groups-destructor.mm":"83fb145e1db2d70d913580162e1579d94587ef4d95e6b4cc7b27b7b47ff25a59","compiler-rt/test/tsan/Darwin/gcd-groups-leave.mm":"3baa94dfdab6d60577adb60ed1fc015a8ce00f15ca65699dfebef9585c7a891f","compiler-rt/test/tsan/Darwin/gcd-groups-norace.mm":"0bff41b2a8e5a59de39928d2594ee17e742a7487fd953136f73e1360760cb345","compiler-rt/test/tsan/Darwin/gcd-groups-stress.mm":"3d295b407b3e3f327ada682c74b76649881d5f555308a249c3bb6251cc39acf4","compiler-rt/test/tsan/Darwin/gcd-io-barrier-race.mm":"c73137acd048a080282b79d8b2efed3ef083fadd77f4b17e689a75ded8013e40","compiler-rt/test/tsan/Darwin/gcd-io-barrier.mm":"4e721f5162e76582bb7755240b91b3163c0a6ff6db1212475eb54e8b90b18695","compiler-rt/test/tsan/Darwin/gcd-io-cleanup.mm":"eeaca5071950dc3c0f0f0054e27838b22ec741d6d0620b5a11fb180c22e31b74","compiler-rt/test/tsan/Darwin/gcd-io-race.mm":"59128aad1a0ccd83ff0a2f323f7e0e05fbe9d004bcf0499b512f827a9e0ad816","compiler-rt/test/tsan/Darwin/gcd-io.mm":"3ea38ab8338b0840fc4daac70c3e8099748918308ee66e09c86dea111d034d44","compiler-rt/test/tsan/Darwin/gcd-once.mm":"91699dd0485059954aafe07684360ac2c1cc2ae30c025427d8bd83bbac496cfb","compiler-rt/test/tsan/Darwin/gcd-semaphore-norace.mm":"0224a1c80f6480ef6510cc2a6c7160a3f7555fe22b026d9231170295e02448d8","compiler-rt/test/tsan/Darwin/gcd-serial-queue-norace.mm":"87d5b0d229ec3dfeee7f3864d138b8e82f3ad46024427c303b26b6b1eadb60cc","compiler-rt/test/tsan/Darwin/gcd-source-cancel.mm":"5049f668e7dd4c9b80fb3027811173ed28e917cf7c5f1f61c92ceea4f35a381d","compiler-rt/test/tsan/Darwin/gcd-source-cancel2.mm":"346e6ed315a82d24041b13ba69dcf42dc6ac807fd8be437d40a14342b92310cd","compiler-rt/test/tsan/Darwin/gcd-source-event.mm":"dd8b4f890df50cd51f144456cb0588474a455e8214743bf056bb72ae191026fc","compiler-rt/test/tsan/Darwin/gcd-source-event2.mm":"2a21c6eee42719a35d9e8ec78fbd64f621a6e7fdc16bdd5dbc3d511e63f71bfd","compiler-rt/test/tsan/Darwin/gcd-source-registration.mm":"181dca8979333040913446e16448e27bea4891d21dfd3ceee1da2be5fbbdfbcf","compiler-rt/test/tsan/Darwin/gcd-source-registration2.mm":"6633179e66dfdcb2eac4d6c84131e8f0980f4fe32fd94b8c90669cf78d32ed30","compiler-rt/test/tsan/Darwin/gcd-source-serial.mm":"a5477c7c4f5ea20d2cb9b20e80b0746499aa0ff7cfd7373bd5c6e388d93bbaa6","compiler-rt/test/tsan/Darwin/gcd-suspend.mm":"b7912a990f4b9f7a15fbef96927f1bb68db6577b8c8d66d665985767dd026751","compiler-rt/test/tsan/Darwin/gcd-sync-block-copy.mm":"ddd9ee7bf7a936fad3c6db6abf73a6bf46787bf9f41202a211af3cf23a1e8773","compiler-rt/test/tsan/Darwin/gcd-sync-norace.mm":"e7aae676eadb5e1864d738f6c248f9f6d20562526048f228b6b1b65df9e44d82","compiler-rt/test/tsan/Darwin/gcd-sync-race.mm":"027f7e2d480d916fcec434ceffbacc51395cfdd47658e3183e805db2c1dd16a6","compiler-rt/test/tsan/Darwin/gcd-target-queue-norace.mm":"328a99b3982547edb554b0ed9d468eb9881eaf0b8c0e6b6e948285ae32b5b740","compiler-rt/test/tsan/Darwin/ignore-noninstrumented.mm":"4d63bec2b7ab86106995db4b69bd95af5318378aedeffb203c2a064b1045a16a","compiler-rt/test/tsan/Darwin/libcxx-call-once.mm":"bcbea02b0b5b3e29792381639a255df5023d433be3f8e614e59f8658644dba12","compiler-rt/test/tsan/Darwin/libcxx-future.mm":"2657252ec2ea2734ae584e85bd8cd728b616f3fd9907cd69b771e09cd8c53b0c","compiler-rt/test/tsan/Darwin/libcxx-shared-ptr-recursive.mm":"aeebbe1226ed960e630029c845dfe8a8a9bb04326328d0189dfec23604862217","compiler-rt/test/tsan/Darwin/libcxx-shared-ptr-stress.mm":"92c77d451daf519d86f7e6037e5bf8d5bdf1f3561c69220d2730e5719878e9f5","compiler-rt/test/tsan/Darwin/libcxx-shared-ptr.mm":"e7da78746223de759ed3ceab2f73026f8784ae19c4c019fe09c212d16da51d3e","compiler-rt/test/tsan/Darwin/lit.local.cfg":"206f4742f66c928c287f55feff397fd3ff5f691593e4ce9e825fd80e53fa2f80","compiler-rt/test/tsan/Darwin/main_tid.mm":"626e477f2ad01b1f3bb1e0a49a018bf7cd9cb4c8b0173375869f9886ff793243","compiler-rt/test/tsan/Darwin/malloc-stack-logging.cc":"6bac25569ac53e87f921af35b73805c9deaa5399c4adef2297b674f4e3d172a1","compiler-rt/test/tsan/Darwin/malloc_size.mm":"26361fa831a8b96e60012da954e617708b1296bca25c3be2c4c23d16009a8534","compiler-rt/test/tsan/Darwin/norace-objcxx-run-time.mm":"e94c11df00c0c0c3e14b3fa6b4a9ff429d6fc547a18bbb2643a28e92dadbfe03","compiler-rt/test/tsan/Darwin/objc-double-property.mm":"e49814da2274d7d5892eaf375e01cd8c9415a118edab39d7f76bca2fd0059b39","compiler-rt/test/tsan/Darwin/objc-race.mm":"daf02201c0f6863e53876ebe85f2c732896d278f98e70fadee90258e891aeb9c","compiler-rt/test/tsan/Darwin/objc-simple.mm":"60ba10ff245411fc1d144a4949591b78cac25b42d1bde654429add660a0dd738","compiler-rt/test/tsan/Darwin/objc-synchronize-cycle-tagged.mm":"2f291f019535a2c76e9e86a6d41c17505c634d1bbd7306853b29f02898dab834","compiler-rt/test/tsan/Darwin/objc-synchronize-cycle.mm":"9331a0bfd8b89b6a89463b93fa0c540a5835fe33d7966cbf28fea33a1aa4bbf9","compiler-rt/test/tsan/Darwin/objc-synchronize-nested-recursive.mm":"41cab6e1d2a8178bd49978adf90a98b7d35a9da6e3e0fcb58c55b8d945b02261","compiler-rt/test/tsan/Darwin/objc-synchronize-tagged.mm":"389cd8b0758b86091209383b7af367983aedd207fead19430f93385eb3f5311c","compiler-rt/test/tsan/Darwin/objc-synchronize.mm":"f308d2d212877a463f105bee9d3d3d95118964607a64883e86b5fc7317fad851","compiler-rt/test/tsan/Darwin/osatomics-add.mm":"114fc2f7f09a938e2a86b3c620af1b5e99b2e8f8339953b3cfaa2c91a9836634","compiler-rt/test/tsan/Darwin/osatomics-bitops.mm":"61c5c7d3e1b2a82aaed8d21282dcc5a266d7af7f178abca61ce9a0212f158baf","compiler-rt/test/tsan/Darwin/osatomics-list.mm":"52dfef1022ae2cca58700ced7bb53969730362c332651fa3b814b9f94d6b2178","compiler-rt/test/tsan/Darwin/osspinlock-norace.cc":"17786b888e8c31ed751f54f5e1e6c20d3651ad1b741e27804b715c025b4f7746","compiler-rt/test/tsan/Darwin/realloc-zero.cc":"df9adffec887ba06a1511a207b68424c90c7fd923382d3218ff84d8cf87808c6","compiler-rt/test/tsan/Darwin/signals-blocked.cc":"77e4c439cd6a75eb89b1f45f0e731da7de8041cf16c60b2e044296d638fdb326","compiler-rt/test/tsan/Darwin/symbolizer-atos.cc":"6b4efb4a6673d7a0b8738b038a15116d1cd9bbbe262d6b29ef3e042a386d0940","compiler-rt/test/tsan/Darwin/symbolizer-dladdr.cc":"d1ba6bdc8537858a13847cd317a63e4b385496a63870249ebac9a4572d1e43e6","compiler-rt/test/tsan/Darwin/workerthreads.mm":"bb85f16b7356d881c85dec5bb1e71c75e208f45685e0be89323282dd015b29ea","compiler-rt/test/tsan/Darwin/xpc-cancel.mm":"7b37d76a0ae884497636d103035e3b36c99e454fa574c6651fb0be4136a30ee1","compiler-rt/test/tsan/Darwin/xpc-race.mm":"3a11fc2f496d9e44636d049d7b71638bd28a45432217c240f82c96769e0b4f36","compiler-rt/test/tsan/Darwin/xpc.mm":"2336932325975030ad433c749812f7fc1d5360117cb6ff0fc9e7c042bfe4d75e","compiler-rt/test/tsan/Linux/check_memcpy.cc":"fe9a5a60d533eeb80fd70271981b7c28c2f38ca6eb51f4738ba70e1e04743cc0","compiler-rt/test/tsan/Linux/check_preinit.cc":"0efa66b43f87157b5410e3dc6a459854340808a748bfc3976e0c60075f955202","compiler-rt/test/tsan/Linux/double_race.cc":"e78d407faa783dab0750970e3f5e30f66567e84766e9256427b7106f3a3ab23a","compiler-rt/test/tsan/Linux/lit.local.cfg":"752f9f465d546875972dbfeb1fce9b5ecdfa3ab1d0b6b756efb1047f93298b01","compiler-rt/test/tsan/Linux/mutex_robust.cc":"18a3de5683436d79ae081a9a1248f99625af804fa865f9c056d4bb6e0c28a5fd","compiler-rt/test/tsan/Linux/mutex_robust2.cc":"0ca547edfcbb2f616c9a029fec09531daa74832676586288c7315477734af5c1","compiler-rt/test/tsan/Linux/pie_no_aslr.cc":"cd9aa764c16aec8f226dc7b0ad40027a3d724ae656d7ea14f2c96bf4789f5da3","compiler-rt/test/tsan/Linux/thread_timedjoin.c":"8a4e13b31390644026d3a512cfe456934ccb66eb99bb857ea8b530694a1e9105","compiler-rt/test/tsan/Linux/thread_tryjoin.c":"c130506bdd3a03c968b231395307b058222cf942107c70ed859266f5a972aa66","compiler-rt/test/tsan/Linux/user_fopen.cc":"40f654ba2b005337b28554ec2509531d501f9f634072773855101bec1b231afe","compiler-rt/test/tsan/Linux/user_malloc.cc":"816dfbb17a07f7a085eb2b74b6b80ffa8d832c2b80fd3886b9d46a198860a061","compiler-rt/test/tsan/Unit/lit.site.cfg.in":"195013c64fbda6fb9f7b585fb6cd82a4bb1b8a3ee6cbd97043c3389b4b385962","compiler-rt/test/tsan/aligned_vs_unaligned_race.cc":"1f0ce6c26eb4c6b9b0922d31af6c98d259d9b17a60fb7a768becb72940ea3eaf","compiler-rt/test/tsan/annotate_happens_before.cc":"b6a9a712db78f0347869da8dd2706051fdeb33754c1a8da542cf015b6e88ab07","compiler-rt/test/tsan/atexit.cc":"70dce1e3c4274a0e465f5b1518958e2e27ae7c8e5dcfe16e91b687ee4650e198","compiler-rt/test/tsan/atexit2.cc":"6c0304d8346d5b67279af98522436be351c94d1e30d333ac888ebb5c52309e74","compiler-rt/test/tsan/atexit3.cc":"dd3ce8b6d8c94969ebedaaf973d224efcbf2296930e52b63751f0fa585219147","compiler-rt/test/tsan/atomic_free.cc":"cd6895580814a1a5b4ed0b097c8e77aaa8265db1065c88a005f38514d2790c63","compiler-rt/test/tsan/atomic_free2.cc":"5c9af9a725d7ca9fa435b230c8136767809687241bcbeb5320efbcd38e9f034b","compiler-rt/test/tsan/atomic_free3.cc":"11ed7e08fc0d10bd5b55b9c43c3e71c1c7e7b443d2ee6836b6b080b4287e3c8b","compiler-rt/test/tsan/atomic_hle.cc":"c02ffe3bd6b640a2d11d180b28d4be20c446cd0e064d84effd299e81328bc007","compiler-rt/test/tsan/atomic_norace.cc":"e5d917b21db414ee44442f588a0a2924059c01fe639010b3bc5a47d0c2adc28d","compiler-rt/test/tsan/atomic_race.cc":"b306ce93efceba54cda6e3a262f749fdb9bf3d11eca0144bba729035ff189417","compiler-rt/test/tsan/atomic_stack.cc":"55103a8859d38c05a8d4596835af431465bf36e485368313dbb9913a9d8e3e3c","compiler-rt/test/tsan/atomic_store.cc":"a9b20e47fb7f7f8cae9d23bd4ae175b2b97f11b7f417bc3ec237fe62514d463e","compiler-rt/test/tsan/barrier.cc":"e6c927b8f910db364f254ab755db3180651f812297ec36414a09ade66738451f","compiler-rt/test/tsan/bench.h":"979ed7b34ef3872bf422ac2611dd413779769978103adfe086e5c3f19be4d75e","compiler-rt/test/tsan/bench_acquire_only.cc":"d6c225306d4cdab3194ea5ee1af036ed845beb6acf94b1dbd5d89eca480de299","compiler-rt/test/tsan/bench_acquire_release.cc":"dfc76dd53c45fc3e69a050b3d15837522bced0a3ef80315928528aed6d8a4d0d","compiler-rt/test/tsan/bench_local_mutex.cc":"0d2ffba63bd1943c9a0b1d43ecdd843489506033dc0f71f1655d292d95382340","compiler-rt/test/tsan/bench_mutex.cc":"b4ffe5268464baba3842390116b2ae56f84dbcf4597be5d7537c0d4de274f8c6","compiler-rt/test/tsan/bench_release_only.cc":"b04d1562d975bdd842c8e7225c0084fe26ed18396fadb5f626d6ede0864db19a","compiler-rt/test/tsan/bench_rwmutex.cc":"6a19369e2ebe036f9216d49e12de36aecc444f3864f6a4c6ccec0ba7cb5f6ee8","compiler-rt/test/tsan/bench_shadow_flush.cc":"65440c3350a9f3191d2eb8bf37d5b13d8254669be44c7a6b3884f75dc8dba8c5","compiler-rt/test/tsan/bench_single_writer.cc":"c1ee32ec72e2f631cfe5a9045b43e2d5afbcedb26d17be144801effb85f5e48e","compiler-rt/test/tsan/bench_ten_mutexes.cc":"71ee27b57425ec33ea79c4354597a2a34b12a2717c4b174b71c48a57a94e9dba","compiler-rt/test/tsan/benign_race.cc":"71076d6fe1ced7d00f827d022c8646ae97f8ff4e8764f7d30f7e9acb6f177c0a","compiler-rt/test/tsan/blacklist.cc":"ba54eb2b18faf0f98c48173fdea9625373b0b872b375dc9d6a260a57eced1dfd","compiler-rt/test/tsan/blacklist2.cc":"7796bb9c0cdda9e31bdecdde4821be6e84d6b032583fac0bd4016229c8ef0d57","compiler-rt/test/tsan/cond.c":"5fb4f64492684a199d49023854e5c9abc90e24f13787a395aa358bf9e246332b","compiler-rt/test/tsan/cond_cancel.c":"d40feed18c1d9dedd112f3024d3678735ec523e3ad4845b1d1681febde0ba787","compiler-rt/test/tsan/cond_destruction.cc":"1f7feb73b3f393544ed9fafcc41fcfc73db8691e2c4e87be436d5e85c0cb8193","compiler-rt/test/tsan/cond_race.cc":"e7a104c9059bca662700b6f79adf75412a28ea500d4a86bafd7459f6d0567ec7","compiler-rt/test/tsan/cond_version.c":"264fc24bb81215f0d3d231746d94c8bd4650097cdb106a0f8faa315653299ac3","compiler-rt/test/tsan/custom_mutex.h":"74446806a2b2b661048973cdaa527450871a2be68b700bec82d35c0db064886a","compiler-rt/test/tsan/custom_mutex0.cc":"7ee06dec78b05ce8a6857bd28684808ffe195dbfcdcad92fb58d4f90391b73f8","compiler-rt/test/tsan/custom_mutex1.cc":"306e442bbd10e26b49dd0dd61a66878ebed0dc693a3a57bc6480034bfbc6a320","compiler-rt/test/tsan/custom_mutex2.cc":"e178e2a83664d27e11db5206c9807d61d2c8b28ae4499187f6c2ceb2aa007d21","compiler-rt/test/tsan/custom_mutex3.cc":"4d2a057724f81099bfef63218ccb9e56977948c9242860439baebf213051e01d","compiler-rt/test/tsan/custom_mutex4.cc":"b5ec2c18d646b9a279f10ebde790b7efb41560a29016d2f6eb36b7520fc75f39","compiler-rt/test/tsan/custom_mutex5.cc":"e9d9fff0b9353fffb797fc99aeaaa28b52ba10a7ca0da23e33d0ae07efaeb90b","compiler-rt/test/tsan/cxa_guard_acquire.cc":"f3a8867ec95d7f66d0393b642ef720f5003ffd4962557e8d48a0a26ac1943fa3","compiler-rt/test/tsan/deadlock_detector_stress_test.cc":"014f53a99f6ac00e91b996d6fe78711755ed896dfa11704d037b5cc6a363e9ce","compiler-rt/test/tsan/debug_alloc_stack.cc":"9fe2aa2c52c106058ce597803b6f5fcba8d689d7f2583f9a82513d9ffcfcff02","compiler-rt/test/tsan/debug_locate.cc":"da10a1155664958f16fec4bd7e527c3addaf318fe01254409ddc87ff228e097f","compiler-rt/test/tsan/debugging.cc":"57fb82da1677637a7ff7c4cf81fb28868a306f12bed42bba730b829ec822ccec","compiler-rt/test/tsan/deep_stack1.cc":"3cb11384f8f937d5978680c190c7254029dfc7dfda8b88b625f8061bd5442be9","compiler-rt/test/tsan/default_options.cc":"13e1b23f97b5c27bb7846a27e66de89a7f3ca740e7d1d1c33d57bf145c54fb99","compiler-rt/test/tsan/deflake.bash":"f8bdfe1e11cf9f9f5b99dc048df125eaac68051bd2c8a3ab76e02177aab9de9b","compiler-rt/test/tsan/dl_iterate_phdr.cc":"cbfb4eccc3220d6faef86fdf06b296c9e092c1fca29678432c1306a13d146b68","compiler-rt/test/tsan/dlclose.cc":"cc46d426fb07d63ff2a8be21083ab99e1024387a7cc76d2948dc0f1865c1640c","compiler-rt/test/tsan/dtls.c":"7775d40175b3b7f0796e916170faadf980e7b4381ecc9206dd75cd3ade6de410","compiler-rt/test/tsan/exceptions.cc":"b833adb573ed55d323358a0ac5b7bcbe44201c75da7cf8e51143bdcfaf197df1","compiler-rt/test/tsan/fd_close_norace.cc":"239cdcce1b657e1fce0770bf212c15a5de4232c20d64dc0502f4b31220d5103f","compiler-rt/test/tsan/fd_close_norace2.cc":"a86924f0ad88fac565b04cedc1a7e825c635208f7355e574cd16d8699168129c","compiler-rt/test/tsan/fd_dup_norace.cc":"7166e4559292559ad189954cc3f2ebdac24eea45cf12da5a10cdc81825674682","compiler-rt/test/tsan/fd_dup_norace2.cc":"bd0a94f0a7f659b853b1fe395e545205291d2e89f0b169afdc51d610114d0772","compiler-rt/test/tsan/fd_dup_race.cc":"6f720b0415a5a14f9940098c6f615b7b2f9061dd89f0f1d65accad1c40642250","compiler-rt/test/tsan/fd_location.cc":"4a1d00483c68019859aa086c2420e70e09948d99ca92b7734300915d8c19da1f","compiler-rt/test/tsan/fd_pipe_norace.cc":"14e989290a975ee16f48af849e264aa167fb19bc7023560bc5c67a4d28772013","compiler-rt/test/tsan/fd_pipe_race.cc":"29094948fbaa43552acfe8ba32041e44941941d77b1091b3eb4ce1594d1d90a3","compiler-rt/test/tsan/fd_socket_connect_norace.cc":"ff73711334b7d2e2165223a5cc605237f3484d285d73fe99373b407eb2c92b08","compiler-rt/test/tsan/fd_socket_norace.cc":"3e1de9c43d09f8a3dab80af8edca30d99c0f0719a24a929c26407a65767f86d4","compiler-rt/test/tsan/fd_socketpair_norace.cc":"8a6e927b9fddefbb0cc03c3e353db906c67b1c5abe4fba3f4b9588dc76c41a39","compiler-rt/test/tsan/fd_stdout_race.cc":"fcd0b57df9a878db29be18d7e44b235632ef8fd5a3e769124906e484f42c012d","compiler-rt/test/tsan/fd_tid_recycled.cc":"c8791243476ab8e0f9ebb9b895c48ca39d37a0652c9c69cc6346035b56832f19","compiler-rt/test/tsan/fork_atexit.cc":"3d24fc4336b59655f712794ef68304b6c02734da39d609e116249c4c25f4829b","compiler-rt/test/tsan/fork_deadlock.cc":"9dfc88f37ae5ba2902d4f2a7ea80992182b578188a8f5e6e7960167446a8a812","compiler-rt/test/tsan/fork_multithreaded.cc":"61e07afe308e518674f2ad2f356e397cea4e935ceca7f45f0ae7c07b344e7b2c","compiler-rt/test/tsan/fork_multithreaded3.cc":"5500f3a8d292badf10adde1bb6efa4fa589626c3a94f2d4d76a9722635adf0a1","compiler-rt/test/tsan/free_race.c":"d9f017ac18659149bf2cd69d002c18b1603626e44657dced058c9ce0e6ea3a21","compiler-rt/test/tsan/free_race.c.supp":"b1b43bcefedea23271ff7871f58373f47be019f45682cf6f33d46df1949bce97","compiler-rt/test/tsan/free_race2.c":"2e5379bd310759fff87e6e7edadaea334425ef3b26c196fb5b6799b517ba92cf","compiler-rt/test/tsan/getline_nohang.cc":"6a70ac44d0484025bf19f601c5f972ef8dd9d626267ff0576cfd3edd3c55d6ed","compiler-rt/test/tsan/global_race.cc":"6348f392d14501f7e57ac82c039191e803ee3f33af15d1d2e59eb6be0e86bfb8","compiler-rt/test/tsan/global_race2.cc":"0d25db1fc1e95846945ee10dd548d652692b7c32362283b44900b84399dc78bb","compiler-rt/test/tsan/global_race3.cc":"1b86d8a6b22ed149978cf32631fa2abcad456dcbe9109d50063a55307e093bf6","compiler-rt/test/tsan/halt_on_error.cc":"a673af3a47862888f15563130d05ec293bc181c9bfbe634f67f0942033609879","compiler-rt/test/tsan/heap_race.cc":"a65b888a39277df34dfaf40c981cd1ceee88f2fd88a0791d08200749bc42592a","compiler-rt/test/tsan/ignore_free.cc":"9c79ce633e938bb00f50826eb7dc173f09503fde376d626f4371d4e18d783771","compiler-rt/test/tsan/ignore_lib0.cc":"40957135e3182055a283cc60f3e5748e967fbfa7216841249c05c870399cd2de","compiler-rt/test/tsan/ignore_lib0.cc.supp":"996e86ecddb6f46d28c408cf117f16c14166de077a2633124258a9bab1692a72","compiler-rt/test/tsan/ignore_lib1.cc":"541a0931cbe85b6512031ebda56a95e6afbf66c108e0440518d0dfa408da1e9d","compiler-rt/test/tsan/ignore_lib1.cc.supp":"61e74818ac1b2c8bf150243ec933af9d8e729a66baa443b6f534ecbed7f9225c","compiler-rt/test/tsan/ignore_lib2.cc":"6470377f0ab837cecf6e941dbcffebf89da672f3a800f9cc984e5603d00eea40","compiler-rt/test/tsan/ignore_lib2.cc.supp":"b9e9f505401517241e77ccf1c1eac2c31d99dbd0ab80d2087fc5541fc7a198e3","compiler-rt/test/tsan/ignore_lib3.cc":"c24ce4e1757cfe2845d3258a5b9f94a710d3d9c4a69f0f315b0ae19a97c92470","compiler-rt/test/tsan/ignore_lib3.cc.supp":"ba8aa4b5aac1a5236b0fe8c54856bf385cc55daad86e2341087e718206a5a4ef","compiler-rt/test/tsan/ignore_lib4.cc":"30a3c78225b2462153d7f77031e83744a9f8c6bf1a75d4ee945d36f22d6b6630","compiler-rt/test/tsan/ignore_lib5.cc":"6efc50845906f1aed6001acc9d8dd68ad11fef266c197170a44267c76b4cadf6","compiler-rt/test/tsan/ignore_lib5.cc.supp":"61e74818ac1b2c8bf150243ec933af9d8e729a66baa443b6f534ecbed7f9225c","compiler-rt/test/tsan/ignore_lib_lib.h":"ec18520d660a6bea2025ba12d145a0c6bf69586f9938fd17b17268af76e50465","compiler-rt/test/tsan/ignore_malloc.cc":"b6e2daa7af71c457d89676ebc65f1f253f507ca38db4b0caa21ddc670454f011","compiler-rt/test/tsan/ignore_race.cc":"1ccc7c63ff0f630abc195570b69f00564455b5cf1f0dc7a34822f801aee88a62","compiler-rt/test/tsan/ignore_sync.cc":"338540eaaaa4060b147c9f2cec49834f7c209aa718bc402ce4d1ae2cadc9b9fe","compiler-rt/test/tsan/ignored-interceptors-mmap.cc":"2046e465961ee6c280e2d13ab32b2dc4bd5fbb17ad0bc7eb90f7eaf66f5a4368","compiler-rt/test/tsan/inlined_memcpy_race.cc":"d2a0f143f242c6cef6f31651fba7a8d292611c6d9b1799920ccc77e501ac5cc2","compiler-rt/test/tsan/inlined_memcpy_race2.cc":"01725429a78c352f2f4f302ad7fc390c8136746734cf6434cadc8f16e0b681ff","compiler-rt/test/tsan/interface_atomic_test.c":"758d06ec2e40386bd58365cd239289d9e4f099f62262a3c995ebbb70f628db95","compiler-rt/test/tsan/java.h":"154099cdec7121d93842ba7b0a89fd43ce84bc3aae1b080752561378c7b73321","compiler-rt/test/tsan/java_alloc.cc":"425778b8166f5b0818af1465133dc56d0b12e4db98a0e33394ac88bf87155e92","compiler-rt/test/tsan/java_finalizer.cc":"7e804b88bf59cf838f2a0fd3ec716ffaaba035aa61d47448e939621b2b616baa","compiler-rt/test/tsan/java_find.cc":"f9c7125e4e6cf3911517d362f9d4b44476ff087d5bd2cfcec9adb6b4444ae41c","compiler-rt/test/tsan/java_heap_init.cc":"87f503f5ae9fc4be781fd9e7daa31630f72aee709071875325c8ad1ff4c0d985","compiler-rt/test/tsan/java_lock.cc":"4c8dc0fd7a358ac60922a96e73a03d2c05eac780a4cd913b5ab4dc86af8dd31e","compiler-rt/test/tsan/java_lock_move.cc":"ea1afe0025c8c4920818935cc6e8a94f1402e671d4936e7c7e821b9ac831f31a","compiler-rt/test/tsan/java_lock_rec.cc":"0f92d3bd7af36f9ae411d9a5b5ce81488148e359e9db2a77f4686155f6099a07","compiler-rt/test/tsan/java_lock_rec_race.cc":"ac4f9b70f4d36e0ec05da67659525be2c19f60f5fc10accc334e5ce691fe2003","compiler-rt/test/tsan/java_move_overlap.cc":"fb3842bcfaaa203f456256d06f0986cf745a3abecc301507b8232610a4efd5e3","compiler-rt/test/tsan/java_move_overlap_race.cc":"dffe910bb271b98880216b0925602f4fc5bc811a7c71692170d40b0340af353d","compiler-rt/test/tsan/java_race.cc":"9d80520f9fccfc742b6264a0cab6ad154e3ad74bb0e7b896e9d768d119da8871","compiler-rt/test/tsan/java_race_move.cc":"42c6bd0a21db46f40d65837949651af397293810feac1a72a46ff49f279d0b9c","compiler-rt/test/tsan/java_race_pc.cc":"2e9e861329f3e50f66cb4222a4c13908116d1d49bac30d244db5be418b64f7cc","compiler-rt/test/tsan/java_rwlock.cc":"fd45ecfa6c8c95538fa3416d1cb4237779d4bf0032d93306294d4dd11c05c3b0","compiler-rt/test/tsan/java_symbolization.cc":"1db4eb70b5d7095e2e5d223bfb16731a6242200f72226db2696ca28bb909d31b","compiler-rt/test/tsan/java_symbolization_legacy.cc":"52f7751bfbdbb1c82cfb7cf8af89ae34f20b018b68dbabcd903891d50ad6eb3e","compiler-rt/test/tsan/java_volatile.cc":"0da5951b63227877c0a97cb1022468f7a140dac4b79997d7fb2be26988ff6b02","compiler-rt/test/tsan/large_malloc_meta.cc":"059a47c9f9de45a75262a1e9fac6bf00d1440c2d3fde7e3c746c71a2ee83042d","compiler-rt/test/tsan/libcxx/lit.local.cfg":"f3f1666b7f33e13772213533532c93c527fb912cff81dc0c7a22a728f177f91d","compiler-rt/test/tsan/libcxx/std_shared_ptr.cc":"f23f629bf21ef30ca1df2464a3dd729e965fc4d6d43e8beadedf2f8e6b90f670","compiler-rt/test/tsan/lit.cfg":"2d3bc33df6cdda3bd42dea39e19f49f52e6ec34fdac8ccd341645063e7b7f9b3","compiler-rt/test/tsan/lit.site.cfg.in":"47bef7d4beec6413b3baccc75fff1b9c81778a3895e408a4a07b794f2d309656","compiler-rt/test/tsan/load_shared_lib.cc":"c95eab7e0646ca0f0976312ac180055c6128add4886d9c69ff69f94784f6d791","compiler-rt/test/tsan/longjmp.cc":"cd7b73371b35d220a3a25ec7bc84568c68701e75a25c39dfc756a5d6e1f061be","compiler-rt/test/tsan/longjmp2.cc":"4e2ce9e6cf059bcf8647ee42b07144af8306daf8f1932ccba99260efcb922df9","compiler-rt/test/tsan/longjmp3.cc":"59666309e9cf285b9cc8137df49e5ed405b7b6a8ea4313207323cf10a773ebfa","compiler-rt/test/tsan/longjmp4.cc":"8c0a178265bb8e0d1fffe1bb28c758a537fbeeb256685fbf1789e8cb95155236","compiler-rt/test/tsan/lots_of_threads.c":"0d3b69a2acb2322c605b4a8373f929e4ed074a23ec55efc940b13fb7444dfd83","compiler-rt/test/tsan/malloc_overflow.cc":"d8fd93905d18294a05eee79178625218d4a5a8963bcbd3613214be9d537e07e2","compiler-rt/test/tsan/malloc_stack.cc":"b9ab79d9c3091c83f2e5d140c7687e8e6d2074ad840ae2e3bef6d9da71de364b","compiler-rt/test/tsan/map32bit.cc":"f2e0cb701d78d94d852feece2f014f8a4e2e24ce73eca579a90796c78097e620","compiler-rt/test/tsan/memcmp_race.cc":"7e38213e9b72bd263d57cfed7b409554e5ff87adb04864297fbcb4dcd6dffad2","compiler-rt/test/tsan/memcpy_race.cc":"898bd77f926316622c64c724850ad8e02d9a68a30ab3b18a72d7cc0e79785ce2","compiler-rt/test/tsan/mmap_large.cc":"75b0ba2fff05bba5574ebb785481fa8da1b99f711405fbbaa7e8ca99676f5212","compiler-rt/test/tsan/mmap_stress.cc":"6e2dce3ad10ff637fd28619cf2d1514f1662bf4dfc6cce229d1aae497bb2db81","compiler-rt/test/tsan/mop1.c":"16f0faafb8cf1dd98558867f202ea5a60a7fa35367cf258d79d4e21c89509bbd","compiler-rt/test/tsan/mop_with_offset.cc":"927bb5bd3f8b8e049c66b820c97812d27d8e10743d547a1e8b48b0ade32d71d8","compiler-rt/test/tsan/mop_with_offset2.cc":"40c164bc13cc82e99e7ca148e1e15a08ddfc5d2827b955c85f9cc5d1a62bc3ad","compiler-rt/test/tsan/must_deadlock.cc":"4ae3991fcfefc0d9aa4eb50e17dee5f9b7e6655d94f9d59e7ed9bcc344d8c370","compiler-rt/test/tsan/mutex_annotations.cc":"4c679ba2070438e4dd25e9c1d4889feb9aba21baba1e3ae7e5bcd74e750ac92a","compiler-rt/test/tsan/mutex_bad_read_lock.cc":"a7733a13190fb5ea0715dd722924fd1444e901e1a8c2b306d44e379e781c1a5c","compiler-rt/test/tsan/mutex_bad_read_unlock.cc":"fca58ece7abd699ee1762dbb8f918faf1fa5d8bc358100db6f968ddb48d74426","compiler-rt/test/tsan/mutex_bad_unlock.cc":"dde8fe009bc1cd17e4b93df958b879f6cdd37e58f6a3c73627f10cf8ac864066","compiler-rt/test/tsan/mutex_cycle2.c":"4c6e6eae0c09538782a869775c5d82c2e7539d7f8b623a823ec7910d2c21b0cd","compiler-rt/test/tsan/mutex_cycle_long.c":"c15b6c51a23a7ea3ac367cd82781484e78509b3dce0dfe515674d3b9da0fa2eb","compiler-rt/test/tsan/mutex_destroy_locked.cc":"3814807eb575aa680efb907d214fec4d395bcb8b1145c59278c3169004c313d3","compiler-rt/test/tsan/mutex_destroy_locked2.cc":"ac9456be7cb9c2f54a11e566d51f6141a5acabf815a84ac6909f2b814ef3ed0c","compiler-rt/test/tsan/mutex_double_lock.cc":"5b24c6239b02e9dfcdbf7d3b4e2ad3ffedf8d87781006d1fc12442bb4f8632a6","compiler-rt/test/tsan/mutex_lock_destroyed.cc":"4342e140c033cbcd1ab069f4a04112d46b7e58ed42148dd3401d147bce031fe9","compiler-rt/test/tsan/mutexset1.cc":"d12b3f949468f84fb2a49f0f0458520757f29439894df7d7a4e0726a539a4ff3","compiler-rt/test/tsan/mutexset2.cc":"fbb317bcd16428fbfaf1b19bf6be5db12fb1ba9b595daf17401f9ff914991e12","compiler-rt/test/tsan/mutexset3.cc":"304b79c20079e8a75c03992af014321f7f7ae53a9b0f4b4cae560516c0a46362","compiler-rt/test/tsan/mutexset4.cc":"e47ff759f9387e2fa1c49e937faa3a0c1f568b85d182fbeb780141d465393456","compiler-rt/test/tsan/mutexset5.cc":"49731bce4b9dc163a28bab4ee4ce8dfb757bee85777d9859152fd6095bae24a8","compiler-rt/test/tsan/mutexset6.cc":"8c1cb33582455cb483c6e157de6057125f82f746c8c58ca8e559869ed58e953c","compiler-rt/test/tsan/mutexset7.cc":"3460f22ce9d677b81caf4658291343fc1319a341b2fe77036069d67593296e09","compiler-rt/test/tsan/mutexset8.cc":"4dd8eb11b519ad7ea43d075b9a4c2cd4142db1048b87367521d02cf56c00c8a2","compiler-rt/test/tsan/pie_test.cc":"27874b40d0cb1a7bc39f9a362e2396125c655710acc5741f96e01b1112630f67","compiler-rt/test/tsan/printf-1.c":"2e9f67519ca57d6c6744a694b5c56dec5e99b90a6187c04c90f11001f252c3ec","compiler-rt/test/tsan/pthread_atfork_deadlock.c":"1fbe562177d50b867e2fcc570ace8c949876df7477bc7523433d76f48a142e35","compiler-rt/test/tsan/pthread_key.cc":"48162a678165afc80dd2ef00dd62b3209f450741f5db12b975cac58a8a95c0ff","compiler-rt/test/tsan/race_on_barrier.c":"818c1e4885068be9af06b60e0560e5a1ca756c0800867ad3e96710ea678d0d8b","compiler-rt/test/tsan/race_on_barrier2.c":"b4fac9df7f31e20734da54f48053cd6f859cbe137b9b2d36acbc958e507329bc","compiler-rt/test/tsan/race_on_fputs.cc":"530ce6cab279a52514656ec2ce23b147f93c72cc6b0219b1c297838f92aa2d1f","compiler-rt/test/tsan/race_on_heap.cc":"06f50400ae6bd62b2758c2db82d5927d6d937db6e168a9f4356c22358c7b37aa","compiler-rt/test/tsan/race_on_mutex.c":"1cd039a09c26c336b2edfd8758d8f8b035b1abf8eab3a20dd4653f7c876d0585","compiler-rt/test/tsan/race_on_mutex2.c":"6994d47dbd17ea251e040a10cd48a4caa0af83b40cd5c6244e76b92237f38af2","compiler-rt/test/tsan/race_on_puts.cc":"186ccd14df33dcffa23115d617b3621bec80b545129fa1dae4c87c77b422b54e","compiler-rt/test/tsan/race_on_read.cc":"1650a3ec956677855bd140a3aff906f9cf25073c290e532aaa6fce70b611888e","compiler-rt/test/tsan/race_on_speculative_load.cc":"1ae9fb1422661f272dc7a93a4b25824ee374960c39aea376ec8faf3c3f9784b7","compiler-rt/test/tsan/race_on_write.cc":"00779b61be5d4dfb1d80f7788152b395502059c99c88787c56094da076e6f9fa","compiler-rt/test/tsan/race_stress.cc":"f9109d49ffdccd563f2415c160570659727cbf81268101c64c04e0439a4eea98","compiler-rt/test/tsan/race_top_suppression.cc":"44d40da7ee7bfbd684b00eaa0c3cc34197d7e183c80183d19b990c334cdb4757","compiler-rt/test/tsan/race_top_suppression1.cc":"23c53c76e21541015d4826ee26416c0e2eab519b8b23670cd5ad6b5a423647c3","compiler-rt/test/tsan/race_with_finished_thread.cc":"90381b6fa5cc169feba827f8640196aecf54fae05f564a80d3816fff71ecaf09","compiler-rt/test/tsan/real_deadlock_detector_stress_test.cc":"bf7cbd79733119ddb0a97e96abba026e3f74a9abf7366c8112642ba4258a000a","compiler-rt/test/tsan/restore_stack.cc":"883159a67da2479db60a7edc5d03456c1d7cec7cd93849dc12a0330475a447ff","compiler-rt/test/tsan/setuid.c":"f85711eb2a131b3a3d77db391d67a91de36413bc1d9402f632c5150cdd378038","compiler-rt/test/tsan/setuid2.c":"24e2a4196595a48ac62f3b801b785ced67197099ad4f7f171071498971b7af6c","compiler-rt/test/tsan/signal_block.cc":"26edc9b04e3ae1b7390d88904f30a031b19901dc655436178235a69acbac5d9c","compiler-rt/test/tsan/signal_cond.cc":"13cd5eb807775c9f21ebc97d05a55383276a65b7fb4438e25c09c65e187b3286","compiler-rt/test/tsan/signal_errno.cc":"ee6f3fdb11cf69bbe04f63e9b8091b2fe399eb8fdfc8299d4243e2b5ab6a2b8e","compiler-rt/test/tsan/signal_longjmp.cc":"83005a442b97408abc9d9d4a0aaa595defca0d1bd9f88ff5b93841fedbe0d74e","compiler-rt/test/tsan/signal_malloc.cc":"be5cc4486333eac6df23b4445889e751a86c774df196f55b0cef8face55a2825","compiler-rt/test/tsan/signal_pause.cc":"3d99dbea6ac94ec568b796c51afd090c7e00ac32e679d67b7342beb0deae1870","compiler-rt/test/tsan/signal_recursive.cc":"42425f00df34d58a1f1911a3e789627f454d5ebdfe5ac6cce04dd00fa339b5ca","compiler-rt/test/tsan/signal_reset.cc":"3a11e0f98bd59d0dd330b9756eae4c1b83654c27f4208421f00457d24d8ec65d","compiler-rt/test/tsan/signal_sync.cc":"c045150ed73184ec0f2122bf8ad532c8e49741b6ae6fd3ba7e0630c1e5a00f80","compiler-rt/test/tsan/signal_sync2.cc":"ad1d976e9428367be40b3534687c242829ff6ff3bedde8d401b1c4b5705a23c3","compiler-rt/test/tsan/signal_thread.cc":"032232299c3a8a4ff0aaba044f2fbf42f22d0af4df7b5f06ad97b3f1f3ac84e2","compiler-rt/test/tsan/signal_write.cc":"c3649cb4115244a649052fbbc946a71d4e7a7d54211c184c3d0d45b00614e399","compiler-rt/test/tsan/sigsuspend.cc":"f92e42e741fcff46793288351a205ecd632658f1780016f2228a957809454756","compiler-rt/test/tsan/simple_race.c":"a96d8a5b394e45324f3eedafc548a323801b0b32e214e31a7f2aa4f628f0dda5","compiler-rt/test/tsan/simple_race.cc":"4df0baa0c6fa4b7f5041b98c8e5d3f651218430723b1ccfc7d54aa243949673d","compiler-rt/test/tsan/simple_stack.c":"48ddb5d7e9af81b0ff9cfc132f1a550be141cdbad47f2608f00189b8cda3421b","compiler-rt/test/tsan/simple_stack2.cc":"59b27cd2ef23aabc2ce07d955b1697f924b2a3fda413edd694b052fb8655217d","compiler-rt/test/tsan/sleep_sync.cc":"7cfe7e045f16b6ac7dd6f161fb7d2fddb6b43b43b5b7018c5e70099c2a7de9e1","compiler-rt/test/tsan/sleep_sync2.cc":"705fae477b23f5724ba31f42fdfa26dd37ad3415c9b381e25feb13e59758771c","compiler-rt/test/tsan/stack_race.cc":"181266332205b282c3eb59ab7969bb567d1a1186c6901546dfe172203bdc7cd6","compiler-rt/test/tsan/stack_race2.cc":"df3c70cddcc2f96d82f3d809fb6810f3479d605d9c5b2386832929a9ae2829f3","compiler-rt/test/tsan/stack_sync_reuse.cc":"bac23ee612af6d5b0bab2e75da2556f242fb1157d82d9f37eeb258a46df4e43d","compiler-rt/test/tsan/static_init1.cc":"16c72ac1e570dd238f64270c29f1ee92673c7de416c47444b009ac6d1c5ae9ac","compiler-rt/test/tsan/static_init2.cc":"eaf09a37066634684be3c4a151e3ab2b44e0ce5c474e65f66e7f17926864b6b9","compiler-rt/test/tsan/static_init3.cc":"e868cf5fb6c69eb7f42ca30c5b0cf6feab5eb2d7872473c39a22a98217425ecc","compiler-rt/test/tsan/static_init4.cc":"a16f9c8ea3499bfa633854aab8d3cb99b8ab63c921052ba92fdcbeeef2e1ecde","compiler-rt/test/tsan/static_init5.cc":"b8bf4b0049b4f394c64d31c389e7089de2c24ab0077d9a42df3ba6a33774832c","compiler-rt/test/tsan/static_init6.cc":"c4ec38186e81ecb112fa08c8bc70d1b00ee56fb4b5c8622cef53b80c5d703de8","compiler-rt/test/tsan/strerror_r.cc":"39ecdca45956930014a658fd4b037048be6bd0a90b1543591cb61ea17bde1164","compiler-rt/test/tsan/sunrpc.cc":"013296d80fe79960ff1d7d38e6c4aaebb11162285c220b82f74e55bceb43ec62","compiler-rt/test/tsan/suppress_same_address.cc":"bf7efc0fb6ee1d2398b1e0eeca4089b46cdd4451b008866eac919c23426a1fa9","compiler-rt/test/tsan/suppress_same_stacks.cc":"2a832e9e787bddf4ab1a872fe79bcb51b6de6c629c9fb93edb36db1f65d467dd","compiler-rt/test/tsan/suppressions_global.cc":"fa804ea8b7619a1c536bfcee28e75a4bb0d348e067d48828768d1eb378e7d8fc","compiler-rt/test/tsan/suppressions_global.cc.supp":"76a66cef431fe059b1b5cc12e17149384629909e73c9e7d79bab247be9b365ee","compiler-rt/test/tsan/suppressions_mutex.cc":"ef95312c8f973f5f421087b59d7f8340fd2a18d94fedde0bd9b1242d270c0c93","compiler-rt/test/tsan/suppressions_mutex.cc.supp":"7ff83db0b08726ddb2b848bdea213477876ef10376956369aabc2445d78d6ab6","compiler-rt/test/tsan/suppressions_race.cc":"f653a9bf39c5e3865fa79b0f536c5539178ef70c22bd10949729690cffc4f5c0","compiler-rt/test/tsan/suppressions_race.cc.supp":"0846b7d777cb632574041efc0608d2498c3cb987d71a6a255fed07b691d6d87d","compiler-rt/test/tsan/suppressions_race2.cc":"ca22228166c427be6671b048b9180783ac10e07bcadae006f79a1bb1a1e04c3f","compiler-rt/test/tsan/suppressions_race2.cc.supp":"9af302455978ee5d7eb6d2c85caefe875a37b629faa9c048241e76dee64647bb","compiler-rt/test/tsan/test.h":"b9508d87d676b33198b797d4601bcfb2326ccc5cbf3d17a44d4e7d2fa1cf72f0","compiler-rt/test/tsan/thread_detach.c":"d114639698cf3d5a305d994093d2ef5a502949c5e781496da43ec072f8fa554f","compiler-rt/test/tsan/thread_detach2.c":"ff098064a8c3580f4f9f053e71fc4cbd01b81064e76a5d31155672212b5510c7","compiler-rt/test/tsan/thread_end_with_ignore.cc":"0382186d35fd316e7fc73a199bf0e065605ea11b13f6832ff0ff8651e5ec5228","compiler-rt/test/tsan/thread_end_with_ignore2.cc":"f688a394b502b4603dc5b5f6a64b1acdebfe4c768a2e93a7d00f86fe1fa83a53","compiler-rt/test/tsan/thread_end_with_ignore3.cc":"61fd329ae6af45aa64630404cb482b1b8a0e8bd2922dd889100f4af98be0c311","compiler-rt/test/tsan/thread_leak.c":"3f0960ad5b02ba7063aaa53fffd458efea24acc738d27cec60b61b9d14623c0f","compiler-rt/test/tsan/thread_leak2.c":"523e41187144592b215694f1fad5dd46c7093beba2cee0fa9dcc88c69d9a6241","compiler-rt/test/tsan/thread_leak3.c":"879e1305ea8feb04549a6495b11b93e80a0da5965befc0e6d5225a1a3b416e09","compiler-rt/test/tsan/thread_leak4.c":"36eba65b6b109c9627467cdffa8a78e6c01a7b4c624f26c693c7dc2d61aa0412","compiler-rt/test/tsan/thread_leak5.c":"287d214db1e4eb4eeaf1360897d2bc231e4915c2f6a240d0fce190b1d9650133","compiler-rt/test/tsan/thread_name.cc":"76b9a29051a202ecd68d28a04332f9361f4a451ce350b9f07d0fb4dd1687e111","compiler-rt/test/tsan/thread_name2.cc":"dd97bda9492557cffe1679b4e3164d088255ca2c21867ad0987e4045c99c7f0a","compiler-rt/test/tsan/tiny_race.c":"37751927e7209e2492ff9388bb7f91c18843264b0b675d5e8541dce65730663a","compiler-rt/test/tsan/tls_race.cc":"8a29cec3dfa9b3319671761a058c9aacbe449da0e155a4b34865f7c1a15a4b09","compiler-rt/test/tsan/tls_race2.cc":"d06f425d13779ce28c7f2e6c66f8c07d5eed4a4bcb8d9b543c99e01162391448","compiler-rt/test/tsan/tsan-vs-gvn.cc":"27facc1950f59583de9e9bd25f1cb2e43b3b9a614ab3a493318b9c997fc82a41","compiler-rt/test/tsan/unaligned_norace.cc":"731d4c8b97218aec7efcfdd80736d3261ba40de189a7b4aea4612f0cb9114627","compiler-rt/test/tsan/unaligned_race.cc":"df302db7274dada25761e788a0f57493c0da343d9d5d6d471d1e50a82143779f","compiler-rt/test/tsan/vfork.cc":"0b8d07448e5ba24d4a5e57ee09af7c34708177b017b9fe6e288beccc5545de75","compiler-rt/test/tsan/virtual_inheritance_compile_bug.cc":"d09c8c50a34cd86148ccf5672aa8a9526d259b8f8445ec06885fe267edab0323","compiler-rt/test/tsan/vptr_benign_race.cc":"e402951a8e0628f6edaee78d0948198c0563f2edcf2e3eaa59640ac3865acff4","compiler-rt/test/tsan/vptr_harmful_race.cc":"a722abf6e9855ea9cd0a45d52b786a9e6bbd38f776244dfee2126e6fb72711d5","compiler-rt/test/tsan/vptr_harmful_race2.cc":"60e30437f1a30cf9c25b3f10cc808aab36ee83130b998059b12d7d901e052547","compiler-rt/test/tsan/vptr_harmful_race3.cc":"a699d893499cc009b9787aa2dce5eba390b2a625ba666c59603cc464409ca05e","compiler-rt/test/tsan/vptr_harmful_race4.cc":"7717cb321a45c916b9c701962f611254937504d72a4e45f6192a0ca44fdbf9d4","compiler-rt/test/tsan/write_in_reader_lock.cc":"a04b77d2e244a6d6da4d19f61e783cbb61eb65fcf6b536ffbed059a9bdd2e3f9","compiler-rt/test/ubsan/CMakeLists.txt":"d061d55183c9eebf4b4d4e9dedd23be201ffddfd60f16aff2254217d3d5e3662","compiler-rt/test/ubsan/TestCases/Float/cast-overflow.cpp":"f73c9992db68f1700ed12bfae2c8797106ec3cebdb3415da40b6112dc7cce4d6","compiler-rt/test/ubsan/TestCases/ImplicitConversion/integer-arithmetic-value-change.c":"240fc561fef838b9701d5f766ed8aea071b101d0ec143272c56c2de3e516c864","compiler-rt/test/ubsan/TestCases/ImplicitConversion/integer-conversion.c":"e3540a628ad3ab3af207ab61bea69444eec4fee7efc3c52081b41a8f1d935626","compiler-rt/test/ubsan/TestCases/ImplicitConversion/integer-sign-change-blacklist.c":"f594bd200de7b8b7ea9875e165d28ebe7e68dbb97dba4d1629dead24edd524b6","compiler-rt/test/ubsan/TestCases/ImplicitConversion/integer-sign-change-summary.cpp":"c760841dc07d47140fe2016a5a4de5f1943618915fff0321ba64a4766271eaf0","compiler-rt/test/ubsan/TestCases/ImplicitConversion/integer-sign-change.c":"51f12f146f215a61478468b718a12baf6504a83429bc91b17d834039444627ba","compiler-rt/test/ubsan/TestCases/ImplicitConversion/integer-truncation.c":"27e511c5c792224fe7b15f2d8a80c080c1503e7c2113261ab217d8beab96408b","compiler-rt/test/ubsan/TestCases/ImplicitConversion/signed-integer-truncation-blacklist.c":"b26898b00f1e4fe6c5ad49fbeff1d5aef59457383a14ddb75625e327704ab508","compiler-rt/test/ubsan/TestCases/ImplicitConversion/signed-integer-truncation-or-sign-change-blacklist.c":"ae9369b2656b12eba7537038f64955d39864dcef1f48d45f65e46ed8614ec1f5","compiler-rt/test/ubsan/TestCases/ImplicitConversion/signed-integer-truncation-or-sign-change-summary.cpp":"27b3e0fdfe6886aa1770fbe3db6fec1ec8210672bef474a44fffe41a1735aff3","compiler-rt/test/ubsan/TestCases/ImplicitConversion/signed-integer-truncation-summary.cpp":"0c7b55bd1501572da8c0dd681b65cf414c8ae3a1479af831892bece5bd0a8d0e","compiler-rt/test/ubsan/TestCases/ImplicitConversion/signed-integer-truncation.c":"670d40a09433319d1b1f1986de0b86066c393e857991889787d21253dfc85342","compiler-rt/test/ubsan/TestCases/ImplicitConversion/unsigned-integer-truncation-blacklist.c":"7b41aa567314f002f740af0f6fbd7f142b9223ed03a5a28a46ad6608f1c9b059","compiler-rt/test/ubsan/TestCases/ImplicitConversion/unsigned-integer-truncation-summary.cpp":"1d9de0240df10096476893e1dc548a7faaafc0968be638908c4e377a5da8632b","compiler-rt/test/ubsan/TestCases/ImplicitConversion/unsigned-integer-truncation.c":"8ab669bfa5aaff970484263abeadbd7eb3ed900128f72110cc6ffa94764c7b9c","compiler-rt/test/ubsan/TestCases/Integer/add-overflow.cpp":"37263d3e6158d598f35ea4742fb0e9d9fca17e0b9634c8a2d1c6d2b76506be94","compiler-rt/test/ubsan/TestCases/Integer/div-overflow.cpp":"612e4dfbf9f42900d3b5d358a700540a885b610cbd279a49e857015398d8eb30","compiler-rt/test/ubsan/TestCases/Integer/div-zero.cpp":"879e86d3000bb9e4d1652485528f49853da149b984b2ade388d6808c1fa54aa3","compiler-rt/test/ubsan/TestCases/Integer/incdec-overflow.cpp":"b7fa14502d87a011563fddffed7d69d491a0d45c76b61e7982e147f6047f27c0","compiler-rt/test/ubsan/TestCases/Integer/mul-overflow.cpp":"6b6b2815cb7dd8c1922a20b0568b26c25e2aa621a03d4ab0d46dbdf530f9ad17","compiler-rt/test/ubsan/TestCases/Integer/negate-overflow.cpp":"298ecc7fb9f7c07d98c8582db1688f2b51f1fa2ec3e7c3a0fe0a4294a163f4b0","compiler-rt/test/ubsan/TestCases/Integer/no-recover.cpp":"4d22868348ed6e649f3a8292538c29587b3b9e57c7801c4abd257368cafe704c","compiler-rt/test/ubsan/TestCases/Integer/shift.cpp":"322f1f230c8d93e5df4ff288d3cb1101a0e90120fdf678ed2a8f7f4b1b87ab3d","compiler-rt/test/ubsan/TestCases/Integer/sub-overflow.cpp":"52a0745f8e627cb57e29bb5f6dad0ee8f60814a97c1efa42b6ae85bae44fa27e","compiler-rt/test/ubsan/TestCases/Integer/summary.cpp":"3001c501dc4d18d2555ee6d473a32e0c79355ab3b5278660b7544b26eb5ad93a","compiler-rt/test/ubsan/TestCases/Integer/suppressions.cpp":"efa652762afcfaaa88daa6b50bd5390cc88035b156c9c6d44e0bd7604c83fd65","compiler-rt/test/ubsan/TestCases/Integer/uadd-overflow.cpp":"8744e7bf682221fb92b8e1c5f4135878ccedffcf21b5dca8dcc3468d345ac7bc","compiler-rt/test/ubsan/TestCases/Integer/uincdec-overflow.cpp":"a318d41fc567dc1facfa1f62df4be594070cfae47b628ba3dcae8508f66a2089","compiler-rt/test/ubsan/TestCases/Integer/umul-overflow.cpp":"046c8ff0d2b85c8b756d79cc67f9a2608f55cd6d2f1306c9c459210e26f7520d","compiler-rt/test/ubsan/TestCases/Integer/usub-overflow.cpp":"66d2858d03f95ccc7983caa88ebbe9d773c18c86d071ee42d5936dfa794efb2a","compiler-rt/test/ubsan/TestCases/Misc/Inputs/no-interception-dso.c":"e053d840579744f96095e31b2d8e01463264062c32862f6917a6f2fd39fe49b1","compiler-rt/test/ubsan/TestCases/Misc/Inputs/returns-unexpectedly.c":"ed7a66e18e6231a62d4d15b5ce106055266484956683fc19459e252c99e6d0ca","compiler-rt/test/ubsan/TestCases/Misc/Linux/lit.local.cfg":"752f9f465d546875972dbfeb1fce9b5ecdfa3ab1d0b6b756efb1047f93298b01","compiler-rt/test/ubsan/TestCases/Misc/Linux/print_stack_trace.cc":"eebb14444ce328f45a0ca2211968ded1c1ab262b9faf3ab951ddc151c917cc1a","compiler-rt/test/ubsan/TestCases/Misc/Linux/ubsan_options.cc":"1ec048c8723ab1f304a8833a15eca6dd07e0181e7ad7cd4e92abd9abf3066be7","compiler-rt/test/ubsan/TestCases/Misc/bool.cpp":"63d2a4b9b96317473ce0b960583faad86e070d42459715c7755ae2d14e34eb01","compiler-rt/test/ubsan/TestCases/Misc/bool.m":"a8f80794d6a7c9c88573908de6a19a8e1717e08e0a6197efa25b3abc7baa5891","compiler-rt/test/ubsan/TestCases/Misc/bounds.cpp":"cf1f0aace595e3a19c3ffb297006d877bd0facda072135169397b4578b84c63c","compiler-rt/test/ubsan/TestCases/Misc/builtins.cpp":"4a7c197e70db16049fa3aa61dc215664a3e46013ff408ee7ac0b2c6fead6ac91","compiler-rt/test/ubsan/TestCases/Misc/coverage-levels.cc":"b4e86914f9f80270bd17fab88621c46bd3e124d4367ca8684176b123c108892a","compiler-rt/test/ubsan/TestCases/Misc/deduplication.cpp":"058b98ae359075b670aaca7ac071dcea9d8e77fc1a335a0c2f615e60d2224f4e","compiler-rt/test/ubsan/TestCases/Misc/enum.cpp":"0ada8a7edfd60409bdc30508f473fdaebdce298570d4d436f30467017aa5e5c3","compiler-rt/test/ubsan/TestCases/Misc/log-path_test.cc":"c83c0670f5fc809b6998f5c996c46d096e9182e9ce7bd18b69baadb9ef291177","compiler-rt/test/ubsan/TestCases/Misc/missing_return.cpp":"d30520114eeb0b3eba66126c64f2e59601d9f696b4e1325f7edf816a0ceee662","compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp":"329c014e923654e17724cda88f2b963d569c688939001fc0b160dbbee544dad6","compiler-rt/test/ubsan/TestCases/Misc/no-interception.cpp":"a1e8465e1864ed48ebf2e244f1639bb9b9d9622ef116ab6291726a6527ab2457","compiler-rt/test/ubsan/TestCases/Misc/nonnull-arg.cpp":"65a26ddb1c1bd61c36df41a749dc0ae718570df44231f55b9bf23a1bee1a7d8f","compiler-rt/test/ubsan/TestCases/Misc/nonnull.cpp":"47728e040a01de78bf5a82d1056fbb9110d0450fa5b1058154a53f3cbde91c7e","compiler-rt/test/ubsan/TestCases/Misc/nullability.c":"4c99384afdbad13564eb954ab6e6904d07dd04fc1e4b724d5a7f7aa6af0bfbeb","compiler-rt/test/ubsan/TestCases/Misc/unreachable.cpp":"4ca5c5a21e564d37f707c98eb256068dd840df8c89f7f69ba1866982b8251608","compiler-rt/test/ubsan/TestCases/Misc/vla.c":"9a2fa477c70673c0b43cb5ed729cb68a931c3b644cb30fa4a7cc9fe70c4312b1","compiler-rt/test/ubsan/TestCases/Pointer/alignment-assumption-attribute-align_value-on-lvalue.cpp":"3210283878fa243e3dbd08239ddecdd0fb87814852b67e8c45968361bc6e7b44","compiler-rt/test/ubsan/TestCases/Pointer/alignment-assumption-attribute-align_value-on-paramvar.cpp":"e671d60a27eb25c22c5d78a522fd8234385d3c58fc695caa71b5146b9c46710c","compiler-rt/test/ubsan/TestCases/Pointer/alignment-assumption-attribute-alloc_align-on-function-variable.cpp":"2451723827d3f99e9223c5ce2e0edc2a527e78ce741cf711ae7c15fc57e919db","compiler-rt/test/ubsan/TestCases/Pointer/alignment-assumption-attribute-alloc_align-on-function.cpp":"1d133cdd0d634c2632a67c043e01efddfc0a3c1c4a35212a0cf91b92035f4c15","compiler-rt/test/ubsan/TestCases/Pointer/alignment-assumption-attribute-assume_aligned-on-function-two-params.cpp":"ed51483a43dabec8e8e5631e2e6f0660023668b7c511c3b00b44a44ecf19610f","compiler-rt/test/ubsan/TestCases/Pointer/alignment-assumption-attribute-assume_aligned-on-function.cpp":"84c6a9e04b278232a07f14dada0d5164d3359439276ee64f441a0583c98fd03d","compiler-rt/test/ubsan/TestCases/Pointer/alignment-assumption-blacklist.cpp":"049e7999300e4d8956ca1cef1924618d38368cd56b75c7ca74060719840b20b8","compiler-rt/test/ubsan/TestCases/Pointer/alignment-assumption-builtin_assume_aligned-three-params-variable.cpp":"b4c9f9b9964cc3a3dbfefb4450e2f5a42c293fd0c5a6ce6917e4a2077057f895","compiler-rt/test/ubsan/TestCases/Pointer/alignment-assumption-builtin_assume_aligned-three-params.cpp":"e6eb585a8ad76cb181e5362085a1ef64386db3fbf7d145868e30839a6dadf803","compiler-rt/test/ubsan/TestCases/Pointer/alignment-assumption-builtin_assume_aligned-two-params.cpp":"b70a1e442d3f0481fc4c7f6881d13bd4d03541181ca0380ffdf954a1cd6c73dc","compiler-rt/test/ubsan/TestCases/Pointer/alignment-assumption-openmp.cpp":"078adcbdac73014c41c87775360f22e2ee48f71ca22612c0a01e44d2031b3cfb","compiler-rt/test/ubsan/TestCases/Pointer/alignment-assumption-summary.cpp":"0c23d5dcc21d63d7e6241c6a23acf6f73d971438c5a7bc83a718ba7a04029837","compiler-rt/test/ubsan/TestCases/Pointer/index-overflow.cpp":"c6cf0d9d96b3240194a1e2babbac3264e8cc8953189d08f545a823b4590adedb","compiler-rt/test/ubsan/TestCases/Pointer/unsigned-index-expression.cpp":"3ddee39a35b841fcca6b554fde2072c6476bb53c350145fcac4a91a4205a6212","compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp":"95a1b8c8c2ec76971e9cadc2423e945d128ac5802b199043c7b124154cb4d2fd","compiler-rt/test/ubsan/TestCases/TypeCheck/Function/lit.local.cfg":"2b46b9c55abeed861805be813af9e8b19767c15ca6d90de849455193d0293bd1","compiler-rt/test/ubsan/TestCases/TypeCheck/Linux/PR33221.cpp":"a5a7f717443f28b41e6a572610bb547e2aad152f692918f53e3dfaf7a09e7571","compiler-rt/test/ubsan/TestCases/TypeCheck/Linux/lit.local.cfg":"752f9f465d546875972dbfeb1fce9b5ecdfa3ab1d0b6b756efb1047f93298b01","compiler-rt/test/ubsan/TestCases/TypeCheck/PR33221.cpp":"00e344c30354a3fe59bef63814380f85c110ed5c93c1b789828013f4de6b493f","compiler-rt/test/ubsan/TestCases/TypeCheck/misaligned.cpp":"db4d0a781704b97c07845c5fff0b36c963e526317c266cd9bfa3daa0258c3f2f","compiler-rt/test/ubsan/TestCases/TypeCheck/null.cpp":"cd15b9ccfe01c14868f741743cdb2c28f3893e66759f3048ee92bfe8c70f3de7","compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-corrupted-vtable-itanium.cpp":"c2c521fde9c688f7891e48b579b3354fdfb2354c4fb9c8497e922dc7654705c2","compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp":"ac6451cb4b8447da4aa6608be02004a1bc71577125cca62a47a9bf363284da35","compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base-construction.cpp":"cc371b973337af98d3fe34d92dc5010c2ecdf2346012c319d53023d0557a0b29","compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp":"7350ce1fdb7001a33de9077569d854d6db3ba573d41f7d0cf03f8b27c4a9ed11","compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp":"7cf9d8583d1cadfcdc414fe2654c7038a1b7d246e6bc7cdb3501eaadab62e304","compiler-rt/test/ubsan/lit.common.cfg":"4d0594ae78f89ba5de67f15b5f7102f4d41058278c498fcc799d93212d37ae4d","compiler-rt/test/ubsan/lit.site.cfg.in":"976e50ba8f892f880aa8809e5f3c16ace645a12357493dfbfb74731b37039a98","compiler-rt/test/ubsan_minimal/CMakeLists.txt":"9085d3a81c0e084fc5df31d4c12bd88f7744535178a3ac07dee7b203c08be4f5","compiler-rt/test/ubsan_minimal/TestCases/alignment-assumption.c":"b0797d1dc75868ba081df31c5ec56732c76fd5468dbc3d4057426c36cc5de482","compiler-rt/test/ubsan_minimal/TestCases/implicit-integer-sign-change.c":"fbe0c9ded3594c18053fb07ebc50a1f7fd5d5f485d08cbb92533049d7368946d","compiler-rt/test/ubsan_minimal/TestCases/implicit-signed-integer-truncation-or-sign-change.c":"14a40cace354bd80be6cf3a416b943558816208037d40b5767c834ed391d20b3","compiler-rt/test/ubsan_minimal/TestCases/implicit-signed-integer-truncation.c":"b894f449d0eafafb06a2f02b324aaa6c5e24e688d4e95a2211f56a9bc6b50d0e","compiler-rt/test/ubsan_minimal/TestCases/implicit-unsigned-integer-truncation.c":"24e329b4a1ab4022edfe0a23a9f4d2c79febe269eb8f5256c60882d9a0d98d22","compiler-rt/test/ubsan_minimal/TestCases/recover-dedup-limit.cpp":"83ece559f0ced548620500e413e01446e56566cf3337c1d3c889c264fa9f90c6","compiler-rt/test/ubsan_minimal/TestCases/recover-dedup.cpp":"9273a9cbc6296d063a09cd6e0f10357fe750bf3d1e99edda2cfea4cb13d77a3d","compiler-rt/test/ubsan_minimal/TestCases/test-darwin-interface.c":"f434acc257b28e38613d6281f3492f7002e23f6e4d85e559902be9d8b2061dfb","compiler-rt/test/ubsan_minimal/TestCases/uadd-overflow.cpp":"4b17af6af189bf8f9a30c49ca0d3444cdef77f68e1fbcdc1f566013928ba0871","compiler-rt/test/ubsan_minimal/lit.common.cfg":"c22d1754aa879372ff17ab89e80a09932adb7a18f528612b250e196d28c257ee","compiler-rt/test/ubsan_minimal/lit.site.cfg.in":"edeb6e782933772951bdc5d6a7ec77f3ff49872d4ce54d7764c73e15852926e7","compiler-rt/test/xray/CMakeLists.txt":"6525b80bce3e33c1c1964e5d3ed7afd952b3a2e9e5812dbe08aff9ecaf47a479","compiler-rt/test/xray/TestCases/Posix/always-never-instrument.cc":"f65f5102bb8248210ed520d8f65f72094285f2485ecae26e1dd019eb4cec806e","compiler-rt/test/xray/TestCases/Posix/arg1-arg0-logging.cc":"d6a3b25042d3951d6f0771526d4260d9b4fe02c0ea1dd10d7277e703b7b21afd","compiler-rt/test/xray/TestCases/Posix/arg1-logger.cc":"59da4b4a4634401659f1385cce59966f1fb55bdbb977c0dc65305016d51ad43b","compiler-rt/test/xray/TestCases/Posix/arg1-logging-implicit-this.cc":"b042b2c5089e4ebfe73c37ba20bce62a4d6e0d35c242ba525b2d6db316648d4e","compiler-rt/test/xray/TestCases/Posix/argv0-log-file-name.cc":"25ea0535a0f692048210dcd2da7bc4d0a2f970f47b3d7af54a020f4bb3b6dadc","compiler-rt/test/xray/TestCases/Posix/basic-filtering.cc":"388ce13bf1f63bd0cdd82910151c08a4b4aab43bdb692e394c5fa9070bd85173","compiler-rt/test/xray/TestCases/Posix/c-test.cc":"be2ed26ea88008f3befe42279eba1e9b1898214ecff801d98f5816443e06fefa","compiler-rt/test/xray/TestCases/Posix/clang-no-xray-instrument.cc":"0781d59c9668d04f36621e609e3f5d4300046e93daa3d77357ddd2a892e44d4f","compiler-rt/test/xray/TestCases/Posix/common-trampoline-alignment.cc":"4fd661f289dfa2e434ae62f6a35cfa1429976e217faa0820cad3b8d60cd656ba","compiler-rt/test/xray/TestCases/Posix/coverage-sample.cc":"6541ef3dc61ac564b72c1ea04812c0d11531c9f4bec584905fadcefa1a58d723","compiler-rt/test/xray/TestCases/Posix/custom-event-handler-alignment.cc":"9acb1496f91a37d50814ad6df1cd1d1556a0510723bd73a6f37317b690746523","compiler-rt/test/xray/TestCases/Posix/custom-event-logging.cc":"8d160c048a721d6331bb9c4b4aee97ebf848ad982104d0c0931f582c58dbff98","compiler-rt/test/xray/TestCases/Posix/fdr-mode-inmemory.cc":"9c7055b8ffded304258fa9df10af7fda26ac4c9aa31b4afbb15f5db20cc0767d","compiler-rt/test/xray/TestCases/Posix/fdr-mode-multiple.cc":"a4062781f1ac3b9cde6be78e09639805023344aeda6caa717ca0c7c5746a736f","compiler-rt/test/xray/TestCases/Posix/fdr-mode.cc":"25fbf4c745c98fb3a31b70121b854e5a06a166542c84b175eac6e4f2c7814f4f","compiler-rt/test/xray/TestCases/Posix/fdr-reinit.cc":"dc6352f202478bfc6f7b3c092d92100304c4efa4f7daf18eef72cb13901437da","compiler-rt/test/xray/TestCases/Posix/fdr-single-thread.cc":"7b2717b3f9abbabe5c2079a03db33160cd32866683960db0aa121e441c47beb6","compiler-rt/test/xray/TestCases/Posix/fdr-thread-order.cc":"5d996d29bc01d84175ccca0e9115a5867fb5888930cd87fd5f4df698a1248175","compiler-rt/test/xray/TestCases/Posix/fixedsize-logging.cc":"ebb97a4c96d15ec64eb985457f6c204d9fee8bb41e11af848ea43c8e4d9ed45e","compiler-rt/test/xray/TestCases/Posix/fork_basic_logging.cc":"24271487ccd3cabe807659af7ecc5dc5ffda41ac5645cc2942885ec11c4fbf99","compiler-rt/test/xray/TestCases/Posix/func-id-utils.cc":"39b86d15e793f638914a1330c17d0d9bc38664b8fdef30a01f1e117a72661d4b","compiler-rt/test/xray/TestCases/Posix/logging-modes.cc":"fad5ee2af9cef19cd1c41a97447d4f06771eb3108b602627d5db2211c923af70","compiler-rt/test/xray/TestCases/Posix/optional-inmemory-log.cc":"c367b4734b3bdfb957ed01915b06fa7e491d778b4c5146d2c5a6512fd3226cbf","compiler-rt/test/xray/TestCases/Posix/patching-unpatching.cc":"c727ece8c0343c6100b762a30a8e11dc5bbf2bec9ef09a583d0bd174697376cd","compiler-rt/test/xray/TestCases/Posix/pic_test.cc":"7cf321b44036cad796a96a120c91315b95b0e53299599756b6bd65577d9863cd","compiler-rt/test/xray/TestCases/Posix/profiling-multi-threaded.cc":"6d6149406e9de2b21076d902c0c10f65dda105844c1edc5376d61f0cdb389f1f","compiler-rt/test/xray/TestCases/Posix/profiling-single-threaded.cc":"572d9a304885d2523fb166a7bf2ea7521374a7d1a855b65046c3ec6c5d3c448b","compiler-rt/test/xray/TestCases/Posix/quiet-start.cc":"f8fa4017095b814459d9b3dab2e87506be2b5505c0da64256259e82270072310","compiler-rt/test/xray/Unit/lit.site.cfg.in":"168842960de61e4f86191f05b7cefd638a0c235b7d22c45c727c6d4bd24ac63f","compiler-rt/test/xray/lit.cfg":"3bf1911511b63b3a3b70b34cf8f4efd5e25b74949b988c6f919bc61716855a38","compiler-rt/test/xray/lit.site.cfg.in":"05bef68d57b3760b9fe330ef702fcc799723a6e6b32109999aba6ee4ce1c6963","compiler-rt/unittests/CMakeLists.txt":"b38b1944f0444e7652cb2cb08f0222f9752387dd342fcd0491ee193f5d15ed8d","compiler-rt/unittests/lit.common.unit.cfg":"7b216d266fcf44d7e3370830cfa9d5040e99f6eb398f8f155da3a27bbf6a734f","compiler-rt/unittests/lit.common.unit.configured.in":"883c660273a7e120cbf511b2735da58e1ed0a93b952fb61f11ddd353b51860ba","compiler-rt/unittests/lit_unittest_cfg_utils.py":"011e4baada3839f3b0ac9bf81f8b2a9e2edb70ac65b2dcb04b7181758d093a48","compiler-rt/utils/generate_netbsd_ioctls.awk":"ee2c846f7e217b976e621e3625ea217d423b978975df369f9faeb1361cd72e56","compiler-rt/utils/generate_netbsd_syscalls.awk":"01bb546309f3bfa69fe6402333761648c9aeaebd1dd35dd2ebdcecbb0b1e6432","compiler-rt/www/content.css":"e81046dcfa9744f316a13dce738639734d3407efd66b067ab6e17c554ec772e4","compiler-rt/www/index.html":"6ff9e67b6cdb8c2e48d1127162fd68c078b26b9a63546d37a4841fcf9b7ac601","compiler-rt/www/menu.css":"0fbb4e518187e1b08def50f199ad8dca437577b1a37c5280c9876159be37764d","compiler-rt/www/menu.html.incl":"924777e8c3fc3f1caa3f3d16310531d5a4ef77963fa2bd6f658db541cc511389","examples/intrinsics.rs":"9a4c7f3dbe6e45d019430fe28f81ff1a8390a15cf2e4e7a577368b188e5ff818","libm/src/math/acos.rs":"16d25a552b3cc8a2dc9ef4e75fd30fdd21d1eb4f21eca97785da784d9bbe9428","libm/src/math/acosf.rs":"478e4eb5c6a52ddcf002f3a7552866b531cec0fe22787836fe06fe858a64a9bd","libm/src/math/asin.rs":"67b99309f0ea889f42251a4370517fe9da899d60cb8fec61d3466af3e0d1492d","libm/src/math/asinf.rs":"c2e050155d9b82fc66553f526a5362d5ea739af35dd5deef76d68e0d4a11fcd0","libm/src/math/atan.rs":"b9323acb786e5b0b2df25a24bac46538755b87543504526db787e6c7163ae691","libm/src/math/atan2.rs":"a5820178899131da4e29ac32c4efca279a49e32289156564c42611fc475d99b6","libm/src/math/atan2f.rs":"0e1ffe0dffd8fad77c89cd88bdcee3a4ab0a1708436c799782ae863ccf98b6df","libm/src/math/atanf.rs":"06055990ea52e3a6a9aa0408d581b27f03207b3f4f09d77554435cd5c331d7a2","libm/src/math/cbrt.rs":"00a879534ae25c3c4d569d96260b5a58cf4d4ad2e434e933c6ebda5bc3ad044f","libm/src/math/cbrtf.rs":"88d92683c2e08e2f3a91d74383f204e8535e62c73154db25398dcc0c400e29d9","libm/src/math/ceil.rs":"031974e85740235a7b1de5ecb80ffbaa4207026274f853e4012e8ab8b5884150","libm/src/math/ceilf.rs":"92fa4665d9cb762d55ca0946e5b660b83b33d71eaee5378bd852a722cbd2a0aa","libm/src/math/cos.rs":"a66010c2364f30da987637786d508cf2ac5980e68be1891321a6f352ac04c948","libm/src/math/cosf.rs":"73d7a9fa6afbc02add6819f119768bea7d55d88512fe5481c3459a35fe6d290b","libm/src/math/cosh.rs":"41f834c05b3b3c2947f899fd55094dbd341e8fcd18a6c61da16d5a665f601c4f","libm/src/math/coshf.rs":"d4bcd94a5501322f860eb114b3f30bf03a8636548861c658e14fea6bdef4c1e6","libm/src/math/exp.rs":"46cc9eaf16ffb74ab7da0ed7091dddc8f7fdb14a048eedbbb6725106a6bbb7b1","libm/src/math/exp2.rs":"b65cd206a423a81adff51b4bd83527f40d7dada671ab10fa7d7aa5ce74683a97","libm/src/math/exp2f.rs":"8c30d37c109065fd5edb2a601ddc7654e78a8fa9ee0f8855cf8cf694bb11e59d","libm/src/math/expf.rs":"39542b90dfefd9d810ceb8ea971376478fb6bf96963e079326b1b70e7f0e9128","libm/src/math/expm1.rs":"d521e0c066546d9e9cad4998ae9123d5d56b30b28494fb16911c43928d40b32e","libm/src/math/expm1f.rs":"b217f5b64e3a9a395c4a4ef12d333917f06fc2d95833c21be68f105338a99a4d","libm/src/math/expo2.rs":"5beefc7ffd67ccc02c28f5a4e4cda654edb31d703a3202362516a17c0be5fb5e","libm/src/math/fabs.rs":"dc288f31c1f7ccaa42a6d5b7ec11f4f28fbe9420aea2f4d660a0da7823f56d64","libm/src/math/fabsf.rs":"f670e6d55b66a4f48626eefd7c4bfd17d376fbb41e355a9e439d8384f88d374f","libm/src/math/fdim.rs":"a72ec8e2fb0fc8542e1afb12637e9635ad5c8b64df6d463609a5984a7091f389","libm/src/math/fdimf.rs":"b23a25c0111e3fc2461d4b6c3c568b6adfbf7dad4eedf75fd4507f6b97b90b23","libm/src/math/fenv.rs":"a8a835b195f880094bd9fb46762aef869e5f5925569ebbf71cceeafa2524a909","libm/src/math/floor.rs":"b7f12e84fd7803019f164ade7abb82df75f7d1c1ae072d88cc0a122afadb24b3","libm/src/math/floorf.rs":"7076796e7210840c1526679d4919ad9c154d991168c3092197bef7536eea68a3","libm/src/math/fma.rs":"ac360d09b6cf19ba21f38fa1163089f94b7073383472d1de2beb3c200f30ee59","libm/src/math/fmaf.rs":"e2afcb00f31d1cdea139f4ef52d441a4cf01b4bf5307a14fbbe5c5ccfacd4381","libm/src/math/fmod.rs":"6da52ca561920af80375ce5a09e62c530d6fbe019be8217f8ddf8bc698af6453","libm/src/math/fmodf.rs":"c74d242e15933a5b2d1ee8da289e5544a0d900147f43d0d78a4b4b00e686eed6","libm/src/math/hypot.rs":"8db4a26ff29fce64a3ca25ddc241822409e83a06ff76ff01aad61b489e34acee","libm/src/math/hypotf.rs":"09df5a9cb7550d472640eff949e111ce4d275c7874de3dccf370fff28a0896ec","libm/src/math/k_cos.rs":"cbe099b9b0f2d5eb1970dde26ddb0e6f4993a029693f48c5cf09ae6aa0e50029","libm/src/math/k_cosf.rs":"1d8b3175b929441b64ac7c81ceb8dd520808e9e3ea172d48b6d3b7cfe85b3f27","libm/src/math/k_expo2.rs":"ae0017a84086b93708888a93d294216843d419562cdfd8dd17a49a09ec4e5e05","libm/src/math/k_expo2f.rs":"6b0a5ed404cb42a9f40cfb72445f54f883dfdb4f5b28e43bda411b48e27cc717","libm/src/math/k_sin.rs":"bab9bc8968cfd02ae93412bf72fb82b9eb0246ae590901b6913c0e329d7494a1","libm/src/math/k_sinf.rs":"6145956f59c6aa55109eb3dd7b839358e063563742d07e18214bc3930ebf582c","libm/src/math/k_tan.rs":"5cbed440594d9f0f93743285acbe80a548533f40b8f9c4c2f6bd006907f9aebb","libm/src/math/k_tanf.rs":"aa90fe349223bcf789144a2785cc4e7996a7df1bd1498c0db7ca7264138f377e","libm/src/math/ldexp.rs":"ec4627b6b10d0bdba39cd3dc24cb4d72f6ed140db2da0b6447a0ebb159992ff2","libm/src/math/ldexpf.rs":"45eb23a0f93fbfa5b6cccf1a42ce18f25499a71ab5a93342cb10966901d011da","libm/src/math/log.rs":"f381301cf6adde3af15b153c5f8923cf955ec3470d2d510614028a033f7def60","libm/src/math/log10.rs":"b98abbb6255ef9ad3726876e62d75ecfdd6ca0d91374d3e1a4c7043460b6f64d","libm/src/math/log10f.rs":"6724ab87137c1014f7d6387e0b51c8abff759a8e90619de7ce4f8ef58931e47b","libm/src/math/log1p.rs":"bfca5da128fa12a862e7e0f0be27f9e04d1fe4a08f74016558ba91d49bcb125c","libm/src/math/log1pf.rs":"8a2bc51ccc89933df450b9a8aa8e2e137db217550720543a3ce309ac82d2bee7","libm/src/math/log2.rs":"252fc08c78b30e0a05ec305d5978a8badf1514d559d19cc9a200221c1014436e","libm/src/math/log2f.rs":"a7705e2a55398674b4ac211f04f92941f42b93c33e24a6712de7403d85bdd50a","libm/src/math/logf.rs":"6c042d2e5957b464ee5edfc2d14d5af9a8df817a170a67a0932ed4ca29010621","libm/src/math/mod.rs":"67d3b580bafa217f251b217fd7338fdae2c950f6a78b95d16ae794934aeb6ac6","libm/src/math/pow.rs":"9c80d74aee21e4a82ced3d329381ee5fd2e8ebd80d4f938bd5ca1cf76640dac3","libm/src/math/powf.rs":"70a8ef7924d39e0483a29916e83ccbbde8cae41fed3194a2836240e4c7b59916","libm/src/math/rem_pio2.rs":"47d87eefad8985020c01cbe608063e3b812712c185fc670793707efd90f8b29a","libm/src/math/rem_pio2_large.rs":"d5881a22ccea612e8ac171badb443722146e4d8d74a88c0032206faa276b0943","libm/src/math/rem_pio2f.rs":"78509324cf2699e7a7cabbf62a3eeea1b02926abe50f41047572032cc8772735","libm/src/math/round.rs":"a8f541ace0d5cfa4f169d861fb971b82ef703071465e2aeacfac25799655bad7","libm/src/math/roundf.rs":"a873f25f6d1707c559a1b0641e12f52c6e9a96e3c3aafc09bb92c0642b557424","libm/src/math/scalbn.rs":"a96558226381e4491c7c8ca6c2566b268d4dfefb31bf2ba76b75dbfdbf9dfa01","libm/src/math/scalbnf.rs":"770c0bd1edb1d8f45f287f8c806bb07378c7b575a280df7eb5521e639df60274","libm/src/math/sin.rs":"5162f444115853fb12f6953a183e01028e0858f7c07225ebedca03d3b4c0318a","libm/src/math/sinf.rs":"57a7d233c5d6f400273ce50ea9a8a43384c3cccf5628c463c1bb7738d5940600","libm/src/math/sinh.rs":"cc42172da41b926f0c2ca8a5ce007404d2a065b240c82032aaf896ae1e850ebb","libm/src/math/sinhf.rs":"2fdb3863db18aa910b65f40392d0578b6234207b91e8b1c58c66410b99129e6b","libm/src/math/sqrt.rs":"cc8ff45b78b52f22e40d5b45ea5582eb41f14bafadc291dc0e24b780611272ee","libm/src/math/sqrtf.rs":"9580760c2d1c6ae76b55073da0fe56d0ebd398cb37385d4ec17f48ca7b0de73a","libm/src/math/tan.rs":"49524a388958b54c5bb9360bcbe1ab2a8656c4e172f481969df51fce51eaeedd","libm/src/math/tanf.rs":"9c416fe8e0e2e03cc61cfefc5d913e8523ce359909df499d2aa7f2cf79abbdca","libm/src/math/tanh.rs":"8fc5edf4669ba3bf35f9773ebcccca5c19868628971581217a5f9f95811489fb","libm/src/math/tanhf.rs":"a8367cbc5a43f6b00d77a07d2ef0a7e392ebfa46062a19b97901b7c993800dd4","libm/src/math/trunc.rs":"16cae799dc1c16c2eed92c9a194c89a6abc94adbd06e83630dafa7dad89abdec","libm/src/math/truncf.rs":"2302a045af823ac076102d5d0c11f985253f0eb32265855d7ee0d56ded75930e","src/arm.rs":"604c75ed883a5f27b2291375b215d92d20dfd2a48845f4ca516c6b5bdf0bcc36","src/arm_linux.rs":"80d18ce84bdfa841fa133f5ee9e9fd50167344436d2d398f74347a90f27606c6","src/float/add.rs":"1a230ed4e17148cfffb7c880929c9c0d5d48d85581d75164c5031b8f05a5d567","src/float/cmp.rs":"a86ccbc0e56f07ba439dc6a4fd835184645178c0a6da625bd4ae24ecf9a790f8","src/float/conv.rs":"0af148b6c717d124e870e5d1926eaa562de37e374c605ea81c1f7eea994146f4","src/float/div.rs":"58bdcd73c5ffafde9cca8a0e7986de0660fb8b5b4d4132e7a63dd21f93f4fe0e","src/float/extend.rs":"180b2e791c58e0526de0a798845c580ce3222c8a15c8665e6e6a4bf5cf1a34aa","src/float/mod.rs":"b6408cd776a6a363f3fe541213ebe0315d13d301f26b331de13e55f4044029e5","src/float/mul.rs":"9465960b326897a04543789aa44640aefeb4cc63311e58ae8213f664dd4ac21e","src/float/pow.rs":"64f4935f4bed46d3b9cde4d16f59cca76a110d36d02d76f4b909157349edf5e3","src/float/sub.rs":"c2a87f4628f51d5d908d0f25b5d51ce0599dc559d5a72b20e131261f484d5848","src/int/addsub.rs":"9583fdb7a11d6159e5fc0ec86773e4dd2626a8a34152ac932793f246f44547dd","src/int/mod.rs":"021d95719bfc396d5431ae309ef6f484d8612152d4586f022cd3c45af3af411b","src/int/mul.rs":"642cc076e1c926f3122b3833749e14676e7456652195067e91da56dcf156feeb","src/int/sdiv.rs":"4f8f5f0879ea94cadd4b9e0b2a755c6cfbc429ae49b69c293d2b3a43568e14d4","src/int/shift.rs":"93d7347d2566b0868e7533e98c1f7bbe5ad083a4834db7739bb698dc4c75efa2","src/int/udiv.rs":"6abe174c70e6fefed2106a040832bdf69e9fb3b3751c5cb2b8599059c3af13da","src/lib.rs":"f20e1785321b9200ee08e04f15fe8454d6528b79e091a4064e1d92a81ad2ecf2","src/macros.rs":"706242bac0c9bb14dd064c3c1167ebf71ab8c98fb4d38f2f9cc1e25418db8a0c","src/math.rs":"c0137e26295244fc6e99df3825218ccced1a97ba4f3b50f459796d1a80dc5b18","src/mem.rs":"5b94aebace56518af3076680886424ea26a27e7993df785e1724ae16d05f6a52","src/probestack.rs":"736f0d39ad9dcb89553787f7e816d644cd7f955fe2572b4d25bc318b4ad65bb3","src/riscv32.rs":"b9b433d248fce35e43a7df430697545f39898fad46be7d0197284764e44993b2","src/x86.rs":"cfae51814619da70fafa0ce912198e8d697e9337c76a7467baed2bb0cda388a9","src/x86_64.rs":"d6be9614a56cb5757b31d1371c37bf847dd4764cd13e1016850743a8d054b8e1"},"package":"e3f235c329e5cb9fa3d2ca2cc36256ba9a7f23fa76e0f4db6f68c23b73b2ac69"} \ No newline at end of file diff --git a/vendor/compiler_builtins/Cargo.toml b/vendor/compiler_builtins/Cargo.toml index fe25069135..3b44d1a839 100644 --- a/vendor/compiler_builtins/Cargo.toml +++ b/vendor/compiler_builtins/Cargo.toml @@ -12,7 +12,7 @@ [package] name = "compiler_builtins" -version = "0.1.9" +version = "0.1.14" authors = ["Jorge Aparicio "] links = "compiler-rt" include = ["/Cargo.toml", "/build.rs", "/src/*", "/examples/*", "/LICENSE.txt", "/README.md", "/compiler-rt/*", "/libm/src/math/*"] @@ -33,7 +33,7 @@ test = false [[example]] name = "intrinsics" -required-features = ["c", "compiler-builtins"] +required-features = ["compiler-builtins"] [dependencies.core] version = "1.0.0" optional = true @@ -49,4 +49,4 @@ default = ["compiler-builtins"] mangled-names = [] mem = [] no-lang-items = [] -rustc-dep-of-std = ["c", "compiler-builtins", "core"] +rustc-dep-of-std = ["compiler-builtins", "core"] diff --git a/vendor/compiler_builtins/README.md b/vendor/compiler_builtins/README.md index b290cbff88..f0724bffe1 100644 --- a/vendor/compiler_builtins/README.md +++ b/vendor/compiler_builtins/README.md @@ -1,6 +1,6 @@ # `compiler-builtins` -[![Build Status](https://dev.azure.com/rust-lang/compiler-builtins/_apis/build/status/compiler-builtins-CI?branchName=master)](https://dev.azure.com/rust-lang/compiler-builtins/_build/latest?definitionId=2&branchName=master) +[![Build Status](https://dev.azure.com/rust-lang/compiler-builtins/_apis/build/status/rust-lang-nursery.compiler-builtins?branchName=master)](https://dev.azure.com/rust-lang/compiler-builtins/_build/latest?definitionId=6&branchName=master) > Porting `compiler-rt` intrinsics to Rust diff --git a/vendor/compiler_builtins/build.rs b/vendor/compiler_builtins/build.rs index 835b423cd7..be5d42bb76 100644 --- a/vendor/compiler_builtins/build.rs +++ b/vendor/compiler_builtins/build.rs @@ -22,8 +22,9 @@ fn main() { // Forcibly enable memory intrinsics on wasm32 & SGX as we don't have a libc to // provide them. - if (target.contains("wasm32") && !target.contains("wasi")) || - (target.contains("sgx") && target.contains("fortanix")) { + if (target.contains("wasm32") && !target.contains("wasi")) + || (target.contains("sgx") && target.contains("fortanix")) + { println!("cargo:rustc-cfg=feature=\"mem\""); } @@ -37,11 +38,17 @@ fn main() { // build anything and we rely on the upstream implementation of compiler-rt // functions if !cfg!(feature = "mangled-names") && cfg!(feature = "c") { - // Don't use C compiler for bitcode-only wasm and nvptx - if !target.contains("wasm32") && !target.contains("nvptx") { + // Don't use a C compiler for these targets: + // + // * wasm32 - clang 8 for wasm is somewhat hard to come by and it's + // unlikely that the C is really that much better than our own Rust. + // * nvptx - everything is bitcode, not compatible with mixed C/Rust + // * riscv - the rust-lang/rust distribution container doesn't have a C + // compiler nor is cc-rs ready for compilation to riscv (at this + // time). This can probably be removed in the future + if !target.contains("wasm32") && !target.contains("nvptx") && !target.starts_with("riscv") { #[cfg(feature = "c")] c::compile(&llvm_target); - println!("cargo:rustc-cfg=use_c"); } } @@ -78,18 +85,19 @@ mod c { impl Sources { fn new() -> Sources { - Sources { map: BTreeMap::new() } + Sources { + map: BTreeMap::new(), + } } - fn extend(&mut self, sources: &[&'static str]) { + fn extend(&mut self, sources: &[(&'static str, &'static str)]) { // NOTE Some intrinsics have both a generic implementation (e.g. // `floatdidf.c`) and an arch optimized implementation // (`x86_64/floatdidf.c`). In those cases, we keep the arch optimized // implementation and discard the generic implementation. If we don't // and keep both implementations, the linker will yell at us about // duplicate symbols! - for &src in sources { - let symbol = Path::new(src).file_stem().unwrap().to_str().unwrap(); + for (symbol, src) in sources { if src.contains("/") { // Arch-optimized implementation (preferred) self.map.insert(symbol, src); @@ -144,305 +152,263 @@ mod c { } let mut sources = Sources::new(); - sources.extend( - &[ - "absvdi2.c", - "absvsi2.c", - "addvdi3.c", - "addvsi3.c", - "apple_versioning.c", - "clzdi2.c", - "clzsi2.c", - "cmpdi2.c", - "ctzdi2.c", - "ctzsi2.c", - "divdc3.c", - "divsc3.c", - "divxc3.c", - "extendhfsf2.c", - "int_util.c", - "muldc3.c", - "mulsc3.c", - "mulvdi3.c", - "mulvsi3.c", - "mulxc3.c", - "negdf2.c", - "negdi2.c", - "negsf2.c", - "negvdi2.c", - "negvsi2.c", - "paritydi2.c", - "paritysi2.c", - "popcountdi2.c", - "popcountsi2.c", - "powixf2.c", - "subvdi3.c", - "subvsi3.c", - "truncdfhf2.c", - "truncdfsf2.c", - "truncsfhf2.c", - "ucmpdi2.c", - ], - ); + sources.extend(&[ + ("__absvdi2", "absvdi2.c"), + ("__absvsi2", "absvsi2.c"), + ("__addvdi3", "addvdi3.c"), + ("__addvsi3", "addvsi3.c"), + ("apple_versioning", "apple_versioning.c"), + ("__clzdi2", "clzdi2.c"), + ("__clzsi2", "clzsi2.c"), + ("__cmpdi2", "cmpdi2.c"), + ("__ctzdi2", "ctzdi2.c"), + ("__ctzsi2", "ctzsi2.c"), + ("__divdc3", "divdc3.c"), + ("__divsc3", "divsc3.c"), + ("__divxc3", "divxc3.c"), + ("__extendhfsf2", "extendhfsf2.c"), + ("__int_util", "int_util.c"), + ("__muldc3", "muldc3.c"), + ("__mulsc3", "mulsc3.c"), + ("__mulvdi3", "mulvdi3.c"), + ("__mulvsi3", "mulvsi3.c"), + ("__mulxc3", "mulxc3.c"), + ("__negdf2", "negdf2.c"), + ("__negdi2", "negdi2.c"), + ("__negsf2", "negsf2.c"), + ("__negvdi2", "negvdi2.c"), + ("__negvsi2", "negvsi2.c"), + ("__paritydi2", "paritydi2.c"), + ("__paritysi2", "paritysi2.c"), + ("__popcountdi2", "popcountdi2.c"), + ("__popcountsi2", "popcountsi2.c"), + ("__powixf2", "powixf2.c"), + ("__subvdi3", "subvdi3.c"), + ("__subvsi3", "subvsi3.c"), + ("__truncdfhf2", "truncdfhf2.c"), + ("__truncdfsf2", "truncdfsf2.c"), + ("__truncsfhf2", "truncsfhf2.c"), + ("__ucmpdi2", "ucmpdi2.c"), + ]); // When compiling in rustbuild (the rust-lang/rust repo) this library // also needs to satisfy intrinsics that jemalloc or C in general may // need, so include a few more that aren't typically needed by // LLVM/Rust. if cfg!(feature = "rustbuild") { - sources.extend(&[ - "ffsdi2.c", - ]); + sources.extend(&[("__ffsdi2", "ffsdi2.c")]); } // On iOS and 32-bit OSX these are all just empty intrinsics, no need to // include them. if target_os != "ios" && (target_vendor != "apple" || target_arch != "x86") { - sources.extend( - &[ - "absvti2.c", - "addvti3.c", - "clzti2.c", - "cmpti2.c", - "ctzti2.c", - "ffsti2.c", - "mulvti3.c", - "negti2.c", - "negvti2.c", - "parityti2.c", - "popcountti2.c", - "subvti3.c", - "ucmpti2.c", - ], - ); + sources.extend(&[ + ("__absvti2", "absvti2.c"), + ("__addvti3", "addvti3.c"), + ("__clzti2", "clzti2.c"), + ("__cmpti2", "cmpti2.c"), + ("__ctzti2", "ctzti2.c"), + ("__ffsti2", "ffsti2.c"), + ("__mulvti3", "mulvti3.c"), + ("__negti2", "negti2.c"), + ("__negvti2", "negvti2.c"), + ("__parityti2", "parityti2.c"), + ("__popcountti2", "popcountti2.c"), + ("__subvti3", "subvti3.c"), + ("__ucmpti2", "ucmpti2.c"), + ]); } if target_vendor == "apple" { - sources.extend( - &[ - "atomic_flag_clear.c", - "atomic_flag_clear_explicit.c", - "atomic_flag_test_and_set.c", + sources.extend(&[ + ("atomic_flag_clear", "atomic_flag_clear.c"), + ("atomic_flag_clear_explicit", "atomic_flag_clear_explicit.c"), + ("atomic_flag_test_and_set", "atomic_flag_test_and_set.c"), + ( + "atomic_flag_test_and_set_explicit", "atomic_flag_test_and_set_explicit.c", - "atomic_signal_fence.c", - "atomic_thread_fence.c", - ], - ); + ), + ("atomic_signal_fence", "atomic_signal_fence.c"), + ("atomic_thread_fence", "atomic_thread_fence.c"), + ]); } if target_env == "msvc" { if target_arch == "x86_64" { - sources.extend( - &[ - "x86_64/floatdisf.c", - "x86_64/floatdixf.c", - ], - ); + sources.extend(&[ + ("__floatdisf", "x86_64/floatdisf.c"), + ("__floatdixf", "x86_64/floatdixf.c"), + ]); } } else { // None of these seem to be used on x86_64 windows, and they've all // got the wrong ABI anyway, so we want to avoid them. if target_os != "windows" { if target_arch == "x86_64" { - sources.extend( - &[ - "x86_64/floatdisf.c", - "x86_64/floatdixf.c", - "x86_64/floatundidf.S", - "x86_64/floatundisf.S", - "x86_64/floatundixf.S", - ], - ); + sources.extend(&[ + ("__floatdisf", "x86_64/floatdisf.c"), + ("__floatdixf", "x86_64/floatdixf.c"), + ("__floatundidf", "x86_64/floatundidf.S"), + ("__floatundisf", "x86_64/floatundisf.S"), + ("__floatundixf", "x86_64/floatundixf.S"), + ]); } } if target_arch == "x86" { - sources.extend( - &[ - "i386/ashldi3.S", - "i386/ashrdi3.S", - "i386/divdi3.S", - "i386/floatdidf.S", - "i386/floatdisf.S", - "i386/floatdixf.S", - "i386/floatundidf.S", - "i386/floatundisf.S", - "i386/floatundixf.S", - "i386/lshrdi3.S", - "i386/moddi3.S", - "i386/muldi3.S", - "i386/udivdi3.S", - "i386/umoddi3.S", - ], - ); + sources.extend(&[ + ("__ashldi3", "i386/ashldi3.S"), + ("__ashrdi3", "i386/ashrdi3.S"), + ("__divdi3", "i386/divdi3.S"), + ("__floatdidf", "i386/floatdidf.S"), + ("__floatdisf", "i386/floatdisf.S"), + ("__floatdixf", "i386/floatdixf.S"), + ("__floatundidf", "i386/floatundidf.S"), + ("__floatundisf", "i386/floatundisf.S"), + ("__floatundixf", "i386/floatundixf.S"), + ("__lshrdi3", "i386/lshrdi3.S"), + ("__moddi3", "i386/moddi3.S"), + ("__muldi3", "i386/muldi3.S"), + ("__udivdi3", "i386/udivdi3.S"), + ("__umoddi3", "i386/umoddi3.S"), + ]); } } if target_arch == "arm" && target_os != "ios" && target_env != "msvc" { - sources.extend( - &[ - "arm/aeabi_div0.c", - "arm/aeabi_drsub.c", - "arm/aeabi_frsub.c", - "arm/bswapdi2.S", - "arm/bswapsi2.S", - "arm/clzdi2.S", - "arm/clzsi2.S", - "arm/divmodsi4.S", - "arm/modsi3.S", - "arm/switch16.S", - "arm/switch32.S", - "arm/switch8.S", - "arm/switchu8.S", - "arm/sync_synchronize.S", - "arm/udivmodsi4.S", - "arm/umodsi3.S", - - // Exclude these two files for now even though we haven't - // translated their implementation into Rust yet (#173). - // They appear... buggy? The `udivsi3` implementation was - // the one that seemed buggy, but the `divsi3` file - // references a symbol from `udivsi3` so we compile them - // both with the Rust versions. - // - // Note that if these are added back they should be removed - // from thumbv6m below. - // - // "arm/divsi3.S", - // "arm/udivsi3.S", - ], - ); + sources.extend(&[ + ("__aeabi_div0", "arm/aeabi_div0.c"), + ("__aeabi_drsub", "arm/aeabi_drsub.c"), + ("__aeabi_frsub", "arm/aeabi_frsub.c"), + ("__bswapdi2", "arm/bswapdi2.S"), + ("__bswapsi2", "arm/bswapsi2.S"), + ("__clzdi2", "arm/clzdi2.S"), + ("__clzsi2", "arm/clzsi2.S"), + ("__divmodsi4", "arm/divmodsi4.S"), + ("__divsi3", "arm/divsi3.S"), + ("__modsi3", "arm/modsi3.S"), + ("__switch16", "arm/switch16.S"), + ("__switch32", "arm/switch32.S"), + ("__switch8", "arm/switch8.S"), + ("__switchu8", "arm/switchu8.S"), + ("__sync_synchronize", "arm/sync_synchronize.S"), + ("__udivmodsi4", "arm/udivmodsi4.S"), + ("__udivsi3", "arm/udivsi3.S"), + ("__umodsi3", "arm/umodsi3.S"), + ]); if target_os == "freebsd" { - sources.extend(&["clear_cache.c"]); + sources.extend(&[("__clear_cache", "clear_cache.c")]); } // First of all aeabi_cdcmp and aeabi_cfcmp are never called by LLVM. // Second are little-endian only, so build fail on big-endian targets. // Temporally workaround: exclude these files for big-endian targets. - if !llvm_target[0].starts_with("thumbeb") && - !llvm_target[0].starts_with("armeb") { - sources.extend( - &[ - "arm/aeabi_cdcmp.S", - "arm/aeabi_cdcmpeq_check_nan.c", - "arm/aeabi_cfcmp.S", - "arm/aeabi_cfcmpeq_check_nan.c", - ], - ); + if !llvm_target[0].starts_with("thumbeb") && !llvm_target[0].starts_with("armeb") { + sources.extend(&[ + ("__aeabi_cdcmp", "arm/aeabi_cdcmp.S"), + ("__aeabi_cdcmpeq_check_nan", "arm/aeabi_cdcmpeq_check_nan.c"), + ("__aeabi_cfcmp", "arm/aeabi_cfcmp.S"), + ("__aeabi_cfcmpeq_check_nan", "arm/aeabi_cfcmpeq_check_nan.c"), + ]); } } if llvm_target[0] == "armv7" { - sources.extend( - &[ - "arm/sync_fetch_and_add_4.S", - "arm/sync_fetch_and_add_8.S", - "arm/sync_fetch_and_and_4.S", - "arm/sync_fetch_and_and_8.S", - "arm/sync_fetch_and_max_4.S", - "arm/sync_fetch_and_max_8.S", - "arm/sync_fetch_and_min_4.S", - "arm/sync_fetch_and_min_8.S", - "arm/sync_fetch_and_nand_4.S", - "arm/sync_fetch_and_nand_8.S", - "arm/sync_fetch_and_or_4.S", - "arm/sync_fetch_and_or_8.S", - "arm/sync_fetch_and_sub_4.S", - "arm/sync_fetch_and_sub_8.S", - "arm/sync_fetch_and_umax_4.S", - "arm/sync_fetch_and_umax_8.S", - "arm/sync_fetch_and_umin_4.S", - "arm/sync_fetch_and_umin_8.S", - "arm/sync_fetch_and_xor_4.S", - "arm/sync_fetch_and_xor_8.S", - ], - ); + sources.extend(&[ + ("__sync_fetch_and_add_4", "arm/sync_fetch_and_add_4.S"), + ("__sync_fetch_and_add_8", "arm/sync_fetch_and_add_8.S"), + ("__sync_fetch_and_and_4", "arm/sync_fetch_and_and_4.S"), + ("__sync_fetch_and_and_8", "arm/sync_fetch_and_and_8.S"), + ("__sync_fetch_and_max_4", "arm/sync_fetch_and_max_4.S"), + ("__sync_fetch_and_max_8", "arm/sync_fetch_and_max_8.S"), + ("__sync_fetch_and_min_4", "arm/sync_fetch_and_min_4.S"), + ("__sync_fetch_and_min_8", "arm/sync_fetch_and_min_8.S"), + ("__sync_fetch_and_nand_4", "arm/sync_fetch_and_nand_4.S"), + ("__sync_fetch_and_nand_8", "arm/sync_fetch_and_nand_8.S"), + ("__sync_fetch_and_or_4", "arm/sync_fetch_and_or_4.S"), + ("__sync_fetch_and_or_8", "arm/sync_fetch_and_or_8.S"), + ("__sync_fetch_and_sub_4", "arm/sync_fetch_and_sub_4.S"), + ("__sync_fetch_and_sub_8", "arm/sync_fetch_and_sub_8.S"), + ("__sync_fetch_and_umax_4", "arm/sync_fetch_and_umax_4.S"), + ("__sync_fetch_and_umax_8", "arm/sync_fetch_and_umax_8.S"), + ("__sync_fetch_and_umin_4", "arm/sync_fetch_and_umin_4.S"), + ("__sync_fetch_and_umin_8", "arm/sync_fetch_and_umin_8.S"), + ("__sync_fetch_and_xor_4", "arm/sync_fetch_and_xor_4.S"), + ("__sync_fetch_and_xor_8", "arm/sync_fetch_and_xor_8.S"), + ]); } if llvm_target.last().unwrap().ends_with("eabihf") { - if !llvm_target[0].starts_with("thumbv7em") && - !llvm_target[0].starts_with("thumbv8m.main") { + if !llvm_target[0].starts_with("thumbv7em") + && !llvm_target[0].starts_with("thumbv8m.main") + { // The FPU option chosen for these architectures in cc-rs, ie: // -mfpu=fpv4-sp-d16 for thumbv7em // -mfpu=fpv5-sp-d16 for thumbv8m.main // do not support double precision floating points conversions so the files // that include such instructions are not included for these targets. - sources.extend( - &[ - "arm/fixdfsivfp.S", - "arm/fixunsdfsivfp.S", - "arm/floatsidfvfp.S", - "arm/floatunssidfvfp.S", - ], - ); + sources.extend(&[ + ("__fixdfsivfp", "arm/fixdfsivfp.S"), + ("__fixunsdfsivfp", "arm/fixunsdfsivfp.S"), + ("__floatsidfvfp", "arm/floatsidfvfp.S"), + ("__floatunssidfvfp", "arm/floatunssidfvfp.S"), + ]); } - sources.extend( - &[ - "arm/fixsfsivfp.S", - "arm/fixunssfsivfp.S", - "arm/floatsisfvfp.S", - "arm/floatunssisfvfp.S", - "arm/floatunssisfvfp.S", - "arm/restore_vfp_d8_d15_regs.S", - "arm/save_vfp_d8_d15_regs.S", - "arm/negdf2vfp.S", - "arm/negsf2vfp.S", - ] - ); - + sources.extend(&[ + ("__fixsfsivfp", "arm/fixsfsivfp.S"), + ("__fixunssfsivfp", "arm/fixunssfsivfp.S"), + ("__floatsisfvfp", "arm/floatsisfvfp.S"), + ("__floatunssisfvfp", "arm/floatunssisfvfp.S"), + ("__floatunssisfvfp", "arm/floatunssisfvfp.S"), + ("__restore_vfp_d8_d15_regs", "arm/restore_vfp_d8_d15_regs.S"), + ("__save_vfp_d8_d15_regs", "arm/save_vfp_d8_d15_regs.S"), + ("__negdf2vfp", "arm/negdf2vfp.S"), + ("__negsf2vfp", "arm/negsf2vfp.S"), + ]); } if target_arch == "aarch64" { - sources.extend( - &[ - "comparetf2.c", - "extenddftf2.c", - "extendsftf2.c", - "fixtfdi.c", - "fixtfsi.c", - "fixtfti.c", - "fixunstfdi.c", - "fixunstfsi.c", - "fixunstfti.c", - "floatditf.c", - "floatsitf.c", - "floatunditf.c", - "floatunsitf.c", - "trunctfdf2.c", - "trunctfsf2.c", - ], - ); + sources.extend(&[ + ("__comparetf2", "comparetf2.c"), + ("__extenddftf2", "extenddftf2.c"), + ("__extendsftf2", "extendsftf2.c"), + ("__fixtfdi", "fixtfdi.c"), + ("__fixtfsi", "fixtfsi.c"), + ("__fixtfti", "fixtfti.c"), + ("__fixunstfdi", "fixunstfdi.c"), + ("__fixunstfsi", "fixunstfsi.c"), + ("__fixunstfti", "fixunstfti.c"), + ("__floatditf", "floatditf.c"), + ("__floatsitf", "floatsitf.c"), + ("__floatunditf", "floatunditf.c"), + ("__floatunsitf", "floatunsitf.c"), + ("__trunctfdf2", "trunctfdf2.c"), + ("__trunctfsf2", "trunctfsf2.c"), + ]); if target_os != "windows" { - sources.extend(&["multc3.c"]); + sources.extend(&[("__multc3", "multc3.c")]); } } // Remove the assembly implementations that won't compile for the target if llvm_target[0] == "thumbv6m" || llvm_target[0] == "thumbv8m.base" { - sources.remove( - &[ - "clzdi2", - "clzsi2", - "divmodsi4", - "modsi3", - "switch16", - "switch32", - "switch8", - "switchu8", - "udivmodsi4", - "umodsi3", - ], - ); + let mut to_remove = Vec::new(); + for (k, v) in sources.map.iter() { + if v.ends_with(".S") { + to_remove.push(*k); + } + } + sources.remove(&to_remove); // But use some generic implementations where possible - sources.extend(&["clzdi2.c", "clzsi2.c"]) + sources.extend(&[("__clzdi2", "clzdi2.c"), ("__clzsi2", "clzsi2.c")]) } if llvm_target[0] == "thumbv7m" || llvm_target[0] == "thumbv7em" { - sources.remove(&["aeabi_cdcmp", "aeabi_cfcmp"]); + sources.remove(&["__aeabi_cdcmp", "__aeabi_cfcmp"]); } // When compiling in rustbuild (the rust-lang/rust repo) this build @@ -454,10 +420,11 @@ mod c { }; let src_dir = root.join("compiler-rt/lib/builtins"); - for src in sources.map.values() { + for (sym, src) in sources.map.iter() { let src = src_dir.join(src); cfg.file(&src); println!("cargo:rerun-if-changed={}", src.display()); + println!("cargo:rustc-cfg={}=\"optimized-c\"", sym); } cfg.compile("libcompiler-rt.a"); diff --git a/vendor/compiler_builtins/compiler-rt/CMakeLists.txt b/vendor/compiler_builtins/compiler-rt/CMakeLists.txt index 4697dba624..aa360a3ef3 100644 --- a/vendor/compiler_builtins/compiler-rt/CMakeLists.txt +++ b/vendor/compiler_builtins/compiler-rt/CMakeLists.txt @@ -200,7 +200,7 @@ set(CXXABIS none default libstdc++ libc++) set_property(CACHE SANITIZER_CXX_ABI PROPERTY STRINGS ;${CXXABIS}) if (SANITIZER_CXX_ABI STREQUAL "default") - if (APPLE) + if (APPLE OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") set(SANITIZER_CXX_ABI_LIBNAME "libc++") set(SANITIZER_CXX_ABI_SYSTEM 1) elseif (FUCHSIA) @@ -428,15 +428,19 @@ endif() add_subdirectory(include) -foreach(path IN ITEMS ${LLVM_MAIN_SRC_DIR}/projects/libcxx - ${LLVM_MAIN_SRC_DIR}/runtimes/libcxx - ${LLVM_MAIN_SRC_DIR}/../libcxx - ${LLVM_EXTERNAL_LIBCXX_SOURCE_DIR}) - if(IS_DIRECTORY ${path}) - set(COMPILER_RT_LIBCXX_PATH ${path}) - break() - endif() -endforeach() +option(COMPILER_RT_USE_LIBCXX + "Enable compiler-rt to use libc++ from the source tree" ON) +if(COMPILER_RT_USE_LIBCXX) + foreach(path IN ITEMS ${LLVM_MAIN_SRC_DIR}/projects/libcxx + ${LLVM_MAIN_SRC_DIR}/runtimes/libcxx + ${LLVM_MAIN_SRC_DIR}/../libcxx + ${LLVM_EXTERNAL_LIBCXX_SOURCE_DIR}) + if(IS_DIRECTORY ${path}) + set(COMPILER_RT_LIBCXX_PATH ${path}) + break() + endif() + endforeach() +endif() set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/tools/lld) if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_BUILD) diff --git a/vendor/compiler_builtins/compiler-rt/LICENSE.TXT b/vendor/compiler_builtins/compiler-rt/LICENSE.TXT index 0134694e4e..1c94ad5d89 100644 --- a/vendor/compiler_builtins/compiler-rt/LICENSE.TXT +++ b/vendor/compiler_builtins/compiler-rt/LICENSE.TXT @@ -14,7 +14,7 @@ Full text of the relevant licenses is included below. University of Illinois/NCSA Open Source License -Copyright (c) 2009-2018 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2019 by the contributors listed in CREDITS.TXT All rights reserved. diff --git a/vendor/compiler_builtins/compiler-rt/lib/builtins/CMakeLists.txt b/vendor/compiler_builtins/compiler-rt/lib/builtins/CMakeLists.txt index 82332967b1..77947417bf 100644 --- a/vendor/compiler_builtins/compiler-rt/lib/builtins/CMakeLists.txt +++ b/vendor/compiler_builtins/compiler-rt/lib/builtins/CMakeLists.txt @@ -505,7 +505,9 @@ set(mips64el_SOURCES ${GENERIC_TF_SOURCES} set(powerpc64_SOURCES ppc/divtc3.c ppc/fixtfdi.c + ppc/fixunstfti.c ppc/fixunstfdi.c + ppc/floattitf.c ppc/floatditf.c ppc/floatunditf.c ppc/gcc_qadd.c diff --git a/vendor/compiler_builtins/compiler-rt/lib/builtins/cpu_model.c b/vendor/compiler_builtins/compiler-rt/lib/builtins/cpu_model.c index 54f1add916..fb2b899fc7 100644 --- a/vendor/compiler_builtins/compiler-rt/lib/builtins/cpu_model.c +++ b/vendor/compiler_builtins/compiler-rt/lib/builtins/cpu_model.c @@ -462,12 +462,12 @@ static void getAvailableFeatures(unsigned ECX, unsigned EDX, unsigned MaxLeaf, unsigned Features2 = 0; unsigned EAX, EBX; -#define setFeature(F) \ - do { \ - if (F < 32) \ - Features |= 1 << F; \ - else if (F < 64) \ - Features2 |= 1 << (F - 32); \ +#define setFeature(F) \ + do { \ + if (F < 32) \ + Features |= 1U << (F & 0x1f); \ + else if (F < 64) \ + Features2 |= 1U << ((F - 32) & 0x1f); \ } while (0) if ((EDX >> 15) & 1) diff --git a/vendor/compiler_builtins/compiler-rt/lib/builtins/divdf3.c b/vendor/compiler_builtins/compiler-rt/lib/builtins/divdf3.c index 04a4dc5571..411c82ebb8 100644 --- a/vendor/compiler_builtins/compiler-rt/lib/builtins/divdf3.c +++ b/vendor/compiler_builtins/compiler-rt/lib/builtins/divdf3.c @@ -21,36 +21,36 @@ COMPILER_RT_ABI fp_t __divdf3(fp_t a, fp_t b) { - + const unsigned int aExponent = toRep(a) >> significandBits & maxExponent; const unsigned int bExponent = toRep(b) >> significandBits & maxExponent; const rep_t quotientSign = (toRep(a) ^ toRep(b)) & signBit; - + rep_t aSignificand = toRep(a) & significandMask; rep_t bSignificand = toRep(b) & significandMask; int scale = 0; - + // Detect if a or b is zero, denormal, infinity, or NaN. if (aExponent-1U >= maxExponent-1U || bExponent-1U >= maxExponent-1U) { - + const rep_t aAbs = toRep(a) & absMask; const rep_t bAbs = toRep(b) & absMask; - + // NaN / anything = qNaN if (aAbs > infRep) return fromRep(toRep(a) | quietBit); // anything / NaN = qNaN if (bAbs > infRep) return fromRep(toRep(b) | quietBit); - + if (aAbs == infRep) { // infinity / infinity = NaN if (bAbs == infRep) return fromRep(qnanRep); // infinity / anything else = +/- infinity else return fromRep(aAbs | quotientSign); } - + // anything else / infinity = +/- 0 if (bAbs == infRep) return fromRep(quotientSign); - + if (!aAbs) { // zero / zero = NaN if (!bAbs) return fromRep(qnanRep); @@ -59,28 +59,28 @@ __divdf3(fp_t a, fp_t b) { } // anything else / zero = +/- infinity if (!bAbs) return fromRep(infRep | quotientSign); - + // one or both of a or b is denormal, the other (if applicable) is a // normal number. Renormalize one or both of a and b, and set scale to // include the necessary exponent adjustment. if (aAbs < implicitBit) scale += normalize(&aSignificand); if (bAbs < implicitBit) scale -= normalize(&bSignificand); } - + // Or in the implicit significand bit. (If we fell through from the // denormal path it was already set by normalize( ), but setting it twice // won't hurt anything.) aSignificand |= implicitBit; bSignificand |= implicitBit; int quotientExponent = aExponent - bExponent + scale; - + // Align the significand of b as a Q31 fixed-point number in the range // [1, 2.0) and get a Q32 approximate reciprocal using a small minimax // polynomial approximation: reciprocal = 3/4 + 1/sqrt(2) - b/2. This // is accurate to about 3.5 binary digits. const uint32_t q31b = bSignificand >> 21; uint32_t recip32 = UINT32_C(0x7504f333) - q31b; - + // Now refine the reciprocal estimate using a Newton-Raphson iteration: // // x1 = x0 * (2 - x0 * b) @@ -95,13 +95,13 @@ __divdf3(fp_t a, fp_t b) { recip32 = (uint64_t)recip32 * correction32 >> 31; correction32 = -((uint64_t)recip32 * q31b >> 32); recip32 = (uint64_t)recip32 * correction32 >> 31; - + // recip32 might have overflowed to exactly zero in the preceding // computation if the high word of b is exactly 1.0. This would sabotage // the full-width final stage of the computation that follows, so we adjust // recip32 downward by one bit. recip32--; - + // We need to perform one more iteration to get us to 56 binary digits; // The last iteration needs to happen with extra precision. const uint32_t q63blo = bSignificand << 11; @@ -110,14 +110,14 @@ __divdf3(fp_t a, fp_t b) { uint32_t cHi = correction >> 32; uint32_t cLo = correction; reciprocal = (uint64_t)recip32*cHi + ((uint64_t)recip32*cLo >> 32); - + // We already adjusted the 32-bit estimate, now we need to adjust the final // 64-bit reciprocal estimate downward to ensure that it is strictly smaller // than the infinitely precise exact reciprocal. Because the computation // of the Newton-Raphson step is truncating at every step, this adjustment // is small; most of the work is already done. reciprocal -= 2; - + // The numerical reciprocal is accurate to within 2^-56, lies in the // interval [0.5, 1.0), and is strictly smaller than the true reciprocal // of b. Multiplying a by this reciprocal thus gives a numerical q = a/b @@ -127,12 +127,12 @@ __divdf3(fp_t a, fp_t b) { // 2. q is in the interval [0.5, 2.0) // 3. the error in q is bounded away from 2^-53 (actually, we have a // couple of bits to spare, but this is all we need). - + // We need a 64 x 64 multiply high to compute q, which isn't a basic // operation in C, so we need to be a little bit fussy. rep_t quotient, quotientLo; wideMultiply(aSignificand << 2, reciprocal, "ient, "ientLo); - + // Two cases: quotient is in [0.5, 1.0) or quotient is in [1.0, 2.0). // In either case, we are going to compute a residual of the form // @@ -141,7 +141,7 @@ __divdf3(fp_t a, fp_t b) { // We know from the construction of q that r satisfies: // // 0 <= r < ulp(q)*b - // + // // if r is greater than 1/2 ulp(q)*b, then q rounds up. Otherwise, we // already have the correct result. The exact halfway case cannot occur. // We also take this time to right shift quotient if it falls in the [1,2) @@ -154,20 +154,20 @@ __divdf3(fp_t a, fp_t b) { quotient >>= 1; residual = (aSignificand << 52) - quotient * bSignificand; } - + const int writtenExponent = quotientExponent + exponentBias; - + if (writtenExponent >= maxExponent) { // If we have overflowed the exponent, return infinity. return fromRep(infRep | quotientSign); } - + else if (writtenExponent < 1) { // Flush denormals to zero. In the future, it would be nice to add // code to round them correctly. return fromRep(quotientSign); } - + else { const bool round = (residual << 1) > bSignificand; // Clear the implicit bit diff --git a/vendor/compiler_builtins/compiler-rt/lib/builtins/divsf3.c b/vendor/compiler_builtins/compiler-rt/lib/builtins/divsf3.c index 65294d70fc..a74917fd1d 100644 --- a/vendor/compiler_builtins/compiler-rt/lib/builtins/divsf3.c +++ b/vendor/compiler_builtins/compiler-rt/lib/builtins/divsf3.c @@ -21,36 +21,36 @@ COMPILER_RT_ABI fp_t __divsf3(fp_t a, fp_t b) { - + const unsigned int aExponent = toRep(a) >> significandBits & maxExponent; const unsigned int bExponent = toRep(b) >> significandBits & maxExponent; const rep_t quotientSign = (toRep(a) ^ toRep(b)) & signBit; - + rep_t aSignificand = toRep(a) & significandMask; rep_t bSignificand = toRep(b) & significandMask; int scale = 0; - + // Detect if a or b is zero, denormal, infinity, or NaN. if (aExponent-1U >= maxExponent-1U || bExponent-1U >= maxExponent-1U) { - + const rep_t aAbs = toRep(a) & absMask; const rep_t bAbs = toRep(b) & absMask; - + // NaN / anything = qNaN if (aAbs > infRep) return fromRep(toRep(a) | quietBit); // anything / NaN = qNaN if (bAbs > infRep) return fromRep(toRep(b) | quietBit); - + if (aAbs == infRep) { // infinity / infinity = NaN if (bAbs == infRep) return fromRep(qnanRep); // infinity / anything else = +/- infinity else return fromRep(aAbs | quotientSign); } - + // anything else / infinity = +/- 0 if (bAbs == infRep) return fromRep(quotientSign); - + if (!aAbs) { // zero / zero = NaN if (!bAbs) return fromRep(qnanRep); @@ -59,28 +59,28 @@ __divsf3(fp_t a, fp_t b) { } // anything else / zero = +/- infinity if (!bAbs) return fromRep(infRep | quotientSign); - + // one or both of a or b is denormal, the other (if applicable) is a // normal number. Renormalize one or both of a and b, and set scale to // include the necessary exponent adjustment. if (aAbs < implicitBit) scale += normalize(&aSignificand); if (bAbs < implicitBit) scale -= normalize(&bSignificand); } - + // Or in the implicit significand bit. (If we fell through from the // denormal path it was already set by normalize( ), but setting it twice // won't hurt anything.) aSignificand |= implicitBit; bSignificand |= implicitBit; int quotientExponent = aExponent - bExponent + scale; - + // Align the significand of b as a Q31 fixed-point number in the range // [1, 2.0) and get a Q32 approximate reciprocal using a small minimax // polynomial approximation: reciprocal = 3/4 + 1/sqrt(2) - b/2. This // is accurate to about 3.5 binary digits. uint32_t q31b = bSignificand << 8; uint32_t reciprocal = UINT32_C(0x7504f333) - q31b; - + // Now refine the reciprocal estimate using a Newton-Raphson iteration: // // x1 = x0 * (2 - x0 * b) @@ -95,7 +95,7 @@ __divsf3(fp_t a, fp_t b) { reciprocal = (uint64_t)reciprocal * correction >> 31; correction = -((uint64_t)reciprocal * q31b >> 32); reciprocal = (uint64_t)reciprocal * correction >> 31; - + // Exhaustive testing shows that the error in reciprocal after three steps // is in the interval [-0x1.f58108p-31, 0x1.d0e48cp-29], in line with our // expectations. We bump the reciprocal by a tiny value to force the error @@ -103,7 +103,7 @@ __divsf3(fp_t a, fp_t b) { // be specific). This also causes 1/1 to give a sensible approximation // instead of zero (due to overflow). reciprocal -= 2; - + // The numerical reciprocal is accurate to within 2^-28, lies in the // interval [0x1.000000eep-1, 0x1.fffffffcp-1], and is strictly smaller // than the true reciprocal of b. Multiplying a by this reciprocal thus @@ -115,9 +115,9 @@ __divsf3(fp_t a, fp_t b) { // from the fact that we truncate the product, and the 2^27 term // is the error in the reciprocal of b scaled by the maximum // possible value of a. As a consequence of this error bound, - // either q or nextafter(q) is the correctly rounded + // either q or nextafter(q) is the correctly rounded rep_t quotient = (uint64_t)reciprocal*(aSignificand << 1) >> 32; - + // Two cases: quotient is in [0.5, 1.0) or quotient is in [1.0, 2.0). // In either case, we are going to compute a residual of the form // @@ -126,7 +126,7 @@ __divsf3(fp_t a, fp_t b) { // We know from the construction of q that r satisfies: // // 0 <= r < ulp(q)*b - // + // // if r is greater than 1/2 ulp(q)*b, then q rounds up. Otherwise, we // already have the correct result. The exact halfway case cannot occur. // We also take this time to right shift quotient if it falls in the [1,2) @@ -141,18 +141,18 @@ __divsf3(fp_t a, fp_t b) { } const int writtenExponent = quotientExponent + exponentBias; - + if (writtenExponent >= maxExponent) { // If we have overflowed the exponent, return infinity. return fromRep(infRep | quotientSign); } - + else if (writtenExponent < 1) { // Flush denormals to zero. In the future, it would be nice to add // code to round them correctly. return fromRep(quotientSign); } - + else { const bool round = (residual << 1) > bSignificand; // Clear the implicit bit diff --git a/vendor/compiler_builtins/compiler-rt/lib/builtins/gcc_personality_v0.c b/vendor/compiler_builtins/compiler-rt/lib/builtins/gcc_personality_v0.c index 0bc7656245..68581ef164 100644 --- a/vendor/compiler_builtins/compiler-rt/lib/builtins/gcc_personality_v0.c +++ b/vendor/compiler_builtins/compiler-rt/lib/builtins/gcc_personality_v0.c @@ -206,8 +206,8 @@ __gcc_personality_v0(int version, _Unwind_Action actions, if ( lsda == (uint8_t*) 0 ) return continueUnwind(exceptionObject, context); - uintptr_t pc = _Unwind_GetIP(context)-1; - uintptr_t funcStart = _Unwind_GetRegionStart(context); + uintptr_t pc = (uintptr_t)_Unwind_GetIP(context)-1; + uintptr_t funcStart = (uintptr_t)_Unwind_GetRegionStart(context); uintptr_t pcOffset = pc - funcStart; /* Parse LSDA header. */ @@ -249,4 +249,3 @@ __gcc_personality_v0(int version, _Unwind_Action actions, /* No landing pad found, continue unwinding. */ return continueUnwind(exceptionObject, context); } - diff --git a/vendor/compiler_builtins/compiler-rt/lib/builtins/int_math.h b/vendor/compiler_builtins/compiler-rt/lib/builtins/int_math.h index aa3d0721a8..cc90101013 100644 --- a/vendor/compiler_builtins/compiler-rt/lib/builtins/int_math.h +++ b/vendor/compiler_builtins/compiler-rt/lib/builtins/int_math.h @@ -28,7 +28,6 @@ #if defined(_MSC_VER) && !defined(__clang__) #include #include -#include #endif #if defined(_MSC_VER) && !defined(__clang__) diff --git a/vendor/compiler_builtins/compiler-rt/lib/builtins/ppc/fixunstfti.c b/vendor/compiler_builtins/compiler-rt/lib/builtins/ppc/fixunstfti.c new file mode 100644 index 0000000000..fa21084cb5 --- /dev/null +++ b/vendor/compiler_builtins/compiler-rt/lib/builtins/ppc/fixunstfti.c @@ -0,0 +1,106 @@ +//===-- lib/builtins/ppc/fixunstfti.c - Convert long double->int128 *-C -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements converting the 128bit IBM/PowerPC long double (double- +// double) data type to an unsigned 128 bit integer. +// +//===----------------------------------------------------------------------===// + +#include "../int_math.h" +#define BIAS 1023 + +/* Convert long double into an unsigned 128-bit integer. */ +__uint128_t __fixunstfti(long double input) { + + /* If we are trying to convert a NaN, return the NaN bit pattern. */ + if (crt_isnan(input)) { + return ((__uint128_t)0x7FF8000000000000ll) << 64 | + (__uint128_t)0x0000000000000000ll; + } + + __uint128_t result, hiResult, loResult; + int hiExponent, loExponent, shift; + /* The long double representation, with the high and low portions of + * the long double, and the corresponding bit patterns of each double. */ + union { + long double ld; + double d[2]; /* [0] is the high double, [1] is the low double. */ + unsigned long long ull[2]; /* High and low doubles as 64-bit integers. */ + } ldUnion; + + /* If the long double is less than 1.0 or negative, + * return 0.0. */ + if (input < 1.0) + return 0.0; + + /* Retrieve the 64-bit patterns of high and low doubles. + * Compute the unbiased exponent of both high and low doubles by + * removing the signs, isolating the exponent, and subtracting + * the bias from it. */ + ldUnion.ld = input; + hiExponent = ((ldUnion.ull[0] & 0x7FFFFFFFFFFFFFFFll) >> 52) - BIAS; + loExponent = ((ldUnion.ull[1] & 0x7FFFFFFFFFFFFFFFll) >> 52) - BIAS; + + /* Convert each double into int64; they will be added to the int128 result. + * CASE 1: High or low double fits in int64 + * - Convert the each double normally into int64. + * + * CASE 2: High or low double does not fit in int64 + * - Scale the double to fit within a 64-bit integer + * - Calculate the shift (amount to scale the double by in the int128) + * - Clear all the bits of the exponent (with 0x800FFFFFFFFFFFFF) + * - Add BIAS+53 (0x4350000000000000) to exponent to correct the value + * - Scale (move) the double to the correct place in the int128 + * (Move it by 2^53 places) + * + * Note: If the high double is assumed to be positive, an unsigned conversion + * from long double to 64-bit integer is needed. The low double can be either + * positive or negative, so a signed conversion is needed to retain the result + * of the low double and to ensure it does not simply get converted to 0. */ + + /* CASE 1 - High double fits in int64. */ + if (hiExponent < 63) { + hiResult = (unsigned long long)ldUnion.d[0]; + } else if (hiExponent < 128) { + /* CASE 2 - High double does not fit in int64, scale and convert it. */ + shift = hiExponent - 54; + ldUnion.ull[0] &= 0x800FFFFFFFFFFFFFll; + ldUnion.ull[0] |= 0x4350000000000000ll; + hiResult = (unsigned long long)ldUnion.d[0]; + hiResult <<= shift; + } else { + /* Detect cases for overflow. When the exponent of the high + * double is greater than 128 bits and when the long double + * input is positive, return the max 128-bit integer. + * For negative inputs with exponents > 128, return 1, like gcc. */ + if (ldUnion.d[0] > 0) { + return ((__uint128_t)0xFFFFFFFFFFFFFFFFll) << 64 | + (__uint128_t)0xFFFFFFFFFFFFFFFFll; + } else { + return ((__uint128_t)0x0000000000000000ll) << 64 | + (__uint128_t)0x0000000000000001ll; + } + } + + /* CASE 1 - Low double fits in int64. */ + if (loExponent < 63) { + loResult = (long long)ldUnion.d[1]; + } else { + /* CASE 2 - Low double does not fit in int64, scale and convert it. */ + shift = loExponent - 54; + ldUnion.ull[1] &= 0x800FFFFFFFFFFFFFll; + ldUnion.ull[1] |= 0x4350000000000000ll; + loResult = (long long)ldUnion.d[1]; + loResult <<= shift; + } + + /* Add the high and low doublewords together to form a 128 bit integer. */ + result = loResult + hiResult; + return result; +} diff --git a/vendor/compiler_builtins/compiler-rt/lib/builtins/ppc/floattitf.c b/vendor/compiler_builtins/compiler-rt/lib/builtins/ppc/floattitf.c new file mode 100644 index 0000000000..b8e297b6b8 --- /dev/null +++ b/vendor/compiler_builtins/compiler-rt/lib/builtins/ppc/floattitf.c @@ -0,0 +1,48 @@ +//===-- lib/builtins/ppc/floattitf.c - Convert int128->long double -*-C -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements converting a signed 128 bit integer to a 128bit IBM / +// PowerPC long double (double-double) value. +// +//===----------------------------------------------------------------------===// + +#include + +/* Conversions from signed and unsigned 64-bit int to long double. */ +long double __floatditf(int64_t); +long double __floatunditf(uint64_t); + +/* Convert a signed 128-bit integer to long double. + * This uses the following property: Let hi and lo be 64-bits each, + * and let signed_val_k() and unsigned_val_k() be the value of the + * argument interpreted as a signed or unsigned k-bit integer. Then, + * + * signed_val_128(hi,lo) = signed_val_64(hi) * 2^64 + unsigned_val_64(lo) + * = (long double)hi * 2^64 + (long double)lo, + * + * where (long double)hi and (long double)lo are signed and + * unsigned 64-bit integer to long double conversions, respectively. + */ +long double __floattitf(__int128_t arg) { + /* Split the int128 argument into 64-bit high and low int64 parts. */ + int64_t ArgHiPart = (int64_t)(arg >> 64); + uint64_t ArgLoPart = (uint64_t)arg; + + /* Convert each 64-bit part into long double. The high part + * must be a signed conversion and the low part an unsigned conversion + * to ensure the correct result. */ + long double ConvertedHiPart = __floatditf(ArgHiPart); + long double ConvertedLoPart = __floatunditf(ArgLoPart); + + /* The low bit of ArgHiPart corresponds to the 2^64 bit in arg. + * Multiply the high part by 2^64 to undo the right shift by 64-bits + * done in the splitting. Then, add to the low part to obtain the + * final result. */ + return ((ConvertedHiPart * 0x1.0p64) + ConvertedLoPart); +} diff --git a/vendor/compiler_builtins/compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cc b/vendor/compiler_builtins/compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cc index e8fc3a8499..ed62ddd0fa 100644 --- a/vendor/compiler_builtins/compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cc +++ b/vendor/compiler_builtins/compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cc @@ -95,6 +95,7 @@ void NORETURN CheckFailed(const char *file, int, const char *cond, u64, u64) { HANDLER_NORECOVER(name, msg) HANDLER(type_mismatch, "type-mismatch") +HANDLER(alignment_assumption, "alignment-assumption") HANDLER(add_overflow, "add-overflow") HANDLER(sub_overflow, "sub-overflow") HANDLER(mul_overflow, "mul-overflow") diff --git a/vendor/compiler_builtins/compiler-rt/utils/generate_netbsd_ioctls.awk b/vendor/compiler_builtins/compiler-rt/utils/generate_netbsd_ioctls.awk index 82b1992143..38fe88fb0c 100755 --- a/vendor/compiler_builtins/compiler-rt/utils/generate_netbsd_ioctls.awk +++ b/vendor/compiler_builtins/compiler-rt/utils/generate_netbsd_ioctls.awk @@ -152,7 +152,6 @@ FNR == 1 { $0 ~ /JOY_GET_X_OFFSET/ || $0 ~ /CHIOGPICKER/ || $0 ~ /SLIOCGUNIT/ || - $0 ~ /SATIOSBUFSIZE/ || $0 ~ /TUNSLMODE/ || $0 ~ /CBQ_IF_ATTACH/ || $0 ~ /CDNR_IF_ATTACH/ || diff --git a/vendor/compiler_builtins/examples/intrinsics.rs b/vendor/compiler_builtins/examples/intrinsics.rs index ccd701569d..3debffa450 100644 --- a/vendor/compiler_builtins/examples/intrinsics.rs +++ b/vendor/compiler_builtins/examples/intrinsics.rs @@ -17,7 +17,7 @@ extern crate panic_handler; #[cfg(all(not(thumb), not(windows)))] #[link(name = "c")] -extern {} +extern "C" {} // Every function in this module maps will be lowered to an intrinsic by LLVM, if the platform // doesn't have native support for the operation used in the function. ARM has a naming convention @@ -27,7 +27,14 @@ extern {} mod intrinsics { // trunccdfsf2 pub fn aeabi_d2f(x: f64) -> f32 { - x as f32 + // This is only implemented in C currently, so only test it there. + #[cfg(feature = "c")] + return x as f32; + #[cfg(not(feature = "c"))] + { + drop(x); + 0.0 + } } // fixdfsi @@ -263,6 +270,10 @@ mod intrinsics { pub fn modti3(a: i128, b: i128) -> i128 { a % b } + + pub fn udivsi3(a: u32, b: u32) -> u32 { + a / b + } } fn run() { @@ -325,14 +336,17 @@ fn run() { bb(umodti3(bb(2), bb(2))); bb(divti3(bb(2), bb(2))); bb(modti3(bb(2), bb(2))); + bb(udivsi3(bb(2), bb(2))); something_with_a_dtor(&|| assert_eq!(bb(1), 1)); - extern { + extern "C" { fn rust_begin_unwind(); } // if bb(false) { - unsafe { rust_begin_unwind(); } + unsafe { + rust_begin_unwind(); + } // } } @@ -365,7 +379,7 @@ pub fn _start() -> ! { #[cfg(windows)] #[link(name = "kernel32")] #[link(name = "msvcrt")] -extern {} +extern "C" {} // ARM targets need these symbols #[no_mangle] diff --git a/vendor/compiler_builtins/libm/src/math/acos.rs b/vendor/compiler_builtins/libm/src/math/acos.rs index 276e361f3d..055888ffa6 100644 --- a/vendor/compiler_builtins/libm/src/math/acos.rs +++ b/vendor/compiler_builtins/libm/src/math/acos.rs @@ -52,10 +52,11 @@ const QS4: f64 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ fn r(z: f64) -> f64 { let p: f64 = z * (PS0 + z * (PS1 + z * (PS2 + z * (PS3 + z * (PS4 + z * PS5))))); let q: f64 = 1.0 + z * (QS1 + z * (QS2 + z * (QS3 + z * QS4))); - return p / q; + p / q } #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn acos(x: f64) -> f64 { let x1p_120f = f64::from_bits(0x3870000000000000); // 0x1p-120 === 2 ^ -120 let z: f64; @@ -72,7 +73,7 @@ pub fn acos(x: f64) -> f64 { if ix >= 0x3ff00000 { let lx: u32 = x.to_bits() as u32; - if (ix - 0x3ff00000 | lx) == 0 { + if ((ix - 0x3ff00000) | lx) == 0 { /* acos(1)=0, acos(-1)=pi */ if (hx >> 31) != 0 { return 2. * PIO2_HI + x1p_120f; @@ -104,5 +105,5 @@ pub fn acos(x: f64) -> f64 { c = (z - df * df) / (s + df); w = r(z) * s + c; - return 2. * (df + w); + 2. * (df + w) } diff --git a/vendor/compiler_builtins/libm/src/math/acosf.rs b/vendor/compiler_builtins/libm/src/math/acosf.rs index 469601caba..a6061ae802 100644 --- a/vendor/compiler_builtins/libm/src/math/acosf.rs +++ b/vendor/compiler_builtins/libm/src/math/acosf.rs @@ -30,6 +30,7 @@ fn r(z: f32) -> f32 { } #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn acosf(x: f32) -> f32 { let x1p_120 = f32::from_bits(0x03800000); // 0x1p-120 === 2 ^ (-120) diff --git a/vendor/compiler_builtins/libm/src/math/asin.rs b/vendor/compiler_builtins/libm/src/math/asin.rs index a0bb4918c5..2aee72b286 100644 --- a/vendor/compiler_builtins/libm/src/math/asin.rs +++ b/vendor/compiler_builtins/libm/src/math/asin.rs @@ -59,10 +59,11 @@ const Q_S4: f64 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ fn comp_r(z: f64) -> f64 { let p = z * (P_S0 + z * (P_S1 + z * (P_S2 + z * (P_S3 + z * (P_S4 + z * P_S5))))); let q = 1.0 + z * (Q_S1 + z * (Q_S2 + z * (Q_S3 + z * Q_S4))); - return p / q; + p / q } #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn asin(mut x: f64) -> f64 { let z: f64; let r: f64; @@ -76,7 +77,7 @@ pub fn asin(mut x: f64) -> f64 { if ix >= 0x3ff00000 { let lx: u32; lx = get_low_word(x); - if (ix - 0x3ff00000 | lx) == 0 { + if ((ix - 0x3ff00000) | lx) == 0 { /* asin(1) = +-pi/2 with inexact */ return x * PIO2_HI + f64::from_bits(0x3870000000000000); } else { @@ -108,8 +109,8 @@ pub fn asin(mut x: f64) -> f64 { x = 0.5 * PIO2_HI - (2.0 * s * r - (PIO2_LO - 2.0 * c) - (0.5 * PIO2_HI - 2.0 * f)); } if hx >> 31 != 0 { - return -x; + -x } else { - return x; + x } } diff --git a/vendor/compiler_builtins/libm/src/math/asinf.rs b/vendor/compiler_builtins/libm/src/math/asinf.rs index 79c85d81d0..979f1a6548 100644 --- a/vendor/compiler_builtins/libm/src/math/asinf.rs +++ b/vendor/compiler_builtins/libm/src/math/asinf.rs @@ -32,6 +32,7 @@ fn r(z: f32) -> f32 { } #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn asinf(mut x: f32) -> f32 { let x1p_120 = f64::from_bits(0x3870000000000000); // 0x1p-120 === 2 ^ (-120) diff --git a/vendor/compiler_builtins/libm/src/math/atan.rs b/vendor/compiler_builtins/libm/src/math/atan.rs index cf6a62a545..94594080cb 100644 --- a/vendor/compiler_builtins/libm/src/math/atan.rs +++ b/vendor/compiler_builtins/libm/src/math/atan.rs @@ -61,6 +61,7 @@ const AT: [f64; 11] = [ ]; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn atan(x: f64) -> f64 { let mut x = x; let mut ix = (x.to_bits() >> 32) as u32; @@ -101,16 +102,14 @@ pub fn atan(x: f64) -> f64 { x = (x - 1.) / (x + 1.); 1 } + } else if ix < 0x40038000 { + /* |x| < 2.4375 */ + x = (x - 1.5) / (1. + 1.5 * x); + 2 } else { - if ix < 0x40038000 { - /* |x| < 2.4375 */ - x = (x - 1.5) / (1. + 1.5 * x); - 2 - } else { - /* 2.4375 <= |x| < 2^66 */ - x = -1. / x; - 3 - } + /* 2.4375 <= |x| < 2^66 */ + x = -1. / x; + 3 } }; @@ -147,7 +146,8 @@ mod tests { (-3.0_f64.sqrt() / 3.0, -f64::consts::FRAC_PI_6), (-1.0, -f64::consts::FRAC_PI_4), (-3.0_f64.sqrt(), -f64::consts::FRAC_PI_3), - ].iter() + ] + .iter() { assert!( (atan(*input) - answer) / answer < 1e-5, diff --git a/vendor/compiler_builtins/libm/src/math/atan2.rs b/vendor/compiler_builtins/libm/src/math/atan2.rs index a91ddd84d0..7ab636050f 100644 --- a/vendor/compiler_builtins/libm/src/math/atan2.rs +++ b/vendor/compiler_builtins/libm/src/math/atan2.rs @@ -44,6 +44,7 @@ const PI: f64 = 3.1415926535897931160E+00; /* 0x400921FB, 0x54442D18 */ const PI_LO: f64 = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn atan2(y: f64, x: f64) -> f64 { if x.is_nan() || y.is_nan() { return x + y; @@ -52,7 +53,7 @@ pub fn atan2(y: f64, x: f64) -> f64 { let lx = x.to_bits() as u32; let mut iy = (y.to_bits() >> 32) as u32; let ly = y.to_bits() as u32; - if (ix - 0x3ff00000 | lx) == 0 { + if ((ix - 0x3ff00000) | lx) == 0 { /* x = 1.0 */ return atan(y); } @@ -91,12 +92,12 @@ pub fn atan2(y: f64, x: f64) -> f64 { } } /* |y/x| > 0x1p64 */ - if ix + (64 << 20) < iy || iy == 0x7ff00000 { + if ix.wrapping_add(64 << 20) < iy || iy == 0x7ff00000 { return if m & 1 != 0 { -PI / 2.0 } else { PI / 2.0 }; } /* z = atan(|y/x|) without spurious underflow */ - let z = if (m & 2 != 0) && iy + (64 << 20) < ix { + let z = if (m & 2 != 0) && iy.wrapping_add(64 << 20) < ix { /* |y/x| < 0x1p-64, x<0 */ 0.0 } else { diff --git a/vendor/compiler_builtins/libm/src/math/atan2f.rs b/vendor/compiler_builtins/libm/src/math/atan2f.rs index 211a992a06..94e3c77186 100644 --- a/vendor/compiler_builtins/libm/src/math/atan2f.rs +++ b/vendor/compiler_builtins/libm/src/math/atan2f.rs @@ -20,6 +20,7 @@ const PI: f32 = 3.1415927410e+00; /* 0x40490fdb */ const PI_LO: f32 = -8.7422776573e-08; /* 0xb3bbbd2e */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn atan2f(y: f32, x: f32) -> f32 { if x.is_nan() || y.is_nan() { return x + y; diff --git a/vendor/compiler_builtins/libm/src/math/atanf.rs b/vendor/compiler_builtins/libm/src/math/atanf.rs index b05152e2bc..89b0afd6fb 100644 --- a/vendor/compiler_builtins/libm/src/math/atanf.rs +++ b/vendor/compiler_builtins/libm/src/math/atanf.rs @@ -38,6 +38,7 @@ const A_T: [f32; 5] = [ ]; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn atanf(mut x: f32) -> f32 { let x1p_120 = f32::from_bits(0x03800000); // 0x1p-120 === 2 ^ (-120) @@ -79,16 +80,14 @@ pub fn atanf(mut x: f32) -> f32 { x = (x - 1.) / (x + 1.); 1 } + } else if ix < 0x401c0000 { + /* |x| < 2.4375 */ + x = (x - 1.5) / (1. + 1.5 * x); + 2 } else { - if ix < 0x401c0000 { - /* |x| < 2.4375 */ - x = (x - 1.5) / (1. + 1.5 * x); - 2 - } else { - /* 2.4375 <= |x| < 2**26 */ - x = -1. / x; - 3 - } + /* 2.4375 <= |x| < 2**26 */ + x = -1. / x; + 3 } }; /* end of argument reduction */ diff --git a/vendor/compiler_builtins/libm/src/math/cbrt.rs b/vendor/compiler_builtins/libm/src/math/cbrt.rs index 8c37f0b266..ab11c497e1 100644 --- a/vendor/compiler_builtins/libm/src/math/cbrt.rs +++ b/vendor/compiler_builtins/libm/src/math/cbrt.rs @@ -28,6 +28,7 @@ const P3: f64 = -0.758397934778766047437; /* 0xbfe844cb, 0xbee751d9 */ const P4: f64 = 0.145996192886612446982; /* 0x3fc2b000, 0xd4e4edd7 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn cbrt(x: f64) -> f64 { let x1p54 = f64::from_bits(0x4350000000000000); // 0x1p54 === 2 ^ 54 diff --git a/vendor/compiler_builtins/libm/src/math/cbrtf.rs b/vendor/compiler_builtins/libm/src/math/cbrtf.rs index 878372eefb..19215b8587 100644 --- a/vendor/compiler_builtins/libm/src/math/cbrtf.rs +++ b/vendor/compiler_builtins/libm/src/math/cbrtf.rs @@ -23,6 +23,7 @@ const B1: u32 = 709958130; /* B1 = (127-127.0/3-0.03306235651)*2**23 */ const B2: u32 = 642849266; /* B2 = (127-127.0/3-24/3-0.03306235651)*2**23 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn cbrtf(x: f32) -> f32 { let x1p24 = f32::from_bits(0x4b800000); // 0x1p24f === 2 ^ 24 diff --git a/vendor/compiler_builtins/libm/src/math/ceil.rs b/vendor/compiler_builtins/libm/src/math/ceil.rs index 5dbfa6a2c0..d337db200b 100644 --- a/vendor/compiler_builtins/libm/src/math/ceil.rs +++ b/vendor/compiler_builtins/libm/src/math/ceil.rs @@ -3,6 +3,7 @@ use core::f64; const TOINT: f64 = 1. / f64::EPSILON; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn ceil(x: f64) -> f64 { // On wasm32 we know that LLVM's intrinsic will compile to an optimized // `f64.ceil` native instruction, so we can leverage this for both code size @@ -26,7 +27,7 @@ pub fn ceil(x: f64) -> f64 { x + TOINT - TOINT - x }; // special case because of non-nearest rounding modes - if e <= 0x3ff - 1 { + if e < 0x3ff { force_eval!(y); return if (u >> 63) != 0 { -0. } else { 1. }; } diff --git a/vendor/compiler_builtins/libm/src/math/ceilf.rs b/vendor/compiler_builtins/libm/src/math/ceilf.rs index c8cd4b5aa5..88f9ecc443 100644 --- a/vendor/compiler_builtins/libm/src/math/ceilf.rs +++ b/vendor/compiler_builtins/libm/src/math/ceilf.rs @@ -1,6 +1,7 @@ use core::f32; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn ceilf(x: f32) -> f32 { // On wasm32 we know that LLVM's intrinsic will compile to an optimized // `f32.ceil` native instruction, so we can leverage this for both code size @@ -34,5 +35,5 @@ pub fn ceilf(x: f32) -> f32 { return 1.0; } } - return f32::from_bits(ui); + f32::from_bits(ui) } diff --git a/vendor/compiler_builtins/libm/src/math/cos.rs b/vendor/compiler_builtins/libm/src/math/cos.rs index df16b5c36a..fe5a89919b 100644 --- a/vendor/compiler_builtins/libm/src/math/cos.rs +++ b/vendor/compiler_builtins/libm/src/math/cos.rs @@ -42,6 +42,7 @@ use super::{k_cos, k_sin, rem_pio2}; // TRIG(x) returns trig(x) nearly rounded // #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn cos(x: f64) -> f64 { let ix = (f64::to_bits(x) >> 32) as u32 & 0x7fffffff; diff --git a/vendor/compiler_builtins/libm/src/math/cosf.rs b/vendor/compiler_builtins/libm/src/math/cosf.rs index 23faacdc26..48d76c8ee0 100644 --- a/vendor/compiler_builtins/libm/src/math/cosf.rs +++ b/vendor/compiler_builtins/libm/src/math/cosf.rs @@ -25,6 +25,7 @@ const C3_PIO2: f64 = 3. * FRAC_PI_2; /* 0x4012D97C, 0x7F3321D2 */ const C4_PIO2: f64 = 4. * FRAC_PI_2; /* 0x401921FB, 0x54442D18 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn cosf(x: f32) -> f32 { let x64 = x as f64; @@ -49,12 +50,10 @@ pub fn cosf(x: f32) -> f32 { if ix > 0x4016cbe3 { /* |x| ~> 3*pi/4 */ return -k_cosf(if sign { x64 + C2_PIO2 } else { x64 - C2_PIO2 }); + } else if sign { + return k_sinf(x64 + C1_PIO2); } else { - if sign { - return k_sinf(x64 + C1_PIO2); - } else { - return k_sinf(C1_PIO2 - x64); - } + return k_sinf(C1_PIO2 - x64); } } if ix <= 0x40e231d5 { @@ -62,12 +61,10 @@ pub fn cosf(x: f32) -> f32 { if ix > 0x40afeddf { /* |x| ~> 7*pi/4 */ return k_cosf(if sign { x64 + C4_PIO2 } else { x64 - C4_PIO2 }); + } else if sign { + return k_sinf(-x64 - C3_PIO2); } else { - if sign { - return k_sinf(-x64 - C3_PIO2); - } else { - return k_sinf(x64 - C3_PIO2); - } + return k_sinf(x64 - C3_PIO2); } } diff --git a/vendor/compiler_builtins/libm/src/math/cosh.rs b/vendor/compiler_builtins/libm/src/math/cosh.rs index f3f7fbfbeb..b6ba338b55 100644 --- a/vendor/compiler_builtins/libm/src/math/cosh.rs +++ b/vendor/compiler_builtins/libm/src/math/cosh.rs @@ -3,6 +3,7 @@ use super::expm1; use super::k_expo2; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn cosh(mut x: f64) -> f64 { /* |x| */ let mut ix = x.to_bits(); diff --git a/vendor/compiler_builtins/libm/src/math/coshf.rs b/vendor/compiler_builtins/libm/src/math/coshf.rs index bd468f5da7..b37ee1f327 100644 --- a/vendor/compiler_builtins/libm/src/math/coshf.rs +++ b/vendor/compiler_builtins/libm/src/math/coshf.rs @@ -3,6 +3,7 @@ use super::expm1f; use super::k_expo2f; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn coshf(mut x: f32) -> f32 { let x1p120 = f32::from_bits(0x7b800000); // 0x1p120f === 2 ^ 120 diff --git a/vendor/compiler_builtins/libm/src/math/exp.rs b/vendor/compiler_builtins/libm/src/math/exp.rs index cd63b8fb3f..c327731867 100644 --- a/vendor/compiler_builtins/libm/src/math/exp.rs +++ b/vendor/compiler_builtins/libm/src/math/exp.rs @@ -78,6 +78,7 @@ const P4: f64 = -1.65339022054652515390e-06; /* 0xBEBBBD41, 0xC5D26BF1 */ const P5: f64 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn exp(mut x: f64) -> f64 { let x1p1023 = f64::from_bits(0x7fe0000000000000); // 0x1p1023 === 2 ^ 1023 let x1p_149 = f64::from_bits(0x36a0000000000000); // 0x1p-149 === 2 ^ -149 diff --git a/vendor/compiler_builtins/libm/src/math/exp2.rs b/vendor/compiler_builtins/libm/src/math/exp2.rs index 3952e93007..be6a003c6e 100644 --- a/vendor/compiler_builtins/libm/src/math/exp2.rs +++ b/vendor/compiler_builtins/libm/src/math/exp2.rs @@ -319,6 +319,7 @@ static TBL: [u64; TBLSIZE * 2] = [ // Gal, S. and Bachelis, B. An Accurate Elementary Mathematical Library // for the IEEE Floating Point Standard. TOMS 17(1), 26-46 (1991). #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn exp2(mut x: f64) -> f64 { let redux = f64::from_bits(0x4338000000000000) / TBLSIZE as f64; let p1 = f64::from_bits(0x3fe62e42fefa39ef); diff --git a/vendor/compiler_builtins/libm/src/math/exp2f.rs b/vendor/compiler_builtins/libm/src/math/exp2f.rs index a3f6db8c5b..32816104b5 100644 --- a/vendor/compiler_builtins/libm/src/math/exp2f.rs +++ b/vendor/compiler_builtins/libm/src/math/exp2f.rs @@ -70,6 +70,7 @@ static EXP2FT: [u64; TBLSIZE] = [ // Tang, P. Table-driven Implementation of the Exponential Function // in IEEE Floating-Point Arithmetic. TOMS 15(2), 144-157 (1989). #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn exp2f(mut x: f32) -> f32 { let redux = f32::from_bits(0x4b400000) / TBLSIZE as f32; let p1 = f32::from_bits(0x3f317218); diff --git a/vendor/compiler_builtins/libm/src/math/expf.rs b/vendor/compiler_builtins/libm/src/math/expf.rs index 8ecc3b6abd..baade2552e 100644 --- a/vendor/compiler_builtins/libm/src/math/expf.rs +++ b/vendor/compiler_builtins/libm/src/math/expf.rs @@ -27,10 +27,10 @@ const P1: f32 = 1.6666625440e-1; /* 0xaaaa8f.0p-26 */ const P2: f32 = -2.7667332906e-3; /* -0xb55215.0p-32 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn expf(mut x: f32) -> f32 { let x1p127 = f32::from_bits(0x7f000000); // 0x1p127f === 2 ^ 127 let x1p_126 = f32::from_bits(0x800000); // 0x1p-126f === 2 ^ -126 /*original 0x1p-149f ??????????? */ - let mut hx = x.to_bits(); let sign = (hx >> 31) as i32; /* sign bit of x */ let signb: bool = sign != 0; diff --git a/vendor/compiler_builtins/libm/src/math/expm1.rs b/vendor/compiler_builtins/libm/src/math/expm1.rs index 9da064ee77..4261639906 100644 --- a/vendor/compiler_builtins/libm/src/math/expm1.rs +++ b/vendor/compiler_builtins/libm/src/math/expm1.rs @@ -24,6 +24,7 @@ const Q4: f64 = 4.00821782732936239552e-06; /* 3ED0CFCA 86E65239 */ const Q5: f64 = -2.01099218183624371326e-07; /* BE8AFDB7 6E09C32D */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn expm1(mut x: f64) -> f64 { let hi: f64; let lo: f64; diff --git a/vendor/compiler_builtins/libm/src/math/expm1f.rs b/vendor/compiler_builtins/libm/src/math/expm1f.rs index 8f581733ac..4daa83c856 100644 --- a/vendor/compiler_builtins/libm/src/math/expm1f.rs +++ b/vendor/compiler_builtins/libm/src/math/expm1f.rs @@ -26,6 +26,7 @@ const Q1: f32 = -3.3333212137e-2; /* -0x888868.0p-28 */ const Q2: f32 = 1.5807170421e-3; /* 0xcf3010.0p-33 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn expm1f(mut x: f32) -> f32 { let x1p127 = f32::from_bits(0x7f000000); // 0x1p127f === 2 ^ 127 diff --git a/vendor/compiler_builtins/libm/src/math/expo2.rs b/vendor/compiler_builtins/libm/src/math/expo2.rs index 39f9815c40..9e60ca9942 100644 --- a/vendor/compiler_builtins/libm/src/math/expo2.rs +++ b/vendor/compiler_builtins/libm/src/math/expo2.rs @@ -2,6 +2,7 @@ use super::{combine_words, exp}; /* exp(x)/2 for x >= log(DBL_MAX), slightly better than 0.5*exp(x/2)*exp(x/2) */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn expo2(x: f64) -> f64 { /* k is such that k*ln2 has minimal relative error and x - kln2 > log(DBL_MIN) */ const K: i32 = 2043; @@ -10,5 +11,5 @@ pub fn expo2(x: f64) -> f64 { /* note that k is odd and scale*scale overflows */ let scale = combine_words(((0x3ff + K / 2) as u32) << 20, 0); /* exp(x - k ln2) * 2**(k-1) */ - return exp(x - kln2) * scale * scale; + exp(x - kln2) * scale * scale } diff --git a/vendor/compiler_builtins/libm/src/math/fabs.rs b/vendor/compiler_builtins/libm/src/math/fabs.rs index 7c804653c9..0824bd5935 100644 --- a/vendor/compiler_builtins/libm/src/math/fabs.rs +++ b/vendor/compiler_builtins/libm/src/math/fabs.rs @@ -1,6 +1,7 @@ use core::u64; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn fabs(x: f64) -> f64 { // On wasm32 we know that LLVM's intrinsic will compile to an optimized // `f64.abs` native instruction, so we can leverage this for both code size diff --git a/vendor/compiler_builtins/libm/src/math/fabsf.rs b/vendor/compiler_builtins/libm/src/math/fabsf.rs index 884c20f6c4..859508f9b5 100644 --- a/vendor/compiler_builtins/libm/src/math/fabsf.rs +++ b/vendor/compiler_builtins/libm/src/math/fabsf.rs @@ -1,4 +1,5 @@ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn fabsf(x: f32) -> f32 { // On wasm32 we know that LLVM's intrinsic will compile to an optimized // `f32.abs` native instruction, so we can leverage this for both code size diff --git a/vendor/compiler_builtins/libm/src/math/fdim.rs b/vendor/compiler_builtins/libm/src/math/fdim.rs index 1daae4ebc2..d9aca86115 100644 --- a/vendor/compiler_builtins/libm/src/math/fdim.rs +++ b/vendor/compiler_builtins/libm/src/math/fdim.rs @@ -1,16 +1,15 @@ use core::f64; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn fdim(x: f64, y: f64) -> f64 { if x.is_nan() { x } else if y.is_nan() { y + } else if x > y { + x - y } else { - if x > y { - x - y - } else { - 0.0 - } + 0.0 } } diff --git a/vendor/compiler_builtins/libm/src/math/fdimf.rs b/vendor/compiler_builtins/libm/src/math/fdimf.rs index 953e0c8dfa..bcda8ee94f 100644 --- a/vendor/compiler_builtins/libm/src/math/fdimf.rs +++ b/vendor/compiler_builtins/libm/src/math/fdimf.rs @@ -1,16 +1,15 @@ use core::f32; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn fdimf(x: f32, y: f32) -> f32 { if x.is_nan() { x } else if y.is_nan() { y + } else if x > y { + x - y } else { - if x > y { - x - y - } else { - 0.0 - } + 0.0 } } diff --git a/vendor/compiler_builtins/libm/src/math/floor.rs b/vendor/compiler_builtins/libm/src/math/floor.rs index b14a48d55b..c705ae501a 100644 --- a/vendor/compiler_builtins/libm/src/math/floor.rs +++ b/vendor/compiler_builtins/libm/src/math/floor.rs @@ -3,6 +3,7 @@ use core::f64; const TOINT: f64 = 1. / f64::EPSILON; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn floor(x: f64) -> f64 { // On wasm32 we know that LLVM's intrinsic will compile to an optimized // `f64.floor` native instruction, so we can leverage this for both code size @@ -25,7 +26,7 @@ pub fn floor(x: f64) -> f64 { x + TOINT - TOINT - x }; /* special case because of non-nearest rounding modes */ - if e <= 0x3ff - 1 { + if e < 0x3ff { force_eval!(y); return if (ui >> 63) != 0 { -1. } else { 0. }; } diff --git a/vendor/compiler_builtins/libm/src/math/floorf.rs b/vendor/compiler_builtins/libm/src/math/floorf.rs index 71b5953df3..899dcf5a51 100644 --- a/vendor/compiler_builtins/libm/src/math/floorf.rs +++ b/vendor/compiler_builtins/libm/src/math/floorf.rs @@ -1,6 +1,7 @@ use core::f32; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn floorf(x: f32) -> f32 { // On wasm32 we know that LLVM's intrinsic will compile to an optimized // `f32.floor` native instruction, so we can leverage this for both code size @@ -11,7 +12,7 @@ pub fn floorf(x: f32) -> f32 { } } let mut ui = x.to_bits(); - let e = (((ui >> 23) & 0xff) - 0x7f) as i32; + let e = (((ui >> 23) as i32) & 0xff) - 0x7f; if e >= 23 { return x; @@ -34,5 +35,13 @@ pub fn floorf(x: f32) -> f32 { return -1.0; } } - return f32::from_bits(ui); + f32::from_bits(ui) +} + +#[cfg(test)] +mod tests { + #[test] + fn no_overflow() { + assert_eq!(super::floorf(0.5), 0.0); + } } diff --git a/vendor/compiler_builtins/libm/src/math/fma.rs b/vendor/compiler_builtins/libm/src/math/fma.rs index 99a27164a8..21c854cd00 100644 --- a/vendor/compiler_builtins/libm/src/math/fma.rs +++ b/vendor/compiler_builtins/libm/src/math/fma.rs @@ -49,6 +49,7 @@ fn mul(x: u64, y: u64) -> (u64, u64) { } #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn fma(x: f64, y: f64, z: f64) -> f64 { let x1p63: f64 = f64::from_bits(0x43e0000000000000); // 0x1p63 === 2 ^ 63 let x0_ffffff8p_63 = f64::from_bits(0x3bfffffff0000000); // 0x0.ffffff8p-63 @@ -82,7 +83,7 @@ pub fn fma(x: f64, y: f64, z: f64) -> f64 { if d > 0 { if d < 64 { zlo = nz.m << d; - zhi = nz.m >> 64 - d; + zhi = nz.m >> (64 - d); } else { zlo = 0; zhi = nz.m; @@ -90,7 +91,7 @@ pub fn fma(x: f64, y: f64, z: f64) -> f64 { d -= 64; if d == 0 { } else if d < 64 { - rlo = rhi << 64 - d | rlo >> d | ((rlo << 64 - d) != 0) as u64; + rlo = rhi << (64 - d) | rlo >> d | ((rlo << (64 - d)) != 0) as u64; rhi = rhi >> d; } else { rlo = 1; @@ -103,7 +104,7 @@ pub fn fma(x: f64, y: f64, z: f64) -> f64 { if d == 0 { zlo = nz.m; } else if d < 64 { - zlo = nz.m >> d | ((nz.m << 64 - d) != 0) as u64; + zlo = nz.m >> d | ((nz.m << (64 - d)) != 0) as u64; } else { zlo = 1; } @@ -135,7 +136,7 @@ pub fn fma(x: f64, y: f64, z: f64) -> f64 { e += 64; d = rhi.leading_zeros() as i32 - 1; /* note: d > 0 */ - rhi = rhi << d | rlo >> 64 - d | ((rlo << d) != 0) as u64; + rhi = rhi << d | rlo >> (64 - d) | ((rlo << d) != 0) as u64; } else if rlo != 0 { d = rlo.leading_zeros() as i32 - 1; if d < 0 { @@ -165,13 +166,13 @@ pub fn fma(x: f64, y: f64, z: f64) -> f64 { } if r == c { /* min normal after rounding, underflow depends - on arch behaviour which can be imitated by - a double to float conversion */ + on arch behaviour which can be imitated by + a double to float conversion */ let fltmin: f32 = (x0_ffffff8p_63 * f32::MIN_POSITIVE as f64 * r) as f32; return f64::MIN_POSITIVE / f32::MIN_POSITIVE as f64 * fltmin as f64; } /* one bit is lost when scaled, add another top bit to - only round once at conversion if it is inexact */ + only round once at conversion if it is inexact */ if (rhi << 53) != 0 { i = (rhi >> 1 | (rhi & 1) | 1 << 62) as i64; if sign != 0 { @@ -181,7 +182,7 @@ pub fn fma(x: f64, y: f64, z: f64) -> f64 { r = 2. * r - c; /* remove top bit */ /* raise underflow portably, such that it - cannot be optimized away */ + cannot be optimized away */ { let tiny: f64 = f64::MIN_POSITIVE / f32::MIN_POSITIVE as f64 * r; r += (tiny * tiny) * (r - r); @@ -190,7 +191,7 @@ pub fn fma(x: f64, y: f64, z: f64) -> f64 { } else { /* only round once when scaled */ d = 10; - i = ((rhi >> d | ((rhi << 64 - d) != 0) as u64) << d) as i64; + i = ((rhi >> d | ((rhi << (64 - d)) != 0) as u64) << d) as i64; if sign != 0 { i = -i; } diff --git a/vendor/compiler_builtins/libm/src/math/fmaf.rs b/vendor/compiler_builtins/libm/src/math/fmaf.rs index 25b04fc239..9e5a55f44b 100644 --- a/vendor/compiler_builtins/libm/src/math/fmaf.rs +++ b/vendor/compiler_builtins/libm/src/math/fmaf.rs @@ -41,6 +41,7 @@ use super::fenv::{ * rounding occurs. */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn fmaf(x: f32, y: f32, mut z: f32) -> f32 { let xy: f64; let mut result: f64; diff --git a/vendor/compiler_builtins/libm/src/math/fmod.rs b/vendor/compiler_builtins/libm/src/math/fmod.rs index 23f0c4846c..ecc9b39a5c 100644 --- a/vendor/compiler_builtins/libm/src/math/fmod.rs +++ b/vendor/compiler_builtins/libm/src/math/fmod.rs @@ -1,6 +1,7 @@ use core::u64; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn fmod(x: f64, y: f64) -> f64 { let mut uxi = x.to_bits(); let mut uyi = y.to_bits(); diff --git a/vendor/compiler_builtins/libm/src/math/fmodf.rs b/vendor/compiler_builtins/libm/src/math/fmodf.rs index d84cfeb01b..98f51f455b 100644 --- a/vendor/compiler_builtins/libm/src/math/fmodf.rs +++ b/vendor/compiler_builtins/libm/src/math/fmodf.rs @@ -2,6 +2,7 @@ use core::f32; use core::u32; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn fmodf(x: f32, y: f32) -> f32 { let mut uxi = x.to_bits(); let mut uyi = y.to_bits(); diff --git a/vendor/compiler_builtins/libm/src/math/hypot.rs b/vendor/compiler_builtins/libm/src/math/hypot.rs index f011415fdc..e53baf5399 100644 --- a/vendor/compiler_builtins/libm/src/math/hypot.rs +++ b/vendor/compiler_builtins/libm/src/math/hypot.rs @@ -19,6 +19,7 @@ fn sq(x: f64) -> (f64, f64) { } #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn hypot(mut x: f64, mut y: f64) -> f64 { let x1p700 = f64::from_bits(0x6bb0000000000000); // 0x1p700 === 2 ^ 700 let x1p_700 = f64::from_bits(0x1430000000000000); // 0x1p-700 === 2 ^ -700 @@ -71,5 +72,5 @@ pub fn hypot(mut x: f64, mut y: f64) -> f64 { } let (hx, lx) = sq(x); let (hy, ly) = sq(y); - return z * sqrt(ly + lx + hy + hx); + z * sqrt(ly + lx + hy + hx) } diff --git a/vendor/compiler_builtins/libm/src/math/hypotf.rs b/vendor/compiler_builtins/libm/src/math/hypotf.rs index d59710ada3..4636b8f1d8 100644 --- a/vendor/compiler_builtins/libm/src/math/hypotf.rs +++ b/vendor/compiler_builtins/libm/src/math/hypotf.rs @@ -3,6 +3,7 @@ use core::f32; use super::sqrtf; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn hypotf(mut x: f32, mut y: f32) -> f32 { let x1p90 = f32::from_bits(0x6c800000); // 0x1p90f === 2 ^ 90 let x1p_90 = f32::from_bits(0x12800000); // 0x1p-90f === 2 ^ -90 diff --git a/vendor/compiler_builtins/libm/src/math/k_cos.rs b/vendor/compiler_builtins/libm/src/math/k_cos.rs index 693950d1d4..8876fac214 100644 --- a/vendor/compiler_builtins/libm/src/math/k_cos.rs +++ b/vendor/compiler_builtins/libm/src/math/k_cos.rs @@ -52,6 +52,7 @@ const C6: f64 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */ // under FreeBSD, so don't pessimize things by forcibly clipping // any extra precision in w. #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn k_cos(x: f64, y: f64) -> f64 { let z = x * x; let w = z * z; diff --git a/vendor/compiler_builtins/libm/src/math/k_cosf.rs b/vendor/compiler_builtins/libm/src/math/k_cosf.rs index 4aa10c0f08..9b48e190dd 100644 --- a/vendor/compiler_builtins/libm/src/math/k_cosf.rs +++ b/vendor/compiler_builtins/libm/src/math/k_cosf.rs @@ -21,6 +21,7 @@ const C2: f64 = -0.00138867637746099294692; /* -0x16c087e80f1e27.0p-62 */ const C3: f64 = 0.0000243904487962774090654; /* 0x199342e0ee5069.0p-68 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn k_cosf(x: f64) -> f32 { let z = x * x; let w = z * z; diff --git a/vendor/compiler_builtins/libm/src/math/k_expo2.rs b/vendor/compiler_builtins/libm/src/math/k_expo2.rs index e295c7a534..0a9562eaea 100644 --- a/vendor/compiler_builtins/libm/src/math/k_expo2.rs +++ b/vendor/compiler_builtins/libm/src/math/k_expo2.rs @@ -5,6 +5,7 @@ const K: i32 = 2043; /* expf(x)/2 for x >= log(FLT_MAX), slightly better than 0.5f*expf(x/2)*expf(x/2) */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub(crate) fn k_expo2(x: f64) -> f64 { let k_ln2 = f64::from_bits(0x40962066151add8b); /* note that k is odd and scale*scale overflows */ diff --git a/vendor/compiler_builtins/libm/src/math/k_expo2f.rs b/vendor/compiler_builtins/libm/src/math/k_expo2f.rs index ec2a2c5e2b..68a7a50325 100644 --- a/vendor/compiler_builtins/libm/src/math/k_expo2f.rs +++ b/vendor/compiler_builtins/libm/src/math/k_expo2f.rs @@ -5,6 +5,7 @@ const K: i32 = 235; /* expf(x)/2 for x >= log(FLT_MAX), slightly better than 0.5f*expf(x/2)*expf(x/2) */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn k_expo2f(x: f32) -> f32 { let k_ln2 = f32::from_bits(0x4322e3bc); /* note that k is odd and scale*scale overflows */ diff --git a/vendor/compiler_builtins/libm/src/math/k_sin.rs b/vendor/compiler_builtins/libm/src/math/k_sin.rs index 3e07c35944..15718c4c92 100644 --- a/vendor/compiler_builtins/libm/src/math/k_sin.rs +++ b/vendor/compiler_builtins/libm/src/math/k_sin.rs @@ -44,6 +44,7 @@ const S6: f64 = 1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */ // then 3 2 // sin(x) = x + (S1*x + (x *(r-y/2)+y)) #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn k_sin(x: f64, y: f64, iy: i32) -> f64 { let z = x * x; let w = z * z; diff --git a/vendor/compiler_builtins/libm/src/math/k_sinf.rs b/vendor/compiler_builtins/libm/src/math/k_sinf.rs index 1c5f5f98a4..157fc104cc 100644 --- a/vendor/compiler_builtins/libm/src/math/k_sinf.rs +++ b/vendor/compiler_builtins/libm/src/math/k_sinf.rs @@ -21,6 +21,7 @@ const S3: f64 = -0.000198393348360966317347; /* -0x1a00f9e2cae774.0p-65 */ const S4: f64 = 0.0000027183114939898219064; /* 0x16cd878c3b46a7.0p-71 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn k_sinf(x: f64) -> f32 { let z = x * x; let w = z * z; diff --git a/vendor/compiler_builtins/libm/src/math/k_tan.rs b/vendor/compiler_builtins/libm/src/math/k_tan.rs index e9ba21499d..684e937b93 100644 --- a/vendor/compiler_builtins/libm/src/math/k_tan.rs +++ b/vendor/compiler_builtins/libm/src/math/k_tan.rs @@ -59,6 +59,7 @@ const PIO4: f64 = 7.85398163397448278999e-01; /* 3FE921FB, 54442D18 */ const PIO4_LO: f64 = 3.06161699786838301793e-17; /* 3C81A626, 33145C07 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn k_tan(mut x: f64, mut y: f64, odd: i32) -> f64 { let hx = (f64::to_bits(x) >> 32) as u32; let big = (hx & 0x7fffffff) >= 0x3FE59428; /* |x| >= 0.6744 */ diff --git a/vendor/compiler_builtins/libm/src/math/k_tanf.rs b/vendor/compiler_builtins/libm/src/math/k_tanf.rs index b9ccf2570f..96a5910070 100644 --- a/vendor/compiler_builtins/libm/src/math/k_tanf.rs +++ b/vendor/compiler_builtins/libm/src/math/k_tanf.rs @@ -20,6 +20,7 @@ const T: [f64; 6] = [ ]; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn k_tanf(x: f64, odd: bool) -> f32 { let z = x * x; /* diff --git a/vendor/compiler_builtins/libm/src/math/ldexp.rs b/vendor/compiler_builtins/libm/src/math/ldexp.rs new file mode 100644 index 0000000000..780ddfc116 --- /dev/null +++ b/vendor/compiler_builtins/libm/src/math/ldexp.rs @@ -0,0 +1,5 @@ +#[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] +pub fn ldexp(x: f64, n: i32) -> f64 { + super::scalbn(x, n) +} diff --git a/vendor/compiler_builtins/libm/src/math/ldexpf.rs b/vendor/compiler_builtins/libm/src/math/ldexpf.rs new file mode 100644 index 0000000000..70935a0024 --- /dev/null +++ b/vendor/compiler_builtins/libm/src/math/ldexpf.rs @@ -0,0 +1,5 @@ +#[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] +pub fn ldexpf(x: f32, n: i32) -> f32 { + super::scalbnf(x, n) +} diff --git a/vendor/compiler_builtins/libm/src/math/log.rs b/vendor/compiler_builtins/libm/src/math/log.rs index 48e9fa79a4..4126e413b7 100644 --- a/vendor/compiler_builtins/libm/src/math/log.rs +++ b/vendor/compiler_builtins/libm/src/math/log.rs @@ -71,6 +71,7 @@ const LG6: f64 = 1.531383769920937332e-01; /* 3FC39A09 D078C69F */ const LG7: f64 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn log(mut x: f64) -> f64 { let x1p54 = f64::from_bits(0x4350000000000000); // 0x1p54 === 2 ^ 54 @@ -113,5 +114,5 @@ pub fn log(mut x: f64) -> f64 { let t2: f64 = z * (LG1 + w * (LG3 + w * (LG5 + w * LG7))); let r: f64 = t2 + t1; let dk: f64 = k as f64; - return s * (hfsq + r) + dk * LN2_LO - hfsq + f + dk * LN2_HI; + s * (hfsq + r) + dk * LN2_LO - hfsq + f + dk * LN2_HI } diff --git a/vendor/compiler_builtins/libm/src/math/log10.rs b/vendor/compiler_builtins/libm/src/math/log10.rs index 7c7afefa34..c99696040a 100644 --- a/vendor/compiler_builtins/libm/src/math/log10.rs +++ b/vendor/compiler_builtins/libm/src/math/log10.rs @@ -32,6 +32,7 @@ const LG6: f64 = 1.531383769920937332e-01; /* 3FC39A09 D078C69F */ const LG7: f64 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn log10(mut x: f64) -> f64 { let x1p54 = f64::from_bits(0x4350000000000000); // 0x1p54 === 2 ^ 54 @@ -113,5 +114,5 @@ pub fn log10(mut x: f64) -> f64 { val_lo += (y - w) + val_hi; val_hi = w; - return val_lo + val_hi; + val_lo + val_hi } diff --git a/vendor/compiler_builtins/libm/src/math/log10f.rs b/vendor/compiler_builtins/libm/src/math/log10f.rs index 82b87c044b..9845cda5d9 100644 --- a/vendor/compiler_builtins/libm/src/math/log10f.rs +++ b/vendor/compiler_builtins/libm/src/math/log10f.rs @@ -26,6 +26,7 @@ const LG3: f32 = 0.28498786688; /* 0x91e9ee.0p-25 */ const LG4: f32 = 0.24279078841; /* 0xf89e26.0p-26 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn log10f(mut x: f32) -> f32 { let x1p25f = f32::from_bits(0x4c000000); // 0x1p25f === 2 ^ 25 @@ -87,5 +88,5 @@ pub fn log10f(mut x: f32) -> f32 { hi = f32::from_bits(ui); lo = f - hi - hfsq + s * (hfsq + r); dk = k as f32; - return dk * LOG10_2LO + (lo + hi) * IVLN10LO + lo * IVLN10HI + hi * IVLN10HI + dk * LOG10_2HI; + dk * LOG10_2LO + (lo + hi) * IVLN10LO + lo * IVLN10HI + hi * IVLN10HI + dk * LOG10_2HI } diff --git a/vendor/compiler_builtins/libm/src/math/log1p.rs b/vendor/compiler_builtins/libm/src/math/log1p.rs index f42669deea..cd7045ac97 100644 --- a/vendor/compiler_builtins/libm/src/math/log1p.rs +++ b/vendor/compiler_builtins/libm/src/math/log1p.rs @@ -66,6 +66,7 @@ const LG6: f64 = 1.531383769920937332e-01; /* 3FC39A09 D078C69F */ const LG7: f64 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn log1p(x: f64) -> f64 { let mut ui: u64 = x.to_bits(); let hfsq: f64; @@ -139,5 +140,5 @@ pub fn log1p(x: f64) -> f64 { t2 = z * (LG1 + w * (LG3 + w * (LG5 + w * LG7))); r = t2 + t1; dk = k as f64; - return s * (hfsq + r) + (dk * LN2_LO + c) - hfsq + f + dk * LN2_HI; + s * (hfsq + r) + (dk * LN2_LO + c) - hfsq + f + dk * LN2_HI } diff --git a/vendor/compiler_builtins/libm/src/math/log1pf.rs b/vendor/compiler_builtins/libm/src/math/log1pf.rs index e6e1c14c8c..8e9651357d 100644 --- a/vendor/compiler_builtins/libm/src/math/log1pf.rs +++ b/vendor/compiler_builtins/libm/src/math/log1pf.rs @@ -21,6 +21,7 @@ const LG3: f32 = 0.28498786688; /* 0x91e9ee.0p-25 */ const LG4: f32 = 0.24279078841; /* 0xf89e26.0p-26 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn log1pf(x: f32) -> f32 { let mut ui: u32 = x.to_bits(); let hfsq: f32; @@ -94,5 +95,5 @@ pub fn log1pf(x: f32) -> f32 { r = t2 + t1; hfsq = 0.5 * f * f; dk = k as f32; - return s * (hfsq + r) + (dk * LN2_LO + c) - hfsq + f + dk * LN2_HI; + s * (hfsq + r) + (dk * LN2_LO + c) - hfsq + f + dk * LN2_HI } diff --git a/vendor/compiler_builtins/libm/src/math/log2.rs b/vendor/compiler_builtins/libm/src/math/log2.rs index 35eb9bf72b..a3d43e55c2 100644 --- a/vendor/compiler_builtins/libm/src/math/log2.rs +++ b/vendor/compiler_builtins/libm/src/math/log2.rs @@ -30,6 +30,7 @@ const LG6: f64 = 1.531383769920937332e-01; /* 3FC39A09 D078C69F */ const LG7: f64 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn log2(mut x: f64) -> f64 { let x1p54 = f64::from_bits(0x4350000000000000); // 0x1p54 === 2 ^ 54 @@ -102,5 +103,5 @@ pub fn log2(mut x: f64) -> f64 { val_lo += (y - w) + val_hi; val_hi = w; - return val_lo + val_hi; + val_lo + val_hi } diff --git a/vendor/compiler_builtins/libm/src/math/log2f.rs b/vendor/compiler_builtins/libm/src/math/log2f.rs index 8684b142f8..53a37e5033 100644 --- a/vendor/compiler_builtins/libm/src/math/log2f.rs +++ b/vendor/compiler_builtins/libm/src/math/log2f.rs @@ -24,6 +24,7 @@ const LG3: f32 = 0.28498786688; /* 0x91e9ee.0p-25 */ const LG4: f32 = 0.24279078841; /* 0xf89e26.0p-26 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn log2f(mut x: f32) -> f32 { let x1p25f = f32::from_bits(0x4c000000); // 0x1p25f === 2 ^ 25 @@ -83,5 +84,5 @@ pub fn log2f(mut x: f32) -> f32 { ui &= 0xfffff000; hi = f32::from_bits(ui); lo = f - hi - hfsq + s * (hfsq + r); - return (lo + hi) * IVLN2LO + lo * IVLN2HI + hi * IVLN2HI + k as f32; + (lo + hi) * IVLN2LO + lo * IVLN2HI + hi * IVLN2HI + k as f32 } diff --git a/vendor/compiler_builtins/libm/src/math/logf.rs b/vendor/compiler_builtins/libm/src/math/logf.rs index 0951910417..95195601c2 100644 --- a/vendor/compiler_builtins/libm/src/math/logf.rs +++ b/vendor/compiler_builtins/libm/src/math/logf.rs @@ -22,6 +22,7 @@ const LG3: f32 = 0.28498786688; /* 0x91e9ee.0p-25 */ const LG4: f32 = 0.24279078841; /* 0xf89e26.0p-26 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn logf(mut x: f32) -> f32 { let x1p25 = f32::from_bits(0x4c000000); // 0x1p25f === 2 ^ 25 diff --git a/vendor/compiler_builtins/libm/src/math/mod.rs b/vendor/compiler_builtins/libm/src/math/mod.rs index e51b1511df..be0918ffdf 100644 --- a/vendor/compiler_builtins/libm/src/math/mod.rs +++ b/vendor/compiler_builtins/libm/src/math/mod.rs @@ -104,6 +104,8 @@ mod fmod; mod fmodf; mod hypot; mod hypotf; +mod ldexp; +mod ldexpf; mod log; mod log10; mod log10f; @@ -166,6 +168,8 @@ pub use self::fmod::fmod; pub use self::fmodf::fmodf; pub use self::hypot::hypot; pub use self::hypotf::hypotf; +pub use self::ldexp::ldexp; +pub use self::ldexpf::ldexpf; pub use self::log::log; pub use self::log10::log10; pub use self::log10f::log10f; diff --git a/vendor/compiler_builtins/libm/src/math/pow.rs b/vendor/compiler_builtins/libm/src/math/pow.rs index 329b3955d8..111d712ffc 100644 --- a/vendor/compiler_builtins/libm/src/math/pow.rs +++ b/vendor/compiler_builtins/libm/src/math/pow.rs @@ -90,6 +90,7 @@ const IVLN2_H: f64 = 1.44269502162933349609e+00; /* 0x3ff71547_60000000 =24b 1/l const IVLN2_L: f64 = 1.92596299112661746887e-08; /* 0x3e54ae0b_f85ddf44 =1/ln2 tail*/ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn pow(x: f64, y: f64) -> f64 { let t1: f64; let t2: f64; @@ -261,7 +262,7 @@ pub fn pow(x: f64, y: f64) -> f64 { } /* now |1-x| is TINY <= 2**-20, suffice to compute - log(x) by x-x^2/2+x^3/3-x^4/4 */ + log(x) by x-x^2/2+x^3/3-x^4/4 */ let t: f64 = ax - 1.0; /* t has 20 trailing zeros */ let w: f64 = (t * t) * (0.5 - t * (0.3333333333333333333333 - t * 0.25)); let u: f64 = IVLN2_H * t; /* ivln2_h has 21 sig. bits */ @@ -405,5 +406,229 @@ pub fn pow(x: f64, y: f64) -> f64 { z = with_set_high_word(z, j as u32); } - return s * z; + s * z +} + +#[cfg(test)] +mod tests { + extern crate core; + + use self::core::f64::consts::{E, PI}; + use self::core::f64::{EPSILON, INFINITY, MAX, MIN, MIN_POSITIVE, NAN, NEG_INFINITY}; + use super::pow; + + const POS_ZERO: &[f64] = &[0.0]; + const NEG_ZERO: &[f64] = &[-0.0]; + const POS_ONE: &[f64] = &[1.0]; + const NEG_ONE: &[f64] = &[-1.0]; + const POS_FLOATS: &[f64] = &[99.0 / 70.0, E, PI]; + const NEG_FLOATS: &[f64] = &[-99.0 / 70.0, -E, -PI]; + const POS_SMALL_FLOATS: &[f64] = &[(1.0 / 2.0), MIN_POSITIVE, EPSILON]; + const NEG_SMALL_FLOATS: &[f64] = &[-(1.0 / 2.0), -MIN_POSITIVE, -EPSILON]; + const POS_EVENS: &[f64] = &[2.0, 6.0, 8.0, 10.0, 22.0, 100.0, MAX]; + const NEG_EVENS: &[f64] = &[MIN, -100.0, -22.0, -10.0, -8.0, -6.0, -2.0]; + const POS_ODDS: &[f64] = &[3.0, 7.0]; + const NEG_ODDS: &[f64] = &[-7.0, -3.0]; + const NANS: &[f64] = &[NAN]; + const POS_INF: &[f64] = &[INFINITY]; + const NEG_INF: &[f64] = &[NEG_INFINITY]; + + const ALL: &[&[f64]] = &[ + POS_ZERO, + NEG_ZERO, + NANS, + NEG_SMALL_FLOATS, + POS_SMALL_FLOATS, + NEG_FLOATS, + POS_FLOATS, + NEG_EVENS, + POS_EVENS, + NEG_ODDS, + POS_ODDS, + NEG_INF, + POS_INF, + NEG_ONE, + POS_ONE, + ]; + const POS: &[&[f64]] = &[POS_ZERO, POS_ODDS, POS_ONE, POS_FLOATS, POS_EVENS, POS_INF]; + const NEG: &[&[f64]] = &[NEG_ZERO, NEG_ODDS, NEG_ONE, NEG_FLOATS, NEG_EVENS, NEG_INF]; + + fn pow_test(base: f64, exponent: f64, expected: f64) { + let res = pow(base, exponent); + assert!( + if expected.is_nan() { + res.is_nan() + } else { + pow(base, exponent) == expected + }, + "{} ** {} was {} instead of {}", + base, + exponent, + res, + expected + ); + } + + fn test_sets_as_base(sets: &[&[f64]], exponent: f64, expected: f64) { + sets.iter() + .for_each(|s| s.iter().for_each(|val| pow_test(*val, exponent, expected))); + } + + fn test_sets_as_exponent(base: f64, sets: &[&[f64]], expected: f64) { + sets.iter() + .for_each(|s| s.iter().for_each(|val| pow_test(base, *val, expected))); + } + + fn test_sets(sets: &[&[f64]], computed: &Fn(f64) -> f64, expected: &Fn(f64) -> f64) { + sets.iter().for_each(|s| { + s.iter().for_each(|val| { + let exp = expected(*val); + let res = computed(*val); + + assert!( + if exp.is_nan() { + res.is_nan() + } else { + exp == res + }, + "test for {} was {} instead of {}", + val, + res, + exp + ); + }) + }); + } + + #[test] + fn zero_as_exponent() { + test_sets_as_base(ALL, 0.0, 1.0); + test_sets_as_base(ALL, -0.0, 1.0); + } + + #[test] + fn one_as_base() { + test_sets_as_exponent(1.0, ALL, 1.0); + } + + #[test] + fn nan_inputs() { + // NAN as the base: + // (NAN ^ anything *but 0* should be NAN) + test_sets_as_exponent(NAN, &ALL[2..], NAN); + + // NAN as the exponent: + // (anything *but 1* ^ NAN should be NAN) + test_sets_as_base(&ALL[..(ALL.len() - 2)], NAN, NAN); + } + + #[test] + fn infinity_as_base() { + // Positive Infinity as the base: + // (+Infinity ^ positive anything but 0 and NAN should be +Infinity) + test_sets_as_exponent(INFINITY, &POS[1..], INFINITY); + + // (+Infinity ^ negative anything except 0 and NAN should be 0.0) + test_sets_as_exponent(INFINITY, &NEG[1..], 0.0); + + // Negative Infinity as the base: + // (-Infinity ^ positive odd ints should be -Infinity) + test_sets_as_exponent(NEG_INFINITY, &[POS_ODDS], NEG_INFINITY); + + // (-Infinity ^ anything but odd ints should be == -0 ^ (-anything)) + // We can lump in pos/neg odd ints here because they don't seem to + // cause panics (div by zero) in release mode (I think). + test_sets(ALL, &|v: f64| pow(NEG_INFINITY, v), &|v: f64| pow(-0.0, -v)); + } + + #[test] + fn infinity_as_exponent() { + // Positive/Negative base greater than 1: + // (pos/neg > 1 ^ Infinity should be Infinity - note this excludes NAN as the base) + test_sets_as_base(&ALL[5..(ALL.len() - 2)], INFINITY, INFINITY); + + // (pos/neg > 1 ^ -Infinity should be 0.0) + test_sets_as_base(&ALL[5..ALL.len() - 2], NEG_INFINITY, 0.0); + + // Positive/Negative base less than 1: + let base_below_one = &[POS_ZERO, NEG_ZERO, NEG_SMALL_FLOATS, POS_SMALL_FLOATS]; + + // (pos/neg < 1 ^ Infinity should be 0.0 - this also excludes NAN as the base) + test_sets_as_base(base_below_one, INFINITY, 0.0); + + // (pos/neg < 1 ^ -Infinity should be Infinity) + test_sets_as_base(base_below_one, NEG_INFINITY, INFINITY); + + // Positive/Negative 1 as the base: + // (pos/neg 1 ^ Infinity should be 1) + test_sets_as_base(&[NEG_ONE, POS_ONE], INFINITY, 1.0); + + // (pos/neg 1 ^ -Infinity should be 1) + test_sets_as_base(&[NEG_ONE, POS_ONE], NEG_INFINITY, 1.0); + } + + #[test] + fn zero_as_base() { + // Positive Zero as the base: + // (+0 ^ anything positive but 0 and NAN should be +0) + test_sets_as_exponent(0.0, &POS[1..], 0.0); + + // (+0 ^ anything negative but 0 and NAN should be Infinity) + // (this should panic because we're dividing by zero) + test_sets_as_exponent(0.0, &NEG[1..], INFINITY); + + // Negative Zero as the base: + // (-0 ^ anything positive but 0, NAN, and odd ints should be +0) + test_sets_as_exponent(-0.0, &POS[3..], 0.0); + + // (-0 ^ anything negative but 0, NAN, and odd ints should be Infinity) + // (should panic because of divide by zero) + test_sets_as_exponent(-0.0, &NEG[3..], INFINITY); + + // (-0 ^ positive odd ints should be -0) + test_sets_as_exponent(-0.0, &[POS_ODDS], -0.0); + + // (-0 ^ negative odd ints should be -Infinity) + // (should panic because of divide by zero) + test_sets_as_exponent(-0.0, &[NEG_ODDS], NEG_INFINITY); + } + + #[test] + fn special_cases() { + // One as the exponent: + // (anything ^ 1 should be anything - i.e. the base) + test_sets(ALL, &|v: f64| pow(v, 1.0), &|v: f64| v); + + // Negative One as the exponent: + // (anything ^ -1 should be 1/anything) + test_sets(ALL, &|v: f64| pow(v, -1.0), &|v: f64| 1.0 / v); + + // Factoring -1 out: + // (negative anything ^ integer should be (-1 ^ integer) * (positive anything ^ integer)) + &[POS_ZERO, NEG_ZERO, POS_ONE, NEG_ONE, POS_EVENS, NEG_EVENS] + .iter() + .for_each(|int_set| { + int_set.iter().for_each(|int| { + test_sets(ALL, &|v: f64| pow(-v, *int), &|v: f64| { + pow(-1.0, *int) * pow(v, *int) + }); + }) + }); + + // Negative base (imaginary results): + // (-anything except 0 and Infinity ^ non-integer should be NAN) + &NEG[1..(NEG.len() - 1)].iter().for_each(|set| { + set.iter().for_each(|val| { + test_sets(&ALL[3..7], &|v: f64| pow(*val, v), &|_| NAN); + }) + }); + } + + #[test] + fn normal_cases() { + assert_eq!(pow(2.0, 20.0), (1 << 20) as f64); + assert_eq!(pow(-1.0, 9.0), -1.0); + assert!(pow(-1.0, 2.2).is_nan()); + assert!(pow(-1.0, -1.14).is_nan()); + } } diff --git a/vendor/compiler_builtins/libm/src/math/powf.rs b/vendor/compiler_builtins/libm/src/math/powf.rs index 8d0afe6693..015bade86c 100644 --- a/vendor/compiler_builtins/libm/src/math/powf.rs +++ b/vendor/compiler_builtins/libm/src/math/powf.rs @@ -44,6 +44,7 @@ const IVLN2_H: f32 = 1.4426879883e+00; const IVLN2_L: f32 = 7.0526075433e-06; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn powf(x: f32, y: f32) -> f32 { let mut z: f32; let mut ax: f32; @@ -135,12 +136,12 @@ pub fn powf(x: f32, y: f32) -> f32 { return x * x; } - if hy == 0x3f000000 { - /* y is 0.5 */ - if hx >= 0 { - /* x >= +0 */ - return sqrtf(x); - } + if hy == 0x3f000000 + /* y is 0.5 */ + && hx >= 0 + { + /* x >= +0 */ + return sqrtf(x); } ax = fabsf(x); @@ -197,7 +198,7 @@ pub fn powf(x: f32, y: f32) -> f32 { } /* now |1-x| is TINY <= 2**-20, suffice to compute - log(x) by x-x^2/2+x^3/3-x^4/4 */ + log(x) by x-x^2/2+x^3/3-x^4/4 */ t = ax - 1.; /* t has 20 trailing zeros */ w = (t * t) * (0.5 - t * (0.333333333333 - t * 0.25)); u = IVLN2_H * t; /* IVLN2_H has 16 sig. bits */ @@ -295,11 +296,11 @@ pub fn powf(x: f32, y: f32) -> f32 { /* z < -150 */ // FIXME: check should be (uint32_t)j > 0xc3160000 return sn * TINY * TINY; /* underflow */ - } else if j as u32 == 0xc3160000 { - /* z == -150 */ - if p_l <= z - p_h { - return sn * TINY * TINY; /* underflow */ - } + } else if j as u32 == 0xc3160000 + /* z == -150 */ + && p_l <= z - p_h + { + return sn * TINY * TINY; /* underflow */ } /* @@ -338,5 +339,5 @@ pub fn powf(x: f32, y: f32) -> f32 { } else { z = f32::from_bits(j as u32); } - return sn * z; + sn * z } diff --git a/vendor/compiler_builtins/libm/src/math/rem_pio2.rs b/vendor/compiler_builtins/libm/src/math/rem_pio2.rs index 5c1685877b..951dd08b42 100644 --- a/vendor/compiler_builtins/libm/src/math/rem_pio2.rs +++ b/vendor/compiler_builtins/libm/src/math/rem_pio2.rs @@ -10,7 +10,6 @@ // ==================================================== // // Optimized by Bruce D. Evans. */ - use super::rem_pio2_large; // #if FLT_EVAL_METHOD==0 || FLT_EVAL_METHOD==1 @@ -43,6 +42,7 @@ const PIO2_3T: f64 = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */ // // caller must handle the case when reduction is not needed: |x| ~<= pi/4 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn rem_pio2(x: f64) -> (i32, f64, f64) { let x1p24 = f64::from_bits(0x4170000000000000); @@ -78,7 +78,7 @@ pub fn rem_pio2(x: f64) -> (i32, f64, f64) { } } let y1 = (r - y0) - w; - return (n, y0, y1); + (n, y0, y1) } if ix <= 0x400f6a7a { @@ -100,18 +100,16 @@ pub fn rem_pio2(x: f64) -> (i32, f64, f64) { let y1 = (z - y0) + PIO2_1T; return (-1, y0, y1); } + } else if sign == 0 { + let z = x - 2.0 * PIO2_1; + let y0 = z - 2.0 * PIO2_1T; + let y1 = (z - y0) - 2.0 * PIO2_1T; + return (2, y0, y1); } else { - if sign == 0 { - let z = x - 2.0 * PIO2_1; - let y0 = z - 2.0 * PIO2_1T; - let y1 = (z - y0) - 2.0 * PIO2_1T; - return (2, y0, y1); - } else { - let z = x + 2.0 * PIO2_1; - let y0 = z + 2.0 * PIO2_1T; - let y1 = (z - y0) + 2.0 * PIO2_1T; - return (-2, y0, y1); - } + let z = x + 2.0 * PIO2_1; + let y0 = z + 2.0 * PIO2_1T; + let y1 = (z - y0) + 2.0 * PIO2_1T; + return (-2, y0, y1); } } if ix <= 0x401c463b { @@ -185,5 +183,5 @@ pub fn rem_pio2(x: f64) -> (i32, f64, f64) { if sign != 0 { return (-n, -ty[0], -ty[1]); } - return (n, ty[0], ty[1]); + (n, ty[0], ty[1]) } diff --git a/vendor/compiler_builtins/libm/src/math/rem_pio2_large.rs b/vendor/compiler_builtins/libm/src/math/rem_pio2_large.rs index 4d9146af9d..8bab485695 100644 --- a/vendor/compiler_builtins/libm/src/math/rem_pio2_large.rs +++ b/vendor/compiler_builtins/libm/src/math/rem_pio2_large.rs @@ -223,6 +223,7 @@ const PIO2: [f64; 8] = [ /// more accurately, = 0 mod 8 ). Thus the number of operations are /// independent of the exponent of the input. #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn rem_pio2_large(x: &[f64], y: &mut [f64], e0: i32, prec: usize) -> i32 { let x1p24 = f64::from_bits(0x4170000000000000); // 0x1p24 === 2 ^ 24 let x1p_24 = f64::from_bits(0x3e70000000000000); // 0x1p_24 === 2 ^ (-24) diff --git a/vendor/compiler_builtins/libm/src/math/rem_pio2f.rs b/vendor/compiler_builtins/libm/src/math/rem_pio2f.rs index 5e7a7d4390..054c311841 100644 --- a/vendor/compiler_builtins/libm/src/math/rem_pio2f.rs +++ b/vendor/compiler_builtins/libm/src/math/rem_pio2f.rs @@ -32,6 +32,7 @@ const PIO2_1T: f64 = 1.58932547735281966916e-08; /* 0x3E5110b4, 0x611A6263 */ /// use double precision for everything except passing x /// use __rem_pio2_large() for large x #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn rem_pio2f(x: f32) -> (i32, f64) { let x64 = x as f64; diff --git a/vendor/compiler_builtins/libm/src/math/round.rs b/vendor/compiler_builtins/libm/src/math/round.rs index 1a6e754489..9a9723cfbb 100644 --- a/vendor/compiler_builtins/libm/src/math/round.rs +++ b/vendor/compiler_builtins/libm/src/math/round.rs @@ -3,6 +3,7 @@ use core::f64; const TOINT: f64 = 1.0 / f64::EPSILON; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn round(mut x: f64) -> f64 { let (f, i) = (x, x.to_bits()); let e: u64 = i >> 52 & 0x7ff; diff --git a/vendor/compiler_builtins/libm/src/math/roundf.rs b/vendor/compiler_builtins/libm/src/math/roundf.rs index 7dd79557a9..839d9469a4 100644 --- a/vendor/compiler_builtins/libm/src/math/roundf.rs +++ b/vendor/compiler_builtins/libm/src/math/roundf.rs @@ -3,6 +3,7 @@ use core::f32; const TOINT: f32 = 1.0 / f32::EPSILON; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn roundf(mut x: f32) -> f32 { let i = x.to_bits(); let e: u32 = i >> 23 & 0xff; diff --git a/vendor/compiler_builtins/libm/src/math/scalbn.rs b/vendor/compiler_builtins/libm/src/math/scalbn.rs index ad81072ddc..d8c8409ac1 100644 --- a/vendor/compiler_builtins/libm/src/math/scalbn.rs +++ b/vendor/compiler_builtins/libm/src/math/scalbn.rs @@ -1,4 +1,5 @@ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn scalbn(x: f64, mut n: i32) -> f64 { let x1p1023 = f64::from_bits(0x7fe0000000000000); // 0x1p1023 === 2 ^ 1023 let x1p53 = f64::from_bits(0x4340000000000000); // 0x1p53 === 2 ^ 53 @@ -18,7 +19,7 @@ pub fn scalbn(x: f64, mut n: i32) -> f64 { } } else if n < -1022 { /* make sure final n < -53 to avoid double - rounding in the subnormal range */ + rounding in the subnormal range */ y *= x1p_1022 * x1p53; n += 1022 - 53; if n < -1022 { diff --git a/vendor/compiler_builtins/libm/src/math/scalbnf.rs b/vendor/compiler_builtins/libm/src/math/scalbnf.rs index 901497e5e5..4e9771175d 100644 --- a/vendor/compiler_builtins/libm/src/math/scalbnf.rs +++ b/vendor/compiler_builtins/libm/src/math/scalbnf.rs @@ -1,4 +1,5 @@ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn scalbnf(mut x: f32, mut n: i32) -> f32 { let x1p127 = f32::from_bits(0x7f000000); // 0x1p127f === 2 ^ 127 let x1p_126 = f32::from_bits(0x800000); // 0x1p-126f === 2 ^ -126 diff --git a/vendor/compiler_builtins/libm/src/math/sin.rs b/vendor/compiler_builtins/libm/src/math/sin.rs index e749094e66..b730744164 100644 --- a/vendor/compiler_builtins/libm/src/math/sin.rs +++ b/vendor/compiler_builtins/libm/src/math/sin.rs @@ -41,6 +41,7 @@ use super::{k_cos, k_sin, rem_pio2}; // Accuracy: // TRIG(x) returns trig(x) nearly rounded #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn sin(x: f64) -> f64 { let x1p120 = f64::from_bits(0x4770000000000000); // 0x1p120f === 2 ^ 120 diff --git a/vendor/compiler_builtins/libm/src/math/sinf.rs b/vendor/compiler_builtins/libm/src/math/sinf.rs index c9b02bcdc5..0c31099edd 100644 --- a/vendor/compiler_builtins/libm/src/math/sinf.rs +++ b/vendor/compiler_builtins/libm/src/math/sinf.rs @@ -25,6 +25,7 @@ const S3_PIO2: f64 = 3. * FRAC_PI_2; /* 0x4012D97C, 0x7F3321D2 */ const S4_PIO2: f64 = 4. * FRAC_PI_2; /* 0x401921FB, 0x54442D18 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn sinf(x: f32) -> f32 { let x64 = x as f64; @@ -87,7 +88,7 @@ pub fn sinf(x: f32) -> f32 { match n & 3 { 0 => k_sinf(y), 1 => k_cosf(y), - 2 => return k_sinf(-y), + 2 => k_sinf(-y), _ => -k_cosf(y), } } diff --git a/vendor/compiler_builtins/libm/src/math/sinh.rs b/vendor/compiler_builtins/libm/src/math/sinh.rs index 684e8e3098..d36de66c1c 100644 --- a/vendor/compiler_builtins/libm/src/math/sinh.rs +++ b/vendor/compiler_builtins/libm/src/math/sinh.rs @@ -5,6 +5,7 @@ use super::{expm1, expo2}; // = x + x^3/6 + o(x^5) // #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn sinh(x: f64) -> f64 { // union {double f; uint64_t i;} u = {.f = x}; // uint32_t w; @@ -45,5 +46,5 @@ pub fn sinh(x: f64) -> f64 { /* |x| > log(DBL_MAX) or nan */ /* note: the result is stored to handle overflow */ t = 2.0 * h * expo2(absx); - return t; + t } diff --git a/vendor/compiler_builtins/libm/src/math/sinhf.rs b/vendor/compiler_builtins/libm/src/math/sinhf.rs index 90c4b93128..fd0b2bfc89 100644 --- a/vendor/compiler_builtins/libm/src/math/sinhf.rs +++ b/vendor/compiler_builtins/libm/src/math/sinhf.rs @@ -2,6 +2,7 @@ use super::expm1f; use super::k_expo2f; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn sinhf(x: f32) -> f32 { let mut h = 0.5f32; let mut ix = x.to_bits(); diff --git a/vendor/compiler_builtins/libm/src/math/sqrt.rs b/vendor/compiler_builtins/libm/src/math/sqrt.rs index b2387a26e7..14404d4eb1 100644 --- a/vendor/compiler_builtins/libm/src/math/sqrt.rs +++ b/vendor/compiler_builtins/libm/src/math/sqrt.rs @@ -77,10 +77,12 @@ */ use core::f64; +use core::num::Wrapping; const TINY: f64 = 1.0e-300; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn sqrt(x: f64) -> f64 { // On wasm32 we know that LLVM's intrinsic will compile to an optimized // `f64.sqrt` native instruction, so we can leverage this for both code size @@ -95,21 +97,21 @@ pub fn sqrt(x: f64) -> f64 { } } let mut z: f64; - let sign: u32 = 0x80000000; + let sign: Wrapping = Wrapping(0x80000000); let mut ix0: i32; let mut s0: i32; let mut q: i32; let mut m: i32; let mut t: i32; let mut i: i32; - let mut r: u32; - let mut t1: u32; - let mut s1: u32; - let mut ix1: u32; - let mut q1: u32; + let mut r: Wrapping; + let mut t1: Wrapping; + let mut s1: Wrapping; + let mut ix1: Wrapping; + let mut q1: Wrapping; ix0 = (x.to_bits() >> 32) as i32; - ix1 = x.to_bits() as u32; + ix1 = Wrapping(x.to_bits() as u32); /* take care of Inf and NaN */ if (ix0 & 0x7ff00000) == 0x7ff00000 { @@ -117,7 +119,7 @@ pub fn sqrt(x: f64) -> f64 { } /* take care of zero */ if ix0 <= 0 { - if ((ix0 & !(sign as i32)) | ix1 as i32) == 0 { + if ((ix0 & !(sign.0 as i32)) | ix1.0 as i32) == 0 { return x; /* sqrt(+-0) = +-0 */ } if ix0 < 0 { @@ -130,7 +132,7 @@ pub fn sqrt(x: f64) -> f64 { /* subnormal x */ while ix0 == 0 { m -= 21; - ix0 |= (ix1 >> 11) as i32; + ix0 |= (ix1 >> 11).0 as i32; ix1 <<= 21; } i = 0; @@ -139,46 +141,46 @@ pub fn sqrt(x: f64) -> f64 { ix0 <<= 1; } m -= i - 1; - ix0 |= (ix1 >> (32 - i)) as i32; - ix1 <<= i; + ix0 |= (ix1 >> (32 - i) as usize).0 as i32; + ix1 = ix1 << i as usize; } m -= 1023; /* unbias exponent */ ix0 = (ix0 & 0x000fffff) | 0x00100000; if (m & 1) == 1 { /* odd m, double x to make it even */ - ix0 += ix0 + ((ix1 & sign) >> 31) as i32; + ix0 += ix0 + ((ix1 & sign) >> 31).0 as i32; ix1 += ix1; } m >>= 1; /* m = [m/2] */ /* generate sqrt(x) bit by bit */ - ix0 += ix0 + ((ix1 & sign) >> 31) as i32; + ix0 += ix0 + ((ix1 & sign) >> 31).0 as i32; ix1 += ix1; q = 0; /* [q,q1] = sqrt(x) */ - q1 = 0; + q1 = Wrapping(0); s0 = 0; - s1 = 0; - r = 0x00200000; /* r = moving bit from right to left */ + s1 = Wrapping(0); + r = Wrapping(0x00200000); /* r = moving bit from right to left */ - while r != 0 { - t = s0 + r as i32; + while r != Wrapping(0) { + t = s0 + r.0 as i32; if t <= ix0 { - s0 = t + r as i32; + s0 = t + r.0 as i32; ix0 -= t; - q += r as i32; + q += r.0 as i32; } - ix0 += ix0 + ((ix1 & sign) >> 31) as i32; + ix0 += ix0 + ((ix1 & sign) >> 31).0 as i32; ix1 += ix1; r >>= 1; } r = sign; - while r != 0 { + while r != Wrapping(0) { t1 = s1 + r; t = s0; if t < ix0 || (t == ix0 && t1 <= ix1) { s1 = t1 + r; - if (t1 & sign) == sign && (s1 & sign) == 0 { + if (t1 & sign) == sign && (s1 & sign) == Wrapping(0) { s0 += 1; } ix0 -= t; @@ -188,26 +190,26 @@ pub fn sqrt(x: f64) -> f64 { ix1 -= t1; q1 += r; } - ix0 += ix0 + ((ix1 & sign) >> 31) as i32; + ix0 += ix0 + ((ix1 & sign) >> 31).0 as i32; ix1 += ix1; r >>= 1; } /* use floating add to find out rounding direction */ - if (ix0 as u32 | ix1) != 0 { + if (ix0 as u32 | ix1.0) != 0 { z = 1.0 - TINY; /* raise inexact flag */ if z >= 1.0 { z = 1.0 + TINY; - if q1 == 0xffffffff { - q1 = 0; + if q1.0 == 0xffffffff { + q1 = Wrapping(0); q += 1; } else if z > 1.0 { - if q1 == 0xfffffffe { + if q1.0 == 0xfffffffe { q += 1; } - q1 += 2; + q1 += Wrapping(2); } else { - q1 += q1 & 1; + q1 += q1 & Wrapping(1); } } } @@ -217,5 +219,5 @@ pub fn sqrt(x: f64) -> f64 { ix1 |= sign; } ix0 += m << 20; - f64::from_bits((ix0 as u64) << 32 | ix1 as u64) + f64::from_bits((ix0 as u64) << 32 | ix1.0 as u64) } diff --git a/vendor/compiler_builtins/libm/src/math/sqrtf.rs b/vendor/compiler_builtins/libm/src/math/sqrtf.rs index 33cafbcbda..b9365c6171 100644 --- a/vendor/compiler_builtins/libm/src/math/sqrtf.rs +++ b/vendor/compiler_builtins/libm/src/math/sqrtf.rs @@ -16,6 +16,7 @@ const TINY: f32 = 1.0e-30; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn sqrtf(x: f32) -> f32 { // On wasm32 we know that LLVM's intrinsic will compile to an optimized // `f32.sqrt` native instruction, so we can leverage this for both code size diff --git a/vendor/compiler_builtins/libm/src/math/tan.rs b/vendor/compiler_builtins/libm/src/math/tan.rs index 5a5f178a51..e5c94cbb15 100644 --- a/vendor/compiler_builtins/libm/src/math/tan.rs +++ b/vendor/compiler_builtins/libm/src/math/tan.rs @@ -40,6 +40,7 @@ use super::{k_tan, rem_pio2}; // Accuracy: // TRIG(x) returns trig(x) nearly rounded #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn tan(x: f64) -> f64 { let x1p120 = f32::from_bits(0x7b800000); // 0x1p120f === 2 ^ 120 diff --git a/vendor/compiler_builtins/libm/src/math/tanf.rs b/vendor/compiler_builtins/libm/src/math/tanf.rs index 15a462d4e1..c286cdeb41 100644 --- a/vendor/compiler_builtins/libm/src/math/tanf.rs +++ b/vendor/compiler_builtins/libm/src/math/tanf.rs @@ -25,6 +25,7 @@ const T3_PIO2: f64 = 3. * FRAC_PI_2; /* 0x4012D97C, 0x7F3321D2 */ const T4_PIO2: f64 = 4. * FRAC_PI_2; /* 0x401921FB, 0x54442D18 */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn tanf(x: f32) -> f32 { let x64 = x as f64; diff --git a/vendor/compiler_builtins/libm/src/math/tanh.rs b/vendor/compiler_builtins/libm/src/math/tanh.rs index 1c3dd0be43..75d695cf7e 100644 --- a/vendor/compiler_builtins/libm/src/math/tanh.rs +++ b/vendor/compiler_builtins/libm/src/math/tanh.rs @@ -5,6 +5,7 @@ use super::expm1; * = (1 - exp(-2*x))/(exp(-2*x) - 1 + 2) */ #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn tanh(mut x: f64) -> f64 { let mut uf: f64 = x; let mut ui: u64 = f64::to_bits(uf); diff --git a/vendor/compiler_builtins/libm/src/math/tanhf.rs b/vendor/compiler_builtins/libm/src/math/tanhf.rs index 98a1b60c29..ac4657b5ab 100644 --- a/vendor/compiler_builtins/libm/src/math/tanhf.rs +++ b/vendor/compiler_builtins/libm/src/math/tanhf.rs @@ -1,6 +1,7 @@ use super::expm1f; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn tanhf(mut x: f32) -> f32 { /* x = |x| */ let mut ix = x.to_bits(); diff --git a/vendor/compiler_builtins/libm/src/math/trunc.rs b/vendor/compiler_builtins/libm/src/math/trunc.rs index 8eecfcf538..1ee46fc7da 100644 --- a/vendor/compiler_builtins/libm/src/math/trunc.rs +++ b/vendor/compiler_builtins/libm/src/math/trunc.rs @@ -1,6 +1,7 @@ use core::f64; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn trunc(x: f64) -> f64 { // On wasm32 we know that LLVM's intrinsic will compile to an optimized // `f64.trunc` native instruction, so we can leverage this for both code size diff --git a/vendor/compiler_builtins/libm/src/math/truncf.rs b/vendor/compiler_builtins/libm/src/math/truncf.rs index 0d74fea9c9..f933832690 100644 --- a/vendor/compiler_builtins/libm/src/math/truncf.rs +++ b/vendor/compiler_builtins/libm/src/math/truncf.rs @@ -1,6 +1,7 @@ use core::f32; #[inline] +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn truncf(x: f32) -> f32 { // On wasm32 we know that LLVM's intrinsic will compile to an optimized // `f32.trunc` native instruction, so we can leverage this for both code size diff --git a/vendor/compiler_builtins/src/arm_linux.rs b/vendor/compiler_builtins/src/arm_linux.rs index 5ed379fa1e..e710c1ab98 100644 --- a/vendor/compiler_builtins/src/arm_linux.rs +++ b/vendor/compiler_builtins/src/arm_linux.rs @@ -4,11 +4,11 @@ use core::mem; // Kernel-provided user-mode helper functions: // https://www.kernel.org/doc/Documentation/arm/kernel_user_helpers.txt unsafe fn __kuser_cmpxchg(oldval: u32, newval: u32, ptr: *mut u32) -> bool { - let f: extern "C" fn (u32, u32, *mut u32) -> u32 = mem::transmute(0xffff0fc0u32); + let f: extern "C" fn(u32, u32, *mut u32) -> u32 = mem::transmute(0xffff0fc0u32); f(oldval, newval, ptr) == 0 } unsafe fn __kuser_memory_barrier() { - let f: extern "C" fn () = mem::transmute(0xffff0fa0u32); + let f: extern "C" fn() = mem::transmute(0xffff0fa0u32); f(); } @@ -94,7 +94,7 @@ macro_rules! atomic_rmw { pub unsafe extern "C" fn $name(ptr: *mut $ty, val: $ty) -> $ty { atomic_rmw(ptr, |x| $op(x as $ty, val) as u32) as $ty } - } + }; } macro_rules! atomic_cmpxchg { ($name:ident, $ty:ty) => { @@ -102,16 +102,20 @@ macro_rules! atomic_cmpxchg { pub unsafe extern "C" fn $name(ptr: *mut $ty, oldval: $ty, newval: $ty) -> $ty { atomic_cmpxchg(ptr, oldval as u32, newval as u32) as $ty } - } + }; } atomic_rmw!(__sync_fetch_and_add_1, u8, |a: u8, b: u8| a.wrapping_add(b)); -atomic_rmw!(__sync_fetch_and_add_2, u16, |a: u16, b: u16| a.wrapping_add(b)); -atomic_rmw!(__sync_fetch_and_add_4, u32, |a: u32, b: u32| a.wrapping_add(b)); +atomic_rmw!(__sync_fetch_and_add_2, u16, |a: u16, b: u16| a + .wrapping_add(b)); +atomic_rmw!(__sync_fetch_and_add_4, u32, |a: u32, b: u32| a + .wrapping_add(b)); atomic_rmw!(__sync_fetch_and_sub_1, u8, |a: u8, b: u8| a.wrapping_sub(b)); -atomic_rmw!(__sync_fetch_and_sub_2, u16, |a: u16, b: u16| a.wrapping_sub(b)); -atomic_rmw!(__sync_fetch_and_sub_4, u32, |a: u32, b: u32| a.wrapping_sub(b)); +atomic_rmw!(__sync_fetch_and_sub_2, u16, |a: u16, b: u16| a + .wrapping_sub(b)); +atomic_rmw!(__sync_fetch_and_sub_4, u32, |a: u32, b: u32| a + .wrapping_sub(b)); atomic_rmw!(__sync_fetch_and_and_1, u8, |a: u8, b: u8| a & b); atomic_rmw!(__sync_fetch_and_and_2, u16, |a: u16, b: u16| a & b); @@ -129,21 +133,69 @@ atomic_rmw!(__sync_fetch_and_nand_1, u8, |a: u8, b: u8| !(a & b)); atomic_rmw!(__sync_fetch_and_nand_2, u16, |a: u16, b: u16| !(a & b)); atomic_rmw!(__sync_fetch_and_nand_4, u32, |a: u32, b: u32| !(a & b)); -atomic_rmw!(__sync_fetch_and_max_1, i8, |a: i8, b: i8| if a > b { a } else { b }); -atomic_rmw!(__sync_fetch_and_max_2, i16, |a: i16, b: i16| if a > b { a } else { b }); -atomic_rmw!(__sync_fetch_and_max_4, i32, |a: i32, b: i32| if a > b { a } else { b }); - -atomic_rmw!(__sync_fetch_and_umax_1, u8, |a: u8, b: u8| if a > b { a } else { b }); -atomic_rmw!(__sync_fetch_and_umax_2, u16, |a: u16, b: u16| if a > b { a } else { b }); -atomic_rmw!(__sync_fetch_and_umax_4, u32, |a: u32, b: u32| if a > b { a } else { b }); - -atomic_rmw!(__sync_fetch_and_min_1, i8, |a: i8, b: i8| if a < b { a } else { b }); -atomic_rmw!(__sync_fetch_and_min_2, i16, |a: i16, b: i16| if a < b { a } else { b }); -atomic_rmw!(__sync_fetch_and_min_4, i32, |a: i32, b: i32| if a < b { a } else { b }); - -atomic_rmw!(__sync_fetch_and_umin_1, u8, |a: u8, b: u8| if a < b { a } else { b }); -atomic_rmw!(__sync_fetch_and_umin_2, u16, |a: u16, b: u16| if a < b { a } else { b }); -atomic_rmw!(__sync_fetch_and_umin_4, u32, |a: u32, b: u32| if a < b { a } else { b }); +atomic_rmw!(__sync_fetch_and_max_1, i8, |a: i8, b: i8| if a > b { + a +} else { + b +}); +atomic_rmw!(__sync_fetch_and_max_2, i16, |a: i16, b: i16| if a > b { + a +} else { + b +}); +atomic_rmw!(__sync_fetch_and_max_4, i32, |a: i32, b: i32| if a > b { + a +} else { + b +}); + +atomic_rmw!(__sync_fetch_and_umax_1, u8, |a: u8, b: u8| if a > b { + a +} else { + b +}); +atomic_rmw!(__sync_fetch_and_umax_2, u16, |a: u16, b: u16| if a > b { + a +} else { + b +}); +atomic_rmw!(__sync_fetch_and_umax_4, u32, |a: u32, b: u32| if a > b { + a +} else { + b +}); + +atomic_rmw!(__sync_fetch_and_min_1, i8, |a: i8, b: i8| if a < b { + a +} else { + b +}); +atomic_rmw!(__sync_fetch_and_min_2, i16, |a: i16, b: i16| if a < b { + a +} else { + b +}); +atomic_rmw!(__sync_fetch_and_min_4, i32, |a: i32, b: i32| if a < b { + a +} else { + b +}); + +atomic_rmw!(__sync_fetch_and_umin_1, u8, |a: u8, b: u8| if a < b { + a +} else { + b +}); +atomic_rmw!(__sync_fetch_and_umin_2, u16, |a: u16, b: u16| if a < b { + a +} else { + b +}); +atomic_rmw!(__sync_fetch_and_umin_4, u32, |a: u32, b: u32| if a < b { + a +} else { + b +}); atomic_rmw!(__sync_lock_test_and_set_1, u8, |_: u8, b: u8| b); atomic_rmw!(__sync_lock_test_and_set_2, u16, |_: u16, b: u16| b); diff --git a/vendor/compiler_builtins/src/float/add.rs b/vendor/compiler_builtins/src/float/add.rs index 2b6ada81dd..e8b9f9e774 100644 --- a/vendor/compiler_builtins/src/float/add.rs +++ b/vendor/compiler_builtins/src/float/add.rs @@ -1,8 +1,9 @@ -use int::{Int, CastInto}; use float::Float; +use int::{CastInto, Int}; /// Returns `a + b` -fn add(a: F, b: F) -> F where +fn add(a: F, b: F) -> F +where u32: CastInto, F::Int: CastInto, i32: CastInto, @@ -11,18 +12,18 @@ fn add(a: F, b: F) -> F where let one = F::Int::ONE; let zero = F::Int::ZERO; - let bits = F::BITS.cast(); + let bits = F::BITS.cast(); let significand_bits = F::SIGNIFICAND_BITS; - let max_exponent = F::EXPONENT_MAX; + let max_exponent = F::EXPONENT_MAX; - let implicit_bit = F::IMPLICIT_BIT; + let implicit_bit = F::IMPLICIT_BIT; let significand_mask = F::SIGNIFICAND_MASK; - let sign_bit = F::SIGN_MASK as F::Int; - let abs_mask = sign_bit - one; - let exponent_mask = F::EXPONENT_MASK; - let inf_rep = exponent_mask; - let quiet_bit = implicit_bit >> 1; - let qnan_rep = exponent_mask | quiet_bit; + let sign_bit = F::SIGN_MASK as F::Int; + let abs_mask = sign_bit - one; + let exponent_mask = F::EXPONENT_MASK; + let inf_rep = exponent_mask; + let quiet_bit = implicit_bit >> 1; + let qnan_rep = exponent_mask | quiet_bit; let mut a_rep = a.repr(); let mut b_rep = b.repr(); @@ -30,8 +31,7 @@ fn add(a: F, b: F) -> F where let b_abs = b_rep & abs_mask; // Detect if a or b is zero, infinity, or NaN. - if a_abs.wrapping_sub(one) >= inf_rep - one || - b_abs.wrapping_sub(one) >= inf_rep - one { + if a_abs.wrapping_sub(one) >= inf_rep - one || b_abs.wrapping_sub(one) >= inf_rep - one { // NaN + anything = qNaN if a_abs > inf_rep { return F::from_repr(a_abs | quiet_bit); @@ -68,7 +68,7 @@ fn add(a: F, b: F) -> F where // anything + zero = anything if b_abs == Int::ZERO { - return a; + return a; } } @@ -115,7 +115,8 @@ fn add(a: F, b: F) -> F where let align = a_exponent.wrapping_sub(b_exponent).cast(); if align != Int::ZERO { if align < bits { - let sticky = F::Int::from_bool(b_significand << bits.wrapping_sub(align).cast() != Int::ZERO); + let sticky = + F::Int::from_bool(b_significand << bits.wrapping_sub(align).cast() != Int::ZERO); b_significand = (b_significand >> align.cast()) | sticky; } else { b_significand = one; // sticky; b is known to be non-zero. @@ -131,12 +132,14 @@ fn add(a: F, b: F) -> F where // If partial cancellation occured, we need to left-shift the result // and adjust the exponent: if a_significand < implicit_bit << 3 { - let shift = a_significand.leading_zeros() as i32 - - (implicit_bit << 3).leading_zeros() as i32; + let shift = + a_significand.leading_zeros() as i32 - (implicit_bit << 3).leading_zeros() as i32; a_significand <<= shift; a_exponent -= shift; } - } else /* addition */ { + } else + /* addition */ + { a_significand += b_significand; // If the addition carried up, we need to right-shift the result and @@ -157,7 +160,8 @@ fn add(a: F, b: F) -> F where // Result is denormal before rounding; the exponent is zero and we // need to shift the significand. let shift = (1 - a_exponent).cast(); - let sticky = F::Int::from_bool((a_significand << bits.wrapping_sub(shift).cast()) != Int::ZERO); + let sticky = + F::Int::from_bool((a_significand << bits.wrapping_sub(shift).cast()) != Int::ZERO); a_significand = a_significand >> shift.cast() | sticky; a_exponent = 0; } @@ -175,8 +179,12 @@ fn add(a: F, b: F) -> F where // Final rounding. The result may overflow to infinity, but that is the // correct result in that case. - if round_guard_sticky > 0x4 { result += one; } - if round_guard_sticky == 0x4 { result += result & one; } + if round_guard_sticky > 0x4 { + result += one; + } + if round_guard_sticky == 0x4 { + result += result & one; + } F::from_repr(result) } diff --git a/vendor/compiler_builtins/src/float/cmp.rs b/vendor/compiler_builtins/src/float/cmp.rs index 01dd890550..20ab92e4b9 100644 --- a/vendor/compiler_builtins/src/float/cmp.rs +++ b/vendor/compiler_builtins/src/float/cmp.rs @@ -1,64 +1,65 @@ #![allow(unreachable_code)] -use int::{Int, CastInto}; use float::Float; +use int::{CastInto, Int}; #[derive(Clone, Copy)] enum Result { Less, Equal, Greater, - Unordered + Unordered, } impl Result { fn to_le_abi(self) -> i32 { match self { - Result::Less => -1, - Result::Equal => 0, - Result::Greater => 1, - Result::Unordered => 1 + Result::Less => -1, + Result::Equal => 0, + Result::Greater => 1, + Result::Unordered => 1, } } fn to_ge_abi(self) -> i32 { match self { - Result::Less => -1, - Result::Equal => 0, - Result::Greater => 1, - Result::Unordered => -1 + Result::Less => -1, + Result::Equal => 0, + Result::Greater => 1, + Result::Unordered => -1, } } } -fn cmp(a: F, b: F) -> Result where +fn cmp(a: F, b: F) -> Result +where u32: CastInto, F::Int: CastInto, i32: CastInto, F::Int: CastInto, { - let one = F::Int::ONE; - let zero = F::Int::ZERO; + let one = F::Int::ONE; + let zero = F::Int::ZERO; let szero = F::SignedInt::ZERO; - let sign_bit = F::SIGN_MASK as F::Int; - let abs_mask = sign_bit - one; + let sign_bit = F::SIGN_MASK as F::Int; + let abs_mask = sign_bit - one; let exponent_mask = F::EXPONENT_MASK; - let inf_rep = exponent_mask; + let inf_rep = exponent_mask; - let a_rep = a.repr(); - let b_rep = b.repr(); - let a_abs = a_rep & abs_mask; - let b_abs = b_rep & abs_mask; + let a_rep = a.repr(); + let b_rep = b.repr(); + let a_abs = a_rep & abs_mask; + let b_abs = b_rep & abs_mask; // If either a or b is NaN, they are unordered. if a_abs > inf_rep || b_abs > inf_rep { - return Result::Unordered + return Result::Unordered; } // If a and b are both zeros, they are equal. if a_abs | b_abs == zero { - return Result::Equal + return Result::Equal; } let a_srep = a.signed_repr(); @@ -68,29 +69,29 @@ fn cmp(a: F, b: F) -> Result where // a and b as signed integers as we would with a fp_ting-point compare. if a_srep & b_srep >= szero { if a_srep < b_srep { - return Result::Less + return Result::Less; } else if a_srep == b_srep { - return Result::Equal + return Result::Equal; } else { - return Result::Greater + return Result::Greater; } } - // Otherwise, both are negative, so we need to flip the sense of the // comparison to get the correct result. (This assumes a twos- or ones- // complement integer representation; if integers are represented in a // sign-magnitude representation, then this flip is incorrect). else { if a_srep > b_srep { - return Result::Less + return Result::Less; } else if a_srep == b_srep { - return Result::Equal + return Result::Equal; } else { - return Result::Greater + return Result::Greater; } } } -fn unord(a: F, b: F) -> bool where +fn unord(a: F, b: F) -> bool +where u32: CastInto, F::Int: CastInto, i32: CastInto, @@ -98,10 +99,10 @@ fn unord(a: F, b: F) -> bool where { let one = F::Int::ONE; - let sign_bit = F::SIGN_MASK as F::Int; - let abs_mask = sign_bit - one; + let sign_bit = F::SIGN_MASK as F::Int; + let abs_mask = sign_bit - one; let exponent_mask = F::EXPONENT_MASK; - let inf_rep = exponent_mask; + let inf_rep = exponent_mask; let a_rep = a.repr(); let b_rep = b.repr(); diff --git a/vendor/compiler_builtins/src/float/conv.rs b/vendor/compiler_builtins/src/float/conv.rs index 3171e45096..8a0fc6cb42 100644 --- a/vendor/compiler_builtins/src/float/conv.rs +++ b/vendor/compiler_builtins/src/float/conv.rs @@ -2,10 +2,10 @@ use float::Float; use int::Int; macro_rules! int_to_float { - ($i:expr, $ity:ty, $fty:ty) => ({ + ($i:expr, $ity:ty, $fty:ty) => {{ let i = $i; if i == 0 { - return 0.0 + return 0.0; } let mant_dig = <$fty>::SIGNIFICAND_BITS + 1; @@ -22,20 +22,22 @@ macro_rules! int_to_float { let mut e = sd - 1; if <$ity>::BITS < mant_dig { - return <$fty>::from_parts(s, + return <$fty>::from_parts( + s, (e + exponent_bias) as <$fty as Float>::Int, - (a as <$fty as Float>::Int) << (mant_dig - e - 1)) + (a as <$fty as Float>::Int) << (mant_dig - e - 1), + ); } a = if sd > mant_dig { /* start: 0000000000000000000001xxxxxxxxxxxxxxxxxxxxxxPQxxxxxxxxxxxxxxxxxx - * finish: 000000000000000000000000000000000000001xxxxxxxxxxxxxxxxxxxxxxPQR - * 12345678901234567890123456 - * 1 = msb 1 bit - * P = bit MANT_DIG-1 bits to the right of 1 - * Q = bit MANT_DIG bits to the right of 1 - * R = "or" of all bits to the right of Q - */ + * finish: 000000000000000000000000000000000000001xxxxxxxxxxxxxxxxxxxxxxPQR + * 12345678901234567890123456 + * 1 = msb 1 bit + * P = bit MANT_DIG-1 bits to the right of 1 + * Q = bit MANT_DIG bits to the right of 1 + * R = "or" of all bits to the right of Q + */ let mant_dig_plus_one = mant_dig + 1; let mant_dig_plus_two = mant_dig + 2; a = if sd == mant_dig_plus_one { @@ -43,8 +45,10 @@ macro_rules! int_to_float { } else if sd == mant_dig_plus_two { a } else { - (a >> (sd - mant_dig_plus_two)) as <$ity as Int>::UnsignedInt | - ((a & <$ity as Int>::UnsignedInt::max_value()).wrapping_shl((n + mant_dig_plus_two) - sd) != 0) as <$ity as Int>::UnsignedInt + (a >> (sd - mant_dig_plus_two)) as <$ity as Int>::UnsignedInt + | ((a & <$ity as Int>::UnsignedInt::max_value()) + .wrapping_shl((n + mant_dig_plus_two) - sd) + != 0) as <$ity as Int>::UnsignedInt }; /* finish: */ @@ -54,19 +58,22 @@ macro_rules! int_to_float { /* a is now rounded to mant_dig or mant_dig+1 bits */ if (a & (1 << mant_dig)) != 0 { - a >>= 1; e += 1; + a >>= 1; + e += 1; } a - /* a is now rounded to mant_dig bits */ + /* a is now rounded to mant_dig bits */ } else { a.wrapping_shl(mant_dig - sd) /* a is now rounded to mant_dig bits */ }; - <$fty>::from_parts(s, + <$fty>::from_parts( + s, (e + exponent_bias) as <$fty as Float>::Int, - a as <$fty as Float>::Int) - }) + a as <$fty as Float>::Int, + ) + }}; } intrinsics! { @@ -80,10 +87,7 @@ intrinsics! { int_to_float!(i, i32, f64) } - #[use_c_shim_if(any( - all(target_arch = "x86", not(target_env = "msvc")), - all(target_arch = "x86_64", not(windows)), - ))] + #[maybe_use_optimized_c_shim] #[arm_aeabi_alias = __aeabi_l2f] pub extern "C" fn __floatdisf(i: i64) -> f32 { // On x86_64 LLVM will use native instructions for this conversion, we @@ -95,7 +99,7 @@ intrinsics! { } } - #[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))] + #[maybe_use_optimized_c_shim] #[arm_aeabi_alias = __aeabi_l2d] pub extern "C" fn __floatdidf(i: i64) -> f64 { // On x86_64 LLVM will use native instructions for this conversion, we @@ -127,19 +131,13 @@ intrinsics! { int_to_float!(i, u32, f64) } - #[use_c_shim_if(any( - all(target_arch = "x86", not(target_env = "msvc")), - all(target_arch = "x86_64", not(windows)), - ))] + #[maybe_use_optimized_c_shim] #[arm_aeabi_alias = __aeabi_ul2f] pub extern "C" fn __floatundisf(i: u64) -> f32 { int_to_float!(i, u64, f32) } - #[use_c_shim_if(any( - all(target_arch = "x86", not(target_env = "msvc")), - all(target_arch = "x86_64", not(windows)), - ))] + #[maybe_use_optimized_c_shim] #[arm_aeabi_alias = __aeabi_ul2d] pub extern "C" fn __floatundidf(i: u64) -> f64 { int_to_float!(i, u64, f64) @@ -159,11 +157,11 @@ intrinsics! { #[derive(PartialEq)] enum Sign { Positive, - Negative + Negative, } macro_rules! float_to_int { - ($f:expr, $fty:ty, $ity:ty) => ({ + ($f:expr, $fty:ty, $ity:ty) => {{ let f = $f; let fixint_min = <$ity>::min_value(); let fixint_max = <$ity>::max_value(); @@ -180,21 +178,34 @@ macro_rules! float_to_int { let a_abs = a_rep & !sign_bit; // this is used to work around -1 not being available for unsigned - let sign = if (a_rep & sign_bit) == 0 { Sign::Positive } else { Sign::Negative }; + let sign = if (a_rep & sign_bit) == 0 { + Sign::Positive + } else { + Sign::Negative + }; let mut exponent = (a_abs >> significand_bits) as usize; let significand = (a_abs & <$fty>::SIGNIFICAND_MASK) | <$fty>::IMPLICIT_BIT; // if < 1 or unsigned & negative - if exponent < exponent_bias || - fixint_unsigned && sign == Sign::Negative { - return 0 + if exponent < exponent_bias || fixint_unsigned && sign == Sign::Negative { + return 0; } exponent -= exponent_bias; // If the value is infinity, saturate. // If the value is too large for the integer type, 0. - if exponent >= (if fixint_unsigned {fixint_bits} else {fixint_bits -1}) { - return if sign == Sign::Positive {fixint_max} else {fixint_min} + if exponent + >= (if fixint_unsigned { + fixint_bits + } else { + fixint_bits - 1 + }) + { + return if sign == Sign::Positive { + fixint_max + } else { + fixint_min + }; } // If 0 <= exponent < significand_bits, right shift to get the result. // Otherwise, shift left. @@ -210,7 +221,7 @@ macro_rules! float_to_int { } else { r } - }) + }}; } intrinsics! { diff --git a/vendor/compiler_builtins/src/float/div.rs b/vendor/compiler_builtins/src/float/div.rs index ae12bb3214..7c582a4408 100644 --- a/vendor/compiler_builtins/src/float/div.rs +++ b/vendor/compiler_builtins/src/float/div.rs @@ -1,7 +1,5 @@ -use int::{CastInto, Int, WideInt}; use float::Float; - - +use int::{CastInto, Int, WideInt}; fn div32(a: F, b: F) -> F where @@ -398,7 +396,6 @@ where // operation in C, so we need to be a little bit fussy. let (mut quotient, _) = ::wide_mul(a_significand << 2, reciprocal.cast()); - // Two cases: quotient is in [0.5, 1.0) or quotient is in [1.0, 2.0). // In either case, we are going to compute a residual of the form // @@ -442,7 +439,6 @@ where } } - intrinsics! { #[arm_aeabi_alias = __aeabi_fdiv] pub extern "C" fn __divsf3(a: f32, b: f32) -> f32 { diff --git a/vendor/compiler_builtins/src/float/extend.rs b/vendor/compiler_builtins/src/float/extend.rs index 0ca9cf57a5..39633773b2 100644 --- a/vendor/compiler_builtins/src/float/extend.rs +++ b/vendor/compiler_builtins/src/float/extend.rs @@ -1,8 +1,9 @@ -use int::{CastInto, Int}; use float::Float; +use int::{CastInto, Int}; /// Generic conversion from a narrower to a wider IEEE-754 floating-point type -fn extend(a: F) -> R where +fn extend(a: F) -> R +where F::Int: CastInto, u64: CastInto, u32: CastInto, @@ -79,4 +80,4 @@ intrinsics! { pub extern "C" fn __extendsfdf2vfp(a: f32) -> f64 { a as f64 // LLVM generate 'fcvtds' } -} \ No newline at end of file +} diff --git a/vendor/compiler_builtins/src/float/mod.rs b/vendor/compiler_builtins/src/float/mod.rs index 3bb13abbc5..8b8039452a 100644 --- a/vendor/compiler_builtins/src/float/mod.rs +++ b/vendor/compiler_builtins/src/float/mod.rs @@ -3,26 +3,26 @@ use core::ops; use super::int::Int; -pub mod conv; -pub mod cmp; pub mod add; -pub mod pow; -pub mod sub; -pub mod mul; +pub mod cmp; +pub mod conv; pub mod div; pub mod extend; +pub mod mul; +pub mod pow; +pub mod sub; /// Trait for some basic operations on floats pub trait Float: - Copy + - PartialEq + - PartialOrd + - ops::AddAssign + - ops::MulAssign + - ops::Add + - ops::Sub + - ops::Div + - ops::Rem + + Copy + + PartialEq + + PartialOrd + + ops::AddAssign + + ops::MulAssign + + ops::Add + + ops::Sub + + ops::Div + + ops::Rem { /// A uint of the same with as the float type Int: Int; @@ -118,17 +118,23 @@ macro_rules! float_impl { unsafe { mem::transmute(a) } } fn from_parts(sign: bool, exponent: Self::Int, significand: Self::Int) -> Self { - Self::from_repr(((sign as Self::Int) << (Self::BITS - 1)) | - ((exponent << Self::SIGNIFICAND_BITS) & Self::EXPONENT_MASK) | - (significand & Self::SIGNIFICAND_MASK)) + Self::from_repr( + ((sign as Self::Int) << (Self::BITS - 1)) + | ((exponent << Self::SIGNIFICAND_BITS) & Self::EXPONENT_MASK) + | (significand & Self::SIGNIFICAND_MASK), + ) } fn normalize(significand: Self::Int) -> (i32, Self::Int) { - let shift = significand.leading_zeros() + let shift = significand + .leading_zeros() .wrapping_sub((Self::Int::ONE << Self::SIGNIFICAND_BITS).leading_zeros()); - (1i32.wrapping_sub(shift as i32), significand << shift as Self::Int) + ( + 1i32.wrapping_sub(shift as i32), + significand << shift as Self::Int, + ) } } - } + }; } float_impl!(f32, u32, i32, 32, 23); diff --git a/vendor/compiler_builtins/src/float/mul.rs b/vendor/compiler_builtins/src/float/mul.rs index d014bbc90c..7b28793c8e 100644 --- a/vendor/compiler_builtins/src/float/mul.rs +++ b/vendor/compiler_builtins/src/float/mul.rs @@ -1,5 +1,5 @@ -use int::{CastInto, Int, WideInt}; use float::Float; +use int::{CastInto, Int, WideInt}; fn mul(a: F, b: F) -> F where diff --git a/vendor/compiler_builtins/src/float/pow.rs b/vendor/compiler_builtins/src/float/pow.rs index f879c1a1f8..2eedf67584 100644 --- a/vendor/compiler_builtins/src/float/pow.rs +++ b/vendor/compiler_builtins/src/float/pow.rs @@ -1,5 +1,5 @@ -use int::Int; use float::Float; +use int::Int; trait Pow: Float { /// Returns `a` raised to the power `b` diff --git a/vendor/compiler_builtins/src/float/sub.rs b/vendor/compiler_builtins/src/float/sub.rs index 2afb1409b3..8d300e9d24 100644 --- a/vendor/compiler_builtins/src/float/sub.rs +++ b/vendor/compiler_builtins/src/float/sub.rs @@ -1,6 +1,6 @@ -use float::Float; -use float::add::__addsf3; use float::add::__adddf3; +use float::add::__addsf3; +use float::Float; intrinsics! { #[arm_aeabi_alias = __aeabi_fsub] diff --git a/vendor/compiler_builtins/src/int/addsub.rs b/vendor/compiler_builtins/src/int/addsub.rs index 50b5d10d25..e2d5bcbd43 100644 --- a/vendor/compiler_builtins/src/int/addsub.rs +++ b/vendor/compiler_builtins/src/int/addsub.rs @@ -1,16 +1,24 @@ -use int::LargeInt; use int::Int; +use int::LargeInt; trait UAddSub: LargeInt { fn uadd(self, other: Self) -> Self { let (low, carry) = self.low().overflowing_add(other.low()); let high = self.high().wrapping_add(other.high()); - let carry = if carry { Self::HighHalf::ONE } else { Self::HighHalf::ZERO }; + let carry = if carry { + Self::HighHalf::ONE + } else { + Self::HighHalf::ZERO + }; Self::from_parts(low, high.wrapping_add(carry)) } fn uadd_one(self) -> Self { let (low, carry) = self.low().overflowing_add(Self::LowHalf::ONE); - let carry = if carry { Self::HighHalf::ONE } else { Self::HighHalf::ZERO }; + let carry = if carry { + Self::HighHalf::ONE + } else { + Self::HighHalf::ZERO + }; Self::from_parts(low, self.high().wrapping_add(carry)) } fn usub(self, other: Self) -> Self { @@ -22,7 +30,8 @@ trait UAddSub: LargeInt { impl UAddSub for u128 {} trait AddSub: Int - where ::UnsignedInt: UAddSub +where + ::UnsignedInt: UAddSub, { fn add(self, other: Self) -> Self { Self::from_unsigned(self.unsigned().uadd(other.unsigned())) @@ -36,7 +45,8 @@ impl AddSub for u128 {} impl AddSub for i128 {} trait Addo: AddSub - where ::UnsignedInt: UAddSub +where + ::UnsignedInt: UAddSub, { fn addo(self, other: Self, overflow: &mut i32) -> Self { *overflow = 0; @@ -58,7 +68,8 @@ impl Addo for i128 {} impl Addo for u128 {} trait Subo: AddSub - where ::UnsignedInt: UAddSub +where + ::UnsignedInt: UAddSub, { fn subo(self, other: Self, overflow: &mut i32) -> Self { *overflow = 0; diff --git a/vendor/compiler_builtins/src/int/mod.rs b/vendor/compiler_builtins/src/int/mod.rs index 52a4227a09..7587bc69e7 100644 --- a/vendor/compiler_builtins/src/int/mod.rs +++ b/vendor/compiler_builtins/src/int/mod.rs @@ -3,13 +3,13 @@ use core::ops; macro_rules! hty { ($ty:ty) => { <$ty as LargeInt>::HighHalf - } + }; } macro_rules! os_ty { ($ty:ty) => { <$ty as Int>::OtherSign - } + }; } pub mod addsub; @@ -20,23 +20,23 @@ pub mod udiv; /// Trait for some basic operations on integers pub trait Int: - Copy + - PartialEq + - PartialOrd + - ops::AddAssign + - ops::BitAndAssign + - ops::BitOrAssign + - ops::ShlAssign + - ops::ShrAssign + - ops::Add + - ops::Sub + - ops::Div + - ops::Shl + - ops::Shr + - ops::BitOr + - ops::BitXor + - ops::BitAnd + - ops::Not + + Copy + + PartialEq + + PartialOrd + + ops::AddAssign + + ops::BitAndAssign + + ops::BitOrAssign + + ops::ShlAssign + + ops::ShrAssign + + ops::Add + + ops::Sub + + ops::Div + + ops::Shl + + ops::Shr + + ops::BitOr + + ops::BitXor + + ops::BitAnd + + ops::Not { /// Type with the same width but other signedness type OtherSign: Int; @@ -182,7 +182,7 @@ macro_rules! int_impl { int_impl_common!($ity, $bits); } - } + }; } int_impl!(i32, u32, 32); @@ -223,7 +223,7 @@ macro_rules! large_int { low as $ty | ((high as $ty) << $halfbits) } } - } + }; } large_int!(u64, u32, u32, 32); @@ -284,9 +284,9 @@ macro_rules! impl_wide_int { let sticky = *low << ($bits - count); *low = *self << ($bits - count) | *low >> count | sticky; *self = *self >> count; - } else if count < 2*$bits { - let sticky = *self << (2*$bits - count) | *low; - *low = *self >> (count - $bits ) | sticky; + } else if count < 2 * $bits { + let sticky = *self << (2 * $bits - count) | *low; + *low = *self >> (count - $bits) | sticky; *self = 0; } else { let sticky = *self | *low; @@ -295,13 +295,14 @@ macro_rules! impl_wide_int { } } } - } + }; } impl_wide_int!(u32, u64, 32); impl_wide_int!(u64, u128, 64); intrinsics! { + #[maybe_use_optimized_c_shim] #[cfg(any( target_pointer_width = "16", target_pointer_width = "32", @@ -310,7 +311,7 @@ intrinsics! { pub extern "C" fn __clzsi2(x: usize) -> usize { // TODO: const this? Would require const-if // Note(Lokathor): the `intrinsics!` macro can't process mut inputs - let mut x = x; + let mut x = x; let mut y: usize; let mut n: usize = { #[cfg(target_pointer_width = "64")] diff --git a/vendor/compiler_builtins/src/int/mul.rs b/vendor/compiler_builtins/src/int/mul.rs index 58ca461b08..8df58a27b6 100644 --- a/vendor/compiler_builtins/src/int/mul.rs +++ b/vendor/compiler_builtins/src/int/mul.rs @@ -1,7 +1,7 @@ use core::ops; -use int::LargeInt; use int::Int; +use int::LargeInt; trait Mul: LargeInt { fn mul(self, other: Self) -> Self { @@ -19,8 +19,9 @@ trait Mul: LargeInt { low += (t & lower_mask) << half_bits; high += Self::low_as_high(t >> half_bits); high += Self::low_as_high((self.low() >> half_bits).wrapping_mul(other.low() >> half_bits)); - high = high.wrapping_add(self.high().wrapping_mul(Self::low_as_high(other.low()))) - .wrapping_add(Self::low_as_high(self.low()).wrapping_mul(other.high())); + high = high + .wrapping_add(self.high().wrapping_mul(Self::low_as_high(other.low()))) + .wrapping_add(Self::low_as_high(self.low()).wrapping_mul(other.high())); Self::from_parts(low, high) } } @@ -70,7 +71,7 @@ impl Mulo for i32 {} impl Mulo for i64 {} impl Mulo for i128 {} -trait UMulo : Int { +trait UMulo: Int { fn mulo(self, other: Self, overflow: &mut i32) -> Self { *overflow = 0; let result = self.wrapping_mul(other); @@ -83,7 +84,7 @@ trait UMulo : Int { impl UMulo for u128 {} intrinsics! { - #[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))] + #[maybe_use_optimized_c_shim] #[arm_aeabi_alias = __aeabi_lmul] pub extern "C" fn __muldi3(a: u64, b: u64) -> u64 { a.mul(b) diff --git a/vendor/compiler_builtins/src/int/sdiv.rs b/vendor/compiler_builtins/src/int/sdiv.rs index a2e8aa96f9..ad7f67b1b4 100644 --- a/vendor/compiler_builtins/src/int/sdiv.rs +++ b/vendor/compiler_builtins/src/int/sdiv.rs @@ -43,7 +43,8 @@ impl Mod for i128 {} trait Divmod: Int { /// Returns `a / b` and sets `*rem = n % d` fn divmod(self, other: Self, rem: &mut Self, div: F) -> Self - where F: Fn(Self, Self) -> Self, + where + F: Fn(Self, Self) -> Self, { let r = div(self, other); // NOTE won't overflow because it's using the result from the @@ -57,12 +58,13 @@ impl Divmod for i32 {} impl Divmod for i64 {} intrinsics! { + #[maybe_use_optimized_c_shim] #[arm_aeabi_alias = __aeabi_idiv] pub extern "C" fn __divsi3(a: i32, b: i32) -> i32 { a.div(b) } - #[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))] + #[maybe_use_optimized_c_shim] pub extern "C" fn __divdi3(a: i64, b: i64) -> i64 { a.div(b) } @@ -72,15 +74,12 @@ intrinsics! { a.div(b) } - #[use_c_shim_if(all(target_arch = "arm", - not(target_os = "ios"), - not(target_env = "msvc"), - not(thumb_1)))] + #[maybe_use_optimized_c_shim] pub extern "C" fn __modsi3(a: i32, b: i32) -> i32 { a.mod_(b) } - #[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))] + #[maybe_use_optimized_c_shim] pub extern "C" fn __moddi3(a: i64, b: i64) -> i64 { a.mod_(b) } @@ -90,8 +89,7 @@ intrinsics! { a.mod_(b) } - #[use_c_shim_if(all(target_arch = "arm", not(target_env = "msvc"), - not(target_os = "ios"), not(thumb_1)))] + #[maybe_use_optimized_c_shim] pub extern "C" fn __divmodsi4(a: i32, b: i32, rem: &mut i32) -> i32 { a.divmod(b, rem, |a, b| __divsi3(a, b)) } diff --git a/vendor/compiler_builtins/src/int/shift.rs b/vendor/compiler_builtins/src/int/shift.rs index 959fcb0880..d98622279e 100644 --- a/vendor/compiler_builtins/src/int/shift.rs +++ b/vendor/compiler_builtins/src/int/shift.rs @@ -3,7 +3,8 @@ use int::{Int, LargeInt}; trait Ashl: Int + LargeInt { /// Returns `a << b`, requires `b < Self::BITS` fn ashl(self, offset: u32) -> Self - where Self: LargeInt::LowHalf>, + where + Self: LargeInt::LowHalf>, { let half_bits = Self::BITS / 2; if offset & half_bits != 0 { @@ -11,9 +12,10 @@ trait Ashl: Int + LargeInt { } else if offset == 0 { self } else { - Self::from_parts(self.low() << offset, - (self.high() << offset) | - (self.low() >> (half_bits - offset))) + Self::from_parts( + self.low() << offset, + (self.high() << offset) | (self.low() >> (half_bits - offset)), + ) } } } @@ -24,18 +26,23 @@ impl Ashl for u128 {} trait Ashr: Int + LargeInt { /// Returns arithmetic `a >> b`, requires `b < Self::BITS` fn ashr(self, offset: u32) -> Self - where Self: LargeInt::HighHalf as Int>::UnsignedInt>, + where + Self: LargeInt::HighHalf as Int>::UnsignedInt>, { let half_bits = Self::BITS / 2; if offset & half_bits != 0 { - Self::from_parts((self.high() >> (offset - half_bits)).unsigned(), - self.high() >> (half_bits - 1)) + Self::from_parts( + (self.high() >> (offset - half_bits)).unsigned(), + self.high() >> (half_bits - 1), + ) } else if offset == 0 { self } else { let high_unsigned = self.high().unsigned(); - Self::from_parts((high_unsigned << (half_bits - offset)) | (self.low() >> offset), - self.high() >> offset) + Self::from_parts( + (high_unsigned << (half_bits - offset)) | (self.low() >> offset), + self.high() >> offset, + ) } } } @@ -46,7 +53,8 @@ impl Ashr for i128 {} trait Lshr: Int + LargeInt { /// Returns logical `a >> b`, requires `b < Self::BITS` fn lshr(self, offset: u32) -> Self - where Self: LargeInt::LowHalf>, + where + Self: LargeInt::LowHalf>, { let half_bits = Self::BITS / 2; if offset & half_bits != 0 { @@ -54,9 +62,10 @@ trait Lshr: Int + LargeInt { } else if offset == 0 { self } else { - Self::from_parts((self.high() << (half_bits - offset)) | - (self.low() >> offset), - self.high() >> offset) + Self::from_parts( + (self.high() << (half_bits - offset)) | (self.low() >> offset), + self.high() >> offset, + ) } } } @@ -65,7 +74,7 @@ impl Lshr for u64 {} impl Lshr for u128 {} intrinsics! { - #[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))] + #[maybe_use_optimized_c_shim] #[arm_aeabi_alias = __aeabi_llsl] pub extern "C" fn __ashldi3(a: u64, b: u32) -> u64 { a.ashl(b) @@ -75,7 +84,7 @@ intrinsics! { a.ashl(b) } - #[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))] + #[maybe_use_optimized_c_shim] #[arm_aeabi_alias = __aeabi_lasr] pub extern "C" fn __ashrdi3(a: i64, b: u32) -> i64 { a.ashr(b) @@ -85,7 +94,7 @@ intrinsics! { a.ashr(b) } - #[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))] + #[maybe_use_optimized_c_shim] #[arm_aeabi_alias = __aeabi_llsr] pub extern "C" fn __lshrdi3(a: u64, b: u32) -> u64 { a.lshr(b) diff --git a/vendor/compiler_builtins/src/int/udiv.rs b/vendor/compiler_builtins/src/int/udiv.rs index d873559bdd..cdec11d2f1 100644 --- a/vendor/compiler_builtins/src/int/udiv.rs +++ b/vendor/compiler_builtins/src/int/udiv.rs @@ -152,6 +152,7 @@ macro_rules! udivmod_inner { } intrinsics! { + #[maybe_use_optimized_c_shim] #[arm_aeabi_alias = __aeabi_uidiv] /// Returns `n / d` pub extern "C" fn __udivsi3(n: u32, d: u32) -> u32 { @@ -209,20 +210,14 @@ intrinsics! { (q << 1) | carry } - #[use_c_shim_if(all(target_arch = "arm", - not(target_os = "ios"), - not(target_env = "msvc"), - not(thumb_1)))] + #[maybe_use_optimized_c_shim] /// Returns `n % d` pub extern "C" fn __umodsi3(n: u32, d: u32) -> u32 { let q = __udivsi3(n, d); n - q * d } - #[use_c_shim_if(all(target_arch = "arm", - not(target_os = "ios"), - not(target_env = "msvc"), - not(thumb_1)))] + #[maybe_use_optimized_c_shim] /// Returns `n / d` and sets `*rem = n % d` pub extern "C" fn __udivmodsi4(n: u32, d: u32, rem: Option<&mut u32>) -> u32 { let q = __udivsi3(n, d); @@ -232,13 +227,13 @@ intrinsics! { q } - #[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))] + #[maybe_use_optimized_c_shim] /// Returns `n / d` pub extern "C" fn __udivdi3(n: u64, d: u64) -> u64 { __udivmoddi4(n, d, None) } - #[use_c_shim_if(all(target_arch = "x86", not(target_env = "msvc")))] + #[maybe_use_optimized_c_shim] /// Returns `n % d` pub extern "C" fn __umoddi3(n: u64, d: u64) -> u64 { let mut rem = 0; diff --git a/vendor/compiler_builtins/src/lib.rs b/vendor/compiler_builtins/src/lib.rs index fddfa67aa8..ef5353a704 100644 --- a/vendor/compiler_builtins/src/lib.rs +++ b/vendor/compiler_builtins/src/lib.rs @@ -3,11 +3,13 @@ #![cfg_attr(feature = "compiler-builtins", compiler_builtins)] #![crate_name = "compiler_builtins"] #![crate_type = "rlib"] -#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png", - html_favicon_url = "https://doc.rust-lang.org/favicon.ico", - html_root_url = "https://doc.rust-lang.org/nightly/", - html_playground_url = "https://play.rust-lang.org/", - test(attr(deny(warnings))))] +#![doc( + html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png", + html_favicon_url = "https://doc.rust-lang.org/favicon.ico", + html_root_url = "https://doc.rust-lang.org/nightly/", + html_playground_url = "https://play.rust-lang.org/", + test(attr(deny(warnings))) +)] #![feature(asm)] #![feature(compiler_builtins)] #![feature(core_intrinsics)] @@ -19,10 +21,14 @@ #![allow(unused_features)] #![no_builtins] #![cfg_attr(feature = "compiler-builtins", feature(staged_api))] -#![cfg_attr(feature = "compiler-builtins", - unstable(feature = "compiler_builtins_lib", - reason = "Compiler builtins. Will never become stable.", - issue = "0"))] +#![cfg_attr( + feature = "compiler-builtins", + unstable( + feature = "compiler_builtins_lib", + reason = "Compiler builtins. Will never become stable.", + issue = "0" + ) +)] // We disable #[no_mangle] for tests so that we can verify the test results // against the native compiler-rt implementations of the builtins. @@ -44,12 +50,14 @@ fn abort() -> ! { #[macro_use] mod macros; -pub mod int; pub mod float; +pub mod int; -#[cfg(any(all(target_arch = "wasm32", target_os = "unknown"), - all(target_arch = "arm", target_os = "none"), - all(target_vendor = "fortanix", target_env = "sgx")))] +#[cfg(any( + all(target_arch = "wasm32", target_os = "unknown"), + all(target_arch = "arm", target_os = "none"), + all(target_vendor = "fortanix", target_env = "sgx") +))] pub mod math; pub mod mem; diff --git a/vendor/compiler_builtins/src/macros.rs b/vendor/compiler_builtins/src/macros.rs index 5f1ab469a0..4abdae6eee 100644 --- a/vendor/compiler_builtins/src/macros.rs +++ b/vendor/compiler_builtins/src/macros.rs @@ -30,8 +30,8 @@ /// /// A quick overview of attributes supported right now are: /// -/// * `use_c_shim_if` - takes a #[cfg] directive and falls back to the -/// C-compiled version if `use_c` is specified. +/// * `maybe_use_optimized_c_shim` - indicates that the Rust implementation is +/// ignored if an optimized C version was compiled. /// * `aapcs_on_arm` - forces the ABI of the function to be `"aapcs"` on ARM and /// the specified ABI everywhere else. /// * `unadjusted_on_win64` - like `aapcs_on_arm` this switches to the @@ -51,15 +51,14 @@ macro_rules! intrinsics { // to the architecture-specific versions which should be more optimized. The // purpose of this macro is to easily allow specifying this. // - // The argument to `use_c_shim_if` is a `#[cfg]` directive which, when true, - // will cause this crate's exported version of `$name` to just redirect to - // the C implementation. No symbol named `$name` will be in the object file - // for this crate itself. - // - // When the `#[cfg]` directive is false, or when the `c` feature is - // disabled, the provided implementation is used instead. + // The `#[maybe_use_optimized_c_shim]` attribute indicates that this + // intrinsic may have an optimized C version. In these situations the build + // script, if the C code is enabled and compiled, will emit a cfg directive + // to get passed to rustc for our compilation. If that cfg is set we skip + // the Rust implementation, but if the attribute is not enabled then we + // compile in the Rust implementation. ( - #[use_c_shim_if($($cfg_clause:tt)*)] + #[maybe_use_optimized_c_shim] $(#[$($attr:tt)*])* pub extern $abi:tt fn $name:ident( $($argname:ident: $ty:ty),* ) -> $ret:ty { $($body:tt)* @@ -68,7 +67,7 @@ macro_rules! intrinsics { $($rest:tt)* ) => ( - #[cfg(all(use_c, $($cfg_clause)*))] + #[cfg($name = "optimized-c")] pub extern $abi fn $name( $($argname: $ty),* ) -> $ret { extern $abi { fn $name($($argname: $ty),*) -> $ret; @@ -78,7 +77,7 @@ macro_rules! intrinsics { } } - #[cfg(not(all(use_c, $($cfg_clause)*)))] + #[cfg(not($name = "optimized-c"))] intrinsics! { $(#[$($attr)*])* pub extern $abi fn $name( $($argname: $ty),* ) -> $ret { @@ -261,7 +260,7 @@ macro_rules! intrinsics { // Hack for LLVM expectations for ABI on windows. This is used by the // `#[win64_128bit_abi_hack]` attribute recognized above -#[cfg(all(windows, target_pointer_width="64"))] +#[cfg(all(windows, target_pointer_width = "64"))] pub mod win64_128bit_abi_hack { #[repr(simd)] pub struct U64x2(u64, u64); diff --git a/vendor/compiler_builtins/src/math.rs b/vendor/compiler_builtins/src/math.rs index dfdd99cdf9..1893f1c166 100644 --- a/vendor/compiler_builtins/src/math.rs +++ b/vendor/compiler_builtins/src/math.rs @@ -64,12 +64,15 @@ no_mangle! { fn cbrtf(n: f32) -> f32; fn coshf(n: f32) -> f32; fn expm1f(n: f32) -> f32; + fn fdim(a: f64, b: f64) -> f64; fn fdimf(a: f32, b: f32) -> f32; fn hypotf(x: f32, y: f32) -> f32; fn log1pf(n: f32) -> f32; fn sinhf(n: f32) -> f32; fn tanf(n: f32) -> f32; fn tanhf(n: f32) -> f32; + fn ldexp(f: f64, n: i32) -> f64; + fn ldexpf(f: f32, n: i32) -> f32; } #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] diff --git a/vendor/compiler_builtins/src/mem.rs b/vendor/compiler_builtins/src/mem.rs index c56391c4d3..c863bb7294 100644 --- a/vendor/compiler_builtins/src/mem.rs +++ b/vendor/compiler_builtins/src/mem.rs @@ -6,10 +6,7 @@ type c_int = i16; type c_int = i32; #[cfg_attr(all(feature = "mem", not(feature = "mangled-names")), no_mangle)] -pub unsafe extern "C" fn memcpy(dest: *mut u8, - src: *const u8, - n: usize) - -> *mut u8 { +pub unsafe extern "C" fn memcpy(dest: *mut u8, src: *const u8, n: usize) -> *mut u8 { let mut i = 0; while i < n { *dest.offset(i as isize) = *src.offset(i as isize); @@ -19,10 +16,7 @@ pub unsafe extern "C" fn memcpy(dest: *mut u8, } #[cfg_attr(all(feature = "mem", not(feature = "mangled-names")), no_mangle)] -pub unsafe extern "C" fn memmove(dest: *mut u8, - src: *const u8, - n: usize) - -> *mut u8 { +pub unsafe extern "C" fn memmove(dest: *mut u8, src: *const u8, n: usize) -> *mut u8 { if src < dest as *const u8 { // copy from end let mut i = n; diff --git a/vendor/compiler_builtins/src/probestack.rs b/vendor/compiler_builtins/src/probestack.rs index 52a0414a18..f9284e8140 100644 --- a/vendor/compiler_builtins/src/probestack.rs +++ b/vendor/compiler_builtins/src/probestack.rs @@ -46,7 +46,7 @@ #[naked] #[no_mangle] #[cfg(all(target_arch = "x86_64", not(feature = "mangled-names")))] -pub unsafe extern fn __rust_probestack() { +pub unsafe extern "C" fn __rust_probestack() { // Our goal here is to touch each page between %rsp+8 and %rsp+8-%rax, // ensuring that if any pages are unmapped we'll make a page fault. // @@ -97,7 +97,7 @@ pub unsafe extern fn __rust_probestack() { #[naked] #[no_mangle] #[cfg(all(target_arch = "x86", not(feature = "mangled-names")))] -pub unsafe extern fn __rust_probestack() { +pub unsafe extern "C" fn __rust_probestack() { // This is the same as x86_64 above, only translated for 32-bit sizes. Note // that on Unix we're expected to restore everything as it was, this // function basically can't tamper with anything. diff --git a/vendor/getopts/.cargo-checksum.json b/vendor/getopts/.cargo-checksum.json index ca3175bf72..80ba8c8cb7 100644 --- a/vendor/getopts/.cargo-checksum.json +++ b/vendor/getopts/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"88427e1c4c50b24ad565317e5d72ebedf31727ebb58171e17e02ca14ef3c8a48","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"7444d1eefe435deeac9f2726964ec2b6710047507f4e395106bf7972795a0811","appveyor.yml":"da991211b72fa6f231af7adb84c9fb72f5a9131d1c0a3d47b8ceffe5a82c8542","src/lib.rs":"3e0fec082c51f22f0bc656fab1a10c12509c2258f6095d280e8facbe2e52a2ed","tests/smoke.rs":"26a95ac42e42b766ae752fe8531fb740fd147d5cdff352dec0763d175ce91806"},"package":"b900c08c1939860ce8b54dc6a89e26e00c04c380fd0e09796799bd7f12861e05"} \ No newline at end of file +{"files":{"Cargo.toml":"186195a052d7f209dc438ff394eee222afb4a011eb66a35431c90aa828fb546a","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"8c884e55b3999f01f31a8b494e523e2144a72c8ee7847d690d8e154f677c6cff","appveyor.yml":"da991211b72fa6f231af7adb84c9fb72f5a9131d1c0a3d47b8ceffe5a82c8542","src/lib.rs":"54ea0d2f7530486c4ccf1ed310c27c8875f87370e7ad9bb2fba6b67b43d506b5","src/tests/mod.rs":"180832c410b6813be0def273491e480ad7ddae8fe0759d7e42f3a002f363c2e5","tests/smoke.rs":"26a95ac42e42b766ae752fe8531fb740fd147d5cdff352dec0763d175ce91806"},"package":"72327b15c228bfe31f1390f93dd5e9279587f0463836393c9df719ce62a3e450"} \ No newline at end of file diff --git a/vendor/getopts/Cargo.toml b/vendor/getopts/Cargo.toml index d231883853..a98152a872 100644 --- a/vendor/getopts/Cargo.toml +++ b/vendor/getopts/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,7 +12,7 @@ [package] name = "getopts" -version = "0.2.17" +version = "0.2.19" authors = ["The Rust Project Developers"] description = "getopts-like option parsing.\n" homepage = "https://github.com/rust-lang/getopts" @@ -21,5 +21,7 @@ readme = "README.md" categories = ["command-line-interface"] license = "MIT/Apache-2.0" repository = "https://github.com/rust-lang/getopts" +[dependencies.unicode-width] +version = "0.1.5" [dev-dependencies.log] -version = "0.3" +version = "0.4" diff --git a/vendor/getopts/README.md b/vendor/getopts/README.md index 4e85020ca3..f80db224ea 100644 --- a/vendor/getopts/README.md +++ b/vendor/getopts/README.md @@ -21,3 +21,7 @@ and this to your crate root: ```rust extern crate getopts; ``` + +## Rust Version Support + +The minimum supported Rust version is 1.18. diff --git a/vendor/getopts/src/lib.rs b/vendor/getopts/src/lib.rs index fa804bfcce..9a9d5d20f8 100644 --- a/vendor/getopts/src/lib.rs +++ b/vendor/getopts/src/lib.rs @@ -92,39 +92,57 @@ //! } //! ``` -#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "https://www.rust-lang.org/favicon.ico", - html_root_url = "https://doc.rust-lang.org/getopts/")] +#![doc( + html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "https://www.rust-lang.org/favicon.ico", + html_root_url = "https://docs.rs/getopts/0.2.19" +)] #![deny(missing_docs)] #![cfg_attr(test, deny(warnings))] #![cfg_attr(rust_build, feature(staged_api))] #![cfg_attr(rust_build, staged_api)] -#![cfg_attr(rust_build, - unstable(feature = "rustc_private", - reason = "use the crates.io `getopts` library instead"))] +#![cfg_attr( + rust_build, + unstable( + feature = "rustc_private", + reason = "use the crates.io `getopts` library instead" + ) +)] -#[cfg(test)] #[macro_use] extern crate log; +#[cfg(test)] +#[macro_use] +extern crate log; +extern crate unicode_width; -use self::Name::*; +use self::Fail::*; use self::HasArg::*; +use self::Name::*; use self::Occur::*; -use self::Fail::*; use self::Optval::*; -use self::SplitWithinState::*; -use self::Whitespace::*; -use self::LengthLimit::*; use std::error::Error; use std::ffi::OsStr; use std::fmt; use std::iter::{repeat, IntoIterator}; use std::result; +use std::str::FromStr; + +use unicode_width::UnicodeWidthStr; + +#[cfg(test)] +mod tests; /// A description of the options that a program can handle. pub struct Options { grps: Vec, - parsing_style : ParsingStyle, - long_only: bool + parsing_style: ParsingStyle, + long_only: bool, +} + +impl Default for Options { + fn default() -> Self { + Self::new() + } } impl Options { @@ -133,7 +151,7 @@ impl Options { Options { grps: Vec::new(), parsing_style: ParsingStyle::FloatingFrees, - long_only: false + long_only: false, } } @@ -157,16 +175,23 @@ impl Options { } /// Create a generic option group, stating all parameters explicitly. - pub fn opt(&mut self, short_name: &str, long_name: &str, desc: &str, - hint: &str, hasarg: HasArg, occur: Occur) -> &mut Options { + pub fn opt( + &mut self, + short_name: &str, + long_name: &str, + desc: &str, + hint: &str, + hasarg: HasArg, + occur: Occur, + ) -> &mut Options { validate_names(short_name, long_name); self.grps.push(OptGroup { short_name: short_name.to_string(), long_name: long_name.to_string(), hint: hint.to_string(), desc: desc.to_string(), - hasarg: hasarg, - occur: occur + hasarg, + occur, }); self } @@ -176,8 +201,7 @@ impl Options { /// * `short_name` - e.g. `"h"` for a `-h` option, or `""` for none /// * `long_name` - e.g. `"help"` for a `--help` option, or `""` for none /// * `desc` - Description for usage help - pub fn optflag(&mut self, short_name: &str, long_name: &str, desc: &str) - -> &mut Options { + pub fn optflag(&mut self, short_name: &str, long_name: &str, desc: &str) -> &mut Options { validate_names(short_name, long_name); self.grps.push(OptGroup { short_name: short_name.to_string(), @@ -185,7 +209,7 @@ impl Options { hint: "".to_string(), desc: desc.to_string(), hasarg: No, - occur: Optional + occur: Optional, }); self } @@ -196,8 +220,7 @@ impl Options { /// * `short_name` - e.g. `"h"` for a `-h` option, or `""` for none /// * `long_name` - e.g. `"help"` for a `--help` option, or `""` for none /// * `desc` - Description for usage help - pub fn optflagmulti(&mut self, short_name: &str, long_name: &str, desc: &str) - -> &mut Options { + pub fn optflagmulti(&mut self, short_name: &str, long_name: &str, desc: &str) -> &mut Options { validate_names(short_name, long_name); self.grps.push(OptGroup { short_name: short_name.to_string(), @@ -205,7 +228,7 @@ impl Options { hint: "".to_string(), desc: desc.to_string(), hasarg: No, - occur: Multi + occur: Multi, }); self } @@ -217,8 +240,13 @@ impl Options { /// * `desc` - Description for usage help /// * `hint` - Hint that is used in place of the argument in the usage help, /// e.g. `"FILE"` for a `-o FILE` option - pub fn optflagopt(&mut self, short_name: &str, long_name: &str, desc: &str, - hint: &str) -> &mut Options { + pub fn optflagopt( + &mut self, + short_name: &str, + long_name: &str, + desc: &str, + hint: &str, + ) -> &mut Options { validate_names(short_name, long_name); self.grps.push(OptGroup { short_name: short_name.to_string(), @@ -226,7 +254,7 @@ impl Options { hint: hint.to_string(), desc: desc.to_string(), hasarg: Maybe, - occur: Optional + occur: Optional, }); self } @@ -239,8 +267,13 @@ impl Options { /// * `desc` - Description for usage help /// * `hint` - Hint that is used in place of the argument in the usage help, /// e.g. `"FILE"` for a `-o FILE` option - pub fn optmulti(&mut self, short_name: &str, long_name: &str, desc: &str, hint: &str) - -> &mut Options { + pub fn optmulti( + &mut self, + short_name: &str, + long_name: &str, + desc: &str, + hint: &str, + ) -> &mut Options { validate_names(short_name, long_name); self.grps.push(OptGroup { short_name: short_name.to_string(), @@ -248,7 +281,7 @@ impl Options { hint: hint.to_string(), desc: desc.to_string(), hasarg: Yes, - occur: Multi + occur: Multi, }); self } @@ -260,8 +293,13 @@ impl Options { /// * `desc` - Description for usage help /// * `hint` - Hint that is used in place of the argument in the usage help, /// e.g. `"FILE"` for a `-o FILE` option - pub fn optopt(&mut self, short_name: &str, long_name: &str, desc: &str, hint: &str) - -> &mut Options { + pub fn optopt( + &mut self, + short_name: &str, + long_name: &str, + desc: &str, + hint: &str, + ) -> &mut Options { validate_names(short_name, long_name); self.grps.push(OptGroup { short_name: short_name.to_string(), @@ -269,7 +307,7 @@ impl Options { hint: hint.to_string(), desc: desc.to_string(), hasarg: Yes, - occur: Optional + occur: Optional, }); self } @@ -281,8 +319,13 @@ impl Options { /// * `desc` - Description for usage help /// * `hint` - Hint that is used in place of the argument in the usage help, /// e.g. `"FILE"` for a `-o FILE` option - pub fn reqopt(&mut self, short_name: &str, long_name: &str, desc: &str, hint: &str) - -> &mut Options { + pub fn reqopt( + &mut self, + short_name: &str, + long_name: &str, + desc: &str, + hint: &str, + ) -> &mut Options { validate_names(short_name, long_name); self.grps.push(OptGroup { short_name: short_name.to_string(), @@ -290,7 +333,7 @@ impl Options { hint: hint.to_string(), desc: desc.to_string(), hasarg: Yes, - occur: Req + occur: Req, }); self } @@ -304,23 +347,30 @@ impl Options { /// Returns `Err(Fail)` on failure: use the `Debug` implementation of `Fail` /// to display information about it. pub fn parse(&self, args: C) -> Result - where C::Item: AsRef + where + C::Item: AsRef, { let opts: Vec = self.grps.iter().map(|x| x.long_to_short()).collect(); - let mut vals = (0 .. opts.len()).map(|_| Vec::new()).collect::>>(); + let mut vals = (0..opts.len()) + .map(|_| Vec::new()) + .collect::>>(); let mut free: Vec = Vec::new(); - let args = args.into_iter().map(|i| { - i.as_ref().to_str().ok_or_else(|| { - Fail::UnrecognizedOption(format!("{:?}", i.as_ref())) - }).map(|s| s.to_owned()) - }).collect::<::std::result::Result,_>>()?; + let args = args + .into_iter() + .map(|i| { + i.as_ref() + .to_str() + .ok_or_else(|| Fail::UnrecognizedOption(format!("{:?}", i.as_ref()))) + .map(|s| s.to_owned()) + }).collect::<::std::result::Result, _>>()?; let mut args = args.into_iter().peekable(); + let mut arg_pos = 0; while let Some(cur) = args.next() { if !is_arg(&cur) { free.push(cur); match self.parsing_style { - ParsingStyle::FloatingFrees => {}, + ParsingStyle::FloatingFrees => {} ParsingStyle::StopAtFirstFree => { free.extend(args); break; @@ -359,15 +409,15 @@ impl Options { */ let opt_id = match find_opt(&opts, &opt) { - Some(id) => id, - None => return Err(UnrecognizedOption(opt.to_string())) + Some(id) => id, + None => return Err(UnrecognizedOption(opt.to_string())), }; names.push(opt); let arg_follows = match opts[opt_id].hasarg { Yes | Maybe => true, - No => false + No => false, }; if arg_follows { @@ -383,43 +433,47 @@ impl Options { for nm in names.iter() { name_pos += 1; let optid = match find_opt(&opts, &nm) { - Some(id) => id, - None => return Err(UnrecognizedOption(nm.to_string())) + Some(id) => id, + None => return Err(UnrecognizedOption(nm.to_string())), }; match opts[optid].hasarg { - No => { - if name_pos == names.len() && !i_arg.is_none() { - return Err(UnexpectedArgument(nm.to_string())); + No => { + if name_pos == names.len() && i_arg.is_some() { + return Err(UnexpectedArgument(nm.to_string())); + } + vals[optid].push((arg_pos, Given)); } - vals[optid].push(Given); - } - Maybe => { - // Note that here we do not handle `--arg value`. - // This matches GNU getopt behavior; but also - // makes sense, because if this were accepted, - // then users could only write a "Maybe" long - // option at the end of the arguments when - // FloatingFrees is in use. - if let Some(i_arg) = i_arg.take() { - vals[optid].push(Val(i_arg)); - } else if was_long || name_pos < names.len() || args.peek().map_or(true, |n| is_arg(&n)) { - vals[optid].push(Given); - } else { - vals[optid].push(Val(args.next().unwrap())); + Maybe => { + // Note that here we do not handle `--arg value`. + // This matches GNU getopt behavior; but also + // makes sense, because if this were accepted, + // then users could only write a "Maybe" long + // option at the end of the arguments when + // FloatingFrees is in use. + if let Some(i_arg) = i_arg.take() { + vals[optid].push((arg_pos, Val(i_arg))); + } else if was_long + || name_pos < names.len() + || args.peek().map_or(true, |n| is_arg(&n)) + { + vals[optid].push((arg_pos, Given)); + } else { + vals[optid].push((arg_pos, Val(args.next().unwrap()))); + } } - } - Yes => { - if let Some(i_arg) = i_arg.take() { - vals[optid].push(Val(i_arg)); - } else if let Some(n) = args.next() { - vals[optid].push(Val(n)); - } else { - return Err(ArgumentMissing(nm.to_string())); + Yes => { + if let Some(i_arg) = i_arg.take() { + vals[optid].push((arg_pos, Val(i_arg))); + } else if let Some(n) = args.next() { + vals[optid].push((arg_pos, Val(n))); + } else { + return Err(ArgumentMissing(nm.to_string())); + } } - } } } } + arg_pos += 1; } debug_assert_eq!(vals.len(), opts.len()); for (vals, opt) in vals.iter().zip(opts.iter()) { @@ -430,56 +484,63 @@ impl Options { return Err(OptionDuplicated(opt.name.to_string())); } } - Ok(Matches { - opts: opts, - vals: vals, - free: free - }) + Ok(Matches { opts, vals, free }) } /// Derive a short one-line usage summary from a set of long options. pub fn short_usage(&self, program_name: &str) -> String { let mut line = format!("Usage: {} ", program_name); - line.push_str(&self.grps.iter() - .map(format_option) - .collect::>() - .join(" ")); + line.push_str( + &self + .grps + .iter() + .map(format_option) + .collect::>() + .join(" "), + ); line } - /// Derive a formatted message from a set of options. pub fn usage(&self, brief: &str) -> String { - self.usage_with_format(|opts| - format!("{}\n\nOptions:\n{}\n", brief, opts.collect::>().join("\n"))) + self.usage_with_format(|opts| { + format!( + "{}\n\nOptions:\n{}\n", + brief, + opts.collect::>().join("\n") + ) + }) } /// Derive a custom formatted message from a set of options. The formatted options provided to /// a closure as an iterator. - pub fn usage_with_format) -> String>(&self, mut formatter: F) -> String { + pub fn usage_with_format) -> String>( + &self, + mut formatter: F, + ) -> String { formatter(&mut self.usage_items()) } /// Derive usage items from a set of options. - fn usage_items<'a>(&'a self) -> Box + 'a> { + fn usage_items<'a>(&'a self) -> Box + 'a> { let desc_sep = format!("\n{}", repeat(" ").take(24).collect::()); - let any_short = self.grps.iter().any(|optref| { - optref.short_name.len() > 0 - }); + let any_short = self.grps.iter().any(|optref| !optref.short_name.is_empty()); let rows = self.grps.iter().map(move |optref| { - let OptGroup{short_name, - long_name, - hint, - desc, - hasarg, - ..} = (*optref).clone(); + let OptGroup { + short_name, + long_name, + hint, + desc, + hasarg, + .. + } = (*optref).clone(); let mut row = " ".to_string(); // short option - match short_name.len() { + match short_name.width() { 0 => { if any_short { row.push_str(" "); @@ -488,7 +549,7 @@ impl Options { 1 => { row.push('-'); row.push_str(&short_name); - if long_name.len() > 0 { + if long_name.width() > 0 { row.push_str(", "); } else { // Only a single space here, so that any @@ -496,18 +557,15 @@ impl Options { row.push(' '); } } + // FIXME: refer issue #7. _ => panic!("the short name should only be 1 ascii char long"), } // long option - match long_name.len() { + match long_name.width() { 0 => {} _ => { - if self.long_only { - row.push('-'); - } else { - row.push_str("--"); - } + row.push_str(if self.long_only { "-" } else { "--" }); row.push_str(&long_name); row.push(' '); } @@ -524,54 +582,38 @@ impl Options { } } - // FIXME: #5516 should be graphemes not codepoints - // here we just need to indent the start of the description - let rowlen = row.chars().count(); + let rowlen = row.width(); if rowlen < 24 { - for _ in 0 .. 24 - rowlen { + for _ in 0..24 - rowlen { row.push(' '); } } else { row.push_str(&desc_sep) } - // Normalize desc to contain words separated by one space character - let mut desc_normalized_whitespace = String::new(); - for word in desc.split(|c: char| c.is_whitespace()) - .filter(|s| !s.is_empty()) { - desc_normalized_whitespace.push_str(word); - desc_normalized_whitespace.push(' '); - } - - // FIXME: #5516 should be graphemes not codepoints - let mut desc_rows = Vec::new(); - each_split_within(&desc_normalized_whitespace, - 54, - |substr| { - desc_rows.push(substr.to_string()); - true - }); - - // FIXME: #5516 should be graphemes not codepoints - // wrapped description + let desc_rows = each_split_within(&desc, 54); row.push_str(&desc_rows.join(&desc_sep)); row }); - Box::new(rows) + Box::new(rows) } } fn validate_names(short_name: &str, long_name: &str) { let len = short_name.len(); - assert!(len == 1 || len == 0, - "the short_name (first argument) should be a single character, \ - or an empty string for none"); + assert!( + len == 1 || len == 0, + "the short_name (first argument) should be a single character, \ + or an empty string for none" + ); let len = long_name.len(); - assert!(len == 0 || len > 1, - "the long_name (second argument) should be longer than a single \ - character, or an empty string for none"); + assert!( + len == 0 || len > 1, + "the long_name (second argument) should be longer than a single \ + character, or an empty string for none" + ); } /// What parsing style to use when parsing arguments. @@ -581,11 +623,11 @@ pub enum ParsingStyle { FloatingFrees, /// As soon as a "free" argument (i.e. non-flag) is encountered, stop /// considering any remaining arguments as flags. - StopAtFirstFree + StopAtFirstFree, } /// Name of an option. Either a string or a single char. -#[derive(Clone, PartialEq, Eq)] +#[derive(Clone, Debug, PartialEq, Eq)] enum Name { /// A string representing the long name of an option. /// For example: "help" @@ -596,7 +638,7 @@ enum Name { } /// Describes whether an option has an argument. -#[derive(Clone, Copy, PartialEq, Eq)] +#[derive(Clone, Debug, Copy, PartialEq, Eq)] pub enum HasArg { /// The option requires an argument. Yes, @@ -607,7 +649,7 @@ pub enum HasArg { } /// Describes how often an option may occur. -#[derive(Clone, Copy, PartialEq, Eq)] +#[derive(Clone, Debug, Copy, PartialEq, Eq)] pub enum Occur { /// The option occurs once. Req, @@ -618,7 +660,7 @@ pub enum Occur { } /// A description of a possible option. -#[derive(Clone, PartialEq, Eq)] +#[derive(Clone, Debug, PartialEq, Eq)] struct Opt { /// Name of the option name: Name, @@ -645,11 +687,11 @@ struct OptGroup { /// Whether option has an argument hasarg: HasArg, /// How often it can occur - occur: Occur + occur: Occur, } /// Describes whether an option is given at all or has a value. -#[derive(Clone, PartialEq, Eq)] +#[derive(Clone, Debug, PartialEq, Eq)] enum Optval { Val(String), Given, @@ -657,12 +699,12 @@ enum Optval { /// The result of checking command line arguments. Contains a vector /// of matches and a vector of free strings. -#[derive(Clone, PartialEq, Eq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct Matches { /// Options that matched opts: Vec, - /// Values of the Options that matched - vals: Vec>, + /// Values of the Options that matched and their positions + vals: Vec>, /// Free string fragments pub free: Vec, } @@ -711,7 +753,7 @@ impl Name { fn to_string(&self) -> String { match *self { Short(ch) => ch.to_string(), - Long(ref s) => s.to_string() + Long(ref s) => s.to_string(), } } } @@ -729,47 +771,45 @@ impl OptGroup { } = (*self).clone(); match (short_name.len(), long_name.len()) { - (0,0) => panic!("this long-format option was given no name"), - (0,_) => Opt { + (0, 0) => panic!("this long-format option was given no name"), + (0, _) => Opt { name: Long(long_name), - hasarg: hasarg, - occur: occur, - aliases: Vec::new() + hasarg, + occur, + aliases: Vec::new(), }, - (1,0) => Opt { + (1, 0) => Opt { name: Short(short_name.as_bytes()[0] as char), - hasarg: hasarg, - occur: occur, - aliases: Vec::new() + hasarg, + occur, + aliases: Vec::new(), }, - (1,_) => Opt { + (1, _) => Opt { name: Long(long_name), - hasarg: hasarg, - occur: occur, - aliases: vec!( - Opt { - name: Short(short_name.as_bytes()[0] as char), - hasarg: hasarg, - occur: occur, - aliases: Vec::new() - } - ) + hasarg, + occur, + aliases: vec![Opt { + name: Short(short_name.as_bytes()[0] as char), + hasarg: hasarg, + occur: occur, + aliases: Vec::new(), + }], }, - (_,_) => panic!("something is wrong with the long-form opt") + (_, _) => panic!("something is wrong with the long-form opt"), } } } impl Matches { - fn opt_vals(&self, nm: &str) -> Vec { + fn opt_vals(&self, nm: &str) -> Vec<(usize, Optval)> { match find_opt(&self.opts, &Name::from_str(nm)) { Some(id) => self.vals[id].clone(), - None => panic!("No option '{}' defined", nm) + None => panic!("No option '{}' defined", nm), } } fn opt_val(&self, nm: &str) -> Option { - self.opt_vals(nm).into_iter().next() + self.opt_vals(nm).into_iter().map(|(_, o)| o).next() } /// Returns true if an option was defined pub fn opt_defined(&self, nm: &str) -> bool { @@ -786,24 +826,29 @@ impl Matches { self.opt_vals(nm).len() } + /// Returns a vector of all the positions in which an option was matched. + pub fn opt_positions(&self, nm: &str) -> Vec { + self.opt_vals(nm).into_iter().map(|(pos, _)| pos).collect() + } + /// Returns true if any of several options were matched. pub fn opts_present(&self, names: &[String]) -> bool { - names.iter().any(|nm| { - match find_opt(&self.opts, &Name::from_str(&nm)) { + names + .iter() + .any(|nm| match find_opt(&self.opts, &Name::from_str(&nm)) { Some(id) if !self.vals[id].is_empty() => true, _ => false, - } - }) + }) } /// Returns the string argument supplied to one of several matching options or `None`. pub fn opts_str(&self, names: &[String]) -> Option { - names.iter().filter_map(|nm| { - match self.opt_val(&nm) { + names + .iter() + .filter_map(|nm| match self.opt_val(&nm) { Some(Val(s)) => Some(s), _ => None, - } - }).next() + }).next() } /// Returns a vector of the arguments provided to all matches of the given @@ -811,12 +856,25 @@ impl Matches { /// /// Used when an option accepts multiple values. pub fn opt_strs(&self, nm: &str) -> Vec { - self.opt_vals(nm).into_iter().filter_map(|v| { - match v { + self.opt_vals(nm) + .into_iter() + .filter_map(|(_, v)| match v { Val(s) => Some(s), _ => None, - } - }).collect() + }).collect() + } + + /// Returns a vector of the arguments provided to all matches of the given + /// option, together with their positions. + /// + /// Used when an option accepts multiple values. + pub fn opt_strs_pos(&self, nm: &str) -> Vec<(usize, String)> { + self.opt_vals(nm) + .into_iter() + .filter_map(|(p, v)| match v { + Val(s) => Some((p, s)), + _ => None, + }).collect() } /// Returns the string argument supplied to a matching option or `None`. @@ -827,7 +885,6 @@ impl Matches { } } - /// Returns the matching string, a default, or `None`. /// /// Returns `None` if the option was not present, `def` if the option was @@ -841,6 +898,35 @@ impl Matches { } } + /// Returns some matching value or `None`. + /// + /// Similar to opt_str, also converts matching argument using FromStr. + pub fn opt_get(&self, nm: &str) -> result::Result, T::Err> + where + T: FromStr, + { + match self.opt_val(nm) { + Some(Val(s)) => Ok(Some(s.parse()?)), + Some(Given) => Ok(None), + None => Ok(None), + } + } + + /// Returns a matching value or default. + /// + /// Similar to opt_default, except the two differences. + /// Instead of returning None when argument was not present, return `def`. + /// Instead of returning &str return type T, parsed using str::parse(). + pub fn opt_get_default(&self, nm: &str, def: T) -> result::Result + where + T: FromStr, + { + match self.opt_val(nm) { + Some(Val(s)) => s.parse(), + Some(Given) => Ok(def), + None => Ok(def), + } + } } fn is_arg(arg: &str) -> bool { @@ -851,12 +937,12 @@ fn find_opt(opts: &[Opt], nm: &Name) -> Option { // Search main options. let pos = opts.iter().position(|opt| &opt.name == nm); if pos.is_some() { - return pos + return pos; } // Search in aliases. for candidate in opts.iter() { - if candidate.aliases.iter().position(|opt| &opt.name == nm).is_some() { + if candidate.aliases.iter().any(|opt| &opt.name == nm) { return opts.iter().position(|opt| opt.name == candidate.name); } } @@ -867,21 +953,11 @@ fn find_opt(opts: &[Opt], nm: &Name) -> Option { impl fmt::Display for Fail { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { - ArgumentMissing(ref nm) => { - write!(f, "Argument to option '{}' missing", *nm) - } - UnrecognizedOption(ref nm) => { - write!(f, "Unrecognized option: '{}'", *nm) - } - OptionMissing(ref nm) => { - write!(f, "Required option '{}' missing", *nm) - } - OptionDuplicated(ref nm) => { - write!(f, "Option '{}' given more than once", *nm) - } - UnexpectedArgument(ref nm) => { - write!(f, "Option '{}' does not take an argument", *nm) - } + ArgumentMissing(ref nm) => write!(f, "Argument to option '{}' missing", *nm), + UnrecognizedOption(ref nm) => write!(f, "Unrecognized option: '{}'", *nm), + OptionMissing(ref nm) => write!(f, "Required option '{}' missing", *nm), + OptionDuplicated(ref nm) => write!(f, "Option '{}' given more than once", *nm), + UnexpectedArgument(ref nm) => write!(f, "Option '{}' does not take an argument", *nm), } } } @@ -894,7 +970,7 @@ fn format_option(opt: &OptGroup) -> String { } // Use short_name if possible, but fall back to long_name. - if opt.short_name.len() > 0 { + if !opt.short_name.is_empty() { line.push('-'); line.push_str(&opt.short_name); } else { @@ -923,1087 +999,52 @@ fn format_option(opt: &OptGroup) -> String { line } -#[derive(Clone, Copy)] -enum SplitWithinState { - A, // leading whitespace, initial state - B, // words - C, // internal and trailing whitespace -} - -#[derive(Clone, Copy)] -enum Whitespace { - Ws, // current char is whitespace - Cr // current char is not whitespace -} - -#[derive(Clone, Copy)] -enum LengthLimit { - UnderLim, // current char makes current substring still fit in limit - OverLim // current char makes current substring no longer fit in limit -} - - /// Splits a string into substrings with possibly internal whitespace, /// each of them at most `lim` bytes long, if possible. The substrings /// have leading and trailing whitespace removed, and are only cut at /// whitespace boundaries. -/// -/// Note: Function was moved here from `std::str` because this module is the only place that -/// uses it, and because it was too specific for a general string function. -fn each_split_within<'a, F>(ss: &'a str, lim: usize, mut it: F) - -> bool where F: FnMut(&'a str) -> bool { - // Just for fun, let's write this as a state machine: - - let mut slice_start = 0; - let mut last_start = 0; - let mut last_end = 0; - let mut state = A; - let mut fake_i = ss.len(); - let mut lim = lim; - - let mut cont = true; - - // if the limit is larger than the string, lower it to save cycles - if lim >= fake_i { - lim = fake_i; - } - - let mut machine = |cont: &mut bool, state: &mut SplitWithinState, (i, c): (usize, char)| { - let whitespace = if c.is_whitespace() { Ws } else { Cr }; - let limit = if (i - slice_start + 1) <= lim { UnderLim } else { OverLim }; - - *state = match (*state, whitespace, limit) { - (A, Ws, _) => { A } - (A, Cr, _) => { slice_start = i; last_start = i; B } - - (B, Cr, UnderLim) => { B } - (B, Cr, OverLim) if (i - last_start + 1) > lim => { - // A single word has gone over the limit. In this - // case we just accept that the word will be too long. - B - } - (B, Cr, OverLim) => { - *cont = it(&ss[slice_start..last_end]); - slice_start = last_start; - B - } - (B, Ws, UnderLim) => { - last_end = i; - C - } - (B, Ws, OverLim) => { - last_end = i; - *cont = it(&ss[slice_start..last_end]); - A - } - - (C, Cr, UnderLim) => { - last_start = i; - B - } - (C, Cr, OverLim) => { - *cont = it(&ss[slice_start..last_end]); - slice_start = i; - last_start = i; - last_end = i; - B - } - (C, Ws, OverLim) => { - *cont = it(&ss[slice_start..last_end]); - A - } - (C, Ws, UnderLim) => { - C - } - }; - - *cont - }; - - ss.char_indices().all(|x| machine(&mut cont, &mut state, x)); - - // Let the automaton 'run out' by supplying trailing whitespace - while cont && match state { B | C => true, A => false } { - machine(&mut cont, &mut state, (fake_i, ' ')); - fake_i += 1; - } - return cont; -} - -#[test] -fn test_split_within() { - fn t(s: &str, i: usize, u: &[String]) { - let mut v = Vec::new(); - each_split_within(s, i, |s| { v.push(s.to_string()); true }); - assert!(v.iter().zip(u.iter()).all(|(a,b)| a == b)); - } - t("", 0, &[]); - t("", 15, &[]); - t("hello", 15, &["hello".to_string()]); - t("\nMary had a little lamb\nLittle lamb\n", 15, &[ - "Mary had a".to_string(), - "little lamb".to_string(), - "Little lamb".to_string() - ]); - t("\nMary had a little lamb\nLittle lamb\n", ::std::usize::MAX, - &["Mary had a little lamb\nLittle lamb".to_string()]); -} - -#[cfg(test)] -mod tests { - use super::{HasArg, Name, Occur, Opt, Options, ParsingStyle}; - use super::Fail::*; - - // Tests for reqopt - #[test] - fn test_reqopt() { - let long_args = vec!("--test=20".to_string()); - let mut opts = Options::new(); - opts.reqopt("t", "test", "testing", "TEST"); - match opts.parse(&long_args) { - Ok(ref m) => { - assert!(m.opt_present("test")); - assert_eq!(m.opt_str("test").unwrap(), "20"); - assert!(m.opt_present("t")); - assert_eq!(m.opt_str("t").unwrap(), "20"); - } - _ => { panic!("test_reqopt failed (long arg)"); } - } - let short_args = vec!("-t".to_string(), "20".to_string()); - match opts.parse(&short_args) { - Ok(ref m) => { - assert!((m.opt_present("test"))); - assert_eq!(m.opt_str("test").unwrap(), "20"); - assert!((m.opt_present("t"))); - assert_eq!(m.opt_str("t").unwrap(), "20"); - } - _ => { panic!("test_reqopt failed (short arg)"); } - } - } - - #[test] - fn test_reqopt_missing() { - let args = vec!("blah".to_string()); - match Options::new() - .reqopt("t", "test", "testing", "TEST") - .parse(&args) { - Err(OptionMissing(_)) => {}, - _ => panic!() - } - } - - #[test] - fn test_reqopt_no_arg() { - let long_args = vec!("--test".to_string()); - let mut opts = Options::new(); - opts.reqopt("t", "test", "testing", "TEST"); - match opts.parse(&long_args) { - Err(ArgumentMissing(_)) => {}, - _ => panic!() - } - let short_args = vec!("-t".to_string()); - match opts.parse(&short_args) { - Err(ArgumentMissing(_)) => {}, - _ => panic!() - } - } - - #[test] - fn test_reqopt_multi() { - let args = vec!("--test=20".to_string(), "-t".to_string(), "30".to_string()); - match Options::new() - .reqopt("t", "test", "testing", "TEST") - .parse(&args) { - Err(OptionDuplicated(_)) => {}, - _ => panic!() - } - } - - // Tests for optopt - #[test] - fn test_optopt() { - let long_args = vec!("--test=20".to_string()); - let mut opts = Options::new(); - opts.optopt("t", "test", "testing", "TEST"); - match opts.parse(&long_args) { - Ok(ref m) => { - assert!(m.opt_present("test")); - assert_eq!(m.opt_str("test").unwrap(), "20"); - assert!((m.opt_present("t"))); - assert_eq!(m.opt_str("t").unwrap(), "20"); - } - _ => panic!() - } - let short_args = vec!("-t".to_string(), "20".to_string()); - match opts.parse(&short_args) { - Ok(ref m) => { - assert!((m.opt_present("test"))); - assert_eq!(m.opt_str("test").unwrap(), "20"); - assert!((m.opt_present("t"))); - assert_eq!(m.opt_str("t").unwrap(), "20"); - } - _ => panic!() - } - } - - #[test] - fn test_optopt_missing() { - let args = vec!("blah".to_string()); - match Options::new() - .optopt("t", "test", "testing", "TEST") - .parse(&args) { - Ok(ref m) => { - assert!(!m.opt_present("test")); - assert!(!m.opt_present("t")); - } - _ => panic!() - } - } - - #[test] - fn test_optopt_no_arg() { - let long_args = vec!("--test".to_string()); - let mut opts = Options::new(); - opts.optopt("t", "test", "testing", "TEST"); - match opts.parse(&long_args) { - Err(ArgumentMissing(_)) => {}, - _ => panic!() - } - let short_args = vec!("-t".to_string()); - match opts.parse(&short_args) { - Err(ArgumentMissing(_)) => {}, - _ => panic!() - } - } - - #[test] - fn test_optopt_multi() { - let args = vec!("--test=20".to_string(), "-t".to_string(), "30".to_string()); - match Options::new() - .optopt("t", "test", "testing", "TEST") - .parse(&args) { - Err(OptionDuplicated(_)) => {}, - _ => panic!() - } - } - - // Tests for optflag - #[test] - fn test_optflag() { - let long_args = vec!("--test".to_string()); - let mut opts = Options::new(); - opts.optflag("t", "test", "testing"); - match opts.parse(&long_args) { - Ok(ref m) => { - assert!(m.opt_present("test")); - assert!(m.opt_present("t")); - } - _ => panic!() - } - let short_args = vec!("-t".to_string()); - match opts.parse(&short_args) { - Ok(ref m) => { - assert!(m.opt_present("test")); - assert!(m.opt_present("t")); - } - _ => panic!() - } - } - - #[test] - fn test_optflag_missing() { - let args = vec!("blah".to_string()); - match Options::new() - .optflag("t", "test", "testing") - .parse(&args) { - Ok(ref m) => { - assert!(!m.opt_present("test")); - assert!(!m.opt_present("t")); - } - _ => panic!() - } - } - - #[test] - fn test_opt_end() { - let args = vec!["--".to_owned(), "-t".to_owned()]; - match Options::new() - .optflag("t", "test", "testing") - .parse(&args) { - Ok(ref m) => { - assert!(!m.opt_present("test")); - assert!(!m.opt_present("t")); - assert_eq!(m.free.len(), 1); - assert_eq!(m.free[0], "-t"); - } - _ => panic!() - } - } - - #[test] - fn test_opt_only_end() { - let args = vec!["--".to_owned()]; - match Options::new() - .optflag("t", "test", "testing") - .parse(&args) { - Ok(ref m) => { - assert!(!m.opt_present("test")); - assert!(!m.opt_present("t")); - assert_eq!(m.free.len(), 0); - } - _ => panic!() - } - } - - #[test] - fn test_optflag_long_arg() { - let args = vec!("--test=20".to_string()); - match Options::new() - .optflag("t", "test", "testing") - .parse(&args) { - Err(UnexpectedArgument(_)) => {}, - _ => panic!() - } - } - - #[test] - fn test_optflag_multi() { - let args = vec!("--test".to_string(), "-t".to_string()); - match Options::new() - .optflag("t", "test", "testing") - .parse(&args) { - Err(OptionDuplicated(_)) => {}, - _ => panic!() - } - } - - #[test] - fn test_optflag_short_arg() { - let args = vec!("-t".to_string(), "20".to_string()); - match Options::new() - .optflag("t", "test", "testing") - .parse(&args) { - Ok(ref m) => { - // The next variable after the flag is just a free argument - - assert!(m.free[0] == "20"); - } - _ => panic!() - } - } - - // Tests for optflagmulti - #[test] - fn test_optflagmulti_short1() { - let args = vec!("-v".to_string()); - match Options::new() - .optflagmulti("v", "verbose", "verbosity") - .parse(&args) { - Ok(ref m) => { - assert_eq!(m.opt_count("v"), 1); - } - _ => panic!() - } - } - - #[test] - fn test_optflagmulti_short2a() { - let args = vec!("-v".to_string(), "-v".to_string()); - match Options::new() - .optflagmulti("v", "verbose", "verbosity") - .parse(&args) { - Ok(ref m) => { - assert_eq!(m.opt_count("v"), 2); - } - _ => panic!() - } - } - - #[test] - fn test_optflagmulti_short2b() { - let args = vec!("-vv".to_string()); - match Options::new() - .optflagmulti("v", "verbose", "verbosity") - .parse(&args) { - Ok(ref m) => { - assert_eq!(m.opt_count("v"), 2); - } - _ => panic!() - } - } - - #[test] - fn test_optflagmulti_long1() { - let args = vec!("--verbose".to_string()); - match Options::new() - .optflagmulti("v", "verbose", "verbosity") - .parse(&args) { - Ok(ref m) => { - assert_eq!(m.opt_count("verbose"), 1); - } - _ => panic!() - } - } - - #[test] - fn test_optflagmulti_long2() { - let args = vec!("--verbose".to_string(), "--verbose".to_string()); - match Options::new() - .optflagmulti("v", "verbose", "verbosity") - .parse(&args) { - Ok(ref m) => { - assert_eq!(m.opt_count("verbose"), 2); - } - _ => panic!() - } - } +fn each_split_within(desc: &str, lim: usize) -> Vec { + let mut rows = Vec::new(); + for line in desc.trim().lines() { + let line_chars = line.chars().chain(Some(' ')); + let words = line_chars + .fold((Vec::new(), 0, 0), |(mut words, a, z), c| { + let idx = z + c.len_utf8(); // Get the current byte offset + + // If the char is whitespace, advance the word start and maybe push a word + if c.is_whitespace() { + if a != z { + words.push(&line[a..z]); + } + (words, idx, idx) + } + // If the char is not whitespace, continue, retaining the current + else { + (words, a, idx) + } + }).0; - #[test] - fn test_optflagmulti_mix() { - let args = vec!("--verbose".to_string(), "-v".to_string(), - "-vv".to_string(), "verbose".to_string()); - match Options::new() - .optflagmulti("v", "verbose", "verbosity") - .parse(&args) { - Ok(ref m) => { - assert_eq!(m.opt_count("verbose"), 4); - assert_eq!(m.opt_count("v"), 4); - } - _ => panic!() - } - } + let mut row = String::new(); + for word in words.iter() { + let sep = if !row.is_empty() { Some(" ") } else { None }; + let width = row.width() + word.width() + sep.map(UnicodeWidthStr::width).unwrap_or(0); - // Tests for optflagopt - #[test] - fn test_optflagopt() { - let long_args = vec!("--test".to_string()); - let mut opts = Options::new(); - opts.optflagopt("t", "test", "testing", "ARG"); - match opts.parse(&long_args) { - Ok(ref m) => { - assert!(m.opt_present("test")); - assert!(m.opt_present("t")); - } - _ => panic!() - } - let short_args = vec!("-t".to_string()); - match opts.parse(&short_args) { - Ok(ref m) => { - assert!(m.opt_present("test")); - assert!(m.opt_present("t")); - } - _ => panic!() - } - let short_args = vec!("-t".to_string(), "x".to_string()); - match opts.parse(&short_args) { - Ok(ref m) => { - assert_eq!(m.opt_str("t").unwrap(), "x"); - assert_eq!(m.opt_str("test").unwrap(), "x"); - } - _ => panic!() - } - let long_args = vec!("--test=x".to_string()); - match opts.parse(&long_args) { - Ok(ref m) => { - assert_eq!(m.opt_str("t").unwrap(), "x"); - assert_eq!(m.opt_str("test").unwrap(), "x"); - } - _ => panic!() - } - let long_args = vec!("--test".to_string(), "x".to_string()); - match opts.parse(&long_args) { - Ok(ref m) => { - assert_eq!(m.opt_str("t"), None); - assert_eq!(m.opt_str("test"), None); + if width <= lim { + if let Some(sep) = sep { + row.push_str(sep) + } + row.push_str(word); + continue; } - _ => panic!() - } - let no_args: Vec = vec!(); - match opts.parse(&no_args) { - Ok(ref m) => { - assert!(!m.opt_present("test")); - assert!(!m.opt_present("t")); - } - _ => panic!() - } - } - - // Tests for optmulti - #[test] - fn test_optmulti() { - let long_args = vec!("--test=20".to_string()); - let mut opts = Options::new(); - opts.optmulti("t", "test", "testing", "TEST"); - match opts.parse(&long_args) { - Ok(ref m) => { - assert!((m.opt_present("test"))); - assert_eq!(m.opt_str("test").unwrap(), "20"); - assert!((m.opt_present("t"))); - assert_eq!(m.opt_str("t").unwrap(), "20"); - } - _ => panic!() - } - let short_args = vec!("-t".to_string(), "20".to_string()); - match opts.parse(&short_args) { - Ok(ref m) => { - assert!((m.opt_present("test"))); - assert_eq!(m.opt_str("test").unwrap(), "20"); - assert!((m.opt_present("t"))); - assert_eq!(m.opt_str("t").unwrap(), "20"); - } - _ => panic!() - } - } - - #[test] - fn test_optmulti_missing() { - let args = vec!("blah".to_string()); - match Options::new() - .optmulti("t", "test", "testing", "TEST") - .parse(&args) { - Ok(ref m) => { - assert!(!m.opt_present("test")); - assert!(!m.opt_present("t")); - } - _ => panic!() - } - } - - #[test] - fn test_optmulti_no_arg() { - let long_args = vec!("--test".to_string()); - let mut opts = Options::new(); - opts.optmulti("t", "test", "testing", "TEST"); - match opts.parse(&long_args) { - Err(ArgumentMissing(_)) => {}, - _ => panic!() - } - let short_args = vec!("-t".to_string()); - match opts.parse(&short_args) { - Err(ArgumentMissing(_)) => {}, - _ => panic!() - } - } - - #[test] - fn test_optmulti_multi() { - let args = vec!("--test=20".to_string(), "-t".to_string(), "30".to_string()); - match Options::new() - .optmulti("t", "test", "testing", "TEST") - .parse(&args) { - Ok(ref m) => { - assert!(m.opt_present("test")); - assert_eq!(m.opt_str("test").unwrap(), "20"); - assert!(m.opt_present("t")); - assert_eq!(m.opt_str("t").unwrap(), "20"); - let pair = m.opt_strs("test"); - assert!(pair[0] == "20"); - assert!(pair[1] == "30"); - } - _ => panic!() - } - } - - #[test] - fn test_free_argument_is_hyphen() { - let args = vec!("-".to_string()); - match Options::new().parse(&args) { - Ok(ref m) => { - assert_eq!(m.free.len(), 1); - assert_eq!(m.free[0], "-"); + if !row.is_empty() { + rows.push(row.clone()); + row.clear(); } - _ => panic!() - } - } - - #[test] - fn test_unrecognized_option() { - let long_args = vec!("--untest".to_string()); - let mut opts = Options::new(); - opts.optmulti("t", "test", "testing", "TEST"); - match opts.parse(&long_args) { - Err(UnrecognizedOption(_)) => {}, - _ => panic!() - } - let short_args = vec!("-u".to_string()); - match opts.parse(&short_args) { - Err(UnrecognizedOption(_)) => {}, - _ => panic!() - } - } - - #[test] - fn test_combined() { - let args = - vec!("prog".to_string(), - "free1".to_string(), - "-s".to_string(), - "20".to_string(), - "free2".to_string(), - "--flag".to_string(), - "--long=30".to_string(), - "-f".to_string(), - "-m".to_string(), - "40".to_string(), - "-m".to_string(), - "50".to_string(), - "-n".to_string(), - "-A B".to_string(), - "-n".to_string(), - "-60 70".to_string()); - match Options::new() - .optopt("s", "something", "something", "SOMETHING") - .optflag("", "flag", "a flag") - .reqopt("", "long", "hi", "LONG") - .optflag("f", "", "another flag") - .optmulti("m", "", "mmmmmm", "YUM") - .optmulti("n", "", "nothing", "NOTHING") - .optopt("", "notpresent", "nothing to see here", "NOPE") - .parse(&args) { - Ok(ref m) => { - assert!(m.free[0] == "prog"); - assert!(m.free[1] == "free1"); - assert_eq!(m.opt_str("s").unwrap(), "20"); - assert!(m.free[2] == "free2"); - assert!((m.opt_present("flag"))); - assert_eq!(m.opt_str("long").unwrap(), "30"); - assert!((m.opt_present("f"))); - let pair = m.opt_strs("m"); - assert!(pair[0] == "40"); - assert!(pair[1] == "50"); - let pair = m.opt_strs("n"); - assert!(pair[0] == "-A B"); - assert!(pair[1] == "-60 70"); - assert!((!m.opt_present("notpresent"))); - } - _ => panic!() + row.push_str(word); } - } - - #[test] - fn test_mixed_stop() { - let args = - vec!("-a".to_string(), - "b".to_string(), - "-c".to_string(), - "d".to_string()); - match Options::new() - .parsing_style(ParsingStyle::StopAtFirstFree) - .optflag("a", "", "") - .optopt("c", "", "", "") - .parse(&args) { - Ok(ref m) => { - println!("{}", m.opt_present("c")); - assert!(m.opt_present("a")); - assert!(!m.opt_present("c")); - assert_eq!(m.free.len(), 3); - assert_eq!(m.free[0], "b"); - assert_eq!(m.free[1], "-c"); - assert_eq!(m.free[2], "d"); - } - _ => panic!() - } - } - - #[test] - fn test_mixed_stop_hyphen() { - let args = - vec!("-a".to_string(), - "-".to_string(), - "-c".to_string(), - "d".to_string()); - match Options::new() - .parsing_style(ParsingStyle::StopAtFirstFree) - .optflag("a", "", "") - .optopt("c", "", "", "") - .parse(&args) { - Ok(ref m) => { - println!("{}", m.opt_present("c")); - assert!(m.opt_present("a")); - assert!(!m.opt_present("c")); - assert_eq!(m.free.len(), 3); - assert_eq!(m.free[0], "-"); - assert_eq!(m.free[1], "-c"); - assert_eq!(m.free[2], "d"); - } - _ => panic!() + if !row.is_empty() { + rows.push(row); } } - - #[test] - fn test_multi() { - let mut opts = Options::new(); - opts.optopt("e", "", "encrypt", "ENCRYPT"); - opts.optopt("", "encrypt", "encrypt", "ENCRYPT"); - opts.optopt("f", "", "flag", "FLAG"); - - let args_single = vec!("-e".to_string(), "foo".to_string()); - let matches_single = &match opts.parse(&args_single) { - Ok(m) => m, - Err(_) => panic!() - }; - assert!(matches_single.opts_present(&["e".to_string()])); - assert!(matches_single.opts_present(&["encrypt".to_string(), "e".to_string()])); - assert!(matches_single.opts_present(&["e".to_string(), "encrypt".to_string()])); - assert!(!matches_single.opts_present(&["encrypt".to_string()])); - assert!(!matches_single.opts_present(&["thing".to_string()])); - assert!(!matches_single.opts_present(&[])); - - assert_eq!(matches_single.opts_str(&["e".to_string()]).unwrap(), "foo"); - assert_eq!(matches_single.opts_str(&["e".to_string(), "encrypt".to_string()]).unwrap(), - "foo"); - assert_eq!(matches_single.opts_str(&["encrypt".to_string(), "e".to_string()]).unwrap(), - "foo"); - - let args_both = vec!("-e".to_string(), "foo".to_string(), "--encrypt".to_string(), - "foo".to_string()); - let matches_both = &match opts.parse(&args_both) { - Ok(m) => m, - Err(_) => panic!() - }; - assert!(matches_both.opts_present(&["e".to_string()])); - assert!(matches_both.opts_present(&["encrypt".to_string()])); - assert!(matches_both.opts_present(&["encrypt".to_string(), "e".to_string()])); - assert!(matches_both.opts_present(&["e".to_string(), "encrypt".to_string()])); - assert!(!matches_both.opts_present(&["f".to_string()])); - assert!(!matches_both.opts_present(&["thing".to_string()])); - assert!(!matches_both.opts_present(&[])); - - assert_eq!(matches_both.opts_str(&["e".to_string()]).unwrap(), "foo"); - assert_eq!(matches_both.opts_str(&["encrypt".to_string()]).unwrap(), "foo"); - assert_eq!(matches_both.opts_str(&["e".to_string(), "encrypt".to_string()]).unwrap(), - "foo"); - assert_eq!(matches_both.opts_str(&["encrypt".to_string(), "e".to_string()]).unwrap(), - "foo"); - } - - #[test] - fn test_nospace() { - let args = vec!("-Lfoo".to_string(), "-M.".to_string()); - let matches = &match Options::new() - .optmulti("L", "", "library directory", "LIB") - .optmulti("M", "", "something", "MMMM") - .parse(&args) { - Ok(m) => m, - Err(_) => panic!() - }; - assert!(matches.opts_present(&["L".to_string()])); - assert_eq!(matches.opts_str(&["L".to_string()]).unwrap(), "foo"); - assert!(matches.opts_present(&["M".to_string()])); - assert_eq!(matches.opts_str(&["M".to_string()]).unwrap(), "."); - - } - - #[test] - fn test_nospace_conflict() { - let args = vec!("-vvLverbose".to_string(), "-v".to_string() ); - let matches = &match Options::new() - .optmulti("L", "", "library directory", "LIB") - .optflagmulti("v", "verbose", "Verbose") - .parse(&args) { - Ok(m) => m, - Err(e) => panic!( "{}", e ) - }; - assert!(matches.opts_present(&["L".to_string()])); - assert_eq!(matches.opts_str(&["L".to_string()]).unwrap(), "verbose"); - assert!(matches.opts_present(&["v".to_string()])); - assert_eq!(3, matches.opt_count("v")); - } - - #[test] - fn test_long_to_short() { - let mut short = Opt { - name: Name::Long("banana".to_string()), - hasarg: HasArg::Yes, - occur: Occur::Req, - aliases: Vec::new(), - }; - short.aliases = vec!(Opt { name: Name::Short('b'), - hasarg: HasArg::Yes, - occur: Occur::Req, - aliases: Vec::new() }); - let mut opts = Options::new(); - opts.reqopt("b", "banana", "some bananas", "VAL"); - let ref verbose = opts.grps[0]; - assert!(verbose.long_to_short() == short); - } - - #[test] - fn test_aliases_long_and_short() { - let args = vec!("-a".to_string(), "--apple".to_string(), "-a".to_string()); - - let matches = Options::new() - .optflagmulti("a", "apple", "Desc") - .parse(&args) - .unwrap(); - assert_eq!(3, matches.opt_count("a")); - assert_eq!(3, matches.opt_count("apple")); - } - - #[test] - fn test_usage() { - let mut opts = Options::new(); - opts.reqopt("b", "banana", "Desc", "VAL"); - opts.optopt("a", "012345678901234567890123456789", - "Desc", "VAL"); - opts.optflag("k", "kiwi", "Desc"); - opts.optflagopt("p", "", "Desc", "VAL"); - opts.optmulti("l", "", "Desc", "VAL"); - opts.optflag("", "starfruit", "Starfruit"); - - let expected = -"Usage: fruits - -Options: - -b, --banana VAL Desc - -a, --012345678901234567890123456789 VAL - Desc - -k, --kiwi Desc - -p [VAL] Desc - -l VAL Desc - --starfruit Starfruit -"; - - let generated_usage = opts.usage("Usage: fruits"); - - debug!("expected: <<{}>>", expected); - debug!("generated: <<{}>>", generated_usage); - assert_eq!(generated_usage, expected); - } - - #[test] - fn test_usage_description_wrapping() { - // indentation should be 24 spaces - // lines wrap after 78: or rather descriptions wrap after 54 - - let mut opts = Options::new(); - opts.optflag("k", "kiwi", - "This is a long description which won't be wrapped..+.."); // 54 - opts.optflag("a", "apple", - "This is a long description which _will_ be wrapped..+.."); - opts.optflag("b", "banana", - "HereWeNeedOneSingleWordThatIsLongerThanTheWrappingLengthAndThisIsIt"); - - let expected = -"Usage: fruits - -Options: - -k, --kiwi This is a long description which won't be wrapped..+.. - -a, --apple This is a long description which _will_ be - wrapped..+.. - -b, --banana HereWeNeedOneSingleWordThatIsLongerThanTheWrappingLengthAndThisIsIt -"; - - let usage = opts.usage("Usage: fruits"); - - debug!("expected: <<{}>>", expected); - debug!("generated: <<{}>>", usage); - assert!(usage == expected) - } - - #[test] - fn test_usage_description_multibyte_handling() { - let mut opts = Options::new(); - opts.optflag("k", "k\u{2013}w\u{2013}", - "The word kiwi is normally spelled with two i's"); - opts.optflag("a", "apple", - "This \u{201C}description\u{201D} has some characters that could \ -confuse the line wrapping; an apple costs 0.51€ in some parts of Europe."); - - let expected = -"Usage: fruits - -Options: - -k, --k–w– The word kiwi is normally spelled with two i's - -a, --apple This “description” has some characters that could - confuse the line wrapping; an apple costs 0.51€ in - some parts of Europe. -"; - - let usage = opts.usage("Usage: fruits"); - - debug!("expected: <<{}>>", expected); - debug!("generated: <<{}>>", usage); - assert!(usage == expected) - } - - #[test] - fn test_usage_short_only() { - let mut opts = Options::new(); - opts.optopt("k", "", "Kiwi", "VAL"); - opts.optflag("s", "", "Starfruit"); - opts.optflagopt("a", "", "Apple", "TYPE"); - - let expected = -"Usage: fruits - -Options: - -k VAL Kiwi - -s Starfruit - -a [TYPE] Apple -"; - - let usage = opts.usage("Usage: fruits"); - debug!("expected: <<{}>>", expected); - debug!("generated: <<{}>>", usage); - assert!(usage == expected) - } - - #[test] - fn test_usage_long_only() { - let mut opts = Options::new(); - opts.optopt("", "kiwi", "Kiwi", "VAL"); - opts.optflag("", "starfruit", "Starfruit"); - opts.optflagopt("", "apple", "Apple", "TYPE"); - - let expected = -"Usage: fruits - -Options: - --kiwi VAL Kiwi - --starfruit Starfruit - --apple [TYPE] Apple -"; - - let usage = opts.usage("Usage: fruits"); - debug!("expected: <<{}>>", expected); - debug!("generated: <<{}>>", usage); - assert!(usage == expected) - } - - #[test] - fn test_short_usage() { - let mut opts = Options::new(); - opts.reqopt("b", "banana", "Desc", "VAL"); - opts.optopt("a", "012345678901234567890123456789", - "Desc", "VAL"); - opts.optflag("k", "kiwi", "Desc"); - opts.optflagopt("p", "", "Desc", "VAL"); - opts.optmulti("l", "", "Desc", "VAL"); - - let expected = "Usage: fruits -b VAL [-a VAL] [-k] [-p [VAL]] [-l VAL]..".to_string(); - let generated_usage = opts.short_usage("fruits"); - - debug!("expected: <<{}>>", expected); - debug!("generated: <<{}>>", generated_usage); - assert_eq!(generated_usage, expected); - } - #[test] - fn test_nonexistant_opt() { - let mut opts = Options::new(); - opts.optflag("b", "bar", "Desc"); - let args: Vec = Vec::new(); - let matches = opts.parse(&args).unwrap(); - assert_eq!(matches.opt_defined("foo"), false); - assert_eq!(matches.opt_defined("bar"), true); - } - #[test] - fn test_args_with_equals() { - let mut opts = Options::new(); - opts.optopt("o", "one", "One", "INFO"); - opts.optopt("t", "two", "Two", "INFO"); - - let args = vec!("--one".to_string(), "A=B".to_string(), - "--two=C=D".to_string()); - let matches = &match opts.parse(&args) { - Ok(m) => m, - Err(e) => panic!("{}", e) - }; - assert_eq!(matches.opts_str(&["o".to_string()]).unwrap(), "A=B"); - assert_eq!(matches.opts_str(&["t".to_string()]).unwrap(), "C=D"); - } - - #[test] - fn test_long_only_usage() { - let mut opts = Options::new(); - opts.long_only(true); - opts.optflag("k", "kiwi", "Description"); - opts.optflag("a", "apple", "Description"); - - let expected = -"Usage: fruits - -Options: - -k, -kiwi Description - -a, -apple Description -"; - - let usage = opts.usage("Usage: fruits"); - - debug!("expected: <<{}>>", expected); - debug!("generated: <<{}>>", usage); - assert!(usage == expected) - } - - #[test] - fn test_long_only_mode() { - let mut opts = Options::new(); - opts.long_only(true); - opts.optopt("a", "apple", "Description", "X"); - opts.optopt("b", "banana", "Description", "X"); - opts.optopt("c", "currant", "Description", "X"); - opts.optopt("", "durian", "Description", "X"); - opts.optopt("e", "", "Description", "X"); - opts.optopt("", "fruit", "Description", "X"); - - let args = vec!("-a", "A", "-b=B", "--c=C", "-durian", "D", "--e", "E", - "-fruit=any"); - let matches = &match opts.parse(&args) { - Ok(m) => m, - Err(e) => panic!("{}", e) - }; - assert_eq!(matches.opts_str(&["a".to_string()]).unwrap(), "A"); - assert_eq!(matches.opts_str(&["b".to_string()]).unwrap(), "B"); - assert_eq!(matches.opts_str(&["c".to_string()]).unwrap(), "C"); - assert_eq!(matches.opts_str(&["durian".to_string()]).unwrap(), "D"); - assert_eq!(matches.opts_str(&["e".to_string()]).unwrap(), "E"); - assert_eq!(matches.opts_str(&["fruit".to_string()]).unwrap(), "any"); - } - - #[test] - fn test_long_only_mode_no_short_parse() { - let mut opts = Options::new(); - opts.long_only(true); - opts.optflag("h", "help", "Description"); - opts.optflag("i", "ignore", "Description"); - opts.optflag("", "hi", "Description"); - - let args = vec!("-hi"); - let matches = &match opts.parse(&args) { - Ok(m) => m, - Err(e) => panic!("{}", e) - }; - assert!(matches.opt_present("hi")); - assert!(!matches.opt_present("h")); - assert!(!matches.opt_present("i")); - } - - #[test] - fn test_normal_mode_no_long_parse() { - // Like test_long_only_mode_no_short_parse, but we make sure - // that long_only can be disabled, and the right thing - // happens. - let mut opts = Options::new(); - opts.long_only(true); - opts.optflag("h", "help", "Description"); - opts.optflag("i", "ignore", "Description"); - opts.optflag("", "hi", "Description"); - opts.long_only(false); - - let args = vec!("-hi"); - let matches = &match opts.parse(&args) { - Ok(m) => m, - Err(e) => panic!("{}", e) - }; - assert!(!matches.opt_present("hi")); - assert!(matches.opt_present("h")); - assert!(matches.opt_present("i")); - } - - #[test] - #[should_panic] - fn test_long_name_too_short() { - let mut opts = Options::new(); - opts.optflag("", "a", "Oops, long option too short"); - } + rows } diff --git a/vendor/getopts/src/tests/mod.rs b/vendor/getopts/src/tests/mod.rs new file mode 100644 index 0000000000..c61beaa551 --- /dev/null +++ b/vendor/getopts/src/tests/mod.rs @@ -0,0 +1,1240 @@ +use super::each_split_within; +use super::Fail::*; +use super::{HasArg, Name, Occur, Opt, Options, ParsingStyle}; + +#[test] +fn test_split_within() { + fn t(s: &str, i: usize, u: &[String]) { + let v = each_split_within(&(s.to_string()), i); + assert!(v.iter().zip(u.iter()).all(|(a, b)| a == b)); + } + t("", 0, &[]); + t("", 15, &[]); + t("hello", 15, &["hello".to_string()]); + t( + "\nMary had a little lamb\nLittle lamb\n", + 15, + &[ + "Mary had a".to_string(), + "little lamb".to_string(), + "Little lamb".to_string(), + ], + ); + t( + "\nMary had a little lamb\nLittle lamb\n", + ::std::usize::MAX, + &[ + "Mary had a little lamb".to_string(), + "Little lamb".to_string(), + ], + ); +} + +// Tests for reqopt +#[test] +fn test_reqopt() { + let long_args = vec!["--test=20".to_string()]; + let mut opts = Options::new(); + opts.reqopt("t", "test", "testing", "TEST"); + match opts.parse(&long_args) { + Ok(ref m) => { + assert!(m.opt_present("test")); + assert_eq!(m.opt_str("test").unwrap(), "20"); + assert!(m.opt_present("t")); + assert_eq!(m.opt_str("t").unwrap(), "20"); + } + _ => { + panic!("test_reqopt failed (long arg)"); + } + } + let short_args = vec!["-t".to_string(), "20".to_string()]; + match opts.parse(&short_args) { + Ok(ref m) => { + assert!((m.opt_present("test"))); + assert_eq!(m.opt_str("test").unwrap(), "20"); + assert!((m.opt_present("t"))); + assert_eq!(m.opt_str("t").unwrap(), "20"); + } + _ => { + panic!("test_reqopt failed (short arg)"); + } + } +} + +#[test] +fn test_reqopt_missing() { + let args = vec!["blah".to_string()]; + match Options::new() + .reqopt("t", "test", "testing", "TEST") + .parse(&args) + { + Err(OptionMissing(_)) => {} + _ => panic!(), + } +} + +#[test] +fn test_reqopt_no_arg() { + let long_args = vec!["--test".to_string()]; + let mut opts = Options::new(); + opts.reqopt("t", "test", "testing", "TEST"); + match opts.parse(&long_args) { + Err(ArgumentMissing(_)) => {} + _ => panic!(), + } + let short_args = vec!["-t".to_string()]; + match opts.parse(&short_args) { + Err(ArgumentMissing(_)) => {} + _ => panic!(), + } +} + +#[test] +fn test_reqopt_multi() { + let args = vec!["--test=20".to_string(), "-t".to_string(), "30".to_string()]; + match Options::new() + .reqopt("t", "test", "testing", "TEST") + .parse(&args) + { + Err(OptionDuplicated(_)) => {} + _ => panic!(), + } +} + +// Tests for optopt +#[test] +fn test_optopt() { + let long_args = vec!["--test=20".to_string()]; + let mut opts = Options::new(); + opts.optopt("t", "test", "testing", "TEST"); + match opts.parse(&long_args) { + Ok(ref m) => { + assert!(m.opt_present("test")); + assert_eq!(m.opt_str("test").unwrap(), "20"); + assert!((m.opt_present("t"))); + assert_eq!(m.opt_str("t").unwrap(), "20"); + } + _ => panic!(), + } + let short_args = vec!["-t".to_string(), "20".to_string()]; + match opts.parse(&short_args) { + Ok(ref m) => { + assert!((m.opt_present("test"))); + assert_eq!(m.opt_str("test").unwrap(), "20"); + assert!((m.opt_present("t"))); + assert_eq!(m.opt_str("t").unwrap(), "20"); + } + _ => panic!(), + } +} + +#[test] +fn test_optopt_missing() { + let args = vec!["blah".to_string()]; + match Options::new() + .optopt("t", "test", "testing", "TEST") + .parse(&args) + { + Ok(ref m) => { + assert!(!m.opt_present("test")); + assert!(!m.opt_present("t")); + } + _ => panic!(), + } +} + +#[test] +fn test_optopt_no_arg() { + let long_args = vec!["--test".to_string()]; + let mut opts = Options::new(); + opts.optopt("t", "test", "testing", "TEST"); + match opts.parse(&long_args) { + Err(ArgumentMissing(_)) => {} + _ => panic!(), + } + let short_args = vec!["-t".to_string()]; + match opts.parse(&short_args) { + Err(ArgumentMissing(_)) => {} + _ => panic!(), + } +} + +#[test] +fn test_optopt_multi() { + let args = vec!["--test=20".to_string(), "-t".to_string(), "30".to_string()]; + match Options::new() + .optopt("t", "test", "testing", "TEST") + .parse(&args) + { + Err(OptionDuplicated(_)) => {} + _ => panic!(), + } +} + +// Tests for optflag +#[test] +fn test_optflag() { + let long_args = vec!["--test".to_string()]; + let mut opts = Options::new(); + opts.optflag("t", "test", "testing"); + match opts.parse(&long_args) { + Ok(ref m) => { + assert!(m.opt_present("test")); + assert!(m.opt_present("t")); + } + _ => panic!(), + } + let short_args = vec!["-t".to_string()]; + match opts.parse(&short_args) { + Ok(ref m) => { + assert!(m.opt_present("test")); + assert!(m.opt_present("t")); + } + _ => panic!(), + } +} + +#[test] +fn test_optflag_missing() { + let args = vec!["blah".to_string()]; + match Options::new().optflag("t", "test", "testing").parse(&args) { + Ok(ref m) => { + assert!(!m.opt_present("test")); + assert!(!m.opt_present("t")); + } + _ => panic!(), + } +} + +#[test] +fn test_opt_end() { + let args = vec!["--".to_owned(), "-t".to_owned()]; + match Options::new().optflag("t", "test", "testing").parse(&args) { + Ok(ref m) => { + assert!(!m.opt_present("test")); + assert!(!m.opt_present("t")); + assert_eq!(m.free.len(), 1); + assert_eq!(m.free[0], "-t"); + } + _ => panic!(), + } +} + +#[test] +fn test_opt_only_end() { + let args = vec!["--".to_owned()]; + match Options::new().optflag("t", "test", "testing").parse(&args) { + Ok(ref m) => { + assert!(!m.opt_present("test")); + assert!(!m.opt_present("t")); + assert_eq!(m.free.len(), 0); + } + _ => panic!(), + } +} + +#[test] +fn test_optflag_long_arg() { + let args = vec!["--test=20".to_string()]; + match Options::new().optflag("t", "test", "testing").parse(&args) { + Err(UnexpectedArgument(_)) => {} + _ => panic!(), + } +} + +#[test] +fn test_optflag_multi() { + let args = vec!["--test".to_string(), "-t".to_string()]; + match Options::new().optflag("t", "test", "testing").parse(&args) { + Err(OptionDuplicated(_)) => {} + _ => panic!(), + } +} + +#[test] +fn test_optflag_short_arg() { + let args = vec!["-t".to_string(), "20".to_string()]; + match Options::new().optflag("t", "test", "testing").parse(&args) { + Ok(ref m) => { + // The next variable after the flag is just a free argument + + assert!(m.free[0] == "20"); + } + _ => panic!(), + } +} + +// Tests for optflagmulti +#[test] +fn test_optflagmulti_short1() { + let args = vec!["-v".to_string()]; + match Options::new() + .optflagmulti("v", "verbose", "verbosity") + .parse(&args) + { + Ok(ref m) => { + assert_eq!(m.opt_count("v"), 1); + } + _ => panic!(), + } +} + +#[test] +fn test_optflagmulti_short2a() { + let args = vec!["-v".to_string(), "-v".to_string()]; + match Options::new() + .optflagmulti("v", "verbose", "verbosity") + .parse(&args) + { + Ok(ref m) => { + assert_eq!(m.opt_count("v"), 2); + } + _ => panic!(), + } +} + +#[test] +fn test_optflagmulti_short2b() { + let args = vec!["-vv".to_string()]; + match Options::new() + .optflagmulti("v", "verbose", "verbosity") + .parse(&args) + { + Ok(ref m) => { + assert_eq!(m.opt_count("v"), 2); + } + _ => panic!(), + } +} + +#[test] +fn test_optflagmulti_long1() { + let args = vec!["--verbose".to_string()]; + match Options::new() + .optflagmulti("v", "verbose", "verbosity") + .parse(&args) + { + Ok(ref m) => { + assert_eq!(m.opt_count("verbose"), 1); + } + _ => panic!(), + } +} + +#[test] +fn test_optflagmulti_long2() { + let args = vec!["--verbose".to_string(), "--verbose".to_string()]; + match Options::new() + .optflagmulti("v", "verbose", "verbosity") + .parse(&args) + { + Ok(ref m) => { + assert_eq!(m.opt_count("verbose"), 2); + } + _ => panic!(), + } +} + +#[test] +fn test_optflagmulti_mix() { + let args = vec![ + "--verbose".to_string(), + "-v".to_string(), + "-vv".to_string(), + "verbose".to_string(), + ]; + match Options::new() + .optflagmulti("v", "verbose", "verbosity") + .parse(&args) + { + Ok(ref m) => { + assert_eq!(m.opt_count("verbose"), 4); + assert_eq!(m.opt_count("v"), 4); + } + _ => panic!(), + } +} + +// Tests for optflagopt +#[test] +fn test_optflagopt() { + let long_args = vec!["--test".to_string()]; + let mut opts = Options::new(); + opts.optflagopt("t", "test", "testing", "ARG"); + match opts.parse(&long_args) { + Ok(ref m) => { + assert!(m.opt_present("test")); + assert!(m.opt_present("t")); + } + _ => panic!(), + } + let short_args = vec!["-t".to_string()]; + match opts.parse(&short_args) { + Ok(ref m) => { + assert!(m.opt_present("test")); + assert!(m.opt_present("t")); + } + _ => panic!(), + } + let short_args = vec!["-t".to_string(), "x".to_string()]; + match opts.parse(&short_args) { + Ok(ref m) => { + assert_eq!(m.opt_str("t").unwrap(), "x"); + assert_eq!(m.opt_str("test").unwrap(), "x"); + } + _ => panic!(), + } + let long_args = vec!["--test=x".to_string()]; + match opts.parse(&long_args) { + Ok(ref m) => { + assert_eq!(m.opt_str("t").unwrap(), "x"); + assert_eq!(m.opt_str("test").unwrap(), "x"); + } + _ => panic!(), + } + let long_args = vec!["--test".to_string(), "x".to_string()]; + match opts.parse(&long_args) { + Ok(ref m) => { + assert_eq!(m.opt_str("t"), None); + assert_eq!(m.opt_str("test"), None); + } + _ => panic!(), + } + let no_args: Vec = vec![]; + match opts.parse(&no_args) { + Ok(ref m) => { + assert!(!m.opt_present("test")); + assert!(!m.opt_present("t")); + } + _ => panic!(), + } +} + +// Tests for optmulti +#[test] +fn test_optmulti() { + let long_args = vec!["--test=20".to_string()]; + let mut opts = Options::new(); + opts.optmulti("t", "test", "testing", "TEST"); + match opts.parse(&long_args) { + Ok(ref m) => { + assert!((m.opt_present("test"))); + assert_eq!(m.opt_str("test").unwrap(), "20"); + assert!((m.opt_present("t"))); + assert_eq!(m.opt_str("t").unwrap(), "20"); + } + _ => panic!(), + } + let short_args = vec!["-t".to_string(), "20".to_string()]; + match opts.parse(&short_args) { + Ok(ref m) => { + assert!((m.opt_present("test"))); + assert_eq!(m.opt_str("test").unwrap(), "20"); + assert!((m.opt_present("t"))); + assert_eq!(m.opt_str("t").unwrap(), "20"); + } + _ => panic!(), + } +} + +#[test] +fn test_optmulti_missing() { + let args = vec!["blah".to_string()]; + match Options::new() + .optmulti("t", "test", "testing", "TEST") + .parse(&args) + { + Ok(ref m) => { + assert!(!m.opt_present("test")); + assert!(!m.opt_present("t")); + } + _ => panic!(), + } +} + +#[test] +fn test_optmulti_no_arg() { + let long_args = vec!["--test".to_string()]; + let mut opts = Options::new(); + opts.optmulti("t", "test", "testing", "TEST"); + match opts.parse(&long_args) { + Err(ArgumentMissing(_)) => {} + _ => panic!(), + } + let short_args = vec!["-t".to_string()]; + match opts.parse(&short_args) { + Err(ArgumentMissing(_)) => {} + _ => panic!(), + } +} + +#[test] +fn test_optmulti_multi() { + let args = vec!["--test=20".to_string(), "-t".to_string(), "30".to_string()]; + match Options::new() + .optmulti("t", "test", "testing", "TEST") + .parse(&args) + { + Ok(ref m) => { + assert!(m.opt_present("test")); + assert_eq!(m.opt_str("test").unwrap(), "20"); + assert!(m.opt_present("t")); + assert_eq!(m.opt_str("t").unwrap(), "20"); + let pair = m.opt_strs("test"); + assert!(pair[0] == "20"); + assert!(pair[1] == "30"); + } + _ => panic!(), + } +} + +#[test] +fn test_free_argument_is_hyphen() { + let args = vec!["-".to_string()]; + match Options::new().parse(&args) { + Ok(ref m) => { + assert_eq!(m.free.len(), 1); + assert_eq!(m.free[0], "-"); + } + _ => panic!(), + } +} + +#[test] +fn test_unrecognized_option() { + let long_args = vec!["--untest".to_string()]; + let mut opts = Options::new(); + opts.optmulti("t", "test", "testing", "TEST"); + match opts.parse(&long_args) { + Err(UnrecognizedOption(_)) => {} + _ => panic!(), + } + let short_args = vec!["-u".to_string()]; + match opts.parse(&short_args) { + Err(UnrecognizedOption(_)) => {} + _ => panic!(), + } +} + +#[test] +fn test_combined() { + let args = vec![ + "prog".to_string(), + "free1".to_string(), + "-s".to_string(), + "20".to_string(), + "free2".to_string(), + "--flag".to_string(), + "--long=30".to_string(), + "-f".to_string(), + "-m".to_string(), + "40".to_string(), + "-m".to_string(), + "50".to_string(), + "-n".to_string(), + "-A B".to_string(), + "-n".to_string(), + "-60 70".to_string(), + ]; + match Options::new() + .optopt("s", "something", "something", "SOMETHING") + .optflag("", "flag", "a flag") + .reqopt("", "long", "hi", "LONG") + .optflag("f", "", "another flag") + .optmulti("m", "", "mmmmmm", "YUM") + .optmulti("n", "", "nothing", "NOTHING") + .optopt("", "notpresent", "nothing to see here", "NOPE") + .parse(&args) + { + Ok(ref m) => { + assert!(m.free[0] == "prog"); + assert!(m.free[1] == "free1"); + assert_eq!(m.opt_str("s").unwrap(), "20"); + assert!(m.free[2] == "free2"); + assert!((m.opt_present("flag"))); + assert_eq!(m.opt_str("long").unwrap(), "30"); + assert!((m.opt_present("f"))); + let pair = m.opt_strs("m"); + assert!(pair[0] == "40"); + assert!(pair[1] == "50"); + let pair = m.opt_strs("n"); + assert!(pair[0] == "-A B"); + assert!(pair[1] == "-60 70"); + assert!((!m.opt_present("notpresent"))); + } + _ => panic!(), + } +} + +#[test] +fn test_mixed_stop() { + let args = vec![ + "-a".to_string(), + "b".to_string(), + "-c".to_string(), + "d".to_string(), + ]; + match Options::new() + .parsing_style(ParsingStyle::StopAtFirstFree) + .optflag("a", "", "") + .optopt("c", "", "", "") + .parse(&args) + { + Ok(ref m) => { + println!("{}", m.opt_present("c")); + assert!(m.opt_present("a")); + assert!(!m.opt_present("c")); + assert_eq!(m.free.len(), 3); + assert_eq!(m.free[0], "b"); + assert_eq!(m.free[1], "-c"); + assert_eq!(m.free[2], "d"); + } + _ => panic!(), + } +} + +#[test] +fn test_mixed_stop_hyphen() { + let args = vec![ + "-a".to_string(), + "-".to_string(), + "-c".to_string(), + "d".to_string(), + ]; + match Options::new() + .parsing_style(ParsingStyle::StopAtFirstFree) + .optflag("a", "", "") + .optopt("c", "", "", "") + .parse(&args) + { + Ok(ref m) => { + println!("{}", m.opt_present("c")); + assert!(m.opt_present("a")); + assert!(!m.opt_present("c")); + assert_eq!(m.free.len(), 3); + assert_eq!(m.free[0], "-"); + assert_eq!(m.free[1], "-c"); + assert_eq!(m.free[2], "d"); + } + _ => panic!(), + } +} + +#[test] +fn test_multi() { + let mut opts = Options::new(); + opts.optopt("e", "", "encrypt", "ENCRYPT"); + opts.optopt("", "encrypt", "encrypt", "ENCRYPT"); + opts.optopt("f", "", "flag", "FLAG"); + + let args_single = vec!["-e".to_string(), "foo".to_string()]; + let matches_single = &match opts.parse(&args_single) { + Ok(m) => m, + _ => panic!(), + }; + assert!(matches_single.opts_present(&["e".to_string()])); + assert!(matches_single.opts_present(&["encrypt".to_string(), "e".to_string()])); + assert!(matches_single.opts_present(&["e".to_string(), "encrypt".to_string()])); + assert!(!matches_single.opts_present(&["encrypt".to_string()])); + assert!(!matches_single.opts_present(&["thing".to_string()])); + assert!(!matches_single.opts_present(&[])); + + assert_eq!(matches_single.opts_str(&["e".to_string()]).unwrap(), "foo"); + assert_eq!( + matches_single + .opts_str(&["e".to_string(), "encrypt".to_string()]) + .unwrap(), + "foo" + ); + assert_eq!( + matches_single + .opts_str(&["encrypt".to_string(), "e".to_string()]) + .unwrap(), + "foo" + ); + + let args_both = vec![ + "-e".to_string(), + "foo".to_string(), + "--encrypt".to_string(), + "foo".to_string(), + ]; + let matches_both = &match opts.parse(&args_both) { + Ok(m) => m, + _ => panic!(), + }; + assert!(matches_both.opts_present(&["e".to_string()])); + assert!(matches_both.opts_present(&["encrypt".to_string()])); + assert!(matches_both.opts_present(&["encrypt".to_string(), "e".to_string()])); + assert!(matches_both.opts_present(&["e".to_string(), "encrypt".to_string()])); + assert!(!matches_both.opts_present(&["f".to_string()])); + assert!(!matches_both.opts_present(&["thing".to_string()])); + assert!(!matches_both.opts_present(&[])); + + assert_eq!(matches_both.opts_str(&["e".to_string()]).unwrap(), "foo"); + assert_eq!( + matches_both.opts_str(&["encrypt".to_string()]).unwrap(), + "foo" + ); + assert_eq!( + matches_both + .opts_str(&["e".to_string(), "encrypt".to_string()]) + .unwrap(), + "foo" + ); + assert_eq!( + matches_both + .opts_str(&["encrypt".to_string(), "e".to_string()]) + .unwrap(), + "foo" + ); +} + +#[test] +fn test_nospace() { + let args = vec!["-Lfoo".to_string(), "-M.".to_string()]; + let matches = &match Options::new() + .optmulti("L", "", "library directory", "LIB") + .optmulti("M", "", "something", "MMMM") + .parse(&args) + { + Ok(m) => m, + _ => panic!(), + }; + assert!(matches.opts_present(&["L".to_string()])); + assert_eq!(matches.opts_str(&["L".to_string()]).unwrap(), "foo"); + assert!(matches.opts_present(&["M".to_string()])); + assert_eq!(matches.opts_str(&["M".to_string()]).unwrap(), "."); +} + +#[test] +fn test_nospace_conflict() { + let args = vec!["-vvLverbose".to_string(), "-v".to_string()]; + let matches = &match Options::new() + .optmulti("L", "", "library directory", "LIB") + .optflagmulti("v", "verbose", "Verbose") + .parse(&args) + { + Ok(m) => m, + Err(e) => panic!("{}", e), + }; + assert!(matches.opts_present(&["L".to_string()])); + assert_eq!(matches.opts_str(&["L".to_string()]).unwrap(), "verbose"); + assert!(matches.opts_present(&["v".to_string()])); + assert_eq!(3, matches.opt_count("v")); +} + +#[test] +fn test_long_to_short() { + let mut short = Opt { + name: Name::Long("banana".to_string()), + hasarg: HasArg::Yes, + occur: Occur::Req, + aliases: Vec::new(), + }; + short.aliases = vec![Opt { + name: Name::Short('b'), + hasarg: HasArg::Yes, + occur: Occur::Req, + aliases: Vec::new(), + }]; + let mut opts = Options::new(); + opts.reqopt("b", "banana", "some bananas", "VAL"); + let verbose = &opts.grps[0]; + assert!(verbose.long_to_short() == short); +} + +#[test] +fn test_aliases_long_and_short() { + let args = vec!["-a".to_string(), "--apple".to_string(), "-a".to_string()]; + + let matches = Options::new() + .optflagmulti("a", "apple", "Desc") + .parse(&args) + .unwrap(); + assert_eq!(3, matches.opt_count("a")); + assert_eq!(3, matches.opt_count("apple")); +} + +#[test] +fn test_usage() { + let mut opts = Options::new(); + opts.reqopt("b", "banana", "Desc", "VAL"); + opts.optopt("a", "012345678901234567890123456789", "Desc", "VAL"); + opts.optflag("k", "kiwi", "Desc"); + opts.optflagopt("p", "", "Desc", "VAL"); + opts.optmulti("l", "", "Desc", "VAL"); + opts.optflag("", "starfruit", "Starfruit"); + + let expected = "Usage: fruits + +Options: + -b, --banana VAL Desc + -a, --012345678901234567890123456789 VAL + Desc + -k, --kiwi Desc + -p [VAL] Desc + -l VAL Desc + --starfruit Starfruit +"; + + let generated_usage = opts.usage("Usage: fruits"); + + debug!("expected: <<{}>>", expected); + debug!("generated: <<{}>>", generated_usage); + assert_eq!(generated_usage, expected); +} + +#[test] +fn test_usage_description_wrapping() { + // indentation should be 24 spaces + // lines wrap after 78: or rather descriptions wrap after 54 + + let mut opts = Options::new(); + opts.optflag( + "k", + "kiwi", + "This is a long description which won't be wrapped..+..", + ); // 54 + opts.optflag( + "a", + "apple", + "This is a long description which _will_ be wrapped..+..", + ); + opts.optflag( + "b", + "banana", + "HereWeNeedOneSingleWordThatIsLongerThanTheWrappingLengthAndThisIsIt", + ); + + let expected = "Usage: fruits + +Options: + -k, --kiwi This is a long description which won't be wrapped..+.. + -a, --apple This is a long description which _will_ be + wrapped..+.. + -b, --banana HereWeNeedOneSingleWordThatIsLongerThanTheWrappingLengthAndThisIsIt +"; + + let usage = opts.usage("Usage: fruits"); + + debug!("expected: <<{}>>", expected); + debug!("generated: <<{}>>", usage); + assert!(usage == expected) +} + +#[test] +fn test_usage_description_multibyte_handling() { + let mut opts = Options::new(); + opts.optflag( + "k", + "k\u{2013}w\u{2013}", + "The word kiwi is normally spelled with two i's", + ); + opts.optflag( + "a", + "apple", + "This \u{201C}description\u{201D} has some characters that could \ + confuse the line wrapping; an apple costs 0.51€ in some parts of Europe.", + ); + + let expected = "Usage: fruits + +Options: + -k, --k–w– The word kiwi is normally spelled with two i's + -a, --apple This “description” has some characters that could + confuse the line wrapping; an apple costs 0.51€ in + some parts of Europe. +"; + + let usage = opts.usage("Usage: fruits"); + + debug!("expected: <<{}>>", expected); + debug!("generated: <<{}>>", usage); + assert!(usage == expected) +} + +#[test] +fn test_usage_description_newline_handling() { + let mut opts = Options::new(); + opts.optflag( + "k", + "k\u{2013}w\u{2013}", + "The word kiwi is normally spelled with two i's", + ); + opts.optflag( + "a", + "apple", + "This description forces a new line.\n Here is a premature\n\ + newline", + ); + + let expected = "Usage: fruits + +Options: + -k, --k–w– The word kiwi is normally spelled with two i's + -a, --apple This description forces a new line. + Here is a premature + newline +"; + + let usage = opts.usage("Usage: fruits"); + + debug!("expected: <<{}>>", expected); + debug!("generated: <<{}>>", usage); + assert!(usage == expected) +} + +#[test] +fn test_usage_multiwidth() { + let mut opts = Options::new(); + opts.optflag("a", "apple", "apple description"); + opts.optflag("b", "banana\u{00AB}", "banana description"); + opts.optflag("c", "brûlée", "brûlée quite long description"); + opts.optflag("k", "kiwi\u{20AC}", "kiwi description"); + opts.optflag("o", "orange\u{2039}", "orange description"); + opts.optflag( + "r", + "raspberry-but-making-this-option-way-too-long", + "raspberry description is also quite long indeed longer than \ + every other piece of text we might encounter here and thus will \ + be automatically broken up", + ); + + let expected = "Usage: fruits + +Options: + -a, --apple apple description + -b, --banana« banana description + -c, --brûlée brûlée quite long description + -k, --kiwi€ kiwi description + -o, --orange‹ orange description + -r, --raspberry-but-making-this-option-way-too-long\u{0020} + raspberry description is also quite long indeed longer + than every other piece of text we might encounter here + and thus will be automatically broken up +"; + + let usage = opts.usage("Usage: fruits"); + + debug!("expected: <<{}>>", expected); + debug!("generated: <<{}>>", usage); + assert!(usage == expected) +} + +#[test] +fn test_usage_short_only() { + let mut opts = Options::new(); + opts.optopt("k", "", "Kiwi", "VAL"); + opts.optflag("s", "", "Starfruit"); + opts.optflagopt("a", "", "Apple", "TYPE"); + + let expected = "Usage: fruits + +Options: + -k VAL Kiwi + -s Starfruit + -a [TYPE] Apple +"; + + let usage = opts.usage("Usage: fruits"); + debug!("expected: <<{}>>", expected); + debug!("generated: <<{}>>", usage); + assert!(usage == expected) +} + +#[test] +fn test_usage_long_only() { + let mut opts = Options::new(); + opts.optopt("", "kiwi", "Kiwi", "VAL"); + opts.optflag("", "starfruit", "Starfruit"); + opts.optflagopt("", "apple", "Apple", "TYPE"); + + let expected = "Usage: fruits + +Options: + --kiwi VAL Kiwi + --starfruit Starfruit + --apple [TYPE] Apple +"; + + let usage = opts.usage("Usage: fruits"); + debug!("expected: <<{}>>", expected); + debug!("generated: <<{}>>", usage); + assert!(usage == expected) +} + +#[test] +fn test_short_usage() { + let mut opts = Options::new(); + opts.reqopt("b", "banana", "Desc", "VAL"); + opts.optopt("a", "012345678901234567890123456789", "Desc", "VAL"); + opts.optflag("k", "kiwi", "Desc"); + opts.optflagopt("p", "", "Desc", "VAL"); + opts.optmulti("l", "", "Desc", "VAL"); + + let expected = "Usage: fruits -b VAL [-a VAL] [-k] [-p [VAL]] [-l VAL]..".to_string(); + let generated_usage = opts.short_usage("fruits"); + + debug!("expected: <<{}>>", expected); + debug!("generated: <<{}>>", generated_usage); + assert_eq!(generated_usage, expected); +} +#[test] +fn test_nonexistant_opt() { + let mut opts = Options::new(); + opts.optflag("b", "bar", "Desc"); + let args: Vec = Vec::new(); + let matches = opts.parse(&args).unwrap(); + assert_eq!(matches.opt_defined("foo"), false); + assert_eq!(matches.opt_defined("bar"), true); +} +#[test] +fn test_args_with_equals() { + let mut opts = Options::new(); + opts.optopt("o", "one", "One", "INFO"); + opts.optopt("t", "two", "Two", "INFO"); + + let args = vec![ + "--one".to_string(), + "A=B".to_string(), + "--two=C=D".to_string(), + ]; + let matches = &match opts.parse(&args) { + Ok(m) => m, + Err(e) => panic!("{}", e), + }; + assert_eq!(matches.opts_str(&["o".to_string()]).unwrap(), "A=B"); + assert_eq!(matches.opts_str(&["t".to_string()]).unwrap(), "C=D"); +} + +#[test] +fn test_long_only_usage() { + let mut opts = Options::new(); + opts.long_only(true); + opts.optflag("k", "kiwi", "Description"); + opts.optflag("a", "apple", "Description"); + + let expected = "Usage: fruits + +Options: + -k, -kiwi Description + -a, -apple Description +"; + + let usage = opts.usage("Usage: fruits"); + + debug!("expected: <<{}>>", expected); + debug!("generated: <<{}>>", usage); + assert!(usage == expected) +} + +#[test] +fn test_long_only_mode() { + let mut opts = Options::new(); + opts.long_only(true); + opts.optopt("a", "apple", "Description", "X"); + opts.optopt("b", "banana", "Description", "X"); + opts.optopt("c", "currant", "Description", "X"); + opts.optopt("", "durian", "Description", "X"); + opts.optopt("e", "", "Description", "X"); + opts.optopt("", "fruit", "Description", "X"); + + let args = vec![ + "-a", + "A", + "-b=B", + "--c=C", + "-durian", + "D", + "--e", + "E", + "-fruit=any", + ]; + let matches = &match opts.parse(&args) { + Ok(m) => m, + Err(e) => panic!("{}", e), + }; + assert_eq!(matches.opts_str(&["a".to_string()]).unwrap(), "A"); + assert_eq!(matches.opts_str(&["b".to_string()]).unwrap(), "B"); + assert_eq!(matches.opts_str(&["c".to_string()]).unwrap(), "C"); + assert_eq!(matches.opts_str(&["durian".to_string()]).unwrap(), "D"); + assert_eq!(matches.opts_str(&["e".to_string()]).unwrap(), "E"); + assert_eq!(matches.opts_str(&["fruit".to_string()]).unwrap(), "any"); +} + +#[test] +fn test_long_only_mode_no_short_parse() { + let mut opts = Options::new(); + opts.long_only(true); + opts.optflag("h", "help", "Description"); + opts.optflag("i", "ignore", "Description"); + opts.optflag("", "hi", "Description"); + + let args = vec!["-hi"]; + let matches = &match opts.parse(&args) { + Ok(m) => m, + Err(e) => panic!("{}", e), + }; + assert!(matches.opt_present("hi")); + assert!(!matches.opt_present("h")); + assert!(!matches.opt_present("i")); +} + +#[test] +fn test_normal_mode_no_long_parse() { + // Like test_long_only_mode_no_short_parse, but we make sure + // that long_only can be disabled, and the right thing + // happens. + let mut opts = Options::new(); + opts.long_only(true); + opts.optflag("h", "help", "Description"); + opts.optflag("i", "ignore", "Description"); + opts.optflag("", "hi", "Description"); + opts.long_only(false); + + let args = vec!["-hi"]; + let matches = &match opts.parse(&args) { + Ok(m) => m, + Err(e) => panic!("{}", e), + }; + assert!(!matches.opt_present("hi")); + assert!(matches.opt_present("h")); + assert!(matches.opt_present("i")); +} + +#[test] +#[should_panic] +fn test_long_name_too_short() { + let mut opts = Options::new(); + opts.optflag("", "a", "Oops, long option too short"); +} + +#[test] +#[should_panic] +fn test_undefined_opt_present() { + let mut opts = Options::new(); + opts.optflag("h", "help", "Description"); + let args = vec!["-h"]; + match opts.parse(args) { + Ok(matches) => assert!(!matches.opt_present("undefined")), + Err(e) => panic!("{}", e), + } +} + +#[test] +fn test_opt_default() { + let mut opts = Options::new(); + opts.optflag("h", "help", "Description"); + opts.optflag("i", "ignore", "Description"); + opts.optflag("r", "run", "Description"); + opts.long_only(false); + + let args: Vec = ["-i", "-r", "10"].iter().map(|x| x.to_string()).collect(); + let matches = &match opts.parse(&args) { + Ok(m) => m, + Err(e) => panic!("{}", e), + }; + assert_eq!(matches.opt_default("help", ""), None); + assert_eq!(matches.opt_default("i", "def"), Some("def".to_string())); +} + +#[test] +fn test_opt_get() { + let mut opts = Options::new(); + opts.optflag("h", "help", "Description"); + opts.optflagopt("i", "ignore", "Description", "true | false"); + opts.optflagopt("r", "run", "Description", "0 .. 10"); + opts.optflagopt("p", "percent", "Description", "0.0 .. 10.0"); + opts.long_only(false); + + let args: Vec = ["-i", "true", "-p", "1.1"] + .iter() + .map(|x| x.to_string()) + .collect(); + let matches = &match opts.parse(&args) { + Ok(m) => m, + Err(e) => panic!("{}", e), + }; + let h_arg = matches.opt_get::("help"); + assert_eq!(h_arg, Ok(None)); + let i_arg = matches.opt_get("i"); + assert_eq!(i_arg, Ok(Some(true))); + let p_arg = matches.opt_get("p"); + assert_eq!(p_arg, Ok(Some(1.1))); +} + +#[test] +fn test_opt_get_default() { + let mut opts = Options::new(); + opts.optflag("h", "help", "Description"); + opts.optflagopt("i", "ignore", "Description", "true | false"); + opts.optflagopt("r", "run", "Description", "0 .. 10"); + opts.optflagopt("p", "percent", "Description", "0.0 .. 10.0"); + opts.long_only(false); + + let args: Vec = ["-i", "true", "-p", "1.1"] + .iter() + .map(|x| x.to_string()) + .collect(); + let matches = &match opts.parse(&args) { + Ok(m) => m, + Err(e) => panic!("{}", e), + }; + let h_arg = matches.opt_get_default("help", 10); + assert_eq!(h_arg, Ok(10)); + let i_arg = matches.opt_get_default("i", false); + assert_eq!(i_arg, Ok(true)); + let p_arg = matches.opt_get_default("p", 10.2); + assert_eq!(p_arg, Ok(1.1)); +} + +#[test] +fn test_opt_positions() { + let mut opts = Options::new(); + opts.optflagmulti("a", "act", "Description"); + opts.optflagmulti("e", "enact", "Description"); + opts.optflagmulti("r", "react", "Description"); + + let args: Vec = ["-a", "-a", "-r", "-a", "-r", "-r"] + .iter() + .map(|x| x.to_string()) + .collect(); + + let matches = &match opts.parse(&args) { + Ok(m) => m, + Err(e) => panic!("{}", e), + }; + + let a_pos = matches.opt_positions("a"); + assert_eq!(a_pos, vec![0, 1, 3]); + let e_pos = matches.opt_positions("e"); + assert_eq!(e_pos, vec![]); + let r_pos = matches.opt_positions("r"); + assert_eq!(r_pos, vec![2, 4, 5]); +} + +#[test] +fn test_opt_strs_pos() { + let mut opts = Options::new(); + opts.optmulti("a", "act", "Description", "NUM"); + opts.optmulti("e", "enact", "Description", "NUM"); + opts.optmulti("r", "react", "Description", "NUM"); + + let args: Vec = ["-a1", "-a2", "-r3", "-a4", "-r5", "-r6"] + .iter() + .map(|x| x.to_string()) + .collect(); + + let matches = &match opts.parse(&args) { + Ok(m) => m, + Err(e) => panic!("{}", e), + }; + + let a_pos = matches.opt_strs_pos("a"); + assert_eq!(a_pos, vec![(0, "1".to_string()), (1, "2".to_string()), (3, "4".to_string())]); + let e_pos = matches.opt_strs_pos("e"); + assert_eq!(e_pos, vec![]); + let r_pos = matches.opt_strs_pos("r"); + assert_eq!(r_pos, vec![(2, "3".to_string()), (4, "5".to_string()), (5, "6".to_string())]); +} diff --git a/vendor/hashbrown/.cargo-checksum.json b/vendor/hashbrown/.cargo-checksum.json new file mode 100644 index 0000000000..9c60224696 --- /dev/null +++ b/vendor/hashbrown/.cargo-checksum.json @@ -0,0 +1 @@ +{"files":{"CHANGELOG.md":"1c9928d8fe02aa9ab2e073590224f21439270a80dc68df7f9132510d30961076","Cargo.toml":"91a8be0fd778b61a96e285974431b34dbeba7fec800895e1d6f98143e96547bc","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"ff8f68cb076caf8cefe7a6430d4ac086ce6af2ca8ce2c4e5a2004d4552ef52a2","README.md":"0735fe14e65cda39df259e58c10aff5cffb897ccce9efa9c49fab14b9afe55ea","benches/bench.rs":"b8df8a3e1e7ea9f0a9ed6867ac178bb233b1da80b602c6e3574d592943c07ee7","clippy.toml":"7535949f908c6d9aea4f9a9f3a7625552c93fc29e963d059d40f4def9d77ea7b","src/external_trait_impls/mod.rs":"d69528827794524cfd9acbeacc1ac4f6131e3c7574311e6d919f818f65fbff07","src/external_trait_impls/rayon/helpers.rs":"d4fbca4db924925548f8dab8eb94cf4a3955a53c5e1ff15f59c460546c394034","src/external_trait_impls/rayon/map.rs":"fb0c2c1cafee4d5b65ede372fe5bfce86181d87ac71dcc2e7fd5b882fb920ecc","src/external_trait_impls/rayon/mod.rs":"b48139960a89ee84ed3b5e10ee5abb0259b40f2bb0ef867d0dd65784252a47c0","src/external_trait_impls/rayon/raw.rs":"1bf4f9fddaec0c6270cfc3dc3f3096027aeccdf73c259af3c7bfd61d6c672b9f","src/external_trait_impls/rayon/set.rs":"40dbd669a60f13d5fe4697837cacbcc1109b36c84a964dd74a02d8754eb058a3","src/external_trait_impls/serde.rs":"c429ec8fb922706df2bb3b774284c7951d0e2101a18a8bfd4a44323b50a33709","src/fx.rs":"4756873e73ad698109de6d2d8fd0711a047ac994200827fc3e6cfa9b18bff32a","src/lib.rs":"6455a8d9271d9adecaf12748ae6d0421b3f928324028eae9c1af6f4f4f34381a","src/macros.rs":"c53829e64b434b3b89e88f3dd5ec974cd812b7fb8ed981074c666852667651d4","src/map.rs":"4aef0e549c13101683689153aeb8fe2a419374573c9f3f29d84793a52cdb1926","src/raw/bitmask.rs":"3c1f33b09b212d3828a89c11a86ab1bb18dedc20e45ff0032787ca49de2833c5","src/raw/generic.rs":"9df50cf88e80acde6a13aa9e083a8512090d25ab4daeac5eed43c3602560e844","src/raw/mod.rs":"c6127504e1bdab56b55bcb8e8c933710e7e3b0f1bf1eeb3169756b3f6332d3e9","src/raw/sse2.rs":"8a564c91c9af1e824d0400a562e23bf2b6e3398744c39e32d1c22afff75612a1","src/rustc_entry.rs":"96f78e34cc41bc4a3866445b144070cdb325be14d54c9935605e9f23b8a06f31","src/scopeguard.rs":"808655b3e98512fdcee5a4597e7763a6be99582ba8d77e5ba5ca130d85a97211","src/set.rs":"517ea92827194679f2087f03e55d0635735c91a630dac771e045018a4d47f660","tests/hasher.rs":"9a8fdf67e4415618e16729969c386eefe71408cded5d46cf7b67d969276a3452","tests/rayon.rs":"2286707a87b139f41902c82488c355b9fb402a3e734f392f3a73e87b9b932795","tests/serde.rs":"1260f576d3fb1c0979dd12718cb46e96a1989f95ca928014deccd279ec33b4a3","tests/set.rs":"fe75951f508db10055d2f4a9cde30d4418e941ff28c3b068fc5b0d57c71cab6c"},"package":"9529213c67695ca2d146e6f263b7b72df8fa973368beadf767e8ed80c03f2f36"} \ No newline at end of file diff --git a/vendor/hashbrown/CHANGELOG.md b/vendor/hashbrown/CHANGELOG.md new file mode 100644 index 0000000000..34796e09a9 --- /dev/null +++ b/vendor/hashbrown/CHANGELOG.md @@ -0,0 +1,128 @@ +# Change Log + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/) +and this project adheres to [Semantic Versioning](http://semver.org/). + +## [Unreleased] + +## [v0.4.0] - 2019-05-30 + +### Fixed +- Fixed `Send` trait bounds on `IterMut` not matching the libstd one. (#82) + +## [v0.3.1] - 2019-05-30 + +### Fixed +- Fixed incorrect use of slice in unsafe code. (#80) + +## [v0.3.0] - 2019-04-23 + +### Changed +- Changed shrink_to to not panic if min_capacity < capacity. (#67) + +### Fixed +- Worked around emscripten bug emscripten-core/emscripten-fastcomp#258. (#66) + +## [v0.2.2] - 2019-04-16 + +### Fixed +- Inlined non-nightly lowest_set_bit_nonzero. (#64) +- Fixed build on latest nightly. (#65) + +## [v0.2.1] - 2019-04-14 + +### Changed +- Use for_each in map Extend and FromIterator. (#58) +- Improved worst-case performance of HashSet.is_subset. (#61) + +### Fixed +- Removed incorrect debug_assert. (#60) + +## [v0.2.0] - 2019-03-31 + +### Changed +- The code has been updated to Rust 2018 edition. This means that the minimum + Rust version has been bumped to 1.31 (2018 edition). + +### Added +- Added `insert_with_hasher` to the raw_entry API to allow `K: !(Hash + Eq)`. (#54) +- Added support for using hashbrown as the hash table implementation in libstd. (#46) + +### Fixed +- Fixed cargo build with minimal-versions. (#45) +- Fixed `#[may_dangle]` attributes to match the libstd `HashMap`. (#46) +- ZST keys and values are now handled properly. (#46) + +## [v0.1.8] - 2019-01-14 + +### Added +- Rayon parallel iterator support (#37) +- `raw_entry` support (#31) +- `#[may_dangle]` on nightly (#31) +- `try_reserve` support (#31) + +### Fixed +- Fixed variance on `IterMut`. (#31) + +## [v0.1.7] - 2018-12-05 + +### Fixed +- Fixed non-SSE version of convert_special_to_empty_and_full_to_deleted. (#32) +- Fixed overflow in rehash_in_place. (#33) + +## [v0.1.6] - 2018-11-17 + +### Fixed +- Fixed compile error on nightly. (#29) + +## [v0.1.5] - 2018-11-08 + +### Fixed +- Fixed subtraction overflow in generic::Group::match_byte. (#28) + +## [v0.1.4] - 2018-11-04 + +### Fixed +- Fixed a bug in the `erase_no_drop` implementation. (#26) + +## [v0.1.3] - 2018-11-01 + +### Added +- Serde support. (#14) + +### Fixed +- Make the compiler inline functions more aggressively. (#20) + +## [v0.1.2] - 2018-10-31 + +### Fixed +- `clear` segfaults when called on an empty table. (#13) + +## [v0.1.1] - 2018-10-30 + +### Fixed +- `erase_no_drop` optimization not triggering in the SSE2 implementation. (#3) +- Missing `Send` and `Sync` for hash map and iterator types. (#7) +- Bug when inserting into a table smaller than the group width. (#5) + +## v0.1.0 - 2018-10-29 + +- Initial release + +[Unreleased]: https://github.com/rust-lang/hashbrown/compare/v0.4.0...HEAD +[v0.4.0]: https://github.com/rust-lang/hashbrown/compare/v0.3.1...v0.4.0 +[v0.3.1]: https://github.com/rust-lang/hashbrown/compare/v0.3.0...v0.3.1 +[v0.3.0]: https://github.com/rust-lang/hashbrown/compare/v0.2.2...v0.3.0 +[v0.2.2]: https://github.com/rust-lang/hashbrown/compare/v0.2.1...v0.2.2 +[v0.2.1]: https://github.com/rust-lang/hashbrown/compare/v0.2.0...v0.2.1 +[v0.2.0]: https://github.com/rust-lang/hashbrown/compare/v0.1.8...v0.2.0 +[v0.1.8]: https://github.com/rust-lang/hashbrown/compare/v0.1.7...v0.1.8 +[v0.1.7]: https://github.com/rust-lang/hashbrown/compare/v0.1.6...v0.1.7 +[v0.1.6]: https://github.com/rust-lang/hashbrown/compare/v0.1.5...v0.1.6 +[v0.1.5]: https://github.com/rust-lang/hashbrown/compare/v0.1.4...v0.1.5 +[v0.1.4]: https://github.com/rust-lang/hashbrown/compare/v0.1.3...v0.1.4 +[v0.1.3]: https://github.com/rust-lang/hashbrown/compare/v0.1.2...v0.1.3 +[v0.1.2]: https://github.com/rust-lang/hashbrown/compare/v0.1.1...v0.1.2 +[v0.1.1]: https://github.com/rust-lang/hashbrown/compare/v0.1.0...v0.1.1 diff --git a/vendor/hashbrown/Cargo.toml b/vendor/hashbrown/Cargo.toml new file mode 100644 index 0000000000..0cf03ca18f --- /dev/null +++ b/vendor/hashbrown/Cargo.toml @@ -0,0 +1,65 @@ +# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO +# +# When uploading crates to the registry Cargo will automatically +# "normalize" Cargo.toml files for maximal compatibility +# with all versions of Cargo and also rewrite `path` dependencies +# to registry (e.g., crates.io) dependencies +# +# If you believe there's an error in this file please file an +# issue against the rust-lang/cargo repository. If you're +# editing this file be aware that the upstream Cargo.toml +# will likely look very different (and much more reasonable) + +[package] +edition = "2018" +name = "hashbrown" +version = "0.4.0" +authors = ["Amanieu d'Antras "] +exclude = [".travis.yml", "bors.toml", "/ci/*"] +description = "A Rust port of Google's SwissTable hash map" +readme = "README.md" +keywords = ["hash", "no_std", "hashmap", "swisstable"] +categories = ["data-structures", "no-std"] +license = "Apache-2.0/MIT" +repository = "https://github.com/rust-lang/hashbrown" +[dependencies.alloc] +version = "1.0.0" +optional = true +package = "rustc-std-workspace-alloc" + +[dependencies.compiler_builtins] +version = "0.1.2" +optional = true + +[dependencies.core] +version = "1.0.0" +optional = true +package = "rustc-std-workspace-core" + +[dependencies.rayon] +version = "1.0" +optional = true + +[dependencies.serde] +version = "1.0.25" +optional = true +default-features = false +[dev-dependencies.lazy_static] +version = "~1.2" + +[dev-dependencies.rand] +version = "0.5.1" + +[dev-dependencies.rayon] +version = "1.0" + +[dev-dependencies.rustc-hash] +version = "1.0" + +[dev-dependencies.serde_test] +version = "1.0" + +[features] +default = [] +nightly = [] +rustc-dep-of-std = ["nightly", "core", "compiler_builtins", "alloc"] diff --git a/vendor/rustc-serialize/LICENSE-APACHE b/vendor/hashbrown/LICENSE-APACHE similarity index 100% rename from vendor/rustc-serialize/LICENSE-APACHE rename to vendor/hashbrown/LICENSE-APACHE diff --git a/vendor/rustc-serialize/LICENSE-MIT b/vendor/hashbrown/LICENSE-MIT similarity index 95% rename from vendor/rustc-serialize/LICENSE-MIT rename to vendor/hashbrown/LICENSE-MIT index 39d4bdb5ac..5afc2a7b0a 100644 --- a/vendor/rustc-serialize/LICENSE-MIT +++ b/vendor/hashbrown/LICENSE-MIT @@ -1,4 +1,4 @@ -Copyright (c) 2014 The Rust Project Developers +Copyright (c) 2016 Amanieu d'Antras Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated diff --git a/vendor/hashbrown/README.md b/vendor/hashbrown/README.md new file mode 100644 index 0000000000..123e18bcd9 --- /dev/null +++ b/vendor/hashbrown/README.md @@ -0,0 +1,87 @@ +hashbrown +========= + +[![Build Status](https://travis-ci.com/rust-lang/hashbrown.svg?branch=master)](https://travis-ci.com/rust-lang/hashbrown) +[![Crates.io](https://img.shields.io/crates/v/hashbrown.svg)](https://crates.io/crates/hashbrown) +[![Documentation](https://docs.rs/hashbrown/badge.svg)](https://docs.rs/hashbrown) + +This crate is a Rust port of Google's high-performance [SwissTable] hash +map, adapted to make it a drop-in replacement for Rust's standard `HashMap` +and `HashSet` types. + +The original C++ version of SwissTable can be found [here], and this +[CppCon talk] gives an overview of how the algorithm works. + +[SwissTable]: https://abseil.io/blog/20180927-swisstables +[here]: https://github.com/abseil/abseil-cpp/blob/master/absl/container/internal/raw_hash_set.h +[CppCon talk]: https://www.youtube.com/watch?v=ncHmEUmJZf4 + +## [Change log](CHANGELOG.md) + +## Features + +- Drop-in replacement for the standard library `HashMap` and `HashSet` types. +- Uses `FxHash` as the default hasher, which is much faster than SipHash. +- Around 2x faster than `FxHashMap` and 8x faster than the standard `HashMap`. +- Lower memory usage: only 1 byte of overhead per entry instead of 8. +- Compatible with `#[no_std]` (currently requires nightly for the `alloc` crate). +- Empty hash maps do not allocate any memory. +- SIMD lookups to scan multiple hash entries in parallel. + +## Performance + +Compared to `std::collections::HashMap`: + +``` + name stdhash ns/iter hashbrown ns/iter diff ns/iter diff % speedup + find_existing 23,831 2,935 -20,896 -87.68% x 8.12 + find_nonexisting 25,326 2,283 -23,043 -90.99% x 11.09 + get_remove_insert 124 25 -99 -79.84% x 4.96 + grow_by_insertion 197 177 -20 -10.15% x 1.11 + hashmap_as_queue 72 18 -54 -75.00% x 4.00 + new_drop 14 0 -14 -100.00% x inf + new_insert_drop 78 55 -23 -29.49% x 1.42 +``` + +Compared to `rustc_hash::FxHashMap` (standard `HashMap` using `FxHash` instead of `SipHash`): + +``` + name fxhash ns/iter hashbrown ns/iter diff ns/iter diff % speedup + find_existing 5,951 2,935 -3,016 -50.68% x 2.03 + find_nonexisting 4,637 2,283 -2,354 -50.77% x 2.03 + get_remove_insert 29 25 -4 -13.79% x 1.16 + grow_by_insertion 160 177 17 10.62% x 0.90 + hashmap_as_queue 22 18 -4 -18.18% x 1.22 + new_drop 9 0 -9 -100.00% x inf + new_insert_drop 64 55 -9 -14.06% x 1.16 +``` + +## Usage + +Add this to your `Cargo.toml`: + +```toml +[dependencies] +hashbrown = "0.4" +``` + +This crate has the following Cargo features: + +- `nightly`: Enables nightly-only features: `no_std` support and `#[may_dangle]`. +- `serde`: Enables serde serialization support. +- `rayon`: Enables rayon parallel iterator support. + +## License + +Licensed under either of: + + * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) + * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) + +at your option. + +### Contribution + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any +additional terms or conditions. diff --git a/vendor/hashbrown/benches/bench.rs b/vendor/hashbrown/benches/bench.rs new file mode 100644 index 0000000000..9c1542a40b --- /dev/null +++ b/vendor/hashbrown/benches/bench.rs @@ -0,0 +1,150 @@ +#![feature(test)] + +extern crate test; + +use std::hash::Hash; +use test::{black_box, Bencher}; + +use hashbrown::HashMap; +//use rustc_hash::FxHashMap as HashMap; +//use std::collections::HashMap; + +fn new_map() -> HashMap { + HashMap::default() +} + +#[bench] +fn insert_i32(b: &mut Bencher) { + b.iter(|| { + let mut m: HashMap = new_map(); + for i in 1..1001 { + m.insert(i, i); + } + black_box(m); + }) +} + +#[bench] +fn insert_i64(b: &mut Bencher) { + b.iter(|| { + let mut m: HashMap = new_map(); + for i in 1..1001 { + m.insert(i, i); + } + black_box(m); + }) +} + +#[bench] +fn insert_erase_i32(b: &mut Bencher) { + b.iter(|| { + let mut m: HashMap = new_map(); + for i in 1..1001 { + m.insert(i, i); + } + black_box(&mut m); + for i in 1..1001 { + m.remove(&i); + } + black_box(m); + }) +} + +#[bench] +fn insert_erase_i64(b: &mut Bencher) { + b.iter(|| { + let mut m: HashMap = new_map(); + for i in 1..1001 { + m.insert(i, i); + } + black_box(&mut m); + for i in 1..1001 { + m.remove(&i); + } + black_box(m); + }) +} + +#[bench] +fn lookup_i32(b: &mut Bencher) { + let mut m: HashMap = new_map(); + for i in 1..1001 { + m.insert(i, i); + } + + b.iter(|| { + for i in 1..1001 { + black_box(m.get(&i)); + } + }) +} + +#[bench] +fn lookup_i64(b: &mut Bencher) { + let mut m: HashMap = new_map(); + for i in 1..1001 { + m.insert(i, i); + } + + b.iter(|| { + for i in 1..1001 { + black_box(m.get(&i)); + } + }) +} + +#[bench] +fn lookup_fail_i32(b: &mut Bencher) { + let mut m: HashMap = new_map(); + for i in 1..1001 { + m.insert(i, i); + } + + b.iter(|| { + for i in 1001..2001 { + black_box(m.get(&i)); + } + }) +} + +#[bench] +fn lookup_fail_i64(b: &mut Bencher) { + let mut m: HashMap = new_map(); + for i in 1..1001 { + m.insert(i, i); + } + + b.iter(|| { + for i in 1001..2001 { + black_box(m.get(&i)); + } + }) +} + +#[bench] +fn iter_i32(b: &mut Bencher) { + let mut m: HashMap = new_map(); + for i in 1..1001 { + m.insert(i, i); + } + + b.iter(|| { + for i in &m { + black_box(i); + } + }) +} + +#[bench] +fn iter_i64(b: &mut Bencher) { + let mut m: HashMap = new_map(); + for i in 1..1001 { + m.insert(i, i); + } + + b.iter(|| { + for i in &m { + black_box(i); + } + }) +} diff --git a/vendor/hashbrown/clippy.toml b/vendor/hashbrown/clippy.toml new file mode 100644 index 0000000000..d98bf2c09b --- /dev/null +++ b/vendor/hashbrown/clippy.toml @@ -0,0 +1 @@ +doc-valid-idents = [ "CppCon", "SwissTable", "SipHash", "HashDoS" ] diff --git a/vendor/hashbrown/src/external_trait_impls/mod.rs b/vendor/hashbrown/src/external_trait_impls/mod.rs new file mode 100644 index 0000000000..ef497836cb --- /dev/null +++ b/vendor/hashbrown/src/external_trait_impls/mod.rs @@ -0,0 +1,4 @@ +#[cfg(feature = "rayon")] +pub(crate) mod rayon; +#[cfg(feature = "serde")] +mod serde; diff --git a/vendor/hashbrown/src/external_trait_impls/rayon/helpers.rs b/vendor/hashbrown/src/external_trait_impls/rayon/helpers.rs new file mode 100644 index 0000000000..9382007ea2 --- /dev/null +++ b/vendor/hashbrown/src/external_trait_impls/rayon/helpers.rs @@ -0,0 +1,26 @@ +use alloc::collections::LinkedList; +use alloc::vec::Vec; + +use rayon::iter::{IntoParallelIterator, ParallelIterator}; + +/// Helper for collecting parallel iterators to an intermediary +pub(super) fn collect(iter: I) -> (LinkedList>, usize) { + let list = iter + .into_par_iter() + .fold(Vec::new, |mut vec, elem| { + vec.push(elem); + vec + }) + .map(|vec| { + let mut list = LinkedList::new(); + list.push_back(vec); + list + }) + .reduce(LinkedList::new, |mut list1, mut list2| { + list1.append(&mut list2); + list1 + }); + + let len = list.iter().map(Vec::len).sum(); + (list, len) +} diff --git a/vendor/hashbrown/src/external_trait_impls/rayon/map.rs b/vendor/hashbrown/src/external_trait_impls/rayon/map.rs new file mode 100644 index 0000000000..6f869ae0a0 --- /dev/null +++ b/vendor/hashbrown/src/external_trait_impls/rayon/map.rs @@ -0,0 +1,676 @@ +//! Rayon extensions for `HashMap`. + +use crate::hash_map::HashMap; +use core::fmt; +use core::hash::{BuildHasher, Hash}; +use rayon::iter::plumbing::UnindexedConsumer; +use rayon::iter::{FromParallelIterator, IntoParallelIterator, ParallelExtend, ParallelIterator}; + +/// Parallel iterator over shared references to entries in a map. +/// +/// This iterator is created by the [`par_iter`] method on [`HashMap`] +/// (provided by the [`IntoParallelRefIterator`] trait). +/// See its documentation for more. +/// +/// [`par_iter`]: /hashbrown/struct.HashMap.html#method.par_iter +/// [`HashMap`]: /hashbrown/struct.HashMap.html +/// [`IntoParallelRefIterator`]: https://docs.rs/rayon/1.0/rayon/iter/trait.IntoParallelRefIterator.html +pub struct ParIter<'a, K, V, S> { + map: &'a HashMap, +} + +impl<'a, K: Sync, V: Sync, S: Sync> ParallelIterator for ParIter<'a, K, V, S> { + type Item = (&'a K, &'a V); + + #[inline] + fn drive_unindexed(self, consumer: C) -> C::Result + where + C: UnindexedConsumer, + { + self.map + .table + .par_iter() + .map(|x| unsafe { + let r = x.as_ref(); + (&r.0, &r.1) + }) + .drive_unindexed(consumer) + } +} + +impl Clone for ParIter<'_, K, V, S> { + #[inline] + fn clone(&self) -> Self { + ParIter { map: self.map } + } +} + +impl fmt::Debug for ParIter<'_, K, V, S> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.map.iter().fmt(f) + } +} + +/// Parallel iterator over shared references to keys in a map. +/// +/// This iterator is created by the [`par_keys`] method on [`HashMap`]. +/// See its documentation for more. +/// +/// [`par_keys`]: /hashbrown/struct.HashMap.html#method.par_keys +/// [`HashMap`]: /hashbrown/struct.HashMap.html +pub struct ParKeys<'a, K, V, S> { + map: &'a HashMap, +} + +impl<'a, K: Sync, V: Sync, S: Sync> ParallelIterator for ParKeys<'a, K, V, S> { + type Item = &'a K; + + #[inline] + fn drive_unindexed(self, consumer: C) -> C::Result + where + C: UnindexedConsumer, + { + self.map + .table + .par_iter() + .map(|x| unsafe { &x.as_ref().0 }) + .drive_unindexed(consumer) + } +} + +impl Clone for ParKeys<'_, K, V, S> { + #[inline] + fn clone(&self) -> Self { + ParKeys { map: self.map } + } +} + +impl fmt::Debug for ParKeys<'_, K, V, S> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.map.keys().fmt(f) + } +} + +/// Parallel iterator over shared references to values in a map. +/// +/// This iterator is created by the [`par_values`] method on [`HashMap`]. +/// See its documentation for more. +/// +/// [`par_values`]: /hashbrown/struct.HashMap.html#method.par_values +/// [`HashMap`]: /hashbrown/struct.HashMap.html +pub struct ParValues<'a, K, V, S> { + map: &'a HashMap, +} + +impl<'a, K: Sync, V: Sync, S: Sync> ParallelIterator for ParValues<'a, K, V, S> { + type Item = &'a V; + + #[inline] + fn drive_unindexed(self, consumer: C) -> C::Result + where + C: UnindexedConsumer, + { + self.map + .table + .par_iter() + .map(|x| unsafe { &x.as_ref().1 }) + .drive_unindexed(consumer) + } +} + +impl Clone for ParValues<'_, K, V, S> { + #[inline] + fn clone(&self) -> Self { + ParValues { map: self.map } + } +} + +impl fmt::Debug for ParValues<'_, K, V, S> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.map.values().fmt(f) + } +} + +/// Parallel iterator over mutable references to entries in a map. +/// +/// This iterator is created by the [`par_iter_mut`] method on [`HashMap`] +/// (provided by the [`IntoParallelRefMutIterator`] trait). +/// See its documentation for more. +/// +/// [`par_iter_mut`]: /hashbrown/struct.HashMap.html#method.par_iter_mut +/// [`HashMap`]: /hashbrown/struct.HashMap.html +/// [`IntoParallelRefMutIterator`]: https://docs.rs/rayon/1.0/rayon/iter/trait.IntoParallelRefMutIterator.html +pub struct ParIterMut<'a, K, V, S> { + map: &'a mut HashMap, +} + +impl<'a, K: Send + Sync, V: Send, S: Send> ParallelIterator for ParIterMut<'a, K, V, S> { + type Item = (&'a K, &'a mut V); + + #[inline] + fn drive_unindexed(self, consumer: C) -> C::Result + where + C: UnindexedConsumer, + { + self.map + .table + .par_iter() + .map(|x| unsafe { + let r = x.as_mut(); + (&r.0, &mut r.1) + }) + .drive_unindexed(consumer) + } +} + +impl fmt::Debug + for ParIterMut<'_, K, V, S> +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.map.iter().fmt(f) + } +} + +/// Parallel iterator over mutable references to values in a map. +/// +/// This iterator is created by the [`par_values_mut`] method on [`HashMap`]. +/// See its documentation for more. +/// +/// [`par_values_mut`]: /hashbrown/struct.HashMap.html#method.par_values_mut +/// [`HashMap`]: /hashbrown/struct.HashMap.html +pub struct ParValuesMut<'a, K, V, S> { + map: &'a mut HashMap, +} + +impl<'a, K: Send, V: Send, S: Send> ParallelIterator for ParValuesMut<'a, K, V, S> { + type Item = &'a mut V; + + #[inline] + fn drive_unindexed(self, consumer: C) -> C::Result + where + C: UnindexedConsumer, + { + self.map + .table + .par_iter() + .map(|x| unsafe { &mut x.as_mut().1 }) + .drive_unindexed(consumer) + } +} + +impl fmt::Debug for ParValuesMut<'_, K, V, S> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.map.values().fmt(f) + } +} + +/// Parallel iterator over entries of a consumed map. +/// +/// This iterator is created by the [`into_par_iter`] method on [`HashMap`] +/// (provided by the [`IntoParallelIterator`] trait). +/// See its documentation for more. +/// +/// [`into_par_iter`]: /hashbrown/struct.HashMap.html#method.into_par_iter +/// [`HashMap`]: /hashbrown/struct.HashMap.html +/// [`IntoParallelIterator`]: https://docs.rs/rayon/1.0/rayon/iter/trait.IntoParallelIterator.html +pub struct IntoParIter { + map: HashMap, +} + +impl ParallelIterator for IntoParIter { + type Item = (K, V); + + #[inline] + fn drive_unindexed(self, consumer: C) -> C::Result + where + C: UnindexedConsumer, + { + self.map.table.into_par_iter().drive_unindexed(consumer) + } +} + +impl fmt::Debug for IntoParIter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.map.iter().fmt(f) + } +} + +/// Parallel draining iterator over entries of a map. +/// +/// This iterator is created by the [`par_drain`] method on [`HashMap`]. +/// See its documentation for more. +/// +/// [`par_drain`]: /hashbrown/struct.HashMap.html#method.par_drain +/// [`HashMap`]: /hashbrown/struct.HashMap.html +pub struct ParDrain<'a, K, V, S> { + map: &'a mut HashMap, +} + +impl ParallelIterator for ParDrain<'_, K, V, S> { + type Item = (K, V); + + #[inline] + fn drive_unindexed(self, consumer: C) -> C::Result + where + C: UnindexedConsumer, + { + self.map.table.par_drain().drive_unindexed(consumer) + } +} + +impl fmt::Debug + for ParDrain<'_, K, V, S> +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.map.iter().fmt(f) + } +} + +impl HashMap { + /// Visits (potentially in parallel) immutably borrowed keys in an arbitrary order. + #[inline] + pub fn par_keys(&self) -> ParKeys<'_, K, V, S> { + ParKeys { map: self } + } + + /// Visits (potentially in parallel) immutably borrowed values in an arbitrary order. + #[inline] + pub fn par_values(&self) -> ParValues<'_, K, V, S> { + ParValues { map: self } + } +} + +impl HashMap { + /// Visits (potentially in parallel) mutably borrowed values in an arbitrary order. + #[inline] + pub fn par_values_mut(&mut self) -> ParValuesMut<'_, K, V, S> { + ParValuesMut { map: self } + } + + /// Consumes (potentially in parallel) all values in an arbitrary order, + /// while preserving the map's allocated memory for reuse. + #[inline] + pub fn par_drain(&mut self) -> ParDrain<'_, K, V, S> { + ParDrain { map: self } + } +} + +impl HashMap +where + K: Eq + Hash + Sync, + V: PartialEq + Sync, + S: BuildHasher + Sync, +{ + /// Returns `true` if the map is equal to another, + /// i.e. both maps contain the same keys mapped to the same values. + /// + /// This method runs in a potentially parallel fashion. + pub fn par_eq(&self, other: &Self) -> bool { + self.len() == other.len() + && self + .into_par_iter() + .all(|(key, value)| other.get(key).map_or(false, |v| *value == *v)) + } +} + +impl IntoParallelIterator for HashMap { + type Item = (K, V); + type Iter = IntoParIter; + + #[inline] + fn into_par_iter(self) -> Self::Iter { + IntoParIter { map: self } + } +} + +impl<'a, K: Sync, V: Sync, S: Sync> IntoParallelIterator for &'a HashMap { + type Item = (&'a K, &'a V); + type Iter = ParIter<'a, K, V, S>; + + #[inline] + fn into_par_iter(self) -> Self::Iter { + ParIter { map: self } + } +} + +impl<'a, K: Send + Sync, V: Send, S: Send> IntoParallelIterator for &'a mut HashMap { + type Item = (&'a K, &'a mut V); + type Iter = ParIterMut<'a, K, V, S>; + + #[inline] + fn into_par_iter(self) -> Self::Iter { + ParIterMut { map: self } + } +} + +/// Collect (key, value) pairs from a parallel iterator into a +/// hashmap. If multiple pairs correspond to the same key, then the +/// ones produced earlier in the parallel iterator will be +/// overwritten, just as with a sequential iterator. +impl FromParallelIterator<(K, V)> for HashMap +where + K: Eq + Hash + Send, + V: Send, + S: BuildHasher + Default, +{ + fn from_par_iter

(par_iter: P) -> Self + where + P: IntoParallelIterator, + { + let mut map = HashMap::default(); + map.par_extend(par_iter); + map + } +} + +/// Extend a hash map with items from a parallel iterator. +impl ParallelExtend<(K, V)> for HashMap +where + K: Eq + Hash + Send, + V: Send, + S: BuildHasher, +{ + fn par_extend(&mut self, par_iter: I) + where + I: IntoParallelIterator, + { + extend(self, par_iter); + } +} + +/// Extend a hash map with copied items from a parallel iterator. +impl<'a, K, V, S> ParallelExtend<(&'a K, &'a V)> for HashMap +where + K: Copy + Eq + Hash + Sync, + V: Copy + Sync, + S: BuildHasher, +{ + fn par_extend(&mut self, par_iter: I) + where + I: IntoParallelIterator, + { + extend(self, par_iter); + } +} + +// This is equal to the normal `HashMap` -- no custom advantage. +fn extend(map: &mut HashMap, par_iter: I) +where + K: Eq + Hash, + S: BuildHasher, + I: IntoParallelIterator, + HashMap: Extend, +{ + let (list, len) = super::helpers::collect(par_iter); + + // Keys may be already present or show multiple times in the iterator. + // Reserve the entire length if the map is empty. + // Otherwise reserve half the length (rounded up), so the map + // will only resize twice in the worst case. + let reserve = if map.is_empty() { len } else { (len + 1) / 2 }; + map.reserve(reserve); + for vec in list { + map.extend(vec); + } +} + +#[cfg(test)] +mod test_par_map { + use alloc::vec::Vec; + use core::hash::{Hash, Hasher}; + use core::sync::atomic::{AtomicUsize, Ordering}; + + use rayon::prelude::*; + + use crate::hash_map::HashMap; + + struct Dropable<'a> { + k: usize, + counter: &'a AtomicUsize, + } + + impl Dropable<'_> { + fn new(k: usize, counter: &AtomicUsize) -> Dropable<'_> { + counter.fetch_add(1, Ordering::Relaxed); + + Dropable { k, counter } + } + } + + impl Drop for Dropable<'_> { + fn drop(&mut self) { + self.counter.fetch_sub(1, Ordering::Relaxed); + } + } + + impl Clone for Dropable<'_> { + fn clone(&self) -> Self { + Dropable::new(self.k, self.counter) + } + } + + impl Hash for Dropable<'_> { + fn hash(&self, state: &mut H) + where + H: Hasher, + { + self.k.hash(state) + } + } + + impl PartialEq for Dropable<'_> { + fn eq(&self, other: &Self) -> bool { + self.k == other.k + } + } + + impl Eq for Dropable<'_> {} + + #[test] + fn test_into_iter_drops() { + let key = AtomicUsize::new(0); + let value = AtomicUsize::new(0); + + let hm = { + let mut hm = HashMap::new(); + + assert_eq!(key.load(Ordering::Relaxed), 0); + assert_eq!(value.load(Ordering::Relaxed), 0); + + for i in 0..100 { + let d1 = Dropable::new(i, &key); + let d2 = Dropable::new(i + 100, &value); + hm.insert(d1, d2); + } + + assert_eq!(key.load(Ordering::Relaxed), 100); + assert_eq!(value.load(Ordering::Relaxed), 100); + + hm + }; + + // By the way, ensure that cloning doesn't screw up the dropping. + drop(hm.clone()); + + assert_eq!(key.load(Ordering::Relaxed), 100); + assert_eq!(value.load(Ordering::Relaxed), 100); + + // Ensure that dropping the iterator does not leak anything. + drop(hm.clone().into_par_iter()); + + { + assert_eq!(key.load(Ordering::Relaxed), 100); + assert_eq!(value.load(Ordering::Relaxed), 100); + + // retain only half + let _v: Vec<_> = hm + .into_par_iter() + .filter(|&(ref key, _)| key.k < 50) + .collect(); + + assert_eq!(key.load(Ordering::Relaxed), 50); + assert_eq!(value.load(Ordering::Relaxed), 50); + }; + + assert_eq!(key.load(Ordering::Relaxed), 0); + assert_eq!(value.load(Ordering::Relaxed), 0); + } + + #[test] + fn test_drain_drops() { + let key = AtomicUsize::new(0); + let value = AtomicUsize::new(0); + + let mut hm = { + let mut hm = HashMap::new(); + + assert_eq!(key.load(Ordering::Relaxed), 0); + assert_eq!(value.load(Ordering::Relaxed), 0); + + for i in 0..100 { + let d1 = Dropable::new(i, &key); + let d2 = Dropable::new(i + 100, &value); + hm.insert(d1, d2); + } + + assert_eq!(key.load(Ordering::Relaxed), 100); + assert_eq!(value.load(Ordering::Relaxed), 100); + + hm + }; + + // By the way, ensure that cloning doesn't screw up the dropping. + drop(hm.clone()); + + assert_eq!(key.load(Ordering::Relaxed), 100); + assert_eq!(value.load(Ordering::Relaxed), 100); + + // Ensure that dropping the drain iterator does not leak anything. + drop(hm.clone().par_drain()); + + { + assert_eq!(key.load(Ordering::Relaxed), 100); + assert_eq!(value.load(Ordering::Relaxed), 100); + + // retain only half + let _v: Vec<_> = hm.drain().filter(|&(ref key, _)| key.k < 50).collect(); + assert!(hm.is_empty()); + + assert_eq!(key.load(Ordering::Relaxed), 50); + assert_eq!(value.load(Ordering::Relaxed), 50); + }; + + assert_eq!(key.load(Ordering::Relaxed), 0); + assert_eq!(value.load(Ordering::Relaxed), 0); + } + + #[test] + fn test_empty_iter() { + let mut m: HashMap = HashMap::new(); + assert_eq!(m.par_drain().count(), 0); + assert_eq!(m.par_keys().count(), 0); + assert_eq!(m.par_values().count(), 0); + assert_eq!(m.par_values_mut().count(), 0); + assert_eq!(m.par_iter().count(), 0); + assert_eq!(m.par_iter_mut().count(), 0); + assert_eq!(m.len(), 0); + assert!(m.is_empty()); + assert_eq!(m.into_par_iter().count(), 0); + } + + #[test] + fn test_iterate() { + let mut m = HashMap::with_capacity(4); + for i in 0..32 { + assert!(m.insert(i, i * 2).is_none()); + } + assert_eq!(m.len(), 32); + + let observed = AtomicUsize::new(0); + + m.par_iter().for_each(|(k, v)| { + assert_eq!(*v, *k * 2); + observed.fetch_or(1 << *k, Ordering::Relaxed); + }); + assert_eq!(observed.into_inner(), 0xFFFF_FFFF); + } + + #[test] + fn test_keys() { + let vec = vec![(1, 'a'), (2, 'b'), (3, 'c')]; + let map: HashMap<_, _> = vec.into_par_iter().collect(); + let keys: Vec<_> = map.par_keys().cloned().collect(); + assert_eq!(keys.len(), 3); + assert!(keys.contains(&1)); + assert!(keys.contains(&2)); + assert!(keys.contains(&3)); + } + + #[test] + fn test_values() { + let vec = vec![(1, 'a'), (2, 'b'), (3, 'c')]; + let map: HashMap<_, _> = vec.into_par_iter().collect(); + let values: Vec<_> = map.par_values().cloned().collect(); + assert_eq!(values.len(), 3); + assert!(values.contains(&'a')); + assert!(values.contains(&'b')); + assert!(values.contains(&'c')); + } + + #[test] + fn test_values_mut() { + let vec = vec![(1, 1), (2, 2), (3, 3)]; + let mut map: HashMap<_, _> = vec.into_par_iter().collect(); + map.par_values_mut().for_each(|value| *value = (*value) * 2); + let values: Vec<_> = map.par_values().cloned().collect(); + assert_eq!(values.len(), 3); + assert!(values.contains(&2)); + assert!(values.contains(&4)); + assert!(values.contains(&6)); + } + + #[test] + fn test_eq() { + let mut m1 = HashMap::new(); + m1.insert(1, 2); + m1.insert(2, 3); + m1.insert(3, 4); + + let mut m2 = HashMap::new(); + m2.insert(1, 2); + m2.insert(2, 3); + + assert!(!m1.par_eq(&m2)); + + m2.insert(3, 4); + + assert!(m1.par_eq(&m2)); + } + + #[test] + fn test_from_iter() { + let xs = [(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)]; + + let map: HashMap<_, _> = xs.par_iter().cloned().collect(); + + for &(k, v) in &xs { + assert_eq!(map.get(&k), Some(&v)); + } + } + + #[test] + fn test_extend_ref() { + let mut a = HashMap::new(); + a.insert(1, "one"); + let mut b = HashMap::new(); + b.insert(2, "two"); + b.insert(3, "three"); + + a.par_extend(&b); + + assert_eq!(a.len(), 3); + assert_eq!(a[&1], "one"); + assert_eq!(a[&2], "two"); + assert_eq!(a[&3], "three"); + } +} diff --git a/vendor/hashbrown/src/external_trait_impls/rayon/mod.rs b/vendor/hashbrown/src/external_trait_impls/rayon/mod.rs new file mode 100644 index 0000000000..6765299c74 --- /dev/null +++ b/vendor/hashbrown/src/external_trait_impls/rayon/mod.rs @@ -0,0 +1,5 @@ +mod helpers; +mod raw; + +pub(crate) mod map; +pub(crate) mod set; diff --git a/vendor/hashbrown/src/external_trait_impls/rayon/raw.rs b/vendor/hashbrown/src/external_trait_impls/rayon/raw.rs new file mode 100644 index 0000000000..6834705cfd --- /dev/null +++ b/vendor/hashbrown/src/external_trait_impls/rayon/raw.rs @@ -0,0 +1,193 @@ +use crate::raw::Bucket; +use crate::raw::{RawIterRange, RawTable}; +use crate::scopeguard::guard; +use alloc::alloc::dealloc; +use core::marker::PhantomData; +use core::mem; +use core::ptr::NonNull; +use rayon::iter::{ + plumbing::{self, Folder, UnindexedConsumer, UnindexedProducer}, + ParallelIterator, +}; + +/// Parallel iterator which returns a raw pointer to every full bucket in the table. +pub struct RawParIter { + iter: RawIterRange, +} + +impl ParallelIterator for RawParIter { + type Item = Bucket; + + #[inline] + fn drive_unindexed(self, consumer: C) -> C::Result + where + C: UnindexedConsumer, + { + let producer = ParIterProducer { iter: self.iter }; + plumbing::bridge_unindexed(producer, consumer) + } +} + +/// Producer which returns a `Bucket` for every element. +struct ParIterProducer { + iter: RawIterRange, +} + +impl UnindexedProducer for ParIterProducer { + type Item = Bucket; + + #[inline] + fn split(self) -> (Self, Option) { + let (left, right) = self.iter.split(); + let left = ParIterProducer { iter: left }; + let right = right.map(|right| ParIterProducer { iter: right }); + (left, right) + } + + #[inline] + fn fold_with(self, folder: F) -> F + where + F: Folder, + { + folder.consume_iter(self.iter) + } +} + +/// Parallel iterator which consumes a table and returns elements. +pub struct RawIntoParIter { + table: RawTable, +} + +impl ParallelIterator for RawIntoParIter { + type Item = T; + + #[inline] + fn drive_unindexed(self, consumer: C) -> C::Result + where + C: UnindexedConsumer, + { + let iter = unsafe { self.table.iter().iter }; + let _guard = guard(self.table.into_alloc(), |alloc| { + if let Some((ptr, layout)) = *alloc { + unsafe { + dealloc(ptr.as_ptr(), layout); + } + } + }); + let producer = ParDrainProducer { iter }; + plumbing::bridge_unindexed(producer, consumer) + } +} + +/// Parallel iterator which consumes elements without freeing the table storage. +pub struct RawParDrain<'a, T> { + // We don't use a &'a mut RawTable because we want RawParDrain to be + // covariant over T. + table: NonNull>, + marker: PhantomData<&'a RawTable>, +} + +unsafe impl Send for RawParDrain<'_, T> {} + +impl ParallelIterator for RawParDrain<'_, T> { + type Item = T; + + #[inline] + fn drive_unindexed(self, consumer: C) -> C::Result + where + C: UnindexedConsumer, + { + let _guard = guard(self.table, |table| unsafe { + table.as_mut().clear_no_drop() + }); + let iter = unsafe { self.table.as_ref().iter().iter }; + mem::forget(self); + let producer = ParDrainProducer { iter }; + plumbing::bridge_unindexed(producer, consumer) + } +} + +impl Drop for RawParDrain<'_, T> { + fn drop(&mut self) { + // If drive_unindexed is not called then simply clear the table. + unsafe { self.table.as_mut().clear() } + } +} + +/// Producer which will consume all elements in the range, even if it is dropped +/// halfway through. +struct ParDrainProducer { + iter: RawIterRange, +} + +impl UnindexedProducer for ParDrainProducer { + type Item = T; + + #[inline] + fn split(self) -> (Self, Option) { + let (left, right) = self.iter.clone().split(); + mem::forget(self); + let left = ParDrainProducer { iter: left }; + let right = right.map(|right| ParDrainProducer { iter: right }); + (left, right) + } + + #[inline] + fn fold_with(mut self, mut folder: F) -> F + where + F: Folder, + { + // Make sure to modify the iterator in-place so that any remaining + // elements are processed in our Drop impl. + while let Some(item) = self.iter.next() { + folder = folder.consume(unsafe { item.read() }); + if folder.full() { + return folder; + } + } + + // If we processed all elements then we don't need to run the drop. + mem::forget(self); + folder + } +} + +impl Drop for ParDrainProducer { + #[inline] + fn drop(&mut self) { + // Drop all remaining elements + if mem::needs_drop::() { + while let Some(item) = self.iter.next() { + unsafe { + item.drop(); + } + } + } + } +} + +impl RawTable { + /// Returns a parallel iterator over the elements in a `RawTable`. + #[inline] + pub fn par_iter(&self) -> RawParIter { + RawParIter { + iter: unsafe { self.iter().iter }, + } + } + + /// Returns a parallel iterator over the elements in a `RawTable`. + #[inline] + pub fn into_par_iter(self) -> RawIntoParIter { + RawIntoParIter { table: self } + } + + /// Returns a parallel iterator which consumes all elements of a `RawTable` + /// without freeing its memory allocation. + #[inline] + pub fn par_drain(&mut self) -> RawParDrain<'_, T> { + RawParDrain { + table: NonNull::from(self), + marker: PhantomData, + } + } +} diff --git a/vendor/hashbrown/src/external_trait_impls/rayon/set.rs b/vendor/hashbrown/src/external_trait_impls/rayon/set.rs new file mode 100644 index 0000000000..896be75b0a --- /dev/null +++ b/vendor/hashbrown/src/external_trait_impls/rayon/set.rs @@ -0,0 +1,646 @@ +//! Rayon extensions for `HashSet`. + +use crate::hash_set::HashSet; +use core::hash::{BuildHasher, Hash}; +use rayon::iter::plumbing::UnindexedConsumer; +use rayon::iter::{FromParallelIterator, IntoParallelIterator, ParallelExtend, ParallelIterator}; + +/// Parallel iterator over elements of a consumed set. +/// +/// This iterator is created by the [`into_par_iter`] method on [`HashSet`] +/// (provided by the [`IntoParallelIterator`] trait). +/// See its documentation for more. +/// +/// [`into_par_iter`]: /hashbrown/struct.HashSet.html#method.into_par_iter +/// [`HashSet`]: /hashbrown/struct.HashSet.html +/// [`IntoParallelIterator`]: https://docs.rs/rayon/1.0/rayon/iter/trait.IntoParallelIterator.html +pub struct IntoParIter { + set: HashSet, +} + +impl ParallelIterator for IntoParIter { + type Item = T; + + fn drive_unindexed(self, consumer: C) -> C::Result + where + C: UnindexedConsumer, + { + self.set + .map + .into_par_iter() + .map(|(k, _)| k) + .drive_unindexed(consumer) + } +} + +/// Parallel draining iterator over entries of a set. +/// +/// This iterator is created by the [`par_drain`] method on [`HashSet`]. +/// See its documentation for more. +/// +/// [`par_drain`]: /hashbrown/struct.HashSet.html#method.par_drain +/// [`HashSet`]: /hashbrown/struct.HashSet.html +pub struct ParDrain<'a, T, S> { + set: &'a mut HashSet, +} + +impl ParallelIterator for ParDrain<'_, T, S> { + type Item = T; + + fn drive_unindexed(self, consumer: C) -> C::Result + where + C: UnindexedConsumer, + { + self.set + .map + .par_drain() + .map(|(k, _)| k) + .drive_unindexed(consumer) + } +} + +/// Parallel iterator over shared references to elements in a set. +/// +/// This iterator is created by the [`par_iter`] method on [`HashSet`] +/// (provided by the [`IntoParallelRefIterator`] trait). +/// See its documentation for more. +/// +/// [`par_iter`]: /hashbrown/struct.HashSet.html#method.par_iter +/// [`HashSet`]: /hashbrown/struct.HashSet.html +/// [`IntoParallelRefIterator`]: https://docs.rs/rayon/1.0/rayon/iter/trait.IntoParallelRefIterator.html +pub struct ParIter<'a, T, S> { + set: &'a HashSet, +} + +impl<'a, T: Sync, S: Sync> ParallelIterator for ParIter<'a, T, S> { + type Item = &'a T; + + fn drive_unindexed(self, consumer: C) -> C::Result + where + C: UnindexedConsumer, + { + self.set.map.par_keys().drive_unindexed(consumer) + } +} + +/// Parallel iterator over shared references to elements in the difference of +/// sets. +/// +/// This iterator is created by the [`par_difference`] method on [`HashSet`]. +/// See its documentation for more. +/// +/// [`par_difference`]: /hashbrown/struct.HashSet.html#method.par_difference +/// [`HashSet`]: /hashbrown/struct.HashSet.html +pub struct ParDifference<'a, T, S> { + a: &'a HashSet, + b: &'a HashSet, +} + +impl<'a, T, S> ParallelIterator for ParDifference<'a, T, S> +where + T: Eq + Hash + Sync, + S: BuildHasher + Sync, +{ + type Item = &'a T; + + fn drive_unindexed(self, consumer: C) -> C::Result + where + C: UnindexedConsumer, + { + self.a + .into_par_iter() + .filter(|&x| !self.b.contains(x)) + .drive_unindexed(consumer) + } +} + +/// Parallel iterator over shared references to elements in the symmetric +/// difference of sets. +/// +/// This iterator is created by the [`par_symmetric_difference`] method on +/// [`HashSet`]. +/// See its documentation for more. +/// +/// [`par_symmetric_difference`]: /hashbrown/struct.HashSet.html#method.par_symmetric_difference +/// [`HashSet`]: /hashbrown/struct.HashSet.html +pub struct ParSymmetricDifference<'a, T, S> { + a: &'a HashSet, + b: &'a HashSet, +} + +impl<'a, T, S> ParallelIterator for ParSymmetricDifference<'a, T, S> +where + T: Eq + Hash + Sync, + S: BuildHasher + Sync, +{ + type Item = &'a T; + + fn drive_unindexed(self, consumer: C) -> C::Result + where + C: UnindexedConsumer, + { + self.a + .par_difference(self.b) + .chain(self.b.par_difference(self.a)) + .drive_unindexed(consumer) + } +} + +/// Parallel iterator over shared references to elements in the intersection of +/// sets. +/// +/// This iterator is created by the [`par_intersection`] method on [`HashSet`]. +/// See its documentation for more. +/// +/// [`par_intersection`]: /hashbrown/struct.HashSet.html#method.par_intersection +/// [`HashSet`]: /hashbrown/struct.HashSet.html +pub struct ParIntersection<'a, T, S> { + a: &'a HashSet, + b: &'a HashSet, +} + +impl<'a, T, S> ParallelIterator for ParIntersection<'a, T, S> +where + T: Eq + Hash + Sync, + S: BuildHasher + Sync, +{ + type Item = &'a T; + + fn drive_unindexed(self, consumer: C) -> C::Result + where + C: UnindexedConsumer, + { + self.a + .into_par_iter() + .filter(|&x| self.b.contains(x)) + .drive_unindexed(consumer) + } +} + +/// Parallel iterator over shared references to elements in the union of sets. +/// +/// This iterator is created by the [`par_union`] method on [`HashSet`]. +/// See its documentation for more. +/// +/// [`par_union`]: /hashbrown/struct.HashSet.html#method.par_union +/// [`HashSet`]: /hashbrown/struct.HashSet.html +pub struct ParUnion<'a, T, S> { + a: &'a HashSet, + b: &'a HashSet, +} + +impl<'a, T, S> ParallelIterator for ParUnion<'a, T, S> +where + T: Eq + Hash + Sync, + S: BuildHasher + Sync, +{ + type Item = &'a T; + + fn drive_unindexed(self, consumer: C) -> C::Result + where + C: UnindexedConsumer, + { + self.a + .into_par_iter() + .chain(self.b.par_difference(self.a)) + .drive_unindexed(consumer) + } +} + +impl HashSet +where + T: Eq + Hash + Sync, + S: BuildHasher + Sync, +{ + /// Visits (potentially in parallel) the values representing the difference, + /// i.e. the values that are in `self` but not in `other`. + #[inline] + pub fn par_difference<'a>(&'a self, other: &'a Self) -> ParDifference<'a, T, S> { + ParDifference { a: self, b: other } + } + + /// Visits (potentially in parallel) the values representing the symmetric + /// difference, i.e. the values that are in `self` or in `other` but not in both. + #[inline] + pub fn par_symmetric_difference<'a>( + &'a self, + other: &'a Self, + ) -> ParSymmetricDifference<'a, T, S> { + ParSymmetricDifference { a: self, b: other } + } + + /// Visits (potentially in parallel) the values representing the + /// intersection, i.e. the values that are both in `self` and `other`. + #[inline] + pub fn par_intersection<'a>(&'a self, other: &'a Self) -> ParIntersection<'a, T, S> { + ParIntersection { a: self, b: other } + } + + /// Visits (potentially in parallel) the values representing the union, + /// i.e. all the values in `self` or `other`, without duplicates. + #[inline] + pub fn par_union<'a>(&'a self, other: &'a Self) -> ParUnion<'a, T, S> { + ParUnion { a: self, b: other } + } + + /// Returns `true` if `self` has no elements in common with `other`. + /// This is equivalent to checking for an empty intersection. + /// + /// This method runs in a potentially parallel fashion. + pub fn par_is_disjoint(&self, other: &Self) -> bool { + self.into_par_iter().all(|x| !other.contains(x)) + } + + /// Returns `true` if the set is a subset of another, + /// i.e. `other` contains at least all the values in `self`. + /// + /// This method runs in a potentially parallel fashion. + pub fn par_is_subset(&self, other: &Self) -> bool { + if self.len() <= other.len() { + self.into_par_iter().all(|x| other.contains(x)) + } else { + false + } + } + + /// Returns `true` if the set is a superset of another, + /// i.e. `self` contains at least all the values in `other`. + /// + /// This method runs in a potentially parallel fashion. + pub fn par_is_superset(&self, other: &Self) -> bool { + other.par_is_subset(self) + } + + /// Returns `true` if the set is equal to another, + /// i.e. both sets contain the same values. + /// + /// This method runs in a potentially parallel fashion. + pub fn par_eq(&self, other: &Self) -> bool { + self.len() == other.len() && self.par_is_subset(other) + } +} + +impl HashSet +where + T: Eq + Hash + Send, + S: BuildHasher + Send, +{ + /// Consumes (potentially in parallel) all values in an arbitrary order, + /// while preserving the set's allocated memory for reuse. + #[inline] + pub fn par_drain(&mut self) -> ParDrain<'_, T, S> { + ParDrain { set: self } + } +} + +impl IntoParallelIterator for HashSet { + type Item = T; + type Iter = IntoParIter; + + #[inline] + fn into_par_iter(self) -> Self::Iter { + IntoParIter { set: self } + } +} + +impl<'a, T: Sync, S: Sync> IntoParallelIterator for &'a HashSet { + type Item = &'a T; + type Iter = ParIter<'a, T, S>; + + #[inline] + fn into_par_iter(self) -> Self::Iter { + ParIter { set: self } + } +} + +/// Collect values from a parallel iterator into a hashset. +impl FromParallelIterator for HashSet +where + T: Eq + Hash + Send, + S: BuildHasher + Default, +{ + fn from_par_iter

(par_iter: P) -> Self + where + P: IntoParallelIterator, + { + let mut set = HashSet::default(); + set.par_extend(par_iter); + set + } +} + +/// Extend a hash set with items from a parallel iterator. +impl ParallelExtend for HashSet +where + T: Eq + Hash + Send, + S: BuildHasher, +{ + fn par_extend(&mut self, par_iter: I) + where + I: IntoParallelIterator, + { + extend(self, par_iter); + } +} + +/// Extend a hash set with copied items from a parallel iterator. +impl<'a, T, S> ParallelExtend<&'a T> for HashSet +where + T: 'a + Copy + Eq + Hash + Sync, + S: BuildHasher, +{ + fn par_extend(&mut self, par_iter: I) + where + I: IntoParallelIterator, + { + extend(self, par_iter); + } +} + +// This is equal to the normal `HashSet` -- no custom advantage. +fn extend(set: &mut HashSet, par_iter: I) +where + T: Eq + Hash, + S: BuildHasher, + I: IntoParallelIterator, + HashSet: Extend, +{ + let (list, len) = super::helpers::collect(par_iter); + + // Values may be already present or show multiple times in the iterator. + // Reserve the entire length if the set is empty. + // Otherwise reserve half the length (rounded up), so the set + // will only resize twice in the worst case. + let reserve = if set.is_empty() { len } else { (len + 1) / 2 }; + set.reserve(reserve); + for vec in list { + set.extend(vec); + } +} + +#[cfg(test)] +mod test_par_set { + use alloc::vec::Vec; + use core::sync::atomic::{AtomicUsize, Ordering}; + + use rayon::prelude::*; + + use crate::hash_set::HashSet; + + #[test] + fn test_disjoint() { + let mut xs = HashSet::new(); + let mut ys = HashSet::new(); + assert!(xs.par_is_disjoint(&ys)); + assert!(ys.par_is_disjoint(&xs)); + assert!(xs.insert(5)); + assert!(ys.insert(11)); + assert!(xs.par_is_disjoint(&ys)); + assert!(ys.par_is_disjoint(&xs)); + assert!(xs.insert(7)); + assert!(xs.insert(19)); + assert!(xs.insert(4)); + assert!(ys.insert(2)); + assert!(ys.insert(-11)); + assert!(xs.par_is_disjoint(&ys)); + assert!(ys.par_is_disjoint(&xs)); + assert!(ys.insert(7)); + assert!(!xs.par_is_disjoint(&ys)); + assert!(!ys.par_is_disjoint(&xs)); + } + + #[test] + fn test_subset_and_superset() { + let mut a = HashSet::new(); + assert!(a.insert(0)); + assert!(a.insert(5)); + assert!(a.insert(11)); + assert!(a.insert(7)); + + let mut b = HashSet::new(); + assert!(b.insert(0)); + assert!(b.insert(7)); + assert!(b.insert(19)); + assert!(b.insert(250)); + assert!(b.insert(11)); + assert!(b.insert(200)); + + assert!(!a.par_is_subset(&b)); + assert!(!a.par_is_superset(&b)); + assert!(!b.par_is_subset(&a)); + assert!(!b.par_is_superset(&a)); + + assert!(b.insert(5)); + + assert!(a.par_is_subset(&b)); + assert!(!a.par_is_superset(&b)); + assert!(!b.par_is_subset(&a)); + assert!(b.par_is_superset(&a)); + } + + #[test] + fn test_iterate() { + let mut a = HashSet::new(); + for i in 0..32 { + assert!(a.insert(i)); + } + let observed = AtomicUsize::new(0); + a.par_iter().for_each(|k| { + observed.fetch_or(1 << *k, Ordering::Relaxed); + }); + assert_eq!(observed.into_inner(), 0xFFFF_FFFF); + } + + #[test] + fn test_intersection() { + let mut a = HashSet::new(); + let mut b = HashSet::new(); + + assert!(a.insert(11)); + assert!(a.insert(1)); + assert!(a.insert(3)); + assert!(a.insert(77)); + assert!(a.insert(103)); + assert!(a.insert(5)); + assert!(a.insert(-5)); + + assert!(b.insert(2)); + assert!(b.insert(11)); + assert!(b.insert(77)); + assert!(b.insert(-9)); + assert!(b.insert(-42)); + assert!(b.insert(5)); + assert!(b.insert(3)); + + let expected = [3, 5, 11, 77]; + let i = a + .par_intersection(&b) + .map(|x| { + assert!(expected.contains(x)); + 1 + }) + .sum::(); + assert_eq!(i, expected.len()); + } + + #[test] + fn test_difference() { + let mut a = HashSet::new(); + let mut b = HashSet::new(); + + assert!(a.insert(1)); + assert!(a.insert(3)); + assert!(a.insert(5)); + assert!(a.insert(9)); + assert!(a.insert(11)); + + assert!(b.insert(3)); + assert!(b.insert(9)); + + let expected = [1, 5, 11]; + let i = a + .par_difference(&b) + .map(|x| { + assert!(expected.contains(x)); + 1 + }) + .sum::(); + assert_eq!(i, expected.len()); + } + + #[test] + fn test_symmetric_difference() { + let mut a = HashSet::new(); + let mut b = HashSet::new(); + + assert!(a.insert(1)); + assert!(a.insert(3)); + assert!(a.insert(5)); + assert!(a.insert(9)); + assert!(a.insert(11)); + + assert!(b.insert(-2)); + assert!(b.insert(3)); + assert!(b.insert(9)); + assert!(b.insert(14)); + assert!(b.insert(22)); + + let expected = [-2, 1, 5, 11, 14, 22]; + let i = a + .par_symmetric_difference(&b) + .map(|x| { + assert!(expected.contains(x)); + 1 + }) + .sum::(); + assert_eq!(i, expected.len()); + } + + #[test] + fn test_union() { + let mut a = HashSet::new(); + let mut b = HashSet::new(); + + assert!(a.insert(1)); + assert!(a.insert(3)); + assert!(a.insert(5)); + assert!(a.insert(9)); + assert!(a.insert(11)); + assert!(a.insert(16)); + assert!(a.insert(19)); + assert!(a.insert(24)); + + assert!(b.insert(-2)); + assert!(b.insert(1)); + assert!(b.insert(5)); + assert!(b.insert(9)); + assert!(b.insert(13)); + assert!(b.insert(19)); + + let expected = [-2, 1, 3, 5, 9, 11, 13, 16, 19, 24]; + let i = a + .par_union(&b) + .map(|x| { + assert!(expected.contains(x)); + 1 + }) + .sum::(); + assert_eq!(i, expected.len()); + } + + #[test] + fn test_from_iter() { + let xs = [1, 2, 3, 4, 5, 6, 7, 8, 9]; + + let set: HashSet<_> = xs.par_iter().cloned().collect(); + + for x in &xs { + assert!(set.contains(x)); + } + } + + #[test] + fn test_move_iter() { + let hs = { + let mut hs = HashSet::new(); + + hs.insert('a'); + hs.insert('b'); + + hs + }; + + let v = hs.into_par_iter().collect::>(); + assert!(v == ['a', 'b'] || v == ['b', 'a']); + } + + #[test] + fn test_eq() { + // These constants once happened to expose a bug in insert(). + // I'm keeping them around to prevent a regression. + let mut s1 = HashSet::new(); + + s1.insert(1); + s1.insert(2); + s1.insert(3); + + let mut s2 = HashSet::new(); + + s2.insert(1); + s2.insert(2); + + assert!(!s1.par_eq(&s2)); + + s2.insert(3); + + assert!(s1.par_eq(&s2)); + } + + #[test] + fn test_extend_ref() { + let mut a = HashSet::new(); + a.insert(1); + + a.par_extend(&[2, 3, 4][..]); + + assert_eq!(a.len(), 4); + assert!(a.contains(&1)); + assert!(a.contains(&2)); + assert!(a.contains(&3)); + assert!(a.contains(&4)); + + let mut b = HashSet::new(); + b.insert(5); + b.insert(6); + + a.par_extend(&b); + + assert_eq!(a.len(), 6); + assert!(a.contains(&1)); + assert!(a.contains(&2)); + assert!(a.contains(&3)); + assert!(a.contains(&4)); + assert!(a.contains(&5)); + assert!(a.contains(&6)); + } +} diff --git a/vendor/hashbrown/src/external_trait_impls/serde.rs b/vendor/hashbrown/src/external_trait_impls/serde.rs new file mode 100644 index 0000000000..5adac8cd43 --- /dev/null +++ b/vendor/hashbrown/src/external_trait_impls/serde.rs @@ -0,0 +1,200 @@ +mod size_hint { + use core::cmp; + + /// This presumably exists to prevent denial of service attacks. + /// + /// Original discussion: https://github.com/serde-rs/serde/issues/1114. + #[inline] + pub(super) fn cautious(hint: Option) -> usize { + cmp::min(hint.unwrap_or(0), 4096) + } +} + +mod map { + use core::fmt; + use core::hash::{BuildHasher, Hash}; + use core::marker::PhantomData; + use serde::de::{Deserialize, Deserializer, MapAccess, Visitor}; + use serde::ser::{Serialize, Serializer}; + + use crate::hash_map::HashMap; + + use super::size_hint; + + impl Serialize for HashMap + where + K: Serialize + Eq + Hash, + V: Serialize, + H: BuildHasher, + { + #[inline] + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + serializer.collect_map(self) + } + } + + impl<'de, K, V, S> Deserialize<'de> for HashMap + where + K: Deserialize<'de> + Eq + Hash, + V: Deserialize<'de>, + S: BuildHasher + Default, + { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct MapVisitor { + marker: PhantomData>, + } + + impl<'de, K, V, S> Visitor<'de> for MapVisitor + where + K: Deserialize<'de> + Eq + Hash, + V: Deserialize<'de>, + S: BuildHasher + Default, + { + type Value = HashMap; + + fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { + formatter.write_str("a map") + } + + #[inline] + fn visit_map(self, mut map: A) -> Result + where + A: MapAccess<'de>, + { + let mut values = HashMap::with_capacity_and_hasher( + size_hint::cautious(map.size_hint()), + S::default(), + ); + + while let Some((key, value)) = map.next_entry()? { + values.insert(key, value); + } + + Ok(values) + } + } + + let visitor = MapVisitor { + marker: PhantomData, + }; + deserializer.deserialize_map(visitor) + } + } +} + +mod set { + use core::fmt; + use core::hash::{BuildHasher, Hash}; + use core::marker::PhantomData; + use serde::de::{Deserialize, Deserializer, SeqAccess, Visitor}; + use serde::ser::{Serialize, Serializer}; + + use crate::hash_set::HashSet; + + use super::size_hint; + + impl Serialize for HashSet + where + T: Serialize + Eq + Hash, + H: BuildHasher, + { + #[inline] + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + serializer.collect_seq(self) + } + } + + impl<'de, T, S> Deserialize<'de> for HashSet + where + T: Deserialize<'de> + Eq + Hash, + S: BuildHasher + Default, + { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct SeqVisitor { + marker: PhantomData>, + } + + impl<'de, T, S> Visitor<'de> for SeqVisitor + where + T: Deserialize<'de> + Eq + Hash, + S: BuildHasher + Default, + { + type Value = HashSet; + + fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { + formatter.write_str("a sequence") + } + + #[inline] + fn visit_seq(self, mut seq: A) -> Result + where + A: SeqAccess<'de>, + { + let mut values = HashSet::with_capacity_and_hasher( + size_hint::cautious(seq.size_hint()), + S::default(), + ); + + while let Some(value) = seq.next_element()? { + values.insert(value); + } + + Ok(values) + } + } + + let visitor = SeqVisitor { + marker: PhantomData, + }; + deserializer.deserialize_seq(visitor) + } + + fn deserialize_in_place(deserializer: D, place: &mut Self) -> Result<(), D::Error> + where + D: Deserializer<'de>, + { + struct SeqInPlaceVisitor<'a, T, S>(&'a mut HashSet); + + impl<'a, 'de, T, S> Visitor<'de> for SeqInPlaceVisitor<'a, T, S> + where + T: Deserialize<'de> + Eq + Hash, + S: BuildHasher + Default, + { + type Value = (); + + fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { + formatter.write_str("a sequence") + } + + #[inline] + fn visit_seq(self, mut seq: A) -> Result + where + A: SeqAccess<'de>, + { + self.0.clear(); + self.0.reserve(size_hint::cautious(seq.size_hint())); + + while let Some(value) = seq.next_element()? { + self.0.insert(value); + } + + Ok(()) + } + } + + deserializer.deserialize_seq(SeqInPlaceVisitor(place)) + } + } +} diff --git a/vendor/hashbrown/src/fx.rs b/vendor/hashbrown/src/fx.rs new file mode 100644 index 0000000000..c7eb37624b --- /dev/null +++ b/vendor/hashbrown/src/fx.rs @@ -0,0 +1,119 @@ +//! Fast, non-cryptographic hash used by rustc and Firefox. + +use core::default::Default; +use core::hash::{BuildHasherDefault, Hasher}; +use core::mem::size_of; +use core::ops::BitXor; + +/// Type alias for a `HashBuilder` using the `fx` hash algorithm. +pub type FxHashBuilder = BuildHasherDefault; + +/// A speedy hash algorithm for use within rustc. The hashmap in liballoc +/// by default uses SipHash which isn't quite as speedy as we want. In the +/// compiler we're not really worried about DOS attempts, so we use a fast +/// non-cryptographic hash. +/// +/// This is the same as the algorithm used by Firefox -- which is a homespun +/// one not based on any widely-known algorithm -- though modified to produce +/// 64-bit hash values instead of 32-bit hash values. It consistently +/// out-performs an FNV-based hash within rustc itself -- the collision rate is +/// similar or slightly worse than FNV, but the speed of the hash function +/// itself is much higher because it works on up to 8 bytes at a time. +pub struct FxHasher { + hash: usize, +} + +#[cfg(target_pointer_width = "32")] +const K: usize = 0x9e37_79b9; +#[cfg(target_pointer_width = "64")] +const K: usize = 0x517c_c1b7_2722_0a95; + +impl Default for FxHasher { + #[inline] + fn default() -> Self { + Self { hash: 0 } + } +} + +impl FxHasher { + #[inline] + fn add_to_hash(&mut self, i: usize) { + self.hash = self.hash.rotate_left(5).bitxor(i).wrapping_mul(K); + } +} + +impl Hasher for FxHasher { + #[inline] + fn write(&mut self, mut bytes: &[u8]) { + macro_rules! read_bytes { + ($ty:ty, $src:expr) => {{ + assert!(size_of::<$ty>() <= $src.len()); + let mut data: $ty = 0; + unsafe { + $src.as_ptr() + .copy_to_nonoverlapping(&mut data as *mut $ty as *mut u8, size_of::<$ty>()); + } + data + }}; + } + + let mut hash = Self { hash: self.hash }; + assert!(size_of::() <= 8); + while bytes.len() >= size_of::() { + hash.add_to_hash(read_bytes!(usize, bytes) as usize); + bytes = &bytes[size_of::()..]; + } + if (size_of::() > 4) && (bytes.len() >= 4) { + hash.add_to_hash(read_bytes!(u32, bytes) as usize); + bytes = &bytes[4..]; + } + if (size_of::() > 2) && bytes.len() >= 2 { + hash.add_to_hash(read_bytes!(u16, bytes) as usize); + bytes = &bytes[2..]; + } + if (size_of::() > 1) && !bytes.is_empty() { + hash.add_to_hash(bytes[0] as usize); + } + self.hash = hash.hash; + } + + #[inline] + fn write_u8(&mut self, i: u8) { + self.add_to_hash(i as usize); + } + + #[inline] + fn write_u16(&mut self, i: u16) { + self.add_to_hash(i as usize); + } + + #[inline] + fn write_u32(&mut self, i: u32) { + self.add_to_hash(i as usize); + } + + #[cfg(target_pointer_width = "32")] + #[inline] + #[allow(clippy::cast_possible_truncation)] + fn write_u64(&mut self, i: u64) { + self.add_to_hash(i as usize); + self.add_to_hash((i >> 32) as usize); + } + + #[cfg(target_pointer_width = "64")] + #[inline] + #[allow(clippy::cast_possible_truncation)] + fn write_u64(&mut self, i: u64) { + self.add_to_hash(i as usize); + } + + #[inline] + fn write_usize(&mut self, i: usize) { + self.add_to_hash(i); + } + + #[inline] + fn finish(&self) -> u64 { + self.hash as u64 + } +} diff --git a/vendor/hashbrown/src/lib.rs b/vendor/hashbrown/src/lib.rs new file mode 100644 index 0000000000..1fe78e6448 --- /dev/null +++ b/vendor/hashbrown/src/lib.rs @@ -0,0 +1,93 @@ +//! This crate is a Rust port of Google's high-performance [SwissTable] hash +//! map, adapted to make it a drop-in replacement for Rust's standard `HashMap` +//! and `HashSet` types. +//! +//! The original C++ version of [SwissTable] can be found [here], and this +//! [CppCon talk] gives an overview of how the algorithm works. +//! +//! [SwissTable]: https://abseil.io/blog/20180927-swisstables +//! [here]: https://github.com/abseil/abseil-cpp/blob/master/absl/container/internal/raw_hash_set.h +//! [CppCon talk]: https://www.youtube.com/watch?v=ncHmEUmJZf4 + +#![no_std] +#![cfg_attr( + feature = "nightly", + feature( + alloc_layout_extra, + allocator_api, + ptr_offset_from, + test, + core_intrinsics, + dropck_eyepatch + ) +)] +#![warn(missing_docs)] +#![allow(clippy::module_name_repetitions)] +#![warn(rust_2018_idioms)] + +#[cfg(test)] +#[macro_use] +extern crate std; + +#[cfg(feature = "nightly")] +#[cfg_attr(test, macro_use)] +extern crate alloc; +#[cfg(not(feature = "nightly"))] +extern crate std as alloc; + +#[macro_use] +mod macros; + +mod external_trait_impls; +mod fx; +mod map; +mod raw; +#[cfg(feature = "rustc-dep-of-std")] +mod rustc_entry; +mod scopeguard; +mod set; + +pub mod hash_map { + //! A hash map implemented with quadratic probing and SIMD lookup. + pub use crate::map::*; + + #[cfg(feature = "rustc-dep-of-std")] + pub use crate::rustc_entry::*; + + #[cfg(feature = "rayon")] + /// [rayon]-based parallel iterator types for hash maps. + /// You will rarely need to interact with it directly unless you have need + /// to name one of the iterator types. + /// + /// [rayon]: https://docs.rs/rayon/1.0/rayon + pub mod rayon { + pub use crate::external_trait_impls::rayon::map::*; + } +} +pub mod hash_set { + //! A hash set implemented as a `HashMap` where the value is `()`. + pub use crate::set::*; + + #[cfg(feature = "rayon")] + /// [rayon]-based parallel iterator types for hash sets. + /// You will rarely need to interact with it directly unless you have need + /// to name one of the iterator types. + /// + /// [rayon]: https://docs.rs/rayon/1.0/rayon + pub mod rayon { + pub use crate::external_trait_impls::rayon::set::*; + } +} + +pub use crate::map::HashMap; +pub use crate::set::HashSet; + +/// Augments `AllocErr` with a `CapacityOverflow` variant. +#[derive(Clone, PartialEq, Eq, Debug)] +pub enum CollectionAllocErr { + /// Error due to the computed capacity exceeding the collection's maximum + /// (usually `isize::MAX` bytes). + CapacityOverflow, + /// Error due to the allocator (see the `AllocErr` type's docs). + AllocErr, +} diff --git a/vendor/hashbrown/src/macros.rs b/vendor/hashbrown/src/macros.rs new file mode 100644 index 0000000000..e743094768 --- /dev/null +++ b/vendor/hashbrown/src/macros.rs @@ -0,0 +1,54 @@ +// See the cfg-if crate. +macro_rules! cfg_if { + // match if/else chains with a final `else` + ($( + if #[cfg($($meta:meta),*)] { $($it:item)* } + ) else * else { + $($it2:item)* + }) => { + cfg_if! { + @__items + () ; + $( ( ($($meta),*) ($($it)*) ), )* + ( () ($($it2)*) ), + } + }; + + // match if/else chains lacking a final `else` + ( + if #[cfg($($i_met:meta),*)] { $($i_it:item)* } + $( + else if #[cfg($($e_met:meta),*)] { $($e_it:item)* } + )* + ) => { + cfg_if! { + @__items + () ; + ( ($($i_met),*) ($($i_it)*) ), + $( ( ($($e_met),*) ($($e_it)*) ), )* + ( () () ), + } + }; + + // Internal and recursive macro to emit all the items + // + // Collects all the negated cfgs in a list at the beginning and after the + // semicolon is all the remaining items + (@__items ($($not:meta,)*) ; ) => {}; + (@__items ($($not:meta,)*) ; ( ($($m:meta),*) ($($it:item)*) ), $($rest:tt)*) => { + // Emit all items within one block, applying an approprate #[cfg]. The + // #[cfg] will require all `$m` matchers specified and must also negate + // all previous matchers. + cfg_if! { @__apply cfg(all($($m,)* not(any($($not),*)))), $($it)* } + + // Recurse to emit all other items in `$rest`, and when we do so add all + // our `$m` matchers to the list of `$not` matchers as future emissions + // will have to negate everything we just matched as well. + cfg_if! { @__items ($($not,)* $($m,)*) ; $($rest)* } + }; + + // Internal macro to Apply a cfg attribute to a list of items + (@__apply $m:meta, $($it:item)*) => { + $(#[$m] $it)* + }; +} diff --git a/vendor/hashbrown/src/map.rs b/vendor/hashbrown/src/map.rs new file mode 100644 index 0000000000..ad5602a997 --- /dev/null +++ b/vendor/hashbrown/src/map.rs @@ -0,0 +1,3566 @@ +use crate::raw::{Bucket, RawDrain, RawIntoIter, RawIter, RawTable}; +use crate::CollectionAllocErr; +use core::borrow::Borrow; +use core::fmt::{self, Debug}; +use core::hash::{BuildHasher, Hash, Hasher}; +use core::iter::{FromIterator, FusedIterator}; +use core::marker::PhantomData; +use core::mem; +use core::ops::Index; + +pub use crate::fx::FxHashBuilder as DefaultHashBuilder; + +/// A hash map implemented with quadratic probing and SIMD lookup. +/// +/// The default hashing algorithm is currently `fx`, though this is +/// subject to change at any point in the future. This hash function is very +/// fast for all types of keys, but this algorithm will typically *not* protect +/// against attacks such as HashDoS. +/// +/// The hashing algorithm can be replaced on a per-`HashMap` basis using the +/// [`default`], [`with_hasher`], and [`with_capacity_and_hasher`] methods. Many +/// alternative algorithms are available on crates.io, such as the [`fnv`] crate. +/// +/// It is required that the keys implement the [`Eq`] and [`Hash`] traits, although +/// this can frequently be achieved by using `#[derive(PartialEq, Eq, Hash)]`. +/// If you implement these yourself, it is important that the following +/// property holds: +/// +/// ```text +/// k1 == k2 -> hash(k1) == hash(k2) +/// ``` +/// +/// In other words, if two keys are equal, their hashes must be equal. +/// +/// It is a logic error for a key to be modified in such a way that the key's +/// hash, as determined by the [`Hash`] trait, or its equality, as determined by +/// the [`Eq`] trait, changes while it is in the map. This is normally only +/// possible through [`Cell`], [`RefCell`], global state, I/O, or unsafe code. +/// +/// It is also a logic error for the [`Hash`] implementation of a key to panic. +/// This is generally only possible if the trait is implemented manually. If a +/// panic does occur then the contents of the `HashMap` may become corrupted and +/// some items may be dropped from the table. +/// +/// # Examples +/// +/// ``` +/// use hashbrown::HashMap; +/// +/// // Type inference lets us omit an explicit type signature (which +/// // would be `HashMap` in this example). +/// let mut book_reviews = HashMap::new(); +/// +/// // Review some books. +/// book_reviews.insert( +/// "Adventures of Huckleberry Finn".to_string(), +/// "My favorite book.".to_string(), +/// ); +/// book_reviews.insert( +/// "Grimms' Fairy Tales".to_string(), +/// "Masterpiece.".to_string(), +/// ); +/// book_reviews.insert( +/// "Pride and Prejudice".to_string(), +/// "Very enjoyable.".to_string(), +/// ); +/// book_reviews.insert( +/// "The Adventures of Sherlock Holmes".to_string(), +/// "Eye lyked it alot.".to_string(), +/// ); +/// +/// // Check for a specific one. +/// // When collections store owned values (String), they can still be +/// // queried using references (&str). +/// if !book_reviews.contains_key("Les Misérables") { +/// println!("We've got {} reviews, but Les Misérables ain't one.", +/// book_reviews.len()); +/// } +/// +/// // oops, this review has a lot of spelling mistakes, let's delete it. +/// book_reviews.remove("The Adventures of Sherlock Holmes"); +/// +/// // Look up the values associated with some keys. +/// let to_find = ["Pride and Prejudice", "Alice's Adventure in Wonderland"]; +/// for &book in &to_find { +/// match book_reviews.get(book) { +/// Some(review) => println!("{}: {}", book, review), +/// None => println!("{} is unreviewed.", book) +/// } +/// } +/// +/// // Look up the value for a key (will panic if the key is not found). +/// println!("Review for Jane: {}", book_reviews["Pride and Prejudice"]); +/// +/// // Iterate over everything. +/// for (book, review) in &book_reviews { +/// println!("{}: \"{}\"", book, review); +/// } +/// ``` +/// +/// `HashMap` also implements an [`Entry API`](#method.entry), which allows +/// for more complex methods of getting, setting, updating and removing keys and +/// their values: +/// +/// ``` +/// use hashbrown::HashMap; +/// +/// // type inference lets us omit an explicit type signature (which +/// // would be `HashMap<&str, u8>` in this example). +/// let mut player_stats = HashMap::new(); +/// +/// fn random_stat_buff() -> u8 { +/// // could actually return some random value here - let's just return +/// // some fixed value for now +/// 42 +/// } +/// +/// // insert a key only if it doesn't already exist +/// player_stats.entry("health").or_insert(100); +/// +/// // insert a key using a function that provides a new value only if it +/// // doesn't already exist +/// player_stats.entry("defence").or_insert_with(random_stat_buff); +/// +/// // update a key, guarding against the key possibly not being set +/// let stat = player_stats.entry("attack").or_insert(100); +/// *stat += random_stat_buff(); +/// ``` +/// +/// The easiest way to use `HashMap` with a custom key type is to derive [`Eq`] and [`Hash`]. +/// We must also derive [`PartialEq`]. +/// +/// [`Eq`]: https://doc.rust-lang.org/std/cmp/trait.Eq.html +/// [`Hash`]: https://doc.rust-lang.org/std/hash/trait.Hash.html +/// [`PartialEq`]: https://doc.rust-lang.org/std/cmp/trait.PartialEq.html +/// [`RefCell`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html +/// [`Cell`]: https://doc.rust-lang.org/std/cell/struct.Cell.html +/// [`default`]: #method.default +/// [`with_hasher`]: #method.with_hasher +/// [`with_capacity_and_hasher`]: #method.with_capacity_and_hasher +/// [`fnv`]: https://crates.io/crates/fnv +/// +/// ``` +/// use hashbrown::HashMap; +/// +/// #[derive(Hash, Eq, PartialEq, Debug)] +/// struct Viking { +/// name: String, +/// country: String, +/// } +/// +/// impl Viking { +/// /// Creates a new Viking. +/// fn new(name: &str, country: &str) -> Viking { +/// Viking { name: name.to_string(), country: country.to_string() } +/// } +/// } +/// +/// // Use a HashMap to store the vikings' health points. +/// let mut vikings = HashMap::new(); +/// +/// vikings.insert(Viking::new("Einar", "Norway"), 25); +/// vikings.insert(Viking::new("Olaf", "Denmark"), 24); +/// vikings.insert(Viking::new("Harald", "Iceland"), 12); +/// +/// // Use derived implementation to print the status of the vikings. +/// for (viking, health) in &vikings { +/// println!("{:?} has {} hp", viking, health); +/// } +/// ``` +/// +/// A `HashMap` with fixed list of elements can be initialized from an array: +/// +/// ``` +/// use hashbrown::HashMap; +/// +/// fn main() { +/// let timber_resources: HashMap<&str, i32> = +/// [("Norway", 100), +/// ("Denmark", 50), +/// ("Iceland", 10)] +/// .iter().cloned().collect(); +/// // use the values stored in map +/// } +/// ``` + +#[derive(Clone)] +pub struct HashMap { + pub(crate) hash_builder: S, + pub(crate) table: RawTable<(K, V)>, +} + +#[inline] +pub(crate) fn make_hash(hash_builder: &impl BuildHasher, val: &K) -> u64 { + let mut state = hash_builder.build_hasher(); + val.hash(&mut state); + state.finish() +} + +impl HashMap { + /// Creates an empty `HashMap`. + /// + /// The hash map is initially created with a capacity of 0, so it will not allocate until it + /// is first inserted into. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// let mut map: HashMap<&str, i32> = HashMap::new(); + /// ``` + #[inline] + pub fn new() -> Self { + Self::default() + } + + /// Creates an empty `HashMap` with the specified capacity. + /// + /// The hash map will be able to hold at least `capacity` elements without + /// reallocating. If `capacity` is 0, the hash map will not allocate. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// let mut map: HashMap<&str, i32> = HashMap::with_capacity(10); + /// ``` + #[inline] + pub fn with_capacity(capacity: usize) -> Self { + Self::with_capacity_and_hasher(capacity, DefaultHashBuilder::default()) + } +} + +impl HashMap { + /// Creates an empty `HashMap` which will use the given hash builder to hash + /// keys. + /// + /// The created map has the default initial capacity. + /// + /// Warning: `hash_builder` is normally randomly generated, and + /// is designed to allow HashMaps to be resistant to attacks that + /// cause many collisions and very poor performance. Setting it + /// manually using this function can expose a DoS attack vector. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::DefaultHashBuilder; + /// + /// let s = DefaultHashBuilder::default(); + /// let mut map = HashMap::with_hasher(s); + /// map.insert(1, 2); + /// ``` + #[inline] + pub fn with_hasher(hash_builder: S) -> Self { + Self { + hash_builder, + table: RawTable::new(), + } + } + + /// Creates an empty `HashMap` with the specified capacity, using `hash_builder` + /// to hash the keys. + /// + /// The hash map will be able to hold at least `capacity` elements without + /// reallocating. If `capacity` is 0, the hash map will not allocate. + /// + /// Warning: `hash_builder` is normally randomly generated, and + /// is designed to allow HashMaps to be resistant to attacks that + /// cause many collisions and very poor performance. Setting it + /// manually using this function can expose a DoS attack vector. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::DefaultHashBuilder; + /// + /// let s = DefaultHashBuilder::default(); + /// let mut map = HashMap::with_capacity_and_hasher(10, s); + /// map.insert(1, 2); + /// ``` + #[inline] + pub fn with_capacity_and_hasher(capacity: usize, hash_builder: S) -> Self { + Self { + hash_builder, + table: RawTable::with_capacity(capacity), + } + } + + /// Returns a reference to the map's [`BuildHasher`]. + /// + /// [`BuildHasher`]: https://doc.rust-lang.org/std/hash/trait.BuildHasher.html + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::DefaultHashBuilder; + /// + /// let hasher = DefaultHashBuilder::default(); + /// let map: HashMap = HashMap::with_hasher(hasher); + /// let hasher: &DefaultHashBuilder = map.hasher(); + /// ``` + #[inline] + pub fn hasher(&self) -> &S { + &self.hash_builder + } + + /// Returns the number of elements the map can hold without reallocating. + /// + /// This number is a lower bound; the `HashMap` might be able to hold + /// more, but is guaranteed to be able to hold at least this many. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// let map: HashMap = HashMap::with_capacity(100); + /// assert!(map.capacity() >= 100); + /// ``` + #[inline] + pub fn capacity(&self) -> usize { + self.table.capacity() + } + + /// An iterator visiting all keys in arbitrary order. + /// The iterator element type is `&'a K`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map = HashMap::new(); + /// map.insert("a", 1); + /// map.insert("b", 2); + /// map.insert("c", 3); + /// + /// for key in map.keys() { + /// println!("{}", key); + /// } + /// ``` + #[inline] + pub fn keys(&self) -> Keys<'_, K, V> { + Keys { inner: self.iter() } + } + + /// An iterator visiting all values in arbitrary order. + /// The iterator element type is `&'a V`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map = HashMap::new(); + /// map.insert("a", 1); + /// map.insert("b", 2); + /// map.insert("c", 3); + /// + /// for val in map.values() { + /// println!("{}", val); + /// } + /// ``` + #[inline] + pub fn values(&self) -> Values<'_, K, V> { + Values { inner: self.iter() } + } + + /// An iterator visiting all values mutably in arbitrary order. + /// The iterator element type is `&'a mut V`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map = HashMap::new(); + /// + /// map.insert("a", 1); + /// map.insert("b", 2); + /// map.insert("c", 3); + /// + /// for val in map.values_mut() { + /// *val = *val + 10; + /// } + /// + /// for val in map.values() { + /// println!("{}", val); + /// } + /// ``` + #[inline] + pub fn values_mut(&mut self) -> ValuesMut<'_, K, V> { + ValuesMut { + inner: self.iter_mut(), + } + } + + /// An iterator visiting all key-value pairs in arbitrary order. + /// The iterator element type is `(&'a K, &'a V)`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map = HashMap::new(); + /// map.insert("a", 1); + /// map.insert("b", 2); + /// map.insert("c", 3); + /// + /// for (key, val) in map.iter() { + /// println!("key: {} val: {}", key, val); + /// } + /// ``` + #[inline] + pub fn iter(&self) -> Iter<'_, K, V> { + // Here we tie the lifetime of self to the iter. + unsafe { + Iter { + inner: self.table.iter(), + marker: PhantomData, + } + } + } + + /// An iterator visiting all key-value pairs in arbitrary order, + /// with mutable references to the values. + /// The iterator element type is `(&'a K, &'a mut V)`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map = HashMap::new(); + /// map.insert("a", 1); + /// map.insert("b", 2); + /// map.insert("c", 3); + /// + /// // Update all values + /// for (_, val) in map.iter_mut() { + /// *val *= 2; + /// } + /// + /// for (key, val) in &map { + /// println!("key: {} val: {}", key, val); + /// } + /// ``` + #[inline] + pub fn iter_mut(&mut self) -> IterMut<'_, K, V> { + // Here we tie the lifetime of self to the iter. + unsafe { + IterMut { + inner: self.table.iter(), + marker: PhantomData, + } + } + } + + #[cfg(test)] + #[inline] + fn raw_capacity(&self) -> usize { + self.table.buckets() + } + + /// Returns the number of elements in the map. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut a = HashMap::new(); + /// assert_eq!(a.len(), 0); + /// a.insert(1, "a"); + /// assert_eq!(a.len(), 1); + /// ``` + #[inline] + pub fn len(&self) -> usize { + self.table.len() + } + + /// Returns `true` if the map contains no elements. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut a = HashMap::new(); + /// assert!(a.is_empty()); + /// a.insert(1, "a"); + /// assert!(!a.is_empty()); + /// ``` + #[inline] + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + + /// Clears the map, returning all key-value pairs as an iterator. Keeps the + /// allocated memory for reuse. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut a = HashMap::new(); + /// a.insert(1, "a"); + /// a.insert(2, "b"); + /// + /// for (k, v) in a.drain().take(1) { + /// assert!(k == 1 || k == 2); + /// assert!(v == "a" || v == "b"); + /// } + /// + /// assert!(a.is_empty()); + /// ``` + #[inline] + pub fn drain(&mut self) -> Drain<'_, K, V> { + // Here we tie the lifetime of self to the iter. + unsafe { + Drain { + inner: self.table.drain(), + } + } + } + + /// Clears the map, removing all key-value pairs. Keeps the allocated memory + /// for reuse. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut a = HashMap::new(); + /// a.insert(1, "a"); + /// a.clear(); + /// assert!(a.is_empty()); + /// ``` + #[inline] + pub fn clear(&mut self) { + self.table.clear(); + } +} + +impl HashMap +where + K: Eq + Hash, + S: BuildHasher, +{ + /// Reserves capacity for at least `additional` more elements to be inserted + /// in the `HashMap`. The collection may reserve more space to avoid + /// frequent reallocations. + /// + /// # Panics + /// + /// Panics if the new allocation size overflows [`usize`]. + /// + /// [`usize`]: https://doc.rust-lang.org/std/primitive.usize.html + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// let mut map: HashMap<&str, i32> = HashMap::new(); + /// map.reserve(10); + /// ``` + #[inline] + pub fn reserve(&mut self, additional: usize) { + let hash_builder = &self.hash_builder; + self.table + .reserve(additional, |x| make_hash(hash_builder, &x.0)); + } + + /// Tries to reserve capacity for at least `additional` more elements to be inserted + /// in the given `HashMap`. The collection may reserve more space to avoid + /// frequent reallocations. + /// + /// # Errors + /// + /// If the capacity overflows, or the allocator reports a failure, then an error + /// is returned. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// let mut map: HashMap<&str, isize> = HashMap::new(); + /// map.try_reserve(10).expect("why is the test harness OOMing on 10 bytes?"); + /// ``` + #[inline] + pub fn try_reserve(&mut self, additional: usize) -> Result<(), CollectionAllocErr> { + let hash_builder = &self.hash_builder; + self.table + .try_reserve(additional, |x| make_hash(hash_builder, &x.0)) + } + + /// Shrinks the capacity of the map as much as possible. It will drop + /// down as much as possible while maintaining the internal rules + /// and possibly leaving some space in accordance with the resize policy. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap = HashMap::with_capacity(100); + /// map.insert(1, 2); + /// map.insert(3, 4); + /// assert!(map.capacity() >= 100); + /// map.shrink_to_fit(); + /// assert!(map.capacity() >= 2); + /// ``` + #[inline] + pub fn shrink_to_fit(&mut self) { + let hash_builder = &self.hash_builder; + self.table.shrink_to(0, |x| make_hash(hash_builder, &x.0)); + } + + /// Shrinks the capacity of the map with a lower limit. It will drop + /// down no lower than the supplied limit while maintaining the internal rules + /// and possibly leaving some space in accordance with the resize policy. + /// + /// This function does nothing if the current capacity is smaller than the + /// supplied minimum capacity. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap = HashMap::with_capacity(100); + /// map.insert(1, 2); + /// map.insert(3, 4); + /// assert!(map.capacity() >= 100); + /// map.shrink_to(10); + /// assert!(map.capacity() >= 10); + /// map.shrink_to(0); + /// assert!(map.capacity() >= 2); + /// map.shrink_to(10); + /// assert!(map.capacity() >= 2); + /// ``` + #[inline] + pub fn shrink_to(&mut self, min_capacity: usize) { + let hash_builder = &self.hash_builder; + self.table + .shrink_to(min_capacity, |x| make_hash(hash_builder, &x.0)); + } + + /// Gets the given key's corresponding entry in the map for in-place manipulation. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut letters = HashMap::new(); + /// + /// for ch in "a short treatise on fungi".chars() { + /// let counter = letters.entry(ch).or_insert(0); + /// *counter += 1; + /// } + /// + /// assert_eq!(letters[&'s'], 2); + /// assert_eq!(letters[&'t'], 3); + /// assert_eq!(letters[&'u'], 1); + /// assert_eq!(letters.get(&'y'), None); + /// ``` + #[inline] + pub fn entry(&mut self, key: K) -> Entry<'_, K, V, S> { + let hash = make_hash(&self.hash_builder, &key); + if let Some(elem) = self.table.find(hash, |q| q.0.eq(&key)) { + Entry::Occupied(OccupiedEntry { + key: Some(key), + elem, + table: self, + }) + } else { + Entry::Vacant(VacantEntry { + hash, + key, + table: self, + }) + } + } + + /// Returns a reference to the value corresponding to the key. + /// + /// The key may be any borrowed form of the map's key type, but + /// [`Hash`] and [`Eq`] on the borrowed form *must* match those for + /// the key type. + /// + /// [`Eq`]: https://doc.rust-lang.org/std/cmp/trait.Eq.html + /// [`Hash`]: https://doc.rust-lang.org/std/hash/trait.Hash.html + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map = HashMap::new(); + /// map.insert(1, "a"); + /// assert_eq!(map.get(&1), Some(&"a")); + /// assert_eq!(map.get(&2), None); + /// ``` + #[inline] + pub fn get(&self, k: &Q) -> Option<&V> + where + K: Borrow, + Q: Hash + Eq, + { + self.get_key_value(k).map(|(_, v)| v) + } + + /// Returns the key-value pair corresponding to the supplied key. + /// + /// The supplied key may be any borrowed form of the map's key type, but + /// [`Hash`] and [`Eq`] on the borrowed form *must* match those for + /// the key type. + /// + /// [`Eq`]: https://doc.rust-lang.org/std/cmp/trait.Eq.html + /// [`Hash`]: https://doc.rust-lang.org/std/hash/trait.Hash.html + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map = HashMap::new(); + /// map.insert(1, "a"); + /// assert_eq!(map.get_key_value(&1), Some((&1, &"a"))); + /// assert_eq!(map.get_key_value(&2), None); + /// ``` + #[inline] + pub fn get_key_value(&self, k: &Q) -> Option<(&K, &V)> + where + K: Borrow, + Q: Hash + Eq, + { + let hash = make_hash(&self.hash_builder, k); + self.table + .find(hash, |x| k.eq(x.0.borrow())) + .map(|item| unsafe { + let &(ref key, ref value) = item.as_ref(); + (key, value) + }) + } + + /// Returns `true` if the map contains a value for the specified key. + /// + /// The key may be any borrowed form of the map's key type, but + /// [`Hash`] and [`Eq`] on the borrowed form *must* match those for + /// the key type. + /// + /// [`Eq`]: https://doc.rust-lang.org/std/cmp/trait.Eq.html + /// [`Hash`]: https://doc.rust-lang.org/std/hash/trait.Hash.html + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map = HashMap::new(); + /// map.insert(1, "a"); + /// assert_eq!(map.contains_key(&1), true); + /// assert_eq!(map.contains_key(&2), false); + /// ``` + #[inline] + pub fn contains_key(&self, k: &Q) -> bool + where + K: Borrow, + Q: Hash + Eq, + { + self.get(k).is_some() + } + + /// Returns a mutable reference to the value corresponding to the key. + /// + /// The key may be any borrowed form of the map's key type, but + /// [`Hash`] and [`Eq`] on the borrowed form *must* match those for + /// the key type. + /// + /// [`Eq`]: https://doc.rust-lang.org/std/cmp/trait.Eq.html + /// [`Hash`]: https://doc.rust-lang.org/std/hash/trait.Hash.html + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map = HashMap::new(); + /// map.insert(1, "a"); + /// if let Some(x) = map.get_mut(&1) { + /// *x = "b"; + /// } + /// assert_eq!(map[&1], "b"); + /// ``` + #[inline] + pub fn get_mut(&mut self, k: &Q) -> Option<&mut V> + where + K: Borrow, + Q: Hash + Eq, + { + let hash = make_hash(&self.hash_builder, k); + self.table + .find(hash, |x| k.eq(x.0.borrow())) + .map(|item| unsafe { &mut item.as_mut().1 }) + } + + /// Inserts a key-value pair into the map. + /// + /// If the map did not have this key present, [`None`] is returned. + /// + /// If the map did have this key present, the value is updated, and the old + /// value is returned. The key is not updated, though; this matters for + /// types that can be `==` without being identical. See the [module-level + /// documentation] for more. + /// + /// [`None`]: https://doc.rust-lang.org/std/option/enum.Option.html#variant.None + /// [module-level documentation]: index.html#insert-and-complex-keys + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map = HashMap::new(); + /// assert_eq!(map.insert(37, "a"), None); + /// assert_eq!(map.is_empty(), false); + /// + /// map.insert(37, "b"); + /// assert_eq!(map.insert(37, "c"), Some("b")); + /// assert_eq!(map[&37], "c"); + /// ``` + #[inline] + pub fn insert(&mut self, k: K, v: V) -> Option { + unsafe { + let hash = make_hash(&self.hash_builder, &k); + if let Some(item) = self.table.find(hash, |x| k.eq(&x.0)) { + Some(mem::replace(&mut item.as_mut().1, v)) + } else { + let hash_builder = &self.hash_builder; + self.table + .insert(hash, (k, v), |x| make_hash(hash_builder, &x.0)); + None + } + } + } + + /// Removes a key from the map, returning the value at the key if the key + /// was previously in the map. + /// + /// The key may be any borrowed form of the map's key type, but + /// [`Hash`] and [`Eq`] on the borrowed form *must* match those for + /// the key type. + /// + /// [`Eq`]: https://doc.rust-lang.org/std/cmp/trait.Eq.html + /// [`Hash`]: https://doc.rust-lang.org/std/hash/trait.Hash.html + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map = HashMap::new(); + /// map.insert(1, "a"); + /// assert_eq!(map.remove(&1), Some("a")); + /// assert_eq!(map.remove(&1), None); + /// ``` + #[inline] + pub fn remove(&mut self, k: &Q) -> Option + where + K: Borrow, + Q: Hash + Eq, + { + self.remove_entry(k).map(|(_, v)| v) + } + + /// Removes a key from the map, returning the stored key and value if the + /// key was previously in the map. + /// + /// The key may be any borrowed form of the map's key type, but + /// [`Hash`] and [`Eq`] on the borrowed form *must* match those for + /// the key type. + /// + /// [`Eq`]: https://doc.rust-lang.org/std/cmp/trait.Eq.html + /// [`Hash`]: https://doc.rust-lang.org/std/hash/trait.Hash.html + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// # fn main() { + /// let mut map = HashMap::new(); + /// map.insert(1, "a"); + /// assert_eq!(map.remove_entry(&1), Some((1, "a"))); + /// assert_eq!(map.remove(&1), None); + /// # } + /// ``` + #[inline] + pub fn remove_entry(&mut self, k: &Q) -> Option<(K, V)> + where + K: Borrow, + Q: Hash + Eq, + { + unsafe { + let hash = make_hash(&self.hash_builder, &k); + if let Some(item) = self.table.find(hash, |x| k.eq(x.0.borrow())) { + self.table.erase_no_drop(&item); + Some(item.read()) + } else { + None + } + } + } + + /// Retains only the elements specified by the predicate. + /// + /// In other words, remove all pairs `(k, v)` such that `f(&k,&mut v)` returns `false`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap = (0..8).map(|x|(x, x*10)).collect(); + /// map.retain(|&k, _| k % 2 == 0); + /// assert_eq!(map.len(), 4); + /// ``` + pub fn retain(&mut self, mut f: F) + where + F: FnMut(&K, &mut V) -> bool, + { + // Here we only use `iter` as a temporary, preventing use-after-free + unsafe { + for item in self.table.iter() { + let &mut (ref key, ref mut value) = item.as_mut(); + if !f(key, value) { + // Erase the element from the table first since drop might panic. + self.table.erase_no_drop(&item); + item.drop(); + } + } + } + } +} + +impl HashMap +where + S: BuildHasher, +{ + /// Creates a raw entry builder for the HashMap. + /// + /// Raw entries provide the lowest level of control for searching and + /// manipulating a map. They must be manually initialized with a hash and + /// then manually searched. After this, insertions into a vacant entry + /// still require an owned key to be provided. + /// + /// Raw entries are useful for such exotic situations as: + /// + /// * Hash memoization + /// * Deferring the creation of an owned key until it is known to be required + /// * Using a search key that doesn't work with the Borrow trait + /// * Using custom comparison logic without newtype wrappers + /// + /// Because raw entries provide much more low-level control, it's much easier + /// to put the HashMap into an inconsistent state which, while memory-safe, + /// will cause the map to produce seemingly random results. Higher-level and + /// more foolproof APIs like `entry` should be preferred when possible. + /// + /// In particular, the hash used to initialized the raw entry must still be + /// consistent with the hash of the key that is ultimately stored in the entry. + /// This is because implementations of HashMap may need to recompute hashes + /// when resizing, at which point only the keys are available. + /// + /// Raw entries give mutable access to the keys. This must not be used + /// to modify how the key would compare or hash, as the map will not re-evaluate + /// where the key should go, meaning the keys may become "lost" if their + /// location does not reflect their state. For instance, if you change a key + /// so that the map now contains keys which compare equal, search may start + /// acting erratically, with two keys randomly masking each other. Implementations + /// are free to assume this doesn't happen (within the limits of memory-safety). + #[inline] + pub fn raw_entry_mut(&mut self) -> RawEntryBuilderMut<'_, K, V, S> { + RawEntryBuilderMut { map: self } + } + + /// Creates a raw immutable entry builder for the HashMap. + /// + /// Raw entries provide the lowest level of control for searching and + /// manipulating a map. They must be manually initialized with a hash and + /// then manually searched. + /// + /// This is useful for + /// * Hash memoization + /// * Using a search key that doesn't work with the Borrow trait + /// * Using custom comparison logic without newtype wrappers + /// + /// Unless you are in such a situation, higher-level and more foolproof APIs like + /// `get` should be preferred. + /// + /// Immutable raw entries have very limited use; you might instead want `raw_entry_mut`. + #[inline] + pub fn raw_entry(&self) -> RawEntryBuilder<'_, K, V, S> { + RawEntryBuilder { map: self } + } +} + +impl PartialEq for HashMap +where + K: Eq + Hash, + V: PartialEq, + S: BuildHasher, +{ + fn eq(&self, other: &Self) -> bool { + if self.len() != other.len() { + return false; + } + + self.iter() + .all(|(key, value)| other.get(key).map_or(false, |v| *value == *v)) + } +} + +impl Eq for HashMap +where + K: Eq + Hash, + V: Eq, + S: BuildHasher, +{ +} + +impl Debug for HashMap +where + K: Debug, + V: Debug, + S: BuildHasher, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_map().entries(self.iter()).finish() + } +} + +impl Default for HashMap +where + S: BuildHasher + Default, +{ + /// Creates an empty `HashMap`, with the `Default` value for the hasher. + #[inline] + fn default() -> Self { + Self::with_hasher(Default::default()) + } +} + +impl Index<&Q> for HashMap +where + K: Eq + Hash + Borrow, + Q: Eq + Hash, + S: BuildHasher, +{ + type Output = V; + + /// Returns a reference to the value corresponding to the supplied key. + /// + /// # Panics + /// + /// Panics if the key is not present in the `HashMap`. + #[inline] + fn index(&self, key: &Q) -> &V { + self.get(key).expect("no entry found for key") + } +} + +/// An iterator over the entries of a `HashMap`. +/// +/// This `struct` is created by the [`iter`] method on [`HashMap`]. See its +/// documentation for more. +/// +/// [`iter`]: struct.HashMap.html#method.iter +/// [`HashMap`]: struct.HashMap.html +pub struct Iter<'a, K, V> { + inner: RawIter<(K, V)>, + marker: PhantomData<(&'a K, &'a V)>, +} + +// FIXME(#26925) Remove in favor of `#[derive(Clone)]` +impl Clone for Iter<'_, K, V> { + #[inline] + fn clone(&self) -> Self { + Iter { + inner: self.inner.clone(), + marker: PhantomData, + } + } +} + +impl fmt::Debug for Iter<'_, K, V> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_list().entries(self.clone()).finish() + } +} + +/// A mutable iterator over the entries of a `HashMap`. +/// +/// This `struct` is created by the [`iter_mut`] method on [`HashMap`]. See its +/// documentation for more. +/// +/// [`iter_mut`]: struct.HashMap.html#method.iter_mut +/// [`HashMap`]: struct.HashMap.html +pub struct IterMut<'a, K, V> { + inner: RawIter<(K, V)>, + // To ensure invariance with respect to V + marker: PhantomData<(&'a K, &'a mut V)>, +} + +// We override the default Send impl which has K: Sync instead of K: Send. Both +// are correct, but this one is more general since it allows keys which +// implement Send but not Sync. +unsafe impl Send for IterMut<'_, K, V> {} + +impl IterMut<'_, K, V> { + /// Returns a iterator of references over the remaining items. + #[inline] + pub(super) fn iter(&self) -> Iter<'_, K, V> { + Iter { + inner: self.inner.clone(), + marker: PhantomData, + } + } +} + +/// An owning iterator over the entries of a `HashMap`. +/// +/// This `struct` is created by the [`into_iter`] method on [`HashMap`][`HashMap`] +/// (provided by the `IntoIterator` trait). See its documentation for more. +/// +/// [`into_iter`]: struct.HashMap.html#method.into_iter +/// [`HashMap`]: struct.HashMap.html +pub struct IntoIter { + inner: RawIntoIter<(K, V)>, +} + +impl IntoIter { + /// Returns a iterator of references over the remaining items. + #[inline] + pub(super) fn iter(&self) -> Iter<'_, K, V> { + Iter { + inner: self.inner.iter(), + marker: PhantomData, + } + } +} + +/// An iterator over the keys of a `HashMap`. +/// +/// This `struct` is created by the [`keys`] method on [`HashMap`]. See its +/// documentation for more. +/// +/// [`keys`]: struct.HashMap.html#method.keys +/// [`HashMap`]: struct.HashMap.html +pub struct Keys<'a, K, V> { + inner: Iter<'a, K, V>, +} + +// FIXME(#26925) Remove in favor of `#[derive(Clone)]` +impl Clone for Keys<'_, K, V> { + #[inline] + fn clone(&self) -> Self { + Keys { + inner: self.inner.clone(), + } + } +} + +impl fmt::Debug for Keys<'_, K, V> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_list().entries(self.clone()).finish() + } +} + +/// An iterator over the values of a `HashMap`. +/// +/// This `struct` is created by the [`values`] method on [`HashMap`]. See its +/// documentation for more. +/// +/// [`values`]: struct.HashMap.html#method.values +/// [`HashMap`]: struct.HashMap.html +pub struct Values<'a, K, V> { + inner: Iter<'a, K, V>, +} + +// FIXME(#26925) Remove in favor of `#[derive(Clone)]` +impl Clone for Values<'_, K, V> { + #[inline] + fn clone(&self) -> Self { + Values { + inner: self.inner.clone(), + } + } +} + +impl fmt::Debug for Values<'_, K, V> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_list().entries(self.clone()).finish() + } +} + +/// A draining iterator over the entries of a `HashMap`. +/// +/// This `struct` is created by the [`drain`] method on [`HashMap`]. See its +/// documentation for more. +/// +/// [`drain`]: struct.HashMap.html#method.drain +/// [`HashMap`]: struct.HashMap.html +pub struct Drain<'a, K, V> { + inner: RawDrain<'a, (K, V)>, +} + +impl Drain<'_, K, V> { + /// Returns a iterator of references over the remaining items. + #[inline] + pub(super) fn iter(&self) -> Iter<'_, K, V> { + Iter { + inner: self.inner.iter(), + marker: PhantomData, + } + } +} + +/// A mutable iterator over the values of a `HashMap`. +/// +/// This `struct` is created by the [`values_mut`] method on [`HashMap`]. See its +/// documentation for more. +/// +/// [`values_mut`]: struct.HashMap.html#method.values_mut +/// [`HashMap`]: struct.HashMap.html +pub struct ValuesMut<'a, K, V> { + inner: IterMut<'a, K, V>, +} + +/// A builder for computing where in a [`HashMap`] a key-value pair would be stored. +/// +/// See the [`HashMap::raw_entry_mut`] docs for usage examples. +/// +/// [`HashMap::raw_entry_mut`]: struct.HashMap.html#method.raw_entry_mut +pub struct RawEntryBuilderMut<'a, K, V, S> { + map: &'a mut HashMap, +} + +/// A view into a single entry in a map, which may either be vacant or occupied. +/// +/// This is a lower-level version of [`Entry`]. +/// +/// This `enum` is constructed from the [`raw_entry`] method on [`HashMap`]. +/// +/// [`HashMap`]: struct.HashMap.html +/// [`Entry`]: enum.Entry.html +/// [`raw_entry`]: struct.HashMap.html#method.raw_entry +pub enum RawEntryMut<'a, K: 'a, V: 'a, S: 'a> { + /// An occupied entry. + Occupied(RawOccupiedEntryMut<'a, K, V>), + /// A vacant entry. + Vacant(RawVacantEntryMut<'a, K, V, S>), +} + +/// A view into an occupied entry in a `HashMap`. +/// It is part of the [`RawEntryMut`] enum. +/// +/// [`RawEntryMut`]: enum.RawEntryMut.html +pub struct RawOccupiedEntryMut<'a, K, V> { + elem: Bucket<(K, V)>, + table: &'a mut RawTable<(K, V)>, +} + +/// A view into a vacant entry in a `HashMap`. +/// It is part of the [`RawEntryMut`] enum. +/// +/// [`RawEntryMut`]: enum.RawEntryMut.html +pub struct RawVacantEntryMut<'a, K, V, S> { + table: &'a mut RawTable<(K, V)>, + hash_builder: &'a S, +} + +/// A builder for computing where in a [`HashMap`] a key-value pair would be stored. +/// +/// See the [`HashMap::raw_entry`] docs for usage examples. +/// +/// [`HashMap::raw_entry`]: struct.HashMap.html#method.raw_entry +pub struct RawEntryBuilder<'a, K, V, S> { + map: &'a HashMap, +} + +impl<'a, K, V, S> RawEntryBuilderMut<'a, K, V, S> +where + S: BuildHasher, +{ + /// Creates a `RawEntryMut` from the given key. + #[inline] + #[allow(clippy::wrong_self_convention)] + pub fn from_key(self, k: &Q) -> RawEntryMut<'a, K, V, S> + where + K: Borrow, + Q: Hash + Eq, + { + let mut hasher = self.map.hash_builder.build_hasher(); + k.hash(&mut hasher); + self.from_key_hashed_nocheck(hasher.finish(), k) + } + + /// Creates a `RawEntryMut` from the given key and its hash. + #[inline] + #[allow(clippy::wrong_self_convention)] + pub fn from_key_hashed_nocheck(self, hash: u64, k: &Q) -> RawEntryMut<'a, K, V, S> + where + K: Borrow, + Q: Eq, + { + self.from_hash(hash, |q| q.borrow().eq(k)) + } +} + +impl<'a, K, V, S> RawEntryBuilderMut<'a, K, V, S> +where + S: BuildHasher, +{ + /// Creates a `RawEntryMut` from the given hash. + #[inline] + #[allow(clippy::wrong_self_convention)] + pub fn from_hash(self, hash: u64, is_match: F) -> RawEntryMut<'a, K, V, S> + where + for<'b> F: FnMut(&'b K) -> bool, + { + self.search(hash, is_match) + } + + #[inline] + fn search(self, hash: u64, mut is_match: F) -> RawEntryMut<'a, K, V, S> + where + for<'b> F: FnMut(&'b K) -> bool, + { + match self.map.table.find(hash, |(k, _)| is_match(k)) { + Some(elem) => RawEntryMut::Occupied(RawOccupiedEntryMut { + elem, + table: &mut self.map.table, + }), + None => RawEntryMut::Vacant(RawVacantEntryMut { + table: &mut self.map.table, + hash_builder: &self.map.hash_builder, + }), + } + } +} + +impl<'a, K, V, S> RawEntryBuilder<'a, K, V, S> +where + S: BuildHasher, +{ + /// Access an entry by key. + #[inline] + #[allow(clippy::wrong_self_convention)] + pub fn from_key(self, k: &Q) -> Option<(&'a K, &'a V)> + where + K: Borrow, + Q: Hash + Eq, + { + let mut hasher = self.map.hash_builder.build_hasher(); + k.hash(&mut hasher); + self.from_key_hashed_nocheck(hasher.finish(), k) + } + + /// Access an entry by a key and its hash. + #[inline] + #[allow(clippy::wrong_self_convention)] + pub fn from_key_hashed_nocheck(self, hash: u64, k: &Q) -> Option<(&'a K, &'a V)> + where + K: Borrow, + Q: Hash + Eq, + { + self.from_hash(hash, |q| q.borrow().eq(k)) + } + + #[inline] + fn search(self, hash: u64, mut is_match: F) -> Option<(&'a K, &'a V)> + where + F: FnMut(&K) -> bool, + { + self.map + .table + .find(hash, |(k, _)| is_match(k)) + .map(|item| unsafe { + let &(ref key, ref value) = item.as_ref(); + (key, value) + }) + } + + /// Access an entry by hash. + #[inline] + #[allow(clippy::wrong_self_convention)] + pub fn from_hash(self, hash: u64, is_match: F) -> Option<(&'a K, &'a V)> + where + F: FnMut(&K) -> bool, + { + self.search(hash, is_match) + } +} + +impl<'a, K, V, S> RawEntryMut<'a, K, V, S> { + /// Ensures a value is in the entry by inserting the default if empty, and returns + /// mutable references to the key and value in the entry. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// + /// map.raw_entry_mut().from_key("poneyland").or_insert("poneyland", 3); + /// assert_eq!(map["poneyland"], 3); + /// + /// *map.raw_entry_mut().from_key("poneyland").or_insert("poneyland", 10).1 *= 2; + /// assert_eq!(map["poneyland"], 6); + /// ``` + #[inline] + pub fn or_insert(self, default_key: K, default_val: V) -> (&'a mut K, &'a mut V) + where + K: Hash, + S: BuildHasher, + { + match self { + RawEntryMut::Occupied(entry) => entry.into_key_value(), + RawEntryMut::Vacant(entry) => entry.insert(default_key, default_val), + } + } + + /// Ensures a value is in the entry by inserting the result of the default function if empty, + /// and returns mutable references to the key and value in the entry. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap<&str, String> = HashMap::new(); + /// + /// map.raw_entry_mut().from_key("poneyland").or_insert_with(|| { + /// ("poneyland", "hoho".to_string()) + /// }); + /// + /// assert_eq!(map["poneyland"], "hoho".to_string()); + /// ``` + #[inline] + pub fn or_insert_with(self, default: F) -> (&'a mut K, &'a mut V) + where + F: FnOnce() -> (K, V), + K: Hash, + S: BuildHasher, + { + match self { + RawEntryMut::Occupied(entry) => entry.into_key_value(), + RawEntryMut::Vacant(entry) => { + let (k, v) = default(); + entry.insert(k, v) + } + } + } + + /// Provides in-place mutable access to an occupied entry before any + /// potential inserts into the map. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// + /// map.raw_entry_mut() + /// .from_key("poneyland") + /// .and_modify(|_k, v| { *v += 1 }) + /// .or_insert("poneyland", 42); + /// assert_eq!(map["poneyland"], 42); + /// + /// map.raw_entry_mut() + /// .from_key("poneyland") + /// .and_modify(|_k, v| { *v += 1 }) + /// .or_insert("poneyland", 0); + /// assert_eq!(map["poneyland"], 43); + /// ``` + #[inline] + pub fn and_modify(self, f: F) -> Self + where + F: FnOnce(&mut K, &mut V), + { + match self { + RawEntryMut::Occupied(mut entry) => { + { + let (k, v) = entry.get_key_value_mut(); + f(k, v); + } + RawEntryMut::Occupied(entry) + } + RawEntryMut::Vacant(entry) => RawEntryMut::Vacant(entry), + } + } +} + +impl<'a, K, V> RawOccupiedEntryMut<'a, K, V> { + /// Gets a reference to the key in the entry. + #[inline] + pub fn key(&self) -> &K { + unsafe { &self.elem.as_ref().0 } + } + + /// Gets a mutable reference to the key in the entry. + #[inline] + pub fn key_mut(&mut self) -> &mut K { + unsafe { &mut self.elem.as_mut().0 } + } + + /// Converts the entry into a mutable reference to the key in the entry + /// with a lifetime bound to the map itself. + #[inline] + pub fn into_key(self) -> &'a mut K { + unsafe { &mut self.elem.as_mut().0 } + } + + /// Gets a reference to the value in the entry. + #[inline] + pub fn get(&self) -> &V { + unsafe { &self.elem.as_ref().1 } + } + + /// Converts the OccupiedEntry into a mutable reference to the value in the entry + /// with a lifetime bound to the map itself. + #[inline] + pub fn into_mut(self) -> &'a mut V { + unsafe { &mut self.elem.as_mut().1 } + } + + /// Gets a mutable reference to the value in the entry. + #[inline] + pub fn get_mut(&mut self) -> &mut V { + unsafe { &mut self.elem.as_mut().1 } + } + + /// Gets a reference to the key and value in the entry. + #[inline] + pub fn get_key_value(&mut self) -> (&K, &V) { + unsafe { + let &(ref key, ref value) = self.elem.as_ref(); + (key, value) + } + } + + /// Gets a mutable reference to the key and value in the entry. + #[inline] + pub fn get_key_value_mut(&mut self) -> (&mut K, &mut V) { + unsafe { + let &mut (ref mut key, ref mut value) = self.elem.as_mut(); + (key, value) + } + } + + /// Converts the OccupiedEntry into a mutable reference to the key and value in the entry + /// with a lifetime bound to the map itself. + #[inline] + pub fn into_key_value(self) -> (&'a mut K, &'a mut V) { + unsafe { + let &mut (ref mut key, ref mut value) = self.elem.as_mut(); + (key, value) + } + } + + /// Sets the value of the entry, and returns the entry's old value. + #[inline] + pub fn insert(&mut self, value: V) -> V { + mem::replace(self.get_mut(), value) + } + + /// Sets the value of the entry, and returns the entry's old value. + #[inline] + pub fn insert_key(&mut self, key: K) -> K { + mem::replace(self.key_mut(), key) + } + + /// Takes the value out of the entry, and returns it. + #[inline] + pub fn remove(self) -> V { + self.remove_entry().1 + } + + /// Take the ownership of the key and value from the map. + #[inline] + pub fn remove_entry(self) -> (K, V) { + unsafe { + self.table.erase_no_drop(&self.elem); + self.elem.read() + } + } +} + +impl<'a, K, V, S> RawVacantEntryMut<'a, K, V, S> { + /// Sets the value of the entry with the VacantEntry's key, + /// and returns a mutable reference to it. + #[inline] + pub fn insert(self, key: K, value: V) -> (&'a mut K, &'a mut V) + where + K: Hash, + S: BuildHasher, + { + let mut hasher = self.hash_builder.build_hasher(); + key.hash(&mut hasher); + self.insert_hashed_nocheck(hasher.finish(), key, value) + } + + /// Sets the value of the entry with the VacantEntry's key, + /// and returns a mutable reference to it. + #[inline] + #[allow(clippy::shadow_unrelated)] + pub fn insert_hashed_nocheck(self, hash: u64, key: K, value: V) -> (&'a mut K, &'a mut V) + where + K: Hash, + S: BuildHasher, + { + let hash_builder = self.hash_builder; + self.insert_with_hasher(hash, key, value, |k| make_hash(hash_builder, k)) + } + + /// Set the value of an entry with a custom hasher function. + #[inline] + pub fn insert_with_hasher( + self, + hash: u64, + key: K, + value: V, + hasher: H, + ) -> (&'a mut K, &'a mut V) + where + S: BuildHasher, + H: Fn(&K) -> u64, + { + unsafe { + let elem = self.table.insert(hash, (key, value), |x| hasher(&x.0)); + let &mut (ref mut k, ref mut v) = elem.as_mut(); + (k, v) + } + } +} + +impl Debug for RawEntryBuilderMut<'_, K, V, S> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("RawEntryBuilder").finish() + } +} + +impl Debug for RawEntryMut<'_, K, V, S> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match *self { + RawEntryMut::Vacant(ref v) => f.debug_tuple("RawEntry").field(v).finish(), + RawEntryMut::Occupied(ref o) => f.debug_tuple("RawEntry").field(o).finish(), + } + } +} + +impl Debug for RawOccupiedEntryMut<'_, K, V> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("RawOccupiedEntryMut") + .field("key", self.key()) + .field("value", self.get()) + .finish() + } +} + +impl Debug for RawVacantEntryMut<'_, K, V, S> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("RawVacantEntryMut").finish() + } +} + +impl Debug for RawEntryBuilder<'_, K, V, S> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("RawEntryBuilder").finish() + } +} + +/// A view into a single entry in a map, which may either be vacant or occupied. +/// +/// This `enum` is constructed from the [`entry`] method on [`HashMap`]. +/// +/// [`HashMap`]: struct.HashMap.html +/// [`entry`]: struct.HashMap.html#method.entry +pub enum Entry<'a, K: 'a, V: 'a, S: 'a> { + /// An occupied entry. + Occupied(OccupiedEntry<'a, K, V, S>), + + /// A vacant entry. + Vacant(VacantEntry<'a, K, V, S>), +} + +impl Debug for Entry<'_, K, V, S> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match *self { + Entry::Vacant(ref v) => f.debug_tuple("Entry").field(v).finish(), + Entry::Occupied(ref o) => f.debug_tuple("Entry").field(o).finish(), + } + } +} + +/// A view into an occupied entry in a `HashMap`. +/// It is part of the [`Entry`] enum. +/// +/// [`Entry`]: enum.Entry.html +pub struct OccupiedEntry<'a, K, V, S> { + key: Option, + elem: Bucket<(K, V)>, + table: &'a mut HashMap, +} + +unsafe impl Send for OccupiedEntry<'_, K, V, S> +where + K: Send, + V: Send, + S: Send, +{ +} +unsafe impl Sync for OccupiedEntry<'_, K, V, S> +where + K: Sync, + V: Sync, + S: Sync, +{ +} + +impl Debug for OccupiedEntry<'_, K, V, S> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("OccupiedEntry") + .field("key", self.key()) + .field("value", self.get()) + .finish() + } +} + +/// A view into a vacant entry in a `HashMap`. +/// It is part of the [`Entry`] enum. +/// +/// [`Entry`]: enum.Entry.html +pub struct VacantEntry<'a, K, V, S> { + hash: u64, + key: K, + table: &'a mut HashMap, +} + +impl Debug for VacantEntry<'_, K, V, S> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_tuple("VacantEntry").field(self.key()).finish() + } +} + +impl<'a, K, V, S> IntoIterator for &'a HashMap { + type Item = (&'a K, &'a V); + type IntoIter = Iter<'a, K, V>; + + #[inline] + fn into_iter(self) -> Iter<'a, K, V> { + self.iter() + } +} + +impl<'a, K, V, S> IntoIterator for &'a mut HashMap { + type Item = (&'a K, &'a mut V); + type IntoIter = IterMut<'a, K, V>; + + #[inline] + fn into_iter(self) -> IterMut<'a, K, V> { + self.iter_mut() + } +} + +impl IntoIterator for HashMap { + type Item = (K, V); + type IntoIter = IntoIter; + + /// Creates a consuming iterator, that is, one that moves each key-value + /// pair out of the map in arbitrary order. The map cannot be used after + /// calling this. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map = HashMap::new(); + /// map.insert("a", 1); + /// map.insert("b", 2); + /// map.insert("c", 3); + /// + /// // Not possible with .iter() + /// let vec: Vec<(&str, i32)> = map.into_iter().collect(); + /// ``` + #[inline] + fn into_iter(self) -> IntoIter { + IntoIter { + inner: self.table.into_iter(), + } + } +} + +impl<'a, K, V> Iterator for Iter<'a, K, V> { + type Item = (&'a K, &'a V); + + #[inline] + fn next(&mut self) -> Option<(&'a K, &'a V)> { + self.inner.next().map(|x| unsafe { + let r = x.as_ref(); + (&r.0, &r.1) + }) + } + #[inline] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } +} +impl ExactSizeIterator for Iter<'_, K, V> { + #[inline] + fn len(&self) -> usize { + self.inner.len() + } +} + +impl FusedIterator for Iter<'_, K, V> {} + +impl<'a, K, V> Iterator for IterMut<'a, K, V> { + type Item = (&'a K, &'a mut V); + + #[inline] + fn next(&mut self) -> Option<(&'a K, &'a mut V)> { + self.inner.next().map(|x| unsafe { + let r = x.as_mut(); + (&r.0, &mut r.1) + }) + } + #[inline] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } +} +impl ExactSizeIterator for IterMut<'_, K, V> { + #[inline] + fn len(&self) -> usize { + self.inner.len() + } +} +impl FusedIterator for IterMut<'_, K, V> {} + +impl fmt::Debug for IterMut<'_, K, V> +where + K: fmt::Debug, + V: fmt::Debug, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_list().entries(self.iter()).finish() + } +} + +impl Iterator for IntoIter { + type Item = (K, V); + + #[inline] + fn next(&mut self) -> Option<(K, V)> { + self.inner.next() + } + #[inline] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } +} +impl ExactSizeIterator for IntoIter { + #[inline] + fn len(&self) -> usize { + self.inner.len() + } +} +impl FusedIterator for IntoIter {} + +impl fmt::Debug for IntoIter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_list().entries(self.iter()).finish() + } +} + +impl<'a, K, V> Iterator for Keys<'a, K, V> { + type Item = &'a K; + + #[inline] + fn next(&mut self) -> Option<(&'a K)> { + self.inner.next().map(|(k, _)| k) + } + #[inline] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } +} +impl ExactSizeIterator for Keys<'_, K, V> { + #[inline] + fn len(&self) -> usize { + self.inner.len() + } +} +impl FusedIterator for Keys<'_, K, V> {} + +impl<'a, K, V> Iterator for Values<'a, K, V> { + type Item = &'a V; + + #[inline] + fn next(&mut self) -> Option<(&'a V)> { + self.inner.next().map(|(_, v)| v) + } + #[inline] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } +} +impl ExactSizeIterator for Values<'_, K, V> { + #[inline] + fn len(&self) -> usize { + self.inner.len() + } +} +impl FusedIterator for Values<'_, K, V> {} + +impl<'a, K, V> Iterator for ValuesMut<'a, K, V> { + type Item = &'a mut V; + + #[inline] + fn next(&mut self) -> Option<(&'a mut V)> { + self.inner.next().map(|(_, v)| v) + } + #[inline] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } +} +impl ExactSizeIterator for ValuesMut<'_, K, V> { + #[inline] + fn len(&self) -> usize { + self.inner.len() + } +} +impl FusedIterator for ValuesMut<'_, K, V> {} + +impl fmt::Debug for ValuesMut<'_, K, V> +where + K: fmt::Debug, + V: fmt::Debug, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_list().entries(self.inner.iter()).finish() + } +} + +impl<'a, K, V> Iterator for Drain<'a, K, V> { + type Item = (K, V); + + #[inline] + fn next(&mut self) -> Option<(K, V)> { + self.inner.next() + } + #[inline] + fn size_hint(&self) -> (usize, Option) { + self.inner.size_hint() + } +} +impl ExactSizeIterator for Drain<'_, K, V> { + #[inline] + fn len(&self) -> usize { + self.inner.len() + } +} +impl FusedIterator for Drain<'_, K, V> {} + +impl fmt::Debug for Drain<'_, K, V> +where + K: fmt::Debug, + V: fmt::Debug, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_list().entries(self.iter()).finish() + } +} + +impl<'a, K, V, S> Entry<'a, K, V, S> { + /// Ensures a value is in the entry by inserting the default if empty, and returns + /// a mutable reference to the value in the entry. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// + /// map.entry("poneyland").or_insert(3); + /// assert_eq!(map["poneyland"], 3); + /// + /// *map.entry("poneyland").or_insert(10) *= 2; + /// assert_eq!(map["poneyland"], 6); + /// ``` + #[inline] + pub fn or_insert(self, default: V) -> &'a mut V + where + K: Hash, + S: BuildHasher, + { + match self { + Entry::Occupied(entry) => entry.into_mut(), + Entry::Vacant(entry) => entry.insert(default), + } + } + + /// Ensures a value is in the entry by inserting the result of the default function if empty, + /// and returns a mutable reference to the value in the entry. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap<&str, String> = HashMap::new(); + /// let s = "hoho".to_string(); + /// + /// map.entry("poneyland").or_insert_with(|| s); + /// + /// assert_eq!(map["poneyland"], "hoho".to_string()); + /// ``` + #[inline] + pub fn or_insert_with V>(self, default: F) -> &'a mut V + where + K: Hash, + S: BuildHasher, + { + match self { + Entry::Occupied(entry) => entry.into_mut(), + Entry::Vacant(entry) => entry.insert(default()), + } + } + + /// Returns a reference to this entry's key. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// assert_eq!(map.entry("poneyland").key(), &"poneyland"); + /// ``` + #[inline] + pub fn key(&self) -> &K { + match *self { + Entry::Occupied(ref entry) => entry.key(), + Entry::Vacant(ref entry) => entry.key(), + } + } + + /// Provides in-place mutable access to an occupied entry before any + /// potential inserts into the map. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// + /// map.entry("poneyland") + /// .and_modify(|e| { *e += 1 }) + /// .or_insert(42); + /// assert_eq!(map["poneyland"], 42); + /// + /// map.entry("poneyland") + /// .and_modify(|e| { *e += 1 }) + /// .or_insert(42); + /// assert_eq!(map["poneyland"], 43); + /// ``` + #[inline] + pub fn and_modify(self, f: F) -> Self + where + F: FnOnce(&mut V), + { + match self { + Entry::Occupied(mut entry) => { + f(entry.get_mut()); + Entry::Occupied(entry) + } + Entry::Vacant(entry) => Entry::Vacant(entry), + } + } +} + +impl<'a, K, V: Default, S> Entry<'a, K, V, S> { + /// Ensures a value is in the entry by inserting the default value if empty, + /// and returns a mutable reference to the value in the entry. + /// + /// # Examples + /// + /// ``` + /// # fn main() { + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap<&str, Option> = HashMap::new(); + /// map.entry("poneyland").or_default(); + /// + /// assert_eq!(map["poneyland"], None); + /// # } + /// ``` + #[inline] + pub fn or_default(self) -> &'a mut V + where + K: Hash, + S: BuildHasher, + { + match self { + Entry::Occupied(entry) => entry.into_mut(), + Entry::Vacant(entry) => entry.insert(Default::default()), + } + } +} + +impl<'a, K, V, S> OccupiedEntry<'a, K, V, S> { + /// Gets a reference to the key in the entry. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// map.entry("poneyland").or_insert(12); + /// assert_eq!(map.entry("poneyland").key(), &"poneyland"); + /// ``` + #[inline] + pub fn key(&self) -> &K { + unsafe { &self.elem.as_ref().0 } + } + + /// Take the ownership of the key and value from the map. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::Entry; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// map.entry("poneyland").or_insert(12); + /// + /// if let Entry::Occupied(o) = map.entry("poneyland") { + /// // We delete the entry from the map. + /// o.remove_entry(); + /// } + /// + /// assert_eq!(map.contains_key("poneyland"), false); + /// ``` + #[inline] + pub fn remove_entry(self) -> (K, V) { + unsafe { + self.table.table.erase_no_drop(&self.elem); + self.elem.read() + } + } + + /// Gets a reference to the value in the entry. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::Entry; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// map.entry("poneyland").or_insert(12); + /// + /// if let Entry::Occupied(o) = map.entry("poneyland") { + /// assert_eq!(o.get(), &12); + /// } + /// ``` + #[inline] + pub fn get(&self) -> &V { + unsafe { &self.elem.as_ref().1 } + } + + /// Gets a mutable reference to the value in the entry. + /// + /// If you need a reference to the `OccupiedEntry` which may outlive the + /// destruction of the `Entry` value, see [`into_mut`]. + /// + /// [`into_mut`]: #method.into_mut + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::Entry; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// map.entry("poneyland").or_insert(12); + /// + /// assert_eq!(map["poneyland"], 12); + /// if let Entry::Occupied(mut o) = map.entry("poneyland") { + /// *o.get_mut() += 10; + /// assert_eq!(*o.get(), 22); + /// + /// // We can use the same Entry multiple times. + /// *o.get_mut() += 2; + /// } + /// + /// assert_eq!(map["poneyland"], 24); + /// ``` + #[inline] + pub fn get_mut(&mut self) -> &mut V { + unsafe { &mut self.elem.as_mut().1 } + } + + /// Converts the OccupiedEntry into a mutable reference to the value in the entry + /// with a lifetime bound to the map itself. + /// + /// If you need multiple references to the `OccupiedEntry`, see [`get_mut`]. + /// + /// [`get_mut`]: #method.get_mut + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::Entry; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// map.entry("poneyland").or_insert(12); + /// + /// assert_eq!(map["poneyland"], 12); + /// if let Entry::Occupied(o) = map.entry("poneyland") { + /// *o.into_mut() += 10; + /// } + /// + /// assert_eq!(map["poneyland"], 22); + /// ``` + #[inline] + pub fn into_mut(self) -> &'a mut V { + unsafe { &mut self.elem.as_mut().1 } + } + + /// Sets the value of the entry, and returns the entry's old value. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::Entry; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// map.entry("poneyland").or_insert(12); + /// + /// if let Entry::Occupied(mut o) = map.entry("poneyland") { + /// assert_eq!(o.insert(15), 12); + /// } + /// + /// assert_eq!(map["poneyland"], 15); + /// ``` + #[inline] + pub fn insert(&mut self, mut value: V) -> V { + let old_value = self.get_mut(); + mem::swap(&mut value, old_value); + value + } + + /// Takes the value out of the entry, and returns it. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::Entry; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// map.entry("poneyland").or_insert(12); + /// + /// if let Entry::Occupied(o) = map.entry("poneyland") { + /// assert_eq!(o.remove(), 12); + /// } + /// + /// assert_eq!(map.contains_key("poneyland"), false); + /// ``` + #[inline] + pub fn remove(self) -> V { + self.remove_entry().1 + } + + /// Replaces the entry, returning the old key and value. The new key in the hash map will be + /// the key used to create this entry. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::hash_map::{Entry, HashMap}; + /// use std::rc::Rc; + /// + /// let mut map: HashMap, u32> = HashMap::new(); + /// map.insert(Rc::new("Stringthing".to_string()), 15); + /// + /// let my_key = Rc::new("Stringthing".to_string()); + /// + /// if let Entry::Occupied(entry) = map.entry(my_key) { + /// // Also replace the key with a handle to our other key. + /// let (old_key, old_value): (Rc, u32) = entry.replace_entry(16); + /// } + /// + /// ``` + #[inline] + pub fn replace_entry(self, value: V) -> (K, V) { + let entry = unsafe { self.elem.as_mut() }; + + let old_key = mem::replace(&mut entry.0, self.key.unwrap()); + let old_value = mem::replace(&mut entry.1, value); + + (old_key, old_value) + } + + /// Replaces the key in the hash map with the key used to create this entry. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::hash_map::{Entry, HashMap}; + /// use std::rc::Rc; + /// + /// let mut map: HashMap, u32> = HashMap::new(); + /// let mut known_strings: Vec> = Vec::new(); + /// + /// // Initialise known strings, run program, etc. + /// + /// reclaim_memory(&mut map, &known_strings); + /// + /// fn reclaim_memory(map: &mut HashMap, u32>, known_strings: &[Rc] ) { + /// for s in known_strings { + /// if let Entry::Occupied(entry) = map.entry(s.clone()) { + /// // Replaces the entry's key with our version of it in `known_strings`. + /// entry.replace_key(); + /// } + /// } + /// } + /// ``` + #[inline] + pub fn replace_key(self) -> K { + let entry = unsafe { self.elem.as_mut() }; + mem::replace(&mut entry.0, self.key.unwrap()) + } +} + +impl<'a, K, V, S> VacantEntry<'a, K, V, S> { + /// Gets a reference to the key that would be used when inserting a value + /// through the `VacantEntry`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// assert_eq!(map.entry("poneyland").key(), &"poneyland"); + /// ``` + #[inline] + pub fn key(&self) -> &K { + &self.key + } + + /// Take ownership of the key. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::Entry; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// + /// if let Entry::Vacant(v) = map.entry("poneyland") { + /// v.into_key(); + /// } + /// ``` + #[inline] + pub fn into_key(self) -> K { + self.key + } + + /// Sets the value of the entry with the VacantEntry's key, + /// and returns a mutable reference to it. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::Entry; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// + /// if let Entry::Vacant(o) = map.entry("poneyland") { + /// o.insert(37); + /// } + /// assert_eq!(map["poneyland"], 37); + /// ``` + #[inline] + pub fn insert(self, value: V) -> &'a mut V + where + K: Hash, + S: BuildHasher, + { + let hash_builder = &self.table.hash_builder; + let bucket = self.table.table.insert(self.hash, (self.key, value), |x| { + make_hash(hash_builder, &x.0) + }); + unsafe { &mut bucket.as_mut().1 } + } +} + +impl FromIterator<(K, V)> for HashMap +where + K: Eq + Hash, + S: BuildHasher + Default, +{ + #[inline] + fn from_iter>(iter: T) -> Self { + let iter = iter.into_iter(); + let mut map = Self::with_capacity_and_hasher(iter.size_hint().0, S::default()); + iter.for_each(|(k, v)| { + map.insert(k, v); + }); + map + } +} + +impl Extend<(K, V)> for HashMap +where + K: Eq + Hash, + S: BuildHasher, +{ + #[inline] + fn extend>(&mut self, iter: T) { + // Keys may be already present or show multiple times in the iterator. + // Reserve the entire hint lower bound if the map is empty. + // Otherwise reserve half the hint (rounded up), so the map + // will only resize twice in the worst case. + let iter = iter.into_iter(); + let reserve = if self.is_empty() { + iter.size_hint().0 + } else { + (iter.size_hint().0 + 1) / 2 + }; + self.reserve(reserve); + iter.for_each(move |(k, v)| { + self.insert(k, v); + }); + } +} + +impl<'a, K, V, S> Extend<(&'a K, &'a V)> for HashMap +where + K: Eq + Hash + Copy, + V: Copy, + S: BuildHasher, +{ + #[inline] + fn extend>(&mut self, iter: T) { + self.extend(iter.into_iter().map(|(&key, &value)| (key, value))); + } +} + +#[allow(dead_code)] +fn assert_covariance() { + fn map_key<'new>(v: HashMap<&'static str, u8>) -> HashMap<&'new str, u8> { + v + } + fn map_val<'new>(v: HashMap) -> HashMap { + v + } + fn iter_key<'a, 'new>(v: Iter<'a, &'static str, u8>) -> Iter<'a, &'new str, u8> { + v + } + fn iter_val<'a, 'new>(v: Iter<'a, u8, &'static str>) -> Iter<'a, u8, &'new str> { + v + } + fn into_iter_key<'new>(v: IntoIter<&'static str, u8>) -> IntoIter<&'new str, u8> { + v + } + fn into_iter_val<'new>(v: IntoIter) -> IntoIter { + v + } + fn keys_key<'a, 'new>(v: Keys<'a, &'static str, u8>) -> Keys<'a, &'new str, u8> { + v + } + fn keys_val<'a, 'new>(v: Keys<'a, u8, &'static str>) -> Keys<'a, u8, &'new str> { + v + } + fn values_key<'a, 'new>(v: Values<'a, &'static str, u8>) -> Values<'a, &'new str, u8> { + v + } + fn values_val<'a, 'new>(v: Values<'a, u8, &'static str>) -> Values<'a, u8, &'new str> { + v + } + fn drain<'new>( + d: Drain<'static, &'static str, &'static str>, + ) -> Drain<'new, &'new str, &'new str> { + d + } +} + +#[cfg(test)] +mod test_map { + use super::DefaultHashBuilder; + use super::Entry::{Occupied, Vacant}; + use super::{HashMap, RawEntryMut}; + #[cfg(not(miri))] + use crate::CollectionAllocErr::*; + use rand::{rngs::SmallRng, Rng, SeedableRng}; + use std::cell::RefCell; + use std::usize; + use std::vec::Vec; + + #[test] + fn test_zero_capacities() { + type HM = HashMap; + + let m = HM::new(); + assert_eq!(m.capacity(), 0); + + let m = HM::default(); + assert_eq!(m.capacity(), 0); + + let m = HM::with_hasher(DefaultHashBuilder::default()); + assert_eq!(m.capacity(), 0); + + let m = HM::with_capacity(0); + assert_eq!(m.capacity(), 0); + + let m = HM::with_capacity_and_hasher(0, DefaultHashBuilder::default()); + assert_eq!(m.capacity(), 0); + + let mut m = HM::new(); + m.insert(1, 1); + m.insert(2, 2); + m.remove(&1); + m.remove(&2); + m.shrink_to_fit(); + assert_eq!(m.capacity(), 0); + + let mut m = HM::new(); + m.reserve(0); + assert_eq!(m.capacity(), 0); + } + + #[test] + fn test_create_capacity_zero() { + let mut m = HashMap::with_capacity(0); + + assert!(m.insert(1, 1).is_none()); + + assert!(m.contains_key(&1)); + assert!(!m.contains_key(&0)); + } + + #[test] + fn test_insert() { + let mut m = HashMap::new(); + assert_eq!(m.len(), 0); + assert!(m.insert(1, 2).is_none()); + assert_eq!(m.len(), 1); + assert!(m.insert(2, 4).is_none()); + assert_eq!(m.len(), 2); + assert_eq!(*m.get(&1).unwrap(), 2); + assert_eq!(*m.get(&2).unwrap(), 4); + } + + #[test] + fn test_clone() { + let mut m = HashMap::new(); + assert_eq!(m.len(), 0); + assert!(m.insert(1, 2).is_none()); + assert_eq!(m.len(), 1); + assert!(m.insert(2, 4).is_none()); + assert_eq!(m.len(), 2); + let m2 = m.clone(); + assert_eq!(*m2.get(&1).unwrap(), 2); + assert_eq!(*m2.get(&2).unwrap(), 4); + assert_eq!(m2.len(), 2); + } + + thread_local! { static DROP_VECTOR: RefCell> = RefCell::new(Vec::new()) } + + #[derive(Hash, PartialEq, Eq)] + struct Droppable { + k: usize, + } + + impl Droppable { + fn new(k: usize) -> Droppable { + DROP_VECTOR.with(|slot| { + slot.borrow_mut()[k] += 1; + }); + + Droppable { k } + } + } + + impl Drop for Droppable { + fn drop(&mut self) { + DROP_VECTOR.with(|slot| { + slot.borrow_mut()[self.k] -= 1; + }); + } + } + + impl Clone for Droppable { + fn clone(&self) -> Self { + Droppable::new(self.k) + } + } + + #[test] + fn test_drops() { + DROP_VECTOR.with(|slot| { + *slot.borrow_mut() = vec![0; 200]; + }); + + { + let mut m = HashMap::new(); + + DROP_VECTOR.with(|v| { + for i in 0..200 { + assert_eq!(v.borrow()[i], 0); + } + }); + + for i in 0..100 { + let d1 = Droppable::new(i); + let d2 = Droppable::new(i + 100); + m.insert(d1, d2); + } + + DROP_VECTOR.with(|v| { + for i in 0..200 { + assert_eq!(v.borrow()[i], 1); + } + }); + + for i in 0..50 { + let k = Droppable::new(i); + let v = m.remove(&k); + + assert!(v.is_some()); + + DROP_VECTOR.with(|v| { + assert_eq!(v.borrow()[i], 1); + assert_eq!(v.borrow()[i + 100], 1); + }); + } + + DROP_VECTOR.with(|v| { + for i in 0..50 { + assert_eq!(v.borrow()[i], 0); + assert_eq!(v.borrow()[i + 100], 0); + } + + for i in 50..100 { + assert_eq!(v.borrow()[i], 1); + assert_eq!(v.borrow()[i + 100], 1); + } + }); + } + + DROP_VECTOR.with(|v| { + for i in 0..200 { + assert_eq!(v.borrow()[i], 0); + } + }); + } + + #[test] + fn test_into_iter_drops() { + DROP_VECTOR.with(|v| { + *v.borrow_mut() = vec![0; 200]; + }); + + let hm = { + let mut hm = HashMap::new(); + + DROP_VECTOR.with(|v| { + for i in 0..200 { + assert_eq!(v.borrow()[i], 0); + } + }); + + for i in 0..100 { + let d1 = Droppable::new(i); + let d2 = Droppable::new(i + 100); + hm.insert(d1, d2); + } + + DROP_VECTOR.with(|v| { + for i in 0..200 { + assert_eq!(v.borrow()[i], 1); + } + }); + + hm + }; + + // By the way, ensure that cloning doesn't screw up the dropping. + drop(hm.clone()); + + { + let mut half = hm.into_iter().take(50); + + DROP_VECTOR.with(|v| { + for i in 0..200 { + assert_eq!(v.borrow()[i], 1); + } + }); + + for _ in half.by_ref() {} + + DROP_VECTOR.with(|v| { + let nk = (0..100).filter(|&i| v.borrow()[i] == 1).count(); + + let nv = (0..100).filter(|&i| v.borrow()[i + 100] == 1).count(); + + assert_eq!(nk, 50); + assert_eq!(nv, 50); + }); + }; + + DROP_VECTOR.with(|v| { + for i in 0..200 { + assert_eq!(v.borrow()[i], 0); + } + }); + } + + #[test] + fn test_empty_remove() { + let mut m: HashMap = HashMap::new(); + assert_eq!(m.remove(&0), None); + } + + #[test] + fn test_empty_entry() { + let mut m: HashMap = HashMap::new(); + match m.entry(0) { + Occupied(_) => panic!(), + Vacant(_) => {} + } + assert!(*m.entry(0).or_insert(true)); + assert_eq!(m.len(), 1); + } + + #[test] + fn test_empty_iter() { + let mut m: HashMap = HashMap::new(); + assert_eq!(m.drain().next(), None); + assert_eq!(m.keys().next(), None); + assert_eq!(m.values().next(), None); + assert_eq!(m.values_mut().next(), None); + assert_eq!(m.iter().next(), None); + assert_eq!(m.iter_mut().next(), None); + assert_eq!(m.len(), 0); + assert!(m.is_empty()); + assert_eq!(m.into_iter().next(), None); + } + + #[test] + #[cfg(not(miri))] // FIXME: https://github.com/rust-lang/miri/issues/654 + fn test_lots_of_insertions() { + let mut m = HashMap::new(); + + // Try this a few times to make sure we never screw up the hashmap's + // internal state. + for _ in 0..10 { + assert!(m.is_empty()); + + for i in 1..1001 { + assert!(m.insert(i, i).is_none()); + + for j in 1..=i { + let r = m.get(&j); + assert_eq!(r, Some(&j)); + } + + for j in i + 1..1001 { + let r = m.get(&j); + assert_eq!(r, None); + } + } + + for i in 1001..2001 { + assert!(!m.contains_key(&i)); + } + + // remove forwards + for i in 1..1001 { + assert!(m.remove(&i).is_some()); + + for j in 1..=i { + assert!(!m.contains_key(&j)); + } + + for j in i + 1..1001 { + assert!(m.contains_key(&j)); + } + } + + for i in 1..1001 { + assert!(!m.contains_key(&i)); + } + + for i in 1..1001 { + assert!(m.insert(i, i).is_none()); + } + + // remove backwards + for i in (1..1001).rev() { + assert!(m.remove(&i).is_some()); + + for j in i..1001 { + assert!(!m.contains_key(&j)); + } + + for j in 1..i { + assert!(m.contains_key(&j)); + } + } + } + } + + #[test] + fn test_find_mut() { + let mut m = HashMap::new(); + assert!(m.insert(1, 12).is_none()); + assert!(m.insert(2, 8).is_none()); + assert!(m.insert(5, 14).is_none()); + let new = 100; + match m.get_mut(&5) { + None => panic!(), + Some(x) => *x = new, + } + assert_eq!(m.get(&5), Some(&new)); + } + + #[test] + fn test_insert_overwrite() { + let mut m = HashMap::new(); + assert!(m.insert(1, 2).is_none()); + assert_eq!(*m.get(&1).unwrap(), 2); + assert!(!m.insert(1, 3).is_none()); + assert_eq!(*m.get(&1).unwrap(), 3); + } + + #[test] + fn test_insert_conflicts() { + let mut m = HashMap::with_capacity(4); + assert!(m.insert(1, 2).is_none()); + assert!(m.insert(5, 3).is_none()); + assert!(m.insert(9, 4).is_none()); + assert_eq!(*m.get(&9).unwrap(), 4); + assert_eq!(*m.get(&5).unwrap(), 3); + assert_eq!(*m.get(&1).unwrap(), 2); + } + + #[test] + fn test_conflict_remove() { + let mut m = HashMap::with_capacity(4); + assert!(m.insert(1, 2).is_none()); + assert_eq!(*m.get(&1).unwrap(), 2); + assert!(m.insert(5, 3).is_none()); + assert_eq!(*m.get(&1).unwrap(), 2); + assert_eq!(*m.get(&5).unwrap(), 3); + assert!(m.insert(9, 4).is_none()); + assert_eq!(*m.get(&1).unwrap(), 2); + assert_eq!(*m.get(&5).unwrap(), 3); + assert_eq!(*m.get(&9).unwrap(), 4); + assert!(m.remove(&1).is_some()); + assert_eq!(*m.get(&9).unwrap(), 4); + assert_eq!(*m.get(&5).unwrap(), 3); + } + + #[test] + fn test_is_empty() { + let mut m = HashMap::with_capacity(4); + assert!(m.insert(1, 2).is_none()); + assert!(!m.is_empty()); + assert!(m.remove(&1).is_some()); + assert!(m.is_empty()); + } + + #[test] + fn test_remove() { + let mut m = HashMap::new(); + m.insert(1, 2); + assert_eq!(m.remove(&1), Some(2)); + assert_eq!(m.remove(&1), None); + } + + #[test] + fn test_remove_entry() { + let mut m = HashMap::new(); + m.insert(1, 2); + assert_eq!(m.remove_entry(&1), Some((1, 2))); + assert_eq!(m.remove(&1), None); + } + + #[test] + fn test_iterate() { + let mut m = HashMap::with_capacity(4); + for i in 0..32 { + assert!(m.insert(i, i * 2).is_none()); + } + assert_eq!(m.len(), 32); + + let mut observed: u32 = 0; + + for (k, v) in &m { + assert_eq!(*v, *k * 2); + observed |= 1 << *k; + } + assert_eq!(observed, 0xFFFF_FFFF); + } + + #[test] + fn test_keys() { + let vec = vec![(1, 'a'), (2, 'b'), (3, 'c')]; + let map: HashMap<_, _> = vec.into_iter().collect(); + let keys: Vec<_> = map.keys().cloned().collect(); + assert_eq!(keys.len(), 3); + assert!(keys.contains(&1)); + assert!(keys.contains(&2)); + assert!(keys.contains(&3)); + } + + #[test] + fn test_values() { + let vec = vec![(1, 'a'), (2, 'b'), (3, 'c')]; + let map: HashMap<_, _> = vec.into_iter().collect(); + let values: Vec<_> = map.values().cloned().collect(); + assert_eq!(values.len(), 3); + assert!(values.contains(&'a')); + assert!(values.contains(&'b')); + assert!(values.contains(&'c')); + } + + #[test] + fn test_values_mut() { + let vec = vec![(1, 1), (2, 2), (3, 3)]; + let mut map: HashMap<_, _> = vec.into_iter().collect(); + for value in map.values_mut() { + *value = (*value) * 2 + } + let values: Vec<_> = map.values().cloned().collect(); + assert_eq!(values.len(), 3); + assert!(values.contains(&2)); + assert!(values.contains(&4)); + assert!(values.contains(&6)); + } + + #[test] + fn test_find() { + let mut m = HashMap::new(); + assert!(m.get(&1).is_none()); + m.insert(1, 2); + match m.get(&1) { + None => panic!(), + Some(v) => assert_eq!(*v, 2), + } + } + + #[test] + fn test_eq() { + let mut m1 = HashMap::new(); + m1.insert(1, 2); + m1.insert(2, 3); + m1.insert(3, 4); + + let mut m2 = HashMap::new(); + m2.insert(1, 2); + m2.insert(2, 3); + + assert!(m1 != m2); + + m2.insert(3, 4); + + assert_eq!(m1, m2); + } + + #[test] + fn test_show() { + let mut map = HashMap::new(); + let empty: HashMap = HashMap::new(); + + map.insert(1, 2); + map.insert(3, 4); + + let map_str = format!("{:?}", map); + + assert!(map_str == "{1: 2, 3: 4}" || map_str == "{3: 4, 1: 2}"); + assert_eq!(format!("{:?}", empty), "{}"); + } + + #[test] + fn test_expand() { + let mut m = HashMap::new(); + + assert_eq!(m.len(), 0); + assert!(m.is_empty()); + + let mut i = 0; + let old_raw_cap = m.raw_capacity(); + while old_raw_cap == m.raw_capacity() { + m.insert(i, i); + i += 1; + } + + assert_eq!(m.len(), i); + assert!(!m.is_empty()); + } + + #[test] + fn test_behavior_resize_policy() { + let mut m = HashMap::new(); + + assert_eq!(m.len(), 0); + assert_eq!(m.raw_capacity(), 1); + assert!(m.is_empty()); + + m.insert(0, 0); + m.remove(&0); + assert!(m.is_empty()); + let initial_raw_cap = m.raw_capacity(); + m.reserve(initial_raw_cap); + let raw_cap = m.raw_capacity(); + + assert_eq!(raw_cap, initial_raw_cap * 2); + + let mut i = 0; + for _ in 0..raw_cap * 3 / 4 { + m.insert(i, i); + i += 1; + } + // three quarters full + + assert_eq!(m.len(), i); + assert_eq!(m.raw_capacity(), raw_cap); + + for _ in 0..raw_cap / 4 { + m.insert(i, i); + i += 1; + } + // half full + + let new_raw_cap = m.raw_capacity(); + assert_eq!(new_raw_cap, raw_cap * 2); + + for _ in 0..raw_cap / 2 - 1 { + i -= 1; + m.remove(&i); + assert_eq!(m.raw_capacity(), new_raw_cap); + } + // A little more than one quarter full. + m.shrink_to_fit(); + assert_eq!(m.raw_capacity(), raw_cap); + // again, a little more than half full + for _ in 0..raw_cap / 2 { + i -= 1; + m.remove(&i); + } + m.shrink_to_fit(); + + assert_eq!(m.len(), i); + assert!(!m.is_empty()); + assert_eq!(m.raw_capacity(), initial_raw_cap); + } + + #[test] + fn test_reserve_shrink_to_fit() { + let mut m = HashMap::new(); + m.insert(0, 0); + m.remove(&0); + assert!(m.capacity() >= m.len()); + for i in 0..128 { + m.insert(i, i); + } + m.reserve(256); + + let usable_cap = m.capacity(); + for i in 128..(128 + 256) { + m.insert(i, i); + assert_eq!(m.capacity(), usable_cap); + } + + for i in 100..(128 + 256) { + assert_eq!(m.remove(&i), Some(i)); + } + m.shrink_to_fit(); + + assert_eq!(m.len(), 100); + assert!(!m.is_empty()); + assert!(m.capacity() >= m.len()); + + for i in 0..100 { + assert_eq!(m.remove(&i), Some(i)); + } + m.shrink_to_fit(); + m.insert(0, 0); + + assert_eq!(m.len(), 1); + assert!(m.capacity() >= m.len()); + assert_eq!(m.remove(&0), Some(0)); + } + + #[test] + fn test_from_iter() { + let xs = [(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)]; + + let map: HashMap<_, _> = xs.iter().cloned().collect(); + + for &(k, v) in &xs { + assert_eq!(map.get(&k), Some(&v)); + } + } + + #[test] + fn test_size_hint() { + let xs = [(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)]; + + let map: HashMap<_, _> = xs.iter().cloned().collect(); + + let mut iter = map.iter(); + + for _ in iter.by_ref().take(3) {} + + assert_eq!(iter.size_hint(), (3, Some(3))); + } + + #[test] + fn test_iter_len() { + let xs = [(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)]; + + let map: HashMap<_, _> = xs.iter().cloned().collect(); + + let mut iter = map.iter(); + + for _ in iter.by_ref().take(3) {} + + assert_eq!(iter.len(), 3); + } + + #[test] + fn test_mut_size_hint() { + let xs = [(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)]; + + let mut map: HashMap<_, _> = xs.iter().cloned().collect(); + + let mut iter = map.iter_mut(); + + for _ in iter.by_ref().take(3) {} + + assert_eq!(iter.size_hint(), (3, Some(3))); + } + + #[test] + fn test_iter_mut_len() { + let xs = [(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)]; + + let mut map: HashMap<_, _> = xs.iter().cloned().collect(); + + let mut iter = map.iter_mut(); + + for _ in iter.by_ref().take(3) {} + + assert_eq!(iter.len(), 3); + } + + #[test] + fn test_index() { + let mut map = HashMap::new(); + + map.insert(1, 2); + map.insert(2, 1); + map.insert(3, 4); + + assert_eq!(map[&2], 1); + } + + #[test] + #[should_panic] + fn test_index_nonexistent() { + let mut map = HashMap::new(); + + map.insert(1, 2); + map.insert(2, 1); + map.insert(3, 4); + + map[&4]; + } + + #[test] + fn test_entry() { + let xs = [(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)]; + + let mut map: HashMap<_, _> = xs.iter().cloned().collect(); + + // Existing key (insert) + match map.entry(1) { + Vacant(_) => unreachable!(), + Occupied(mut view) => { + assert_eq!(view.get(), &10); + assert_eq!(view.insert(100), 10); + } + } + assert_eq!(map.get(&1).unwrap(), &100); + assert_eq!(map.len(), 6); + + // Existing key (update) + match map.entry(2) { + Vacant(_) => unreachable!(), + Occupied(mut view) => { + let v = view.get_mut(); + let new_v = (*v) * 10; + *v = new_v; + } + } + assert_eq!(map.get(&2).unwrap(), &200); + assert_eq!(map.len(), 6); + + // Existing key (take) + match map.entry(3) { + Vacant(_) => unreachable!(), + Occupied(view) => { + assert_eq!(view.remove(), 30); + } + } + assert_eq!(map.get(&3), None); + assert_eq!(map.len(), 5); + + // Inexistent key (insert) + match map.entry(10) { + Occupied(_) => unreachable!(), + Vacant(view) => { + assert_eq!(*view.insert(1000), 1000); + } + } + assert_eq!(map.get(&10).unwrap(), &1000); + assert_eq!(map.len(), 6); + } + + #[test] + fn test_entry_take_doesnt_corrupt() { + #![allow(deprecated)] //rand + // Test for #19292 + fn check(m: &HashMap) { + for k in m.keys() { + assert!(m.contains_key(k), "{} is in keys() but not in the map?", k); + } + } + + let mut m = HashMap::new(); + + // FIXME: https://github.com/rust-lang/miri/issues/653 + let mut rng = { + let seed = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; + SmallRng::from_seed(seed) + }; + + // Populate the map with some items. + for _ in 0..50 { + let x = rng.gen_range(-10, 10); + m.insert(x, ()); + } + + for _ in 0..1000 { + let x = rng.gen_range(-10, 10); + match m.entry(x) { + Vacant(_) => {} + Occupied(e) => { + e.remove(); + } + } + + check(&m); + } + } + + #[test] + fn test_extend_ref() { + let mut a = HashMap::new(); + a.insert(1, "one"); + let mut b = HashMap::new(); + b.insert(2, "two"); + b.insert(3, "three"); + + a.extend(&b); + + assert_eq!(a.len(), 3); + assert_eq!(a[&1], "one"); + assert_eq!(a[&2], "two"); + assert_eq!(a[&3], "three"); + } + + #[test] + fn test_capacity_not_less_than_len() { + let mut a = HashMap::new(); + let mut item = 0; + + for _ in 0..116 { + a.insert(item, 0); + item += 1; + } + + assert!(a.capacity() > a.len()); + + let free = a.capacity() - a.len(); + for _ in 0..free { + a.insert(item, 0); + item += 1; + } + + assert_eq!(a.len(), a.capacity()); + + // Insert at capacity should cause allocation. + a.insert(item, 0); + assert!(a.capacity() > a.len()); + } + + #[test] + fn test_occupied_entry_key() { + let mut a = HashMap::new(); + let key = "hello there"; + let value = "value goes here"; + assert!(a.is_empty()); + a.insert(key.clone(), value.clone()); + assert_eq!(a.len(), 1); + assert_eq!(a[key], value); + + match a.entry(key.clone()) { + Vacant(_) => panic!(), + Occupied(e) => assert_eq!(key, *e.key()), + } + assert_eq!(a.len(), 1); + assert_eq!(a[key], value); + } + + #[test] + fn test_vacant_entry_key() { + let mut a = HashMap::new(); + let key = "hello there"; + let value = "value goes here"; + + assert!(a.is_empty()); + match a.entry(key.clone()) { + Occupied(_) => panic!(), + Vacant(e) => { + assert_eq!(key, *e.key()); + e.insert(value.clone()); + } + } + assert_eq!(a.len(), 1); + assert_eq!(a[key], value); + } + + #[test] + fn test_retain() { + let mut map: HashMap = (0..100).map(|x| (x, x * 10)).collect(); + + map.retain(|&k, _| k % 2 == 0); + assert_eq!(map.len(), 50); + assert_eq!(map[&2], 20); + assert_eq!(map[&4], 40); + assert_eq!(map[&6], 60); + } + + #[test] + #[cfg(not(miri))] // FIXME: https://github.com/rust-lang/miri/issues/655 + fn test_try_reserve() { + let mut empty_bytes: HashMap = HashMap::new(); + + const MAX_USIZE: usize = usize::MAX; + + if let Err(CapacityOverflow) = empty_bytes.try_reserve(MAX_USIZE) { + } else { + panic!("usize::MAX should trigger an overflow!"); + } + + if let Err(AllocErr) = empty_bytes.try_reserve(MAX_USIZE / 8) { + } else { + // This may succeed if there is enough free memory. Attempt to + // allocate a second hashmap to ensure the allocation will fail. + let mut empty_bytes2: HashMap = HashMap::new(); + if let Err(AllocErr) = empty_bytes2.try_reserve(MAX_USIZE / 8) { + } else { + panic!("usize::MAX / 8 should trigger an OOM!"); + } + } + } + + #[test] + fn test_raw_entry() { + use super::RawEntryMut::{Occupied, Vacant}; + + let xs = [(1i32, 10i32), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)]; + + let mut map: HashMap<_, _> = xs.iter().cloned().collect(); + + let compute_hash = |map: &HashMap, k: i32| -> u64 { + use core::hash::{BuildHasher, Hash, Hasher}; + + let mut hasher = map.hasher().build_hasher(); + k.hash(&mut hasher); + hasher.finish() + }; + + // Existing key (insert) + match map.raw_entry_mut().from_key(&1) { + Vacant(_) => unreachable!(), + Occupied(mut view) => { + assert_eq!(view.get(), &10); + assert_eq!(view.insert(100), 10); + } + } + let hash1 = compute_hash(&map, 1); + assert_eq!(map.raw_entry().from_key(&1).unwrap(), (&1, &100)); + assert_eq!( + map.raw_entry().from_hash(hash1, |k| *k == 1).unwrap(), + (&1, &100) + ); + assert_eq!( + map.raw_entry().from_key_hashed_nocheck(hash1, &1).unwrap(), + (&1, &100) + ); + assert_eq!(map.len(), 6); + + // Existing key (update) + match map.raw_entry_mut().from_key(&2) { + Vacant(_) => unreachable!(), + Occupied(mut view) => { + let v = view.get_mut(); + let new_v = (*v) * 10; + *v = new_v; + } + } + let hash2 = compute_hash(&map, 2); + assert_eq!(map.raw_entry().from_key(&2).unwrap(), (&2, &200)); + assert_eq!( + map.raw_entry().from_hash(hash2, |k| *k == 2).unwrap(), + (&2, &200) + ); + assert_eq!( + map.raw_entry().from_key_hashed_nocheck(hash2, &2).unwrap(), + (&2, &200) + ); + assert_eq!(map.len(), 6); + + // Existing key (take) + let hash3 = compute_hash(&map, 3); + match map.raw_entry_mut().from_key_hashed_nocheck(hash3, &3) { + Vacant(_) => unreachable!(), + Occupied(view) => { + assert_eq!(view.remove_entry(), (3, 30)); + } + } + assert_eq!(map.raw_entry().from_key(&3), None); + assert_eq!(map.raw_entry().from_hash(hash3, |k| *k == 3), None); + assert_eq!(map.raw_entry().from_key_hashed_nocheck(hash3, &3), None); + assert_eq!(map.len(), 5); + + // Nonexistent key (insert) + match map.raw_entry_mut().from_key(&10) { + Occupied(_) => unreachable!(), + Vacant(view) => { + assert_eq!(view.insert(10, 1000), (&mut 10, &mut 1000)); + } + } + assert_eq!(map.raw_entry().from_key(&10).unwrap(), (&10, &1000)); + assert_eq!(map.len(), 6); + + // Ensure all lookup methods produce equivalent results. + for k in 0..12 { + let hash = compute_hash(&map, k); + let v = map.get(&k).cloned(); + let kv = v.as_ref().map(|v| (&k, v)); + + assert_eq!(map.raw_entry().from_key(&k), kv); + assert_eq!(map.raw_entry().from_hash(hash, |q| *q == k), kv); + assert_eq!(map.raw_entry().from_key_hashed_nocheck(hash, &k), kv); + + match map.raw_entry_mut().from_key(&k) { + Occupied(mut o) => assert_eq!(Some(o.get_key_value()), kv), + Vacant(_) => assert_eq!(v, None), + } + match map.raw_entry_mut().from_key_hashed_nocheck(hash, &k) { + Occupied(mut o) => assert_eq!(Some(o.get_key_value()), kv), + Vacant(_) => assert_eq!(v, None), + } + match map.raw_entry_mut().from_hash(hash, |q| *q == k) { + Occupied(mut o) => assert_eq!(Some(o.get_key_value()), kv), + Vacant(_) => assert_eq!(v, None), + } + } + } + + #[test] + fn test_key_without_hash_impl() { + #[derive(Debug)] + struct IntWrapper(u64); + + let mut m: HashMap = HashMap::new(); + { + assert!(m.raw_entry().from_hash(0, |k| k.0 == 0).is_none()); + } + { + let vacant_entry = match m.raw_entry_mut().from_hash(0, |k| k.0 == 0) { + RawEntryMut::Occupied(..) => panic!("Found entry for key 0"), + RawEntryMut::Vacant(e) => e, + }; + vacant_entry.insert_with_hasher(0, IntWrapper(0), (), |k| k.0); + } + { + assert!(m.raw_entry().from_hash(0, |k| k.0 == 0).is_some()); + assert!(m.raw_entry().from_hash(1, |k| k.0 == 1).is_none()); + assert!(m.raw_entry().from_hash(2, |k| k.0 == 2).is_none()); + } + { + let vacant_entry = match m.raw_entry_mut().from_hash(1, |k| k.0 == 1) { + RawEntryMut::Occupied(..) => panic!("Found entry for key 1"), + RawEntryMut::Vacant(e) => e, + }; + vacant_entry.insert_with_hasher(1, IntWrapper(1), (), |k| k.0); + } + { + assert!(m.raw_entry().from_hash(0, |k| k.0 == 0).is_some()); + assert!(m.raw_entry().from_hash(1, |k| k.0 == 1).is_some()); + assert!(m.raw_entry().from_hash(2, |k| k.0 == 2).is_none()); + } + { + let occupied_entry = match m.raw_entry_mut().from_hash(0, |k| k.0 == 0) { + RawEntryMut::Occupied(e) => e, + RawEntryMut::Vacant(..) => panic!("Couldn't find entry for key 0"), + }; + occupied_entry.remove(); + } + assert!(m.raw_entry().from_hash(0, |k| k.0 == 0).is_none()); + assert!(m.raw_entry().from_hash(1, |k| k.0 == 1).is_some()); + assert!(m.raw_entry().from_hash(2, |k| k.0 == 2).is_none()); + } +} diff --git a/vendor/hashbrown/src/raw/bitmask.rs b/vendor/hashbrown/src/raw/bitmask.rs new file mode 100644 index 0000000000..6e61d4311e --- /dev/null +++ b/vendor/hashbrown/src/raw/bitmask.rs @@ -0,0 +1,108 @@ +use super::imp::{BitMaskWord, BITMASK_MASK, BITMASK_STRIDE}; +#[cfg(feature = "nightly")] +use core::intrinsics; + +/// A bit mask which contains the result of a `Match` operation on a `Group` and +/// allows iterating through them. +/// +/// The bit mask is arranged so that low-order bits represent lower memory +/// addresses for group match results. +/// +/// For implementation reasons, the bits in the set may be sparsely packed, so +/// that there is only one bit-per-byte used (the high bit, 7). If this is the +/// case, `BITMASK_STRIDE` will be 8 to indicate a divide-by-8 should be +/// performed on counts/indices to normalize this difference. `BITMASK_MASK` is +/// similarly a mask of all the actually-used bits. +#[derive(Copy, Clone)] +pub struct BitMask(pub BitMaskWord); + +#[allow(clippy::use_self)] +impl BitMask { + /// Returns a new `BitMask` with all bits inverted. + #[inline] + #[must_use] + pub fn invert(self) -> Self { + BitMask(self.0 ^ BITMASK_MASK) + } + + /// Returns a new `BitMask` with the lowest bit removed. + #[inline] + #[must_use] + pub fn remove_lowest_bit(self) -> Self { + BitMask(self.0 & (self.0 - 1)) + } + /// Returns whether the `BitMask` has at least one set bit. + #[inline] + pub fn any_bit_set(self) -> bool { + self.0 != 0 + } + + /// Returns the first set bit in the `BitMask`, if there is one. + #[inline] + pub fn lowest_set_bit(self) -> Option { + if self.0 == 0 { + None + } else { + Some(unsafe { self.lowest_set_bit_nonzero() }) + } + } + + /// Returns the first set bit in the `BitMask`, if there is one. The + /// bitmask must not be empty. + #[inline] + #[cfg(feature = "nightly")] + pub unsafe fn lowest_set_bit_nonzero(self) -> usize { + intrinsics::cttz_nonzero(self.0) as usize / BITMASK_STRIDE + } + #[inline] + #[cfg(not(feature = "nightly"))] + pub unsafe fn lowest_set_bit_nonzero(self) -> usize { + self.trailing_zeros() + } + + /// Returns the number of trailing zeroes in the `BitMask`. + #[inline] + pub fn trailing_zeros(self) -> usize { + // ARM doesn't have a trailing_zeroes instruction, and instead uses + // reverse_bits (RBIT) + leading_zeroes (CLZ). However older ARM + // versions (pre-ARMv7) don't have RBIT and need to emulate it + // instead. Since we only have 1 bit set in each byte on ARM, we can + // use swap_bytes (REV) + leading_zeroes instead. + if cfg!(target_arch = "arm") && BITMASK_STRIDE % 8 == 0 { + self.0.swap_bytes().leading_zeros() as usize / BITMASK_STRIDE + } else { + self.0.trailing_zeros() as usize / BITMASK_STRIDE + } + } + + /// Returns the number of leading zeroes in the `BitMask`. + #[inline] + pub fn leading_zeros(self) -> usize { + self.0.leading_zeros() as usize / BITMASK_STRIDE + } +} + +impl IntoIterator for BitMask { + type Item = usize; + type IntoIter = BitMaskIter; + + #[inline] + fn into_iter(self) -> BitMaskIter { + BitMaskIter(self) + } +} + +/// Iterator over the contents of a `BitMask`, returning the indicies of set +/// bits. +pub struct BitMaskIter(BitMask); + +impl Iterator for BitMaskIter { + type Item = usize; + + #[inline] + fn next(&mut self) -> Option { + let bit = self.0.lowest_set_bit()?; + self.0 = self.0.remove_lowest_bit(); + Some(bit) + } +} diff --git a/vendor/hashbrown/src/raw/generic.rs b/vendor/hashbrown/src/raw/generic.rs new file mode 100644 index 0000000000..2dee2ea512 --- /dev/null +++ b/vendor/hashbrown/src/raw/generic.rs @@ -0,0 +1,157 @@ +use super::bitmask::BitMask; +use super::EMPTY; +use core::{mem, ptr}; + +// Use the native word size as the group size. Using a 64-bit group size on +// a 32-bit architecture will just end up being more expensive because +// shifts and multiplies will need to be emulated. +#[cfg(any( + target_pointer_width = "64", + target_arch = "aarch64", + target_arch = "x86_64", +))] +type GroupWord = u64; +#[cfg(all( + target_pointer_width = "32", + not(target_arch = "aarch64"), + not(target_arch = "x86_64"), +))] +type GroupWord = u32; + +pub type BitMaskWord = GroupWord; +pub const BITMASK_STRIDE: usize = 8; +// We only care about the highest bit of each byte for the mask. +#[allow( + clippy::cast_possible_truncation, + clippy::unnecessary_cast, +)] +pub const BITMASK_MASK: BitMaskWord = 0x8080_8080_8080_8080_u64 as GroupWord; + +/// Helper function to replicate a byte across a `GroupWord`. +#[inline] +fn repeat(byte: u8) -> GroupWord { + let repeat = GroupWord::from(byte); + let repeat = repeat | repeat.wrapping_shl(8); + let repeat = repeat | repeat.wrapping_shl(16); + // This last line is a no-op with a 32-bit GroupWord + repeat | repeat.wrapping_shl(32) +} + +/// Abstraction over a group of control bytes which can be scanned in +/// parallel. +/// +/// This implementation uses a word-sized integer. +#[derive(Copy, Clone)] +pub struct Group(GroupWord); + +// We perform all operations in the native endianess, and convert to +// little-endian just before creating a BitMask. The can potentially +// enable the compiler to eliminate unnecessary byte swaps if we are +// only checking whether a BitMask is empty. +#[allow(clippy::use_self)] +impl Group { + /// Number of bytes in the group. + pub const WIDTH: usize = mem::size_of::(); + + /// Returns a full group of empty bytes, suitable for use as the initial + /// value for an empty hash table. + /// + /// This is guaranteed to be aligned to the group size. + #[inline] + pub fn static_empty() -> &'static [u8] { + union AlignedBytes { + _align: Group, + bytes: [u8; Group::WIDTH], + }; + const ALIGNED_BYTES: AlignedBytes = AlignedBytes { + bytes: [EMPTY; Group::WIDTH], + }; + unsafe { &ALIGNED_BYTES.bytes } + } + + /// Loads a group of bytes starting at the given address. + #[inline] + #[allow(clippy::cast_ptr_alignment)] // unaligned load + pub unsafe fn load(ptr: *const u8) -> Self { + Group(ptr::read_unaligned(ptr as *const _)) + } + + /// Loads a group of bytes starting at the given address, which must be + /// aligned to `mem::align_of::()`. + #[inline] + #[allow(clippy::cast_ptr_alignment)] + pub unsafe fn load_aligned(ptr: *const u8) -> Self { + // FIXME: use align_offset once it stabilizes + debug_assert_eq!(ptr as usize & (mem::align_of::() - 1), 0); + Group(ptr::read(ptr as *const _)) + } + + /// Stores the group of bytes to the given address, which must be + /// aligned to `mem::align_of::()`. + #[inline] + #[allow(clippy::cast_ptr_alignment)] + pub unsafe fn store_aligned(self, ptr: *mut u8) { + // FIXME: use align_offset once it stabilizes + debug_assert_eq!(ptr as usize & (mem::align_of::() - 1), 0); + ptr::write(ptr as *mut _, self.0); + } + + /// Returns a `BitMask` indicating all bytes in the group which *may* + /// have the given value. + /// + /// This function may return a false positive in certain cases where + /// the byte in the group differs from the searched value only in its + /// lowest bit. This is fine because: + /// - This never happens for `EMPTY` and `DELETED`, only full entries. + /// - The check for key equality will catch these. + /// - This only happens if there is at least 1 true match. + /// - The chance of this happening is very low (< 1% chance per byte). + #[inline] + pub fn match_byte(self, byte: u8) -> BitMask { + // This algorithm is derived from + // http://graphics.stanford.edu/~seander/bithacks.html##ValueInWord + let cmp = self.0 ^ repeat(byte); + BitMask((cmp.wrapping_sub(repeat(0x01)) & !cmp & repeat(0x80)).to_le()) + } + + /// Returns a `BitMask` indicating all bytes in the group which are + /// `EMPTY`. + #[inline] + pub fn match_empty(self) -> BitMask { + // If the high bit is set, then the byte must be either: + // 1111_1111 (EMPTY) or 1000_0000 (DELETED). + // So we can just check if the top two bits are 1 by ANDing them. + BitMask((self.0 & (self.0 << 1) & repeat(0x80)).to_le()) + } + + /// Returns a `BitMask` indicating all bytes in the group which are + /// `EMPTY` or `DELETED`. + #[inline] + pub fn match_empty_or_deleted(self) -> BitMask { + // A byte is EMPTY or DELETED iff the high bit is set + BitMask((self.0 & repeat(0x80)).to_le()) + } + + /// Returns a `BitMask` indicating all bytes in the group which are full. + #[inline] + pub fn match_full(&self) -> BitMask { + self.match_empty_or_deleted().invert() + } + + /// Performs the following transformation on all bytes in the group: + /// - `EMPTY => EMPTY` + /// - `DELETED => EMPTY` + /// - `FULL => DELETED` + #[inline] + pub fn convert_special_to_empty_and_full_to_deleted(self) -> Self { + // Map high_bit = 1 (EMPTY or DELETED) to 1111_1111 + // and high_bit = 0 (FULL) to 1000_0000 + // + // Here's this logic expanded to concrete values: + // let full = 1000_0000 (true) or 0000_0000 (false) + // !1000_0000 + 1 = 0111_1111 + 1 = 1000_0000 (no carry) + // !0000_0000 + 0 = 1111_1111 + 0 = 1111_1111 (no carry) + let full = !self.0 & repeat(0x80); + Group(!full + (full >> 7)) + } +} diff --git a/vendor/hashbrown/src/raw/mod.rs b/vendor/hashbrown/src/raw/mod.rs new file mode 100644 index 0000000000..822b5c9c31 --- /dev/null +++ b/vendor/hashbrown/src/raw/mod.rs @@ -0,0 +1,1374 @@ +use crate::alloc::alloc::{alloc, dealloc, handle_alloc_error}; +use crate::scopeguard::guard; +use crate::CollectionAllocErr; +use core::alloc::Layout; +use core::hint; +use core::iter::FusedIterator; +use core::marker::PhantomData; +use core::mem; +use core::mem::ManuallyDrop; +use core::ptr::NonNull; + +cfg_if! { + // Use the SSE2 implementation if possible: it allows us to scan 16 buckets + // at once instead of 8. We don't bother with AVX since it would require + // runtime dispatch and wouldn't gain us much anyways: the probability of + // finding a match drops off drastically after the first few buckets. + // + // I attempted an implementation on ARM using NEON instructions, but it + // turns out that most NEON instructions have multi-cycle latency, which in + // the end outweighs any gains over the generic implementation. + if #[cfg(all( + target_feature = "sse2", + any(target_arch = "x86", target_arch = "x86_64"), + not(miri) + ))] { + #[path = "sse2.rs"] + mod imp; + } else { + #[path = "generic.rs"] + mod imp; + } +} + +mod bitmask; + +use self::bitmask::BitMask; +use self::imp::Group; + +// Branch prediction hint. This is currently only available on nightly but it +// consistently improves performance by 10-15%. +#[cfg(feature = "nightly")] +use core::intrinsics::{likely, unlikely}; +#[cfg(not(feature = "nightly"))] +#[inline] +fn likely(b: bool) -> bool { + b +} +#[cfg(not(feature = "nightly"))] +#[inline] +fn unlikely(b: bool) -> bool { + b +} + +#[cfg(feature = "nightly")] +#[inline] +unsafe fn offset_from(to: *const T, from: *const T) -> usize { + to.offset_from(from) as usize +} +#[cfg(not(feature = "nightly"))] +#[inline] +unsafe fn offset_from(to: *const T, from: *const T) -> usize { + (to as usize - from as usize) / mem::size_of::() +} + +/// Whether memory allocation errors should return an error or abort. +#[derive(Copy, Clone)] +enum Fallibility { + Fallible, + Infallible, +} + +impl Fallibility { + /// Error to return on capacity overflow. + #[inline] + fn capacity_overflow(self) -> CollectionAllocErr { + match self { + Fallibility::Fallible => CollectionAllocErr::CapacityOverflow, + Fallibility::Infallible => panic!("Hash table capacity overflow"), + } + } + + /// Error to return on allocation error. + #[inline] + fn alloc_err(self, layout: Layout) -> CollectionAllocErr { + match self { + Fallibility::Fallible => CollectionAllocErr::AllocErr, + Fallibility::Infallible => handle_alloc_error(layout), + } + } +} + +/// Control byte value for an empty bucket. +const EMPTY: u8 = 0b1111_1111; + +/// Control byte value for a deleted bucket. +const DELETED: u8 = 0b1000_0000; + +/// Checks whether a control byte represents a full bucket (top bit is clear). +#[inline] +fn is_full(ctrl: u8) -> bool { + ctrl & 0x80 == 0 +} + +/// Checks whether a control byte represents a special value (top bit is set). +#[inline] +fn is_special(ctrl: u8) -> bool { + ctrl & 0x80 != 0 +} + +/// Checks whether a special control value is EMPTY (just check 1 bit). +#[inline] +fn special_is_empty(ctrl: u8) -> bool { + debug_assert!(is_special(ctrl)); + ctrl & 0x01 != 0 +} + +/// Primary hash function, used to select the initial bucket to probe from. +#[inline] +#[allow(clippy::cast_possible_truncation)] +fn h1(hash: u64) -> usize { + // On 32-bit platforms we simply ignore the higher hash bits. + hash as usize +} + +/// Secondary hash function, saved in the low 7 bits of the control byte. +#[inline] +#[allow(clippy::cast_possible_truncation)] +fn h2(hash: u64) -> u8 { + // Grab the top 7 bits of the hash. While the hash is normally a full 64-bit + // value, some hash functions (such as FxHash) produce a usize result + // instead, which means that the top 32 bits are 0 on 32-bit platforms. + let hash_len = usize::min(mem::size_of::(), mem::size_of::()); + let top7 = hash >> (hash_len * 8 - 7); + (top7 & 0x7f) as u8 // truncation +} + +/// Probe sequence based on triangular numbers, which is guaranteed (since our +/// table size is a power of two) to visit every group of elements exactly once. +/// +/// A triangular probe has us jump by 1 more group every time. So first we +/// jump by 1 group (meaning we just continue our linear scan), then 2 groups +/// (skipping over 1 group), then 3 groups (skipping over 2 groups), and so on. +/// +/// Proof that the probe will visit every group in the table: +/// +struct ProbeSeq { + bucket_mask: usize, + pos: usize, + stride: usize, +} + +impl Iterator for ProbeSeq { + type Item = usize; + + #[inline] + fn next(&mut self) -> Option { + // We should have found an empty bucket by now and ended the probe. + debug_assert!( + self.stride <= self.bucket_mask, + "Went past end of probe sequence" + ); + + let result = self.pos; + self.stride += Group::WIDTH; + self.pos += self.stride; + self.pos &= self.bucket_mask; + Some(result) + } +} + +/// Returns the number of buckets needed to hold the given number of items, +/// taking the maximum load factor into account. +/// +/// Returns `None` if an overflow occurs. +#[inline] +// Workaround for emscripten bug emscripten-core/emscripten-fastcomp#258 +#[cfg_attr(target_os = "emscripten", inline(never))] +fn capacity_to_buckets(cap: usize) -> Option { + let adjusted_cap = if cap < 8 { + // Need at least 1 free bucket on small tables + cap + 1 + } else { + // Otherwise require 1/8 buckets to be empty (87.5% load) + // + // Be careful when modifying this, calculate_layout relies on the + // overflow check here. + cap.checked_mul(8)? / 7 + }; + + // Any overflows will have been caught by the checked_mul. Also, any + // rounding errors from the division above will be cleaned up by + // next_power_of_two (which can't overflow because of the previous divison). + Some(adjusted_cap.next_power_of_two()) +} + +/// Returns the maximum effective capacity for the given bucket mask, taking +/// the maximum load factor into account. +#[inline] +fn bucket_mask_to_capacity(bucket_mask: usize) -> usize { + if bucket_mask < 8 { + // For tables with 1/2/4/8 buckets, we always reserve one empty slot. + // Keep in mind that the bucket mask is one less than the bucket count. + bucket_mask + } else { + // For larger tables we reserve 12.5% of the slots as empty. + ((bucket_mask + 1) / 8) * 7 + } +} + +// Returns a Layout which describes the allocation required for a hash table, +// and the offset of the buckets in the allocation. +/// +/// Returns `None` if an overflow occurs. +#[inline] +#[cfg(feature = "nightly")] +fn calculate_layout(buckets: usize) -> Option<(Layout, usize)> { + debug_assert!(buckets.is_power_of_two()); + + // Array of buckets + let data = Layout::array::(buckets).ok()?; + + // Array of control bytes. This must be aligned to the group size. + // + // We add `Group::WIDTH` control bytes at the end of the array which + // replicate the bytes at the start of the array and thus avoids the need to + // perform bounds-checking while probing. + // + // There is no possible overflow here since buckets is a power of two and + // Group::WIDTH is a small number. + let ctrl = unsafe { Layout::from_size_align_unchecked(buckets + Group::WIDTH, Group::WIDTH) }; + + ctrl.extend(data).ok() +} + +// Returns a Layout which describes the allocation required for a hash table, +// and the offset of the buckets in the allocation. +#[inline] +#[cfg(not(feature = "nightly"))] +fn calculate_layout(buckets: usize) -> Option<(Layout, usize)> { + debug_assert!(buckets.is_power_of_two()); + + // Manual layout calculation since Layout methods are not yet stable. + let data_align = usize::max(mem::align_of::(), Group::WIDTH); + let data_offset = (buckets + Group::WIDTH).checked_add(data_align - 1)? & !(data_align - 1); + let len = data_offset.checked_add(mem::size_of::().checked_mul(buckets)?)?; + + Some(( + unsafe { Layout::from_size_align_unchecked(len, data_align) }, + data_offset, + )) +} + +/// A reference to a hash table bucket containing a `T`. +/// +/// This is usually just a pointer to the element itself. However if the element +/// is a ZST, then we instead track the index of the element in the table so +/// that `erase` works properly. +pub struct Bucket { + // Using *const for variance + ptr: *const T, +} + +// This Send impl is needed for rayon support. This is safe since Bucket is +// never exposed in a public API. +unsafe impl Send for Bucket {} + +impl Clone for Bucket { + #[inline] + fn clone(&self) -> Self { + Self { ptr: self.ptr } + } +} + +impl Bucket { + #[inline] + unsafe fn from_base_index(base: *const T, index: usize) -> Self { + let ptr = if mem::size_of::() == 0 { + index as *const T + } else { + base.add(index) + }; + Self { ptr } + } + #[inline] + pub unsafe fn as_ptr(&self) -> *mut T { + if mem::size_of::() == 0 { + // Just return an arbitrary ZST pointer which is properly aligned + mem::align_of::() as *mut T + } else { + self.ptr as *mut T + } + } + #[inline] + unsafe fn add(&self, offset: usize) -> Self { + let ptr = if mem::size_of::() == 0 { + (self.ptr as usize + offset) as *const T + } else { + self.ptr.add(offset) + }; + Self { ptr } + } + #[inline] + pub unsafe fn drop(&self) { + self.as_ptr().drop_in_place(); + } + #[inline] + pub unsafe fn read(&self) -> T { + self.as_ptr().read() + } + #[inline] + pub unsafe fn write(&self, val: T) { + self.as_ptr().write(val); + } + #[inline] + pub unsafe fn as_ref<'a>(&self) -> &'a T { + &*self.as_ptr() + } + #[inline] + pub unsafe fn as_mut<'a>(&self) -> &'a mut T { + &mut *self.as_ptr() + } + #[inline] + pub unsafe fn copy_from_nonoverlapping(&self, other: &Self) { + self.as_ptr().copy_from_nonoverlapping(other.as_ptr(), 1); + } +} + +/// A raw hash table with an unsafe API. +pub struct RawTable { + // Mask to get an index from a hash value. The value is one less than the + // number of buckets in the table. + bucket_mask: usize, + + // Pointer to the array of control bytes + ctrl: NonNull, + + // Pointer to the array of buckets + data: NonNull, + + // Number of elements that can be inserted before we need to grow the table + growth_left: usize, + + // Number of elements in the table, only really used by len() + items: usize, + + // Tell dropck that we own instances of T. + marker: PhantomData, +} + +impl RawTable { + /// Creates a new empty hash table without allocating any memory. + /// + /// In effect this returns a table with exactly 1 bucket. However we can + /// leave the data pointer dangling since that bucket is never written to + /// due to our load factor forcing us to always have at least 1 free bucket. + #[inline] + pub fn new() -> Self { + Self { + data: NonNull::dangling(), + // Be careful to cast the entire slice to a raw pointer. + ctrl: unsafe { NonNull::new_unchecked(Group::static_empty().as_ptr() as *mut u8) }, + bucket_mask: 0, + items: 0, + growth_left: 0, + marker: PhantomData, + } + } + + /// Allocates a new hash table with the given number of buckets. + /// + /// The control bytes are left uninitialized. + #[inline] + unsafe fn new_uninitialized( + buckets: usize, + fallability: Fallibility, + ) -> Result { + let (layout, data_offset) = + calculate_layout::(buckets).ok_or_else(|| fallability.capacity_overflow())?; + let ctrl = NonNull::new(alloc(layout)).ok_or_else(|| fallability.alloc_err(layout))?; + let data = NonNull::new_unchecked(ctrl.as_ptr().add(data_offset) as *mut T); + Ok(Self { + data, + ctrl, + bucket_mask: buckets - 1, + items: 0, + growth_left: bucket_mask_to_capacity(buckets - 1), + marker: PhantomData, + }) + } + + /// Attempts to allocate a new hash table with at least enough capacity + /// for inserting the given number of elements without reallocating. + fn try_with_capacity( + capacity: usize, + fallability: Fallibility, + ) -> Result { + if capacity == 0 { + Ok(Self::new()) + } else { + unsafe { + let buckets = + capacity_to_buckets(capacity).ok_or_else(|| fallability.capacity_overflow())?; + let result = Self::new_uninitialized(buckets, fallability)?; + result.ctrl(0).write_bytes(EMPTY, result.num_ctrl_bytes()); + + Ok(result) + } + } + } + + /// Allocates a new hash table with at least enough capacity for inserting + /// the given number of elements without reallocating. + pub fn with_capacity(capacity: usize) -> Self { + Self::try_with_capacity(capacity, Fallibility::Infallible) + .unwrap_or_else(|_| unsafe { hint::unreachable_unchecked() }) + } + + /// Deallocates the table without dropping any entries. + #[inline] + unsafe fn free_buckets(&mut self) { + let (layout, _) = + calculate_layout::(self.buckets()).unwrap_or_else(|| hint::unreachable_unchecked()); + dealloc(self.ctrl.as_ptr(), layout); + } + + /// Returns the index of a bucket from a `Bucket`. + #[inline] + unsafe fn bucket_index(&self, bucket: &Bucket) -> usize { + if mem::size_of::() == 0 { + bucket.ptr as usize + } else { + offset_from(bucket.ptr, self.data.as_ptr()) + } + } + + /// Returns a pointer to a control byte. + #[inline] + unsafe fn ctrl(&self, index: usize) -> *mut u8 { + debug_assert!(index < self.num_ctrl_bytes()); + self.ctrl.as_ptr().add(index) + } + + /// Returns a pointer to an element in the table. + #[inline] + pub unsafe fn bucket(&self, index: usize) -> Bucket { + debug_assert_ne!(self.bucket_mask, 0); + debug_assert!(index < self.buckets()); + Bucket::from_base_index(self.data.as_ptr(), index) + } + + /// Erases an element from the table without dropping it. + #[inline] + pub unsafe fn erase_no_drop(&mut self, item: &Bucket) { + let index = self.bucket_index(item); + let index_before = index.wrapping_sub(Group::WIDTH) & self.bucket_mask; + let empty_before = Group::load(self.ctrl(index_before)).match_empty(); + let empty_after = Group::load(self.ctrl(index)).match_empty(); + + // If we are inside a continuous block of Group::WIDTH full or deleted + // cells then a probe window may have seen a full block when trying to + // insert. We therefore need to keep that block non-empty so that + // lookups will continue searching to the next probe window. + // + // Note that in this context `leading_zeros` refers to the bytes at the + // end of a group, while `trailing_zeros` refers to the bytes at the + // begining of a group. + let ctrl = if empty_before.leading_zeros() + empty_after.trailing_zeros() >= Group::WIDTH { + DELETED + } else { + self.growth_left += 1; + EMPTY + }; + self.set_ctrl(index, ctrl); + self.items -= 1; + } + + /// Returns an iterator for a probe sequence on the table. + /// + /// This iterator never terminates, but is guaranteed to visit each bucket + /// group exactly once. The loop using `probe_seq` must terminate upon + /// reaching a group containing an empty bucket. + #[inline] + fn probe_seq(&self, hash: u64) -> ProbeSeq { + ProbeSeq { + bucket_mask: self.bucket_mask, + pos: h1(hash) & self.bucket_mask, + stride: 0, + } + } + + /// Sets a control byte, and possibly also the replicated control byte at + /// the end of the array. + #[inline] + unsafe fn set_ctrl(&self, index: usize, ctrl: u8) { + // Replicate the first Group::WIDTH control bytes at the end of + // the array without using a branch: + // - If index >= Group::WIDTH then index == index2. + // - Otherwise index2 == self.bucket_mask + 1 + index. + // + // The very last replicated control byte is never actually read because + // we mask the initial index for unaligned loads, but we write it + // anyways because it makes the set_ctrl implementation simpler. + // + // If there are fewer buckets than Group::WIDTH then this code will + // replicate the buckets at the end of the trailing group. For example + // with 2 buckets and a group size of 4, the control bytes will look + // like this: + // + // Real | Replicated + // --------------------------------------------- + // | [A] | [B] | [EMPTY] | [EMPTY] | [A] | [B] | + // --------------------------------------------- + let index2 = ((index.wrapping_sub(Group::WIDTH)) & self.bucket_mask) + Group::WIDTH; + + *self.ctrl(index) = ctrl; + *self.ctrl(index2) = ctrl; + } + + /// Searches for an empty or deleted bucket which is suitable for inserting + /// a new element. + /// + /// There must be at least 1 empty bucket in the table. + #[inline] + fn find_insert_slot(&self, hash: u64) -> usize { + for pos in self.probe_seq(hash) { + unsafe { + let group = Group::load(self.ctrl(pos)); + if let Some(bit) = group.match_empty_or_deleted().lowest_set_bit() { + let result = (pos + bit) & self.bucket_mask; + + // In tables smaller than the group width, trailing control + // bytes outside the range of the table are filled with + // EMPTY entries. These will unfortunately trigger a + // match, but once masked may point to a full bucket that + // is already occupied. We detect this situation here and + // perform a second scan starting at the begining of the + // table. This second scan is guaranteed to find an empty + // slot (due to the load factor) before hitting the trailing + // control bytes (containing EMPTY). + if unlikely(is_full(*self.ctrl(result))) { + debug_assert!(self.bucket_mask < Group::WIDTH); + debug_assert_ne!(pos, 0); + return Group::load_aligned(self.ctrl(0)) + .match_empty_or_deleted() + .lowest_set_bit_nonzero(); + } else { + return result; + } + } + } + } + + // probe_seq never returns. + unreachable!(); + } + + /// Marks all table buckets as empty without dropping their contents. + #[inline] + pub fn clear_no_drop(&mut self) { + if !self.is_empty_singleton() { + unsafe { + self.ctrl(0).write_bytes(EMPTY, self.num_ctrl_bytes()); + } + } + self.items = 0; + self.growth_left = bucket_mask_to_capacity(self.bucket_mask); + } + + /// Removes all elements from the table without freeing the backing memory. + #[inline] + pub fn clear(&mut self) { + // Ensure that the table is reset even if one of the drops panic + let self_ = guard(self, |self_| self_.clear_no_drop()); + + if mem::needs_drop::() { + unsafe { + for item in self_.iter() { + item.drop(); + } + } + } + } + + /// Shrinks the table to fit `max(self.len(), min_size)` elements. + #[inline] + pub fn shrink_to(&mut self, min_size: usize, hasher: impl Fn(&T) -> u64) { + // Calculate the minimal number of elements that we need to reserve + // space for. + let min_size = usize::max(self.items, min_size); + if min_size == 0 { + *self = Self::new(); + return; + } + + // Calculate the number of buckets that we need for this number of + // elements. If the calculation overflows then the requested bucket + // count must be larger than what we have right and nothing needs to be + // done. + let min_buckets = match capacity_to_buckets(min_size) { + Some(buckets) => buckets, + None => return, + }; + + // If we have more buckets than we need, shrink the table. + if min_buckets < self.buckets() { + // Fast path if the table is empty + if self.items == 0 { + *self = Self::with_capacity(min_size) + } else { + self.resize(min_size, hasher, Fallibility::Infallible) + .unwrap_or_else(|_| unsafe { hint::unreachable_unchecked() }); + } + } + } + + /// Ensures that at least `additional` items can be inserted into the table + /// without reallocation. + #[inline] + pub fn reserve(&mut self, additional: usize, hasher: impl Fn(&T) -> u64) { + if additional > self.growth_left { + self.reserve_rehash(additional, hasher, Fallibility::Infallible) + .unwrap_or_else(|_| unsafe { hint::unreachable_unchecked() }); + } + } + + /// Tries to ensure that at least `additional` items can be inserted into + /// the table without reallocation. + #[inline] + pub fn try_reserve( + &mut self, + additional: usize, + hasher: impl Fn(&T) -> u64, + ) -> Result<(), CollectionAllocErr> { + if additional > self.growth_left { + self.reserve_rehash(additional, hasher, Fallibility::Fallible) + } else { + Ok(()) + } + } + + /// Out-of-line slow path for `reserve` and `try_reserve`. + #[cold] + #[inline(never)] + fn reserve_rehash( + &mut self, + additional: usize, + hasher: impl Fn(&T) -> u64, + fallability: Fallibility, + ) -> Result<(), CollectionAllocErr> { + let new_items = self + .items + .checked_add(additional) + .ok_or_else(|| fallability.capacity_overflow())?; + + // Rehash in-place without re-allocating if we have plenty of spare + // capacity that is locked up due to DELETED entries. + if new_items < bucket_mask_to_capacity(self.bucket_mask) / 2 { + self.rehash_in_place(hasher); + Ok(()) + } else { + self.resize(new_items, hasher, fallability) + } + } + + /// Rehashes the contents of the table in place (i.e. without changing the + /// allocation). + /// + /// If `hasher` panics then some the table's contents may be lost. + fn rehash_in_place(&mut self, hasher: impl Fn(&T) -> u64) { + unsafe { + // Bulk convert all full control bytes to DELETED, and all DELETED + // control bytes to EMPTY. This effectively frees up all buckets + // containing a DELETED entry. + for i in (0..self.buckets()).step_by(Group::WIDTH) { + let group = Group::load_aligned(self.ctrl(i)); + let group = group.convert_special_to_empty_and_full_to_deleted(); + group.store_aligned(self.ctrl(i)); + } + + // Fix up the trailing control bytes. See the comments in set_ctrl + // for the handling of tables smaller than the group width. + if self.buckets() < Group::WIDTH { + self.ctrl(0) + .copy_to(self.ctrl(Group::WIDTH), self.buckets()); + } else { + self.ctrl(0) + .copy_to(self.ctrl(self.buckets()), Group::WIDTH); + } + + // If the hash function panics then properly clean up any elements + // that we haven't rehashed yet. We unfortunately can't preserve the + // element since we lost their hash and have no way of recovering it + // without risking another panic. + let mut guard = guard(self, |self_| { + if mem::needs_drop::() { + for i in 0..self_.buckets() { + if *self_.ctrl(i) == DELETED { + self_.set_ctrl(i, EMPTY); + self_.bucket(i).drop(); + self_.items -= 1; + } + } + } + self_.growth_left = bucket_mask_to_capacity(self_.bucket_mask) - self_.items; + }); + + // At this point, DELETED elements are elements that we haven't + // rehashed yet. Find them and re-insert them at their ideal + // position. + 'outer: for i in 0..guard.buckets() { + if *guard.ctrl(i) != DELETED { + continue; + } + 'inner: loop { + // Hash the current item + let item = guard.bucket(i); + let hash = hasher(item.as_ref()); + + // Search for a suitable place to put it + let new_i = guard.find_insert_slot(hash); + + // Probing works by scanning through all of the control + // bytes in groups, which may not be aligned to the group + // size. If both the new and old position fall within the + // same unaligned group, then there is no benefit in moving + // it and we can just continue to the next item. + let probe_index = |pos: usize| { + (pos.wrapping_sub(guard.probe_seq(hash).pos) & guard.bucket_mask) + / Group::WIDTH + }; + if likely(probe_index(i) == probe_index(new_i)) { + guard.set_ctrl(i, h2(hash)); + continue 'outer; + } + + // We are moving the current item to a new position. Write + // our H2 to the control byte of the new position. + let prev_ctrl = *guard.ctrl(new_i); + guard.set_ctrl(new_i, h2(hash)); + + if prev_ctrl == EMPTY { + // If the target slot is empty, simply move the current + // element into the new slot and clear the old control + // byte. + guard.set_ctrl(i, EMPTY); + guard.bucket(new_i).copy_from_nonoverlapping(&item); + continue 'outer; + } else { + // If the target slot is occupied, swap the two elements + // and then continue processing the element that we just + // swapped into the old slot. + debug_assert_eq!(prev_ctrl, DELETED); + mem::swap(guard.bucket(new_i).as_mut(), item.as_mut()); + continue 'inner; + } + } + } + + guard.growth_left = bucket_mask_to_capacity(guard.bucket_mask) - guard.items; + mem::forget(guard); + } + } + + /// Allocates a new table of a different size and moves the contents of the + /// current table into it. + fn resize( + &mut self, + capacity: usize, + hasher: impl Fn(&T) -> u64, + fallability: Fallibility, + ) -> Result<(), CollectionAllocErr> { + unsafe { + debug_assert!(self.items <= capacity); + + // Allocate and initialize the new table. + let mut new_table = Self::try_with_capacity(capacity, fallability)?; + new_table.growth_left -= self.items; + new_table.items = self.items; + + // The hash function may panic, in which case we simply free the new + // table without dropping any elements that may have been copied into + // it. + // + // This guard is also used to free the old table on success, see + // the comment at the bottom of this function. + let mut new_table = guard(ManuallyDrop::new(new_table), |new_table| { + if !new_table.is_empty_singleton() { + new_table.free_buckets(); + } + }); + + // Copy all elements to the new table. + for item in self.iter() { + // This may panic. + let hash = hasher(item.as_ref()); + + // We can use a simpler version of insert() here since: + // - there are no DELETED entries. + // - we know there is enough space in the table. + // - all elements are unique. + let index = new_table.find_insert_slot(hash); + new_table.set_ctrl(index, h2(hash)); + new_table.bucket(index).copy_from_nonoverlapping(&item); + } + + // We successfully copied all elements without panicking. Now replace + // self with the new table. The old table will have its memory freed but + // the items will not be dropped (since they have been moved into the + // new table). + mem::swap(self, &mut new_table); + + Ok(()) + } + } + + /// Inserts a new element into the table. + /// + /// This does not check if the given element already exists in the table. + #[inline] + pub fn insert(&mut self, hash: u64, value: T, hasher: impl Fn(&T) -> u64) -> Bucket { + self.reserve(1, hasher); + self.insert_no_grow(hash, value) + } + + /// Inserts a new element into the table, without growing the table. + /// + /// There must be enough space in the table to insert the new element. + /// + /// This does not check if the given element already exists in the table. + #[inline] + pub fn insert_no_grow(&mut self, hash: u64, value: T) -> Bucket { + unsafe { + let index = self.find_insert_slot(hash); + let bucket = self.bucket(index); + + // If we are replacing a DELETED entry then we don't need to update + // the load counter. + let old_ctrl = *self.ctrl(index); + self.growth_left -= special_is_empty(old_ctrl) as usize; + + self.set_ctrl(index, h2(hash)); + bucket.write(value); + self.items += 1; + bucket + } + } + + /// Searches for an element in the table. + #[inline] + pub fn find(&self, hash: u64, mut eq: impl FnMut(&T) -> bool) -> Option> { + unsafe { + for pos in self.probe_seq(hash) { + let group = Group::load(self.ctrl(pos)); + for bit in group.match_byte(h2(hash)) { + let index = (pos + bit) & self.bucket_mask; + let bucket = self.bucket(index); + if likely(eq(bucket.as_ref())) { + return Some(bucket); + } + } + if likely(group.match_empty().any_bit_set()) { + return None; + } + } + } + + // probe_seq never returns. + unreachable!(); + } + + /// Returns the number of elements the map can hold without reallocating. + /// + /// This number is a lower bound; the table might be able to hold + /// more, but is guaranteed to be able to hold at least this many. + #[inline] + pub fn capacity(&self) -> usize { + self.items + self.growth_left + } + + /// Returns the number of elements in the table. + #[inline] + pub fn len(&self) -> usize { + self.items + } + + /// Returns the number of buckets in the table. + #[inline] + pub fn buckets(&self) -> usize { + self.bucket_mask + 1 + } + + /// Returns the number of control bytes in the table. + #[inline] + fn num_ctrl_bytes(&self) -> usize { + self.bucket_mask + 1 + Group::WIDTH + } + + /// Returns whether this table points to the empty singleton with a capacity + /// of 0. + #[inline] + fn is_empty_singleton(&self) -> bool { + self.bucket_mask == 0 + } + + /// Returns an iterator over every element in the table. It is up to + /// the caller to ensure that the `RawTable` outlives the `RawIter`. + /// Because we cannot make the `next` method unsafe on the `RawIter` + /// struct, we have to make the `iter` method unsafe. + #[inline] + pub unsafe fn iter(&self) -> RawIter { + let data = Bucket::from_base_index(self.data.as_ptr(), 0); + RawIter { + iter: RawIterRange::new(self.ctrl.as_ptr(), data, self.buckets()), + items: self.items, + } + } + + /// Returns an iterator which removes all elements from the table without + /// freeing the memory. It is up to the caller to ensure that the `RawTable` + /// outlives the `RawDrain`. Because we cannot make the `next` method unsafe + /// on the `RawDrain`, we have to make the `drain` method unsafe. + #[inline] + pub unsafe fn drain(&mut self) -> RawDrain<'_, T> { + RawDrain { + iter: self.iter(), + table: ManuallyDrop::new(mem::replace(self, Self::new())), + orig_table: NonNull::from(self), + marker: PhantomData, + } + } + + /// Converts the table into a raw allocation. The contents of the table + /// should be dropped using a `RawIter` before freeing the allocation. + #[inline] + pub fn into_alloc(self) -> Option<(NonNull, Layout)> { + let alloc = if self.is_empty_singleton() { + None + } else { + let (layout, _) = calculate_layout::(self.buckets()) + .unwrap_or_else(|| unsafe { hint::unreachable_unchecked() }); + Some((self.ctrl.cast(), layout)) + }; + mem::forget(self); + alloc + } +} + +unsafe impl Send for RawTable where T: Send {} +unsafe impl Sync for RawTable where T: Sync {} + +impl Clone for RawTable { + fn clone(&self) -> Self { + if self.is_empty_singleton() { + Self::new() + } else { + unsafe { + let mut new_table = ManuallyDrop::new( + Self::new_uninitialized(self.buckets(), Fallibility::Infallible) + .unwrap_or_else(|_| hint::unreachable_unchecked()), + ); + + // Copy the control bytes unchanged. We do this in a single pass + self.ctrl(0) + .copy_to_nonoverlapping(new_table.ctrl(0), self.num_ctrl_bytes()); + + { + // The cloning of elements may panic, in which case we need + // to make sure we drop only the elements that have been + // cloned so far. + let mut guard = guard((0, &mut new_table), |(index, new_table)| { + if mem::needs_drop::() { + for i in 0..=*index { + if is_full(*new_table.ctrl(i)) { + new_table.bucket(i).drop(); + } + } + } + new_table.free_buckets(); + }); + + for from in self.iter() { + let index = self.bucket_index(&from); + let to = guard.1.bucket(index); + to.write(from.as_ref().clone()); + + // Update the index in case we need to unwind. + guard.0 = index; + } + + // Successfully cloned all items, no need to clean up. + mem::forget(guard); + } + + // Return the newly created table. + new_table.items = self.items; + new_table.growth_left = self.growth_left; + ManuallyDrop::into_inner(new_table) + } + } + } +} + +#[cfg(feature = "nightly")] +unsafe impl<#[may_dangle] T> Drop for RawTable { + #[inline] + fn drop(&mut self) { + if !self.is_empty_singleton() { + unsafe { + if mem::needs_drop::() { + for item in self.iter() { + item.drop(); + } + } + self.free_buckets(); + } + } + } +} +#[cfg(not(feature = "nightly"))] +impl Drop for RawTable { + #[inline] + fn drop(&mut self) { + if !self.is_empty_singleton() { + unsafe { + if mem::needs_drop::() { + for item in self.iter() { + item.drop(); + } + } + self.free_buckets(); + } + } + } +} + +impl IntoIterator for RawTable { + type Item = T; + type IntoIter = RawIntoIter; + + #[inline] + fn into_iter(self) -> RawIntoIter { + unsafe { + let iter = self.iter(); + let alloc = self.into_alloc(); + RawIntoIter { + iter, + alloc, + marker: PhantomData, + } + } + } +} + +/// Iterator over a sub-range of a table. Unlike `RawIter` this iterator does +/// not track an item count. +pub struct RawIterRange { + // Mask of full buckets in the current group. Bits are cleared from this + // mask as each element is processed. + current_group: BitMask, + + // Pointer to the buckets for the current group. + data: Bucket, + + // Pointer to the next group of control bytes, + // Must be aligned to the group size. + next_ctrl: *const u8, + + // Pointer one past the last control byte of this range. + end: *const u8, +} + +impl RawIterRange { + /// Returns a `RawIterRange` covering a subset of a table. + /// + /// The control byte address must be aligned to the group size. + #[inline] + unsafe fn new(ctrl: *const u8, data: Bucket, len: usize) -> Self { + debug_assert_ne!(len, 0); + debug_assert_eq!(ctrl as usize % Group::WIDTH, 0); + let end = ctrl.add(len); + + // Load the first group and advance ctrl to point to the next group + let current_group = Group::load_aligned(ctrl).match_full(); + let next_ctrl = ctrl.add(Group::WIDTH); + + Self { + current_group, + data, + next_ctrl, + end, + } + } + + /// Splits a `RawIterRange` into two halves. + /// + /// Returns `None` if the remaining range is smaller than or equal to the + /// group width. + #[inline] + #[cfg(feature = "rayon")] + pub fn split(mut self) -> (Self, Option>) { + unsafe { + if self.end <= self.next_ctrl { + // Nothing to split if the group that we are current processing + // is the last one. + (self, None) + } else { + // len is the remaining number of elements after the group that + // we are currently processing. It must be a multiple of the + // group size (small tables are caught by the check above). + let len = offset_from(self.end, self.next_ctrl); + debug_assert_eq!(len % Group::WIDTH, 0); + + // Split the remaining elements into two halves, but round the + // midpoint down in case there is an odd number of groups + // remaining. This ensures that: + // - The tail is at least 1 group long. + // - The split is roughly even considering we still have the + // current group to process. + let mid = (len / 2) & !(Group::WIDTH - 1); + + let tail = Self::new( + self.next_ctrl.add(mid), + self.data.add(Group::WIDTH).add(mid), + len - mid, + ); + debug_assert_eq!(self.data.add(Group::WIDTH).add(mid).ptr, tail.data.ptr); + debug_assert_eq!(self.end, tail.end); + self.end = self.next_ctrl.add(mid); + debug_assert_eq!(self.end.add(Group::WIDTH), tail.next_ctrl); + (self, Some(tail)) + } + } + } +} + +// We make raw iterators unconditionally Send and Sync, and let the PhantomData +// in the actual iterator implementations determine the real Send/Sync bounds. +unsafe impl Send for RawIterRange {} +unsafe impl Sync for RawIterRange {} + +impl Clone for RawIterRange { + #[inline] + fn clone(&self) -> Self { + Self { + data: self.data.clone(), + next_ctrl: self.next_ctrl, + current_group: self.current_group, + end: self.end, + } + } +} + +impl Iterator for RawIterRange { + type Item = Bucket; + + #[inline] + fn next(&mut self) -> Option> { + unsafe { + loop { + if let Some(index) = self.current_group.lowest_set_bit() { + self.current_group = self.current_group.remove_lowest_bit(); + return Some(self.data.add(index)); + } + + if self.next_ctrl >= self.end { + return None; + } + + // We might read past self.end up to the next group boundary, + // but this is fine because it only occurs on tables smaller + // than the group size where the trailing control bytes are all + // EMPTY. On larger tables self.end is guaranteed to be aligned + // to the group size (since tables are power-of-two sized). + self.current_group = Group::load_aligned(self.next_ctrl).match_full(); + self.data = self.data.add(Group::WIDTH); + self.next_ctrl = self.next_ctrl.add(Group::WIDTH); + } + } + } + + #[inline] + fn size_hint(&self) -> (usize, Option) { + // We don't have an item count, so just guess based on the range size. + ( + 0, + Some(unsafe { offset_from(self.end, self.next_ctrl) + Group::WIDTH }), + ) + } +} + +impl FusedIterator for RawIterRange {} + +/// Iterator which returns a raw pointer to every full bucket in the table. +pub struct RawIter { + pub iter: RawIterRange, + items: usize, +} + +impl Clone for RawIter { + #[inline] + fn clone(&self) -> Self { + Self { + iter: self.iter.clone(), + items: self.items, + } + } +} + +impl Iterator for RawIter { + type Item = Bucket; + + #[inline] + fn next(&mut self) -> Option> { + if let Some(b) = self.iter.next() { + self.items -= 1; + Some(b) + } else { + // We don't check against items == 0 here to allow the + // compiler to optimize away the item count entirely if the + // iterator length is never queried. + debug_assert_eq!(self.items, 0); + None + } + } + + #[inline] + fn size_hint(&self) -> (usize, Option) { + (self.items, Some(self.items)) + } +} + +impl ExactSizeIterator for RawIter {} +impl FusedIterator for RawIter {} + +/// Iterator which consumes a table and returns elements. +pub struct RawIntoIter { + iter: RawIter, + alloc: Option<(NonNull, Layout)>, + marker: PhantomData, +} + +impl RawIntoIter { + #[inline] + pub fn iter(&self) -> RawIter { + self.iter.clone() + } +} + +unsafe impl Send for RawIntoIter where T: Send {} +unsafe impl Sync for RawIntoIter where T: Sync {} + +#[cfg(feature = "nightly")] +unsafe impl<#[may_dangle] T> Drop for RawIntoIter { + #[inline] + fn drop(&mut self) { + unsafe { + // Drop all remaining elements + if mem::needs_drop::() { + while let Some(item) = self.iter.next() { + item.drop(); + } + } + + // Free the table + if let Some((ptr, layout)) = self.alloc { + dealloc(ptr.as_ptr(), layout); + } + } + } +} +#[cfg(not(feature = "nightly"))] +impl Drop for RawIntoIter { + #[inline] + fn drop(&mut self) { + unsafe { + // Drop all remaining elements + if mem::needs_drop::() { + while let Some(item) = self.iter.next() { + item.drop(); + } + } + + // Free the table + if let Some((ptr, layout)) = self.alloc { + dealloc(ptr.as_ptr(), layout); + } + } + } +} + +impl Iterator for RawIntoIter { + type Item = T; + + #[inline] + fn next(&mut self) -> Option { + unsafe { Some(self.iter.next()?.read()) } + } + + #[inline] + fn size_hint(&self) -> (usize, Option) { + self.iter.size_hint() + } +} + +impl ExactSizeIterator for RawIntoIter {} +impl FusedIterator for RawIntoIter {} + +/// Iterator which consumes elements without freeing the table storage. +pub struct RawDrain<'a, T> { + iter: RawIter, + + // The table is moved into the iterator for the duration of the drain. This + // ensures that an empty table is left if the drain iterator is leaked + // without dropping. + table: ManuallyDrop>, + orig_table: NonNull>, + + // We don't use a &'a mut RawTable because we want RawDrain to be + // covariant over T. + marker: PhantomData<&'a RawTable>, +} + +impl RawDrain<'_, T> { + #[inline] + pub fn iter(&self) -> RawIter { + self.iter.clone() + } +} + +unsafe impl Send for RawDrain<'_, T> where T: Send {} +unsafe impl Sync for RawDrain<'_, T> where T: Sync {} + +impl Drop for RawDrain<'_, T> { + #[inline] + fn drop(&mut self) { + unsafe { + // Drop all remaining elements. Note that this may panic. + if mem::needs_drop::() { + while let Some(item) = self.iter.next() { + item.drop(); + } + } + + // Reset the contents of the table now that all elements have been + // dropped. + self.table.clear_no_drop(); + + // Move the now empty table back to its original location. + self.orig_table + .as_ptr() + .copy_from_nonoverlapping(&*self.table, 1); + } + } +} + +impl Iterator for RawDrain<'_, T> { + type Item = T; + + #[inline] + fn next(&mut self) -> Option { + unsafe { + let item = self.iter.next()?; + Some(item.read()) + } + } + + #[inline] + fn size_hint(&self) -> (usize, Option) { + self.iter.size_hint() + } +} + +impl ExactSizeIterator for RawDrain<'_, T> {} +impl FusedIterator for RawDrain<'_, T> {} diff --git a/vendor/hashbrown/src/raw/sse2.rs b/vendor/hashbrown/src/raw/sse2.rs new file mode 100644 index 0000000000..c9a1c54110 --- /dev/null +++ b/vendor/hashbrown/src/raw/sse2.rs @@ -0,0 +1,140 @@ +use super::bitmask::BitMask; +use super::EMPTY; +use core::mem; + +#[cfg(target_arch = "x86")] +use core::arch::x86; +#[cfg(target_arch = "x86_64")] +use core::arch::x86_64 as x86; + +pub type BitMaskWord = u16; +pub const BITMASK_STRIDE: usize = 1; +pub const BITMASK_MASK: BitMaskWord = 0xffff; + +/// Abstraction over a group of control bytes which can be scanned in +/// parallel. +/// +/// This implementation uses a 128-bit SSE value. +#[derive(Copy, Clone)] +pub struct Group(x86::__m128i); + +// FIXME: https://github.com/rust-lang/rust-clippy/issues/3859 +#[allow(clippy::use_self)] +impl Group { + /// Number of bytes in the group. + pub const WIDTH: usize = mem::size_of::(); + + /// Returns a full group of empty bytes, suitable for use as the initial + /// value for an empty hash table. + /// + /// This is guaranteed to be aligned to the group size. + #[inline] + pub fn static_empty() -> &'static [u8] { + union AlignedBytes { + _align: Group, + bytes: [u8; Group::WIDTH], + }; + const ALIGNED_BYTES: AlignedBytes = AlignedBytes { + bytes: [EMPTY; Group::WIDTH], + }; + unsafe { &ALIGNED_BYTES.bytes } + } + + /// Loads a group of bytes starting at the given address. + #[inline] + #[allow(clippy::cast_ptr_alignment)] // unaligned load + pub unsafe fn load(ptr: *const u8) -> Self { + Group(x86::_mm_loadu_si128(ptr as *const _)) + } + + /// Loads a group of bytes starting at the given address, which must be + /// aligned to `mem::align_of::()`. + #[inline] + #[allow(clippy::cast_ptr_alignment)] + pub unsafe fn load_aligned(ptr: *const u8) -> Self { + // FIXME: use align_offset once it stabilizes + debug_assert_eq!(ptr as usize & (mem::align_of::() - 1), 0); + Group(x86::_mm_load_si128(ptr as *const _)) + } + + /// Stores the group of bytes to the given address, which must be + /// aligned to `mem::align_of::()`. + #[inline] + #[allow(clippy::cast_ptr_alignment)] + pub unsafe fn store_aligned(self, ptr: *mut u8) { + // FIXME: use align_offset once it stabilizes + debug_assert_eq!(ptr as usize & (mem::align_of::() - 1), 0); + x86::_mm_store_si128(ptr as *mut _, self.0); + } + + /// Returns a `BitMask` indicating all bytes in the group which have + /// the given value. + #[inline] + pub fn match_byte(self, byte: u8) -> BitMask { + #[allow( + clippy::cast_possible_wrap, // byte: u8 as i8 + // byte: i32 as u16 + // note: _mm_movemask_epi8 returns a 16-bit mask in a i32, the + // upper 16-bits of the i32 are zeroed: + clippy::cast_sign_loss, + clippy::cast_possible_truncation + )] + unsafe { + let cmp = x86::_mm_cmpeq_epi8(self.0, x86::_mm_set1_epi8(byte as i8)); + BitMask(x86::_mm_movemask_epi8(cmp) as u16) + } + } + + /// Returns a `BitMask` indicating all bytes in the group which are + /// `EMPTY`. + #[inline] + pub fn match_empty(self) -> BitMask { + self.match_byte(EMPTY) + } + + /// Returns a `BitMask` indicating all bytes in the group which are + /// `EMPTY` or `DELETED`. + #[inline] + pub fn match_empty_or_deleted(self) -> BitMask { + #[allow( + // byte: i32 as u16 + // note: _mm_movemask_epi8 returns a 16-bit mask in a i32, the + // upper 16-bits of the i32 are zeroed: + clippy::cast_sign_loss, + clippy::cast_possible_truncation + )] + unsafe { + // A byte is EMPTY or DELETED iff the high bit is set + BitMask(x86::_mm_movemask_epi8(self.0) as u16) + } + } + + /// Returns a `BitMask` indicating all bytes in the group which are full. + #[inline] + pub fn match_full(&self) -> BitMask { + self.match_empty_or_deleted().invert() + } + + /// Performs the following transformation on all bytes in the group: + /// - `EMPTY => EMPTY` + /// - `DELETED => EMPTY` + /// - `FULL => DELETED` + #[inline] + pub fn convert_special_to_empty_and_full_to_deleted(self) -> Self { + // Map high_bit = 1 (EMPTY or DELETED) to 1111_1111 + // and high_bit = 0 (FULL) to 1000_0000 + // + // Here's this logic expanded to concrete values: + // let special = 0 > byte = 1111_1111 (true) or 0000_0000 (false) + // 1111_1111 | 1000_0000 = 1111_1111 + // 0000_0000 | 1000_0000 = 1000_0000 + #[allow( + clippy::cast_possible_wrap, // byte: 0x80_u8 as i8 + )] + unsafe { + let zero = x86::_mm_setzero_si128(); + let special = x86::_mm_cmpgt_epi8(zero, self.0); + Group(x86::_mm_or_si128(special, x86::_mm_set1_epi8(0x80_u8 as i8))) + } + } +} diff --git a/vendor/hashbrown/src/rustc_entry.rs b/vendor/hashbrown/src/rustc_entry.rs new file mode 100644 index 0000000000..5cc3bd51ae --- /dev/null +++ b/vendor/hashbrown/src/rustc_entry.rs @@ -0,0 +1,573 @@ +use self::RustcEntry::*; +use crate::map::{make_hash, Drain, HashMap, IntoIter, Iter, IterMut}; +use crate::raw::{Bucket, RawTable}; +use core::fmt::{self, Debug}; +use core::hash::{BuildHasher, Hash}; +use core::mem; + +impl HashMap +where + K: Eq + Hash, + S: BuildHasher, +{ + /// Gets the given key's corresponding entry in the map for in-place manipulation. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut letters = HashMap::new(); + /// + /// for ch in "a short treatise on fungi".chars() { + /// let counter = letters.rustc_entry(ch).or_insert(0); + /// *counter += 1; + /// } + /// + /// assert_eq!(letters[&'s'], 2); + /// assert_eq!(letters[&'t'], 3); + /// assert_eq!(letters[&'u'], 1); + /// assert_eq!(letters.get(&'y'), None); + /// ``` + #[inline] + pub fn rustc_entry(&mut self, key: K) -> RustcEntry<'_, K, V> { + let hash = make_hash(&self.hash_builder, &key); + if let Some(elem) = self.table.find(hash, |q| q.0.eq(&key)) { + RustcEntry::Occupied(RustcOccupiedEntry { + key: Some(key), + elem, + table: &mut self.table, + }) + } else { + // Ideally we would put this in VacantEntry::insert, but Entry is not + // generic over the BuildHasher and adding a generic parameter would be + // a breaking change. + self.reserve(1); + + RustcEntry::Vacant(RustcVacantEntry { + hash, + key, + table: &mut self.table, + }) + } + } +} + +/// A view into a single entry in a map, which may either be vacant or occupied. +/// +/// This `enum` is constructed from the [`entry`] method on [`HashMap`]. +/// +/// [`HashMap`]: struct.HashMap.html +/// [`entry`]: struct.HashMap.html#method.rustc_entry +pub enum RustcEntry<'a, K: 'a, V: 'a> { + /// An occupied entry. + Occupied(RustcOccupiedEntry<'a, K, V>), + + /// A vacant entry. + Vacant(RustcVacantEntry<'a, K, V>), +} + +impl Debug for RustcEntry<'_, K, V> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match *self { + Vacant(ref v) => f.debug_tuple("Entry").field(v).finish(), + Occupied(ref o) => f.debug_tuple("Entry").field(o).finish(), + } + } +} + +/// A view into an occupied entry in a `HashMap`. +/// It is part of the [`RustcEntry`] enum. +/// +/// [`RustcEntry`]: enum.RustcEntry.html +pub struct RustcOccupiedEntry<'a, K, V> { + key: Option, + elem: Bucket<(K, V)>, + table: &'a mut RawTable<(K, V)>, +} + +unsafe impl Send for RustcOccupiedEntry<'_, K, V> +where + K: Send, + V: Send, +{ +} +unsafe impl Sync for RustcOccupiedEntry<'_, K, V> +where + K: Sync, + V: Sync, +{ +} + +impl Debug for RustcOccupiedEntry<'_, K, V> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("OccupiedEntry") + .field("key", self.key()) + .field("value", self.get()) + .finish() + } +} + +/// A view into a vacant entry in a `HashMap`. +/// It is part of the [`RustcEntry`] enum. +/// +/// [`RustcEntry`]: enum.RustcEntry.html +pub struct RustcVacantEntry<'a, K, V> { + hash: u64, + key: K, + table: &'a mut RawTable<(K, V)>, +} + +impl Debug for RustcVacantEntry<'_, K, V> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_tuple("VacantEntry").field(self.key()).finish() + } +} + +impl<'a, K, V> RustcEntry<'a, K, V> { + /// Ensures a value is in the entry by inserting the default if empty, and returns + /// a mutable reference to the value in the entry. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// + /// map.rustc_entry("poneyland").or_insert(3); + /// assert_eq!(map["poneyland"], 3); + /// + /// *map.rustc_entry("poneyland").or_insert(10) *= 2; + /// assert_eq!(map["poneyland"], 6); + /// ``` + #[inline] + pub fn or_insert(self, default: V) -> &'a mut V + where + K: Hash, + { + match self { + Occupied(entry) => entry.into_mut(), + Vacant(entry) => entry.insert(default), + } + } + + /// Ensures a value is in the entry by inserting the result of the default function if empty, + /// and returns a mutable reference to the value in the entry. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap<&str, String> = HashMap::new(); + /// let s = "hoho".to_string(); + /// + /// map.rustc_entry("poneyland").or_insert_with(|| s); + /// + /// assert_eq!(map["poneyland"], "hoho".to_string()); + /// ``` + #[inline] + pub fn or_insert_with V>(self, default: F) -> &'a mut V + where + K: Hash, + { + match self { + Occupied(entry) => entry.into_mut(), + Vacant(entry) => entry.insert(default()), + } + } + + /// Returns a reference to this entry's key. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// assert_eq!(map.rustc_entry("poneyland").key(), &"poneyland"); + /// ``` + #[inline] + pub fn key(&self) -> &K { + match *self { + Occupied(ref entry) => entry.key(), + Vacant(ref entry) => entry.key(), + } + } + + /// Provides in-place mutable access to an occupied entry before any + /// potential inserts into the map. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// + /// map.rustc_entry("poneyland") + /// .and_modify(|e| { *e += 1 }) + /// .or_insert(42); + /// assert_eq!(map["poneyland"], 42); + /// + /// map.rustc_entry("poneyland") + /// .and_modify(|e| { *e += 1 }) + /// .or_insert(42); + /// assert_eq!(map["poneyland"], 43); + /// ``` + #[inline] + pub fn and_modify(self, f: F) -> Self + where + F: FnOnce(&mut V), + { + match self { + Occupied(mut entry) => { + f(entry.get_mut()); + Occupied(entry) + } + Vacant(entry) => Vacant(entry), + } + } +} + +impl<'a, K, V: Default> RustcEntry<'a, K, V> { + /// Ensures a value is in the entry by inserting the default value if empty, + /// and returns a mutable reference to the value in the entry. + /// + /// # Examples + /// + /// ``` + /// # fn main() { + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap<&str, Option> = HashMap::new(); + /// map.rustc_entry("poneyland").or_default(); + /// + /// assert_eq!(map["poneyland"], None); + /// # } + /// ``` + #[inline] + pub fn or_default(self) -> &'a mut V + where + K: Hash, + { + match self { + Occupied(entry) => entry.into_mut(), + Vacant(entry) => entry.insert(Default::default()), + } + } +} + +impl<'a, K, V> RustcOccupiedEntry<'a, K, V> { + /// Gets a reference to the key in the entry. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// map.rustc_entry("poneyland").or_insert(12); + /// assert_eq!(map.rustc_entry("poneyland").key(), &"poneyland"); + /// ``` + #[inline] + pub fn key(&self) -> &K { + unsafe { &self.elem.as_ref().0 } + } + + /// Take the ownership of the key and value from the map. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::RustcEntry; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// map.rustc_entry("poneyland").or_insert(12); + /// + /// if let RustcEntry::Occupied(o) = map.rustc_entry("poneyland") { + /// // We delete the entry from the map. + /// o.remove_entry(); + /// } + /// + /// assert_eq!(map.contains_key("poneyland"), false); + /// ``` + #[inline] + pub fn remove_entry(self) -> (K, V) { + unsafe { + self.table.erase_no_drop(&self.elem); + self.elem.read() + } + } + + /// Gets a reference to the value in the entry. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::RustcEntry; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// map.rustc_entry("poneyland").or_insert(12); + /// + /// if let RustcEntry::Occupied(o) = map.rustc_entry("poneyland") { + /// assert_eq!(o.get(), &12); + /// } + /// ``` + #[inline] + pub fn get(&self) -> &V { + unsafe { &self.elem.as_ref().1 } + } + + /// Gets a mutable reference to the value in the entry. + /// + /// If you need a reference to the `RustcOccupiedEntry` which may outlive the + /// destruction of the `RustcEntry` value, see [`into_mut`]. + /// + /// [`into_mut`]: #method.into_mut + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::RustcEntry; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// map.rustc_entry("poneyland").or_insert(12); + /// + /// assert_eq!(map["poneyland"], 12); + /// if let RustcEntry::Occupied(mut o) = map.rustc_entry("poneyland") { + /// *o.get_mut() += 10; + /// assert_eq!(*o.get(), 22); + /// + /// // We can use the same RustcEntry multiple times. + /// *o.get_mut() += 2; + /// } + /// + /// assert_eq!(map["poneyland"], 24); + /// ``` + #[inline] + pub fn get_mut(&mut self) -> &mut V { + unsafe { &mut self.elem.as_mut().1 } + } + + /// Converts the RustcOccupiedEntry into a mutable reference to the value in the entry + /// with a lifetime bound to the map itself. + /// + /// If you need multiple references to the `RustcOccupiedEntry`, see [`get_mut`]. + /// + /// [`get_mut`]: #method.get_mut + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::RustcEntry; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// map.rustc_entry("poneyland").or_insert(12); + /// + /// assert_eq!(map["poneyland"], 12); + /// if let RustcEntry::Occupied(o) = map.rustc_entry("poneyland") { + /// *o.into_mut() += 10; + /// } + /// + /// assert_eq!(map["poneyland"], 22); + /// ``` + #[inline] + pub fn into_mut(self) -> &'a mut V { + unsafe { &mut self.elem.as_mut().1 } + } + + /// Sets the value of the entry, and returns the entry's old value. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::RustcEntry; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// map.rustc_entry("poneyland").or_insert(12); + /// + /// if let RustcEntry::Occupied(mut o) = map.rustc_entry("poneyland") { + /// assert_eq!(o.insert(15), 12); + /// } + /// + /// assert_eq!(map["poneyland"], 15); + /// ``` + #[inline] + pub fn insert(&mut self, mut value: V) -> V { + let old_value = self.get_mut(); + mem::swap(&mut value, old_value); + value + } + + /// Takes the value out of the entry, and returns it. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::RustcEntry; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// map.rustc_entry("poneyland").or_insert(12); + /// + /// if let RustcEntry::Occupied(o) = map.rustc_entry("poneyland") { + /// assert_eq!(o.remove(), 12); + /// } + /// + /// assert_eq!(map.contains_key("poneyland"), false); + /// ``` + #[inline] + pub fn remove(self) -> V { + self.remove_entry().1 + } + + /// Replaces the entry, returning the old key and value. The new key in the hash map will be + /// the key used to create this entry. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::hash_map::{RustcEntry, HashMap}; + /// use std::rc::Rc; + /// + /// let mut map: HashMap, u32> = HashMap::new(); + /// map.insert(Rc::new("Stringthing".to_string()), 15); + /// + /// let my_key = Rc::new("Stringthing".to_string()); + /// + /// if let RustcEntry::Occupied(entry) = map.rustc_entry(my_key) { + /// // Also replace the key with a handle to our other key. + /// let (old_key, old_value): (Rc, u32) = entry.replace_entry(16); + /// } + /// + /// ``` + #[inline] + pub fn replace_entry(self, value: V) -> (K, V) { + let entry = unsafe { self.elem.as_mut() }; + + let old_key = mem::replace(&mut entry.0, self.key.unwrap()); + let old_value = mem::replace(&mut entry.1, value); + + (old_key, old_value) + } + + /// Replaces the key in the hash map with the key used to create this entry. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::hash_map::{RustcEntry, HashMap}; + /// use std::rc::Rc; + /// + /// let mut map: HashMap, u32> = HashMap::new(); + /// let mut known_strings: Vec> = Vec::new(); + /// + /// // Initialise known strings, run program, etc. + /// + /// reclaim_memory(&mut map, &known_strings); + /// + /// fn reclaim_memory(map: &mut HashMap, u32>, known_strings: &[Rc] ) { + /// for s in known_strings { + /// if let RustcEntry::Occupied(entry) = map.rustc_entry(s.clone()) { + /// // Replaces the entry's key with our version of it in `known_strings`. + /// entry.replace_key(); + /// } + /// } + /// } + /// ``` + #[inline] + pub fn replace_key(self) -> K { + let entry = unsafe { self.elem.as_mut() }; + mem::replace(&mut entry.0, self.key.unwrap()) + } +} + +impl<'a, K, V> RustcVacantEntry<'a, K, V> { + /// Gets a reference to the key that would be used when inserting a value + /// through the `RustcVacantEntry`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// assert_eq!(map.rustc_entry("poneyland").key(), &"poneyland"); + /// ``` + #[inline] + pub fn key(&self) -> &K { + &self.key + } + + /// Take ownership of the key. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::RustcEntry; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// + /// if let RustcEntry::Vacant(v) = map.rustc_entry("poneyland") { + /// v.into_key(); + /// } + /// ``` + #[inline] + pub fn into_key(self) -> K { + self.key + } + + /// Sets the value of the entry with the RustcVacantEntry's key, + /// and returns a mutable reference to it. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashMap; + /// use hashbrown::hash_map::RustcEntry; + /// + /// let mut map: HashMap<&str, u32> = HashMap::new(); + /// + /// if let RustcEntry::Vacant(o) = map.rustc_entry("poneyland") { + /// o.insert(37); + /// } + /// assert_eq!(map["poneyland"], 37); + /// ``` + #[inline] + pub fn insert(self, value: V) -> &'a mut V { + let bucket = self.table.insert_no_grow(self.hash, (self.key, value)); + unsafe { &mut bucket.as_mut().1 } + } +} + +impl IterMut<'_, K, V> { + /// Returns a iterator of references over the remaining items. + #[inline] + pub fn rustc_iter(&self) -> Iter<'_, K, V> { + self.iter() + } +} + +impl IntoIter { + /// Returns a iterator of references over the remaining items. + #[inline] + pub fn rustc_iter(&self) -> Iter<'_, K, V> { + self.iter() + } +} + +impl Drain<'_, K, V> { + /// Returns a iterator of references over the remaining items. + #[inline] + pub fn rustc_iter(&self) -> Iter<'_, K, V> { + self.iter() + } +} diff --git a/vendor/hashbrown/src/scopeguard.rs b/vendor/hashbrown/src/scopeguard.rs new file mode 100644 index 0000000000..4e9bf045ad --- /dev/null +++ b/vendor/hashbrown/src/scopeguard.rs @@ -0,0 +1,49 @@ +// Extracted from the scopeguard crate +use core::ops::{Deref, DerefMut}; + +pub struct ScopeGuard +where + F: FnMut(&mut T), +{ + dropfn: F, + value: T, +} + +#[inline] +pub fn guard(value: T, dropfn: F) -> ScopeGuard +where + F: FnMut(&mut T), +{ + ScopeGuard { dropfn, value } +} + +impl Deref for ScopeGuard +where + F: FnMut(&mut T), +{ + type Target = T; + #[inline] + fn deref(&self) -> &T { + &self.value + } +} + +impl DerefMut for ScopeGuard +where + F: FnMut(&mut T), +{ + #[inline] + fn deref_mut(&mut self) -> &mut T { + &mut self.value + } +} + +impl Drop for ScopeGuard +where + F: FnMut(&mut T), +{ + #[inline] + fn drop(&mut self) { + (self.dropfn)(&mut self.value) + } +} diff --git a/vendor/hashbrown/src/set.rs b/vendor/hashbrown/src/set.rs new file mode 100644 index 0000000000..ade77267ac --- /dev/null +++ b/vendor/hashbrown/src/set.rs @@ -0,0 +1,1829 @@ +use crate::CollectionAllocErr; +use core::borrow::Borrow; +use core::fmt; +use core::hash::{BuildHasher, Hash}; +use core::iter::{Chain, FromIterator, FusedIterator}; +use core::ops::{BitAnd, BitOr, BitXor, Sub}; + +use super::map::{self, DefaultHashBuilder, HashMap, Keys}; + +// Future Optimization (FIXME!) +// ============================= +// +// Iteration over zero sized values is a noop. There is no need +// for `bucket.val` in the case of HashSet. I suppose we would need HKT +// to get rid of it properly. + +/// A hash set implemented as a `HashMap` where the value is `()`. +/// +/// As with the [`HashMap`] type, a `HashSet` requires that the elements +/// implement the [`Eq`] and [`Hash`] traits. This can frequently be achieved by +/// using `#[derive(PartialEq, Eq, Hash)]`. If you implement these yourself, +/// it is important that the following property holds: +/// +/// ```text +/// k1 == k2 -> hash(k1) == hash(k2) +/// ``` +/// +/// In other words, if two keys are equal, their hashes must be equal. +/// +/// +/// It is a logic error for an item to be modified in such a way that the +/// item's hash, as determined by the [`Hash`] trait, or its equality, as +/// determined by the [`Eq`] trait, changes while it is in the set. This is +/// normally only possible through [`Cell`], [`RefCell`], global state, I/O, or +/// unsafe code. +/// +/// It is also a logic error for the [`Hash`] implementation of a key to panic. +/// This is generally only possible if the trait is implemented manually. If a +/// panic does occur then the contents of the `HashSet` may become corrupted and +/// some items may be dropped from the table. +/// +/// # Examples +/// +/// ``` +/// use hashbrown::HashSet; +/// // Type inference lets us omit an explicit type signature (which +/// // would be `HashSet` in this example). +/// let mut books = HashSet::new(); +/// +/// // Add some books. +/// books.insert("A Dance With Dragons".to_string()); +/// books.insert("To Kill a Mockingbird".to_string()); +/// books.insert("The Odyssey".to_string()); +/// books.insert("The Great Gatsby".to_string()); +/// +/// // Check for a specific one. +/// if !books.contains("The Winds of Winter") { +/// println!("We have {} books, but The Winds of Winter ain't one.", +/// books.len()); +/// } +/// +/// // Remove a book. +/// books.remove("The Odyssey"); +/// +/// // Iterate over everything. +/// for book in &books { +/// println!("{}", book); +/// } +/// ``` +/// +/// The easiest way to use `HashSet` with a custom type is to derive +/// [`Eq`] and [`Hash`]. We must also derive [`PartialEq`], this will in the +/// future be implied by [`Eq`]. +/// +/// ``` +/// use hashbrown::HashSet; +/// #[derive(Hash, Eq, PartialEq, Debug)] +/// struct Viking { +/// name: String, +/// power: usize, +/// } +/// +/// let mut vikings = HashSet::new(); +/// +/// vikings.insert(Viking { name: "Einar".to_string(), power: 9 }); +/// vikings.insert(Viking { name: "Einar".to_string(), power: 9 }); +/// vikings.insert(Viking { name: "Olaf".to_string(), power: 4 }); +/// vikings.insert(Viking { name: "Harald".to_string(), power: 8 }); +/// +/// // Use derived implementation to print the vikings. +/// for x in &vikings { +/// println!("{:?}", x); +/// } +/// ``` +/// +/// A `HashSet` with fixed list of elements can be initialized from an array: +/// +/// ``` +/// use hashbrown::HashSet; +/// +/// fn main() { +/// let viking_names: HashSet<&'static str> = +/// [ "Einar", "Olaf", "Harald" ].iter().cloned().collect(); +/// // use the values stored in the set +/// } +/// ``` +/// +/// [`Cell`]: https://doc.rust-lang.org/std/cell/struct.Cell.html +/// [`Eq`]: https://doc.rust-lang.org/std/cmp/trait.Eq.html +/// [`Hash`]: https://doc.rust-lang.org/std/hash/trait.Hash.html +/// [`HashMap`]: struct.HashMap.html +/// [`PartialEq`]: https://doc.rust-lang.org/std/cmp/trait.PartialEq.html +/// [`RefCell`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html +#[derive(Clone)] +pub struct HashSet { + pub(crate) map: HashMap, +} + +impl HashSet { + /// Creates an empty `HashSet`. + /// + /// The hash set is initially created with a capacity of 0, so it will not allocate until it + /// is first inserted into. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// let set: HashSet = HashSet::new(); + /// ``` + #[inline] + pub fn new() -> Self { + Self { + map: HashMap::new(), + } + } + + /// Creates an empty `HashSet` with the specified capacity. + /// + /// The hash set will be able to hold at least `capacity` elements without + /// reallocating. If `capacity` is 0, the hash set will not allocate. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// let set: HashSet = HashSet::with_capacity(10); + /// assert!(set.capacity() >= 10); + /// ``` + #[inline] + pub fn with_capacity(capacity: usize) -> Self { + Self { + map: HashMap::with_capacity(capacity), + } + } +} + +impl HashSet { + /// Returns the number of elements the set can hold without reallocating. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// let set: HashSet = HashSet::with_capacity(100); + /// assert!(set.capacity() >= 100); + /// ``` + #[inline] + pub fn capacity(&self) -> usize { + self.map.capacity() + } + + /// An iterator visiting all elements in arbitrary order. + /// The iterator element type is `&'a T`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// let mut set = HashSet::new(); + /// set.insert("a"); + /// set.insert("b"); + /// + /// // Will print in an arbitrary order. + /// for x in set.iter() { + /// println!("{}", x); + /// } + /// ``` + #[inline] + pub fn iter(&self) -> Iter<'_, T> { + Iter { + iter: self.map.keys(), + } + } + + /// Returns the number of elements in the set. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let mut v = HashSet::new(); + /// assert_eq!(v.len(), 0); + /// v.insert(1); + /// assert_eq!(v.len(), 1); + /// ``` + #[inline] + pub fn len(&self) -> usize { + self.map.len() + } + + /// Returns `true` if the set contains no elements. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let mut v = HashSet::new(); + /// assert!(v.is_empty()); + /// v.insert(1); + /// assert!(!v.is_empty()); + /// ``` + #[inline] + pub fn is_empty(&self) -> bool { + self.map.is_empty() + } + + /// Clears the set, returning all elements in an iterator. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let mut set: HashSet<_> = [1, 2, 3].iter().cloned().collect(); + /// assert!(!set.is_empty()); + /// + /// // print 1, 2, 3 in an arbitrary order + /// for i in set.drain() { + /// println!("{}", i); + /// } + /// + /// assert!(set.is_empty()); + /// ``` + #[inline] + pub fn drain(&mut self) -> Drain<'_, T> { + Drain { + iter: self.map.drain(), + } + } + + /// Clears the set, removing all values. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let mut v = HashSet::new(); + /// v.insert(1); + /// v.clear(); + /// assert!(v.is_empty()); + /// ``` + #[inline] + pub fn clear(&mut self) { + self.map.clear() + } +} + +impl HashSet +where + T: Eq + Hash, + S: BuildHasher, +{ + /// Creates a new empty hash set which will use the given hasher to hash + /// keys. + /// + /// The hash set is also created with the default initial capacity. + /// + /// Warning: `hasher` is normally randomly generated, and + /// is designed to allow `HashSet`s to be resistant to attacks that + /// cause many collisions and very poor performance. Setting it + /// manually using this function can expose a DoS attack vector. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// use hashbrown::hash_map::DefaultHashBuilder; + /// + /// let s = DefaultHashBuilder::default(); + /// let mut set = HashSet::with_hasher(s); + /// set.insert(2); + /// ``` + #[inline] + pub fn with_hasher(hasher: S) -> Self { + Self { + map: HashMap::with_hasher(hasher), + } + } + + /// Creates an empty `HashSet` with the specified capacity, using + /// `hasher` to hash the keys. + /// + /// The hash set will be able to hold at least `capacity` elements without + /// reallocating. If `capacity` is 0, the hash set will not allocate. + /// + /// Warning: `hasher` is normally randomly generated, and + /// is designed to allow `HashSet`s to be resistant to attacks that + /// cause many collisions and very poor performance. Setting it + /// manually using this function can expose a DoS attack vector. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// use hashbrown::hash_map::DefaultHashBuilder; + /// + /// let s = DefaultHashBuilder::default(); + /// let mut set = HashSet::with_capacity_and_hasher(10, s); + /// set.insert(1); + /// ``` + #[inline] + pub fn with_capacity_and_hasher(capacity: usize, hasher: S) -> Self { + Self { + map: HashMap::with_capacity_and_hasher(capacity, hasher), + } + } + + /// Returns a reference to the set's [`BuildHasher`]. + /// + /// [`BuildHasher`]: https://doc.rust-lang.org/std/hash/trait.BuildHasher.html + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// use hashbrown::hash_map::DefaultHashBuilder; + /// + /// let hasher = DefaultHashBuilder::default(); + /// let set: HashSet = HashSet::with_hasher(hasher); + /// let hasher: &DefaultHashBuilder = set.hasher(); + /// ``` + #[inline] + pub fn hasher(&self) -> &S { + self.map.hasher() + } + + /// Reserves capacity for at least `additional` more elements to be inserted + /// in the `HashSet`. The collection may reserve more space to avoid + /// frequent reallocations. + /// + /// # Panics + /// + /// Panics if the new allocation size overflows `usize`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// let mut set: HashSet = HashSet::new(); + /// set.reserve(10); + /// assert!(set.capacity() >= 10); + /// ``` + #[inline] + pub fn reserve(&mut self, additional: usize) { + self.map.reserve(additional) + } + + /// Tries to reserve capacity for at least `additional` more elements to be inserted + /// in the given `HashSet`. The collection may reserve more space to avoid + /// frequent reallocations. + /// + /// # Errors + /// + /// If the capacity overflows, or the allocator reports a failure, then an error + /// is returned. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// let mut set: HashSet = HashSet::new(); + /// set.try_reserve(10).expect("why is the test harness OOMing on 10 bytes?"); + /// ``` + #[inline] + pub fn try_reserve(&mut self, additional: usize) -> Result<(), CollectionAllocErr> { + self.map.try_reserve(additional) + } + + /// Shrinks the capacity of the set as much as possible. It will drop + /// down as much as possible while maintaining the internal rules + /// and possibly leaving some space in accordance with the resize policy. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let mut set = HashSet::with_capacity(100); + /// set.insert(1); + /// set.insert(2); + /// assert!(set.capacity() >= 100); + /// set.shrink_to_fit(); + /// assert!(set.capacity() >= 2); + /// ``` + #[inline] + pub fn shrink_to_fit(&mut self) { + self.map.shrink_to_fit() + } + + /// Shrinks the capacity of the set with a lower limit. It will drop + /// down no lower than the supplied limit while maintaining the internal rules + /// and possibly leaving some space in accordance with the resize policy. + /// + /// Panics if the current capacity is smaller than the supplied + /// minimum capacity. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let mut set = HashSet::with_capacity(100); + /// set.insert(1); + /// set.insert(2); + /// assert!(set.capacity() >= 100); + /// set.shrink_to(10); + /// assert!(set.capacity() >= 10); + /// set.shrink_to(0); + /// assert!(set.capacity() >= 2); + /// ``` + #[inline] + pub fn shrink_to(&mut self, min_capacity: usize) { + self.map.shrink_to(min_capacity) + } + + /// Visits the values representing the difference, + /// i.e., the values that are in `self` but not in `other`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// let a: HashSet<_> = [1, 2, 3].iter().cloned().collect(); + /// let b: HashSet<_> = [4, 2, 3, 4].iter().cloned().collect(); + /// + /// // Can be seen as `a - b`. + /// for x in a.difference(&b) { + /// println!("{}", x); // Print 1 + /// } + /// + /// let diff: HashSet<_> = a.difference(&b).collect(); + /// assert_eq!(diff, [1].iter().collect()); + /// + /// // Note that difference is not symmetric, + /// // and `b - a` means something else: + /// let diff: HashSet<_> = b.difference(&a).collect(); + /// assert_eq!(diff, [4].iter().collect()); + /// ``` + #[inline] + pub fn difference<'a>(&'a self, other: &'a Self) -> Difference<'a, T, S> { + Difference { + iter: self.iter(), + other, + } + } + + /// Visits the values representing the symmetric difference, + /// i.e., the values that are in `self` or in `other` but not in both. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// let a: HashSet<_> = [1, 2, 3].iter().cloned().collect(); + /// let b: HashSet<_> = [4, 2, 3, 4].iter().cloned().collect(); + /// + /// // Print 1, 4 in arbitrary order. + /// for x in a.symmetric_difference(&b) { + /// println!("{}", x); + /// } + /// + /// let diff1: HashSet<_> = a.symmetric_difference(&b).collect(); + /// let diff2: HashSet<_> = b.symmetric_difference(&a).collect(); + /// + /// assert_eq!(diff1, diff2); + /// assert_eq!(diff1, [1, 4].iter().collect()); + /// ``` + #[inline] + pub fn symmetric_difference<'a>(&'a self, other: &'a Self) -> SymmetricDifference<'a, T, S> { + SymmetricDifference { + iter: self.difference(other).chain(other.difference(self)), + } + } + + /// Visits the values representing the intersection, + /// i.e., the values that are both in `self` and `other`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// let a: HashSet<_> = [1, 2, 3].iter().cloned().collect(); + /// let b: HashSet<_> = [4, 2, 3, 4].iter().cloned().collect(); + /// + /// // Print 2, 3 in arbitrary order. + /// for x in a.intersection(&b) { + /// println!("{}", x); + /// } + /// + /// let intersection: HashSet<_> = a.intersection(&b).collect(); + /// assert_eq!(intersection, [2, 3].iter().collect()); + /// ``` + #[inline] + pub fn intersection<'a>(&'a self, other: &'a Self) -> Intersection<'a, T, S> { + Intersection { + iter: self.iter(), + other, + } + } + + /// Visits the values representing the union, + /// i.e., all the values in `self` or `other`, without duplicates. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// let a: HashSet<_> = [1, 2, 3].iter().cloned().collect(); + /// let b: HashSet<_> = [4, 2, 3, 4].iter().cloned().collect(); + /// + /// // Print 1, 2, 3, 4 in arbitrary order. + /// for x in a.union(&b) { + /// println!("{}", x); + /// } + /// + /// let union: HashSet<_> = a.union(&b).collect(); + /// assert_eq!(union, [1, 2, 3, 4].iter().collect()); + /// ``` + #[inline] + pub fn union<'a>(&'a self, other: &'a Self) -> Union<'a, T, S> { + Union { + iter: self.iter().chain(other.difference(self)), + } + } + + /// Returns `true` if the set contains a value. + /// + /// The value may be any borrowed form of the set's value type, but + /// [`Hash`] and [`Eq`] on the borrowed form *must* match those for + /// the value type. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let set: HashSet<_> = [1, 2, 3].iter().cloned().collect(); + /// assert_eq!(set.contains(&1), true); + /// assert_eq!(set.contains(&4), false); + /// ``` + /// + /// [`Eq`]: https://doc.rust-lang.org/std/cmp/trait.Eq.html + /// [`Hash`]: https://doc.rust-lang.org/std/hash/trait.Hash.html + #[inline] + pub fn contains(&self, value: &Q) -> bool + where + T: Borrow, + Q: Hash + Eq, + { + self.map.contains_key(value) + } + + /// Returns a reference to the value in the set, if any, that is equal to the given value. + /// + /// The value may be any borrowed form of the set's value type, but + /// [`Hash`] and [`Eq`] on the borrowed form *must* match those for + /// the value type. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let set: HashSet<_> = [1, 2, 3].iter().cloned().collect(); + /// assert_eq!(set.get(&2), Some(&2)); + /// assert_eq!(set.get(&4), None); + /// ``` + /// + /// [`Eq`]: https://doc.rust-lang.org/std/cmp/trait.Eq.html + /// [`Hash`]: https://doc.rust-lang.org/std/hash/trait.Hash.html + #[inline] + pub fn get(&self, value: &Q) -> Option<&T> + where + T: Borrow, + Q: Hash + Eq, + { + self.map.get_key_value(value).map(|(k, _)| k) + } + + /// Returns `true` if `self` has no elements in common with `other`. + /// This is equivalent to checking for an empty intersection. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let a: HashSet<_> = [1, 2, 3].iter().cloned().collect(); + /// let mut b = HashSet::new(); + /// + /// assert_eq!(a.is_disjoint(&b), true); + /// b.insert(4); + /// assert_eq!(a.is_disjoint(&b), true); + /// b.insert(1); + /// assert_eq!(a.is_disjoint(&b), false); + /// ``` + pub fn is_disjoint(&self, other: &Self) -> bool { + self.iter().all(|v| !other.contains(v)) + } + + /// Returns `true` if the set is a subset of another, + /// i.e., `other` contains at least all the values in `self`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let sup: HashSet<_> = [1, 2, 3].iter().cloned().collect(); + /// let mut set = HashSet::new(); + /// + /// assert_eq!(set.is_subset(&sup), true); + /// set.insert(2); + /// assert_eq!(set.is_subset(&sup), true); + /// set.insert(4); + /// assert_eq!(set.is_subset(&sup), false); + /// ``` + pub fn is_subset(&self, other: &Self) -> bool { + if self.len() <= other.len() { + self.iter().all(|v| other.contains(v)) + } else { + false + } + } + + /// Returns `true` if the set is a superset of another, + /// i.e., `self` contains at least all the values in `other`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let sub: HashSet<_> = [1, 2].iter().cloned().collect(); + /// let mut set = HashSet::new(); + /// + /// assert_eq!(set.is_superset(&sub), false); + /// + /// set.insert(0); + /// set.insert(1); + /// assert_eq!(set.is_superset(&sub), false); + /// + /// set.insert(2); + /// assert_eq!(set.is_superset(&sub), true); + /// ``` + #[inline] + pub fn is_superset(&self, other: &Self) -> bool { + other.is_subset(self) + } + + /// Adds a value to the set. + /// + /// If the set did not have this value present, `true` is returned. + /// + /// If the set did have this value present, `false` is returned. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let mut set = HashSet::new(); + /// + /// assert_eq!(set.insert(2), true); + /// assert_eq!(set.insert(2), false); + /// assert_eq!(set.len(), 1); + /// ``` + #[inline] + pub fn insert(&mut self, value: T) -> bool { + self.map.insert(value, ()).is_none() + } + + /// Adds a value to the set, replacing the existing value, if any, that is equal to the given + /// one. Returns the replaced value. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let mut set = HashSet::new(); + /// set.insert(Vec::::new()); + /// + /// assert_eq!(set.get(&[][..]).unwrap().capacity(), 0); + /// set.replace(Vec::with_capacity(10)); + /// assert_eq!(set.get(&[][..]).unwrap().capacity(), 10); + /// ``` + #[inline] + pub fn replace(&mut self, value: T) -> Option { + match self.map.entry(value) { + map::Entry::Occupied(occupied) => Some(occupied.replace_key()), + map::Entry::Vacant(vacant) => { + vacant.insert(()); + None + } + } + } + + /// Removes a value from the set. Returns whether the value was + /// present in the set. + /// + /// The value may be any borrowed form of the set's value type, but + /// [`Hash`] and [`Eq`] on the borrowed form *must* match those for + /// the value type. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let mut set = HashSet::new(); + /// + /// set.insert(2); + /// assert_eq!(set.remove(&2), true); + /// assert_eq!(set.remove(&2), false); + /// ``` + /// + /// [`Eq`]: https://doc.rust-lang.org/std/cmp/trait.Eq.html + /// [`Hash`]: https://doc.rust-lang.org/std/hash/trait.Hash.html + #[inline] + pub fn remove(&mut self, value: &Q) -> bool + where + T: Borrow, + Q: Hash + Eq, + { + self.map.remove(value).is_some() + } + + /// Removes and returns the value in the set, if any, that is equal to the given one. + /// + /// The value may be any borrowed form of the set's value type, but + /// [`Hash`] and [`Eq`] on the borrowed form *must* match those for + /// the value type. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let mut set: HashSet<_> = [1, 2, 3].iter().cloned().collect(); + /// assert_eq!(set.take(&2), Some(2)); + /// assert_eq!(set.take(&2), None); + /// ``` + /// + /// [`Eq`]: https://doc.rust-lang.org/std/cmp/trait.Eq.html + /// [`Hash`]: https://doc.rust-lang.org/std/hash/trait.Hash.html + #[inline] + pub fn take(&mut self, value: &Q) -> Option + where + T: Borrow, + Q: Hash + Eq, + { + self.map.remove_entry(value).map(|(k, _)| k) + } + + /// Retains only the elements specified by the predicate. + /// + /// In other words, remove all elements `e` such that `f(&e)` returns `false`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let xs = [1,2,3,4,5,6]; + /// let mut set: HashSet = xs.iter().cloned().collect(); + /// set.retain(|&k| k % 2 == 0); + /// assert_eq!(set.len(), 3); + /// ``` + pub fn retain(&mut self, mut f: F) + where + F: FnMut(&T) -> bool, + { + self.map.retain(|k, _| f(k)); + } +} + +impl PartialEq for HashSet +where + T: Eq + Hash, + S: BuildHasher, +{ + fn eq(&self, other: &Self) -> bool { + if self.len() != other.len() { + return false; + } + + self.iter().all(|key| other.contains(key)) + } +} + +impl Eq for HashSet +where + T: Eq + Hash, + S: BuildHasher, +{ +} + +impl fmt::Debug for HashSet +where + T: Eq + Hash + fmt::Debug, + S: BuildHasher, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_set().entries(self.iter()).finish() + } +} + +impl FromIterator for HashSet +where + T: Eq + Hash, + S: BuildHasher + Default, +{ + #[inline] + fn from_iter>(iter: I) -> Self { + let mut set = Self::with_hasher(Default::default()); + set.extend(iter); + set + } +} + +impl Extend for HashSet +where + T: Eq + Hash, + S: BuildHasher, +{ + #[inline] + fn extend>(&mut self, iter: I) { + self.map.extend(iter.into_iter().map(|k| (k, ()))); + } +} + +impl<'a, T, S> Extend<&'a T> for HashSet +where + T: 'a + Eq + Hash + Copy, + S: BuildHasher, +{ + #[inline] + fn extend>(&mut self, iter: I) { + self.extend(iter.into_iter().cloned()); + } +} + +impl Default for HashSet +where + T: Eq + Hash, + S: BuildHasher + Default, +{ + /// Creates an empty `HashSet` with the `Default` value for the hasher. + #[inline] + fn default() -> Self { + Self { + map: HashMap::default(), + } + } +} + +impl BitOr<&HashSet> for &HashSet +where + T: Eq + Hash + Clone, + S: BuildHasher + Default, +{ + type Output = HashSet; + + /// Returns the union of `self` and `rhs` as a new `HashSet`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let a: HashSet<_> = vec![1, 2, 3].into_iter().collect(); + /// let b: HashSet<_> = vec![3, 4, 5].into_iter().collect(); + /// + /// let set = &a | &b; + /// + /// let mut i = 0; + /// let expected = [1, 2, 3, 4, 5]; + /// for x in &set { + /// assert!(expected.contains(x)); + /// i += 1; + /// } + /// assert_eq!(i, expected.len()); + /// ``` + fn bitor(self, rhs: &HashSet) -> HashSet { + self.union(rhs).cloned().collect() + } +} + +impl BitAnd<&HashSet> for &HashSet +where + T: Eq + Hash + Clone, + S: BuildHasher + Default, +{ + type Output = HashSet; + + /// Returns the intersection of `self` and `rhs` as a new `HashSet`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let a: HashSet<_> = vec![1, 2, 3].into_iter().collect(); + /// let b: HashSet<_> = vec![2, 3, 4].into_iter().collect(); + /// + /// let set = &a & &b; + /// + /// let mut i = 0; + /// let expected = [2, 3]; + /// for x in &set { + /// assert!(expected.contains(x)); + /// i += 1; + /// } + /// assert_eq!(i, expected.len()); + /// ``` + fn bitand(self, rhs: &HashSet) -> HashSet { + self.intersection(rhs).cloned().collect() + } +} + +impl BitXor<&HashSet> for &HashSet +where + T: Eq + Hash + Clone, + S: BuildHasher + Default, +{ + type Output = HashSet; + + /// Returns the symmetric difference of `self` and `rhs` as a new `HashSet`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let a: HashSet<_> = vec![1, 2, 3].into_iter().collect(); + /// let b: HashSet<_> = vec![3, 4, 5].into_iter().collect(); + /// + /// let set = &a ^ &b; + /// + /// let mut i = 0; + /// let expected = [1, 2, 4, 5]; + /// for x in &set { + /// assert!(expected.contains(x)); + /// i += 1; + /// } + /// assert_eq!(i, expected.len()); + /// ``` + fn bitxor(self, rhs: &HashSet) -> HashSet { + self.symmetric_difference(rhs).cloned().collect() + } +} + +impl Sub<&HashSet> for &HashSet +where + T: Eq + Hash + Clone, + S: BuildHasher + Default, +{ + type Output = HashSet; + + /// Returns the difference of `self` and `rhs` as a new `HashSet`. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// + /// let a: HashSet<_> = vec![1, 2, 3].into_iter().collect(); + /// let b: HashSet<_> = vec![3, 4, 5].into_iter().collect(); + /// + /// let set = &a - &b; + /// + /// let mut i = 0; + /// let expected = [1, 2]; + /// for x in &set { + /// assert!(expected.contains(x)); + /// i += 1; + /// } + /// assert_eq!(i, expected.len()); + /// ``` + fn sub(self, rhs: &HashSet) -> HashSet { + self.difference(rhs).cloned().collect() + } +} + +/// An iterator over the items of a `HashSet`. +/// +/// This `struct` is created by the [`iter`] method on [`HashSet`]. +/// See its documentation for more. +/// +/// [`HashSet`]: struct.HashSet.html +/// [`iter`]: struct.HashSet.html#method.iter +pub struct Iter<'a, K> { + iter: Keys<'a, K, ()>, +} + +/// An owning iterator over the items of a `HashSet`. +/// +/// This `struct` is created by the [`into_iter`] method on [`HashSet`][`HashSet`] +/// (provided by the `IntoIterator` trait). See its documentation for more. +/// +/// [`HashSet`]: struct.HashSet.html +/// [`into_iter`]: struct.HashSet.html#method.into_iter +pub struct IntoIter { + iter: map::IntoIter, +} + +/// A draining iterator over the items of a `HashSet`. +/// +/// This `struct` is created by the [`drain`] method on [`HashSet`]. +/// See its documentation for more. +/// +/// [`HashSet`]: struct.HashSet.html +/// [`drain`]: struct.HashSet.html#method.drain +pub struct Drain<'a, K> { + iter: map::Drain<'a, K, ()>, +} + +/// A lazy iterator producing elements in the intersection of `HashSet`s. +/// +/// This `struct` is created by the [`intersection`] method on [`HashSet`]. +/// See its documentation for more. +/// +/// [`HashSet`]: struct.HashSet.html +/// [`intersection`]: struct.HashSet.html#method.intersection +pub struct Intersection<'a, T, S> { + // iterator of the first set + iter: Iter<'a, T>, + // the second set + other: &'a HashSet, +} + +/// A lazy iterator producing elements in the difference of `HashSet`s. +/// +/// This `struct` is created by the [`difference`] method on [`HashSet`]. +/// See its documentation for more. +/// +/// [`HashSet`]: struct.HashSet.html +/// [`difference`]: struct.HashSet.html#method.difference +pub struct Difference<'a, T, S> { + // iterator of the first set + iter: Iter<'a, T>, + // the second set + other: &'a HashSet, +} + +/// A lazy iterator producing elements in the symmetric difference of `HashSet`s. +/// +/// This `struct` is created by the [`symmetric_difference`] method on +/// [`HashSet`]. See its documentation for more. +/// +/// [`HashSet`]: struct.HashSet.html +/// [`symmetric_difference`]: struct.HashSet.html#method.symmetric_difference +pub struct SymmetricDifference<'a, T, S> { + iter: Chain, Difference<'a, T, S>>, +} + +/// A lazy iterator producing elements in the union of `HashSet`s. +/// +/// This `struct` is created by the [`union`] method on [`HashSet`]. +/// See its documentation for more. +/// +/// [`HashSet`]: struct.HashSet.html +/// [`union`]: struct.HashSet.html#method.union +pub struct Union<'a, T, S> { + iter: Chain, Difference<'a, T, S>>, +} + +impl<'a, T, S> IntoIterator for &'a HashSet { + type Item = &'a T; + type IntoIter = Iter<'a, T>; + + #[inline] + fn into_iter(self) -> Iter<'a, T> { + self.iter() + } +} + +impl IntoIterator for HashSet { + type Item = T; + type IntoIter = IntoIter; + + /// Creates a consuming iterator, that is, one that moves each value out + /// of the set in arbitrary order. The set cannot be used after calling + /// this. + /// + /// # Examples + /// + /// ``` + /// use hashbrown::HashSet; + /// let mut set = HashSet::new(); + /// set.insert("a".to_string()); + /// set.insert("b".to_string()); + /// + /// // Not possible to collect to a Vec with a regular `.iter()`. + /// let v: Vec = set.into_iter().collect(); + /// + /// // Will print in an arbitrary order. + /// for x in &v { + /// println!("{}", x); + /// } + /// ``` + #[inline] + fn into_iter(self) -> IntoIter { + IntoIter { + iter: self.map.into_iter(), + } + } +} + +impl Clone for Iter<'_, K> { + #[inline] + fn clone(&self) -> Self { + Iter { + iter: self.iter.clone(), + } + } +} +impl<'a, K> Iterator for Iter<'a, K> { + type Item = &'a K; + + #[inline] + fn next(&mut self) -> Option<&'a K> { + self.iter.next() + } + #[inline] + fn size_hint(&self) -> (usize, Option) { + self.iter.size_hint() + } +} +impl<'a, K> ExactSizeIterator for Iter<'a, K> { + #[inline] + fn len(&self) -> usize { + self.iter.len() + } +} +impl FusedIterator for Iter<'_, K> {} + +impl fmt::Debug for Iter<'_, K> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_list().entries(self.clone()).finish() + } +} + +impl Iterator for IntoIter { + type Item = K; + + #[inline] + fn next(&mut self) -> Option { + self.iter.next().map(|(k, _)| k) + } + #[inline] + fn size_hint(&self) -> (usize, Option) { + self.iter.size_hint() + } +} +impl ExactSizeIterator for IntoIter { + #[inline] + fn len(&self) -> usize { + self.iter.len() + } +} +impl FusedIterator for IntoIter {} + +impl fmt::Debug for IntoIter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let entries_iter = self.iter.iter().map(|(k, _)| k); + f.debug_list().entries(entries_iter).finish() + } +} + +impl Iterator for Drain<'_, K> { + type Item = K; + + #[inline] + fn next(&mut self) -> Option { + self.iter.next().map(|(k, _)| k) + } + #[inline] + fn size_hint(&self) -> (usize, Option) { + self.iter.size_hint() + } +} +impl ExactSizeIterator for Drain<'_, K> { + #[inline] + fn len(&self) -> usize { + self.iter.len() + } +} +impl FusedIterator for Drain<'_, K> {} + +impl fmt::Debug for Drain<'_, K> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let entries_iter = self.iter.iter().map(|(k, _)| k); + f.debug_list().entries(entries_iter).finish() + } +} + +impl Clone for Intersection<'_, T, S> { + #[inline] + fn clone(&self) -> Self { + Intersection { + iter: self.iter.clone(), + ..*self + } + } +} + +impl<'a, T, S> Iterator for Intersection<'a, T, S> +where + T: Eq + Hash, + S: BuildHasher, +{ + type Item = &'a T; + + #[inline] + fn next(&mut self) -> Option<&'a T> { + loop { + let elt = self.iter.next()?; + if self.other.contains(elt) { + return Some(elt); + } + } + } + + #[inline] + fn size_hint(&self) -> (usize, Option) { + let (_, upper) = self.iter.size_hint(); + (0, upper) + } +} + +impl fmt::Debug for Intersection<'_, T, S> +where + T: fmt::Debug + Eq + Hash, + S: BuildHasher, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_list().entries(self.clone()).finish() + } +} + +impl FusedIterator for Intersection<'_, T, S> +where + T: Eq + Hash, + S: BuildHasher, +{ +} + +impl Clone for Difference<'_, T, S> { + #[inline] + fn clone(&self) -> Self { + Difference { + iter: self.iter.clone(), + ..*self + } + } +} + +impl<'a, T, S> Iterator for Difference<'a, T, S> +where + T: Eq + Hash, + S: BuildHasher, +{ + type Item = &'a T; + + #[inline] + fn next(&mut self) -> Option<&'a T> { + loop { + let elt = self.iter.next()?; + if !self.other.contains(elt) { + return Some(elt); + } + } + } + + #[inline] + fn size_hint(&self) -> (usize, Option) { + let (_, upper) = self.iter.size_hint(); + (0, upper) + } +} + +impl FusedIterator for Difference<'_, T, S> +where + T: Eq + Hash, + S: BuildHasher, +{ +} + +impl fmt::Debug for Difference<'_, T, S> +where + T: fmt::Debug + Eq + Hash, + S: BuildHasher, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_list().entries(self.clone()).finish() + } +} + +impl Clone for SymmetricDifference<'_, T, S> { + #[inline] + fn clone(&self) -> Self { + SymmetricDifference { + iter: self.iter.clone(), + } + } +} + +impl<'a, T, S> Iterator for SymmetricDifference<'a, T, S> +where + T: Eq + Hash, + S: BuildHasher, +{ + type Item = &'a T; + + #[inline] + fn next(&mut self) -> Option<&'a T> { + self.iter.next() + } + #[inline] + fn size_hint(&self) -> (usize, Option) { + self.iter.size_hint() + } +} + +impl FusedIterator for SymmetricDifference<'_, T, S> +where + T: Eq + Hash, + S: BuildHasher, +{ +} + +impl fmt::Debug for SymmetricDifference<'_, T, S> +where + T: fmt::Debug + Eq + Hash, + S: BuildHasher, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_list().entries(self.clone()).finish() + } +} + +impl Clone for Union<'_, T, S> { + #[inline] + fn clone(&self) -> Self { + Union { + iter: self.iter.clone(), + } + } +} + +impl FusedIterator for Union<'_, T, S> +where + T: Eq + Hash, + S: BuildHasher, +{ +} + +impl fmt::Debug for Union<'_, T, S> +where + T: fmt::Debug + Eq + Hash, + S: BuildHasher, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_list().entries(self.clone()).finish() + } +} + +impl<'a, T, S> Iterator for Union<'a, T, S> +where + T: Eq + Hash, + S: BuildHasher, +{ + type Item = &'a T; + + #[inline] + fn next(&mut self) -> Option<&'a T> { + self.iter.next() + } + #[inline] + fn size_hint(&self) -> (usize, Option) { + self.iter.size_hint() + } +} + +#[allow(dead_code)] +fn assert_covariance() { + fn set<'new>(v: HashSet<&'static str>) -> HashSet<&'new str> { + v + } + fn iter<'a, 'new>(v: Iter<'a, &'static str>) -> Iter<'a, &'new str> { + v + } + fn into_iter<'new>(v: IntoIter<&'static str>) -> IntoIter<&'new str> { + v + } + fn difference<'a, 'new>( + v: Difference<'a, &'static str, DefaultHashBuilder>, + ) -> Difference<'a, &'new str, DefaultHashBuilder> { + v + } + fn symmetric_difference<'a, 'new>( + v: SymmetricDifference<'a, &'static str, DefaultHashBuilder>, + ) -> SymmetricDifference<'a, &'new str, DefaultHashBuilder> { + v + } + fn intersection<'a, 'new>( + v: Intersection<'a, &'static str, DefaultHashBuilder>, + ) -> Intersection<'a, &'new str, DefaultHashBuilder> { + v + } + fn union<'a, 'new>( + v: Union<'a, &'static str, DefaultHashBuilder>, + ) -> Union<'a, &'new str, DefaultHashBuilder> { + v + } + fn drain<'new>(d: Drain<'static, &'static str>) -> Drain<'new, &'new str> { + d + } +} + +#[cfg(test)] +mod test_set { + use super::super::map::DefaultHashBuilder; + use super::HashSet; + use std::vec::Vec; + + #[test] + fn test_zero_capacities() { + type HS = HashSet; + + let s = HS::new(); + assert_eq!(s.capacity(), 0); + + let s = HS::default(); + assert_eq!(s.capacity(), 0); + + let s = HS::with_hasher(DefaultHashBuilder::default()); + assert_eq!(s.capacity(), 0); + + let s = HS::with_capacity(0); + assert_eq!(s.capacity(), 0); + + let s = HS::with_capacity_and_hasher(0, DefaultHashBuilder::default()); + assert_eq!(s.capacity(), 0); + + let mut s = HS::new(); + s.insert(1); + s.insert(2); + s.remove(&1); + s.remove(&2); + s.shrink_to_fit(); + assert_eq!(s.capacity(), 0); + + let mut s = HS::new(); + s.reserve(0); + assert_eq!(s.capacity(), 0); + } + + #[test] + fn test_disjoint() { + let mut xs = HashSet::new(); + let mut ys = HashSet::new(); + assert!(xs.is_disjoint(&ys)); + assert!(ys.is_disjoint(&xs)); + assert!(xs.insert(5)); + assert!(ys.insert(11)); + assert!(xs.is_disjoint(&ys)); + assert!(ys.is_disjoint(&xs)); + assert!(xs.insert(7)); + assert!(xs.insert(19)); + assert!(xs.insert(4)); + assert!(ys.insert(2)); + assert!(ys.insert(-11)); + assert!(xs.is_disjoint(&ys)); + assert!(ys.is_disjoint(&xs)); + assert!(ys.insert(7)); + assert!(!xs.is_disjoint(&ys)); + assert!(!ys.is_disjoint(&xs)); + } + + #[test] + fn test_subset_and_superset() { + let mut a = HashSet::new(); + assert!(a.insert(0)); + assert!(a.insert(5)); + assert!(a.insert(11)); + assert!(a.insert(7)); + + let mut b = HashSet::new(); + assert!(b.insert(0)); + assert!(b.insert(7)); + assert!(b.insert(19)); + assert!(b.insert(250)); + assert!(b.insert(11)); + assert!(b.insert(200)); + + assert!(!a.is_subset(&b)); + assert!(!a.is_superset(&b)); + assert!(!b.is_subset(&a)); + assert!(!b.is_superset(&a)); + + assert!(b.insert(5)); + + assert!(a.is_subset(&b)); + assert!(!a.is_superset(&b)); + assert!(!b.is_subset(&a)); + assert!(b.is_superset(&a)); + } + + #[test] + fn test_iterate() { + let mut a = HashSet::new(); + for i in 0..32 { + assert!(a.insert(i)); + } + let mut observed: u32 = 0; + for k in &a { + observed |= 1 << *k; + } + assert_eq!(observed, 0xFFFF_FFFF); + } + + #[test] + fn test_intersection() { + let mut a = HashSet::new(); + let mut b = HashSet::new(); + + assert!(a.insert(11)); + assert!(a.insert(1)); + assert!(a.insert(3)); + assert!(a.insert(77)); + assert!(a.insert(103)); + assert!(a.insert(5)); + assert!(a.insert(-5)); + + assert!(b.insert(2)); + assert!(b.insert(11)); + assert!(b.insert(77)); + assert!(b.insert(-9)); + assert!(b.insert(-42)); + assert!(b.insert(5)); + assert!(b.insert(3)); + + let mut i = 0; + let expected = [3, 5, 11, 77]; + for x in a.intersection(&b) { + assert!(expected.contains(x)); + i += 1 + } + assert_eq!(i, expected.len()); + } + + #[test] + fn test_difference() { + let mut a = HashSet::new(); + let mut b = HashSet::new(); + + assert!(a.insert(1)); + assert!(a.insert(3)); + assert!(a.insert(5)); + assert!(a.insert(9)); + assert!(a.insert(11)); + + assert!(b.insert(3)); + assert!(b.insert(9)); + + let mut i = 0; + let expected = [1, 5, 11]; + for x in a.difference(&b) { + assert!(expected.contains(x)); + i += 1 + } + assert_eq!(i, expected.len()); + } + + #[test] + fn test_symmetric_difference() { + let mut a = HashSet::new(); + let mut b = HashSet::new(); + + assert!(a.insert(1)); + assert!(a.insert(3)); + assert!(a.insert(5)); + assert!(a.insert(9)); + assert!(a.insert(11)); + + assert!(b.insert(-2)); + assert!(b.insert(3)); + assert!(b.insert(9)); + assert!(b.insert(14)); + assert!(b.insert(22)); + + let mut i = 0; + let expected = [-2, 1, 5, 11, 14, 22]; + for x in a.symmetric_difference(&b) { + assert!(expected.contains(x)); + i += 1 + } + assert_eq!(i, expected.len()); + } + + #[test] + fn test_union() { + let mut a = HashSet::new(); + let mut b = HashSet::new(); + + assert!(a.insert(1)); + assert!(a.insert(3)); + assert!(a.insert(5)); + assert!(a.insert(9)); + assert!(a.insert(11)); + assert!(a.insert(16)); + assert!(a.insert(19)); + assert!(a.insert(24)); + + assert!(b.insert(-2)); + assert!(b.insert(1)); + assert!(b.insert(5)); + assert!(b.insert(9)); + assert!(b.insert(13)); + assert!(b.insert(19)); + + let mut i = 0; + let expected = [-2, 1, 3, 5, 9, 11, 13, 16, 19, 24]; + for x in a.union(&b) { + assert!(expected.contains(x)); + i += 1 + } + assert_eq!(i, expected.len()); + } + + #[test] + fn test_from_iter() { + let xs = [1, 2, 3, 4, 5, 6, 7, 8, 9]; + + let set: HashSet<_> = xs.iter().cloned().collect(); + + for x in &xs { + assert!(set.contains(x)); + } + } + + #[test] + fn test_move_iter() { + let hs = { + let mut hs = HashSet::new(); + + hs.insert('a'); + hs.insert('b'); + + hs + }; + + let v = hs.into_iter().collect::>(); + assert!(v == ['a', 'b'] || v == ['b', 'a']); + } + + #[test] + fn test_eq() { + // These constants once happened to expose a bug in insert(). + // I'm keeping them around to prevent a regression. + let mut s1 = HashSet::new(); + + s1.insert(1); + s1.insert(2); + s1.insert(3); + + let mut s2 = HashSet::new(); + + s2.insert(1); + s2.insert(2); + + assert!(s1 != s2); + + s2.insert(3); + + assert_eq!(s1, s2); + } + + #[test] + fn test_show() { + let mut set = HashSet::new(); + let empty = HashSet::::new(); + + set.insert(1); + set.insert(2); + + let set_str = format!("{:?}", set); + + assert!(set_str == "{1, 2}" || set_str == "{2, 1}"); + assert_eq!(format!("{:?}", empty), "{}"); + } + + #[test] + fn test_trivial_drain() { + let mut s = HashSet::::new(); + for _ in s.drain() {} + assert!(s.is_empty()); + drop(s); + + let mut s = HashSet::::new(); + drop(s.drain()); + assert!(s.is_empty()); + } + + #[test] + fn test_drain() { + let mut s: HashSet<_> = (1..100).collect(); + + // try this a bunch of times to make sure we don't screw up internal state. + for _ in 0..20 { + assert_eq!(s.len(), 99); + + { + let mut last_i = 0; + let mut d = s.drain(); + for (i, x) in d.by_ref().take(50).enumerate() { + last_i = i; + assert!(x != 0); + } + assert_eq!(last_i, 49); + } + + for _ in &s { + panic!("s should be empty!"); + } + + // reset to try again. + s.extend(1..100); + } + } + + #[test] + fn test_replace() { + use core::hash; + + #[derive(Debug)] + struct Foo(&'static str, i32); + + impl PartialEq for Foo { + fn eq(&self, other: &Self) -> bool { + self.0 == other.0 + } + } + + impl Eq for Foo {} + + impl hash::Hash for Foo { + fn hash(&self, h: &mut H) { + self.0.hash(h); + } + } + + let mut s = HashSet::new(); + assert_eq!(s.replace(Foo("a", 1)), None); + assert_eq!(s.len(), 1); + assert_eq!(s.replace(Foo("a", 2)), Some(Foo("a", 1))); + assert_eq!(s.len(), 1); + + let mut it = s.iter(); + assert_eq!(it.next(), Some(&Foo("a", 2))); + assert_eq!(it.next(), None); + } + + #[test] + fn test_extend_ref() { + let mut a = HashSet::new(); + a.insert(1); + + a.extend(&[2, 3, 4]); + + assert_eq!(a.len(), 4); + assert!(a.contains(&1)); + assert!(a.contains(&2)); + assert!(a.contains(&3)); + assert!(a.contains(&4)); + + let mut b = HashSet::new(); + b.insert(5); + b.insert(6); + + a.extend(&b); + + assert_eq!(a.len(), 6); + assert!(a.contains(&1)); + assert!(a.contains(&2)); + assert!(a.contains(&3)); + assert!(a.contains(&4)); + assert!(a.contains(&5)); + assert!(a.contains(&6)); + } + + #[test] + fn test_retain() { + let xs = [1, 2, 3, 4, 5, 6]; + let mut set: HashSet = xs.iter().cloned().collect(); + set.retain(|&k| k % 2 == 0); + assert_eq!(set.len(), 3); + assert!(set.contains(&2)); + assert!(set.contains(&4)); + assert!(set.contains(&6)); + } +} diff --git a/vendor/hashbrown/tests/hasher.rs b/vendor/hashbrown/tests/hasher.rs new file mode 100644 index 0000000000..e455e3d3c9 --- /dev/null +++ b/vendor/hashbrown/tests/hasher.rs @@ -0,0 +1,65 @@ +//! Sanity check that alternate hashers work correctly. + +#![cfg(not(miri))] // FIXME: takes too long + +use hashbrown::HashSet; +use std::hash::{BuildHasher, BuildHasherDefault, Hasher}; + +fn check() { + let range = 0..1_000; + + let mut set = HashSet::::default(); + set.extend(range.clone()); + + assert!(!set.contains(&i32::min_value())); + assert!(!set.contains(&(range.start - 1))); + for i in range.clone() { + assert!(set.contains(&i)); + } + assert!(!set.contains(&range.end)); + assert!(!set.contains(&i32::max_value())); +} + +/// Use hashbrown's default hasher. +#[test] +fn default() { + check::(); +} + +/// Use std's default hasher. +#[test] +fn random_state() { + check::(); +} + +/// Use a constant 0 hash. +#[test] +fn zero() { + #[derive(Default)] + struct ZeroHasher; + + impl Hasher for ZeroHasher { + fn finish(&self) -> u64 { + 0 + } + fn write(&mut self, _: &[u8]) {} + } + + check::>(); +} + +/// Use a constant maximum hash. +#[test] +fn max() { + #[derive(Default)] + struct MaxHasher; + + impl Hasher for MaxHasher { + fn finish(&self) -> u64 { + u64::max_value() + } + fn write(&mut self, _: &[u8]) {} + } + + check::>(); +} diff --git a/vendor/hashbrown/tests/rayon.rs b/vendor/hashbrown/tests/rayon.rs new file mode 100644 index 0000000000..39b47708dd --- /dev/null +++ b/vendor/hashbrown/tests/rayon.rs @@ -0,0 +1,533 @@ +#![cfg(feature = "rayon")] + +#[macro_use] +extern crate lazy_static; + +use hashbrown::{HashMap, HashSet}; +use rayon::iter::{ + IntoParallelIterator, IntoParallelRefIterator, IntoParallelRefMutIterator, ParallelExtend, + ParallelIterator, +}; + +macro_rules! assert_eq3 { + ($e1:expr, $e2:expr, $e3:expr) => {{ + assert_eq!($e1, $e2); + assert_eq!($e1, $e3); + assert_eq!($e2, $e3); + }}; +} + +lazy_static! { + static ref MAP_EMPTY: HashMap = HashMap::new(); + static ref MAP: HashMap = { + let mut m = HashMap::new(); + m.insert('b', 20); + m.insert('a', 10); + m.insert('c', 30); + m.insert('e', 50); + m.insert('f', 60); + m.insert('d', 40); + m + }; +} + +#[test] +fn map_seq_par_equivalence_iter_empty() { + let vec_seq = MAP_EMPTY.iter().collect::>(); + let vec_par = MAP_EMPTY.par_iter().collect::>(); + + assert_eq3!(vec_seq, vec_par, []); +} + +#[test] +fn map_seq_par_equivalence_iter() { + let mut vec_seq = MAP.iter().collect::>(); + let mut vec_par = MAP.par_iter().collect::>(); + + assert_eq!(vec_seq, vec_par); + + // Do not depend on the exact order of values + let expected_sorted = [ + (&'a', &10), + (&'b', &20), + (&'c', &30), + (&'d', &40), + (&'e', &50), + (&'f', &60), + ]; + + vec_seq.sort_unstable(); + vec_par.sort_unstable(); + + assert_eq3!(vec_seq, vec_par, expected_sorted); +} + +#[test] +fn map_seq_par_equivalence_keys_empty() { + let vec_seq = MAP_EMPTY.keys().collect::>(); + let vec_par = MAP_EMPTY.par_keys().collect::>(); + + let expected: [&char; 0] = []; + + assert_eq3!(vec_seq, vec_par, expected); +} + +#[test] +fn map_seq_par_equivalence_keys() { + let mut vec_seq = MAP.keys().collect::>(); + let mut vec_par = MAP.par_keys().collect::>(); + + assert_eq!(vec_seq, vec_par); + + // Do not depend on the exact order of values + let expected_sorted = [&'a', &'b', &'c', &'d', &'e', &'f']; + + vec_seq.sort_unstable(); + vec_par.sort_unstable(); + + assert_eq3!(vec_seq, vec_par, expected_sorted); +} + +#[test] +fn map_seq_par_equivalence_values_empty() { + let vec_seq = MAP_EMPTY.values().collect::>(); + let vec_par = MAP_EMPTY.par_values().collect::>(); + + let expected: [&u32; 0] = []; + + assert_eq3!(vec_seq, vec_par, expected); +} + +#[test] +fn map_seq_par_equivalence_values() { + let mut vec_seq = MAP.values().collect::>(); + let mut vec_par = MAP.par_values().collect::>(); + + assert_eq!(vec_seq, vec_par); + + // Do not depend on the exact order of values + let expected_sorted = [&10, &20, &30, &40, &50, &60]; + + vec_seq.sort_unstable(); + vec_par.sort_unstable(); + + assert_eq3!(vec_seq, vec_par, expected_sorted); +} + +#[test] +fn map_seq_par_equivalence_iter_mut_empty() { + let mut map1 = MAP_EMPTY.clone(); + let mut map2 = MAP_EMPTY.clone(); + + let vec_seq = map1.iter_mut().collect::>(); + let vec_par = map2.par_iter_mut().collect::>(); + + assert_eq3!(vec_seq, vec_par, []); +} + +#[test] +fn map_seq_par_equivalence_iter_mut() { + let mut map1 = MAP.clone(); + let mut map2 = MAP.clone(); + + let mut vec_seq = map1.iter_mut().collect::>(); + let mut vec_par = map2.par_iter_mut().collect::>(); + + assert_eq!(vec_seq, vec_par); + + // Do not depend on the exact order of values + let expected_sorted = [ + (&'a', &mut 10), + (&'b', &mut 20), + (&'c', &mut 30), + (&'d', &mut 40), + (&'e', &mut 50), + (&'f', &mut 60), + ]; + + vec_seq.sort_unstable(); + vec_par.sort_unstable(); + + assert_eq3!(vec_seq, vec_par, expected_sorted); +} + +#[test] +fn map_seq_par_equivalence_values_mut_empty() { + let mut map1 = MAP_EMPTY.clone(); + let mut map2 = MAP_EMPTY.clone(); + + let vec_seq = map1.values_mut().collect::>(); + let vec_par = map2.par_values_mut().collect::>(); + + let expected: [&u32; 0] = []; + + assert_eq3!(vec_seq, vec_par, expected); +} + +#[test] +fn map_seq_par_equivalence_values_mut() { + let mut map1 = MAP.clone(); + let mut map2 = MAP.clone(); + + let mut vec_seq = map1.values_mut().collect::>(); + let mut vec_par = map2.par_values_mut().collect::>(); + + assert_eq!(vec_seq, vec_par); + + // Do not depend on the exact order of values + let expected_sorted = [&mut 10, &mut 20, &mut 30, &mut 40, &mut 50, &mut 60]; + + vec_seq.sort_unstable(); + vec_par.sort_unstable(); + + assert_eq3!(vec_seq, vec_par, expected_sorted); +} + +#[test] +fn map_seq_par_equivalence_into_iter_empty() { + let vec_seq = MAP_EMPTY.clone().into_iter().collect::>(); + let vec_par = MAP_EMPTY.clone().into_par_iter().collect::>(); + + assert_eq3!(vec_seq, vec_par, []); +} + +#[test] +fn map_seq_par_equivalence_into_iter() { + let mut vec_seq = MAP.clone().into_iter().collect::>(); + let mut vec_par = MAP.clone().into_par_iter().collect::>(); + + assert_eq!(vec_seq, vec_par); + + // Do not depend on the exact order of values + let expected_sorted = [ + ('a', 10), + ('b', 20), + ('c', 30), + ('d', 40), + ('e', 50), + ('f', 60), + ]; + + vec_seq.sort_unstable(); + vec_par.sort_unstable(); + + assert_eq3!(vec_seq, vec_par, expected_sorted); +} + +lazy_static! { + static ref MAP_VEC_EMPTY: Vec<(char, u32)> = vec![]; + static ref MAP_VEC: Vec<(char, u32)> = vec![ + ('b', 20), + ('a', 10), + ('c', 30), + ('e', 50), + ('f', 60), + ('d', 40), + ]; +} + +#[test] +fn map_seq_par_equivalence_collect_empty() { + let map_expected = MAP_EMPTY.clone(); + let map_seq = MAP_VEC_EMPTY.clone().into_iter().collect::>(); + let map_par = MAP_VEC_EMPTY + .clone() + .into_par_iter() + .collect::>(); + + assert_eq!(map_seq, map_par); + assert_eq!(map_seq, map_expected); + assert_eq!(map_par, map_expected); +} + +#[test] +fn map_seq_par_equivalence_collect() { + let map_expected = MAP.clone(); + let map_seq = MAP_VEC.clone().into_iter().collect::>(); + let map_par = MAP_VEC.clone().into_par_iter().collect::>(); + + assert_eq!(map_seq, map_par); + assert_eq!(map_seq, map_expected); + assert_eq!(map_par, map_expected); +} + +lazy_static! { + static ref MAP_EXISTING_EMPTY: HashMap = HashMap::new(); + static ref MAP_EXISTING: HashMap = { + let mut m = HashMap::new(); + m.insert('b', 20); + m.insert('a', 10); + m + }; + static ref MAP_EXTENSION_EMPTY: Vec<(char, u32)> = vec![]; + static ref MAP_EXTENSION: Vec<(char, u32)> = vec![('c', 30), ('e', 50), ('f', 60), ('d', 40),]; +} + +#[test] +fn map_seq_par_equivalence_existing_empty_extend_empty() { + let expected = HashMap::new(); + let mut map_seq = MAP_EXISTING_EMPTY.clone(); + let mut map_par = MAP_EXISTING_EMPTY.clone(); + + map_seq.extend(MAP_EXTENSION_EMPTY.iter().cloned()); + map_par.par_extend(MAP_EXTENSION_EMPTY.par_iter().cloned()); + + assert_eq3!(map_seq, map_par, expected); +} + +#[test] +fn map_seq_par_equivalence_existing_empty_extend() { + let expected = MAP_EXTENSION.iter().cloned().collect::>(); + let mut map_seq = MAP_EXISTING_EMPTY.clone(); + let mut map_par = MAP_EXISTING_EMPTY.clone(); + + map_seq.extend(MAP_EXTENSION.iter().cloned()); + map_par.par_extend(MAP_EXTENSION.par_iter().cloned()); + + assert_eq3!(map_seq, map_par, expected); +} + +#[test] +fn map_seq_par_equivalence_existing_extend_empty() { + let expected = MAP_EXISTING.clone(); + let mut map_seq = MAP_EXISTING.clone(); + let mut map_par = MAP_EXISTING.clone(); + + map_seq.extend(MAP_EXTENSION_EMPTY.iter().cloned()); + map_par.par_extend(MAP_EXTENSION_EMPTY.par_iter().cloned()); + + assert_eq3!(map_seq, map_par, expected); +} + +#[test] +fn map_seq_par_equivalence_existing_extend() { + let expected = MAP.clone(); + let mut map_seq = MAP_EXISTING.clone(); + let mut map_par = MAP_EXISTING.clone(); + + map_seq.extend(MAP_EXTENSION.iter().cloned()); + map_par.par_extend(MAP_EXTENSION.par_iter().cloned()); + + assert_eq3!(map_seq, map_par, expected); +} + +lazy_static! { + static ref SET_EMPTY: HashSet = HashSet::new(); + static ref SET: HashSet = { + let mut s = HashSet::new(); + s.insert('b'); + s.insert('a'); + s.insert('c'); + s.insert('e'); + s.insert('f'); + s.insert('d'); + s + }; +} + +#[test] +fn set_seq_par_equivalence_iter_empty() { + let vec_seq = SET_EMPTY.iter().collect::>(); + let vec_par = SET_EMPTY.par_iter().collect::>(); + + let expected: [&char; 0] = []; + + assert_eq3!(vec_seq, vec_par, expected); +} + +#[test] +fn set_seq_par_equivalence_iter() { + let mut vec_seq = SET.iter().collect::>(); + let mut vec_par = SET.par_iter().collect::>(); + + assert_eq!(vec_seq, vec_par); + + // Do not depend on the exact order of values + let expected_sorted = [&'a', &'b', &'c', &'d', &'e', &'f']; + + vec_seq.sort_unstable(); + vec_par.sort_unstable(); + + assert_eq3!(vec_seq, vec_par, expected_sorted); +} + +#[test] +fn set_seq_par_equivalence_into_iter_empty() { + let vec_seq = SET_EMPTY.clone().into_iter().collect::>(); + let vec_par = SET_EMPTY.clone().into_par_iter().collect::>(); + + assert_eq3!(vec_seq, vec_par, []); +} + +#[test] +fn set_seq_par_equivalence_into_iter() { + let mut vec_seq = SET.clone().into_iter().collect::>(); + let mut vec_par = SET.clone().into_par_iter().collect::>(); + + assert_eq!(vec_seq, vec_par); + + // Do not depend on the exact order of values + let expected_sorted = ['a', 'b', 'c', 'd', 'e', 'f']; + + vec_seq.sort_unstable(); + vec_par.sort_unstable(); + + assert_eq3!(vec_seq, vec_par, expected_sorted); +} + +lazy_static! { + static ref SET_VEC_EMPTY: Vec = vec![]; + static ref SET_VEC: Vec = vec!['b', 'a', 'c', 'e', 'f', 'd',]; +} + +#[test] +fn set_seq_par_equivalence_collect_empty() { + let set_expected = SET_EMPTY.clone(); + let set_seq = SET_VEC_EMPTY.clone().into_iter().collect::>(); + let set_par = SET_VEC_EMPTY + .clone() + .into_par_iter() + .collect::>(); + + assert_eq!(set_seq, set_par); + assert_eq!(set_seq, set_expected); + assert_eq!(set_par, set_expected); +} + +#[test] +fn set_seq_par_equivalence_collect() { + let set_expected = SET.clone(); + let set_seq = SET_VEC.clone().into_iter().collect::>(); + let set_par = SET_VEC.clone().into_par_iter().collect::>(); + + assert_eq!(set_seq, set_par); + assert_eq!(set_seq, set_expected); + assert_eq!(set_par, set_expected); +} + +lazy_static! { + static ref SET_EXISTING_EMPTY: HashSet = HashSet::new(); + static ref SET_EXISTING: HashSet = { + let mut s = HashSet::new(); + s.insert('b'); + s.insert('a'); + s + }; + static ref SET_EXTENSION_EMPTY: Vec = vec![]; + static ref SET_EXTENSION: Vec = vec!['c', 'e', 'f', 'd',]; +} + +#[test] +fn set_seq_par_equivalence_existing_empty_extend_empty() { + let expected = HashSet::new(); + let mut set_seq = SET_EXISTING_EMPTY.clone(); + let mut set_par = SET_EXISTING_EMPTY.clone(); + + set_seq.extend(SET_EXTENSION_EMPTY.iter().cloned()); + set_par.par_extend(SET_EXTENSION_EMPTY.par_iter().cloned()); + + assert_eq3!(set_seq, set_par, expected); +} + +#[test] +fn set_seq_par_equivalence_existing_empty_extend() { + let expected = SET_EXTENSION.iter().cloned().collect::>(); + let mut set_seq = SET_EXISTING_EMPTY.clone(); + let mut set_par = SET_EXISTING_EMPTY.clone(); + + set_seq.extend(SET_EXTENSION.iter().cloned()); + set_par.par_extend(SET_EXTENSION.par_iter().cloned()); + + assert_eq3!(set_seq, set_par, expected); +} + +#[test] +fn set_seq_par_equivalence_existing_extend_empty() { + let expected = SET_EXISTING.clone(); + let mut set_seq = SET_EXISTING.clone(); + let mut set_par = SET_EXISTING.clone(); + + set_seq.extend(SET_EXTENSION_EMPTY.iter().cloned()); + set_par.par_extend(SET_EXTENSION_EMPTY.par_iter().cloned()); + + assert_eq3!(set_seq, set_par, expected); +} + +#[test] +fn set_seq_par_equivalence_existing_extend() { + let expected = SET.clone(); + let mut set_seq = SET_EXISTING.clone(); + let mut set_par = SET_EXISTING.clone(); + + set_seq.extend(SET_EXTENSION.iter().cloned()); + set_par.par_extend(SET_EXTENSION.par_iter().cloned()); + + assert_eq3!(set_seq, set_par, expected); +} + +lazy_static! { + static ref SET_A: HashSet = ['a', 'b', 'c', 'd'].iter().cloned().collect(); + static ref SET_B: HashSet = ['a', 'b', 'e', 'f'].iter().cloned().collect(); + static ref SET_DIFF_AB: HashSet = ['c', 'd'].iter().cloned().collect(); + static ref SET_DIFF_BA: HashSet = ['e', 'f'].iter().cloned().collect(); + static ref SET_SYMM_DIFF_AB: HashSet = ['c', 'd', 'e', 'f'].iter().cloned().collect(); + static ref SET_INTERSECTION_AB: HashSet = ['a', 'b'].iter().cloned().collect(); + static ref SET_UNION_AB: HashSet = + ['a', 'b', 'c', 'd', 'e', 'f'].iter().cloned().collect(); +} + +#[test] +fn set_seq_par_equivalence_difference() { + let diff_ab_seq = SET_A.difference(&*SET_B).cloned().collect::>(); + let diff_ab_par = SET_A + .par_difference(&*SET_B) + .cloned() + .collect::>(); + + assert_eq3!(diff_ab_seq, diff_ab_par, *SET_DIFF_AB); + + let diff_ba_seq = SET_B.difference(&*SET_A).cloned().collect::>(); + let diff_ba_par = SET_B + .par_difference(&*SET_A) + .cloned() + .collect::>(); + + assert_eq3!(diff_ba_seq, diff_ba_par, *SET_DIFF_BA); +} + +#[test] +fn set_seq_par_equivalence_symmetric_difference() { + let symm_diff_ab_seq = SET_A + .symmetric_difference(&*SET_B) + .cloned() + .collect::>(); + let symm_diff_ab_par = SET_A + .par_symmetric_difference(&*SET_B) + .cloned() + .collect::>(); + + assert_eq3!(symm_diff_ab_seq, symm_diff_ab_par, *SET_SYMM_DIFF_AB); +} + +#[test] +fn set_seq_par_equivalence_intersection() { + let intersection_ab_seq = SET_A.intersection(&*SET_B).cloned().collect::>(); + let intersection_ab_par = SET_A + .par_intersection(&*SET_B) + .cloned() + .collect::>(); + + assert_eq3!( + intersection_ab_seq, + intersection_ab_par, + *SET_INTERSECTION_AB + ); +} + +#[test] +fn set_seq_par_equivalence_union() { + let union_ab_seq = SET_A.union(&*SET_B).cloned().collect::>(); + let union_ab_par = SET_A.par_union(&*SET_B).cloned().collect::>(); + + assert_eq3!(union_ab_seq, union_ab_par, *SET_UNION_AB); +} diff --git a/vendor/hashbrown/tests/serde.rs b/vendor/hashbrown/tests/serde.rs new file mode 100644 index 0000000000..f32cd98481 --- /dev/null +++ b/vendor/hashbrown/tests/serde.rs @@ -0,0 +1,59 @@ +#![cfg(feature = "serde")] + +use hashbrown::{HashMap, HashSet}; +use serde_test::{assert_tokens, Token}; + +#[test] +fn map_serde_tokens_empty() { + let map = HashMap::::new(); + + assert_tokens(&map, &[Token::Map { len: Some(0) }, Token::MapEnd]); +} + +#[test] +fn map_serde_tokens() { + let mut map = HashMap::new(); + map.insert('b', 20); + map.insert('a', 10); + map.insert('c', 30); + + assert_tokens( + &map, + &[ + Token::Map { len: Some(3) }, + Token::Char('a'), + Token::I32(10), + Token::Char('b'), + Token::I32(20), + Token::Char('c'), + Token::I32(30), + Token::MapEnd, + ], + ); +} + +#[test] +fn set_serde_tokens_empty() { + let set = HashSet::::new(); + + assert_tokens(&set, &[Token::Seq { len: Some(0) }, Token::SeqEnd]); +} + +#[test] +fn set_serde_tokens() { + let mut set = HashSet::new(); + set.insert(20); + set.insert(10); + set.insert(30); + + assert_tokens( + &set, + &[ + Token::Seq { len: Some(3) }, + Token::I32(20), + Token::I32(10), + Token::I32(30), + Token::SeqEnd, + ], + ); +} diff --git a/vendor/hashbrown/tests/set.rs b/vendor/hashbrown/tests/set.rs new file mode 100644 index 0000000000..332f3f6f07 --- /dev/null +++ b/vendor/hashbrown/tests/set.rs @@ -0,0 +1,31 @@ +#![cfg(not(miri))] // FIXME: takes too long + +use hashbrown::HashSet; +use rand::{distributions::Alphanumeric, Rng, SeedableRng, XorShiftRng}; + +#[test] +fn test_hashset_insert_remove() { + let mut m: HashSet> = HashSet::new(); + //let num: u32 = 4096; + //let tx: Vec> = (0..num).map(|i| (i..(16 + i)).collect()).collect(); + let seed: [u8; 16] = [ + 130, 220, 246, 217, 111, 124, 221, 189, 190, 234, 121, 93, 67, 95, 100, 43, + ]; + + let mut rng: XorShiftRng = SeedableRng::from_seed(seed); + //let mut rng: XorShiftRng = XorShiftRng::new_unseeded(); + let tx: Vec> = (0..4096) + .map(|_| (rng.sample_iter(&Alphanumeric).take(32).collect())) + .collect(); + + for _ in 0..32 { + for i in 0..4096 { + assert_eq!(m.contains(&tx[i].clone()), false); + assert_eq!(m.insert(tx[i].clone()), true); + } + for i in 0..4096 { + println!("removing {} {:?}", i, tx[i]); + assert_eq!(m.remove(&tx[i]), true); + } + } +} diff --git a/vendor/lazy_static/.cargo-checksum.json b/vendor/lazy_static/.cargo-checksum.json index 4ba87d2e96..ef9d842644 100644 --- a/vendor/lazy_static/.cargo-checksum.json +++ b/vendor/lazy_static/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"9501e790a183ddbc845edba899bffa05f573c43fa5f79ef065ead842d056fa85","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0621878e61f0d0fda054bcbe02df75192c28bde1ecc8289cbd86aeba2dd72720","README.md":"f2e94da8b77ac2a097dbc4b93b35912ef41b725624512d83ea968951dd5bdc7d","src/core_lazy.rs":"6b9fb6a4f553058e240756125b6b9ca43a83ed1fb72964343038ea0ea2e1af10","src/inline_lazy.rs":"2ae9a04c5bff40e80194f65b01012f0b42efa527bf717e176c68b4ca5212043c","src/lib.rs":"3defd7a82feced71862161a3c36fcff7cef3e08a51596b2e15d629b9a171a75a","tests/no_std.rs":"d68b149ee51ef5ae2b2906c0c94f5a9812d3b02811b13365c5a35e2ef90d25cf","tests/test.rs":"8e809c0f0332a3a60fca0113128cdab2cdbee92f03db523cdc4e82f4cd4b9f22"},"package":"a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1"} \ No newline at end of file +{"files":{"Cargo.toml":"374d6623eea9b51155daf6f722062e3729ec2947191ed5a8efdc8df72eedb09a","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0621878e61f0d0fda054bcbe02df75192c28bde1ecc8289cbd86aeba2dd72720","README.md":"66e5ee88a690ca68496367bfe3d3ad01ad3234ee2bf1a3e847caf2676e04e75d","src/core_lazy.rs":"6b9fb6a4f553058e240756125b6b9ca43a83ed1fb72964343038ea0ea2e1af10","src/inline_lazy.rs":"2ae9a04c5bff40e80194f65b01012f0b42efa527bf717e176c68b4ca5212043c","src/lib.rs":"395f82f90fb563b30d379ee7d582b1741a94654e965e8a8915eeb672645812bc","tests/no_std.rs":"d68b149ee51ef5ae2b2906c0c94f5a9812d3b02811b13365c5a35e2ef90d25cf","tests/test.rs":"8e809c0f0332a3a60fca0113128cdab2cdbee92f03db523cdc4e82f4cd4b9f22"},"package":"bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14"} \ No newline at end of file diff --git a/vendor/lazy_static/Cargo.toml b/vendor/lazy_static/Cargo.toml index 1ffeeffac5..c6779f9432 100644 --- a/vendor/lazy_static/Cargo.toml +++ b/vendor/lazy_static/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,7 +12,7 @@ [package] name = "lazy_static" -version = "1.2.0" +version = "1.3.0" authors = ["Marvin Löbel "] exclude = ["/.travis.yml", "/appveyor.yml"] description = "A macro for declaring lazily evaluated statics in Rust." @@ -23,13 +23,10 @@ categories = ["no-std", "rust-patterns", "memory-management"] license = "MIT/Apache-2.0" repository = "https://github.com/rust-lang-nursery/lazy-static.rs" [dependencies.spin] -version = "0.4.10" -features = ["once"] +version = "0.5.0" optional = true -default-features = false [features] -nightly = [] spin_no_std = ["spin"] [badges.appveyor] repository = "rust-lang-nursery/lazy-static.rs" diff --git a/vendor/lazy_static/README.md b/vendor/lazy_static/README.md index d96cdf816d..c91337566f 100644 --- a/vendor/lazy_static/README.md +++ b/vendor/lazy_static/README.md @@ -8,7 +8,7 @@ executed at runtime in order to be initialized. This includes anything requiring heap allocations, like vectors or hash maps, as well as anything that requires non-const function calls to be computed. -[![Travis-CI Status](https://travis-ci.org/rust-lang-nursery/lazy-static.rs.svg?branch=master)](https://travis-ci.org/rust-lang-nursery/lazy-static.rs) +[![Travis-CI Status](https://travis-ci.com/rust-lang-nursery/lazy-static.rs.svg?branch=master)](https://travis-ci.com/rust-lang-nursery/lazy-static.rs) [![Latest version](https://img.shields.io/crates/v/lazy_static.svg)](https://crates.io/crates/lazy_static) [![Documentation](https://docs.rs/lazy_static/badge.svg)](https://docs.rs/lazy_static) [![License](https://img.shields.io/crates/l/lazy_static.svg)](https://github.com/rust-lang-nursery/lazy-static.rs#license) @@ -31,7 +31,7 @@ Add the following dependency to your Cargo manifest... ```toml [dependencies] -lazy_static = "1.2.0" +lazy_static = "1.3.0" ``` ...and see the [docs](https://docs.rs/lazy_static) for how to use it. diff --git a/vendor/lazy_static/src/lib.rs b/vendor/lazy_static/src/lib.rs index 42dc405330..ac0cf8a368 100644 --- a/vendor/lazy_static/src/lib.rs +++ b/vendor/lazy_static/src/lib.rs @@ -92,15 +92,14 @@ The `Deref` implementation uses a hidden static variable that is guarded by an a This crate provides two cargo features: -- `nightly`: This uses unstable language features only available on the nightly release channel for a more optimal implementation. In practice this currently means avoiding a heap allocation per static. This feature might get deprecated at a later point once all relevant optimizations are usable from stable. -- `spin_no_std` (implies `nightly`): This allows using this crate in a no-std environment, by depending on the standalone `spin` crate. +- `spin_no_std`: This allows using this crate in a no-std environment, by depending on the standalone `spin` crate. Both features depend on unstable language features, which means no guarantees can be made about them in regard to SemVer stability. */ -#![doc(html_root_url = "https://docs.rs/lazy_static/1.2.0")] +#![doc(html_root_url = "https://docs.rs/lazy_static/1.3.0")] #![no_std] #[cfg(not(feature = "spin_no_std"))] @@ -196,7 +195,7 @@ pub trait LazyStatic { /// extern crate lazy_static; /// /// lazy_static! { -/// static ref BUFFER: Vec = (0..65537).collect(); +/// static ref BUFFER: Vec = (0..255).collect(); /// } /// /// fn main() { diff --git a/vendor/libc/.cargo-checksum.json b/vendor/libc/.cargo-checksum.json index 41a0e596c0..8e36ac76c7 100644 --- a/vendor/libc/.cargo-checksum.json +++ b/vendor/libc/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CONTRIBUTING.md":"abc79e7f6c3eee37e21baca32847b6709c973f4995b32892e80deb56b73c9ac5","Cargo.toml":"c150fb3c5d9159cce669ff588684190f7b177d3aec39c543625a714d6630b9e5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"35582cfa483e7676b25ae4a07064a19443f4942f5e60e43b91632fcd6ae95156","build.rs":"e9b7364366a5b4caa9daa436ab8a3469532fe63d5fae4d3b2e5ff59d32ff3f3a","rustfmt.toml":"8a654d5787585ca8f2c20580737336fc327f411a07b0dbd4870adf6e9bdf624f","src/cloudabi/aarch64.rs":"b8550bf1fd7344972aa4db29441486f39f31482d0327534981dbb75959c29114","src/cloudabi/arm.rs":"c197e2781c2839808bd6fcef219a29705b27b992d3ef920e9cf6ac96e2022bbf","src/cloudabi/mod.rs":"037c1a3160ae3bc336f6f7135476704e7f5e834e4039fa02b37f03b507118945","src/cloudabi/x86.rs":"33eb97f272d2201f3838ae74d444583c7de8f67856852ca375293b20bbd05636","src/cloudabi/x86_64.rs":"400d85d4fe39e26cf2e6ece9ee31c75fe9e88c4bcf4d836ca9f765c05c9c5be3","src/fuchsia/aarch64.rs":"40dce617877e606e92353491e1913711b1ecfa510bb983156f4a8460f490419e","src/fuchsia/align.rs":"9ca6271f2cbb0e6ca3b48ff6898ecee31c89b3c8388ae20be63e457aabad13a5","src/fuchsia/mod.rs":"fcadc9203451d5c04c36044f8b4cda7f64815c180446e87dbd02fbf7e6fda0f2","src/fuchsia/no_align.rs":"56868534e4ed3f94a27ed39c42f01210c8ecfdbafd4e27679860fbc65a2ae8de","src/fuchsia/x86_64.rs":"911d1249370cf1b0b7b38960cae28af1276f0f614cfcbf5174dbaa38be3dff1d","src/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/hermit/mod.rs":"9d764e53df81416a5182b71a26402d2071fc0c15160103b6670b6b268fc356da","src/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/lib.rs":"b0d525e3da42b1fde74356f3856e9054254eaefb260c2da8a253b025754c8770","src/macros.rs":"8232e284068d34336713535595fad3c910093346be32e72bde3d3d03327ec6b8","src/redox/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/redox/mod.rs":"34f132e794dc25bbb0e3c08b7f87e4508ce62e0aac00acf39dcdb0f246d7dfc0","src/redox/net.rs":"351960c3a3ad9b296fe43533cac429434e0872c8cca5ad5047dce79d82e009ee","src/redox/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/sgx.rs":"7ff2fbf3e5ad1c880014d68e012f4381a9b9140d13089193b9fba07a7f27c352","src/switch.rs":"fe1414ca053b73cf8a5f54448e807abe81c776c6ac0dfe47ea7772c8140f50b6","src/unix/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/unix/bsd/apple/b32.rs":"0095a17e49fa423cab8644c722a375b88f5c0cf56fa456b549738d98131bb2f9","src/unix/bsd/apple/b64.rs":"99fbd3e6d2c969080631e23f58deffa51cb3f42b7a08395b49556f19bb40d4e1","src/unix/bsd/apple/mod.rs":"e1959b482dc3c1703eb032b5d6e269c434326dc3eae9f99bb88d51c732cd3df0","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"2cb0a5d10a3c5721d10209ad7ddc59f6756b2c1d4bc89450988053efad788eb6","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"4dcd712c0dd5470171746071a176391f937de7865dd0792173284992d9e3f2c7","src/unix/bsd/freebsdlike/freebsd/arm.rs":"84cf36223f0229cb383036563a4902731543e89b37e4dfe2f450cced566d8545","src/unix/bsd/freebsdlike/freebsd/mod.rs":"0752dc1097fd5e94aabfe7b6d4ead2b94e5c0540e2cd3c8efee883bba13e1a0c","src/unix/bsd/freebsdlike/freebsd/powerpc64.rs":"9873f41843cbf066f6ffab8eeb63115095f81ce9fa8f337b95ec871e40c6565d","src/unix/bsd/freebsdlike/freebsd/x86.rs":"716cb67cd0aea66d4a8e40470d32b55cbfafddf75edd34a90f70d518c8c75457","src/unix/bsd/freebsdlike/freebsd/x86_64.rs":"dd3d8a546730f09b1ef0dfeeb20244eef01d1b4028799b28b3a0c33ae05d5002","src/unix/bsd/freebsdlike/mod.rs":"2938bb8b0a0f1d66912bdb4bac3e59863bd90787fe49e1d3a522098acfdb2b7a","src/unix/bsd/mod.rs":"0e92970853a9efbb51a17b9cb8009eb4e9a04cbf12d0e315659d240812c1e760","src/unix/bsd/netbsdlike/mod.rs":"77b85ecd2187df55466663f6af624416d9c99922065c6fbd0438d5b7063db89c","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"b38fc046f9a40fea28bd26328b96629f4d5d63d7524936bd6af1865d401a8716","src/unix/bsd/netbsdlike/netbsd/arm.rs":"58cdbb70b0d6f536551f0f3bb3725d2d75c4690db12c26c034e7d6ec4a924452","src/unix/bsd/netbsdlike/netbsd/mod.rs":"75adb8d6ee202d50487913c245e1a880447582f45e1ef6339743305a13fb5719","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"ee7ff5d89d0ed22f531237b5059aa669df93a3b5c489fa641465ace8d405bf41","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"9489f4b3e4566f43bb12dfb92238960613dac7f6a45cc13068a8d152b902d7d9","src/unix/bsd/netbsdlike/netbsd/x86.rs":"20692320e36bfe028d1a34d16fe12ca77aa909cb02bda167376f98f1a09aefe7","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"135509edeaf3fb3f102d89d51ff1a8f82323497336a8dc7e1f0f23b5c2434b73","src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs":"51dd68ca3c3eab0f1fe496b0dc12ad8b85f8cf964af0c2c95ab9834ad03938a8","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs":"6e6f15e81597d85d83ca0eeb154e4f8b8e7f9cbb6a9cfa176601f78642ef94f9","src/unix/bsd/netbsdlike/openbsdlike/mod.rs":"c8d18b725c62c2f1a3c5e42d875e1a3b167c13a1bd6ae3d35f35a6ec29402f81","src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs":"ee0057fb97a5e16e46e0f8e4a215f6141b68ea75dd6cb5d53166bee2431082e2","src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs":"a3fb2cfc0e100c860dff1674a90693d57e66b7f12861155ceb42c2de372454bd","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs":"1201371a662cb3515ebb42676cdca9199da7bf4d7c8f90b56f00db03a9fc61f7","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs":"26ef6f50740fad5bb722e0f30025c369c287b2204489682319f7b24fce6de98d","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b4744500d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"b451e320e5c98d6b2e7fcb804e2be6669783510011ebd8dea27d64acbf955774","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"d97797fe66dd43c61f6f895596f6a57145b4c9ef61edd93c8ff9b497a2d28411","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/mod.rs":"f9a63de7c9566cdaa970daeb3828887f7b2d8bf090da86be1a15c32288ae3da3","src/unix/newlib/aarch64/mod.rs":"c408a990f22fb4292a824f38367e9b517e6e6f8623328397ee631cc88b3d1f7d","src/unix/newlib/align.rs":"04e9b1ac6ca4af24fe5170385249fd64039ebf7f4817c5ceed3a303f3bc8a4aa","src/unix/newlib/arm/mod.rs":"2b6dba2e697ab9b4f4bc4dd5f28057249e9b596d1cb395a9322ec87605c4a5c4","src/unix/newlib/mod.rs":"e73d1b49662581382c91b3d4615d21812df58bf5477a3eba5c1df8a4c00a1c43","src/unix/newlib/no_align.rs":"7123dcec13604a11b7765c380ff3a4d0da19c39f4b03919de7857723c0cf1502","src/unix/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/unix/notbsd/android/b32/arm.rs":"3625a32c7e58cfe683a53486fbe3d42d4e28f00bea31e19cb46ed2bb0b6a140b","src/unix/notbsd/android/b32/mod.rs":"05a714a785fa94a5131af3d59612ce1e9a5823b3327eb2a23de8ad0ce125c377","src/unix/notbsd/android/b32/x86.rs":"ae2b7f1d6278caddc007749bb1d09ca33f7593478a0fd7fe98b457dae86c7814","src/unix/notbsd/android/b64/aarch64.rs":"63d65629d79371814910f691672ef593d20244ee09be26f1ebe07ee6212d0163","src/unix/notbsd/android/b64/mod.rs":"d3bcb20e70d29a450577c09706bb520fab09d0cb3102755736867bf8a957319c","src/unix/notbsd/android/b64/x86_64.rs":"5547aef8dcbaa5a932559f34606fd8d89f6c9c15173d2b1412c12d39b3c1045f","src/unix/notbsd/android/mod.rs":"87dcb5bb8edf9ca2a7e7715f28c44c1330f15419d6d4f9422a81a61b6cf27a8c","src/unix/notbsd/emscripten/align.rs":"dee06bccb5f1a58bd498468f204b8f1d8f2c2a536c595d31e730330a79af7ea5","src/unix/notbsd/emscripten/mod.rs":"42947782f571b56cc1b1c1f4364bb35519bcc44ab8aca53bb13bfd46904de1e0","src/unix/notbsd/emscripten/no_align.rs":"f3960b1d6ede1f8f9d51407a3de5337d44dd5d954e1a4c2bf0ea11e76f2629da","src/unix/notbsd/linux/align.rs":"f2520d03b411519161eaaf043f1948b3279509a3f272b2958bca1d1aeda0434d","src/unix/notbsd/linux/mips/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/notbsd/linux/mips/mips32.rs":"96153abc38b10309e64cb49b1a1e4107be70dbc40bc54ba0372a4573b098b514","src/unix/notbsd/linux/mips/mips64.rs":"9bd96aa81cb0f536c3607d0a2906f4be7a44c3f89e40d5955a898835f04f0e15","src/unix/notbsd/linux/mips/mod.rs":"9a67a2f4043907a50a43569c06ffb4890aefa8db1c26a8737c6bb4bd3e39d90e","src/unix/notbsd/linux/mips/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/notbsd/linux/mod.rs":"895c6d0c1ee5436592e35b4dd87ea361ab81b750d45250b0ff850ac1cef4750d","src/unix/notbsd/linux/musl/b32/arm.rs":"fdf170e03812072785ec531f1ae810d0c4feb9b29d0c316681b9f7affe1262c0","src/unix/notbsd/linux/musl/b32/mips.rs":"afa4981d93f29b3fb0083a73ce1323f7dce1392f90d5cf1966b1fae10d510033","src/unix/notbsd/linux/musl/b32/mod.rs":"540928f168f145c136f9dd729ffa12b9d1838d9fe664fc642365d17d7fae648f","src/unix/notbsd/linux/musl/b32/powerpc.rs":"16c615770a96f155540511f58b5a8070c9c7a43e12bdfed83996690e7558bcb5","src/unix/notbsd/linux/musl/b32/x86.rs":"adf8bb67b47995760aab14f04ae671ebd8ecca5579e90314612f46cb79b30cc2","src/unix/notbsd/linux/musl/b64/aarch64.rs":"d98643408c2837387988f78adc95c90ad21196a6f8f879e3d33d7e8ccf612640","src/unix/notbsd/linux/musl/b64/mod.rs":"d9285cd705e2e92552a08c9aa69b810e7e1bd0e9da6edf069c678af285579661","src/unix/notbsd/linux/musl/b64/powerpc64.rs":"544d8a7f6d6d84143df8a4c3537c9a3a36bf3d338d7a1c15689b94492498d8d7","src/unix/notbsd/linux/musl/b64/x86_64.rs":"19197260a6d06ee521a5aa40a1860b7be33176d0f52bc92d56165fc42729cbd5","src/unix/notbsd/linux/musl/mod.rs":"13d766411fa206b987567e7c802dfe7585e6b7f002fe13ec0fbc810e522b7e2d","src/unix/notbsd/linux/no_align.rs":"7a1cc536b26c22019d7dab6b6db3a8c9edbb753d3f37a7985c30d8894c2c6b06","src/unix/notbsd/linux/other/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/notbsd/linux/other/b32/arm.rs":"d9892f7350b2978335f734f1cd2d7fed60f0f2e66aa05bee3f69549c031f8b14","src/unix/notbsd/linux/other/b32/mod.rs":"26211878c6481861e11393625620edaa0700cac41f55f0118c0f0bd42c1b7520","src/unix/notbsd/linux/other/b32/powerpc.rs":"253fcd2f9978525285be1903cc08f3fec2dc3b12d1660a33e2995b4f6b810d1c","src/unix/notbsd/linux/other/b32/x86.rs":"fea38039a1908ddeb90672b8ef246c743eec6758663a79aea401e21ef40a736d","src/unix/notbsd/linux/other/b64/aarch64.rs":"1124ab5e974718b94fa40ae0f1772fb1c537910ef3e018b7c6c94a38b83dd742","src/unix/notbsd/linux/other/b64/mod.rs":"63e1a3fdf5f4d1b9820934ab344c91aed5e458e7e05908535d2e942d51a08bf8","src/unix/notbsd/linux/other/b64/not_x32.rs":"fa8636fb93eab230ed53bdec0a06f5b81d6d982cc0800103563c8c1eefcdb2d9","src/unix/notbsd/linux/other/b64/powerpc64.rs":"a771d982ed8a9458e1f2f039f959b5075b22443159875ba5612eebba96661c24","src/unix/notbsd/linux/other/b64/sparc64.rs":"0caffe5924886f3aed187531dfe78189b3df40adb96782ec4b471647ff83e9b1","src/unix/notbsd/linux/other/b64/x32.rs":"06a26c5120ced30fc015c220799b67c4401be2f13fc6c7361bebd3d37ff4982d","src/unix/notbsd/linux/other/b64/x86_64.rs":"017cb7cf2810bc633e21879a8951a2c10031c500648e5eb4accc6c88b58ecaa3","src/unix/notbsd/linux/other/mod.rs":"a980e9e3853f8e24498d6cd185c38097710757654480ca460f6378ffeeddf5ef","src/unix/notbsd/linux/other/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/notbsd/linux/s390x/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/notbsd/linux/s390x/mod.rs":"b01d158eefce4c31f377b63964d253f9934f7468af35a24474a163ad3725796a","src/unix/notbsd/linux/s390x/no_align.rs":"4a18e3875698c85229599225ac3401a2a40da87e77b2ad4ef47c6fcd5a24ed30","src/unix/notbsd/mod.rs":"5cfdcf78b70b4e4ef4a3733cac364a0bc2512dee798f897a8db7d78d4dd194a6","src/unix/solarish/compat.rs":"8db2a43eafbd3504e9eb9e8f18416c57d947798871bd45be3e2fb9946e292610","src/unix/solarish/mod.rs":"c6a740dac9af99321f48d5c9e86c6a4f5dcc611c413263881764f7121c1f7e9d","src/unix/uclibc/align.rs":"5607180357a9e3d87163e478116b45c7ece391d8366d65ff856cdf3e849452d7","src/unix/uclibc/arm/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/uclibc/arm/mod.rs":"66d54a7028a422fe331028441d1b1f18cf34bb2deff2a9e5220384b6e10dcc40","src/unix/uclibc/arm/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/uclibc/mips/mips32/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/uclibc/mips/mips32/mod.rs":"d1a1af63b583b170d5c94b46a04589a11b9d4f8dc658ab8c74302bae656d0e85","src/unix/uclibc/mips/mips32/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/uclibc/mips/mips64/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/uclibc/mips/mips64/mod.rs":"03f3bad1c681e6fde4a8ed999ce1d38313166c17d35eded66bd6b4f8387efeb7","src/unix/uclibc/mips/mips64/no_align.rs":"bf11b59caa173a6d94d86f42a8de9c5682f798647fba3a17169214b59ab467fe","src/unix/uclibc/mips/mod.rs":"2d76e6cfeb2b7f7c59231a6e099f1aed811a45659e62153aaf00c220b9488a9d","src/unix/uclibc/mod.rs":"924f95073f77047b1f72de3d933852d1df13b19906a63c5974a64032f1bb772c","src/unix/uclibc/no_align.rs":"3f28637046524618adaa1012e26cb7ffe94b9396e6b518cccdc69d59f274d709","src/unix/uclibc/x86_64/align.rs":"26e48fc79dbdeee4408ae8e071aa90e1be34ccdf0c135689b805aa4abd568e5e","src/unix/uclibc/x86_64/l4re.rs":"bb31053d6403091e11f95ac2203982f279f8b984a19adf30796878c45fdd8c25","src/unix/uclibc/x86_64/mod.rs":"df78de7e0234192c0559b9820c0034a24d72a0820d361f9aad05a9eac36e80ff","src/unix/uclibc/x86_64/no_align.rs":"b308f7b110caf7405b57186882cfc4804caae49a8287f8ab612ec8548467f2f4","src/unix/uclibc/x86_64/other.rs":"42c3f71e58cabba373f6a55a623f3c31b85049eb64824c09c2b082b3b2d6a0a8","src/wasi.rs":"84e88b124249816db0976cda78515af3ee3eedacbcd69ae388dc2a6bc757dcd4","src/windows/gnu.rs":"4d9033162cc6f7d245256c7b165c1ec18a741771fd9b99a55b421e8d14978599","src/windows/mod.rs":"2761f3f80c8af5c04e685af8ac3a2bc8c7d6de91cbad9b96a3a6dae67457a891","src/windows/msvc.rs":"8f46cf66883c794175609a3b2bafaa094d0ba63eb6720ef1b84b175603f1074f"},"package":"bedcc7a809076656486ffe045abeeac163da1b558e963a31e29fbfbeba916917"} \ No newline at end of file +{"files":{"CONTRIBUTING.md":"abc79e7f6c3eee37e21baca32847b6709c973f4995b32892e80deb56b73c9ac5","Cargo.toml":"4f566bfdc168610f37b79d8671c1f9c6f084e0b6cfd40083eed544273e4ab1af","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"35582cfa483e7676b25ae4a07064a19443f4942f5e60e43b91632fcd6ae95156","build.rs":"e9b7364366a5b4caa9daa436ab8a3469532fe63d5fae4d3b2e5ff59d32ff3f3a","rustfmt.toml":"8a654d5787585ca8f2c20580737336fc327f411a07b0dbd4870adf6e9bdf624f","src/cloudabi/aarch64.rs":"b8550bf1fd7344972aa4db29441486f39f31482d0327534981dbb75959c29114","src/cloudabi/arm.rs":"c197e2781c2839808bd6fcef219a29705b27b992d3ef920e9cf6ac96e2022bbf","src/cloudabi/mod.rs":"037c1a3160ae3bc336f6f7135476704e7f5e834e4039fa02b37f03b507118945","src/cloudabi/x86.rs":"33eb97f272d2201f3838ae74d444583c7de8f67856852ca375293b20bbd05636","src/cloudabi/x86_64.rs":"400d85d4fe39e26cf2e6ece9ee31c75fe9e88c4bcf4d836ca9f765c05c9c5be3","src/fuchsia/aarch64.rs":"40dce617877e606e92353491e1913711b1ecfa510bb983156f4a8460f490419e","src/fuchsia/align.rs":"9ca6271f2cbb0e6ca3b48ff6898ecee31c89b3c8388ae20be63e457aabad13a5","src/fuchsia/mod.rs":"db1936ed9e5ac6bd1c04329cbf12feb6842e2a00ca528ff8ccaf7c3b0a5ebe52","src/fuchsia/no_align.rs":"56868534e4ed3f94a27ed39c42f01210c8ecfdbafd4e27679860fbc65a2ae8de","src/fuchsia/x86_64.rs":"911d1249370cf1b0b7b38960cae28af1276f0f614cfcbf5174dbaa38be3dff1d","src/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/hermit/mod.rs":"9d764e53df81416a5182b71a26402d2071fc0c15160103b6670b6b268fc356da","src/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/lib.rs":"c9a1ddaaae192d0a40eea37b8402eb506a895711bcf493a7af5a9dfc88fac733","src/macros.rs":"8232e284068d34336713535595fad3c910093346be32e72bde3d3d03327ec6b8","src/redox/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/redox/mod.rs":"34f132e794dc25bbb0e3c08b7f87e4508ce62e0aac00acf39dcdb0f246d7dfc0","src/redox/net.rs":"351960c3a3ad9b296fe43533cac429434e0872c8cca5ad5047dce79d82e009ee","src/redox/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/sgx.rs":"7ff2fbf3e5ad1c880014d68e012f4381a9b9140d13089193b9fba07a7f27c352","src/switch.rs":"fe1414ca053b73cf8a5f54448e807abe81c776c6ac0dfe47ea7772c8140f50b6","src/unix/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/unix/bsd/apple/b32.rs":"0095a17e49fa423cab8644c722a375b88f5c0cf56fa456b549738d98131bb2f9","src/unix/bsd/apple/b64.rs":"99fbd3e6d2c969080631e23f58deffa51cb3f42b7a08395b49556f19bb40d4e1","src/unix/bsd/apple/mod.rs":"d67234bd36d2d2ab84716f597af4245cb01fc92fee362a331ae4e0a4eb723faa","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"2cb0a5d10a3c5721d10209ad7ddc59f6756b2c1d4bc89450988053efad788eb6","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"4dcd712c0dd5470171746071a176391f937de7865dd0792173284992d9e3f2c7","src/unix/bsd/freebsdlike/freebsd/arm.rs":"84cf36223f0229cb383036563a4902731543e89b37e4dfe2f450cced566d8545","src/unix/bsd/freebsdlike/freebsd/mod.rs":"0752dc1097fd5e94aabfe7b6d4ead2b94e5c0540e2cd3c8efee883bba13e1a0c","src/unix/bsd/freebsdlike/freebsd/powerpc64.rs":"9873f41843cbf066f6ffab8eeb63115095f81ce9fa8f337b95ec871e40c6565d","src/unix/bsd/freebsdlike/freebsd/x86.rs":"716cb67cd0aea66d4a8e40470d32b55cbfafddf75edd34a90f70d518c8c75457","src/unix/bsd/freebsdlike/freebsd/x86_64.rs":"dd3d8a546730f09b1ef0dfeeb20244eef01d1b4028799b28b3a0c33ae05d5002","src/unix/bsd/freebsdlike/mod.rs":"96a4baa8d7145ff29a9269437ce1fd538a18683488d85a677da78e17e070efc0","src/unix/bsd/mod.rs":"c59685127d6f238b9e9c967424c29da51668ab240e4a88962ab058e4498766b3","src/unix/bsd/netbsdlike/mod.rs":"3b32758ba7a5a133b045521c88e74f51d3718e9051f15ed66122d29267a51138","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"b38fc046f9a40fea28bd26328b96629f4d5d63d7524936bd6af1865d401a8716","src/unix/bsd/netbsdlike/netbsd/arm.rs":"58cdbb70b0d6f536551f0f3bb3725d2d75c4690db12c26c034e7d6ec4a924452","src/unix/bsd/netbsdlike/netbsd/mod.rs":"75adb8d6ee202d50487913c245e1a880447582f45e1ef6339743305a13fb5719","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"ee7ff5d89d0ed22f531237b5059aa669df93a3b5c489fa641465ace8d405bf41","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"9489f4b3e4566f43bb12dfb92238960613dac7f6a45cc13068a8d152b902d7d9","src/unix/bsd/netbsdlike/netbsd/x86.rs":"20692320e36bfe028d1a34d16fe12ca77aa909cb02bda167376f98f1a09aefe7","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"135509edeaf3fb3f102d89d51ff1a8f82323497336a8dc7e1f0f23b5c2434b73","src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs":"51dd68ca3c3eab0f1fe496b0dc12ad8b85f8cf964af0c2c95ab9834ad03938a8","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs":"6e6f15e81597d85d83ca0eeb154e4f8b8e7f9cbb6a9cfa176601f78642ef94f9","src/unix/bsd/netbsdlike/openbsdlike/mod.rs":"c8d18b725c62c2f1a3c5e42d875e1a3b167c13a1bd6ae3d35f35a6ec29402f81","src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs":"ee0057fb97a5e16e46e0f8e4a215f6141b68ea75dd6cb5d53166bee2431082e2","src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs":"a3fb2cfc0e100c860dff1674a90693d57e66b7f12861155ceb42c2de372454bd","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs":"1201371a662cb3515ebb42676cdca9199da7bf4d7c8f90b56f00db03a9fc61f7","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs":"26ef6f50740fad5bb722e0f30025c369c287b2204489682319f7b24fce6de98d","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b4744500d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"f3edcb2c6c0f8c68daebb1a17490684eae64a488570d1140bee1c2b384e25677","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"d97797fe66dd43c61f6f895596f6a57145b4c9ef61edd93c8ff9b497a2d28411","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/mod.rs":"22a5ba8f3d954d4e0c51fde9369ff5e43db891771681d4d6a7b5b640244e2ed5","src/unix/newlib/aarch64/mod.rs":"c408a990f22fb4292a824f38367e9b517e6e6f8623328397ee631cc88b3d1f7d","src/unix/newlib/align.rs":"04e9b1ac6ca4af24fe5170385249fd64039ebf7f4817c5ceed3a303f3bc8a4aa","src/unix/newlib/arm/mod.rs":"2b6dba2e697ab9b4f4bc4dd5f28057249e9b596d1cb395a9322ec87605c4a5c4","src/unix/newlib/mod.rs":"fb1c25abbcbc82fbb4842e442c9ead2710ccc597f1cce65ac12ad6f4d1f64856","src/unix/newlib/no_align.rs":"7123dcec13604a11b7765c380ff3a4d0da19c39f4b03919de7857723c0cf1502","src/unix/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/unix/notbsd/android/b32/arm.rs":"3625a32c7e58cfe683a53486fbe3d42d4e28f00bea31e19cb46ed2bb0b6a140b","src/unix/notbsd/android/b32/mod.rs":"05a714a785fa94a5131af3d59612ce1e9a5823b3327eb2a23de8ad0ce125c377","src/unix/notbsd/android/b32/x86.rs":"ae2b7f1d6278caddc007749bb1d09ca33f7593478a0fd7fe98b457dae86c7814","src/unix/notbsd/android/b64/aarch64.rs":"63d65629d79371814910f691672ef593d20244ee09be26f1ebe07ee6212d0163","src/unix/notbsd/android/b64/mod.rs":"d3bcb20e70d29a450577c09706bb520fab09d0cb3102755736867bf8a957319c","src/unix/notbsd/android/b64/x86_64.rs":"5547aef8dcbaa5a932559f34606fd8d89f6c9c15173d2b1412c12d39b3c1045f","src/unix/notbsd/android/mod.rs":"220b041d7142abb9e54004b8a5468be9afe8ad87c87e1d76f0a05f9671697bca","src/unix/notbsd/emscripten/align.rs":"dee06bccb5f1a58bd498468f204b8f1d8f2c2a536c595d31e730330a79af7ea5","src/unix/notbsd/emscripten/mod.rs":"42947782f571b56cc1b1c1f4364bb35519bcc44ab8aca53bb13bfd46904de1e0","src/unix/notbsd/emscripten/no_align.rs":"f3960b1d6ede1f8f9d51407a3de5337d44dd5d954e1a4c2bf0ea11e76f2629da","src/unix/notbsd/linux/align.rs":"f2520d03b411519161eaaf043f1948b3279509a3f272b2958bca1d1aeda0434d","src/unix/notbsd/linux/mips/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/notbsd/linux/mips/mips32.rs":"96153abc38b10309e64cb49b1a1e4107be70dbc40bc54ba0372a4573b098b514","src/unix/notbsd/linux/mips/mips64.rs":"9bd96aa81cb0f536c3607d0a2906f4be7a44c3f89e40d5955a898835f04f0e15","src/unix/notbsd/linux/mips/mod.rs":"9a67a2f4043907a50a43569c06ffb4890aefa8db1c26a8737c6bb4bd3e39d90e","src/unix/notbsd/linux/mips/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/notbsd/linux/mod.rs":"e3531ef28589e4dfd9861f5bd0ba175200dedb69d48f20842baeb129fd8761e1","src/unix/notbsd/linux/musl/b32/arm.rs":"fdf170e03812072785ec531f1ae810d0c4feb9b29d0c316681b9f7affe1262c0","src/unix/notbsd/linux/musl/b32/mips.rs":"afa4981d93f29b3fb0083a73ce1323f7dce1392f90d5cf1966b1fae10d510033","src/unix/notbsd/linux/musl/b32/mod.rs":"540928f168f145c136f9dd729ffa12b9d1838d9fe664fc642365d17d7fae648f","src/unix/notbsd/linux/musl/b32/powerpc.rs":"16c615770a96f155540511f58b5a8070c9c7a43e12bdfed83996690e7558bcb5","src/unix/notbsd/linux/musl/b32/x86.rs":"adf8bb67b47995760aab14f04ae671ebd8ecca5579e90314612f46cb79b30cc2","src/unix/notbsd/linux/musl/b64/aarch64.rs":"d98643408c2837387988f78adc95c90ad21196a6f8f879e3d33d7e8ccf612640","src/unix/notbsd/linux/musl/b64/mod.rs":"d9285cd705e2e92552a08c9aa69b810e7e1bd0e9da6edf069c678af285579661","src/unix/notbsd/linux/musl/b64/powerpc64.rs":"544d8a7f6d6d84143df8a4c3537c9a3a36bf3d338d7a1c15689b94492498d8d7","src/unix/notbsd/linux/musl/b64/x86_64.rs":"19197260a6d06ee521a5aa40a1860b7be33176d0f52bc92d56165fc42729cbd5","src/unix/notbsd/linux/musl/mod.rs":"13d766411fa206b987567e7c802dfe7585e6b7f002fe13ec0fbc810e522b7e2d","src/unix/notbsd/linux/no_align.rs":"7a1cc536b26c22019d7dab6b6db3a8c9edbb753d3f37a7985c30d8894c2c6b06","src/unix/notbsd/linux/other/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/notbsd/linux/other/b32/arm.rs":"d9892f7350b2978335f734f1cd2d7fed60f0f2e66aa05bee3f69549c031f8b14","src/unix/notbsd/linux/other/b32/mod.rs":"26211878c6481861e11393625620edaa0700cac41f55f0118c0f0bd42c1b7520","src/unix/notbsd/linux/other/b32/powerpc.rs":"253fcd2f9978525285be1903cc08f3fec2dc3b12d1660a33e2995b4f6b810d1c","src/unix/notbsd/linux/other/b32/x86.rs":"fea38039a1908ddeb90672b8ef246c743eec6758663a79aea401e21ef40a736d","src/unix/notbsd/linux/other/b64/aarch64.rs":"1124ab5e974718b94fa40ae0f1772fb1c537910ef3e018b7c6c94a38b83dd742","src/unix/notbsd/linux/other/b64/mod.rs":"63e1a3fdf5f4d1b9820934ab344c91aed5e458e7e05908535d2e942d51a08bf8","src/unix/notbsd/linux/other/b64/not_x32.rs":"fa8636fb93eab230ed53bdec0a06f5b81d6d982cc0800103563c8c1eefcdb2d9","src/unix/notbsd/linux/other/b64/powerpc64.rs":"a771d982ed8a9458e1f2f039f959b5075b22443159875ba5612eebba96661c24","src/unix/notbsd/linux/other/b64/sparc64.rs":"0caffe5924886f3aed187531dfe78189b3df40adb96782ec4b471647ff83e9b1","src/unix/notbsd/linux/other/b64/x32.rs":"06a26c5120ced30fc015c220799b67c4401be2f13fc6c7361bebd3d37ff4982d","src/unix/notbsd/linux/other/b64/x86_64.rs":"017cb7cf2810bc633e21879a8951a2c10031c500648e5eb4accc6c88b58ecaa3","src/unix/notbsd/linux/other/mod.rs":"86d6c4f5a01b4da8cf9bbfa7f6fedbeda1c9b1c0528244ce9033a647cd0567d5","src/unix/notbsd/linux/other/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/notbsd/linux/s390x/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/notbsd/linux/s390x/mod.rs":"b01d158eefce4c31f377b63964d253f9934f7468af35a24474a163ad3725796a","src/unix/notbsd/linux/s390x/no_align.rs":"4a18e3875698c85229599225ac3401a2a40da87e77b2ad4ef47c6fcd5a24ed30","src/unix/notbsd/mod.rs":"8aa3fc4d3879b6897871c55c4cb70ff7a63c399d2409a729cc788f21f987452e","src/unix/solarish/compat.rs":"8db2a43eafbd3504e9eb9e8f18416c57d947798871bd45be3e2fb9946e292610","src/unix/solarish/mod.rs":"0c6d148d84f2fa9feb86b464d30af9c52322553bf321ae4fe27184d274ccbe21","src/unix/uclibc/align.rs":"5607180357a9e3d87163e478116b45c7ece391d8366d65ff856cdf3e849452d7","src/unix/uclibc/arm/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/uclibc/arm/mod.rs":"66d54a7028a422fe331028441d1b1f18cf34bb2deff2a9e5220384b6e10dcc40","src/unix/uclibc/arm/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/uclibc/mips/mips32/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/uclibc/mips/mips32/mod.rs":"d1a1af63b583b170d5c94b46a04589a11b9d4f8dc658ab8c74302bae656d0e85","src/unix/uclibc/mips/mips32/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/uclibc/mips/mips64/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/uclibc/mips/mips64/mod.rs":"03f3bad1c681e6fde4a8ed999ce1d38313166c17d35eded66bd6b4f8387efeb7","src/unix/uclibc/mips/mips64/no_align.rs":"bf11b59caa173a6d94d86f42a8de9c5682f798647fba3a17169214b59ab467fe","src/unix/uclibc/mips/mod.rs":"2d76e6cfeb2b7f7c59231a6e099f1aed811a45659e62153aaf00c220b9488a9d","src/unix/uclibc/mod.rs":"d7c2b44735fe8a892fb05ab888de8311fc1f7a86f3aef818b7ff04fae70447fa","src/unix/uclibc/no_align.rs":"3f28637046524618adaa1012e26cb7ffe94b9396e6b518cccdc69d59f274d709","src/unix/uclibc/x86_64/align.rs":"26e48fc79dbdeee4408ae8e071aa90e1be34ccdf0c135689b805aa4abd568e5e","src/unix/uclibc/x86_64/l4re.rs":"bb31053d6403091e11f95ac2203982f279f8b984a19adf30796878c45fdd8c25","src/unix/uclibc/x86_64/mod.rs":"df78de7e0234192c0559b9820c0034a24d72a0820d361f9aad05a9eac36e80ff","src/unix/uclibc/x86_64/no_align.rs":"b308f7b110caf7405b57186882cfc4804caae49a8287f8ab612ec8548467f2f4","src/unix/uclibc/x86_64/other.rs":"42c3f71e58cabba373f6a55a623f3c31b85049eb64824c09c2b082b3b2d6a0a8","src/wasi.rs":"e322bdc14bf7f8c34de8fc4ea52fd6279bbc9d6c205efa8b9b8925e8b12c4b6c","src/windows/gnu.rs":"4d9033162cc6f7d245256c7b165c1ec18a741771fd9b99a55b421e8d14978599","src/windows/mod.rs":"2761f3f80c8af5c04e685af8ac3a2bc8c7d6de91cbad9b96a3a6dae67457a891","src/windows/msvc.rs":"8f46cf66883c794175609a3b2bafaa094d0ba63eb6720ef1b84b175603f1074f"},"package":"c6785aa7dd976f5fbf3b71cfd9cd49d7f783c1ff565a858d71031c6c313aa5c6"} \ No newline at end of file diff --git a/vendor/libc/Cargo.toml b/vendor/libc/Cargo.toml index 136b0ff6a6..c8a6f0f19b 100644 --- a/vendor/libc/Cargo.toml +++ b/vendor/libc/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,7 +12,7 @@ [package] name = "libc" -version = "0.2.51" +version = "0.2.54" authors = ["The Rust Project Developers"] build = "build.rs" exclude = ["/ci/*", "/.travis.yml", "/appveyor.yml"] diff --git a/vendor/libc/src/fuchsia/mod.rs b/vendor/libc/src/fuchsia/mod.rs index 01317e30a4..cef48e5224 100644 --- a/vendor/libc/src/fuchsia/mod.rs +++ b/vendor/libc/src/fuchsia/mod.rs @@ -4168,7 +4168,7 @@ extern { offset: *mut off_t, count: ::size_t) -> ::ssize_t; pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; - pub fn getgrgid_r(uid: ::uid_t, + pub fn getgrgid_r(gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, diff --git a/vendor/libc/src/lib.rs b/vendor/libc/src/lib.rs index 2571f81a6c..426b684962 100644 --- a/vendor/libc/src/lib.rs +++ b/vendor/libc/src/lib.rs @@ -112,7 +112,7 @@ cfg_if! { } else if #[cfg(all(target_env = "sgx", target_vendor = "fortanix"))] { mod sgx; pub use sgx::*; - } else if #[cfg(target_env = "wasi")] { + } else if #[cfg(any(target_env = "wasi", target_os = "wasi"))] { mod wasi; pub use wasi::*; } else { diff --git a/vendor/libc/src/unix/bsd/apple/mod.rs b/vendor/libc/src/unix/bsd/apple/mod.rs index 3c0877b275..9483e90b62 100644 --- a/vendor/libc/src/unix/bsd/apple/mod.rs +++ b/vendor/libc/src/unix/bsd/apple/mod.rs @@ -3168,6 +3168,7 @@ extern { name: *mut ::c_char, termp: *mut termios, winp: *mut ::winsize) -> ::pid_t; + pub fn login_tty(fd: ::c_int) -> ::c_int; pub fn duplocale(base: ::locale_t) -> ::locale_t; pub fn freelocale(loc: ::locale_t) -> ::c_int; pub fn localeconv_l(loc: ::locale_t) -> *mut lconv; diff --git a/vendor/libc/src/unix/bsd/freebsdlike/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/mod.rs index 32dbb76968..7a82a45e13 100644 --- a/vendor/libc/src/unix/bsd/freebsdlike/mod.rs +++ b/vendor/libc/src/unix/bsd/freebsdlike/mod.rs @@ -1299,6 +1299,7 @@ extern { name: *mut ::c_char, termp: *mut termios, winp: *mut ::winsize) -> ::pid_t; + pub fn login_tty(fd: ::c_int) -> ::c_int; } cfg_if! { diff --git a/vendor/libc/src/unix/bsd/mod.rs b/vendor/libc/src/unix/bsd/mod.rs index e1a2f416fd..162be9d7f9 100644 --- a/vendor/libc/src/unix/bsd/mod.rs +++ b/vendor/libc/src/unix/bsd/mod.rs @@ -594,7 +594,7 @@ extern { pub fn sync(); #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")] - pub fn getgrgid_r(uid: ::uid_t, + pub fn getgrgid_r(gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, diff --git a/vendor/libc/src/unix/bsd/netbsdlike/mod.rs b/vendor/libc/src/unix/bsd/netbsdlike/mod.rs index 3ef2e09e42..c75e6de0a3 100644 --- a/vendor/libc/src/unix/bsd/netbsdlike/mod.rs +++ b/vendor/libc/src/unix/bsd/netbsdlike/mod.rs @@ -643,6 +643,7 @@ extern { name: *mut ::c_char, termp: *mut termios, winp: *mut ::winsize) -> ::pid_t; + pub fn login_tty(fd: ::c_int) -> ::c_int; pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int; pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int; diff --git a/vendor/libc/src/unix/haiku/mod.rs b/vendor/libc/src/unix/haiku/mod.rs index bcf4613ddc..26519a4770 100644 --- a/vendor/libc/src/unix/haiku/mod.rs +++ b/vendor/libc/src/unix/haiku/mod.rs @@ -1306,7 +1306,7 @@ extern { pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char, environment: *const *const ::c_char) -> ::c_int; #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")] - pub fn getgrgid_r(uid: ::uid_t, + pub fn getgrgid_r(gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs index 15f7c7f2ea..1be0095343 100644 --- a/vendor/libc/src/unix/mod.rs +++ b/vendor/libc/src/unix/mod.rs @@ -612,9 +612,13 @@ extern { pub fn readdir(dirp: *mut ::DIR) -> *mut ::dirent; #[cfg_attr(target_os = "macos", link_name = "readdir_r$INODE64")] #[cfg_attr(target_os = "netbsd", link_name = "__readdir_r30")] - #[cfg_attr(any(target_os = "solaris", target_os = "illumos"), - link_name = "__posix_readdir_r")] #[cfg_attr(target_os = "freebsd", link_name = "readdir_r@FBSD_1.0")] + /// The 64-bit libc on Solaris and illumos only has readdir_r. If a + /// 32-bit Solaris or illumos target is ever created, it should use + /// __posix_readdir_r. See libc(3LIB) on Solaris or illumos: + /// https://illumos.org/man/3lib/libc + /// https://docs.oracle.com/cd/E36784_01/html/E36873/libc-3lib.html + /// https://www.unix.com/man-page/opensolaris/3LIB/libc/ pub fn readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent, result: *mut *mut ::dirent) -> ::c_int; #[cfg_attr(all(target_os = "macos", target_arch = "x86"), diff --git a/vendor/libc/src/unix/newlib/mod.rs b/vendor/libc/src/unix/newlib/mod.rs index e2c7fca076..791edb39cf 100644 --- a/vendor/libc/src/unix/newlib/mod.rs +++ b/vendor/libc/src/unix/newlib/mod.rs @@ -581,7 +581,7 @@ extern { envp: *const *const ::c_char) -> ::c_int; #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")] - pub fn getgrgid_r(uid: ::uid_t, + pub fn getgrgid_r(gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, diff --git a/vendor/libc/src/unix/notbsd/android/mod.rs b/vendor/libc/src/unix/notbsd/android/mod.rs index f7fe61a21d..179893e517 100644 --- a/vendor/libc/src/unix/notbsd/android/mod.rs +++ b/vendor/libc/src/unix/notbsd/android/mod.rs @@ -2031,7 +2031,7 @@ extern { pub fn setfsuid(uid: ::uid_t) -> ::c_int; pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")] - pub fn getgrgid_r(uid: ::uid_t, + pub fn getgrgid_r(gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, diff --git a/vendor/libc/src/unix/notbsd/linux/mod.rs b/vendor/libc/src/unix/notbsd/linux/mod.rs index 14c2463fa9..3d9ccada03 100644 --- a/vendor/libc/src/unix/notbsd/linux/mod.rs +++ b/vendor/libc/src/unix/notbsd/linux/mod.rs @@ -2278,7 +2278,7 @@ extern { count: ::size_t) -> ::ssize_t; pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")] - pub fn getgrgid_r(uid: ::uid_t, + pub fn getgrgid_r(gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, diff --git a/vendor/libc/src/unix/notbsd/linux/other/mod.rs b/vendor/libc/src/unix/notbsd/linux/other/mod.rs index 3d177bd276..8a643768de 100644 --- a/vendor/libc/src/unix/notbsd/linux/other/mod.rs +++ b/vendor/libc/src/unix/notbsd/linux/other/mod.rs @@ -48,6 +48,12 @@ s! { pub si_signo: ::c_int, pub si_errno: ::c_int, pub si_code: ::c_int, + #[deprecated( + since="0.2.54", + note="Please leave a comment on \ + https://github.com/rust-lang/libc/pull/1316 if you're using \ + this field" + )] pub _pad: [::c_int; 29], #[cfg(target_arch = "x86_64")] _align: [u64; 0], @@ -194,6 +200,19 @@ s! { } } +impl siginfo_t { + pub unsafe fn si_addr(&self) -> *mut ::c_void { + #[repr(C)] + struct siginfo_sigfault { + _si_signo: ::c_int, + _si_errno: ::c_int, + _si_code: ::c_int, + si_addr: *mut ::c_void + } + (*(self as *const siginfo_t as *const siginfo_sigfault)).si_addr + } +} + s_no_extra_traits! { pub struct utmpx { pub ut_type: ::c_short, diff --git a/vendor/libc/src/unix/notbsd/mod.rs b/vendor/libc/src/unix/notbsd/mod.rs index 2af3913097..d0905e11ff 100644 --- a/vendor/libc/src/unix/notbsd/mod.rs +++ b/vendor/libc/src/unix/notbsd/mod.rs @@ -1383,6 +1383,11 @@ extern { name: *mut ::c_char, termp: *const termios, winp: *const ::winsize) -> ::c_int; + pub fn forkpty(amaster: *mut ::c_int, + name: *mut ::c_char, + termp: *const termios, + winp: *const ::winsize) -> ::pid_t; + pub fn login_tty(fd: ::c_int) -> ::c_int; pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char, envp: *const *const ::c_char) -> ::c_int; pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char, @@ -1422,7 +1427,3 @@ cfg_if! { // Unknown target_os } } - // pub fn forkpty(amaster: *mut ::c_int, - // name: *mut ::c_char, - // termp: *const termios, - // winp: *const ::winsize) -> ::pid_t; diff --git a/vendor/libc/src/unix/solarish/mod.rs b/vendor/libc/src/unix/solarish/mod.rs index ab36e5730f..1092d152de 100644 --- a/vendor/libc/src/unix/solarish/mod.rs +++ b/vendor/libc/src/unix/solarish/mod.rs @@ -1937,7 +1937,7 @@ extern { -> ::c_int; #[cfg_attr(any(target_os = "solaris", target_os = "illumos"), link_name = "__posix_getgrgid_r")] - pub fn getgrgid_r(uid: ::uid_t, + pub fn getgrgid_r(gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, diff --git a/vendor/libc/src/unix/uclibc/mod.rs b/vendor/libc/src/unix/uclibc/mod.rs index eec3fe01ca..e3baba0614 100644 --- a/vendor/libc/src/unix/uclibc/mod.rs +++ b/vendor/libc/src/unix/uclibc/mod.rs @@ -1837,7 +1837,7 @@ extern { pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t; #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")] - pub fn getgrgid_r(uid: ::uid_t, + pub fn getgrgid_r(gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, diff --git a/vendor/libc/src/wasi.rs b/vendor/libc/src/wasi.rs index 13af0b5368..a014e4c0fa 100644 --- a/vendor/libc/src/wasi.rs +++ b/vendor/libc/src/wasi.rs @@ -26,6 +26,17 @@ pub type clock_t = c_longlong; pub type time_t = c_longlong; pub type c_double = f64; pub type c_float = f32; +pub type ino_t = u64; +pub type sigset_t = c_uchar; +pub type suseconds_t = c_longlong; +pub type mode_t = u32; +pub type dev_t = u64; +pub type uid_t = u32; +pub type gid_t = u32; +pub type nlink_t = u64; +pub type blksize_t = c_long; +pub type blkcnt_t = i64; +pub type nfds_t = c_ulong; pub type __wasi_advice_t = u8; pub type __wasi_clockid_t = u32; @@ -57,14 +68,17 @@ pub type __wasi_userdata_t = u64; pub type __wasi_whence_t = u8; pub type __wasi_preopentype_t = u8; +#[allow(missing_copy_implementations)] #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum FILE {} -impl ::Copy for FILE {} -impl ::Clone for FILE { - fn clone(&self) -> FILE { - *self - } -} +#[allow(missing_copy_implementations)] +#[cfg_attr(feature = "extra_traits", derive(Debug))] +pub enum DIR {} +#[allow(missing_copy_implementations)] +#[cfg_attr(feature = "extra_traits", derive(Debug))] +pub enum __locale_struct {} + +pub type locale_t = *mut __locale_struct; s! { #[repr(align(8))] @@ -87,16 +101,89 @@ s! { pub __tm_nsec: c_int, } + pub struct timeval { + pub tv_sec: time_t, + pub tv_usec: suseconds_t, + } + pub struct timespec { pub tv_sec: time_t, pub tv_nsec: c_long, } + pub struct tms { + pub tms_utime: clock_t, + pub tms_stime: clock_t, + pub tms_cutime: clock_t, + pub tms_cstime: clock_t, + } + pub struct itimerspec { pub it_interval: timespec, pub it_value: timespec, } + pub struct iovec { + pub iov_base: *mut c_void, + pub iov_len: size_t, + } + + pub struct lconv { + pub decimal_point: *mut c_char, + pub thousands_sep: *mut c_char, + pub grouping: *mut c_char, + pub int_curr_symbol: *mut c_char, + pub currency_symbol: *mut c_char, + pub mon_decimal_point: *mut c_char, + pub mon_thousands_sep: *mut c_char, + pub mon_grouping: *mut c_char, + pub positive_sign: *mut c_char, + pub negative_sign: *mut c_char, + pub int_frac_digits: c_char, + pub frac_digits: c_char, + pub p_cs_precedes: c_char, + pub p_sep_by_space: c_char, + pub n_cs_precedes: c_char, + pub n_sep_by_space: c_char, + pub p_sign_posn: c_char, + pub n_sign_posn: c_char, + pub int_p_cs_precedes: c_char, + pub int_p_sep_by_space: c_char, + pub int_n_cs_precedes: c_char, + pub int_n_sep_by_space: c_char, + pub int_p_sign_posn: c_char, + pub int_n_sign_posn: c_char, + } + + pub struct pollfd { + pub fd: c_int, + pub events: c_short, + pub revents: c_short, + } + + pub struct rusage { + pub ru_utime: timeval, + pub ru_stime: timeval, + } + + pub struct stat { + pub st_dev: dev_t, + pub st_ino: ino_t, + pub st_nlink: nlink_t, + pub st_mode: mode_t, + pub st_uid: uid_t, + pub st_gid: gid_t, + __pad0: c_uint, + pub st_rdev: dev_t, + pub st_size: off_t, + pub st_blksize: blksize_t, + pub st_blocks: blkcnt_t, + pub st_atim: timespec, + pub st_mtim: timespec, + pub st_ctim: timespec, + __reserved: [c_longlong; 3], + } + pub struct __wasi_dirent_t { pub d_next: __wasi_dircookie_t, pub d_ino: __wasi_inode_t, @@ -197,12 +284,137 @@ s_no_extra_traits! { } +// Declare dirent outside of s! so that it doesn't implement Copy, Eq, Hash, +// etc., since it contains a flexible array member with a dynamic size. +#[repr(C)] +#[allow(missing_copy_implementations)] +#[cfg_attr(feature = "extra_traits", derive(Debug))] +pub struct dirent { + pub d_ino: ino_t, + pub d_type: c_uchar, + /// d_name is declared in WASI libc as a flexible array member, which + /// can't be directly expressed in Rust. As an imperfect workaround, + /// declare it as a zero-length array instead. + pub d_name: [c_char; 0], +} + +pub const EXIT_SUCCESS: c_int = 0; +pub const EXIT_FAILURE: c_int = 1; pub const STDIN_FILENO: c_int = 0; pub const STDOUT_FILENO: c_int = 1; pub const STDERR_FILENO: c_int = 2; pub const SEEK_SET: c_int = 2; pub const SEEK_CUR: c_int = 0; pub const SEEK_END: c_int = 1; +pub const _IOFBF: c_int = 0; +pub const _IONBF: c_int = 2; +pub const _IOLBF: c_int = 1; +pub const FD_SETSIZE: size_t = 1024; +pub const O_APPEND: c_int = __WASI_FDFLAG_APPEND as c_int; +pub const O_DSYNC: c_int = __WASI_FDFLAG_DSYNC as c_int; +pub const O_NONBLOCK: c_int = __WASI_FDFLAG_NONBLOCK as c_int; +pub const O_RSYNC: c_int = __WASI_FDFLAG_RSYNC as c_int; +pub const O_SYNC: c_int = __WASI_FDFLAG_SYNC as c_int; +pub const O_CREAT: c_int = (__WASI_O_CREAT as c_int) << 12; +pub const O_DIRECTORY: c_int = (__WASI_O_DIRECTORY as c_int) << 12; +pub const O_EXCL: c_int = (__WASI_O_EXCL as c_int) << 12; +pub const O_TRUNC: c_int = (__WASI_O_TRUNC as c_int) << 12; +pub const O_NOFOLLOW: c_int = 0x01000000; +pub const O_EXEC: c_int = 0x02000000; +pub const O_RDONLY: c_int = 0x04000000; +pub const O_SEARCH: c_int = 0x08000000; +pub const O_WRONLY: c_int = 0x10000000; +pub const O_RDWR: c_int = O_WRONLY | O_RDONLY; +pub const O_ACCMODE: c_int = O_EXEC | O_RDWR | O_SEARCH; +pub const POSIX_FADV_DONTNEED: c_int = __WASI_ADVICE_DONTNEED as c_int; +pub const POSIX_FADV_NOREUSE: c_int = __WASI_ADVICE_NOREUSE as c_int; +pub const POSIX_FADV_NORMAL: c_int = __WASI_ADVICE_NORMAL as c_int; +pub const POSIX_FADV_RANDOM: c_int = __WASI_ADVICE_RANDOM as c_int; +pub const POSIX_FADV_SEQUENTIAL: c_int = __WASI_ADVICE_SEQUENTIAL as c_int; +pub const POSIX_FADV_WILLNEED: c_int = __WASI_ADVICE_WILLNEED as c_int; +pub const AT_EACCESS: c_int = 0x0; +pub const AT_SYMLINK_NOFOLLOW: c_int = 0x1; +pub const AT_SYMLINK_FOLLOW: c_int = 0x2; +pub const AT_REMOVEDIR: c_int = 0x4; + +pub const E2BIG: c_int = __WASI_E2BIG as c_int; +pub const EACCES: c_int = __WASI_EACCES as c_int; +pub const EADDRINUSE: c_int = __WASI_EADDRINUSE as c_int; +pub const EADDRNOTAVAIL: c_int = __WASI_EADDRNOTAVAIL as c_int; +pub const EAFNOSUPPORT: c_int = __WASI_EAFNOSUPPORT as c_int; +pub const EAGAIN: c_int = __WASI_EAGAIN as c_int; +pub const EALREADY: c_int = __WASI_EALREADY as c_int; +pub const EBADF: c_int = __WASI_EBADF as c_int; +pub const EBADMSG: c_int = __WASI_EBADMSG as c_int; +pub const EBUSY: c_int = __WASI_EBUSY as c_int; +pub const ECANCELED: c_int = __WASI_ECANCELED as c_int; +pub const ECHILD: c_int = __WASI_ECHILD as c_int; +pub const ECONNABORTED: c_int = __WASI_ECONNABORTED as c_int; +pub const ECONNREFUSED: c_int = __WASI_ECONNREFUSED as c_int; +pub const ECONNRESET: c_int = __WASI_ECONNRESET as c_int; +pub const EDEADLK: c_int = __WASI_EDEADLK as c_int; +pub const EDESTADDRREQ: c_int = __WASI_EDESTADDRREQ as c_int; +pub const EDOM: c_int = __WASI_EDOM as c_int; +pub const EDQUOT: c_int = __WASI_EDQUOT as c_int; +pub const EEXIST: c_int = __WASI_EEXIST as c_int; +pub const EFAULT: c_int = __WASI_EFAULT as c_int; +pub const EFBIG: c_int = __WASI_EFBIG as c_int; +pub const EHOSTUNREACH: c_int = __WASI_EHOSTUNREACH as c_int; +pub const EIDRM: c_int = __WASI_EIDRM as c_int; +pub const EILSEQ: c_int = __WASI_EILSEQ as c_int; +pub const EINPROGRESS: c_int = __WASI_EINPROGRESS as c_int; +pub const EINTR: c_int = __WASI_EINTR as c_int; +pub const EINVAL: c_int = __WASI_EINVAL as c_int; +pub const EIO: c_int = __WASI_EIO as c_int; +pub const EISCONN: c_int = __WASI_EISCONN as c_int; +pub const EISDIR: c_int = __WASI_EISDIR as c_int; +pub const ELOOP: c_int = __WASI_ELOOP as c_int; +pub const EMFILE: c_int = __WASI_EMFILE as c_int; +pub const EMLINK: c_int = __WASI_EMLINK as c_int; +pub const EMSGSIZE: c_int = __WASI_EMSGSIZE as c_int; +pub const EMULTIHOP: c_int = __WASI_EMULTIHOP as c_int; +pub const ENAMETOOLONG: c_int = __WASI_ENAMETOOLONG as c_int; +pub const ENETDOWN: c_int = __WASI_ENETDOWN as c_int; +pub const ENETRESET: c_int = __WASI_ENETRESET as c_int; +pub const ENETUNREACH: c_int = __WASI_ENETUNREACH as c_int; +pub const ENFILE: c_int = __WASI_ENFILE as c_int; +pub const ENOBUFS: c_int = __WASI_ENOBUFS as c_int; +pub const ENODEV: c_int = __WASI_ENODEV as c_int; +pub const ENOENT: c_int = __WASI_ENOENT as c_int; +pub const ENOEXEC: c_int = __WASI_ENOEXEC as c_int; +pub const ENOLCK: c_int = __WASI_ENOLCK as c_int; +pub const ENOLINK: c_int = __WASI_ENOLINK as c_int; +pub const ENOMEM: c_int = __WASI_ENOMEM as c_int; +pub const ENOMSG: c_int = __WASI_ENOMSG as c_int; +pub const ENOPROTOOPT: c_int = __WASI_ENOPROTOOPT as c_int; +pub const ENOSPC: c_int = __WASI_ENOSPC as c_int; +pub const ENOSYS: c_int = __WASI_ENOSYS as c_int; +pub const ENOTCONN: c_int = __WASI_ENOTCONN as c_int; +pub const ENOTDIR: c_int = __WASI_ENOTDIR as c_int; +pub const ENOTEMPTY: c_int = __WASI_ENOTEMPTY as c_int; +pub const ENOTRECOVERABLE: c_int = __WASI_ENOTRECOVERABLE as c_int; +pub const ENOTSOCK: c_int = __WASI_ENOTSOCK as c_int; +pub const ENOTSUP: c_int = __WASI_ENOTSUP as c_int; +pub const ENOTTY: c_int = __WASI_ENOTTY as c_int; +pub const ENXIO: c_int = __WASI_ENXIO as c_int; +pub const EOVERFLOW: c_int = __WASI_EOVERFLOW as c_int; +pub const EOWNERDEAD: c_int = __WASI_EOWNERDEAD as c_int; +pub const EPERM: c_int = __WASI_EPERM as c_int; +pub const EPIPE: c_int = __WASI_EPIPE as c_int; +pub const EPROTO: c_int = __WASI_EPROTO as c_int; +pub const EPROTONOSUPPORT: c_int = __WASI_EPROTONOSUPPORT as c_int; +pub const EPROTOTYPE: c_int = __WASI_EPROTOTYPE as c_int; +pub const ERANGE: c_int = __WASI_ERANGE as c_int; +pub const EROFS: c_int = __WASI_EROFS as c_int; +pub const ESPIPE: c_int = __WASI_ESPIPE as c_int; +pub const ESRCH: c_int = __WASI_ESRCH as c_int; +pub const ESTALE: c_int = __WASI_ESTALE as c_int; +pub const ETIMEDOUT: c_int = __WASI_ETIMEDOUT as c_int; +pub const ETXTBSY: c_int = __WASI_ETXTBSY as c_int; +pub const EXDEV: c_int = __WASI_EXDEV as c_int; +pub const ENOTCAPABLE: c_int = __WASI_ENOTCAPABLE as c_int; +pub const EOPNOTSUPP: c_int = ENOTSUP; +pub const EWOULDBLOCK: c_int = EAGAIN; pub const __WASI_ADVICE_NORMAL: u8 = 0; pub const __WASI_ADVICE_SEQUENTIAL: u8 = 1; @@ -388,11 +600,14 @@ pub const __WASI_WHENCE_CUR: u8 = 0; pub const __WASI_WHENCE_END: u8 = 1; pub const __WASI_WHENCE_SET: u8 = 2; -#[cfg_attr(feature = "rustc-dep-of-std", - link(name = "c", kind = "static", - cfg(target_feature = "crt-static")))] -#[cfg_attr(feature = "rustc-dep-of-std", - link(name = "c", cfg(not(target_feature = "crt-static"))))] +#[cfg_attr( + feature = "rustc-dep-of-std", + link(name = "c", kind = "static", cfg(target_feature = "crt-static")) +)] +#[cfg_attr( + feature = "rustc-dep-of-std", + link(name = "c", cfg(not(target_feature = "crt-static"))) +)] extern { pub fn _Exit(code: c_int) -> !; pub fn _exit(code: c_int) -> !; @@ -486,6 +701,325 @@ extern { // c: *mut timespec, // ) -> c_int; + pub fn isalnum(c: c_int) -> c_int; + pub fn isalpha(c: c_int) -> c_int; + pub fn iscntrl(c: c_int) -> c_int; + pub fn isdigit(c: c_int) -> c_int; + pub fn isgraph(c: c_int) -> c_int; + pub fn islower(c: c_int) -> c_int; + pub fn isprint(c: c_int) -> c_int; + pub fn ispunct(c: c_int) -> c_int; + pub fn isspace(c: c_int) -> c_int; + pub fn isupper(c: c_int) -> c_int; + pub fn isxdigit(c: c_int) -> c_int; + pub fn tolower(c: c_int) -> c_int; + pub fn toupper(c: c_int) -> c_int; + pub fn setvbuf( + stream: *mut FILE, + buffer: *mut c_char, + mode: c_int, + size: size_t, + ) -> c_int; + pub fn setbuf(stream: *mut FILE, buf: *mut c_char); + pub fn fgets(buf: *mut c_char, n: c_int, stream: *mut FILE) + -> *mut c_char; + pub fn atoi(s: *const c_char) -> c_int; + pub fn strtod(s: *const c_char, endp: *mut *mut c_char) -> c_double; + pub fn strtol( + s: *const c_char, + endp: *mut *mut c_char, + base: c_int, + ) -> c_long; + pub fn strtoul( + s: *const c_char, + endp: *mut *mut c_char, + base: c_int, + ) -> c_ulong; + + pub fn strcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char; + pub fn strncpy( + dst: *mut c_char, + src: *const c_char, + n: size_t, + ) -> *mut c_char; + pub fn strcat(s: *mut c_char, ct: *const c_char) -> *mut c_char; + pub fn strncat( + s: *mut c_char, + ct: *const c_char, + n: size_t, + ) -> *mut c_char; + pub fn strcmp(cs: *const c_char, ct: *const c_char) -> c_int; + pub fn strncmp(cs: *const c_char, ct: *const c_char, n: size_t) -> c_int; + pub fn strcoll(cs: *const c_char, ct: *const c_char) -> c_int; + pub fn strchr(cs: *const c_char, c: c_int) -> *mut c_char; + pub fn strrchr(cs: *const c_char, c: c_int) -> *mut c_char; + pub fn strspn(cs: *const c_char, ct: *const c_char) -> size_t; + pub fn strcspn(cs: *const c_char, ct: *const c_char) -> size_t; + pub fn strdup(cs: *const c_char) -> *mut c_char; + pub fn strpbrk(cs: *const c_char, ct: *const c_char) -> *mut c_char; + pub fn strstr(cs: *const c_char, ct: *const c_char) -> *mut c_char; + pub fn strcasecmp(s1: *const c_char, s2: *const c_char) -> c_int; + pub fn strncasecmp( + s1: *const c_char, + s2: *const c_char, + n: size_t, + ) -> c_int; + pub fn strlen(cs: *const c_char) -> size_t; + pub fn strnlen(cs: *const c_char, maxlen: size_t) -> size_t; + pub fn strerror(n: c_int) -> *mut c_char; + pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char; + pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t; + + pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; + pub fn memcmp(cx: *const c_void, ct: *const c_void, n: size_t) -> c_int; + pub fn memcpy( + dest: *mut c_void, + src: *const c_void, + n: size_t, + ) -> *mut c_void; + pub fn memmove( + dest: *mut c_void, + src: *const c_void, + n: size_t, + ) -> *mut c_void; + pub fn memset(dest: *mut c_void, c: c_int, n: size_t) -> *mut c_void; + + pub fn fprintf( + stream: *mut ::FILE, + format: *const ::c_char, + ... + ) -> ::c_int; + pub fn printf(format: *const ::c_char, ...) -> ::c_int; + pub fn snprintf( + s: *mut ::c_char, + n: ::size_t, + format: *const ::c_char, + ... + ) -> ::c_int; + pub fn sprintf(s: *mut ::c_char, format: *const ::c_char, ...) -> ::c_int; + pub fn fscanf( + stream: *mut ::FILE, + format: *const ::c_char, + ... + ) -> ::c_int; + pub fn scanf(format: *const ::c_char, ...) -> ::c_int; + pub fn sscanf(s: *const ::c_char, format: *const ::c_char, ...) + -> ::c_int; + pub fn getchar_unlocked() -> ::c_int; + pub fn putchar_unlocked(c: ::c_int) -> ::c_int; + + pub fn shutdown(socket: ::c_int, how: ::c_int) -> ::c_int; + pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int; + pub fn mkdir(path: *const c_char, mode: mode_t) -> ::c_int; + pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int; + pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE; + pub fn fileno(stream: *mut ::FILE) -> ::c_int; + pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int; + pub fn creat(path: *const c_char, mode: mode_t) -> ::c_int; + pub fn fcntl(fd: ::c_int, cmd: ::c_int, ...) -> ::c_int; + pub fn opendir(dirname: *const c_char) -> *mut ::DIR; + pub fn fdopendir(fd: ::c_int) -> *mut ::DIR; + pub fn readdir(dirp: *mut ::DIR) -> *mut ::dirent; + pub fn closedir(dirp: *mut ::DIR) -> ::c_int; + pub fn rewinddir(dirp: *mut ::DIR); + + pub fn openat( + dirfd: ::c_int, + pathname: *const ::c_char, + flags: ::c_int, + ... + ) -> ::c_int; + pub fn fstatat( + dirfd: ::c_int, + pathname: *const ::c_char, + buf: *mut stat, + flags: ::c_int, + ) -> ::c_int; + pub fn linkat( + olddirfd: ::c_int, + oldpath: *const ::c_char, + newdirfd: ::c_int, + newpath: *const ::c_char, + flags: ::c_int, + ) -> ::c_int; + pub fn mkdirat( + dirfd: ::c_int, + pathname: *const ::c_char, + mode: ::mode_t, + ) -> ::c_int; + pub fn readlinkat( + dirfd: ::c_int, + pathname: *const ::c_char, + buf: *mut ::c_char, + bufsiz: ::size_t, + ) -> ::ssize_t; + pub fn renameat( + olddirfd: ::c_int, + oldpath: *const ::c_char, + newdirfd: ::c_int, + newpath: *const ::c_char, + ) -> ::c_int; + pub fn symlinkat( + target: *const ::c_char, + newdirfd: ::c_int, + linkpath: *const ::c_char, + ) -> ::c_int; + pub fn unlinkat( + dirfd: ::c_int, + pathname: *const ::c_char, + flags: ::c_int, + ) -> ::c_int; + + pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int; + pub fn close(fd: ::c_int) -> ::c_int; + pub fn fpathconf(filedes: ::c_int, name: ::c_int) -> c_long; + pub fn getopt( + argc: ::c_int, + argv: *const *mut c_char, + optstr: *const c_char, + ) -> ::c_int; + pub fn isatty(fd: ::c_int) -> ::c_int; + pub fn link(src: *const c_char, dst: *const c_char) -> ::c_int; + pub fn lseek(fd: ::c_int, offset: off_t, whence: ::c_int) -> off_t; + pub fn pathconf(path: *const c_char, name: ::c_int) -> c_long; + pub fn pause() -> ::c_int; + pub fn rmdir(path: *const c_char) -> ::c_int; + pub fn sleep(secs: ::c_uint) -> ::c_uint; + pub fn unlink(c: *const c_char) -> ::c_int; + pub fn pread( + fd: ::c_int, + buf: *mut ::c_void, + count: ::size_t, + offset: off_t, + ) -> ::ssize_t; + pub fn pwrite( + fd: ::c_int, + buf: *const ::c_void, + count: ::size_t, + offset: off_t, + ) -> ::ssize_t; + + pub fn lstat(path: *const c_char, buf: *mut stat) -> ::c_int; + + pub fn fsync(fd: ::c_int) -> ::c_int; + + pub fn symlink(path1: *const c_char, path2: *const c_char) -> ::c_int; + + pub fn ftruncate(fd: ::c_int, length: off_t) -> ::c_int; + + pub fn getrusage(resource: ::c_int, usage: *mut rusage) -> ::c_int; + + pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; + pub fn times(buf: *mut ::tms) -> ::clock_t; + + pub fn strerror_r( + errnum: ::c_int, + buf: *mut c_char, + buflen: ::size_t, + ) -> ::c_int; + + pub fn usleep(secs: ::c_uint) -> ::c_int; + pub fn send( + socket: ::c_int, + buf: *const ::c_void, + len: ::size_t, + flags: ::c_int, + ) -> ::ssize_t; + pub fn recv( + socket: ::c_int, + buf: *mut ::c_void, + len: ::size_t, + flags: ::c_int, + ) -> ::ssize_t; + pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: ::c_int) -> ::c_int; + pub fn setlocale( + category: ::c_int, + locale: *const ::c_char, + ) -> *mut ::c_char; + pub fn localeconv() -> *mut lconv; + + pub fn readlink( + path: *const c_char, + buf: *mut c_char, + bufsz: ::size_t, + ) -> ::ssize_t; + + pub fn timegm(tm: *mut ::tm) -> time_t; + + pub fn sysconf(name: ::c_int) -> ::c_long; + + pub fn fseeko( + stream: *mut ::FILE, + offset: ::off_t, + whence: ::c_int, + ) -> ::c_int; + pub fn ftello(stream: *mut ::FILE) -> ::off_t; + + pub fn strcasestr(cs: *const c_char, ct: *const c_char) -> *mut c_char; + pub fn getline( + lineptr: *mut *mut c_char, + n: *mut size_t, + stream: *mut FILE, + ) -> ssize_t; + + pub fn faccessat( + dirfd: ::c_int, + pathname: *const ::c_char, + mode: ::c_int, + flags: ::c_int, + ) -> ::c_int; + pub fn writev( + fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int, + ) -> ::ssize_t; + pub fn readv( + fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int, + ) -> ::ssize_t; + pub fn pwritev( + fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int, + offset: ::off_t, + ) -> ::ssize_t; + pub fn preadv( + fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int, + offset: ::off_t, + ) -> ::ssize_t; + pub fn posix_fadvise( + fd: ::c_int, + offset: ::off_t, + len: ::off_t, + advise: ::c_int, + ) -> ::c_int; + pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; + pub fn utimensat( + dirfd: ::c_int, + path: *const ::c_char, + times: *const ::timespec, + flag: ::c_int, + ) -> ::c_int; + pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; + pub fn memrchr( + cx: *const ::c_void, + c: ::c_int, + n: ::size_t, + ) -> *mut ::c_void; + pub fn abs(i: c_int) -> c_int; + pub fn labs(i: c_long) -> c_long; + pub fn duplocale(base: ::locale_t) -> ::locale_t; + pub fn freelocale(loc: ::locale_t); + pub fn newlocale( + mask: ::c_int, + locale: *const ::c_char, + base: ::locale_t, + ) -> ::locale_t; + pub fn uselocale(loc: ::locale_t) -> ::locale_t; + pub fn __wasilibc_register_preopened_fd( fd: c_int, path: *const c_char, @@ -494,6 +1028,12 @@ extern { pub fn __wasilibc_rmfileat(fd: c_int, path: *const c_char) -> c_int; pub fn __wasilibc_rmdirat(fd: c_int, path: *const c_char) -> c_int; pub fn __wasilibc_init_preopen(); + pub fn __wasilibc_find_relpath( + path: *const c_char, + rights_base: __wasi_rights_t, + rights_inheriting: __wasi_rights_t, + relative_path: *mut *const c_char, + ) -> c_int; pub fn arc4random() -> u32; pub fn arc4random_buf(a: *mut c_void, b: size_t); diff --git a/vendor/measureme/.cargo-checksum.json b/vendor/measureme/.cargo-checksum.json new file mode 100644 index 0000000000..782dbbd0e6 --- /dev/null +++ b/vendor/measureme/.cargo-checksum.json @@ -0,0 +1 @@ +{"files":{"Cargo.toml":"82f80a9508af949435d2b16ffe1d9fee4194254bea9c7861e9ace38092cddde1","benches/serialization_bench.rs":"dd632077c968420932b01f3501c80c167f6ac82a4d33b62476a35eed3299c373","src/event.rs":"9e60803527b589e1d002a91944584956055ae70dc30874132bd379e30b68f567","src/file_header.rs":"43033b116fd78962bbe6346ff6765fc9436e3b855634bb57bcddfcc21eea1b60","src/file_serialization_sink.rs":"63bd4ecbbb0a6da63373d1ecdb8bef66820b1bf467bcbc9d301eeb2303badd81","src/lib.rs":"3c533228bd81322a4674c6cdadcb93da524c5ddcef9ae57330d75a5f550855b2","src/mmap_serialization_sink.rs":"9f1eb2ea2aecd6a2e0c3dac728bf1b9a885b95409b90bf2c843bf63fe0247d40","src/profiler.rs":"1b3a2289c96e4d0e572d287e0e4623f390943e3d1ea94496257586fde15fdbec","src/profiling_data.rs":"ddf4908b452d6f0d55d1800ecc4e0a9fd5c134364f99fe2ee06a8a2b295aeeda","src/raw_event.rs":"fdf085cfaa477c9326188b0b349248f0aeae0e4e93137deb4c8130cd1b53d2c0","src/rustc.rs":"1a101e8b9038bb1cc3d5745779e30736b5e2e1f1debef6a1fbe402c836ca1ede","src/serialization.rs":"cb5a6da38a0c9076726237ac68579a6bc264239ab356d9f9913f5df901f11d38","src/stringtable.rs":"d96f03fa7e5744e7a70999f2704050ea94a681ced081f73ddbff9f2699c0f7f9","src/testing_common.rs":"2be7f340dc81ed9007fdd24e3fb8954555af0e7981df3c1d507b326ab2ec3354","tests/serialization.rs":"6252692ab1e3542f1f5c2455477b0aa6baf4398fd4d848f5ce97196f9df1e626"},"package":"d09de7dafa3aa334bc806447c7e4de69419723312f4b88b80b561dea66601ce8"} \ No newline at end of file diff --git a/vendor/measureme/Cargo.toml b/vendor/measureme/Cargo.toml new file mode 100644 index 0000000000..ce416cee0c --- /dev/null +++ b/vendor/measureme/Cargo.toml @@ -0,0 +1,32 @@ +# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO +# +# When uploading crates to the registry Cargo will automatically +# "normalize" Cargo.toml files for maximal compatibility +# with all versions of Cargo and also rewrite `path` dependencies +# to registry (e.g., crates.io) dependencies +# +# If you believe there's an error in this file please file an +# issue against the rust-lang/cargo repository. If you're +# editing this file be aware that the upstream Cargo.toml +# will likely look very different (and much more reasonable) + +[package] +edition = "2018" +name = "measureme" +version = "0.3.0" +authors = ["Wesley Wiser ", "Michael Woerister "] +description = "Support crate for rustc's self-profiling feature" +homepage = "https://github.com/rust-lang/measureme" +documentation = "https://docs.rs/measureme" +license = "MIT OR Apache-2.0" +repository = "https://github.com/rust-lang/measureme" +[dependencies.byteorder] +version = "1.2.7" + +[dependencies.memmap] +version = "0.6.0" + +[dependencies.rustc-hash] +version = "1.0.1" +[badges.travis-ci] +repository = "rust-lang/measureme" diff --git a/vendor/measureme/benches/serialization_bench.rs b/vendor/measureme/benches/serialization_bench.rs new file mode 100644 index 0000000000..2f8eb3a701 --- /dev/null +++ b/vendor/measureme/benches/serialization_bench.rs @@ -0,0 +1,21 @@ +#![feature(test)] + +extern crate test; + +use measureme::{ + FileSerializationSink, MmapSerializationSink, testing_common +}; + +#[bench] +fn bench_file_serialization_sink(bencher: &mut test::Bencher) { + bencher.iter(|| { + testing_common::run_end_to_end_serialization_test::("file_serialization_sink_test"); + }); +} + +#[bench] +fn bench_mmap_serialization_sink(bencher: &mut test::Bencher) { + bencher.iter(|| { + testing_common::run_end_to_end_serialization_test::("mmap_serialization_sink_test"); + }); +} diff --git a/vendor/measureme/src/event.rs b/vendor/measureme/src/event.rs new file mode 100644 index 0000000000..c0031d440b --- /dev/null +++ b/vendor/measureme/src/event.rs @@ -0,0 +1,13 @@ +use crate::raw_event::TimestampKind; +use std::borrow::Cow; +use std::time::SystemTime; + +#[derive(Clone, Eq, PartialEq, Hash, Debug)] +pub struct Event<'a> { + pub event_kind: Cow<'a, str>, + pub label: Cow<'a, str>, + pub additional_data: &'a [Cow<'a, str>], + pub timestamp: SystemTime, + pub timestamp_kind: TimestampKind, + pub thread_id: u64, +} diff --git a/vendor/measureme/src/file_header.rs b/vendor/measureme/src/file_header.rs new file mode 100644 index 0000000000..a8a934aacb --- /dev/null +++ b/vendor/measureme/src/file_header.rs @@ -0,0 +1,103 @@ +//! All binary files generated by measureme have a simple file header that +//! consists of a 4 byte file magic string and a 4 byte little-endian version +//! number. + +use byteorder::{ByteOrder, LittleEndian}; +use crate::serialization::SerializationSink; +use std::error::Error; + +pub const CURRENT_FILE_FORMAT_VERSION: u32 = 0; +pub const FILE_MAGIC_EVENT_STREAM: &[u8; 4] = b"MMES"; +pub const FILE_MAGIC_STRINGTABLE_DATA: &[u8; 4] = b"MMSD"; +pub const FILE_MAGIC_STRINGTABLE_INDEX: &[u8; 4] = b"MMSI"; + +/// The size of the file header in bytes. Note that functions in this module +/// rely on this size to be `8`. +pub const FILE_HEADER_SIZE: usize = 8; + +pub fn write_file_header(s: &S, file_magic: &[u8; 4]) { + // The implementation here relies on FILE_HEADER_SIZE to have the value 8. + // Let's make sure this assumption cannot be violated without being noticed. + assert_eq!(FILE_HEADER_SIZE, 8); + + s.write_atomic(FILE_HEADER_SIZE, |bytes| { + bytes[0 .. 4].copy_from_slice(file_magic); + LittleEndian::write_u32(&mut bytes[4..8], CURRENT_FILE_FORMAT_VERSION); + }); +} + +pub fn read_file_header( + bytes: &[u8], + expected_magic: &[u8; 4] +) -> Result> { + // The implementation here relies on FILE_HEADER_SIZE to have the value 8. + // Let's make sure this assumption cannot be violated without being noticed. + assert_eq!(FILE_HEADER_SIZE, 8); + + let actual_magic = &bytes[0 .. 4]; + + if actual_magic != expected_magic { + // FIXME: The error message should mention the file path in order to be + // more useful. + let msg = format!( + "Unexpected file magic `{:?}`. Expected `{:?}`", + actual_magic, + expected_magic, + ); + + return Err(From::from(msg)); + } + + Ok(LittleEndian::read_u32(&bytes[4..8])) +} + +pub fn strip_file_header(data: &[u8]) -> &[u8] { + &data[FILE_HEADER_SIZE ..] +} + + +#[cfg(test)] +mod tests { + use super::*; + use crate::serialization::test::TestSink; + + #[test] + fn roundtrip() { + let data_sink = TestSink::new(); + + write_file_header(&data_sink, FILE_MAGIC_EVENT_STREAM); + + let data = data_sink.into_bytes(); + + assert_eq!(read_file_header(&data, FILE_MAGIC_EVENT_STREAM).unwrap(), + CURRENT_FILE_FORMAT_VERSION); + } + + #[test] + fn invalid_magic() { + let data_sink = TestSink::new(); + write_file_header(&data_sink, FILE_MAGIC_STRINGTABLE_DATA); + let mut data = data_sink.into_bytes(); + + // Invalidate the filemagic + data[2] = 0; + assert!(read_file_header(&data, FILE_MAGIC_STRINGTABLE_DATA).is_err()); + } + + #[test] + fn other_version() { + let data_sink = TestSink::new(); + + write_file_header(&data_sink, FILE_MAGIC_STRINGTABLE_INDEX); + + let mut data = data_sink.into_bytes(); + + // Change version + data[4] = 0xFF; + data[5] = 0xFF; + data[6] = 0xFF; + data[7] = 0xFF; + assert_eq!(read_file_header(&data, FILE_MAGIC_STRINGTABLE_INDEX).unwrap(), + 0xFFFF_FFFF); + } +} diff --git a/vendor/measureme/src/file_serialization_sink.rs b/vendor/measureme/src/file_serialization_sink.rs new file mode 100644 index 0000000000..0e63ad4dd5 --- /dev/null +++ b/vendor/measureme/src/file_serialization_sink.rs @@ -0,0 +1,41 @@ +use crate::serialization::{Addr, SerializationSink}; +use std::error::Error; +use std::fs; +use std::io::{BufWriter, Write}; +use std::path::Path; +use std::sync::Mutex; + +pub struct FileSerializationSink { + data: Mutex<(BufWriter, u32)>, +} + +impl SerializationSink for FileSerializationSink { + fn from_path(path: &Path) -> Result> { + fs::create_dir_all(path.parent().unwrap())?; + + let file = fs::File::create(path)?; + + Ok(FileSerializationSink { + data: Mutex::new((BufWriter::new(file), 0)), + }) + } + + #[inline] + fn write_atomic(&self, num_bytes: usize, write: W) -> Addr + where + W: FnOnce(&mut [u8]), + { + let mut buffer = vec![0; num_bytes]; + write(buffer.as_mut_slice()); + + let mut data = self.data.lock().expect("couldn't acquire lock"); + let curr_addr = data.1; + let file = &mut data.0; + + file.write_all(&buffer).expect("failed to write buffer"); + + data.1 += num_bytes as u32; + + Addr(curr_addr) + } +} diff --git a/vendor/measureme/src/lib.rs b/vendor/measureme/src/lib.rs new file mode 100644 index 0000000000..9011d1566a --- /dev/null +++ b/vendor/measureme/src/lib.rs @@ -0,0 +1,23 @@ +mod event; +mod file_header; +mod file_serialization_sink; +mod mmap_serialization_sink; +mod profiler; +mod profiling_data; +mod raw_event; +mod serialization; +mod stringtable; + +pub mod rustc; +pub mod testing_common; + +pub use crate::event::Event; +pub use crate::file_serialization_sink::FileSerializationSink; +pub use crate::mmap_serialization_sink::MmapSerializationSink; +pub use crate::profiler::{Profiler, ProfilerFiles}; +pub use crate::profiling_data::{ProfilingData, MatchingEvent}; +pub use crate::raw_event::{RawEvent, Timestamp, TimestampKind}; +pub use crate::serialization::{Addr, SerializationSink}; +pub use crate::stringtable::{ + SerializableString, StringId, StringRef, StringTable, StringTableBuilder, +}; diff --git a/vendor/measureme/src/mmap_serialization_sink.rs b/vendor/measureme/src/mmap_serialization_sink.rs new file mode 100644 index 0000000000..a8dded53e2 --- /dev/null +++ b/vendor/measureme/src/mmap_serialization_sink.rs @@ -0,0 +1,73 @@ +use crate::serialization::{Addr, SerializationSink}; +use memmap::{MmapMut}; +use std::error::Error; +use std::io::{Write, BufWriter}; +use std::fs::{File}; +use std::path::{Path, PathBuf}; +use std::sync::atomic::{AtomicUsize, Ordering}; + +pub struct MmapSerializationSink { + mapped_file: MmapMut, + current_pos: AtomicUsize, + path: PathBuf, +} + +impl SerializationSink for MmapSerializationSink { + fn from_path(path: &Path) -> Result> { + // Lazily allocate 1 GB :O + let file_size = 1 << 30; + + let mapped_file = MmapMut::map_anon(file_size)?; + + Ok(MmapSerializationSink { + mapped_file, + current_pos: AtomicUsize::new(0), + path: path.to_path_buf(), + }) + } + + #[inline] + fn write_atomic(&self, num_bytes: usize, write: W) -> Addr + where + W: FnOnce(&mut [u8]), + { + // Reserve the range of bytes we'll copy to + let pos = self.current_pos.fetch_add(num_bytes, Ordering::SeqCst); + + // Bounds checks + assert!(pos.checked_add(num_bytes).unwrap() <= self.mapped_file.len()); + + // We don't have `&mut self.mapped_file` available, so we have to go + // through raw pointers instead of `MmapMut::get_mut()`. This is OK + // because our runtime checks guarantee that we have exclusive access + // to the byte range in question. + let bytes: &mut [u8] = unsafe { + let start: *mut u8 = self.mapped_file.as_ptr().offset(pos as isize) as *mut u8; + std::slice::from_raw_parts_mut(start, num_bytes) + }; + + write(bytes); + + Addr(pos as u32) + } +} + +impl Drop for MmapSerializationSink { + fn drop(&mut self) { + let actual_size = *self.current_pos.get_mut(); + + let file = match File::create(&self.path) { + Ok(file) => file, + Err(e) => { + eprintln!("Error opening file for writing: {:?}", e); + return + } + }; + + let mut file = BufWriter::new(file); + + if let Err(e) = file.write_all(&self.mapped_file[0 .. actual_size]) { + eprintln!("Error writing file: {:?}", e); + } + } +} \ No newline at end of file diff --git a/vendor/measureme/src/profiler.rs b/vendor/measureme/src/profiler.rs new file mode 100644 index 0000000000..ec51e15b56 --- /dev/null +++ b/vendor/measureme/src/profiler.rs @@ -0,0 +1,99 @@ +use crate::file_header::{write_file_header, FILE_MAGIC_EVENT_STREAM}; +use crate::raw_event::{RawEvent, Timestamp, TimestampKind}; +use crate::serialization::SerializationSink; +use crate::stringtable::{SerializableString, StringId, StringTableBuilder}; +use std::error::Error; +use std::path::{Path, PathBuf}; +use std::sync::Arc; +use std::time::Instant; + +pub struct ProfilerFiles { + pub events_file: PathBuf, + pub string_data_file: PathBuf, + pub string_index_file: PathBuf, +} + +impl ProfilerFiles { + pub fn new(path_stem: &Path) -> ProfilerFiles { + ProfilerFiles { + events_file: path_stem.with_extension("events"), + string_data_file: path_stem.with_extension("string_data"), + string_index_file: path_stem.with_extension("string_index"), + } + } +} + +pub struct Profiler { + event_sink: Arc, + string_table: StringTableBuilder, + start_time: Instant, +} + +impl Profiler { + pub fn new(path_stem: &Path) -> Result, Box> { + let paths = ProfilerFiles::new(path_stem); + let event_sink = Arc::new(S::from_path(&paths.events_file)?); + + // The first thing in every file we generate must be the file header. + write_file_header(&*event_sink, FILE_MAGIC_EVENT_STREAM); + + let string_table = StringTableBuilder::new( + Arc::new(S::from_path(&paths.string_data_file)?), + Arc::new(S::from_path(&paths.string_index_file)?), + ); + + Ok(Profiler { + event_sink, + string_table, + start_time: Instant::now(), + }) + } + + #[inline(always)] + pub fn alloc_string_with_reserved_id( + &self, + id: StringId, + s: &STR, + ) -> StringId { + self.string_table.alloc_with_reserved_id(id, s) + } + + #[inline(always)] + pub fn alloc_string(&self, s: &STR) -> StringId { + self.string_table.alloc(s) + } + + pub fn record_event( + &self, + event_kind: StringId, + event_id: StringId, + thread_id: u64, + timestamp_kind: TimestampKind, + ) { + let duration_since_start = self.start_time.elapsed(); + let nanos_since_start = duration_since_start.as_secs() * 1_000_000_000 + + duration_since_start.subsec_nanos() as u64; + let timestamp = Timestamp::new(nanos_since_start, timestamp_kind); + + self.event_sink + .write_atomic(std::mem::size_of::(), |bytes| { + debug_assert_eq!(bytes.len(), std::mem::size_of::()); + + let raw_event = RawEvent { + event_kind, + id: event_id, + thread_id, + timestamp, + }; + + let raw_event_bytes: &[u8] = unsafe { + std::slice::from_raw_parts( + &raw_event as *const _ as *const u8, + std::mem::size_of::(), + ) + }; + + bytes.copy_from_slice(raw_event_bytes); + }); + } +} diff --git a/vendor/measureme/src/profiling_data.rs b/vendor/measureme/src/profiling_data.rs new file mode 100644 index 0000000000..19a01f6b5f --- /dev/null +++ b/vendor/measureme/src/profiling_data.rs @@ -0,0 +1,149 @@ +use crate::file_header::FILE_HEADER_SIZE; +use crate::event::Event; +use crate::{ProfilerFiles, RawEvent, StringTable, TimestampKind}; +use std::error::Error; +use std::fs; +use std::mem; +use std::path::Path; +use std::time::{Duration, SystemTime}; + +pub struct ProfilingData { + event_data: Vec, + string_table: StringTable, +} + +impl ProfilingData { + pub fn new(path_stem: &Path) -> Result> { + let paths = ProfilerFiles::new(path_stem); + + let string_data = fs::read(paths.string_data_file).expect("couldn't read string_data file"); + let index_data = fs::read(paths.string_index_file).expect("couldn't read string_index file"); + let event_data = fs::read(paths.events_file).expect("couldn't read events file"); + + let string_table = StringTable::new(string_data, index_data)?; + + Ok(ProfilingData { + string_table, + event_data, + }) + } + + pub fn iter(&self) -> impl Iterator> { + ProfilerEventIterator::new(&self) + } + + pub fn iter_matching_events(&self) -> impl Iterator> { + MatchingEventsIterator::new(ProfilerEventIterator::new(&self)) + } +} + +struct ProfilerEventIterator<'a> { + data: &'a ProfilingData, + curr_event_idx: usize, +} + +impl<'a> ProfilerEventIterator<'a> { + pub fn new(data: &'a ProfilingData) -> ProfilerEventIterator<'a> { + ProfilerEventIterator { + data, + curr_event_idx: 0, + } + } +} + +impl<'a> Iterator for ProfilerEventIterator<'a> { + type Item = Event<'a>; + + fn next(&mut self) -> Option> { + let event_start_addr = FILE_HEADER_SIZE + + self.curr_event_idx * mem::size_of::(); + let event_end_addr = event_start_addr + mem::size_of::(); + if event_end_addr > self.data.event_data.len() { + return None; + } + + self.curr_event_idx += 1; + + let raw_event_bytes = &self.data.event_data[event_start_addr..event_end_addr]; + + let mut raw_event = RawEvent::default(); + unsafe { + let raw_event = std::slice::from_raw_parts_mut( + &mut raw_event as *mut RawEvent as *mut u8, + std::mem::size_of::() + ); + raw_event.copy_from_slice(raw_event_bytes); + }; + + let string_table = &self.data.string_table; + + let mut timestamp = SystemTime::UNIX_EPOCH; + timestamp += Duration::from_nanos(raw_event.timestamp.nanos()); + + Some(Event { + event_kind: string_table.get(raw_event.event_kind).to_string(), + label: string_table.get(raw_event.id).to_string(), + additional_data: &[], + timestamp: timestamp, + timestamp_kind: raw_event.timestamp.kind(), + thread_id: raw_event.thread_id, + }) + } +} + +#[derive(Clone, Debug, PartialEq, Eq, Hash)] +pub enum MatchingEvent<'a> { + StartStop(Event<'a>, Event<'a>), + Instant(Event<'a>), +} + +struct MatchingEventsIterator<'a> { + events: ProfilerEventIterator<'a>, + thread_stacks: Vec>>, +} + +impl<'a> MatchingEventsIterator<'a> { + pub fn new(events: ProfilerEventIterator<'a>) -> MatchingEventsIterator<'a> { + MatchingEventsIterator { + events, + thread_stacks: vec![], + } + } +} + +impl<'a> Iterator for MatchingEventsIterator<'a> { + type Item = MatchingEvent<'a>; + + fn next(&mut self) -> Option> { + while let Some(event) = self.events.next() { + match event.timestamp_kind { + TimestampKind::Start => { + let thread_id = event.thread_id as usize; + if thread_id >= self.thread_stacks.len() { + let growth_size = (thread_id + 1) - self.thread_stacks.len(); + self.thread_stacks.append( + &mut vec![vec![]; growth_size] + ) + } + + self.thread_stacks[thread_id].push(event); + }, + TimestampKind::Instant => { + return Some(MatchingEvent::Instant(event)); + }, + TimestampKind::End => { + let thread_id = event.thread_id as usize; + let previous_event = self.thread_stacks[thread_id].pop().expect("no previous event"); + if previous_event.event_kind != event.event_kind || + previous_event.label != event.label { + panic!("previous event on thread wasn't the start event"); + } + + return Some(MatchingEvent::StartStop(previous_event, event)); + } + } + } + + None + } +} diff --git a/vendor/measureme/src/raw_event.rs b/vendor/measureme/src/raw_event.rs new file mode 100644 index 0000000000..abb96629a0 --- /dev/null +++ b/vendor/measureme/src/raw_event.rs @@ -0,0 +1,54 @@ +use crate::stringtable::StringId; + +#[derive(Clone, Eq, PartialEq, Hash, Debug)] +pub enum TimestampKind { + Start = 0, + End = 1, + Instant = 2, +} + +#[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)] +#[repr(C)] +pub struct Timestamp(u64); + +impl Timestamp { + #[inline] + pub fn new(nanos: u64, kind: TimestampKind) -> Timestamp { + Timestamp((nanos << 2) | kind as u64) + } + + #[inline] + pub fn nanos(self) -> u64 { + self.0 >> 2 + } + + #[inline] + pub fn kind(self) -> TimestampKind { + match self.0 & 0b11 { + 0 => TimestampKind::Start, + 1 => TimestampKind::End, + 2 => TimestampKind::Instant, + _ => unreachable!(), + } + } +} + +#[derive(Eq, PartialEq, Debug)] +#[repr(C)] +pub struct RawEvent { + pub event_kind: StringId, + pub id: StringId, + pub thread_id: u64, + pub timestamp: Timestamp, +} + +impl Default for RawEvent { + fn default() -> Self { + RawEvent { + event_kind: StringId::reserved(0), + id: StringId::reserved(0), + thread_id: 0, + timestamp: Timestamp::new(0, TimestampKind::Instant), + } + } +} diff --git a/vendor/measureme/src/rustc.rs b/vendor/measureme/src/rustc.rs new file mode 100644 index 0000000000..033c1469cd --- /dev/null +++ b/vendor/measureme/src/rustc.rs @@ -0,0 +1,11 @@ +//! This module contains functionality specific to to the measureme integration with rustc + +pub const QUERY_EVENT_KIND: &str = "Query"; + +pub const GENERIC_ACTIVITY_EVENT_KIND: &str = "GenericActivity"; + +pub const INCREMENTAL_LOAD_RESULT_EVENT_KIND: &str = "IncrementalLoadResult"; + +pub const QUERY_BLOCKED_EVENT_KIND: &str = "QueryBlocked"; + +pub const QUERY_CACHE_HIT_EVENT_KIND: &str = "QueryCacheHit"; diff --git a/vendor/measureme/src/serialization.rs b/vendor/measureme/src/serialization.rs new file mode 100644 index 0000000000..f7bb6dd2bb --- /dev/null +++ b/vendor/measureme/src/serialization.rs @@ -0,0 +1,68 @@ +use std::error::Error; +use std::path::Path; + +#[derive(Clone, Copy, Eq, PartialEq, Debug)] +pub struct Addr(pub u32); + +impl Addr { + pub fn as_usize(self) -> usize { + self.0 as usize + } +} + +pub trait SerializationSink: Sized { + fn from_path(path: &Path) -> Result>; + + fn write_atomic(&self, num_bytes: usize, write: W) -> Addr + where + W: FnOnce(&mut [u8]); +} + +#[cfg(test)] +pub mod test { + use super::*; + use std::sync::Mutex; + + pub struct TestSink { + data: Mutex>, + } + + impl TestSink { + pub fn new() -> TestSink { + TestSink { + data: Mutex::new(Vec::new()), + } + } + + pub fn into_bytes(self) -> Vec { + self.data.into_inner().unwrap() + } + } + + impl SerializationSink for TestSink { + fn from_path(_path: &Path) -> Result> { + unimplemented!() + } + + fn write_atomic(&self, num_bytes: usize, write: W) -> Addr + where + W: FnOnce(&mut [u8]), + { + let mut data = self.data.lock().unwrap(); + + let start = data.len(); + + data.resize(start + num_bytes, 0); + + write(&mut data[start..]); + + Addr(start as u32) + } + } + + impl std::fmt::Debug for TestSink { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + write!(f, "TestSink") + } + } +} diff --git a/vendor/measureme/src/stringtable.rs b/vendor/measureme/src/stringtable.rs new file mode 100644 index 0000000000..c13e926e52 --- /dev/null +++ b/vendor/measureme/src/stringtable.rs @@ -0,0 +1,316 @@ +//! A string table implementation with a tree-like encoding. +//! +//! Each entry in the table represents a string and encoded is a list of +//! components where each component can either be +//! +//! 1. a TAG_STR_VAL that contains actual string content, +//! 2. a TAG_STR_REF that contains a reference to another entry, or +//! 3. a TAG_TERMINATOR which marks the end of a component list. +//! +//! The string content of an entry is defined as the concatenation of the +//! content of its components. The content of a `TAG_STR_VAL` is its actual +//! UTF-8 bytes. The content of a `TAG_STR_REF` is the contents of the entry +//! it references. + +use crate::file_header::{write_file_header, read_file_header, strip_file_header, + FILE_MAGIC_STRINGTABLE_DATA, FILE_MAGIC_STRINGTABLE_INDEX}; +use crate::serialization::{Addr, SerializationSink}; +use byteorder::{ByteOrder, LittleEndian}; +use rustc_hash::FxHashMap; +use std::borrow::Cow; +use std::error::Error; +use std::sync::atomic::{AtomicU32, Ordering}; +use std::sync::Arc; + +/// A `StringId` is used to identify a string in the `StringTable`. +#[derive(Clone, Copy, Eq, PartialEq, Debug, Hash)] +#[repr(C)] +pub struct StringId(u32); + +impl StringId { + #[inline] + pub fn reserved(id: u32) -> StringId { + StringId(id) + } +} + +// Tags for the binary encoding of strings + +/// Marks the end of a string component list. +const TAG_TERMINATOR: u8 = 0; + +/// Marks a component that contains actual string data. +const TAG_STR_VAL: u8 = 1; + +/// Marks a component that contains the ID of another string. +const TAG_STR_REF: u8 = 2; + +const MAX_PRE_RESERVED_STRING_ID: u32 = std::u32::MAX / 2; + +/// Write-only version of the string table +pub struct StringTableBuilder { + data_sink: Arc, + index_sink: Arc, + id_counter: AtomicU32, // initialized to MAX_PRE_RESERVED_STRING_ID + 1 +} + +/// Anything that implements `SerializableString` can be written to a +/// `StringTable`. +pub trait SerializableString { + fn serialized_size(&self) -> usize; + fn serialize(&self, bytes: &mut [u8]); +} + +// A simple string is encoded as +// +// [TAG_STR_VAL, len: u16, utf8_bytes, TAG_TERMINATOR] +// +// in the string table. +impl SerializableString for str { + #[inline] + fn serialized_size(&self) -> usize { + 1 + // tag + 2 + // len + self.len() + // actual bytes + 1 // terminator + } + + #[inline] + fn serialize(&self, bytes: &mut [u8]) { + assert!(self.len() <= std::u16::MAX as usize); + let last_byte_index = bytes.len() - 1; + bytes[0] = TAG_STR_VAL; + LittleEndian::write_u16(&mut bytes[1..3], self.len() as u16); + bytes[3..last_byte_index].copy_from_slice(self.as_bytes()); + bytes[last_byte_index] = TAG_TERMINATOR; + } +} + +/// A single component of a string. Used for building composite table entries. +pub enum StringComponent<'s> { + Value(&'s str), + Ref(StringId), +} + +impl<'a> SerializableString for [StringComponent<'a>] { + #[inline] + fn serialized_size(&self) -> usize { + unimplemented!() + } + + #[inline] + fn serialize(&self, _bytes: &mut [u8]) { + unimplemented!() + } +} + +fn serialize_index_entry(sink: &S, id: StringId, addr: Addr) { + sink.write_atomic(8, |bytes| { + LittleEndian::write_u32(&mut bytes[0..4], id.0); + LittleEndian::write_u32(&mut bytes[4..8], addr.0); + }); +} + +fn deserialize_index_entry(bytes: &[u8]) -> (StringId, Addr) { + ( + StringId(LittleEndian::read_u32(&bytes[0..4])), + Addr(LittleEndian::read_u32(&bytes[4..8])), + ) +} + +impl StringTableBuilder { + pub fn new(data_sink: Arc, index_sink: Arc) -> StringTableBuilder { + + // The first thing in every file we generate must be the file header. + write_file_header(&*data_sink, FILE_MAGIC_STRINGTABLE_DATA); + write_file_header(&*index_sink, FILE_MAGIC_STRINGTABLE_INDEX); + + StringTableBuilder { + data_sink, + index_sink, + id_counter: AtomicU32::new(MAX_PRE_RESERVED_STRING_ID + 1), + } + } + + #[inline] + pub fn alloc_with_reserved_id( + &self, + id: StringId, + s: &STR, + ) -> StringId { + assert!(id.0 <= MAX_PRE_RESERVED_STRING_ID); + self.alloc_unchecked(id, s); + id + } + + #[inline] + pub fn alloc(&self, s: &STR) -> StringId { + let id = StringId(self.id_counter.fetch_add(1, Ordering::SeqCst)); + debug_assert!(id.0 > MAX_PRE_RESERVED_STRING_ID); + self.alloc_unchecked(id, s); + id + } + + #[inline] + fn alloc_unchecked(&self, id: StringId, s: &STR) { + let size_in_bytes = s.serialized_size(); + let addr = self.data_sink.write_atomic(size_in_bytes, |mem| { + s.serialize(mem); + }); + + serialize_index_entry(&*self.index_sink, id, addr); + } +} + +#[derive(Copy, Clone)] +pub struct StringRef<'st> { + id: StringId, + table: &'st StringTable, +} + +impl<'st> StringRef<'st> { + pub fn to_string(&self) -> Cow<'st, str> { + let addr = self.table.index[&self.id].as_usize(); + let tag = self.table.string_data[addr]; + + match tag { + TAG_STR_VAL => { + let len = + LittleEndian::read_u16(&self.table.string_data[addr + 1..addr + 3]) as usize; + let next_component_addr = addr + 3 + len; + let next_tag = self.table.string_data[next_component_addr]; + + if next_tag == TAG_TERMINATOR { + let bytes = &self.table.string_data[addr + 3..addr + 3 + len]; + return Cow::from(std::str::from_utf8(bytes).unwrap()); + } + } + TAG_TERMINATOR => { + return Cow::from(""); + } + _ => { + // we have to take the allocating path + } + } + + let mut output = String::new(); + self.write_to_string(&mut output); + Cow::from(output) + } + + pub fn write_to_string(&self, output: &mut String) { + let addr = self.table.index[&self.id]; + + let mut pos = addr.as_usize(); + + loop { + let tag = self.table.string_data[pos]; + + match tag { + TAG_STR_VAL => { + pos += 1; + let len = + LittleEndian::read_u16(&self.table.string_data[pos..pos + 2]) as usize; + pos += 2; + let bytes = &self.table.string_data[pos..pos + len]; + let s = std::str::from_utf8(bytes).unwrap(); + output.push_str(s); + pos += len; + } + + TAG_STR_REF => { + unimplemented!(); + } + + TAG_TERMINATOR => return, + + _ => unreachable!(), + } + } + } +} + +/// Read-only version of the string table +pub struct StringTable { + // TODO: Replace with something lazy + string_data: Vec, + index: FxHashMap, +} + +impl<'data> StringTable { + pub fn new(string_data: Vec, index_data: Vec) -> Result> { + + let string_data_format = read_file_header(&string_data, FILE_MAGIC_STRINGTABLE_DATA)?; + let index_data_format = read_file_header(&index_data, FILE_MAGIC_STRINGTABLE_INDEX)?; + + if string_data_format != index_data_format { + Err("Mismatch between StringTable DATA and INDEX format version")?; + } + + if string_data_format != 0 { + Err(format!("StringTable file format version '{}' is not supported + by this version of `measureme`.", string_data_format))?; + } + + assert!(index_data.len() % 8 == 0); + let index: FxHashMap<_, _> = strip_file_header(&index_data) + .chunks(8) + .map(deserialize_index_entry) + .collect(); + + Ok(StringTable { string_data, index }) + } + + #[inline] + pub fn get(&self, id: StringId) -> StringRef { + StringRef { id, table: self } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn simple_strings() { + use crate::serialization::test::TestSink; + + let data_sink = Arc::new(TestSink::new()); + let index_sink = Arc::new(TestSink::new()); + + let expected_strings = &[ + "abc", + "", + "xyz", + "g2h9284hgjv282y32983849&(*^&YIJ#R)(F83 f 23 2g4 35g5y", + "", + "", + "g2h9284hgjv282y32983849&35g5y", + ]; + + let mut string_ids = vec![]; + + { + let builder = StringTableBuilder::new(data_sink.clone(), index_sink.clone()); + + for &s in expected_strings { + string_ids.push(builder.alloc(s)); + } + } + + let data_bytes = Arc::try_unwrap(data_sink).unwrap().into_bytes(); + let index_bytes = Arc::try_unwrap(index_sink).unwrap().into_bytes(); + + let string_table = StringTable::new(data_bytes, index_bytes).unwrap(); + + for (&id, &expected_string) in string_ids.iter().zip(expected_strings.iter()) { + let str_ref = string_table.get(id); + + assert_eq!(str_ref.to_string(), expected_string); + + let mut write_to = String::new(); + str_ref.write_to_string(&mut write_to); + assert_eq!(str_ref.to_string(), write_to); + } + } +} diff --git a/vendor/measureme/src/testing_common.rs b/vendor/measureme/src/testing_common.rs new file mode 100644 index 0000000000..92e17c39e8 --- /dev/null +++ b/vendor/measureme/src/testing_common.rs @@ -0,0 +1,113 @@ + +use crate::{ + Event, Profiler, ProfilingData, SerializationSink, StringId, + TimestampKind, +}; +use rustc_hash::FxHashMap; +use std::borrow::Cow; +use std::default::Default; +use std::path::{Path, PathBuf}; +use std::sync::Arc; +use std::time::SystemTime; + +fn mk_filestem(file_name_stem: &str) -> PathBuf { + let mut path = PathBuf::new(); + + path.push("test-tmp"); + path.push("end_to_end_serialization"); + path.push(file_name_stem); + + path +} + +// Generate some profiling data. This is the part that would run in rustc. +fn generate_profiling_data(filestem: &Path) -> Vec { + let profiler = Arc::new(Profiler::::new(Path::new(filestem)).unwrap()); + + let event_id_reserved = StringId::reserved(42); + + let event_ids = &[ + ( + profiler.alloc_string("Generic"), + profiler.alloc_string("SomeGenericActivity"), + ), + (profiler.alloc_string("Query"), event_id_reserved), + ]; + + // This and event_ids have to match! + let mut event_ids_as_str: FxHashMap<_, _> = Default::default(); + event_ids_as_str.insert(event_ids[0].0, "Generic"); + event_ids_as_str.insert(event_ids[0].1, "SomeGenericActivity"); + event_ids_as_str.insert(event_ids[1].0, "Query"); + event_ids_as_str.insert(event_ids[1].1, "SomeQuery"); + + let mut expected_events = Vec::new(); + let mut started_events = Vec::new(); + + for i in 0..10_000 { + // Allocate some invocation stacks + for _ in 0..4 { + let thread_id = (i % 3) as u64; + + let (event_kind, event_id) = event_ids[i % event_ids.len()]; + + profiler.record_event(event_kind, event_id, thread_id, TimestampKind::Start); + started_events.push((event_kind, event_id, thread_id)); + + expected_events.push(Event { + event_kind: Cow::from(event_ids_as_str[&event_kind]), + label: Cow::from(event_ids_as_str[&event_id]), + additional_data: &[], + timestamp: SystemTime::UNIX_EPOCH, // We can't test this anyway, + timestamp_kind: TimestampKind::Start, + thread_id, + }); + } + + while let Some((event_kind, event_id, thread_id)) = started_events.pop() { + profiler.record_event(event_kind, event_id, thread_id, TimestampKind::End); + + expected_events.push(Event { + event_kind: Cow::from(event_ids_as_str[&event_kind]), + label: Cow::from(event_ids_as_str[&event_id]), + additional_data: &[], + timestamp: SystemTime::UNIX_EPOCH, // We can't test this anyway, + timestamp_kind: TimestampKind::End, + thread_id, + }); + } + } + + // An example of allocating the string contents of an event id that has + // already been used + profiler.alloc_string_with_reserved_id(event_id_reserved, "SomeQuery"); + + expected_events +} + +// Process some profiling data. This is the part that would run in a +// post processing tool. +fn process_profiling_data(filestem: &Path, expected_events: &[Event]) { + let profiling_data = ProfilingData::new(filestem).unwrap(); + + let mut count = 0; + + for (actual_event, expected_event) in profiling_data.iter().zip(expected_events.iter()) { + eprintln!("{:?}", actual_event); + + assert_eq!(actual_event.event_kind, expected_event.event_kind); + assert_eq!(actual_event.label, expected_event.label); + assert_eq!(actual_event.additional_data, expected_event.additional_data); + assert_eq!(actual_event.timestamp_kind, expected_event.timestamp_kind); + + count += 1; + } + + assert_eq!(count, expected_events.len()); +} + +pub fn run_end_to_end_serialization_test(file_name_stem: &str) { + let filestem = mk_filestem(file_name_stem); + let expected_events = generate_profiling_data::(&filestem); + process_profiling_data(&filestem, &expected_events); +} diff --git a/vendor/measureme/tests/serialization.rs b/vendor/measureme/tests/serialization.rs new file mode 100644 index 0000000000..5c64d0df4d --- /dev/null +++ b/vendor/measureme/tests/serialization.rs @@ -0,0 +1,13 @@ + +use measureme::{FileSerializationSink, MmapSerializationSink}; +use measureme::testing_common::run_end_to_end_serialization_test; + +#[test] +fn test_file_serialization_sink() { + run_end_to_end_serialization_test::("file_serialization_sink_test"); +} + +#[test] +fn test_mmap_serialization_sink() { + run_end_to_end_serialization_test::("mmap_serialization_sink_test"); +} diff --git a/vendor/memchr/.cargo-checksum.json b/vendor/memchr/.cargo-checksum.json index 4826f8a9ce..fdd7a17bd5 100644 --- a/vendor/memchr/.cargo-checksum.json +++ b/vendor/memchr/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"67dd2af5f82f799d0c6813c0bd2842d4d6a617245e4b72b7852eb5eee01cac12","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","README.md":"21eb8e15c7eb21e7983e7f8a832fd7fd9abb261e09b1a19c24d808c55e7cf2b4","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","build.rs":"9f5847801620525d5afe503bb9f01ed86f652f0bacfcc446ddf6db6fa4665b8a","src/c.rs":"86fe35cbb46c8bece9927fbde20f1ca3af526defdde05ac969ad2f4bc9bb25e9","src/fallback.rs":"a79752e3bdc3c16febef90fcddb560f80659f802fac202cce3fdffd0b78f6d08","src/iter.rs":"5949fd42b266d3edebf133172c74700d1c0249bdd26c203bcfd1409583e7b502","src/lib.rs":"f70e83d1fea95d5f420c59783a381899267de151fb09e33ffc66069749631a21","src/naive.rs":"d908e5895586ef88913ee10ff3135aabd20363e0e0871c7006a5d40457851deb","src/tests/iter.rs":"262c09e5cabd1caef533475832da8716638b142ec8015e8270c6f5240e478ac1","src/tests/memchr.rs":"f30074eeab99a16ce5ca8a30f1890f86c43c0422523a7195cbb3ca5f3e465b67","src/tests/mod.rs":"8a7bd2bce336daf3767e5d012d06077b07be445c98af0e15ab03f5eb438ec876","src/x86/avx.rs":"11d4a149007fde9f34168fa43b3cba700667782c987796dca8526564b3e01007","src/x86/mod.rs":"f2e558e364e64b90c1bd55659332f54a3d6d36badc1aab9f67c4cfc2689c557a","src/x86/sse2.rs":"103bb9d555be789e678f1af5baa737e13911f60e90888d25fa2883b39a9dffce","src/x86/sse42.rs":"f671ae9dd2b518a823e499a09ce32d4957bc5ae043db90d61c027e32f688f2b2"},"package":"0a3eb002f0535929f1199681417029ebea04aadc0c7a4224b46be99c7f5d6a16"} \ No newline at end of file +{"files":{"COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"47408824ff8a0861c0df0cb499f687f7463e461c3b81ea20edf1662b7dc5a121","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","README.md":"ea4632001f2b384c67278e7114a843ab7094d6011ef87a793881e73cfb525120","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","build.rs":"a8483a0649fa418db667ccd2a16a60e57d886964b54c1af12923b6f6cb4f2c92","src/c.rs":"86fe35cbb46c8bece9927fbde20f1ca3af526defdde05ac969ad2f4bc9bb25e9","src/fallback.rs":"a79752e3bdc3c16febef90fcddb560f80659f802fac202cce3fdffd0b78f6d08","src/iter.rs":"5949fd42b266d3edebf133172c74700d1c0249bdd26c203bcfd1409583e7b502","src/lib.rs":"1b3c131d6ec66837d3d76ad42aa5fc4aebfae232587787bdedb5be2352be4502","src/naive.rs":"d908e5895586ef88913ee10ff3135aabd20363e0e0871c7006a5d40457851deb","src/tests/iter.rs":"262c09e5cabd1caef533475832da8716638b142ec8015e8270c6f5240e478ac1","src/tests/memchr.rs":"f30074eeab99a16ce5ca8a30f1890f86c43c0422523a7195cbb3ca5f3e465b67","src/tests/mod.rs":"8ad1d065d422877ee043f66f987a736a0216757ba66dc1a05bee2a7c949c8037","src/x86/avx.rs":"11d4a149007fde9f34168fa43b3cba700667782c987796dca8526564b3e01007","src/x86/mod.rs":"5032eec7355bc110ec99b06b2cfd916d8bc1e28c44a33f6c92c3cc86f797d683","src/x86/sse2.rs":"103bb9d555be789e678f1af5baa737e13911f60e90888d25fa2883b39a9dffce","src/x86/sse42.rs":"f671ae9dd2b518a823e499a09ce32d4957bc5ae043db90d61c027e32f688f2b2"},"package":"2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39"} \ No newline at end of file diff --git a/vendor/memchr/Cargo.toml b/vendor/memchr/Cargo.toml index ccea6b2a53..e918f9e162 100644 --- a/vendor/memchr/Cargo.toml +++ b/vendor/memchr/Cargo.toml @@ -12,9 +12,9 @@ [package] name = "memchr" -version = "2.1.1" +version = "2.2.0" authors = ["Andrew Gallant ", "bluss"] -exclude = ["/ci/*", "/.travis.yml", "/Makefile", "/appveyor.yml", "/ctags.rust", "/session.vim"] +exclude = ["/ci/*", "/.travis.yml", "/Makefile", "/appveyor.yml"] description = "Safe interface to memchr." homepage = "https://github.com/BurntSushi/rust-memchr" documentation = "https://docs.rs/memchr/" @@ -28,22 +28,17 @@ opt-level = 3 [lib] name = "memchr" bench = false -[dependencies.cfg-if] -version = "0.1.5" - [dependencies.libc] version = "0.2.18" optional = true default-features = false [dev-dependencies.quickcheck] -version = "0.7" +version = "0.8" default-features = false -[build-dependencies.version_check] -version = "0.1.4" [features] -default = ["use_std", "libc"] -use_std = ["libc", "libc/use_std"] +default = ["use_std"] +use_std = [] [badges.appveyor] repository = "BurntSushi/rust-memchr" diff --git a/vendor/memchr/README.md b/vendor/memchr/README.md index c42f9ef813..3e7ff33336 100644 --- a/vendor/memchr/README.md +++ b/vendor/memchr/README.md @@ -43,3 +43,8 @@ memchr links to the standard library by default, but you can disable the [dependencies] memchr = { version = "2", default-features = false } ``` + +On x86 platforms, when the `use_std` feature is disabled, the SSE2 +implementation of memchr will be used in compilers that support it. When +`use_std` is enabled, the AVX implementation of memchr will be used if the CPU +is determined to support it at runtime. diff --git a/vendor/memchr/build.rs b/vendor/memchr/build.rs index 8e41905f08..35f06f9690 100644 --- a/vendor/memchr/build.rs +++ b/vendor/memchr/build.rs @@ -1,18 +1,28 @@ -extern crate version_check; - use std::env; - -use version_check::is_min_version; +use std::ffi::OsString; +use std::process::Command; fn main() { - enable_simd_optimizations(); + let version = match Version::read() { + Ok(version) => version, + Err(err) => { + eprintln!("failed to parse `rustc --version`: {}", err); + return; + } + }; + enable_simd_optimizations(version); + enable_libc(); } -fn enable_simd_optimizations() { +// This adds various simd cfgs if this compiler supports it. +// +// This can be disabled with RUSTFLAGS="--cfg memchr_disable_auto_simd", but +// this is generally only intended for testing. +fn enable_simd_optimizations(version: Version) { if is_env_set("CARGO_CFG_MEMCHR_DISABLE_AUTO_SIMD") { return; } - if !is_min_version("1.27.0").map(|(yes, _)| yes).unwrap_or(false) { + if version < (Version { major: 1, minor: 27, patch: 0 }) { return; } @@ -22,6 +32,103 @@ fn enable_simd_optimizations() { println!("cargo:rustc-cfg=memchr_runtime_avx"); } +// This adds a `memchr_libc` cfg if and only if libc can be used, if no other +// better option is available. +// +// This could be performed in the source code, but it's simpler to do it once +// here and consolidate it into one cfg knob. +// +// Basically, we use libc only if its enabled and if we aren't targeting a +// known bad platform. For example, wasm32 doesn't have a libc and the +// performance of memchr on Windows is seemingly worse than the fallback +// implementation. +fn enable_libc() { + const NO_ARCH: &'static [&'static str] = &["wasm32", "windows"]; + const NO_ENV: &'static [&'static str] = &["sgx"]; + + if !is_feature_set("LIBC") { + return; + } + + let arch = match env::var("CARGO_CFG_TARGET_ARCH") { + Err(_) => return, + Ok(arch) => arch, + }; + let env = match env::var("CARGO_CFG_TARGET_ENV") { + Err(_) => return, + Ok(env) => env, + }; + if NO_ARCH.contains(&&*arch) || NO_ENV.contains(&&*env) { + return; + } + + println!("cargo:rustc-cfg=memchr_libc"); +} + +fn is_feature_set(name: &str) -> bool { + is_env_set(&format!("CARGO_FEATURE_{}", name)) +} + fn is_env_set(name: &str) -> bool { - env::var(name).is_ok() + env::var_os(name).is_some() +} + +#[derive(Clone, Copy, Debug, Eq, PartialEq, PartialOrd, Ord)] +struct Version { + major: u32, + minor: u32, + patch: u32, +} + +impl Version { + fn read() -> Result { + let rustc = env::var_os("RUSTC").unwrap_or(OsString::from("rustc")); + let output = Command::new(&rustc) + .arg("--version") + .output() + .unwrap() + .stdout; + Version::parse(&String::from_utf8(output).unwrap()) + } + + fn parse(mut s: &str) -> Result { + if !s.starts_with("rustc ") { + return Err(format!("unrecognized version string: {}", s)); + } + s = &s["rustc ".len()..]; + + let parts: Vec<&str> = s.split(".").collect(); + if parts.len() < 3 { + return Err(format!("not enough version parts: {:?}", parts)); + } + + let mut num = String::new(); + for c in parts[0].chars() { + if !c.is_digit(10) { + break; + } + num.push(c); + } + let major = num.parse::().map_err(|e| e.to_string())?; + + num.clear(); + for c in parts[1].chars() { + if !c.is_digit(10) { + break; + } + num.push(c); + } + let minor = num.parse::().map_err(|e| e.to_string())?; + + num.clear(); + for c in parts[2].chars() { + if !c.is_digit(10) { + break; + } + num.push(c); + } + let patch = num.parse::().map_err(|e| e.to_string())?; + + Ok(Version { major, minor, patch }) + } } diff --git a/vendor/memchr/src/lib.rs b/vendor/memchr/src/lib.rs index cd32a6451f..b828475f57 100644 --- a/vendor/memchr/src/lib.rs +++ b/vendor/memchr/src/lib.rs @@ -33,8 +33,6 @@ compile_error!("memchr currently not supported on non-32 or non-64 bit"); #[cfg(feature = "use_std")] extern crate core; -#[macro_use] -extern crate cfg_if; #[cfg(test)] #[macro_use] extern crate quickcheck; @@ -43,16 +41,14 @@ use core::iter::Rev; pub use iter::{Memchr, Memchr2, Memchr3}; -#[cfg(all( - feature = "libc", - not(target_arch = "wasm32"), -))] +// N.B. If you're looking for the cfg knobs for libc, see build.rs. +#[cfg(memchr_libc)] mod c; #[allow(dead_code)] mod fallback; mod iter; mod naive; -#[cfg(all(target_arch = "x86_64", memchr_runtime_simd, feature = "use_std"))] +#[cfg(all(target_arch = "x86_64", memchr_runtime_simd))] mod x86; #[cfg(test)] mod tests; @@ -118,7 +114,7 @@ pub fn memrchr3_iter( /// /// While this is operationally the same as something like /// `haystack.iter().position(|&b| b == needle)`, `memchr` will use a highly -/// optimized routine that can be up to an order of magnitude master in some +/// optimized routine that can be up to an order of magnitude faster in some /// cases. /// /// # Example @@ -133,28 +129,30 @@ pub fn memrchr3_iter( /// ``` #[inline] pub fn memchr(needle: u8, haystack: &[u8]) -> Option { - cfg_if! { - if #[cfg(all(target_arch = "x86_64", memchr_runtime_simd, feature = "use_std"))] { - #[inline(always)] - fn imp(n1: u8, haystack: &[u8]) -> Option { - x86::memchr(n1, haystack) - } - } else if #[cfg(all( - feature = "libc", - not(target_arch = "wasm32"), - not(target_arch = "windows"), - ))] { - #[inline(always)] - fn imp(n1: u8, haystack: &[u8]) -> Option { - c::memchr(n1, haystack) - } - } else { - #[inline(always)] - fn imp(n1: u8, haystack: &[u8]) -> Option { - fallback::memchr(n1, haystack) - } - } + #[cfg(all(target_arch = "x86_64", memchr_runtime_simd))] + #[inline(always)] + fn imp(n1: u8, haystack: &[u8]) -> Option { + x86::memchr(n1, haystack) + } + + #[cfg(all( + memchr_libc, + not(all(target_arch = "x86_64", memchr_runtime_simd)) + ))] + #[inline(always)] + fn imp(n1: u8, haystack: &[u8]) -> Option { + c::memchr(n1, haystack) } + + #[cfg(all( + not(memchr_libc), + not(all(target_arch = "x86_64", memchr_runtime_simd)) + ))] + #[inline(always)] + fn imp(n1: u8, haystack: &[u8]) -> Option { + fallback::memchr(n1, haystack) + } + if haystack.is_empty() { None } else { @@ -165,19 +163,18 @@ pub fn memchr(needle: u8, haystack: &[u8]) -> Option { /// Like `memchr`, but searches for two bytes instead of one. #[inline] pub fn memchr2(needle1: u8, needle2: u8, haystack: &[u8]) -> Option { - cfg_if! { - if #[cfg(all(target_arch = "x86_64", memchr_runtime_simd, feature = "use_std"))] { - #[inline(always)] - fn imp(n1: u8, n2: u8, haystack: &[u8]) -> Option { - x86::memchr2(n1, n2, haystack) - } - } else { - #[inline(always)] - fn imp(n1: u8, n2: u8, haystack: &[u8]) -> Option { - fallback::memchr2(n1, n2, haystack) - } - } + #[cfg(all(target_arch = "x86_64", memchr_runtime_simd))] + #[inline(always)] + fn imp(n1: u8, n2: u8, haystack: &[u8]) -> Option { + x86::memchr2(n1, n2, haystack) } + + #[cfg(not(all(target_arch = "x86_64", memchr_runtime_simd)))] + #[inline(always)] + fn imp(n1: u8, n2: u8, haystack: &[u8]) -> Option { + fallback::memchr2(n1, n2, haystack) + } + if haystack.is_empty() { None } else { @@ -193,19 +190,18 @@ pub fn memchr3( needle3: u8, haystack: &[u8], ) -> Option { - cfg_if! { - if #[cfg(all(target_arch = "x86_64", memchr_runtime_simd, feature = "use_std"))] { - #[inline(always)] - fn imp(n1: u8, n2: u8, n3: u8, haystack: &[u8]) -> Option { - x86::memchr3(n1, n2, n3, haystack) - } - } else { - #[inline(always)] - fn imp(n1: u8, n2: u8, n3: u8, haystack: &[u8]) -> Option { - fallback::memchr3(n1, n2, n3, haystack) - } - } + #[cfg(all(target_arch = "x86_64", memchr_runtime_simd))] + #[inline(always)] + fn imp(n1: u8, n2: u8, n3: u8, haystack: &[u8]) -> Option { + x86::memchr3(n1, n2, n3, haystack) } + + #[cfg(not(all(target_arch = "x86_64", memchr_runtime_simd)))] + #[inline(always)] + fn imp(n1: u8, n2: u8, n3: u8, haystack: &[u8]) -> Option { + fallback::memchr3(n1, n2, n3, haystack) + } + if haystack.is_empty() { None } else { @@ -220,7 +216,7 @@ pub fn memchr3( /// /// While this is operationally the same as something like /// `haystack.iter().rposition(|&b| b == needle)`, `memrchr` will use a highly -/// optimized routine that can be up to an order of magnitude master in some +/// optimized routine that can be up to an order of magnitude faster in some /// cases. /// /// # Example @@ -235,29 +231,30 @@ pub fn memchr3( /// ``` #[inline] pub fn memrchr(needle: u8, haystack: &[u8]) -> Option { - cfg_if! { - if #[cfg(all(target_arch = "x86_64", memchr_runtime_simd, feature = "use_std"))] { - #[inline(always)] - fn imp(n1: u8, haystack: &[u8]) -> Option { - x86::memrchr(n1, haystack) - } - } else if #[cfg(all( - feature = "libc", - target_os = "linux", - not(target_arch = "wasm32"), - not(target_arch = "windows"), - ))] { - #[inline(always)] - fn imp(n1: u8, haystack: &[u8]) -> Option { - c::memrchr(n1, haystack) - } - } else { - #[inline(always)] - fn imp(n1: u8, haystack: &[u8]) -> Option { - fallback::memrchr(n1, haystack) - } - } + #[cfg(all(target_arch = "x86_64", memchr_runtime_simd))] + #[inline(always)] + fn imp(n1: u8, haystack: &[u8]) -> Option { + x86::memrchr(n1, haystack) } + + #[cfg(all( + all(memchr_libc, target_os = "linux"), + not(all(target_arch = "x86_64", memchr_runtime_simd)) + ))] + #[inline(always)] + fn imp(n1: u8, haystack: &[u8]) -> Option { + c::memrchr(n1, haystack) + } + + #[cfg(all( + not(all(memchr_libc, target_os = "linux")), + not(all(target_arch = "x86_64", memchr_runtime_simd)) + ))] + #[inline(always)] + fn imp(n1: u8, haystack: &[u8]) -> Option { + fallback::memrchr(n1, haystack) + } + if haystack.is_empty() { None } else { @@ -268,19 +265,18 @@ pub fn memrchr(needle: u8, haystack: &[u8]) -> Option { /// Like `memrchr`, but searches for two bytes instead of one. #[inline] pub fn memrchr2(needle1: u8, needle2: u8, haystack: &[u8]) -> Option { - cfg_if! { - if #[cfg(all(target_arch = "x86_64", memchr_runtime_simd, feature = "use_std"))] { - #[inline(always)] - fn imp(n1: u8, n2: u8, haystack: &[u8]) -> Option { - x86::memrchr2(n1, n2, haystack) - } - } else { - #[inline(always)] - fn imp(n1: u8, n2: u8, haystack: &[u8]) -> Option { - fallback::memrchr2(n1, n2, haystack) - } - } + #[cfg(all(target_arch = "x86_64", memchr_runtime_simd))] + #[inline(always)] + fn imp(n1: u8, n2: u8, haystack: &[u8]) -> Option { + x86::memrchr2(n1, n2, haystack) } + + #[cfg(not(all(target_arch = "x86_64", memchr_runtime_simd)))] + #[inline(always)] + fn imp(n1: u8, n2: u8, haystack: &[u8]) -> Option { + fallback::memrchr2(n1, n2, haystack) + } + if haystack.is_empty() { None } else { @@ -296,19 +292,18 @@ pub fn memrchr3( needle3: u8, haystack: &[u8], ) -> Option { - cfg_if! { - if #[cfg(all(target_arch = "x86_64", memchr_runtime_simd, feature = "use_std"))] { - #[inline(always)] - fn imp(n1: u8, n2: u8, n3: u8, haystack: &[u8]) -> Option { - x86::memrchr3(n1, n2, n3, haystack) - } - } else { - #[inline(always)] - fn imp(n1: u8, n2: u8, n3: u8, haystack: &[u8]) -> Option { - fallback::memrchr3(n1, n2, n3, haystack) - } - } + #[cfg(all(target_arch = "x86_64", memchr_runtime_simd))] + #[inline(always)] + fn imp(n1: u8, n2: u8, n3: u8, haystack: &[u8]) -> Option { + x86::memrchr3(n1, n2, n3, haystack) } + + #[cfg(not(all(target_arch = "x86_64", memchr_runtime_simd)))] + #[inline(always)] + fn imp(n1: u8, n2: u8, n3: u8, haystack: &[u8]) -> Option { + fallback::memrchr3(n1, n2, n3, haystack) + } + if haystack.is_empty() { None } else { diff --git a/vendor/memchr/src/tests/mod.rs b/vendor/memchr/src/tests/mod.rs index 73112d3de1..7033e2e80e 100644 --- a/vendor/memchr/src/tests/mod.rs +++ b/vendor/memchr/src/tests/mod.rs @@ -3,6 +3,18 @@ use std::iter::repeat; mod iter; mod memchr; +#[cfg(target_endian = "little")] +#[test] +fn byte_order() { + eprintln!("LITTLE ENDIAN"); +} + +#[cfg(target_endian = "big")] +#[test] +fn byte_order() { + eprintln!("BIG ENDIAN"); +} + /// Create a sequence of tests that should be run by memchr implementations. fn memchr_tests() -> Vec { let mut tests = Vec::new(); diff --git a/vendor/memchr/src/x86/mod.rs b/vendor/memchr/src/x86/mod.rs index 4f3e0a08ee..6599da3fd8 100644 --- a/vendor/memchr/src/x86/mod.rs +++ b/vendor/memchr/src/x86/mod.rs @@ -1,8 +1,8 @@ -use std::mem; -use std::sync::atomic::{AtomicUsize, Ordering}; - use fallback; +// We only use AVX when we can detect at runtime whether it's available, which +// requires std. +#[cfg(feature = "use_std")] mod avx; mod sse2; @@ -27,30 +27,49 @@ mod sse2; // probably can't be inlined anyway---unless you've compiled your entire // program with AVX2 enabled. However, even then, the various memchr // implementations aren't exactly small, so inlining might not help anyway! +#[cfg(feature = "use_std")] macro_rules! ifunc { ($fnty:ty, $name:ident, $haystack:ident, $($needle:ident),+) => {{ - static mut FN: $fnty = detect; + use std::mem; + use std::sync::atomic::{AtomicPtr, Ordering}; + + type FnRaw = *mut (); + + static FN: AtomicPtr<()> = AtomicPtr::new(detect as FnRaw); fn detect($($needle: u8),+, haystack: &[u8]) -> Option { let fun = if cfg!(memchr_runtime_avx) && is_x86_feature_detected!("avx2") { - avx::$name as usize + avx::$name as FnRaw } else if cfg!(memchr_runtime_sse2) { - sse2::$name as usize + sse2::$name as FnRaw } else { - fallback::$name as usize + fallback::$name as FnRaw }; - let slot = unsafe { &*(&FN as *const _ as *const AtomicUsize) }; - slot.store(fun as usize, Ordering::Relaxed); + FN.store(fun as FnRaw, Ordering::Relaxed); unsafe { - mem::transmute::(fun)($($needle),+, haystack) + mem::transmute::(fun)($($needle),+, haystack) } } unsafe { - let slot = &*(&FN as *const _ as *const AtomicUsize); - let fun = slot.load(Ordering::Relaxed); - mem::transmute::(fun)($($needle),+, $haystack) + let fun = FN.load(Ordering::Relaxed); + mem::transmute::(fun)($($needle),+, $haystack) + } + }} +} + +// When std isn't enable (which provides runtime CPU feature detection), or if +// runtime CPU feature detection has been explicitly disabled, then just call +// our optimized SSE2 routine directly. SSE2 is avalbale on all x86_64 targets, +// so no CPU feature detection is necessary. +#[cfg(not(feature = "use_std"))] +macro_rules! ifunc { + ($fnty:ty, $name:ident, $haystack:ident, $($needle:ident),+) => {{ + if cfg!(memchr_runtime_sse2) { + unsafe { sse2::$name($($needle),+, $haystack) } + } else { + fallback::$name($($needle),+, $haystack) } }} } diff --git a/vendor/minifier/.cargo-checksum.json b/vendor/minifier/.cargo-checksum.json index 9147b60cb8..f547899ae1 100644 --- a/vendor/minifier/.cargo-checksum.json +++ b/vendor/minifier/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"5a3d7c7788b2f220f147fef0f1dd3f556d88775dcb1f686d26f2ec46a6a8ab6f","LICENSE":"d64fe3199be0c90d1f88b363e6b567d5812f64c01accc8957e71381598a3d670","README.md":"4f17fff99fd4094b8032cb367e66131fd84e190a087c88addefbe229667d0a6e","appveyor.yml":"fea1d5001886379c759f5d80e757c8ced54e448dcf45dcce4b94a4571b65d967","src/css/css.rs":"3b818259370cff781e9e93a3c05d76c28adbad6110bb67816eb5c3f8c8659248","src/css/mod.rs":"5fa129f339574aeea7f63b2d4328c53d569d1f1a3c945b7198294f52323254d3","src/css/token.rs":"844b6a5a4b3dcf572b73249a40159185a8adb0862f895282c9eb1390331b74dc","src/html.rs":"391abe3139941a57efe13cbb05aa9d42e4a4446a2a1ef7a658924c9c5cb75e09","src/js/js.rs":"a8a5848e26a8fdaef0ec94209ce6d9a7fd6ab757a0fe71a834e7589b6ad8b437","src/js/mod.rs":"1d262b99c60d79d1d3da711c1afc6ae0d167899cfb419c065c056ca9f193f311","src/js/token.rs":"ff98e96680d8be085ab75b2ed8a4199f1eef4a5d864c98538627952f6ecb8c2f","src/js/utils.rs":"7320daf4420f2cacbe6a87f80f12aad57d7bc6af9db6114b81b78510dd25fd3f","src/json/json_minifier.rs":"9526327b31822778fc59e3266147d986d66ff7e3bb4958cae800dee987188d7b","src/json/mod.rs":"703726c763bc2ac51306b22e583986ab3ea2768f85516cbdfd52bd30dced9592","src/json/read/byte_to_char.rs":"dd9c9295979a9efcf1ef79aa76e19415a73ecfc7a0c16100e6b28f2a58627f86","src/json/read/internal_buffer.rs":"c68bd3e3bab1e6f3384f039ff412d285c166ad02487d04c53576446d91eee23d","src/json/read/internal_reader.rs":"ea648bf2d25d44e52832b7c3735c746530898d3ab9e167e5948b0837491da790","src/json/read/json_read.rs":"758f7ef32b6dd741cc261ceb3efd86308b5b1660e40c1511bd139eead99ebca7","src/json/string.rs":"a9fccc4e9221e2cc4f7d2d10594a751f223ae3cbe618f9b01e71ff9d2a8aea42","src/lib.rs":"dbce5a92f69de45f34e7b4c4565a1fbeed9f961a6f346ceea4082ee8c83bb55a","src/main.rs":"5e71ba75342871eee161da479bda9ab2fb399284fb6cf346f0f12405c80fc73e","tests/files/test.json":"e07a148ef24385057cb7420209a630758c6ce80970bd54c8ffee5be207205608"},"package":"1f4950cb2617b1933e2da0446e864dfe0d6a22c22ff72297996c46e6a63b210b"} \ No newline at end of file +{"files":{"Cargo.toml":"11daa552b5d74e722c16f513a2003ea2d539a05dd7cf67a7832a3a40e079ae1e","LICENSE":"d64fe3199be0c90d1f88b363e6b567d5812f64c01accc8957e71381598a3d670","README.md":"4f17fff99fd4094b8032cb367e66131fd84e190a087c88addefbe229667d0a6e","appveyor.yml":"fea1d5001886379c759f5d80e757c8ced54e448dcf45dcce4b94a4571b65d967","src/css/css.rs":"3b818259370cff781e9e93a3c05d76c28adbad6110bb67816eb5c3f8c8659248","src/css/mod.rs":"5fa129f339574aeea7f63b2d4328c53d569d1f1a3c945b7198294f52323254d3","src/css/token.rs":"844b6a5a4b3dcf572b73249a40159185a8adb0862f895282c9eb1390331b74dc","src/html.rs":"391abe3139941a57efe13cbb05aa9d42e4a4446a2a1ef7a658924c9c5cb75e09","src/js/js.rs":"4d2fd50ac69440efde2ca4111b1d14a483946e5816b5ed825d1adab56c032c4c","src/js/mod.rs":"a1b78161b040549a26d7ac12328a84d4bf65b0396e761617994cd49e2304b4a9","src/js/token.rs":"ff98e96680d8be085ab75b2ed8a4199f1eef4a5d864c98538627952f6ecb8c2f","src/js/utils.rs":"7320daf4420f2cacbe6a87f80f12aad57d7bc6af9db6114b81b78510dd25fd3f","src/json/json_minifier.rs":"9526327b31822778fc59e3266147d986d66ff7e3bb4958cae800dee987188d7b","src/json/mod.rs":"703726c763bc2ac51306b22e583986ab3ea2768f85516cbdfd52bd30dced9592","src/json/read/byte_to_char.rs":"dd9c9295979a9efcf1ef79aa76e19415a73ecfc7a0c16100e6b28f2a58627f86","src/json/read/internal_buffer.rs":"c68bd3e3bab1e6f3384f039ff412d285c166ad02487d04c53576446d91eee23d","src/json/read/internal_reader.rs":"ea648bf2d25d44e52832b7c3735c746530898d3ab9e167e5948b0837491da790","src/json/read/json_read.rs":"758f7ef32b6dd741cc261ceb3efd86308b5b1660e40c1511bd139eead99ebca7","src/json/string.rs":"a9fccc4e9221e2cc4f7d2d10594a751f223ae3cbe618f9b01e71ff9d2a8aea42","src/lib.rs":"dbce5a92f69de45f34e7b4c4565a1fbeed9f961a6f346ceea4082ee8c83bb55a","src/main.rs":"5e71ba75342871eee161da479bda9ab2fb399284fb6cf346f0f12405c80fc73e","tests/files/test.json":"e07a148ef24385057cb7420209a630758c6ce80970bd54c8ffee5be207205608"},"package":"4c909e78edf61f3aa0dd2086da168cdf304329044bbf248768ca3d20253ec8c0"} \ No newline at end of file diff --git a/vendor/minifier/Cargo.toml b/vendor/minifier/Cargo.toml index 070ea58ef2..68010c6293 100644 --- a/vendor/minifier/Cargo.toml +++ b/vendor/minifier/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,7 +12,7 @@ [package] name = "minifier" -version = "0.0.29" +version = "0.0.30" authors = ["Guillaume Gomez "] description = "Minifier tool/lib for JS/CSS/JSON files" documentation = "https://docs.rs/minifier-rs" diff --git a/vendor/minifier/src/js/js.rs b/vendor/minifier/src/js/js.rs index 486c2c7e5e..ea326d32ca 100644 --- a/vendor/minifier/src/js/js.rs +++ b/vendor/minifier/src/js/js.rs @@ -406,10 +406,11 @@ pub fn aggregate_strings_with_separation<'a, 'b: 'a>( } #[inline] -fn aggregate_strings_into_array_inner<'a, 'b: 'a>( +fn aggregate_strings_into_array_inner<'a, 'b: 'a, T: Fn(&Tokens<'a>, usize) -> bool>( mut tokens: Tokens<'a>, array_name: &str, separation_token: Option>, + filter: T, ) -> Tokens<'a> { let mut to_insert = Vec::with_capacity(100); let mut to_replace = Vec::with_capacity(100); @@ -443,6 +444,9 @@ fn aggregate_strings_into_array_inner<'a, 'b: 'a>( } let token = &tokens[pos]; if let Some(str_token) = token.get_string() { + if !filter(&tokens, pos) { + continue; + } let s = &str_token[1..str_token.len() - 1]; let x = strs.entry(s).or_insert_with(|| (0, Vec::with_capacity(1), true)); x.1.push(pos); @@ -478,7 +482,7 @@ fn aggregate_strings_into_array_inner<'a, 'b: 'a>( let mut validated = validated.iter().map(|v| (strs[v].0, v)).collect::>(); validated.sort_unstable_by(|(p1, _), (p2, _)| p2.cmp(p1)); - if need_recreate { + if need_recreate && !validated.is_empty() { if let Some(token) = separation_token { to_insert.push((0, token)); } @@ -555,7 +559,21 @@ pub fn aggregate_strings_into_array_with_separation<'a, 'b: 'a>( array_name: &str, separation_token: Token<'b>, ) -> Tokens<'a> { - aggregate_strings_into_array_inner(tokens, array_name, Some(separation_token)) + aggregate_strings_into_array_inner(tokens, array_name, Some(separation_token), |_, _| true) +} + +/// Same as [`aggregate_strings_into_array_with_separation`] except it allows certain strings to +/// not be aggregated thanks to the `filter` parameter. If it returns `false`, then the string will +/// be ignored. +#[inline] +pub fn aggregate_strings_into_array_with_separation_filter<'a, 'b: 'a, T>( + tokens: Tokens<'a>, + array_name: &str, + separation_token: Token<'b>, + filter: T, +) -> Tokens<'a> + where T: Fn(&Tokens<'a>, usize) -> bool { + aggregate_strings_into_array_inner(tokens, array_name, Some(separation_token), filter) } /// Aggregate litteral strings. For instance, if the string litteral "Oh look over there!" @@ -585,7 +603,19 @@ pub fn aggregate_strings_into_array<'a>( tokens: Tokens<'a>, array_name: &str, ) -> Tokens<'a> { - aggregate_strings_into_array_inner(tokens, array_name, None) + aggregate_strings_into_array_inner(tokens, array_name, None, |_, _| true) +} + +/// Same as [`aggregate_strings_into_array`] except it allows certain strings to not be aggregated +/// thanks to the `filter` parameter. If it returns `false`, then the string will be ignored. +#[inline] +pub fn aggregate_strings_into_array_filter<'a, T>( + tokens: Tokens<'a>, + array_name: &str, + filter: T, +) -> Tokens<'a> + where T: Fn(&Tokens<'a>, usize) -> bool { + aggregate_strings_into_array_inner(tokens, array_name, None, filter) } /// Simple function to get the untouched token list. Useful in case you want to perform some @@ -643,6 +673,35 @@ fn aggregate_strings_in_array() { assert_eq!(result, expected_result); } +#[test] +fn aggregate_strings_in_array_filter() { + let source = r#"var searchIndex = {};searchIndex['duplicate_paths'] = {'aaaaaaaa': 'bbbbbbbb', 'bbbbbbbb': 'aaaaaaaa', 'duplicate_paths': 'aaaaaaaa'};"#; + let expected_result = "var R=[\"bbbbbbbb\",\"aaaaaaaa\"];\nvar searchIndex={};searchIndex['duplicate_paths']={R[1]:R[0],R[0]:R[1],'duplicate_paths':R[1]};"; + + let result = simple_minify(source).apply(::js::clean_tokens) + .apply(|c| aggregate_strings_into_array_with_separation_filter(c, "R", Token::Char(ReservedChar::Backline), |tokens, pos| { + pos < 2 || + !tokens[pos - 1].is_char(ReservedChar::OpenBracket) || + tokens[pos - 2].get_other() != Some("searchIndex") + } + )) + .to_string(); + assert_eq!(result, expected_result); + + let source = r#"var searchIndex = {};searchIndex['duplicate_paths'] = {'aaaaaaaa': 'bbbbbbbb', 'bbbbbbbb': 'aaaaaaaa', 'duplicate_paths': 'aaaaaaaa', 'x': 'duplicate_paths'};"#; + let expected_result = "var R=[\"bbbbbbbb\",\"aaaaaaaa\",\"duplicate_paths\"];\nvar searchIndex={};searchIndex['duplicate_paths']={R[1]:R[0],R[0]:R[1],R[2]:R[1],'x':R[2]};"; + + let result = simple_minify(source).apply(::js::clean_tokens) + .apply(|c| aggregate_strings_into_array_with_separation_filter(c, "R", Token::Char(ReservedChar::Backline), |tokens, pos| { + pos < 2 || + !tokens[pos - 1].is_char(ReservedChar::OpenBracket) || + tokens[pos - 2].get_other() != Some("searchIndex") + } + )) + .to_string(); + assert_eq!(result, expected_result); +} + #[test] fn aggregate_strings_in_array_existing() { let source = r#"var R=[];var x = ["a nice string", "a nice string", "another nice string", "cake!", diff --git a/vendor/minifier/src/js/mod.rs b/vendor/minifier/src/js/mod.rs index a2225b2ce4..e121b5b5ec 100644 --- a/vendor/minifier/src/js/mod.rs +++ b/vendor/minifier/src/js/mod.rs @@ -28,7 +28,9 @@ pub use self::js::{ aggregate_strings, aggregate_strings_with_separation, aggregate_strings_into_array, + aggregate_strings_into_array_filter, aggregate_strings_into_array_with_separation, + aggregate_strings_into_array_with_separation_filter, minify, simple_minify, }; diff --git a/vendor/polonius-engine/.cargo-checksum.json b/vendor/polonius-engine/.cargo-checksum.json index 891880afe5..cd6d58f261 100644 --- a/vendor/polonius-engine/.cargo-checksum.json +++ b/vendor/polonius-engine/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"2bf576d103c9027323e6ef1a712a1f7432c16d16b86e8b136fba535dc8f83c9d","README.md":"fc6752d50a57acbf3d65581c0d2f3d0da8c5fef5735a12857660c9e9687751d0","src/facts.rs":"cc2251e34f3288e4306be6ada5b7247f35a7d729807951051bc883ec20645c71","src/lib.rs":"6672e3a20ecf0e080a137532a8bb0da9c0ba75a49f71ffcc7efd7cbfbe39ca73","src/output/datafrog_opt.rs":"1c452b98bfd95af0cee15b8f899cad07e289dad6f238495ecb7d92fcf10f6057","src/output/location_insensitive.rs":"7fdfcd57de96cc46ce6a53459b2955e4de4f5e28fbda24f29970b59df35a47fe","src/output/mod.rs":"62592de404806d493a9ed8c9f89e5c85f8a5e89ff7988e95e402f4a5d244e66e","src/output/naive.rs":"e0d12c97aa1e89a0d94b0a48ae826479ffcc5ce627aeb23e2fd795516b2b5f77"},"package":"2490c396085801abf88df91758bad806b0890354f0875d624e62ecf0579a8145"} \ No newline at end of file +{"files":{"Cargo.toml":"2ca14597cc9b026a9a6feac5535208bbad024274c3002944042543bb3fdf8afd","README.md":"fc6752d50a57acbf3d65581c0d2f3d0da8c5fef5735a12857660c9e9687751d0","src/facts.rs":"cc2251e34f3288e4306be6ada5b7247f35a7d729807951051bc883ec20645c71","src/lib.rs":"6672e3a20ecf0e080a137532a8bb0da9c0ba75a49f71ffcc7efd7cbfbe39ca73","src/output/datafrog_opt.rs":"1c452b98bfd95af0cee15b8f899cad07e289dad6f238495ecb7d92fcf10f6057","src/output/hybrid.rs":"3fe41c185096b2542d1f36811c7f39071a75113927cdc6a51fcac99a2e918523","src/output/location_insensitive.rs":"03e160ac44796623edd6a014d86c1e7b737a901a5303010e47529f36928e4741","src/output/mod.rs":"5a0d5ecb76c0c5cd279745782f05359f3490d840559a35db71c00f3c91e960f0","src/output/naive.rs":"e0d12c97aa1e89a0d94b0a48ae826479ffcc5ce627aeb23e2fd795516b2b5f77"},"package":"8b24942fee141ea45628484a453762bb7e515099c3ec05fbeb76b7bf57b1aeed"} \ No newline at end of file diff --git a/vendor/polonius-engine/Cargo.toml b/vendor/polonius-engine/Cargo.toml index 0c2c2f34f9..5dd8525edf 100644 --- a/vendor/polonius-engine/Cargo.toml +++ b/vendor/polonius-engine/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,7 +12,7 @@ [package] name = "polonius-engine" -version = "0.6.2" +version = "0.7.0" authors = ["The Rust Project Developers", "Polonius Developers"] description = "Core definition for the Rust borrow checker" readme = "README.md" diff --git a/vendor/polonius-engine/src/output/hybrid.rs b/vendor/polonius-engine/src/output/hybrid.rs new file mode 100644 index 0000000000..f1912a09a7 --- /dev/null +++ b/vendor/polonius-engine/src/output/hybrid.rs @@ -0,0 +1,29 @@ +// Copyright 2019 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! A hybrid version combining the optimized Datafrog model with the +//! location-insensitive version. + +use crate::output::datafrog_opt; +use crate::output::location_insensitive; +use crate::output::Output; +use facts::{AllFacts, Atom}; + +pub(super) fn compute( + dump_enabled: bool, + all_facts: AllFacts, +) -> Output { + let lins_output = location_insensitive::compute(dump_enabled, &all_facts); + if lins_output.errors.is_empty() { + lins_output + } else { + datafrog_opt::compute(dump_enabled, all_facts) + } +} diff --git a/vendor/polonius-engine/src/output/location_insensitive.rs b/vendor/polonius-engine/src/output/location_insensitive.rs index 40f0bda9f0..d9e7bc4057 100644 --- a/vendor/polonius-engine/src/output/location_insensitive.rs +++ b/vendor/polonius-engine/src/output/location_insensitive.rs @@ -18,7 +18,7 @@ use facts::{AllFacts, Atom}; pub(super) fn compute( dump_enabled: bool, - mut all_facts: AllFacts, + all_facts: &AllFacts, ) -> Output { let all_points: BTreeSet = all_facts .cfg_edge @@ -27,12 +27,11 @@ pub(super) fn compute( .chain(all_facts.cfg_edge.iter().map(|&(_, q)| q)) .collect(); - all_facts - .region_live_at - .reserve(all_facts.universal_region.len() * all_points.len()); + let mut region_live_at = all_facts.region_live_at.clone(); + region_live_at.reserve(all_facts.universal_region.len() * all_points.len()); for &r in &all_facts.universal_region { for &p in &all_points { - all_facts.region_live_at.push((r, p)); + region_live_at.push((r, p)); } } @@ -45,7 +44,7 @@ pub(super) fn compute( let mut iteration = Iteration::new(); // static inputs - let region_live_at: Relation<(Region, Point)> = all_facts.region_live_at.into(); + let region_live_at: Relation<(Region, Point)> = region_live_at.into(); let invalidates = Relation::from_iter(all_facts.invalidates.iter().map(|&(b, p)| (p, b))); // .. some variables, .. diff --git a/vendor/polonius-engine/src/output/mod.rs b/vendor/polonius-engine/src/output/mod.rs index 19d225a67c..78d409f66c 100644 --- a/vendor/polonius-engine/src/output/mod.rs +++ b/vendor/polonius-engine/src/output/mod.rs @@ -13,6 +13,7 @@ use std::borrow::Cow; use std::collections::{BTreeMap, BTreeSet}; mod datafrog_opt; +mod hybrid; mod location_insensitive; mod naive; use facts::{AllFacts, Atom}; @@ -24,14 +25,21 @@ pub enum Algorithm { LocationInsensitive, /// Compare Naive and DatafrogOpt. Compare, + Hybrid, } impl Algorithm { /// Optimized variants that ought to be equivalent to "naive" pub const OPTIMIZED: &'static [Algorithm] = &[Algorithm::DatafrogOpt]; - pub fn variants() -> [&'static str; 4] { - ["Naive", "DatafrogOpt", "LocationInsensitive", "Compare"] + pub fn variants() -> [&'static str; 5] { + [ + "Naive", + "DatafrogOpt", + "LocationInsensitive", + "Compare", + "Hybrid", + ] } } @@ -43,8 +51,9 @@ impl ::std::str::FromStr for Algorithm { "datafrogopt" => Ok(Algorithm::DatafrogOpt), "locationinsensitive" => Ok(Algorithm::LocationInsensitive), "compare" => Ok(Algorithm::Compare), + "hybrid" => Ok(Algorithm::Hybrid), _ => Err(String::from( - "valid values: Naive, DatafrogOpt, LocationInsensitive, Compare", + "valid values: Naive, DatafrogOpt, LocationInsensitive, Compare, Hybrid", )), } } @@ -117,7 +126,7 @@ where Algorithm::Naive => naive::compute(dump_enabled, all_facts.clone()), Algorithm::DatafrogOpt => datafrog_opt::compute(dump_enabled, all_facts.clone()), Algorithm::LocationInsensitive => { - location_insensitive::compute(dump_enabled, all_facts.clone()) + location_insensitive::compute(dump_enabled, &all_facts) } Algorithm::Compare => { let naive_output = naive::compute(dump_enabled, all_facts.clone()); @@ -133,6 +142,7 @@ where } opt_output } + Algorithm::Hybrid => hybrid::compute(dump_enabled, all_facts.clone()), } } diff --git a/vendor/pulldown-cmark/.cargo-checksum.json b/vendor/pulldown-cmark/.cargo-checksum.json new file mode 100644 index 0000000000..0b198db672 --- /dev/null +++ b/vendor/pulldown-cmark/.cargo-checksum.json @@ -0,0 +1 @@ +{"files":{"CONTRIBUTING.md":"3c894fb96ad94e1f46328df6857016aab02e185f9d78dc8b767ff43753a24c20","Cargo.toml":"0391cc19e92985f3a83be6d186b6761377a01c03bcc0797b77fa3c0572edd391","LICENSE":"c4f10f55904bdb9f27d3fbf94c354926d6cfe8b982276e556238c258941b243b","README.md":"c0bb8d94718ec723a03ed909458c8a3083a8c6f4b2d937543bd67cc77c4a2fb2","azure-pipelines.yml":"c1017a5c1d032f26337809d6b639e0413abdb680ffe040b9f66857e2ba3abd56","benches/html_rendering.rs":"15661b7baa02eb33f19948346f837d8a94f776fb85fc88b90eb265757566dc96","benches/lib.rs":"ef1915ba6604ccf12757ac9c69574e6f804e6c42fe131486e27352cc1d966e3b","build.rs":"1daba4bd6ed2028c0fe42c3e5c4e3e60ba1d39b21f7da093d99a161fdede4fdf","examples/event-filter.rs":"0ca9b979fd5012d663033b365cbf0f7253e5b5043de271b27c94b4c7e952df7a","examples/string-to-string.rs":"c9bb5d8b3945f80266bb8609efd5760b2bfd3e231e63ae99793f7bcd73b41d53","specs/footnotes.txt":"8593e211895904e861c85f786552f3dc2fe3d9eaa73c36ec1d2731416a8dbe4a","specs/regression.txt":"2f8f773f27594711149e18edd356f4cf4efaaa1984892c96ae8be2badafa333c","specs/table.txt":"2350d2fa339b2b1383e5ba3ded1120b62697687d69db25fb76f307006b75bf88","src/entities.rs":"a79b02eaa9c30fe6c1ad37dc279dbfde0e83cbb5ec557be312ba05292aa989cf","src/escape.rs":"0abaa21bbdf3150b3cfc33e0f6c82644f932efd177438187136fba4668e8a4ce","src/html.rs":"1b6b0a7d35933e62a120266b74e35187c6057ea4ab2f409254b60773be6493b0","src/lib.rs":"e6630630f69b60b90caf31b5a49238e0dc3c680acf8c9c6642cf9b696438f633","src/linklabel.rs":"cb429c1b10fd08acb0369a2f961f34391a89f95a16d783b79e27b0e3770b5095","src/main.rs":"66377d9de20e490e29fb406b794e774f40e7423dfa073ae70bf718566a5196d1","src/parse.rs":"25a61c4fe42362d2e7a4d4520a250a60538ef6de8e23482175f571a2ee4c26fb","src/puncttable.rs":"6787a03f708e23851ef6e7ca636d15978c33ba3e8fcb6778a09762a8baa47870","src/scanners.rs":"25f40a5fc5e4554440581b18842f048b77fb2a71abc1a19358694cbfc9cc48fa","src/simd.rs":"cc43ef6992cb77cfb7925fa5bcf6dbf76369b02af9cbd4b8487d3ce9dd2091ac","src/strings.rs":"499daac94fab67c06e8146428e56db125db9cd848d01cf684d00a1c8443a7c2b","src/tree.rs":"fdfefa802f9aef4007f286805dea1108e2d665d8f1dbaf573f1518e1c2d40c9d","tests/errors.rs":"74c8987f479df3352a6e3c2112e93d39d1eb8debd728034a98da8bb4b7bd47b1","tests/html.rs":"967418e297352f40b3a4ff7ed12e829a7a75fc6122ab530815fc79a3f72a7c3e","tests/lib.rs":"ce906df6c214b13654c7b40f8ef22dbe05e7bc10fbce762e2955c4c90ffc12d6","tests/suite/footnotes.rs":"e89d9081bd1952cc41c430c91afd1dc991029023f6ff0efc7ed346b38a590cc6","tests/suite/gfm_strikethrough.rs":"2f570ecc1c299621cecc1780b901ee382507217d2bd3a58eae4ca430520340cf","tests/suite/gfm_table.rs":"60623ec1018807bb1af3405c8fdc7bb580f2b1665c91c2b76dcc01237d9288be","tests/suite/gfm_tasklist.rs":"d757dc6729851f3afc5783104249279bb66e1cd5bd35b09da48d5a83a77a253d","tests/suite/mod.rs":"5c1dd5afe2ec09afa63151d66bc5351a6e3d590c169f0eca7631a8e85ae1f841","tests/suite/regression.rs":"98d2f3e8217ecafc7077afb1f106f4a00362bd413162fa540c4be733dd82bd8f","tests/suite/spec.rs":"7aa755fb0e57ba03a196d8e8c9f58b18e1e3c6c1324a454a0b3adfe04f5bde1a","tests/suite/table.rs":"f3f17c5b244db4f27ef62e936350bdf43c798e507d2796bcd404c7dc7e0adfe6","third_party/CommonMark/LICENSE":"3026a329eb5a8c5814f48bb1047970ace2a7d877c4973401a24b5563d76e345a","third_party/CommonMark/README.google":"a89d8075d323bda7871772288f3c43be1efb0d1bee2bb25b592278e45bc5c926","third_party/CommonMark/spec.txt":"6b5f4d83a2a9ca7735f7697bf3c7b161bcb0fd409109cc997857e8cfae4d2c3a","third_party/GitHub/LICENSE":"c22e885f33b821bddb24cf007145e5540655b6c0f403e49e6c76a93c28e6d9a9","third_party/GitHub/gfm_strikethrough.txt":"2a9e0579e140682eb5c25e649ddddf2d2221245eb6eecf2bf290f043ac15ded3","third_party/GitHub/gfm_table.txt":"4737af2d899d0ea7b7a23fcf4b3525b2b71ddbfbba7b3e6870fc449be8a821bb","third_party/GitHub/gfm_tasklist.txt":"f1e25d27b1cb57188460996aea745eadbd979145b7e647662ab62c595776c259","third_party/GitHub/spec.txt":"184896f619dee0631ed61f0f9e6c4bfcb3b885004b9cffb0f1ee3668245fbd1a","third_party/xi-editor/LICENSE":"8c6db340475136df3c1201d458fa5755698eace76e510471ecc9d857d6083dac","third_party/xi-editor/crdt.md":"e114174910d1a5f9a08bbd28a333a7d77956e4b391169ea96da2f971db6a9eaf","tools/mk_entities.py":"aa22cb5ba2c6484a4b6e13473ac1b8afd581090ca3e16f94965d3b05e11fd75c","tools/mk_puncttable.py":"5001dbf67e0009f2e23dbdfd50986564cdae977c611379c4b9d888366caa1d5e"},"package":"051e60ace841b3bfecd402fe5051c06cb3bec4a6e6fdd060a37aa8eb829a1db3"} \ No newline at end of file diff --git a/vendor/pulldown-cmark/CONTRIBUTING.md b/vendor/pulldown-cmark/CONTRIBUTING.md new file mode 100644 index 0000000000..b198611dbe --- /dev/null +++ b/vendor/pulldown-cmark/CONTRIBUTING.md @@ -0,0 +1,11 @@ +Want to contribute? Great! First, read this page. + +### Before you contribute +Before you start working on a larger contribution, you should get in touch with +us first through the issue tracker with your idea so that we can help out and +possibly guide you. Coordinating up front makes it much easier to avoid +frustration later on. + +### Code reviews +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. diff --git a/vendor/pulldown-cmark/Cargo.toml b/vendor/pulldown-cmark/Cargo.toml new file mode 100644 index 0000000000..88f333fcab --- /dev/null +++ b/vendor/pulldown-cmark/Cargo.toml @@ -0,0 +1,64 @@ +# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO +# +# When uploading crates to the registry Cargo will automatically +# "normalize" Cargo.toml files for maximal compatibility +# with all versions of Cargo and also rewrite `path` dependencies +# to registry (e.g., crates.io) dependencies +# +# If you believe there's an error in this file please file an +# issue against the rust-lang/cargo repository. If you're +# editing this file be aware that the upstream Cargo.toml +# will likely look very different (and much more reasonable) + +[package] +edition = "2018" +name = "pulldown-cmark" +version = "0.5.2" +authors = ["Raph Levien "] +build = "build.rs" +description = "A pull parser for CommonMark" +readme = "README.md" +keywords = ["markdown", "commonmark"] +categories = ["text-processing"] +license = "MIT" +repository = "https://github.com/raphlinus/pulldown-cmark" + +[[bin]] +name = "pulldown-cmark" +doc = false +required-features = ["getopts"] + +[[bench]] +name = "html_rendering" +harness = false +[dependencies.bitflags] +version = "1.0" + +[dependencies.getopts] +version = "0.2" +optional = true + +[dependencies.memchr] +version = "2.2" + +[dependencies.unicase] +version = "2.4" +[dev-dependencies.criterion] +version = "0.2" + +[dev-dependencies.html5ever] +version = "0.23" + +[dev-dependencies.lazy_static] +version = "1.3" + +[dev-dependencies.regex] +version = "1.1" + +[dev-dependencies.tendril] +version = "0.4" + +[features] +default = ["getopts"] +gen-tests = [] +simd = [] diff --git a/vendor/pulldown-cmark/LICENSE b/vendor/pulldown-cmark/LICENSE new file mode 100644 index 0000000000..cd8655ebdb --- /dev/null +++ b/vendor/pulldown-cmark/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright 2015 Google Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/pulldown-cmark/README.md b/vendor/pulldown-cmark/README.md new file mode 100644 index 0000000000..17adcb7e5f --- /dev/null +++ b/vendor/pulldown-cmark/README.md @@ -0,0 +1,150 @@ +# pulldown-cmark + +[![Build Status](https://dev.azure.com/raphlinus/pulldown-cmark/_apis/build/status/pulldown-cmark-CI?branchName=master)](https://dev.azure.com/raphlinus/pulldown-cmark/_build/latest?definitionId=2&branchName=master) +[![Docs](https://docs.rs/pulldown-cmark/badge.svg)](https://docs.rs/pulldown-cmark) +[![Crates.io](https://img.shields.io/crates/v/pulldown-cmark.svg?maxAge=2592000)](https://crates.io/crates/pulldown-cmark) + +[Documentation](https://docs.rs/pulldown-cmark/) + +This library is a pull parser for [CommonMark](http://commonmark.org/), written +in [Rust](http://www.rust-lang.org/). It comes with a simple command-line tool, +useful for rendering to HTML, and is also designed to be easy to use from as +a library. + +It is designed to be: + +* Fast; a bare minimum of allocation and copying +* Safe; written in pure Rust with no unsafe blocks +* Versatile; in particular source-maps are supported +* Correct; the goal is 100% compliance with the [CommonMark spec](http://spec.commonmark.org/) + +Further, it optionally supports parsing footnotes, +[Github flavored tables](https://github.github.com/gfm/#tables-extension-), +[Github flavored task lists](https://github.github.com/gfm/#task-list-items-extension-) and +[strikethrough](https://github.github.com/gfm/#strikethrough-extension-). + +## Why a pull parser? + +There are many parsers for Markdown and its variants, but to my knowledge none +use pull parsing. Pull parsing has become popular for XML, especially for +memory-conscious applications, because it uses dramatically less memory than +constructing a document tree, but is much easier to use than push parsers. Push +parsers are notoriously difficult to use, and also often error-prone because of +the need for user to delicately juggle state in a series of callbacks. + +In a clean design, the parsing and rendering stages are neatly separated, but +this is often sacrificed in the name of performance and expedience. Many Markdown +implementations mix parsing and rendering together, and even designs that try +to separate them (such as the popular [hoedown](https://github.com/hoedown/hoedown)), +make the assumption that the rendering process can be fully represented as a +serialized string. + +Pull parsing is in some sense the most versatile architecture. It's possible to +drive a push interface, also with minimal memory, and quite straightforward to +construct an AST. Another advantage is that source-map information (the mapping +between parsed blocks and offsets within the source text) is readily available; +you can call `into_offset_iter()` to create an iterator that yields `(Event, Range)` +pairs, where the second element is the event's corresponding range in the source +document. + +While manipulating ASTs is the most flexible way to transform documents, +operating on iterators is surprisingly easy, and quite efficient. Here, for +example, is the code to transform soft line breaks into hard breaks: + +```rust +let parser = parser.map(|event| match event { + Event::SoftBreak => Event::HardBreak, + _ => event +}); +``` + +Or expanding an abbreviation in text: + +```rust +let parser = parser.map(|event| match event { + Event::Text(text) => Event::Text(text.replace("abbr", "abbreviation").into()), + _ => event +}); +``` + +Another simple example is code to determine the max nesting level: + +```rust +let mut max_nesting = 0; +let mut level = 0; +for event in parser { + match event { + Event::Start(_) => { + level += 1; + max_nesting = std::cmp::max(max_nesting, level); + } + Event::End(_) => level -= 1, + _ => () + } +} +``` + +There are some basic but fully functional examples of the usage of the crate in the +`examples` directory of this repository. + +## Using Rust idiomatically + +A lot of the internal scanning code is written at a pretty low level (it +pretty much scans byte patterns for the bits of syntax), but the external +interface is designed to be idiomatic Rust. + +Pull parsers are at heart an iterator of events (start and end tags, text, +and other bits and pieces). The parser data structure implements the +Rust Iterator trait directly, and Event is an enum. Thus, you can use the +full power and expressivity of Rust's iterator infrastructure, including +for loops and `map` (as in the examples above), collecting the events into +a vector (for recording, playback, and manipulation), and more. + +Further, the `Text` event (representing text) is a small copy-on-write string. +The vast majority of text fragments are just +slices of the source document. For these, copy-on-write gives a convenient +representation that requires no allocation or copying, but allocated +strings are available when they're needed. Thus, when rendering text to +HTML, most text is copied just once, from the source document to the +HTML buffer. + +When using the pulldown-cmark's own HTML renderer, make sure to write to a buffered +target like a `Vec` or `String`. Since it performs many (very) small writes, writing +directly to stdout, files, or sockets is detrimental to performance. Such writers can +be wrapped in a [`BufWriter`](https://doc.rust-lang.org/std/io/struct.BufWriter.html). + +## Build options + +By default, the binary is built as well. If you don't want/need it, then build like this: + +```bash +> cargo build --no-default-features +``` + +Or put in your `Cargo.toml` file: + +```toml +pulldown-cmark = { version = "0.5", default-features = false } +``` + +SIMD accelerated scanners are available for the x64 platform from version 0.5 onwards. To +enable them, build with simd feature: + +```bash +> cargo build --release --features simd +``` + +Or add the feature to your project's `Cargo.toml`: + +```toml +pulldown-cmark = { version = "0.5", default-features = false, features = ["simd"] } +``` + +## Authors + +The main author is Raph Levien. + +## Contributions + +We gladly accept contributions via GitHub pull requests. Please see +`CONTRIBUTIONS.md` for more details. diff --git a/vendor/pulldown-cmark/azure-pipelines.yml b/vendor/pulldown-cmark/azure-pipelines.yml new file mode 100644 index 0000000000..db00fefc75 --- /dev/null +++ b/vendor/pulldown-cmark/azure-pipelines.yml @@ -0,0 +1,17 @@ +pool: + vmImage: 'ubuntu-16.04' + +steps: + - script: | + curl https://sh.rustup.rs -sSf | sh -s -- -y + echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin" + displayName: Install rust + - script: cargo build --all + displayName: Cargo build + - script: cargo test --all + displayName: Cargo test + - script: cargo test --all --features=simd + displayName: Cargo test with simd feature enabled + - script: cargo run --release -- --regressions + workingDirectory: fuzzer + displayName: Test for superlinear time regressions diff --git a/vendor/pulldown-cmark/benches/html_rendering.rs b/vendor/pulldown-cmark/benches/html_rendering.rs new file mode 100644 index 0000000000..58c705ee7a --- /dev/null +++ b/vendor/pulldown-cmark/benches/html_rendering.rs @@ -0,0 +1,77 @@ +#[macro_use] +extern crate criterion; +extern crate pulldown_cmark; + +use criterion::Criterion; +use pulldown_cmark::{Parser, Options, html}; +use std::str::from_utf8; + +static CRDT_BYTES: &[u8] = include_bytes!("../third_party/xi-editor/crdt.md"); + +fn criterion_benchmark(c: &mut Criterion) { + c.bench_function("crdt_total", |b| { + let input = from_utf8(CRDT_BYTES).unwrap(); + let mut buf = String::with_capacity(input.len() * 3 / 2); + + b.iter(|| { + buf.clear(); + html::push_html(&mut buf, Parser::new_ext(input, Options::empty())); + }) + }); + + c.bench_function("crdt_html", |b| { + let input = from_utf8(CRDT_BYTES).unwrap(); + let events: Vec<_> = Parser::new_ext(input, Options::empty()).collect(); + let mut buf = String::with_capacity(input.len() * 3 / 2); + + b.iter(|| { + buf.clear(); + html::push_html(&mut buf, events.clone().into_iter()); + }) + }); + + c.bench_function("crdt_parse", |b| { + let input = from_utf8(CRDT_BYTES).unwrap(); + + b.iter(|| Parser::new_ext(input, Options::empty()).count()) + }); + + c.bench_function("links_n_emphasis", |b| { + let input = r#"""This is a [link](example.com). **Cool!** + +This is a [link](example.com). **Cool!** + +This is a [link](example.com). **Cool!** + +This is a [link](example.com). **Cool!** +"""#; + + b.iter(|| Parser::new_ext(input, Options::empty()).count()); + }); + + c.bench_function("unescapes", |b| { + let input = "This is by far my favourite unicode code point: પ પ પ પ પ પ + પ પ પ પ પ પ પ પ પ પ પ પ પ પ + પ પ પ પ પ પ પ પ પ પ પ પ પ પ + પ પ પ પ પ પ પ પ પ પ પ પ પ પ + પ પ પ પ પ પ પ પ પ પ પ પ પ પ + પ પ પ પ પ પ પ પ પ પ પ પ પ પ + પ પ પ પ પ પ પ પ પ પ પ પ પ પ + પ પ પ પ પ પ પ પ પ પ પ પ પ પ"; + + b.iter(|| Parser::new_ext(input, Options::empty()).count()); + }); + + c.bench_function("autolinks_n_html", |b| { + let input = "Drop me a line at . Thanks! + Drop me a line at . Thanks! + Drop me a line at . Thanks! + Drop me a line at . Thanks! + Drop me a line at . Thanks! "; + + b.iter(|| Parser::new_ext(input, Options::empty()).count()); + }); +} + +criterion_group!(benches, criterion_benchmark); +criterion_main!(benches); diff --git a/vendor/pulldown-cmark/benches/lib.rs b/vendor/pulldown-cmark/benches/lib.rs new file mode 100644 index 0000000000..7699b01250 --- /dev/null +++ b/vendor/pulldown-cmark/benches/lib.rs @@ -0,0 +1,151 @@ +#![feature(test)] + +extern crate pulldown_cmark; +extern crate test; + +mod to_html { + use pulldown_cmark::{Parser, Options, html}; + + fn render_html(text: &str, opts: Options) -> String { + let mut s = String::with_capacity(text.len() * 3 / 2); + let p = Parser::new_ext(text, opts); + html::push_html(&mut s, p); + s + } + + #[bench] + fn pathological_links(b: &mut test::Bencher) { + let input = "[a](<".repeat(1000); + + b.iter(|| render_html(&input, Options::empty())); + } + + #[bench] + fn pathological_links2(b: &mut test::Bencher) { + let input = "[[]()".repeat(1000); + + b.iter(|| render_html(&input, Options::empty())); + } + + #[bench] + fn pathological_emphasis1(b: &mut test::Bencher) { + let input = "a***".repeat(1000); + + b.iter(|| render_html(&input, Options::empty())); + } + + #[bench] + fn pathological_emphasis2(b: &mut test::Bencher) { + let input = "a***_b__".repeat(1000); + + b.iter(|| render_html(&input, Options::empty())); + } + + #[bench] + fn pathological_emphasis3(b: &mut test::Bencher) { + let input = "[*_a".repeat(1000); + + b.iter(|| render_html(&input, Options::empty())); + } + + #[bench] + fn pathological_emphasis4(b: &mut test::Bencher) { + let input = "*~~\u{a0}".repeat(1000); + let mut opts = Options::empty(); + opts.insert(Options::ENABLE_STRIKETHROUGH); + + b.iter(|| render_html(&input, opts)); + } + + #[bench] + fn pathological_strikethrough(b: &mut test::Bencher) { + let input = "a***b~~".repeat(1000); + + b.iter(|| render_html(&input, Options::empty())); + } + + #[bench] + fn pathological_codeblocks1(b: &mut test::Bencher) { + // Note that `buf` grows quadratically with number of + // iterations. The point here is that the render time shouldn't + // grow faster than that. + let mut buf = String::new(); + for i in 1..1000 { + for _ in 0..i { + buf.push('`'); + } + buf.push(' '); + } + + b.iter(|| render_html(&buf, Options::empty())); + } + + #[bench] + fn pathological_codeblocks2(b: &mut test::Bencher) { + let input = "\\``".repeat(1000); + + b.iter(|| render_html(&input, Options::empty())); + } + + #[bench] + fn pathological_codeblocks3(b: &mut test::Bencher) { + let mut input = "`a`".repeat(1000); + input.push('`'); + + b.iter(|| render_html(&input, Options::empty())); + } + + #[bench] + fn pathological_hrules(b: &mut test::Bencher) { + let mut input = "* ".repeat(1000); + input.push('a'); + + b.iter(|| render_html(&input, Options::empty())); + } + + #[bench] + fn pathological_link_titles(b: &mut test::Bencher) { + let input = "[ (](".repeat(1000); + + b.iter(|| render_html(&input, Options::empty())); + } + + #[bench] + fn advanced_pathological_codeblocks(b: &mut test::Bencher) { + let mut buf = String::new(); + let mut i = 1; + while buf.len() < 1250 { + for _ in 0..i { + buf.push('`'); + } + buf.push(' '); + i += 1; + } + for _ in 0..buf.len() { + buf.push_str("*a* "); + } + + b.iter(|| render_html(&buf, Options::empty())); + } + + #[bench] + fn pathological_cdata(b: &mut test::Bencher) { + let input = "a >(); + + for file_path in &spec_files { + let mut raw_spec = String::new(); + + File::open(&file_path) + .and_then(|mut f| f.read_to_string(&mut raw_spec)) + .expect("Could not read the spec file"); + + let rs_test_file = PathBuf::from("./tests/suite/") + .join(file_path.file_name().expect("Invalid filename")) + .with_extension("rs"); + + let mut spec_rs = File::create(&rs_test_file) + .expect(&format!("Could not create {:?}", rs_test_file)); + + let spec_name = file_path.file_stem().unwrap().to_str().unwrap(); + + let spec = Spec::new(&raw_spec); + let mut n_tests = 0; + + spec_rs.write(b"// This file is auto-generated by the build script\n").unwrap(); + spec_rs.write(b"// Please, do not modify it manually\n").unwrap(); + spec_rs.write(b"\nuse super::test_markdown_html;").unwrap(); + + for (i, testcase) in spec.enumerate() { + spec_rs.write_fmt( + format_args!( + r###" + +#[test] +fn {}_test_{i}() {{ + let original = r##"{original}"##; + let expected = r##"{expected}"##; + + test_markdown_html(original, expected); +}}"###, + spec_name, + i=i+1, + original=testcase.original, + expected=testcase.expected + ), + ).unwrap(); + + n_tests += 1; + } + + println!("cargo:warning=Generated {} tests in {:?}", n_tests, rs_test_file); + } + + // write mods to suite/mod.rs + let suite_mod_file = PathBuf::from("./tests/suite/mod").with_extension("rs"); + + let mut mod_rs = File::create(&suite_mod_file) + .expect(&format!("Could not create {:?}", &suite_mod_file)); + + mod_rs.write(b"// This file is auto-generated by the build script\n").unwrap(); + mod_rs.write(b"// Please, do not modify it manually\n").unwrap(); + mod_rs.write(b"\npub use super::test_markdown_html;\n\n").unwrap(); + + for file_path in &spec_files { + let mod_name = file_path.file_stem().unwrap().to_str().unwrap(); + mod_rs.write(b"mod ").unwrap(); + mod_rs.write(mod_name.as_bytes()).unwrap(); + mod_rs.write(b";\n").unwrap(); + } +} + +#[cfg(feature="gen-tests")] +pub struct Spec<'a> { + spec: &'a str, +} + +#[cfg(feature="gen-tests")] +impl<'a> Spec<'a> { + pub fn new(spec: &'a str) -> Self { + Spec{ spec: spec } + } +} + +#[cfg(feature="gen-tests")] +pub struct TestCase { + pub original: String, + pub expected: String, +} + +#[cfg(feature="gen-tests")] +impl<'a> Iterator for Spec<'a> { + type Item = TestCase; + + fn next(&mut self) -> Option { + let spec = self.spec; + + let i_start = match self.spec.find("```````````````````````````````` example\n").map(|pos| pos + 41) { + Some(pos) => pos, + None => return None, + }; + + let i_end = match self.spec[i_start..].find("\n.\n").map(|pos| (pos + 1) + i_start){ + Some(pos) => pos, + None => return None, + }; + + let e_end = match self.spec[i_end + 2..].find("````````````````````````````````\n").map(|pos| pos + i_end + 2){ + Some(pos) => pos, + None => return None, + }; + + self.spec = &self.spec[e_end + 33 ..]; + + let test_case = TestCase { + original: spec[i_start .. i_end].to_string().replace("→", "\t"), + expected: spec[i_end + 2 .. e_end].to_string().replace("→", "\t") + }; + + Some(test_case) + } +} diff --git a/vendor/pulldown-cmark/examples/event-filter.rs b/vendor/pulldown-cmark/examples/event-filter.rs new file mode 100644 index 0000000000..13b7ef19b4 --- /dev/null +++ b/vendor/pulldown-cmark/examples/event-filter.rs @@ -0,0 +1,29 @@ +extern crate pulldown_cmark; + +use std::io::Write as _; + +use pulldown_cmark::{Parser, Event, Tag, Options, html}; + +fn main() { + let markdown_input: &str = "This is Peter on ![holiday in Greece](pearl_beach.jpg)."; + println!("Parsing the following markdown string:\n{}", markdown_input); + + // Set up parser. We can treat is as any other iterator. We replace Peter by John + // and image by its alt text. + let parser = Parser::new_ext(markdown_input, Options::empty()) + .map(|event| match event { + Event::Text(text) => Event::Text(text.replace("Peter", "John").into()), + _ => event + }) + .filter(|event| match event { + Event::Start(Tag::Image(..)) | Event::End(Tag::Image(..)) => false, + _ => true, + }); + + // Write to anything implementing the `Write` trait. This could also be a file + // or network socket. + let stdout = std::io::stdout(); + let mut handle = stdout.lock(); + handle.write_all(b"\nHTML output:\n").unwrap(); + html::write_html(&mut handle, parser).unwrap(); +} diff --git a/vendor/pulldown-cmark/examples/string-to-string.rs b/vendor/pulldown-cmark/examples/string-to-string.rs new file mode 100644 index 0000000000..e4671be82e --- /dev/null +++ b/vendor/pulldown-cmark/examples/string-to-string.rs @@ -0,0 +1,26 @@ +extern crate pulldown_cmark; + +use pulldown_cmark::{Parser, Options, html}; + +fn main() { + let markdown_input: &str = "Hello world, this is a ~~complicated~~ *very simple* example."; + println!("Parsing the following markdown string:\n{}", markdown_input); + + // Set up options and parser. Strikethroughs are not part of the CommonMark standard + // and we therefore must enable it explicitly. + let mut options = Options::empty(); + options.insert(Options::ENABLE_STRIKETHROUGH); + let parser = Parser::new_ext(markdown_input, options); + + // Write to String buffer. + let mut html_output: String = String::with_capacity(markdown_input.len() * 3 / 2); + html::push_html(&mut html_output, parser); + + // Check that the output is what we expected. + let expected_html: &str = "

Hello world, this is a complicated very simple example.

\n"; + assert_eq!(expected_html, &html_output); + + // Write result to stdout. + println!("\nHTML output:\n{}", &html_output); +} + diff --git a/vendor/pulldown-cmark/specs/footnotes.txt b/vendor/pulldown-cmark/specs/footnotes.txt new file mode 100644 index 0000000000..4b91b38456 --- /dev/null +++ b/vendor/pulldown-cmark/specs/footnotes.txt @@ -0,0 +1,153 @@ +Run this with `cargo run -- -F -s specs/footnotes.txt`. + +This is how footnotes are basically used. + +```````````````````````````````` example +Lorem ipsum.[^a] + +[^a]: Cool. +. +

Lorem ipsum.1

+
1 +

Cool.

+
+```````````````````````````````` + + +Footnotes can be used inside blockquotes: + +```````````````````````````````` example +> This is the song that never ends.\ +> Yes it goes on and on my friends.[^lambchops] +> +> [^lambchops]: +. +
+

This is the song that never ends.
+Yes it goes on and on my friends.1

+ +
+```````````````````````````````` + + +Footnotes can be complex block structures: + +```````````````````````````````` example +Songs that simply loop are a popular way to annoy people. [^examples] + +[^examples]: + * [The song that never ends](https://www.youtube.com/watch?v=0U2zJOryHKQ) + * [I know a song that gets on everybody's nerves](https://www.youtube.com/watch?v=TehWI09qxls) + * [Ninety-nine bottles of beer on the wall](https://www.youtube.com/watch?v=qVjCag8XoHQ) +. +

Songs that simply loop are a popular way to annoy people. 1

+ +```````````````````````````````` + + +Footnotes can even have multiple paragraphs. They also don't need to be referenced to show up. + +```````````````````````````````` example +[^lorem]: If heaven ever wishes to grant me a boon, it will be a total effacing of the results of a mere chance which fixed my eye on a certain stray piece of shelf-paper. It was nothing on which I would naturally have stumbled in the course of my daily round, for it was an old number of an Australian journal, the Sydney Bulletin for April 18, 1925. It had escaped even the cutting bureau which had at the time of its issuance been avidly collecting material for my uncle's research. + +I had largely given over my inquiries into what Professor Angell called the "Cthulhu Cult", and was visiting a learned friend in Paterson, New Jersey; the curator of a local museum and a mineralogist of note. Examining one day the reserve specimens roughly set on the storage shelves in a rear room of the museum, my eye was caught by an odd picture in one of the old papers spread beneath the stones. It was the Sydney Bulletin I have mentioned, for my friend had wide affiliations in all conceivable foreign parts; and the picture was a half-tone cut of a hideous stone image almost identical with that which Legrasse had found in the swamp. +. +
1 +

If heaven ever wishes to grant me a boon, it will be a total effacing of the results of a mere chance which fixed my eye on a certain stray piece of shelf-paper. It was nothing on which I would naturally have stumbled in the course of my daily round, for it was an old number of an Australian journal, the Sydney Bulletin for April 18, 1925. It had escaped even the cutting bureau which had at the time of its issuance been avidly collecting material for my uncle's research.

+
+

I had largely given over my inquiries into what Professor Angell called the "Cthulhu Cult", and was visiting a learned friend in Paterson, New Jersey; the curator of a local museum and a mineralogist of note. Examining one day the reserve specimens roughly set on the storage shelves in a rear room of the museum, my eye was caught by an odd picture in one of the old papers spread beneath the stones. It was the Sydney Bulletin I have mentioned, for my friend had wide affiliations in all conceivable foreign parts; and the picture was a half-tone cut of a hideous stone image almost identical with that which Legrasse had found in the swamp.

+```````````````````````````````` + + +A footnote will end on a single line break. Note that this behavior changed in version +0.1.0, to become more like hoedown. See issue #21. + +```````````````````````````````` example +[^ipsum]: How much wood would a woodchuck chuck. + +If a woodchuck could chuck wood. + + +# Forms of entertainment that aren't childish +. +
1 +

How much wood would a woodchuck chuck.

+
+

If a woodchuck could chuck wood.

+

Forms of entertainment that aren't childish

+```````````````````````````````` + + +A footnote will also break if it's inside another container. + +```````````````````````````````` example +> He's also really stupid. [^why] +> +> [^why]: Because your mamma! + +As such, we can guarantee that the non-childish forms of entertainment are probably more entertaining to adults, since, having had a whole childhood doing the childish ones, the non-childish ones are merely the ones that haven't gotten boring yet. +. +
+

He's also really stupid. 1

+
1 +

Because your mamma!

+
+
+

As such, we can guarantee that the non-childish forms of entertainment are probably more entertaining to adults, since, having had a whole childhood doing the childish ones, the non-childish ones are merely the ones that haven't gotten boring yet.

+```````````````````````````````` + + +As a special exception, footnotes cannot be nested directly inside each other. + +```````````````````````````````` example +Nested footnotes are considered poor style. [^a] [^xkcd] + +[^a]: This does not mean that footnotes cannot reference each other. [^b] + +[^b]: This means that a footnote definition cannot be directly inside another footnote definition. +> This means that a footnote cannot be directly inside another footnote's body. [^e] +> +> [^e]: They can, however, be inside anything else. + +[^xkcd]: [The other kind of nested footnote is, however, considered poor style.](https://xkcd.com/1208/) +. +

Nested footnotes are considered poor style. 1 2

+
1 +

This does not mean that footnotes cannot reference each other. 3

+
+
3 +

This means that a footnote definition cannot be directly inside another footnote definition.

+
+

This means that a footnote cannot be directly inside another footnote's body. 4

+
4 +

They can, however, be inside anything else.

+
+
+
+ +```````````````````````````````` + +They do need one line between each other. + +```````````````````````````````` example +[^Doh] Ray Me Fa So La Te Do! [^1] + +[^Doh]: I know. Wrong Doe. And it won't render right. +[^1]: Common for people practicing music. +. +

1 Ray Me Fa So La Te Do! 2

+
1 +

I know. Wrong Doe. And it won't render right. +2: Common for people practicing music.

+
+```````````````````````````````` diff --git a/vendor/pulldown-cmark/specs/regression.txt b/vendor/pulldown-cmark/specs/regression.txt new file mode 100644 index 0000000000..63c4188150 --- /dev/null +++ b/vendor/pulldown-cmark/specs/regression.txt @@ -0,0 +1,415 @@ +Run this with `cargo run -- -T -F -s specs/regression.txt`. + +Regression tests for issues on the github issue tracker. + +ISSUE #162 + +```````````````````````````````` example +
Testing 1..2..3.. + +This is a test of the details element. + +
+. +
Testing 1..2..3.. +

This is a test of the details element.

+
+```````````````````````````````` + +ISSUE #133 + +```````````````````````````````` example +see the [many] [articles] [on] [QuickCheck]. + +[many]: https://medium.com/@jlouis666/quickcheck-advice-c357efb4e7e6 +[articles]: http://www.quviq.com/products/erlang-quickcheck/ +[on]: https://wiki.haskell.org/Introduction_to_QuickCheck1 +[QuickCheck]: https://hackage.haskell.org/package/QuickCheck +. +

see the + many + articles + on + QuickCheck. +

+```````````````````````````````` + +ISSUE #135 + +```````````````````````````````` example +[![debug-stub-derive on crates.io][cratesio-image]][cratesio] +[![debug-stub-derive on docs.rs][docsrs-image]][docsrs] + +[cratesio-image]: https://img.shields.io/crates/v/debug_stub_derive.svg +[cratesio]: https://crates.io/crates/debug_stub_derive +[docsrs-image]: https://docs.rs/debug_stub_derive/badge.svg?version=0.3.0 +[docsrs]: https://docs.rs/debug_stub_derive/0.3.0/ +. +

debug-stub-derive on crates.io +debug-stub-derive on docs.rs

+```````````````````````````````` + +ISSUE #145 + +```````````````````````````````` example +| Title A | Title B | +| --------- | --------- | +| Content | Content | + +| Title A | Title B | Title C | Title D | +| --------- | --------- | --------- | ---------:| +| Content | Content | Conent | Content | +. + + +
Title A Title B
Content Content
+ + +
Title A Title B Title C Title D
Content Content Conent Content
+```````````````````````````````` + +Unicode punctuation and emphasis + +```````````````````````````````` example +foo§__(bar)__ +. +

foo§(bar)

+```````````````````````````````` + +ISSUE #213 + +```````````````````````````````` example + hello +. +

https://example.com hello

+ +```````````````````````````````` + +ISSUE #43 (1) + +```````````````````````````````` example +[foo][bar] + + +[bar]: a +. +

foo

+ +```````````````````````````````` + +ISSUE #43 (2) + +```````````````````````````````` example + +- **foo** (u8, u8) + + make something + +- **bar** (u16, u16) + + make something +. + +
    +
  • +

    foo (u8, u8)

    +

    make something

    +
  • +
  • +

    bar (u16, u16)

    +

    make something

    +
  • +
+ +```````````````````````````````` + +ISSUE #239 + +```````````````````````````````` example +[` +i8 +`]( +../../../std/primitive.i8.html +) +. +

i8

+```````````````````````````````` + +ISSUE #270 + +```````````````````````````````` example +[a] + +[a]: /url (title\\*) +. +

a

+```````````````````````````````` + +```````````````````````````````` example +[a] + +[a]: /url (title\)) +. +

a

+```````````````````````````````` + +```````````````````````````````` example +[a] + +[a]: /url (title)) +. +

[a]

+

[a]: /url (title))

+```````````````````````````````` + +Inline HTML + +```````````````````````````````` example +a +. +

a <?php this is not a valid processing tag

+

b

+```````````````````````````````` + +ISSUE #288 + +```````````````````````````````` example +[a]: u\ +foo +. +

foo

+```````````````````````````````` + +ISSUE #314 + +```````````````````````````````` example +\`foo` +. +

`foo`

+```````````````````````````````` + +ISSUE #317 + +```````````````````````````````` example +foo\\ +bar +. +

foo\ +bar

+```````````````````````````````` + +ISSUE #315 + +```````````````````````````````` example +1\. foo + +1\) bar +. +

1. foo

+

1) bar

+```````````````````````````````` + +ISSUE #294 + +```````````````````````````````` example +1... + +1.2.3. + +1 2 3 . + +1.|2.-3. + +1)2)3) +. +

1...

+

1.2.3.

+

1 2 3 .

+

1.|2.-3.

+

1)2)3)

+```````````````````````````````` + +ISSUE #296 + +```````````````````````````````` example +[](<<>) +. +

[](<<>)

+```````````````````````````````` + +BACKTICKS + +```````````````````````````````` example +\``foo``bar` +. +

`foo``bar

+```````````````````````````````` + +MORE BACKTICKS + +```````````````````````````````` example +\\`foo` +. +

\foo

+```````````````````````````````` + +ISSUE #300 + +```````````````````````````````` example +[\\]: x + +YOLO +. +

YOLO

+```````````````````````````````` + +ISSUE #293 + +```````````````````````````````` example +lorem ipsum +A | B +---|--- +foo | bar +. +

lorem ipsum +A | B +---|--- +foo | bar

+```````````````````````````````` + +ISSUE #318 (note the trailing whitespace on the first line) + +```````````````````````````````` example +foo|bar +---|--- +foo|bar +. + + +
foobar
foobar
+```````````````````````````````` + +ISSUE #318 + +```````````````````````````````` example +foo|bar\\ +---|--- +foo|bar +. + + +
foobar\
foobar
+```````````````````````````````` + +ISSUE #328 + +```````````````````````````````` example +[](url) +. +

+```````````````````````````````` + +ISSUE #328 + +```````````````````````````````` example +[bar](url) +. +

bar

+```````````````````````````````` + +ISSUE #328 + +```````````````````````````````` example +![](http://example.com/logo.png) +. +

http://example.com

+```````````````````````````````` + +ISSUE #328 + +```````````````````````````````` example +[ ](url) +. +

http://one http://two

+```````````````````````````````` + +ISSUE #330 (NOTE THERE IS A SPACE ON THE LINE BETWEEN THE TABLE AND THE PARAGRAPH!) + +```````````````````````````````` example +Markdown | Less | Pretty +--- | --- | --- + +some text +. + +
Markdown Less Pretty
+

some text

+```````````````````````````````` + +ISSUE #331 + +```````````````````````````````` example +1. > foo +2. > +. +
    +
  1. +
    +

    foo

    +
    +
  2. +
  3. +
    +
    +
  4. +
+```````````````````````````````` + +ISSUE #326 + +```````````````````````````````` example +[ +x + +]: f +. +

[ +x

+

]: f

+```````````````````````````````` + +ISSUE #295 + +```````````````````````````````` example +[foo]: +. +

[foo]:

+```````````````````````````````` + +ISSUE #298 (not yet fixed) + +```````````````````````````````` DISABLED example +> [foo +> bar]: /url +> +> [foo bar] +. +
+

foo bar

+
+```````````````````````````````` + +TABLES IN BROKEN CONTAINERS + +```````````````````````````````` example +> foo | bar +> --- | --- +yolo | swag +. +
+
foobar
+
+

yolo | swag

+```````````````````````````````` diff --git a/vendor/pulldown-cmark/specs/table.txt b/vendor/pulldown-cmark/specs/table.txt new file mode 100644 index 0000000000..5e4d4b39f5 --- /dev/null +++ b/vendor/pulldown-cmark/specs/table.txt @@ -0,0 +1,217 @@ +Run this with `cargo run -- -T -s specs/table.txt`. + +Adapted from original by replacing `td` elements by `th` elements inside `thead` +and disabling the third test. + +False match +=========== + +```````````````````````````````` example +Test header +----------- +. +

Test header

+```````````````````````````````` + + +True match +========== + +```````````````````````````````` example +Test|Table +----|----- +. + +
TestTable
+```````````````````````````````` + + +Actual rows in it +================= + +```````````````````````````````` DISABLED example +Test|Table +----|----- +Test row +Test|2 + +Test ending +. + + + +
TestTable
Test row
Test2
+

Test ending

+```````````````````````````````` + + +Test with quote +=============== + +```````````````````````````````` example +> Test | Table +> ------|------ +> Row 1 | Every +> Row 2 | Day +> +> Paragraph +. +
+ + + +
Test Table
Row 1 Every
Row 2 Day
+

Paragraph

+
+```````````````````````````````` + + +Test with list +============== + +```````````````````````````````` example + 1. First entry + 2. Second entry + + Col 1|Col 2 + -|- + Row 1|Part 2 + Row 2|Part 2 +. +
    +
  1. +

    First entry

    +
  2. +
  3. +

    Second entry

    + + + +
    Col 1Col 2
    Row 1Part 2
    Row 2Part 2
    +
  4. +
+```````````````````````````````` + + +Test with border +================ + +```````````````````````````````` example +|Col 1|Col 2| +|-----|-----| +|R1C1 |R1C2 | +|R2C1 |R2C2 | +. + + + +
Col 1Col 2
R1C1 R1C2
R2C1 R2C2
+```````````````````````````````` + + +Test with empty cells +===================== + +Empty cells should work. + +```````````````````````````````` example +| Col 1 | Col 2 | +|-------|-------| +| | | +| | | +. + + + +
Col 1 Col 2
+```````````````````````````````` + +... and properly mix with filled cells. + +```````````````````````````````` example +| Col 1 | Col 2 | +|-------|-------| +| x | | +| | x | +. + + + +
Col 1 Col 2
x
x
+```````````````````````````````` + + +Table with UTF-8 +================ + +Basic example. + +```````````````````````````````` example +|Col 1|Col 2| +|-----|-----| +|✓ |✓ | +|✓ |✓ | +. + + + +
Col 1Col 2
✓ ✓
✓ ✓
+```````````````````````````````` + +More advanced example. + +```````````````````````````````` example +| Target | std |rustc|cargo| notes | +|-------------------------------|-----|-----|-----|----------------------------| +| `x86_64-unknown-linux-musl` | ✓ | | | 64-bit Linux with MUSL | +| `arm-linux-androideabi` | ✓ | | | ARM Android | +| `arm-unknown-linux-gnueabi` | ✓ | ✓ | | ARM Linux (2.6.18+) | +| `arm-unknown-linux-gnueabihf` | ✓ | ✓ | | ARM Linux (2.6.18+) | +| `aarch64-unknown-linux-gnu` | ✓ | | | ARM64 Linux (2.6.18+) | +| `mips-unknown-linux-gnu` | ✓ | | | MIPS Linux (2.6.18+) | +| `mipsel-unknown-linux-gnu` | ✓ | | | MIPS (LE) Linux (2.6.18+) | +. + + + + + + + + +
Target std rustccargo notes
x86_64-unknown-linux-musl ✓ 64-bit Linux with MUSL
arm-linux-androideabi ✓ ARM Android
arm-unknown-linux-gnueabi ✓ ✓ ARM Linux (2.6.18+)
arm-unknown-linux-gnueabihf ✓ ✓ ARM Linux (2.6.18+)
aarch64-unknown-linux-gnu ✓ ARM64 Linux (2.6.18+)
mips-unknown-linux-gnu ✓ MIPS Linux (2.6.18+)
mipsel-unknown-linux-gnu ✓ MIPS (LE) Linux (2.6.18+)
+```````````````````````````````` + +Hiragana-containing pseudo-table. + +```````````````````````````````` example +|-|-| +|ぃ|い| +. +

|-|-| +|ぃ|い|

+```````````````````````````````` + +Hiragana-containing actual table. + +```````````````````````````````` example +|ぁ|ぃ| +|-|-| +|ぃ|ぃ| +. + + +
ぁぃ
ぃぃ
+```````````````````````````````` + +Test russian symbols. + +```````````````````````````````` example +|Колонка 1|Колонка 2| +|---------|---------| +|Ячейка 1 |Ячейка 2 | +. + + +
Колонка 1Колонка 2
Ячейка 1 Ячейка 2
+```````````````````````````````` diff --git a/vendor/pulldown-cmark/src/entities.rs b/vendor/pulldown-cmark/src/entities.rs new file mode 100644 index 0000000000..fc10a8f568 --- /dev/null +++ b/vendor/pulldown-cmark/src/entities.rs @@ -0,0 +1,2156 @@ +// Copyright 2015 Google Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +//! Expansions of HTML5 entities + +// Autogenerated by mk_entities.py + +const ENTITIES: [(&[u8], &str); 2125] = [ + (b"AElig", "\u{00C6}"), + (b"AMP", "\u{0026}"), + (b"Aacute", "\u{00C1}"), + (b"Abreve", "\u{0102}"), + (b"Acirc", "\u{00C2}"), + (b"Acy", "\u{0410}"), + (b"Afr", "\u{1D504}"), + (b"Agrave", "\u{00C0}"), + (b"Alpha", "\u{0391}"), + (b"Amacr", "\u{0100}"), + (b"And", "\u{2A53}"), + (b"Aogon", "\u{0104}"), + (b"Aopf", "\u{1D538}"), + (b"ApplyFunction", "\u{2061}"), + (b"Aring", "\u{00C5}"), + (b"Ascr", "\u{1D49C}"), + (b"Assign", "\u{2254}"), + (b"Atilde", "\u{00C3}"), + (b"Auml", "\u{00C4}"), + (b"Backslash", "\u{2216}"), + (b"Barv", "\u{2AE7}"), + (b"Barwed", "\u{2306}"), + (b"Bcy", "\u{0411}"), + (b"Because", "\u{2235}"), + (b"Bernoullis", "\u{212C}"), + (b"Beta", "\u{0392}"), + (b"Bfr", "\u{1D505}"), + (b"Bopf", "\u{1D539}"), + (b"Breve", "\u{02D8}"), + (b"Bscr", "\u{212C}"), + (b"Bumpeq", "\u{224E}"), + (b"CHcy", "\u{0427}"), + (b"COPY", "\u{00A9}"), + (b"Cacute", "\u{0106}"), + (b"Cap", "\u{22D2}"), + (b"CapitalDifferentialD", "\u{2145}"), + (b"Cayleys", "\u{212D}"), + (b"Ccaron", "\u{010C}"), + (b"Ccedil", "\u{00C7}"), + (b"Ccirc", "\u{0108}"), + (b"Cconint", "\u{2230}"), + (b"Cdot", "\u{010A}"), + (b"Cedilla", "\u{00B8}"), + (b"CenterDot", "\u{00B7}"), + (b"Cfr", "\u{212D}"), + (b"Chi", "\u{03A7}"), + (b"CircleDot", "\u{2299}"), + (b"CircleMinus", "\u{2296}"), + (b"CirclePlus", "\u{2295}"), + (b"CircleTimes", "\u{2297}"), + (b"ClockwiseContourIntegral", "\u{2232}"), + (b"CloseCurlyDoubleQuote", "\u{201D}"), + (b"CloseCurlyQuote", "\u{2019}"), + (b"Colon", "\u{2237}"), + (b"Colone", "\u{2A74}"), + (b"Congruent", "\u{2261}"), + (b"Conint", "\u{222F}"), + (b"ContourIntegral", "\u{222E}"), + (b"Copf", "\u{2102}"), + (b"Coproduct", "\u{2210}"), + (b"CounterClockwiseContourIntegral", "\u{2233}"), + (b"Cross", "\u{2A2F}"), + (b"Cscr", "\u{1D49E}"), + (b"Cup", "\u{22D3}"), + (b"CupCap", "\u{224D}"), + (b"DD", "\u{2145}"), + (b"DDotrahd", "\u{2911}"), + (b"DJcy", "\u{0402}"), + (b"DScy", "\u{0405}"), + (b"DZcy", "\u{040F}"), + (b"Dagger", "\u{2021}"), + (b"Darr", "\u{21A1}"), + (b"Dashv", "\u{2AE4}"), + (b"Dcaron", "\u{010E}"), + (b"Dcy", "\u{0414}"), + (b"Del", "\u{2207}"), + (b"Delta", "\u{0394}"), + (b"Dfr", "\u{1D507}"), + (b"DiacriticalAcute", "\u{00B4}"), + (b"DiacriticalDot", "\u{02D9}"), + (b"DiacriticalDoubleAcute", "\u{02DD}"), + (b"DiacriticalGrave", "\u{0060}"), + (b"DiacriticalTilde", "\u{02DC}"), + (b"Diamond", "\u{22C4}"), + (b"DifferentialD", "\u{2146}"), + (b"Dopf", "\u{1D53B}"), + (b"Dot", "\u{00A8}"), + (b"DotDot", "\u{20DC}"), + (b"DotEqual", "\u{2250}"), + (b"DoubleContourIntegral", "\u{222F}"), + (b"DoubleDot", "\u{00A8}"), + (b"DoubleDownArrow", "\u{21D3}"), + (b"DoubleLeftArrow", "\u{21D0}"), + (b"DoubleLeftRightArrow", "\u{21D4}"), + (b"DoubleLeftTee", "\u{2AE4}"), + (b"DoubleLongLeftArrow", "\u{27F8}"), + (b"DoubleLongLeftRightArrow", "\u{27FA}"), + (b"DoubleLongRightArrow", "\u{27F9}"), + (b"DoubleRightArrow", "\u{21D2}"), + (b"DoubleRightTee", "\u{22A8}"), + (b"DoubleUpArrow", "\u{21D1}"), + (b"DoubleUpDownArrow", "\u{21D5}"), + (b"DoubleVerticalBar", "\u{2225}"), + (b"DownArrow", "\u{2193}"), + (b"DownArrowBar", "\u{2913}"), + (b"DownArrowUpArrow", "\u{21F5}"), + (b"DownBreve", "\u{0311}"), + (b"DownLeftRightVector", "\u{2950}"), + (b"DownLeftTeeVector", "\u{295E}"), + (b"DownLeftVector", "\u{21BD}"), + (b"DownLeftVectorBar", "\u{2956}"), + (b"DownRightTeeVector", "\u{295F}"), + (b"DownRightVector", "\u{21C1}"), + (b"DownRightVectorBar", "\u{2957}"), + (b"DownTee", "\u{22A4}"), + (b"DownTeeArrow", "\u{21A7}"), + (b"Downarrow", "\u{21D3}"), + (b"Dscr", "\u{1D49F}"), + (b"Dstrok", "\u{0110}"), + (b"ENG", "\u{014A}"), + (b"ETH", "\u{00D0}"), + (b"Eacute", "\u{00C9}"), + (b"Ecaron", "\u{011A}"), + (b"Ecirc", "\u{00CA}"), + (b"Ecy", "\u{042D}"), + (b"Edot", "\u{0116}"), + (b"Efr", "\u{1D508}"), + (b"Egrave", "\u{00C8}"), + (b"Element", "\u{2208}"), + (b"Emacr", "\u{0112}"), + (b"EmptySmallSquare", "\u{25FB}"), + (b"EmptyVerySmallSquare", "\u{25AB}"), + (b"Eogon", "\u{0118}"), + (b"Eopf", "\u{1D53C}"), + (b"Epsilon", "\u{0395}"), + (b"Equal", "\u{2A75}"), + (b"EqualTilde", "\u{2242}"), + (b"Equilibrium", "\u{21CC}"), + (b"Escr", "\u{2130}"), + (b"Esim", "\u{2A73}"), + (b"Eta", "\u{0397}"), + (b"Euml", "\u{00CB}"), + (b"Exists", "\u{2203}"), + (b"ExponentialE", "\u{2147}"), + (b"Fcy", "\u{0424}"), + (b"Ffr", "\u{1D509}"), + (b"FilledSmallSquare", "\u{25FC}"), + (b"FilledVerySmallSquare", "\u{25AA}"), + (b"Fopf", "\u{1D53D}"), + (b"ForAll", "\u{2200}"), + (b"Fouriertrf", "\u{2131}"), + (b"Fscr", "\u{2131}"), + (b"GJcy", "\u{0403}"), + (b"GT", "\u{003E}"), + (b"Gamma", "\u{0393}"), + (b"Gammad", "\u{03DC}"), + (b"Gbreve", "\u{011E}"), + (b"Gcedil", "\u{0122}"), + (b"Gcirc", "\u{011C}"), + (b"Gcy", "\u{0413}"), + (b"Gdot", "\u{0120}"), + (b"Gfr", "\u{1D50A}"), + (b"Gg", "\u{22D9}"), + (b"Gopf", "\u{1D53E}"), + (b"GreaterEqual", "\u{2265}"), + (b"GreaterEqualLess", "\u{22DB}"), + (b"GreaterFullEqual", "\u{2267}"), + (b"GreaterGreater", "\u{2AA2}"), + (b"GreaterLess", "\u{2277}"), + (b"GreaterSlantEqual", "\u{2A7E}"), + (b"GreaterTilde", "\u{2273}"), + (b"Gscr", "\u{1D4A2}"), + (b"Gt", "\u{226B}"), + (b"HARDcy", "\u{042A}"), + (b"Hacek", "\u{02C7}"), + (b"Hat", "\u{005E}"), + (b"Hcirc", "\u{0124}"), + (b"Hfr", "\u{210C}"), + (b"HilbertSpace", "\u{210B}"), + (b"Hopf", "\u{210D}"), + (b"HorizontalLine", "\u{2500}"), + (b"Hscr", "\u{210B}"), + (b"Hstrok", "\u{0126}"), + (b"HumpDownHump", "\u{224E}"), + (b"HumpEqual", "\u{224F}"), + (b"IEcy", "\u{0415}"), + (b"IJlig", "\u{0132}"), + (b"IOcy", "\u{0401}"), + (b"Iacute", "\u{00CD}"), + (b"Icirc", "\u{00CE}"), + (b"Icy", "\u{0418}"), + (b"Idot", "\u{0130}"), + (b"Ifr", "\u{2111}"), + (b"Igrave", "\u{00CC}"), + (b"Im", "\u{2111}"), + (b"Imacr", "\u{012A}"), + (b"ImaginaryI", "\u{2148}"), + (b"Implies", "\u{21D2}"), + (b"Int", "\u{222C}"), + (b"Integral", "\u{222B}"), + (b"Intersection", "\u{22C2}"), + (b"InvisibleComma", "\u{2063}"), + (b"InvisibleTimes", "\u{2062}"), + (b"Iogon", "\u{012E}"), + (b"Iopf", "\u{1D540}"), + (b"Iota", "\u{0399}"), + (b"Iscr", "\u{2110}"), + (b"Itilde", "\u{0128}"), + (b"Iukcy", "\u{0406}"), + (b"Iuml", "\u{00CF}"), + (b"Jcirc", "\u{0134}"), + (b"Jcy", "\u{0419}"), + (b"Jfr", "\u{1D50D}"), + (b"Jopf", "\u{1D541}"), + (b"Jscr", "\u{1D4A5}"), + (b"Jsercy", "\u{0408}"), + (b"Jukcy", "\u{0404}"), + (b"KHcy", "\u{0425}"), + (b"KJcy", "\u{040C}"), + (b"Kappa", "\u{039A}"), + (b"Kcedil", "\u{0136}"), + (b"Kcy", "\u{041A}"), + (b"Kfr", "\u{1D50E}"), + (b"Kopf", "\u{1D542}"), + (b"Kscr", "\u{1D4A6}"), + (b"LJcy", "\u{0409}"), + (b"LT", "\u{003C}"), + (b"Lacute", "\u{0139}"), + (b"Lambda", "\u{039B}"), + (b"Lang", "\u{27EA}"), + (b"Laplacetrf", "\u{2112}"), + (b"Larr", "\u{219E}"), + (b"Lcaron", "\u{013D}"), + (b"Lcedil", "\u{013B}"), + (b"Lcy", "\u{041B}"), + (b"LeftAngleBracket", "\u{27E8}"), + (b"LeftArrow", "\u{2190}"), + (b"LeftArrowBar", "\u{21E4}"), + (b"LeftArrowRightArrow", "\u{21C6}"), + (b"LeftCeiling", "\u{2308}"), + (b"LeftDoubleBracket", "\u{27E6}"), + (b"LeftDownTeeVector", "\u{2961}"), + (b"LeftDownVector", "\u{21C3}"), + (b"LeftDownVectorBar", "\u{2959}"), + (b"LeftFloor", "\u{230A}"), + (b"LeftRightArrow", "\u{2194}"), + (b"LeftRightVector", "\u{294E}"), + (b"LeftTee", "\u{22A3}"), + (b"LeftTeeArrow", "\u{21A4}"), + (b"LeftTeeVector", "\u{295A}"), + (b"LeftTriangle", "\u{22B2}"), + (b"LeftTriangleBar", "\u{29CF}"), + (b"LeftTriangleEqual", "\u{22B4}"), + (b"LeftUpDownVector", "\u{2951}"), + (b"LeftUpTeeVector", "\u{2960}"), + (b"LeftUpVector", "\u{21BF}"), + (b"LeftUpVectorBar", "\u{2958}"), + (b"LeftVector", "\u{21BC}"), + (b"LeftVectorBar", "\u{2952}"), + (b"Leftarrow", "\u{21D0}"), + (b"Leftrightarrow", "\u{21D4}"), + (b"LessEqualGreater", "\u{22DA}"), + (b"LessFullEqual", "\u{2266}"), + (b"LessGreater", "\u{2276}"), + (b"LessLess", "\u{2AA1}"), + (b"LessSlantEqual", "\u{2A7D}"), + (b"LessTilde", "\u{2272}"), + (b"Lfr", "\u{1D50F}"), + (b"Ll", "\u{22D8}"), + (b"Lleftarrow", "\u{21DA}"), + (b"Lmidot", "\u{013F}"), + (b"LongLeftArrow", "\u{27F5}"), + (b"LongLeftRightArrow", "\u{27F7}"), + (b"LongRightArrow", "\u{27F6}"), + (b"Longleftarrow", "\u{27F8}"), + (b"Longleftrightarrow", "\u{27FA}"), + (b"Longrightarrow", "\u{27F9}"), + (b"Lopf", "\u{1D543}"), + (b"LowerLeftArrow", "\u{2199}"), + (b"LowerRightArrow", "\u{2198}"), + (b"Lscr", "\u{2112}"), + (b"Lsh", "\u{21B0}"), + (b"Lstrok", "\u{0141}"), + (b"Lt", "\u{226A}"), + (b"Map", "\u{2905}"), + (b"Mcy", "\u{041C}"), + (b"MediumSpace", "\u{205F}"), + (b"Mellintrf", "\u{2133}"), + (b"Mfr", "\u{1D510}"), + (b"MinusPlus", "\u{2213}"), + (b"Mopf", "\u{1D544}"), + (b"Mscr", "\u{2133}"), + (b"Mu", "\u{039C}"), + (b"NJcy", "\u{040A}"), + (b"Nacute", "\u{0143}"), + (b"Ncaron", "\u{0147}"), + (b"Ncedil", "\u{0145}"), + (b"Ncy", "\u{041D}"), + (b"NegativeMediumSpace", "\u{200B}"), + (b"NegativeThickSpace", "\u{200B}"), + (b"NegativeThinSpace", "\u{200B}"), + (b"NegativeVeryThinSpace", "\u{200B}"), + (b"NestedGreaterGreater", "\u{226B}"), + (b"NestedLessLess", "\u{226A}"), + (b"NewLine", "\u{000A}"), + (b"Nfr", "\u{1D511}"), + (b"NoBreak", "\u{2060}"), + (b"NonBreakingSpace", "\u{00A0}"), + (b"Nopf", "\u{2115}"), + (b"Not", "\u{2AEC}"), + (b"NotCongruent", "\u{2262}"), + (b"NotCupCap", "\u{226D}"), + (b"NotDoubleVerticalBar", "\u{2226}"), + (b"NotElement", "\u{2209}"), + (b"NotEqual", "\u{2260}"), + (b"NotEqualTilde", "\u{2242}\u{0338}"), + (b"NotExists", "\u{2204}"), + (b"NotGreater", "\u{226F}"), + (b"NotGreaterEqual", "\u{2271}"), + (b"NotGreaterFullEqual", "\u{2267}\u{0338}"), + (b"NotGreaterGreater", "\u{226B}\u{0338}"), + (b"NotGreaterLess", "\u{2279}"), + (b"NotGreaterSlantEqual", "\u{2A7E}\u{0338}"), + (b"NotGreaterTilde", "\u{2275}"), + (b"NotHumpDownHump", "\u{224E}\u{0338}"), + (b"NotHumpEqual", "\u{224F}\u{0338}"), + (b"NotLeftTriangle", "\u{22EA}"), + (b"NotLeftTriangleBar", "\u{29CF}\u{0338}"), + (b"NotLeftTriangleEqual", "\u{22EC}"), + (b"NotLess", "\u{226E}"), + (b"NotLessEqual", "\u{2270}"), + (b"NotLessGreater", "\u{2278}"), + (b"NotLessLess", "\u{226A}\u{0338}"), + (b"NotLessSlantEqual", "\u{2A7D}\u{0338}"), + (b"NotLessTilde", "\u{2274}"), + (b"NotNestedGreaterGreater", "\u{2AA2}\u{0338}"), + (b"NotNestedLessLess", "\u{2AA1}\u{0338}"), + (b"NotPrecedes", "\u{2280}"), + (b"NotPrecedesEqual", "\u{2AAF}\u{0338}"), + (b"NotPrecedesSlantEqual", "\u{22E0}"), + (b"NotReverseElement", "\u{220C}"), + (b"NotRightTriangle", "\u{22EB}"), + (b"NotRightTriangleBar", "\u{29D0}\u{0338}"), + (b"NotRightTriangleEqual", "\u{22ED}"), + (b"NotSquareSubset", "\u{228F}\u{0338}"), + (b"NotSquareSubsetEqual", "\u{22E2}"), + (b"NotSquareSuperset", "\u{2290}\u{0338}"), + (b"NotSquareSupersetEqual", "\u{22E3}"), + (b"NotSubset", "\u{2282}\u{20D2}"), + (b"NotSubsetEqual", "\u{2288}"), + (b"NotSucceeds", "\u{2281}"), + (b"NotSucceedsEqual", "\u{2AB0}\u{0338}"), + (b"NotSucceedsSlantEqual", "\u{22E1}"), + (b"NotSucceedsTilde", "\u{227F}\u{0338}"), + (b"NotSuperset", "\u{2283}\u{20D2}"), + (b"NotSupersetEqual", "\u{2289}"), + (b"NotTilde", "\u{2241}"), + (b"NotTildeEqual", "\u{2244}"), + (b"NotTildeFullEqual", "\u{2247}"), + (b"NotTildeTilde", "\u{2249}"), + (b"NotVerticalBar", "\u{2224}"), + (b"Nscr", "\u{1D4A9}"), + (b"Ntilde", "\u{00D1}"), + (b"Nu", "\u{039D}"), + (b"OElig", "\u{0152}"), + (b"Oacute", "\u{00D3}"), + (b"Ocirc", "\u{00D4}"), + (b"Ocy", "\u{041E}"), + (b"Odblac", "\u{0150}"), + (b"Ofr", "\u{1D512}"), + (b"Ograve", "\u{00D2}"), + (b"Omacr", "\u{014C}"), + (b"Omega", "\u{03A9}"), + (b"Omicron", "\u{039F}"), + (b"Oopf", "\u{1D546}"), + (b"OpenCurlyDoubleQuote", "\u{201C}"), + (b"OpenCurlyQuote", "\u{2018}"), + (b"Or", "\u{2A54}"), + (b"Oscr", "\u{1D4AA}"), + (b"Oslash", "\u{00D8}"), + (b"Otilde", "\u{00D5}"), + (b"Otimes", "\u{2A37}"), + (b"Ouml", "\u{00D6}"), + (b"OverBar", "\u{203E}"), + (b"OverBrace", "\u{23DE}"), + (b"OverBracket", "\u{23B4}"), + (b"OverParenthesis", "\u{23DC}"), + (b"PartialD", "\u{2202}"), + (b"Pcy", "\u{041F}"), + (b"Pfr", "\u{1D513}"), + (b"Phi", "\u{03A6}"), + (b"Pi", "\u{03A0}"), + (b"PlusMinus", "\u{00B1}"), + (b"Poincareplane", "\u{210C}"), + (b"Popf", "\u{2119}"), + (b"Pr", "\u{2ABB}"), + (b"Precedes", "\u{227A}"), + (b"PrecedesEqual", "\u{2AAF}"), + (b"PrecedesSlantEqual", "\u{227C}"), + (b"PrecedesTilde", "\u{227E}"), + (b"Prime", "\u{2033}"), + (b"Product", "\u{220F}"), + (b"Proportion", "\u{2237}"), + (b"Proportional", "\u{221D}"), + (b"Pscr", "\u{1D4AB}"), + (b"Psi", "\u{03A8}"), + (b"QUOT", "\u{0022}"), + (b"Qfr", "\u{1D514}"), + (b"Qopf", "\u{211A}"), + (b"Qscr", "\u{1D4AC}"), + (b"RBarr", "\u{2910}"), + (b"REG", "\u{00AE}"), + (b"Racute", "\u{0154}"), + (b"Rang", "\u{27EB}"), + (b"Rarr", "\u{21A0}"), + (b"Rarrtl", "\u{2916}"), + (b"Rcaron", "\u{0158}"), + (b"Rcedil", "\u{0156}"), + (b"Rcy", "\u{0420}"), + (b"Re", "\u{211C}"), + (b"ReverseElement", "\u{220B}"), + (b"ReverseEquilibrium", "\u{21CB}"), + (b"ReverseUpEquilibrium", "\u{296F}"), + (b"Rfr", "\u{211C}"), + (b"Rho", "\u{03A1}"), + (b"RightAngleBracket", "\u{27E9}"), + (b"RightArrow", "\u{2192}"), + (b"RightArrowBar", "\u{21E5}"), + (b"RightArrowLeftArrow", "\u{21C4}"), + (b"RightCeiling", "\u{2309}"), + (b"RightDoubleBracket", "\u{27E7}"), + (b"RightDownTeeVector", "\u{295D}"), + (b"RightDownVector", "\u{21C2}"), + (b"RightDownVectorBar", "\u{2955}"), + (b"RightFloor", "\u{230B}"), + (b"RightTee", "\u{22A2}"), + (b"RightTeeArrow", "\u{21A6}"), + (b"RightTeeVector", "\u{295B}"), + (b"RightTriangle", "\u{22B3}"), + (b"RightTriangleBar", "\u{29D0}"), + (b"RightTriangleEqual", "\u{22B5}"), + (b"RightUpDownVector", "\u{294F}"), + (b"RightUpTeeVector", "\u{295C}"), + (b"RightUpVector", "\u{21BE}"), + (b"RightUpVectorBar", "\u{2954}"), + (b"RightVector", "\u{21C0}"), + (b"RightVectorBar", "\u{2953}"), + (b"Rightarrow", "\u{21D2}"), + (b"Ropf", "\u{211D}"), + (b"RoundImplies", "\u{2970}"), + (b"Rrightarrow", "\u{21DB}"), + (b"Rscr", "\u{211B}"), + (b"Rsh", "\u{21B1}"), + (b"RuleDelayed", "\u{29F4}"), + (b"SHCHcy", "\u{0429}"), + (b"SHcy", "\u{0428}"), + (b"SOFTcy", "\u{042C}"), + (b"Sacute", "\u{015A}"), + (b"Sc", "\u{2ABC}"), + (b"Scaron", "\u{0160}"), + (b"Scedil", "\u{015E}"), + (b"Scirc", "\u{015C}"), + (b"Scy", "\u{0421}"), + (b"Sfr", "\u{1D516}"), + (b"ShortDownArrow", "\u{2193}"), + (b"ShortLeftArrow", "\u{2190}"), + (b"ShortRightArrow", "\u{2192}"), + (b"ShortUpArrow", "\u{2191}"), + (b"Sigma", "\u{03A3}"), + (b"SmallCircle", "\u{2218}"), + (b"Sopf", "\u{1D54A}"), + (b"Sqrt", "\u{221A}"), + (b"Square", "\u{25A1}"), + (b"SquareIntersection", "\u{2293}"), + (b"SquareSubset", "\u{228F}"), + (b"SquareSubsetEqual", "\u{2291}"), + (b"SquareSuperset", "\u{2290}"), + (b"SquareSupersetEqual", "\u{2292}"), + (b"SquareUnion", "\u{2294}"), + (b"Sscr", "\u{1D4AE}"), + (b"Star", "\u{22C6}"), + (b"Sub", "\u{22D0}"), + (b"Subset", "\u{22D0}"), + (b"SubsetEqual", "\u{2286}"), + (b"Succeeds", "\u{227B}"), + (b"SucceedsEqual", "\u{2AB0}"), + (b"SucceedsSlantEqual", "\u{227D}"), + (b"SucceedsTilde", "\u{227F}"), + (b"SuchThat", "\u{220B}"), + (b"Sum", "\u{2211}"), + (b"Sup", "\u{22D1}"), + (b"Superset", "\u{2283}"), + (b"SupersetEqual", "\u{2287}"), + (b"Supset", "\u{22D1}"), + (b"THORN", "\u{00DE}"), + (b"TRADE", "\u{2122}"), + (b"TSHcy", "\u{040B}"), + (b"TScy", "\u{0426}"), + (b"Tab", "\u{0009}"), + (b"Tau", "\u{03A4}"), + (b"Tcaron", "\u{0164}"), + (b"Tcedil", "\u{0162}"), + (b"Tcy", "\u{0422}"), + (b"Tfr", "\u{1D517}"), + (b"Therefore", "\u{2234}"), + (b"Theta", "\u{0398}"), + (b"ThickSpace", "\u{205F}\u{200A}"), + (b"ThinSpace", "\u{2009}"), + (b"Tilde", "\u{223C}"), + (b"TildeEqual", "\u{2243}"), + (b"TildeFullEqual", "\u{2245}"), + (b"TildeTilde", "\u{2248}"), + (b"Topf", "\u{1D54B}"), + (b"TripleDot", "\u{20DB}"), + (b"Tscr", "\u{1D4AF}"), + (b"Tstrok", "\u{0166}"), + (b"Uacute", "\u{00DA}"), + (b"Uarr", "\u{219F}"), + (b"Uarrocir", "\u{2949}"), + (b"Ubrcy", "\u{040E}"), + (b"Ubreve", "\u{016C}"), + (b"Ucirc", "\u{00DB}"), + (b"Ucy", "\u{0423}"), + (b"Udblac", "\u{0170}"), + (b"Ufr", "\u{1D518}"), + (b"Ugrave", "\u{00D9}"), + (b"Umacr", "\u{016A}"), + (b"UnderBar", "\u{005F}"), + (b"UnderBrace", "\u{23DF}"), + (b"UnderBracket", "\u{23B5}"), + (b"UnderParenthesis", "\u{23DD}"), + (b"Union", "\u{22C3}"), + (b"UnionPlus", "\u{228E}"), + (b"Uogon", "\u{0172}"), + (b"Uopf", "\u{1D54C}"), + (b"UpArrow", "\u{2191}"), + (b"UpArrowBar", "\u{2912}"), + (b"UpArrowDownArrow", "\u{21C5}"), + (b"UpDownArrow", "\u{2195}"), + (b"UpEquilibrium", "\u{296E}"), + (b"UpTee", "\u{22A5}"), + (b"UpTeeArrow", "\u{21A5}"), + (b"Uparrow", "\u{21D1}"), + (b"Updownarrow", "\u{21D5}"), + (b"UpperLeftArrow", "\u{2196}"), + (b"UpperRightArrow", "\u{2197}"), + (b"Upsi", "\u{03D2}"), + (b"Upsilon", "\u{03A5}"), + (b"Uring", "\u{016E}"), + (b"Uscr", "\u{1D4B0}"), + (b"Utilde", "\u{0168}"), + (b"Uuml", "\u{00DC}"), + (b"VDash", "\u{22AB}"), + (b"Vbar", "\u{2AEB}"), + (b"Vcy", "\u{0412}"), + (b"Vdash", "\u{22A9}"), + (b"Vdashl", "\u{2AE6}"), + (b"Vee", "\u{22C1}"), + (b"Verbar", "\u{2016}"), + (b"Vert", "\u{2016}"), + (b"VerticalBar", "\u{2223}"), + (b"VerticalLine", "\u{007C}"), + (b"VerticalSeparator", "\u{2758}"), + (b"VerticalTilde", "\u{2240}"), + (b"VeryThinSpace", "\u{200A}"), + (b"Vfr", "\u{1D519}"), + (b"Vopf", "\u{1D54D}"), + (b"Vscr", "\u{1D4B1}"), + (b"Vvdash", "\u{22AA}"), + (b"Wcirc", "\u{0174}"), + (b"Wedge", "\u{22C0}"), + (b"Wfr", "\u{1D51A}"), + (b"Wopf", "\u{1D54E}"), + (b"Wscr", "\u{1D4B2}"), + (b"Xfr", "\u{1D51B}"), + (b"Xi", "\u{039E}"), + (b"Xopf", "\u{1D54F}"), + (b"Xscr", "\u{1D4B3}"), + (b"YAcy", "\u{042F}"), + (b"YIcy", "\u{0407}"), + (b"YUcy", "\u{042E}"), + (b"Yacute", "\u{00DD}"), + (b"Ycirc", "\u{0176}"), + (b"Ycy", "\u{042B}"), + (b"Yfr", "\u{1D51C}"), + (b"Yopf", "\u{1D550}"), + (b"Yscr", "\u{1D4B4}"), + (b"Yuml", "\u{0178}"), + (b"ZHcy", "\u{0416}"), + (b"Zacute", "\u{0179}"), + (b"Zcaron", "\u{017D}"), + (b"Zcy", "\u{0417}"), + (b"Zdot", "\u{017B}"), + (b"ZeroWidthSpace", "\u{200B}"), + (b"Zeta", "\u{0396}"), + (b"Zfr", "\u{2128}"), + (b"Zopf", "\u{2124}"), + (b"Zscr", "\u{1D4B5}"), + (b"aacute", "\u{00E1}"), + (b"abreve", "\u{0103}"), + (b"ac", "\u{223E}"), + (b"acE", "\u{223E}\u{0333}"), + (b"acd", "\u{223F}"), + (b"acirc", "\u{00E2}"), + (b"acute", "\u{00B4}"), + (b"acy", "\u{0430}"), + (b"aelig", "\u{00E6}"), + (b"af", "\u{2061}"), + (b"afr", "\u{1D51E}"), + (b"agrave", "\u{00E0}"), + (b"alefsym", "\u{2135}"), + (b"aleph", "\u{2135}"), + (b"alpha", "\u{03B1}"), + (b"amacr", "\u{0101}"), + (b"amalg", "\u{2A3F}"), + (b"amp", "\u{0026}"), + (b"and", "\u{2227}"), + (b"andand", "\u{2A55}"), + (b"andd", "\u{2A5C}"), + (b"andslope", "\u{2A58}"), + (b"andv", "\u{2A5A}"), + (b"ang", "\u{2220}"), + (b"ange", "\u{29A4}"), + (b"angle", "\u{2220}"), + (b"angmsd", "\u{2221}"), + (b"angmsdaa", "\u{29A8}"), + (b"angmsdab", "\u{29A9}"), + (b"angmsdac", "\u{29AA}"), + (b"angmsdad", "\u{29AB}"), + (b"angmsdae", "\u{29AC}"), + (b"angmsdaf", "\u{29AD}"), + (b"angmsdag", "\u{29AE}"), + (b"angmsdah", "\u{29AF}"), + (b"angrt", "\u{221F}"), + (b"angrtvb", "\u{22BE}"), + (b"angrtvbd", "\u{299D}"), + (b"angsph", "\u{2222}"), + (b"angst", "\u{00C5}"), + (b"angzarr", "\u{237C}"), + (b"aogon", "\u{0105}"), + (b"aopf", "\u{1D552}"), + (b"ap", "\u{2248}"), + (b"apE", "\u{2A70}"), + (b"apacir", "\u{2A6F}"), + (b"ape", "\u{224A}"), + (b"apid", "\u{224B}"), + (b"apos", "\u{0027}"), + (b"approx", "\u{2248}"), + (b"approxeq", "\u{224A}"), + (b"aring", "\u{00E5}"), + (b"ascr", "\u{1D4B6}"), + (b"ast", "\u{002A}"), + (b"asymp", "\u{2248}"), + (b"asympeq", "\u{224D}"), + (b"atilde", "\u{00E3}"), + (b"auml", "\u{00E4}"), + (b"awconint", "\u{2233}"), + (b"awint", "\u{2A11}"), + (b"bNot", "\u{2AED}"), + (b"backcong", "\u{224C}"), + (b"backepsilon", "\u{03F6}"), + (b"backprime", "\u{2035}"), + (b"backsim", "\u{223D}"), + (b"backsimeq", "\u{22CD}"), + (b"barvee", "\u{22BD}"), + (b"barwed", "\u{2305}"), + (b"barwedge", "\u{2305}"), + (b"bbrk", "\u{23B5}"), + (b"bbrktbrk", "\u{23B6}"), + (b"bcong", "\u{224C}"), + (b"bcy", "\u{0431}"), + (b"bdquo", "\u{201E}"), + (b"becaus", "\u{2235}"), + (b"because", "\u{2235}"), + (b"bemptyv", "\u{29B0}"), + (b"bepsi", "\u{03F6}"), + (b"bernou", "\u{212C}"), + (b"beta", "\u{03B2}"), + (b"beth", "\u{2136}"), + (b"between", "\u{226C}"), + (b"bfr", "\u{1D51F}"), + (b"bigcap", "\u{22C2}"), + (b"bigcirc", "\u{25EF}"), + (b"bigcup", "\u{22C3}"), + (b"bigodot", "\u{2A00}"), + (b"bigoplus", "\u{2A01}"), + (b"bigotimes", "\u{2A02}"), + (b"bigsqcup", "\u{2A06}"), + (b"bigstar", "\u{2605}"), + (b"bigtriangledown", "\u{25BD}"), + (b"bigtriangleup", "\u{25B3}"), + (b"biguplus", "\u{2A04}"), + (b"bigvee", "\u{22C1}"), + (b"bigwedge", "\u{22C0}"), + (b"bkarow", "\u{290D}"), + (b"blacklozenge", "\u{29EB}"), + (b"blacksquare", "\u{25AA}"), + (b"blacktriangle", "\u{25B4}"), + (b"blacktriangledown", "\u{25BE}"), + (b"blacktriangleleft", "\u{25C2}"), + (b"blacktriangleright", "\u{25B8}"), + (b"blank", "\u{2423}"), + (b"blk12", "\u{2592}"), + (b"blk14", "\u{2591}"), + (b"blk34", "\u{2593}"), + (b"block", "\u{2588}"), + (b"bne", "\u{003D}\u{20E5}"), + (b"bnequiv", "\u{2261}\u{20E5}"), + (b"bnot", "\u{2310}"), + (b"bopf", "\u{1D553}"), + (b"bot", "\u{22A5}"), + (b"bottom", "\u{22A5}"), + (b"bowtie", "\u{22C8}"), + (b"boxDL", "\u{2557}"), + (b"boxDR", "\u{2554}"), + (b"boxDl", "\u{2556}"), + (b"boxDr", "\u{2553}"), + (b"boxH", "\u{2550}"), + (b"boxHD", "\u{2566}"), + (b"boxHU", "\u{2569}"), + (b"boxHd", "\u{2564}"), + (b"boxHu", "\u{2567}"), + (b"boxUL", "\u{255D}"), + (b"boxUR", "\u{255A}"), + (b"boxUl", "\u{255C}"), + (b"boxUr", "\u{2559}"), + (b"boxV", "\u{2551}"), + (b"boxVH", "\u{256C}"), + (b"boxVL", "\u{2563}"), + (b"boxVR", "\u{2560}"), + (b"boxVh", "\u{256B}"), + (b"boxVl", "\u{2562}"), + (b"boxVr", "\u{255F}"), + (b"boxbox", "\u{29C9}"), + (b"boxdL", "\u{2555}"), + (b"boxdR", "\u{2552}"), + (b"boxdl", "\u{2510}"), + (b"boxdr", "\u{250C}"), + (b"boxh", "\u{2500}"), + (b"boxhD", "\u{2565}"), + (b"boxhU", "\u{2568}"), + (b"boxhd", "\u{252C}"), + (b"boxhu", "\u{2534}"), + (b"boxminus", "\u{229F}"), + (b"boxplus", "\u{229E}"), + (b"boxtimes", "\u{22A0}"), + (b"boxuL", "\u{255B}"), + (b"boxuR", "\u{2558}"), + (b"boxul", "\u{2518}"), + (b"boxur", "\u{2514}"), + (b"boxv", "\u{2502}"), + (b"boxvH", "\u{256A}"), + (b"boxvL", "\u{2561}"), + (b"boxvR", "\u{255E}"), + (b"boxvh", "\u{253C}"), + (b"boxvl", "\u{2524}"), + (b"boxvr", "\u{251C}"), + (b"bprime", "\u{2035}"), + (b"breve", "\u{02D8}"), + (b"brvbar", "\u{00A6}"), + (b"bscr", "\u{1D4B7}"), + (b"bsemi", "\u{204F}"), + (b"bsim", "\u{223D}"), + (b"bsime", "\u{22CD}"), + (b"bsol", "\u{005C}"), + (b"bsolb", "\u{29C5}"), + (b"bsolhsub", "\u{27C8}"), + (b"bull", "\u{2022}"), + (b"bullet", "\u{2022}"), + (b"bump", "\u{224E}"), + (b"bumpE", "\u{2AAE}"), + (b"bumpe", "\u{224F}"), + (b"bumpeq", "\u{224F}"), + (b"cacute", "\u{0107}"), + (b"cap", "\u{2229}"), + (b"capand", "\u{2A44}"), + (b"capbrcup", "\u{2A49}"), + (b"capcap", "\u{2A4B}"), + (b"capcup", "\u{2A47}"), + (b"capdot", "\u{2A40}"), + (b"caps", "\u{2229}\u{FE00}"), + (b"caret", "\u{2041}"), + (b"caron", "\u{02C7}"), + (b"ccaps", "\u{2A4D}"), + (b"ccaron", "\u{010D}"), + (b"ccedil", "\u{00E7}"), + (b"ccirc", "\u{0109}"), + (b"ccups", "\u{2A4C}"), + (b"ccupssm", "\u{2A50}"), + (b"cdot", "\u{010B}"), + (b"cedil", "\u{00B8}"), + (b"cemptyv", "\u{29B2}"), + (b"cent", "\u{00A2}"), + (b"centerdot", "\u{00B7}"), + (b"cfr", "\u{1D520}"), + (b"chcy", "\u{0447}"), + (b"check", "\u{2713}"), + (b"checkmark", "\u{2713}"), + (b"chi", "\u{03C7}"), + (b"cir", "\u{25CB}"), + (b"cirE", "\u{29C3}"), + (b"circ", "\u{02C6}"), + (b"circeq", "\u{2257}"), + (b"circlearrowleft", "\u{21BA}"), + (b"circlearrowright", "\u{21BB}"), + (b"circledR", "\u{00AE}"), + (b"circledS", "\u{24C8}"), + (b"circledast", "\u{229B}"), + (b"circledcirc", "\u{229A}"), + (b"circleddash", "\u{229D}"), + (b"cire", "\u{2257}"), + (b"cirfnint", "\u{2A10}"), + (b"cirmid", "\u{2AEF}"), + (b"cirscir", "\u{29C2}"), + (b"clubs", "\u{2663}"), + (b"clubsuit", "\u{2663}"), + (b"colon", "\u{003A}"), + (b"colone", "\u{2254}"), + (b"coloneq", "\u{2254}"), + (b"comma", "\u{002C}"), + (b"commat", "\u{0040}"), + (b"comp", "\u{2201}"), + (b"compfn", "\u{2218}"), + (b"complement", "\u{2201}"), + (b"complexes", "\u{2102}"), + (b"cong", "\u{2245}"), + (b"congdot", "\u{2A6D}"), + (b"conint", "\u{222E}"), + (b"copf", "\u{1D554}"), + (b"coprod", "\u{2210}"), + (b"copy", "\u{00A9}"), + (b"copysr", "\u{2117}"), + (b"crarr", "\u{21B5}"), + (b"cross", "\u{2717}"), + (b"cscr", "\u{1D4B8}"), + (b"csub", "\u{2ACF}"), + (b"csube", "\u{2AD1}"), + (b"csup", "\u{2AD0}"), + (b"csupe", "\u{2AD2}"), + (b"ctdot", "\u{22EF}"), + (b"cudarrl", "\u{2938}"), + (b"cudarrr", "\u{2935}"), + (b"cuepr", "\u{22DE}"), + (b"cuesc", "\u{22DF}"), + (b"cularr", "\u{21B6}"), + (b"cularrp", "\u{293D}"), + (b"cup", "\u{222A}"), + (b"cupbrcap", "\u{2A48}"), + (b"cupcap", "\u{2A46}"), + (b"cupcup", "\u{2A4A}"), + (b"cupdot", "\u{228D}"), + (b"cupor", "\u{2A45}"), + (b"cups", "\u{222A}\u{FE00}"), + (b"curarr", "\u{21B7}"), + (b"curarrm", "\u{293C}"), + (b"curlyeqprec", "\u{22DE}"), + (b"curlyeqsucc", "\u{22DF}"), + (b"curlyvee", "\u{22CE}"), + (b"curlywedge", "\u{22CF}"), + (b"curren", "\u{00A4}"), + (b"curvearrowleft", "\u{21B6}"), + (b"curvearrowright", "\u{21B7}"), + (b"cuvee", "\u{22CE}"), + (b"cuwed", "\u{22CF}"), + (b"cwconint", "\u{2232}"), + (b"cwint", "\u{2231}"), + (b"cylcty", "\u{232D}"), + (b"dArr", "\u{21D3}"), + (b"dHar", "\u{2965}"), + (b"dagger", "\u{2020}"), + (b"daleth", "\u{2138}"), + (b"darr", "\u{2193}"), + (b"dash", "\u{2010}"), + (b"dashv", "\u{22A3}"), + (b"dbkarow", "\u{290F}"), + (b"dblac", "\u{02DD}"), + (b"dcaron", "\u{010F}"), + (b"dcy", "\u{0434}"), + (b"dd", "\u{2146}"), + (b"ddagger", "\u{2021}"), + (b"ddarr", "\u{21CA}"), + (b"ddotseq", "\u{2A77}"), + (b"deg", "\u{00B0}"), + (b"delta", "\u{03B4}"), + (b"demptyv", "\u{29B1}"), + (b"dfisht", "\u{297F}"), + (b"dfr", "\u{1D521}"), + (b"dharl", "\u{21C3}"), + (b"dharr", "\u{21C2}"), + (b"diam", "\u{22C4}"), + (b"diamond", "\u{22C4}"), + (b"diamondsuit", "\u{2666}"), + (b"diams", "\u{2666}"), + (b"die", "\u{00A8}"), + (b"digamma", "\u{03DD}"), + (b"disin", "\u{22F2}"), + (b"div", "\u{00F7}"), + (b"divide", "\u{00F7}"), + (b"divideontimes", "\u{22C7}"), + (b"divonx", "\u{22C7}"), + (b"djcy", "\u{0452}"), + (b"dlcorn", "\u{231E}"), + (b"dlcrop", "\u{230D}"), + (b"dollar", "\u{0024}"), + (b"dopf", "\u{1D555}"), + (b"dot", "\u{02D9}"), + (b"doteq", "\u{2250}"), + (b"doteqdot", "\u{2251}"), + (b"dotminus", "\u{2238}"), + (b"dotplus", "\u{2214}"), + (b"dotsquare", "\u{22A1}"), + (b"doublebarwedge", "\u{2306}"), + (b"downarrow", "\u{2193}"), + (b"downdownarrows", "\u{21CA}"), + (b"downharpoonleft", "\u{21C3}"), + (b"downharpoonright", "\u{21C2}"), + (b"drbkarow", "\u{2910}"), + (b"drcorn", "\u{231F}"), + (b"drcrop", "\u{230C}"), + (b"dscr", "\u{1D4B9}"), + (b"dscy", "\u{0455}"), + (b"dsol", "\u{29F6}"), + (b"dstrok", "\u{0111}"), + (b"dtdot", "\u{22F1}"), + (b"dtri", "\u{25BF}"), + (b"dtrif", "\u{25BE}"), + (b"duarr", "\u{21F5}"), + (b"duhar", "\u{296F}"), + (b"dwangle", "\u{29A6}"), + (b"dzcy", "\u{045F}"), + (b"dzigrarr", "\u{27FF}"), + (b"eDDot", "\u{2A77}"), + (b"eDot", "\u{2251}"), + (b"eacute", "\u{00E9}"), + (b"easter", "\u{2A6E}"), + (b"ecaron", "\u{011B}"), + (b"ecir", "\u{2256}"), + (b"ecirc", "\u{00EA}"), + (b"ecolon", "\u{2255}"), + (b"ecy", "\u{044D}"), + (b"edot", "\u{0117}"), + (b"ee", "\u{2147}"), + (b"efDot", "\u{2252}"), + (b"efr", "\u{1D522}"), + (b"eg", "\u{2A9A}"), + (b"egrave", "\u{00E8}"), + (b"egs", "\u{2A96}"), + (b"egsdot", "\u{2A98}"), + (b"el", "\u{2A99}"), + (b"elinters", "\u{23E7}"), + (b"ell", "\u{2113}"), + (b"els", "\u{2A95}"), + (b"elsdot", "\u{2A97}"), + (b"emacr", "\u{0113}"), + (b"empty", "\u{2205}"), + (b"emptyset", "\u{2205}"), + (b"emptyv", "\u{2205}"), + (b"emsp", "\u{2003}"), + (b"emsp13", "\u{2004}"), + (b"emsp14", "\u{2005}"), + (b"eng", "\u{014B}"), + (b"ensp", "\u{2002}"), + (b"eogon", "\u{0119}"), + (b"eopf", "\u{1D556}"), + (b"epar", "\u{22D5}"), + (b"eparsl", "\u{29E3}"), + (b"eplus", "\u{2A71}"), + (b"epsi", "\u{03B5}"), + (b"epsilon", "\u{03B5}"), + (b"epsiv", "\u{03F5}"), + (b"eqcirc", "\u{2256}"), + (b"eqcolon", "\u{2255}"), + (b"eqsim", "\u{2242}"), + (b"eqslantgtr", "\u{2A96}"), + (b"eqslantless", "\u{2A95}"), + (b"equals", "\u{003D}"), + (b"equest", "\u{225F}"), + (b"equiv", "\u{2261}"), + (b"equivDD", "\u{2A78}"), + (b"eqvparsl", "\u{29E5}"), + (b"erDot", "\u{2253}"), + (b"erarr", "\u{2971}"), + (b"escr", "\u{212F}"), + (b"esdot", "\u{2250}"), + (b"esim", "\u{2242}"), + (b"eta", "\u{03B7}"), + (b"eth", "\u{00F0}"), + (b"euml", "\u{00EB}"), + (b"euro", "\u{20AC}"), + (b"excl", "\u{0021}"), + (b"exist", "\u{2203}"), + (b"expectation", "\u{2130}"), + (b"exponentiale", "\u{2147}"), + (b"fallingdotseq", "\u{2252}"), + (b"fcy", "\u{0444}"), + (b"female", "\u{2640}"), + (b"ffilig", "\u{FB03}"), + (b"fflig", "\u{FB00}"), + (b"ffllig", "\u{FB04}"), + (b"ffr", "\u{1D523}"), + (b"filig", "\u{FB01}"), + (b"fjlig", "\u{0066}\u{006A}"), + (b"flat", "\u{266D}"), + (b"fllig", "\u{FB02}"), + (b"fltns", "\u{25B1}"), + (b"fnof", "\u{0192}"), + (b"fopf", "\u{1D557}"), + (b"forall", "\u{2200}"), + (b"fork", "\u{22D4}"), + (b"forkv", "\u{2AD9}"), + (b"fpartint", "\u{2A0D}"), + (b"frac12", "\u{00BD}"), + (b"frac13", "\u{2153}"), + (b"frac14", "\u{00BC}"), + (b"frac15", "\u{2155}"), + (b"frac16", "\u{2159}"), + (b"frac18", "\u{215B}"), + (b"frac23", "\u{2154}"), + (b"frac25", "\u{2156}"), + (b"frac34", "\u{00BE}"), + (b"frac35", "\u{2157}"), + (b"frac38", "\u{215C}"), + (b"frac45", "\u{2158}"), + (b"frac56", "\u{215A}"), + (b"frac58", "\u{215D}"), + (b"frac78", "\u{215E}"), + (b"frasl", "\u{2044}"), + (b"frown", "\u{2322}"), + (b"fscr", "\u{1D4BB}"), + (b"gE", "\u{2267}"), + (b"gEl", "\u{2A8C}"), + (b"gacute", "\u{01F5}"), + (b"gamma", "\u{03B3}"), + (b"gammad", "\u{03DD}"), + (b"gap", "\u{2A86}"), + (b"gbreve", "\u{011F}"), + (b"gcirc", "\u{011D}"), + (b"gcy", "\u{0433}"), + (b"gdot", "\u{0121}"), + (b"ge", "\u{2265}"), + (b"gel", "\u{22DB}"), + (b"geq", "\u{2265}"), + (b"geqq", "\u{2267}"), + (b"geqslant", "\u{2A7E}"), + (b"ges", "\u{2A7E}"), + (b"gescc", "\u{2AA9}"), + (b"gesdot", "\u{2A80}"), + (b"gesdoto", "\u{2A82}"), + (b"gesdotol", "\u{2A84}"), + (b"gesl", "\u{22DB}\u{FE00}"), + (b"gesles", "\u{2A94}"), + (b"gfr", "\u{1D524}"), + (b"gg", "\u{226B}"), + (b"ggg", "\u{22D9}"), + (b"gimel", "\u{2137}"), + (b"gjcy", "\u{0453}"), + (b"gl", "\u{2277}"), + (b"glE", "\u{2A92}"), + (b"gla", "\u{2AA5}"), + (b"glj", "\u{2AA4}"), + (b"gnE", "\u{2269}"), + (b"gnap", "\u{2A8A}"), + (b"gnapprox", "\u{2A8A}"), + (b"gne", "\u{2A88}"), + (b"gneq", "\u{2A88}"), + (b"gneqq", "\u{2269}"), + (b"gnsim", "\u{22E7}"), + (b"gopf", "\u{1D558}"), + (b"grave", "\u{0060}"), + (b"gscr", "\u{210A}"), + (b"gsim", "\u{2273}"), + (b"gsime", "\u{2A8E}"), + (b"gsiml", "\u{2A90}"), + (b"gt", "\u{003E}"), + (b"gtcc", "\u{2AA7}"), + (b"gtcir", "\u{2A7A}"), + (b"gtdot", "\u{22D7}"), + (b"gtlPar", "\u{2995}"), + (b"gtquest", "\u{2A7C}"), + (b"gtrapprox", "\u{2A86}"), + (b"gtrarr", "\u{2978}"), + (b"gtrdot", "\u{22D7}"), + (b"gtreqless", "\u{22DB}"), + (b"gtreqqless", "\u{2A8C}"), + (b"gtrless", "\u{2277}"), + (b"gtrsim", "\u{2273}"), + (b"gvertneqq", "\u{2269}\u{FE00}"), + (b"gvnE", "\u{2269}\u{FE00}"), + (b"hArr", "\u{21D4}"), + (b"hairsp", "\u{200A}"), + (b"half", "\u{00BD}"), + (b"hamilt", "\u{210B}"), + (b"hardcy", "\u{044A}"), + (b"harr", "\u{2194}"), + (b"harrcir", "\u{2948}"), + (b"harrw", "\u{21AD}"), + (b"hbar", "\u{210F}"), + (b"hcirc", "\u{0125}"), + (b"hearts", "\u{2665}"), + (b"heartsuit", "\u{2665}"), + (b"hellip", "\u{2026}"), + (b"hercon", "\u{22B9}"), + (b"hfr", "\u{1D525}"), + (b"hksearow", "\u{2925}"), + (b"hkswarow", "\u{2926}"), + (b"hoarr", "\u{21FF}"), + (b"homtht", "\u{223B}"), + (b"hookleftarrow", "\u{21A9}"), + (b"hookrightarrow", "\u{21AA}"), + (b"hopf", "\u{1D559}"), + (b"horbar", "\u{2015}"), + (b"hscr", "\u{1D4BD}"), + (b"hslash", "\u{210F}"), + (b"hstrok", "\u{0127}"), + (b"hybull", "\u{2043}"), + (b"hyphen", "\u{2010}"), + (b"iacute", "\u{00ED}"), + (b"ic", "\u{2063}"), + (b"icirc", "\u{00EE}"), + (b"icy", "\u{0438}"), + (b"iecy", "\u{0435}"), + (b"iexcl", "\u{00A1}"), + (b"iff", "\u{21D4}"), + (b"ifr", "\u{1D526}"), + (b"igrave", "\u{00EC}"), + (b"ii", "\u{2148}"), + (b"iiiint", "\u{2A0C}"), + (b"iiint", "\u{222D}"), + (b"iinfin", "\u{29DC}"), + (b"iiota", "\u{2129}"), + (b"ijlig", "\u{0133}"), + (b"imacr", "\u{012B}"), + (b"image", "\u{2111}"), + (b"imagline", "\u{2110}"), + (b"imagpart", "\u{2111}"), + (b"imath", "\u{0131}"), + (b"imof", "\u{22B7}"), + (b"imped", "\u{01B5}"), + (b"in", "\u{2208}"), + (b"incare", "\u{2105}"), + (b"infin", "\u{221E}"), + (b"infintie", "\u{29DD}"), + (b"inodot", "\u{0131}"), + (b"int", "\u{222B}"), + (b"intcal", "\u{22BA}"), + (b"integers", "\u{2124}"), + (b"intercal", "\u{22BA}"), + (b"intlarhk", "\u{2A17}"), + (b"intprod", "\u{2A3C}"), + (b"iocy", "\u{0451}"), + (b"iogon", "\u{012F}"), + (b"iopf", "\u{1D55A}"), + (b"iota", "\u{03B9}"), + (b"iprod", "\u{2A3C}"), + (b"iquest", "\u{00BF}"), + (b"iscr", "\u{1D4BE}"), + (b"isin", "\u{2208}"), + (b"isinE", "\u{22F9}"), + (b"isindot", "\u{22F5}"), + (b"isins", "\u{22F4}"), + (b"isinsv", "\u{22F3}"), + (b"isinv", "\u{2208}"), + (b"it", "\u{2062}"), + (b"itilde", "\u{0129}"), + (b"iukcy", "\u{0456}"), + (b"iuml", "\u{00EF}"), + (b"jcirc", "\u{0135}"), + (b"jcy", "\u{0439}"), + (b"jfr", "\u{1D527}"), + (b"jmath", "\u{0237}"), + (b"jopf", "\u{1D55B}"), + (b"jscr", "\u{1D4BF}"), + (b"jsercy", "\u{0458}"), + (b"jukcy", "\u{0454}"), + (b"kappa", "\u{03BA}"), + (b"kappav", "\u{03F0}"), + (b"kcedil", "\u{0137}"), + (b"kcy", "\u{043A}"), + (b"kfr", "\u{1D528}"), + (b"kgreen", "\u{0138}"), + (b"khcy", "\u{0445}"), + (b"kjcy", "\u{045C}"), + (b"kopf", "\u{1D55C}"), + (b"kscr", "\u{1D4C0}"), + (b"lAarr", "\u{21DA}"), + (b"lArr", "\u{21D0}"), + (b"lAtail", "\u{291B}"), + (b"lBarr", "\u{290E}"), + (b"lE", "\u{2266}"), + (b"lEg", "\u{2A8B}"), + (b"lHar", "\u{2962}"), + (b"lacute", "\u{013A}"), + (b"laemptyv", "\u{29B4}"), + (b"lagran", "\u{2112}"), + (b"lambda", "\u{03BB}"), + (b"lang", "\u{27E8}"), + (b"langd", "\u{2991}"), + (b"langle", "\u{27E8}"), + (b"lap", "\u{2A85}"), + (b"laquo", "\u{00AB}"), + (b"larr", "\u{2190}"), + (b"larrb", "\u{21E4}"), + (b"larrbfs", "\u{291F}"), + (b"larrfs", "\u{291D}"), + (b"larrhk", "\u{21A9}"), + (b"larrlp", "\u{21AB}"), + (b"larrpl", "\u{2939}"), + (b"larrsim", "\u{2973}"), + (b"larrtl", "\u{21A2}"), + (b"lat", "\u{2AAB}"), + (b"latail", "\u{2919}"), + (b"late", "\u{2AAD}"), + (b"lates", "\u{2AAD}\u{FE00}"), + (b"lbarr", "\u{290C}"), + (b"lbbrk", "\u{2772}"), + (b"lbrace", "\u{007B}"), + (b"lbrack", "\u{005B}"), + (b"lbrke", "\u{298B}"), + (b"lbrksld", "\u{298F}"), + (b"lbrkslu", "\u{298D}"), + (b"lcaron", "\u{013E}"), + (b"lcedil", "\u{013C}"), + (b"lceil", "\u{2308}"), + (b"lcub", "\u{007B}"), + (b"lcy", "\u{043B}"), + (b"ldca", "\u{2936}"), + (b"ldquo", "\u{201C}"), + (b"ldquor", "\u{201E}"), + (b"ldrdhar", "\u{2967}"), + (b"ldrushar", "\u{294B}"), + (b"ldsh", "\u{21B2}"), + (b"le", "\u{2264}"), + (b"leftarrow", "\u{2190}"), + (b"leftarrowtail", "\u{21A2}"), + (b"leftharpoondown", "\u{21BD}"), + (b"leftharpoonup", "\u{21BC}"), + (b"leftleftarrows", "\u{21C7}"), + (b"leftrightarrow", "\u{2194}"), + (b"leftrightarrows", "\u{21C6}"), + (b"leftrightharpoons", "\u{21CB}"), + (b"leftrightsquigarrow", "\u{21AD}"), + (b"leftthreetimes", "\u{22CB}"), + (b"leg", "\u{22DA}"), + (b"leq", "\u{2264}"), + (b"leqq", "\u{2266}"), + (b"leqslant", "\u{2A7D}"), + (b"les", "\u{2A7D}"), + (b"lescc", "\u{2AA8}"), + (b"lesdot", "\u{2A7F}"), + (b"lesdoto", "\u{2A81}"), + (b"lesdotor", "\u{2A83}"), + (b"lesg", "\u{22DA}\u{FE00}"), + (b"lesges", "\u{2A93}"), + (b"lessapprox", "\u{2A85}"), + (b"lessdot", "\u{22D6}"), + (b"lesseqgtr", "\u{22DA}"), + (b"lesseqqgtr", "\u{2A8B}"), + (b"lessgtr", "\u{2276}"), + (b"lesssim", "\u{2272}"), + (b"lfisht", "\u{297C}"), + (b"lfloor", "\u{230A}"), + (b"lfr", "\u{1D529}"), + (b"lg", "\u{2276}"), + (b"lgE", "\u{2A91}"), + (b"lhard", "\u{21BD}"), + (b"lharu", "\u{21BC}"), + (b"lharul", "\u{296A}"), + (b"lhblk", "\u{2584}"), + (b"ljcy", "\u{0459}"), + (b"ll", "\u{226A}"), + (b"llarr", "\u{21C7}"), + (b"llcorner", "\u{231E}"), + (b"llhard", "\u{296B}"), + (b"lltri", "\u{25FA}"), + (b"lmidot", "\u{0140}"), + (b"lmoust", "\u{23B0}"), + (b"lmoustache", "\u{23B0}"), + (b"lnE", "\u{2268}"), + (b"lnap", "\u{2A89}"), + (b"lnapprox", "\u{2A89}"), + (b"lne", "\u{2A87}"), + (b"lneq", "\u{2A87}"), + (b"lneqq", "\u{2268}"), + (b"lnsim", "\u{22E6}"), + (b"loang", "\u{27EC}"), + (b"loarr", "\u{21FD}"), + (b"lobrk", "\u{27E6}"), + (b"longleftarrow", "\u{27F5}"), + (b"longleftrightarrow", "\u{27F7}"), + (b"longmapsto", "\u{27FC}"), + (b"longrightarrow", "\u{27F6}"), + (b"looparrowleft", "\u{21AB}"), + (b"looparrowright", "\u{21AC}"), + (b"lopar", "\u{2985}"), + (b"lopf", "\u{1D55D}"), + (b"loplus", "\u{2A2D}"), + (b"lotimes", "\u{2A34}"), + (b"lowast", "\u{2217}"), + (b"lowbar", "\u{005F}"), + (b"loz", "\u{25CA}"), + (b"lozenge", "\u{25CA}"), + (b"lozf", "\u{29EB}"), + (b"lpar", "\u{0028}"), + (b"lparlt", "\u{2993}"), + (b"lrarr", "\u{21C6}"), + (b"lrcorner", "\u{231F}"), + (b"lrhar", "\u{21CB}"), + (b"lrhard", "\u{296D}"), + (b"lrm", "\u{200E}"), + (b"lrtri", "\u{22BF}"), + (b"lsaquo", "\u{2039}"), + (b"lscr", "\u{1D4C1}"), + (b"lsh", "\u{21B0}"), + (b"lsim", "\u{2272}"), + (b"lsime", "\u{2A8D}"), + (b"lsimg", "\u{2A8F}"), + (b"lsqb", "\u{005B}"), + (b"lsquo", "\u{2018}"), + (b"lsquor", "\u{201A}"), + (b"lstrok", "\u{0142}"), + (b"lt", "\u{003C}"), + (b"ltcc", "\u{2AA6}"), + (b"ltcir", "\u{2A79}"), + (b"ltdot", "\u{22D6}"), + (b"lthree", "\u{22CB}"), + (b"ltimes", "\u{22C9}"), + (b"ltlarr", "\u{2976}"), + (b"ltquest", "\u{2A7B}"), + (b"ltrPar", "\u{2996}"), + (b"ltri", "\u{25C3}"), + (b"ltrie", "\u{22B4}"), + (b"ltrif", "\u{25C2}"), + (b"lurdshar", "\u{294A}"), + (b"luruhar", "\u{2966}"), + (b"lvertneqq", "\u{2268}\u{FE00}"), + (b"lvnE", "\u{2268}\u{FE00}"), + (b"mDDot", "\u{223A}"), + (b"macr", "\u{00AF}"), + (b"male", "\u{2642}"), + (b"malt", "\u{2720}"), + (b"maltese", "\u{2720}"), + (b"map", "\u{21A6}"), + (b"mapsto", "\u{21A6}"), + (b"mapstodown", "\u{21A7}"), + (b"mapstoleft", "\u{21A4}"), + (b"mapstoup", "\u{21A5}"), + (b"marker", "\u{25AE}"), + (b"mcomma", "\u{2A29}"), + (b"mcy", "\u{043C}"), + (b"mdash", "\u{2014}"), + (b"measuredangle", "\u{2221}"), + (b"mfr", "\u{1D52A}"), + (b"mho", "\u{2127}"), + (b"micro", "\u{00B5}"), + (b"mid", "\u{2223}"), + (b"midast", "\u{002A}"), + (b"midcir", "\u{2AF0}"), + (b"middot", "\u{00B7}"), + (b"minus", "\u{2212}"), + (b"minusb", "\u{229F}"), + (b"minusd", "\u{2238}"), + (b"minusdu", "\u{2A2A}"), + (b"mlcp", "\u{2ADB}"), + (b"mldr", "\u{2026}"), + (b"mnplus", "\u{2213}"), + (b"models", "\u{22A7}"), + (b"mopf", "\u{1D55E}"), + (b"mp", "\u{2213}"), + (b"mscr", "\u{1D4C2}"), + (b"mstpos", "\u{223E}"), + (b"mu", "\u{03BC}"), + (b"multimap", "\u{22B8}"), + (b"mumap", "\u{22B8}"), + (b"nGg", "\u{22D9}\u{0338}"), + (b"nGt", "\u{226B}\u{20D2}"), + (b"nGtv", "\u{226B}\u{0338}"), + (b"nLeftarrow", "\u{21CD}"), + (b"nLeftrightarrow", "\u{21CE}"), + (b"nLl", "\u{22D8}\u{0338}"), + (b"nLt", "\u{226A}\u{20D2}"), + (b"nLtv", "\u{226A}\u{0338}"), + (b"nRightarrow", "\u{21CF}"), + (b"nVDash", "\u{22AF}"), + (b"nVdash", "\u{22AE}"), + (b"nabla", "\u{2207}"), + (b"nacute", "\u{0144}"), + (b"nang", "\u{2220}\u{20D2}"), + (b"nap", "\u{2249}"), + (b"napE", "\u{2A70}\u{0338}"), + (b"napid", "\u{224B}\u{0338}"), + (b"napos", "\u{0149}"), + (b"napprox", "\u{2249}"), + (b"natur", "\u{266E}"), + (b"natural", "\u{266E}"), + (b"naturals", "\u{2115}"), + (b"nbsp", "\u{00A0}"), + (b"nbump", "\u{224E}\u{0338}"), + (b"nbumpe", "\u{224F}\u{0338}"), + (b"ncap", "\u{2A43}"), + (b"ncaron", "\u{0148}"), + (b"ncedil", "\u{0146}"), + (b"ncong", "\u{2247}"), + (b"ncongdot", "\u{2A6D}\u{0338}"), + (b"ncup", "\u{2A42}"), + (b"ncy", "\u{043D}"), + (b"ndash", "\u{2013}"), + (b"ne", "\u{2260}"), + (b"neArr", "\u{21D7}"), + (b"nearhk", "\u{2924}"), + (b"nearr", "\u{2197}"), + (b"nearrow", "\u{2197}"), + (b"nedot", "\u{2250}\u{0338}"), + (b"nequiv", "\u{2262}"), + (b"nesear", "\u{2928}"), + (b"nesim", "\u{2242}\u{0338}"), + (b"nexist", "\u{2204}"), + (b"nexists", "\u{2204}"), + (b"nfr", "\u{1D52B}"), + (b"ngE", "\u{2267}\u{0338}"), + (b"nge", "\u{2271}"), + (b"ngeq", "\u{2271}"), + (b"ngeqq", "\u{2267}\u{0338}"), + (b"ngeqslant", "\u{2A7E}\u{0338}"), + (b"nges", "\u{2A7E}\u{0338}"), + (b"ngsim", "\u{2275}"), + (b"ngt", "\u{226F}"), + (b"ngtr", "\u{226F}"), + (b"nhArr", "\u{21CE}"), + (b"nharr", "\u{21AE}"), + (b"nhpar", "\u{2AF2}"), + (b"ni", "\u{220B}"), + (b"nis", "\u{22FC}"), + (b"nisd", "\u{22FA}"), + (b"niv", "\u{220B}"), + (b"njcy", "\u{045A}"), + (b"nlArr", "\u{21CD}"), + (b"nlE", "\u{2266}\u{0338}"), + (b"nlarr", "\u{219A}"), + (b"nldr", "\u{2025}"), + (b"nle", "\u{2270}"), + (b"nleftarrow", "\u{219A}"), + (b"nleftrightarrow", "\u{21AE}"), + (b"nleq", "\u{2270}"), + (b"nleqq", "\u{2266}\u{0338}"), + (b"nleqslant", "\u{2A7D}\u{0338}"), + (b"nles", "\u{2A7D}\u{0338}"), + (b"nless", "\u{226E}"), + (b"nlsim", "\u{2274}"), + (b"nlt", "\u{226E}"), + (b"nltri", "\u{22EA}"), + (b"nltrie", "\u{22EC}"), + (b"nmid", "\u{2224}"), + (b"nopf", "\u{1D55F}"), + (b"not", "\u{00AC}"), + (b"notin", "\u{2209}"), + (b"notinE", "\u{22F9}\u{0338}"), + (b"notindot", "\u{22F5}\u{0338}"), + (b"notinva", "\u{2209}"), + (b"notinvb", "\u{22F7}"), + (b"notinvc", "\u{22F6}"), + (b"notni", "\u{220C}"), + (b"notniva", "\u{220C}"), + (b"notnivb", "\u{22FE}"), + (b"notnivc", "\u{22FD}"), + (b"npar", "\u{2226}"), + (b"nparallel", "\u{2226}"), + (b"nparsl", "\u{2AFD}\u{20E5}"), + (b"npart", "\u{2202}\u{0338}"), + (b"npolint", "\u{2A14}"), + (b"npr", "\u{2280}"), + (b"nprcue", "\u{22E0}"), + (b"npre", "\u{2AAF}\u{0338}"), + (b"nprec", "\u{2280}"), + (b"npreceq", "\u{2AAF}\u{0338}"), + (b"nrArr", "\u{21CF}"), + (b"nrarr", "\u{219B}"), + (b"nrarrc", "\u{2933}\u{0338}"), + (b"nrarrw", "\u{219D}\u{0338}"), + (b"nrightarrow", "\u{219B}"), + (b"nrtri", "\u{22EB}"), + (b"nrtrie", "\u{22ED}"), + (b"nsc", "\u{2281}"), + (b"nsccue", "\u{22E1}"), + (b"nsce", "\u{2AB0}\u{0338}"), + (b"nscr", "\u{1D4C3}"), + (b"nshortmid", "\u{2224}"), + (b"nshortparallel", "\u{2226}"), + (b"nsim", "\u{2241}"), + (b"nsime", "\u{2244}"), + (b"nsimeq", "\u{2244}"), + (b"nsmid", "\u{2224}"), + (b"nspar", "\u{2226}"), + (b"nsqsube", "\u{22E2}"), + (b"nsqsupe", "\u{22E3}"), + (b"nsub", "\u{2284}"), + (b"nsubE", "\u{2AC5}\u{0338}"), + (b"nsube", "\u{2288}"), + (b"nsubset", "\u{2282}\u{20D2}"), + (b"nsubseteq", "\u{2288}"), + (b"nsubseteqq", "\u{2AC5}\u{0338}"), + (b"nsucc", "\u{2281}"), + (b"nsucceq", "\u{2AB0}\u{0338}"), + (b"nsup", "\u{2285}"), + (b"nsupE", "\u{2AC6}\u{0338}"), + (b"nsupe", "\u{2289}"), + (b"nsupset", "\u{2283}\u{20D2}"), + (b"nsupseteq", "\u{2289}"), + (b"nsupseteqq", "\u{2AC6}\u{0338}"), + (b"ntgl", "\u{2279}"), + (b"ntilde", "\u{00F1}"), + (b"ntlg", "\u{2278}"), + (b"ntriangleleft", "\u{22EA}"), + (b"ntrianglelefteq", "\u{22EC}"), + (b"ntriangleright", "\u{22EB}"), + (b"ntrianglerighteq", "\u{22ED}"), + (b"nu", "\u{03BD}"), + (b"num", "\u{0023}"), + (b"numero", "\u{2116}"), + (b"numsp", "\u{2007}"), + (b"nvDash", "\u{22AD}"), + (b"nvHarr", "\u{2904}"), + (b"nvap", "\u{224D}\u{20D2}"), + (b"nvdash", "\u{22AC}"), + (b"nvge", "\u{2265}\u{20D2}"), + (b"nvgt", "\u{003E}\u{20D2}"), + (b"nvinfin", "\u{29DE}"), + (b"nvlArr", "\u{2902}"), + (b"nvle", "\u{2264}\u{20D2}"), + (b"nvlt", "\u{003C}\u{20D2}"), + (b"nvltrie", "\u{22B4}\u{20D2}"), + (b"nvrArr", "\u{2903}"), + (b"nvrtrie", "\u{22B5}\u{20D2}"), + (b"nvsim", "\u{223C}\u{20D2}"), + (b"nwArr", "\u{21D6}"), + (b"nwarhk", "\u{2923}"), + (b"nwarr", "\u{2196}"), + (b"nwarrow", "\u{2196}"), + (b"nwnear", "\u{2927}"), + (b"oS", "\u{24C8}"), + (b"oacute", "\u{00F3}"), + (b"oast", "\u{229B}"), + (b"ocir", "\u{229A}"), + (b"ocirc", "\u{00F4}"), + (b"ocy", "\u{043E}"), + (b"odash", "\u{229D}"), + (b"odblac", "\u{0151}"), + (b"odiv", "\u{2A38}"), + (b"odot", "\u{2299}"), + (b"odsold", "\u{29BC}"), + (b"oelig", "\u{0153}"), + (b"ofcir", "\u{29BF}"), + (b"ofr", "\u{1D52C}"), + (b"ogon", "\u{02DB}"), + (b"ograve", "\u{00F2}"), + (b"ogt", "\u{29C1}"), + (b"ohbar", "\u{29B5}"), + (b"ohm", "\u{03A9}"), + (b"oint", "\u{222E}"), + (b"olarr", "\u{21BA}"), + (b"olcir", "\u{29BE}"), + (b"olcross", "\u{29BB}"), + (b"oline", "\u{203E}"), + (b"olt", "\u{29C0}"), + (b"omacr", "\u{014D}"), + (b"omega", "\u{03C9}"), + (b"omicron", "\u{03BF}"), + (b"omid", "\u{29B6}"), + (b"ominus", "\u{2296}"), + (b"oopf", "\u{1D560}"), + (b"opar", "\u{29B7}"), + (b"operp", "\u{29B9}"), + (b"oplus", "\u{2295}"), + (b"or", "\u{2228}"), + (b"orarr", "\u{21BB}"), + (b"ord", "\u{2A5D}"), + (b"order", "\u{2134}"), + (b"orderof", "\u{2134}"), + (b"ordf", "\u{00AA}"), + (b"ordm", "\u{00BA}"), + (b"origof", "\u{22B6}"), + (b"oror", "\u{2A56}"), + (b"orslope", "\u{2A57}"), + (b"orv", "\u{2A5B}"), + (b"oscr", "\u{2134}"), + (b"oslash", "\u{00F8}"), + (b"osol", "\u{2298}"), + (b"otilde", "\u{00F5}"), + (b"otimes", "\u{2297}"), + (b"otimesas", "\u{2A36}"), + (b"ouml", "\u{00F6}"), + (b"ovbar", "\u{233D}"), + (b"par", "\u{2225}"), + (b"para", "\u{00B6}"), + (b"parallel", "\u{2225}"), + (b"parsim", "\u{2AF3}"), + (b"parsl", "\u{2AFD}"), + (b"part", "\u{2202}"), + (b"pcy", "\u{043F}"), + (b"percnt", "\u{0025}"), + (b"period", "\u{002E}"), + (b"permil", "\u{2030}"), + (b"perp", "\u{22A5}"), + (b"pertenk", "\u{2031}"), + (b"pfr", "\u{1D52D}"), + (b"phi", "\u{03C6}"), + (b"phiv", "\u{03D5}"), + (b"phmmat", "\u{2133}"), + (b"phone", "\u{260E}"), + (b"pi", "\u{03C0}"), + (b"pitchfork", "\u{22D4}"), + (b"piv", "\u{03D6}"), + (b"planck", "\u{210F}"), + (b"planckh", "\u{210E}"), + (b"plankv", "\u{210F}"), + (b"plus", "\u{002B}"), + (b"plusacir", "\u{2A23}"), + (b"plusb", "\u{229E}"), + (b"pluscir", "\u{2A22}"), + (b"plusdo", "\u{2214}"), + (b"plusdu", "\u{2A25}"), + (b"pluse", "\u{2A72}"), + (b"plusmn", "\u{00B1}"), + (b"plussim", "\u{2A26}"), + (b"plustwo", "\u{2A27}"), + (b"pm", "\u{00B1}"), + (b"pointint", "\u{2A15}"), + (b"popf", "\u{1D561}"), + (b"pound", "\u{00A3}"), + (b"pr", "\u{227A}"), + (b"prE", "\u{2AB3}"), + (b"prap", "\u{2AB7}"), + (b"prcue", "\u{227C}"), + (b"pre", "\u{2AAF}"), + (b"prec", "\u{227A}"), + (b"precapprox", "\u{2AB7}"), + (b"preccurlyeq", "\u{227C}"), + (b"preceq", "\u{2AAF}"), + (b"precnapprox", "\u{2AB9}"), + (b"precneqq", "\u{2AB5}"), + (b"precnsim", "\u{22E8}"), + (b"precsim", "\u{227E}"), + (b"prime", "\u{2032}"), + (b"primes", "\u{2119}"), + (b"prnE", "\u{2AB5}"), + (b"prnap", "\u{2AB9}"), + (b"prnsim", "\u{22E8}"), + (b"prod", "\u{220F}"), + (b"profalar", "\u{232E}"), + (b"profline", "\u{2312}"), + (b"profsurf", "\u{2313}"), + (b"prop", "\u{221D}"), + (b"propto", "\u{221D}"), + (b"prsim", "\u{227E}"), + (b"prurel", "\u{22B0}"), + (b"pscr", "\u{1D4C5}"), + (b"psi", "\u{03C8}"), + (b"puncsp", "\u{2008}"), + (b"qfr", "\u{1D52E}"), + (b"qint", "\u{2A0C}"), + (b"qopf", "\u{1D562}"), + (b"qprime", "\u{2057}"), + (b"qscr", "\u{1D4C6}"), + (b"quaternions", "\u{210D}"), + (b"quatint", "\u{2A16}"), + (b"quest", "\u{003F}"), + (b"questeq", "\u{225F}"), + (b"quot", "\u{0022}"), + (b"rAarr", "\u{21DB}"), + (b"rArr", "\u{21D2}"), + (b"rAtail", "\u{291C}"), + (b"rBarr", "\u{290F}"), + (b"rHar", "\u{2964}"), + (b"race", "\u{223D}\u{0331}"), + (b"racute", "\u{0155}"), + (b"radic", "\u{221A}"), + (b"raemptyv", "\u{29B3}"), + (b"rang", "\u{27E9}"), + (b"rangd", "\u{2992}"), + (b"range", "\u{29A5}"), + (b"rangle", "\u{27E9}"), + (b"raquo", "\u{00BB}"), + (b"rarr", "\u{2192}"), + (b"rarrap", "\u{2975}"), + (b"rarrb", "\u{21E5}"), + (b"rarrbfs", "\u{2920}"), + (b"rarrc", "\u{2933}"), + (b"rarrfs", "\u{291E}"), + (b"rarrhk", "\u{21AA}"), + (b"rarrlp", "\u{21AC}"), + (b"rarrpl", "\u{2945}"), + (b"rarrsim", "\u{2974}"), + (b"rarrtl", "\u{21A3}"), + (b"rarrw", "\u{219D}"), + (b"ratail", "\u{291A}"), + (b"ratio", "\u{2236}"), + (b"rationals", "\u{211A}"), + (b"rbarr", "\u{290D}"), + (b"rbbrk", "\u{2773}"), + (b"rbrace", "\u{007D}"), + (b"rbrack", "\u{005D}"), + (b"rbrke", "\u{298C}"), + (b"rbrksld", "\u{298E}"), + (b"rbrkslu", "\u{2990}"), + (b"rcaron", "\u{0159}"), + (b"rcedil", "\u{0157}"), + (b"rceil", "\u{2309}"), + (b"rcub", "\u{007D}"), + (b"rcy", "\u{0440}"), + (b"rdca", "\u{2937}"), + (b"rdldhar", "\u{2969}"), + (b"rdquo", "\u{201D}"), + (b"rdquor", "\u{201D}"), + (b"rdsh", "\u{21B3}"), + (b"real", "\u{211C}"), + (b"realine", "\u{211B}"), + (b"realpart", "\u{211C}"), + (b"reals", "\u{211D}"), + (b"rect", "\u{25AD}"), + (b"reg", "\u{00AE}"), + (b"rfisht", "\u{297D}"), + (b"rfloor", "\u{230B}"), + (b"rfr", "\u{1D52F}"), + (b"rhard", "\u{21C1}"), + (b"rharu", "\u{21C0}"), + (b"rharul", "\u{296C}"), + (b"rho", "\u{03C1}"), + (b"rhov", "\u{03F1}"), + (b"rightarrow", "\u{2192}"), + (b"rightarrowtail", "\u{21A3}"), + (b"rightharpoondown", "\u{21C1}"), + (b"rightharpoonup", "\u{21C0}"), + (b"rightleftarrows", "\u{21C4}"), + (b"rightleftharpoons", "\u{21CC}"), + (b"rightrightarrows", "\u{21C9}"), + (b"rightsquigarrow", "\u{219D}"), + (b"rightthreetimes", "\u{22CC}"), + (b"ring", "\u{02DA}"), + (b"risingdotseq", "\u{2253}"), + (b"rlarr", "\u{21C4}"), + (b"rlhar", "\u{21CC}"), + (b"rlm", "\u{200F}"), + (b"rmoust", "\u{23B1}"), + (b"rmoustache", "\u{23B1}"), + (b"rnmid", "\u{2AEE}"), + (b"roang", "\u{27ED}"), + (b"roarr", "\u{21FE}"), + (b"robrk", "\u{27E7}"), + (b"ropar", "\u{2986}"), + (b"ropf", "\u{1D563}"), + (b"roplus", "\u{2A2E}"), + (b"rotimes", "\u{2A35}"), + (b"rpar", "\u{0029}"), + (b"rpargt", "\u{2994}"), + (b"rppolint", "\u{2A12}"), + (b"rrarr", "\u{21C9}"), + (b"rsaquo", "\u{203A}"), + (b"rscr", "\u{1D4C7}"), + (b"rsh", "\u{21B1}"), + (b"rsqb", "\u{005D}"), + (b"rsquo", "\u{2019}"), + (b"rsquor", "\u{2019}"), + (b"rthree", "\u{22CC}"), + (b"rtimes", "\u{22CA}"), + (b"rtri", "\u{25B9}"), + (b"rtrie", "\u{22B5}"), + (b"rtrif", "\u{25B8}"), + (b"rtriltri", "\u{29CE}"), + (b"ruluhar", "\u{2968}"), + (b"rx", "\u{211E}"), + (b"sacute", "\u{015B}"), + (b"sbquo", "\u{201A}"), + (b"sc", "\u{227B}"), + (b"scE", "\u{2AB4}"), + (b"scap", "\u{2AB8}"), + (b"scaron", "\u{0161}"), + (b"sccue", "\u{227D}"), + (b"sce", "\u{2AB0}"), + (b"scedil", "\u{015F}"), + (b"scirc", "\u{015D}"), + (b"scnE", "\u{2AB6}"), + (b"scnap", "\u{2ABA}"), + (b"scnsim", "\u{22E9}"), + (b"scpolint", "\u{2A13}"), + (b"scsim", "\u{227F}"), + (b"scy", "\u{0441}"), + (b"sdot", "\u{22C5}"), + (b"sdotb", "\u{22A1}"), + (b"sdote", "\u{2A66}"), + (b"seArr", "\u{21D8}"), + (b"searhk", "\u{2925}"), + (b"searr", "\u{2198}"), + (b"searrow", "\u{2198}"), + (b"sect", "\u{00A7}"), + (b"semi", "\u{003B}"), + (b"seswar", "\u{2929}"), + (b"setminus", "\u{2216}"), + (b"setmn", "\u{2216}"), + (b"sext", "\u{2736}"), + (b"sfr", "\u{1D530}"), + (b"sfrown", "\u{2322}"), + (b"sharp", "\u{266F}"), + (b"shchcy", "\u{0449}"), + (b"shcy", "\u{0448}"), + (b"shortmid", "\u{2223}"), + (b"shortparallel", "\u{2225}"), + (b"shy", "\u{00AD}"), + (b"sigma", "\u{03C3}"), + (b"sigmaf", "\u{03C2}"), + (b"sigmav", "\u{03C2}"), + (b"sim", "\u{223C}"), + (b"simdot", "\u{2A6A}"), + (b"sime", "\u{2243}"), + (b"simeq", "\u{2243}"), + (b"simg", "\u{2A9E}"), + (b"simgE", "\u{2AA0}"), + (b"siml", "\u{2A9D}"), + (b"simlE", "\u{2A9F}"), + (b"simne", "\u{2246}"), + (b"simplus", "\u{2A24}"), + (b"simrarr", "\u{2972}"), + (b"slarr", "\u{2190}"), + (b"smallsetminus", "\u{2216}"), + (b"smashp", "\u{2A33}"), + (b"smeparsl", "\u{29E4}"), + (b"smid", "\u{2223}"), + (b"smile", "\u{2323}"), + (b"smt", "\u{2AAA}"), + (b"smte", "\u{2AAC}"), + (b"smtes", "\u{2AAC}\u{FE00}"), + (b"softcy", "\u{044C}"), + (b"sol", "\u{002F}"), + (b"solb", "\u{29C4}"), + (b"solbar", "\u{233F}"), + (b"sopf", "\u{1D564}"), + (b"spades", "\u{2660}"), + (b"spadesuit", "\u{2660}"), + (b"spar", "\u{2225}"), + (b"sqcap", "\u{2293}"), + (b"sqcaps", "\u{2293}\u{FE00}"), + (b"sqcup", "\u{2294}"), + (b"sqcups", "\u{2294}\u{FE00}"), + (b"sqsub", "\u{228F}"), + (b"sqsube", "\u{2291}"), + (b"sqsubset", "\u{228F}"), + (b"sqsubseteq", "\u{2291}"), + (b"sqsup", "\u{2290}"), + (b"sqsupe", "\u{2292}"), + (b"sqsupset", "\u{2290}"), + (b"sqsupseteq", "\u{2292}"), + (b"squ", "\u{25A1}"), + (b"square", "\u{25A1}"), + (b"squarf", "\u{25AA}"), + (b"squf", "\u{25AA}"), + (b"srarr", "\u{2192}"), + (b"sscr", "\u{1D4C8}"), + (b"ssetmn", "\u{2216}"), + (b"ssmile", "\u{2323}"), + (b"sstarf", "\u{22C6}"), + (b"star", "\u{2606}"), + (b"starf", "\u{2605}"), + (b"straightepsilon", "\u{03F5}"), + (b"straightphi", "\u{03D5}"), + (b"strns", "\u{00AF}"), + (b"sub", "\u{2282}"), + (b"subE", "\u{2AC5}"), + (b"subdot", "\u{2ABD}"), + (b"sube", "\u{2286}"), + (b"subedot", "\u{2AC3}"), + (b"submult", "\u{2AC1}"), + (b"subnE", "\u{2ACB}"), + (b"subne", "\u{228A}"), + (b"subplus", "\u{2ABF}"), + (b"subrarr", "\u{2979}"), + (b"subset", "\u{2282}"), + (b"subseteq", "\u{2286}"), + (b"subseteqq", "\u{2AC5}"), + (b"subsetneq", "\u{228A}"), + (b"subsetneqq", "\u{2ACB}"), + (b"subsim", "\u{2AC7}"), + (b"subsub", "\u{2AD5}"), + (b"subsup", "\u{2AD3}"), + (b"succ", "\u{227B}"), + (b"succapprox", "\u{2AB8}"), + (b"succcurlyeq", "\u{227D}"), + (b"succeq", "\u{2AB0}"), + (b"succnapprox", "\u{2ABA}"), + (b"succneqq", "\u{2AB6}"), + (b"succnsim", "\u{22E9}"), + (b"succsim", "\u{227F}"), + (b"sum", "\u{2211}"), + (b"sung", "\u{266A}"), + (b"sup", "\u{2283}"), + (b"sup1", "\u{00B9}"), + (b"sup2", "\u{00B2}"), + (b"sup3", "\u{00B3}"), + (b"supE", "\u{2AC6}"), + (b"supdot", "\u{2ABE}"), + (b"supdsub", "\u{2AD8}"), + (b"supe", "\u{2287}"), + (b"supedot", "\u{2AC4}"), + (b"suphsol", "\u{27C9}"), + (b"suphsub", "\u{2AD7}"), + (b"suplarr", "\u{297B}"), + (b"supmult", "\u{2AC2}"), + (b"supnE", "\u{2ACC}"), + (b"supne", "\u{228B}"), + (b"supplus", "\u{2AC0}"), + (b"supset", "\u{2283}"), + (b"supseteq", "\u{2287}"), + (b"supseteqq", "\u{2AC6}"), + (b"supsetneq", "\u{228B}"), + (b"supsetneqq", "\u{2ACC}"), + (b"supsim", "\u{2AC8}"), + (b"supsub", "\u{2AD4}"), + (b"supsup", "\u{2AD6}"), + (b"swArr", "\u{21D9}"), + (b"swarhk", "\u{2926}"), + (b"swarr", "\u{2199}"), + (b"swarrow", "\u{2199}"), + (b"swnwar", "\u{292A}"), + (b"szlig", "\u{00DF}"), + (b"target", "\u{2316}"), + (b"tau", "\u{03C4}"), + (b"tbrk", "\u{23B4}"), + (b"tcaron", "\u{0165}"), + (b"tcedil", "\u{0163}"), + (b"tcy", "\u{0442}"), + (b"tdot", "\u{20DB}"), + (b"telrec", "\u{2315}"), + (b"tfr", "\u{1D531}"), + (b"there4", "\u{2234}"), + (b"therefore", "\u{2234}"), + (b"theta", "\u{03B8}"), + (b"thetasym", "\u{03D1}"), + (b"thetav", "\u{03D1}"), + (b"thickapprox", "\u{2248}"), + (b"thicksim", "\u{223C}"), + (b"thinsp", "\u{2009}"), + (b"thkap", "\u{2248}"), + (b"thksim", "\u{223C}"), + (b"thorn", "\u{00FE}"), + (b"tilde", "\u{02DC}"), + (b"times", "\u{00D7}"), + (b"timesb", "\u{22A0}"), + (b"timesbar", "\u{2A31}"), + (b"timesd", "\u{2A30}"), + (b"tint", "\u{222D}"), + (b"toea", "\u{2928}"), + (b"top", "\u{22A4}"), + (b"topbot", "\u{2336}"), + (b"topcir", "\u{2AF1}"), + (b"topf", "\u{1D565}"), + (b"topfork", "\u{2ADA}"), + (b"tosa", "\u{2929}"), + (b"tprime", "\u{2034}"), + (b"trade", "\u{2122}"), + (b"triangle", "\u{25B5}"), + (b"triangledown", "\u{25BF}"), + (b"triangleleft", "\u{25C3}"), + (b"trianglelefteq", "\u{22B4}"), + (b"triangleq", "\u{225C}"), + (b"triangleright", "\u{25B9}"), + (b"trianglerighteq", "\u{22B5}"), + (b"tridot", "\u{25EC}"), + (b"trie", "\u{225C}"), + (b"triminus", "\u{2A3A}"), + (b"triplus", "\u{2A39}"), + (b"trisb", "\u{29CD}"), + (b"tritime", "\u{2A3B}"), + (b"trpezium", "\u{23E2}"), + (b"tscr", "\u{1D4C9}"), + (b"tscy", "\u{0446}"), + (b"tshcy", "\u{045B}"), + (b"tstrok", "\u{0167}"), + (b"twixt", "\u{226C}"), + (b"twoheadleftarrow", "\u{219E}"), + (b"twoheadrightarrow", "\u{21A0}"), + (b"uArr", "\u{21D1}"), + (b"uHar", "\u{2963}"), + (b"uacute", "\u{00FA}"), + (b"uarr", "\u{2191}"), + (b"ubrcy", "\u{045E}"), + (b"ubreve", "\u{016D}"), + (b"ucirc", "\u{00FB}"), + (b"ucy", "\u{0443}"), + (b"udarr", "\u{21C5}"), + (b"udblac", "\u{0171}"), + (b"udhar", "\u{296E}"), + (b"ufisht", "\u{297E}"), + (b"ufr", "\u{1D532}"), + (b"ugrave", "\u{00F9}"), + (b"uharl", "\u{21BF}"), + (b"uharr", "\u{21BE}"), + (b"uhblk", "\u{2580}"), + (b"ulcorn", "\u{231C}"), + (b"ulcorner", "\u{231C}"), + (b"ulcrop", "\u{230F}"), + (b"ultri", "\u{25F8}"), + (b"umacr", "\u{016B}"), + (b"uml", "\u{00A8}"), + (b"uogon", "\u{0173}"), + (b"uopf", "\u{1D566}"), + (b"uparrow", "\u{2191}"), + (b"updownarrow", "\u{2195}"), + (b"upharpoonleft", "\u{21BF}"), + (b"upharpoonright", "\u{21BE}"), + (b"uplus", "\u{228E}"), + (b"upsi", "\u{03C5}"), + (b"upsih", "\u{03D2}"), + (b"upsilon", "\u{03C5}"), + (b"upuparrows", "\u{21C8}"), + (b"urcorn", "\u{231D}"), + (b"urcorner", "\u{231D}"), + (b"urcrop", "\u{230E}"), + (b"uring", "\u{016F}"), + (b"urtri", "\u{25F9}"), + (b"uscr", "\u{1D4CA}"), + (b"utdot", "\u{22F0}"), + (b"utilde", "\u{0169}"), + (b"utri", "\u{25B5}"), + (b"utrif", "\u{25B4}"), + (b"uuarr", "\u{21C8}"), + (b"uuml", "\u{00FC}"), + (b"uwangle", "\u{29A7}"), + (b"vArr", "\u{21D5}"), + (b"vBar", "\u{2AE8}"), + (b"vBarv", "\u{2AE9}"), + (b"vDash", "\u{22A8}"), + (b"vangrt", "\u{299C}"), + (b"varepsilon", "\u{03F5}"), + (b"varkappa", "\u{03F0}"), + (b"varnothing", "\u{2205}"), + (b"varphi", "\u{03D5}"), + (b"varpi", "\u{03D6}"), + (b"varpropto", "\u{221D}"), + (b"varr", "\u{2195}"), + (b"varrho", "\u{03F1}"), + (b"varsigma", "\u{03C2}"), + (b"varsubsetneq", "\u{228A}\u{FE00}"), + (b"varsubsetneqq", "\u{2ACB}\u{FE00}"), + (b"varsupsetneq", "\u{228B}\u{FE00}"), + (b"varsupsetneqq", "\u{2ACC}\u{FE00}"), + (b"vartheta", "\u{03D1}"), + (b"vartriangleleft", "\u{22B2}"), + (b"vartriangleright", "\u{22B3}"), + (b"vcy", "\u{0432}"), + (b"vdash", "\u{22A2}"), + (b"vee", "\u{2228}"), + (b"veebar", "\u{22BB}"), + (b"veeeq", "\u{225A}"), + (b"vellip", "\u{22EE}"), + (b"verbar", "\u{007C}"), + (b"vert", "\u{007C}"), + (b"vfr", "\u{1D533}"), + (b"vltri", "\u{22B2}"), + (b"vnsub", "\u{2282}\u{20D2}"), + (b"vnsup", "\u{2283}\u{20D2}"), + (b"vopf", "\u{1D567}"), + (b"vprop", "\u{221D}"), + (b"vrtri", "\u{22B3}"), + (b"vscr", "\u{1D4CB}"), + (b"vsubnE", "\u{2ACB}\u{FE00}"), + (b"vsubne", "\u{228A}\u{FE00}"), + (b"vsupnE", "\u{2ACC}\u{FE00}"), + (b"vsupne", "\u{228B}\u{FE00}"), + (b"vzigzag", "\u{299A}"), + (b"wcirc", "\u{0175}"), + (b"wedbar", "\u{2A5F}"), + (b"wedge", "\u{2227}"), + (b"wedgeq", "\u{2259}"), + (b"weierp", "\u{2118}"), + (b"wfr", "\u{1D534}"), + (b"wopf", "\u{1D568}"), + (b"wp", "\u{2118}"), + (b"wr", "\u{2240}"), + (b"wreath", "\u{2240}"), + (b"wscr", "\u{1D4CC}"), + (b"xcap", "\u{22C2}"), + (b"xcirc", "\u{25EF}"), + (b"xcup", "\u{22C3}"), + (b"xdtri", "\u{25BD}"), + (b"xfr", "\u{1D535}"), + (b"xhArr", "\u{27FA}"), + (b"xharr", "\u{27F7}"), + (b"xi", "\u{03BE}"), + (b"xlArr", "\u{27F8}"), + (b"xlarr", "\u{27F5}"), + (b"xmap", "\u{27FC}"), + (b"xnis", "\u{22FB}"), + (b"xodot", "\u{2A00}"), + (b"xopf", "\u{1D569}"), + (b"xoplus", "\u{2A01}"), + (b"xotime", "\u{2A02}"), + (b"xrArr", "\u{27F9}"), + (b"xrarr", "\u{27F6}"), + (b"xscr", "\u{1D4CD}"), + (b"xsqcup", "\u{2A06}"), + (b"xuplus", "\u{2A04}"), + (b"xutri", "\u{25B3}"), + (b"xvee", "\u{22C1}"), + (b"xwedge", "\u{22C0}"), + (b"yacute", "\u{00FD}"), + (b"yacy", "\u{044F}"), + (b"ycirc", "\u{0177}"), + (b"ycy", "\u{044B}"), + (b"yen", "\u{00A5}"), + (b"yfr", "\u{1D536}"), + (b"yicy", "\u{0457}"), + (b"yopf", "\u{1D56A}"), + (b"yscr", "\u{1D4CE}"), + (b"yucy", "\u{044E}"), + (b"yuml", "\u{00FF}"), + (b"zacute", "\u{017A}"), + (b"zcaron", "\u{017E}"), + (b"zcy", "\u{0437}"), + (b"zdot", "\u{017C}"), + (b"zeetrf", "\u{2128}"), + (b"zeta", "\u{03B6}"), + (b"zfr", "\u{1D537}"), + (b"zhcy", "\u{0436}"), + (b"zigrarr", "\u{21DD}"), + (b"zopf", "\u{1D56B}"), + (b"zscr", "\u{1D4CF}"), + (b"zwj", "\u{200D}"), + (b"zwnj", "\u{200C}"), + ]; + +pub(crate) fn get_entity(bytes: &[u8]) -> Option<&'static str> { + ENTITIES.binary_search_by_key(&bytes, |&(key, _value)| key).ok().map(|i| ENTITIES[i].1) +} + diff --git a/vendor/pulldown-cmark/src/escape.rs b/vendor/pulldown-cmark/src/escape.rs new file mode 100644 index 0000000000..51b8672c56 --- /dev/null +++ b/vendor/pulldown-cmark/src/escape.rs @@ -0,0 +1,298 @@ +// Copyright 2015 Google Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +//! Utility functions for HTML escaping + +use std::io; +use std::str::from_utf8; + +use crate::html::StrWrite; + +static HREF_SAFE: [u8; 128] = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + ]; + +static HEX_CHARS: &'static [u8] = b"0123456789ABCDEF"; +static AMP_ESCAPE: &'static str = "&"; +static SLASH_ESCAPE: &'static str = "'"; + +pub(crate) fn escape_href(mut w: W, s: &str) -> io::Result<()> +where + W: StrWrite, +{ + let bytes = s.as_bytes(); + let mut mark = 0; + for i in 0..bytes.len() { + let c = bytes[i]; + if c >= 0x80 || HREF_SAFE[c as usize] == 0 { + // character needing escape + + // write partial substring up to mark + if mark < i { + w.write_str(&s[mark..i])?; + } + match c { + b'&' => { + w.write_str(AMP_ESCAPE)?; + } + b'\'' => { + w.write_str(SLASH_ESCAPE)?; + } + _ => { + let mut buf = [0u8; 3]; + buf[0] = b'%'; + buf[1] = HEX_CHARS[((c as usize) >> 4) & 0xF]; + buf[2] = HEX_CHARS[(c as usize) & 0xF]; + let escaped = from_utf8(&buf).unwrap(); + w.write_str(escaped)?; + } + } + mark = i + 1; // all escaped characters are ASCII + } + } + w.write_str(&s[mark..]) +} + +static HTML_ESCAPE_TABLE: [u8; 256] = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + ]; + +static HTML_ESCAPES: [&'static str; 5] = [ + "", + """, + "&", + "<", + ">" + ]; + +/// Writes the given string to the Write sink, replacing special HTML bytes +/// (<, >, &, ") by escape sequences. +pub(crate) fn escape_html(w: W, s: &str) -> io::Result<()> { + #[cfg(all(target_arch = "x86_64", feature="simd"))] + { simd::escape_html(w, s) } + #[cfg(not(all(target_arch = "x86_64", feature="simd")))] + { escape_html_scalar(w, s) } +} + +fn escape_html_scalar(mut w: W, s: &str) -> io::Result<()> { + let bytes = s.as_bytes(); + let mut mark = 0; + let mut i = 0; + while i < s.len() { + match bytes[i..] + .iter() + .position(|&c| HTML_ESCAPE_TABLE[c as usize] != 0) + { + Some(pos) => { + i += pos; + } + None => break, + } + let c = bytes[i]; + let escape = HTML_ESCAPE_TABLE[c as usize]; + if escape != 0 { + let escape_seq = HTML_ESCAPES[escape as usize]; + w.write_str(&s[mark..i])?; + w.write_str(escape_seq)?; + mark = i + 1; // all escaped characters are ASCII + } + i += 1; + } + w.write_str(&s[mark..]) +} + +#[cfg(all(target_arch = "x86_64", feature="simd"))] +mod simd { + use std::arch::x86_64::*; + use std::io; + use std::mem::size_of; + use crate::html::StrWrite; + + const VECTOR_SIZE: usize = size_of::<__m128i>(); + + pub(crate) fn escape_html(mut w: W, s: &str) -> io::Result<()> { + // The SIMD accelerated code uses the PSHUFB instruction, which is part + // of the SSSE3 instruction set. Further, we can only use this code if + // the buffer is at least one VECTOR_SIZE in length to prevent reading + // out of bounds. If either of these conditions is not met, we fall back + // to scalar code. + if is_x86_feature_detected!("ssse3") && s.len() >= VECTOR_SIZE { + let bytes = s.as_bytes(); + let mut mark = 0; + + unsafe { + foreach_special_simd(bytes, 0, |i| { + let escape_ix = *bytes.get_unchecked(i) as usize; + let replacement = super::HTML_ESCAPES[super::HTML_ESCAPE_TABLE[escape_ix] as usize]; + w.write_str(&s.get_unchecked(mark..i))?; + mark = i + 1; // all escaped characters are ASCII + w.write_str(replacement) + })?; + w.write_str(&s.get_unchecked(mark..)) + } + } else { + super::escape_html_scalar(w, s) + } + } + + /// Creates the lookup table for use in `compute_mask`. + const fn create_lookup() -> [u8; 16] { + let mut table = [0; 16]; + table[(b'<' & 0x0f) as usize] = b'<'; + table[(b'>' & 0x0f) as usize] = b'>'; + table[(b'&' & 0x0f) as usize] = b'&'; + table[(b'"' & 0x0f) as usize] = b'"'; + table[0] = 0b0111_1111; + table + } + + #[target_feature(enable = "ssse3")] + /// Computes a byte mask at given offset in the byte buffer. Its first 16 (least significant) + /// bits correspond to whether there is an HTML special byte (&, <, ", >) at the 16 bytes + /// `bytes[offset..]`. For example, the mask `(1 << 3)` states that there is an HTML byte + /// at `offset + 3`. It is only safe to call this function when + /// `bytes.len() >= offset + VECTOR_SIZE`. + unsafe fn compute_mask(bytes: &[u8], offset: usize) -> i32 { + debug_assert!(bytes.len() >= offset + VECTOR_SIZE); + + let table = create_lookup(); + let lookup = _mm_loadu_si128(table.as_ptr() as *const __m128i); + let raw_ptr = bytes.as_ptr().offset(offset as isize) as *const __m128i; + + // Load the vector from memory. + let vector = _mm_loadu_si128(raw_ptr); + // We take the least significant 4 bits of every byte and use them as indices + // to map into the lookup vector. + // Note that shuffle maps bytes with their most significant bit set to lookup[0]. + // Bytes that share their lower nibble with an HTML special byte get mapped to that + // corresponding special byte. Note that all HTML special bytes have distinct lower + // nibbles. Other bytes either get mapped to 0 or 127. + let expected = _mm_shuffle_epi8(lookup, vector); + // We compare the original vector to the mapped output. Bytes that shared a lower + // nibble with an HTML special byte match *only* if they are that special byte. Bytes + // that have either a 0 lower nibble or their most significant bit set were mapped to + // 127 and will hence never match. All other bytes have non-zero lower nibbles but + // were mapped to 0 and will therefore also not match. + let matches = _mm_cmpeq_epi8(expected, vector); + + // Translate matches to a bitmask, where every 1 corresponds to a HTML special character + // and a 0 is a non-HTML byte. + _mm_movemask_epi8(matches) + } + + /// Calls the given function with the index of every byte in the given byteslice + /// that is either ", &, <, or > and for no other byte. + /// Make sure to only call this when `bytes.len() >= 16`, undefined behaviour may + /// occur otherwise. + #[target_feature(enable = "ssse3")] + unsafe fn foreach_special_simd(bytes: &[u8], mut offset: usize, mut callback: F) -> io::Result<()> + where F: FnMut(usize) -> io::Result<()> + { + // The strategy here is to walk the byte buffer in chunks of VECTOR_SIZE (16) + // bytes at a time starting at the given offset. For each chunk, we compute a + // a bitmask indicating whether the corresponding byte is a HTML special byte. + // We then iterate over all the 1 bits in this mask and call the callback function + // with the corresponding index in the buffer. + // When the number of HTML special bytes in the buffer is relatively low, this + // allows us to quickly go through the buffer without a lookup and for every + // single byte. + + debug_assert!(bytes.len() >= VECTOR_SIZE); + let upperbound = bytes.len() - VECTOR_SIZE; + while offset < upperbound { + let mut mask = compute_mask(bytes, offset); + while mask != 0 { + let ix = mask.trailing_zeros(); + callback(offset + ix as usize)?; + mask ^= mask & -mask; + } + offset += VECTOR_SIZE; + } + + // Final iteration. We align the read with the end of the slice and + // shift off the bytes at start we have already scanned. + let mut mask = compute_mask(bytes, upperbound); + mask >>= offset - upperbound; + while mask != 0 { + let ix = mask.trailing_zeros(); + callback(offset + ix as usize)?; + mask ^= mask & -mask; + } + Ok(()) + } + + #[cfg(test)] + mod html_scan_tests { + #[test] + fn multichunk() { + let mut vec = Vec::new(); + unsafe { + super::foreach_special_simd( + "&aXaaaa.a'aa9a<>aab&".as_bytes(), + 0, + |ix| Ok(vec.push(ix)) + ).unwrap(); + } + assert_eq!(vec, vec![0, 14, 15, 19]); + } + + // only match these bytes, and when we match them, match them VECTOR_SIZE times + #[test] + fn only_right_bytes_matched() { + for b in 0..255u8 { + let right_byte = b == b'&' || b == b'<' || b == b'>' || b == b'"'; + let vek = vec![b; super::VECTOR_SIZE]; + let mut match_count = 0; + unsafe { + super::foreach_special_simd( + &vek, + 0, + |_| { match_count += 1; Ok(()) } + ).unwrap(); + } + assert!((match_count > 0) == (match_count == super::VECTOR_SIZE)); + assert_eq!((match_count == super::VECTOR_SIZE), right_byte, "match_count: {}, byte: {:?}", match_count, b as char); + } + } + } +} + diff --git a/vendor/pulldown-cmark/src/html.rs b/vendor/pulldown-cmark/src/html.rs new file mode 100644 index 0000000000..718ce74377 --- /dev/null +++ b/vendor/pulldown-cmark/src/html.rs @@ -0,0 +1,523 @@ +// Copyright 2015 Google Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +//! HTML renderer that takes an iterator of events as input. + +use std::collections::HashMap; +use std::io::{self, Write, ErrorKind}; +use std::fmt::{Arguments, Write as FmtWrite}; + +use crate::parse::{LinkType, Event, Tag, Alignment}; +use crate::parse::Event::*; +use crate::strings::CowStr; +use crate::escape::{escape_html, escape_href}; + +enum TableState { + Head, + Body, +} + +/// This wrapper exists because we can't have both a blanket implementation +/// for all types implementing `Write` and types of the for `&mut W` where +/// `W: StrWrite`. Since we need the latter a lot, we choose to wrap +/// `Write` types. +struct WriteWrapper(W); + +/// Trait that allows writing string slices. This is basically an extension +/// of `std::io::Write` in order to include `String`. +pub(crate) trait StrWrite { + fn write_str(&mut self, s: &str) -> io::Result<()>; + + fn write_fmt(&mut self, args: Arguments) -> io::Result<()>; +} + +impl StrWrite for WriteWrapper + where W: Write +{ + #[inline] + fn write_str(&mut self, s: &str) -> io::Result<()> { + self.0.write_all(s.as_bytes()) + } + + #[inline] + fn write_fmt(&mut self, args: Arguments) -> io::Result<()> { + self.0.write_fmt(args) + } +} + +impl<'w> StrWrite for String { + #[inline] + fn write_str(&mut self, s: &str) -> io::Result<()> { + self.push_str(s); + Ok(()) + } + + #[inline] + fn write_fmt(&mut self, args: Arguments) -> io::Result<()> { + // FIXME: translate fmt error to io error? + FmtWrite::write_fmt(self, args).map_err(|_| ErrorKind::Other.into()) + } +} + +impl StrWrite for &'_ mut W + where W: StrWrite +{ + #[inline] + fn write_str(&mut self, s: &str) -> io::Result<()> { + (**self).write_str(s) + } + + #[inline] + fn write_fmt(&mut self, args: Arguments) -> io::Result<()> { + (**self).write_fmt(args) + } +} + +struct HtmlWriter<'a, I, W> { + /// Iterator supplying events. + iter: I, + + /// Writer to write to. + writer: W, + + /// Whether or not the last write wrote a newline. + end_newline: bool, + + table_state: TableState, + table_alignments: Vec, + table_cell_index: usize, + numbers: HashMap, usize>, +} + +impl<'a, I, W> HtmlWriter<'a, I, W> +where + I: Iterator>, + W: StrWrite, +{ + fn new(iter: I, writer: W) -> Self { + Self { + iter, + writer, + end_newline: true, + table_state: TableState::Head, + table_alignments: vec![], + table_cell_index: 0, + numbers: HashMap::new(), + } + } + + /// Writes a new line. + fn write_newline(&mut self) -> io::Result<()> { + self.end_newline = true; + self.writer.write_str("\n") + } + + /// Writes a buffer, and tracks whether or not a newline was written. + #[inline] + fn write(&mut self, s: &str) -> io::Result<()> { + self.writer.write_str(s)?; + + if !s.is_empty() { + self.end_newline = s.ends_with('\n'); + } + Ok(()) + } + + pub fn run(mut self) -> io::Result<()> { + while let Some(event) = self.iter.next() { + match event { + Start(tag) => { + self.start_tag(tag)?; + } + End(tag) => { + self.end_tag(tag)?; + } + Text(text) => { + escape_html(&mut self.writer, &text)?; + self.end_newline = text.ends_with('\n'); + } + Code(text) => { + self.write("")?; + escape_html(&mut self.writer, &text)?; + self.write("")?; + } + Html(html) | InlineHtml(html) => { + self.write(&html)?; + } + SoftBreak => { + self.write_newline()?; + } + HardBreak => { + self.write("
\n")?; + } + FootnoteReference(name) => { + let len = self.numbers.len() + 1; + self.write("")?; + let number = *self.numbers.entry(name).or_insert(len); + write!(&mut self.writer, "{}", number)?; + self.write("")?; + } + TaskListMarker(true) => { + self.write("\n")?; + } + TaskListMarker(false) => { + self.write("\n")?; + } + } + } + Ok(()) + } + + /// Writes the start of an HTML tag. + fn start_tag(&mut self, tag: Tag<'a>) -> io::Result<()> { + match tag { + Tag::Paragraph => { + if self.end_newline { + self.write("

") + } else { + self.write("\n

") + } + } + Tag::Rule => { + if self.end_newline { + self.write("


\n") + } else { + self.write("\n
\n") + } + } + Tag::Header(level) => { + if self.end_newline { + self.end_newline = false; + write!(&mut self.writer, "", level) + } else { + write!(&mut self.writer, "\n", level) + } + } + Tag::Table(alignments) => { + self.table_alignments = alignments; + self.write("") + } + Tag::TableHead => { + self.table_state = TableState::Head; + self.table_cell_index = 0; + self.write("") + } + Tag::TableRow => { + self.table_cell_index = 0; + self.write("") + } + Tag::TableCell => { + match self.table_state { + TableState::Head => { + self.write(" { + self.write(" { + self.write(" align=\"left\">") + } + Some(&Alignment::Center) => { + self.write(" align=\"center\">") + } + Some(&Alignment::Right) => { + self.write(" align=\"right\">") + } + _ => self.write(">"), + } + } + Tag::BlockQuote => { + if self.end_newline { + self.write("
\n") + } else { + self.write("\n
\n") + } + } + Tag::CodeBlock(info) => { + if !self.end_newline { + self.write_newline()?; + } + let lang = info.split(' ').next().unwrap(); + if lang.is_empty() { + self.write("
")
+                } else {
+                    self.write("
")
+                }
+            }
+            Tag::List(Some(1)) => {
+                if self.end_newline {
+                    self.write("
    \n") + } else { + self.write("\n
      \n") + } + } + Tag::List(Some(start)) => { + if self.end_newline { + self.write("
        \n") + } + Tag::List(None) => { + if self.end_newline { + self.write("
\n")?; + } + Tag::TableHead => { + self.write("\n")?; + self.table_state = TableState::Body; + } + Tag::TableRow => { + self.write("\n")?; + } + Tag::TableCell => { + match self.table_state { + TableState::Head => { + self.write("")?; + } + TableState::Body => { + self.write("")?; + } + } + self.table_cell_index += 1; + } + Tag::BlockQuote => { + self.write("\n")?; + } + Tag::CodeBlock(_) => { + self.write("
\n")?; + } + Tag::List(Some(_)) => { + self.write("\n")?; + } + Tag::List(None) => { + self.write("\n")?; + } + Tag::Item => { + self.write("\n")?; + } + Tag::Emphasis => { + self.write("")?; + } + Tag::Strong => { + self.write("")?; + } + Tag::Strikethrough => { + self.write("")?; + } + Tag::Link(_, _, _) => { + self.write("")?; + } + Tag::Image(_, _, _) => (), // shouldn't happen, handled in start + Tag::FootnoteDefinition(_) => { + self.write("\n")?; + } + Tag::HtmlBlock => {} + } + Ok(()) + } + + // run raw text, consuming end tag + fn raw_text(&mut self) -> io::Result<()> { + let mut nest = 0; + while let Some(event) = self.iter.next() { + match event { + Start(_) => nest += 1, + End(_) => { + if nest == 0 { + break; + } + nest -= 1; + } + Html(_) => (), + InlineHtml(text) | Code(text) | Text(text) => { + escape_html(&mut self.writer, &text)?; + self.end_newline = text.ends_with('\n'); + } + SoftBreak | HardBreak => { + self.write(" ")?; + } + FootnoteReference(name) => { + let len = self.numbers.len() + 1; + let number = *self.numbers.entry(name).or_insert(len); + write!(&mut self.writer, "[{}]", number)?; + } + TaskListMarker(true) => self.write("[x]")?, + TaskListMarker(false) => self.write("[ ]")?, + } + } + Ok(()) + } +} + +/// Iterate over an `Iterator` of `Event`s, generate HTML for each `Event`, and +/// push it to a `String`. +/// +/// # Examples +/// +/// ``` +/// use pulldown_cmark::{html, Parser}; +/// +/// let markdown_str = r#" +/// hello +/// ===== +/// +/// * alpha +/// * beta +/// "#; +/// let parser = Parser::new(markdown_str); +/// +/// let mut html_buf = String::new(); +/// html::push_html(&mut html_buf, parser); +/// +/// assert_eq!(html_buf, r#"

hello

+///
    +///
  • alpha
  • +///
  • beta
  • +///
+/// "#); +/// ``` +pub fn push_html<'a, I>(s: &mut String, iter: I) +where + I: Iterator>, +{ + HtmlWriter::new(iter, s).run().unwrap(); +} + +/// Iterate over an `Iterator` of `Event`s, generate HTML for each `Event`, and +/// write it out to a writable stream. +/// +/// **Note**: using this function with an unbuffered writer like a file or socket +/// will result in poor performance. Wrap these in a +/// [`BufWriter`](https://doc.rust-lang.org/std/io/struct.BufWriter.html) to +/// prevent unnecessary slowdowns. +/// +/// # Examples +/// +/// ``` +/// use pulldown_cmark::{html, Parser}; +/// use std::io::Cursor; +/// +/// let markdown_str = r#" +/// hello +/// ===== +/// +/// * alpha +/// * beta +/// "#; +/// let mut bytes = Vec::new(); +/// let parser = Parser::new(markdown_str); +/// +/// html::write_html(Cursor::new(&mut bytes), parser); +/// +/// assert_eq!(&String::from_utf8_lossy(&bytes)[..], r#"

hello

+///
    +///
  • alpha
  • +///
  • beta
  • +///
+/// "#); +/// ``` +pub fn write_html<'a, I, W>(writer: W, iter: I) -> io::Result<()> +where + I: Iterator>, + W: Write, +{ + HtmlWriter::new(iter, WriteWrapper(writer)).run() +} diff --git a/vendor/pulldown-cmark/src/lib.rs b/vendor/pulldown-cmark/src/lib.rs new file mode 100644 index 0000000000..adf48b2482 --- /dev/null +++ b/vendor/pulldown-cmark/src/lib.rs @@ -0,0 +1,74 @@ +// Copyright 2015 Google Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +//! Pull parser for [CommonMark](https://commonmark.org). This crate provides a [Parser](struct.Parser.html) struct +//! which is an iterator over [Event](enum.Event.html)s. This iterator can be used +//! directly, or to output HTML using the [HTML module](html/index.html). +//! +//! By default, only CommonMark features are enabled. To use extensions like tables, +//! footnotes or task lists, enable by setting the corresponding flags in the +//! [Options](struct.Options.html) struct. +//! +//! # Example +//! ```rust +//! use pulldown_cmark::{Parser, Options, html}; +//! +//! let markdown_input = "Hello world, this is a ~~complicated~~ *very simple* example."; +//! +//! // Set up options and parser. Strikethroughs are not part of the CommonMark standard +//! // and we therefore must enable it explicitly. +//! let mut options = Options::empty(); +//! options.insert(Options::ENABLE_STRIKETHROUGH); +//! let parser = Parser::new_ext(markdown_input, options); +//! +//! // Write to String buffer. +//! let mut html_output = String::new(); +//! html::push_html(&mut html_output, parser); +//! +//! // Check that the output is what we expected. +//! let expected_html = "

Hello world, this is a complicated very simple example.

\n"; +//! assert_eq!(expected_html, &html_output); +//! ``` + +// When compiled for the rustc compiler itself we want to make sure that this is +// an unstable crate. +#![cfg_attr(rustbuild, feature(staged_api, rustc_private))] +#![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))] + +pub mod html; + +#[macro_use] +extern crate bitflags; +extern crate unicase; + +mod scanners; +mod entities; +mod escape; +mod puncttable; +mod parse; +mod tree; +mod linklabel; +mod strings; + +#[cfg(all(target_arch = "x86_64", feature="simd"))] +mod simd; + +pub use crate::parse::{Parser, OffsetIter, Alignment, Event, Tag, Options, LinkType}; +pub use crate::strings::{CowStr, InlineStr}; diff --git a/vendor/pulldown-cmark/src/linklabel.rs b/vendor/pulldown-cmark/src/linklabel.rs new file mode 100644 index 0000000000..55bbbc083f --- /dev/null +++ b/vendor/pulldown-cmark/src/linklabel.rs @@ -0,0 +1,143 @@ +// Copyright 2018 Google LLC +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +//! Link label parsing and matching. + +use unicase::UniCase; + +use crate::strings::CowStr; +use crate::scanners::{scan_eol, is_ascii_whitespace}; + +pub enum ReferenceLabel<'a> { + Link(CowStr<'a>), + Footnote(CowStr<'a>), +} + +pub type LinkLabel<'a> = UniCase>; + +/// Returns number of bytes (including brackets) and label on success. +pub(crate) fn scan_link_label(text: &str) -> Option<(usize, ReferenceLabel<'_>)> { + if text.len() < 2 || text.as_bytes()[0] != b'[' { return None; } + let pair = if b'^' == text.as_bytes()[1] { + let (byte_index, cow) = scan_link_label_rest(&text[2..])?; + (byte_index + 2, ReferenceLabel::Footnote(cow)) + } else { + let (byte_index, cow) = scan_link_label_rest(&text[1..])?; + (byte_index + 1, ReferenceLabel::Link(cow)) + }; + Some(pair) +} + +/// Assumes the opening bracket has already been scanned. +/// Returns the number of bytes read (including closing bracket) and label on success. +pub(crate) fn scan_link_label_rest(text: &str) -> Option<(usize, CowStr<'_>)> { + let bytes = text.as_bytes(); + let mut ix = 0; + let mut only_white_space = true; + let mut codepoints = 0; + // no worries, doesnt allocate until we push things onto it + let mut label = String::new(); + let mut mark = 0; + + loop { + if codepoints >= 1000 { return None; } + match *bytes.get(ix)? { + b'[' => return None, + b']' => break, + b'\\' => { + ix += 2; + codepoints += 2; + only_white_space = false; + } + b if is_ascii_whitespace(b) => { + // normalize labels by collapsing whitespaces, including linebreaks + let mut whitespaces = 0; + let mut linebreaks = 0; + let whitespace_start = ix; + + while ix < bytes.len() && is_ascii_whitespace(bytes[ix]) { + if let Some(eol_bytes) = scan_eol(&bytes[ix..]) { + linebreaks += 1; + if linebreaks > 1 { + return None; + } + ix += eol_bytes; + whitespaces += 2; // indicate that we need to replace + } else { + whitespaces += if bytes[ix] == b' ' { + 1 + } else { + 2 + }; + ix += 1; + } + } + if whitespaces > 1 { + label.push_str(&text[mark..whitespace_start]); + label.push(' '); + mark = ix; + codepoints += ix - whitespace_start; + } else { + codepoints += 1; + } + } + b => { + only_white_space = false; + ix += 1; + if b & 0b1000_0000 != 0 { + codepoints += 1; + } + } + } + } + + if only_white_space { + None + } else { + let cow = if mark == 0 { + text[..ix].into() + } else { + label.push_str(&text[mark..ix]); + label.into() + }; + Some((ix + 1, cow)) + } +} + + +#[cfg(test)] +mod test { + use super::scan_link_label_rest; + + #[test] + fn whitespace_normalization() { + let input = "«\t\tBlurry Eyes\t\t»][blurry_eyes]"; + let expected_output = "« Blurry Eyes »"; // regular spaces! + + let (_bytes, normalized_label) = scan_link_label_rest(input).unwrap(); + assert_eq!(expected_output, normalized_label.as_ref()); + } + + #[test] + fn return_carriage_linefeed_ok() { + let input = "hello\r\nworld\r\n]"; + assert!(scan_link_label_rest(input).is_some()); + } +} diff --git a/vendor/pulldown-cmark/src/main.rs b/vendor/pulldown-cmark/src/main.rs new file mode 100644 index 0000000000..09a908fcd1 --- /dev/null +++ b/vendor/pulldown-cmark/src/main.rs @@ -0,0 +1,263 @@ +// Copyright 2015 Google Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +//! Command line tool to exercise pulldown-cmark. + +extern crate getopts; + +extern crate pulldown_cmark; + +use pulldown_cmark::Parser; +use pulldown_cmark::Options; +use pulldown_cmark::html; + +use std::mem; +use std::env; +use std::io::{self, Read, Write}; +use std::path::Path; +use std::fs::File; + +fn render_html(text: &str, opts: Options) -> String { + let mut s = String::with_capacity(text.len() * 3 / 2); + let p = Parser::new_ext(text, opts); + html::push_html(&mut s, p); + s +} + +fn dry_run(text:&str, opts: Options) { + let p = Parser::new_ext(text, opts); + let count = p.count(); + println!("{} events", count); +} + +fn print_events(text: &str, opts: Options) { + let mut p = Parser::new_ext(text, opts); + loop { + print!("{}: ", p.get_offset()); + if let Some(event) = p.next() { + println!("{:?}", event); + } else { + break; + } + } + println!("EOF"); +} + +fn read_file(filename: &str) -> String { + let path = Path::new(filename); + let mut file = match File::open(&path) { + Err(why) => panic!("couldn't open {}: {}", path.display(), why), + Ok(file) => file + }; + let mut s = String::new(); + match file.read_to_string(&mut s) { + Err(why) => panic!("couldn't open {}: {}", path.display(), why), + Ok(_) => s + } +} + +// Tests in the spec (v0.26) are of the form: +// +// ```````````````````````````````` example +// +// . +// +// ```````````````````````````````` +struct Spec<'a> { + spec: &'a str, + test_n: usize, +} + +impl<'a> Spec<'a> { + pub fn new(spec: &'a str) -> Self { + Spec{ spec, test_n: 0 } + } +} + +struct TestCase<'a> { + n: usize, + input: &'a str, + expected: &'a str, +} + +impl<'a> TestCase<'a> { + pub fn new(n: usize, input: &'a str, expected: &'a str) -> Self { + TestCase { n, input, expected } + } +} + +impl<'a> Iterator for Spec<'a> { + type Item = TestCase<'a>; + + fn next(&mut self) -> Option> { + let spec = self.spec; + + let i_start = match self.spec.find("```````````````````````````````` example\n").map(|pos| pos + 41) { + Some(pos) => pos, + None => return None, + }; + + let i_end = match self.spec[i_start..].find("\n.\n").map(|pos| (pos + 1) + i_start){ + Some(pos) => pos, + None => return None, + }; + + let e_end = match self.spec[i_end + 2..].find("````````````````````````````````\n").map(|pos| pos + i_end + 2){ + Some(pos) => pos, + None => return None, + }; + + self.test_n += 1; + self.spec = &self.spec[e_end + 33 ..]; + + Some(TestCase::new(self.test_n, &spec[i_start .. i_end], &spec[i_end + 2 .. e_end])) + } +} + +fn run_spec(spec_text: &str, args: &[String], opts: Options) { + let (first, last) = if args.is_empty() { + (None, None) + } else { + let mut iter = args[0].split(".."); + let first = iter.next().and_then(|s| s.parse().ok()); + let last = match iter.next() { + Some(s) => s.parse().ok(), + None => first + }; + (first, last) + }; + + let spec = Spec::new(spec_text); + let mut tests_failed = 0; + let mut tests_run = 0; + let mut fail_report = String::new(); + + for test in spec { + if first.map(|fst| test.n < fst).unwrap_or(false) { continue } + if last.map(|lst| test.n > lst).unwrap_or(false) { break } + + if test.n % 10 == 1 { + if test.n % 40 == 1 { + if test.n > 1 { + println!(); + } + } else { + print!(" "); + } + print!("[{:3}]", test.n); + } else if test.n % 10 == 6 { + print!(" "); + } + + let our_html = render_html(&test.input, opts); + + if our_html == test.expected.replace("→", "\t") { + print!("."); + } else { + if tests_failed == 0 { + fail_report = format!("\nFAIL {}:\n\n---input---\n{:?}\n\n---wanted---\n{:?}\n\n---got---\n{:?}\n", + test.n, test.input, test.expected, our_html); + } + print!("X"); + tests_failed += 1; + } + + let _ = io::stdout().flush(); + tests_run += 1; + } + + println!("\n{}/{} tests passed", tests_run - tests_failed, tests_run); + print!("{}", fail_report); +} + +fn brief(program: &str) -> String { + format!( + "Usage: {} [options]\n\n{}", + program, + "Reads markdown from standard input and emits HTML.", + ) +} + +pub fn main() { + let args: Vec<_> = env::args().collect(); + let mut opts = getopts::Options::new(); + opts.optflag("h", "help", "this help message"); + opts.optflag("d", "dry-run", "dry run, produce no output"); + opts.optflag("e", "events", "print event sequence instead of rendering"); + opts.optflag("T", "enable-tables", "enable GitHub-style tables"); + opts.optflag("F", "enable-footnotes", "enable Hoedown-style footnotes"); + opts.optflag("S", "enable-strikethrough", "enable GitHub-style strikethrough"); + opts.optflag("L", "enable-tasklists", "enable GitHub-style task lists"); + opts.optopt("s", "spec", "run tests from spec file", "FILE"); + opts.optopt("b", "bench", "run benchmark", "FILE"); + let matches = match opts.parse(&args[1..]) { + Ok(m) => m, + Err(f) => { + eprintln!("{}\n{}", f, opts.usage(&brief(&args[0]))); + std::process::exit(1); + } + }; + if matches.opt_present("help") { + println!("{}", opts.usage(&brief(&args[0]))); + return; + } + let mut opts = Options::empty(); + if matches.opt_present("enable-tables") { + opts.insert(Options::ENABLE_TABLES); + } + if matches.opt_present("enable-footnotes") { + opts.insert(Options::ENABLE_FOOTNOTES); + } + if matches.opt_present("enable-strikethrough") { + opts.insert(Options::ENABLE_STRIKETHROUGH); + } + if matches.opt_present("enable-tasklists") { + opts.insert(Options::ENABLE_TASKLISTS); + } + if let Some(filename) = matches.opt_str("spec") { + run_spec(&read_file(&filename).replace("→", "\t"), &matches.free, opts); + } else if let Some(filename) = matches.opt_str("bench") { + let inp = read_file(&filename); + for _ in 0..1000 { + let _ = render_html(&inp, opts); + } + } else { + let mut input = String::new(); + if let Err(why) = io::stdin().lock().read_to_string(&mut input) { + panic!("couldn't read from stdin: {}", why) + } + if matches.opt_present("events") { + print_events(&input, opts); + } else if matches.opt_present("dry-run") { + dry_run(&input, opts); + } else { + let mut p = Parser::new_ext(&input, opts); + let stdio = io::stdout(); + let buffer = std::io::BufWriter::with_capacity(1*1024*1024, stdio.lock()); + html::write_html(buffer, &mut p).unwrap(); + // Since the program will now terminate and the memory will be returned + // to the operating system anyway, there is no point in tidely cleaning + // up all the datastructures we have used. We shouldn't do this if we'd + // do other things after this, because this is basically intentionally + // leaking data. Skipping cleanup let's us return a bit (~5%) faster. + mem::forget(p); + } + } +} diff --git a/vendor/pulldown-cmark/src/parse.rs b/vendor/pulldown-cmark/src/parse.rs new file mode 100644 index 0000000000..86acdb0bc9 --- /dev/null +++ b/vendor/pulldown-cmark/src/parse.rs @@ -0,0 +1,2677 @@ +// Copyright 2017 Google Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +//! Tree-based two pass parser. + +use std::collections::{VecDeque, HashMap}; +use std::ops::{Index, Range}; +use std::cmp::min; + +use unicase::UniCase; + +use crate::strings::CowStr; +use crate::scanners::*; +use crate::tree::{TreePointer, TreeIndex, Tree}; +use crate::linklabel::{scan_link_label, scan_link_label_rest, LinkLabel, ReferenceLabel}; + +#[derive(Clone, Debug, PartialEq)] +pub enum Tag<'a> { + // block-level tags + Paragraph, + Rule, + + /// A heading. The field indicates the level of the heading. + Header(i32), + + BlockQuote, + CodeBlock(CowStr<'a>), + + /// A list. If the list is ordered the field indicates the number of the first item. + List(Option), // TODO: add delim and tight for ast (not needed for html) + Item, + FootnoteDefinition(CowStr<'a>), + HtmlBlock, + + // tables + Table(Vec), + TableHead, + TableRow, + TableCell, + + // span-level tags + Emphasis, + Strong, + Strikethrough, + + /// A link. The first field is the link type, the second the destination URL and the third is a title + Link(LinkType, CowStr<'a>, CowStr<'a>), + + /// An image. The first field is the link type, the second the destination URL and the third is a title + Image(LinkType, CowStr<'a>, CowStr<'a>), +} + +#[derive(Clone, Debug, PartialEq, Copy)] +pub enum LinkType { + /// Inline link like `[foo](bar)` + Inline, + /// Reference link like `[foo][bar]` + Reference, + /// Reference without destination in the document, but resolved by the broken_link_callback + ReferenceUnknown, + /// Collapsed link like `[foo][]` + Collapsed, + /// Collapsed link without destination in the document, but resolved by the broken_link_callback + CollapsedUnknown, + /// Shortcut link like `[foo]` + Shortcut, + /// Shortcut without destination in the document, but resolved by the broken_link_callback + ShortcutUnknown, + /// Autolink like `` + Autolink, + /// Email address in autolink like `` + Email, +} + +impl LinkType { + fn to_unknown(self) -> Self { + match self { + LinkType::Reference => LinkType::ReferenceUnknown, + LinkType::Collapsed => LinkType::CollapsedUnknown, + LinkType::Shortcut => LinkType::ShortcutUnknown, + _ => unreachable!(), + } + } +} + +#[derive(Clone, Debug, PartialEq)] +pub enum Event<'a> { + Start(Tag<'a>), + End(Tag<'a>), + Text(CowStr<'a>), + Code(CowStr<'a>), + Html(CowStr<'a>), + InlineHtml(CowStr<'a>), + FootnoteReference(CowStr<'a>), + SoftBreak, + HardBreak, + /// A task list marker, rendered as a checkbox in HTML. Contains a true when it is checked + TaskListMarker(bool), +} + +#[derive(Copy, Clone, Debug, PartialEq)] +pub enum Alignment { + None, + Left, + Center, + Right, +} + +bitflags! { + pub struct Options: u32 { + const FIRST_PASS = 1 << 0; + const ENABLE_TABLES = 1 << 1; + const ENABLE_FOOTNOTES = 1 << 2; + const ENABLE_STRIKETHROUGH = 1 << 3; + const ENABLE_TASKLISTS = 1 << 4; + } +} + +#[derive(Debug, Default, Clone, Copy)] +struct Item { + start: usize, + end: usize, + body: ItemBody, +} + +#[derive(Debug, PartialEq, Clone, Copy)] +enum ItemBody { + Paragraph, + Text, + SoftBreak, + HardBreak, + + // These are possible inline items, need to be resolved in second pass. + + // repeats, can_open, can_close + MaybeEmphasis(usize, bool, bool), + MaybeCode(usize, bool), // number of backticks, preceeded by backslash + MaybeHtml, + MaybeLinkOpen, + MaybeLinkClose, + MaybeImage, + + // These are inline items after resolution. + Emphasis, + Strong, + Strikethrough, + Code(CowIndex), + InlineHtml, + Link(LinkIndex), + Image(LinkIndex), + FootnoteReference(CowIndex), + TaskListMarker(bool), // true for checked + + Rule, + Header(i32), // header level + FencedCodeBlock(CowIndex), + IndentCodeBlock, + HtmlBlock(Option), // end tag, or none for type 6 + Html, + BlockQuote, + List(bool, u8, usize), // is_tight, list character, list start index + ListItem(usize), // indent level + SynthesizeText(CowIndex), + FootnoteDefinition(CowIndex), + + // Tables + Table(AlignmentIndex), + TableHead, + TableRow, + TableCell, + + // Dummy node at the top of the tree - should not be used otherwise! + Root, +} + +impl<'a> ItemBody { + fn is_inline(&self) -> bool { + match *self { + ItemBody::MaybeEmphasis(..) | ItemBody::MaybeHtml | ItemBody::MaybeCode(..) + | ItemBody::MaybeLinkOpen | ItemBody::MaybeLinkClose | ItemBody::MaybeImage => true, + _ => false, + } + } +} + +impl<'a> Default for ItemBody { + fn default() -> Self { + ItemBody::Root + } +} + +/// Scanning modes for `Parser`'s `parse_line` method. +#[derive(PartialEq, Eq, Copy, Clone)] +enum TableParseMode { + /// Inside a paragraph, scanning for table headers. + Scan, + /// Inside a table. + Active, + /// Inside a paragraph, not scanning for table headers. + Disabled, +} + +/// State for the first parsing pass. +/// +/// The first pass resolves all block structure, generating an AST. Within a block, items +/// are in a linear chain with potential inline markup identified. +struct FirstPass<'a> { + text: &'a str, + tree: Tree, + begin_list_item: bool, + last_line_blank: bool, + allocs: Allocations<'a>, + options: Options, + list_nesting: usize, +} + +impl<'a> FirstPass<'a> { + fn new(text: &'a str, options: Options) -> FirstPass { + // This is a very naive heuristic for the number of nodes + // we'll need. + let start_capacity = std::cmp::max(128, text.len() / 32); + let tree = Tree::with_capacity(start_capacity); + let begin_list_item = false; + let last_line_blank = false; + let allocs = Allocations::new(); + FirstPass { + text, tree, begin_list_item, last_line_blank, + allocs, options, list_nesting: 0 + } + } + + fn run(mut self) -> (Tree, Allocations<'a>) { + let mut ix = 0; + while ix < self.text.len() { + ix = self.parse_block(ix); + } + for _ in 0..self.tree.spine_len() { + self.pop(ix); + } + (self.tree, self.allocs) + } + + /// Returns offset after block. + fn parse_block(&mut self, mut start_ix: usize) -> usize { + let bytes = self.text.as_bytes(); + let mut line_start = LineStart::new(&bytes[start_ix..]); + + let i = self.scan_containers(&mut line_start); + for _ in i..self.tree.spine_len() { + self.pop(start_ix); + } + + if self.options.contains(Options::ENABLE_FOOTNOTES) { + // finish footnote if it's still open and was preceeded by blank line + if let Some(node_ix) = self.tree.peek_up() { + if let ItemBody::FootnoteDefinition(..) = self.tree[node_ix].item.body { + if self.last_line_blank { + self.pop(start_ix); + } + } + } + + // Footnote definitions of the form + // [^bar]: + // * anything really + let container_start = start_ix + line_start.bytes_scanned(); + if let Some(bytecount) = self.parse_footnote(container_start) { + start_ix = container_start + bytecount; + start_ix += scan_blank_line(&bytes[start_ix..]).unwrap_or(0); + line_start = LineStart::new(&bytes[start_ix..]); + } + } + + // Process new containers + loop { + let container_start = start_ix + line_start.bytes_scanned(); + if let Some((ch, index, indent)) = line_start.scan_list_marker() { + let after_marker_index = start_ix + line_start.bytes_scanned(); + self.continue_list(container_start, ch, index); + self.tree.append(Item { + start: container_start, + end: after_marker_index, // will get updated later if item not empty + body: ItemBody::ListItem(indent), + }); + self.tree.push(); + if let Some(n) = scan_blank_line(&bytes[after_marker_index..]) { + self.begin_list_item = true; + return after_marker_index + n; + } + if self.options.contains(Options::ENABLE_TASKLISTS) { + if let Some(is_checked) = line_start.scan_task_list_marker() { + self.tree.append(Item { + start: after_marker_index, + end: start_ix + line_start.bytes_scanned(), + body: ItemBody::TaskListMarker(is_checked), + }); + } + } + } else if line_start.scan_blockquote_marker() { + self.finish_list(start_ix); + self.tree.append(Item { + start: container_start, + end: 0, // will get set later + body: ItemBody::BlockQuote, + }); + self.tree.push(); + } else { + break; + } + } + + let ix = start_ix + line_start.bytes_scanned(); + + if let Some(n) = scan_blank_line(&bytes[ix..]) { + if let Some(node_ix) = self.tree.peek_up() { + match self.tree[node_ix].item.body { + ItemBody::BlockQuote => (), + _ => { + if self.begin_list_item { + // A list item can begin with at most one blank line. + self.pop(start_ix); + } + self.last_line_blank = true; + } + } + } + return ix + n; + } + + self.begin_list_item = false; + self.finish_list(start_ix); + + // Save `remaining_space` here to avoid needing to backtrack `line_start` for HTML blocks + let remaining_space = line_start.remaining_space(); + + let indent = line_start.scan_space_upto(4); + if indent == 4 { + let ix = start_ix + line_start.bytes_scanned(); + let remaining_space = line_start.remaining_space(); + return self.parse_indented_code_block(ix, remaining_space); + } + + let ix = start_ix + line_start.bytes_scanned(); + + // HTML Blocks + if self.text.as_bytes()[ix] == b'<' { + // Types 1-5 are all detected by one function and all end with the same + // pattern + if let Some(html_end_tag_ix) = get_html_end_tag(&bytes[(ix + 1)..]) { + return self.parse_html_block_type_1_to_5(ix, html_end_tag_ix, remaining_space); + } + + // Detect type 6 + let possible_tag = scan_html_block_tag(&bytes[(ix + 1)..]).1; + if is_html_tag(possible_tag) { + return self.parse_html_block_type_6_or_7(ix, remaining_space); + } + + // Detect type 7 + if let Some(_html_bytes) = scan_html_type_7(&bytes[(ix + 1)..]) { + return self.parse_html_block_type_6_or_7(ix, remaining_space); + } + } + + if let Ok(n) = scan_hrule(&bytes[ix..]) { + return self.parse_hrule(n, ix); + } + + if let Some((atx_size, atx_level)) = scan_atx_heading(&bytes[ix..]) { + return self.parse_atx_heading(ix, atx_level, atx_size); + } + + // parse refdef + if let Some((bytecount, label, link_def)) = self.parse_refdef_total(ix) { + self.allocs.refdefs.entry(label).or_insert(link_def); + return ix + bytecount; + } + + if let Some((n, fence_ch)) = scan_code_fence(&bytes[ix..]) { + return self.parse_fenced_code_block(ix, indent, fence_ch, n); + } + self.parse_paragraph(ix) + } + + /// Returns the offset of the first line after the table. + /// Assumptions: current focus is a table element and the table header + /// matches the separator line (same number of columns). + fn parse_table(&mut self, table_cols: usize, head_start: usize, body_start: usize) -> usize { + // parse header. this shouldn't fail because we made sure the table header is ok + let (_sep_start, thead_ix) = self.parse_table_row_inner(head_start, table_cols); + self.tree[thead_ix].item.body = ItemBody::TableHead; + + // parse body + let mut ix = body_start; + while let Some((next_ix, _row_ix)) = self.parse_table_row(ix, table_cols) { + ix = next_ix; + } + + self.pop(ix); + ix + } + + /// Call this when containers are taken care of. + /// Returns bytes scanned, row_ix + fn parse_table_row_inner(&mut self, mut ix: usize, row_cells: usize) -> (usize, TreeIndex) { + let bytes = self.text.as_bytes(); + let mut cells = 0; + let mut final_cell_ix = None; + + let row_ix = self.tree.append(Item { + start: ix, + end: 0, // set at end of this function + body: ItemBody::TableRow, + }); + self.tree.push(); + + loop { + ix += scan_ch(&bytes[ix..], b'|'); + ix += scan_whitespace_no_nl(&bytes[ix..]); + + if let Some(eol_bytes) = scan_eol(&bytes[ix..]) { + ix += eol_bytes; + break; + } + + let cell_ix = self.tree.append(Item { + start: ix, + end: ix, + body: ItemBody::TableCell, + }); + self.tree.push(); + let (next_ix, _brk) = self.parse_line(ix, TableParseMode::Active); + let trailing_whitespace = scan_rev_while(&bytes[..next_ix], is_ascii_whitespace); + + if let TreePointer::Valid(cur_ix) = self.tree.cur() { + self.tree[cur_ix].item.end -= trailing_whitespace; + } + + self.tree[cell_ix].item.end = next_ix - trailing_whitespace; + self.tree.pop(); + + ix = next_ix; + cells += 1; + + if cells == row_cells { + final_cell_ix = Some(cell_ix); + } + } + + // fill empty cells if needed + // note: this is where GFM and commonmark-extra diverge. we follow + // GFM here + for _ in cells..row_cells { + self.tree.append(Item { + start: ix, + end: ix, + body: ItemBody::TableCell, + }); + } + + // drop excess cells + if let Some(cell_ix) = final_cell_ix { + self.tree[cell_ix].next = TreePointer::Nil; + } + + self.pop(ix); + + (ix, row_ix) + } + + /// Returns first offset after the row and the tree index of the row. + fn parse_table_row(&mut self, mut ix: usize, row_cells: usize) -> Option<(usize, TreeIndex)> { + let bytes = self.text.as_bytes(); + let mut line_start = LineStart::new(&bytes[ix..]); + let containers = self.scan_containers(&mut line_start); + if containers != self.tree.spine_len() { + return None; + } + line_start.scan_all_space(); + ix += line_start.bytes_scanned(); + if scan_paragraph_interrupt(&bytes[ix..]) { + return None; + } + + let (ix, row_ix) = self.parse_table_row_inner(ix, row_cells); + Some((ix, row_ix)) + } + + /// Returns offset of line start after paragraph. + fn parse_paragraph(&mut self, start_ix: usize) -> usize { + let node_ix = self.tree.append(Item { + start: start_ix, + end: 0, // will get set later + body: ItemBody::Paragraph, + }); + self.tree.push(); + let bytes = self.text.as_bytes(); + + let mut ix = start_ix; + loop { + let scan_mode = if self.options.contains(Options::ENABLE_TABLES) && ix == start_ix { + TableParseMode::Scan + } else { + TableParseMode::Disabled + }; + let (next_ix, brk) = self.parse_line(ix, scan_mode); + + // break out when we find a table + if let Some(Item { body: ItemBody::Table(alignment_ix), start, end }) = brk { + let table_cols = self.allocs[alignment_ix].len(); + self.tree[node_ix].item = Item { body: ItemBody::Table(alignment_ix), start, end }; + // this clears out any stuff we may have appended - but there may + // be a cleaner way + self.tree[node_ix].child = TreePointer::Nil; + self.tree.pop(); + self.tree.push(); + return self.parse_table(table_cols, ix, next_ix); + } + + ix = next_ix; + let mut line_start = LineStart::new(&bytes[ix..]); + let n_containers = self.scan_containers(&mut line_start); + if !line_start.scan_space(4) { + let ix_new = ix + line_start.bytes_scanned(); + if n_containers == self.tree.spine_len() { + if let Some((n, level)) = scan_setext_heading(&bytes[ix_new..]) { + self.tree[node_ix].item.body = ItemBody::Header(level); + if let Some(Item { start, body: ItemBody::HardBreak, .. }) = brk { + if bytes[start] == b'\\' { + self.tree.append_text(start, start + 1); + } + } + ix = ix_new + n; + break; + } + } + // first check for non-empty lists, then for other interrupts + let suffix = &bytes[ix_new..]; + if self.interrupt_paragraph_by_list(suffix) || scan_paragraph_interrupt(suffix) { + break; + } + } + line_start.scan_all_space(); + ix = next_ix + line_start.bytes_scanned(); + if let Some(item) = brk { + self.tree.append(item); + } + } + + self.pop(ix); + ix + } + + /// Parse a line of input, appending text and items to tree. + /// + /// Returns: index after line and an item representing the break. + fn parse_line(&mut self, start: usize, mode: TableParseMode) -> (usize, Option) { + let bytes = &self.text.as_bytes(); + let mut pipes = 0; + let mut last_pipe_ix = start; + let mut begin_text = start; + + let (final_ix, brk) = iterate_special_bytes(bytes, start, |ix, byte| { + match byte { + b'\n' | b'\r' => { + if let TableParseMode::Active = mode { + return LoopInstruction::BreakAtWith(ix, None); + } + + let mut i = ix; + let eol_bytes = scan_eol(&bytes[ix..]).unwrap(); + if mode == TableParseMode::Scan && pipes > 0 { + // check if we may be parsing a table + let next_line_ix = ix + eol_bytes; + let mut line_start = LineStart::new(&bytes[next_line_ix..]); + if self.scan_containers(&mut line_start) == self.tree.spine_len() { + let table_head_ix = next_line_ix + line_start.bytes_scanned(); + let (table_head_bytes, alignment) = scan_table_head(&bytes[table_head_ix..]); + + if table_head_bytes > 0 { + // computing header count from number of pipes + let header_count = count_header_cols(bytes, pipes, start, last_pipe_ix); + + // make sure they match the number of columns we find in separator line + if alignment.len() == header_count { + let alignment_ix = self.allocs.allocate_alignment(alignment); + let end_ix = table_head_ix + table_head_bytes; + return LoopInstruction::BreakAtWith(end_ix, Some(Item { + start: i, + end: end_ix, // must update later + body: ItemBody::Table(alignment_ix), + })); + } + } + } + } + + let end_ix = ix + eol_bytes; + let trailing_backslashes = scan_rev_while(&bytes[..ix], |b| b == b'\\'); + if trailing_backslashes % 2 == 1 && end_ix < self.text.len() { + i -= 1; + self.tree.append_text(begin_text, i); + return LoopInstruction::BreakAtWith(end_ix, Some(Item { + start: i, + end: end_ix, + body: ItemBody::HardBreak, + })); + } + let trailing_whitespace = scan_rev_while(&bytes[..ix], is_ascii_whitespace_no_nl); + if trailing_whitespace >= 2 { + i -= trailing_whitespace; + self.tree.append_text(begin_text, i); + return LoopInstruction::BreakAtWith(end_ix, Some(Item { + start: i, + end: end_ix, + body: ItemBody::HardBreak, + })); + } + + self.tree.append_text(begin_text, ix); + LoopInstruction::BreakAtWith(end_ix, Some(Item { + start: i, + end: end_ix, + body: ItemBody::SoftBreak, + })) + } + b'\\' => { + if ix + 1 < self.text.len() && is_ascii_punctuation(bytes[ix + 1]) { + self.tree.append_text(begin_text, ix); + if bytes[ix + 1] == b'`' { + let count = 1 + scan_ch_repeat(&bytes[(ix + 2)..], b'`'); + self.tree.append(Item { + start: ix + 1, + end: ix + count + 1, + body: ItemBody::MaybeCode(count, true), + }); + begin_text = ix + 1 + count; + LoopInstruction::ContinueAndSkip(count) + } else { + begin_text = ix + 1; + LoopInstruction::ContinueAndSkip(1) + } + } else { + LoopInstruction::ContinueAndSkip(0) + } + } + c @ b'*' | c @ b'_' | c @ b'~' => { + let string_suffix = &self.text[ix..]; + let count = 1 + scan_ch_repeat(&string_suffix.as_bytes()[1..], c); + let can_open = delim_run_can_open(&self.text, string_suffix, count, ix); + let can_close = delim_run_can_close(&self.text, string_suffix, count, ix); + let is_valid_seq = c != b'~' || count == 2 && self.options.contains(Options::ENABLE_STRIKETHROUGH); + + if (can_open || can_close) && is_valid_seq { + self.tree.append_text(begin_text, ix); + for i in 0..count { + self.tree.append(Item { + start: ix + i, + end: ix + i + 1, + body: ItemBody::MaybeEmphasis(count - i, can_open, can_close), + }); + } + begin_text = ix + count; + } + LoopInstruction::ContinueAndSkip(count - 1) + } + b'`' => { + self.tree.append_text(begin_text, ix); + let count = 1 + scan_ch_repeat(&bytes[(ix + 1)..], b'`'); + self.tree.append(Item { + start: ix, + end: ix + count, + body: ItemBody::MaybeCode(count, false), + }); + begin_text = ix + count; + LoopInstruction::ContinueAndSkip(count - 1) + } + b'<' => { + // Note: could detect some non-HTML cases and early escape here, but not + // clear that's a win. + self.tree.append_text(begin_text, ix); + self.tree.append(Item { + start: ix, + end: ix + 1, + body: ItemBody::MaybeHtml, + }); + begin_text = ix + 1; + LoopInstruction::ContinueAndSkip(0) + } + b'!' => { + if ix + 1 < self.text.len() && bytes[ix + 1] == b'[' { + self.tree.append_text(begin_text, ix); + self.tree.append(Item { + start: ix, + end: ix + 2, + body: ItemBody::MaybeImage, + }); + begin_text = ix + 2; + LoopInstruction::ContinueAndSkip(1) + } else { + LoopInstruction::ContinueAndSkip(0) + } + } + b'[' => { + self.tree.append_text(begin_text, ix); + self.tree.append(Item { + start: ix, + end: ix + 1, + body: ItemBody::MaybeLinkOpen, + }); + begin_text = ix + 1; + LoopInstruction::ContinueAndSkip(0) + } + b']' => { + self.tree.append_text(begin_text, ix); + self.tree.append(Item { + start: ix, + end: ix + 1, + body: ItemBody::MaybeLinkClose, + }); + begin_text = ix + 1; + LoopInstruction::ContinueAndSkip(0) + } + b'&' => { + match scan_entity(&bytes[ix..]) { + (n, Some(value)) => { + self.tree.append_text(begin_text, ix); + self.tree.append(Item { + start: ix, + end: ix + n, + body: ItemBody::SynthesizeText(self.allocs.allocate_cow(value)), + }); + begin_text = ix + n; + LoopInstruction::ContinueAndSkip(n - 1) + } + _ => LoopInstruction::ContinueAndSkip(0), + } + } + b'|' => { + if let TableParseMode::Active = mode { + LoopInstruction::BreakAtWith(ix, None) + } else { + last_pipe_ix = ix; + pipes += 1; + LoopInstruction::ContinueAndSkip(0) + } + } + _ => LoopInstruction::ContinueAndSkip(0), + } + }); + + if brk.is_none() { + // need to close text at eof + self.tree.append_text(begin_text, final_ix); + } + (final_ix, brk) + } + + /// Check whether we should allow a paragraph interrupt by lists. Only non-empty + /// lists are allowed. + fn interrupt_paragraph_by_list(&self, suffix: &[u8]) -> bool { + scan_listitem(suffix).map_or(false, |(ix, delim, index, _)| { + self.list_nesting > 0 || + // we don't allow interruption by either empty lists or + // numbered lists starting at an index other than 1 + !scan_empty_list(&suffix[ix..]) && (delim == b'*' || delim == b'-' || index == 1) + }) + } + + /// When start_ix is at the beginning of an HTML block of type 1 to 5, + /// this will find the end of the block, adding the block itself to the + /// tree and also keeping track of the lines of HTML within the block. + /// + /// The html_end_tag is the tag that must be found on a line to end the block. + fn parse_html_block_type_1_to_5(&mut self, start_ix: usize, html_end_tag_ix: u32, + mut remaining_space: usize) -> usize + { + self.tree.append(Item { + start: start_ix, + end: 0, // set later + body: ItemBody::HtmlBlock(Some(html_end_tag_ix)), + }); + self.tree.push(); + + let bytes = self.text.as_bytes(); + let mut ix = start_ix; + let end_ix; + loop { + let line_start_ix = ix; + ix += scan_nextline(&bytes[ix..]); + self.append_html_line(remaining_space, line_start_ix, ix); + + let mut line_start = LineStart::new(&bytes[ix..]); + let n_containers = self.scan_containers(&mut line_start); + if n_containers < self.tree.spine_len() { + end_ix = ix; + break; + } + + let html_end_tag = HTML_END_TAGS[html_end_tag_ix as usize]; + + if (&self.text[line_start_ix..ix]).contains(html_end_tag) { + end_ix = ix; + break; + } + + let next_line_ix = ix + line_start.bytes_scanned(); + if next_line_ix == self.text.len() { + end_ix = next_line_ix; + break; + } + ix = next_line_ix; + remaining_space = line_start.remaining_space(); + } + self.pop(end_ix); + ix + } + + /// When start_ix is at the beginning of an HTML block of type 6 or 7, + /// this will consume lines until there is a blank line and keep track of + /// the HTML within the block. + fn parse_html_block_type_6_or_7(&mut self, start_ix: usize, mut remaining_space: usize) + -> usize + { + self.tree.append(Item { + start: start_ix, + end: 0, // set later + body: ItemBody::HtmlBlock(None) + }); + self.tree.push(); + + let bytes = self.text.as_bytes(); + let mut ix = start_ix; + let end_ix; + loop { + let line_start_ix = ix; + ix += scan_nextline(&bytes[ix..]); + self.append_html_line(remaining_space, line_start_ix, ix); + + let mut line_start = LineStart::new(&bytes[ix..]); + let n_containers = self.scan_containers(&mut line_start); + if n_containers < self.tree.spine_len() || line_start.is_at_eol() + { + end_ix = ix; + break; + } + + let next_line_ix = ix + line_start.bytes_scanned(); + if next_line_ix == self.text.len() + || scan_blank_line(&bytes[next_line_ix..]).is_some() + { + end_ix = next_line_ix; + break; + } + ix = next_line_ix; + remaining_space = line_start.remaining_space(); + } + self.pop(end_ix); + ix + } + + fn parse_indented_code_block(&mut self, start_ix: usize, mut remaining_space: usize) + -> usize + { + self.tree.append(Item { + start: start_ix, + end: 0, // will get set later + body: ItemBody::IndentCodeBlock, + }); + self.tree.push(); + let bytes = self.text.as_bytes(); + let mut last_nonblank_child = TreePointer::Nil; + let mut last_nonblank_ix = 0; + let mut end_ix = 0; + let mut last_line_blank = false; + + let mut ix = start_ix; + loop { + let line_start_ix = ix; + ix += scan_nextline(&bytes[ix..]); + self.append_code_text(remaining_space, line_start_ix, ix); + // TODO(spec clarification): should we synthesize newline at EOF? + + if !last_line_blank { + last_nonblank_child = self.tree.cur(); + last_nonblank_ix = ix; + end_ix = ix; + } + + let mut line_start = LineStart::new(&bytes[ix..]); + let n_containers = self.scan_containers(&mut line_start); + if n_containers < self.tree.spine_len() + || !(line_start.scan_space(4) || line_start.is_at_eol()) + { + break; + } + let next_line_ix = ix + line_start.bytes_scanned(); + if next_line_ix == self.text.len() { + break; + } + ix = next_line_ix; + remaining_space = line_start.remaining_space(); + last_line_blank = scan_blank_line(&bytes[ix..]).is_some(); + } + + // Trim trailing blank lines. + if let TreePointer::Valid(child) = last_nonblank_child { + self.tree[child].next = TreePointer::Nil; + self.tree[child].item.end = last_nonblank_ix; + } + self.pop(end_ix); + ix + } + + fn parse_fenced_code_block(&mut self, start_ix: usize, indent: usize, + fence_ch: u8, n_fence_char: usize) -> usize + { + let bytes = self.text.as_bytes(); + let mut info_start = start_ix + n_fence_char; + info_start += scan_whitespace_no_nl(&bytes[info_start..]); + // TODO: info strings are typically very short. wouldnt it be faster + // to just do a forward scan here? + let mut ix = info_start + scan_nextline(&bytes[info_start..]); + let info_end = ix - scan_rev_while(&bytes[info_start..ix], is_ascii_whitespace); + let info_string = unescape(&self.text[info_start..info_end]); + self.tree.append(Item { + start: start_ix, + end: 0, // will get set later + body: ItemBody::FencedCodeBlock(self.allocs.allocate_cow(info_string)), + }); + self.tree.push(); + loop { + let mut line_start = LineStart::new(&bytes[ix..]); + let n_containers = self.scan_containers(&mut line_start); + if n_containers < self.tree.spine_len() { + break; + } + line_start.scan_space(indent); + let mut close_line_start = line_start.clone(); + if !close_line_start.scan_space(4) { + let close_ix = ix + close_line_start.bytes_scanned(); + if let Some(n) = + scan_closing_code_fence(&bytes[close_ix..], fence_ch, n_fence_char) + { + ix = close_ix + n; + break; + } + } + let remaining_space = line_start.remaining_space(); + ix += line_start.bytes_scanned(); + let next_ix = ix + scan_nextline(&bytes[ix..]); + self.append_code_text(remaining_space, ix, next_ix); + ix = next_ix; + } + + self.pop(ix); + + // try to read trailing whitespace or it will register as a completely blank line + ix + scan_blank_line(&bytes[ix..]).unwrap_or(0) + } + + fn append_code_text(&mut self, remaining_space: usize, start: usize, end: usize) { + if remaining_space > 0 { + let cow_ix = self.allocs.allocate_cow(" "[..remaining_space].into()); + self.tree.append(Item { + start, + end: start, + body: ItemBody::SynthesizeText(cow_ix), + }); + } + if self.text.as_bytes()[end - 2] == b'\r' { + // Normalize CRLF to LF + self.tree.append_text(start, end - 2); + self.tree.append_text(end - 1, end); + } else { + self.tree.append_text(start, end); + } + } + + /// Appends a line of HTML to the tree. + fn append_html_line(&mut self, remaining_space: usize, start: usize, end: usize) { + if remaining_space > 0 { + let cow_ix = self.allocs.allocate_cow(" "[..remaining_space].into()); + self.tree.append(Item { + start, + end: start, + // TODO: maybe this should synthesize to html rather than text? + body: ItemBody::SynthesizeText(cow_ix), + }); + } + if self.text.as_bytes()[end - 2] == b'\r' { + // Normalize CRLF to LF + self.tree.append(Item { + start, + end: end - 2, + body: ItemBody::Html, + }); + self.tree.append(Item { + start: end - 1, + end, + body: ItemBody::Html, + }); + } else { + self.tree.append(Item { + start, + end, + body: ItemBody::Html, + }); + } + } + + /// Returns number of containers scanned. + fn scan_containers(&self, line_start: &mut LineStart) -> usize { + let mut i = 0; + for &node_ix in self.tree.walk_spine() { + match self.tree[node_ix].item.body { + ItemBody::BlockQuote => { + let save = line_start.clone(); + if !line_start.scan_blockquote_marker() { + *line_start = save; + break; + } + } + ItemBody::ListItem(indent) => { + if !line_start.is_at_eol() { + let save = line_start.clone(); + if !line_start.scan_space(indent){ + *line_start = save; + break; + } + } + } + _ => (), + } + i += 1; + } + i + } + + /// Pop a container, setting its end. + fn pop(&mut self, ix: usize) { + let cur_ix = self.tree.pop().unwrap(); + self.tree[cur_ix].item.end = ix; + if let ItemBody::List(true, _, _) = self.tree[cur_ix].item.body { + surgerize_tight_list(&mut self.tree, cur_ix); + } + } + + /// Close a list if it's open. Also set loose if last line was blank + fn finish_list(&mut self, ix: usize) { + if let Some(node_ix) = self.tree.peek_up() { + if let ItemBody::List(_, _, _) = self.tree[node_ix].item.body { + self.pop(ix); + self.list_nesting -= 1; + } + } + if self.last_line_blank { + if let Some(node_ix) = self.tree.peek_grandparent() { + if let ItemBody::List(ref mut is_tight, _, _) = + self.tree[node_ix].item.body + { + *is_tight = false; + } + } + self.last_line_blank = false; + } + } + + /// Continue an existing list or start a new one if there's not an open + /// list that matches. + fn continue_list(&mut self, start: usize, ch: u8, index: usize) { + if let Some(node_ix) = self.tree.peek_up() { + if let ItemBody::List(ref mut is_tight, existing_ch, _) = + self.tree[node_ix].item.body + { + if existing_ch == ch { + if self.last_line_blank { + *is_tight = false; + self.last_line_blank = false; + } + return; + } + } + // TODO: this is not the best choice for end; maybe get end from last list item. + self.finish_list(start); + } + self.tree.append(Item { + start, + end: 0, // will get set later + body: ItemBody::List(true, ch, index), + }); + self.list_nesting += 1; + self.tree.push(); + self.last_line_blank = false; + } + + /// Parse a thematic break. + /// + /// Returns index of start of next line. + fn parse_hrule(&mut self, hrule_size: usize, ix: usize) -> usize { + self.tree.append(Item { + start: ix, + end: ix + hrule_size, + body: ItemBody::Rule, + }); + ix + hrule_size + } + + /// Parse an ATX heading. + /// + /// Returns index of start of next line. + fn parse_atx_heading(&mut self, mut ix: usize, atx_level: i32, atx_size: usize) -> usize { + self.tree.append(Item { + start: ix, + end: 0, // set later + body: ItemBody::Header(atx_level), + }); + ix += atx_size; + // next char is space or scan_eol + // (guaranteed by scan_atx_heading) + let bytes = self.text.as_bytes(); + if let Some(eol_bytes) = scan_eol(&bytes[ix..]) { + return ix + eol_bytes; + } + // skip leading spaces + let skip_spaces = scan_whitespace_no_nl(&bytes[ix..]); + ix += skip_spaces; + + // now handle the header text + let header_start = ix; + let header_node_idx = self.tree.push(); // so that we can set the endpoint later + ix = self.parse_line(ix, TableParseMode::Disabled).0; + self.tree[header_node_idx].item.end = ix; + + // remove trailing matter from header text + if let TreePointer::Valid(cur_ix) = self.tree.cur() { + let header_text = &bytes[header_start..ix]; + let mut limit = header_text.iter() + .rposition(|&b| !(b == b'\n' || b == b'\r' || b == b' ')) + .map_or(0, |i| i + 1); + let closer = header_text[..limit].iter() + .rposition(|&b| b != b'#') + .map_or(0, |i| i + 1); + if closer == 0 { + limit = closer; + } else { + let spaces = scan_rev_while(&header_text[..closer], |b| b == b' '); + if spaces > 0 { + limit = closer - spaces; + } + } + self.tree[cur_ix].item.end = limit + header_start; + } + + self.tree.pop(); + ix + } + + /// Returns the number of bytes scanned on success. + fn parse_footnote(&mut self, start: usize) -> Option { + let bytes = &self.text.as_bytes()[start..]; + if !bytes.starts_with(b"[^") { + return None; + } + let (mut i, label) = scan_link_label_rest(&self.text[(start + 2)..])?; + i += 2; + if scan_ch(&bytes[i..], b':') == 0 { + return None; + } + i += 1; + self.tree.append(Item { + start, + end: 0, // will get set later + body: ItemBody::FootnoteDefinition(self.allocs.allocate_cow(label)), // TODO: check whether the label here is strictly necessary + }); + self.tree.push(); + Some(i) + } + + /// Returns number of bytes scanned, label and definition on success. + fn parse_refdef_total(&mut self, start: usize) -> Option<(usize, LinkLabel<'a>, LinkDef<'a>)> { + let bytes = &self.text.as_bytes()[start..]; + if scan_ch(bytes, b'[') == 0 { + return None; + } + let (mut i, label) = scan_link_label_rest(&self.text[(start + 1)..])?; + i += 1; + if scan_ch(&bytes[i..], b':') == 0 { + return None; + } + i += 1; + let (bytecount, link_def) = self.scan_refdef(start + i)?; + Some((bytecount + i, UniCase::new(label), link_def)) + } + + /// Returns number of bytes and number of newlines + fn scan_refdef_space(&self, bytes: &[u8], mut i: usize) -> Option<(usize, usize)> { + let mut newlines = 0; + loop { + let whitespaces = scan_whitespace_no_nl(&bytes[i..]); + i += whitespaces; + if let Some(eol_bytes) = scan_eol(&bytes[i..]) { + i += eol_bytes; + newlines += 1; + if newlines > 1 { + return None; + } + } else { + break; + } + let mut line_start = LineStart::new(&bytes[i..]); + if self.tree.spine_len() != self.scan_containers(&mut line_start) { + return None; + } + i += line_start.bytes_scanned(); + } + Some((i, newlines)) + } + + /// Returns # of bytes and definition. + /// Assumes the label of the reference including colon has already been scanned. + fn scan_refdef(&self, start: usize) -> Option<(usize, LinkDef<'a>)> { + let bytes = self.text.as_bytes(); + + // whitespace between label and url (including up to one newline) + let (mut i, _newlines) = self.scan_refdef_space(&bytes, start)?; + + // scan link dest + let (dest_length, dest) = scan_link_dest(&self.text, i, 1)?; + if dest_length == 0 { + return None; + } + let dest = unescape(dest); + i += dest_length; + + // no title + let mut backup = (i - start, LinkDef { dest, title: None }); + + // scan whitespace between dest and label + let (mut i, newlines) = if let Some((new_i, mut newlines)) = self.scan_refdef_space(&bytes, i) { + if i == self.text.len() { + newlines += 1; + } + if new_i == i && newlines == 0 { + return None; + } + if newlines > 1 { + return Some(backup); + }; + (new_i, newlines) + } else { + return Some(backup); + }; + + // scan title + // if this fails but newline == 1, return also a refdef without title + if let Some((title_length, title)) = scan_refdef_title(&self.text[i..]) { + i += title_length; + backup.1.title = Some(unescape(title)); + } else if newlines > 0 { + return Some(backup); + } else { + return None; + }; + + // scan EOL + if let Some(bytes) = scan_blank_line(&bytes[i..]) { + backup.0 = i + bytes - start; + Some(backup) + } else if newlines > 0 { + Some(backup) + } else { + None + } + } +} + +/// Computes the number of header columns in a table line by computing the number of dividing pipes +/// that aren't followed or preceeded by whitespace. +fn count_header_cols(bytes: &[u8], mut pipes: usize, mut start: usize, last_pipe_ix: usize) -> usize { + // was first pipe preceeded by whitespace? if so, subtract one + start += scan_whitespace_no_nl(&bytes[start..]); + if bytes[start] == b'|' { + pipes -= 1; + } + + // was last pipe followed by whitespace? if so, sub one + if scan_blank_line(&bytes[(last_pipe_ix + 1)..]).is_some() { + pipes + } else { + pipes + 1 + } +} + +impl<'a> Tree { + fn append_text(&mut self, start: usize, end: usize) { + if end > start { + if let TreePointer::Valid(ix) = self.cur() { + if ItemBody::Text == self[ix].item.body && self[ix].item.end == start { + self[ix].item.end = end; + return; + } + } + self.append(Item { + start, + end, + body: ItemBody::Text, + }); + } + } +} + +/// Determines whether the delimiter run starting at given index is +/// left-flanking, as defined by the commonmark spec (and isn't intraword +/// for _ delims). +/// suffix is &s[ix..], which is passed in as an optimization, since taking +/// a string subslice is O(n). +fn delim_run_can_open(s: &str, suffix: &str, run_len: usize, ix: usize) -> bool { + let next_char = if let Some(c) = suffix.chars().nth(run_len) { + c + } else { + return false; + }; + if next_char.is_whitespace() { + return false; + } + if ix == 0 { + return true; + } + let delim = suffix.chars().next().unwrap(); + if delim == '*' && !is_punctuation(next_char) { + return true; + } + + let prev_char = s[..ix].chars().last().unwrap(); + + prev_char.is_whitespace() || is_punctuation(prev_char) +} + +/// Determines whether the delimiter run starting at given index is +/// left-flanking, as defined by the commonmark spec (and isn't intraword +/// for _ delims) +fn delim_run_can_close(s: &str, suffix: &str, run_len: usize, ix: usize) -> bool { + if ix == 0 { + return false; + } + let prev_char = s[..ix].chars().last().unwrap(); + if prev_char.is_whitespace() { + return false; + } + let next_char = if let Some(c) = suffix.chars().nth(run_len) { + c + } else { + return true; + }; + let delim = suffix.chars().next().unwrap(); + if delim == '*' && !is_punctuation(prev_char) { + return true; + } + + next_char.is_whitespace() || is_punctuation(next_char) +} + +/// Checks whether we should break a paragraph on the given input. +/// Note: lists are dealt with in `interrupt_paragraph_by_list`, because determing +/// whether to break on a list requires additional context. +fn scan_paragraph_interrupt(bytes: &[u8]) -> bool { + if scan_eol(bytes).is_some() || + scan_hrule(bytes).is_ok() || + scan_atx_heading(bytes).is_some() || + scan_code_fence(bytes).is_some() || + scan_blockquote_start(bytes).is_some() + { + return true; + } + bytes.starts_with(b"<") && + (get_html_end_tag(&bytes[1..]).is_some() || is_html_tag(scan_html_block_tag(&bytes[1..]).1)) +} + +static HTML_END_TAGS: &[&str; 7] = &["
", "", "", "-->", "?>", "]]>", ">"]; + +/// Returns an index into HTML_END_TAGS. +/// Assumes `text_bytes` is preceded by `<`. +fn get_html_end_tag(text_bytes : &[u8]) -> Option { + static BEGIN_TAGS: &[&[u8]; 3] = &[b"pre", b"style", b"script"]; + static ST_BEGIN_TAGS: &[&[u8]; 3] = &[b"!--", b"?", b"![CDATA["]; + + for (beg_tag, end_tag_ix) in BEGIN_TAGS.iter().zip(0..3) { + let tag_len = beg_tag.len(); + + if text_bytes.len() < tag_len { + // begin tags are increasing in size + break; + } + + if !text_bytes[..tag_len].eq_ignore_ascii_case(beg_tag) { + continue; + } + + // Must either be the end of the line... + if text_bytes.len() == tag_len { + return Some(end_tag_ix); + } + + // ...or be followed by whitespace, newline, or '>'. + let s = text_bytes[tag_len]; + if is_ascii_whitespace(s) || s == b'>' { + return Some(end_tag_ix); + } + } + + for (beg_tag, end_tag_ix) in ST_BEGIN_TAGS.iter().zip(3..6) { + if text_bytes.starts_with(beg_tag) { + return Some(end_tag_ix); + } + } + + if text_bytes.len() > 1 && text_bytes[0] == b'!' + && text_bytes[1] >= b'A' && text_bytes[1] <= b'Z' { + Some(6) + } else { + None + } +} + +#[derive(Copy, Clone, Debug)] +struct InlineEl { + start: TreeIndex, // offset of tree node + count: usize, + c: u8, // b'*' or b'_' + both: bool, // can both open and close +} + +#[derive(Debug, Clone, Default)] +struct InlineStack { + stack: Vec, + // Lower bounds for matching indices in the stack. For example + // a strikethrough delimiter will never match with any element + // in the stack with index smaller than + // `lower_bounds[InlineStack::TILDES]`. + lower_bounds: [usize; 7], +} + +impl InlineStack { + /// These are indices into the lower bounds array. + /// Not both refers to the property that the delimiter can not both + /// be opener as a closer. + const UNDERSCORE_NOT_BOTH: usize = 0; + const ASTERISK_NOT_BOTH: usize = 1; + const ASTERISK_BASE: usize = 2; + const TILDES: usize = 5; + const UNDERSCORE_BOTH: usize = 6; + + fn pop_all<'a>(&mut self, tree: &mut Tree) { + for el in self.stack.drain(..) { + for i in 0..el.count { + tree[el.start + i].item.body = ItemBody::Text; + } + } + } + + // both implies *, i think. because _ can never be + // both opener and closer. + // FIXME: it appears _ can be both?? does it matter from a correctness pov? + // yes, probably + fn get_lowerbound(&self, c: u8, count: usize, both: bool) -> usize { + if c == b'_' { + if both { + self.lower_bounds[InlineStack::UNDERSCORE_BOTH] + } else { + self.lower_bounds[InlineStack::UNDERSCORE_NOT_BOTH] + } + } else if c == b'*' { + let mod3_lower = self.lower_bounds[InlineStack::ASTERISK_BASE + count % 3]; + if both { + mod3_lower + } else { + min(mod3_lower, self.lower_bounds[InlineStack::ASTERISK_NOT_BOTH]) + } + } else { + self.lower_bounds[InlineStack::TILDES] + } + } + + fn set_lowerbound(&mut self, c: u8, count: usize, both: bool, new_bound: usize) { + if c == b'_' { + if both { + self.lower_bounds[InlineStack::UNDERSCORE_BOTH] = new_bound; + } else { + self.lower_bounds[InlineStack::UNDERSCORE_NOT_BOTH] = new_bound; + } + } else if c == b'*' { + self.lower_bounds[InlineStack::ASTERISK_BASE + count % 3] = new_bound; + if !both { + self.lower_bounds[InlineStack::ASTERISK_NOT_BOTH] = new_bound; + } + } else { + self.lower_bounds[InlineStack::TILDES] = new_bound; + } + } + + fn find_match<'a>(&mut self, tree: &mut Tree, c: u8, count: usize, both: bool) + -> Option + { + let lowerbound = self.get_lowerbound(c, count, both); + let res = self.stack[lowerbound..] + .iter() + .cloned() + .enumerate() + .rfind(|(_, el)| { + el.c == c && (!both && !el.both || (count + el.count) % 3 != 0 || count % 3 == 0) + }); + + if let Some((matching_ix, matching_el)) = res { + for i in (matching_ix + 1)..self.stack.len() { + let el = self.stack[i]; + self.set_lowerbound(el.c, el.count, el.both, matching_ix.saturating_sub(1)); + for i in 0..el.count { + tree[el.start + i].item.body = ItemBody::Text; + } + } + self.stack.truncate(matching_ix); + Some(matching_el) + } else { + self.set_lowerbound(c, count, both, self.stack.len().saturating_sub(1)); + None + } + } + + fn push(&mut self, el: InlineEl) { + self.stack.push(el) + } +} + +#[derive(Debug, Clone)] +enum RefScan<'a> { + // label, next node index + LinkLabel(CowStr<'a>, TreePointer), + // contains next node index + Collapsed(TreePointer), + Failed, +} + +fn scan_nodes_to_ix(tree: &Tree, mut node: TreePointer, ix: usize) -> TreePointer { + while let TreePointer::Valid(node_ix) = node { + if tree[node_ix].item.end <= ix { + node = tree[node_ix].next; + } else { + break; + } + } + node +} + +fn scan_reference<'a, 'b>(tree: &'a Tree, text: &'b str, cur: TreePointer) -> RefScan<'b> { + let cur_ix = match cur { + TreePointer::Nil => return RefScan::Failed, + TreePointer::Valid(cur_ix) => cur_ix, + }; + let start = tree[cur_ix].item.start; + let tail = &text.as_bytes()[start..]; + + if tail.starts_with(b"[]") { + let closing_node = tree[cur_ix].next.unwrap(); + RefScan::Collapsed(tree[closing_node].next) + } else if let Some((ix, ReferenceLabel::Link(label))) = scan_link_label(&text[start..]) { + let next_node = scan_nodes_to_ix(tree, cur, start + ix); + RefScan::LinkLabel(label, next_node) + } else { + RefScan::Failed + } +} + +#[derive(Clone, Default)] +struct LinkStack { + inner: Vec, + disabled_ix: usize, +} + +impl LinkStack { + fn push(&mut self, el: LinkStackEl) { + self.inner.push(el); + } + + fn pop(&mut self) -> Option { + let el = self.inner.pop(); + self.disabled_ix = std::cmp::min(self.disabled_ix, self.inner.len()); + el + } + + fn clear(&mut self) { + self.inner.clear(); + self.disabled_ix = 0; + } + + fn disable_all_links(&mut self) { + for el in &mut self.inner[self.disabled_ix..] { + if el.ty == LinkStackTy::Link { + el.ty = LinkStackTy::Disabled; + } + } + self.disabled_ix = self.inner.len(); + } +} + +#[derive(Clone, Debug)] +struct LinkStackEl { + node: TreeIndex, + ty: LinkStackTy, +} + +#[derive(PartialEq, Clone, Debug)] +enum LinkStackTy { + Link, + Image, + Disabled, +} + +#[derive(Clone)] +struct LinkDef<'a> { + dest: CowStr<'a>, + title: Option>, +} + +/// Tracks tree indices of code span delimiters of each length. It should prevent +/// quadratic scanning behaviours by providing (amortized) constant time lookups. +struct CodeDelims { + inner: HashMap>, + seen_first: bool, +} + +impl CodeDelims { + fn new() -> Self { + Self { + inner: Default::default(), + seen_first: false, + } + } + + fn insert(&mut self, count: usize, ix: TreeIndex) { + if self.seen_first { + self.inner.entry(count).or_insert_with(Default::default).push_back(ix); + } else { + // Skip the first insert, since that delimiter will always + // be an opener and not a closer. + self.seen_first = true; + } + } + + fn is_populated(&self) -> bool { + !self.inner.is_empty() + } + + fn find(&mut self, open_ix: TreeIndex, count: usize) -> Option { + while let Some(ix) = self.inner.get_mut(&count)?.pop_front() { + if ix > open_ix { + return Some(ix); + } + } + None + } + + fn clear(&mut self) { + self.inner.clear(); + self.seen_first = false; + } +} + +#[derive(Copy, Clone, PartialEq, Eq, Debug)] +struct LinkIndex(usize); + +#[derive(Copy, Clone, PartialEq, Eq, Debug)] +struct CowIndex(usize); + +#[derive(Copy, Clone, PartialEq, Eq, Debug)] +struct AlignmentIndex(usize); + +#[derive(Clone)] +struct Allocations<'a> { + refdefs: HashMap, LinkDef<'a>>, + links: Vec<(LinkType, CowStr<'a>, CowStr<'a>)>, + cows: Vec>, + alignments: Vec>, +} + +impl<'a> Allocations<'a> { + fn new() -> Self { + Self { + refdefs: HashMap::new(), + links: Vec::with_capacity(128), + cows: Vec::new(), + alignments: Vec::new(), + } + } + + fn allocate_cow(&mut self, cow: CowStr<'a>) -> CowIndex { + let ix = self.cows.len(); + self.cows.push(cow); + CowIndex(ix) + } + + fn allocate_link(&mut self, ty: LinkType, url: CowStr<'a>, title: CowStr<'a>) -> LinkIndex { + let ix = self.links.len(); + self.links.push((ty, url, title)); + LinkIndex(ix) + } + + fn allocate_alignment(&mut self, alignment: Vec) -> AlignmentIndex { + let ix = self.alignments.len(); + self.alignments.push(alignment); + AlignmentIndex(ix) + } +} + +impl<'a> Index for Allocations<'a> { + type Output = CowStr<'a>; + + fn index(&self, ix: CowIndex) -> &Self::Output { + self.cows.index(ix.0) + } +} + +impl<'a> Index for Allocations<'a> { + type Output = (LinkType, CowStr<'a>, CowStr<'a>); + + fn index(&self, ix: LinkIndex) -> &Self::Output { + self.links.index(ix.0) + } +} + +impl<'a> Index for Allocations<'a> { + type Output = Vec; + + fn index(&self, ix: AlignmentIndex) -> &Self::Output { + self.alignments.index(ix.0) + } +} + +/// A struct containing information on the reachability of certain inline HTML +/// elements. In particular, for cdata elements (` { + text: &'a str, + tree: Tree, + allocs: Allocations<'a>, + broken_link_callback: Option<&'a Fn(&str, &str) -> Option<(String, String)>>, + offset: usize, + html_scan_guard: HtmlScanGuard, + + // used by inline passes. store them here for reuse + inline_stack: InlineStack, + link_stack: LinkStack, +} + +impl<'a> Parser<'a> { + pub fn new(text: &'a str) -> Parser<'a> { + Parser::new_ext(text, Options::empty()) + } + + pub fn new_ext(text: &'a str, options: Options) -> Parser<'a> { + Parser::new_with_broken_link_callback(text, options, None) + } + + /// In case the parser encounters any potential links that have a broken + /// reference (e.g `[foo]` when there is no `[foo]: ` entry at the bottom) + /// the provided callback will be called with the reference name, + /// and the returned pair will be used as the link name and title if not + /// None. + pub fn new_with_broken_link_callback( + text: &'a str, + options: Options, + broken_link_callback: Option<&'a Fn(&str, &str) -> Option<(String, String)>> + ) -> Parser<'a> { + let first_pass = FirstPass::new(text, options); + let (mut tree, allocs) = first_pass.run(); + tree.reset(); + let inline_stack = Default::default(); + let link_stack = Default::default(); + let html_scan_guard = Default::default(); + Parser { + text, tree, allocs, broken_link_callback, + offset: 0, inline_stack, link_stack, html_scan_guard, + } + } + + pub fn get_offset(&self) -> usize { + self.offset + } + + /// Handle inline markup. + /// + /// When the parser encounters any item indicating potential inline markup, all + /// inline markup passes are run on the remainder of the chain. + /// + /// Note: there's some potential for optimization here, but that's future work. + fn handle_inline(&mut self) { + self.handle_inline_pass1(); + self.handle_emphasis(); + } + + /// Handle inline HTML, code spans, and links. + /// + /// This function handles both inline HTML and code spans, because they have + /// the same precedence. It also handles links, even though they have lower + /// precedence, because the URL of links must not be processed. + fn handle_inline_pass1(&mut self) { + let mut code_delims = CodeDelims::new(); + let mut cur = self.tree.cur(); + let mut prev = TreePointer::Nil; + + while let TreePointer::Valid(mut cur_ix) = cur { + match self.tree[cur_ix].item.body { + ItemBody::MaybeHtml => { + let next = self.tree[cur_ix].next; + let autolink = if let TreePointer::Valid(next_ix) = next { + scan_autolink(self.text, self.tree[next_ix].item.start) + } else { + None + }; + + if let Some((ix, uri, link_type)) = autolink { + let node = scan_nodes_to_ix(&self.tree, next, ix); + let text_node = self.tree.create_node(Item { + start: self.tree[cur_ix].item.start + 1, + end: ix - 1, + body: ItemBody::Text, + }); + let link_ix = self.allocs.allocate_link(link_type, uri, "".into()); + self.tree[cur_ix].item.body = ItemBody::Link(link_ix); + self.tree[cur_ix].item.end = ix; + self.tree[cur_ix].next = node; + self.tree[cur_ix].child = TreePointer::Valid(text_node); + prev = cur; + cur = node; + if let TreePointer::Valid(node_ix) = cur { + self.tree[node_ix].item.start = ix; + } + continue; + } else { + let inline_html = if let TreePointer::Valid(next_ix) = next { + self.tree.peek_up() + .map(|parent_ix| self.tree[parent_ix].item.end) + .and_then(|end_offset| { + let bytes = &self.text.as_bytes()[..end_offset]; + scan_inline_html(bytes, self.tree[next_ix].item.start, &mut self.html_scan_guard) + }) + } else { + None + }; + if let Some(ix) = inline_html { + let node = scan_nodes_to_ix(&self.tree, next, ix); + // TODO: this logic isn't right if the replaced chain has + // tricky stuff (skipped containers, replaced nulls). + self.tree[cur_ix].item.body = ItemBody::InlineHtml; + self.tree[cur_ix].item.end = ix; + self.tree[cur_ix].next = node; + prev = cur; + cur = node; + if let TreePointer::Valid(node_ix) = cur { + self.tree[node_ix].item.start = ix; + } + continue; + } + } + self.tree[cur_ix].item.body = ItemBody::Text; + } + ItemBody::MaybeCode(mut search_count, preceded_by_backslash) => { + if preceded_by_backslash { + search_count -= 1; + if search_count == 0 { + self.tree[cur_ix].item.body = ItemBody::Text; + prev = cur; + cur = self.tree[cur_ix].next; + continue; + } + } + + if code_delims.is_populated() { + // we have previously scanned all codeblock delimiters, + // so we can reuse that work + if let Some(scan_ix) = code_delims.find(cur_ix, search_count) { + self.make_code_span(cur_ix, scan_ix, preceded_by_backslash); + } else { + self.tree[cur_ix].item.body = ItemBody::Text; + } + } else { + // we haven't previously scanned all codeblock delimiters, + // so walk the AST + let mut scan = if search_count > 0 { self.tree[cur_ix].next } else { TreePointer::Nil }; + while let TreePointer::Valid(scan_ix) = scan { + if let ItemBody::MaybeCode(delim_count, _) = self.tree[scan_ix].item.body { + if search_count == delim_count { + self.make_code_span(cur_ix, scan_ix, preceded_by_backslash); + code_delims.clear(); + break; + } else { + code_delims.insert(delim_count, scan_ix); + } + } + scan = self.tree[scan_ix].next; + } + if scan == TreePointer::Nil { + self.tree[cur_ix].item.body = ItemBody::Text; + } + } + } + ItemBody::MaybeLinkOpen => { + self.tree[cur_ix].item.body = ItemBody::Text; + self.link_stack.push(LinkStackEl { node: cur_ix, ty: LinkStackTy::Link }); + } + ItemBody::MaybeImage => { + self.tree[cur_ix].item.body = ItemBody::Text; + self.link_stack.push(LinkStackEl { node: cur_ix, ty: LinkStackTy::Image }); + } + ItemBody::MaybeLinkClose => { + if let Some(tos) = self.link_stack.pop() { + if tos.ty == LinkStackTy::Disabled { + self.tree[cur_ix].item.body = ItemBody::Text; + continue; + } + let next = self.tree[cur_ix].next; + + if let Some((next_ix, url, title)) = scan_inline_link(self.text, self.tree[cur_ix].item.end) { + let next_node = scan_nodes_to_ix(&self.tree, next, next_ix); + if let TreePointer::Valid(prev_ix) = prev { + self.tree[prev_ix].next = TreePointer::Nil; + } + cur = TreePointer::Valid(tos.node); + cur_ix = tos.node; + let link_ix = self.allocs.allocate_link(LinkType::Inline, url, title); + self.tree[cur_ix].item.body = if tos.ty == LinkStackTy::Image { + ItemBody::Image(link_ix) + } else { + ItemBody::Link(link_ix) + }; + self.tree[cur_ix].child = self.tree[cur_ix].next; + self.tree[cur_ix].next = next_node; + if let TreePointer::Valid(next_node_ix) = next_node { + self.tree[next_node_ix].item.start = next_ix; + } + + if tos.ty == LinkStackTy::Link { + self.link_stack.disable_all_links(); + } + } else { + // ok, so its not an inline link. maybe it is a reference + // to a defined link? + let scan_result = scan_reference(&self.tree, &self.text, next); + let label_node = self.tree[tos.node].next; + let node_after_link = match scan_result { + RefScan::LinkLabel(_, next_node) => next_node, + RefScan::Collapsed(next_node) => next_node, + RefScan::Failed => next, + }; + let link_type = match &scan_result { + RefScan::LinkLabel(..) => LinkType::Reference, + RefScan::Collapsed(..) => LinkType::Collapsed, + RefScan::Failed => LinkType::Shortcut, + }; + let label: Option> = match scan_result { + RefScan::LinkLabel(l, ..) => Some(ReferenceLabel::Link(l)), + RefScan::Collapsed(..) | RefScan::Failed => { + // No label? maybe it is a shortcut reference + let start = self.tree[tos.node].item.end - 1; + let end = self.tree[cur_ix].item.end; + let search_text = &self.text[start..end]; + + scan_link_label(search_text).map(|(_ix, label)| label) + } + }; + + // see if it's a footnote reference + if let Some(ReferenceLabel::Footnote(l)) = label { + self.tree[tos.node].next = node_after_link; + self.tree[tos.node].child = TreePointer::Nil; + self.tree[tos.node].item.body = ItemBody::FootnoteReference(self.allocs.allocate_cow(l)); + prev = TreePointer::Valid(tos.node); + cur = node_after_link; + self.link_stack.clear(); + continue; + } else if let Some(ReferenceLabel::Link(link_label)) = label { + let type_url_title = if let Some(matching_def) = self.allocs.refdefs.get(&UniCase::new(link_label.as_ref().into())) { + // found a matching definition! + let title = matching_def.title.as_ref().cloned().unwrap_or("".into()); + let url = matching_def.dest.clone(); + Some((link_type, url, title)) + } else if let Some(callback) = self.broken_link_callback { + // looked for matching definition, but didn't find it. try to fix + // link with callback, if it is defined + if let Some((url, title)) = callback(link_label.as_ref(), link_label.as_ref()) { + Some((link_type.to_unknown(), url.into(), title.into())) + } else { + None + } + } else { + None + }; + + if let Some((def_link_type, url, title)) = type_url_title { + let link_ix = self.allocs.allocate_link(def_link_type, url, title); + self.tree[tos.node].item.body = if tos.ty == LinkStackTy::Image { + ItemBody::Image(link_ix) + } else { + ItemBody::Link(link_ix) + }; + + // lets do some tree surgery to add the link to the tree + // 1st: skip the label node and close node + self.tree[tos.node].next = node_after_link; + + // then, add the label node as a child to the link node + self.tree[tos.node].child = label_node; + + // finally: disconnect list of children + if let TreePointer::Valid(prev_ix) = prev { + self.tree[prev_ix].next = TreePointer::Nil; + } + + // set up cur so next node will be node_after_link + cur = TreePointer::Valid(tos.node); + cur_ix = tos.node; + + if tos.ty == LinkStackTy::Link { + self.link_stack.disable_all_links(); + } + } else { + self.tree[cur_ix].item.body = ItemBody::Text; + } + } else { + self.tree[cur_ix].item.body = ItemBody::Text; + } + } + } else { + self.tree[cur_ix].item.body = ItemBody::Text; + } + } + _ => (), + } + prev = cur; + cur = self.tree[cur_ix].next; + } + self.link_stack.clear(); + } + + fn handle_emphasis(&mut self) { + let mut prev = TreePointer::Nil; + let mut prev_ix: TreeIndex; + let mut cur = self.tree.cur(); + while let TreePointer::Valid(mut cur_ix) = cur { + if let ItemBody::MaybeEmphasis(mut count, can_open, can_close) = self.tree[cur_ix].item.body { + let c = self.text.as_bytes()[self.tree[cur_ix].item.start]; + let both = can_open && can_close; + if can_close { + while let Some(el) = self.inline_stack.find_match(&mut self.tree, c, count, both) { + // have a match! + if let TreePointer::Valid(prev_ix) = prev { + self.tree[prev_ix].next = TreePointer::Nil; + } + let match_count = min(count, el.count); + // start, end are tree node indices + let mut end = cur_ix - 1; + let mut start = el.start + el.count; + + // work from the inside out + while start > el.start + el.count - match_count { + let (inc, ty) = if c == b'~' { + (2, ItemBody::Strikethrough) + } else if start > el.start + el.count - match_count + 1 { + (2, ItemBody::Strong) + } else { + (1, ItemBody::Emphasis) + }; + + let root = start - inc; + end = end + inc; + self.tree[root].item.body = ty; + self.tree[root].item.end = self.tree[end].item.end; + self.tree[root].child = TreePointer::Valid(start); + self.tree[root].next = TreePointer::Nil; + start = root; + } + + // set next for top most emph level + prev_ix = el.start + el.count - match_count; + prev = TreePointer::Valid(prev_ix); + cur = self.tree[cur_ix + match_count - 1].next; + self.tree[prev_ix].next = cur; + + if el.count > match_count { + self.inline_stack.push(InlineEl { + start: el.start, + count: el.count - match_count, + c: el.c, + both, + }) + } + count -= match_count; + if count > 0 { + cur_ix = cur.unwrap(); + } else { + break; + } + } + } + if count > 0 { + if can_open { + self.inline_stack.push(InlineEl { + start: cur_ix, + count, + c, + both, + }); + } else { + for i in 0..count { + self.tree[cur_ix + i].item.body = ItemBody::Text; + } + } + prev_ix = cur_ix + count - 1; + prev = TreePointer::Valid(prev_ix); + cur = self.tree[prev_ix].next; + } + } else { + prev = cur; + cur = self.tree[cur_ix].next; + } + } + self.inline_stack.pop_all(&mut self.tree); + } + + /// Make a code span. + /// + /// Both `open` and `close` are matching MaybeCode items. + fn make_code_span(&mut self, open: TreeIndex, close: TreeIndex, preceding_backslash: bool) { + let first_ix = open + 1; + let last_ix = close - 1; + let bytes = self.text.as_bytes(); + let mut span_start = self.tree[first_ix].item.start; + let mut span_end = self.tree[close].item.start; + let mut buf: Option = None; + + // detect all-space sequences, since they are kept as-is as of commonmark 0.29 + if ! bytes[span_start..span_end].iter().all(|&b| b == b' ') { + let opening = match bytes[span_start] { b' ' | b'\r' | b'\n' => true, _ => false }; + let closing = match bytes[span_end - 1] { b' ' | b'\r' | b'\n' => true, _ => false }; + let drop_enclosing_whitespace = opening && closing; + + if drop_enclosing_whitespace { + span_start += 1; + if span_start < span_end { + span_end -= 1; + } + } + + let mut ix = first_ix; + + while ix < close { + match self.tree[ix].item.body { + ItemBody::HardBreak | ItemBody::SoftBreak => { + if drop_enclosing_whitespace && + (ix == first_ix && bytes[self.tree[ix].item.start] != b'\\') || + (ix == last_ix && last_ix > first_ix) { + // just ignore it + } else { + let end = bytes[self.tree[ix].item.start..] + .iter() + .position(|&b| b == b'\r' || b == b'\n') + .unwrap() + + self.tree[ix].item.start; + if let Some(ref mut buf) = buf { + buf.push_str(&self.text[self.tree[ix].item.start..end]); + buf.push(' '); + } else { + let mut new_buf = String::with_capacity(span_end - span_start); + new_buf.push_str(&self.text[span_start..end]); + new_buf.push(' '); + buf = Some(new_buf); + } + } + } + _ => { + if let Some(ref mut buf) = buf { + let end = if ix == last_ix { + span_end + } else { + self.tree[ix].item.end + }; + buf.push_str(&self.text[self.tree[ix].item.start..end]); + } + } + } + ix = ix + 1; + } + } + + let cow = if let Some(buf) = buf { + buf.into() + } else { + self.text[span_start..span_end].into() + }; + if preceding_backslash { + self.tree[open].item.body = ItemBody::Text; + self.tree[open].item.end = self.tree[open].item.start + 1; + self.tree[open].next = TreePointer::Valid(close); + self.tree[close].item.body = ItemBody::Code(self.allocs.allocate_cow(cow)); + self.tree[close].item.start = self.tree[open].item.start + 1; + } else { + self.tree[open].item.body = ItemBody::Code(self.allocs.allocate_cow(cow)); + self.tree[open].item.end = self.tree[close].item.end; + self.tree[open].next = self.tree[close].next; + } + } + + pub fn into_offset_iter(self) -> OffsetIter<'a> { + OffsetIter { + inner: self, + } + } +} + +pub(crate) enum LoopInstruction { + /// Continue looking for more special bytes, but skip next few bytes. + ContinueAndSkip(usize), + /// Break looping immediately, returning with the given index and value. + BreakAtWith(usize, T) +} + +/// This function walks the byte slices from the given index and +/// calls the callback function on all bytes (and their indices) that are in the following set: +/// `` ` ``, `\`, `&`, `*`, `_`, `~`, `!`, `<`, `[`, `]`, `|`, `\r`, `\n` +/// It may also call the callback on other bytes, but it is not guaranteed. +/// Whenever `callback(ix, byte)` returns a `ContinueAndSkip(n)` value, the callback +/// will not be called with an index that is less than `ix + n + 1`. +/// When the callback returns a `BreakAtWith(end_ix, opt+val)`, no more callbacks will be +/// called and the function returns immediately with the return value `(end_ix, opt_val)`. +/// If `BreakAtWith(..)` is never returned, this function will return the first +/// index that is outside the byteslice bound and a `None` value. +fn iterate_special_bytes(bytes: &[u8], ix: usize, callback: F) -> (usize, Option) + where F: FnMut(usize, u8) -> LoopInstruction> +{ + #[cfg(all(target_arch = "x86_64", feature="simd"))] + { crate::simd::iterate_special_bytes(bytes, ix, callback) } + #[cfg(not(all(target_arch = "x86_64", feature="simd")))] + { scalar_iterate_special_bytes(bytes, ix, callback) } +} + +pub(crate) fn scalar_iterate_special_bytes(bytes: &[u8], mut ix: usize, mut callback: F) -> (usize, Option) + where F: FnMut(usize, u8) -> LoopInstruction> +{ + while ix < bytes.len() { + match callback(ix, bytes[ix]) { + LoopInstruction::ContinueAndSkip(skip) => { + ix += skip + 1; + } + LoopInstruction::BreakAtWith(ix, val) => { + return (ix, val); + } + } + } + + (ix, None) +} + +pub struct OffsetIter<'a> { + inner: Parser<'a>, +} + +impl<'a> Iterator for OffsetIter<'a> { + type Item = (Event<'a>, Range); + + fn next(&mut self) -> Option { + match self.inner.tree.cur() { + TreePointer::Nil => { + let ix = self.inner.tree.pop()?; + let tag = item_to_tag(&self.inner.tree[ix].item, &self.inner.allocs); + self.inner.tree.next_sibling(ix); + Some((Event::End(tag), self.inner.tree[ix].item.start..self.inner.tree[ix].item.end)) + } + TreePointer::Valid(cur_ix) => { + if self.inner.tree[cur_ix].item.body.is_inline() { + self.inner.handle_inline(); + } + + let node = self.inner.tree[cur_ix]; + let item = node.item; + let event = item_to_event(item, self.inner.text, &self.inner.allocs); + if let Event::Start(..) = event { + self.inner.tree.push(); + } else { + self.inner.tree.next_sibling(cur_ix); + } + Some((event, item.start..item.end)) + } + } + } +} + +fn item_to_tag<'a>(item: &Item, allocs: &Allocations<'a>) -> Tag<'a> { + match item.body { + ItemBody::Paragraph => Tag::Paragraph, + ItemBody::Emphasis => Tag::Emphasis, + ItemBody::Strong => Tag::Strong, + ItemBody::Strikethrough => Tag::Strikethrough, + ItemBody::Link(link_ix) => { + let &(ref link_type, ref url, ref title) = allocs.index(link_ix); + Tag::Link(*link_type, url.clone(), title.clone()) + } + ItemBody::Image(link_ix) => { + let &(ref link_type, ref url, ref title) = allocs.index(link_ix); + Tag::Image(*link_type, url.clone(), title.clone()) + } + ItemBody::Rule => Tag::Rule, + ItemBody::Header(level) => Tag::Header(level), + ItemBody::FencedCodeBlock(cow_ix) => + Tag::CodeBlock(allocs[cow_ix].clone()), + ItemBody::IndentCodeBlock => Tag::CodeBlock("".into()), + ItemBody::BlockQuote => Tag::BlockQuote, + ItemBody::List(_, c, listitem_start) => { + if c == b'.' || c == b')' { + Tag::List(Some(listitem_start)) + } else { + Tag::List(None) + } + } + ItemBody::ListItem(_) => Tag::Item, + ItemBody::HtmlBlock(_) => Tag::HtmlBlock, + ItemBody::TableHead => Tag::TableHead, + ItemBody::TableCell => Tag::TableCell, + ItemBody::TableRow => Tag::TableRow, + ItemBody::Table(alignment_ix) => { + Tag::Table(allocs[alignment_ix].clone()) + } + ItemBody::FootnoteDefinition(cow_ix) => + Tag::FootnoteDefinition(allocs[cow_ix].clone()), + _ => panic!("unexpected item body {:?}", item.body) + } +} + +fn item_to_event<'a>(item: Item, text: &'a str, allocs: &Allocations<'a>) -> Event<'a> { + let tag = match item.body { + ItemBody::Text => + return Event::Text(text[item.start..item.end].into()), + ItemBody::Code(cow_ix) => + return Event::Code(allocs[cow_ix].clone()), + ItemBody::SynthesizeText(cow_ix) => + return Event::Text(allocs[cow_ix].clone()), + ItemBody::Html => + return Event::Html(text[item.start..item.end].into()), + ItemBody::InlineHtml => + return Event::InlineHtml(text[item.start..item.end].into()), + ItemBody::SoftBreak => return Event::SoftBreak, + ItemBody::HardBreak => return Event::HardBreak, + ItemBody::FootnoteReference(cow_ix) => + return Event::FootnoteReference(allocs[cow_ix].clone()), + ItemBody::TaskListMarker(checked) => return Event::TaskListMarker(checked), + + ItemBody::Paragraph => Tag::Paragraph, + ItemBody::Emphasis => Tag::Emphasis, + ItemBody::Strong => Tag::Strong, + ItemBody::Strikethrough => Tag::Strikethrough, + ItemBody::Link(link_ix) => { + let &(ref link_type, ref url, ref title) = allocs.index(link_ix); + Tag::Link(*link_type, url.clone(), title.clone()) + } + ItemBody::Image(link_ix) => { + let &(ref link_type, ref url, ref title) = allocs.index(link_ix); + Tag::Image(*link_type, url.clone(), title.clone()) + } + ItemBody::Rule => Tag::Rule, + ItemBody::Header(level) => Tag::Header(level), + ItemBody::FencedCodeBlock(cow_ix) => + Tag::CodeBlock(allocs[cow_ix].clone()), + ItemBody::IndentCodeBlock => Tag::CodeBlock("".into()), + ItemBody::BlockQuote => Tag::BlockQuote, + ItemBody::List(_, c, listitem_start) => { + if c == b'.' || c == b')' { + Tag::List(Some(listitem_start)) + } else { + Tag::List(None) + } + } + ItemBody::ListItem(_) => Tag::Item, + ItemBody::HtmlBlock(_) => Tag::HtmlBlock, + ItemBody::TableHead => Tag::TableHead, + ItemBody::TableCell => Tag::TableCell, + ItemBody::TableRow => Tag::TableRow, + ItemBody::Table(alignment_ix) => { + Tag::Table(allocs[alignment_ix].clone()) + } + ItemBody::FootnoteDefinition(cow_ix) => + Tag::FootnoteDefinition(allocs[cow_ix].clone()), + _ => panic!("unexpected item body {:?}", item.body) + }; + + Event::Start(tag) +} + +// https://english.stackexchange.com/a/285573 +fn surgerize_tight_list<'a>(tree : &mut Tree, list_ix: TreeIndex) { + let mut list_item = tree[list_ix].child; + while let TreePointer::Valid(listitem_ix) = list_item { + // first child is special, controls how we repoint list_item.child + let list_item_firstborn = tree[listitem_ix].child; + + // Check that list item has children - this is not necessarily the case! + if let TreePointer::Valid(firstborn_ix) = list_item_firstborn { + if let ItemBody::Paragraph = tree[firstborn_ix].item.body { + tree[listitem_ix].child = tree[firstborn_ix].child; + } + + let mut list_item_child = TreePointer::Valid(firstborn_ix); + let mut node_to_repoint = TreePointer::Nil; + while let TreePointer::Valid(child_ix) = list_item_child { + // surgerize paragraphs + let repoint_ix = if let ItemBody::Paragraph = tree[child_ix].item.body { + if let TreePointer::Valid(child_firstborn) = tree[child_ix].child { + if let TreePointer::Valid(repoint_ix) = node_to_repoint { + tree[repoint_ix].next = TreePointer::Valid(child_firstborn); + } + let mut child_lastborn = child_firstborn; + while let TreePointer::Valid(lastborn_next_ix) = tree[child_lastborn].next { + child_lastborn = lastborn_next_ix; + } + child_lastborn + } else { + child_ix + } + } else { + child_ix + }; + + node_to_repoint = TreePointer::Valid(repoint_ix); + tree[repoint_ix].next = tree[child_ix].next; + list_item_child = tree[child_ix].next; + } + } + + list_item = tree[listitem_ix].next; + } +} + +impl<'a> Iterator for Parser<'a> { + type Item = Event<'a>; + + fn next(&mut self) -> Option> { + match self.tree.cur() { + TreePointer::Nil => { + let ix = self.tree.pop()?; + let tag = item_to_tag(&self.tree[ix].item, &self.allocs); + self.offset = self.tree[ix].item.end; + self.tree.next_sibling(ix); + Some(Event::End(tag)) + } + TreePointer::Valid(cur_ix) => { + if self.tree[cur_ix].item.body.is_inline() { + self.handle_inline(); + } + + let node = self.tree[cur_ix]; + let item = node.item; + let event = item_to_event(item, self.text, &self.allocs); + if let Event::Start(..) = event { + self.offset = if let TreePointer::Valid(child_ix) = node.child { + self.tree[child_ix].item.start + } else { + item.end + }; + self.tree.push(); + } else { + self.offset = item.end; + self.tree.next_sibling(cur_ix); + } + Some(event) + } + } + } +} + +#[cfg(test)] +mod test { + use super::*; + use crate::tree::Node; + + // TODO: move these tests to tests/html.rs? + + fn parser_with_extensions(text: &str) -> Parser<'_> { + let mut opts = Options::empty(); + opts.insert(Options::ENABLE_TABLES); + opts.insert(Options::ENABLE_FOOTNOTES); + opts.insert(Options::ENABLE_STRIKETHROUGH); + opts.insert(Options::ENABLE_TASKLISTS); + + Parser::new_ext(text, opts) + } + + #[test] + #[cfg(target_pointer_width = "64")] + fn node_size() { + let node_size = std::mem::size_of::>(); + assert_eq!(48, node_size); + } + + #[test] + #[cfg(target_pointer_width = "64")] + fn body_size() { + let body_size = std::mem::size_of::(); + assert_eq!(16, body_size); + } + + #[test] + fn single_open_fish_bracket() { + // dont crash + assert_eq!(3, Parser::new("<").count()); + } + + #[test] + fn lone_hashtag() { + // dont crash + assert_eq!(2, Parser::new("#").count()); + } + + #[test] + fn lots_of_backslashes() { + // dont crash + Parser::new("\\\\\r\r").count(); + Parser::new("\\\r\r\\.\\\\\r\r\\.\\").count(); + } + + #[test] + fn issue_320() { + // dont crash + parser_with_extensions(":\r\t> |\r:\r\t> |\r").count(); + } + + #[test] + fn issue_319() { + // dont crash + parser_with_extensions("|\r-]([^|\r-]([^").count(); + parser_with_extensions("|\r\r=][^|\r\r=][^car").count(); + } + + #[test] + fn issue_303() { + // dont crash + parser_with_extensions("[^\r\ra]").count(); + parser_with_extensions("\r\r]Z[^\x00\r\r]Z[^\x00").count(); + } + + #[test] + fn issue_313() { + // dont crash + parser_with_extensions("*]0[^\r\r*]0[^").count(); + parser_with_extensions("[^\r> `][^\r> `][^\r> `][").count(); + } + + #[test] + fn issue_283() { + let input = std::str::from_utf8(b"\xf0\x9b\xb2\x9f - \\\n> - ").count(); + parser_with_extensions("- \n\n").count(); + } + + #[test] + fn offset_iter() { + let event_offsets: Vec<_> = Parser::new("*hello* world") + .into_offset_iter() + .map(|(_ev, range)| range) + .collect(); + let expected_offsets = vec![ + (0..13), + (0..7), + (1..6), + (0..7), + (7..13), + (0..13) + ]; + assert_eq!(expected_offsets, event_offsets); + } + + // FIXME: add this one regression suite + #[test] + fn link_def_at_eof() { + let test_str = "[My site][world]\n\n[world]: https://vincentprouillet.com"; + let expected = "

My site

\n"; + + let mut buf = String::new(); + crate::html::push_html(&mut buf, Parser::new(test_str)); + assert_eq!(expected, buf); + } + + #[test] + fn ref_def_at_eof() { + let test_str = "[test]:\\"; + let expected = ""; + + let mut buf = String::new(); + crate::html::push_html(&mut buf, Parser::new(test_str)); + assert_eq!(expected, buf); + } + + #[test] + fn ref_def_cr_lf() { + let test_str = "[a]: /u\r\n\n[a]"; + let expected = "

a

\n"; + + let mut buf = String::new(); + crate::html::push_html(&mut buf, Parser::new(test_str)); + assert_eq!(expected, buf); + } + + #[test] + fn no_dest_refdef() { + let test_str = "[a]:"; + let expected = "

[a]:

\n"; + + let mut buf = String::new(); + crate::html::push_html(&mut buf, Parser::new(test_str)); + assert_eq!(expected, buf); + } + + #[test] + fn simple_broken_link_callback() { + let test_str = "This is a link w/o def: [hello][world]"; + let parser = Parser::new_with_broken_link_callback(test_str, Options::empty(), Some(&|norm, raw| { + assert_eq!("world", raw); + assert_eq!("world", norm); + Some(("YOLO".to_owned(), "SWAG".to_owned())) + })); + let mut link_tag_count = 0; + for (typ, url, title) in parser.filter_map(|event| match event { + Event::Start(tag) | Event::End(tag) => match tag { + Tag::Link(typ, url, title) => Some((typ, url, title)), + _ => None, + } + _ => None, + }) { + link_tag_count += 1; + assert_eq!(typ, LinkType::ReferenceUnknown); + assert_eq!(url.as_ref(), "YOLO"); + assert_eq!(title.as_ref(), "SWAG"); + } + assert!(link_tag_count > 0); + } +} diff --git a/vendor/pulldown-cmark/src/puncttable.rs b/vendor/pulldown-cmark/src/puncttable.rs new file mode 100644 index 0000000000..4f3a02ec55 --- /dev/null +++ b/vendor/pulldown-cmark/src/puncttable.rs @@ -0,0 +1,348 @@ +// Copyright 2015 Google Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +//! CommonMark punctuation set based on spec and Unicode properties. + +// Autogenerated by mk_puncttable.py + +const PUNCT_MASKS_ASCII: [u16; 8] = [ + 0x0000, // U+0000...U+000F + 0x0000, // U+0010...U+001F + 0xfffe, // U+0020...U+002F + 0xfc00, // U+0030...U+003F + 0x0001, // U+0040...U+004F + 0xf800, // U+0050...U+005F + 0x0001, // U+0060...U+006F + 0x7800, // U+0070...U+007F + ]; + +const PUNCT_TAB: [u16; 132] = [ + 10, // U+00A0...U+00AF + 11, // U+00B0...U+00BF + 55, // U+0370...U+037F + 56, // U+0380...U+038F + 85, // U+0550...U+055F + 88, // U+0580...U+058F + 91, // U+05B0...U+05BF + 92, // U+05C0...U+05CF + 95, // U+05F0...U+05FF + 96, // U+0600...U+060F + 97, // U+0610...U+061F + 102, // U+0660...U+066F + 109, // U+06D0...U+06DF + 112, // U+0700...U+070F + 127, // U+07F0...U+07FF + 131, // U+0830...U+083F + 133, // U+0850...U+085F + 150, // U+0960...U+096F + 151, // U+0970...U+097F + 175, // U+0AF0...U+0AFF + 223, // U+0DF0...U+0DFF + 228, // U+0E40...U+0E4F + 229, // U+0E50...U+0E5F + 240, // U+0F00...U+0F0F + 241, // U+0F10...U+0F1F + 243, // U+0F30...U+0F3F + 248, // U+0F80...U+0F8F + 253, // U+0FD0...U+0FDF + 260, // U+1040...U+104F + 271, // U+10F0...U+10FF + 310, // U+1360...U+136F + 320, // U+1400...U+140F + 358, // U+1660...U+166F + 361, // U+1690...U+169F + 366, // U+16E0...U+16EF + 371, // U+1730...U+173F + 381, // U+17D0...U+17DF + 384, // U+1800...U+180F + 404, // U+1940...U+194F + 417, // U+1A10...U+1A1F + 426, // U+1AA0...U+1AAF + 437, // U+1B50...U+1B5F + 438, // U+1B60...U+1B6F + 447, // U+1BF0...U+1BFF + 451, // U+1C30...U+1C3F + 455, // U+1C70...U+1C7F + 460, // U+1CC0...U+1CCF + 461, // U+1CD0...U+1CDF + 513, // U+2010...U+201F + 514, // U+2020...U+202F + 515, // U+2030...U+203F + 516, // U+2040...U+204F + 517, // U+2050...U+205F + 519, // U+2070...U+207F + 520, // U+2080...U+208F + 560, // U+2300...U+230F + 562, // U+2320...U+232F + 630, // U+2760...U+276F + 631, // U+2770...U+277F + 636, // U+27C0...U+27CF + 638, // U+27E0...U+27EF + 664, // U+2980...U+298F + 665, // U+2990...U+299F + 669, // U+29D0...U+29DF + 671, // U+29F0...U+29FF + 719, // U+2CF0...U+2CFF + 727, // U+2D70...U+2D7F + 736, // U+2E00...U+2E0F + 737, // U+2E10...U+2E1F + 738, // U+2E20...U+2E2F + 739, // U+2E30...U+2E3F + 740, // U+2E40...U+2E4F + 768, // U+3000...U+300F + 769, // U+3010...U+301F + 771, // U+3030...U+303F + 778, // U+30A0...U+30AF + 783, // U+30F0...U+30FF + 2639, // U+A4F0...U+A4FF + 2656, // U+A600...U+A60F + 2663, // U+A670...U+A67F + 2671, // U+A6F0...U+A6FF + 2695, // U+A870...U+A87F + 2700, // U+A8C0...U+A8CF + 2703, // U+A8F0...U+A8FF + 2706, // U+A920...U+A92F + 2709, // U+A950...U+A95F + 2716, // U+A9C0...U+A9CF + 2717, // U+A9D0...U+A9DF + 2725, // U+AA50...U+AA5F + 2733, // U+AAD0...U+AADF + 2735, // U+AAF0...U+AAFF + 2750, // U+ABE0...U+ABEF + 4051, // U+FD30...U+FD3F + 4065, // U+FE10...U+FE1F + 4067, // U+FE30...U+FE3F + 4068, // U+FE40...U+FE4F + 4069, // U+FE50...U+FE5F + 4070, // U+FE60...U+FE6F + 4080, // U+FF00...U+FF0F + 4081, // U+FF10...U+FF1F + 4082, // U+FF20...U+FF2F + 4083, // U+FF30...U+FF3F + 4085, // U+FF50...U+FF5F + 4086, // U+FF60...U+FF6F + 4112, // U+10100...U+1010F + 4153, // U+10390...U+1039F + 4157, // U+103D0...U+103DF + 4182, // U+10560...U+1056F + 4229, // U+10850...U+1085F + 4241, // U+10910...U+1091F + 4243, // U+10930...U+1093F + 4261, // U+10A50...U+10A5F + 4263, // U+10A70...U+10A7F + 4271, // U+10AF0...U+10AFF + 4275, // U+10B30...U+10B3F + 4281, // U+10B90...U+10B9F + 4356, // U+11040...U+1104F + 4363, // U+110B0...U+110BF + 4364, // U+110C0...U+110CF + 4372, // U+11140...U+1114F + 4375, // U+11170...U+1117F + 4380, // U+111C0...U+111CF + 4387, // U+11230...U+1123F + 4428, // U+114C0...U+114CF + 4444, // U+115C0...U+115CF + 4452, // U+11640...U+1164F + 4679, // U+12470...U+1247F + 5798, // U+16A60...U+16A6F + 5807, // U+16AF0...U+16AFF + 5811, // U+16B30...U+16B3F + 5812, // U+16B40...U+16B4F + 7113, // U+1BC90...U+1BC9F + ]; + +const PUNCT_MASKS: [u16; 132] = [ + 0x0882, // U+00A0...U+00AF + 0x88c0, // U+00B0...U+00BF + 0x4000, // U+0370...U+037F + 0x0080, // U+0380...U+038F + 0xfc00, // U+0550...U+055F + 0x0600, // U+0580...U+058F + 0x4000, // U+05B0...U+05BF + 0x0049, // U+05C0...U+05CF + 0x0018, // U+05F0...U+05FF + 0x3600, // U+0600...U+060F + 0xc800, // U+0610...U+061F + 0x3c00, // U+0660...U+066F + 0x0010, // U+06D0...U+06DF + 0x3fff, // U+0700...U+070F + 0x0380, // U+07F0...U+07FF + 0x7fff, // U+0830...U+083F + 0x4000, // U+0850...U+085F + 0x0030, // U+0960...U+096F + 0x0001, // U+0970...U+097F + 0x0001, // U+0AF0...U+0AFF + 0x0010, // U+0DF0...U+0DFF + 0x8000, // U+0E40...U+0E4F + 0x0c00, // U+0E50...U+0E5F + 0xfff0, // U+0F00...U+0F0F + 0x0017, // U+0F10...U+0F1F + 0x3c00, // U+0F30...U+0F3F + 0x0020, // U+0F80...U+0F8F + 0x061f, // U+0FD0...U+0FDF + 0xfc00, // U+1040...U+104F + 0x0800, // U+10F0...U+10FF + 0x01ff, // U+1360...U+136F + 0x0001, // U+1400...U+140F + 0x6000, // U+1660...U+166F + 0x1800, // U+1690...U+169F + 0x3800, // U+16E0...U+16EF + 0x0060, // U+1730...U+173F + 0x0770, // U+17D0...U+17DF + 0x07ff, // U+1800...U+180F + 0x0030, // U+1940...U+194F + 0xc000, // U+1A10...U+1A1F + 0x3f7f, // U+1AA0...U+1AAF + 0xfc00, // U+1B50...U+1B5F + 0x0001, // U+1B60...U+1B6F + 0xf000, // U+1BF0...U+1BFF + 0xf800, // U+1C30...U+1C3F + 0xc000, // U+1C70...U+1C7F + 0x00ff, // U+1CC0...U+1CCF + 0x0008, // U+1CD0...U+1CDF + 0xffff, // U+2010...U+201F + 0x00ff, // U+2020...U+202F + 0xffff, // U+2030...U+203F + 0xffef, // U+2040...U+204F + 0x7ffb, // U+2050...U+205F + 0x6000, // U+2070...U+207F + 0x6000, // U+2080...U+208F + 0x0f00, // U+2300...U+230F + 0x0600, // U+2320...U+232F + 0xff00, // U+2760...U+276F + 0x003f, // U+2770...U+277F + 0x0060, // U+27C0...U+27CF + 0xffc0, // U+27E0...U+27EF + 0xfff8, // U+2980...U+298F + 0x01ff, // U+2990...U+299F + 0x0f00, // U+29D0...U+29DF + 0x3000, // U+29F0...U+29FF + 0xde00, // U+2CF0...U+2CFF + 0x0001, // U+2D70...U+2D7F + 0xffff, // U+2E00...U+2E0F + 0xffff, // U+2E10...U+2E1F + 0x7fff, // U+2E20...U+2E2F + 0xffff, // U+2E30...U+2E3F + 0x0007, // U+2E40...U+2E4F + 0xff0e, // U+3000...U+300F + 0xfff3, // U+3010...U+301F + 0x2001, // U+3030...U+303F + 0x0001, // U+30A0...U+30AF + 0x0800, // U+30F0...U+30FF + 0xc000, // U+A4F0...U+A4FF + 0xe000, // U+A600...U+A60F + 0x4008, // U+A670...U+A67F + 0x00fc, // U+A6F0...U+A6FF + 0x00f0, // U+A870...U+A87F + 0xc000, // U+A8C0...U+A8CF + 0x0700, // U+A8F0...U+A8FF + 0xc000, // U+A920...U+A92F + 0x8000, // U+A950...U+A95F + 0x3ffe, // U+A9C0...U+A9CF + 0xc000, // U+A9D0...U+A9DF + 0xf000, // U+AA50...U+AA5F + 0xc000, // U+AAD0...U+AADF + 0x0003, // U+AAF0...U+AAFF + 0x0800, // U+ABE0...U+ABEF + 0xc000, // U+FD30...U+FD3F + 0x03ff, // U+FE10...U+FE1F + 0xffff, // U+FE30...U+FE3F + 0xffff, // U+FE40...U+FE4F + 0xfff7, // U+FE50...U+FE5F + 0x0d0b, // U+FE60...U+FE6F + 0xf7ee, // U+FF00...U+FF0F + 0x8c00, // U+FF10...U+FF1F + 0x0001, // U+FF20...U+FF2F + 0xb800, // U+FF30...U+FF3F + 0xa800, // U+FF50...U+FF5F + 0x003f, // U+FF60...U+FF6F + 0x0007, // U+10100...U+1010F + 0x8000, // U+10390...U+1039F + 0x0001, // U+103D0...U+103DF + 0x8000, // U+10560...U+1056F + 0x0080, // U+10850...U+1085F + 0x8000, // U+10910...U+1091F + 0x8000, // U+10930...U+1093F + 0x01ff, // U+10A50...U+10A5F + 0x8000, // U+10A70...U+10A7F + 0x007f, // U+10AF0...U+10AFF + 0xfe00, // U+10B30...U+10B3F + 0x1e00, // U+10B90...U+10B9F + 0x3f80, // U+11040...U+1104F + 0xd800, // U+110B0...U+110BF + 0x0003, // U+110C0...U+110CF + 0x000f, // U+11140...U+1114F + 0x0030, // U+11170...U+1117F + 0x21e0, // U+111C0...U+111CF + 0x3f00, // U+11230...U+1123F + 0x0040, // U+114C0...U+114CF + 0x03fe, // U+115C0...U+115CF + 0x000e, // U+11640...U+1164F + 0x001f, // U+12470...U+1247F + 0xc000, // U+16A60...U+16A6F + 0x0020, // U+16AF0...U+16AFF + 0x0f80, // U+16B30...U+16B3F + 0x0010, // U+16B40...U+16B4F + 0x8000, // U+1BC90...U+1BC9F + ]; + +pub fn is_ascii_punctuation(c: u8) -> bool { + c < 128 && (PUNCT_MASKS_ASCII[(c / 16) as usize] & (1 << (c & 15))) != 0 +} + +pub fn is_punctuation(c: char) -> bool { + let cp = c as u32; + if cp < 128 {return is_ascii_punctuation(cp as u8); } + if cp > 0x1BC9F { return false; } + let high = (cp / 16) as u16; + match PUNCT_TAB.binary_search(&high) { + Ok(index) => (PUNCT_MASKS[index] & (1 << (cp & 15))) != 0, + _ => false + } +} + +#[cfg(test)] +mod tests { + use super::{is_ascii_punctuation, is_punctuation}; + + #[test] + fn test_ascii() { + assert!(is_ascii_punctuation(b'!')); + assert!(is_ascii_punctuation(b'@')); + assert!(is_ascii_punctuation(b'~')); + assert!(!is_ascii_punctuation(b' ')); + assert!(!is_ascii_punctuation(b'0')); + assert!(!is_ascii_punctuation(b'A')); + assert!(!is_ascii_punctuation(0xA1)); + } + + #[test] + fn test_unicode() { + assert!(is_punctuation('~')); + assert!(!is_punctuation(' ')); + + assert!(is_punctuation('\u{00A1}')); + assert!(is_punctuation('\u{060C}')); + assert!(is_punctuation('\u{FF65}')); + assert!(is_punctuation('\u{1BC9F}')); + assert!(!is_punctuation('\u{1BCA0}')); + } +} + diff --git a/vendor/pulldown-cmark/src/scanners.rs b/vendor/pulldown-cmark/src/scanners.rs new file mode 100644 index 0000000000..ebcd02bd62 --- /dev/null +++ b/vendor/pulldown-cmark/src/scanners.rs @@ -0,0 +1,1266 @@ +// Copyright 2015 Google Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +//! Scanners for fragments of CommonMark syntax + +use std::char; +use std::convert::TryInto; + +use crate::entities; +use crate::parse::{Alignment, LinkType, HtmlScanGuard}; +use crate::strings::CowStr; +pub use crate::puncttable::{is_ascii_punctuation, is_punctuation}; + +use memchr::memchr; + +// Allowing arbitrary depth nested parentheses inside link destinations +// can create denial of service vulnerabilities if we're not careful. +// The simplest countermeasure is to limit their depth, which is +// explicitly allowed by the spec as long as the limit is at least 3: +// https://spec.commonmark.org/0.29/#link-destination +const LINK_MAX_NESTED_PARENS: usize = 5; + +// sorted for binary search +const HTML_TAGS: [&str; 62] = ["address", "article", "aside", "base", + "basefont", "blockquote", "body", "caption", "center", "col", "colgroup", + "dd", "details", "dialog", "dir", "div", "dl", "dt", "fieldset", + "figcaption", "figure", "footer", "form", "frame", "frameset", "h1", + "h2", "h3", "h4", "h5", "h6", "head", "header", "hr", "html", "iframe", + "legend", "li", "link", "main", "menu", "menuitem", "nav", "noframes", + "ol", "optgroup", "option", "p", "param", "section", "source", "summary", + "table", "tbody", "td", "tfoot", "th", "thead", "title", "tr", "track", + "ul"]; + +/// Analysis of the beginning of a line, including indentation and container +/// markers. +#[derive(Clone)] +pub struct LineStart<'a> { + bytes: &'a [u8], + tab_start: usize, + ix: usize, + spaces_remaining: usize, + // no thematic breaks can occur before this offset. + // this prevents scanning over and over up to a certain point + min_hrule_offset: usize, +} + +impl<'a> LineStart<'a> { + pub(crate) fn new(bytes: &[u8]) -> LineStart { + LineStart { + bytes, + tab_start: 0, + ix: 0, + spaces_remaining: 0, + min_hrule_offset: 0, + } + } + + /// Try to scan a number of spaces. + /// + /// Returns true if all spaces were consumed. + /// + /// Note: consumes some spaces even if not successful. + pub(crate) fn scan_space(&mut self, n_space: usize) -> bool { + self.scan_space_inner(n_space) == 0 + } + + /// Scan a number of spaces up to a maximum. + /// + /// Returns number of spaces scanned. + pub(crate) fn scan_space_upto(&mut self, n_space: usize) -> usize { + n_space - self.scan_space_inner(n_space) + } + + /// Returns unused remainder of spaces. + fn scan_space_inner(&mut self, mut n_space: usize) -> usize { + let n_from_remaining = self.spaces_remaining.min(n_space); + self.spaces_remaining -= n_from_remaining; + n_space -= n_from_remaining; + while n_space > 0 && self.ix < self.bytes.len() { + match self.bytes[self.ix] { + b' ' => { + self.ix += 1; + n_space -= 1; + } + b'\t' => { + let spaces = 4 - (self.ix - self.tab_start) % 4; + self.ix += 1; + self.tab_start = self.ix; + let n = spaces.min(n_space); + n_space -= n; + self.spaces_remaining = spaces - n; + } + _ => break, + } + } + n_space + } + + /// Scan all available ASCII whitespace (not including eol). + pub(crate) fn scan_all_space(&mut self) { + self.spaces_remaining = 0; + self.ix += self.bytes[self.ix..] + .iter() + .take_while(|&&b| b == b' ' || b == b'\t') + .count(); + } + + /// Determine whether we're at end of line (includes end of file). + pub(crate) fn is_at_eol(&self) -> bool { + if self.ix >= self.bytes.len() { + return true; + } + let c = self.bytes[self.ix]; + c == b'\r' || c == b'\n' + } + + fn scan_ch(&mut self, c: u8) -> bool { + if self.ix < self.bytes.len() && self.bytes[self.ix] == c { + self.ix += 1; + true + } else { + false + } + } + + pub(crate) fn scan_blockquote_marker(&mut self) -> bool { + let save = self.clone(); + let _ = self.scan_space(3); + if self.scan_ch(b'>') { + let _ = self.scan_space(1); + true + } else { + *self = save; + false + } + } + + /// Scan a list marker. + /// + /// Return value is the character, the start index, and the indent in spaces. + /// For ordered list markers, the character will be one of b'.' or b')'. For + /// bullet list markers, it will be one of b'-', b'+', or b'*'. + pub(crate) fn scan_list_marker(&mut self) -> Option<(u8, usize, usize)> { + let save = self.clone(); + let indent = self.scan_space_upto(3); + if self.ix < self.bytes.len() { + let c = self.bytes[self.ix]; + if c == b'-' || c == b'+' || c == b'*' { + if self.ix >= self.min_hrule_offset { + // there could be an hrule here + if let Err(min_offset) = scan_hrule(&self.bytes[self.ix..]) { + self.min_hrule_offset = min_offset; + } else { + *self = save; + return None; + } + } + self.ix += 1; + if self.scan_space(1) || self.is_at_eol() { + return self.finish_list_marker(c, 0, indent + 2); + } + } else if c >= b'0' && c <= b'9' { + let start_ix = self.ix; + let mut ix = self.ix + 1; + let mut val = u64::from(c - b'0'); + while ix < self.bytes.len() && ix - start_ix < 10 { + let c = self.bytes[ix]; + ix += 1; + if c >= b'0' && c <= b'9' { + val = val * 10 + u64::from(c - b'0'); + } else if c == b')' || c == b'.' { + self.ix = ix; + let val_usize = val as usize; + // This will cause some failures on 32 bit arch. + // TODO (breaking API change): should be u64, not usize. + if val_usize as u64 != val { return None; } + if self.scan_space(1) || self.is_at_eol() { + return self.finish_list_marker(c, val_usize, indent + self.ix - start_ix); + } else { + break; + } + } else { + break; + } + } + } + } + *self = save; + None + } + + fn finish_list_marker(&mut self, c: u8, start: usize, mut indent: usize) + -> Option<(u8, usize, usize)> + { + let save = self.clone(); + + // skip the rest of the line if it's blank + if scan_blank_line(&self.bytes[self.ix..]).is_some() { + return Some((c, start, indent)); + } + + let post_indent = self.scan_space_upto(4); + if post_indent < 4 { + indent += post_indent; + } else { + *self = save; + } + Some((c, start, indent)) + } + + /// Returns Some(is_checked) when a task list marker was found. Resets itself + /// to original state otherwise. + pub(crate) fn scan_task_list_marker(&mut self) -> Option { + let save = self.clone(); + self.scan_space_upto(3); + + if !self.scan_ch(b'[') { + *self = save; + return None; + } + let is_checked = match self.bytes.get(self.ix) { + Some(&c) if is_ascii_whitespace_no_nl(c) => { + self.ix += 1; + false + } + Some(b'x') | Some(b'X') => { + self.ix += 1; + true + } + _ => { + *self = save; + return None; + } + }; + if !self.scan_ch(b']') { + *self = save; + return None; + } + if !self.bytes.get(self.ix).map(|&b| is_ascii_whitespace_no_nl(b)).unwrap_or(false) { + *self = save; + return None; + } + Some(is_checked) + } + + pub(crate) fn bytes_scanned(&self) -> usize { + self.ix + } + + pub(crate) fn remaining_space(&self) -> usize { + self.spaces_remaining + } +} + +pub(crate) fn is_ascii_whitespace(c: u8) -> bool { + (c >= 0x09 && c <= 0x0d) || c == b' ' +} + +pub(crate) fn is_ascii_whitespace_no_nl(c: u8) -> bool { + c == b'\t' || c == 0x0b || c == 0x0c || c == b' ' +} + +fn is_ascii_alpha(c: u8) -> bool { + match c { + b'a' ... b'z' | b'A' ... b'Z' => true, + _ => false + } +} + +fn is_ascii_alphanumeric(c: u8) -> bool { + match c { + b'0' ... b'9' | b'a' ... b'z' | b'A' ... b'Z' => true, + _ => false + } +} + +fn is_ascii_letterdigitdash(c: u8) -> bool { + c == b'-' || is_ascii_alphanumeric(c) +} + +fn is_digit(c: u8) -> bool { + b'0' <= c && c <= b'9' +} + +fn is_valid_unquoted_attr_value_char(c: u8) -> bool { + match c { + b'\'' | b'"' | b' ' | b'=' | b'>' | b'<' | b'`' | b'\n' | b'\r' => false, + _ => true + } +} + +// scan a single character +pub(crate) fn scan_ch(data: &[u8], c: u8) -> usize { + if !data.is_empty() && data[0] == c { 1 } else { 0 } +} + +pub(crate) fn scan_while(data: &[u8], mut f: F) -> usize + where F: FnMut(u8) -> bool { + data.iter().take_while(|&&c| f(c)).count() +} + +pub(crate) fn scan_rev_while(data: &[u8], mut f: F) -> usize + where F: FnMut(u8) -> bool { + data.iter().rev().take_while(|&&c| f(c)).count() +} + +pub(crate) fn scan_ch_repeat(data: &[u8], c: u8) -> usize { + scan_while(data, |x| x == c) +} + +// Note: this scans ASCII whitespace only, for Unicode whitespace use +// a different function. +pub(crate) fn scan_whitespace_no_nl(data: &[u8]) -> usize { + scan_while(data, is_ascii_whitespace_no_nl) +} + +fn scan_attr_value_chars(data: &[u8]) -> usize { + scan_while(data, is_valid_unquoted_attr_value_char) +} + +pub(crate) fn scan_eol(bytes: &[u8]) -> Option { + if bytes.is_empty() { return Some(0); } + match bytes[0] { + b'\n' => Some(1), + b'\r' => Some(if bytes.get(1) == Some(&b'\n') { 2 } else { 1 }), + _ => None + } +} + +pub(crate) fn scan_blank_line(bytes: &[u8]) -> Option { + let i = scan_whitespace_no_nl(bytes); + scan_eol(&bytes[i..]).map(|n| i + n) +} + +pub(crate) fn scan_nextline(bytes: &[u8]) -> usize { + memchr(b'\n', bytes).map_or(bytes.len(), |x| x + 1) +} + +// return: end byte for closing code fence, or None +// if the line is not a closing code fence +pub(crate) fn scan_closing_code_fence(bytes: &[u8], fence_char: u8, n_fence_char: usize) -> Option { + if bytes.is_empty() { return Some(0); } + let mut i = 0; + let num_fence_chars_found = scan_ch_repeat(&bytes[i..], fence_char); + if num_fence_chars_found < n_fence_char { return None; } + i += num_fence_chars_found; + let num_trailing_spaces = scan_ch_repeat(&bytes[i..], b' '); + i += num_trailing_spaces; + scan_eol(&bytes[i..]).map(|_| i) +} + +// returned pair is (number of bytes, number of spaces) +fn calc_indent(text: &[u8], max: usize) -> (usize, usize) { + let mut spaces = 0; + let mut offset = 0; + + for (i, &b) in text.iter().enumerate() { + match b { + b' ' => { + spaces += 1; + if spaces == max { + break; + } + } + b'\t' => { + let new_spaces = spaces + 4 - (spaces & 3); + if new_spaces > max { + break; + } + spaces = new_spaces; + }, + _ => break, + } + offset = i; + } + + (offset, spaces) +} + +/// Scan hrule opening sequence. +/// +/// Returns Ok(x) when it finds an hrule, where x is the +/// size of line containing the hrule, including the trailing newline. +/// +/// Returns Err(x) when it does not find an hrule and x is +/// the offset in data before no hrule can appear. +pub(crate) fn scan_hrule(bytes: &[u8]) -> Result { + if bytes.len() < 3 { return Err(0); } + let c = bytes[0]; + if !(c == b'*' || c == b'-' || c == b'_') { return Err(0); } + let mut n = 0; + let mut i = 0; + + while i < bytes.len() { + match bytes[i] { + b'\n' | b'\r' => { + i += scan_eol(&bytes[i..]).unwrap_or(0); + break; + } + c2 if c2 == c => { + n += 1; + } + b' ' | b'\t' => (), + _ => return Err(i) + } + i += 1; + } + if n >= 3 { Ok(i) } else { Err(i) } +} + +/// Scan an ATX heading opening sequence. +/// +/// Returns number of bytes in prefix and level. +pub(crate) fn scan_atx_heading(data: &[u8]) -> Option<(usize, i32)> { + let level = scan_ch_repeat(data, b'#'); + if level >= 1 && level <= 6 && data.get(level).cloned().map_or(true, is_ascii_whitespace) { + Some((level, level as i32)) + } else { + None + } +} + +/// Scan a setext heading underline. +/// +/// Returns number of bytes in line (including trailing newline) and level. +pub(crate) fn scan_setext_heading(data: &[u8]) -> Option<(usize, i32)> { + let c = *data.get(0)?; + if !(c == b'-' || c == b'=') { return None; } + let mut i = 1 + scan_ch_repeat(&data[1..], c); + i += scan_blank_line(&data[i..])?; + let level = if c == b'=' { 1 } else { 2 }; + Some((i, level)) +} + +// returns number of bytes in line (including trailing +// newline) and column alignments +pub(crate) fn scan_table_head(data: &[u8]) -> (usize, Vec) { + let (mut i, spaces) = calc_indent(data, 4); + if spaces > 3 || i == data.len() { + return (0, vec![]); + } + let mut cols = vec![]; + let mut active_col = Alignment::None; + let mut start_col = true; + if data[i] == b'|' { + i += 1; + } + for c in &data[i..] { + if let Some(n) = scan_eol(&data[i..]) { + i += n; + break; + } + match *c { + b' ' => (), + b':' => { + active_col = + match (start_col, active_col) { + (true, Alignment::None) => Alignment::Left, + (false, Alignment::Left) => Alignment::Center, + (false, Alignment::None) => Alignment::Right, + _ => active_col, + }; + start_col = false; + } + b'-' => { + start_col = false; + }, + b'|' => { + start_col = true; + cols.push(active_col); + active_col = Alignment::None; + }, + _ => { + cols = vec![]; + start_col = true; + break; + }, + } + i += 1; + } + + if !start_col { + cols.push(active_col); + } + + (i, cols) +} + +/// Scan code fence. +/// +/// Returns number of bytes scanned and the char that is repeated to make the code fence. +pub(crate) fn scan_code_fence(data: &[u8]) -> Option<(usize, u8)> { + let c = *data.get(0)?; + if !(c == b'`' || c == b'~') { return None; } + let i = 1 + scan_ch_repeat(&data[1..], c); + if i >= 3 { + if c == b'`' { + let suffix = &data[i..]; + let next_line = i + scan_nextline(suffix); + // FIXME: make sure this is correct + if suffix[..(next_line - i)].iter().any(|&b| b == b'`') { + return None; + } + } + Some((i, c)) + } else { + None + } +} + +pub(crate) fn scan_blockquote_start(data: &[u8]) -> Option { + if data.starts_with(b"> ") { + Some(2) + } else { + None + } +} + +/// This already assumes the list item has been scanned. +pub(crate) fn scan_empty_list(data: &[u8]) -> bool { + let mut ix = 0; + for _ in 0..2 { + if let Some(bytes) = scan_blank_line(&data[ix..]) { + ix += bytes; + } else { + return false; + } + } + true +} + +// return number of bytes scanned, delimiter, start index, and indent +pub(crate) fn scan_listitem(bytes: &[u8]) -> Option<(usize, u8, usize, usize)> { + let mut c = *bytes.get(0)?; + let (w, start) = match c { + b'-' | b'+' | b'*' => (1, 0), + b'0' ... b'9' => { + let (length, start) = parse_decimal(bytes); + c = *bytes.get(length)?; + if !(c == b'.' || c == b')') { return None; } + (length + 1, start) + } + _ => { return None; } + }; + // TODO: replace calc_indent with scan_leading_whitespace, for tab correctness + let (mut postn, mut postindent) = calc_indent(&bytes[w.. ], 5); + if postindent == 0 { + if scan_eol(&bytes[w..]).is_none() { + return None; + } + postindent += 1; + } else if postindent > 4 { + postn = 1; + postindent = 1; + } + if scan_blank_line(&bytes[w..]).is_some() { + postn = 0; + postindent = 1; + } + Some((w + postn, c, start, w + postindent)) +} + +// returns (number of bytes, parsed decimal) +fn parse_decimal(bytes: &[u8]) -> (usize, usize) { + match bytes.iter() + .take_while(|&&b| is_digit(b)) + .try_fold((0, 0usize), |(count, acc), c| { + match acc.checked_mul(10) { + Some(ten_acc) => Ok((count + 1, ten_acc + usize::from(c - b'0'))), + // stop early on overflow + None => Err((count, acc)), + } + }) + { + Ok(p) | Err(p) => p, + } +} + +// returns (number of bytes, parsed hex) +fn parse_hex(bytes: &[u8]) -> (usize, usize) { + match bytes.iter() + .try_fold((0, 0usize), |(count, acc), c| { + let mut c = *c; + let digit = if c >= b'0' && c <= b'9' { + usize::from(c - b'0') + } else { + // make lower case + c |= 0x20; + if c >= b'a' && c <= b'f' { + usize::from(c - b'a' + 10) + } else { + return Err((count, acc)); + } + }; + match acc.checked_mul(16) { + Some(sixteen_acc) => Ok((count + 1, sixteen_acc + digit)), + // stop early on overflow + None => Err((count, acc)), + } + }) + { + Ok(p) | Err(p) => p, + } +} + +fn char_from_codepoint(input: usize) -> Option { + let mut codepoint = input.try_into().ok()?; + if codepoint == 0 { + codepoint = 0xFFFD; + } + char::from_u32(codepoint) +} + +// doesn't bother to check data[0] == '&' +pub(crate) fn scan_entity(bytes: &[u8]) -> (usize, Option>) { + let mut end = 1; + if scan_ch(&bytes[end..], b'#') == 1 { + end += 1; + let (bytecount, codepoint) = if end < bytes.len() && bytes[end] | 0x20 == b'x' { + end += 1; + parse_hex(&bytes[end..]) + } else { + parse_decimal(&bytes[end..]) + }; + end += bytecount; + return if bytecount == 0 || scan_ch(&bytes[end..], b';') == 0 { + (0, None) + } else if let Some(c) = char_from_codepoint(codepoint) { + (end + 1, Some(c.into())) + } else { + (0, None) + }; + } + end += scan_while(&bytes[end..], is_ascii_alphanumeric); + if scan_ch(&bytes[end..], b';') == 1 { + if let Some(value) = entities::get_entity(&bytes[1..end]) { + return (end + 1, Some(value.into())); + } + } + (0, None) +} + +// returns (bytes scanned, title cow) +fn scan_link_title(text: &str, start_ix: usize) -> Option<(usize, CowStr<'_>)> { + let bytes = text.as_bytes(); + let open = match bytes.get(start_ix) { + Some(b @ b'\'') | Some(b @ b'\"') | Some(b @ b'(') => *b, + _ => return None, + }; + let close = if open == b'(' { b')' } else { open }; + + let mut title = String::new(); + let mut mark = start_ix + 1; + let mut i = start_ix + 1; + + while i < bytes.len() { + let c = bytes[i]; + + if c == close { + let cow = if mark == 1 { + (i - start_ix + 1, text[mark..i].into()) + } else { + title.push_str(&text[mark..i]); + (i - start_ix + 1, title.into()) + }; + + return Some(cow); + } + if c == open { + return None; + } + + // TODO: do b'\r' as well? + if c == b'&' { + if let (n, Some(value)) = scan_entity(&bytes[i..]) { + title.push_str(&text[mark..i]); + title.push_str(&value); + i += n; + mark = i; + continue; + } + } + if c == b'\\' { + if i + 1 < bytes.len() && is_ascii_punctuation(bytes[i + 1]) { + title.push_str(&text[mark..i]); + i += 1; + mark = i; + } + } + + i += 1; + } + + None +} + +// FIXME: we can most likely re-use other scanners +// returns (bytelength, title_str) +pub(crate) fn scan_refdef_title(text: &str) -> Option<(usize, &str)> { + let mut chars = text.chars().peekable(); + let closing_delim = match chars.next()? { + '\'' => '\'', + '"' => '"', + '(' => ')', + _ => return None, + }; + let mut bytecount = 1; + + while let Some(c) = chars.next() { + match c { + '\n' => { + bytecount += 1; + let mut next = *chars.peek()?; + while is_ascii_whitespace_no_nl(next as u8) { + bytecount += chars.next()?.len_utf8(); + next = *chars.peek()?; + } + if *chars.peek()? == '\n' { + // blank line - not allowed + return None; + } + } + '\\' => { + let next_char = chars.next()?; + bytecount += 1 + next_char.len_utf8(); + } + c if c == closing_delim => { + return Some((bytecount + 1, &text[1..bytecount])); + } + c => { + bytecount += c.len_utf8(); + } + } + } + None +} + +// note: dest returned is raw, still needs to be unescaped +// TODO: check that nested parens are really not allowed for refdefs +// TODO(performance): this func should probably its own unescaping +pub(crate) fn scan_link_dest(data: &str, start_ix: usize, max_next: usize) -> Option<(usize, &str)> { + let bytes = &data.as_bytes()[start_ix..]; + let mut i = scan_ch(bytes, b'<'); + + if i != 0 { + // pointy links + while i < bytes.len() { + match bytes[i] { + b'\n' | b'\r' | b'<' => return None, + b'>' => return Some((i + 1, &data[(start_ix + 1)..(start_ix + i)])), + b'\\' if i + 1 < bytes.len() && is_ascii_punctuation(bytes[i + 1]) => { + i += 1; + } + _ => {} + } + i += 1; + } + None + } else { + // non-pointy links + let mut nest = 0; + while i < bytes.len() { + match bytes[i] { + 0x0 ... 0x20 => { + break; + } + b'(' => { + if nest > max_next { + return None; + } + nest += 1; + } + b')' => { + if nest == 0 { + break; + } + nest -= 1; + } + b'\\' if i + 1 < bytes.len() && is_ascii_punctuation(bytes[i + 1]) => { + i += 1; + } + _ => {} + } + i += 1; + } + Some((i, &data[start_ix..(start_ix + i)])) + } +} + + +/// Returns next byte index, url and title. +pub(crate) fn scan_inline_link(underlying: &str, start_ix: usize) -> Option<(usize, CowStr<'_>, CowStr<'_>)> { + let mut ix = start_ix; + if scan_ch(&underlying.as_bytes()[ix..], b'(') == 0 { + return None; + } + ix += 1; + ix += scan_while(&underlying.as_bytes()[ix..], is_ascii_whitespace); + + let (dest_length, dest) = scan_link_dest(underlying, ix, LINK_MAX_NESTED_PARENS)?; + let dest = unescape(dest); + ix += dest_length; + + ix += scan_while(&underlying.as_bytes()[ix..], is_ascii_whitespace); + + let title = if let Some((bytes_scanned, t)) = scan_link_title(underlying, ix) { + ix += bytes_scanned; + ix += scan_while(&underlying.as_bytes()[ix..], is_ascii_whitespace); + t + } else { + "".into() + }; + if scan_ch(&underlying.as_bytes()[ix..], b')') == 0 { + return None; + } + ix += 1; + + Some((ix, dest, title)) +} + +/// Returns bytes scanned +fn scan_attribute_name(data: &[u8]) -> Option { + let (&c, tail) = data.split_first()?; + if is_ascii_alpha(c) || c == b'_' || c == b':' { + Some(1 + scan_while(tail, |c| is_ascii_alphanumeric(c) + || c == b'_' || c == b'.' || c == b':' || c == b'-')) + } else { + None + } +} + +/// Returns byte scanned +fn scan_inline_attribute_value(data: &[u8]) -> Option { + let c = *data.first()?; + let mut ix = 1; + + if is_ascii_whitespace(c) || c == b'=' || c == b'<' || c == b'>' || c == b'`' { + None + } else if c == b'\'' || c == b'"' { + // FIXME: this is very likely a quadratic scaling bug + ix += scan_while(&data[ix..], |b| b != c); + if scan_ch(&data[ix..], c) == 1 { + Some(ix + 1) + } else { + None + } + } else { + ix += scan_attr_value_chars(&data[ix..]); + Some(ix) + } +} + +/// Returns byte scanned (TODO: should it return new offset?) +fn scan_inline_attribute(data: &[u8]) -> Option { + let mut ix = scan_attribute_name(data)?; + let n_whitespace = scan_while(&data[ix..], is_ascii_whitespace); + ix += n_whitespace; + if scan_ch(&data[ix..], b'=') == 1 { + ix += 1; + ix += scan_while(&data[ix..], is_ascii_whitespace); + ix += scan_inline_attribute_value(&data[ix..])?; + } else if n_whitespace > 0 { + // Leave whitespace for next attribute. + ix -= 1; + } + Some(ix) +} + +fn scan_attribute_value(data: &[u8]) -> Option { + let mut i = 0; + match *data.get(0)? { + // FIXME: quadratic scaling bug? + b @ b'"' | b @ b'\'' => { + i += 1; + i += scan_while(&data[i..], |c| c != b && c != b'\n' && c != b'\r'); + if scan_ch(&data[i..], b) == 0 { + return None; + } + i += 1; + }, + b' ' | b'=' | b'>' | b'<' | b'`' | b'\n' | b'\r' => { return None; }, + _ => { // unquoted attribute value + i += scan_attr_value_chars(&data[i..]); + } + } + Some(i) +} + +// Remove backslash escapes and resolve entities +pub(crate) fn unescape(input: &str) -> CowStr<'_> { + let mut result = String::new(); + let mut mark = 0; + let mut i = 0; + let bytes = input.as_bytes(); + while i < bytes.len() { + match bytes[i] { + b'\\' if i + 1 < bytes.len() && is_ascii_punctuation(bytes[i + 1]) => { + result.push_str(&input[mark..i]); + mark = i + 1; + i += 2; + } + b'&' => { + match scan_entity(&bytes[i..]) { + (n, Some(value)) => { + result.push_str(&input[mark..i]); + result.push_str(&value); + i += n; + mark = i; + } + _ => i += 1 + } + } + b'\r' => { + result.push_str(&input[mark..i]); + i += 1; + mark = i; + } + _ => i += 1 + } + } + if mark == 0 { + input.into() + } else { + result.push_str(&input[mark..]); + result.into() + } +} + +/// Assumes `data` is preceded by `<`. +pub(crate) fn scan_html_block_tag(data: &[u8]) -> (usize, &[u8]) { + let i = scan_ch(data, b'/'); + let n = scan_while(&data[i..], is_ascii_alphanumeric); + // TODO: scan attributes and > + (i + n, &data[i .. i + n]) +} + +pub(crate) fn is_html_tag(tag: &[u8]) -> bool { + HTML_TAGS.binary_search_by(|probe| { + let probe_bytes_iter = probe.as_bytes().iter(); + let tag_bytes_iter = tag.iter(); + + probe_bytes_iter.zip(tag_bytes_iter) + .find_map(|(&a, &b)| { + // We can compare case insensitively because the probes are + // all lower case alpha strings. + match a.cmp(&(b | 0x20)) { + std::cmp::Ordering::Equal => None, + inequality => Some(inequality), + } + }) + .unwrap_or_else(|| probe.len().cmp(&tag.len())) + }).is_ok() +} + +/// Assumes that `data` is preceded by `<`. +pub(crate) fn scan_html_type_7(data: &[u8]) -> Option { + let close_tag_bytes = scan_ch(&data, b'/'); + let l = scan_while(&data[close_tag_bytes..], is_ascii_alpha); + if l == 0 { + return None; + } + let mut i = close_tag_bytes + l; + i += scan_while(&data[i..], is_ascii_letterdigitdash); + + if close_tag_bytes == 0 { + loop { + let whitespace = scan_whitespace_no_nl(&data[i..]); + i += whitespace; + if let Some(b'/') | Some(b'>') = data.get(i) { + break; + } + if whitespace == 0 { return None; } + i += scan_attribute(&data[i..])?; + } + } + + i += scan_whitespace_no_nl(&data[i..]); + + if close_tag_bytes == 0 { + i += scan_ch(&data[i..], b'/'); + } + + let c = scan_ch(&data[i..], b'>'); + if c == 0 { + return None; + } + i += c; + + scan_blank_line(&data[i..]).map(|_| i) +} + +fn scan_attribute(data: &[u8]) -> Option { + let mut i = scan_whitespace_no_nl(data); + i += scan_attribute_name(&data[i..])?; + scan_attribute_value_spec(&data[i..]).map(|attr_valspec_bytes| attr_valspec_bytes + i) +} + +fn scan_attribute_value_spec(data: &[u8]) -> Option { + let mut i = scan_whitespace_no_nl(data); + let eq = scan_ch(&data[i..], b'='); + if eq == 0 { return None; } + i += eq; + i += scan_whitespace_no_nl(&data[i..]); + i += scan_attribute_value(&data[i..])?; + Some(i) +} + +/// Returns (next_byte_offset, uri, type) +pub(crate) fn scan_autolink(text: &str, start_ix: usize) -> Option<(usize, CowStr<'_>, LinkType)> { + scan_uri(text, start_ix).map(|(bytes, uri)| (bytes, uri, LinkType::Autolink)) + .or_else(|| scan_email(text, start_ix).map(|(bytes, uri)| (bytes, uri, LinkType::Email))) +} + +/// Returns (next_byte_offset, uri) +fn scan_uri(text: &str, start_ix: usize) -> Option<(usize, CowStr<'_>)> { + let bytes = &text.as_bytes()[start_ix..]; + + // scheme's first byte must be an ascii letter + if bytes.is_empty() || !is_ascii_alpha(bytes[0]) { + return None; + } + + let mut i = 1; + + while i < bytes.len() { + let c = bytes[i]; + i += 1; + match c { + c if is_ascii_alphanumeric(c) => (), + b'.' | b'-' | b'+' => (), + b':' => break, + _ => return None, + } + } + + // scheme length must be between 2 and 32 characters long. scheme + // must be followed by colon + if i < 3 || i > 33 { + return None; + } + + let mut ended = false; + while i < bytes.len() { + match bytes[i] { + b'\0' ... b' ' => { + ended = true; + } + b'>' | b'<' => break, + _ if ended => return None, + _ => (), + } + i += 1; + }; + + Some((start_ix + i + 1, text[start_ix..(start_ix + i)].into())) +} + +/// Returns (next_byte_offset, email) +fn scan_email(text: &str, start_ix: usize) -> Option<(usize, CowStr<'_>)> { + // using a regex library would be convenient, but doing it by hand is not too bad + let bytes = &text.as_bytes()[start_ix..]; + let mut i = 0; + + while i < bytes.len() { + let c = bytes[i]; + i += 1; + match c { + c if is_ascii_alphanumeric(c) => (), + b'.' | b'!' | b'#' | b'$' | b'%' | b'&' | b'\'' | b'*' | b'+' | b'/' | + b'=' | b'?' | b'^' | b'_' | b'`' | b'{' | b'|' | b'}' | b'~' | b'-' => (), + b'@' => break, + _ => return None, + } + } + + loop { + let label_start_ix = i; + let mut fresh_label = true; + + while i < bytes.len() { + match bytes[i] { + c if is_ascii_alphanumeric(c) => (), + b'-' if fresh_label => { + return None; + } + b'-' => (), + _ => break, + } + fresh_label = false; + i += 1; + } + + if i == label_start_ix || i - label_start_ix > 63 || bytes[i - 1] == b'-' { + return None; + } + + if scan_ch(&bytes[i..], b'.') == 0 { + break; + } + i += 1; + } + + if scan_ch(&bytes[i..], b'>') == 0 { + return None; + } + + Some((start_ix + i + 1, text[start_ix..(start_ix + i)].into())) +} + +/// Scan comment, declaration, or CDATA section, with initial " Option { + let c = *bytes.get(ix)?; + ix += 1; + match c { + b'-' => { + let dashes = scan_ch_repeat(&bytes[ix..], b'-'); + if dashes < 1 { return None; } + // Saw ""##; + let expected = r##"

Little header

+"##; + + let mut s = String::new(); + html::push_html(&mut s, Parser::new(&original)); + assert_eq!(expected, s); +} + +#[test] +fn html_test_5() { + let original = r##"Little header + + +

Useless

+]]>"##; + let expected = r##"

Little header

+ +

Useless

+]]>"##; + + let mut s = String::new(); + html::push_html(&mut s, Parser::new(&original)); + assert_eq!(expected, s); +} + +#[test] +fn html_test_6() { + let original = r##"Little header + +"##; + let expected = r##"

Little header

+"##; + + let mut s = String::new(); + html::push_html(&mut s, Parser::new(&original)); + assert_eq!(expected, s); +} + +#[test] +fn html_test_7() { + let original = r##"Little header +----------- + +"##; + let expected = r##"

Little header

+"##; + + let mut s = String::new(); + html::push_html(&mut s, Parser::new(&original)); + assert_eq!(expected, s); +} + +#[test] +fn html_test_8() { + let original = "A | B\n---|---\nfoo | bar"; + let expected = r##" + +
AB
foobar
+"##; + + let mut s = String::new(); + let mut opts = Options::empty(); + opts.insert(Options::ENABLE_TABLES); + html::push_html(&mut s, Parser::new_ext(&original, opts)); + assert_eq!(expected, s); +} + +#[test] +fn html_test_9() { + let original = "---"; + let expected = "
\n"; + + let mut s = String::new(); + html::push_html(&mut s, Parser::new(&original)); + assert_eq!(expected, s); +} + +#[test] +fn html_test_10() { + let original = "* * *"; + let expected = "
\n"; + + let mut s = String::new(); + html::push_html(&mut s, Parser::new(&original)); + assert_eq!(expected, s); +} + +// TODO: add broken link callback feature +/* +#[test] +fn html_test_broken_callback() { + let original = r##"[foo], +[bar], +[baz], + + [baz]: https://example.org +"##; + + let expected = r##"

foo, +[bar], +baz,

+"##; + + use pulldown_cmark::{Options, Parser, html}; + + let mut s = String::new(); + + let callback = |reference: &str, _normalized: &str| -> Option<(String, String)> { + if reference == "foo" || reference == "baz" { + Some(("https://replaced.example.org".into(), "some title".into())) + } else { + None + } + }; + + let p = Parser::new_with_broken_link_callback(&original, Options::empty(), Some(&callback)); + html::push_html(&mut s, p); + + assert_eq!(expected, s); +} +*/ diff --git a/vendor/pulldown-cmark/tests/lib.rs b/vendor/pulldown-cmark/tests/lib.rs new file mode 100644 index 0000000000..a2c717c444 --- /dev/null +++ b/vendor/pulldown-cmark/tests/lib.rs @@ -0,0 +1,336 @@ +#[macro_use] extern crate html5ever; +#[macro_use] extern crate lazy_static; + +use html5ever::{driver as html, QualName}; +use html5ever::rcdom::{Handle, NodeData, RcDom}; +use html5ever::serialize::{serialize, SerializeOpts}; +use pulldown_cmark::{Parser, Options}; + +use std::collections::HashSet; +use std::mem; +use std::rc::{Rc, Weak}; +use tendril::stream::TendrilSink; +use regex::Regex; + +mod suite; + +#[inline(never)] +pub fn test_markdown_html(input: &str, output: &str) { + let mut s = String::new(); + + let mut opts = Options::empty(); + opts.insert(Options::ENABLE_TABLES); + opts.insert(Options::ENABLE_FOOTNOTES); + opts.insert(Options::ENABLE_STRIKETHROUGH); + opts.insert(Options::ENABLE_TASKLISTS); + + let p = Parser::new_ext(input, opts); + pulldown_cmark::html::push_html(&mut s, p); + + assert_eq!(normalize_html(output), normalize_html(&s)); +} + +lazy_static! { + static ref WHITESPACE_RE: Regex = Regex::new(r"\s+").unwrap(); + static ref LEADING_WHITESPACE_RE: Regex = Regex::new(r"\A\s+").unwrap(); + static ref TRAILING_WHITESPACE_RE: Regex = Regex::new(r"\s+\z").unwrap(); + static ref BLOCK_TAGS: HashSet<&'static str> = [ + "article", "header", "aside", "hgroup", "blockquote", "hr", "iframe", "body", "li", + "map", "button", "object", "canvas", "ol", "caption", "output", "col", "p", "colgroup", + "pre", "dd", "progress", "div", "section", "dl", "table", "td", "dt", "tbody", "embed", + "textarea", "fieldset", "tfoot", "figcaption", "th", "figure", "thead", "footer", "tr", + "form", "ul", "h1", "h2", "h3", "h4", "h5", "h6", "video", "script", "style" + ].iter().cloned().collect(); + static ref PRE_TAGS: HashSet<&'static str> = [ + "pre", "code" + ].iter().cloned().collect(); + static ref TABLE_TAGS: HashSet<&'static str> = [ + "table", "thead", "tbody", "tr", "td" + ].iter().cloned().collect(); +} + +fn make_html_parser() -> html::Parser { + html::parse_fragment( + RcDom::default(), + html::ParseOpts::default(), + QualName::new(None, ns!(html), local_name!("div")), + vec![], + ) +} + +fn normalize_html(s: &str) -> String { + let parser = make_html_parser(); + let dom = parser.one(s); + let body = normalize_dom(&dom); + let opts = SerializeOpts::default(); + let mut ret_val = Vec::new(); + serialize(&mut ret_val, &body, opts) + .expect("Writing to a string shouldn't fail (expect on OOM)"); + String::from_utf8(ret_val) + .expect("html5ever should always produce UTF8") +} + +fn normalize_dom(dom: &RcDom) -> Handle { + let body = { + let children = dom.document.children.borrow(); + children[0].clone() + }; + let mut current_level = Vec::new(); + let mut next_level = Vec::new(); + current_level.extend( + body.children.borrow() + .iter() + .cloned() + .rev() + ); + loop { + while let Some(mut node) = current_level.pop() { + let parent = node.parent.replace(None); + node.parent.replace(parent.clone()); + let parent = parent + .expect("a node in the DOM will have a parent, except the root, which is not processed") + .upgrade().expect("a node's parent will be pointed to by its parent (or the root pointer), and will not be dropped"); + let retain = normalize_node(&parent, &mut node); + if !retain { + let mut siblings = parent.children.borrow_mut(); + siblings.retain(|s| !Rc::ptr_eq(&node, s)); + } else { + next_level.extend( + node.children.borrow() + .iter() + .cloned() + .rev(), + ); + } + } + if next_level.is_empty() { break }; + mem::swap(&mut next_level, &mut current_level); + } + body +} + +// Returns false if node is an empty text node or an empty tbody. +// Returns true otherwise. +fn normalize_node(parent: &Handle, node: &mut Handle) -> bool { + match node.data { + NodeData::Comment { .. } | + NodeData::Doctype { .. } | + NodeData::Document | + NodeData::ProcessingInstruction { .. } => true, + NodeData::Text { ref contents, .. } => { + let mut contents = contents.borrow_mut(); + let is_pre = { + let mut parent = parent.clone(); + loop { + let is_pre = if let NodeData::Element{ ref name, .. } = parent.data { + PRE_TAGS.contains(&&*name.local.to_ascii_lowercase()) + } else { + false + }; + if is_pre { break true }; + let parent_ = parent.parent.replace(None); + parent.parent.replace(parent_.clone()); + let parent_ = parent_.as_ref().and_then(Weak::upgrade); + if let Some(parent_) = parent_ { + parent = parent_ + } else { + break false + }; + } + }; + if !is_pre { + let (is_first_in_block, is_last_in_block) = { + let mut is_first_in_block = true; + let mut is_last_in_block = true; + let mut parent = parent.clone(); + let mut node = node.clone(); + loop { + let reached_block = if let NodeData::Element{ ref name, .. } = parent.data { + BLOCK_TAGS.contains(&&*name.local.to_ascii_lowercase()) + } else { + false + }; + let (is_first, is_last) = { + let siblings = parent.children.borrow(); + let n = &node; + (siblings.get(0).map(|s| Rc::ptr_eq(s, n)).unwrap_or(false), siblings.len() > 0 && siblings.get(siblings.len() - 1).map(|s| Rc::ptr_eq(s, n)).unwrap_or(false)) + }; + is_first_in_block = is_first_in_block && is_first; + is_last_in_block = is_last_in_block && is_last; + if (is_first_in_block || is_last_in_block) && !reached_block { + node = parent.clone(); + let parent_ = parent.parent.replace(None); + parent.parent.replace(parent_.clone()); + let parent_ = parent_.as_ref().and_then(Weak::upgrade); + if let Some(parent_) = parent_ { + parent = parent_; + } else { + break (is_first_in_block, is_last_in_block) + } + } else { + break (is_first_in_block, is_last_in_block) + } + } + }; + let is_preceeded_by_ws = { + let mut parent = parent.clone(); + let mut node = node.clone(); + 'ascent: loop { + let is_first = { + let siblings = parent.children.borrow(); + let n = &node; + siblings.get(0).map(|s| Rc::ptr_eq(s, n)).unwrap_or(false) + }; + if is_first { + node = parent.clone(); + let parent_ = parent.parent.replace(None); + parent.parent.replace(parent_.clone()); + let parent_ = parent_.as_ref().and_then(Weak::upgrade); + if let Some(parent_) = parent_ { + parent = parent_; + } else { + break 'ascent false + } + } else { + let siblings = parent.children.borrow(); + let n = &node; + let mut pos = !0; + 'search: for (i, s) in siblings.iter().enumerate() { + if Rc::ptr_eq(s, n) { + pos = i; + break 'search; + } + } + assert!(pos != !0, "The list of node's parent's children shall contain node"); + assert!(pos != 0, "If node is not first, then node's position shall not be zero"); + let mut preceeding = siblings[pos-1].clone(); + 'descent: loop { + if let NodeData::Text { .. } = preceeding.data { + break 'descent + } + preceeding = { + let ch = preceeding.children.borrow(); + if ch.len() == 0 { break 'descent } + if let Some(preceeding_) = ch.get(ch.len() - 1) { + preceeding_.clone() + } else { + break 'descent + } + }; + } + if let NodeData::Text { ref contents, .. } = preceeding.data { + break 'ascent TRAILING_WHITESPACE_RE.is_match(&*contents.borrow()) + } else { + break 'ascent false + } + } + } + }; + + let is_in_table = if let NodeData::Element{ ref name, .. } = parent.data { + TABLE_TAGS.contains(&&*name.local.to_ascii_lowercase()) + } else { + false + }; + let whitespace_replacement = if is_in_table { + "" + } else { + " " + }; + *contents = WHITESPACE_RE.replace_all(&*contents, whitespace_replacement).as_ref().into(); + + if is_first_in_block || is_preceeded_by_ws { + *contents = LEADING_WHITESPACE_RE.replace_all(&*contents, "").as_ref().into(); + } + if is_last_in_block { + *contents = TRAILING_WHITESPACE_RE.replace_all(&*contents, "").as_ref().into(); + } + // TODO: collapse whitespace when adjacent to whitespace. + // For example, the whitespace in the span should be collapsed in all of these cases: + // + // " q " + // "q q" + // "q q" + // "q q" + // "q q" + } + &**contents != "" + } + NodeData::Element { ref attrs, ref name, .. } => { + let mut attrs = attrs.borrow_mut(); + for a in attrs.iter_mut() { + a.name.local = a.name.local.to_ascii_lowercase().into(); + } + attrs.sort_by(|a: &html5ever::Attribute, b: &html5ever::Attribute| { + (&*a.name.local).cmp(&*b.name.local) + }); + let ascii_name = &*name.local.to_ascii_lowercase(); + // drop empty tbody's + ascii_name != "tbody" || + node.children.borrow().len() > 1 || + node.children.borrow().iter().next().map(|only_child| match only_child.data { + NodeData::Text { ref contents, .. } => { + !contents.borrow().chars().all(|c| c.is_whitespace()) + } + _ => { + true + } + }).unwrap_or(false) + } + } +} + + +#[test] +fn strip_div_newline() { + assert_eq!("
", normalize_html("
\n
")); +} + +#[test] +fn strip_end_newline() { + assert_eq!("test", normalize_html("test\n")); +} + +#[test] +fn strip_double_space() { + assert_eq!("test mess", normalize_html("test mess")); +} + +#[test] +fn strip_inline_internal_text() { + assert_eq!("a b c", normalize_html(" a b c ")) +} + +#[test] +fn strip_inline_block_internal_text() { + assert_eq!("a b c", normalize_html(" a b c ")) +} + +#[test] +fn leaves_necessary_whitespace_alone() { + assert_eq!("a b c", normalize_html("a b c")) +} + +#[test] +fn leaves_necessary_whitespace_alone_weird() { + assert_eq!("a b c", normalize_html(" a b c")) +} + +#[test] +fn leaves_necessary_whitespace_all_nested() { + assert_eq!("", normalize_html(" ")) +} + +#[test] +fn drops_empty_tbody() { + assert_eq!( + "
hi
", + normalize_html("
hi
") + ) +} + +#[test] +fn leaves_nonempty_tbody() { + let input = "
hi
"; + assert_eq!(input, normalize_html(input)) +} diff --git a/vendor/pulldown-cmark/tests/suite/footnotes.rs b/vendor/pulldown-cmark/tests/suite/footnotes.rs new file mode 100644 index 0000000000..9db7218ef6 --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/footnotes.rs @@ -0,0 +1,165 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +use super::test_markdown_html; + +#[test] +fn footnotes_test_1() { + let original = r##"Lorem ipsum.[^a] + +[^a]: Cool. +"##; + let expected = r##"

Lorem ipsum.1

+
1 +

Cool.

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn footnotes_test_2() { + let original = r##"> This is the song that never ends.\ +> Yes it goes on and on my friends.[^lambchops] +> +> [^lambchops]: +"##; + let expected = r##"
+

This is the song that never ends.
+Yes it goes on and on my friends.1

+ +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn footnotes_test_3() { + let original = r##"Songs that simply loop are a popular way to annoy people. [^examples] + +[^examples]: + * [The song that never ends](https://www.youtube.com/watch?v=0U2zJOryHKQ) + * [I know a song that gets on everybody's nerves](https://www.youtube.com/watch?v=TehWI09qxls) + * [Ninety-nine bottles of beer on the wall](https://www.youtube.com/watch?v=qVjCag8XoHQ) +"##; + let expected = r##"

Songs that simply loop are a popular way to annoy people. 1

+ +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn footnotes_test_4() { + let original = r##"[^lorem]: If heaven ever wishes to grant me a boon, it will be a total effacing of the results of a mere chance which fixed my eye on a certain stray piece of shelf-paper. It was nothing on which I would naturally have stumbled in the course of my daily round, for it was an old number of an Australian journal, the Sydney Bulletin for April 18, 1925. It had escaped even the cutting bureau which had at the time of its issuance been avidly collecting material for my uncle's research. + +I had largely given over my inquiries into what Professor Angell called the "Cthulhu Cult", and was visiting a learned friend in Paterson, New Jersey; the curator of a local museum and a mineralogist of note. Examining one day the reserve specimens roughly set on the storage shelves in a rear room of the museum, my eye was caught by an odd picture in one of the old papers spread beneath the stones. It was the Sydney Bulletin I have mentioned, for my friend had wide affiliations in all conceivable foreign parts; and the picture was a half-tone cut of a hideous stone image almost identical with that which Legrasse had found in the swamp. +"##; + let expected = r##"
1 +

If heaven ever wishes to grant me a boon, it will be a total effacing of the results of a mere chance which fixed my eye on a certain stray piece of shelf-paper. It was nothing on which I would naturally have stumbled in the course of my daily round, for it was an old number of an Australian journal, the Sydney Bulletin for April 18, 1925. It had escaped even the cutting bureau which had at the time of its issuance been avidly collecting material for my uncle's research.

+
+

I had largely given over my inquiries into what Professor Angell called the "Cthulhu Cult", and was visiting a learned friend in Paterson, New Jersey; the curator of a local museum and a mineralogist of note. Examining one day the reserve specimens roughly set on the storage shelves in a rear room of the museum, my eye was caught by an odd picture in one of the old papers spread beneath the stones. It was the Sydney Bulletin I have mentioned, for my friend had wide affiliations in all conceivable foreign parts; and the picture was a half-tone cut of a hideous stone image almost identical with that which Legrasse had found in the swamp.

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn footnotes_test_5() { + let original = r##"[^ipsum]: How much wood would a woodchuck chuck. + +If a woodchuck could chuck wood. + + +# Forms of entertainment that aren't childish +"##; + let expected = r##"
1 +

How much wood would a woodchuck chuck.

+
+

If a woodchuck could chuck wood.

+

Forms of entertainment that aren't childish

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn footnotes_test_6() { + let original = r##"> He's also really stupid. [^why] +> +> [^why]: Because your mamma! + +As such, we can guarantee that the non-childish forms of entertainment are probably more entertaining to adults, since, having had a whole childhood doing the childish ones, the non-childish ones are merely the ones that haven't gotten boring yet. +"##; + let expected = r##"
+

He's also really stupid. 1

+
1 +

Because your mamma!

+
+
+

As such, we can guarantee that the non-childish forms of entertainment are probably more entertaining to adults, since, having had a whole childhood doing the childish ones, the non-childish ones are merely the ones that haven't gotten boring yet.

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn footnotes_test_7() { + let original = r##"Nested footnotes are considered poor style. [^a] [^xkcd] + +[^a]: This does not mean that footnotes cannot reference each other. [^b] + +[^b]: This means that a footnote definition cannot be directly inside another footnote definition. +> This means that a footnote cannot be directly inside another footnote's body. [^e] +> +> [^e]: They can, however, be inside anything else. + +[^xkcd]: [The other kind of nested footnote is, however, considered poor style.](https://xkcd.com/1208/) +"##; + let expected = r##"

Nested footnotes are considered poor style. 1 2

+
1 +

This does not mean that footnotes cannot reference each other. 3

+
+
3 +

This means that a footnote definition cannot be directly inside another footnote definition.

+
+

This means that a footnote cannot be directly inside another footnote's body. 4

+
4 +

They can, however, be inside anything else.

+
+
+
+ +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn footnotes_test_8() { + let original = r##"[^Doh] Ray Me Fa So La Te Do! [^1] + +[^Doh]: I know. Wrong Doe. And it won't render right. +[^1]: Common for people practicing music. +"##; + let expected = r##"

1 Ray Me Fa So La Te Do! 2

+
1 +

I know. Wrong Doe. And it won't render right. +2: Common for people practicing music.

+
+"##; + + test_markdown_html(original, expected); +} \ No newline at end of file diff --git a/vendor/pulldown-cmark/tests/suite/gfm_strikethrough.rs b/vendor/pulldown-cmark/tests/suite/gfm_strikethrough.rs new file mode 100644 index 0000000000..303aff2475 --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/gfm_strikethrough.rs @@ -0,0 +1,27 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +use super::test_markdown_html; + +#[test] +fn gfm_strikethrough_test_1() { + let original = r##"~~Hi~~ Hello, world! +"##; + let expected = r##"

Hi Hello, world!

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn gfm_strikethrough_test_2() { + let original = r##"This ~~has a + +new paragraph~~. +"##; + let expected = r##"

This ~~has a

+

new paragraph~~.

+"##; + + test_markdown_html(original, expected); +} \ No newline at end of file diff --git a/vendor/pulldown-cmark/tests/suite/gfm_table.rs b/vendor/pulldown-cmark/tests/suite/gfm_table.rs new file mode 100644 index 0000000000..4b8eb02d01 --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/gfm_table.rs @@ -0,0 +1,205 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +use super::test_markdown_html; + +#[test] +fn gfm_table_test_1() { + let original = r##"| foo | bar | +| --- | --- | +| baz | bim | +"##; + let expected = r##" + + + + + + + + + + + + +
foobar
bazbim
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn gfm_table_test_2() { + let original = r##"| abc | defghi | +:-: | -----------: +bar | baz +"##; + let expected = r##" + + + + + + + + + + + + +
abcdefghi
barbaz
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn gfm_table_test_3() { + let original = r##"| f\|oo | +| ------ | +| b `\|` az | +| b **\|** im | +"##; + let expected = r##" + + + + + + + + + + + + + +
f|oo
b | az
b | im
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn gfm_table_test_4() { + let original = r##"| abc | def | +| --- | --- | +| bar | baz | +> bar +"##; + let expected = r##" + + + + + + + + + + + + +
abcdef
barbaz
+
+

bar

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn gfm_table_test_5() { + let original = r##"| abc | def | +| --- | --- | +| bar | baz | +bar + +bar +"##; + let expected = r##" + + + + + + + + + + + + + + + + +
abcdef
barbaz
bar
+

bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn gfm_table_test_6() { + let original = r##"| abc | def | +| --- | +| bar | +"##; + let expected = r##"

| abc | def | +| --- | +| bar |

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn gfm_table_test_7() { + let original = r##"| abc | def | +| --- | --- | +| bar | +| bar | baz | boo | +"##; + let expected = r##" + + + + + + + + + + + + + + + + +
abcdef
bar
barbaz
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn gfm_table_test_8() { + let original = r##"| abc | def | +| --- | --- | +"##; + let expected = r##" + + + + + + +
abcdef
+"##; + + test_markdown_html(original, expected); +} \ No newline at end of file diff --git a/vendor/pulldown-cmark/tests/suite/gfm_tasklist.rs b/vendor/pulldown-cmark/tests/suite/gfm_tasklist.rs new file mode 100644 index 0000000000..c0e7d047be --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/gfm_tasklist.rs @@ -0,0 +1,39 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +use super::test_markdown_html; + +#[test] +fn gfm_tasklist_test_1() { + let original = r##"- [ ] foo +- [x] bar +"##; + let expected = r##"
    +
  • foo
  • +
  • bar
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn gfm_tasklist_test_2() { + let original = r##"- [x] foo + - [ ] bar + - [x] baz +- [ ] bim +"##; + let expected = r##"
    +
  • foo +
      +
    • bar
    • +
    • baz
    • +
    +
  • +
  • bim
  • +
+"##; + + test_markdown_html(original, expected); +} \ No newline at end of file diff --git a/vendor/pulldown-cmark/tests/suite/mod.rs b/vendor/pulldown-cmark/tests/suite/mod.rs new file mode 100644 index 0000000000..326eed58b4 --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/mod.rs @@ -0,0 +1,12 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +pub use super::test_markdown_html; + +mod footnotes; +mod regression; +mod table; +mod spec; +mod gfm_table; +mod gfm_strikethrough; +mod gfm_tasklist; diff --git a/vendor/pulldown-cmark/tests/suite/regression.rs b/vendor/pulldown-cmark/tests/suite/regression.rs new file mode 100644 index 0000000000..56c8aa36ca --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/regression.rs @@ -0,0 +1,475 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +use super::test_markdown_html; + +#[test] +fn regression_test_1() { + let original = r##"
Testing 1..2..3.. + +This is a test of the details element. + +
+"##; + let expected = r##"
Testing 1..2..3.. +

This is a test of the details element.

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_2() { + let original = r##"see the [many] [articles] [on] [QuickCheck]. + +[many]: https://medium.com/@jlouis666/quickcheck-advice-c357efb4e7e6 +[articles]: http://www.quviq.com/products/erlang-quickcheck/ +[on]: https://wiki.haskell.org/Introduction_to_QuickCheck1 +[QuickCheck]: https://hackage.haskell.org/package/QuickCheck +"##; + let expected = r##"

see the + many + articles + on + QuickCheck. +

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_3() { + let original = r##"[![debug-stub-derive on crates.io][cratesio-image]][cratesio] +[![debug-stub-derive on docs.rs][docsrs-image]][docsrs] + +[cratesio-image]: https://img.shields.io/crates/v/debug_stub_derive.svg +[cratesio]: https://crates.io/crates/debug_stub_derive +[docsrs-image]: https://docs.rs/debug_stub_derive/badge.svg?version=0.3.0 +[docsrs]: https://docs.rs/debug_stub_derive/0.3.0/ +"##; + let expected = r##"

debug-stub-derive on crates.io +debug-stub-derive on docs.rs

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_4() { + let original = r##"| Title A | Title B | +| --------- | --------- | +| Content | Content | + +| Title A | Title B | Title C | Title D | +| --------- | --------- | --------- | ---------:| +| Content | Content | Conent | Content | +"##; + let expected = r##" + +
Title A Title B
Content Content
+ + +
Title A Title B Title C Title D
Content Content Conent Content
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_5() { + let original = r##"foo§__(bar)__ +"##; + let expected = r##"

foo§(bar)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_6() { + let original = r##" hello +"##; + let expected = r##"

https://example.com hello

+ +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_7() { + let original = r##"[foo][bar] + + +[bar]: a +"##; + let expected = r##"

foo

+ +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_8() { + let original = r##" +- **foo** (u8, u8) + + make something + +- **bar** (u16, u16) + + make something +"##; + let expected = r##" +
    +
  • +

    foo (u8, u8)

    +

    make something

    +
  • +
  • +

    bar (u16, u16)

    +

    make something

    +
  • +
+ +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_9() { + let original = r##"[` +i8 +`]( +../../../std/primitive.i8.html +) +"##; + let expected = r##"

i8

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_10() { + let original = r##"[a] + +[a]: /url (title\\*) +"##; + let expected = r##"

a

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_11() { + let original = r##"[a] + +[a]: /url (title\)) +"##; + let expected = r##"

a

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_12() { + let original = r##"[a] + +[a]: /url (title)) +"##; + let expected = r##"

[a]

+

[a]: /url (title))

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_13() { + let original = r##"a +"##; + let expected = r##"

a <?php this is not a valid processing tag

+

b

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_14() { + let original = r##"[a]: u\ +foo +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_15() { + let original = r##"\`foo` +"##; + let expected = r##"

`foo`

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_16() { + let original = r##"foo\\ +bar +"##; + let expected = r##"

foo\ +bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_17() { + let original = r##"1\. foo + +1\) bar +"##; + let expected = r##"

1. foo

+

1) bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_18() { + let original = r##"1... + +1.2.3. + +1 2 3 . + +1.|2.-3. + +1)2)3) +"##; + let expected = r##"

1...

+

1.2.3.

+

1 2 3 .

+

1.|2.-3.

+

1)2)3)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_19() { + let original = r##"[](<<>) +"##; + let expected = r##"

[](<<>)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_20() { + let original = r##"\``foo``bar` +"##; + let expected = r##"

`foo``bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_21() { + let original = r##"\\`foo` +"##; + let expected = r##"

\foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_22() { + let original = r##"[\\]: x + +YOLO +"##; + let expected = r##"

YOLO

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_23() { + let original = r##"lorem ipsum +A | B +---|--- +foo | bar +"##; + let expected = r##"

lorem ipsum +A | B +---|--- +foo | bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_24() { + let original = r##"foo|bar +---|--- +foo|bar +"##; + let expected = r##" + +
foobar
foobar
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_25() { + let original = r##"foo|bar\\ +---|--- +foo|bar +"##; + let expected = r##" + +
foobar\
foobar
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_26() { + let original = r##"[](url) +"##; + let expected = r##"

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_27() { + let original = r##"[bar](url) +"##; + let expected = r##"

bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_28() { + let original = r##"![](http://example.com/logo.png) +"##; + let expected = r##"

http://example.com

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_29() { + let original = r##"[ ](url) +"##; + let expected = r##"

http://one http://two

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_30() { + let original = r##"Markdown | Less | Pretty +--- | --- | --- + +some text +"##; + let expected = r##" +
Markdown Less Pretty
+

some text

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_31() { + let original = r##"1. > foo +2. > +"##; + let expected = r##"
    +
  1. +
    +

    foo

    +
    +
  2. +
  3. +
    +
    +
  4. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_32() { + let original = r##"[ +x + +]: f +"##; + let expected = r##"

[ +x

+

]: f

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_33() { + let original = r##"[foo]: +"##; + let expected = r##"

[foo]:

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn regression_test_34() { + let original = r##"> foo | bar +> --- | --- +yolo | swag +"##; + let expected = r##"
+
foobar
+
+

yolo | swag

+"##; + + test_markdown_html(original, expected); +} \ No newline at end of file diff --git a/vendor/pulldown-cmark/tests/suite/spec.rs b/vendor/pulldown-cmark/tests/suite/spec.rs new file mode 100644 index 0000000000..9caef67074 --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/spec.rs @@ -0,0 +1,8447 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +use super::test_markdown_html; + +#[test] +fn spec_test_1() { + let original = r##" foo baz bim +"##; + let expected = r##"
foo	baz		bim
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_2() { + let original = r##" foo baz bim +"##; + let expected = r##"
foo	baz		bim
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_3() { + let original = r##" a a + ὐ a +"##; + let expected = r##"
a	a
+ὐ	a
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_4() { + let original = r##" - foo + + bar +"##; + let expected = r##"
    +
  • +

    foo

    +

    bar

    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_5() { + let original = r##"- foo + + bar +"##; + let expected = r##"
    +
  • +

    foo

    +
      bar
    +
    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_6() { + let original = r##"> foo +"##; + let expected = r##"
+
  foo
+
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_7() { + let original = r##"- foo +"##; + let expected = r##"
    +
  • +
      foo
    +
    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_8() { + let original = r##" foo + bar +"##; + let expected = r##"
foo
+bar
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_9() { + let original = r##" - foo + - bar + - baz +"##; + let expected = r##"
    +
  • foo +
      +
    • bar +
        +
      • baz
      • +
      +
    • +
    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_10() { + let original = r##"# Foo +"##; + let expected = r##"

Foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_11() { + let original = r##"* * * +"##; + let expected = r##"
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_12() { + let original = r##"- `one +- two` +"##; + let expected = r##"
    +
  • `one
  • +
  • two`
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_13() { + let original = r##"*** +--- +___ +"##; + let expected = r##"
+
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_14() { + let original = r##"+++ +"##; + let expected = r##"

+++

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_15() { + let original = r##"=== +"##; + let expected = r##"

===

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_16() { + let original = r##"-- +** +__ +"##; + let expected = r##"

-- +** +__

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_17() { + let original = r##" *** + *** + *** +"##; + let expected = r##"
+
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_18() { + let original = r##" *** +"##; + let expected = r##"
***
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_19() { + let original = r##"Foo + *** +"##; + let expected = r##"

Foo +***

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_20() { + let original = r##"_____________________________________ +"##; + let expected = r##"
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_21() { + let original = r##" - - - +"##; + let expected = r##"
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_22() { + let original = r##" ** * ** * ** * ** +"##; + let expected = r##"
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_23() { + let original = r##"- - - - +"##; + let expected = r##"
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_24() { + let original = r##"- - - - +"##; + let expected = r##"
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_25() { + let original = r##"_ _ _ _ a + +a------ + +---a--- +"##; + let expected = r##"

_ _ _ _ a

+

a------

+

---a---

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_26() { + let original = r##" *-* +"##; + let expected = r##"

-

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_27() { + let original = r##"- foo +*** +- bar +"##; + let expected = r##"
    +
  • foo
  • +
+
+
    +
  • bar
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_28() { + let original = r##"Foo +*** +bar +"##; + let expected = r##"

Foo

+
+

bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_29() { + let original = r##"Foo +--- +bar +"##; + let expected = r##"

Foo

+

bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_30() { + let original = r##"* Foo +* * * +* Bar +"##; + let expected = r##"
    +
  • Foo
  • +
+
+
    +
  • Bar
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_31() { + let original = r##"- Foo +- * * * +"##; + let expected = r##"
    +
  • Foo
  • +
  • +
    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_32() { + let original = r##"# foo +## foo +### foo +#### foo +##### foo +###### foo +"##; + let expected = r##"

foo

+

foo

+

foo

+

foo

+
foo
+
foo
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_33() { + let original = r##"####### foo +"##; + let expected = r##"

####### foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_34() { + let original = r##"#5 bolt + +#hashtag +"##; + let expected = r##"

#5 bolt

+

#hashtag

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_35() { + let original = r##"\## foo +"##; + let expected = r##"

## foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_36() { + let original = r##"# foo *bar* \*baz\* +"##; + let expected = r##"

foo bar *baz*

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_37() { + let original = r##"# foo +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_38() { + let original = r##" ### foo + ## foo + # foo +"##; + let expected = r##"

foo

+

foo

+

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_39() { + let original = r##" # foo +"##; + let expected = r##"
# foo
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_40() { + let original = r##"foo + # bar +"##; + let expected = r##"

foo +# bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_41() { + let original = r##"## foo ## + ### bar ### +"##; + let expected = r##"

foo

+

bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_42() { + let original = r##"# foo ################################## +##### foo ## +"##; + let expected = r##"

foo

+
foo
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_43() { + let original = r##"### foo ### +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_44() { + let original = r##"### foo ### b +"##; + let expected = r##"

foo ### b

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_45() { + let original = r##"# foo# +"##; + let expected = r##"

foo#

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_46() { + let original = r##"### foo \### +## foo #\## +# foo \# +"##; + let expected = r##"

foo ###

+

foo ###

+

foo #

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_47() { + let original = r##"**** +## foo +**** +"##; + let expected = r##"
+

foo

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_48() { + let original = r##"Foo bar +# baz +Bar foo +"##; + let expected = r##"

Foo bar

+

baz

+

Bar foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_49() { + let original = r##"## +# +### ### +"##; + let expected = r##"

+

+

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_50() { + let original = r##"Foo *bar* +========= + +Foo *bar* +--------- +"##; + let expected = r##"

Foo bar

+

Foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_51() { + let original = r##"Foo *bar +baz* +==== +"##; + let expected = r##"

Foo bar +baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_52() { + let original = r##" Foo *bar +baz* +==== +"##; + let expected = r##"

Foo bar +baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_53() { + let original = r##"Foo +------------------------- + +Foo += +"##; + let expected = r##"

Foo

+

Foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_54() { + let original = r##" Foo +--- + + Foo +----- + + Foo + === +"##; + let expected = r##"

Foo

+

Foo

+

Foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_55() { + let original = r##" Foo + --- + + Foo +--- +"##; + let expected = r##"
Foo
+---
+
+Foo
+
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_56() { + let original = r##"Foo + ---- +"##; + let expected = r##"

Foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_57() { + let original = r##"Foo + --- +"##; + let expected = r##"

Foo +---

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_58() { + let original = r##"Foo += = + +Foo +--- - +"##; + let expected = r##"

Foo += =

+

Foo

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_59() { + let original = r##"Foo +----- +"##; + let expected = r##"

Foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_60() { + let original = r##"Foo\ +---- +"##; + let expected = r##"

Foo\

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_61() { + let original = r##"`Foo +---- +` + + +"##; + let expected = r##"

`Foo

+

`

+

<a title="a lot

+

of dashes"/>

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_62() { + let original = r##"> Foo +--- +"##; + let expected = r##"
+

Foo

+
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_63() { + let original = r##"> foo +bar +=== +"##; + let expected = r##"
+

foo +bar +===

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_64() { + let original = r##"- Foo +--- +"##; + let expected = r##"
    +
  • Foo
  • +
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_65() { + let original = r##"Foo +Bar +--- +"##; + let expected = r##"

Foo +Bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_66() { + let original = r##"--- +Foo +--- +Bar +--- +Baz +"##; + let expected = r##"
+

Foo

+

Bar

+

Baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_67() { + let original = r##" +==== +"##; + let expected = r##"

====

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_68() { + let original = r##"--- +--- +"##; + let expected = r##"
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_69() { + let original = r##"- foo +----- +"##; + let expected = r##"
    +
  • foo
  • +
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_70() { + let original = r##" foo +--- +"##; + let expected = r##"
foo
+
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_71() { + let original = r##"> foo +----- +"##; + let expected = r##"
+

foo

+
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_72() { + let original = r##"\> foo +------ +"##; + let expected = r##"

> foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_73() { + let original = r##"Foo + +bar +--- +baz +"##; + let expected = r##"

Foo

+

bar

+

baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_74() { + let original = r##"Foo +bar + +--- + +baz +"##; + let expected = r##"

Foo +bar

+
+

baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_75() { + let original = r##"Foo +bar +* * * +baz +"##; + let expected = r##"

Foo +bar

+
+

baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_76() { + let original = r##"Foo +bar +\--- +baz +"##; + let expected = r##"

Foo +bar +--- +baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_77() { + let original = r##" a simple + indented code block +"##; + let expected = r##"
a simple
+  indented code block
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_78() { + let original = r##" - foo + + bar +"##; + let expected = r##"
    +
  • +

    foo

    +

    bar

    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_79() { + let original = r##"1. foo + + - bar +"##; + let expected = r##"
    +
  1. +

    foo

    +
      +
    • bar
    • +
    +
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_80() { + let original = r##"
+ *hi* + + - one +"##; + let expected = r##"
<a/>
+*hi*
+
+- one
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_81() { + let original = r##" chunk1 + + chunk2 + + + + chunk3 +"##; + let expected = r##"
chunk1
+
+chunk2
+
+
+
+chunk3
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_82() { + let original = r##" chunk1 + + chunk2 +"##; + let expected = r##"
chunk1
+  
+  chunk2
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_83() { + let original = r##"Foo + bar + +"##; + let expected = r##"

Foo +bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_84() { + let original = r##" foo +bar +"##; + let expected = r##"
foo
+
+

bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_85() { + let original = r##"# Heading + foo +Heading +------ + foo +---- +"##; + let expected = r##"

Heading

+
foo
+
+

Heading

+
foo
+
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_86() { + let original = r##" foo + bar +"##; + let expected = r##"
    foo
+bar
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_87() { + let original = r##" + + foo + + +"##; + let expected = r##"
foo
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_88() { + let original = r##" foo +"##; + let expected = r##"
foo  
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_89() { + let original = r##"``` +< + > +``` +"##; + let expected = r##"
<
+ >
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_90() { + let original = r##"~~~ +< + > +~~~ +"##; + let expected = r##"
<
+ >
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_91() { + let original = r##"`` +foo +`` +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_92() { + let original = r##"``` +aaa +~~~ +``` +"##; + let expected = r##"
aaa
+~~~
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_93() { + let original = r##"~~~ +aaa +``` +~~~ +"##; + let expected = r##"
aaa
+```
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_94() { + let original = r##"```` +aaa +``` +`````` +"##; + let expected = r##"
aaa
+```
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_95() { + let original = r##"~~~~ +aaa +~~~ +~~~~ +"##; + let expected = r##"
aaa
+~~~
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_96() { + let original = r##"``` +"##; + let expected = r##"
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_97() { + let original = r##"````` + +``` +aaa +"##; + let expected = r##"

+```
+aaa
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_98() { + let original = r##"> ``` +> aaa + +bbb +"##; + let expected = r##"
+
aaa
+
+
+

bbb

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_99() { + let original = r##"``` + + +``` +"##; + let expected = r##"

+  
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_100() { + let original = r##"``` +``` +"##; + let expected = r##"
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_101() { + let original = r##" ``` + aaa +aaa +``` +"##; + let expected = r##"
aaa
+aaa
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_102() { + let original = r##" ``` +aaa + aaa +aaa + ``` +"##; + let expected = r##"
aaa
+aaa
+aaa
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_103() { + let original = r##" ``` + aaa + aaa + aaa + ``` +"##; + let expected = r##"
aaa
+ aaa
+aaa
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_104() { + let original = r##" ``` + aaa + ``` +"##; + let expected = r##"
```
+aaa
+```
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_105() { + let original = r##"``` +aaa + ``` +"##; + let expected = r##"
aaa
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_106() { + let original = r##" ``` +aaa + ``` +"##; + let expected = r##"
aaa
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_107() { + let original = r##"``` +aaa + ``` +"##; + let expected = r##"
aaa
+    ```
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_108() { + let original = r##"``` ``` +aaa +"##; + let expected = r##"

+aaa

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_109() { + let original = r##"~~~~~~ +aaa +~~~ ~~ +"##; + let expected = r##"
aaa
+~~~ ~~
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_110() { + let original = r##"foo +``` +bar +``` +baz +"##; + let expected = r##"

foo

+
bar
+
+

baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_111() { + let original = r##"foo +--- +~~~ +bar +~~~ +# baz +"##; + let expected = r##"

foo

+
bar
+
+

baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_112() { + let original = r##"```ruby +def foo(x) + return 3 +end +``` +"##; + let expected = r##"
def foo(x)
+  return 3
+end
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_113() { + let original = r##"~~~~ ruby startline=3 $%@#$ +def foo(x) + return 3 +end +~~~~~~~ +"##; + let expected = r##"
def foo(x)
+  return 3
+end
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_114() { + let original = r##"````; +```` +"##; + let expected = r##"
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_115() { + let original = r##"``` aa ``` +foo +"##; + let expected = r##"

aa +foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_116() { + let original = r##"~~~ aa ``` ~~~ +foo +~~~ +"##; + let expected = r##"
foo
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_117() { + let original = r##"``` +``` aaa +``` +"##; + let expected = r##"
``` aaa
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_118() { + let original = r##"
+
+**Hello**,
+
+_world_.
+
+
+"##; + let expected = r##"
+
+**Hello**,
+

world. +

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_119() { + let original = r##" + + + +
+ hi +
+ +okay. +"##; + let expected = r##" + + + +
+ hi +
+

okay.

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_120() { + let original = r##"
+*foo* +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_122() { + let original = r##"
+ +*Markdown* + +
+"##; + let expected = r##"
+

Markdown

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_123() { + let original = r##"
+
+"##; + let expected = r##"
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_124() { + let original = r##"
+
+"##; + let expected = r##"
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_125() { + let original = r##"
+*foo* + +*bar* +"##; + let expected = r##"
+*foo* +

bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_126() { + let original = r##"
+"##; + let expected = r##" +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_130() { + let original = r##"
+foo +
+"##; + let expected = r##"
+foo +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_131() { + let original = r##"
+``` c +int x = 33; +``` +"##; + let expected = r##"
+``` c +int x = 33; +``` +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_132() { + let original = r##" +*bar* + +"##; + let expected = r##" +*bar* + +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_133() { + let original = r##" +*bar* + +"##; + let expected = r##" +*bar* + +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_134() { + let original = r##" +*bar* + +"##; + let expected = r##" +*bar* + +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_135() { + let original = r##" +*bar* +"##; + let expected = r##" +*bar* +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_136() { + let original = r##" +*foo* + +"##; + let expected = r##" +*foo* + +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_137() { + let original = r##" + +*foo* + + +"##; + let expected = r##" +

foo

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_138() { + let original = r##"*foo* +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_139() { + let original = r##"

+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+
+okay +"##; + let expected = r##"

+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+
+

okay

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_140() { + let original = r##" +okay +"##; + let expected = r##" +

okay

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_141() { + let original = r##" +okay +"##; + let expected = r##" +

okay

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_142() { + let original = r##" +*foo* +"##; + let expected = r##" +

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_146() { + let original = r##"*bar* +*baz* +"##; + let expected = r##"*bar* +

baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_147() { + let original = r##"1. *bar* +"##; + let expected = r##"1. *bar* +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_148() { + let original = r##" +okay +"##; + let expected = r##" +

okay

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_149() { + let original = r##"'; + +?> +okay +"##; + let expected = r##"'; + +?> +

okay

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_150() { + let original = r##" +"##; + let expected = r##" +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_151() { + let original = r##" +okay +"##; + let expected = r##" +

okay

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_152() { + let original = r##" + + +"##; + let expected = r##" +
<!-- foo -->
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_153() { + let original = r##"
+ +
+"##; + let expected = r##"
+
<div>
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_154() { + let original = r##"Foo +
+bar +
+"##; + let expected = r##"

Foo

+
+bar +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_155() { + let original = r##"
+bar +
+*foo* +"##; + let expected = r##"
+bar +
+*foo* +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_156() { + let original = r##"Foo + +baz +"##; + let expected = r##"

Foo + +baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_157() { + let original = r##"
+ +*Emphasized* text. + +
+"##; + let expected = r##"
+

Emphasized text.

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_158() { + let original = r##"
+*Emphasized* text. +
+"##; + let expected = r##"
+*Emphasized* text. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_159() { + let original = r##" + + + + + + + +
+Hi +
+"##; + let expected = r##" + + + +
+Hi +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_160() { + let original = r##" + + + + + + + +
+ Hi +
+"##; + let expected = r##" + +
<td>
+  Hi
+</td>
+
+ +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_161() { + let original = r##"[foo]: /url "title" + +[foo] +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_162() { + let original = r##" [foo]: + /url + 'the title' + +[foo] +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_163() { + let original = r##"[Foo*bar\]]:my_(url) 'title (with parens)' + +[Foo*bar\]] +"##; + let expected = r##"

Foo*bar]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_164() { + let original = r##"[Foo bar]: + +'title' + +[Foo bar] +"##; + let expected = r##"

Foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_165() { + let original = r##"[foo]: /url ' +title +line1 +line2 +' + +[foo] +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_166() { + let original = r##"[foo]: /url 'title + +with blank line' + +[foo] +"##; + let expected = r##"

[foo]: /url 'title

+

with blank line'

+

[foo]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_167() { + let original = r##"[foo]: +/url + +[foo] +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_168() { + let original = r##"[foo]: + +[foo] +"##; + let expected = r##"

[foo]:

+

[foo]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_169() { + let original = r##"[foo]: <> + +[foo] +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_170() { + let original = r##"[foo]: (baz) + +[foo] +"##; + let expected = r##"

[foo]: (baz)

+

[foo]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_171() { + let original = r##"[foo]: /url\bar\*baz "foo\"bar\baz" + +[foo] +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_172() { + let original = r##"[foo] + +[foo]: url +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_173() { + let original = r##"[foo] + +[foo]: first +[foo]: second +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_174() { + let original = r##"[FOO]: /url + +[Foo] +"##; + let expected = r##"

Foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_175() { + let original = r##"[ΑΓΩ]: /φου + +[αγω] +"##; + let expected = r##"

αγω

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_176() { + let original = r##"[foo]: /url +"##; + let expected = r##""##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_177() { + let original = r##"[ +foo +]: /url +bar +"##; + let expected = r##"

bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_178() { + let original = r##"[foo]: /url "title" ok +"##; + let expected = r##"

[foo]: /url "title" ok

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_179() { + let original = r##"[foo]: /url +"title" ok +"##; + let expected = r##"

"title" ok

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_180() { + let original = r##" [foo]: /url "title" + +[foo] +"##; + let expected = r##"
[foo]: /url "title"
+
+

[foo]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_181() { + let original = r##"``` +[foo]: /url +``` + +[foo] +"##; + let expected = r##"
[foo]: /url
+
+

[foo]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_182() { + let original = r##"Foo +[bar]: /baz + +[bar] +"##; + let expected = r##"

Foo +[bar]: /baz

+

[bar]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_183() { + let original = r##"# [Foo] +[foo]: /url +> bar +"##; + let expected = r##"

Foo

+
+

bar

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_184() { + let original = r##"[foo]: /url +bar +=== +[foo] +"##; + let expected = r##"

bar

+

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_185() { + let original = r##"[foo]: /url +=== +[foo] +"##; + let expected = r##"

=== +foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_186() { + let original = r##"[foo]: /foo-url "foo" +[bar]: /bar-url + "bar" +[baz]: /baz-url + +[foo], +[bar], +[baz] +"##; + let expected = r##"

foo, +bar, +baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_187() { + let original = r##"[foo] + +> [foo]: /url +"##; + let expected = r##"

foo

+
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_188() { + let original = r##"[foo]: /url +"##; + let expected = r##""##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_189() { + let original = r##"aaa + +bbb +"##; + let expected = r##"

aaa

+

bbb

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_190() { + let original = r##"aaa +bbb + +ccc +ddd +"##; + let expected = r##"

aaa +bbb

+

ccc +ddd

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_191() { + let original = r##"aaa + + +bbb +"##; + let expected = r##"

aaa

+

bbb

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_192() { + let original = r##" aaa + bbb +"##; + let expected = r##"

aaa +bbb

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_193() { + let original = r##"aaa + bbb + ccc +"##; + let expected = r##"

aaa +bbb +ccc

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_194() { + let original = r##" aaa +bbb +"##; + let expected = r##"

aaa +bbb

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_195() { + let original = r##" aaa +bbb +"##; + let expected = r##"
aaa
+
+

bbb

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_196() { + let original = r##"aaa +bbb +"##; + let expected = r##"

aaa
+bbb

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_197() { + let original = r##" + +aaa + + +# aaa + + +"##; + let expected = r##"

aaa

+

aaa

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_198() { + let original = r##"> # Foo +> bar +> baz +"##; + let expected = r##"
+

Foo

+

bar +baz

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_199() { + let original = r##"># Foo +>bar +> baz +"##; + let expected = r##"
+

Foo

+

bar +baz

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_200() { + let original = r##" > # Foo + > bar + > baz +"##; + let expected = r##"
+

Foo

+

bar +baz

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_201() { + let original = r##" > # Foo + > bar + > baz +"##; + let expected = r##"
> # Foo
+> bar
+> baz
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_202() { + let original = r##"> # Foo +> bar +baz +"##; + let expected = r##"
+

Foo

+

bar +baz

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_203() { + let original = r##"> bar +baz +> foo +"##; + let expected = r##"
+

bar +baz +foo

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_204() { + let original = r##"> foo +--- +"##; + let expected = r##"
+

foo

+
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_205() { + let original = r##"> - foo +- bar +"##; + let expected = r##"
+
    +
  • foo
  • +
+
+
    +
  • bar
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_206() { + let original = r##"> foo + bar +"##; + let expected = r##"
+
foo
+
+
+
bar
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_207() { + let original = r##"> ``` +foo +``` +"##; + let expected = r##"
+
+
+

foo

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_208() { + let original = r##"> foo + - bar +"##; + let expected = r##"
+

foo +- bar

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_209() { + let original = r##"> +"##; + let expected = r##"
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_210() { + let original = r##"> +> +> +"##; + let expected = r##"
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_211() { + let original = r##"> +> foo +> +"##; + let expected = r##"
+

foo

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_212() { + let original = r##"> foo + +> bar +"##; + let expected = r##"
+

foo

+
+
+

bar

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_213() { + let original = r##"> foo +> bar +"##; + let expected = r##"
+

foo +bar

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_214() { + let original = r##"> foo +> +> bar +"##; + let expected = r##"
+

foo

+

bar

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_215() { + let original = r##"foo +> bar +"##; + let expected = r##"

foo

+
+

bar

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_216() { + let original = r##"> aaa +*** +> bbb +"##; + let expected = r##"
+

aaa

+
+
+
+

bbb

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_217() { + let original = r##"> bar +baz +"##; + let expected = r##"
+

bar +baz

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_218() { + let original = r##"> bar + +baz +"##; + let expected = r##"
+

bar

+
+

baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_219() { + let original = r##"> bar +> +baz +"##; + let expected = r##"
+

bar

+
+

baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_220() { + let original = r##"> > > foo +bar +"##; + let expected = r##"
+
+
+

foo +bar

+
+
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_221() { + let original = r##">>> foo +> bar +>>baz +"##; + let expected = r##"
+
+
+

foo +bar +baz

+
+
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_222() { + let original = r##"> code + +> not code +"##; + let expected = r##"
+
code
+
+
+
+

not code

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_223() { + let original = r##"A paragraph +with two lines. + + indented code + +> A block quote. +"##; + let expected = r##"

A paragraph +with two lines.

+
indented code
+
+
+

A block quote.

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_224() { + let original = r##"1. A paragraph + with two lines. + + indented code + + > A block quote. +"##; + let expected = r##"
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_225() { + let original = r##"- one + + two +"##; + let expected = r##"
    +
  • one
  • +
+

two

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_226() { + let original = r##"- one + + two +"##; + let expected = r##"
    +
  • +

    one

    +

    two

    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_227() { + let original = r##" - one + + two +"##; + let expected = r##"
    +
  • one
  • +
+
 two
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_228() { + let original = r##" - one + + two +"##; + let expected = r##"
    +
  • +

    one

    +

    two

    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_229() { + let original = r##" > > 1. one +>> +>> two +"##; + let expected = r##"
+
+
    +
  1. +

    one

    +

    two

    +
  2. +
+
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_230() { + let original = r##">>- one +>> + > > two +"##; + let expected = r##"
+
+
    +
  • one
  • +
+

two

+
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_231() { + let original = r##"-one + +2.two +"##; + let expected = r##"

-one

+

2.two

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_232() { + let original = r##"- foo + + + bar +"##; + let expected = r##"
    +
  • +

    foo

    +

    bar

    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_233() { + let original = r##"1. foo + + ``` + bar + ``` + + baz + + > bam +"##; + let expected = r##"
    +
  1. +

    foo

    +
    bar
    +
    +

    baz

    +
    +

    bam

    +
    +
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_234() { + let original = r##"- Foo + + bar + + + baz +"##; + let expected = r##"
    +
  • +

    Foo

    +
    bar
    +
    +
    +baz
    +
    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_235() { + let original = r##"123456789. ok +"##; + let expected = r##"
    +
  1. ok
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_236() { + let original = r##"1234567890. not ok +"##; + let expected = r##"

1234567890. not ok

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_237() { + let original = r##"0. ok +"##; + let expected = r##"
    +
  1. ok
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_238() { + let original = r##"003. ok +"##; + let expected = r##"
    +
  1. ok
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_239() { + let original = r##"-1. not ok +"##; + let expected = r##"

-1. not ok

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_240() { + let original = r##"- foo + + bar +"##; + let expected = r##"
    +
  • +

    foo

    +
    bar
    +
    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_241() { + let original = r##" 10. foo + + bar +"##; + let expected = r##"
    +
  1. +

    foo

    +
    bar
    +
    +
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_242() { + let original = r##" indented code + +paragraph + + more code +"##; + let expected = r##"
indented code
+
+

paragraph

+
more code
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_243() { + let original = r##"1. indented code + + paragraph + + more code +"##; + let expected = r##"
    +
  1. +
    indented code
    +
    +

    paragraph

    +
    more code
    +
    +
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_244() { + let original = r##"1. indented code + + paragraph + + more code +"##; + let expected = r##"
    +
  1. +
     indented code
    +
    +

    paragraph

    +
    more code
    +
    +
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_245() { + let original = r##" foo + +bar +"##; + let expected = r##"

foo

+

bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_246() { + let original = r##"- foo + + bar +"##; + let expected = r##"
    +
  • foo
  • +
+

bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_247() { + let original = r##"- foo + + bar +"##; + let expected = r##"
    +
  • +

    foo

    +

    bar

    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_248() { + let original = r##"- + foo +- + ``` + bar + ``` +- + baz +"##; + let expected = r##"
    +
  • foo
  • +
  • +
    bar
    +
    +
  • +
  • +
    baz
    +
    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_249() { + let original = r##"- + foo +"##; + let expected = r##"
    +
  • foo
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_250() { + let original = r##"- + + foo +"##; + let expected = r##"
    +
  • +
+

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_251() { + let original = r##"- foo +- +- bar +"##; + let expected = r##"
    +
  • foo
  • +
  • +
  • bar
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_252() { + let original = r##"- foo +- +- bar +"##; + let expected = r##"
    +
  • foo
  • +
  • +
  • bar
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_253() { + let original = r##"1. foo +2. +3. bar +"##; + let expected = r##"
    +
  1. foo
  2. +
  3. +
  4. bar
  5. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_254() { + let original = r##"* +"##; + let expected = r##"
    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_255() { + let original = r##"foo +* + +foo +1. +"##; + let expected = r##"

foo +*

+

foo +1.

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_256() { + let original = r##" 1. A paragraph + with two lines. + + indented code + + > A block quote. +"##; + let expected = r##"
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_257() { + let original = r##" 1. A paragraph + with two lines. + + indented code + + > A block quote. +"##; + let expected = r##"
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_258() { + let original = r##" 1. A paragraph + with two lines. + + indented code + + > A block quote. +"##; + let expected = r##"
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_259() { + let original = r##" 1. A paragraph + with two lines. + + indented code + + > A block quote. +"##; + let expected = r##"
1.  A paragraph
+    with two lines.
+
+        indented code
+
+    > A block quote.
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_260() { + let original = r##" 1. A paragraph +with two lines. + + indented code + + > A block quote. +"##; + let expected = r##"
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_261() { + let original = r##" 1. A paragraph + with two lines. +"##; + let expected = r##"
    +
  1. A paragraph +with two lines.
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_262() { + let original = r##"> 1. > Blockquote +continued here. +"##; + let expected = r##"
+
    +
  1. +
    +

    Blockquote +continued here.

    +
    +
  2. +
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_263() { + let original = r##"> 1. > Blockquote +> continued here. +"##; + let expected = r##"
+
    +
  1. +
    +

    Blockquote +continued here.

    +
    +
  2. +
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_264() { + let original = r##"- foo + - bar + - baz + - boo +"##; + let expected = r##"
    +
  • foo +
      +
    • bar +
        +
      • baz +
          +
        • boo
        • +
        +
      • +
      +
    • +
    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_265() { + let original = r##"- foo + - bar + - baz + - boo +"##; + let expected = r##"
    +
  • foo
  • +
  • bar
  • +
  • baz
  • +
  • boo
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_266() { + let original = r##"10) foo + - bar +"##; + let expected = r##"
    +
  1. foo +
      +
    • bar
    • +
    +
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_267() { + let original = r##"10) foo + - bar +"##; + let expected = r##"
    +
  1. foo
  2. +
+
    +
  • bar
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_268() { + let original = r##"- - foo +"##; + let expected = r##"
    +
  • +
      +
    • foo
    • +
    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_269() { + let original = r##"1. - 2. foo +"##; + let expected = r##"
    +
  1. +
      +
    • +
        +
      1. foo
      2. +
      +
    • +
    +
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_270() { + let original = r##"- # Foo +- Bar + --- + baz +"##; + let expected = r##"
    +
  • +

    Foo

    +
  • +
  • +

    Bar

    +baz
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_271() { + let original = r##"- foo +- bar ++ baz +"##; + let expected = r##"
    +
  • foo
  • +
  • bar
  • +
+
    +
  • baz
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_272() { + let original = r##"1. foo +2. bar +3) baz +"##; + let expected = r##"
    +
  1. foo
  2. +
  3. bar
  4. +
+
    +
  1. baz
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_273() { + let original = r##"Foo +- bar +- baz +"##; + let expected = r##"

Foo

+
    +
  • bar
  • +
  • baz
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_274() { + let original = r##"The number of windows in my house is +14. The number of doors is 6. +"##; + let expected = r##"

The number of windows in my house is +14. The number of doors is 6.

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_275() { + let original = r##"The number of windows in my house is +1. The number of doors is 6. +"##; + let expected = r##"

The number of windows in my house is

+
    +
  1. The number of doors is 6.
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_276() { + let original = r##"- foo + +- bar + + +- baz +"##; + let expected = r##"
    +
  • +

    foo

    +
  • +
  • +

    bar

    +
  • +
  • +

    baz

    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_277() { + let original = r##"- foo + - bar + - baz + + + bim +"##; + let expected = r##"
    +
  • foo +
      +
    • bar +
        +
      • +

        baz

        +

        bim

        +
      • +
      +
    • +
    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_278() { + let original = r##"- foo +- bar + + + +- baz +- bim +"##; + let expected = r##"
    +
  • foo
  • +
  • bar
  • +
+ +
    +
  • baz
  • +
  • bim
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_279() { + let original = r##"- foo + + notcode + +- foo + + + + code +"##; + let expected = r##"
    +
  • +

    foo

    +

    notcode

    +
  • +
  • +

    foo

    +
  • +
+ +
code
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_280() { + let original = r##"- a + - b + - c + - d + - e + - f +- g +"##; + let expected = r##"
    +
  • a
  • +
  • b
  • +
  • c
  • +
  • d
  • +
  • e
  • +
  • f
  • +
  • g
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_281() { + let original = r##"1. a + + 2. b + + 3. c +"##; + let expected = r##"
    +
  1. +

    a

    +
  2. +
  3. +

    b

    +
  4. +
  5. +

    c

    +
  6. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_282() { + let original = r##"- a + - b + - c + - d + - e +"##; + let expected = r##"
    +
  • a
  • +
  • b
  • +
  • c
  • +
  • d +- e
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_283() { + let original = r##"1. a + + 2. b + + 3. c +"##; + let expected = r##"
    +
  1. +

    a

    +
  2. +
  3. +

    b

    +
  4. +
+
3. c
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_284() { + let original = r##"- a +- b + +- c +"##; + let expected = r##"
    +
  • +

    a

    +
  • +
  • +

    b

    +
  • +
  • +

    c

    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_285() { + let original = r##"* a +* + +* c +"##; + let expected = r##"
    +
  • +

    a

    +
  • +
  • +
  • +

    c

    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_286() { + let original = r##"- a +- b + + c +- d +"##; + let expected = r##"
    +
  • +

    a

    +
  • +
  • +

    b

    +

    c

    +
  • +
  • +

    d

    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_287() { + let original = r##"- a +- b + + [ref]: /url +- d +"##; + let expected = r##"
    +
  • +

    a

    +
  • +
  • +

    b

    +
  • +
  • +

    d

    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_288() { + let original = r##"- a +- ``` + b + + + ``` +- c +"##; + let expected = r##"
    +
  • a
  • +
  • +
    b
    +
    +
    +
    +
  • +
  • c
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_289() { + let original = r##"- a + - b + + c +- d +"##; + let expected = r##"
    +
  • a +
      +
    • +

      b

      +

      c

      +
    • +
    +
  • +
  • d
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_290() { + let original = r##"* a + > b + > +* c +"##; + let expected = r##"
    +
  • a +
    +

    b

    +
    +
  • +
  • c
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_291() { + let original = r##"- a + > b + ``` + c + ``` +- d +"##; + let expected = r##"
    +
  • a +
    +

    b

    +
    +
    c
    +
    +
  • +
  • d
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_292() { + let original = r##"- a +"##; + let expected = r##"
    +
  • a
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_293() { + let original = r##"- a + - b +"##; + let expected = r##"
    +
  • a +
      +
    • b
    • +
    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_294() { + let original = r##"1. ``` + foo + ``` + + bar +"##; + let expected = r##"
    +
  1. +
    foo
    +
    +

    bar

    +
  2. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_295() { + let original = r##"* foo + * bar + + baz +"##; + let expected = r##"
    +
  • +

    foo

    +
      +
    • bar
    • +
    +

    baz

    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_296() { + let original = r##"- a + - b + - c + +- d + - e + - f +"##; + let expected = r##"
    +
  • +

    a

    +
      +
    • b
    • +
    • c
    • +
    +
  • +
  • +

    d

    +
      +
    • e
    • +
    • f
    • +
    +
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_297() { + let original = r##"`hi`lo` +"##; + let expected = r##"

hilo`

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_298() { + let original = r##"\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~ +"##; + let expected = r##"

!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_299() { + let original = r##"\ \A\a\ \3\φ\« +"##; + let expected = r##"

\ \A\a\ \3\φ\«

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_300() { + let original = r##"\*not emphasized* +\
not a tag +\[not a link](/foo) +\`not code` +1\. not a list +\* not a list +\# not a heading +\[foo]: /url "not a reference" +\ö not a character entity +"##; + let expected = r##"

*not emphasized* +<br/> not a tag +[not a link](/foo) +`not code` +1. not a list +* not a list +# not a heading +[foo]: /url "not a reference" +&ouml; not a character entity

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_301() { + let original = r##"\\*emphasis* +"##; + let expected = r##"

\emphasis

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_302() { + let original = r##"foo\ +bar +"##; + let expected = r##"

foo
+bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_303() { + let original = r##"`` \[\` `` +"##; + let expected = r##"

\[\`

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_304() { + let original = r##" \[\] +"##; + let expected = r##"
\[\]
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_305() { + let original = r##"~~~ +\[\] +~~~ +"##; + let expected = r##"
\[\]
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_306() { + let original = r##" +"##; + let expected = r##"

http://example.com?find=\*

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_307() { + let original = r##" +"##; + let expected = r##" +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_308() { + let original = r##"[foo](/bar\* "ti\*tle") +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_309() { + let original = r##"[foo] + +[foo]: /bar\* "ti\*tle" +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_310() { + let original = r##"``` foo\+bar +foo +``` +"##; + let expected = r##"
foo
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_311() { + let original = r##"  & © Æ Ď +¾ ℋ ⅆ +∲ ≧̸ +"##; + let expected = r##"

  & © Æ Ď +¾ ℋ ⅆ +∲ ≧̸

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_312() { + let original = r##"# Ӓ Ϡ � +"##; + let expected = r##"

# Ӓ Ϡ �

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_313() { + let original = r##"" ആ ಫ +"##; + let expected = r##"

" ആ ಫ

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_314() { + let original = r##"  &x; &#; &#x; +� +&#abcdef0; +&ThisIsNotDefined; &hi?; +"##; + let expected = r##"

&nbsp &x; &#; &#x; +&#87654321; +&#abcdef0; +&ThisIsNotDefined; &hi?;

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_315() { + let original = r##"© +"##; + let expected = r##"

&copy

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_316() { + let original = r##"&MadeUpEntity; +"##; + let expected = r##"

&MadeUpEntity;

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_317() { + let original = r##" +"##; + let expected = r##" +"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_318() { + let original = r##"[foo](/föö "föö") +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_319() { + let original = r##"[foo] + +[foo]: /föö "föö" +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_320() { + let original = r##"``` föö +foo +``` +"##; + let expected = r##"
foo
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_321() { + let original = r##"`föö` +"##; + let expected = r##"

f&ouml;&ouml;

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_322() { + let original = r##" föfö +"##; + let expected = r##"
f&ouml;f&ouml;
+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_323() { + let original = r##"*foo* +*foo* +"##; + let expected = r##"

*foo* +foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_324() { + let original = r##"* foo + +* foo +"##; + let expected = r##"

* foo

+
    +
  • foo
  • +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_325() { + let original = r##"foo bar +"##; + let expected = r##"

foo + +bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_326() { + let original = r##" foo +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_327() { + let original = r##"[a](url "tit") +"##; + let expected = r##"

[a](url "tit")

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_328() { + let original = r##"`foo` +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_329() { + let original = r##"`` foo ` bar `` +"##; + let expected = r##"

foo ` bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_330() { + let original = r##"` `` ` +"##; + let expected = r##"

``

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_331() { + let original = r##"` `` ` +"##; + let expected = r##"

``

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_332() { + let original = r##"` a` +"##; + let expected = r##"

a

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_333() { + let original = r##"` b ` +"##; + let expected = r##"

 b 

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_334() { + let original = r##"` ` +` ` +"##; + let expected = r##"

  +

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_335() { + let original = r##"`` +foo +bar +baz +`` +"##; + let expected = r##"

foo bar baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_336() { + let original = r##"`` +foo +`` +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_337() { + let original = r##"`foo bar +baz` +"##; + let expected = r##"

foo bar baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_338() { + let original = r##"`foo\`bar` +"##; + let expected = r##"

foo\bar`

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_339() { + let original = r##"``foo`bar`` +"##; + let expected = r##"

foo`bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_340() { + let original = r##"` foo `` bar ` +"##; + let expected = r##"

foo `` bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_341() { + let original = r##"*foo`*` +"##; + let expected = r##"

*foo*

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_342() { + let original = r##"[not a `link](/foo`) +"##; + let expected = r##"

[not a link](/foo)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_343() { + let original = r##"`` +"##; + let expected = r##"

<a href="">`

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_344() { + let original = r##"
` +"##; + let expected = r##"

`

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_345() { + let original = r##"`` +"##; + let expected = r##"

<http://foo.bar.baz>`

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_346() { + let original = r##"` +"##; + let expected = r##"

http://foo.bar.`baz`

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_347() { + let original = r##"```foo`` +"##; + let expected = r##"

```foo``

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_348() { + let original = r##"`foo +"##; + let expected = r##"

`foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_349() { + let original = r##"`foo``bar`` +"##; + let expected = r##"

`foobar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_350() { + let original = r##"*foo bar* +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_351() { + let original = r##"a * foo bar* +"##; + let expected = r##"

a * foo bar*

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_352() { + let original = r##"a*"foo"* +"##; + let expected = r##"

a*"foo"*

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_353() { + let original = r##"* a * +"##; + let expected = r##"

* a *

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_354() { + let original = r##"foo*bar* +"##; + let expected = r##"

foobar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_355() { + let original = r##"5*6*78 +"##; + let expected = r##"

5678

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_356() { + let original = r##"_foo bar_ +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_357() { + let original = r##"_ foo bar_ +"##; + let expected = r##"

_ foo bar_

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_358() { + let original = r##"a_"foo"_ +"##; + let expected = r##"

a_"foo"_

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_359() { + let original = r##"foo_bar_ +"##; + let expected = r##"

foo_bar_

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_360() { + let original = r##"5_6_78 +"##; + let expected = r##"

5_6_78

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_361() { + let original = r##"пристаням_стремятся_ +"##; + let expected = r##"

пристаням_стремятся_

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_362() { + let original = r##"aa_"bb"_cc +"##; + let expected = r##"

aa_"bb"_cc

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_363() { + let original = r##"foo-_(bar)_ +"##; + let expected = r##"

foo-(bar)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_364() { + let original = r##"_foo* +"##; + let expected = r##"

_foo*

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_365() { + let original = r##"*foo bar * +"##; + let expected = r##"

*foo bar *

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_366() { + let original = r##"*foo bar +* +"##; + let expected = r##"

*foo bar +*

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_367() { + let original = r##"*(*foo) +"##; + let expected = r##"

*(*foo)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_368() { + let original = r##"*(*foo*)* +"##; + let expected = r##"

(foo)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_369() { + let original = r##"*foo*bar +"##; + let expected = r##"

foobar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_370() { + let original = r##"_foo bar _ +"##; + let expected = r##"

_foo bar _

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_371() { + let original = r##"_(_foo) +"##; + let expected = r##"

_(_foo)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_372() { + let original = r##"_(_foo_)_ +"##; + let expected = r##"

(foo)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_373() { + let original = r##"_foo_bar +"##; + let expected = r##"

_foo_bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_374() { + let original = r##"_пристаням_стремятся +"##; + let expected = r##"

_пристаням_стремятся

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_375() { + let original = r##"_foo_bar_baz_ +"##; + let expected = r##"

foo_bar_baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_376() { + let original = r##"_(bar)_. +"##; + let expected = r##"

(bar).

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_377() { + let original = r##"**foo bar** +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_378() { + let original = r##"** foo bar** +"##; + let expected = r##"

** foo bar**

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_379() { + let original = r##"a**"foo"** +"##; + let expected = r##"

a**"foo"**

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_380() { + let original = r##"foo**bar** +"##; + let expected = r##"

foobar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_381() { + let original = r##"__foo bar__ +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_382() { + let original = r##"__ foo bar__ +"##; + let expected = r##"

__ foo bar__

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_383() { + let original = r##"__ +foo bar__ +"##; + let expected = r##"

__ +foo bar__

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_384() { + let original = r##"a__"foo"__ +"##; + let expected = r##"

a__"foo"__

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_385() { + let original = r##"foo__bar__ +"##; + let expected = r##"

foo__bar__

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_386() { + let original = r##"5__6__78 +"##; + let expected = r##"

5__6__78

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_387() { + let original = r##"пристаням__стремятся__ +"##; + let expected = r##"

пристаням__стремятся__

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_388() { + let original = r##"__foo, __bar__, baz__ +"##; + let expected = r##"

foo, bar, baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_389() { + let original = r##"foo-__(bar)__ +"##; + let expected = r##"

foo-(bar)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_390() { + let original = r##"**foo bar ** +"##; + let expected = r##"

**foo bar **

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_391() { + let original = r##"**(**foo) +"##; + let expected = r##"

**(**foo)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_392() { + let original = r##"*(**foo**)* +"##; + let expected = r##"

(foo)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_393() { + let original = r##"**Gomphocarpus (*Gomphocarpus physocarpus*, syn. +*Asclepias physocarpa*)** +"##; + let expected = r##"

Gomphocarpus (Gomphocarpus physocarpus, syn. +Asclepias physocarpa)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_394() { + let original = r##"**foo "*bar*" foo** +"##; + let expected = r##"

foo "bar" foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_395() { + let original = r##"**foo**bar +"##; + let expected = r##"

foobar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_396() { + let original = r##"__foo bar __ +"##; + let expected = r##"

__foo bar __

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_397() { + let original = r##"__(__foo) +"##; + let expected = r##"

__(__foo)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_398() { + let original = r##"_(__foo__)_ +"##; + let expected = r##"

(foo)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_399() { + let original = r##"__foo__bar +"##; + let expected = r##"

__foo__bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_400() { + let original = r##"__пристаням__стремятся +"##; + let expected = r##"

__пристаням__стремятся

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_401() { + let original = r##"__foo__bar__baz__ +"##; + let expected = r##"

foo__bar__baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_402() { + let original = r##"__(bar)__. +"##; + let expected = r##"

(bar).

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_403() { + let original = r##"*foo [bar](/url)* +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_404() { + let original = r##"*foo +bar* +"##; + let expected = r##"

foo +bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_405() { + let original = r##"_foo __bar__ baz_ +"##; + let expected = r##"

foo bar baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_406() { + let original = r##"_foo _bar_ baz_ +"##; + let expected = r##"

foo bar baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_407() { + let original = r##"__foo_ bar_ +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_408() { + let original = r##"*foo *bar** +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_409() { + let original = r##"*foo **bar** baz* +"##; + let expected = r##"

foo bar baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_410() { + let original = r##"*foo**bar**baz* +"##; + let expected = r##"

foobarbaz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_411() { + let original = r##"*foo**bar* +"##; + let expected = r##"

foo**bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_412() { + let original = r##"***foo** bar* +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_413() { + let original = r##"*foo **bar*** +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_414() { + let original = r##"*foo**bar*** +"##; + let expected = r##"

foobar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_415() { + let original = r##"foo***bar***baz +"##; + let expected = r##"

foobarbaz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_416() { + let original = r##"foo******bar*********baz +"##; + let expected = r##"

foobar***baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_417() { + let original = r##"*foo **bar *baz* bim** bop* +"##; + let expected = r##"

foo bar baz bim bop

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_418() { + let original = r##"*foo [*bar*](/url)* +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_419() { + let original = r##"** is not an empty emphasis +"##; + let expected = r##"

** is not an empty emphasis

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_420() { + let original = r##"**** is not an empty strong emphasis +"##; + let expected = r##"

**** is not an empty strong emphasis

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_421() { + let original = r##"**foo [bar](/url)** +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_422() { + let original = r##"**foo +bar** +"##; + let expected = r##"

foo +bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_423() { + let original = r##"__foo _bar_ baz__ +"##; + let expected = r##"

foo bar baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_424() { + let original = r##"__foo __bar__ baz__ +"##; + let expected = r##"

foo bar baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_425() { + let original = r##"____foo__ bar__ +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_426() { + let original = r##"**foo **bar**** +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_427() { + let original = r##"**foo *bar* baz** +"##; + let expected = r##"

foo bar baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_428() { + let original = r##"**foo*bar*baz** +"##; + let expected = r##"

foobarbaz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_429() { + let original = r##"***foo* bar** +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_430() { + let original = r##"**foo *bar*** +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_431() { + let original = r##"**foo *bar **baz** +bim* bop** +"##; + let expected = r##"

foo bar baz +bim bop

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_432() { + let original = r##"**foo [*bar*](/url)** +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_433() { + let original = r##"__ is not an empty emphasis +"##; + let expected = r##"

__ is not an empty emphasis

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_434() { + let original = r##"____ is not an empty strong emphasis +"##; + let expected = r##"

____ is not an empty strong emphasis

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_435() { + let original = r##"foo *** +"##; + let expected = r##"

foo ***

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_436() { + let original = r##"foo *\** +"##; + let expected = r##"

foo *

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_437() { + let original = r##"foo *_* +"##; + let expected = r##"

foo _

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_438() { + let original = r##"foo ***** +"##; + let expected = r##"

foo *****

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_439() { + let original = r##"foo **\*** +"##; + let expected = r##"

foo *

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_440() { + let original = r##"foo **_** +"##; + let expected = r##"

foo _

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_441() { + let original = r##"**foo* +"##; + let expected = r##"

*foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_442() { + let original = r##"*foo** +"##; + let expected = r##"

foo*

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_443() { + let original = r##"***foo** +"##; + let expected = r##"

*foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_444() { + let original = r##"****foo* +"##; + let expected = r##"

***foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_445() { + let original = r##"**foo*** +"##; + let expected = r##"

foo*

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_446() { + let original = r##"*foo**** +"##; + let expected = r##"

foo***

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_447() { + let original = r##"foo ___ +"##; + let expected = r##"

foo ___

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_448() { + let original = r##"foo _\__ +"##; + let expected = r##"

foo _

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_449() { + let original = r##"foo _*_ +"##; + let expected = r##"

foo *

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_450() { + let original = r##"foo _____ +"##; + let expected = r##"

foo _____

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_451() { + let original = r##"foo __\___ +"##; + let expected = r##"

foo _

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_452() { + let original = r##"foo __*__ +"##; + let expected = r##"

foo *

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_453() { + let original = r##"__foo_ +"##; + let expected = r##"

_foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_454() { + let original = r##"_foo__ +"##; + let expected = r##"

foo_

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_455() { + let original = r##"___foo__ +"##; + let expected = r##"

_foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_456() { + let original = r##"____foo_ +"##; + let expected = r##"

___foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_457() { + let original = r##"__foo___ +"##; + let expected = r##"

foo_

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_458() { + let original = r##"_foo____ +"##; + let expected = r##"

foo___

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_459() { + let original = r##"**foo** +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_460() { + let original = r##"*_foo_* +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_461() { + let original = r##"__foo__ +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_462() { + let original = r##"_*foo*_ +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_463() { + let original = r##"****foo**** +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_464() { + let original = r##"____foo____ +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_465() { + let original = r##"******foo****** +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_466() { + let original = r##"***foo*** +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_467() { + let original = r##"_____foo_____ +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_468() { + let original = r##"*foo _bar* baz_ +"##; + let expected = r##"

foo _bar baz_

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_469() { + let original = r##"*foo __bar *baz bim__ bam* +"##; + let expected = r##"

foo bar *baz bim bam

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_470() { + let original = r##"**foo **bar baz** +"##; + let expected = r##"

**foo bar baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_471() { + let original = r##"*foo *bar baz* +"##; + let expected = r##"

*foo bar baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_472() { + let original = r##"*[bar*](/url) +"##; + let expected = r##"

*bar*

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_473() { + let original = r##"_foo [bar_](/url) +"##; + let expected = r##"

_foo bar_

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_474() { + let original = r##"* +"##; + let expected = r##"

*

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_475() { + let original = r##"** +"##; + let expected = r##"

**

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_476() { + let original = r##"__ +"##; + let expected = r##"

__

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_477() { + let original = r##"*a `*`* +"##; + let expected = r##"

a *

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_478() { + let original = r##"_a `_`_ +"##; + let expected = r##"

a _

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_479() { + let original = r##"**a +"##; + let expected = r##"

**ahttp://foo.bar/?q=**

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_480() { + let original = r##"__a +"##; + let expected = r##"

__ahttp://foo.bar/?q=__

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_481() { + let original = r##"[link](/uri "title") +"##; + let expected = r##"

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_482() { + let original = r##"[link](/uri) +"##; + let expected = r##"

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_483() { + let original = r##"[link]() +"##; + let expected = r##"

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_484() { + let original = r##"[link](<>) +"##; + let expected = r##"

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_485() { + let original = r##"[link](/my uri) +"##; + let expected = r##"

[link](/my uri)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_486() { + let original = r##"[link](
) +"##; + let expected = r##"

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_487() { + let original = r##"[link](foo +bar) +"##; + let expected = r##"

[link](foo +bar)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_488() { + let original = r##"[link]() +"##; + let expected = r##"

[link]()

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_489() { + let original = r##"[a]() +"##; + let expected = r##"

a

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_490() { + let original = r##"[link]() +"##; + let expected = r##"

[link](<foo>)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_491() { + let original = r##"[a]( +[a](c) +"##; + let expected = r##"

[a](<b)c +[a](<b)c> +[a](c)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_492() { + let original = r##"[link](\(foo\)) +"##; + let expected = r##"

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_493() { + let original = r##"[link](foo(and(bar))) +"##; + let expected = r##"

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_494() { + let original = r##"[link](foo\(and\(bar\)) +"##; + let expected = r##"

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_495() { + let original = r##"[link]() +"##; + let expected = r##"

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_496() { + let original = r##"[link](foo\)\:) +"##; + let expected = r##"

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_497() { + let original = r##"[link](#fragment) + +[link](http://example.com#fragment) + +[link](http://example.com?foo=3#frag) +"##; + let expected = r##"

link

+

link

+

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_498() { + let original = r##"[link](foo\bar) +"##; + let expected = r##"

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_499() { + let original = r##"[link](foo%20bä) +"##; + let expected = r##"

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_500() { + let original = r##"[link]("title") +"##; + let expected = r##"

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_501() { + let original = r##"[link](/url "title") +[link](/url 'title') +[link](/url (title)) +"##; + let expected = r##"

link +link +link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_502() { + let original = r##"[link](/url "title \""") +"##; + let expected = r##"

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_503() { + let original = r##"[link](/url "title") +"##; + let expected = r##"

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_504() { + let original = r##"[link](/url "title "and" title") +"##; + let expected = r##"

[link](/url "title "and" title")

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_505() { + let original = r##"[link](/url 'title "and" title') +"##; + let expected = r##"

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_506() { + let original = r##"[link]( /uri + "title" ) +"##; + let expected = r##"

link

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_507() { + let original = r##"[link] (/uri) +"##; + let expected = r##"

[link] (/uri)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_508() { + let original = r##"[link [foo [bar]]](/uri) +"##; + let expected = r##"

link [foo [bar]]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_509() { + let original = r##"[link] bar](/uri) +"##; + let expected = r##"

[link] bar](/uri)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_510() { + let original = r##"[link [bar](/uri) +"##; + let expected = r##"

[link bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_511() { + let original = r##"[link \[bar](/uri) +"##; + let expected = r##"

link [bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_512() { + let original = r##"[link *foo **bar** `#`*](/uri) +"##; + let expected = r##"

link foo bar #

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_513() { + let original = r##"[![moon](moon.jpg)](/uri) +"##; + let expected = r##"

moon

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_514() { + let original = r##"[foo [bar](/uri)](/uri) +"##; + let expected = r##"

[foo bar](/uri)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_515() { + let original = r##"[foo *[bar [baz](/uri)](/uri)*](/uri) +"##; + let expected = r##"

[foo [bar baz](/uri)](/uri)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_516() { + let original = r##"![[[foo](uri1)](uri2)](uri3) +"##; + let expected = r##"

[foo](uri2)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_517() { + let original = r##"*[foo*](/uri) +"##; + let expected = r##"

*foo*

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_518() { + let original = r##"[foo *bar](baz*) +"##; + let expected = r##"

foo *bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_519() { + let original = r##"*foo [bar* baz] +"##; + let expected = r##"

foo [bar baz]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_520() { + let original = r##"[foo +"##; + let expected = r##"

[foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_521() { + let original = r##"[foo`](/uri)` +"##; + let expected = r##"

[foo](/uri)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_522() { + let original = r##"[foo +"##; + let expected = r##"

[foohttp://example.com/?search=](uri)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_523() { + let original = r##"[foo][bar] + +[bar]: /url "title" +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_524() { + let original = r##"[link [foo [bar]]][ref] + +[ref]: /uri +"##; + let expected = r##"

link [foo [bar]]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_525() { + let original = r##"[link \[bar][ref] + +[ref]: /uri +"##; + let expected = r##"

link [bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_526() { + let original = r##"[link *foo **bar** `#`*][ref] + +[ref]: /uri +"##; + let expected = r##"

link foo bar #

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_527() { + let original = r##"[![moon](moon.jpg)][ref] + +[ref]: /uri +"##; + let expected = r##"

moon

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_528() { + let original = r##"[foo [bar](/uri)][ref] + +[ref]: /uri +"##; + let expected = r##"

[foo bar]ref

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_529() { + let original = r##"[foo *bar [baz][ref]*][ref] + +[ref]: /uri +"##; + let expected = r##"

[foo bar baz]ref

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_530() { + let original = r##"*[foo*][ref] + +[ref]: /uri +"##; + let expected = r##"

*foo*

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_531() { + let original = r##"[foo *bar][ref] + +[ref]: /uri +"##; + let expected = r##"

foo *bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_532() { + let original = r##"[foo + +[ref]: /uri +"##; + let expected = r##"

[foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_533() { + let original = r##"[foo`][ref]` + +[ref]: /uri +"##; + let expected = r##"

[foo][ref]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_534() { + let original = r##"[foo + +[ref]: /uri +"##; + let expected = r##"

[foohttp://example.com/?search=][ref]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_535() { + let original = r##"[foo][BaR] + +[bar]: /url "title" +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_536() { + let original = r##"[Толпой][Толпой] is a Russian word. + +[ТОЛПОЙ]: /url +"##; + let expected = r##"

Толпой is a Russian word.

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_537() { + let original = r##"[Foo + bar]: /url + +[Baz][Foo bar] +"##; + let expected = r##"

Baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_538() { + let original = r##"[foo] [bar] + +[bar]: /url "title" +"##; + let expected = r##"

[foo] bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_539() { + let original = r##"[foo] +[bar] + +[bar]: /url "title" +"##; + let expected = r##"

[foo] +bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_540() { + let original = r##"[foo]: /url1 + +[foo]: /url2 + +[bar][foo] +"##; + let expected = r##"

bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_541() { + let original = r##"[bar][foo\!] + +[foo!]: /url +"##; + let expected = r##"

[bar][foo!]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_542() { + let original = r##"[foo][ref[] + +[ref[]: /uri +"##; + let expected = r##"

[foo][ref[]

+

[ref[]: /uri

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_543() { + let original = r##"[foo][ref[bar]] + +[ref[bar]]: /uri +"##; + let expected = r##"

[foo][ref[bar]]

+

[ref[bar]]: /uri

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_544() { + let original = r##"[[[foo]]] + +[[[foo]]]: /url +"##; + let expected = r##"

[[[foo]]]

+

[[[foo]]]: /url

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_545() { + let original = r##"[foo][ref\[] + +[ref\[]: /uri +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_546() { + let original = r##"[bar\\]: /uri + +[bar\\] +"##; + let expected = r##"

bar\

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_547() { + let original = r##"[] + +[]: /uri +"##; + let expected = r##"

[]

+

[]: /uri

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_548() { + let original = r##"[ + ] + +[ + ]: /uri +"##; + let expected = r##"

[ +]

+

[ +]: /uri

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_549() { + let original = r##"[foo][] + +[foo]: /url "title" +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_550() { + let original = r##"[*foo* bar][] + +[*foo* bar]: /url "title" +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_551() { + let original = r##"[Foo][] + +[foo]: /url "title" +"##; + let expected = r##"

Foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_552() { + let original = r##"[foo] +[] + +[foo]: /url "title" +"##; + let expected = r##"

foo +[]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_553() { + let original = r##"[foo] + +[foo]: /url "title" +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_554() { + let original = r##"[*foo* bar] + +[*foo* bar]: /url "title" +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_555() { + let original = r##"[[*foo* bar]] + +[*foo* bar]: /url "title" +"##; + let expected = r##"

[foo bar]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_556() { + let original = r##"[[bar [foo] + +[foo]: /url +"##; + let expected = r##"

[[bar foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_557() { + let original = r##"[Foo] + +[foo]: /url "title" +"##; + let expected = r##"

Foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_558() { + let original = r##"[foo] bar + +[foo]: /url +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_559() { + let original = r##"\[foo] + +[foo]: /url "title" +"##; + let expected = r##"

[foo]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_560() { + let original = r##"[foo*]: /url + +*[foo*] +"##; + let expected = r##"

*foo*

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_561() { + let original = r##"[foo][bar] + +[foo]: /url1 +[bar]: /url2 +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_562() { + let original = r##"[foo][] + +[foo]: /url1 +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_563() { + let original = r##"[foo]() + +[foo]: /url1 +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_564() { + let original = r##"[foo](not a link) + +[foo]: /url1 +"##; + let expected = r##"

foo(not a link)

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_565() { + let original = r##"[foo][bar][baz] + +[baz]: /url +"##; + let expected = r##"

[foo]bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_566() { + let original = r##"[foo][bar][baz] + +[baz]: /url1 +[bar]: /url2 +"##; + let expected = r##"

foobaz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_567() { + let original = r##"[foo][bar][baz] + +[baz]: /url1 +[foo]: /url2 +"##; + let expected = r##"

[foo]bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_568() { + let original = r##"![foo](/url "title") +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_569() { + let original = r##"![foo *bar*] + +[foo *bar*]: train.jpg "train & tracks" +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_570() { + let original = r##"![foo ![bar](/url)](/url2) +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_571() { + let original = r##"![foo [bar](/url)](/url2) +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_572() { + let original = r##"![foo *bar*][] + +[foo *bar*]: train.jpg "train & tracks" +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_573() { + let original = r##"![foo *bar*][foobar] + +[FOOBAR]: train.jpg "train & tracks" +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_574() { + let original = r##"![foo](train.jpg) +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_575() { + let original = r##"My ![foo bar](/path/to/train.jpg "title" ) +"##; + let expected = r##"

My foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_576() { + let original = r##"![foo]() +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_577() { + let original = r##"![](/url) +"##; + let expected = r##"

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_578() { + let original = r##"![foo][bar] + +[bar]: /url +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_579() { + let original = r##"![foo][bar] + +[BAR]: /url +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_580() { + let original = r##"![foo][] + +[foo]: /url "title" +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_581() { + let original = r##"![*foo* bar][] + +[*foo* bar]: /url "title" +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_582() { + let original = r##"![Foo][] + +[foo]: /url "title" +"##; + let expected = r##"

Foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_583() { + let original = r##"![foo] +[] + +[foo]: /url "title" +"##; + let expected = r##"

foo +[]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_584() { + let original = r##"![foo] + +[foo]: /url "title" +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_585() { + let original = r##"![*foo* bar] + +[*foo* bar]: /url "title" +"##; + let expected = r##"

foo bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_586() { + let original = r##"![[foo]] + +[[foo]]: /url "title" +"##; + let expected = r##"

![[foo]]

+

[[foo]]: /url "title"

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_587() { + let original = r##"![Foo] + +[foo]: /url "title" +"##; + let expected = r##"

Foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_588() { + let original = r##"!\[foo] + +[foo]: /url "title" +"##; + let expected = r##"

![foo]

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_589() { + let original = r##"\![foo] + +[foo]: /url "title" +"##; + let expected = r##"

!foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_590() { + let original = r##" +"##; + let expected = r##"

http://foo.bar.baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_591() { + let original = r##" +"##; + let expected = r##"

http://foo.bar.baz/test?q=hello&id=22&boolean

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_592() { + let original = r##" +"##; + let expected = r##"

irc://foo.bar:2233/baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_593() { + let original = r##" +"##; + let expected = r##"

MAILTO:FOO@BAR.BAZ

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_594() { + let original = r##" +"##; + let expected = r##"

a+b+c:d

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_595() { + let original = r##" +"##; + let expected = r##"

made-up-scheme://foo,bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_596() { + let original = r##" +"##; + let expected = r##"

http://../

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_597() { + let original = r##" +"##; + let expected = r##"

localhost:5001/foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_598() { + let original = r##" +"##; + let expected = r##"

<http://foo.bar/baz bim>

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_599() { + let original = r##" +"##; + let expected = r##"

http://example.com/\[\

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_600() { + let original = r##" +"##; + let expected = r##"

foo@bar.example.com

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_601() { + let original = r##" +"##; + let expected = r##"

foo+special@Bar.baz-bar0.com

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_602() { + let original = r##" +"##; + let expected = r##"

<foo+@bar.example.com>

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_603() { + let original = r##"<> +"##; + let expected = r##"

<>

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_604() { + let original = r##"< http://foo.bar > +"##; + let expected = r##"

< http://foo.bar >

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_605() { + let original = r##" +"##; + let expected = r##"

<m:abc>

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_606() { + let original = r##" +"##; + let expected = r##"

<foo.bar.baz>

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_607() { + let original = r##"http://example.com +"##; + let expected = r##"

http://example.com

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_608() { + let original = r##"foo@bar.example.com +"##; + let expected = r##"

foo@bar.example.com

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_609() { + let original = r##" +"##; + let expected = r##"

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_610() { + let original = r##" +"##; + let expected = r##"

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_611() { + let original = r##" +"##; + let expected = r##"

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_612() { + let original = r##" +"##; + let expected = r##"

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_613() { + let original = r##"Foo +"##; + let expected = r##"

Foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_614() { + let original = r##"<33> <__> +"##; + let expected = r##"

<33> <__>

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_615() { + let original = r##"
+"##; + let expected = r##"

<a h*#ref="hi">

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_616() { + let original = r##"
<a href="hi'> <a href=hi'>

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_617() { + let original = r##"< a>< +foo> + +"##; + let expected = r##"

< a>< +foo><bar/ > +<foo bar=baz +bim!bop />

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_618() { + let original = r##"
+"##; + let expected = r##"

<a href='bar'title=title>

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_619() { + let original = r##"
+"##; + let expected = r##"

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_620() { + let original = r##" +"##; + let expected = r##"

</a href="foo">

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_621() { + let original = r##"foo +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_622() { + let original = r##"foo +"##; + let expected = r##"

foo <!-- not a comment -- two hyphens -->

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_623() { + let original = r##"foo foo --> + +foo +"##; + let expected = r##"

foo <!--> foo -->

+

foo <!-- foo--->

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_624() { + let original = r##"foo +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_625() { + let original = r##"foo +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_626() { + let original = r##"foo &<]]> +"##; + let expected = r##"

foo &<]]>

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_627() { + let original = r##"foo +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_628() { + let original = r##"foo +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_629() { + let original = r##" +"##; + let expected = r##"

<a href=""">

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_630() { + let original = r##"foo +baz +"##; + let expected = r##"

foo
+baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_631() { + let original = r##"foo\ +baz +"##; + let expected = r##"

foo
+baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_632() { + let original = r##"foo +baz +"##; + let expected = r##"

foo
+baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_633() { + let original = r##"foo + bar +"##; + let expected = r##"

foo
+bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_634() { + let original = r##"foo\ + bar +"##; + let expected = r##"

foo
+bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_635() { + let original = r##"*foo +bar* +"##; + let expected = r##"

foo
+bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_636() { + let original = r##"*foo\ +bar* +"##; + let expected = r##"

foo
+bar

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_637() { + let original = r##"`code +span` +"##; + let expected = r##"

code span

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_638() { + let original = r##"`code\ +span` +"##; + let expected = r##"

code\ span

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_639() { + let original = r##"
+"##; + let expected = r##"

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_640() { + let original = r##" +"##; + let expected = r##"

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_641() { + let original = r##"foo\ +"##; + let expected = r##"

foo\

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_642() { + let original = r##"foo +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_643() { + let original = r##"### foo\ +"##; + let expected = r##"

foo\

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_644() { + let original = r##"### foo +"##; + let expected = r##"

foo

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_645() { + let original = r##"foo +baz +"##; + let expected = r##"

foo +baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_646() { + let original = r##"foo + baz +"##; + let expected = r##"

foo +baz

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_647() { + let original = r##"hello $.;'there +"##; + let expected = r##"

hello $.;'there

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_648() { + let original = r##"Foo χρῆν +"##; + let expected = r##"

Foo χρῆν

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn spec_test_649() { + let original = r##"Multiple spaces +"##; + let expected = r##"

Multiple spaces

+"##; + + test_markdown_html(original, expected); +} \ No newline at end of file diff --git a/vendor/pulldown-cmark/tests/suite/table.rs b/vendor/pulldown-cmark/tests/suite/table.rs new file mode 100644 index 0000000000..0390ad2b65 --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/table.rs @@ -0,0 +1,205 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +use super::test_markdown_html; + +#[test] +fn table_test_1() { + let original = r##"Test header +----------- +"##; + let expected = r##"

Test header

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn table_test_2() { + let original = r##"Test|Table +----|----- +"##; + let expected = r##" +
TestTable
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn table_test_3() { + let original = r##"> Test | Table +> ------|------ +> Row 1 | Every +> Row 2 | Day +> +> Paragraph +"##; + let expected = r##"
+ + + +
Test Table
Row 1 Every
Row 2 Day
+

Paragraph

+
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn table_test_4() { + let original = r##" 1. First entry + 2. Second entry + + Col 1|Col 2 + -|- + Row 1|Part 2 + Row 2|Part 2 +"##; + let expected = r##"
    +
  1. +

    First entry

    +
  2. +
  3. +

    Second entry

    + + + +
    Col 1Col 2
    Row 1Part 2
    Row 2Part 2
    +
  4. +
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn table_test_5() { + let original = r##"|Col 1|Col 2| +|-----|-----| +|R1C1 |R1C2 | +|R2C1 |R2C2 | +"##; + let expected = r##" + + +
Col 1Col 2
R1C1 R1C2
R2C1 R2C2
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn table_test_6() { + let original = r##"| Col 1 | Col 2 | +|-------|-------| +| | | +| | | +"##; + let expected = r##" + + +
Col 1 Col 2
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn table_test_7() { + let original = r##"| Col 1 | Col 2 | +|-------|-------| +| x | | +| | x | +"##; + let expected = r##" + + +
Col 1 Col 2
x
x
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn table_test_8() { + let original = r##"|Col 1|Col 2| +|-----|-----| +|✓ |✓ | +|✓ |✓ | +"##; + let expected = r##" + + +
Col 1Col 2
✓ ✓
✓ ✓
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn table_test_9() { + let original = r##"| Target | std |rustc|cargo| notes | +|-------------------------------|-----|-----|-----|----------------------------| +| `x86_64-unknown-linux-musl` | ✓ | | | 64-bit Linux with MUSL | +| `arm-linux-androideabi` | ✓ | | | ARM Android | +| `arm-unknown-linux-gnueabi` | ✓ | ✓ | | ARM Linux (2.6.18+) | +| `arm-unknown-linux-gnueabihf` | ✓ | ✓ | | ARM Linux (2.6.18+) | +| `aarch64-unknown-linux-gnu` | ✓ | | | ARM64 Linux (2.6.18+) | +| `mips-unknown-linux-gnu` | ✓ | | | MIPS Linux (2.6.18+) | +| `mipsel-unknown-linux-gnu` | ✓ | | | MIPS (LE) Linux (2.6.18+) | +"##; + let expected = r##" + + + + + + + +
Target std rustccargo notes
x86_64-unknown-linux-musl ✓ 64-bit Linux with MUSL
arm-linux-androideabi ✓ ARM Android
arm-unknown-linux-gnueabi ✓ ✓ ARM Linux (2.6.18+)
arm-unknown-linux-gnueabihf ✓ ✓ ARM Linux (2.6.18+)
aarch64-unknown-linux-gnu ✓ ARM64 Linux (2.6.18+)
mips-unknown-linux-gnu ✓ MIPS Linux (2.6.18+)
mipsel-unknown-linux-gnu ✓ MIPS (LE) Linux (2.6.18+)
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn table_test_10() { + let original = r##"|-|-| +|ぃ|い| +"##; + let expected = r##"

|-|-| +|ぃ|い|

+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn table_test_11() { + let original = r##"|ぁ|ぃ| +|-|-| +|ぃ|ぃ| +"##; + let expected = r##" + +
ぁぃ
ぃぃ
+"##; + + test_markdown_html(original, expected); +} + +#[test] +fn table_test_12() { + let original = r##"|Колонка 1|Колонка 2| +|---------|---------| +|Ячейка 1 |Ячейка 2 | +"##; + let expected = r##" + +
Колонка 1Колонка 2
Ячейка 1 Ячейка 2
+"##; + + test_markdown_html(original, expected); +} \ No newline at end of file diff --git a/vendor/pulldown-cmark/third_party/CommonMark/LICENSE b/vendor/pulldown-cmark/third_party/CommonMark/LICENSE new file mode 100644 index 0000000000..6b8a93c5e3 --- /dev/null +++ b/vendor/pulldown-cmark/third_party/CommonMark/LICENSE @@ -0,0 +1,105 @@ +The CommonMark spec (spec.txt) and DTD (CommonMark.dtd) are + +Copyright (C) 2014-16 John MacFarlane + +Released under the Creative Commons CC-BY-SA 4.0 license: +. + +Creative Commons Attribution-ShareAlike 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. + +Section 1 – Definitions. + +Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. +Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. +BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License. +Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. +Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. +Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. +License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike. +Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. +Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. +Licensor means the individual(s) or entity(ies) granting rights under this Public License. +Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. +Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. +You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. +Section 2 – Scope. + +License grant. +Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: +reproduce and Share the Licensed Material, in whole or in part; and +produce, reproduce, and Share Adapted Material. +Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. +Term. The term of this Public License is specified in Section 6(a). +Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. +Downstream recipients. +Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. +Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply. +No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. +No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). +Other rights. + +Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. +Patent and trademark rights are not licensed under this Public License. +To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. +Section 3 – License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the following conditions. + +Attribution. + +If You Share the Licensed Material (including in modified form), You must: + +retain the following if it is supplied by the Licensor with the Licensed Material: +identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); +a copyright notice; +a notice that refers to this Public License; +a notice that refers to the disclaimer of warranties; +a URI or hyperlink to the Licensed Material to the extent reasonably practicable; +indicate if You modified the Licensed Material and retain an indication of any previous modifications; and +indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. +You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. +If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. +ShareAlike. +In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. + +The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License. +You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. +You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. +Section 4 – Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: + +for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; +if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and +You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. +For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. +Section 5 – Disclaimer of Warranties and Limitation of Liability. + +Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. +To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. +The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. +Section 6 – Term and Termination. + +This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. +Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: + +automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or +upon express reinstatement by the Licensor. +For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. +For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. +Sections 1, 5, 6, 7, and 8 survive termination of this Public License. +Section 7 – Other Terms and Conditions. + +The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. +Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. +Section 8 – Interpretation. + +For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. +To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. +No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. +Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. +Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” The text of the Creative Commons public licenses is dedicated to the public domain under the CC0 Public Domain Dedication. Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. + +Creative Commons may be contacted at creativecommons.org. \ No newline at end of file diff --git a/vendor/pulldown-cmark/third_party/CommonMark/README.google b/vendor/pulldown-cmark/third_party/CommonMark/README.google new file mode 100644 index 0000000000..7ad133e415 --- /dev/null +++ b/vendor/pulldown-cmark/third_party/CommonMark/README.google @@ -0,0 +1,12 @@ +URL: https://github.com/jgm/CommonMark.git +Version: 1ef46a73e61968a60cc7b2e700381d719165b86c +License: Creative Commons CC-BY-SA 4.0 +License File: LICENSE + +Description: +CommonMark spec + +Local Modifications: +This directory contains only the spec file. License file has been +subsetted to only the files it applies to, and text of CC-BY-SA 4.0 +license has been added. diff --git a/vendor/pulldown-cmark/third_party/CommonMark/spec.txt b/vendor/pulldown-cmark/third_party/CommonMark/spec.txt new file mode 100644 index 0000000000..e828e314a4 --- /dev/null +++ b/vendor/pulldown-cmark/third_party/CommonMark/spec.txt @@ -0,0 +1,9710 @@ +--- +title: CommonMark Spec +author: John MacFarlane +version: 0.29 +date: '2019-04-06' +license: '[CC-BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)' +... + +# Introduction + +## What is Markdown? + +Markdown is a plain text format for writing structured documents, +based on conventions for indicating formatting in email +and usenet posts. It was developed by John Gruber (with +help from Aaron Swartz) and released in 2004 in the form of a +[syntax description](http://daringfireball.net/projects/markdown/syntax) +and a Perl script (`Markdown.pl`) for converting Markdown to +HTML. In the next decade, dozens of implementations were +developed in many languages. Some extended the original +Markdown syntax with conventions for footnotes, tables, and +other document elements. Some allowed Markdown documents to be +rendered in formats other than HTML. Websites like Reddit, +StackOverflow, and GitHub had millions of people using Markdown. +And Markdown started to be used beyond the web, to author books, +articles, slide shows, letters, and lecture notes. + +What distinguishes Markdown from many other lightweight markup +syntaxes, which are often easier to write, is its readability. +As Gruber writes: + +> The overriding design goal for Markdown's formatting syntax is +> to make it as readable as possible. The idea is that a +> Markdown-formatted document should be publishable as-is, as +> plain text, without looking like it's been marked up with tags +> or formatting instructions. +> () + +The point can be illustrated by comparing a sample of +[AsciiDoc](http://www.methods.co.nz/asciidoc/) with +an equivalent sample of Markdown. Here is a sample of +AsciiDoc from the AsciiDoc manual: + +``` +1. List item one. ++ +List item one continued with a second paragraph followed by an +Indented block. ++ +................. +$ ls *.sh +$ mv *.sh ~/tmp +................. ++ +List item continued with a third paragraph. + +2. List item two continued with an open block. ++ +-- +This paragraph is part of the preceding list item. + +a. This list is nested and does not require explicit item +continuation. ++ +This paragraph is part of the preceding list item. + +b. List item b. + +This paragraph belongs to item two of the outer list. +-- +``` + +And here is the equivalent in Markdown: +``` +1. List item one. + + List item one continued with a second paragraph followed by an + Indented block. + + $ ls *.sh + $ mv *.sh ~/tmp + + List item continued with a third paragraph. + +2. List item two continued with an open block. + + This paragraph is part of the preceding list item. + + 1. This list is nested and does not require explicit item continuation. + + This paragraph is part of the preceding list item. + + 2. List item b. + + This paragraph belongs to item two of the outer list. +``` + +The AsciiDoc version is, arguably, easier to write. You don't need +to worry about indentation. But the Markdown version is much easier +to read. The nesting of list items is apparent to the eye in the +source, not just in the processed document. + +## Why is a spec needed? + +John Gruber's [canonical description of Markdown's +syntax](http://daringfireball.net/projects/markdown/syntax) +does not specify the syntax unambiguously. Here are some examples of +questions it does not answer: + +1. How much indentation is needed for a sublist? The spec says that + continuation paragraphs need to be indented four spaces, but is + not fully explicit about sublists. It is natural to think that + they, too, must be indented four spaces, but `Markdown.pl` does + not require that. This is hardly a "corner case," and divergences + between implementations on this issue often lead to surprises for + users in real documents. (See [this comment by John + Gruber](http://article.gmane.org/gmane.text.markdown.general/1997).) + +2. Is a blank line needed before a block quote or heading? + Most implementations do not require the blank line. However, + this can lead to unexpected results in hard-wrapped text, and + also to ambiguities in parsing (note that some implementations + put the heading inside the blockquote, while others do not). + (John Gruber has also spoken [in favor of requiring the blank + lines](http://article.gmane.org/gmane.text.markdown.general/2146).) + +3. Is a blank line needed before an indented code block? + (`Markdown.pl` requires it, but this is not mentioned in the + documentation, and some implementations do not require it.) + + ``` markdown + paragraph + code? + ``` + +4. What is the exact rule for determining when list items get + wrapped in `

` tags? Can a list be partially "loose" and partially + "tight"? What should we do with a list like this? + + ``` markdown + 1. one + + 2. two + 3. three + ``` + + Or this? + + ``` markdown + 1. one + - a + + - b + 2. two + ``` + + (There are some relevant comments by John Gruber + [here](http://article.gmane.org/gmane.text.markdown.general/2554).) + +5. Can list markers be indented? Can ordered list markers be right-aligned? + + ``` markdown + 8. item 1 + 9. item 2 + 10. item 2a + ``` + +6. Is this one list with a thematic break in its second item, + or two lists separated by a thematic break? + + ``` markdown + * a + * * * * * + * b + ``` + +7. When list markers change from numbers to bullets, do we have + two lists or one? (The Markdown syntax description suggests two, + but the perl scripts and many other implementations produce one.) + + ``` markdown + 1. fee + 2. fie + - foe + - fum + ``` + +8. What are the precedence rules for the markers of inline structure? + For example, is the following a valid link, or does the code span + take precedence ? + + ``` markdown + [a backtick (`)](/url) and [another backtick (`)](/url). + ``` + +9. What are the precedence rules for markers of emphasis and strong + emphasis? For example, how should the following be parsed? + + ``` markdown + *foo *bar* baz* + ``` + +10. What are the precedence rules between block-level and inline-level + structure? For example, how should the following be parsed? + + ``` markdown + - `a long code span can contain a hyphen like this + - and it can screw things up` + ``` + +11. Can list items include section headings? (`Markdown.pl` does not + allow this, but does allow blockquotes to include headings.) + + ``` markdown + - # Heading + ``` + +12. Can list items be empty? + + ``` markdown + * a + * + * b + ``` + +13. Can link references be defined inside block quotes or list items? + + ``` markdown + > Blockquote [foo]. + > + > [foo]: /url + ``` + +14. If there are multiple definitions for the same reference, which takes + precedence? + + ``` markdown + [foo]: /url1 + [foo]: /url2 + + [foo][] + ``` + +In the absence of a spec, early implementers consulted `Markdown.pl` +to resolve these ambiguities. But `Markdown.pl` was quite buggy, and +gave manifestly bad results in many cases, so it was not a +satisfactory replacement for a spec. + +Because there is no unambiguous spec, implementations have diverged +considerably. As a result, users are often surprised to find that +a document that renders one way on one system (say, a GitHub wiki) +renders differently on another (say, converting to docbook using +pandoc). To make matters worse, because nothing in Markdown counts +as a "syntax error," the divergence often isn't discovered right away. + +## About this document + +This document attempts to specify Markdown syntax unambiguously. +It contains many examples with side-by-side Markdown and +HTML. These are intended to double as conformance tests. An +accompanying script `spec_tests.py` can be used to run the tests +against any Markdown program: + + python test/spec_tests.py --spec spec.txt --program PROGRAM + +Since this document describes how Markdown is to be parsed into +an abstract syntax tree, it would have made sense to use an abstract +representation of the syntax tree instead of HTML. But HTML is capable +of representing the structural distinctions we need to make, and the +choice of HTML for the tests makes it possible to run the tests against +an implementation without writing an abstract syntax tree renderer. + +This document is generated from a text file, `spec.txt`, written +in Markdown with a small extension for the side-by-side tests. +The script `tools/makespec.py` can be used to convert `spec.txt` into +HTML or CommonMark (which can then be converted into other formats). + +In the examples, the `→` character is used to represent tabs. + +# Preliminaries + +## Characters and lines + +Any sequence of [characters] is a valid CommonMark +document. + +A [character](@) is a Unicode code point. Although some +code points (for example, combining accents) do not correspond to +characters in an intuitive sense, all code points count as characters +for purposes of this spec. + +This spec does not specify an encoding; it thinks of lines as composed +of [characters] rather than bytes. A conforming parser may be limited +to a certain encoding. + +A [line](@) is a sequence of zero or more [characters] +other than newline (`U+000A`) or carriage return (`U+000D`), +followed by a [line ending] or by the end of file. + +A [line ending](@) is a newline (`U+000A`), a carriage return +(`U+000D`) not followed by a newline, or a carriage return and a +following newline. + +A line containing no characters, or a line containing only spaces +(`U+0020`) or tabs (`U+0009`), is called a [blank line](@). + +The following definitions of character classes will be used in this spec: + +A [whitespace character](@) is a space +(`U+0020`), tab (`U+0009`), newline (`U+000A`), line tabulation (`U+000B`), +form feed (`U+000C`), or carriage return (`U+000D`). + +[Whitespace](@) is a sequence of one or more [whitespace +characters]. + +A [Unicode whitespace character](@) is +any code point in the Unicode `Zs` general category, or a tab (`U+0009`), +carriage return (`U+000D`), newline (`U+000A`), or form feed +(`U+000C`). + +[Unicode whitespace](@) is a sequence of one +or more [Unicode whitespace characters]. + +A [space](@) is `U+0020`. + +A [non-whitespace character](@) is any character +that is not a [whitespace character]. + +An [ASCII punctuation character](@) +is `!`, `"`, `#`, `$`, `%`, `&`, `'`, `(`, `)`, +`*`, `+`, `,`, `-`, `.`, `/` (U+0021–2F), +`:`, `;`, `<`, `=`, `>`, `?`, `@` (U+003A–0040), +`[`, `\`, `]`, `^`, `_`, `` ` `` (U+005B–0060), +`{`, `|`, `}`, or `~` (U+007B–007E). + +A [punctuation character](@) is an [ASCII +punctuation character] or anything in +the general Unicode categories `Pc`, `Pd`, `Pe`, `Pf`, `Pi`, `Po`, or `Ps`. + +## Tabs + +Tabs in lines are not expanded to [spaces]. However, +in contexts where whitespace helps to define block structure, +tabs behave as if they were replaced by spaces with a tab stop +of 4 characters. + +Thus, for example, a tab can be used instead of four spaces +in an indented code block. (Note, however, that internal +tabs are passed through as literal tabs, not expanded to +spaces.) + +```````````````````````````````` example +→foo→baz→→bim +. +

foo→baz→→bim
+
+```````````````````````````````` + +```````````````````````````````` example + →foo→baz→→bim +. +
foo→baz→→bim
+
+```````````````````````````````` + +```````````````````````````````` example + a→a + ὐ→a +. +
a→a
+ὐ→a
+
+```````````````````````````````` + +In the following example, a continuation paragraph of a list +item is indented with a tab; this has exactly the same effect +as indentation with four spaces would: + +```````````````````````````````` example + - foo + +→bar +. +
    +
  • +

    foo

    +

    bar

    +
  • +
+```````````````````````````````` + +```````````````````````````````` example +- foo + +→→bar +. +
    +
  • +

    foo

    +
      bar
    +
    +
  • +
+```````````````````````````````` + +Normally the `>` that begins a block quote may be followed +optionally by a space, which is not considered part of the +content. In the following case `>` is followed by a tab, +which is treated as if it were expanded into three spaces. +Since one of these spaces is considered part of the +delimiter, `foo` is considered to be indented six spaces +inside the block quote context, so we get an indented +code block starting with two spaces. + +```````````````````````````````` example +>→→foo +. +
+
  foo
+
+
+```````````````````````````````` + +```````````````````````````````` example +-→→foo +. +
    +
  • +
      foo
    +
    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example + foo +→bar +. +
foo
+bar
+
+```````````````````````````````` + +```````````````````````````````` example + - foo + - bar +→ - baz +. +
    +
  • foo +
      +
    • bar +
        +
      • baz
      • +
      +
    • +
    +
  • +
+```````````````````````````````` + +```````````````````````````````` example +#→Foo +. +

Foo

+```````````````````````````````` + +```````````````````````````````` example +*→*→*→ +. +
+```````````````````````````````` + + +## Insecure characters + +For security reasons, the Unicode character `U+0000` must be replaced +with the REPLACEMENT CHARACTER (`U+FFFD`). + +# Blocks and inlines + +We can think of a document as a sequence of +[blocks](@)---structural elements like paragraphs, block +quotations, lists, headings, rules, and code blocks. Some blocks (like +block quotes and list items) contain other blocks; others (like +headings and paragraphs) contain [inline](@) content---text, +links, emphasized text, images, code spans, and so on. + +## Precedence + +Indicators of block structure always take precedence over indicators +of inline structure. So, for example, the following is a list with +two items, not a list with one item containing a code span: + +```````````````````````````````` example +- `one +- two` +. +
    +
  • `one
  • +
  • two`
  • +
+```````````````````````````````` + + +This means that parsing can proceed in two steps: first, the block +structure of the document can be discerned; second, text lines inside +paragraphs, headings, and other block constructs can be parsed for inline +structure. The second step requires information about link reference +definitions that will be available only at the end of the first +step. Note that the first step requires processing lines in sequence, +but the second can be parallelized, since the inline parsing of +one block element does not affect the inline parsing of any other. + +## Container blocks and leaf blocks + +We can divide blocks into two types: +[container blocks](@), +which can contain other blocks, and [leaf blocks](@), +which cannot. + +# Leaf blocks + +This section describes the different kinds of leaf block that make up a +Markdown document. + +## Thematic breaks + +A line consisting of 0-3 spaces of indentation, followed by a sequence +of three or more matching `-`, `_`, or `*` characters, each followed +optionally by any number of spaces or tabs, forms a +[thematic break](@). + +```````````````````````````````` example +*** +--- +___ +. +
+
+
+```````````````````````````````` + + +Wrong characters: + +```````````````````````````````` example ++++ +. +

+++

+```````````````````````````````` + + +```````````````````````````````` example +=== +. +

===

+```````````````````````````````` + + +Not enough characters: + +```````````````````````````````` example +-- +** +__ +. +

-- +** +__

+```````````````````````````````` + + +One to three spaces indent are allowed: + +```````````````````````````````` example + *** + *** + *** +. +
+
+
+```````````````````````````````` + + +Four spaces is too many: + +```````````````````````````````` example + *** +. +
***
+
+```````````````````````````````` + + +```````````````````````````````` example +Foo + *** +. +

Foo +***

+```````````````````````````````` + + +More than three characters may be used: + +```````````````````````````````` example +_____________________________________ +. +
+```````````````````````````````` + + +Spaces are allowed between the characters: + +```````````````````````````````` example + - - - +. +
+```````````````````````````````` + + +```````````````````````````````` example + ** * ** * ** * ** +. +
+```````````````````````````````` + + +```````````````````````````````` example +- - - - +. +
+```````````````````````````````` + + +Spaces are allowed at the end: + +```````````````````````````````` example +- - - - +. +
+```````````````````````````````` + + +However, no other characters may occur in the line: + +```````````````````````````````` example +_ _ _ _ a + +a------ + +---a--- +. +

_ _ _ _ a

+

a------

+

---a---

+```````````````````````````````` + + +It is required that all of the [non-whitespace characters] be the same. +So, this is not a thematic break: + +```````````````````````````````` example + *-* +. +

-

+```````````````````````````````` + + +Thematic breaks do not need blank lines before or after: + +```````````````````````````````` example +- foo +*** +- bar +. +
    +
  • foo
  • +
+
+
    +
  • bar
  • +
+```````````````````````````````` + + +Thematic breaks can interrupt a paragraph: + +```````````````````````````````` example +Foo +*** +bar +. +

Foo

+
+

bar

+```````````````````````````````` + + +If a line of dashes that meets the above conditions for being a +thematic break could also be interpreted as the underline of a [setext +heading], the interpretation as a +[setext heading] takes precedence. Thus, for example, +this is a setext heading, not a paragraph followed by a thematic break: + +```````````````````````````````` example +Foo +--- +bar +. +

Foo

+

bar

+```````````````````````````````` + + +When both a thematic break and a list item are possible +interpretations of a line, the thematic break takes precedence: + +```````````````````````````````` example +* Foo +* * * +* Bar +. +
    +
  • Foo
  • +
+
+
    +
  • Bar
  • +
+```````````````````````````````` + + +If you want a thematic break in a list item, use a different bullet: + +```````````````````````````````` example +- Foo +- * * * +. +
    +
  • Foo
  • +
  • +
    +
  • +
+```````````````````````````````` + + +## ATX headings + +An [ATX heading](@) +consists of a string of characters, parsed as inline content, between an +opening sequence of 1--6 unescaped `#` characters and an optional +closing sequence of any number of unescaped `#` characters. +The opening sequence of `#` characters must be followed by a +[space] or by the end of line. The optional closing sequence of `#`s must be +preceded by a [space] and may be followed by spaces only. The opening +`#` character may be indented 0-3 spaces. The raw contents of the +heading are stripped of leading and trailing spaces before being parsed +as inline content. The heading level is equal to the number of `#` +characters in the opening sequence. + +Simple headings: + +```````````````````````````````` example +# foo +## foo +### foo +#### foo +##### foo +###### foo +. +

foo

+

foo

+

foo

+

foo

+
foo
+
foo
+```````````````````````````````` + + +More than six `#` characters is not a heading: + +```````````````````````````````` example +####### foo +. +

####### foo

+```````````````````````````````` + + +At least one space is required between the `#` characters and the +heading's contents, unless the heading is empty. Note that many +implementations currently do not require the space. However, the +space was required by the +[original ATX implementation](http://www.aaronsw.com/2002/atx/atx.py), +and it helps prevent things like the following from being parsed as +headings: + +```````````````````````````````` example +#5 bolt + +#hashtag +. +

#5 bolt

+

#hashtag

+```````````````````````````````` + + +This is not a heading, because the first `#` is escaped: + +```````````````````````````````` example +\## foo +. +

## foo

+```````````````````````````````` + + +Contents are parsed as inlines: + +```````````````````````````````` example +# foo *bar* \*baz\* +. +

foo bar *baz*

+```````````````````````````````` + + +Leading and trailing [whitespace] is ignored in parsing inline content: + +```````````````````````````````` example +# foo +. +

foo

+```````````````````````````````` + + +One to three spaces indentation are allowed: + +```````````````````````````````` example + ### foo + ## foo + # foo +. +

foo

+

foo

+

foo

+```````````````````````````````` + + +Four spaces are too much: + +```````````````````````````````` example + # foo +. +
# foo
+
+```````````````````````````````` + + +```````````````````````````````` example +foo + # bar +. +

foo +# bar

+```````````````````````````````` + + +A closing sequence of `#` characters is optional: + +```````````````````````````````` example +## foo ## + ### bar ### +. +

foo

+

bar

+```````````````````````````````` + + +It need not be the same length as the opening sequence: + +```````````````````````````````` example +# foo ################################## +##### foo ## +. +

foo

+
foo
+```````````````````````````````` + + +Spaces are allowed after the closing sequence: + +```````````````````````````````` example +### foo ### +. +

foo

+```````````````````````````````` + + +A sequence of `#` characters with anything but [spaces] following it +is not a closing sequence, but counts as part of the contents of the +heading: + +```````````````````````````````` example +### foo ### b +. +

foo ### b

+```````````````````````````````` + + +The closing sequence must be preceded by a space: + +```````````````````````````````` example +# foo# +. +

foo#

+```````````````````````````````` + + +Backslash-escaped `#` characters do not count as part +of the closing sequence: + +```````````````````````````````` example +### foo \### +## foo #\## +# foo \# +. +

foo ###

+

foo ###

+

foo #

+```````````````````````````````` + + +ATX headings need not be separated from surrounding content by blank +lines, and they can interrupt paragraphs: + +```````````````````````````````` example +**** +## foo +**** +. +
+

foo

+
+```````````````````````````````` + + +```````````````````````````````` example +Foo bar +# baz +Bar foo +. +

Foo bar

+

baz

+

Bar foo

+```````````````````````````````` + + +ATX headings can be empty: + +```````````````````````````````` example +## +# +### ### +. +

+

+

+```````````````````````````````` + + +## Setext headings + +A [setext heading](@) consists of one or more +lines of text, each containing at least one [non-whitespace +character], with no more than 3 spaces indentation, followed by +a [setext heading underline]. The lines of text must be such +that, were they not followed by the setext heading underline, +they would be interpreted as a paragraph: they cannot be +interpretable as a [code fence], [ATX heading][ATX headings], +[block quote][block quotes], [thematic break][thematic breaks], +[list item][list items], or [HTML block][HTML blocks]. + +A [setext heading underline](@) is a sequence of +`=` characters or a sequence of `-` characters, with no more than 3 +spaces indentation and any number of trailing spaces. If a line +containing a single `-` can be interpreted as an +empty [list items], it should be interpreted this way +and not as a [setext heading underline]. + +The heading is a level 1 heading if `=` characters are used in +the [setext heading underline], and a level 2 heading if `-` +characters are used. The contents of the heading are the result +of parsing the preceding lines of text as CommonMark inline +content. + +In general, a setext heading need not be preceded or followed by a +blank line. However, it cannot interrupt a paragraph, so when a +setext heading comes after a paragraph, a blank line is needed between +them. + +Simple examples: + +```````````````````````````````` example +Foo *bar* +========= + +Foo *bar* +--------- +. +

Foo bar

+

Foo bar

+```````````````````````````````` + + +The content of the header may span more than one line: + +```````````````````````````````` example +Foo *bar +baz* +==== +. +

Foo bar +baz

+```````````````````````````````` + +The contents are the result of parsing the headings's raw +content as inlines. The heading's raw content is formed by +concatenating the lines and removing initial and final +[whitespace]. + +```````````````````````````````` example + Foo *bar +baz*→ +==== +. +

Foo bar +baz

+```````````````````````````````` + + +The underlining can be any length: + +```````````````````````````````` example +Foo +------------------------- + +Foo += +. +

Foo

+

Foo

+```````````````````````````````` + + +The heading content can be indented up to three spaces, and need +not line up with the underlining: + +```````````````````````````````` example + Foo +--- + + Foo +----- + + Foo + === +. +

Foo

+

Foo

+

Foo

+```````````````````````````````` + + +Four spaces indent is too much: + +```````````````````````````````` example + Foo + --- + + Foo +--- +. +
Foo
+---
+
+Foo
+
+
+```````````````````````````````` + + +The setext heading underline can be indented up to three spaces, and +may have trailing spaces: + +```````````````````````````````` example +Foo + ---- +. +

Foo

+```````````````````````````````` + + +Four spaces is too much: + +```````````````````````````````` example +Foo + --- +. +

Foo +---

+```````````````````````````````` + + +The setext heading underline cannot contain internal spaces: + +```````````````````````````````` example +Foo += = + +Foo +--- - +. +

Foo += =

+

Foo

+
+```````````````````````````````` + + +Trailing spaces in the content line do not cause a line break: + +```````````````````````````````` example +Foo +----- +. +

Foo

+```````````````````````````````` + + +Nor does a backslash at the end: + +```````````````````````````````` example +Foo\ +---- +. +

Foo\

+```````````````````````````````` + + +Since indicators of block structure take precedence over +indicators of inline structure, the following are setext headings: + +```````````````````````````````` example +`Foo +---- +` + +
+. +

`Foo

+

`

+

<a title="a lot

+

of dashes"/>

+```````````````````````````````` + + +The setext heading underline cannot be a [lazy continuation +line] in a list item or block quote: + +```````````````````````````````` example +> Foo +--- +. +
+

Foo

+
+
+```````````````````````````````` + + +```````````````````````````````` example +> foo +bar +=== +. +
+

foo +bar +===

+
+```````````````````````````````` + + +```````````````````````````````` example +- Foo +--- +. +
    +
  • Foo
  • +
+
+```````````````````````````````` + + +A blank line is needed between a paragraph and a following +setext heading, since otherwise the paragraph becomes part +of the heading's content: + +```````````````````````````````` example +Foo +Bar +--- +. +

Foo +Bar

+```````````````````````````````` + + +But in general a blank line is not required before or after +setext headings: + +```````````````````````````````` example +--- +Foo +--- +Bar +--- +Baz +. +
+

Foo

+

Bar

+

Baz

+```````````````````````````````` + + +Setext headings cannot be empty: + +```````````````````````````````` example + +==== +. +

====

+```````````````````````````````` + + +Setext heading text lines must not be interpretable as block +constructs other than paragraphs. So, the line of dashes +in these examples gets interpreted as a thematic break: + +```````````````````````````````` example +--- +--- +. +
+
+```````````````````````````````` + + +```````````````````````````````` example +- foo +----- +. +
    +
  • foo
  • +
+
+```````````````````````````````` + + +```````````````````````````````` example + foo +--- +. +
foo
+
+
+```````````````````````````````` + + +```````````````````````````````` example +> foo +----- +. +
+

foo

+
+
+```````````````````````````````` + + +If you want a heading with `> foo` as its literal text, you can +use backslash escapes: + +```````````````````````````````` example +\> foo +------ +. +

> foo

+```````````````````````````````` + + +**Compatibility note:** Most existing Markdown implementations +do not allow the text of setext headings to span multiple lines. +But there is no consensus about how to interpret + +``` markdown +Foo +bar +--- +baz +``` + +One can find four different interpretations: + +1. paragraph "Foo", heading "bar", paragraph "baz" +2. paragraph "Foo bar", thematic break, paragraph "baz" +3. paragraph "Foo bar --- baz" +4. heading "Foo bar", paragraph "baz" + +We find interpretation 4 most natural, and interpretation 4 +increases the expressive power of CommonMark, by allowing +multiline headings. Authors who want interpretation 1 can +put a blank line after the first paragraph: + +```````````````````````````````` example +Foo + +bar +--- +baz +. +

Foo

+

bar

+

baz

+```````````````````````````````` + + +Authors who want interpretation 2 can put blank lines around +the thematic break, + +```````````````````````````````` example +Foo +bar + +--- + +baz +. +

Foo +bar

+
+

baz

+```````````````````````````````` + + +or use a thematic break that cannot count as a [setext heading +underline], such as + +```````````````````````````````` example +Foo +bar +* * * +baz +. +

Foo +bar

+
+

baz

+```````````````````````````````` + + +Authors who want interpretation 3 can use backslash escapes: + +```````````````````````````````` example +Foo +bar +\--- +baz +. +

Foo +bar +--- +baz

+```````````````````````````````` + + +## Indented code blocks + +An [indented code block](@) is composed of one or more +[indented chunks] separated by blank lines. +An [indented chunk](@) is a sequence of non-blank lines, +each indented four or more spaces. The contents of the code block are +the literal contents of the lines, including trailing +[line endings], minus four spaces of indentation. +An indented code block has no [info string]. + +An indented code block cannot interrupt a paragraph, so there must be +a blank line between a paragraph and a following indented code block. +(A blank line is not needed, however, between a code block and a following +paragraph.) + +```````````````````````````````` example + a simple + indented code block +. +
a simple
+  indented code block
+
+```````````````````````````````` + + +If there is any ambiguity between an interpretation of indentation +as a code block and as indicating that material belongs to a [list +item][list items], the list item interpretation takes precedence: + +```````````````````````````````` example + - foo + + bar +. +
    +
  • +

    foo

    +

    bar

    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example +1. foo + + - bar +. +
    +
  1. +

    foo

    +
      +
    • bar
    • +
    +
  2. +
+```````````````````````````````` + + + +The contents of a code block are literal text, and do not get parsed +as Markdown: + +```````````````````````````````` example +
+ *hi* + + - one +. +
<a/>
+*hi*
+
+- one
+
+```````````````````````````````` + + +Here we have three chunks separated by blank lines: + +```````````````````````````````` example + chunk1 + + chunk2 + + + + chunk3 +. +
chunk1
+
+chunk2
+
+
+
+chunk3
+
+```````````````````````````````` + + +Any initial spaces beyond four will be included in the content, even +in interior blank lines: + +```````````````````````````````` example + chunk1 + + chunk2 +. +
chunk1
+  
+  chunk2
+
+```````````````````````````````` + + +An indented code block cannot interrupt a paragraph. (This +allows hanging indents and the like.) + +```````````````````````````````` example +Foo + bar + +. +

Foo +bar

+```````````````````````````````` + + +However, any non-blank line with fewer than four leading spaces ends +the code block immediately. So a paragraph may occur immediately +after indented code: + +```````````````````````````````` example + foo +bar +. +
foo
+
+

bar

+```````````````````````````````` + + +And indented code can occur immediately before and after other kinds of +blocks: + +```````````````````````````````` example +# Heading + foo +Heading +------ + foo +---- +. +

Heading

+
foo
+
+

Heading

+
foo
+
+
+```````````````````````````````` + + +The first line can be indented more than four spaces: + +```````````````````````````````` example + foo + bar +. +
    foo
+bar
+
+```````````````````````````````` + + +Blank lines preceding or following an indented code block +are not included in it: + +```````````````````````````````` example + + + foo + + +. +
foo
+
+```````````````````````````````` + + +Trailing spaces are included in the code block's content: + +```````````````````````````````` example + foo +. +
foo  
+
+```````````````````````````````` + + + +## Fenced code blocks + +A [code fence](@) is a sequence +of at least three consecutive backtick characters (`` ` ``) or +tildes (`~`). (Tildes and backticks cannot be mixed.) +A [fenced code block](@) +begins with a code fence, indented no more than three spaces. + +The line with the opening code fence may optionally contain some text +following the code fence; this is trimmed of leading and trailing +whitespace and called the [info string](@). If the [info string] comes +after a backtick fence, it may not contain any backtick +characters. (The reason for this restriction is that otherwise +some inline code would be incorrectly interpreted as the +beginning of a fenced code block.) + +The content of the code block consists of all subsequent lines, until +a closing [code fence] of the same type as the code block +began with (backticks or tildes), and with at least as many backticks +or tildes as the opening code fence. If the leading code fence is +indented N spaces, then up to N spaces of indentation are removed from +each line of the content (if present). (If a content line is not +indented, it is preserved unchanged. If it is indented less than N +spaces, all of the indentation is removed.) + +The closing code fence may be indented up to three spaces, and may be +followed only by spaces, which are ignored. If the end of the +containing block (or document) is reached and no closing code fence +has been found, the code block contains all of the lines after the +opening code fence until the end of the containing block (or +document). (An alternative spec would require backtracking in the +event that a closing code fence is not found. But this makes parsing +much less efficient, and there seems to be no real down side to the +behavior described here.) + +A fenced code block may interrupt a paragraph, and does not require +a blank line either before or after. + +The content of a code fence is treated as literal text, not parsed +as inlines. The first word of the [info string] is typically used to +specify the language of the code sample, and rendered in the `class` +attribute of the `code` tag. However, this spec does not mandate any +particular treatment of the [info string]. + +Here is a simple example with backticks: + +```````````````````````````````` example +``` +< + > +``` +. +
<
+ >
+
+```````````````````````````````` + + +With tildes: + +```````````````````````````````` example +~~~ +< + > +~~~ +. +
<
+ >
+
+```````````````````````````````` + +Fewer than three backticks is not enough: + +```````````````````````````````` example +`` +foo +`` +. +

foo

+```````````````````````````````` + +The closing code fence must use the same character as the opening +fence: + +```````````````````````````````` example +``` +aaa +~~~ +``` +. +
aaa
+~~~
+
+```````````````````````````````` + + +```````````````````````````````` example +~~~ +aaa +``` +~~~ +. +
aaa
+```
+
+```````````````````````````````` + + +The closing code fence must be at least as long as the opening fence: + +```````````````````````````````` example +```` +aaa +``` +`````` +. +
aaa
+```
+
+```````````````````````````````` + + +```````````````````````````````` example +~~~~ +aaa +~~~ +~~~~ +. +
aaa
+~~~
+
+```````````````````````````````` + + +Unclosed code blocks are closed by the end of the document +(or the enclosing [block quote][block quotes] or [list item][list items]): + +```````````````````````````````` example +``` +. +
+```````````````````````````````` + + +```````````````````````````````` example +````` + +``` +aaa +. +

+```
+aaa
+
+```````````````````````````````` + + +```````````````````````````````` example +> ``` +> aaa + +bbb +. +
+
aaa
+
+
+

bbb

+```````````````````````````````` + + +A code block can have all empty lines as its content: + +```````````````````````````````` example +``` + + +``` +. +

+  
+
+```````````````````````````````` + + +A code block can be empty: + +```````````````````````````````` example +``` +``` +. +
+```````````````````````````````` + + +Fences can be indented. If the opening fence is indented, +content lines will have equivalent opening indentation removed, +if present: + +```````````````````````````````` example + ``` + aaa +aaa +``` +. +
aaa
+aaa
+
+```````````````````````````````` + + +```````````````````````````````` example + ``` +aaa + aaa +aaa + ``` +. +
aaa
+aaa
+aaa
+
+```````````````````````````````` + + +```````````````````````````````` example + ``` + aaa + aaa + aaa + ``` +. +
aaa
+ aaa
+aaa
+
+```````````````````````````````` + + +Four spaces indentation produces an indented code block: + +```````````````````````````````` example + ``` + aaa + ``` +. +
```
+aaa
+```
+
+```````````````````````````````` + + +Closing fences may be indented by 0-3 spaces, and their indentation +need not match that of the opening fence: + +```````````````````````````````` example +``` +aaa + ``` +. +
aaa
+
+```````````````````````````````` + + +```````````````````````````````` example + ``` +aaa + ``` +. +
aaa
+
+```````````````````````````````` + + +This is not a closing fence, because it is indented 4 spaces: + +```````````````````````````````` example +``` +aaa + ``` +. +
aaa
+    ```
+
+```````````````````````````````` + + + +Code fences (opening and closing) cannot contain internal spaces: + +```````````````````````````````` example +``` ``` +aaa +. +

+aaa

+```````````````````````````````` + + +```````````````````````````````` example +~~~~~~ +aaa +~~~ ~~ +. +
aaa
+~~~ ~~
+
+```````````````````````````````` + + +Fenced code blocks can interrupt paragraphs, and can be followed +directly by paragraphs, without a blank line between: + +```````````````````````````````` example +foo +``` +bar +``` +baz +. +

foo

+
bar
+
+

baz

+```````````````````````````````` + + +Other blocks can also occur before and after fenced code blocks +without an intervening blank line: + +```````````````````````````````` example +foo +--- +~~~ +bar +~~~ +# baz +. +

foo

+
bar
+
+

baz

+```````````````````````````````` + + +An [info string] can be provided after the opening code fence. +Although this spec doesn't mandate any particular treatment of +the info string, the first word is typically used to specify +the language of the code block. In HTML output, the language is +normally indicated by adding a class to the `code` element consisting +of `language-` followed by the language name. + +```````````````````````````````` example +```ruby +def foo(x) + return 3 +end +``` +. +
def foo(x)
+  return 3
+end
+
+```````````````````````````````` + + +```````````````````````````````` example +~~~~ ruby startline=3 $%@#$ +def foo(x) + return 3 +end +~~~~~~~ +. +
def foo(x)
+  return 3
+end
+
+```````````````````````````````` + + +```````````````````````````````` example +````; +```` +. +
+```````````````````````````````` + + +[Info strings] for backtick code blocks cannot contain backticks: + +```````````````````````````````` example +``` aa ``` +foo +. +

aa +foo

+```````````````````````````````` + + +[Info strings] for tilde code blocks can contain backticks and tildes: + +```````````````````````````````` example +~~~ aa ``` ~~~ +foo +~~~ +. +
foo
+
+```````````````````````````````` + + +Closing code fences cannot have [info strings]: + +```````````````````````````````` example +``` +``` aaa +``` +. +
``` aaa
+
+```````````````````````````````` + + + +## HTML blocks + +An [HTML block](@) is a group of lines that is treated +as raw HTML (and will not be escaped in HTML output). + +There are seven kinds of [HTML block], which can be defined by their +start and end conditions. The block begins with a line that meets a +[start condition](@) (after up to three spaces optional indentation). +It ends with the first subsequent line that meets a matching [end +condition](@), or the last line of the document, or the last line of +the [container block](#container-blocks) containing the current HTML +block, if no line is encountered that meets the [end condition]. If +the first line meets both the [start condition] and the [end +condition], the block will contain just that line. + +1. **Start condition:** line begins with the string ``, or the end of the line.\ +**End condition:** line contains an end tag +``, `
`, or `` (case-insensitive; it +need not match the start tag). + +2. **Start condition:** line begins with the string ``. + +3. **Start condition:** line begins with the string ``. + +4. **Start condition:** line begins with the string ``. + +5. **Start condition:** line begins with the string +``. + +6. **Start condition:** line begins the string `<` or ``, or +the string `/>`.\ +**End condition:** line is followed by a [blank line]. + +7. **Start condition:** line begins with a complete [open tag] +(with any [tag name] other than `script`, +`style`, or `pre`) or a complete [closing tag], +followed only by [whitespace] or the end of the line.\ +**End condition:** line is followed by a [blank line]. + +HTML blocks continue until they are closed by their appropriate +[end condition], or the last line of the document or other [container +block](#container-blocks). This means any HTML **within an HTML +block** that might otherwise be recognised as a start condition will +be ignored by the parser and passed through as-is, without changing +the parser's state. + +For instance, `
` within a HTML block started by `` will not affect
+the parser state; as the HTML block was started in by start condition 6, it
+will end at any blank line. This can be surprising:
+
+```````````````````````````````` example
+
+
+**Hello**,
+
+_world_.
+
+
+. +
+
+**Hello**,
+

world. +

+
+```````````````````````````````` + +In this case, the HTML block is terminated by the newline — the `**Hello**` +text remains verbatim — and regular parsing resumes, with a paragraph, +emphasised `world` and inline and block HTML following. + +All types of [HTML blocks] except type 7 may interrupt +a paragraph. Blocks of type 7 may not interrupt a paragraph. +(This restriction is intended to prevent unwanted interpretation +of long tags inside a wrapped paragraph as starting HTML blocks.) + +Some simple examples follow. Here are some basic HTML blocks +of type 6: + +```````````````````````````````` example + + + + +
+ hi +
+ +okay. +. + + + + +
+ hi +
+

okay.

+```````````````````````````````` + + +```````````````````````````````` example +
+*foo* +```````````````````````````````` + + +Here we have two HTML blocks with a Markdown paragraph between them: + +```````````````````````````````` example +
+ +*Markdown* + +
+. +
+

Markdown

+
+```````````````````````````````` + + +The tag on the first line can be partial, as long +as it is split where there would be whitespace: + +```````````````````````````````` example +
+
+. +
+
+```````````````````````````````` + + +```````````````````````````````` example +
+
+. +
+
+```````````````````````````````` + + +An open tag need not be closed: +```````````````````````````````` example +
+*foo* + +*bar* +. +
+*foo* +

bar

+```````````````````````````````` + + + +A partial tag need not even be completed (garbage +in, garbage out): + +```````````````````````````````` example +
+. + +```````````````````````````````` + + +```````````````````````````````` example +
+foo +
+. +
+foo +
+```````````````````````````````` + + +Everything until the next blank line or end of document +gets included in the HTML block. So, in the following +example, what looks like a Markdown code block +is actually part of the HTML block, which continues until a blank +line or the end of the document is reached: + +```````````````````````````````` example +
+``` c +int x = 33; +``` +. +
+``` c +int x = 33; +``` +```````````````````````````````` + + +To start an [HTML block] with a tag that is *not* in the +list of block-level tags in (6), you must put the tag by +itself on the first line (and it must be complete): + +```````````````````````````````` example + +*bar* + +. + +*bar* + +```````````````````````````````` + + +In type 7 blocks, the [tag name] can be anything: + +```````````````````````````````` example + +*bar* + +. + +*bar* + +```````````````````````````````` + + +```````````````````````````````` example + +*bar* + +. + +*bar* + +```````````````````````````````` + + +```````````````````````````````` example + +*bar* +. + +*bar* +```````````````````````````````` + + +These rules are designed to allow us to work with tags that +can function as either block-level or inline-level tags. +The `` tag is a nice example. We can surround content with +`` tags in three different ways. In this case, we get a raw +HTML block, because the `` tag is on a line by itself: + +```````````````````````````````` example + +*foo* + +. + +*foo* + +```````````````````````````````` + + +In this case, we get a raw HTML block that just includes +the `` tag (because it ends with the following blank +line). So the contents get interpreted as CommonMark: + +```````````````````````````````` example + + +*foo* + + +. + +

foo

+
+```````````````````````````````` + + +Finally, in this case, the `` tags are interpreted +as [raw HTML] *inside* the CommonMark paragraph. (Because +the tag is not on a line by itself, we get inline HTML +rather than an [HTML block].) + +```````````````````````````````` example +*foo* +. +

foo

+```````````````````````````````` + + +HTML tags designed to contain literal content +(`script`, `style`, `pre`), comments, processing instructions, +and declarations are treated somewhat differently. +Instead of ending at the first blank line, these blocks +end at the first line containing a corresponding end tag. +As a result, these blocks can contain blank lines: + +A pre tag (type 1): + +```````````````````````````````` example +

+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+
+okay +. +

+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+
+

okay

+```````````````````````````````` + + +A script tag (type 1): + +```````````````````````````````` example + +okay +. + +

okay

+```````````````````````````````` + + +A style tag (type 1): + +```````````````````````````````` example + +okay +. + +

okay

+```````````````````````````````` + + +If there is no matching end tag, the block will end at the +end of the document (or the enclosing [block quote][block quotes] +or [list item][list items]): + +```````````````````````````````` example + +*foo* +. + +

foo

+```````````````````````````````` + + +```````````````````````````````` example +*bar* +*baz* +. +*bar* +

baz

+```````````````````````````````` + + +Note that anything on the last line after the +end tag will be included in the [HTML block]: + +```````````````````````````````` example +1. *bar* +. +1. *bar* +```````````````````````````````` + + +A comment (type 2): + +```````````````````````````````` example + +okay +. + +

okay

+```````````````````````````````` + + + +A processing instruction (type 3): + +```````````````````````````````` example +'; + +?> +okay +. +'; + +?> +

okay

+```````````````````````````````` + + +A declaration (type 4): + +```````````````````````````````` example + +. + +```````````````````````````````` + + +CDATA (type 5): + +```````````````````````````````` example + +okay +. + +

okay

+```````````````````````````````` + + +The opening tag can be indented 1-3 spaces, but not 4: + +```````````````````````````````` example + + + +. + +
<!-- foo -->
+
+```````````````````````````````` + + +```````````````````````````````` example +
+ +
+. +
+
<div>
+
+```````````````````````````````` + + +An HTML block of types 1--6 can interrupt a paragraph, and need not be +preceded by a blank line. + +```````````````````````````````` example +Foo +
+bar +
+. +

Foo

+
+bar +
+```````````````````````````````` + + +However, a following blank line is needed, except at the end of +a document, and except for blocks of types 1--5, [above][HTML +block]: + +```````````````````````````````` example +
+bar +
+*foo* +. +
+bar +
+*foo* +```````````````````````````````` + + +HTML blocks of type 7 cannot interrupt a paragraph: + +```````````````````````````````` example +Foo + +baz +. +

Foo + +baz

+```````````````````````````````` + + +This rule differs from John Gruber's original Markdown syntax +specification, which says: + +> The only restrictions are that block-level HTML elements — +> e.g. `
`, ``, `
`, `

`, etc. — must be separated from +> surrounding content by blank lines, and the start and end tags of the +> block should not be indented with tabs or spaces. + +In some ways Gruber's rule is more restrictive than the one given +here: + +- It requires that an HTML block be preceded by a blank line. +- It does not allow the start tag to be indented. +- It requires a matching end tag, which it also does not allow to + be indented. + +Most Markdown implementations (including some of Gruber's own) do not +respect all of these restrictions. + +There is one respect, however, in which Gruber's rule is more liberal +than the one given here, since it allows blank lines to occur inside +an HTML block. There are two reasons for disallowing them here. +First, it removes the need to parse balanced tags, which is +expensive and can require backtracking from the end of the document +if no matching end tag is found. Second, it provides a very simple +and flexible way of including Markdown content inside HTML tags: +simply separate the Markdown from the HTML using blank lines: + +Compare: + +```````````````````````````````` example +

+ +*Emphasized* text. + +
+. +
+

Emphasized text.

+
+```````````````````````````````` + + +```````````````````````````````` example +
+*Emphasized* text. +
+. +
+*Emphasized* text. +
+```````````````````````````````` + + +Some Markdown implementations have adopted a convention of +interpreting content inside tags as text if the open tag has +the attribute `markdown=1`. The rule given above seems a simpler and +more elegant way of achieving the same expressive power, which is also +much simpler to parse. + +The main potential drawback is that one can no longer paste HTML +blocks into Markdown documents with 100% reliability. However, +*in most cases* this will work fine, because the blank lines in +HTML are usually followed by HTML block tags. For example: + +```````````````````````````````` example +
+ + + + + + + +
+Hi +
+. + + + + +
+Hi +
+```````````````````````````````` + + +There are problems, however, if the inner tags are indented +*and* separated by spaces, as then they will be interpreted as +an indented code block: + +```````````````````````````````` example + + + + + + + + +
+ Hi +
+. + + +
<td>
+  Hi
+</td>
+
+ +
+```````````````````````````````` + + +Fortunately, blank lines are usually not necessary and can be +deleted. The exception is inside `
` tags, but as described
+[above][HTML blocks], raw HTML blocks starting with `
`
+*can* contain blank lines.
+
+## Link reference definitions
+
+A [link reference definition](@)
+consists of a [link label], indented up to three spaces, followed
+by a colon (`:`), optional [whitespace] (including up to one
+[line ending]), a [link destination],
+optional [whitespace] (including up to one
+[line ending]), and an optional [link
+title], which if it is present must be separated
+from the [link destination] by [whitespace].
+No further [non-whitespace characters] may occur on the line.
+
+A [link reference definition]
+does not correspond to a structural element of a document.  Instead, it
+defines a label which can be used in [reference links]
+and reference-style [images] elsewhere in the document.  [Link
+reference definitions] can come either before or after the links that use
+them.
+
+```````````````````````````````` example
+[foo]: /url "title"
+
+[foo]
+.
+

foo

+```````````````````````````````` + + +```````````````````````````````` example + [foo]: + /url + 'the title' + +[foo] +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +[Foo*bar\]]:my_(url) 'title (with parens)' + +[Foo*bar\]] +. +

Foo*bar]

+```````````````````````````````` + + +```````````````````````````````` example +[Foo bar]: + +'title' + +[Foo bar] +. +

Foo bar

+```````````````````````````````` + + +The title may extend over multiple lines: + +```````````````````````````````` example +[foo]: /url ' +title +line1 +line2 +' + +[foo] +. +

foo

+```````````````````````````````` + + +However, it may not contain a [blank line]: + +```````````````````````````````` example +[foo]: /url 'title + +with blank line' + +[foo] +. +

[foo]: /url 'title

+

with blank line'

+

[foo]

+```````````````````````````````` + + +The title may be omitted: + +```````````````````````````````` example +[foo]: +/url + +[foo] +. +

foo

+```````````````````````````````` + + +The link destination may not be omitted: + +```````````````````````````````` example +[foo]: + +[foo] +. +

[foo]:

+

[foo]

+```````````````````````````````` + + However, an empty link destination may be specified using + angle brackets: + +```````````````````````````````` example +[foo]: <> + +[foo] +. +

foo

+```````````````````````````````` + +The title must be separated from the link destination by +whitespace: + +```````````````````````````````` example +[foo]: (baz) + +[foo] +. +

[foo]: (baz)

+

[foo]

+```````````````````````````````` + + +Both title and destination can contain backslash escapes +and literal backslashes: + +```````````````````````````````` example +[foo]: /url\bar\*baz "foo\"bar\baz" + +[foo] +. +

foo

+```````````````````````````````` + + +A link can come before its corresponding definition: + +```````````````````````````````` example +[foo] + +[foo]: url +. +

foo

+```````````````````````````````` + + +If there are several matching definitions, the first one takes +precedence: + +```````````````````````````````` example +[foo] + +[foo]: first +[foo]: second +. +

foo

+```````````````````````````````` + + +As noted in the section on [Links], matching of labels is +case-insensitive (see [matches]). + +```````````````````````````````` example +[FOO]: /url + +[Foo] +. +

Foo

+```````````````````````````````` + + +```````````````````````````````` example +[ΑΓΩ]: /φου + +[αγω] +. +

αγω

+```````````````````````````````` + + +Here is a link reference definition with no corresponding link. +It contributes nothing to the document. + +```````````````````````````````` example +[foo]: /url +. +```````````````````````````````` + + +Here is another one: + +```````````````````````````````` example +[ +foo +]: /url +bar +. +

bar

+```````````````````````````````` + + +This is not a link reference definition, because there are +[non-whitespace characters] after the title: + +```````````````````````````````` example +[foo]: /url "title" ok +. +

[foo]: /url "title" ok

+```````````````````````````````` + + +This is a link reference definition, but it has no title: + +```````````````````````````````` example +[foo]: /url +"title" ok +. +

"title" ok

+```````````````````````````````` + + +This is not a link reference definition, because it is indented +four spaces: + +```````````````````````````````` example + [foo]: /url "title" + +[foo] +. +
[foo]: /url "title"
+
+

[foo]

+```````````````````````````````` + + +This is not a link reference definition, because it occurs inside +a code block: + +```````````````````````````````` example +``` +[foo]: /url +``` + +[foo] +. +
[foo]: /url
+
+

[foo]

+```````````````````````````````` + + +A [link reference definition] cannot interrupt a paragraph. + +```````````````````````````````` example +Foo +[bar]: /baz + +[bar] +. +

Foo +[bar]: /baz

+

[bar]

+```````````````````````````````` + + +However, it can directly follow other block elements, such as headings +and thematic breaks, and it need not be followed by a blank line. + +```````````````````````````````` example +# [Foo] +[foo]: /url +> bar +. +

Foo

+
+

bar

+
+```````````````````````````````` + +```````````````````````````````` example +[foo]: /url +bar +=== +[foo] +. +

bar

+

foo

+```````````````````````````````` + +```````````````````````````````` example +[foo]: /url +=== +[foo] +. +

=== +foo

+```````````````````````````````` + + +Several [link reference definitions] +can occur one after another, without intervening blank lines. + +```````````````````````````````` example +[foo]: /foo-url "foo" +[bar]: /bar-url + "bar" +[baz]: /baz-url + +[foo], +[bar], +[baz] +. +

foo, +bar, +baz

+```````````````````````````````` + + +[Link reference definitions] can occur +inside block containers, like lists and block quotations. They +affect the entire document, not just the container in which they +are defined: + +```````````````````````````````` example +[foo] + +> [foo]: /url +. +

foo

+
+
+```````````````````````````````` + + +Whether something is a [link reference definition] is +independent of whether the link reference it defines is +used in the document. Thus, for example, the following +document contains just a link reference definition, and +no visible content: + +```````````````````````````````` example +[foo]: /url +. +```````````````````````````````` + + +## Paragraphs + +A sequence of non-blank lines that cannot be interpreted as other +kinds of blocks forms a [paragraph](@). +The contents of the paragraph are the result of parsing the +paragraph's raw content as inlines. The paragraph's raw content +is formed by concatenating the lines and removing initial and final +[whitespace]. + +A simple example with two paragraphs: + +```````````````````````````````` example +aaa + +bbb +. +

aaa

+

bbb

+```````````````````````````````` + + +Paragraphs can contain multiple lines, but no blank lines: + +```````````````````````````````` example +aaa +bbb + +ccc +ddd +. +

aaa +bbb

+

ccc +ddd

+```````````````````````````````` + + +Multiple blank lines between paragraph have no effect: + +```````````````````````````````` example +aaa + + +bbb +. +

aaa

+

bbb

+```````````````````````````````` + + +Leading spaces are skipped: + +```````````````````````````````` example + aaa + bbb +. +

aaa +bbb

+```````````````````````````````` + + +Lines after the first may be indented any amount, since indented +code blocks cannot interrupt paragraphs. + +```````````````````````````````` example +aaa + bbb + ccc +. +

aaa +bbb +ccc

+```````````````````````````````` + + +However, the first line may be indented at most three spaces, +or an indented code block will be triggered: + +```````````````````````````````` example + aaa +bbb +. +

aaa +bbb

+```````````````````````````````` + + +```````````````````````````````` example + aaa +bbb +. +
aaa
+
+

bbb

+```````````````````````````````` + + +Final spaces are stripped before inline parsing, so a paragraph +that ends with two or more spaces will not end with a [hard line +break]: + +```````````````````````````````` example +aaa +bbb +. +

aaa
+bbb

+```````````````````````````````` + + +## Blank lines + +[Blank lines] between block-level elements are ignored, +except for the role they play in determining whether a [list] +is [tight] or [loose]. + +Blank lines at the beginning and end of the document are also ignored. + +```````````````````````````````` example + + +aaa + + +# aaa + + +. +

aaa

+

aaa

+```````````````````````````````` + + + +# Container blocks + +A [container block](#container-blocks) is a block that has other +blocks as its contents. There are two basic kinds of container blocks: +[block quotes] and [list items]. +[Lists] are meta-containers for [list items]. + +We define the syntax for container blocks recursively. The general +form of the definition is: + +> If X is a sequence of blocks, then the result of +> transforming X in such-and-such a way is a container of type Y +> with these blocks as its content. + +So, we explain what counts as a block quote or list item by explaining +how these can be *generated* from their contents. This should suffice +to define the syntax, although it does not give a recipe for *parsing* +these constructions. (A recipe is provided below in the section entitled +[A parsing strategy](#appendix-a-parsing-strategy).) + +## Block quotes + +A [block quote marker](@) +consists of 0-3 spaces of initial indent, plus (a) the character `>` together +with a following space, or (b) a single character `>` not followed by a space. + +The following rules define [block quotes]: + +1. **Basic case.** If a string of lines *Ls* constitute a sequence + of blocks *Bs*, then the result of prepending a [block quote + marker] to the beginning of each line in *Ls* + is a [block quote](#block-quotes) containing *Bs*. + +2. **Laziness.** If a string of lines *Ls* constitute a [block + quote](#block-quotes) with contents *Bs*, then the result of deleting + the initial [block quote marker] from one or + more lines in which the next [non-whitespace character] after the [block + quote marker] is [paragraph continuation + text] is a block quote with *Bs* as its content. + [Paragraph continuation text](@) is text + that will be parsed as part of the content of a paragraph, but does + not occur at the beginning of the paragraph. + +3. **Consecutiveness.** A document cannot contain two [block + quotes] in a row unless there is a [blank line] between them. + +Nothing else counts as a [block quote](#block-quotes). + +Here is a simple example: + +```````````````````````````````` example +> # Foo +> bar +> baz +. +
+

Foo

+

bar +baz

+
+```````````````````````````````` + + +The spaces after the `>` characters can be omitted: + +```````````````````````````````` example +># Foo +>bar +> baz +. +
+

Foo

+

bar +baz

+
+```````````````````````````````` + + +The `>` characters can be indented 1-3 spaces: + +```````````````````````````````` example + > # Foo + > bar + > baz +. +
+

Foo

+

bar +baz

+
+```````````````````````````````` + + +Four spaces gives us a code block: + +```````````````````````````````` example + > # Foo + > bar + > baz +. +
> # Foo
+> bar
+> baz
+
+```````````````````````````````` + + +The Laziness clause allows us to omit the `>` before +[paragraph continuation text]: + +```````````````````````````````` example +> # Foo +> bar +baz +. +
+

Foo

+

bar +baz

+
+```````````````````````````````` + + +A block quote can contain some lazy and some non-lazy +continuation lines: + +```````````````````````````````` example +> bar +baz +> foo +. +
+

bar +baz +foo

+
+```````````````````````````````` + + +Laziness only applies to lines that would have been continuations of +paragraphs had they been prepended with [block quote markers]. +For example, the `> ` cannot be omitted in the second line of + +``` markdown +> foo +> --- +``` + +without changing the meaning: + +```````````````````````````````` example +> foo +--- +. +
+

foo

+
+
+```````````````````````````````` + + +Similarly, if we omit the `> ` in the second line of + +``` markdown +> - foo +> - bar +``` + +then the block quote ends after the first line: + +```````````````````````````````` example +> - foo +- bar +. +
+
    +
  • foo
  • +
+
+
    +
  • bar
  • +
+```````````````````````````````` + + +For the same reason, we can't omit the `> ` in front of +subsequent lines of an indented or fenced code block: + +```````````````````````````````` example +> foo + bar +. +
+
foo
+
+
+
bar
+
+```````````````````````````````` + + +```````````````````````````````` example +> ``` +foo +``` +. +
+
+
+

foo

+
+```````````````````````````````` + + +Note that in the following case, we have a [lazy +continuation line]: + +```````````````````````````````` example +> foo + - bar +. +
+

foo +- bar

+
+```````````````````````````````` + + +To see why, note that in + +```markdown +> foo +> - bar +``` + +the `- bar` is indented too far to start a list, and can't +be an indented code block because indented code blocks cannot +interrupt paragraphs, so it is [paragraph continuation text]. + +A block quote can be empty: + +```````````````````````````````` example +> +. +
+
+```````````````````````````````` + + +```````````````````````````````` example +> +> +> +. +
+
+```````````````````````````````` + + +A block quote can have initial or final blank lines: + +```````````````````````````````` example +> +> foo +> +. +
+

foo

+
+```````````````````````````````` + + +A blank line always separates block quotes: + +```````````````````````````````` example +> foo + +> bar +. +
+

foo

+
+
+

bar

+
+```````````````````````````````` + + +(Most current Markdown implementations, including John Gruber's +original `Markdown.pl`, will parse this example as a single block quote +with two paragraphs. But it seems better to allow the author to decide +whether two block quotes or one are wanted.) + +Consecutiveness means that if we put these block quotes together, +we get a single block quote: + +```````````````````````````````` example +> foo +> bar +. +
+

foo +bar

+
+```````````````````````````````` + + +To get a block quote with two paragraphs, use: + +```````````````````````````````` example +> foo +> +> bar +. +
+

foo

+

bar

+
+```````````````````````````````` + + +Block quotes can interrupt paragraphs: + +```````````````````````````````` example +foo +> bar +. +

foo

+
+

bar

+
+```````````````````````````````` + + +In general, blank lines are not needed before or after block +quotes: + +```````````````````````````````` example +> aaa +*** +> bbb +. +
+

aaa

+
+
+
+

bbb

+
+```````````````````````````````` + + +However, because of laziness, a blank line is needed between +a block quote and a following paragraph: + +```````````````````````````````` example +> bar +baz +. +
+

bar +baz

+
+```````````````````````````````` + + +```````````````````````````````` example +> bar + +baz +. +
+

bar

+
+

baz

+```````````````````````````````` + + +```````````````````````````````` example +> bar +> +baz +. +
+

bar

+
+

baz

+```````````````````````````````` + + +It is a consequence of the Laziness rule that any number +of initial `>`s may be omitted on a continuation line of a +nested block quote: + +```````````````````````````````` example +> > > foo +bar +. +
+
+
+

foo +bar

+
+
+
+```````````````````````````````` + + +```````````````````````````````` example +>>> foo +> bar +>>baz +. +
+
+
+

foo +bar +baz

+
+
+
+```````````````````````````````` + + +When including an indented code block in a block quote, +remember that the [block quote marker] includes +both the `>` and a following space. So *five spaces* are needed after +the `>`: + +```````````````````````````````` example +> code + +> not code +. +
+
code
+
+
+
+

not code

+
+```````````````````````````````` + + + +## List items + +A [list marker](@) is a +[bullet list marker] or an [ordered list marker]. + +A [bullet list marker](@) +is a `-`, `+`, or `*` character. + +An [ordered list marker](@) +is a sequence of 1--9 arabic digits (`0-9`), followed by either a +`.` character or a `)` character. (The reason for the length +limit is that with 10 digits we start seeing integer overflows +in some browsers.) + +The following rules define [list items]: + +1. **Basic case.** If a sequence of lines *Ls* constitute a sequence of + blocks *Bs* starting with a [non-whitespace character], and *M* is a + list marker of width *W* followed by 1 ≤ *N* ≤ 4 spaces, then the result + of prepending *M* and the following spaces to the first line of + *Ls*, and indenting subsequent lines of *Ls* by *W + N* spaces, is a + list item with *Bs* as its contents. The type of the list item + (bullet or ordered) is determined by the type of its list marker. + If the list item is ordered, then it is also assigned a start + number, based on the ordered list marker. + + Exceptions: + + 1. When the first list item in a [list] interrupts + a paragraph---that is, when it starts on a line that would + otherwise count as [paragraph continuation text]---then (a) + the lines *Ls* must not begin with a blank line, and (b) if + the list item is ordered, the start number must be 1. + 2. If any line is a [thematic break][thematic breaks] then + that line is not a list item. + +For example, let *Ls* be the lines + +```````````````````````````````` example +A paragraph +with two lines. + + indented code + +> A block quote. +. +

A paragraph +with two lines.

+
indented code
+
+
+

A block quote.

+
+```````````````````````````````` + + +And let *M* be the marker `1.`, and *N* = 2. Then rule #1 says +that the following is an ordered list item with start number 1, +and the same contents as *Ls*: + +```````````````````````````````` example +1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+```````````````````````````````` + + +The most important thing to notice is that the position of +the text after the list marker determines how much indentation +is needed in subsequent blocks in the list item. If the list +marker takes up two spaces, and there are three spaces between +the list marker and the next [non-whitespace character], then blocks +must be indented five spaces in order to fall under the list +item. + +Here are some examples showing how far content must be indented to be +put under the list item: + +```````````````````````````````` example +- one + + two +. +
    +
  • one
  • +
+

two

+```````````````````````````````` + + +```````````````````````````````` example +- one + + two +. +
    +
  • +

    one

    +

    two

    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example + - one + + two +. +
    +
  • one
  • +
+
 two
+
+```````````````````````````````` + + +```````````````````````````````` example + - one + + two +. +
    +
  • +

    one

    +

    two

    +
  • +
+```````````````````````````````` + + +It is tempting to think of this in terms of columns: the continuation +blocks must be indented at least to the column of the first +[non-whitespace character] after the list marker. However, that is not quite right. +The spaces after the list marker determine how much relative indentation +is needed. Which column this indentation reaches will depend on +how the list item is embedded in other constructions, as shown by +this example: + +```````````````````````````````` example + > > 1. one +>> +>> two +. +
+
+
    +
  1. +

    one

    +

    two

    +
  2. +
+
+
+```````````````````````````````` + + +Here `two` occurs in the same column as the list marker `1.`, +but is actually contained in the list item, because there is +sufficient indentation after the last containing blockquote marker. + +The converse is also possible. In the following example, the word `two` +occurs far to the right of the initial text of the list item, `one`, but +it is not considered part of the list item, because it is not indented +far enough past the blockquote marker: + +```````````````````````````````` example +>>- one +>> + > > two +. +
+
+
    +
  • one
  • +
+

two

+
+
+```````````````````````````````` + + +Note that at least one space is needed between the list marker and +any following content, so these are not list items: + +```````````````````````````````` example +-one + +2.two +. +

-one

+

2.two

+```````````````````````````````` + + +A list item may contain blocks that are separated by more than +one blank line. + +```````````````````````````````` example +- foo + + + bar +. +
    +
  • +

    foo

    +

    bar

    +
  • +
+```````````````````````````````` + + +A list item may contain any kind of block: + +```````````````````````````````` example +1. foo + + ``` + bar + ``` + + baz + + > bam +. +
    +
  1. +

    foo

    +
    bar
    +
    +

    baz

    +
    +

    bam

    +
    +
  2. +
+```````````````````````````````` + + +A list item that contains an indented code block will preserve +empty lines within the code block verbatim. + +```````````````````````````````` example +- Foo + + bar + + + baz +. +
    +
  • +

    Foo

    +
    bar
    +
    +
    +baz
    +
    +
  • +
+```````````````````````````````` + +Note that ordered list start numbers must be nine digits or less: + +```````````````````````````````` example +123456789. ok +. +
    +
  1. ok
  2. +
+```````````````````````````````` + + +```````````````````````````````` example +1234567890. not ok +. +

1234567890. not ok

+```````````````````````````````` + + +A start number may begin with 0s: + +```````````````````````````````` example +0. ok +. +
    +
  1. ok
  2. +
+```````````````````````````````` + + +```````````````````````````````` example +003. ok +. +
    +
  1. ok
  2. +
+```````````````````````````````` + + +A start number may not be negative: + +```````````````````````````````` example +-1. not ok +. +

-1. not ok

+```````````````````````````````` + + + +2. **Item starting with indented code.** If a sequence of lines *Ls* + constitute a sequence of blocks *Bs* starting with an indented code + block, and *M* is a list marker of width *W* followed by + one space, then the result of prepending *M* and the following + space to the first line of *Ls*, and indenting subsequent lines of + *Ls* by *W + 1* spaces, is a list item with *Bs* as its contents. + If a line is empty, then it need not be indented. The type of the + list item (bullet or ordered) is determined by the type of its list + marker. If the list item is ordered, then it is also assigned a + start number, based on the ordered list marker. + +An indented code block will have to be indented four spaces beyond +the edge of the region where text will be included in the list item. +In the following case that is 6 spaces: + +```````````````````````````````` example +- foo + + bar +. +
    +
  • +

    foo

    +
    bar
    +
    +
  • +
+```````````````````````````````` + + +And in this case it is 11 spaces: + +```````````````````````````````` example + 10. foo + + bar +. +
    +
  1. +

    foo

    +
    bar
    +
    +
  2. +
+```````````````````````````````` + + +If the *first* block in the list item is an indented code block, +then by rule #2, the contents must be indented *one* space after the +list marker: + +```````````````````````````````` example + indented code + +paragraph + + more code +. +
indented code
+
+

paragraph

+
more code
+
+```````````````````````````````` + + +```````````````````````````````` example +1. indented code + + paragraph + + more code +. +
    +
  1. +
    indented code
    +
    +

    paragraph

    +
    more code
    +
    +
  2. +
+```````````````````````````````` + + +Note that an additional space indent is interpreted as space +inside the code block: + +```````````````````````````````` example +1. indented code + + paragraph + + more code +. +
    +
  1. +
     indented code
    +
    +

    paragraph

    +
    more code
    +
    +
  2. +
+```````````````````````````````` + + +Note that rules #1 and #2 only apply to two cases: (a) cases +in which the lines to be included in a list item begin with a +[non-whitespace character], and (b) cases in which +they begin with an indented code +block. In a case like the following, where the first block begins with +a three-space indent, the rules do not allow us to form a list item by +indenting the whole thing and prepending a list marker: + +```````````````````````````````` example + foo + +bar +. +

foo

+

bar

+```````````````````````````````` + + +```````````````````````````````` example +- foo + + bar +. +
    +
  • foo
  • +
+

bar

+```````````````````````````````` + + +This is not a significant restriction, because when a block begins +with 1-3 spaces indent, the indentation can always be removed without +a change in interpretation, allowing rule #1 to be applied. So, in +the above case: + +```````````````````````````````` example +- foo + + bar +. +
    +
  • +

    foo

    +

    bar

    +
  • +
+```````````````````````````````` + + +3. **Item starting with a blank line.** If a sequence of lines *Ls* + starting with a single [blank line] constitute a (possibly empty) + sequence of blocks *Bs*, not separated from each other by more than + one blank line, and *M* is a list marker of width *W*, + then the result of prepending *M* to the first line of *Ls*, and + indenting subsequent lines of *Ls* by *W + 1* spaces, is a list + item with *Bs* as its contents. + If a line is empty, then it need not be indented. The type of the + list item (bullet or ordered) is determined by the type of its list + marker. If the list item is ordered, then it is also assigned a + start number, based on the ordered list marker. + +Here are some list items that start with a blank line but are not empty: + +```````````````````````````````` example +- + foo +- + ``` + bar + ``` +- + baz +. +
    +
  • foo
  • +
  • +
    bar
    +
    +
  • +
  • +
    baz
    +
    +
  • +
+```````````````````````````````` + +When the list item starts with a blank line, the number of spaces +following the list marker doesn't change the required indentation: + +```````````````````````````````` example +- + foo +. +
    +
  • foo
  • +
+```````````````````````````````` + + +A list item can begin with at most one blank line. +In the following example, `foo` is not part of the list +item: + +```````````````````````````````` example +- + + foo +. +
    +
  • +
+

foo

+```````````````````````````````` + + +Here is an empty bullet list item: + +```````````````````````````````` example +- foo +- +- bar +. +
    +
  • foo
  • +
  • +
  • bar
  • +
+```````````````````````````````` + + +It does not matter whether there are spaces following the [list marker]: + +```````````````````````````````` example +- foo +- +- bar +. +
    +
  • foo
  • +
  • +
  • bar
  • +
+```````````````````````````````` + + +Here is an empty ordered list item: + +```````````````````````````````` example +1. foo +2. +3. bar +. +
    +
  1. foo
  2. +
  3. +
  4. bar
  5. +
+```````````````````````````````` + + +A list may start or end with an empty list item: + +```````````````````````````````` example +* +. +
    +
  • +
+```````````````````````````````` + +However, an empty list item cannot interrupt a paragraph: + +```````````````````````````````` example +foo +* + +foo +1. +. +

foo +*

+

foo +1.

+```````````````````````````````` + + +4. **Indentation.** If a sequence of lines *Ls* constitutes a list item + according to rule #1, #2, or #3, then the result of indenting each line + of *Ls* by 1-3 spaces (the same for each line) also constitutes a + list item with the same contents and attributes. If a line is + empty, then it need not be indented. + +Indented one space: + +```````````````````````````````` example + 1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+```````````````````````````````` + + +Indented two spaces: + +```````````````````````````````` example + 1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+```````````````````````````````` + + +Indented three spaces: + +```````````````````````````````` example + 1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+```````````````````````````````` + + +Four spaces indent gives a code block: + +```````````````````````````````` example + 1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
1.  A paragraph
+    with two lines.
+
+        indented code
+
+    > A block quote.
+
+```````````````````````````````` + + + +5. **Laziness.** If a string of lines *Ls* constitute a [list + item](#list-items) with contents *Bs*, then the result of deleting + some or all of the indentation from one or more lines in which the + next [non-whitespace character] after the indentation is + [paragraph continuation text] is a + list item with the same contents and attributes. The unindented + lines are called + [lazy continuation line](@)s. + +Here is an example with [lazy continuation lines]: + +```````````````````````````````` example + 1. A paragraph +with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+```````````````````````````````` + + +Indentation can be partially deleted: + +```````````````````````````````` example + 1. A paragraph + with two lines. +. +
    +
  1. A paragraph +with two lines.
  2. +
+```````````````````````````````` + + +These examples show how laziness can work in nested structures: + +```````````````````````````````` example +> 1. > Blockquote +continued here. +. +
+
    +
  1. +
    +

    Blockquote +continued here.

    +
    +
  2. +
+
+```````````````````````````````` + + +```````````````````````````````` example +> 1. > Blockquote +> continued here. +. +
+
    +
  1. +
    +

    Blockquote +continued here.

    +
    +
  2. +
+
+```````````````````````````````` + + + +6. **That's all.** Nothing that is not counted as a list item by rules + #1--5 counts as a [list item](#list-items). + +The rules for sublists follow from the general rules +[above][List items]. A sublist must be indented the same number +of spaces a paragraph would need to be in order to be included +in the list item. + +So, in this case we need two spaces indent: + +```````````````````````````````` example +- foo + - bar + - baz + - boo +. +
    +
  • foo +
      +
    • bar +
        +
      • baz +
          +
        • boo
        • +
        +
      • +
      +
    • +
    +
  • +
+```````````````````````````````` + + +One is not enough: + +```````````````````````````````` example +- foo + - bar + - baz + - boo +. +
    +
  • foo
  • +
  • bar
  • +
  • baz
  • +
  • boo
  • +
+```````````````````````````````` + + +Here we need four, because the list marker is wider: + +```````````````````````````````` example +10) foo + - bar +. +
    +
  1. foo +
      +
    • bar
    • +
    +
  2. +
+```````````````````````````````` + + +Three is not enough: + +```````````````````````````````` example +10) foo + - bar +. +
    +
  1. foo
  2. +
+
    +
  • bar
  • +
+```````````````````````````````` + + +A list may be the first block in a list item: + +```````````````````````````````` example +- - foo +. +
    +
  • +
      +
    • foo
    • +
    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example +1. - 2. foo +. +
    +
  1. +
      +
    • +
        +
      1. foo
      2. +
      +
    • +
    +
  2. +
+```````````````````````````````` + + +A list item can contain a heading: + +```````````````````````````````` example +- # Foo +- Bar + --- + baz +. +
    +
  • +

    Foo

    +
  • +
  • +

    Bar

    +baz
  • +
+```````````````````````````````` + + +### Motivation + +John Gruber's Markdown spec says the following about list items: + +1. "List markers typically start at the left margin, but may be indented + by up to three spaces. List markers must be followed by one or more + spaces or a tab." + +2. "To make lists look nice, you can wrap items with hanging indents.... + But if you don't want to, you don't have to." + +3. "List items may consist of multiple paragraphs. Each subsequent + paragraph in a list item must be indented by either 4 spaces or one + tab." + +4. "It looks nice if you indent every line of the subsequent paragraphs, + but here again, Markdown will allow you to be lazy." + +5. "To put a blockquote within a list item, the blockquote's `>` + delimiters need to be indented." + +6. "To put a code block within a list item, the code block needs to be + indented twice — 8 spaces or two tabs." + +These rules specify that a paragraph under a list item must be indented +four spaces (presumably, from the left margin, rather than the start of +the list marker, but this is not said), and that code under a list item +must be indented eight spaces instead of the usual four. They also say +that a block quote must be indented, but not by how much; however, the +example given has four spaces indentation. Although nothing is said +about other kinds of block-level content, it is certainly reasonable to +infer that *all* block elements under a list item, including other +lists, must be indented four spaces. This principle has been called the +*four-space rule*. + +The four-space rule is clear and principled, and if the reference +implementation `Markdown.pl` had followed it, it probably would have +become the standard. However, `Markdown.pl` allowed paragraphs and +sublists to start with only two spaces indentation, at least on the +outer level. Worse, its behavior was inconsistent: a sublist of an +outer-level list needed two spaces indentation, but a sublist of this +sublist needed three spaces. It is not surprising, then, that different +implementations of Markdown have developed very different rules for +determining what comes under a list item. (Pandoc and python-Markdown, +for example, stuck with Gruber's syntax description and the four-space +rule, while discount, redcarpet, marked, PHP Markdown, and others +followed `Markdown.pl`'s behavior more closely.) + +Unfortunately, given the divergences between implementations, there +is no way to give a spec for list items that will be guaranteed not +to break any existing documents. However, the spec given here should +correctly handle lists formatted with either the four-space rule or +the more forgiving `Markdown.pl` behavior, provided they are laid out +in a way that is natural for a human to read. + +The strategy here is to let the width and indentation of the list marker +determine the indentation necessary for blocks to fall under the list +item, rather than having a fixed and arbitrary number. The writer can +think of the body of the list item as a unit which gets indented to the +right enough to fit the list marker (and any indentation on the list +marker). (The laziness rule, #5, then allows continuation lines to be +unindented if needed.) + +This rule is superior, we claim, to any rule requiring a fixed level of +indentation from the margin. The four-space rule is clear but +unnatural. It is quite unintuitive that + +``` markdown +- foo + + bar + + - baz +``` + +should be parsed as two lists with an intervening paragraph, + +``` html +
    +
  • foo
  • +
+

bar

+
    +
  • baz
  • +
+``` + +as the four-space rule demands, rather than a single list, + +``` html +
    +
  • +

    foo

    +

    bar

    +
      +
    • baz
    • +
    +
  • +
+``` + +The choice of four spaces is arbitrary. It can be learned, but it is +not likely to be guessed, and it trips up beginners regularly. + +Would it help to adopt a two-space rule? The problem is that such +a rule, together with the rule allowing 1--3 spaces indentation of the +initial list marker, allows text that is indented *less than* the +original list marker to be included in the list item. For example, +`Markdown.pl` parses + +``` markdown + - one + + two +``` + +as a single list item, with `two` a continuation paragraph: + +``` html +
    +
  • +

    one

    +

    two

    +
  • +
+``` + +and similarly + +``` markdown +> - one +> +> two +``` + +as + +``` html +
+
    +
  • +

    one

    +

    two

    +
  • +
+
+``` + +This is extremely unintuitive. + +Rather than requiring a fixed indent from the margin, we could require +a fixed indent (say, two spaces, or even one space) from the list marker (which +may itself be indented). This proposal would remove the last anomaly +discussed. Unlike the spec presented above, it would count the following +as a list item with a subparagraph, even though the paragraph `bar` +is not indented as far as the first paragraph `foo`: + +``` markdown + 10. foo + + bar +``` + +Arguably this text does read like a list item with `bar` as a subparagraph, +which may count in favor of the proposal. However, on this proposal indented +code would have to be indented six spaces after the list marker. And this +would break a lot of existing Markdown, which has the pattern: + +``` markdown +1. foo + + indented code +``` + +where the code is indented eight spaces. The spec above, by contrast, will +parse this text as expected, since the code block's indentation is measured +from the beginning of `foo`. + +The one case that needs special treatment is a list item that *starts* +with indented code. How much indentation is required in that case, since +we don't have a "first paragraph" to measure from? Rule #2 simply stipulates +that in such cases, we require one space indentation from the list marker +(and then the normal four spaces for the indented code). This will match the +four-space rule in cases where the list marker plus its initial indentation +takes four spaces (a common case), but diverge in other cases. + +## Lists + +A [list](@) is a sequence of one or more +list items [of the same type]. The list items +may be separated by any number of blank lines. + +Two list items are [of the same type](@) +if they begin with a [list marker] of the same type. +Two list markers are of the +same type if (a) they are bullet list markers using the same character +(`-`, `+`, or `*`) or (b) they are ordered list numbers with the same +delimiter (either `.` or `)`). + +A list is an [ordered list](@) +if its constituent list items begin with +[ordered list markers], and a +[bullet list](@) if its constituent list +items begin with [bullet list markers]. + +The [start number](@) +of an [ordered list] is determined by the list number of +its initial list item. The numbers of subsequent list items are +disregarded. + +A list is [loose](@) if any of its constituent +list items are separated by blank lines, or if any of its constituent +list items directly contain two block-level elements with a blank line +between them. Otherwise a list is [tight](@). +(The difference in HTML output is that paragraphs in a loose list are +wrapped in `

` tags, while paragraphs in a tight list are not.) + +Changing the bullet or ordered list delimiter starts a new list: + +```````````````````````````````` example +- foo +- bar ++ baz +. +

    +
  • foo
  • +
  • bar
  • +
+
    +
  • baz
  • +
+```````````````````````````````` + + +```````````````````````````````` example +1. foo +2. bar +3) baz +. +
    +
  1. foo
  2. +
  3. bar
  4. +
+
    +
  1. baz
  2. +
+```````````````````````````````` + + +In CommonMark, a list can interrupt a paragraph. That is, +no blank line is needed to separate a paragraph from a following +list: + +```````````````````````````````` example +Foo +- bar +- baz +. +

Foo

+
    +
  • bar
  • +
  • baz
  • +
+```````````````````````````````` + +`Markdown.pl` does not allow this, through fear of triggering a list +via a numeral in a hard-wrapped line: + +``` markdown +The number of windows in my house is +14. The number of doors is 6. +``` + +Oddly, though, `Markdown.pl` *does* allow a blockquote to +interrupt a paragraph, even though the same considerations might +apply. + +In CommonMark, we do allow lists to interrupt paragraphs, for +two reasons. First, it is natural and not uncommon for people +to start lists without blank lines: + +``` markdown +I need to buy +- new shoes +- a coat +- a plane ticket +``` + +Second, we are attracted to a + +> [principle of uniformity](@): +> if a chunk of text has a certain +> meaning, it will continue to have the same meaning when put into a +> container block (such as a list item or blockquote). + +(Indeed, the spec for [list items] and [block quotes] presupposes +this principle.) This principle implies that if + +``` markdown + * I need to buy + - new shoes + - a coat + - a plane ticket +``` + +is a list item containing a paragraph followed by a nested sublist, +as all Markdown implementations agree it is (though the paragraph +may be rendered without `

` tags, since the list is "tight"), +then + +``` markdown +I need to buy +- new shoes +- a coat +- a plane ticket +``` + +by itself should be a paragraph followed by a nested sublist. + +Since it is well established Markdown practice to allow lists to +interrupt paragraphs inside list items, the [principle of +uniformity] requires us to allow this outside list items as +well. ([reStructuredText](http://docutils.sourceforge.net/rst.html) +takes a different approach, requiring blank lines before lists +even inside other list items.) + +In order to solve of unwanted lists in paragraphs with +hard-wrapped numerals, we allow only lists starting with `1` to +interrupt paragraphs. Thus, + +```````````````````````````````` example +The number of windows in my house is +14. The number of doors is 6. +. +

The number of windows in my house is +14. The number of doors is 6.

+```````````````````````````````` + +We may still get an unintended result in cases like + +```````````````````````````````` example +The number of windows in my house is +1. The number of doors is 6. +. +

The number of windows in my house is

+
    +
  1. The number of doors is 6.
  2. +
+```````````````````````````````` + +but this rule should prevent most spurious list captures. + +There can be any number of blank lines between items: + +```````````````````````````````` example +- foo + +- bar + + +- baz +. +
    +
  • +

    foo

    +
  • +
  • +

    bar

    +
  • +
  • +

    baz

    +
  • +
+```````````````````````````````` + +```````````````````````````````` example +- foo + - bar + - baz + + + bim +. +
    +
  • foo +
      +
    • bar +
        +
      • +

        baz

        +

        bim

        +
      • +
      +
    • +
    +
  • +
+```````````````````````````````` + + +To separate consecutive lists of the same type, or to separate a +list from an indented code block that would otherwise be parsed +as a subparagraph of the final list item, you can insert a blank HTML +comment: + +```````````````````````````````` example +- foo +- bar + + + +- baz +- bim +. +
    +
  • foo
  • +
  • bar
  • +
+ +
    +
  • baz
  • +
  • bim
  • +
+```````````````````````````````` + + +```````````````````````````````` example +- foo + + notcode + +- foo + + + + code +. +
    +
  • +

    foo

    +

    notcode

    +
  • +
  • +

    foo

    +
  • +
+ +
code
+
+```````````````````````````````` + + +List items need not be indented to the same level. The following +list items will be treated as items at the same list level, +since none is indented enough to belong to the previous list +item: + +```````````````````````````````` example +- a + - b + - c + - d + - e + - f +- g +. +
    +
  • a
  • +
  • b
  • +
  • c
  • +
  • d
  • +
  • e
  • +
  • f
  • +
  • g
  • +
+```````````````````````````````` + + +```````````````````````````````` example +1. a + + 2. b + + 3. c +. +
    +
  1. +

    a

    +
  2. +
  3. +

    b

    +
  4. +
  5. +

    c

    +
  6. +
+```````````````````````````````` + +Note, however, that list items may not be indented more than +three spaces. Here `- e` is treated as a paragraph continuation +line, because it is indented more than three spaces: + +```````````````````````````````` example +- a + - b + - c + - d + - e +. +
    +
  • a
  • +
  • b
  • +
  • c
  • +
  • d +- e
  • +
+```````````````````````````````` + +And here, `3. c` is treated as in indented code block, +because it is indented four spaces and preceded by a +blank line. + +```````````````````````````````` example +1. a + + 2. b + + 3. c +. +
    +
  1. +

    a

    +
  2. +
  3. +

    b

    +
  4. +
+
3. c
+
+```````````````````````````````` + + +This is a loose list, because there is a blank line between +two of the list items: + +```````````````````````````````` example +- a +- b + +- c +. +
    +
  • +

    a

    +
  • +
  • +

    b

    +
  • +
  • +

    c

    +
  • +
+```````````````````````````````` + + +So is this, with a empty second item: + +```````````````````````````````` example +* a +* + +* c +. +
    +
  • +

    a

    +
  • +
  • +
  • +

    c

    +
  • +
+```````````````````````````````` + + +These are loose lists, even though there is no space between the items, +because one of the items directly contains two block-level elements +with a blank line between them: + +```````````````````````````````` example +- a +- b + + c +- d +. +
    +
  • +

    a

    +
  • +
  • +

    b

    +

    c

    +
  • +
  • +

    d

    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example +- a +- b + + [ref]: /url +- d +. +
    +
  • +

    a

    +
  • +
  • +

    b

    +
  • +
  • +

    d

    +
  • +
+```````````````````````````````` + + +This is a tight list, because the blank lines are in a code block: + +```````````````````````````````` example +- a +- ``` + b + + + ``` +- c +. +
    +
  • a
  • +
  • +
    b
    +
    +
    +
    +
  • +
  • c
  • +
+```````````````````````````````` + + +This is a tight list, because the blank line is between two +paragraphs of a sublist. So the sublist is loose while +the outer list is tight: + +```````````````````````````````` example +- a + - b + + c +- d +. +
    +
  • a +
      +
    • +

      b

      +

      c

      +
    • +
    +
  • +
  • d
  • +
+```````````````````````````````` + + +This is a tight list, because the blank line is inside the +block quote: + +```````````````````````````````` example +* a + > b + > +* c +. +
    +
  • a +
    +

    b

    +
    +
  • +
  • c
  • +
+```````````````````````````````` + + +This list is tight, because the consecutive block elements +are not separated by blank lines: + +```````````````````````````````` example +- a + > b + ``` + c + ``` +- d +. +
    +
  • a +
    +

    b

    +
    +
    c
    +
    +
  • +
  • d
  • +
+```````````````````````````````` + + +A single-paragraph list is tight: + +```````````````````````````````` example +- a +. +
    +
  • a
  • +
+```````````````````````````````` + + +```````````````````````````````` example +- a + - b +. +
    +
  • a +
      +
    • b
    • +
    +
  • +
+```````````````````````````````` + + +This list is loose, because of the blank line between the +two block elements in the list item: + +```````````````````````````````` example +1. ``` + foo + ``` + + bar +. +
    +
  1. +
    foo
    +
    +

    bar

    +
  2. +
+```````````````````````````````` + + +Here the outer list is loose, the inner list tight: + +```````````````````````````````` example +* foo + * bar + + baz +. +
    +
  • +

    foo

    +
      +
    • bar
    • +
    +

    baz

    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example +- a + - b + - c + +- d + - e + - f +. +
    +
  • +

    a

    +
      +
    • b
    • +
    • c
    • +
    +
  • +
  • +

    d

    +
      +
    • e
    • +
    • f
    • +
    +
  • +
+```````````````````````````````` + + +# Inlines + +Inlines are parsed sequentially from the beginning of the character +stream to the end (left to right, in left-to-right languages). +Thus, for example, in + +```````````````````````````````` example +`hi`lo` +. +

hilo`

+```````````````````````````````` + +`hi` is parsed as code, leaving the backtick at the end as a literal +backtick. + + +## Backslash escapes + +Any ASCII punctuation character may be backslash-escaped: + +```````````````````````````````` example +\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~ +. +

!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~

+```````````````````````````````` + + +Backslashes before other characters are treated as literal +backslashes: + +```````````````````````````````` example +\→\A\a\ \3\φ\« +. +

\→\A\a\ \3\φ\«

+```````````````````````````````` + + +Escaped characters are treated as regular characters and do +not have their usual Markdown meanings: + +```````````````````````````````` example +\*not emphasized* +\
not a tag +\[not a link](/foo) +\`not code` +1\. not a list +\* not a list +\# not a heading +\[foo]: /url "not a reference" +\ö not a character entity +. +

*not emphasized* +<br/> not a tag +[not a link](/foo) +`not code` +1. not a list +* not a list +# not a heading +[foo]: /url "not a reference" +&ouml; not a character entity

+```````````````````````````````` + + +If a backslash is itself escaped, the following character is not: + +```````````````````````````````` example +\\*emphasis* +. +

\emphasis

+```````````````````````````````` + + +A backslash at the end of the line is a [hard line break]: + +```````````````````````````````` example +foo\ +bar +. +

foo
+bar

+```````````````````````````````` + + +Backslash escapes do not work in code blocks, code spans, autolinks, or +raw HTML: + +```````````````````````````````` example +`` \[\` `` +. +

\[\`

+```````````````````````````````` + + +```````````````````````````````` example + \[\] +. +
\[\]
+
+```````````````````````````````` + + +```````````````````````````````` example +~~~ +\[\] +~~~ +. +
\[\]
+
+```````````````````````````````` + + +```````````````````````````````` example + +. +

http://example.com?find=\*

+```````````````````````````````` + + +```````````````````````````````` example + +. + +```````````````````````````````` + + +But they work in all other contexts, including URLs and link titles, +link references, and [info strings] in [fenced code blocks]: + +```````````````````````````````` example +[foo](/bar\* "ti\*tle") +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +[foo] + +[foo]: /bar\* "ti\*tle" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +``` foo\+bar +foo +``` +. +
foo
+
+```````````````````````````````` + + + +## Entity and numeric character references + +Valid HTML entity references and numeric character references +can be used in place of the corresponding Unicode character, +with the following exceptions: + +- Entity and character references are not recognized in code + blocks and code spans. + +- Entity and character references cannot stand in place of + special characters that define structural elements in + CommonMark. For example, although `*` can be used + in place of a literal `*` character, `*` cannot replace + `*` in emphasis delimiters, bullet list markers, or thematic + breaks. + +Conforming CommonMark parsers need not store information about +whether a particular character was represented in the source +using a Unicode character or an entity reference. + +[Entity references](@) consist of `&` + any of the valid +HTML5 entity names + `;`. The +document +is used as an authoritative source for the valid entity +references and their corresponding code points. + +```````````````````````````````` example +  & © Æ Ď +¾ ℋ ⅆ +∲ ≧̸ +. +

  & © Æ Ď +¾ ℋ ⅆ +∲ ≧̸

+```````````````````````````````` + + +[Decimal numeric character +references](@) +consist of `&#` + a string of 1--7 arabic digits + `;`. A +numeric character reference is parsed as the corresponding +Unicode character. Invalid Unicode code points will be replaced by +the REPLACEMENT CHARACTER (`U+FFFD`). For security reasons, +the code point `U+0000` will also be replaced by `U+FFFD`. + +```````````````````````````````` example +# Ӓ Ϡ � +. +

# Ӓ Ϡ �

+```````````````````````````````` + + +[Hexadecimal numeric character +references](@) consist of `&#` + +either `X` or `x` + a string of 1-6 hexadecimal digits + `;`. +They too are parsed as the corresponding Unicode character (this +time specified with a hexadecimal numeral instead of decimal). + +```````````````````````````````` example +" ആ ಫ +. +

" ആ ಫ

+```````````````````````````````` + + +Here are some nonentities: + +```````````````````````````````` example +  &x; &#; &#x; +� +&#abcdef0; +&ThisIsNotDefined; &hi?; +. +

&nbsp &x; &#; &#x; +&#87654321; +&#abcdef0; +&ThisIsNotDefined; &hi?;

+```````````````````````````````` + + +Although HTML5 does accept some entity references +without a trailing semicolon (such as `©`), these are not +recognized here, because it makes the grammar too ambiguous: + +```````````````````````````````` example +© +. +

&copy

+```````````````````````````````` + + +Strings that are not on the list of HTML5 named entities are not +recognized as entity references either: + +```````````````````````````````` example +&MadeUpEntity; +. +

&MadeUpEntity;

+```````````````````````````````` + + +Entity and numeric character references are recognized in any +context besides code spans or code blocks, including +URLs, [link titles], and [fenced code block][] [info strings]: + +```````````````````````````````` example + +. + +```````````````````````````````` + + +```````````````````````````````` example +[foo](/föö "föö") +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +[foo] + +[foo]: /föö "föö" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +``` föö +foo +``` +. +
foo
+
+```````````````````````````````` + + +Entity and numeric character references are treated as literal +text in code spans and code blocks: + +```````````````````````````````` example +`föö` +. +

f&ouml;&ouml;

+```````````````````````````````` + + +```````````````````````````````` example + föfö +. +
f&ouml;f&ouml;
+
+```````````````````````````````` + + +Entity and numeric character references cannot be used +in place of symbols indicating structure in CommonMark +documents. + +```````````````````````````````` example +*foo* +*foo* +. +

*foo* +foo

+```````````````````````````````` + +```````````````````````````````` example +* foo + +* foo +. +

* foo

+
    +
  • foo
  • +
+```````````````````````````````` + +```````````````````````````````` example +foo bar +. +

foo + +bar

+```````````````````````````````` + +```````````````````````````````` example + foo +. +

→foo

+```````````````````````````````` + + +```````````````````````````````` example +[a](url "tit") +. +

[a](url "tit")

+```````````````````````````````` + + +## Code spans + +A [backtick string](@) +is a string of one or more backtick characters (`` ` ``) that is neither +preceded nor followed by a backtick. + +A [code span](@) begins with a backtick string and ends with +a backtick string of equal length. The contents of the code span are +the characters between the two backtick strings, normalized in the +following ways: + +- First, [line endings] are converted to [spaces]. +- If the resulting string both begins *and* ends with a [space] + character, but does not consist entirely of [space] + characters, a single [space] character is removed from the + front and back. This allows you to include code that begins + or ends with backtick characters, which must be separated by + whitespace from the opening or closing backtick strings. + +This is a simple code span: + +```````````````````````````````` example +`foo` +. +

foo

+```````````````````````````````` + + +Here two backticks are used, because the code contains a backtick. +This example also illustrates stripping of a single leading and +trailing space: + +```````````````````````````````` example +`` foo ` bar `` +. +

foo ` bar

+```````````````````````````````` + + +This example shows the motivation for stripping leading and trailing +spaces: + +```````````````````````````````` example +` `` ` +. +

``

+```````````````````````````````` + +Note that only *one* space is stripped: + +```````````````````````````````` example +` `` ` +. +

``

+```````````````````````````````` + +The stripping only happens if the space is on both +sides of the string: + +```````````````````````````````` example +` a` +. +

a

+```````````````````````````````` + +Only [spaces], and not [unicode whitespace] in general, are +stripped in this way: + +```````````````````````````````` example +` b ` +. +

 b 

+```````````````````````````````` + +No stripping occurs if the code span contains only spaces: + +```````````````````````````````` example +` ` +` ` +. +

  +

+```````````````````````````````` + + +[Line endings] are treated like spaces: + +```````````````````````````````` example +`` +foo +bar +baz +`` +. +

foo bar baz

+```````````````````````````````` + +```````````````````````````````` example +`` +foo +`` +. +

foo

+```````````````````````````````` + + +Interior spaces are not collapsed: + +```````````````````````````````` example +`foo bar +baz` +. +

foo bar baz

+```````````````````````````````` + +Note that browsers will typically collapse consecutive spaces +when rendering `` elements, so it is recommended that +the following CSS be used: + + code{white-space: pre-wrap;} + + +Note that backslash escapes do not work in code spans. All backslashes +are treated literally: + +```````````````````````````````` example +`foo\`bar` +. +

foo\bar`

+```````````````````````````````` + + +Backslash escapes are never needed, because one can always choose a +string of *n* backtick characters as delimiters, where the code does +not contain any strings of exactly *n* backtick characters. + +```````````````````````````````` example +``foo`bar`` +. +

foo`bar

+```````````````````````````````` + +```````````````````````````````` example +` foo `` bar ` +. +

foo `` bar

+```````````````````````````````` + + +Code span backticks have higher precedence than any other inline +constructs except HTML tags and autolinks. Thus, for example, this is +not parsed as emphasized text, since the second `*` is part of a code +span: + +```````````````````````````````` example +*foo`*` +. +

*foo*

+```````````````````````````````` + + +And this is not parsed as a link: + +```````````````````````````````` example +[not a `link](/foo`) +. +

[not a link](/foo)

+```````````````````````````````` + + +Code spans, HTML tags, and autolinks have the same precedence. +Thus, this is code: + +```````````````````````````````` example +`` +. +

<a href="">`

+```````````````````````````````` + + +But this is an HTML tag: + +```````````````````````````````` example +
` +. +

`

+```````````````````````````````` + + +And this is code: + +```````````````````````````````` example +`` +. +

<http://foo.bar.baz>`

+```````````````````````````````` + + +But this is an autolink: + +```````````````````````````````` example +` +. +

http://foo.bar.`baz`

+```````````````````````````````` + + +When a backtick string is not closed by a matching backtick string, +we just have literal backticks: + +```````````````````````````````` example +```foo`` +. +

```foo``

+```````````````````````````````` + + +```````````````````````````````` example +`foo +. +

`foo

+```````````````````````````````` + +The following case also illustrates the need for opening and +closing backtick strings to be equal in length: + +```````````````````````````````` example +`foo``bar`` +. +

`foobar

+```````````````````````````````` + + +## Emphasis and strong emphasis + +John Gruber's original [Markdown syntax +description](http://daringfireball.net/projects/markdown/syntax#em) says: + +> Markdown treats asterisks (`*`) and underscores (`_`) as indicators of +> emphasis. Text wrapped with one `*` or `_` will be wrapped with an HTML +> `` tag; double `*`'s or `_`'s will be wrapped with an HTML `` +> tag. + +This is enough for most users, but these rules leave much undecided, +especially when it comes to nested emphasis. The original +`Markdown.pl` test suite makes it clear that triple `***` and +`___` delimiters can be used for strong emphasis, and most +implementations have also allowed the following patterns: + +``` markdown +***strong emph*** +***strong** in emph* +***emph* in strong** +**in strong *emph*** +*in emph **strong*** +``` + +The following patterns are less widely supported, but the intent +is clear and they are useful (especially in contexts like bibliography +entries): + +``` markdown +*emph *with emph* in it* +**strong **with strong** in it** +``` + +Many implementations have also restricted intraword emphasis to +the `*` forms, to avoid unwanted emphasis in words containing +internal underscores. (It is best practice to put these in code +spans, but users often do not.) + +``` markdown +internal emphasis: foo*bar*baz +no emphasis: foo_bar_baz +``` + +The rules given below capture all of these patterns, while allowing +for efficient parsing strategies that do not backtrack. + +First, some definitions. A [delimiter run](@) is either +a sequence of one or more `*` characters that is not preceded or +followed by a non-backslash-escaped `*` character, or a sequence +of one or more `_` characters that is not preceded or followed by +a non-backslash-escaped `_` character. + +A [left-flanking delimiter run](@) is +a [delimiter run] that is (1) not followed by [Unicode whitespace], +and either (2a) not followed by a [punctuation character], or +(2b) followed by a [punctuation character] and +preceded by [Unicode whitespace] or a [punctuation character]. +For purposes of this definition, the beginning and the end of +the line count as Unicode whitespace. + +A [right-flanking delimiter run](@) is +a [delimiter run] that is (1) not preceded by [Unicode whitespace], +and either (2a) not preceded by a [punctuation character], or +(2b) preceded by a [punctuation character] and +followed by [Unicode whitespace] or a [punctuation character]. +For purposes of this definition, the beginning and the end of +the line count as Unicode whitespace. + +Here are some examples of delimiter runs. + + - left-flanking but not right-flanking: + + ``` + ***abc + _abc + **"abc" + _"abc" + ``` + + - right-flanking but not left-flanking: + + ``` + abc*** + abc_ + "abc"** + "abc"_ + ``` + + - Both left and right-flanking: + + ``` + abc***def + "abc"_"def" + ``` + + - Neither left nor right-flanking: + + ``` + abc *** def + a _ b + ``` + +(The idea of distinguishing left-flanking and right-flanking +delimiter runs based on the character before and the character +after comes from Roopesh Chander's +[vfmd](http://www.vfmd.org/vfmd-spec/specification/#procedure-for-identifying-emphasis-tags). +vfmd uses the terminology "emphasis indicator string" instead of "delimiter +run," and its rules for distinguishing left- and right-flanking runs +are a bit more complex than the ones given here.) + +The following rules define emphasis and strong emphasis: + +1. A single `*` character [can open emphasis](@) + iff (if and only if) it is part of a [left-flanking delimiter run]. + +2. A single `_` character [can open emphasis] iff + it is part of a [left-flanking delimiter run] + and either (a) not part of a [right-flanking delimiter run] + or (b) part of a [right-flanking delimiter run] + preceded by punctuation. + +3. A single `*` character [can close emphasis](@) + iff it is part of a [right-flanking delimiter run]. + +4. A single `_` character [can close emphasis] iff + it is part of a [right-flanking delimiter run] + and either (a) not part of a [left-flanking delimiter run] + or (b) part of a [left-flanking delimiter run] + followed by punctuation. + +5. A double `**` [can open strong emphasis](@) + iff it is part of a [left-flanking delimiter run]. + +6. A double `__` [can open strong emphasis] iff + it is part of a [left-flanking delimiter run] + and either (a) not part of a [right-flanking delimiter run] + or (b) part of a [right-flanking delimiter run] + preceded by punctuation. + +7. A double `**` [can close strong emphasis](@) + iff it is part of a [right-flanking delimiter run]. + +8. A double `__` [can close strong emphasis] iff + it is part of a [right-flanking delimiter run] + and either (a) not part of a [left-flanking delimiter run] + or (b) part of a [left-flanking delimiter run] + followed by punctuation. + +9. Emphasis begins with a delimiter that [can open emphasis] and ends + with a delimiter that [can close emphasis], and that uses the same + character (`_` or `*`) as the opening delimiter. The + opening and closing delimiters must belong to separate + [delimiter runs]. If one of the delimiters can both + open and close emphasis, then the sum of the lengths of the + delimiter runs containing the opening and closing delimiters + must not be a multiple of 3 unless both lengths are + multiples of 3. + +10. Strong emphasis begins with a delimiter that + [can open strong emphasis] and ends with a delimiter that + [can close strong emphasis], and that uses the same character + (`_` or `*`) as the opening delimiter. The + opening and closing delimiters must belong to separate + [delimiter runs]. If one of the delimiters can both open + and close strong emphasis, then the sum of the lengths of + the delimiter runs containing the opening and closing + delimiters must not be a multiple of 3 unless both lengths + are multiples of 3. + +11. A literal `*` character cannot occur at the beginning or end of + `*`-delimited emphasis or `**`-delimited strong emphasis, unless it + is backslash-escaped. + +12. A literal `_` character cannot occur at the beginning or end of + `_`-delimited emphasis or `__`-delimited strong emphasis, unless it + is backslash-escaped. + +Where rules 1--12 above are compatible with multiple parsings, +the following principles resolve ambiguity: + +13. The number of nestings should be minimized. Thus, for example, + an interpretation `...` is always preferred to + `...`. + +14. An interpretation `...` is always + preferred to `...`. + +15. When two potential emphasis or strong emphasis spans overlap, + so that the second begins before the first ends and ends after + the first ends, the first takes precedence. Thus, for example, + `*foo _bar* baz_` is parsed as `foo _bar baz_` rather + than `*foo bar* baz`. + +16. When there are two potential emphasis or strong emphasis spans + with the same closing delimiter, the shorter one (the one that + opens later) takes precedence. Thus, for example, + `**foo **bar baz**` is parsed as `**foo bar baz` + rather than `foo **bar baz`. + +17. Inline code spans, links, images, and HTML tags group more tightly + than emphasis. So, when there is a choice between an interpretation + that contains one of these elements and one that does not, the + former always wins. Thus, for example, `*[foo*](bar)` is + parsed as `*foo*` rather than as + `[foo](bar)`. + +These rules can be illustrated through a series of examples. + +Rule 1: + +```````````````````````````````` example +*foo bar* +. +

foo bar

+```````````````````````````````` + + +This is not emphasis, because the opening `*` is followed by +whitespace, and hence not part of a [left-flanking delimiter run]: + +```````````````````````````````` example +a * foo bar* +. +

a * foo bar*

+```````````````````````````````` + + +This is not emphasis, because the opening `*` is preceded +by an alphanumeric and followed by punctuation, and hence +not part of a [left-flanking delimiter run]: + +```````````````````````````````` example +a*"foo"* +. +

a*"foo"*

+```````````````````````````````` + + +Unicode nonbreaking spaces count as whitespace, too: + +```````````````````````````````` example +* a * +. +

* a *

+```````````````````````````````` + + +Intraword emphasis with `*` is permitted: + +```````````````````````````````` example +foo*bar* +. +

foobar

+```````````````````````````````` + + +```````````````````````````````` example +5*6*78 +. +

5678

+```````````````````````````````` + + +Rule 2: + +```````````````````````````````` example +_foo bar_ +. +

foo bar

+```````````````````````````````` + + +This is not emphasis, because the opening `_` is followed by +whitespace: + +```````````````````````````````` example +_ foo bar_ +. +

_ foo bar_

+```````````````````````````````` + + +This is not emphasis, because the opening `_` is preceded +by an alphanumeric and followed by punctuation: + +```````````````````````````````` example +a_"foo"_ +. +

a_"foo"_

+```````````````````````````````` + + +Emphasis with `_` is not allowed inside words: + +```````````````````````````````` example +foo_bar_ +. +

foo_bar_

+```````````````````````````````` + + +```````````````````````````````` example +5_6_78 +. +

5_6_78

+```````````````````````````````` + + +```````````````````````````````` example +пристаням_стремятся_ +. +

пристаням_стремятся_

+```````````````````````````````` + + +Here `_` does not generate emphasis, because the first delimiter run +is right-flanking and the second left-flanking: + +```````````````````````````````` example +aa_"bb"_cc +. +

aa_"bb"_cc

+```````````````````````````````` + + +This is emphasis, even though the opening delimiter is +both left- and right-flanking, because it is preceded by +punctuation: + +```````````````````````````````` example +foo-_(bar)_ +. +

foo-(bar)

+```````````````````````````````` + + +Rule 3: + +This is not emphasis, because the closing delimiter does +not match the opening delimiter: + +```````````````````````````````` example +_foo* +. +

_foo*

+```````````````````````````````` + + +This is not emphasis, because the closing `*` is preceded by +whitespace: + +```````````````````````````````` example +*foo bar * +. +

*foo bar *

+```````````````````````````````` + + +A newline also counts as whitespace: + +```````````````````````````````` example +*foo bar +* +. +

*foo bar +*

+```````````````````````````````` + + +This is not emphasis, because the second `*` is +preceded by punctuation and followed by an alphanumeric +(hence it is not part of a [right-flanking delimiter run]: + +```````````````````````````````` example +*(*foo) +. +

*(*foo)

+```````````````````````````````` + + +The point of this restriction is more easily appreciated +with this example: + +```````````````````````````````` example +*(*foo*)* +. +

(foo)

+```````````````````````````````` + + +Intraword emphasis with `*` is allowed: + +```````````````````````````````` example +*foo*bar +. +

foobar

+```````````````````````````````` + + + +Rule 4: + +This is not emphasis, because the closing `_` is preceded by +whitespace: + +```````````````````````````````` example +_foo bar _ +. +

_foo bar _

+```````````````````````````````` + + +This is not emphasis, because the second `_` is +preceded by punctuation and followed by an alphanumeric: + +```````````````````````````````` example +_(_foo) +. +

_(_foo)

+```````````````````````````````` + + +This is emphasis within emphasis: + +```````````````````````````````` example +_(_foo_)_ +. +

(foo)

+```````````````````````````````` + + +Intraword emphasis is disallowed for `_`: + +```````````````````````````````` example +_foo_bar +. +

_foo_bar

+```````````````````````````````` + + +```````````````````````````````` example +_пристаням_стремятся +. +

_пристаням_стремятся

+```````````````````````````````` + + +```````````````````````````````` example +_foo_bar_baz_ +. +

foo_bar_baz

+```````````````````````````````` + + +This is emphasis, even though the closing delimiter is +both left- and right-flanking, because it is followed by +punctuation: + +```````````````````````````````` example +_(bar)_. +. +

(bar).

+```````````````````````````````` + + +Rule 5: + +```````````````````````````````` example +**foo bar** +. +

foo bar

+```````````````````````````````` + + +This is not strong emphasis, because the opening delimiter is +followed by whitespace: + +```````````````````````````````` example +** foo bar** +. +

** foo bar**

+```````````````````````````````` + + +This is not strong emphasis, because the opening `**` is preceded +by an alphanumeric and followed by punctuation, and hence +not part of a [left-flanking delimiter run]: + +```````````````````````````````` example +a**"foo"** +. +

a**"foo"**

+```````````````````````````````` + + +Intraword strong emphasis with `**` is permitted: + +```````````````````````````````` example +foo**bar** +. +

foobar

+```````````````````````````````` + + +Rule 6: + +```````````````````````````````` example +__foo bar__ +. +

foo bar

+```````````````````````````````` + + +This is not strong emphasis, because the opening delimiter is +followed by whitespace: + +```````````````````````````````` example +__ foo bar__ +. +

__ foo bar__

+```````````````````````````````` + + +A newline counts as whitespace: +```````````````````````````````` example +__ +foo bar__ +. +

__ +foo bar__

+```````````````````````````````` + + +This is not strong emphasis, because the opening `__` is preceded +by an alphanumeric and followed by punctuation: + +```````````````````````````````` example +a__"foo"__ +. +

a__"foo"__

+```````````````````````````````` + + +Intraword strong emphasis is forbidden with `__`: + +```````````````````````````````` example +foo__bar__ +. +

foo__bar__

+```````````````````````````````` + + +```````````````````````````````` example +5__6__78 +. +

5__6__78

+```````````````````````````````` + + +```````````````````````````````` example +пристаням__стремятся__ +. +

пристаням__стремятся__

+```````````````````````````````` + + +```````````````````````````````` example +__foo, __bar__, baz__ +. +

foo, bar, baz

+```````````````````````````````` + + +This is strong emphasis, even though the opening delimiter is +both left- and right-flanking, because it is preceded by +punctuation: + +```````````````````````````````` example +foo-__(bar)__ +. +

foo-(bar)

+```````````````````````````````` + + + +Rule 7: + +This is not strong emphasis, because the closing delimiter is preceded +by whitespace: + +```````````````````````````````` example +**foo bar ** +. +

**foo bar **

+```````````````````````````````` + + +(Nor can it be interpreted as an emphasized `*foo bar *`, because of +Rule 11.) + +This is not strong emphasis, because the second `**` is +preceded by punctuation and followed by an alphanumeric: + +```````````````````````````````` example +**(**foo) +. +

**(**foo)

+```````````````````````````````` + + +The point of this restriction is more easily appreciated +with these examples: + +```````````````````````````````` example +*(**foo**)* +. +

(foo)

+```````````````````````````````` + + +```````````````````````````````` example +**Gomphocarpus (*Gomphocarpus physocarpus*, syn. +*Asclepias physocarpa*)** +. +

Gomphocarpus (Gomphocarpus physocarpus, syn. +Asclepias physocarpa)

+```````````````````````````````` + + +```````````````````````````````` example +**foo "*bar*" foo** +. +

foo "bar" foo

+```````````````````````````````` + + +Intraword emphasis: + +```````````````````````````````` example +**foo**bar +. +

foobar

+```````````````````````````````` + + +Rule 8: + +This is not strong emphasis, because the closing delimiter is +preceded by whitespace: + +```````````````````````````````` example +__foo bar __ +. +

__foo bar __

+```````````````````````````````` + + +This is not strong emphasis, because the second `__` is +preceded by punctuation and followed by an alphanumeric: + +```````````````````````````````` example +__(__foo) +. +

__(__foo)

+```````````````````````````````` + + +The point of this restriction is more easily appreciated +with this example: + +```````````````````````````````` example +_(__foo__)_ +. +

(foo)

+```````````````````````````````` + + +Intraword strong emphasis is forbidden with `__`: + +```````````````````````````````` example +__foo__bar +. +

__foo__bar

+```````````````````````````````` + + +```````````````````````````````` example +__пристаням__стремятся +. +

__пристаням__стремятся

+```````````````````````````````` + + +```````````````````````````````` example +__foo__bar__baz__ +. +

foo__bar__baz

+```````````````````````````````` + + +This is strong emphasis, even though the closing delimiter is +both left- and right-flanking, because it is followed by +punctuation: + +```````````````````````````````` example +__(bar)__. +. +

(bar).

+```````````````````````````````` + + +Rule 9: + +Any nonempty sequence of inline elements can be the contents of an +emphasized span. + +```````````````````````````````` example +*foo [bar](/url)* +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +*foo +bar* +. +

foo +bar

+```````````````````````````````` + + +In particular, emphasis and strong emphasis can be nested +inside emphasis: + +```````````````````````````````` example +_foo __bar__ baz_ +. +

foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +_foo _bar_ baz_ +. +

foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +__foo_ bar_ +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +*foo *bar** +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +*foo **bar** baz* +. +

foo bar baz

+```````````````````````````````` + +```````````````````````````````` example +*foo**bar**baz* +. +

foobarbaz

+```````````````````````````````` + +Note that in the preceding case, the interpretation + +``` markdown +

foobarbaz

+``` + + +is precluded by the condition that a delimiter that +can both open and close (like the `*` after `foo`) +cannot form emphasis if the sum of the lengths of +the delimiter runs containing the opening and +closing delimiters is a multiple of 3 unless +both lengths are multiples of 3. + + +For the same reason, we don't get two consecutive +emphasis sections in this example: + +```````````````````````````````` example +*foo**bar* +. +

foo**bar

+```````````````````````````````` + + +The same condition ensures that the following +cases are all strong emphasis nested inside +emphasis, even when the interior spaces are +omitted: + + +```````````````````````````````` example +***foo** bar* +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +*foo **bar*** +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +*foo**bar*** +. +

foobar

+```````````````````````````````` + + +When the lengths of the interior closing and opening +delimiter runs are *both* multiples of 3, though, +they can match to create emphasis: + +```````````````````````````````` example +foo***bar***baz +. +

foobarbaz

+```````````````````````````````` + +```````````````````````````````` example +foo******bar*********baz +. +

foobar***baz

+```````````````````````````````` + + +Indefinite levels of nesting are possible: + +```````````````````````````````` example +*foo **bar *baz* bim** bop* +. +

foo bar baz bim bop

+```````````````````````````````` + + +```````````````````````````````` example +*foo [*bar*](/url)* +. +

foo bar

+```````````````````````````````` + + +There can be no empty emphasis or strong emphasis: + +```````````````````````````````` example +** is not an empty emphasis +. +

** is not an empty emphasis

+```````````````````````````````` + + +```````````````````````````````` example +**** is not an empty strong emphasis +. +

**** is not an empty strong emphasis

+```````````````````````````````` + + + +Rule 10: + +Any nonempty sequence of inline elements can be the contents of an +strongly emphasized span. + +```````````````````````````````` example +**foo [bar](/url)** +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +**foo +bar** +. +

foo +bar

+```````````````````````````````` + + +In particular, emphasis and strong emphasis can be nested +inside strong emphasis: + +```````````````````````````````` example +__foo _bar_ baz__ +. +

foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +__foo __bar__ baz__ +. +

foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +____foo__ bar__ +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +**foo **bar**** +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +**foo *bar* baz** +. +

foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +**foo*bar*baz** +. +

foobarbaz

+```````````````````````````````` + + +```````````````````````````````` example +***foo* bar** +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +**foo *bar*** +. +

foo bar

+```````````````````````````````` + + +Indefinite levels of nesting are possible: + +```````````````````````````````` example +**foo *bar **baz** +bim* bop** +. +

foo bar baz +bim bop

+```````````````````````````````` + + +```````````````````````````````` example +**foo [*bar*](/url)** +. +

foo bar

+```````````````````````````````` + + +There can be no empty emphasis or strong emphasis: + +```````````````````````````````` example +__ is not an empty emphasis +. +

__ is not an empty emphasis

+```````````````````````````````` + + +```````````````````````````````` example +____ is not an empty strong emphasis +. +

____ is not an empty strong emphasis

+```````````````````````````````` + + + +Rule 11: + +```````````````````````````````` example +foo *** +. +

foo ***

+```````````````````````````````` + + +```````````````````````````````` example +foo *\** +. +

foo *

+```````````````````````````````` + + +```````````````````````````````` example +foo *_* +. +

foo _

+```````````````````````````````` + + +```````````````````````````````` example +foo ***** +. +

foo *****

+```````````````````````````````` + + +```````````````````````````````` example +foo **\*** +. +

foo *

+```````````````````````````````` + + +```````````````````````````````` example +foo **_** +. +

foo _

+```````````````````````````````` + + +Note that when delimiters do not match evenly, Rule 11 determines +that the excess literal `*` characters will appear outside of the +emphasis, rather than inside it: + +```````````````````````````````` example +**foo* +. +

*foo

+```````````````````````````````` + + +```````````````````````````````` example +*foo** +. +

foo*

+```````````````````````````````` + + +```````````````````````````````` example +***foo** +. +

*foo

+```````````````````````````````` + + +```````````````````````````````` example +****foo* +. +

***foo

+```````````````````````````````` + + +```````````````````````````````` example +**foo*** +. +

foo*

+```````````````````````````````` + + +```````````````````````````````` example +*foo**** +. +

foo***

+```````````````````````````````` + + + +Rule 12: + +```````````````````````````````` example +foo ___ +. +

foo ___

+```````````````````````````````` + + +```````````````````````````````` example +foo _\__ +. +

foo _

+```````````````````````````````` + + +```````````````````````````````` example +foo _*_ +. +

foo *

+```````````````````````````````` + + +```````````````````````````````` example +foo _____ +. +

foo _____

+```````````````````````````````` + + +```````````````````````````````` example +foo __\___ +. +

foo _

+```````````````````````````````` + + +```````````````````````````````` example +foo __*__ +. +

foo *

+```````````````````````````````` + + +```````````````````````````````` example +__foo_ +. +

_foo

+```````````````````````````````` + + +Note that when delimiters do not match evenly, Rule 12 determines +that the excess literal `_` characters will appear outside of the +emphasis, rather than inside it: + +```````````````````````````````` example +_foo__ +. +

foo_

+```````````````````````````````` + + +```````````````````````````````` example +___foo__ +. +

_foo

+```````````````````````````````` + + +```````````````````````````````` example +____foo_ +. +

___foo

+```````````````````````````````` + + +```````````````````````````````` example +__foo___ +. +

foo_

+```````````````````````````````` + + +```````````````````````````````` example +_foo____ +. +

foo___

+```````````````````````````````` + + +Rule 13 implies that if you want emphasis nested directly inside +emphasis, you must use different delimiters: + +```````````````````````````````` example +**foo** +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +*_foo_* +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +__foo__ +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +_*foo*_ +. +

foo

+```````````````````````````````` + + +However, strong emphasis within strong emphasis is possible without +switching delimiters: + +```````````````````````````````` example +****foo**** +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +____foo____ +. +

foo

+```````````````````````````````` + + + +Rule 13 can be applied to arbitrarily long sequences of +delimiters: + +```````````````````````````````` example +******foo****** +. +

foo

+```````````````````````````````` + + +Rule 14: + +```````````````````````````````` example +***foo*** +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +_____foo_____ +. +

foo

+```````````````````````````````` + + +Rule 15: + +```````````````````````````````` example +*foo _bar* baz_ +. +

foo _bar baz_

+```````````````````````````````` + + +```````````````````````````````` example +*foo __bar *baz bim__ bam* +. +

foo bar *baz bim bam

+```````````````````````````````` + + +Rule 16: + +```````````````````````````````` example +**foo **bar baz** +. +

**foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +*foo *bar baz* +. +

*foo bar baz

+```````````````````````````````` + + +Rule 17: + +```````````````````````````````` example +*[bar*](/url) +. +

*bar*

+```````````````````````````````` + + +```````````````````````````````` example +_foo [bar_](/url) +. +

_foo bar_

+```````````````````````````````` + + +```````````````````````````````` example +* +. +

*

+```````````````````````````````` + + +```````````````````````````````` example +** +. +

**

+```````````````````````````````` + + +```````````````````````````````` example +__ +. +

__

+```````````````````````````````` + + +```````````````````````````````` example +*a `*`* +. +

a *

+```````````````````````````````` + + +```````````````````````````````` example +_a `_`_ +. +

a _

+```````````````````````````````` + + +```````````````````````````````` example +**a +. +

**ahttp://foo.bar/?q=**

+```````````````````````````````` + + +```````````````````````````````` example +__a +. +

__ahttp://foo.bar/?q=__

+```````````````````````````````` + + + +## Links + +A link contains [link text] (the visible text), a [link destination] +(the URI that is the link destination), and optionally a [link title]. +There are two basic kinds of links in Markdown. In [inline links] the +destination and title are given immediately after the link text. In +[reference links] the destination and title are defined elsewhere in +the document. + +A [link text](@) consists of a sequence of zero or more +inline elements enclosed by square brackets (`[` and `]`). The +following rules apply: + +- Links may not contain other links, at any level of nesting. If + multiple otherwise valid link definitions appear nested inside each + other, the inner-most definition is used. + +- Brackets are allowed in the [link text] only if (a) they + are backslash-escaped or (b) they appear as a matched pair of brackets, + with an open bracket `[`, a sequence of zero or more inlines, and + a close bracket `]`. + +- Backtick [code spans], [autolinks], and raw [HTML tags] bind more tightly + than the brackets in link text. Thus, for example, + `` [foo`]` `` could not be a link text, since the second `]` + is part of a code span. + +- The brackets in link text bind more tightly than markers for + [emphasis and strong emphasis]. Thus, for example, `*[foo*](url)` is a link. + +A [link destination](@) consists of either + +- a sequence of zero or more characters between an opening `<` and a + closing `>` that contains no line breaks or unescaped + `<` or `>` characters, or + +- a nonempty sequence of characters that does not start with + `<`, does not include ASCII space or control characters, and + includes parentheses only if (a) they are backslash-escaped or + (b) they are part of a balanced pair of unescaped parentheses. + (Implementations may impose limits on parentheses nesting to + avoid performance issues, but at least three levels of nesting + should be supported.) + +A [link title](@) consists of either + +- a sequence of zero or more characters between straight double-quote + characters (`"`), including a `"` character only if it is + backslash-escaped, or + +- a sequence of zero or more characters between straight single-quote + characters (`'`), including a `'` character only if it is + backslash-escaped, or + +- a sequence of zero or more characters between matching parentheses + (`(...)`), including a `(` or `)` character only if it is + backslash-escaped. + +Although [link titles] may span multiple lines, they may not contain +a [blank line]. + +An [inline link](@) consists of a [link text] followed immediately +by a left parenthesis `(`, optional [whitespace], an optional +[link destination], an optional [link title] separated from the link +destination by [whitespace], optional [whitespace], and a right +parenthesis `)`. The link's text consists of the inlines contained +in the [link text] (excluding the enclosing square brackets). +The link's URI consists of the link destination, excluding enclosing +`<...>` if present, with backslash-escapes in effect as described +above. The link's title consists of the link title, excluding its +enclosing delimiters, with backslash-escapes in effect as described +above. + +Here is a simple inline link: + +```````````````````````````````` example +[link](/uri "title") +. +

link

+```````````````````````````````` + + +The title may be omitted: + +```````````````````````````````` example +[link](/uri) +. +

link

+```````````````````````````````` + + +Both the title and the destination may be omitted: + +```````````````````````````````` example +[link]() +. +

link

+```````````````````````````````` + + +```````````````````````````````` example +[link](<>) +. +

link

+```````````````````````````````` + +The destination can only contain spaces if it is +enclosed in pointy brackets: + +```````````````````````````````` example +[link](/my uri) +. +

[link](/my uri)

+```````````````````````````````` + +```````````````````````````````` example +[link](
) +. +

link

+```````````````````````````````` + +The destination cannot contain line breaks, +even if enclosed in pointy brackets: + +```````````````````````````````` example +[link](foo +bar) +. +

[link](foo +bar)

+```````````````````````````````` + +```````````````````````````````` example +[link]() +. +

[link]()

+```````````````````````````````` + +The destination can contain `)` if it is enclosed +in pointy brackets: + +```````````````````````````````` example +[a]() +. +

a

+```````````````````````````````` + +Pointy brackets that enclose links must be unescaped: + +```````````````````````````````` example +[link]() +. +

[link](<foo>)

+```````````````````````````````` + +These are not links, because the opening pointy bracket +is not matched properly: + +```````````````````````````````` example +[a]( +[a](c) +. +

[a](<b)c +[a](<b)c> +[a](c)

+```````````````````````````````` + +Parentheses inside the link destination may be escaped: + +```````````````````````````````` example +[link](\(foo\)) +. +

link

+```````````````````````````````` + +Any number of parentheses are allowed without escaping, as long as they are +balanced: + +```````````````````````````````` example +[link](foo(and(bar))) +. +

link

+```````````````````````````````` + +However, if you have unbalanced parentheses, you need to escape or use the +`<...>` form: + +```````````````````````````````` example +[link](foo\(and\(bar\)) +. +

link

+```````````````````````````````` + + +```````````````````````````````` example +[link]() +. +

link

+```````````````````````````````` + + +Parentheses and other symbols can also be escaped, as usual +in Markdown: + +```````````````````````````````` example +[link](foo\)\:) +. +

link

+```````````````````````````````` + + +A link can contain fragment identifiers and queries: + +```````````````````````````````` example +[link](#fragment) + +[link](http://example.com#fragment) + +[link](http://example.com?foo=3#frag) +. +

link

+

link

+

link

+```````````````````````````````` + + +Note that a backslash before a non-escapable character is +just a backslash: + +```````````````````````````````` example +[link](foo\bar) +. +

link

+```````````````````````````````` + + +URL-escaping should be left alone inside the destination, as all +URL-escaped characters are also valid URL characters. Entity and +numerical character references in the destination will be parsed +into the corresponding Unicode code points, as usual. These may +be optionally URL-escaped when written as HTML, but this spec +does not enforce any particular policy for rendering URLs in +HTML or other formats. Renderers may make different decisions +about how to escape or normalize URLs in the output. + +```````````````````````````````` example +[link](foo%20bä) +. +

link

+```````````````````````````````` + + +Note that, because titles can often be parsed as destinations, +if you try to omit the destination and keep the title, you'll +get unexpected results: + +```````````````````````````````` example +[link]("title") +. +

link

+```````````````````````````````` + + +Titles may be in single quotes, double quotes, or parentheses: + +```````````````````````````````` example +[link](/url "title") +[link](/url 'title') +[link](/url (title)) +. +

link +link +link

+```````````````````````````````` + + +Backslash escapes and entity and numeric character references +may be used in titles: + +```````````````````````````````` example +[link](/url "title \""") +. +

link

+```````````````````````````````` + + +Titles must be separated from the link using a [whitespace]. +Other [Unicode whitespace] like non-breaking space doesn't work. + +```````````````````````````````` example +[link](/url "title") +. +

link

+```````````````````````````````` + + +Nested balanced quotes are not allowed without escaping: + +```````````````````````````````` example +[link](/url "title "and" title") +. +

[link](/url "title "and" title")

+```````````````````````````````` + + +But it is easy to work around this by using a different quote type: + +```````````````````````````````` example +[link](/url 'title "and" title') +. +

link

+```````````````````````````````` + + +(Note: `Markdown.pl` did allow double quotes inside a double-quoted +title, and its test suite included a test demonstrating this. +But it is hard to see a good rationale for the extra complexity this +brings, since there are already many ways---backslash escaping, +entity and numeric character references, or using a different +quote type for the enclosing title---to write titles containing +double quotes. `Markdown.pl`'s handling of titles has a number +of other strange features. For example, it allows single-quoted +titles in inline links, but not reference links. And, in +reference links but not inline links, it allows a title to begin +with `"` and end with `)`. `Markdown.pl` 1.0.1 even allows +titles with no closing quotation mark, though 1.0.2b8 does not. +It seems preferable to adopt a simple, rational rule that works +the same way in inline links and link reference definitions.) + +[Whitespace] is allowed around the destination and title: + +```````````````````````````````` example +[link]( /uri + "title" ) +. +

link

+```````````````````````````````` + + +But it is not allowed between the link text and the +following parenthesis: + +```````````````````````````````` example +[link] (/uri) +. +

[link] (/uri)

+```````````````````````````````` + + +The link text may contain balanced brackets, but not unbalanced ones, +unless they are escaped: + +```````````````````````````````` example +[link [foo [bar]]](/uri) +. +

link [foo [bar]]

+```````````````````````````````` + + +```````````````````````````````` example +[link] bar](/uri) +. +

[link] bar](/uri)

+```````````````````````````````` + + +```````````````````````````````` example +[link [bar](/uri) +. +

[link bar

+```````````````````````````````` + + +```````````````````````````````` example +[link \[bar](/uri) +. +

link [bar

+```````````````````````````````` + + +The link text may contain inline content: + +```````````````````````````````` example +[link *foo **bar** `#`*](/uri) +. +

link foo bar #

+```````````````````````````````` + + +```````````````````````````````` example +[![moon](moon.jpg)](/uri) +. +

moon

+```````````````````````````````` + + +However, links may not contain other links, at any level of nesting. + +```````````````````````````````` example +[foo [bar](/uri)](/uri) +. +

[foo bar](/uri)

+```````````````````````````````` + + +```````````````````````````````` example +[foo *[bar [baz](/uri)](/uri)*](/uri) +. +

[foo [bar baz](/uri)](/uri)

+```````````````````````````````` + + +```````````````````````````````` example +![[[foo](uri1)](uri2)](uri3) +. +

[foo](uri2)

+```````````````````````````````` + + +These cases illustrate the precedence of link text grouping over +emphasis grouping: + +```````````````````````````````` example +*[foo*](/uri) +. +

*foo*

+```````````````````````````````` + + +```````````````````````````````` example +[foo *bar](baz*) +. +

foo *bar

+```````````````````````````````` + + +Note that brackets that *aren't* part of links do not take +precedence: + +```````````````````````````````` example +*foo [bar* baz] +. +

foo [bar baz]

+```````````````````````````````` + + +These cases illustrate the precedence of HTML tags, code spans, +and autolinks over link grouping: + +```````````````````````````````` example +[foo +. +

[foo

+```````````````````````````````` + + +```````````````````````````````` example +[foo`](/uri)` +. +

[foo](/uri)

+```````````````````````````````` + + +```````````````````````````````` example +[foo +. +

[foohttp://example.com/?search=](uri)

+```````````````````````````````` + + +There are three kinds of [reference link](@)s: +[full](#full-reference-link), [collapsed](#collapsed-reference-link), +and [shortcut](#shortcut-reference-link). + +A [full reference link](@) +consists of a [link text] immediately followed by a [link label] +that [matches] a [link reference definition] elsewhere in the document. + +A [link label](@) begins with a left bracket (`[`) and ends +with the first right bracket (`]`) that is not backslash-escaped. +Between these brackets there must be at least one [non-whitespace character]. +Unescaped square bracket characters are not allowed inside the +opening and closing square brackets of [link labels]. A link +label can have at most 999 characters inside the square +brackets. + +One label [matches](@) +another just in case their normalized forms are equal. To normalize a +label, strip off the opening and closing brackets, +perform the *Unicode case fold*, strip leading and trailing +[whitespace] and collapse consecutive internal +[whitespace] to a single space. If there are multiple +matching reference link definitions, the one that comes first in the +document is used. (It is desirable in such cases to emit a warning.) + +The contents of the first link label are parsed as inlines, which are +used as the link's text. The link's URI and title are provided by the +matching [link reference definition]. + +Here is a simple example: + +```````````````````````````````` example +[foo][bar] + +[bar]: /url "title" +. +

foo

+```````````````````````````````` + + +The rules for the [link text] are the same as with +[inline links]. Thus: + +The link text may contain balanced brackets, but not unbalanced ones, +unless they are escaped: + +```````````````````````````````` example +[link [foo [bar]]][ref] + +[ref]: /uri +. +

link [foo [bar]]

+```````````````````````````````` + + +```````````````````````````````` example +[link \[bar][ref] + +[ref]: /uri +. +

link [bar

+```````````````````````````````` + + +The link text may contain inline content: + +```````````````````````````````` example +[link *foo **bar** `#`*][ref] + +[ref]: /uri +. +

link foo bar #

+```````````````````````````````` + + +```````````````````````````````` example +[![moon](moon.jpg)][ref] + +[ref]: /uri +. +

moon

+```````````````````````````````` + + +However, links may not contain other links, at any level of nesting. + +```````````````````````````````` example +[foo [bar](/uri)][ref] + +[ref]: /uri +. +

[foo bar]ref

+```````````````````````````````` + + +```````````````````````````````` example +[foo *bar [baz][ref]*][ref] + +[ref]: /uri +. +

[foo bar baz]ref

+```````````````````````````````` + + +(In the examples above, we have two [shortcut reference links] +instead of one [full reference link].) + +The following cases illustrate the precedence of link text grouping over +emphasis grouping: + +```````````````````````````````` example +*[foo*][ref] + +[ref]: /uri +. +

*foo*

+```````````````````````````````` + + +```````````````````````````````` example +[foo *bar][ref] + +[ref]: /uri +. +

foo *bar

+```````````````````````````````` + + +These cases illustrate the precedence of HTML tags, code spans, +and autolinks over link grouping: + +```````````````````````````````` example +[foo + +[ref]: /uri +. +

[foo

+```````````````````````````````` + + +```````````````````````````````` example +[foo`][ref]` + +[ref]: /uri +. +

[foo][ref]

+```````````````````````````````` + + +```````````````````````````````` example +[foo + +[ref]: /uri +. +

[foohttp://example.com/?search=][ref]

+```````````````````````````````` + + +Matching is case-insensitive: + +```````````````````````````````` example +[foo][BaR] + +[bar]: /url "title" +. +

foo

+```````````````````````````````` + + +Unicode case fold is used: + +```````````````````````````````` example +[Толпой][Толпой] is a Russian word. + +[ТОЛПОЙ]: /url +. +

Толпой is a Russian word.

+```````````````````````````````` + + +Consecutive internal [whitespace] is treated as one space for +purposes of determining matching: + +```````````````````````````````` example +[Foo + bar]: /url + +[Baz][Foo bar] +. +

Baz

+```````````````````````````````` + + +No [whitespace] is allowed between the [link text] and the +[link label]: + +```````````````````````````````` example +[foo] [bar] + +[bar]: /url "title" +. +

[foo] bar

+```````````````````````````````` + + +```````````````````````````````` example +[foo] +[bar] + +[bar]: /url "title" +. +

[foo] +bar

+```````````````````````````````` + + +This is a departure from John Gruber's original Markdown syntax +description, which explicitly allows whitespace between the link +text and the link label. It brings reference links in line with +[inline links], which (according to both original Markdown and +this spec) cannot have whitespace after the link text. More +importantly, it prevents inadvertent capture of consecutive +[shortcut reference links]. If whitespace is allowed between the +link text and the link label, then in the following we will have +a single reference link, not two shortcut reference links, as +intended: + +``` markdown +[foo] +[bar] + +[foo]: /url1 +[bar]: /url2 +``` + +(Note that [shortcut reference links] were introduced by Gruber +himself in a beta version of `Markdown.pl`, but never included +in the official syntax description. Without shortcut reference +links, it is harmless to allow space between the link text and +link label; but once shortcut references are introduced, it is +too dangerous to allow this, as it frequently leads to +unintended results.) + +When there are multiple matching [link reference definitions], +the first is used: + +```````````````````````````````` example +[foo]: /url1 + +[foo]: /url2 + +[bar][foo] +. +

bar

+```````````````````````````````` + + +Note that matching is performed on normalized strings, not parsed +inline content. So the following does not match, even though the +labels define equivalent inline content: + +```````````````````````````````` example +[bar][foo\!] + +[foo!]: /url +. +

[bar][foo!]

+```````````````````````````````` + + +[Link labels] cannot contain brackets, unless they are +backslash-escaped: + +```````````````````````````````` example +[foo][ref[] + +[ref[]: /uri +. +

[foo][ref[]

+

[ref[]: /uri

+```````````````````````````````` + + +```````````````````````````````` example +[foo][ref[bar]] + +[ref[bar]]: /uri +. +

[foo][ref[bar]]

+

[ref[bar]]: /uri

+```````````````````````````````` + + +```````````````````````````````` example +[[[foo]]] + +[[[foo]]]: /url +. +

[[[foo]]]

+

[[[foo]]]: /url

+```````````````````````````````` + + +```````````````````````````````` example +[foo][ref\[] + +[ref\[]: /uri +. +

foo

+```````````````````````````````` + + +Note that in this example `]` is not backslash-escaped: + +```````````````````````````````` example +[bar\\]: /uri + +[bar\\] +. +

bar\

+```````````````````````````````` + + +A [link label] must contain at least one [non-whitespace character]: + +```````````````````````````````` example +[] + +[]: /uri +. +

[]

+

[]: /uri

+```````````````````````````````` + + +```````````````````````````````` example +[ + ] + +[ + ]: /uri +. +

[ +]

+

[ +]: /uri

+```````````````````````````````` + + +A [collapsed reference link](@) +consists of a [link label] that [matches] a +[link reference definition] elsewhere in the +document, followed by the string `[]`. +The contents of the first link label are parsed as inlines, +which are used as the link's text. The link's URI and title are +provided by the matching reference link definition. Thus, +`[foo][]` is equivalent to `[foo][foo]`. + +```````````````````````````````` example +[foo][] + +[foo]: /url "title" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +[*foo* bar][] + +[*foo* bar]: /url "title" +. +

foo bar

+```````````````````````````````` + + +The link labels are case-insensitive: + +```````````````````````````````` example +[Foo][] + +[foo]: /url "title" +. +

Foo

+```````````````````````````````` + + + +As with full reference links, [whitespace] is not +allowed between the two sets of brackets: + +```````````````````````````````` example +[foo] +[] + +[foo]: /url "title" +. +

foo +[]

+```````````````````````````````` + + +A [shortcut reference link](@) +consists of a [link label] that [matches] a +[link reference definition] elsewhere in the +document and is not followed by `[]` or a link label. +The contents of the first link label are parsed as inlines, +which are used as the link's text. The link's URI and title +are provided by the matching link reference definition. +Thus, `[foo]` is equivalent to `[foo][]`. + +```````````````````````````````` example +[foo] + +[foo]: /url "title" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +[*foo* bar] + +[*foo* bar]: /url "title" +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +[[*foo* bar]] + +[*foo* bar]: /url "title" +. +

[foo bar]

+```````````````````````````````` + + +```````````````````````````````` example +[[bar [foo] + +[foo]: /url +. +

[[bar foo

+```````````````````````````````` + + +The link labels are case-insensitive: + +```````````````````````````````` example +[Foo] + +[foo]: /url "title" +. +

Foo

+```````````````````````````````` + + +A space after the link text should be preserved: + +```````````````````````````````` example +[foo] bar + +[foo]: /url +. +

foo bar

+```````````````````````````````` + + +If you just want bracketed text, you can backslash-escape the +opening bracket to avoid links: + +```````````````````````````````` example +\[foo] + +[foo]: /url "title" +. +

[foo]

+```````````````````````````````` + + +Note that this is a link, because a link label ends with the first +following closing bracket: + +```````````````````````````````` example +[foo*]: /url + +*[foo*] +. +

*foo*

+```````````````````````````````` + + +Full and compact references take precedence over shortcut +references: + +```````````````````````````````` example +[foo][bar] + +[foo]: /url1 +[bar]: /url2 +. +

foo

+```````````````````````````````` + +```````````````````````````````` example +[foo][] + +[foo]: /url1 +. +

foo

+```````````````````````````````` + +Inline links also take precedence: + +```````````````````````````````` example +[foo]() + +[foo]: /url1 +. +

foo

+```````````````````````````````` + +```````````````````````````````` example +[foo](not a link) + +[foo]: /url1 +. +

foo(not a link)

+```````````````````````````````` + +In the following case `[bar][baz]` is parsed as a reference, +`[foo]` as normal text: + +```````````````````````````````` example +[foo][bar][baz] + +[baz]: /url +. +

[foo]bar

+```````````````````````````````` + + +Here, though, `[foo][bar]` is parsed as a reference, since +`[bar]` is defined: + +```````````````````````````````` example +[foo][bar][baz] + +[baz]: /url1 +[bar]: /url2 +. +

foobaz

+```````````````````````````````` + + +Here `[foo]` is not parsed as a shortcut reference, because it +is followed by a link label (even though `[bar]` is not defined): + +```````````````````````````````` example +[foo][bar][baz] + +[baz]: /url1 +[foo]: /url2 +. +

[foo]bar

+```````````````````````````````` + + + +## Images + +Syntax for images is like the syntax for links, with one +difference. Instead of [link text], we have an +[image description](@). The rules for this are the +same as for [link text], except that (a) an +image description starts with `![` rather than `[`, and +(b) an image description may contain links. +An image description has inline elements +as its contents. When an image is rendered to HTML, +this is standardly used as the image's `alt` attribute. + +```````````````````````````````` example +![foo](/url "title") +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +![foo *bar*] + +[foo *bar*]: train.jpg "train & tracks" +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +![foo ![bar](/url)](/url2) +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +![foo [bar](/url)](/url2) +. +

foo bar

+```````````````````````````````` + + +Though this spec is concerned with parsing, not rendering, it is +recommended that in rendering to HTML, only the plain string content +of the [image description] be used. Note that in +the above example, the alt attribute's value is `foo bar`, not `foo +[bar](/url)` or `foo bar`. Only the plain string +content is rendered, without formatting. + +```````````````````````````````` example +![foo *bar*][] + +[foo *bar*]: train.jpg "train & tracks" +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +![foo *bar*][foobar] + +[FOOBAR]: train.jpg "train & tracks" +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +![foo](train.jpg) +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +My ![foo bar](/path/to/train.jpg "title" ) +. +

My foo bar

+```````````````````````````````` + + +```````````````````````````````` example +![foo]() +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +![](/url) +. +

+```````````````````````````````` + + +Reference-style: + +```````````````````````````````` example +![foo][bar] + +[bar]: /url +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +![foo][bar] + +[BAR]: /url +. +

foo

+```````````````````````````````` + + +Collapsed: + +```````````````````````````````` example +![foo][] + +[foo]: /url "title" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +![*foo* bar][] + +[*foo* bar]: /url "title" +. +

foo bar

+```````````````````````````````` + + +The labels are case-insensitive: + +```````````````````````````````` example +![Foo][] + +[foo]: /url "title" +. +

Foo

+```````````````````````````````` + + +As with reference links, [whitespace] is not allowed +between the two sets of brackets: + +```````````````````````````````` example +![foo] +[] + +[foo]: /url "title" +. +

foo +[]

+```````````````````````````````` + + +Shortcut: + +```````````````````````````````` example +![foo] + +[foo]: /url "title" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +![*foo* bar] + +[*foo* bar]: /url "title" +. +

foo bar

+```````````````````````````````` + + +Note that link labels cannot contain unescaped brackets: + +```````````````````````````````` example +![[foo]] + +[[foo]]: /url "title" +. +

![[foo]]

+

[[foo]]: /url "title"

+```````````````````````````````` + + +The link labels are case-insensitive: + +```````````````````````````````` example +![Foo] + +[foo]: /url "title" +. +

Foo

+```````````````````````````````` + + +If you just want a literal `!` followed by bracketed text, you can +backslash-escape the opening `[`: + +```````````````````````````````` example +!\[foo] + +[foo]: /url "title" +. +

![foo]

+```````````````````````````````` + + +If you want a link after a literal `!`, backslash-escape the +`!`: + +```````````````````````````````` example +\![foo] + +[foo]: /url "title" +. +

!foo

+```````````````````````````````` + + +## Autolinks + +[Autolink](@)s are absolute URIs and email addresses inside +`<` and `>`. They are parsed as links, with the URL or email address +as the link label. + +A [URI autolink](@) consists of `<`, followed by an +[absolute URI] followed by `>`. It is parsed as +a link to the URI, with the URI as the link's label. + +An [absolute URI](@), +for these purposes, consists of a [scheme] followed by a colon (`:`) +followed by zero or more characters other than ASCII +[whitespace] and control characters, `<`, and `>`. If +the URI includes these characters, they must be percent-encoded +(e.g. `%20` for a space). + +For purposes of this spec, a [scheme](@) is any sequence +of 2--32 characters beginning with an ASCII letter and followed +by any combination of ASCII letters, digits, or the symbols plus +("+"), period ("."), or hyphen ("-"). + +Here are some valid autolinks: + +```````````````````````````````` example + +. +

http://foo.bar.baz

+```````````````````````````````` + + +```````````````````````````````` example + +. +

http://foo.bar.baz/test?q=hello&id=22&boolean

+```````````````````````````````` + + +```````````````````````````````` example + +. +

irc://foo.bar:2233/baz

+```````````````````````````````` + + +Uppercase is also fine: + +```````````````````````````````` example + +. +

MAILTO:FOO@BAR.BAZ

+```````````````````````````````` + + +Note that many strings that count as [absolute URIs] for +purposes of this spec are not valid URIs, because their +schemes are not registered or because of other problems +with their syntax: + +```````````````````````````````` example + +. +

a+b+c:d

+```````````````````````````````` + + +```````````````````````````````` example + +. +

made-up-scheme://foo,bar

+```````````````````````````````` + + +```````````````````````````````` example + +. +

http://../

+```````````````````````````````` + + +```````````````````````````````` example + +. +

localhost:5001/foo

+```````````````````````````````` + + +Spaces are not allowed in autolinks: + +```````````````````````````````` example + +. +

<http://foo.bar/baz bim>

+```````````````````````````````` + + +Backslash-escapes do not work inside autolinks: + +```````````````````````````````` example + +. +

http://example.com/\[\

+```````````````````````````````` + + +An [email autolink](@) +consists of `<`, followed by an [email address], +followed by `>`. The link's label is the email address, +and the URL is `mailto:` followed by the email address. + +An [email address](@), +for these purposes, is anything that matches +the [non-normative regex from the HTML5 +spec](https://html.spec.whatwg.org/multipage/forms.html#e-mail-state-(type=email)): + + /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])? + (?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/ + +Examples of email autolinks: + +```````````````````````````````` example + +. +

foo@bar.example.com

+```````````````````````````````` + + +```````````````````````````````` example + +. +

foo+special@Bar.baz-bar0.com

+```````````````````````````````` + + +Backslash-escapes do not work inside email autolinks: + +```````````````````````````````` example + +. +

<foo+@bar.example.com>

+```````````````````````````````` + + +These are not autolinks: + +```````````````````````````````` example +<> +. +

<>

+```````````````````````````````` + + +```````````````````````````````` example +< http://foo.bar > +. +

< http://foo.bar >

+```````````````````````````````` + + +```````````````````````````````` example + +. +

<m:abc>

+```````````````````````````````` + + +```````````````````````````````` example + +. +

<foo.bar.baz>

+```````````````````````````````` + + +```````````````````````````````` example +http://example.com +. +

http://example.com

+```````````````````````````````` + + +```````````````````````````````` example +foo@bar.example.com +. +

foo@bar.example.com

+```````````````````````````````` + + +## Raw HTML + +Text between `<` and `>` that looks like an HTML tag is parsed as a +raw HTML tag and will be rendered in HTML without escaping. +Tag and attribute names are not limited to current HTML tags, +so custom tags (and even, say, DocBook tags) may be used. + +Here is the grammar for tags: + +A [tag name](@) consists of an ASCII letter +followed by zero or more ASCII letters, digits, or +hyphens (`-`). + +An [attribute](@) consists of [whitespace], +an [attribute name], and an optional +[attribute value specification]. + +An [attribute name](@) +consists of an ASCII letter, `_`, or `:`, followed by zero or more ASCII +letters, digits, `_`, `.`, `:`, or `-`. (Note: This is the XML +specification restricted to ASCII. HTML5 is laxer.) + +An [attribute value specification](@) +consists of optional [whitespace], +a `=` character, optional [whitespace], and an [attribute +value]. + +An [attribute value](@) +consists of an [unquoted attribute value], +a [single-quoted attribute value], or a [double-quoted attribute value]. + +An [unquoted attribute value](@) +is a nonempty string of characters not +including [whitespace], `"`, `'`, `=`, `<`, `>`, or `` ` ``. + +A [single-quoted attribute value](@) +consists of `'`, zero or more +characters not including `'`, and a final `'`. + +A [double-quoted attribute value](@) +consists of `"`, zero or more +characters not including `"`, and a final `"`. + +An [open tag](@) consists of a `<` character, a [tag name], +zero or more [attributes], optional [whitespace], an optional `/` +character, and a `>` character. + +A [closing tag](@) consists of the string ``. + +An [HTML comment](@) consists of ``, +where *text* does not start with `>` or `->`, does not end with `-`, +and does not contain `--`. (See the +[HTML5 spec](http://www.w3.org/TR/html5/syntax.html#comments).) + +A [processing instruction](@) +consists of the string ``, and the string +`?>`. + +A [declaration](@) consists of the +string ``, and the character `>`. + +A [CDATA section](@) consists of +the string ``, and the string `]]>`. + +An [HTML tag](@) consists of an [open tag], a [closing tag], +an [HTML comment], a [processing instruction], a [declaration], +or a [CDATA section]. + +Here are some simple open tags: + +```````````````````````````````` example + +. +

+```````````````````````````````` + + +Empty elements: + +```````````````````````````````` example + +. +

+```````````````````````````````` + + +[Whitespace] is allowed: + +```````````````````````````````` example + +. +

+```````````````````````````````` + + +With attributes: + +```````````````````````````````` example + +. +

+```````````````````````````````` + + +Custom tag names can be used: + +```````````````````````````````` example +Foo +. +

Foo

+```````````````````````````````` + + +Illegal tag names, not parsed as HTML: + +```````````````````````````````` example +<33> <__> +. +

<33> <__>

+```````````````````````````````` + + +Illegal attribute names: + +```````````````````````````````` example +
+. +

<a h*#ref="hi">

+```````````````````````````````` + + +Illegal attribute values: + +```````````````````````````````` example +
+. +

</a href="foo">

+```````````````````````````````` + + +Comments: + +```````````````````````````````` example +foo +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +foo +. +

foo <!-- not a comment -- two hyphens -->

+```````````````````````````````` + + +Not comments: + +```````````````````````````````` example +foo foo --> + +foo +. +

foo <!--> foo -->

+

foo <!-- foo--->

+```````````````````````````````` + + +Processing instructions: + +```````````````````````````````` example +foo +. +

foo

+```````````````````````````````` + + +Declarations: + +```````````````````````````````` example +foo +. +

foo

+```````````````````````````````` + + +CDATA sections: + +```````````````````````````````` example +foo &<]]> +. +

foo &<]]>

+```````````````````````````````` + + +Entity and numeric character references are preserved in HTML +attributes: + +```````````````````````````````` example +foo
+. +

foo

+```````````````````````````````` + + +Backslash escapes do not work in HTML attributes: + +```````````````````````````````` example +foo +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example + +. +

<a href=""">

+```````````````````````````````` + + +## Hard line breaks + +A line break (not in a code span or HTML tag) that is preceded +by two or more spaces and does not occur at the end of a block +is parsed as a [hard line break](@) (rendered +in HTML as a `
` tag): + +```````````````````````````````` example +foo +baz +. +

foo
+baz

+```````````````````````````````` + + +For a more visible alternative, a backslash before the +[line ending] may be used instead of two spaces: + +```````````````````````````````` example +foo\ +baz +. +

foo
+baz

+```````````````````````````````` + + +More than two spaces can be used: + +```````````````````````````````` example +foo +baz +. +

foo
+baz

+```````````````````````````````` + + +Leading spaces at the beginning of the next line are ignored: + +```````````````````````````````` example +foo + bar +. +

foo
+bar

+```````````````````````````````` + + +```````````````````````````````` example +foo\ + bar +. +

foo
+bar

+```````````````````````````````` + + +Line breaks can occur inside emphasis, links, and other constructs +that allow inline content: + +```````````````````````````````` example +*foo +bar* +. +

foo
+bar

+```````````````````````````````` + + +```````````````````````````````` example +*foo\ +bar* +. +

foo
+bar

+```````````````````````````````` + + +Line breaks do not occur inside code spans + +```````````````````````````````` example +`code +span` +. +

code span

+```````````````````````````````` + + +```````````````````````````````` example +`code\ +span` +. +

code\ span

+```````````````````````````````` + + +or HTML tags: + +```````````````````````````````` example +
+. +

+```````````````````````````````` + + +```````````````````````````````` example + +. +

+```````````````````````````````` + + +Hard line breaks are for separating inline content within a block. +Neither syntax for hard line breaks works at the end of a paragraph or +other block element: + +```````````````````````````````` example +foo\ +. +

foo\

+```````````````````````````````` + + +```````````````````````````````` example +foo +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +### foo\ +. +

foo\

+```````````````````````````````` + + +```````````````````````````````` example +### foo +. +

foo

+```````````````````````````````` + + +## Soft line breaks + +A regular line break (not in a code span or HTML tag) that is not +preceded by two or more spaces or a backslash is parsed as a +[softbreak](@). (A softbreak may be rendered in HTML either as a +[line ending] or as a space. The result will be the same in +browsers. In the examples here, a [line ending] will be used.) + +```````````````````````````````` example +foo +baz +. +

foo +baz

+```````````````````````````````` + + +Spaces at the end of the line and beginning of the next line are +removed: + +```````````````````````````````` example +foo + baz +. +

foo +baz

+```````````````````````````````` + + +A conforming parser may render a soft line break in HTML either as a +line break or as a space. + +A renderer may also provide an option to render soft line breaks +as hard line breaks. + +## Textual content + +Any characters not given an interpretation by the above rules will +be parsed as plain textual content. + +```````````````````````````````` example +hello $.;'there +. +

hello $.;'there

+```````````````````````````````` + + +```````````````````````````````` example +Foo χρῆν +. +

Foo χρῆν

+```````````````````````````````` + + +Internal spaces are preserved verbatim: + +```````````````````````````````` example +Multiple spaces +. +

Multiple spaces

+```````````````````````````````` + + + + +# Appendix: A parsing strategy + +In this appendix we describe some features of the parsing strategy +used in the CommonMark reference implementations. + +## Overview + +Parsing has two phases: + +1. In the first phase, lines of input are consumed and the block +structure of the document---its division into paragraphs, block quotes, +list items, and so on---is constructed. Text is assigned to these +blocks but not parsed. Link reference definitions are parsed and a +map of links is constructed. + +2. In the second phase, the raw text contents of paragraphs and headings +are parsed into sequences of Markdown inline elements (strings, +code spans, links, emphasis, and so on), using the map of link +references constructed in phase 1. + +At each point in processing, the document is represented as a tree of +**blocks**. The root of the tree is a `document` block. The `document` +may have any number of other blocks as **children**. These children +may, in turn, have other blocks as children. The last child of a block +is normally considered **open**, meaning that subsequent lines of input +can alter its contents. (Blocks that are not open are **closed**.) +Here, for example, is a possible document tree, with the open blocks +marked by arrows: + +``` tree +-> document + -> block_quote + paragraph + "Lorem ipsum dolor\nsit amet." + -> list (type=bullet tight=true bullet_char=-) + list_item + paragraph + "Qui *quodsi iracundia*" + -> list_item + -> paragraph + "aliquando id" +``` + +## Phase 1: block structure + +Each line that is processed has an effect on this tree. The line is +analyzed and, depending on its contents, the document may be altered +in one or more of the following ways: + +1. One or more open blocks may be closed. +2. One or more new blocks may be created as children of the + last open block. +3. Text may be added to the last (deepest) open block remaining + on the tree. + +Once a line has been incorporated into the tree in this way, +it can be discarded, so input can be read in a stream. + +For each line, we follow this procedure: + +1. First we iterate through the open blocks, starting with the +root document, and descending through last children down to the last +open block. Each block imposes a condition that the line must satisfy +if the block is to remain open. For example, a block quote requires a +`>` character. A paragraph requires a non-blank line. +In this phase we may match all or just some of the open +blocks. But we cannot close unmatched blocks yet, because we may have a +[lazy continuation line]. + +2. Next, after consuming the continuation markers for existing +blocks, we look for new block starts (e.g. `>` for a block quote). +If we encounter a new block start, we close any blocks unmatched +in step 1 before creating the new block as a child of the last +matched block. + +3. Finally, we look at the remainder of the line (after block +markers like `>`, list markers, and indentation have been consumed). +This is text that can be incorporated into the last open +block (a paragraph, code block, heading, or raw HTML). + +Setext headings are formed when we see a line of a paragraph +that is a [setext heading underline]. + +Reference link definitions are detected when a paragraph is closed; +the accumulated text lines are parsed to see if they begin with +one or more reference link definitions. Any remainder becomes a +normal paragraph. + +We can see how this works by considering how the tree above is +generated by four lines of Markdown: + +``` markdown +> Lorem ipsum dolor +sit amet. +> - Qui *quodsi iracundia* +> - aliquando id +``` + +At the outset, our document model is just + +``` tree +-> document +``` + +The first line of our text, + +``` markdown +> Lorem ipsum dolor +``` + +causes a `block_quote` block to be created as a child of our +open `document` block, and a `paragraph` block as a child of +the `block_quote`. Then the text is added to the last open +block, the `paragraph`: + +``` tree +-> document + -> block_quote + -> paragraph + "Lorem ipsum dolor" +``` + +The next line, + +``` markdown +sit amet. +``` + +is a "lazy continuation" of the open `paragraph`, so it gets added +to the paragraph's text: + +``` tree +-> document + -> block_quote + -> paragraph + "Lorem ipsum dolor\nsit amet." +``` + +The third line, + +``` markdown +> - Qui *quodsi iracundia* +``` + +causes the `paragraph` block to be closed, and a new `list` block +opened as a child of the `block_quote`. A `list_item` is also +added as a child of the `list`, and a `paragraph` as a child of +the `list_item`. The text is then added to the new `paragraph`: + +``` tree +-> document + -> block_quote + paragraph + "Lorem ipsum dolor\nsit amet." + -> list (type=bullet tight=true bullet_char=-) + -> list_item + -> paragraph + "Qui *quodsi iracundia*" +``` + +The fourth line, + +``` markdown +> - aliquando id +``` + +causes the `list_item` (and its child the `paragraph`) to be closed, +and a new `list_item` opened up as child of the `list`. A `paragraph` +is added as a child of the new `list_item`, to contain the text. +We thus obtain the final tree: + +``` tree +-> document + -> block_quote + paragraph + "Lorem ipsum dolor\nsit amet." + -> list (type=bullet tight=true bullet_char=-) + list_item + paragraph + "Qui *quodsi iracundia*" + -> list_item + -> paragraph + "aliquando id" +``` + +## Phase 2: inline structure + +Once all of the input has been parsed, all open blocks are closed. + +We then "walk the tree," visiting every node, and parse raw +string contents of paragraphs and headings as inlines. At this +point we have seen all the link reference definitions, so we can +resolve reference links as we go. + +``` tree +document + block_quote + paragraph + str "Lorem ipsum dolor" + softbreak + str "sit amet." + list (type=bullet tight=true bullet_char=-) + list_item + paragraph + str "Qui " + emph + str "quodsi iracundia" + list_item + paragraph + str "aliquando id" +``` + +Notice how the [line ending] in the first paragraph has +been parsed as a `softbreak`, and the asterisks in the first list item +have become an `emph`. + +### An algorithm for parsing nested emphasis and links + +By far the trickiest part of inline parsing is handling emphasis, +strong emphasis, links, and images. This is done using the following +algorithm. + +When we're parsing inlines and we hit either + +- a run of `*` or `_` characters, or +- a `[` or `![` + +we insert a text node with these symbols as its literal content, and we +add a pointer to this text node to the [delimiter stack](@). + +The [delimiter stack] is a doubly linked list. Each +element contains a pointer to a text node, plus information about + +- the type of delimiter (`[`, `![`, `*`, `_`) +- the number of delimiters, +- whether the delimiter is "active" (all are active to start), and +- whether the delimiter is a potential opener, a potential closer, + or both (which depends on what sort of characters precede + and follow the delimiters). + +When we hit a `]` character, we call the *look for link or image* +procedure (see below). + +When we hit the end of the input, we call the *process emphasis* +procedure (see below), with `stack_bottom` = NULL. + +#### *look for link or image* + +Starting at the top of the delimiter stack, we look backwards +through the stack for an opening `[` or `![` delimiter. + +- If we don't find one, we return a literal text node `]`. + +- If we do find one, but it's not *active*, we remove the inactive + delimiter from the stack, and return a literal text node `]`. + +- If we find one and it's active, then we parse ahead to see if + we have an inline link/image, reference link/image, compact reference + link/image, or shortcut reference link/image. + + + If we don't, then we remove the opening delimiter from the + delimiter stack and return a literal text node `]`. + + + If we do, then + + * We return a link or image node whose children are the inlines + after the text node pointed to by the opening delimiter. + + * We run *process emphasis* on these inlines, with the `[` opener + as `stack_bottom`. + + * We remove the opening delimiter. + + * If we have a link (and not an image), we also set all + `[` delimiters before the opening delimiter to *inactive*. (This + will prevent us from getting links within links.) + +#### *process emphasis* + +Parameter `stack_bottom` sets a lower bound to how far we +descend in the [delimiter stack]. If it is NULL, we can +go all the way to the bottom. Otherwise, we stop before +visiting `stack_bottom`. + +Let `current_position` point to the element on the [delimiter stack] +just above `stack_bottom` (or the first element if `stack_bottom` +is NULL). + +We keep track of the `openers_bottom` for each delimiter +type (`*`, `_`) and each length of the closing delimiter run +(modulo 3). Initialize this to `stack_bottom`. + +Then we repeat the following until we run out of potential +closers: + +- Move `current_position` forward in the delimiter stack (if needed) + until we find the first potential closer with delimiter `*` or `_`. + (This will be the potential closer closest + to the beginning of the input -- the first one in parse order.) + +- Now, look back in the stack (staying above `stack_bottom` and + the `openers_bottom` for this delimiter type) for the + first matching potential opener ("matching" means same delimiter). + +- If one is found: + + + Figure out whether we have emphasis or strong emphasis: + if both closer and opener spans have length >= 2, we have + strong, otherwise regular. + + + Insert an emph or strong emph node accordingly, after + the text node corresponding to the opener. + + + Remove any delimiters between the opener and closer from + the delimiter stack. + + + Remove 1 (for regular emph) or 2 (for strong emph) delimiters + from the opening and closing text nodes. If they become empty + as a result, remove them and remove the corresponding element + of the delimiter stack. If the closing node is removed, reset + `current_position` to the next element in the stack. + +- If none is found: + + + Set `openers_bottom` to the element before `current_position`. + (We know that there are no openers for this kind of closer up to and + including this point, so this puts a lower bound on future searches.) + + + If the closer at `current_position` is not a potential opener, + remove it from the delimiter stack (since we know it can't + be a closer either). + + + Advance `current_position` to the next element in the stack. + +After we're done, we remove all delimiters above `stack_bottom` from the +delimiter stack. + diff --git a/vendor/pulldown-cmark/third_party/GitHub/LICENSE b/vendor/pulldown-cmark/third_party/GitHub/LICENSE new file mode 100644 index 0000000000..db88a81b3e --- /dev/null +++ b/vendor/pulldown-cmark/third_party/GitHub/LICENSE @@ -0,0 +1,170 @@ +Copyright (c) 2014, John MacFarlane + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +----- + +houdini.h, houdini_href_e.c, houdini_html_e.c, houdini_html_u.c + +derive from https://github.com/vmg/houdini (with some modifications) + +Copyright (C) 2012 Vicent Martí + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +buffer.h, buffer.c, chunk.h + +are derived from code (C) 2012 Github, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +utf8.c and utf8.c + +are derived from utf8proc +(), +(C) 2009 Public Software Group e. V., Berlin, Germany. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +----- + +The normalization code in normalize.py was derived from the +markdowntest project, Copyright 2013 Karl Dubost: + +The MIT License (MIT) + +Copyright (c) 2013 Karl Dubost + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The CommonMark spec (test/spec.txt) is + +Copyright (C) 2014-15 John MacFarlane + +Released under the Creative Commons CC-BY-SA 4.0 license: +. + +----- + +The test software in test/ is + +Copyright (c) 2014, John MacFarlane + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/pulldown-cmark/third_party/GitHub/gfm_strikethrough.txt b/vendor/pulldown-cmark/third_party/GitHub/gfm_strikethrough.txt new file mode 100644 index 0000000000..277df06cf6 --- /dev/null +++ b/vendor/pulldown-cmark/third_party/GitHub/gfm_strikethrough.txt @@ -0,0 +1,27 @@ +// This is a slightly modified (replaced example strikethrough by example) of the +// table section from GitHub's spec.txt + +## Strikethrough (extension) + +GFM enables the `strikethrough` extension, where an additional emphasis type is +available. + +Strikethrough text is any text wrapped in two tildes (`~`). + +```````````````````````````````` example +~~Hi~~ Hello, world! +. +

Hi Hello, world!

+```````````````````````````````` + +As with regular emphasis delimiters, a new paragraph will cause strikethrough +parsing to cease: + +```````````````````````````````` example +This ~~has a + +new paragraph~~. +. +

This ~~has a

+

new paragraph~~.

+```````````````````````````````` diff --git a/vendor/pulldown-cmark/third_party/GitHub/gfm_table.txt b/vendor/pulldown-cmark/third_party/GitHub/gfm_table.txt new file mode 100644 index 0000000000..e753f81c92 --- /dev/null +++ b/vendor/pulldown-cmark/third_party/GitHub/gfm_table.txt @@ -0,0 +1,208 @@ +// This is a slightly modified (replaced example table by example) of the +// table section from GitHub's spec.txt + +## Tables (extension) + +GFM enables the `table` extension, where an additional leaf block type is +available. + +A [table](@) is an arrangement of data with rows and columns, consisting of a +single header row, a [delimiter row] separating the header from the data, and +zero or more data rows. + +Each row consists of cells containing arbitrary text, in which [inlines] are +parsed, separated by pipes (`|`). A leading and trailing pipe is also +recommended for clarity of reading, and if there's otherwise parsing ambiguity. +Spaces between pipes and cell content are trimmed. Block-level elements cannot +be inserted in a table. + +The [delimiter row](@) consists of cells whose only content are hyphens (`-`), +and optionally, a leading or trailing colon (`:`), or both, to indicate left, +right, or center alignment respectively. + +```````````````````````````````` example +| foo | bar | +| --- | --- | +| baz | bim | +. + + + + + + + + + + + + + +
foobar
bazbim
+```````````````````````````````` + +Cells in one column don't need to match length, though it's easier to read if +they are. Likewise, use of leading and trailing pipes may be inconsistent: + +```````````````````````````````` example +| abc | defghi | +:-: | -----------: +bar | baz +. + + + + + + + + + + + + + +
abcdefghi
barbaz
+```````````````````````````````` + +Include a pipe in a cell's content by escaping it, including inside other +inline spans: + +```````````````````````````````` example +| f\|oo | +| ------ | +| b `\|` az | +| b **\|** im | +. + + + + + + + + + + + + + + +
f|oo
b | az
b | im
+```````````````````````````````` + +The table is broken at the first empty line, or beginning of another +block-level structure: + +```````````````````````````````` example +| abc | def | +| --- | --- | +| bar | baz | +> bar +. + + + + + + + + + + + + + +
abcdef
barbaz
+
+

bar

+
+```````````````````````````````` + +```````````````````````````````` example +| abc | def | +| --- | --- | +| bar | baz | +bar + +bar +. + + + + + + + + + + + + + + + + + +
abcdef
barbaz
bar
+

bar

+```````````````````````````````` + +The header row must match the [delimiter row] in the number of cells. If not, +a table will not be recognized: + +```````````````````````````````` example +| abc | def | +| --- | +| bar | +. +

| abc | def | +| --- | +| bar |

+```````````````````````````````` + +The remainder of the table's rows may vary in the number of cells. If there +are a number of cells fewer than the number of cells in the header row, empty +cells are inserted. If there are greater, the excess is ignored: + +```````````````````````````````` example +| abc | def | +| --- | --- | +| bar | +| bar | baz | boo | +. + + + + + + + + + + + + + + + + + +
abcdef
bar
barbaz
+```````````````````````````````` + +If there are no rows in the body, no `` is generated in HTML output: + +```````````````````````````````` example +| abc | def | +| --- | --- | +. + + + + + + + +
abcdef
+```````````````````````````````` diff --git a/vendor/pulldown-cmark/third_party/GitHub/gfm_tasklist.txt b/vendor/pulldown-cmark/third_party/GitHub/gfm_tasklist.txt new file mode 100644 index 0000000000..b57feccdb9 --- /dev/null +++ b/vendor/pulldown-cmark/third_party/GitHub/gfm_tasklist.txt @@ -0,0 +1,55 @@ +// This is a slightly modified (replaced example disabled by example) of the +// table section from GitHub's spec.txt + +## Task list items (extension) + +GFM enables the `tasklist` extension, where an additional processing step is +performed on [list items]. + +A [task list item](@) is a [list item][list items] where the first block in it +is a paragraph which begins with a [task list item marker] and at least one +whitespace character before any other content. + +A [task list item marker](@) consists of an optional number of spaces, a left +bracket (`[`), either a whitespace character or the letter `x` in either +lowercase or uppercase, and then a right bracket (`]`). + +When rendered, the [task list item marker] is replaced with a semantic checkbox element; +in an HTML output, this would be an `` element. + +If the character between the brackets is a whitespace character, the checkbox +is unchecked. Otherwise, the checkbox is checked. + +This spec does not define how the checkbox elements are interacted with: in practice, +implementors are free to render the checkboxes as disabled or inmutable elements, +or they may dynamically handle dynamic interactions (i.e. checking, unchecking) in +the final rendered document. + +```````````````````````````````` example +- [ ] foo +- [x] bar +. +
    +
  • foo
  • +
  • bar
  • +
+```````````````````````````````` + +Task lists can be arbitrarily nested: + +```````````````````````````````` example +- [x] foo + - [ ] bar + - [x] baz +- [ ] bim +. +
    +
  • foo +
      +
    • bar
    • +
    • baz
    • +
    +
  • +
  • bim
  • +
+```````````````````````````````` diff --git a/vendor/pulldown-cmark/third_party/GitHub/spec.txt b/vendor/pulldown-cmark/third_party/GitHub/spec.txt new file mode 100644 index 0000000000..a2c8aafa37 --- /dev/null +++ b/vendor/pulldown-cmark/third_party/GitHub/spec.txt @@ -0,0 +1,10041 @@ +--- +title: GitHub Flavored Markdown Spec +version: 0.28 +date: '2017-08-01' +license: '[CC-BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)' +... + +# Introduction + +## What is GitHub Flavored Markdown? + +GitHub Flavored Markdown, often shortened as GFM, is the dialect of Markdown +that is currently supported for user content on GitHub.com and GitHub +Enterprise. + +This formal specification, based on the CommonMark Spec, defines the syntax and +semantics of this dialect. + +GFM is a strict superset of CommonMark. All the features which are supported in +GitHub user content and that are not specified on the original CommonMark Spec +are hence known as **extensions**, and highlighted as such. + +While GFM supports a wide range of inputs, it's worth noting that GitHub.com +and GitHub Enterprise perform additional post-processing and sanitization after +GFM is converted to HTML to ensure security and consistency of the website. + +## What is Markdown? + +Markdown is a plain text format for writing structured documents, +based on conventions for indicating formatting in email +and usenet posts. It was developed by John Gruber (with +help from Aaron Swartz) and released in 2004 in the form of a +[syntax description](http://daringfireball.net/projects/markdown/syntax) +and a Perl script (`Markdown.pl`) for converting Markdown to +HTML. In the next decade, dozens of implementations were +developed in many languages. Some extended the original +Markdown syntax with conventions for footnotes, tables, and +other document elements. Some allowed Markdown documents to be +rendered in formats other than HTML. Websites like Reddit, +StackOverflow, and GitHub had millions of people using Markdown. +And Markdown started to be used beyond the web, to author books, +articles, slide shows, letters, and lecture notes. + +What distinguishes Markdown from many other lightweight markup +syntaxes, which are often easier to write, is its readability. +As Gruber writes: + +> The overriding design goal for Markdown's formatting syntax is +> to make it as readable as possible. The idea is that a +> Markdown-formatted document should be publishable as-is, as +> plain text, without looking like it's been marked up with tags +> or formatting instructions. +> () + +The point can be illustrated by comparing a sample of +[AsciiDoc](http://www.methods.co.nz/asciidoc/) with +an equivalent sample of Markdown. Here is a sample of +AsciiDoc from the AsciiDoc manual: + +``` +1. List item one. ++ +List item one continued with a second paragraph followed by an +Indented block. ++ +................. +$ ls *.sh +$ mv *.sh ~/tmp +................. ++ +List item continued with a third paragraph. + +2. List item two continued with an open block. ++ +-- +This paragraph is part of the preceding list item. + +a. This list is nested and does not require explicit item +continuation. ++ +This paragraph is part of the preceding list item. + +b. List item b. + +This paragraph belongs to item two of the outer list. +-- +``` + +And here is the equivalent in Markdown: +``` +1. List item one. + + List item one continued with a second paragraph followed by an + Indented block. + + $ ls *.sh + $ mv *.sh ~/tmp + + List item continued with a third paragraph. + +2. List item two continued with an open block. + + This paragraph is part of the preceding list item. + + 1. This list is nested and does not require explicit item continuation. + + This paragraph is part of the preceding list item. + + 2. List item b. + + This paragraph belongs to item two of the outer list. +``` + +The AsciiDoc version is, arguably, easier to write. You don't need +to worry about indentation. But the Markdown version is much easier +to read. The nesting of list items is apparent to the eye in the +source, not just in the processed document. + +## Why is a spec needed? + +John Gruber's [canonical description of Markdown's +syntax](http://daringfireball.net/projects/markdown/syntax) +does not specify the syntax unambiguously. Here are some examples of +questions it does not answer: + +1. How much indentation is needed for a sublist? The spec says that + continuation paragraphs need to be indented four spaces, but is + not fully explicit about sublists. It is natural to think that + they, too, must be indented four spaces, but `Markdown.pl` does + not require that. This is hardly a "corner case," and divergences + between implementations on this issue often lead to surprises for + users in real documents. (See [this comment by John + Gruber](http://article.gmane.org/gmane.text.markdown.general/1997).) + +2. Is a blank line needed before a block quote or heading? + Most implementations do not require the blank line. However, + this can lead to unexpected results in hard-wrapped text, and + also to ambiguities in parsing (note that some implementations + put the heading inside the blockquote, while others do not). + (John Gruber has also spoken [in favor of requiring the blank + lines](http://article.gmane.org/gmane.text.markdown.general/2146).) + +3. Is a blank line needed before an indented code block? + (`Markdown.pl` requires it, but this is not mentioned in the + documentation, and some implementations do not require it.) + + ``` markdown + paragraph + code? + ``` + +4. What is the exact rule for determining when list items get + wrapped in `

` tags? Can a list be partially "loose" and partially + "tight"? What should we do with a list like this? + + ``` markdown + 1. one + + 2. two + 3. three + ``` + + Or this? + + ``` markdown + 1. one + - a + + - b + 2. two + ``` + + (There are some relevant comments by John Gruber + [here](http://article.gmane.org/gmane.text.markdown.general/2554).) + +5. Can list markers be indented? Can ordered list markers be right-aligned? + + ``` markdown + 8. item 1 + 9. item 2 + 10. item 2a + ``` + +6. Is this one list with a thematic break in its second item, + or two lists separated by a thematic break? + + ``` markdown + * a + * * * * * + * b + ``` + +7. When list markers change from numbers to bullets, do we have + two lists or one? (The Markdown syntax description suggests two, + but the perl scripts and many other implementations produce one.) + + ``` markdown + 1. fee + 2. fie + - foe + - fum + ``` + +8. What are the precedence rules for the markers of inline structure? + For example, is the following a valid link, or does the code span + take precedence ? + + ``` markdown + [a backtick (`)](/url) and [another backtick (`)](/url). + ``` + +9. What are the precedence rules for markers of emphasis and strong + emphasis? For example, how should the following be parsed? + + ``` markdown + *foo *bar* baz* + ``` + +10. What are the precedence rules between block-level and inline-level + structure? For example, how should the following be parsed? + + ``` markdown + - `a long code span can contain a hyphen like this + - and it can screw things up` + ``` + +11. Can list items include section headings? (`Markdown.pl` does not + allow this, but does allow blockquotes to include headings.) + + ``` markdown + - # Heading + ``` + +12. Can list items be empty? + + ``` markdown + * a + * + * b + ``` + +13. Can link references be defined inside block quotes or list items? + + ``` markdown + > Blockquote [foo]. + > + > [foo]: /url + ``` + +14. If there are multiple definitions for the same reference, which takes + precedence? + + ``` markdown + [foo]: /url1 + [foo]: /url2 + + [foo][] + ``` + +In the absence of a spec, early implementers consulted `Markdown.pl` +to resolve these ambiguities. But `Markdown.pl` was quite buggy, and +gave manifestly bad results in many cases, so it was not a +satisfactory replacement for a spec. + +Because there is no unambiguous spec, implementations have diverged +considerably. As a result, users are often surprised to find that +a document that renders one way on one system (say, a github wiki) +renders differently on another (say, converting to docbook using +pandoc). To make matters worse, because nothing in Markdown counts +as a "syntax error," the divergence often isn't discovered right away. + +## About this document + +This document attempts to specify Markdown syntax unambiguously. +It contains many examples with side-by-side Markdown and +HTML. These are intended to double as conformance tests. An +accompanying script `spec_tests.py` can be used to run the tests +against any Markdown program: + + python test/spec_tests.py --spec spec.txt --program PROGRAM + +Since this document describes how Markdown is to be parsed into +an abstract syntax tree, it would have made sense to use an abstract +representation of the syntax tree instead of HTML. But HTML is capable +of representing the structural distinctions we need to make, and the +choice of HTML for the tests makes it possible to run the tests against +an implementation without writing an abstract syntax tree renderer. + +This document is generated from a text file, `spec.txt`, written +in Markdown with a small extension for the side-by-side tests. +The script `tools/makespec.py` can be used to convert `spec.txt` into +HTML or CommonMark (which can then be converted into other formats). + +In the examples, the `→` character is used to represent tabs. + +# Preliminaries + +## Characters and lines + +Any sequence of [characters] is a valid CommonMark +document. + +A [character](@) is a Unicode code point. Although some +code points (for example, combining accents) do not correspond to +characters in an intuitive sense, all code points count as characters +for purposes of this spec. + +This spec does not specify an encoding; it thinks of lines as composed +of [characters] rather than bytes. A conforming parser may be limited +to a certain encoding. + +A [line](@) is a sequence of zero or more [characters] +other than newline (`U+000A`) or carriage return (`U+000D`), +followed by a [line ending] or by the end of file. + +A [line ending](@) is a newline (`U+000A`), a carriage return +(`U+000D`) not followed by a newline, or a carriage return and a +following newline. + +A line containing no characters, or a line containing only spaces +(`U+0020`) or tabs (`U+0009`), is called a [blank line](@). + +The following definitions of character classes will be used in this spec: + +A [whitespace character](@) is a space +(`U+0020`), tab (`U+0009`), newline (`U+000A`), line tabulation (`U+000B`), +form feed (`U+000C`), or carriage return (`U+000D`). + +[Whitespace](@) is a sequence of one or more [whitespace +characters]. + +A [Unicode whitespace character](@) is +any code point in the Unicode `Zs` general category, or a tab (`U+0009`), +carriage return (`U+000D`), newline (`U+000A`), or form feed +(`U+000C`). + +[Unicode whitespace](@) is a sequence of one +or more [Unicode whitespace characters]. + +A [space](@) is `U+0020`. + +A [non-whitespace character](@) is any character +that is not a [whitespace character]. + +An [ASCII punctuation character](@) +is `!`, `"`, `#`, `$`, `%`, `&`, `'`, `(`, `)`, +`*`, `+`, `,`, `-`, `.`, `/`, `:`, `;`, `<`, `=`, `>`, `?`, `@`, +`[`, `\`, `]`, `^`, `_`, `` ` ``, `{`, `|`, `}`, or `~`. + +A [punctuation character](@) is an [ASCII +punctuation character] or anything in +the general Unicode categories `Pc`, `Pd`, `Pe`, `Pf`, `Pi`, `Po`, or `Ps`. + +## Tabs + +Tabs in lines are not expanded to [spaces]. However, +in contexts where whitespace helps to define block structure, +tabs behave as if they were replaced by spaces with a tab stop +of 4 characters. + +Thus, for example, a tab can be used instead of four spaces +in an indented code block. (Note, however, that internal +tabs are passed through as literal tabs, not expanded to +spaces.) + +```````````````````````````````` example +→foo→baz→→bim +. +

foo→baz→→bim
+
+```````````````````````````````` + +```````````````````````````````` example + →foo→baz→→bim +. +
foo→baz→→bim
+
+```````````````````````````````` + +```````````````````````````````` example + a→a + ὐ→a +. +
a→a
+ὐ→a
+
+```````````````````````````````` + +In the following example, a continuation paragraph of a list +item is indented with a tab; this has exactly the same effect +as indentation with four spaces would: + +```````````````````````````````` example + - foo + +→bar +. +
    +
  • +

    foo

    +

    bar

    +
  • +
+```````````````````````````````` + +```````````````````````````````` example +- foo + +→→bar +. +
    +
  • +

    foo

    +
      bar
    +
    +
  • +
+```````````````````````````````` + +Normally the `>` that begins a block quote may be followed +optionally by a space, which is not considered part of the +content. In the following case `>` is followed by a tab, +which is treated as if it were expanded into three spaces. +Since one of these spaces is considered part of the +delimiter, `foo` is considered to be indented six spaces +inside the block quote context, so we get an indented +code block starting with two spaces. + +```````````````````````````````` example +>→→foo +. +
+
  foo
+
+
+```````````````````````````````` + +```````````````````````````````` example +-→→foo +. +
    +
  • +
      foo
    +
    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example + foo +→bar +. +
foo
+bar
+
+```````````````````````````````` + +```````````````````````````````` example + - foo + - bar +→ - baz +. +
    +
  • foo +
      +
    • bar +
        +
      • baz
      • +
      +
    • +
    +
  • +
+```````````````````````````````` + +```````````````````````````````` example +#→Foo +. +

Foo

+```````````````````````````````` + +```````````````````````````````` example +*→*→*→ +. +
+```````````````````````````````` + + +## Insecure characters + +For security reasons, the Unicode character `U+0000` must be replaced +with the REPLACEMENT CHARACTER (`U+FFFD`). + +# Blocks and inlines + +We can think of a document as a sequence of +[blocks](@)---structural elements like paragraphs, block +quotations, lists, headings, rules, and code blocks. Some blocks (like +block quotes and list items) contain other blocks; others (like +headings and paragraphs) contain [inline](@) content---text, +links, emphasized text, images, code spans, and so on. + +## Precedence + +Indicators of block structure always take precedence over indicators +of inline structure. So, for example, the following is a list with +two items, not a list with one item containing a code span: + +```````````````````````````````` example +- `one +- two` +. +
    +
  • `one
  • +
  • two`
  • +
+```````````````````````````````` + + +This means that parsing can proceed in two steps: first, the block +structure of the document can be discerned; second, text lines inside +paragraphs, headings, and other block constructs can be parsed for inline +structure. The second step requires information about link reference +definitions that will be available only at the end of the first +step. Note that the first step requires processing lines in sequence, +but the second can be parallelized, since the inline parsing of +one block element does not affect the inline parsing of any other. + +## Container blocks and leaf blocks + +We can divide blocks into two types: +[container blocks](@), +which can contain other blocks, and [leaf blocks](@), +which cannot. + +# Leaf blocks + +This section describes the different kinds of leaf block that make up a +Markdown document. + +## Thematic breaks + +A line consisting of 0-3 spaces of indentation, followed by a sequence +of three or more matching `-`, `_`, or `*` characters, each followed +optionally by any number of spaces or tabs, forms a +[thematic break](@). + +```````````````````````````````` example +*** +--- +___ +. +
+
+
+```````````````````````````````` + + +Wrong characters: + +```````````````````````````````` example ++++ +. +

+++

+```````````````````````````````` + + +```````````````````````````````` example +=== +. +

===

+```````````````````````````````` + + +Not enough characters: + +```````````````````````````````` example +-- +** +__ +. +

-- +** +__

+```````````````````````````````` + + +One to three spaces indent are allowed: + +```````````````````````````````` example + *** + *** + *** +. +
+
+
+```````````````````````````````` + + +Four spaces is too many: + +```````````````````````````````` example + *** +. +
***
+
+```````````````````````````````` + + +```````````````````````````````` example +Foo + *** +. +

Foo +***

+```````````````````````````````` + + +More than three characters may be used: + +```````````````````````````````` example +_____________________________________ +. +
+```````````````````````````````` + + +Spaces are allowed between the characters: + +```````````````````````````````` example + - - - +. +
+```````````````````````````````` + + +```````````````````````````````` example + ** * ** * ** * ** +. +
+```````````````````````````````` + + +```````````````````````````````` example +- - - - +. +
+```````````````````````````````` + + +Spaces are allowed at the end: + +```````````````````````````````` example +- - - - +. +
+```````````````````````````````` + + +However, no other characters may occur in the line: + +```````````````````````````````` example +_ _ _ _ a + +a------ + +---a--- +. +

_ _ _ _ a

+

a------

+

---a---

+```````````````````````````````` + + +It is required that all of the [non-whitespace characters] be the same. +So, this is not a thematic break: + +```````````````````````````````` example + *-* +. +

-

+```````````````````````````````` + + +Thematic breaks do not need blank lines before or after: + +```````````````````````````````` example +- foo +*** +- bar +. +
    +
  • foo
  • +
+
+
    +
  • bar
  • +
+```````````````````````````````` + + +Thematic breaks can interrupt a paragraph: + +```````````````````````````````` example +Foo +*** +bar +. +

Foo

+
+

bar

+```````````````````````````````` + + +If a line of dashes that meets the above conditions for being a +thematic break could also be interpreted as the underline of a [setext +heading], the interpretation as a +[setext heading] takes precedence. Thus, for example, +this is a setext heading, not a paragraph followed by a thematic break: + +```````````````````````````````` example +Foo +--- +bar +. +

Foo

+

bar

+```````````````````````````````` + + +When both a thematic break and a list item are possible +interpretations of a line, the thematic break takes precedence: + +```````````````````````````````` example +* Foo +* * * +* Bar +. +
    +
  • Foo
  • +
+
+
    +
  • Bar
  • +
+```````````````````````````````` + + +If you want a thematic break in a list item, use a different bullet: + +```````````````````````````````` example +- Foo +- * * * +. +
    +
  • Foo
  • +
  • +
    +
  • +
+```````````````````````````````` + + +## ATX headings + +An [ATX heading](@) +consists of a string of characters, parsed as inline content, between an +opening sequence of 1--6 unescaped `#` characters and an optional +closing sequence of any number of unescaped `#` characters. +The opening sequence of `#` characters must be followed by a +[space] or by the end of line. The optional closing sequence of `#`s must be +preceded by a [space] and may be followed by spaces only. The opening +`#` character may be indented 0-3 spaces. The raw contents of the +heading are stripped of leading and trailing spaces before being parsed +as inline content. The heading level is equal to the number of `#` +characters in the opening sequence. + +Simple headings: + +```````````````````````````````` example +# foo +## foo +### foo +#### foo +##### foo +###### foo +. +

foo

+

foo

+

foo

+

foo

+
foo
+
foo
+```````````````````````````````` + + +More than six `#` characters is not a heading: + +```````````````````````````````` example +####### foo +. +

####### foo

+```````````````````````````````` + + +At least one space is required between the `#` characters and the +heading's contents, unless the heading is empty. Note that many +implementations currently do not require the space. However, the +space was required by the +[original ATX implementation](http://www.aaronsw.com/2002/atx/atx.py), +and it helps prevent things like the following from being parsed as +headings: + +```````````````````````````````` example +#5 bolt + +#hashtag +. +

#5 bolt

+

#hashtag

+```````````````````````````````` + + +This is not a heading, because the first `#` is escaped: + +```````````````````````````````` example +\## foo +. +

## foo

+```````````````````````````````` + + +Contents are parsed as inlines: + +```````````````````````````````` example +# foo *bar* \*baz\* +. +

foo bar *baz*

+```````````````````````````````` + + +Leading and trailing blanks are ignored in parsing inline content: + +```````````````````````````````` example +# foo +. +

foo

+```````````````````````````````` + + +One to three spaces indentation are allowed: + +```````````````````````````````` example + ### foo + ## foo + # foo +. +

foo

+

foo

+

foo

+```````````````````````````````` + + +Four spaces are too much: + +```````````````````````````````` example + # foo +. +
# foo
+
+```````````````````````````````` + + +```````````````````````````````` example +foo + # bar +. +

foo +# bar

+```````````````````````````````` + + +A closing sequence of `#` characters is optional: + +```````````````````````````````` example +## foo ## + ### bar ### +. +

foo

+

bar

+```````````````````````````````` + + +It need not be the same length as the opening sequence: + +```````````````````````````````` example +# foo ################################## +##### foo ## +. +

foo

+
foo
+```````````````````````````````` + + +Spaces are allowed after the closing sequence: + +```````````````````````````````` example +### foo ### +. +

foo

+```````````````````````````````` + + +A sequence of `#` characters with anything but [spaces] following it +is not a closing sequence, but counts as part of the contents of the +heading: + +```````````````````````````````` example +### foo ### b +. +

foo ### b

+```````````````````````````````` + + +The closing sequence must be preceded by a space: + +```````````````````````````````` example +# foo# +. +

foo#

+```````````````````````````````` + + +Backslash-escaped `#` characters do not count as part +of the closing sequence: + +```````````````````````````````` example +### foo \### +## foo #\## +# foo \# +. +

foo ###

+

foo ###

+

foo #

+```````````````````````````````` + + +ATX headings need not be separated from surrounding content by blank +lines, and they can interrupt paragraphs: + +```````````````````````````````` example +**** +## foo +**** +. +
+

foo

+
+```````````````````````````````` + + +```````````````````````````````` example +Foo bar +# baz +Bar foo +. +

Foo bar

+

baz

+

Bar foo

+```````````````````````````````` + + +ATX headings can be empty: + +```````````````````````````````` example +## +# +### ### +. +

+

+

+```````````````````````````````` + + +## Setext headings + +A [setext heading](@) consists of one or more +lines of text, each containing at least one [non-whitespace +character], with no more than 3 spaces indentation, followed by +a [setext heading underline]. The lines of text must be such +that, were they not followed by the setext heading underline, +they would be interpreted as a paragraph: they cannot be +interpretable as a [code fence], [ATX heading][ATX headings], +[block quote][block quotes], [thematic break][thematic breaks], +[list item][list items], or [HTML block][HTML blocks]. + +A [setext heading underline](@) is a sequence of +`=` characters or a sequence of `-` characters, with no more than 3 +spaces indentation and any number of trailing spaces. If a line +containing a single `-` can be interpreted as an +empty [list items], it should be interpreted this way +and not as a [setext heading underline]. + +The heading is a level 1 heading if `=` characters are used in +the [setext heading underline], and a level 2 heading if `-` +characters are used. The contents of the heading are the result +of parsing the preceding lines of text as CommonMark inline +content. + +In general, a setext heading need not be preceded or followed by a +blank line. However, it cannot interrupt a paragraph, so when a +setext heading comes after a paragraph, a blank line is needed between +them. + +Simple examples: + +```````````````````````````````` example +Foo *bar* +========= + +Foo *bar* +--------- +. +

Foo bar

+

Foo bar

+```````````````````````````````` + + +The content of the header may span more than one line: + +```````````````````````````````` example +Foo *bar +baz* +==== +. +

Foo bar +baz

+```````````````````````````````` + + +The underlining can be any length: + +```````````````````````````````` example +Foo +------------------------- + +Foo += +. +

Foo

+

Foo

+```````````````````````````````` + + +The heading content can be indented up to three spaces, and need +not line up with the underlining: + +```````````````````````````````` example + Foo +--- + + Foo +----- + + Foo + === +. +

Foo

+

Foo

+

Foo

+```````````````````````````````` + + +Four spaces indent is too much: + +```````````````````````````````` example + Foo + --- + + Foo +--- +. +
Foo
+---
+
+Foo
+
+
+```````````````````````````````` + + +The setext heading underline can be indented up to three spaces, and +may have trailing spaces: + +```````````````````````````````` example +Foo + ---- +. +

Foo

+```````````````````````````````` + + +Four spaces is too much: + +```````````````````````````````` example +Foo + --- +. +

Foo +---

+```````````````````````````````` + + +The setext heading underline cannot contain internal spaces: + +```````````````````````````````` example +Foo += = + +Foo +--- - +. +

Foo += =

+

Foo

+
+```````````````````````````````` + + +Trailing spaces in the content line do not cause a line break: + +```````````````````````````````` example +Foo +----- +. +

Foo

+```````````````````````````````` + + +Nor does a backslash at the end: + +```````````````````````````````` example +Foo\ +---- +. +

Foo\

+```````````````````````````````` + + +Since indicators of block structure take precedence over +indicators of inline structure, the following are setext headings: + +```````````````````````````````` example +`Foo +---- +` + +
+. +

`Foo

+

`

+

<a title="a lot

+

of dashes"/>

+```````````````````````````````` + + +The setext heading underline cannot be a [lazy continuation +line] in a list item or block quote: + +```````````````````````````````` example +> Foo +--- +. +
+

Foo

+
+
+```````````````````````````````` + + +```````````````````````````````` example +> foo +bar +=== +. +
+

foo +bar +===

+
+```````````````````````````````` + + +```````````````````````````````` example +- Foo +--- +. +
    +
  • Foo
  • +
+
+```````````````````````````````` + + +A blank line is needed between a paragraph and a following +setext heading, since otherwise the paragraph becomes part +of the heading's content: + +```````````````````````````````` example +Foo +Bar +--- +. +

Foo +Bar

+```````````````````````````````` + + +But in general a blank line is not required before or after +setext headings: + +```````````````````````````````` example +--- +Foo +--- +Bar +--- +Baz +. +
+

Foo

+

Bar

+

Baz

+```````````````````````````````` + + +Setext headings cannot be empty: + +```````````````````````````````` example + +==== +. +

====

+```````````````````````````````` + + +Setext heading text lines must not be interpretable as block +constructs other than paragraphs. So, the line of dashes +in these examples gets interpreted as a thematic break: + +```````````````````````````````` example +--- +--- +. +
+
+```````````````````````````````` + + +```````````````````````````````` example +- foo +----- +. +
    +
  • foo
  • +
+
+```````````````````````````````` + + +```````````````````````````````` example + foo +--- +. +
foo
+
+
+```````````````````````````````` + + +```````````````````````````````` example +> foo +----- +. +
+

foo

+
+
+```````````````````````````````` + + +If you want a heading with `> foo` as its literal text, you can +use backslash escapes: + +```````````````````````````````` example +\> foo +------ +. +

> foo

+```````````````````````````````` + + +**Compatibility note:** Most existing Markdown implementations +do not allow the text of setext headings to span multiple lines. +But there is no consensus about how to interpret + +``` markdown +Foo +bar +--- +baz +``` + +One can find four different interpretations: + +1. paragraph "Foo", heading "bar", paragraph "baz" +2. paragraph "Foo bar", thematic break, paragraph "baz" +3. paragraph "Foo bar --- baz" +4. heading "Foo bar", paragraph "baz" + +We find interpretation 4 most natural, and interpretation 4 +increases the expressive power of CommonMark, by allowing +multiline headings. Authors who want interpretation 1 can +put a blank line after the first paragraph: + +```````````````````````````````` example +Foo + +bar +--- +baz +. +

Foo

+

bar

+

baz

+```````````````````````````````` + + +Authors who want interpretation 2 can put blank lines around +the thematic break, + +```````````````````````````````` example +Foo +bar + +--- + +baz +. +

Foo +bar

+
+

baz

+```````````````````````````````` + + +or use a thematic break that cannot count as a [setext heading +underline], such as + +```````````````````````````````` example +Foo +bar +* * * +baz +. +

Foo +bar

+
+

baz

+```````````````````````````````` + + +Authors who want interpretation 3 can use backslash escapes: + +```````````````````````````````` example +Foo +bar +\--- +baz +. +

Foo +bar +--- +baz

+```````````````````````````````` + + +## Indented code blocks + +An [indented code block](@) is composed of one or more +[indented chunks] separated by blank lines. +An [indented chunk](@) is a sequence of non-blank lines, +each indented four or more spaces. The contents of the code block are +the literal contents of the lines, including trailing +[line endings], minus four spaces of indentation. +An indented code block has no [info string]. + +An indented code block cannot interrupt a paragraph, so there must be +a blank line between a paragraph and a following indented code block. +(A blank line is not needed, however, between a code block and a following +paragraph.) + +```````````````````````````````` example + a simple + indented code block +. +
a simple
+  indented code block
+
+```````````````````````````````` + + +If there is any ambiguity between an interpretation of indentation +as a code block and as indicating that material belongs to a [list +item][list items], the list item interpretation takes precedence: + +```````````````````````````````` example + - foo + + bar +. +
    +
  • +

    foo

    +

    bar

    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example +1. foo + + - bar +. +
    +
  1. +

    foo

    +
      +
    • bar
    • +
    +
  2. +
+```````````````````````````````` + + + +The contents of a code block are literal text, and do not get parsed +as Markdown: + +```````````````````````````````` example +
+ *hi* + + - one +. +
<a/>
+*hi*
+
+- one
+
+```````````````````````````````` + + +Here we have three chunks separated by blank lines: + +```````````````````````````````` example + chunk1 + + chunk2 + + + + chunk3 +. +
chunk1
+
+chunk2
+
+
+
+chunk3
+
+```````````````````````````````` + + +Any initial spaces beyond four will be included in the content, even +in interior blank lines: + +```````````````````````````````` example + chunk1 + + chunk2 +. +
chunk1
+  
+  chunk2
+
+```````````````````````````````` + + +An indented code block cannot interrupt a paragraph. (This +allows hanging indents and the like.) + +```````````````````````````````` example +Foo + bar + +. +

Foo +bar

+```````````````````````````````` + + +However, any non-blank line with fewer than four leading spaces ends +the code block immediately. So a paragraph may occur immediately +after indented code: + +```````````````````````````````` example + foo +bar +. +
foo
+
+

bar

+```````````````````````````````` + + +And indented code can occur immediately before and after other kinds of +blocks: + +```````````````````````````````` example +# Heading + foo +Heading +------ + foo +---- +. +

Heading

+
foo
+
+

Heading

+
foo
+
+
+```````````````````````````````` + + +The first line can be indented more than four spaces: + +```````````````````````````````` example + foo + bar +. +
    foo
+bar
+
+```````````````````````````````` + + +Blank lines preceding or following an indented code block +are not included in it: + +```````````````````````````````` example + + + foo + + +. +
foo
+
+```````````````````````````````` + + +Trailing spaces are included in the code block's content: + +```````````````````````````````` example + foo +. +
foo  
+
+```````````````````````````````` + + + +## Fenced code blocks + +A [code fence](@) is a sequence +of at least three consecutive backtick characters (`` ` ``) or +tildes (`~`). (Tildes and backticks cannot be mixed.) +A [fenced code block](@) +begins with a code fence, indented no more than three spaces. + +The line with the opening code fence may optionally contain some text +following the code fence; this is trimmed of leading and trailing +whitespace and called the [info string](@). If the [info string] comes +after a backtick fence, it may not contain any backtick +characters. (The reason for this restriction is that otherwise +some inline code would be incorrectly interpreted as the +beginning of a fenced code block.) + +The content of the code block consists of all subsequent lines, until +a closing [code fence] of the same type as the code block +began with (backticks or tildes), and with at least as many backticks +or tildes as the opening code fence. If the leading code fence is +indented N spaces, then up to N spaces of indentation are removed from +each line of the content (if present). (If a content line is not +indented, it is preserved unchanged. If it is indented less than N +spaces, all of the indentation is removed.) + +The closing code fence may be indented up to three spaces, and may be +followed only by spaces, which are ignored. If the end of the +containing block (or document) is reached and no closing code fence +has been found, the code block contains all of the lines after the +opening code fence until the end of the containing block (or +document). (An alternative spec would require backtracking in the +event that a closing code fence is not found. But this makes parsing +much less efficient, and there seems to be no real down side to the +behavior described here.) + +A fenced code block may interrupt a paragraph, and does not require +a blank line either before or after. + +The content of a code fence is treated as literal text, not parsed +as inlines. The first word of the [info string] is typically used to +specify the language of the code sample, and rendered in the `class` +attribute of the `code` tag. However, this spec does not mandate any +particular treatment of the [info string]. + +Here is a simple example with backticks: + +```````````````````````````````` example +``` +< + > +``` +. +
<
+ >
+
+```````````````````````````````` + + +With tildes: + +```````````````````````````````` example +~~~ +< + > +~~~ +. +
<
+ >
+
+```````````````````````````````` + +Fewer than three backticks is not enough: + +```````````````````````````````` example +`` +foo +`` +. +

foo

+```````````````````````````````` + +The closing code fence must use the same character as the opening +fence: + +```````````````````````````````` example +``` +aaa +~~~ +``` +. +
aaa
+~~~
+
+```````````````````````````````` + + +```````````````````````````````` example +~~~ +aaa +``` +~~~ +. +
aaa
+```
+
+```````````````````````````````` + + +The closing code fence must be at least as long as the opening fence: + +```````````````````````````````` example +```` +aaa +``` +`````` +. +
aaa
+```
+
+```````````````````````````````` + + +```````````````````````````````` example +~~~~ +aaa +~~~ +~~~~ +. +
aaa
+~~~
+
+```````````````````````````````` + + +Unclosed code blocks are closed by the end of the document +(or the enclosing [block quote][block quotes] or [list item][list items]): + +```````````````````````````````` example +``` +. +
+```````````````````````````````` + + +```````````````````````````````` example +````` + +``` +aaa +. +

+```
+aaa
+
+```````````````````````````````` + + +```````````````````````````````` example +> ``` +> aaa + +bbb +. +
+
aaa
+
+
+

bbb

+```````````````````````````````` + + +A code block can have all empty lines as its content: + +```````````````````````````````` example +``` + + +``` +. +

+  
+
+```````````````````````````````` + + +A code block can be empty: + +```````````````````````````````` example +``` +``` +. +
+```````````````````````````````` + + +Fences can be indented. If the opening fence is indented, +content lines will have equivalent opening indentation removed, +if present: + +```````````````````````````````` example + ``` + aaa +aaa +``` +. +
aaa
+aaa
+
+```````````````````````````````` + + +```````````````````````````````` example + ``` +aaa + aaa +aaa + ``` +. +
aaa
+aaa
+aaa
+
+```````````````````````````````` + + +```````````````````````````````` example + ``` + aaa + aaa + aaa + ``` +. +
aaa
+ aaa
+aaa
+
+```````````````````````````````` + + +Four spaces indentation produces an indented code block: + +```````````````````````````````` example + ``` + aaa + ``` +. +
```
+aaa
+```
+
+```````````````````````````````` + + +Closing fences may be indented by 0-3 spaces, and their indentation +need not match that of the opening fence: + +```````````````````````````````` example +``` +aaa + ``` +. +
aaa
+
+```````````````````````````````` + + +```````````````````````````````` example + ``` +aaa + ``` +. +
aaa
+
+```````````````````````````````` + + +This is not a closing fence, because it is indented 4 spaces: + +```````````````````````````````` example +``` +aaa + ``` +. +
aaa
+    ```
+
+```````````````````````````````` + + + +Code fences (opening and closing) cannot contain internal spaces: + +```````````````````````````````` example +``` ``` +aaa +. +

+aaa

+```````````````````````````````` + + +```````````````````````````````` example +~~~~~~ +aaa +~~~ ~~ +. +
aaa
+~~~ ~~
+
+```````````````````````````````` + + +Fenced code blocks can interrupt paragraphs, and can be followed +directly by paragraphs, without a blank line between: + +```````````````````````````````` example +foo +``` +bar +``` +baz +. +

foo

+
bar
+
+

baz

+```````````````````````````````` + + +Other blocks can also occur before and after fenced code blocks +without an intervening blank line: + +```````````````````````````````` example +foo +--- +~~~ +bar +~~~ +# baz +. +

foo

+
bar
+
+

baz

+```````````````````````````````` + + +An [info string] can be provided after the opening code fence. +Opening and closing spaces will be stripped, and the first word, prefixed +with `language-`, is used as the value for the `class` attribute of the +`code` element within the enclosing `pre` element. + +```````````````````````````````` example +```ruby +def foo(x) + return 3 +end +``` +. +
def foo(x)
+  return 3
+end
+
+```````````````````````````````` + + +```````````````````````````````` example +~~~~ ruby startline=3 $%@#$ +def foo(x) + return 3 +end +~~~~~~~ +. +
def foo(x)
+  return 3
+end
+
+```````````````````````````````` + + +```````````````````````````````` example +````; +```` +. +
+```````````````````````````````` + + +[Info strings] for backtick code blocks cannot contain backticks: + +```````````````````````````````` example +``` aa ``` +foo +. +

aa +foo

+```````````````````````````````` + + +[Info strings] for tilde code blocks can contain backticks and tildes: + +```````````````````````````````` example +~~~ aa ``` ~~~ +foo +~~~ +. +
foo
+
+```````````````````````````````` + + +Closing code fences cannot have [info strings]: + +```````````````````````````````` example +``` +``` aaa +``` +. +
``` aaa
+
+```````````````````````````````` + + + +## HTML blocks + +An [HTML block](@) is a group of lines that is treated +as raw HTML (and will not be escaped in HTML output). + +There are seven kinds of [HTML block], which can be defined +by their start and end conditions. The block begins with a line that +meets a [start condition](@) (after up to three spaces +optional indentation). It ends with the first subsequent line that +meets a matching [end condition](@), or the last line of +the document or other [container block](#container-blocks)), if no +line is encountered that meets the [end condition]. If the first line +meets both the [start condition] and the [end condition], the block +will contain just that line. + +1. **Start condition:** line begins with the string ``, or the end of the line.\ +**End condition:** line contains an end tag +``, `
`, or `` (case-insensitive; it +need not match the start tag). + +2. **Start condition:** line begins with the string ``. + +3. **Start condition:** line begins with the string ``. + +4. **Start condition:** line begins with the string ``. + +5. **Start condition:** line begins with the string +``. + +6. **Start condition:** line begins the string `<` or ``, or +the string `/>`.\ +**End condition:** line is followed by a [blank line]. + +7. **Start condition:** line begins with a complete [open tag] +or [closing tag] (with any [tag name] other than `script`, +`style`, or `pre`) followed only by [whitespace] +or the end of the line.\ +**End condition:** line is followed by a [blank line]. + +HTML blocks continue until they are closed by their appropriate +[end condition], or the last line of the document or other [container +block](#container-blocks). This means any HTML **within an HTML +block** that might otherwise be recognised as a start condition will +be ignored by the parser and passed through as-is, without changing +the parser's state. + +For instance, `
` within a HTML block started by `` will not affect
+the parser state; as the HTML block was started in by start condition 6, it
+will end at any blank line. This can be surprising:
+
+```````````````````````````````` example
+
+
+**Hello**,
+
+_world_.
+
+
+. +
+
+**Hello**,
+

world. +

+
+```````````````````````````````` + +In this case, the HTML block is terminated by the newline — the `**Hello**` +text remains verbatim — and regular parsing resumes, with a paragraph, +emphasised `world` and inline and block HTML following. + +All types of [HTML blocks] except type 7 may interrupt +a paragraph. Blocks of type 7 may not interrupt a paragraph. +(This restriction is intended to prevent unwanted interpretation +of long tags inside a wrapped paragraph as starting HTML blocks.) + +Some simple examples follow. Here are some basic HTML blocks +of type 6: + +```````````````````````````````` example + + + + +
+ hi +
+ +okay. +. + + + + +
+ hi +
+

okay.

+```````````````````````````````` + + +```````````````````````````````` example +
+*foo* +```````````````````````````````` + + +Here we have two HTML blocks with a Markdown paragraph between them: + +```````````````````````````````` example +
+ +*Markdown* + +
+. +
+

Markdown

+
+```````````````````````````````` + + +The tag on the first line can be partial, as long +as it is split where there would be whitespace: + +```````````````````````````````` example +
+
+. +
+
+```````````````````````````````` + + +```````````````````````````````` example +
+
+. +
+
+```````````````````````````````` + + +An open tag need not be closed: +```````````````````````````````` example +
+*foo* + +*bar* +. +
+*foo* +

bar

+```````````````````````````````` + + + +A partial tag need not even be completed (garbage +in, garbage out): + +```````````````````````````````` example +
+. + +```````````````````````````````` + + +```````````````````````````````` example +
+foo +
+. +
+foo +
+```````````````````````````````` + + +Everything until the next blank line or end of document +gets included in the HTML block. So, in the following +example, what looks like a Markdown code block +is actually part of the HTML block, which continues until a blank +line or the end of the document is reached: + +```````````````````````````````` example +
+``` c +int x = 33; +``` +. +
+``` c +int x = 33; +``` +```````````````````````````````` + + +To start an [HTML block] with a tag that is *not* in the +list of block-level tags in (6), you must put the tag by +itself on the first line (and it must be complete): + +```````````````````````````````` example + +*bar* + +. + +*bar* + +```````````````````````````````` + + +In type 7 blocks, the [tag name] can be anything: + +```````````````````````````````` example + +*bar* + +. + +*bar* + +```````````````````````````````` + + +```````````````````````````````` example + +*bar* + +. + +*bar* + +```````````````````````````````` + + +```````````````````````````````` example + +*bar* +. + +*bar* +```````````````````````````````` + + +These rules are designed to allow us to work with tags that +can function as either block-level or inline-level tags. +The `` tag is a nice example. We can surround content with +`` tags in three different ways. In this case, we get a raw +HTML block, because the `` tag is on a line by itself: + +```````````````````````````````` example + +*foo* + +. + +*foo* + +```````````````````````````````` + + +In this case, we get a raw HTML block that just includes +the `` tag (because it ends with the following blank +line). So the contents get interpreted as CommonMark: + +```````````````````````````````` example + + +*foo* + + +. + +

foo

+
+```````````````````````````````` + + +Finally, in this case, the `` tags are interpreted +as [raw HTML] *inside* the CommonMark paragraph. (Because +the tag is not on a line by itself, we get inline HTML +rather than an [HTML block].) + +```````````````````````````````` example +*foo* +. +

foo

+```````````````````````````````` + + +HTML tags designed to contain literal content +(`script`, `style`, `pre`), comments, processing instructions, +and declarations are treated somewhat differently. +Instead of ending at the first blank line, these blocks +end at the first line containing a corresponding end tag. +As a result, these blocks can contain blank lines: + +A pre tag (type 1): + +```````````````````````````````` example +

+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+
+okay +. +

+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+
+

okay

+```````````````````````````````` + + +A script tag (type 1): + +```````````````````````````````` example + +okay +. + +

okay

+```````````````````````````````` + + +A style tag (type 1): + +```````````````````````````````` example + +okay +. + +

okay

+```````````````````````````````` + + +If there is no matching end tag, the block will end at the +end of the document (or the enclosing [block quote][block quotes] +or [list item][list items]): + +```````````````````````````````` example + +*foo* +. + +

foo

+```````````````````````````````` + + +```````````````````````````````` example +*bar* +*baz* +. +*bar* +

baz

+```````````````````````````````` + + +Note that anything on the last line after the +end tag will be included in the [HTML block]: + +```````````````````````````````` example +1. *bar* +. +1. *bar* +```````````````````````````````` + + +A comment (type 2): + +```````````````````````````````` example + +okay +. + +

okay

+```````````````````````````````` + + + +A processing instruction (type 3): + +```````````````````````````````` example +'; + +?> +okay +. +'; + +?> +

okay

+```````````````````````````````` + + +A declaration (type 4): + +```````````````````````````````` example + +. + +```````````````````````````````` + + +CDATA (type 5): + +```````````````````````````````` example + +okay +. + +

okay

+```````````````````````````````` + + +The opening tag can be indented 1-3 spaces, but not 4: + +```````````````````````````````` example + + + +. + +
<!-- foo -->
+
+```````````````````````````````` + + +```````````````````````````````` example +
+ +
+. +
+
<div>
+
+```````````````````````````````` + + +An HTML block of types 1--6 can interrupt a paragraph, and need not be +preceded by a blank line. + +```````````````````````````````` example +Foo +
+bar +
+. +

Foo

+
+bar +
+```````````````````````````````` + + +However, a following blank line is needed, except at the end of +a document, and except for blocks of types 1--5, [above][HTML +block]: + +```````````````````````````````` example +
+bar +
+*foo* +. +
+bar +
+*foo* +```````````````````````````````` + + +HTML blocks of type 7 cannot interrupt a paragraph: + +```````````````````````````````` example +Foo + +baz +. +

Foo + +baz

+```````````````````````````````` + + +This rule differs from John Gruber's original Markdown syntax +specification, which says: + +> The only restrictions are that block-level HTML elements — +> e.g. `
`, ``, `
`, `

`, etc. — must be separated from +> surrounding content by blank lines, and the start and end tags of the +> block should not be indented with tabs or spaces. + +In some ways Gruber's rule is more restrictive than the one given +here: + +- It requires that an HTML block be preceded by a blank line. +- It does not allow the start tag to be indented. +- It requires a matching end tag, which it also does not allow to + be indented. + +Most Markdown implementations (including some of Gruber's own) do not +respect all of these restrictions. + +There is one respect, however, in which Gruber's rule is more liberal +than the one given here, since it allows blank lines to occur inside +an HTML block. There are two reasons for disallowing them here. +First, it removes the need to parse balanced tags, which is +expensive and can require backtracking from the end of the document +if no matching end tag is found. Second, it provides a very simple +and flexible way of including Markdown content inside HTML tags: +simply separate the Markdown from the HTML using blank lines: + +Compare: + +```````````````````````````````` example +

+ +*Emphasized* text. + +
+. +
+

Emphasized text.

+
+```````````````````````````````` + + +```````````````````````````````` example +
+*Emphasized* text. +
+. +
+*Emphasized* text. +
+```````````````````````````````` + + +Some Markdown implementations have adopted a convention of +interpreting content inside tags as text if the open tag has +the attribute `markdown=1`. The rule given above seems a simpler and +more elegant way of achieving the same expressive power, which is also +much simpler to parse. + +The main potential drawback is that one can no longer paste HTML +blocks into Markdown documents with 100% reliability. However, +*in most cases* this will work fine, because the blank lines in +HTML are usually followed by HTML block tags. For example: + +```````````````````````````````` example +
+ + + + + + + +
+Hi +
+. + + + + +
+Hi +
+```````````````````````````````` + + +There are problems, however, if the inner tags are indented +*and* separated by spaces, as then they will be interpreted as +an indented code block: + +```````````````````````````````` example + + + + + + + + +
+ Hi +
+. + + +
<td>
+  Hi
+</td>
+
+ +
+```````````````````````````````` + + +Fortunately, blank lines are usually not necessary and can be +deleted. The exception is inside `
` tags, but as described
+[above][HTML blocks], raw HTML blocks starting with `
`
+*can* contain blank lines.
+
+## Link reference definitions
+
+A [link reference definition](@)
+consists of a [link label], indented up to three spaces, followed
+by a colon (`:`), optional [whitespace] (including up to one
+[line ending]), a [link destination],
+optional [whitespace] (including up to one
+[line ending]), and an optional [link
+title], which if it is present must be separated
+from the [link destination] by [whitespace].
+No further [non-whitespace characters] may occur on the line.
+
+A [link reference definition]
+does not correspond to a structural element of a document.  Instead, it
+defines a label which can be used in [reference links]
+and reference-style [images] elsewhere in the document.  [Link
+reference definitions] can come either before or after the links that use
+them.
+
+```````````````````````````````` example
+[foo]: /url "title"
+
+[foo]
+.
+

foo

+```````````````````````````````` + + +```````````````````````````````` example + [foo]: + /url + 'the title' + +[foo] +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +[Foo*bar\]]:my_(url) 'title (with parens)' + +[Foo*bar\]] +. +

Foo*bar]

+```````````````````````````````` + + +```````````````````````````````` example +[Foo bar]: + +'title' + +[Foo bar] +. +

Foo bar

+```````````````````````````````` + + +The title may extend over multiple lines: + +```````````````````````````````` example +[foo]: /url ' +title +line1 +line2 +' + +[foo] +. +

foo

+```````````````````````````````` + + +However, it may not contain a [blank line]: + +```````````````````````````````` example +[foo]: /url 'title + +with blank line' + +[foo] +. +

[foo]: /url 'title

+

with blank line'

+

[foo]

+```````````````````````````````` + + +The title may be omitted: + +```````````````````````````````` example +[foo]: +/url + +[foo] +. +

foo

+```````````````````````````````` + + +The link destination may not be omitted: + +```````````````````````````````` example +[foo]: + +[foo] +. +

[foo]:

+

[foo]

+```````````````````````````````` + +The title must be separated from the link destination by +whitespace: + +```````````````````````````````` example +[foo]: (baz) + +[foo] +. +

[foo]: (baz)

+

[foo]

+```````````````````````````````` + + +Both title and destination can contain backslash escapes +and literal backslashes: + +```````````````````````````````` example +[foo]: /url\bar\*baz "foo\"bar\baz" + +[foo] +. +

foo

+```````````````````````````````` + + +A link can come before its corresponding definition: + +```````````````````````````````` example +[foo] + +[foo]: url +. +

foo

+```````````````````````````````` + + +If there are several matching definitions, the first one takes +precedence: + +```````````````````````````````` example +[foo] + +[foo]: first +[foo]: second +. +

foo

+```````````````````````````````` + + +As noted in the section on [Links], matching of labels is +case-insensitive (see [matches]). + +```````````````````````````````` example +[FOO]: /url + +[Foo] +. +

Foo

+```````````````````````````````` + + +```````````````````````````````` example +[ΑΓΩ]: /φου + +[αγω] +. +

αγω

+```````````````````````````````` + + +Here is a link reference definition with no corresponding link. +It contributes nothing to the document. + +```````````````````````````````` example +[foo]: /url +. +```````````````````````````````` + + +Here is another one: + +```````````````````````````````` example +[ +foo +]: /url +bar +. +

bar

+```````````````````````````````` + + +This is not a link reference definition, because there are +[non-whitespace characters] after the title: + +```````````````````````````````` example +[foo]: /url "title" ok +. +

[foo]: /url "title" ok

+```````````````````````````````` + + +This is a link reference definition, but it has no title: + +```````````````````````````````` example +[foo]: /url +"title" ok +. +

"title" ok

+```````````````````````````````` + + +This is not a link reference definition, because it is indented +four spaces: + +```````````````````````````````` example + [foo]: /url "title" + +[foo] +. +
[foo]: /url "title"
+
+

[foo]

+```````````````````````````````` + + +This is not a link reference definition, because it occurs inside +a code block: + +```````````````````````````````` example +``` +[foo]: /url +``` + +[foo] +. +
[foo]: /url
+
+

[foo]

+```````````````````````````````` + + +A [link reference definition] cannot interrupt a paragraph. + +```````````````````````````````` example +Foo +[bar]: /baz + +[bar] +. +

Foo +[bar]: /baz

+

[bar]

+```````````````````````````````` + + +However, it can directly follow other block elements, such as headings +and thematic breaks, and it need not be followed by a blank line. + +```````````````````````````````` example +# [Foo] +[foo]: /url +> bar +. +

Foo

+
+

bar

+
+```````````````````````````````` + + +Several [link reference definitions] +can occur one after another, without intervening blank lines. + +```````````````````````````````` example +[foo]: /foo-url "foo" +[bar]: /bar-url + "bar" +[baz]: /baz-url + +[foo], +[bar], +[baz] +. +

foo, +bar, +baz

+```````````````````````````````` + + +[Link reference definitions] can occur +inside block containers, like lists and block quotations. They +affect the entire document, not just the container in which they +are defined: + +```````````````````````````````` example +[foo] + +> [foo]: /url +. +

foo

+
+
+```````````````````````````````` + + + +## Paragraphs + +A sequence of non-blank lines that cannot be interpreted as other +kinds of blocks forms a [paragraph](@). +The contents of the paragraph are the result of parsing the +paragraph's raw content as inlines. The paragraph's raw content +is formed by concatenating the lines and removing initial and final +[whitespace]. + +A simple example with two paragraphs: + +```````````````````````````````` example +aaa + +bbb +. +

aaa

+

bbb

+```````````````````````````````` + + +Paragraphs can contain multiple lines, but no blank lines: + +```````````````````````````````` example +aaa +bbb + +ccc +ddd +. +

aaa +bbb

+

ccc +ddd

+```````````````````````````````` + + +Multiple blank lines between paragraph have no effect: + +```````````````````````````````` example +aaa + + +bbb +. +

aaa

+

bbb

+```````````````````````````````` + + +Leading spaces are skipped: + +```````````````````````````````` example + aaa + bbb +. +

aaa +bbb

+```````````````````````````````` + + +Lines after the first may be indented any amount, since indented +code blocks cannot interrupt paragraphs. + +```````````````````````````````` example +aaa + bbb + ccc +. +

aaa +bbb +ccc

+```````````````````````````````` + + +However, the first line may be indented at most three spaces, +or an indented code block will be triggered: + +```````````````````````````````` example + aaa +bbb +. +

aaa +bbb

+```````````````````````````````` + + +```````````````````````````````` example + aaa +bbb +. +
aaa
+
+

bbb

+```````````````````````````````` + + +Final spaces are stripped before inline parsing, so a paragraph +that ends with two or more spaces will not end with a [hard line +break]: + +```````````````````````````````` example +aaa +bbb +. +

aaa
+bbb

+```````````````````````````````` + + +## Blank lines + +[Blank lines] between block-level elements are ignored, +except for the role they play in determining whether a [list] +is [tight] or [loose]. + +Blank lines at the beginning and end of the document are also ignored. + +```````````````````````````````` example + + +aaa + + +# aaa + + +. +

aaa

+

aaa

+```````````````````````````````` + +
+ +## Tables (extension) + +GFM enables the `table` extension, where an additional leaf block type is +available. + +A [table](@) is an arrangement of data with rows and columns, consisting of a +single header row, a [delimiter row] separating the header from the data, and +zero or more data rows. + +Each row consists of cells containing arbitrary text, in which [inlines] are +parsed, separated by pipes (`|`). A leading and trailing pipe is also +recommended for clarity of reading, and if there's otherwise parsing ambiguity. +Spaces between pipes and cell content are trimmed. Block-level elements cannot +be inserted in a table. + +The [delimiter row](@) consists of cells whose only content are hyphens (`-`), +and optionally, a leading or trailing colon (`:`), or both, to indicate left, +right, or center alignment respectively. + +```````````````````````````````` example table +| foo | bar | +| --- | --- | +| baz | bim | +. + + + + + + + + + + + + + +
foobar
bazbim
+```````````````````````````````` + +Cells in one column don't need to match length, though it's easier to read if +they are. Likewise, use of leading and trailing pipes may be inconsistent: + +```````````````````````````````` example table +| abc | defghi | +:-: | -----------: +bar | baz +. + + + + + + + + + + + + + +
abcdefghi
barbaz
+```````````````````````````````` + +Include a pipe in a cell's content by escaping it, including inside other +inline spans: + +```````````````````````````````` example table +| f\|oo | +| ------ | +| b `\|` az | +| b **\|** im | +. + + + + + + + + + + + + + + +
f|oo
b | az
b | im
+```````````````````````````````` + +The table is broken at the first empty line, or beginning of another +block-level structure: + +```````````````````````````````` example table +| abc | def | +| --- | --- | +| bar | baz | +> bar +. + + + + + + + + + + + + + +
abcdef
barbaz
+
+

bar

+
+```````````````````````````````` + +```````````````````````````````` example table +| abc | def | +| --- | --- | +| bar | baz | +bar + +bar +. + + + + + + + + + + + + + + + + + +
abcdef
barbaz
bar
+

bar

+```````````````````````````````` + +The header row must match the [delimiter row] in the number of cells. If not, +a table will not be recognized: + +```````````````````````````````` example table +| abc | def | +| --- | +| bar | +. +

| abc | def | +| --- | +| bar |

+```````````````````````````````` + +The remainder of the table's rows may vary in the number of cells. If there +are a number of cells fewer than the number of cells in the header row, empty +cells are inserted. If there are greater, the excess is ignored: + +```````````````````````````````` example table +| abc | def | +| --- | --- | +| bar | +| bar | baz | boo | +. + + + + + + + + + + + + + + + + + +
abcdef
bar
barbaz
+```````````````````````````````` + +If there are no rows in the body, no `` is generated in HTML output: + +```````````````````````````````` example table +| abc | def | +| --- | --- | +. + + + + + + + +
abcdef
+```````````````````````````````` + +
+ +# Container blocks + +A [container block](#container-blocks) is a block that has other +blocks as its contents. There are two basic kinds of container blocks: +[block quotes] and [list items]. +[Lists] are meta-containers for [list items]. + +We define the syntax for container blocks recursively. The general +form of the definition is: + +> If X is a sequence of blocks, then the result of +> transforming X in such-and-such a way is a container of type Y +> with these blocks as its content. + +So, we explain what counts as a block quote or list item by explaining +how these can be *generated* from their contents. This should suffice +to define the syntax, although it does not give a recipe for *parsing* +these constructions. (A recipe is provided below in the section entitled +[A parsing strategy](#appendix-a-parsing-strategy).) + +## Block quotes + +A [block quote marker](@) +consists of 0-3 spaces of initial indent, plus (a) the character `>` together +with a following space, or (b) a single character `>` not followed by a space. + +The following rules define [block quotes]: + +1. **Basic case.** If a string of lines *Ls* constitute a sequence + of blocks *Bs*, then the result of prepending a [block quote + marker] to the beginning of each line in *Ls* + is a [block quote](#block-quotes) containing *Bs*. + +2. **Laziness.** If a string of lines *Ls* constitute a [block + quote](#block-quotes) with contents *Bs*, then the result of deleting + the initial [block quote marker] from one or + more lines in which the next [non-whitespace character] after the [block + quote marker] is [paragraph continuation + text] is a block quote with *Bs* as its content. + [Paragraph continuation text](@) is text + that will be parsed as part of the content of a paragraph, but does + not occur at the beginning of the paragraph. + +3. **Consecutiveness.** A document cannot contain two [block + quotes] in a row unless there is a [blank line] between them. + +Nothing else counts as a [block quote](#block-quotes). + +Here is a simple example: + +```````````````````````````````` example +> # Foo +> bar +> baz +. +
+

Foo

+

bar +baz

+
+```````````````````````````````` + + +The spaces after the `>` characters can be omitted: + +```````````````````````````````` example +># Foo +>bar +> baz +. +
+

Foo

+

bar +baz

+
+```````````````````````````````` + + +The `>` characters can be indented 1-3 spaces: + +```````````````````````````````` example + > # Foo + > bar + > baz +. +
+

Foo

+

bar +baz

+
+```````````````````````````````` + + +Four spaces gives us a code block: + +```````````````````````````````` example + > # Foo + > bar + > baz +. +
> # Foo
+> bar
+> baz
+
+```````````````````````````````` + + +The Laziness clause allows us to omit the `>` before +[paragraph continuation text]: + +```````````````````````````````` example +> # Foo +> bar +baz +. +
+

Foo

+

bar +baz

+
+```````````````````````````````` + + +A block quote can contain some lazy and some non-lazy +continuation lines: + +```````````````````````````````` example +> bar +baz +> foo +. +
+

bar +baz +foo

+
+```````````````````````````````` + + +Laziness only applies to lines that would have been continuations of +paragraphs had they been prepended with [block quote markers]. +For example, the `> ` cannot be omitted in the second line of + +``` markdown +> foo +> --- +``` + +without changing the meaning: + +```````````````````````````````` example +> foo +--- +. +
+

foo

+
+
+```````````````````````````````` + + +Similarly, if we omit the `> ` in the second line of + +``` markdown +> - foo +> - bar +``` + +then the block quote ends after the first line: + +```````````````````````````````` example +> - foo +- bar +. +
+
    +
  • foo
  • +
+
+
    +
  • bar
  • +
+```````````````````````````````` + + +For the same reason, we can't omit the `> ` in front of +subsequent lines of an indented or fenced code block: + +```````````````````````````````` example +> foo + bar +. +
+
foo
+
+
+
bar
+
+```````````````````````````````` + + +```````````````````````````````` example +> ``` +foo +``` +. +
+
+
+

foo

+
+```````````````````````````````` + + +Note that in the following case, we have a [lazy +continuation line]: + +```````````````````````````````` example +> foo + - bar +. +
+

foo +- bar

+
+```````````````````````````````` + + +To see why, note that in + +```markdown +> foo +> - bar +``` + +the `- bar` is indented too far to start a list, and can't +be an indented code block because indented code blocks cannot +interrupt paragraphs, so it is [paragraph continuation text]. + +A block quote can be empty: + +```````````````````````````````` example +> +. +
+
+```````````````````````````````` + + +```````````````````````````````` example +> +> +> +. +
+
+```````````````````````````````` + + +A block quote can have initial or final blank lines: + +```````````````````````````````` example +> +> foo +> +. +
+

foo

+
+```````````````````````````````` + + +A blank line always separates block quotes: + +```````````````````````````````` example +> foo + +> bar +. +
+

foo

+
+
+

bar

+
+```````````````````````````````` + + +(Most current Markdown implementations, including John Gruber's +original `Markdown.pl`, will parse this example as a single block quote +with two paragraphs. But it seems better to allow the author to decide +whether two block quotes or one are wanted.) + +Consecutiveness means that if we put these block quotes together, +we get a single block quote: + +```````````````````````````````` example +> foo +> bar +. +
+

foo +bar

+
+```````````````````````````````` + + +To get a block quote with two paragraphs, use: + +```````````````````````````````` example +> foo +> +> bar +. +
+

foo

+

bar

+
+```````````````````````````````` + + +Block quotes can interrupt paragraphs: + +```````````````````````````````` example +foo +> bar +. +

foo

+
+

bar

+
+```````````````````````````````` + + +In general, blank lines are not needed before or after block +quotes: + +```````````````````````````````` example +> aaa +*** +> bbb +. +
+

aaa

+
+
+
+

bbb

+
+```````````````````````````````` + + +However, because of laziness, a blank line is needed between +a block quote and a following paragraph: + +```````````````````````````````` example +> bar +baz +. +
+

bar +baz

+
+```````````````````````````````` + + +```````````````````````````````` example +> bar + +baz +. +
+

bar

+
+

baz

+```````````````````````````````` + + +```````````````````````````````` example +> bar +> +baz +. +
+

bar

+
+

baz

+```````````````````````````````` + + +It is a consequence of the Laziness rule that any number +of initial `>`s may be omitted on a continuation line of a +nested block quote: + +```````````````````````````````` example +> > > foo +bar +. +
+
+
+

foo +bar

+
+
+
+```````````````````````````````` + + +```````````````````````````````` example +>>> foo +> bar +>>baz +. +
+
+
+

foo +bar +baz

+
+
+
+```````````````````````````````` + + +When including an indented code block in a block quote, +remember that the [block quote marker] includes +both the `>` and a following space. So *five spaces* are needed after +the `>`: + +```````````````````````````````` example +> code + +> not code +. +
+
code
+
+
+
+

not code

+
+```````````````````````````````` + + + +## List items + +A [list marker](@) is a +[bullet list marker] or an [ordered list marker]. + +A [bullet list marker](@) +is a `-`, `+`, or `*` character. + +An [ordered list marker](@) +is a sequence of 1--9 arabic digits (`0-9`), followed by either a +`.` character or a `)` character. (The reason for the length +limit is that with 10 digits we start seeing integer overflows +in some browsers.) + +The following rules define [list items]: + +1. **Basic case.** If a sequence of lines *Ls* constitute a sequence of + blocks *Bs* starting with a [non-whitespace character] and not separated + from each other by more than one blank line, and *M* is a list + marker of width *W* followed by 1 ≤ *N* ≤ 4 spaces, then the result + of prepending *M* and the following spaces to the first line of + *Ls*, and indenting subsequent lines of *Ls* by *W + N* spaces, is a + list item with *Bs* as its contents. The type of the list item + (bullet or ordered) is determined by the type of its list marker. + If the list item is ordered, then it is also assigned a start + number, based on the ordered list marker. + + Exceptions: + + 1. When the first list item in a [list] interrupts + a paragraph---that is, when it starts on a line that would + otherwise count as [paragraph continuation text]---then (a) + the lines *Ls* must not begin with a blank line, and (b) if + the list item is ordered, the start number must be 1. + 2. If any line is a [thematic break][thematic breaks] then + that line is not a list item. + +For example, let *Ls* be the lines + +```````````````````````````````` example +A paragraph +with two lines. + + indented code + +> A block quote. +. +

A paragraph +with two lines.

+
indented code
+
+
+

A block quote.

+
+```````````````````````````````` + + +And let *M* be the marker `1.`, and *N* = 2. Then rule #1 says +that the following is an ordered list item with start number 1, +and the same contents as *Ls*: + +```````````````````````````````` example +1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+```````````````````````````````` + + +The most important thing to notice is that the position of +the text after the list marker determines how much indentation +is needed in subsequent blocks in the list item. If the list +marker takes up two spaces, and there are three spaces between +the list marker and the next [non-whitespace character], then blocks +must be indented five spaces in order to fall under the list +item. + +Here are some examples showing how far content must be indented to be +put under the list item: + +```````````````````````````````` example +- one + + two +. +
    +
  • one
  • +
+

two

+```````````````````````````````` + + +```````````````````````````````` example +- one + + two +. +
    +
  • +

    one

    +

    two

    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example + - one + + two +. +
    +
  • one
  • +
+
 two
+
+```````````````````````````````` + + +```````````````````````````````` example + - one + + two +. +
    +
  • +

    one

    +

    two

    +
  • +
+```````````````````````````````` + + +It is tempting to think of this in terms of columns: the continuation +blocks must be indented at least to the column of the first +[non-whitespace character] after the list marker. However, that is not quite right. +The spaces after the list marker determine how much relative indentation +is needed. Which column this indentation reaches will depend on +how the list item is embedded in other constructions, as shown by +this example: + +```````````````````````````````` example + > > 1. one +>> +>> two +. +
+
+
    +
  1. +

    one

    +

    two

    +
  2. +
+
+
+```````````````````````````````` + + +Here `two` occurs in the same column as the list marker `1.`, +but is actually contained in the list item, because there is +sufficient indentation after the last containing blockquote marker. + +The converse is also possible. In the following example, the word `two` +occurs far to the right of the initial text of the list item, `one`, but +it is not considered part of the list item, because it is not indented +far enough past the blockquote marker: + +```````````````````````````````` example +>>- one +>> + > > two +. +
+
+
    +
  • one
  • +
+

two

+
+
+```````````````````````````````` + + +Note that at least one space is needed between the list marker and +any following content, so these are not list items: + +```````````````````````````````` example +-one + +2.two +. +

-one

+

2.two

+```````````````````````````````` + + +A list item may contain blocks that are separated by more than +one blank line. + +```````````````````````````````` example +- foo + + + bar +. +
    +
  • +

    foo

    +

    bar

    +
  • +
+```````````````````````````````` + + +A list item may contain any kind of block: + +```````````````````````````````` example +1. foo + + ``` + bar + ``` + + baz + + > bam +. +
    +
  1. +

    foo

    +
    bar
    +
    +

    baz

    +
    +

    bam

    +
    +
  2. +
+```````````````````````````````` + + +A list item that contains an indented code block will preserve +empty lines within the code block verbatim. + +```````````````````````````````` example +- Foo + + bar + + + baz +. +
    +
  • +

    Foo

    +
    bar
    +
    +
    +baz
    +
    +
  • +
+```````````````````````````````` + +Note that ordered list start numbers must be nine digits or less: + +```````````````````````````````` example +123456789. ok +. +
    +
  1. ok
  2. +
+```````````````````````````````` + + +```````````````````````````````` example +1234567890. not ok +. +

1234567890. not ok

+```````````````````````````````` + + +A start number may begin with 0s: + +```````````````````````````````` example +0. ok +. +
    +
  1. ok
  2. +
+```````````````````````````````` + + +```````````````````````````````` example +003. ok +. +
    +
  1. ok
  2. +
+```````````````````````````````` + + +A start number may not be negative: + +```````````````````````````````` example +-1. not ok +. +

-1. not ok

+```````````````````````````````` + + + +2. **Item starting with indented code.** If a sequence of lines *Ls* + constitute a sequence of blocks *Bs* starting with an indented code + block and not separated from each other by more than one blank line, + and *M* is a list marker of width *W* followed by + one space, then the result of prepending *M* and the following + space to the first line of *Ls*, and indenting subsequent lines of + *Ls* by *W + 1* spaces, is a list item with *Bs* as its contents. + If a line is empty, then it need not be indented. The type of the + list item (bullet or ordered) is determined by the type of its list + marker. If the list item is ordered, then it is also assigned a + start number, based on the ordered list marker. + +An indented code block will have to be indented four spaces beyond +the edge of the region where text will be included in the list item. +In the following case that is 6 spaces: + +```````````````````````````````` example +- foo + + bar +. +
    +
  • +

    foo

    +
    bar
    +
    +
  • +
+```````````````````````````````` + + +And in this case it is 11 spaces: + +```````````````````````````````` example + 10. foo + + bar +. +
    +
  1. +

    foo

    +
    bar
    +
    +
  2. +
+```````````````````````````````` + + +If the *first* block in the list item is an indented code block, +then by rule #2, the contents must be indented *one* space after the +list marker: + +```````````````````````````````` example + indented code + +paragraph + + more code +. +
indented code
+
+

paragraph

+
more code
+
+```````````````````````````````` + + +```````````````````````````````` example +1. indented code + + paragraph + + more code +. +
    +
  1. +
    indented code
    +
    +

    paragraph

    +
    more code
    +
    +
  2. +
+```````````````````````````````` + + +Note that an additional space indent is interpreted as space +inside the code block: + +```````````````````````````````` example +1. indented code + + paragraph + + more code +. +
    +
  1. +
     indented code
    +
    +

    paragraph

    +
    more code
    +
    +
  2. +
+```````````````````````````````` + + +Note that rules #1 and #2 only apply to two cases: (a) cases +in which the lines to be included in a list item begin with a +[non-whitespace character], and (b) cases in which +they begin with an indented code +block. In a case like the following, where the first block begins with +a three-space indent, the rules do not allow us to form a list item by +indenting the whole thing and prepending a list marker: + +```````````````````````````````` example + foo + +bar +. +

foo

+

bar

+```````````````````````````````` + + +```````````````````````````````` example +- foo + + bar +. +
    +
  • foo
  • +
+

bar

+```````````````````````````````` + + +This is not a significant restriction, because when a block begins +with 1-3 spaces indent, the indentation can always be removed without +a change in interpretation, allowing rule #1 to be applied. So, in +the above case: + +```````````````````````````````` example +- foo + + bar +. +
    +
  • +

    foo

    +

    bar

    +
  • +
+```````````````````````````````` + + +3. **Item starting with a blank line.** If a sequence of lines *Ls* + starting with a single [blank line] constitute a (possibly empty) + sequence of blocks *Bs*, not separated from each other by more than + one blank line, and *M* is a list marker of width *W*, + then the result of prepending *M* to the first line of *Ls*, and + indenting subsequent lines of *Ls* by *W + 1* spaces, is a list + item with *Bs* as its contents. + If a line is empty, then it need not be indented. The type of the + list item (bullet or ordered) is determined by the type of its list + marker. If the list item is ordered, then it is also assigned a + start number, based on the ordered list marker. + +Here are some list items that start with a blank line but are not empty: + +```````````````````````````````` example +- + foo +- + ``` + bar + ``` +- + baz +. +
    +
  • foo
  • +
  • +
    bar
    +
    +
  • +
  • +
    baz
    +
    +
  • +
+```````````````````````````````` + +When the list item starts with a blank line, the number of spaces +following the list marker doesn't change the required indentation: + +```````````````````````````````` example +- + foo +. +
    +
  • foo
  • +
+```````````````````````````````` + + +A list item can begin with at most one blank line. +In the following example, `foo` is not part of the list +item: + +```````````````````````````````` example +- + + foo +. +
    +
  • +
+

foo

+```````````````````````````````` + + +Here is an empty bullet list item: + +```````````````````````````````` example +- foo +- +- bar +. +
    +
  • foo
  • +
  • +
  • bar
  • +
+```````````````````````````````` + + +It does not matter whether there are spaces following the [list marker]: + +```````````````````````````````` example +- foo +- +- bar +. +
    +
  • foo
  • +
  • +
  • bar
  • +
+```````````````````````````````` + + +Here is an empty ordered list item: + +```````````````````````````````` example +1. foo +2. +3. bar +. +
    +
  1. foo
  2. +
  3. +
  4. bar
  5. +
+```````````````````````````````` + + +A list may start or end with an empty list item: + +```````````````````````````````` example +* +. +
    +
  • +
+```````````````````````````````` + +However, an empty list item cannot interrupt a paragraph: + +```````````````````````````````` example +foo +* + +foo +1. +. +

foo +*

+

foo +1.

+```````````````````````````````` + + +4. **Indentation.** If a sequence of lines *Ls* constitutes a list item + according to rule #1, #2, or #3, then the result of indenting each line + of *Ls* by 1-3 spaces (the same for each line) also constitutes a + list item with the same contents and attributes. If a line is + empty, then it need not be indented. + +Indented one space: + +```````````````````````````````` example + 1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+```````````````````````````````` + + +Indented two spaces: + +```````````````````````````````` example + 1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+```````````````````````````````` + + +Indented three spaces: + +```````````````````````````````` example + 1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+```````````````````````````````` + + +Four spaces indent gives a code block: + +```````````````````````````````` example + 1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
1.  A paragraph
+    with two lines.
+
+        indented code
+
+    > A block quote.
+
+```````````````````````````````` + + + +5. **Laziness.** If a string of lines *Ls* constitute a [list + item](#list-items) with contents *Bs*, then the result of deleting + some or all of the indentation from one or more lines in which the + next [non-whitespace character] after the indentation is + [paragraph continuation text] is a + list item with the same contents and attributes. The unindented + lines are called + [lazy continuation line](@)s. + +Here is an example with [lazy continuation lines]: + +```````````````````````````````` example + 1. A paragraph +with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+```````````````````````````````` + + +Indentation can be partially deleted: + +```````````````````````````````` example + 1. A paragraph + with two lines. +. +
    +
  1. A paragraph +with two lines.
  2. +
+```````````````````````````````` + + +These examples show how laziness can work in nested structures: + +```````````````````````````````` example +> 1. > Blockquote +continued here. +. +
+
    +
  1. +
    +

    Blockquote +continued here.

    +
    +
  2. +
+
+```````````````````````````````` + + +```````````````````````````````` example +> 1. > Blockquote +> continued here. +. +
+
    +
  1. +
    +

    Blockquote +continued here.

    +
    +
  2. +
+
+```````````````````````````````` + + + +6. **That's all.** Nothing that is not counted as a list item by rules + #1--5 counts as a [list item](#list-items). + +The rules for sublists follow from the general rules +[above][List items]. A sublist must be indented the same number +of spaces a paragraph would need to be in order to be included +in the list item. + +So, in this case we need two spaces indent: + +```````````````````````````````` example +- foo + - bar + - baz + - boo +. +
    +
  • foo +
      +
    • bar +
        +
      • baz +
          +
        • boo
        • +
        +
      • +
      +
    • +
    +
  • +
+```````````````````````````````` + + +One is not enough: + +```````````````````````````````` example +- foo + - bar + - baz + - boo +. +
    +
  • foo
  • +
  • bar
  • +
  • baz
  • +
  • boo
  • +
+```````````````````````````````` + + +Here we need four, because the list marker is wider: + +```````````````````````````````` example +10) foo + - bar +. +
    +
  1. foo +
      +
    • bar
    • +
    +
  2. +
+```````````````````````````````` + + +Three is not enough: + +```````````````````````````````` example +10) foo + - bar +. +
    +
  1. foo
  2. +
+
    +
  • bar
  • +
+```````````````````````````````` + + +A list may be the first block in a list item: + +```````````````````````````````` example +- - foo +. +
    +
  • +
      +
    • foo
    • +
    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example +1. - 2. foo +. +
    +
  1. +
      +
    • +
        +
      1. foo
      2. +
      +
    • +
    +
  2. +
+```````````````````````````````` + + +A list item can contain a heading: + +```````````````````````````````` example +- # Foo +- Bar + --- + baz +. +
    +
  • +

    Foo

    +
  • +
  • +

    Bar

    +baz
  • +
+```````````````````````````````` + + +### Motivation + +John Gruber's Markdown spec says the following about list items: + +1. "List markers typically start at the left margin, but may be indented + by up to three spaces. List markers must be followed by one or more + spaces or a tab." + +2. "To make lists look nice, you can wrap items with hanging indents.... + But if you don't want to, you don't have to." + +3. "List items may consist of multiple paragraphs. Each subsequent + paragraph in a list item must be indented by either 4 spaces or one + tab." + +4. "It looks nice if you indent every line of the subsequent paragraphs, + but here again, Markdown will allow you to be lazy." + +5. "To put a blockquote within a list item, the blockquote's `>` + delimiters need to be indented." + +6. "To put a code block within a list item, the code block needs to be + indented twice — 8 spaces or two tabs." + +These rules specify that a paragraph under a list item must be indented +four spaces (presumably, from the left margin, rather than the start of +the list marker, but this is not said), and that code under a list item +must be indented eight spaces instead of the usual four. They also say +that a block quote must be indented, but not by how much; however, the +example given has four spaces indentation. Although nothing is said +about other kinds of block-level content, it is certainly reasonable to +infer that *all* block elements under a list item, including other +lists, must be indented four spaces. This principle has been called the +*four-space rule*. + +The four-space rule is clear and principled, and if the reference +implementation `Markdown.pl` had followed it, it probably would have +become the standard. However, `Markdown.pl` allowed paragraphs and +sublists to start with only two spaces indentation, at least on the +outer level. Worse, its behavior was inconsistent: a sublist of an +outer-level list needed two spaces indentation, but a sublist of this +sublist needed three spaces. It is not surprising, then, that different +implementations of Markdown have developed very different rules for +determining what comes under a list item. (Pandoc and python-Markdown, +for example, stuck with Gruber's syntax description and the four-space +rule, while discount, redcarpet, marked, PHP Markdown, and others +followed `Markdown.pl`'s behavior more closely.) + +Unfortunately, given the divergences between implementations, there +is no way to give a spec for list items that will be guaranteed not +to break any existing documents. However, the spec given here should +correctly handle lists formatted with either the four-space rule or +the more forgiving `Markdown.pl` behavior, provided they are laid out +in a way that is natural for a human to read. + +The strategy here is to let the width and indentation of the list marker +determine the indentation necessary for blocks to fall under the list +item, rather than having a fixed and arbitrary number. The writer can +think of the body of the list item as a unit which gets indented to the +right enough to fit the list marker (and any indentation on the list +marker). (The laziness rule, #5, then allows continuation lines to be +unindented if needed.) + +This rule is superior, we claim, to any rule requiring a fixed level of +indentation from the margin. The four-space rule is clear but +unnatural. It is quite unintuitive that + +``` markdown +- foo + + bar + + - baz +``` + +should be parsed as two lists with an intervening paragraph, + +``` html +
    +
  • foo
  • +
+

bar

+
    +
  • baz
  • +
+``` + +as the four-space rule demands, rather than a single list, + +``` html +
    +
  • +

    foo

    +

    bar

    +
      +
    • baz
    • +
    +
  • +
+``` + +The choice of four spaces is arbitrary. It can be learned, but it is +not likely to be guessed, and it trips up beginners regularly. + +Would it help to adopt a two-space rule? The problem is that such +a rule, together with the rule allowing 1--3 spaces indentation of the +initial list marker, allows text that is indented *less than* the +original list marker to be included in the list item. For example, +`Markdown.pl` parses + +``` markdown + - one + + two +``` + +as a single list item, with `two` a continuation paragraph: + +``` html +
    +
  • +

    one

    +

    two

    +
  • +
+``` + +and similarly + +``` markdown +> - one +> +> two +``` + +as + +``` html +
+
    +
  • +

    one

    +

    two

    +
  • +
+
+``` + +This is extremely unintuitive. + +Rather than requiring a fixed indent from the margin, we could require +a fixed indent (say, two spaces, or even one space) from the list marker (which +may itself be indented). This proposal would remove the last anomaly +discussed. Unlike the spec presented above, it would count the following +as a list item with a subparagraph, even though the paragraph `bar` +is not indented as far as the first paragraph `foo`: + +``` markdown + 10. foo + + bar +``` + +Arguably this text does read like a list item with `bar` as a subparagraph, +which may count in favor of the proposal. However, on this proposal indented +code would have to be indented six spaces after the list marker. And this +would break a lot of existing Markdown, which has the pattern: + +``` markdown +1. foo + + indented code +``` + +where the code is indented eight spaces. The spec above, by contrast, will +parse this text as expected, since the code block's indentation is measured +from the beginning of `foo`. + +The one case that needs special treatment is a list item that *starts* +with indented code. How much indentation is required in that case, since +we don't have a "first paragraph" to measure from? Rule #2 simply stipulates +that in such cases, we require one space indentation from the list marker +(and then the normal four spaces for the indented code). This will match the +four-space rule in cases where the list marker plus its initial indentation +takes four spaces (a common case), but diverge in other cases. + +
+ +## Task list items (extension) + +GFM enables the `tasklist` extension, where an additional processing step is +performed on [list items]. + +A [task list item](@) is a [list item][list items] where the first block in it +is a paragraph which begins with a [task list item marker] and at least one +whitespace character before any other content. + +A [task list item marker](@) consists of an optional number of spaces, a left +bracket (`[`), either a whitespace character or the letter `x` in either +lowercase or uppercase, and then a right bracket (`]`). + +When rendered, the [task list item marker] is replaced with a semantic checkbox element; +in an HTML output, this would be an `` element. + +If the character between the brackets is a whitespace character, the checkbox +is unchecked. Otherwise, the checkbox is checked. + +This spec does not define how the checkbox elements are interacted with: in practice, +implementors are free to render the checkboxes as disabled or inmutable elements, +or they may dynamically handle dynamic interactions (i.e. checking, unchecking) in +the final rendered document. + +```````````````````````````````` example disabled +- [ ] foo +- [x] bar +. +
    +
  • foo
  • +
  • bar
  • +
+```````````````````````````````` + +Task lists can be arbitrarily nested: + +```````````````````````````````` example disabled +- [x] foo + - [ ] bar + - [x] baz +- [ ] bim +. +
    +
  • foo +
      +
    • bar
    • +
    • baz
    • +
    +
  • +
  • bim
  • +
+```````````````````````````````` + +
+ +## Lists + +A [list](@) is a sequence of one or more +list items [of the same type]. The list items +may be separated by any number of blank lines. + +Two list items are [of the same type](@) +if they begin with a [list marker] of the same type. +Two list markers are of the +same type if (a) they are bullet list markers using the same character +(`-`, `+`, or `*`) or (b) they are ordered list numbers with the same +delimiter (either `.` or `)`). + +A list is an [ordered list](@) +if its constituent list items begin with +[ordered list markers], and a +[bullet list](@) if its constituent list +items begin with [bullet list markers]. + +The [start number](@) +of an [ordered list] is determined by the list number of +its initial list item. The numbers of subsequent list items are +disregarded. + +A list is [loose](@) if any of its constituent +list items are separated by blank lines, or if any of its constituent +list items directly contain two block-level elements with a blank line +between them. Otherwise a list is [tight](@). +(The difference in HTML output is that paragraphs in a loose list are +wrapped in `

` tags, while paragraphs in a tight list are not.) + +Changing the bullet or ordered list delimiter starts a new list: + +```````````````````````````````` example +- foo +- bar ++ baz +. +

    +
  • foo
  • +
  • bar
  • +
+
    +
  • baz
  • +
+```````````````````````````````` + + +```````````````````````````````` example +1. foo +2. bar +3) baz +. +
    +
  1. foo
  2. +
  3. bar
  4. +
+
    +
  1. baz
  2. +
+```````````````````````````````` + + +In CommonMark, a list can interrupt a paragraph. That is, +no blank line is needed to separate a paragraph from a following +list: + +```````````````````````````````` example +Foo +- bar +- baz +. +

Foo

+
    +
  • bar
  • +
  • baz
  • +
+```````````````````````````````` + +`Markdown.pl` does not allow this, through fear of triggering a list +via a numeral in a hard-wrapped line: + +``` markdown +The number of windows in my house is +14. The number of doors is 6. +``` + +Oddly, though, `Markdown.pl` *does* allow a blockquote to +interrupt a paragraph, even though the same considerations might +apply. + +In CommonMark, we do allow lists to interrupt paragraphs, for +two reasons. First, it is natural and not uncommon for people +to start lists without blank lines: + +``` markdown +I need to buy +- new shoes +- a coat +- a plane ticket +``` + +Second, we are attracted to a + +> [principle of uniformity](@): +> if a chunk of text has a certain +> meaning, it will continue to have the same meaning when put into a +> container block (such as a list item or blockquote). + +(Indeed, the spec for [list items] and [block quotes] presupposes +this principle.) This principle implies that if + +``` markdown + * I need to buy + - new shoes + - a coat + - a plane ticket +``` + +is a list item containing a paragraph followed by a nested sublist, +as all Markdown implementations agree it is (though the paragraph +may be rendered without `

` tags, since the list is "tight"), +then + +``` markdown +I need to buy +- new shoes +- a coat +- a plane ticket +``` + +by itself should be a paragraph followed by a nested sublist. + +Since it is well established Markdown practice to allow lists to +interrupt paragraphs inside list items, the [principle of +uniformity] requires us to allow this outside list items as +well. ([reStructuredText](http://docutils.sourceforge.net/rst.html) +takes a different approach, requiring blank lines before lists +even inside other list items.) + +In order to solve of unwanted lists in paragraphs with +hard-wrapped numerals, we allow only lists starting with `1` to +interrupt paragraphs. Thus, + +```````````````````````````````` example +The number of windows in my house is +14. The number of doors is 6. +. +

The number of windows in my house is +14. The number of doors is 6.

+```````````````````````````````` + +We may still get an unintended result in cases like + +```````````````````````````````` example +The number of windows in my house is +1. The number of doors is 6. +. +

The number of windows in my house is

+
    +
  1. The number of doors is 6.
  2. +
+```````````````````````````````` + +but this rule should prevent most spurious list captures. + +There can be any number of blank lines between items: + +```````````````````````````````` example +- foo + +- bar + + +- baz +. +
    +
  • +

    foo

    +
  • +
  • +

    bar

    +
  • +
  • +

    baz

    +
  • +
+```````````````````````````````` + +```````````````````````````````` example +- foo + - bar + - baz + + + bim +. +
    +
  • foo +
      +
    • bar +
        +
      • +

        baz

        +

        bim

        +
      • +
      +
    • +
    +
  • +
+```````````````````````````````` + + +To separate consecutive lists of the same type, or to separate a +list from an indented code block that would otherwise be parsed +as a subparagraph of the final list item, you can insert a blank HTML +comment: + +```````````````````````````````` example +- foo +- bar + + + +- baz +- bim +. +
    +
  • foo
  • +
  • bar
  • +
+ +
    +
  • baz
  • +
  • bim
  • +
+```````````````````````````````` + + +```````````````````````````````` example +- foo + + notcode + +- foo + + + + code +. +
    +
  • +

    foo

    +

    notcode

    +
  • +
  • +

    foo

    +
  • +
+ +
code
+
+```````````````````````````````` + + +List items need not be indented to the same level. The following +list items will be treated as items at the same list level, +since none is indented enough to belong to the previous list +item: + +```````````````````````````````` example +- a + - b + - c + - d + - e + - f +- g +. +
    +
  • a
  • +
  • b
  • +
  • c
  • +
  • d
  • +
  • e
  • +
  • f
  • +
  • g
  • +
+```````````````````````````````` + + +```````````````````````````````` example +1. a + + 2. b + + 3. c +. +
    +
  1. +

    a

    +
  2. +
  3. +

    b

    +
  4. +
  5. +

    c

    +
  6. +
+```````````````````````````````` + +Note, however, that list items may not be indented more than +three spaces. Here `- e` is treated as a paragraph continuation +line, because it is indented more than three spaces: + +```````````````````````````````` example +- a + - b + - c + - d + - e +. +
    +
  • a
  • +
  • b
  • +
  • c
  • +
  • d +- e
  • +
+```````````````````````````````` + +And here, `3. c` is treated as in indented code block, +because it is indented four spaces and preceded by a +blank line. + +```````````````````````````````` example +1. a + + 2. b + + 3. c +. +
    +
  1. +

    a

    +
  2. +
  3. +

    b

    +
  4. +
+
3. c
+
+```````````````````````````````` + + +This is a loose list, because there is a blank line between +two of the list items: + +```````````````````````````````` example +- a +- b + +- c +. +
    +
  • +

    a

    +
  • +
  • +

    b

    +
  • +
  • +

    c

    +
  • +
+```````````````````````````````` + + +So is this, with a empty second item: + +```````````````````````````````` example +* a +* + +* c +. +
    +
  • +

    a

    +
  • +
  • +
  • +

    c

    +
  • +
+```````````````````````````````` + + +These are loose lists, even though there is no space between the items, +because one of the items directly contains two block-level elements +with a blank line between them: + +```````````````````````````````` example +- a +- b + + c +- d +. +
    +
  • +

    a

    +
  • +
  • +

    b

    +

    c

    +
  • +
  • +

    d

    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example +- a +- b + + [ref]: /url +- d +. +
    +
  • +

    a

    +
  • +
  • +

    b

    +
  • +
  • +

    d

    +
  • +
+```````````````````````````````` + + +This is a tight list, because the blank lines are in a code block: + +```````````````````````````````` example +- a +- ``` + b + + + ``` +- c +. +
    +
  • a
  • +
  • +
    b
    +
    +
    +
    +
  • +
  • c
  • +
+```````````````````````````````` + + +This is a tight list, because the blank line is between two +paragraphs of a sublist. So the sublist is loose while +the outer list is tight: + +```````````````````````````````` example +- a + - b + + c +- d +. +
    +
  • a +
      +
    • +

      b

      +

      c

      +
    • +
    +
  • +
  • d
  • +
+```````````````````````````````` + + +This is a tight list, because the blank line is inside the +block quote: + +```````````````````````````````` example +* a + > b + > +* c +. +
    +
  • a +
    +

    b

    +
    +
  • +
  • c
  • +
+```````````````````````````````` + + +This list is tight, because the consecutive block elements +are not separated by blank lines: + +```````````````````````````````` example +- a + > b + ``` + c + ``` +- d +. +
    +
  • a +
    +

    b

    +
    +
    c
    +
    +
  • +
  • d
  • +
+```````````````````````````````` + + +A single-paragraph list is tight: + +```````````````````````````````` example +- a +. +
    +
  • a
  • +
+```````````````````````````````` + + +```````````````````````````````` example +- a + - b +. +
    +
  • a +
      +
    • b
    • +
    +
  • +
+```````````````````````````````` + + +This list is loose, because of the blank line between the +two block elements in the list item: + +```````````````````````````````` example +1. ``` + foo + ``` + + bar +. +
    +
  1. +
    foo
    +
    +

    bar

    +
  2. +
+```````````````````````````````` + + +Here the outer list is loose, the inner list tight: + +```````````````````````````````` example +* foo + * bar + + baz +. +
    +
  • +

    foo

    +
      +
    • bar
    • +
    +

    baz

    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example +- a + - b + - c + +- d + - e + - f +. +
    +
  • +

    a

    +
      +
    • b
    • +
    • c
    • +
    +
  • +
  • +

    d

    +
      +
    • e
    • +
    • f
    • +
    +
  • +
+```````````````````````````````` + + +# Inlines + +Inlines are parsed sequentially from the beginning of the character +stream to the end (left to right, in left-to-right languages). +Thus, for example, in + +```````````````````````````````` example +`hi`lo` +. +

hilo`

+```````````````````````````````` + + +`hi` is parsed as code, leaving the backtick at the end as a literal +backtick. + +## Backslash escapes + +Any ASCII punctuation character may be backslash-escaped: + +```````````````````````````````` example +\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~ +. +

!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~

+```````````````````````````````` + + +Backslashes before other characters are treated as literal +backslashes: + +```````````````````````````````` example +\→\A\a\ \3\φ\« +. +

\→\A\a\ \3\φ\«

+```````````````````````````````` + + +Escaped characters are treated as regular characters and do +not have their usual Markdown meanings: + +```````````````````````````````` example +\*not emphasized* +\
not a tag +\[not a link](/foo) +\`not code` +1\. not a list +\* not a list +\# not a heading +\[foo]: /url "not a reference" +. +

*not emphasized* +<br/> not a tag +[not a link](/foo) +`not code` +1. not a list +* not a list +# not a heading +[foo]: /url "not a reference"

+```````````````````````````````` + + +If a backslash is itself escaped, the following character is not: + +```````````````````````````````` example +\\*emphasis* +. +

\emphasis

+```````````````````````````````` + + +A backslash at the end of the line is a [hard line break]: + +```````````````````````````````` example +foo\ +bar +. +

foo
+bar

+```````````````````````````````` + + +Backslash escapes do not work in code blocks, code spans, autolinks, or +raw HTML: + +```````````````````````````````` example +`` \[\` `` +. +

\[\`

+```````````````````````````````` + + +```````````````````````````````` example + \[\] +. +
\[\]
+
+```````````````````````````````` + + +```````````````````````````````` example +~~~ +\[\] +~~~ +. +
\[\]
+
+```````````````````````````````` + + +```````````````````````````````` example + +. +

http://example.com?find=\*

+```````````````````````````````` + + +```````````````````````````````` example + +. + +```````````````````````````````` + + +But they work in all other contexts, including URLs and link titles, +link references, and [info strings] in [fenced code blocks]: + +```````````````````````````````` example +[foo](/bar\* "ti\*tle") +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +[foo] + +[foo]: /bar\* "ti\*tle" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +``` foo\+bar +foo +``` +. +
foo
+
+```````````````````````````````` + + + +## Entity and numeric character references + +All valid HTML entity references and numeric character +references, except those occurring in code blocks and code spans, +are recognized as such and treated as equivalent to the +corresponding Unicode characters. Conforming CommonMark parsers +need not store information about whether a particular character +was represented in the source using a Unicode character or +an entity reference. + +[Entity references](@) consist of `&` + any of the valid +HTML5 entity names + `;`. The +document +is used as an authoritative source for the valid entity +references and their corresponding code points. + +```````````````````````````````` example +  & © Æ Ď +¾ ℋ ⅆ +∲ ≧̸ +. +

& © Æ Ď +¾ ℋ ⅆ +∲ ≧̸

+```````````````````````````````` + + +[Decimal numeric character +references](@) +consist of `&#` + a string of 1--7 arabic digits + `;`. A +numeric character reference is parsed as the corresponding +Unicode character. Invalid Unicode code points will be replaced by +the REPLACEMENT CHARACTER (`U+FFFD`). For security reasons, +the code point `U+0000` will also be replaced by `U+FFFD`. + +```````````````````````````````` example +# Ӓ Ϡ � +. +

# Ӓ Ϡ �

+```````````````````````````````` + + +[Hexadecimal numeric character +references](@) consist of `&#` + +either `X` or `x` + a string of 1-6 hexadecimal digits + `;`. +They too are parsed as the corresponding Unicode character (this +time specified with a hexadecimal numeral instead of decimal). + +```````````````````````````````` example +" ആ ಫ +. +

" ആ ಫ

+```````````````````````````````` + + +Here are some nonentities: + +```````````````````````````````` example +  &x; &#; &#x; +� +&#abcdef0; +&ThisIsNotDefined; &hi?; +. +

&nbsp &x; &#; &#x; +&#987654321; +&#abcdef0; +&ThisIsNotDefined; &hi?;

+```````````````````````````````` + + +Although HTML5 does accept some entity references +without a trailing semicolon (such as `©`), these are not +recognized here, because it makes the grammar too ambiguous: + +```````````````````````````````` example +© +. +

&copy

+```````````````````````````````` + + +Strings that are not on the list of HTML5 named entities are not +recognized as entity references either: + +```````````````````````````````` example +&MadeUpEntity; +. +

&MadeUpEntity;

+```````````````````````````````` + + +Entity and numeric character references are recognized in any +context besides code spans or code blocks, including +URLs, [link titles], and [fenced code block][] [info strings]: + +```````````````````````````````` example + +. + +```````````````````````````````` + + +```````````````````````````````` example +[foo](/föö "föö") +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +[foo] + +[foo]: /föö "föö" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +``` föö +foo +``` +. +
foo
+
+```````````````````````````````` + + +Entity and numeric character references are treated as literal +text in code spans and code blocks: + +```````````````````````````````` example +`föö` +. +

f&ouml;&ouml;

+```````````````````````````````` + + +```````````````````````````````` example + föfö +. +
f&ouml;f&ouml;
+
+```````````````````````````````` + + +## Code spans + +A [backtick string](@) +is a string of one or more backtick characters (`` ` ``) that is neither +preceded nor followed by a backtick. + +A [code span](@) begins with a backtick string and ends with +a backtick string of equal length. The contents of the code span are +the characters between the two backtick strings, normalized in the +following ways: + +- First, [line endings] are converted to [spaces]. +- If the resulting string both begins *and* ends with a [space] + character, a single [space] character is removed from the + front and back. This allows you to include code that begins + or ends with backtick characters, which must be separated by + whitespace from the opening or closing backtick strings. + +This is a simple code span: + +```````````````````````````````` example +`foo` +. +

foo

+```````````````````````````````` + + +Here two backticks are used, because the code contains a backtick. +This example also illustrates stripping of a single leading and +trailing space: + +```````````````````````````````` example +`` foo ` bar `` +. +

foo ` bar

+```````````````````````````````` + + +This example shows the motivation for stripping leading and trailing +spaces: + +```````````````````````````````` example +` `` ` +. +

``

+```````````````````````````````` + +Note that only *one* space is stripped: + +```````````````````````````````` example +` `` ` +. +

``

+```````````````````````````````` + +The stripping only happens if the space is on both +sides of the string: + +```````````````````````````````` example +` a` +. +

a

+```````````````````````````````` + +Only [spaces], and not [unicode whitespace] in general, are +stripped in this way: + +```````````````````````````````` example +` b ` +. +

b

+```````````````````````````````` + + +[Line endings] are treated like spaces: + +```````````````````````````````` example +`` +foo +bar +baz +`` +. +

foo bar baz

+```````````````````````````````` + +```````````````````````````````` example +`` +foo +`` +. +

foo

+```````````````````````````````` + + +Interior spaces are not collapsed: + +```````````````````````````````` example +`foo bar +baz` +. +

foo bar baz

+```````````````````````````````` + +Note that browsers will typically collapse consecutive spaces +when rendering `` elements, so it is recommended that +the following CSS be used: + + code{white-space: pre-wrap;} + + +Note that backslash escapes do not work in code spans. All backslashes +are treated literally: + +```````````````````````````````` example +`foo\`bar` +. +

foo\bar`

+```````````````````````````````` + + +Backslash escapes are never needed, because one can always choose a +string of *n* backtick characters as delimiters, where the code does +not contain any strings of exactly *n* backtick characters. + +```````````````````````````````` example +``foo`bar`` +. +

foo`bar

+```````````````````````````````` + +```````````````````````````````` example +` foo `` bar ` +. +

foo `` bar

+```````````````````````````````` + + +Code span backticks have higher precedence than any other inline +constructs except HTML tags and autolinks. Thus, for example, this is +not parsed as emphasized text, since the second `*` is part of a code +span: + +```````````````````````````````` example +*foo`*` +. +

*foo*

+```````````````````````````````` + + +And this is not parsed as a link: + +```````````````````````````````` example +[not a `link](/foo`) +. +

[not a link](/foo)

+```````````````````````````````` + + +Code spans, HTML tags, and autolinks have the same precedence. +Thus, this is code: + +```````````````````````````````` example +`` +. +

<a href="">`

+```````````````````````````````` + + +But this is an HTML tag: + +```````````````````````````````` example +
` +. +

`

+```````````````````````````````` + + +And this is code: + +```````````````````````````````` example +`` +. +

<http://foo.bar.baz>`

+```````````````````````````````` + + +But this is an autolink: + +```````````````````````````````` example +` +. +

http://foo.bar.`baz`

+```````````````````````````````` + + +When a backtick string is not closed by a matching backtick string, +we just have literal backticks: + +```````````````````````````````` example +```foo`` +. +

```foo``

+```````````````````````````````` + + +```````````````````````````````` example +`foo +. +

`foo

+```````````````````````````````` + +The following case also illustrates the need for opening and +closing backtick strings to be equal in length: + +```````````````````````````````` example +`foo``bar`` +. +

`foobar

+```````````````````````````````` + + +## Emphasis and strong emphasis + +John Gruber's original [Markdown syntax +description](http://daringfireball.net/projects/markdown/syntax#em) says: + +> Markdown treats asterisks (`*`) and underscores (`_`) as indicators of +> emphasis. Text wrapped with one `*` or `_` will be wrapped with an HTML +> `` tag; double `*`'s or `_`'s will be wrapped with an HTML `` +> tag. + +This is enough for most users, but these rules leave much undecided, +especially when it comes to nested emphasis. The original +`Markdown.pl` test suite makes it clear that triple `***` and +`___` delimiters can be used for strong emphasis, and most +implementations have also allowed the following patterns: + +``` markdown +***strong emph*** +***strong** in emph* +***emph* in strong** +**in strong *emph*** +*in emph **strong*** +``` + +The following patterns are less widely supported, but the intent +is clear and they are useful (especially in contexts like bibliography +entries): + +``` markdown +*emph *with emph* in it* +**strong **with strong** in it** +``` + +Many implementations have also restricted intraword emphasis to +the `*` forms, to avoid unwanted emphasis in words containing +internal underscores. (It is best practice to put these in code +spans, but users often do not.) + +``` markdown +internal emphasis: foo*bar*baz +no emphasis: foo_bar_baz +``` + +The rules given below capture all of these patterns, while allowing +for efficient parsing strategies that do not backtrack. + +First, some definitions. A [delimiter run](@) is either +a sequence of one or more `*` characters that is not preceded or +followed by a non-backslash-escaped `*` character, or a sequence +of one or more `_` characters that is not preceded or followed by +a non-backslash-escaped `_` character. + +A [left-flanking delimiter run](@) is +a [delimiter run] that is (1) not followed by [Unicode whitespace], +and either (2a) not followed by a [punctuation character], or +(2b) followed by a [punctuation character] and +preceded by [Unicode whitespace] or a [punctuation character]. +For purposes of this definition, the beginning and the end of +the line count as Unicode whitespace. + +A [right-flanking delimiter run](@) is +a [delimiter run] that is (1) not preceded by [Unicode whitespace], +and either (2a) not preceded by a [punctuation character], or +(2b) preceded by a [punctuation character] and +followed by [Unicode whitespace] or a [punctuation character]. +For purposes of this definition, the beginning and the end of +the line count as Unicode whitespace. + +Here are some examples of delimiter runs. + + - left-flanking but not right-flanking: + + ``` + ***abc + _abc + **"abc" + _"abc" + ``` + + - right-flanking but not left-flanking: + + ``` + abc*** + abc_ + "abc"** + "abc"_ + ``` + + - Both left and right-flanking: + + ``` + abc***def + "abc"_"def" + ``` + + - Neither left nor right-flanking: + + ``` + abc *** def + a _ b + ``` + +(The idea of distinguishing left-flanking and right-flanking +delimiter runs based on the character before and the character +after comes from Roopesh Chander's +[vfmd](http://www.vfmd.org/vfmd-spec/specification/#procedure-for-identifying-emphasis-tags). +vfmd uses the terminology "emphasis indicator string" instead of "delimiter +run," and its rules for distinguishing left- and right-flanking runs +are a bit more complex than the ones given here.) + +The following rules define emphasis and strong emphasis: + +1. A single `*` character [can open emphasis](@) + iff (if and only if) it is part of a [left-flanking delimiter run]. + +2. A single `_` character [can open emphasis] iff + it is part of a [left-flanking delimiter run] + and either (a) not part of a [right-flanking delimiter run] + or (b) part of a [right-flanking delimiter run] + preceded by punctuation. + +3. A single `*` character [can close emphasis](@) + iff it is part of a [right-flanking delimiter run]. + +4. A single `_` character [can close emphasis] iff + it is part of a [right-flanking delimiter run] + and either (a) not part of a [left-flanking delimiter run] + or (b) part of a [left-flanking delimiter run] + followed by punctuation. + +5. A double `**` [can open strong emphasis](@) + iff it is part of a [left-flanking delimiter run]. + +6. A double `__` [can open strong emphasis] iff + it is part of a [left-flanking delimiter run] + and either (a) not part of a [right-flanking delimiter run] + or (b) part of a [right-flanking delimiter run] + preceded by punctuation. + +7. A double `**` [can close strong emphasis](@) + iff it is part of a [right-flanking delimiter run]. + +8. A double `__` [can close strong emphasis] iff + it is part of a [right-flanking delimiter run] + and either (a) not part of a [left-flanking delimiter run] + or (b) part of a [left-flanking delimiter run] + followed by punctuation. + +9. Emphasis begins with a delimiter that [can open emphasis] and ends + with a delimiter that [can close emphasis], and that uses the same + character (`_` or `*`) as the opening delimiter. The + opening and closing delimiters must belong to separate + [delimiter runs]. If one of the delimiters can both + open and close emphasis, then the sum of the lengths of the + delimiter runs containing the opening and closing delimiters + must not be a multiple of 3. + +10. Strong emphasis begins with a delimiter that + [can open strong emphasis] and ends with a delimiter that + [can close strong emphasis], and that uses the same character + (`_` or `*`) as the opening delimiter. The + opening and closing delimiters must belong to separate + [delimiter runs]. If one of the delimiters can both open + and close strong emphasis, then the sum of the lengths of + the delimiter runs containing the opening and closing + delimiters must not be a multiple of 3. + +11. A literal `*` character cannot occur at the beginning or end of + `*`-delimited emphasis or `**`-delimited strong emphasis, unless it + is backslash-escaped. + +12. A literal `_` character cannot occur at the beginning or end of + `_`-delimited emphasis or `__`-delimited strong emphasis, unless it + is backslash-escaped. + +Where rules 1--12 above are compatible with multiple parsings, +the following principles resolve ambiguity: + +13. The number of nestings should be minimized. Thus, for example, + an interpretation `...` is always preferred to + `...`. + +14. An interpretation `...` is always + preferred to `...`. + +15. When two potential emphasis or strong emphasis spans overlap, + so that the second begins before the first ends and ends after + the first ends, the first takes precedence. Thus, for example, + `*foo _bar* baz_` is parsed as `foo _bar baz_` rather + than `*foo bar* baz`. + +16. When there are two potential emphasis or strong emphasis spans + with the same closing delimiter, the shorter one (the one that + opens later) takes precedence. Thus, for example, + `**foo **bar baz**` is parsed as `**foo bar baz` + rather than `foo **bar baz`. + +17. Inline code spans, links, images, and HTML tags group more tightly + than emphasis. So, when there is a choice between an interpretation + that contains one of these elements and one that does not, the + former always wins. Thus, for example, `*[foo*](bar)` is + parsed as `*foo*` rather than as + `[foo](bar)`. + +These rules can be illustrated through a series of examples. + +Rule 1: + +```````````````````````````````` example +*foo bar* +. +

foo bar

+```````````````````````````````` + + +This is not emphasis, because the opening `*` is followed by +whitespace, and hence not part of a [left-flanking delimiter run]: + +```````````````````````````````` example +a * foo bar* +. +

a * foo bar*

+```````````````````````````````` + + +This is not emphasis, because the opening `*` is preceded +by an alphanumeric and followed by punctuation, and hence +not part of a [left-flanking delimiter run]: + +```````````````````````````````` example +a*"foo"* +. +

a*"foo"*

+```````````````````````````````` + + +Unicode nonbreaking spaces count as whitespace, too: + +```````````````````````````````` example +* a * +. +

* a *

+```````````````````````````````` + + +Intraword emphasis with `*` is permitted: + +```````````````````````````````` example +foo*bar* +. +

foobar

+```````````````````````````````` + + +```````````````````````````````` example +5*6*78 +. +

5678

+```````````````````````````````` + + +Rule 2: + +```````````````````````````````` example +_foo bar_ +. +

foo bar

+```````````````````````````````` + + +This is not emphasis, because the opening `_` is followed by +whitespace: + +```````````````````````````````` example +_ foo bar_ +. +

_ foo bar_

+```````````````````````````````` + + +This is not emphasis, because the opening `_` is preceded +by an alphanumeric and followed by punctuation: + +```````````````````````````````` example +a_"foo"_ +. +

a_"foo"_

+```````````````````````````````` + + +Emphasis with `_` is not allowed inside words: + +```````````````````````````````` example +foo_bar_ +. +

foo_bar_

+```````````````````````````````` + + +```````````````````````````````` example +5_6_78 +. +

5_6_78

+```````````````````````````````` + + +```````````````````````````````` example +пристаням_стремятся_ +. +

пристаням_стремятся_

+```````````````````````````````` + + +Here `_` does not generate emphasis, because the first delimiter run +is right-flanking and the second left-flanking: + +```````````````````````````````` example +aa_"bb"_cc +. +

aa_"bb"_cc

+```````````````````````````````` + + +This is emphasis, even though the opening delimiter is +both left- and right-flanking, because it is preceded by +punctuation: + +```````````````````````````````` example +foo-_(bar)_ +. +

foo-(bar)

+```````````````````````````````` + + +Rule 3: + +This is not emphasis, because the closing delimiter does +not match the opening delimiter: + +```````````````````````````````` example +_foo* +. +

_foo*

+```````````````````````````````` + + +This is not emphasis, because the closing `*` is preceded by +whitespace: + +```````````````````````````````` example +*foo bar * +. +

*foo bar *

+```````````````````````````````` + + +A newline also counts as whitespace: + +```````````````````````````````` example +*foo bar +* +. +

*foo bar +*

+```````````````````````````````` + + +This is not emphasis, because the second `*` is +preceded by punctuation and followed by an alphanumeric +(hence it is not part of a [right-flanking delimiter run]: + +```````````````````````````````` example +*(*foo) +. +

*(*foo)

+```````````````````````````````` + + +The point of this restriction is more easily appreciated +with this example: + +```````````````````````````````` example +*(*foo*)* +. +

(foo)

+```````````````````````````````` + + +Intraword emphasis with `*` is allowed: + +```````````````````````````````` example +*foo*bar +. +

foobar

+```````````````````````````````` + + + +Rule 4: + +This is not emphasis, because the closing `_` is preceded by +whitespace: + +```````````````````````````````` example +_foo bar _ +. +

_foo bar _

+```````````````````````````````` + + +This is not emphasis, because the second `_` is +preceded by punctuation and followed by an alphanumeric: + +```````````````````````````````` example +_(_foo) +. +

_(_foo)

+```````````````````````````````` + + +This is emphasis within emphasis: + +```````````````````````````````` example +_(_foo_)_ +. +

(foo)

+```````````````````````````````` + + +Intraword emphasis is disallowed for `_`: + +```````````````````````````````` example +_foo_bar +. +

_foo_bar

+```````````````````````````````` + + +```````````````````````````````` example +_пристаням_стремятся +. +

_пристаням_стремятся

+```````````````````````````````` + + +```````````````````````````````` example +_foo_bar_baz_ +. +

foo_bar_baz

+```````````````````````````````` + + +This is emphasis, even though the closing delimiter is +both left- and right-flanking, because it is followed by +punctuation: + +```````````````````````````````` example +_(bar)_. +. +

(bar).

+```````````````````````````````` + + +Rule 5: + +```````````````````````````````` example +**foo bar** +. +

foo bar

+```````````````````````````````` + + +This is not strong emphasis, because the opening delimiter is +followed by whitespace: + +```````````````````````````````` example +** foo bar** +. +

** foo bar**

+```````````````````````````````` + + +This is not strong emphasis, because the opening `**` is preceded +by an alphanumeric and followed by punctuation, and hence +not part of a [left-flanking delimiter run]: + +```````````````````````````````` example +a**"foo"** +. +

a**"foo"**

+```````````````````````````````` + + +Intraword strong emphasis with `**` is permitted: + +```````````````````````````````` example +foo**bar** +. +

foobar

+```````````````````````````````` + + +Rule 6: + +```````````````````````````````` example +__foo bar__ +. +

foo bar

+```````````````````````````````` + + +This is not strong emphasis, because the opening delimiter is +followed by whitespace: + +```````````````````````````````` example +__ foo bar__ +. +

__ foo bar__

+```````````````````````````````` + + +A newline counts as whitespace: +```````````````````````````````` example +__ +foo bar__ +. +

__ +foo bar__

+```````````````````````````````` + + +This is not strong emphasis, because the opening `__` is preceded +by an alphanumeric and followed by punctuation: + +```````````````````````````````` example +a__"foo"__ +. +

a__"foo"__

+```````````````````````````````` + + +Intraword strong emphasis is forbidden with `__`: + +```````````````````````````````` example +foo__bar__ +. +

foo__bar__

+```````````````````````````````` + + +```````````````````````````````` example +5__6__78 +. +

5__6__78

+```````````````````````````````` + + +```````````````````````````````` example +пристаням__стремятся__ +. +

пристаням__стремятся__

+```````````````````````````````` + + +```````````````````````````````` example +__foo, __bar__, baz__ +. +

foo, bar, baz

+```````````````````````````````` + + +This is strong emphasis, even though the opening delimiter is +both left- and right-flanking, because it is preceded by +punctuation: + +```````````````````````````````` example +foo-__(bar)__ +. +

foo-(bar)

+```````````````````````````````` + + + +Rule 7: + +This is not strong emphasis, because the closing delimiter is preceded +by whitespace: + +```````````````````````````````` example +**foo bar ** +. +

**foo bar **

+```````````````````````````````` + + +(Nor can it be interpreted as an emphasized `*foo bar *`, because of +Rule 11.) + +This is not strong emphasis, because the second `**` is +preceded by punctuation and followed by an alphanumeric: + +```````````````````````````````` example +**(**foo) +. +

**(**foo)

+```````````````````````````````` + + +The point of this restriction is more easily appreciated +with these examples: + +```````````````````````````````` example +*(**foo**)* +. +

(foo)

+```````````````````````````````` + + +```````````````````````````````` example +**Gomphocarpus (*Gomphocarpus physocarpus*, syn. +*Asclepias physocarpa*)** +. +

Gomphocarpus (Gomphocarpus physocarpus, syn. +Asclepias physocarpa)

+```````````````````````````````` + + +```````````````````````````````` example +**foo "*bar*" foo** +. +

foo "bar" foo

+```````````````````````````````` + + +Intraword emphasis: + +```````````````````````````````` example +**foo**bar +. +

foobar

+```````````````````````````````` + + +Rule 8: + +This is not strong emphasis, because the closing delimiter is +preceded by whitespace: + +```````````````````````````````` example +__foo bar __ +. +

__foo bar __

+```````````````````````````````` + + +This is not strong emphasis, because the second `__` is +preceded by punctuation and followed by an alphanumeric: + +```````````````````````````````` example +__(__foo) +. +

__(__foo)

+```````````````````````````````` + + +The point of this restriction is more easily appreciated +with this example: + +```````````````````````````````` example +_(__foo__)_ +. +

(foo)

+```````````````````````````````` + + +Intraword strong emphasis is forbidden with `__`: + +```````````````````````````````` example +__foo__bar +. +

__foo__bar

+```````````````````````````````` + + +```````````````````````````````` example +__пристаням__стремятся +. +

__пристаням__стремятся

+```````````````````````````````` + + +```````````````````````````````` example +__foo__bar__baz__ +. +

foo__bar__baz

+```````````````````````````````` + + +This is strong emphasis, even though the closing delimiter is +both left- and right-flanking, because it is followed by +punctuation: + +```````````````````````````````` example +__(bar)__. +. +

(bar).

+```````````````````````````````` + + +Rule 9: + +Any nonempty sequence of inline elements can be the contents of an +emphasized span. + +```````````````````````````````` example +*foo [bar](/url)* +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +*foo +bar* +. +

foo +bar

+```````````````````````````````` + + +In particular, emphasis and strong emphasis can be nested +inside emphasis: + +```````````````````````````````` example +_foo __bar__ baz_ +. +

foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +_foo _bar_ baz_ +. +

foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +__foo_ bar_ +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +*foo *bar** +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +*foo **bar** baz* +. +

foo bar baz

+```````````````````````````````` + +```````````````````````````````` example +*foo**bar**baz* +. +

foobarbaz

+```````````````````````````````` + +Note that in the preceding case, the interpretation + +``` markdown +

foobarbaz

+``` + + +is precluded by the condition that a delimiter that +can both open and close (like the `*` after `foo`) +cannot form emphasis if the sum of the lengths of +the delimiter runs containing the opening and +closing delimiters is a multiple of 3. + + +For the same reason, we don't get two consecutive +emphasis sections in this example: + +```````````````````````````````` example +*foo**bar* +. +

foo**bar

+```````````````````````````````` + + +The same condition ensures that the following +cases are all strong emphasis nested inside +emphasis, even when the interior spaces are +omitted: + + +```````````````````````````````` example +***foo** bar* +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +*foo **bar*** +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +*foo**bar*** +. +

foobar

+```````````````````````````````` + + +Indefinite levels of nesting are possible: + +```````````````````````````````` example +*foo **bar *baz* bim** bop* +. +

foo bar baz bim bop

+```````````````````````````````` + + +```````````````````````````````` example +*foo [*bar*](/url)* +. +

foo bar

+```````````````````````````````` + + +There can be no empty emphasis or strong emphasis: + +```````````````````````````````` example +** is not an empty emphasis +. +

** is not an empty emphasis

+```````````````````````````````` + + +```````````````````````````````` example +**** is not an empty strong emphasis +. +

**** is not an empty strong emphasis

+```````````````````````````````` + + + +Rule 10: + +Any nonempty sequence of inline elements can be the contents of an +strongly emphasized span. + +```````````````````````````````` example +**foo [bar](/url)** +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +**foo +bar** +. +

foo +bar

+```````````````````````````````` + + +In particular, emphasis and strong emphasis can be nested +inside strong emphasis: + +```````````````````````````````` example +__foo _bar_ baz__ +. +

foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +__foo __bar__ baz__ +. +

foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +____foo__ bar__ +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +**foo **bar**** +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +**foo *bar* baz** +. +

foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +**foo*bar*baz** +. +

foobarbaz

+```````````````````````````````` + + +```````````````````````````````` example +***foo* bar** +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +**foo *bar*** +. +

foo bar

+```````````````````````````````` + + +Indefinite levels of nesting are possible: + +```````````````````````````````` example +**foo *bar **baz** +bim* bop** +. +

foo bar baz +bim bop

+```````````````````````````````` + + +```````````````````````````````` example +**foo [*bar*](/url)** +. +

foo bar

+```````````````````````````````` + + +There can be no empty emphasis or strong emphasis: + +```````````````````````````````` example +__ is not an empty emphasis +. +

__ is not an empty emphasis

+```````````````````````````````` + + +```````````````````````````````` example +____ is not an empty strong emphasis +. +

____ is not an empty strong emphasis

+```````````````````````````````` + + + +Rule 11: + +```````````````````````````````` example +foo *** +. +

foo ***

+```````````````````````````````` + + +```````````````````````````````` example +foo *\** +. +

foo *

+```````````````````````````````` + + +```````````````````````````````` example +foo *_* +. +

foo _

+```````````````````````````````` + + +```````````````````````````````` example +foo ***** +. +

foo *****

+```````````````````````````````` + + +```````````````````````````````` example +foo **\*** +. +

foo *

+```````````````````````````````` + + +```````````````````````````````` example +foo **_** +. +

foo _

+```````````````````````````````` + + +Note that when delimiters do not match evenly, Rule 11 determines +that the excess literal `*` characters will appear outside of the +emphasis, rather than inside it: + +```````````````````````````````` example +**foo* +. +

*foo

+```````````````````````````````` + + +```````````````````````````````` example +*foo** +. +

foo*

+```````````````````````````````` + + +```````````````````````````````` example +***foo** +. +

*foo

+```````````````````````````````` + + +```````````````````````````````` example +****foo* +. +

***foo

+```````````````````````````````` + + +```````````````````````````````` example +**foo*** +. +

foo*

+```````````````````````````````` + + +```````````````````````````````` example +*foo**** +. +

foo***

+```````````````````````````````` + + + +Rule 12: + +```````````````````````````````` example +foo ___ +. +

foo ___

+```````````````````````````````` + + +```````````````````````````````` example +foo _\__ +. +

foo _

+```````````````````````````````` + + +```````````````````````````````` example +foo _*_ +. +

foo *

+```````````````````````````````` + + +```````````````````````````````` example +foo _____ +. +

foo _____

+```````````````````````````````` + + +```````````````````````````````` example +foo __\___ +. +

foo _

+```````````````````````````````` + + +```````````````````````````````` example +foo __*__ +. +

foo *

+```````````````````````````````` + + +```````````````````````````````` example +__foo_ +. +

_foo

+```````````````````````````````` + + +Note that when delimiters do not match evenly, Rule 12 determines +that the excess literal `_` characters will appear outside of the +emphasis, rather than inside it: + +```````````````````````````````` example +_foo__ +. +

foo_

+```````````````````````````````` + + +```````````````````````````````` example +___foo__ +. +

_foo

+```````````````````````````````` + + +```````````````````````````````` example +____foo_ +. +

___foo

+```````````````````````````````` + + +```````````````````````````````` example +__foo___ +. +

foo_

+```````````````````````````````` + + +```````````````````````````````` example +_foo____ +. +

foo___

+```````````````````````````````` + + +Rule 13 implies that if you want emphasis nested directly inside +emphasis, you must use different delimiters: + +```````````````````````````````` example +**foo** +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +*_foo_* +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +__foo__ +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +_*foo*_ +. +

foo

+```````````````````````````````` + + +However, strong emphasis within strong emphasis is possible without +switching delimiters: + +```````````````````````````````` example +****foo**** +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +____foo____ +. +

foo

+```````````````````````````````` + + + +Rule 13 can be applied to arbitrarily long sequences of +delimiters: + +```````````````````````````````` example +******foo****** +. +

foo

+```````````````````````````````` + + +Rule 14: + +```````````````````````````````` example +***foo*** +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +_____foo_____ +. +

foo

+```````````````````````````````` + + +Rule 15: + +```````````````````````````````` example +*foo _bar* baz_ +. +

foo _bar baz_

+```````````````````````````````` + + +```````````````````````````````` example +*foo __bar *baz bim__ bam* +. +

foo bar *baz bim bam

+```````````````````````````````` + + +Rule 16: + +```````````````````````````````` example +**foo **bar baz** +. +

**foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +*foo *bar baz* +. +

*foo bar baz

+```````````````````````````````` + + +Rule 17: + +```````````````````````````````` example +*[bar*](/url) +. +

*bar*

+```````````````````````````````` + + +```````````````````````````````` example +_foo [bar_](/url) +. +

_foo bar_

+```````````````````````````````` + + +```````````````````````````````` example +* +. +

*

+```````````````````````````````` + + +```````````````````````````````` example +** +. +

**

+```````````````````````````````` + + +```````````````````````````````` example +__ +. +

__

+```````````````````````````````` + + +```````````````````````````````` example +*a `*`* +. +

a *

+```````````````````````````````` + + +```````````````````````````````` example +_a `_`_ +. +

a _

+```````````````````````````````` + + +```````````````````````````````` example +**a +. +

**ahttp://foo.bar/?q=**

+```````````````````````````````` + + +```````````````````````````````` example +__a +. +

__ahttp://foo.bar/?q=__

+```````````````````````````````` + + +
+ +## Strikethrough (extension) + +GFM enables the `strikethrough` extension, where an additional emphasis type is +available. + +Strikethrough text is any text wrapped in two tildes (`~`). + +```````````````````````````````` example strikethrough +~~Hi~~ Hello, world! +. +

Hi Hello, world!

+```````````````````````````````` + +As with regular emphasis delimiters, a new paragraph will cause strikethrough +parsing to cease: + +```````````````````````````````` example strikethrough +This ~~has a + +new paragraph~~. +. +

This ~~has a

+

new paragraph~~.

+```````````````````````````````` + +
+ +## Links + +A link contains [link text] (the visible text), a [link destination] +(the URI that is the link destination), and optionally a [link title]. +There are two basic kinds of links in Markdown. In [inline links] the +destination and title are given immediately after the link text. In +[reference links] the destination and title are defined elsewhere in +the document. + +A [link text](@) consists of a sequence of zero or more +inline elements enclosed by square brackets (`[` and `]`). The +following rules apply: + +- Links may not contain other links, at any level of nesting. If + multiple otherwise valid link definitions appear nested inside each + other, the inner-most definition is used. + +- Brackets are allowed in the [link text] only if (a) they + are backslash-escaped or (b) they appear as a matched pair of brackets, + with an open bracket `[`, a sequence of zero or more inlines, and + a close bracket `]`. + +- Backtick [code spans], [autolinks], and raw [HTML tags] bind more tightly + than the brackets in link text. Thus, for example, + `` [foo`]` `` could not be a link text, since the second `]` + is part of a code span. + +- The brackets in link text bind more tightly than markers for + [emphasis and strong emphasis]. Thus, for example, `*[foo*](url)` is a link. + +A [link destination](@) consists of either + +- a sequence of zero or more characters between an opening `<` and a + closing `>` that contains no line breaks or unescaped + `<` or `>` characters, or + +- a nonempty sequence of characters that does not include + ASCII space or control characters, and includes parentheses + only if (a) they are backslash-escaped or (b) they are part of + a balanced pair of unescaped parentheses. (Implementations + may impose limits on parentheses nesting to avoid performance + issues, but at least three levels of nesting should be supported.) + +A [link title](@) consists of either + +- a sequence of zero or more characters between straight double-quote + characters (`"`), including a `"` character only if it is + backslash-escaped, or + +- a sequence of zero or more characters between straight single-quote + characters (`'`), including a `'` character only if it is + backslash-escaped, or + +- a sequence of zero or more characters between matching parentheses + (`(...)`), including a `)` character only if it is backslash-escaped. + +Although [link titles] may span multiple lines, they may not contain +a [blank line]. + +An [inline link](@) consists of a [link text] followed immediately +by a left parenthesis `(`, optional [whitespace], an optional +[link destination], an optional [link title] separated from the link +destination by [whitespace], optional [whitespace], and a right +parenthesis `)`. The link's text consists of the inlines contained +in the [link text] (excluding the enclosing square brackets). +The link's URI consists of the link destination, excluding enclosing +`<...>` if present, with backslash-escapes in effect as described +above. The link's title consists of the link title, excluding its +enclosing delimiters, with backslash-escapes in effect as described +above. + +Here is a simple inline link: + +```````````````````````````````` example +[link](/uri "title") +. +

link

+```````````````````````````````` + + +The title may be omitted: + +```````````````````````````````` example +[link](/uri) +. +

link

+```````````````````````````````` + + +Both the title and the destination may be omitted: + +```````````````````````````````` example +[link]() +. +

link

+```````````````````````````````` + + +```````````````````````````````` example +[link](<>) +. +

link

+```````````````````````````````` + +The destination can only contain spaces if it is +enclosed in pointy brackets: + +```````````````````````````````` example +[link](/my uri) +. +

[link](/my uri)

+```````````````````````````````` + +```````````````````````````````` example +[link](
) +. +

link

+```````````````````````````````` + +The destination cannot contain line breaks, +even if enclosed in pointy brackets: + +```````````````````````````````` example +[link](foo +bar) +. +

[link](foo +bar)

+```````````````````````````````` + +```````````````````````````````` example +[link]() +. +

[link]()

+```````````````````````````````` + +Parentheses inside the link destination may be escaped: + +```````````````````````````````` example +[link](\(foo\)) +. +

link

+```````````````````````````````` + +Any number of parentheses are allowed without escaping, as long as they are +balanced: + +```````````````````````````````` example +[link](foo(and(bar))) +. +

link

+```````````````````````````````` + +However, if you have unbalanced parentheses, you need to escape or use the +`<...>` form: + +```````````````````````````````` example +[link](foo\(and\(bar\)) +. +

link

+```````````````````````````````` + + +```````````````````````````````` example +[link]() +. +

link

+```````````````````````````````` + + +Parentheses and other symbols can also be escaped, as usual +in Markdown: + +```````````````````````````````` example +[link](foo\)\:) +. +

link

+```````````````````````````````` + + +A link can contain fragment identifiers and queries: + +```````````````````````````````` example +[link](#fragment) + +[link](http://example.com#fragment) + +[link](http://example.com?foo=3#frag) +. +

link

+

link

+

link

+```````````````````````````````` + + +Note that a backslash before a non-escapable character is +just a backslash: + +```````````````````````````````` example +[link](foo\bar) +. +

link

+```````````````````````````````` + + +URL-escaping should be left alone inside the destination, as all +URL-escaped characters are also valid URL characters. Entity and +numerical character references in the destination will be parsed +into the corresponding Unicode code points, as usual. These may +be optionally URL-escaped when written as HTML, but this spec +does not enforce any particular policy for rendering URLs in +HTML or other formats. Renderers may make different decisions +about how to escape or normalize URLs in the output. + +```````````````````````````````` example +[link](foo%20bä) +. +

link

+```````````````````````````````` + + +Note that, because titles can often be parsed as destinations, +if you try to omit the destination and keep the title, you'll +get unexpected results: + +```````````````````````````````` example +[link]("title") +. +

link

+```````````````````````````````` + + +Titles may be in single quotes, double quotes, or parentheses: + +```````````````````````````````` example +[link](/url "title") +[link](/url 'title') +[link](/url (title)) +. +

link +link +link

+```````````````````````````````` + + +Backslash escapes and entity and numeric character references +may be used in titles: + +```````````````````````````````` example +[link](/url "title \""") +. +

link

+```````````````````````````````` + + +Titles must be separated from the link using a [whitespace]. +Other [Unicode whitespace] like non-breaking space doesn't work. + +```````````````````````````````` example +[link](/url "title") +. +

link

+```````````````````````````````` + + +Nested balanced quotes are not allowed without escaping: + +```````````````````````````````` example +[link](/url "title "and" title") +. +

[link](/url "title "and" title")

+```````````````````````````````` + + +But it is easy to work around this by using a different quote type: + +```````````````````````````````` example +[link](/url 'title "and" title') +. +

link

+```````````````````````````````` + + +(Note: `Markdown.pl` did allow double quotes inside a double-quoted +title, and its test suite included a test demonstrating this. +But it is hard to see a good rationale for the extra complexity this +brings, since there are already many ways---backslash escaping, +entity and numeric character references, or using a different +quote type for the enclosing title---to write titles containing +double quotes. `Markdown.pl`'s handling of titles has a number +of other strange features. For example, it allows single-quoted +titles in inline links, but not reference links. And, in +reference links but not inline links, it allows a title to begin +with `"` and end with `)`. `Markdown.pl` 1.0.1 even allows +titles with no closing quotation mark, though 1.0.2b8 does not. +It seems preferable to adopt a simple, rational rule that works +the same way in inline links and link reference definitions.) + +[Whitespace] is allowed around the destination and title: + +```````````````````````````````` example +[link]( /uri + "title" ) +. +

link

+```````````````````````````````` + + +But it is not allowed between the link text and the +following parenthesis: + +```````````````````````````````` example +[link] (/uri) +. +

[link] (/uri)

+```````````````````````````````` + + +The link text may contain balanced brackets, but not unbalanced ones, +unless they are escaped: + +```````````````````````````````` example +[link [foo [bar]]](/uri) +. +

link [foo [bar]]

+```````````````````````````````` + + +```````````````````````````````` example +[link] bar](/uri) +. +

[link] bar](/uri)

+```````````````````````````````` + + +```````````````````````````````` example +[link [bar](/uri) +. +

[link bar

+```````````````````````````````` + + +```````````````````````````````` example +[link \[bar](/uri) +. +

link [bar

+```````````````````````````````` + + +The link text may contain inline content: + +```````````````````````````````` example +[link *foo **bar** `#`*](/uri) +. +

link foo bar #

+```````````````````````````````` + + +```````````````````````````````` example +[![moon](moon.jpg)](/uri) +. +

moon

+```````````````````````````````` + + +However, links may not contain other links, at any level of nesting. + +```````````````````````````````` example +[foo [bar](/uri)](/uri) +. +

[foo bar](/uri)

+```````````````````````````````` + + +```````````````````````````````` example +[foo *[bar [baz](/uri)](/uri)*](/uri) +. +

[foo [bar baz](/uri)](/uri)

+```````````````````````````````` + + +```````````````````````````````` example +![[[foo](uri1)](uri2)](uri3) +. +

[foo](uri2)

+```````````````````````````````` + + +These cases illustrate the precedence of link text grouping over +emphasis grouping: + +```````````````````````````````` example +*[foo*](/uri) +. +

*foo*

+```````````````````````````````` + + +```````````````````````````````` example +[foo *bar](baz*) +. +

foo *bar

+```````````````````````````````` + + +Note that brackets that *aren't* part of links do not take +precedence: + +```````````````````````````````` example +*foo [bar* baz] +. +

foo [bar baz]

+```````````````````````````````` + + +These cases illustrate the precedence of HTML tags, code spans, +and autolinks over link grouping: + +```````````````````````````````` example +[foo +. +

[foo

+```````````````````````````````` + + +```````````````````````````````` example +[foo`](/uri)` +. +

[foo](/uri)

+```````````````````````````````` + + +```````````````````````````````` example +[foo +. +

[foohttp://example.com/?search=](uri)

+```````````````````````````````` + + +There are three kinds of [reference link](@)s: +[full](#full-reference-link), [collapsed](#collapsed-reference-link), +and [shortcut](#shortcut-reference-link). + +A [full reference link](@) +consists of a [link text] immediately followed by a [link label] +that [matches] a [link reference definition] elsewhere in the document. + +A [link label](@) begins with a left bracket (`[`) and ends +with the first right bracket (`]`) that is not backslash-escaped. +Between these brackets there must be at least one [non-whitespace character]. +Unescaped square bracket characters are not allowed inside the +opening and closing square brackets of [link labels]. A link +label can have at most 999 characters inside the square +brackets. + +One label [matches](@) +another just in case their normalized forms are equal. To normalize a +label, strip off the opening and closing brackets, +perform the *Unicode case fold*, strip leading and trailing +[whitespace] and collapse consecutive internal +[whitespace] to a single space. If there are multiple +matching reference link definitions, the one that comes first in the +document is used. (It is desirable in such cases to emit a warning.) + +The contents of the first link label are parsed as inlines, which are +used as the link's text. The link's URI and title are provided by the +matching [link reference definition]. + +Here is a simple example: + +```````````````````````````````` example +[foo][bar] + +[bar]: /url "title" +. +

foo

+```````````````````````````````` + + +The rules for the [link text] are the same as with +[inline links]. Thus: + +The link text may contain balanced brackets, but not unbalanced ones, +unless they are escaped: + +```````````````````````````````` example +[link [foo [bar]]][ref] + +[ref]: /uri +. +

link [foo [bar]]

+```````````````````````````````` + + +```````````````````````````````` example +[link \[bar][ref] + +[ref]: /uri +. +

link [bar

+```````````````````````````````` + + +The link text may contain inline content: + +```````````````````````````````` example +[link *foo **bar** `#`*][ref] + +[ref]: /uri +. +

link foo bar #

+```````````````````````````````` + + +```````````````````````````````` example +[![moon](moon.jpg)][ref] + +[ref]: /uri +. +

moon

+```````````````````````````````` + + +However, links may not contain other links, at any level of nesting. + +```````````````````````````````` example +[foo [bar](/uri)][ref] + +[ref]: /uri +. +

[foo bar]ref

+```````````````````````````````` + + +```````````````````````````````` example +[foo *bar [baz][ref]*][ref] + +[ref]: /uri +. +

[foo bar baz]ref

+```````````````````````````````` + + +(In the examples above, we have two [shortcut reference links] +instead of one [full reference link].) + +The following cases illustrate the precedence of link text grouping over +emphasis grouping: + +```````````````````````````````` example +*[foo*][ref] + +[ref]: /uri +. +

*foo*

+```````````````````````````````` + + +```````````````````````````````` example +[foo *bar][ref] + +[ref]: /uri +. +

foo *bar

+```````````````````````````````` + + +These cases illustrate the precedence of HTML tags, code spans, +and autolinks over link grouping: + +```````````````````````````````` example +[foo + +[ref]: /uri +. +

[foo

+```````````````````````````````` + + +```````````````````````````````` example +[foo`][ref]` + +[ref]: /uri +. +

[foo][ref]

+```````````````````````````````` + + +```````````````````````````````` example +[foo + +[ref]: /uri +. +

[foohttp://example.com/?search=][ref]

+```````````````````````````````` + + +Matching is case-insensitive: + +```````````````````````````````` example +[foo][BaR] + +[bar]: /url "title" +. +

foo

+```````````````````````````````` + + +Unicode case fold is used: + +```````````````````````````````` example +[Толпой][Толпой] is a Russian word. + +[ТОЛПОЙ]: /url +. +

Толпой is a Russian word.

+```````````````````````````````` + + +Consecutive internal [whitespace] is treated as one space for +purposes of determining matching: + +```````````````````````````````` example +[Foo + bar]: /url + +[Baz][Foo bar] +. +

Baz

+```````````````````````````````` + + +No [whitespace] is allowed between the [link text] and the +[link label]: + +```````````````````````````````` example +[foo] [bar] + +[bar]: /url "title" +. +

[foo] bar

+```````````````````````````````` + + +```````````````````````````````` example +[foo] +[bar] + +[bar]: /url "title" +. +

[foo] +bar

+```````````````````````````````` + + +This is a departure from John Gruber's original Markdown syntax +description, which explicitly allows whitespace between the link +text and the link label. It brings reference links in line with +[inline links], which (according to both original Markdown and +this spec) cannot have whitespace after the link text. More +importantly, it prevents inadvertent capture of consecutive +[shortcut reference links]. If whitespace is allowed between the +link text and the link label, then in the following we will have +a single reference link, not two shortcut reference links, as +intended: + +``` markdown +[foo] +[bar] + +[foo]: /url1 +[bar]: /url2 +``` + +(Note that [shortcut reference links] were introduced by Gruber +himself in a beta version of `Markdown.pl`, but never included +in the official syntax description. Without shortcut reference +links, it is harmless to allow space between the link text and +link label; but once shortcut references are introduced, it is +too dangerous to allow this, as it frequently leads to +unintended results.) + +When there are multiple matching [link reference definitions], +the first is used: + +```````````````````````````````` example +[foo]: /url1 + +[foo]: /url2 + +[bar][foo] +. +

bar

+```````````````````````````````` + + +Note that matching is performed on normalized strings, not parsed +inline content. So the following does not match, even though the +labels define equivalent inline content: + +```````````````````````````````` example +[bar][foo\!] + +[foo!]: /url +. +

[bar][foo!]

+```````````````````````````````` + + +[Link labels] cannot contain brackets, unless they are +backslash-escaped: + +```````````````````````````````` example +[foo][ref[] + +[ref[]: /uri +. +

[foo][ref[]

+

[ref[]: /uri

+```````````````````````````````` + + +```````````````````````````````` example +[foo][ref[bar]] + +[ref[bar]]: /uri +. +

[foo][ref[bar]]

+

[ref[bar]]: /uri

+```````````````````````````````` + + +```````````````````````````````` example +[[[foo]]] + +[[[foo]]]: /url +. +

[[[foo]]]

+

[[[foo]]]: /url

+```````````````````````````````` + + +```````````````````````````````` example +[foo][ref\[] + +[ref\[]: /uri +. +

foo

+```````````````````````````````` + + +Note that in this example `]` is not backslash-escaped: + +```````````````````````````````` example +[bar\\]: /uri + +[bar\\] +. +

bar\

+```````````````````````````````` + + +A [link label] must contain at least one [non-whitespace character]: + +```````````````````````````````` example +[] + +[]: /uri +. +

[]

+

[]: /uri

+```````````````````````````````` + + +```````````````````````````````` example +[ + ] + +[ + ]: /uri +. +

[ +]

+

[ +]: /uri

+```````````````````````````````` + + +A [collapsed reference link](@) +consists of a [link label] that [matches] a +[link reference definition] elsewhere in the +document, followed by the string `[]`. +The contents of the first link label are parsed as inlines, +which are used as the link's text. The link's URI and title are +provided by the matching reference link definition. Thus, +`[foo][]` is equivalent to `[foo][foo]`. + +```````````````````````````````` example +[foo][] + +[foo]: /url "title" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +[*foo* bar][] + +[*foo* bar]: /url "title" +. +

foo bar

+```````````````````````````````` + + +The link labels are case-insensitive: + +```````````````````````````````` example +[Foo][] + +[foo]: /url "title" +. +

Foo

+```````````````````````````````` + + + +As with full reference links, [whitespace] is not +allowed between the two sets of brackets: + +```````````````````````````````` example +[foo] +[] + +[foo]: /url "title" +. +

foo +[]

+```````````````````````````````` + + +A [shortcut reference link](@) +consists of a [link label] that [matches] a +[link reference definition] elsewhere in the +document and is not followed by `[]` or a link label. +The contents of the first link label are parsed as inlines, +which are used as the link's text. The link's URI and title +are provided by the matching link reference definition. +Thus, `[foo]` is equivalent to `[foo][]`. + +```````````````````````````````` example +[foo] + +[foo]: /url "title" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +[*foo* bar] + +[*foo* bar]: /url "title" +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +[[*foo* bar]] + +[*foo* bar]: /url "title" +. +

[foo bar]

+```````````````````````````````` + + +```````````````````````````````` example +[[bar [foo] + +[foo]: /url +. +

[[bar foo

+```````````````````````````````` + + +The link labels are case-insensitive: + +```````````````````````````````` example +[Foo] + +[foo]: /url "title" +. +

Foo

+```````````````````````````````` + + +A space after the link text should be preserved: + +```````````````````````````````` example +[foo] bar + +[foo]: /url +. +

foo bar

+```````````````````````````````` + + +If you just want bracketed text, you can backslash-escape the +opening bracket to avoid links: + +```````````````````````````````` example +\[foo] + +[foo]: /url "title" +. +

[foo]

+```````````````````````````````` + + +Note that this is a link, because a link label ends with the first +following closing bracket: + +```````````````````````````````` example +[foo*]: /url + +*[foo*] +. +

*foo*

+```````````````````````````````` + + +Full and compact references take precedence over shortcut +references: + +```````````````````````````````` example +[foo][bar] + +[foo]: /url1 +[bar]: /url2 +. +

foo

+```````````````````````````````` + +```````````````````````````````` example +[foo][] + +[foo]: /url1 +. +

foo

+```````````````````````````````` + +Inline links also take precedence: + +```````````````````````````````` example +[foo]() + +[foo]: /url1 +. +

foo

+```````````````````````````````` + +```````````````````````````````` example +[foo](not a link) + +[foo]: /url1 +. +

foo(not a link)

+```````````````````````````````` + +In the following case `[bar][baz]` is parsed as a reference, +`[foo]` as normal text: + +```````````````````````````````` example +[foo][bar][baz] + +[baz]: /url +. +

[foo]bar

+```````````````````````````````` + + +Here, though, `[foo][bar]` is parsed as a reference, since +`[bar]` is defined: + +```````````````````````````````` example +[foo][bar][baz] + +[baz]: /url1 +[bar]: /url2 +. +

foobaz

+```````````````````````````````` + + +Here `[foo]` is not parsed as a shortcut reference, because it +is followed by a link label (even though `[bar]` is not defined): + +```````````````````````````````` example +[foo][bar][baz] + +[baz]: /url1 +[foo]: /url2 +. +

[foo]bar

+```````````````````````````````` + + + +## Images + +Syntax for images is like the syntax for links, with one +difference. Instead of [link text], we have an +[image description](@). The rules for this are the +same as for [link text], except that (a) an +image description starts with `![` rather than `[`, and +(b) an image description may contain links. +An image description has inline elements +as its contents. When an image is rendered to HTML, +this is standardly used as the image's `alt` attribute. + +```````````````````````````````` example +![foo](/url "title") +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +![foo *bar*] + +[foo *bar*]: train.jpg "train & tracks" +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +![foo ![bar](/url)](/url2) +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +![foo [bar](/url)](/url2) +. +

foo bar

+```````````````````````````````` + + +Though this spec is concerned with parsing, not rendering, it is +recommended that in rendering to HTML, only the plain string content +of the [image description] be used. Note that in +the above example, the alt attribute's value is `foo bar`, not `foo +[bar](/url)` or `foo bar`. Only the plain string +content is rendered, without formatting. + +```````````````````````````````` example +![foo *bar*][] + +[foo *bar*]: train.jpg "train & tracks" +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +![foo *bar*][foobar] + +[FOOBAR]: train.jpg "train & tracks" +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +![foo](train.jpg) +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +My ![foo bar](/path/to/train.jpg "title" ) +. +

My foo bar

+```````````````````````````````` + + +```````````````````````````````` example +![foo]() +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +![](/url) +. +

+```````````````````````````````` + + +Reference-style: + +```````````````````````````````` example +![foo][bar] + +[bar]: /url +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +![foo][bar] + +[BAR]: /url +. +

foo

+```````````````````````````````` + + +Collapsed: + +```````````````````````````````` example +![foo][] + +[foo]: /url "title" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +![*foo* bar][] + +[*foo* bar]: /url "title" +. +

foo bar

+```````````````````````````````` + + +The labels are case-insensitive: + +```````````````````````````````` example +![Foo][] + +[foo]: /url "title" +. +

Foo

+```````````````````````````````` + + +As with reference links, [whitespace] is not allowed +between the two sets of brackets: + +```````````````````````````````` example +![foo] +[] + +[foo]: /url "title" +. +

foo +[]

+```````````````````````````````` + + +Shortcut: + +```````````````````````````````` example +![foo] + +[foo]: /url "title" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +![*foo* bar] + +[*foo* bar]: /url "title" +. +

foo bar

+```````````````````````````````` + + +Note that link labels cannot contain unescaped brackets: + +```````````````````````````````` example +![[foo]] + +[[foo]]: /url "title" +. +

![[foo]]

+

[[foo]]: /url "title"

+```````````````````````````````` + + +The link labels are case-insensitive: + +```````````````````````````````` example +![Foo] + +[foo]: /url "title" +. +

Foo

+```````````````````````````````` + + +If you just want a literal `!` followed by bracketed text, you can +backslash-escape the opening `[`: + +```````````````````````````````` example +!\[foo] + +[foo]: /url "title" +. +

![foo]

+```````````````````````````````` + + +If you want a link after a literal `!`, backslash-escape the +`!`: + +```````````````````````````````` example +\![foo] + +[foo]: /url "title" +. +

!foo

+```````````````````````````````` + + +## Autolinks + +[Autolink](@)s are absolute URIs and email addresses inside +`<` and `>`. They are parsed as links, with the URL or email address +as the link label. + +A [URI autolink](@) consists of `<`, followed by an +[absolute URI] not containing `<`, followed by `>`. It is parsed as +a link to the URI, with the URI as the link's label. + +An [absolute URI](@), +for these purposes, consists of a [scheme] followed by a colon (`:`) +followed by zero or more characters other than ASCII +[whitespace] and control characters, `<`, and `>`. If +the URI includes these characters, they must be percent-encoded +(e.g. `%20` for a space). + +For purposes of this spec, a [scheme](@) is any sequence +of 2--32 characters beginning with an ASCII letter and followed +by any combination of ASCII letters, digits, or the symbols plus +("+"), period ("."), or hyphen ("-"). + +Here are some valid autolinks: + +```````````````````````````````` example + +. +

http://foo.bar.baz

+```````````````````````````````` + + +```````````````````````````````` example + +. +

http://foo.bar.baz/test?q=hello&id=22&boolean

+```````````````````````````````` + + +```````````````````````````````` example + +. +

irc://foo.bar:2233/baz

+```````````````````````````````` + + +Uppercase is also fine: + +```````````````````````````````` example + +. +

MAILTO:FOO@BAR.BAZ

+```````````````````````````````` + + +Note that many strings that count as [absolute URIs] for +purposes of this spec are not valid URIs, because their +schemes are not registered or because of other problems +with their syntax: + +```````````````````````````````` example + +. +

a+b+c:d

+```````````````````````````````` + + +```````````````````````````````` example + +. +

made-up-scheme://foo,bar

+```````````````````````````````` + + +```````````````````````````````` example + +. +

http://../

+```````````````````````````````` + + +```````````````````````````````` example + +. +

localhost:5001/foo

+```````````````````````````````` + + +Spaces are not allowed in autolinks: + +```````````````````````````````` example + +. +

<http://foo.bar/baz bim>

+```````````````````````````````` + + +Backslash-escapes do not work inside autolinks: + +```````````````````````````````` example + +. +

http://example.com/\[\

+```````````````````````````````` + + +An [email autolink](@) +consists of `<`, followed by an [email address], +followed by `>`. The link's label is the email address, +and the URL is `mailto:` followed by the email address. + +An [email address](@), +for these purposes, is anything that matches +the [non-normative regex from the HTML5 +spec](https://html.spec.whatwg.org/multipage/forms.html#e-mail-state-(type=email)): + + /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])? + (?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/ + +Examples of email autolinks: + +```````````````````````````````` example + +. +

foo@bar.example.com

+```````````````````````````````` + + +```````````````````````````````` example + +. +

foo+special@Bar.baz-bar0.com

+```````````````````````````````` + + +Backslash-escapes do not work inside email autolinks: + +```````````````````````````````` example + +. +

<foo+@bar.example.com>

+```````````````````````````````` + + +These are not autolinks: + +```````````````````````````````` example +<> +. +

<>

+```````````````````````````````` + + +```````````````````````````````` example +< http://foo.bar > +. +

< http://foo.bar >

+```````````````````````````````` + + +```````````````````````````````` example + +. +

<m:abc>

+```````````````````````````````` + + +```````````````````````````````` example + +. +

<foo.bar.baz>

+```````````````````````````````` + + +```````````````````````````````` example +http://example.com +. +

http://example.com

+```````````````````````````````` + + +```````````````````````````````` example +foo@bar.example.com +. +

foo@bar.example.com

+```````````````````````````````` + +
+ +## Autolinks (extension) + +GFM enables the `autolink` extension, where autolinks will be recognised in a +greater number of conditions. + +[Autolink]s can also be constructed without requiring the use of `<` and to `>` +to delimit them, although they will be recognized under a smaller set of +circumstances. All such recognized autolinks can only come at the beginning of +a line, after whitespace, or any of the delimiting characters `*`, `_`, `~`, +and `(`. + +An [extended www autolink](@) will be recognized when the text `www.` is found +followed by a [valid domain]. A [valid domain](@) consists of alphanumeric +characters, underscores (`_`), hyphens (`-`) and periods (`.`). There must be +at least one period, and no underscores may be present in the last two segments +of the domain. + +The scheme `http` will be inserted automatically: + +```````````````````````````````` example autolink +www.commonmark.org +. +

www.commonmark.org

+```````````````````````````````` + +After a [valid domain], zero or more non-space non-`<` characters may follow: + +```````````````````````````````` example autolink +Visit www.commonmark.org/help for more information. +. +

Visit www.commonmark.org/help for more information.

+```````````````````````````````` + +We then apply [extended autolink path validation](@) as follows: + +Trailing punctuation (specifically, `?`, `!`, `.`, `,`, `:`, `*`, `_`, and `~`) +will not be considered part of the autolink, though they may be included in the +interior of the link: + +```````````````````````````````` example autolink +Visit www.commonmark.org. + +Visit www.commonmark.org/a.b. +. +

Visit www.commonmark.org.

+

Visit www.commonmark.org/a.b.

+```````````````````````````````` + +When an autolink ends in `)`, we scan the entire autolink for the total number +of parentheses. If there is a greater number of closing parentheses than +opening ones, we don't consider the last character part of the autolink, in +order to facilitate including an autolink inside a parenthesis: + +```````````````````````````````` example autolink +www.google.com/search?q=Markup+(business) + +(www.google.com/search?q=Markup+(business)) +. +

www.google.com/search?q=Markup+(business)

+

(www.google.com/search?q=Markup+(business))

+```````````````````````````````` + +This check is only done when the link ends in a closing parentheses `)`, so if +the only parentheses are in the interior of the autolink, no special rules are +applied: + +```````````````````````````````` example autolink +www.google.com/search?q=(business))+ok +. +

www.google.com/search?q=(business))+ok

+```````````````````````````````` + +If an autolink ends in a semicolon (`;`), we check to see if it appears to +resemble an [entity reference][entity references]; if the preceding text is `&` +followed by one or more alphanumeric characters. If so, it is excluded from +the autolink: + +```````````````````````````````` example autolink +www.google.com/search?q=commonmark&hl=en + +www.google.com/search?q=commonmark&hl; +. +

www.google.com/search?q=commonmark&hl=en

+

www.google.com/search?q=commonmark&hl;

+```````````````````````````````` + +`<` immediately ends an autolink. + +```````````````````````````````` example autolink +www.commonmark.org/hewww.commonmark.org/he<lp

+```````````````````````````````` + +An [extended url autolink](@) will be recognised when one of the schemes +`http://`, `https://`, or `ftp://`, followed by a [valid domain], then zero or +more non-space non-`<` characters according to +[extended autolink path validation]: + +```````````````````````````````` example autolink +http://commonmark.org + +(Visit https://encrypted.google.com/search?q=Markup+(business)) + +Anonymous FTP is available at ftp://foo.bar.baz. +. +

http://commonmark.org

+

(Visit https://encrypted.google.com/search?q=Markup+(business))

+

Anonymous FTP is available at ftp://foo.bar.baz.

+```````````````````````````````` + + +An [extended email autolink](@) will be recognised when an email address is +recognised within any text node. Email addresses are recognised according to +the following rules: + +* One ore more characters which are alphanumeric, or `.`, `-`, `_`, or `+`. +* An `@` symbol. +* One or more characters which are alphanumeric, or `.`, `-`, or `_`. At least + one of the characters here must be a period (`.`). The last character must + not be one of `-` or `_`. If the last character is a period (`.`), it will + be excluded from the autolink. + +The scheme `mailto:` will automatically be added to the generated link: + +```````````````````````````````` example autolink +foo@bar.baz +. +

foo@bar.baz

+```````````````````````````````` + +`+` can occur before the `@`, but not after. + +```````````````````````````````` example autolink +hello@mail+xyz.example isn't valid, but hello+xyz@mail.example is. +. +

hello@mail+xyz.example isn't valid, but hello+xyz@mail.example is.

+```````````````````````````````` + +`.`, `-`, and `_` can occur on both sides of the `@`, but only `.` may occur at +the end of the email address, in which case it will not be considered part of +the address: + +```````````````````````````````` example autolink +a.b-c_d@a.b + +a.b-c_d@a.b. + +a.b-c_d@a.b- + +a.b-c_d@a.b_ +. +

a.b-c_d@a.b

+

a.b-c_d@a.b.

+

a.b-c_d@a.b-

+

a.b-c_d@a.b_

+```````````````````````````````` + +
+ +## Raw HTML + +Text between `<` and `>` that looks like an HTML tag is parsed as a +raw HTML tag and will be rendered in HTML without escaping. +Tag and attribute names are not limited to current HTML tags, +so custom tags (and even, say, DocBook tags) may be used. + +Here is the grammar for tags: + +A [tag name](@) consists of an ASCII letter +followed by zero or more ASCII letters, digits, or +hyphens (`-`). + +An [attribute](@) consists of [whitespace], +an [attribute name], and an optional +[attribute value specification]. + +An [attribute name](@) +consists of an ASCII letter, `_`, or `:`, followed by zero or more ASCII +letters, digits, `_`, `.`, `:`, or `-`. (Note: This is the XML +specification restricted to ASCII. HTML5 is laxer.) + +An [attribute value specification](@) +consists of optional [whitespace], +a `=` character, optional [whitespace], and an [attribute +value]. + +An [attribute value](@) +consists of an [unquoted attribute value], +a [single-quoted attribute value], or a [double-quoted attribute value]. + +An [unquoted attribute value](@) +is a nonempty string of characters not +including [whitespace], `"`, `'`, `=`, `<`, `>`, or `` ` ``. + +A [single-quoted attribute value](@) +consists of `'`, zero or more +characters not including `'`, and a final `'`. + +A [double-quoted attribute value](@) +consists of `"`, zero or more +characters not including `"`, and a final `"`. + +An [open tag](@) consists of a `<` character, a [tag name], +zero or more [attributes], optional [whitespace], an optional `/` +character, and a `>` character. + +A [closing tag](@) consists of the string ``. + +An [HTML comment](@) consists of ``, +where *text* does not start with `>` or `->`, does not end with `-`, +and does not contain `--`. (See the +[HTML5 spec](http://www.w3.org/TR/html5/syntax.html#comments).) + +A [processing instruction](@) +consists of the string ``, and the string +`?>`. + +A [declaration](@) consists of the +string ``, and the character `>`. + +A [CDATA section](@) consists of +the string ``, and the string `]]>`. + +An [HTML tag](@) consists of an [open tag], a [closing tag], +an [HTML comment], a [processing instruction], a [declaration], +or a [CDATA section]. + +Here are some simple open tags: + +```````````````````````````````` example + +. +

+```````````````````````````````` + + +Empty elements: + +```````````````````````````````` example + +. +

+```````````````````````````````` + + +[Whitespace] is allowed: + +```````````````````````````````` example + +. +

+```````````````````````````````` + + +With attributes: + +```````````````````````````````` example + +. +

+```````````````````````````````` + + +Custom tag names can be used: + +```````````````````````````````` example +Foo +. +

Foo

+```````````````````````````````` + + +Illegal tag names, not parsed as HTML: + +```````````````````````````````` example +<33> <__> +. +

<33> <__>

+```````````````````````````````` + + +Illegal attribute names: + +```````````````````````````````` example +
+. +

<a h*#ref="hi">

+```````````````````````````````` + + +Illegal attribute values: + +```````````````````````````````` example +
+. +

</a href="foo">

+```````````````````````````````` + + +Comments: + +```````````````````````````````` example +foo +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +foo +. +

foo <!-- not a comment -- two hyphens -->

+```````````````````````````````` + + +Not comments: + +```````````````````````````````` example +foo foo --> + +foo +. +

foo <!--> foo -->

+

foo <!-- foo--->

+```````````````````````````````` + + +Processing instructions: + +```````````````````````````````` example +foo +. +

foo

+```````````````````````````````` + + +Declarations: + +```````````````````````````````` example +foo +. +

foo

+```````````````````````````````` + + +CDATA sections: + +```````````````````````````````` example +foo &<]]> +. +

foo &<]]>

+```````````````````````````````` + + +Entity and numeric character references are preserved in HTML +attributes: + +```````````````````````````````` example +foo
+. +

foo

+```````````````````````````````` + + +Backslash escapes do not work in HTML attributes: + +```````````````````````````````` example +foo +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example + +. +

<a href=""">

+```````````````````````````````` + + +
+ +## Disallowed Raw HTML (extension) + +GFM enables the `tagfilter` extension, where the following HTML tags will be +filtered when rendering HTML output: + +* `` +* `<textarea>` +* `<style>` +* `<xmp>` +* `<iframe>` +* `<noembed>` +* `<noframes>` +* `<script>` +* `<plaintext>` + +Filtering is done by replacing the leading `<` with the entity `<`. These +tags are chosen in particular as they change how HTML is interpreted in a way +unique to them (i.e. nested HTML is interpreted differently), and this is +usually undesireable in the context of other rendered Markdown content. + +All other HTML tags are left untouched. + +```````````````````````````````` example tagfilter +<strong> <title> <style> <em> + +<blockquote> + <xmp> is disallowed. <XMP> is also disallowed. +</blockquote> +. +<p><strong> <title> <style> <em></p> +<blockquote> + <xmp> is disallowed. <XMP> is also disallowed. +</blockquote> +```````````````````````````````` + +</div> + +## Hard line breaks + +A line break (not in a code span or HTML tag) that is preceded +by two or more spaces and does not occur at the end of a block +is parsed as a [hard line break](@) (rendered +in HTML as a `<br />` tag): + +```````````````````````````````` example +foo +baz +. +<p>foo<br /> +baz</p> +```````````````````````````````` + + +For a more visible alternative, a backslash before the +[line ending] may be used instead of two spaces: + +```````````````````````````````` example +foo\ +baz +. +<p>foo<br /> +baz</p> +```````````````````````````````` + + +More than two spaces can be used: + +```````````````````````````````` example +foo +baz +. +<p>foo<br /> +baz</p> +```````````````````````````````` + + +Leading spaces at the beginning of the next line are ignored: + +```````````````````````````````` example +foo + bar +. +<p>foo<br /> +bar</p> +```````````````````````````````` + + +```````````````````````````````` example +foo\ + bar +. +<p>foo<br /> +bar</p> +```````````````````````````````` + + +Line breaks can occur inside emphasis, links, and other constructs +that allow inline content: + +```````````````````````````````` example +*foo +bar* +. +<p><em>foo<br /> +bar</em></p> +```````````````````````````````` + + +```````````````````````````````` example +*foo\ +bar* +. +<p><em>foo<br /> +bar</em></p> +```````````````````````````````` + + +Line breaks do not occur inside code spans + +```````````````````````````````` example +`code +span` +. +<p><code>code span</code></p> +```````````````````````````````` + + +```````````````````````````````` example +`code\ +span` +. +<p><code>code\ span</code></p> +```````````````````````````````` + + +or HTML tags: + +```````````````````````````````` example +<a href="foo +bar"> +. +<p><a href="foo +bar"></p> +```````````````````````````````` + + +```````````````````````````````` example +<a href="foo\ +bar"> +. +<p><a href="foo\ +bar"></p> +```````````````````````````````` + + +Hard line breaks are for separating inline content within a block. +Neither syntax for hard line breaks works at the end of a paragraph or +other block element: + +```````````````````````````````` example +foo\ +. +<p>foo\</p> +```````````````````````````````` + + +```````````````````````````````` example +foo +. +<p>foo</p> +```````````````````````````````` + + +```````````````````````````````` example +### foo\ +. +<h3>foo\</h3> +```````````````````````````````` + + +```````````````````````````````` example +### foo +. +<h3>foo</h3> +```````````````````````````````` + + +## Soft line breaks + +A regular line break (not in a code span or HTML tag) that is not +preceded by two or more spaces or a backslash is parsed as a +[softbreak](@). (A softbreak may be rendered in HTML either as a +[line ending] or as a space. The result will be the same in +browsers. In the examples here, a [line ending] will be used.) + +```````````````````````````````` example +foo +baz +. +<p>foo +baz</p> +```````````````````````````````` + + +Spaces at the end of the line and beginning of the next line are +removed: + +```````````````````````````````` example +foo + baz +. +<p>foo +baz</p> +```````````````````````````````` + + +A conforming parser may render a soft line break in HTML either as a +line break or as a space. + +A renderer may also provide an option to render soft line breaks +as hard line breaks. + +## Textual content + +Any characters not given an interpretation by the above rules will +be parsed as plain textual content. + +```````````````````````````````` example +hello $.;'there +. +<p>hello $.;'there</p> +```````````````````````````````` + + +```````````````````````````````` example +Foo χρῆν +. +<p>Foo χρῆν</p> +```````````````````````````````` + + +Internal spaces are preserved verbatim: + +```````````````````````````````` example +Multiple spaces +. +<p>Multiple spaces</p> +```````````````````````````````` + + +<!-- END TESTS --> + +# Appendix: A parsing strategy + +In this appendix we describe some features of the parsing strategy +used in the CommonMark reference implementations. + +## Overview + +Parsing has two phases: + +1. In the first phase, lines of input are consumed and the block +structure of the document---its division into paragraphs, block quotes, +list items, and so on---is constructed. Text is assigned to these +blocks but not parsed. Link reference definitions are parsed and a +map of links is constructed. + +2. In the second phase, the raw text contents of paragraphs and headings +are parsed into sequences of Markdown inline elements (strings, +code spans, links, emphasis, and so on), using the map of link +references constructed in phase 1. + +At each point in processing, the document is represented as a tree of +**blocks**. The root of the tree is a `document` block. The `document` +may have any number of other blocks as **children**. These children +may, in turn, have other blocks as children. The last child of a block +is normally considered **open**, meaning that subsequent lines of input +can alter its contents. (Blocks that are not open are **closed**.) +Here, for example, is a possible document tree, with the open blocks +marked by arrows: + +``` tree +-> document + -> block_quote + paragraph + "Lorem ipsum dolor\nsit amet." + -> list (type=bullet tight=true bullet_char=-) + list_item + paragraph + "Qui *quodsi iracundia*" + -> list_item + -> paragraph + "aliquando id" +``` + +## Phase 1: block structure + +Each line that is processed has an effect on this tree. The line is +analyzed and, depending on its contents, the document may be altered +in one or more of the following ways: + +1. One or more open blocks may be closed. +2. One or more new blocks may be created as children of the + last open block. +3. Text may be added to the last (deepest) open block remaining + on the tree. + +Once a line has been incorporated into the tree in this way, +it can be discarded, so input can be read in a stream. + +For each line, we follow this procedure: + +1. First we iterate through the open blocks, starting with the +root document, and descending through last children down to the last +open block. Each block imposes a condition that the line must satisfy +if the block is to remain open. For example, a block quote requires a +`>` character. A paragraph requires a non-blank line. +In this phase we may match all or just some of the open +blocks. But we cannot close unmatched blocks yet, because we may have a +[lazy continuation line]. + +2. Next, after consuming the continuation markers for existing +blocks, we look for new block starts (e.g. `>` for a block quote). +If we encounter a new block start, we close any blocks unmatched +in step 1 before creating the new block as a child of the last +matched block. + +3. Finally, we look at the remainder of the line (after block +markers like `>`, list markers, and indentation have been consumed). +This is text that can be incorporated into the last open +block (a paragraph, code block, heading, or raw HTML). + +Setext headings are formed when we see a line of a paragraph +that is a [setext heading underline]. + +Reference link definitions are detected when a paragraph is closed; +the accumulated text lines are parsed to see if they begin with +one or more reference link definitions. Any remainder becomes a +normal paragraph. + +We can see how this works by considering how the tree above is +generated by four lines of Markdown: + +``` markdown +> Lorem ipsum dolor +sit amet. +> - Qui *quodsi iracundia* +> - aliquando id +``` + +At the outset, our document model is just + +``` tree +-> document +``` + +The first line of our text, + +``` markdown +> Lorem ipsum dolor +``` + +causes a `block_quote` block to be created as a child of our +open `document` block, and a `paragraph` block as a child of +the `block_quote`. Then the text is added to the last open +block, the `paragraph`: + +``` tree +-> document + -> block_quote + -> paragraph + "Lorem ipsum dolor" +``` + +The next line, + +``` markdown +sit amet. +``` + +is a "lazy continuation" of the open `paragraph`, so it gets added +to the paragraph's text: + +``` tree +-> document + -> block_quote + -> paragraph + "Lorem ipsum dolor\nsit amet." +``` + +The third line, + +``` markdown +> - Qui *quodsi iracundia* +``` + +causes the `paragraph` block to be closed, and a new `list` block +opened as a child of the `block_quote`. A `list_item` is also +added as a child of the `list`, and a `paragraph` as a child of +the `list_item`. The text is then added to the new `paragraph`: + +``` tree +-> document + -> block_quote + paragraph + "Lorem ipsum dolor\nsit amet." + -> list (type=bullet tight=true bullet_char=-) + -> list_item + -> paragraph + "Qui *quodsi iracundia*" +``` + +The fourth line, + +``` markdown +> - aliquando id +``` + +causes the `list_item` (and its child the `paragraph`) to be closed, +and a new `list_item` opened up as child of the `list`. A `paragraph` +is added as a child of the new `list_item`, to contain the text. +We thus obtain the final tree: + +``` tree +-> document + -> block_quote + paragraph + "Lorem ipsum dolor\nsit amet." + -> list (type=bullet tight=true bullet_char=-) + list_item + paragraph + "Qui *quodsi iracundia*" + -> list_item + -> paragraph + "aliquando id" +``` + +## Phase 2: inline structure + +Once all of the input has been parsed, all open blocks are closed. + +We then "walk the tree," visiting every node, and parse raw +string contents of paragraphs and headings as inlines. At this +point we have seen all the link reference definitions, so we can +resolve reference links as we go. + +``` tree +document + block_quote + paragraph + str "Lorem ipsum dolor" + softbreak + str "sit amet." + list (type=bullet tight=true bullet_char=-) + list_item + paragraph + str "Qui " + emph + str "quodsi iracundia" + list_item + paragraph + str "aliquando id" +``` + +Notice how the [line ending] in the first paragraph has +been parsed as a `softbreak`, and the asterisks in the first list item +have become an `emph`. + +### An algorithm for parsing nested emphasis and links + +By far the trickiest part of inline parsing is handling emphasis, +strong emphasis, links, and images. This is done using the following +algorithm. + +When we're parsing inlines and we hit either + +- a run of `*` or `_` characters, or +- a `[` or `![` + +we insert a text node with these symbols as its literal content, and we +add a pointer to this text node to the [delimiter stack](@). + +The [delimiter stack] is a doubly linked list. Each +element contains a pointer to a text node, plus information about + +- the type of delimiter (`[`, `![`, `*`, `_`) +- the number of delimiters, +- whether the delimiter is "active" (all are active to start), and +- whether the delimiter is a potential opener, a potential closer, + or both (which depends on what sort of characters precede + and follow the delimiters). + +When we hit a `]` character, we call the *look for link or image* +procedure (see below). + +When we hit the end of the input, we call the *process emphasis* +procedure (see below), with `stack_bottom` = NULL. + +#### *look for link or image* + +Starting at the top of the delimiter stack, we look backwards +through the stack for an opening `[` or `![` delimiter. + +- If we don't find one, we return a literal text node `]`. + +- If we do find one, but it's not *active*, we remove the inactive + delimiter from the stack, and return a literal text node `]`. + +- If we find one and it's active, then we parse ahead to see if + we have an inline link/image, reference link/image, compact reference + link/image, or shortcut reference link/image. + + + If we don't, then we remove the opening delimiter from the + delimiter stack and return a literal text node `]`. + + + If we do, then + + * We return a link or image node whose children are the inlines + after the text node pointed to by the opening delimiter. + + * We run *process emphasis* on these inlines, with the `[` opener + as `stack_bottom`. + + * We remove the opening delimiter. + + * If we have a link (and not an image), we also set all + `[` delimiters before the opening delimiter to *inactive*. (This + will prevent us from getting links within links.) + +#### *process emphasis* + +Parameter `stack_bottom` sets a lower bound to how far we +descend in the [delimiter stack]. If it is NULL, we can +go all the way to the bottom. Otherwise, we stop before +visiting `stack_bottom`. + +Let `current_position` point to the element on the [delimiter stack] +just above `stack_bottom` (or the first element if `stack_bottom` +is NULL). + +We keep track of the `openers_bottom` for each delimiter +type (`*`, `_`). Initialize this to `stack_bottom`. + +Then we repeat the following until we run out of potential +closers: + +- Move `current_position` forward in the delimiter stack (if needed) + until we find the first potential closer with delimiter `*` or `_`. + (This will be the potential closer closest + to the beginning of the input -- the first one in parse order.) + +- Now, look back in the stack (staying above `stack_bottom` and + the `openers_bottom` for this delimiter type) for the + first matching potential opener ("matching" means same delimiter). + +- If one is found: + + + Figure out whether we have emphasis or strong emphasis: + if both closer and opener spans have length >= 2, we have + strong, otherwise regular. + + + Insert an emph or strong emph node accordingly, after + the text node corresponding to the opener. + + + Remove any delimiters between the opener and closer from + the delimiter stack. + + + Remove 1 (for regular emph) or 2 (for strong emph) delimiters + from the opening and closing text nodes. If they become empty + as a result, remove them and remove the corresponding element + of the delimiter stack. If the closing node is removed, reset + `current_position` to the next element in the stack. + +- If none in found: + + + Set `openers_bottom` to the element before `current_position`. + (We know that there are no openers for this kind of closer up to and + including this point, so this puts a lower bound on future searches.) + + + If the closer at `current_position` is not a potential opener, + remove it from the delimiter stack (since we know it can't + be a closer either). + + + Advance `current_position` to the next element in the stack. + +After we're done, we remove all delimiters above `stack_bottom` from the +delimiter stack. + diff --git a/vendor/pulldown-cmark/third_party/xi-editor/LICENSE b/vendor/pulldown-cmark/third_party/xi-editor/LICENSE new file mode 100644 index 0000000000..6b0b1270ff --- /dev/null +++ b/vendor/pulldown-cmark/third_party/xi-editor/LICENSE @@ -0,0 +1,203 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/vendor/pulldown-cmark/third_party/xi-editor/crdt.md b/vendor/pulldown-cmark/third_party/xi-editor/crdt.md new file mode 100644 index 0000000000..025ba20562 --- /dev/null +++ b/vendor/pulldown-cmark/third_party/xi-editor/crdt.md @@ -0,0 +1,1097 @@ +--- +layout: page +title: CRDT - The Xi Text Engine +site_nav_category_order: 206 +is_site_nav_category2: true +site_nav_category: docs +--- + +<!-- See https://www.figma.com/file/UGOAcpKR5WIP81t3DGPIP2dR/CRDT-Merge-Diagrams for the source of the diagrams --> + +This document contains a detailed description of the data structures and operations Xi uses for text. These data structures and the `merge` operation also form a Conflict-free Replicated Data Type (CRDT). It being a CRDT allows Xi to be used for concurrent editing of text on multiple devices, it can merge edits, including those made offline, between multiple devices and converge on a consistent document that includes all changes. + +Beyond synchronizing text, these data structures and operations allow Xi to handle asynchronous editing of the text from plugins, support undo and redo, and allow incremental updating of editor state and the view based on differences between revisions. + +Many of these data structures and operations have been in Xi for a while but they've recently been heavily overhauled and extended as part of [a project](https://github.com/xi-editor/xi-editor/issues/250) that added multi-device syncing support via the CRDT merge operation. This was done for [use on the Fuchsia operating system](https://fuchsia.googlesource.com/topaz/+/master/bin/xi/), where it uses [Ledger](https://fuchsia.googlesource.com/peridot/+/HEAD/docs/ledger) to synchronize documents between devices. + +What follows is both a description of a data structure for text and a code tour of the `xi-rope` crate. It describes the actual Rust data structures and algorithms used, because the primary novelty and difficulty of this CRDT is in the optimized representation that allows for better time and memory complexity. If you want an overview of the motivation behind using a CRDT and a conceptual description of what the CRDT does see [`crdt.md`](crdt.md). The intended audience is anyone interested in implementing CRDTs, anyone who wants to work on Xi, or just anyone curious enough. + +## Table of Contents + +- [Motivation](#motivation): Why Xi's CRDT is the way it is. +- [Representation](#representation): Describes the representation Xi uses to implement the CRDT in a memory and time efficient way. +- [Operations](#operations): Describes all the operations implemented on the representation to allow it to support undo, asynchronous edits, distributed synchronization and more. + - [Engine::merge](#enginemerge): Description of the CRDT merge operation used for multi-device syncing. + +## Motivation + +The Xi CRDT attempts to have a number of properties that many other asynchronous text editing solutions don't: + +- Usable without a central server: Even though the Fuchsia Ledger does sync to a cloud server, it can't actually inspect the data or perform operations, so conflict resolution must be possible on every device independently. +- Support large documents: The memory complexity of the representation and the time complexity of common operations should be low enough to support very large text documents like books or long code files. +- Support long histories: Similarly, documents that have gone through many edits should be efficient to edit both in time and memory. + +As of the time this document was written, it satisfies all of these properties to some extent, but some operations and representations are not as memory and time efficient as we'd like. However, everything has been designed with a few more key optimizations in mind. Those optimizations should bring the memory and time complexity down to where we want. + +### Transform Property 2 (TP2) and Operational Transforms + +[Operational Transformation (OT)](https://en.wikipedia.org/wiki/Operational_transformation) is a common way to implement asynchronous text editing. It works by sending *operations* like inserts and deletes between peers and transforming them to apply to the current text. Unfortunately many implementations of OT have a problem where they don't always preserve ordering when text is deleted. + +For example see the following diagram showing 3 peers sending edits between each other ending up in an inconsistent state. The arrows represent operations being sent asynchronously between devices in a peer-to-peer editing system based on OT, with time progressing downward. Whenever an edit is made the operation is sent to all other peers, but due to asynchronous communication they can be arbitrarily delayed. When an operation arrives at a peer it is transformed and applied to the current text. For clarity, not all arrows are shown, but you can imagine that the arrival of missing sends just got delayed past the end of the diagram. + +![TP2 Problem](img/tp2.png) + +Acting consistently in cases like this is called having "Transform Property 2" (see [Operational Transformation in Real-Time Group Editors: +Issues, Algorithms, and Achievements](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.53.933&rep=rep1&type=pdf) by Sun & Ellis, 1998). One approach to the problem is to serialize all edits through a central server which does all the transformation. With this approach, the ordering relative to deleted text may not be preserved, but at least all clients will converge to the same state. This is what Google Docs and many other collaborative editing systems do. + +Xi avoids this problem by using "tombstones" (see [Tombstone Transformation Functions for Ensuring Consistency in Collaborative Editing Systems](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.103.2679&rep=rep1&type=pdf)), which leave deleted characters in the representation so that ordering can be preserved. This will be described in detail later. + +## Representation + +The conceptual representation described in [`crdt.md`](crdt.md) would be very inefficient to use directly. If we had to store an ID and ordering edges for each character and reconstruct the current text via topological sort every time we wanted to know what the current text is, Xi would be incredibly slow and would use much more memory than is necessary. + +Instead, we use a representation that allows all the operations we care about to be fast. We also take advantage of the typical patterns of text document usage to make the representation more memory efficient for common cases. + +The key optimization that shapes everything else is to avoid using IDs for characters or storing ordering edges explicitly. Instead, we represent the identity of characters implicitly by their position in the current text. But then how do we reference them in our revision history? If we use indices into the current text, they will get outdated by changes. We could rewrite all the indices in the history every time we made an edit, but that would be terribly inefficient. Instead the set of inserted characters in every revision is treated as a *coordinate transform* for the older revisions. In order to find the character referred to by an older revision you have to transform the indices it uses based on the insertions made after it. This allows us to make our history append-only, leaving the indices referring to the text at the time of the revision. + +That description is almost certainly too vague to be understandable at this point, but don't worry, there will be a full description with diagrams later on. + +Starting from the basic building blocks and proceeding towards the top level CRDT `Engine`, here are all the structures: + +### Rope + +```rust +pub struct Rope(Arc<RopeBody>); + +#[derive(Clone)] +struct RopeBody { + /// Used for efficiently seeking to an index in the tree + len: usize, + /// Used for rebalancing + height: usize, + val: RopeVal, +} + +enum RopeVal { + Leaf(String), + Internal(Vec<Rope>), +} +``` +**Note:** All the Rust code in this document is simplified from the actual implementation so that it still conveys the structure and memory properties of the representation but elides details not necessary to understand the CRDT. See the code or generated docs for the full definitions. For example, the real struct for `Rope` is called `Node<N: NodeInfo>` and is a generic structure not specific to text, that is later instantiated for text as `pub type Rope = Node<RopeInfo>`. + +When representing potentially large amounts of text, Xi avoids using `String`s and instead uses a data structure called `Rope`. This is essentially an immutable `String` except many operations that would be `O(n)` with normal strings are instead `O(log n)` or `O(1)`. Some examples of operations like this: + +- Copying +- Extracting a substring by index +- Inserting one piece of text in the middle of another producing a new piece of text +- Deleting an interval from a piece of text, producing a new piece of text + +Behind the scenes, `Rope` is an immutable balanced tree structure using Rust's atomic reference counting smart pointer (`Arc`) to share data, so "copying" any sub-tree is a very fast `O(1)` operation. The leaves of the tree are chunks of text with a maximum size. + +An example of a `O(log n)` operation is deleting an interval of a `Rope`, which only requires creating a few new nodes that reference the sub-trees to the right and left of the deleted interval, and creating up to two new leaves if the deleted interval doesn't lie on chunk boundaries. + +Obviously `Rope`s will be slower and take more memory than small `Strings` but they have an asymptotic advantage when working with large documents. + +For a deeper look at `Rope`s see the [Rope Science](rope_science_00.md) series. + +### Subset + +```rust +struct Segment { + len: usize, + count: usize, +} + +pub struct Subset { + /// Invariant, maintained by `SubsetBuilder`: all `Segment`s have non-zero + /// length, and no `Segment` has the same count as the one before it. + segments: Vec<Segment>, +} +``` + +The `Subset` structure in `multiset.rs` represents a multi-subset of a string, meaning that every character in the string has a count (often `0`) representing how many times it is in the `Subset`. Most of the time this structure is used to represent plain-old subsets and the counts are only ever `0` for something not in the set or `1` for a character in the set. It is primarily used to efficiently represent inserted and deleted regions of a document. + +**Note:** The exact nature of the characters is not central to the CRDT algorithm. It's most convenient for indices to match the representation, so throughout this document "characters" are actually counting UTF-8 code units, so for example an emoji would be multiple "characters" in this sense. + +It stores this information compactly as a list of consecutive `Segment`s with a `length` and a `count`. This way a `Subset` representing 1000 consecutive characters in the middle of a string will only require 3 segments (a 0-count one at the start, a 1-count one in the middle, and another 0-count one at the end). So as `(len, count)` tuples this would look like: `(n, 0), (1000, 1), (m, 0)`. + +The primary reason that `Subset`s can have counts greater than `1` is to represent concurrent deletes, for example if two concurrent edits delete the same character, and one of them is undone, subtracting one of the deletes from the `Subset` of deleted characters should still leave the character deleted once. For this reason, the `Subset`s of deleted characters which are described later have counts that represent how many times each character has been deleted. + +Note that an "empty" `Subset` where all the characters have count `0` is still represented as a single segment with the length of the base string and count set to `0`. This allows functions using `Subset`s to panic if they are used with strings or other `Subset`s of the wrong length. This gives a level of dynamic checking that algorithms are using `Subset`s correctly. + +### Delta + +```rust +enum DeltaElement { + /// Represents a range of text in the base document. Includes beginning, excludes end. + Copy(usize, usize), + Insert(Rope), +} + +pub struct Delta { + els: Vec<DeltaElement>, + /// The total length of the base document, used for checks in some operations + base_len: usize, +} + +pub struct InsertDelta(Delta); +``` + +A `Delta` represents the difference between one string (*A*) and another (*B*). It stores this as a list of intervals copied from the *A* string and new inserted sections. All the indices of the copied intervals are non-decreasing. So a deletion is represented as a section of the *A* string which isn't copied to the *B* string, and insertions are represented as inserted sections in between copied sections. `Delta` is the data structure the text editor interface creates when the user or a plugin edits the document, these are then applied to the document by the `Engine::edit_rev` operation described later. + +There is also a type `InsertDelta` that is just a wrapper around a `Delta` but represents a guarantee that the `Delta` only inserts, that is, the entire *A* string is copied by the `Copy` intervals. + +### Text, tombstones and the "union string" + +A super important part of being able to provide the properties we desire in our CRDT is that we never throw useful information away. This means that when you delete text in Xi, or undo an insert, the text doesn't actually get thrown away, just marked as deleted. You can think of this as if there is a "union string" that contains all the characters that have ever been inserted, with some marked as deleted. + +When we delete or undo, we don't touch the union string, we just change a `Subset` (`deletes_from_union`, more on that later) which marks which characters of the union string are deleted. These deleted characters are sometimes called "tombstones" both within Xi and the academic CRDT literature. + +If we wanted to go from the "union string" to the current text of the document, you'd delete the characters marked in `deletes_from_union` from the union string. The problem is, Xi access the current text **very often**, so this would be an inefficient way to actually store the text for large documents. + +As an optimization, we store the union string as two separate parts: `text` and `tombstones`. The `text` stores the current visible document contents, so it is really fast to access, and `tombstones` stores all the characters that are currently in the `deletes_from_union` set. We still store the `deletes_from_union` set to mark deleted characters. Note that the union string is still used for most indices as a coordinate space for `Subset`s like `deletes_from_union`. + +Here's an example of what this looks like: + +``` +union string: abcdefgh +deletes_from_union: -+---+-+ +text: acdeg +tombstones: bfh +``` + +We can now also look at `deletes_from_union` as describing the interleaving of characters from `text` and `tombstones`: + +``` +text: a cde g +deletes_from_union: -+---+-+ +tombstones: b f h +``` + +The union string is still an important and useful concept because it makes a lot of the operations easier to implement and understand. Almost all explanations will be in terms of the union string, if you want you can largely ignore that fact that it's actually stored as two separate parts. Most operations are done in terms of the union string and then at the very end they shuffle some things around between the current `text` and `tombstones`. + +### Revision + +```rust +struct Revision { + /// This uniquely represents the identity of this revision and it stays + /// the same even if it is rebased or merged between devices. + rev_id: RevId, + /// The largest undo group number of any edit in the history up to this + /// point. Used to optimize undo to not look further back. + max_undo_so_far: usize, + edit: Contents, +} + +enum Contents { + Edit { + /// Used to order concurrent inserts, for example auto-indentation + /// should go before typed text. + priority: usize, + /// Groups related edits together so that they are undone and re-done + /// together. For example, an auto-indent insertion would be un-done + /// along with the newline that triggered it. + undo_group: usize, + /// The subset of the characters of the union string from after this + /// revision that were added by this revision. + inserts: Subset, + /// The subset of the characters of the union string from after this + /// revision that were deleted by this revision. + deletes: Subset, + }, + Undo { + /// The set of groups toggled between undone and done. + /// Just the `symmetric_difference` (XOR) of the two sets. + toggled_groups: BTreeSet<usize>, // set of undo_group id's + /// Used to store a reversible difference between the deleted + /// characters before and after this operation. + deletes_bitxor: Subset, + } +} +``` + +`Revision`s represent a single edit to the document. Typing a character into a Xi document will create a new `Revision` with a `Contents::Edit` with an empty `deletes` subset and an `inserts` subset containing the character inserted. + +They can also represent more complex things like selecting multiple ranges of text using multiple cursors (which Xi supports) and then pasting. This would result in a `Contents::Edit` with an `inserts` subset containing multiple separate segments of pasted characters, and a `deletes` subset containing the multiple ranges of previous text that were replaced. + +Note that the `inserts` and `deletes` `Subset`s are based on the union string from after the `Revision` is applied. The fact that the union string includes deleted characters allows insertions and deletions to maintain their position easily in the face of concurrency and undo. For example, say I have the text "ac" and I change it to "abc", but then undo the first edit leaving "b". If I re-do the first edit, Xi needs to know that the "b" goes between the two deleted characters. You might be able to think of ways to do this with other coordinates, but it's much easier and less fraught when coordinates only change on insertions instead of insertions, deletions and undo. + +A key property of `Revision`s is that they contain all the necessary information to apply them as well as reverse them. This is important both for undo and also for some operations we'll get to later. This is why `Contents::undo` stores the set of toggled groups rather than the new set of undone groups. It's also why it stores a reversible set of changes to the deleted characters (more on those later), this could be found by replaying all of history using the new set of undo groups, but then it would be inefficient to apply and reverse (because it would be proportional to the length of history). + +### RevId & RevToken + +```rust +pub struct RevId { + // 96 bits has a 10^(-12) chance of collision with 400 million sessions and 10^(-6) with 100 billion. + // `session1==session2==0` is reserved for initialization which is the same on all sessions. + // A colliding session will break merge invariants and the document will start crashing Xi. + session1: u64, + // if this was a tuple field instead of two fields, alignment padding would add 8 more bytes. + session2: u32, + // There will probably never be a document with more than 4 billion edits + // in a single session. + num: u32, +} + +/// Valid within a session. If there's a collision the most recent matching +/// Revision will be used, which means only the (small) set of concurrent edits +/// could trigger incorrect behavior if they collide, so u64 is safe. +pub type RevToken = u64; +``` + +`RevId` is used to uniquely identify the revision. The trick is offline devices have to be able to generate non-colliding IDs, which they do by generating random "session IDs" that become part of their revision numbers for that execution, with `num` being just an incrementing counter. The reason the IDs aren't fully random is so that eventually we can delta-compress them and the IDs will take on average 1 bit per revision instead of 128 bits. This is only necessary for the multi-device syncing case, in the single-device case the session ID is always `(1,0)`. + +`RevToken` is used to make the API simpler, it is just the hash of a `RevId`. This makes things easy for plugins and other things that need to reference revisions. + + +### Engine + +```rust +/// Represents the current state of a document and all of its history +pub struct Engine { + /// The session ID used to create new `RevId`s for edits made on this device + session: SessionId, + /// The incrementing revision number counter for this session used for `RevId`s + rev_id_counter: u32, + /// The current contents of the document as would be displayed on screen + text: Rope, + /// Storage for all the characters that have been deleted but could + /// return if a delete is un-done or an insert is re- done. + tombstones: Rope, + /// Imagine a "union string" that contained all the characters ever + /// inserted, including the ones that were later deleted, in the locations + /// they would be if they hadn't been deleted. + /// + /// This is a `Subset` of the "union string" representing the characters + /// that are currently deleted, and thus in `tombstones` rather than + /// `text`. The count of a character in `deletes_from_union` represents + /// how many times it has been deleted, so if a character is deleted twice + /// concurrently it will have count `2` so that undoing one delete but not + /// the other doesn't make it re-appear. + /// + /// You could construct the "union string" from `text`, `tombstones` and + /// `deletes_from_union` by splicing a segment of `tombstones` into `text` + /// wherever there's a non-zero-count segment in `deletes_from_union`. + deletes_from_union: Subset, + undone_groups: BTreeSet<usize>, // set of undo_group id's + /// The revision history of the document + revs: Vec<Revision>, +} + +/// the session ID component of a `RevId` +pub type SessionId = (u64, u32); +``` + +`Engine` is the top-level container of text state for the CRDT. It stores the current state of the document and all the `Revision`s that lead up to it. This allows operations that require knowledge of history to apply `Revision`s in reverse from the current state to find the state at a point in the past, without having to store the state at every point in history. Be sure to read the code in this case, all the fields are described by doc comments. + +**SUPER IMPORTANT INSIGHT:** Because the union string preserves the textual ordering of inserted characters, indices in the union string only depend on the set of inserted characters and not what order they were added in the history. This means that the correct representation of a `Revision` for a given edit *doesn't depend on the order* of `Revision`s before it in the history, only what *set* of `Revision`s is before it. + +### Example History + +Bringing it all together, here's a sketch of how a simple editing scenario would be represented this way. + +![Representation example](img/representation-overview.png) + +Shown below is a longer history of `Edit` `Revision`s. At each point, the `inserts` and `deletes` `Subset`s of the `Revision` that was just added are shown. Below that is what the contents of `Engine` would be immediately after that `Revision` was added to it. + +Also included is a "Concepts" section that includes things that aren't actually stored but are useful for understanding the representation. This includes the "union" string that all indices are based on. It also includes `back_computed_deletions_from_6_union`, which is like `deletes_from_union` except instead of being based on the union at the time of the edit, it is based on the union of `Revision` 6. This shows that since we never throw away information, we can represent the `text` at any past `Revision` as a set of deletions from the union string of any later revision. + +``` +() Revision: before any revisions are made + Engine: text="" tombstones="" deletes_from_union={} + Concepts: union="" back_computed_deletions_from_6_union={0,1,2,3,4,5} +(1) Revision: inserts={0, 1, 2} deletes={} + Engine: text="123" tombstones="" deletes_from_union={} + Concepts: union="123" back_computed_deletions_from_6_union={0,1,2} +(2) Revision: inserts={} deletes={0, 1, 2} + Engine: text="" tombstones="123" deletes_from_union={0,1,2} + Concepts: union="123" back_computed_deletions_from_6_union={0,1,2,3,4,5} +(3) Revision: inserts={0} deletes={} + Engine: text="a" tombstones="123" deletes_from_union={1,2,3} + Concepts: union="a123" back_computed_deletions_from_6_union={1,2,3,4,5} +(4) Revision: inserts={1} deletes={} + Engine: text="ab" tombstones="123" deletes_from_union={2,3,4} + Concepts: union="ab123" back_computed_deletions_from_6_union={1,3,4,5} +(5) Revision: inserts={1} deletes={} + Engine: text="axb" tombstones="123" deletes_from_union={3,4,5} + Concepts: union="axb123" back_computed_deletions_from_6_union={3,4,5} +(6) Revision: inserts={} deletes={1} + Engine: text="ab" tombstones="x123" deletes_from_union={1,3,4,5} + Concepts: union="axb123" +``` + +## Operations + +Now that you know what we have to work with, let's go over the operations that `Engine` supports. Each of these operations relies on a bunch of different shared helpers, as we go from the simplest operations to the most complex, we'll gradually build up the set of helpers we use. + +After describing how each operation or helper works there'll often be a code block with the actual function, it isn't necessary to understand the code and it may have complications that aren't mentioned, so feel free to skip them, they're there if you want to confirm or enhance your understanding. + +### Subset helpers + +`Subset` has a number of operations that produce new `Subset`s, these form the core of most work the CRDT operations do. It's better to explain them together near the start since they're used everywhere: + +#### Subset::union + +Takes two `Subset`s and produces a new `Subset` of the same string where each character has the sum of the counts it has in each input. When treating a `Subset` as a normal set, this is just the union. + +#### Subset::transform_expand + +`Subset::transform_expand` takes a `Subset` and another "transform" `Subset` and transforms the first `Subset` through the coordinate transform represented by the "transform". Now what does this mean: + + +`Revision`s are never modified, and their `Edit`s always refer to the union string that existed when they were created. For operations on multiple `Revision`s, we have to be able to map coordinates in one's union string to coordinates in another's. We can deal with this by treating `Subset`s of inserted characters as coordinate transforms. Since the only difference to the union string is the inserted characters, if we can map the coordinates of a `Subset` from one union string to another, we can work with edits from multiple `Revision`s together. + +We can do this by "expanding" the indices in a `Subset` after each insert by the size of that insert, where the inserted characters are the "transform". Conceptually if a `Subset` represents the set of characters in a string that were inserted by an edit, then it can be used as a transform from the coordinate space before that edit to after that edit by mapping a `Subset` of the string before the insertion onto the 0-count regions of the transform `Subset`. + +The actual procedure works by iterating over the segments of the transform: + +- When it encounters a 0-count segment it keeps putting (potentially partial) segments from `self` into the output until it fills its size. +- When it encounters a non-0-count transform segment it outputs a 0-count segment of the same size. + +The `SubsetBuilder` used for the output automatically merges consecutive segments that have the same count. See the diagram below for how this plays out: + +![transform_expand workings](img/trans-expand-1.png) + +One example of how this can be used is to find the characters that were inserted by a past `Revision` in the coordinates of the current union string instead of the past one: + +![transform_expand usage](img/trans-expand-2.png) + +```rust +/// Map the contents of `self` into the 0-regions of `other`. +/// Precondition: `self.count(CountMatcher::All) == other.count(CountMatcher::Zero)` +fn transform(&self, other: &Subset, union: bool) -> Subset { + let mut sb = SubsetBuilder::new(); + let mut seg_iter = self.segments.iter(); + let mut cur_seg = Segment {len: 0, count: 0}; + for oseg in &other.segments { + if oseg.count > 0 { + sb.push_segment(oseg.len, if union { oseg.count } else { 0 }); + } else { + // fill 0-region with segments from self. + let mut to_be_consumed = oseg.len; + while to_be_consumed > 0 { + if cur_seg.len == 0 { + cur_seg = seg_iter.next().expect("self must cover all 0-regions of other").clone(); + } + // consume as much of the segment as possible and necessary + let to_consume = cmp::min(cur_seg.len,to_be_consumed); + sb.push_segment(to_consume,cur_seg.count); + to_be_consumed -= to_consume; + cur_seg.len -= to_consume; + } + } + } + assert_eq!(cur_seg.len, 0, "the 0-regions of other must be the size of self"); + assert_eq!(seg_iter.next(), None, "the 0-regions of other must be the size of self"); + sb.build() +} + +/// Transform through coordinate transform represented by other. +/// The equation satisfied is as follows: +/// +/// s1 = other.delete_from_string(s0) +/// +/// s2 = self.delete_from_string(s1) +/// +/// element in self.transform_expand(other).delete_from_string(s0) if (not in s1) or in s2 +pub fn transform_expand(&self, other: &Subset) -> Subset { + self.transform(other, false) +} +``` + +#### Subset::transform_union + +Like `transform_expand` except it preserves the non-zero segments of the transform instead of mapping them to 0-segments. This is the same as `transform_expand`ing and then taking the `union` with the transform, but more efficient. These two operations are frequently chained so a shortcut is useful, for example to transform a set of deletions to the coordinate space including some new characters, while also adding those insertions to the deleted set. So: + +```rust +a.transform_union(&b) == a.transform_expand(&b).union(&b) +``` + +#### Subset::transform_shrink + +The reverse of `Subset::transform_expand`. It takes a `Subset` and a transform `Subset` that are based on the same string and removes sections of the former that align with non-zero segments of the latter. In most uses these sections of the former always have count 0 (otherwise this transform would lose information), but there are some things like garbage collection that intentionally use this to discard information. + +```rust +/// Transform subset through other coordinate transform, shrinking. +/// The following equation is satisfied: +/// +/// C = A.transform_expand(B) +/// +/// B.transform_shrink(C).delete_from_string(C.delete_from_string(s)) = +/// A.delete_from_string(B.delete_from_string(s)) +pub fn transform_shrink(&self, other: &Subset) -> Subset { + let mut sb = SubsetBuilder::new(); + // discard ZipSegments where the shrinking set has positive count + for zseg in self.zip(other) { + // TODO: should this actually do something like subtract counts? + if zseg.b_count == 0 { + sb.push_segment(zseg.len, zseg.a_count); + } + } + sb.build() +} +``` + +### Engine::get_rev + +This operation is used in the plugin API and is probably the simplest operation, but it still relies on a lot of sub-steps that are shared with other operations. + +The idea behind how it works is that we already have all the characters we need in the `text` and `tombstones` `Rope`s we store, but some of the characters from the past revision might have been deleted, and some new characters might have been inserted that weren't in the past revision. We need to find a way to delete the newer insertions from `text` and insert the things that weren't deleted at the past point from where they are in `tombstones`. + +The way we describe the current state of `text` and `tombstones` relative to the "union string" is with `deletes_from_union` (see [Engine](#engine)), so what if we could find a similar `old_deletes_from_cur_union` that represented what the old revision's text looked like relative to the current union string. This would be the same as our current `deletes_from_union` except characters inserted after the old revision would be marked deleted and newer deletes would be un-marked. The function that finds this is `Engine::deletes_from_cur_union_for_index`. + +Once we have this `old_deletes_from_cur_union` and a new `deletes_from_union`, we need a way to take our current `text` and `tombstones` and get a `Rope` of what the `text` would have looked like at that old revision. We can do this by performing inserts and deletes on the `text` `Rope` based on the differences between the old and new deletions. We already have a way of describing inserts and deletes (a `Delta`), and we can create one using a helper called `Delta::synthesize`. + +Then we just have to apply the `Delta` we synthesized to the current `text`, returning the resulting old text. + +```rust +/// Get text of a given revision, if it can be found. +pub fn get_rev(&self, rev: RevToken) -> Option<Rope> { + self.find_rev_token(rev).map(|rev_index| self.rev_content_for_index(rev_index)) +} + +/// Get text of a given revision, if it can be found. +fn rev_content_for_index(&self, rev_index: usize) -> Rope { + let old_deletes_from_union = self.deletes_from_cur_union_for_index(rev_index); + let delta = Delta::synthesize(&self.tombstones, + &self.deletes_from_union, &old_deletes_from_union); + delta.apply(&self.text) +} +``` + +#### Engine::deletes_from_cur_union_for_index + +If you look back at the [example history scenario](#example-history), you'll see `back_computed_deletions_from_6_union`, which shows that for any past `Revision` we can find a set of deletions from the current union string that result in the past text. This helper is what computes deletion sets like [`back_computed_deletions_from_6_union`](#example-history). + +We can find an `old_deletes_from_cur_union` by taking our current `deletes_from_union` and walking backwards through our list of `Revision`s undoing the changes they have made since the old revision. + +There's a problem with this though, the `inserts` and `deletes` subsets for a `Revision` use indices in the coordinate space of the union string at the time the `Revision` was created, which may be smaller than our current union string. + +We could keep track of the transform and account for it, but it's easier to use a helper we need anyway elsewhere that computes what the `deletes_from_union` actually would have been at that previous point in time, that is, relative to the old union string not the current one like we want. This helper is called `Engine::deletes_from_union_for_index` and it performs the work of un-deleting and un-undoing everything after the old revision. + +Then we can take this `old_deletes_from_union` and `Subset::transform_union` it through the `inserts` since that old revision to get the `old_deletes_from_cur_union` we wanted. This puts it in the right coordinate space and the `union` part of `transform_union` makes sure that new inserts are considered as deleted (so not present) in `old_deletes_from_cur_union`. + +```rust +/// Get the Subset to delete from the current union string in order to obtain a revision's content +fn deletes_from_cur_union_for_index(&self, rev_index: usize) -> Cow<Subset> { + let mut deletes_from_union = self.deletes_from_union_for_index(rev_index); + for rev in &self.revs[rev_index + 1..] { + if let Edit { ref inserts, .. } = rev.edit { + if !inserts.is_empty() { + deletes_from_union = Cow::Owned(deletes_from_union.transform_union(inserts)); + } + } + } + deletes_from_union +} +``` + +#### Engine::deletes_from_union_for_index + +This function uses the property that each `Revision` contains the information necessary to reverse it, in order to work backwards from the current state of `deletes_from_union` to the past state. For every `Edit` revision it `subtract`s the `deletes` (meaning if something was deleted twice, this will only reverse one), but only if they weren't undone, and then uses `transform_shrink` to reverse the coordinate transform of the `inserts` so that the indices in the intermediate `old_deletes_from_union` refer to the previous union string. `Undo` edits store the symmetric differences of the `deletes_from_union` and the currently undone groups, so those are just reversed. + +```rust +/// Find what the `deletes_from_union` field in Engine would have been at the time +/// of a certain `rev_index`. In other words, the deletes from the union string at that time. +fn deletes_from_union_for_index(&self, rev_index: usize) -> Cow<Subset> { + self.deletes_from_union_before_index(rev_index + 1, true) +} + +/// Garbage collection means undo can sometimes need to replay the very first +/// revision, and so needs a way to get the deletion set before then. +fn deletes_from_union_before_index(&self, rev_index: usize, invert_undos: bool) -> Cow<Subset> { + let mut deletes_from_union = Cow::Borrowed(&self.deletes_from_union); + let mut undone_groups = Cow::Borrowed(&self.undone_groups); + + // invert the changes to deletes_from_union starting in the present and working backwards + for rev in self.revs[rev_index..].iter().rev() { + deletes_from_union = match rev.edit { + Edit { ref inserts, ref deletes, ref undo_group, .. } => { + if undone_groups.contains(undo_group) { + // no need to un-delete undone inserts since we'll just shrink them out + Cow::Owned(deletes_from_union.transform_shrink(inserts)) + } else { + let un_deleted = deletes_from_union.subtract(deletes); + Cow::Owned(un_deleted.transform_shrink(inserts)) + } + } + Undo { ref toggled_groups, ref deletes_bitxor } => { + if invert_undos { + let new_undone = undone_groups.symmetric_difference(toggled_groups).cloned().collect(); + undone_groups = Cow::Owned(new_undone); + Cow::Owned(deletes_from_union.bitxor(deletes_bitxor)) + } else { + deletes_from_union + } + } + } + } + deletes_from_union +} +``` + +#### Delta::synthesize + +This function is just a big hand-written triply-nested looping algorithm that loops over a `from_dels` and `to_dels` subset and uses a `tombstones` to construct a `Delta`. It's not particularly interesting, easy or worthwhile to understand. + +```rust +/// Synthesize a delta from a "union string" and two subsets: an old set +/// of deletions and a new set of deletions from the union. The Delta is +/// from text to text, not union to union; anything in both subsets will +/// be assumed to be missing from the Delta base and the new text. You can +/// also think of these as a set of insertions and one of deletions, with +/// overlap doing nothing. This is basically the inverse of `factor`. +/// +/// Since only the deleted portions of the union string are necessary, +/// instead of requiring a union string the function takes a `tombstones` +/// rope which contains the deleted portions of the union string. The +/// `from_dels` subset must be the interleaving of `tombstones` into the +/// union string. +pub fn synthesize(tombstones: &Node<N>, from_dels: &Subset, to_dels: &Subset) -> Delta<N> { + // ... +} +``` + +### Engine::delta_rev_head + +This operation is similar to `Engine::get_head` except it returns a `Delta` from the text at a specified revision to the current head text. This is useful for things like updating the position of cursors and rich text spans when edits are made. + +Like `Engine::get_head` it starts by calling `Engine::deletes_from_cur_union_for_index` to get a `Subset` describing the state of the text at the old revision relative to the current union string. Now we can just use `Delta::synthesize` to create a `Delta` from the old to the new `deletes_from_union`. The problem is, `Delta::synthesize` expects the tombstones `Rope` you give it to correspond to `from_dels`, but we have one for `to_dels`. To fix this, we can use a helper called `shuffle_tombstones` to move characters in and out of the tombstones to get an `old_tombstones` corresponding to `from_dels`. + +#### shuffle_tombstones + +Constructing a `tombstones` to go with an older `deletes_from_union` given the current `text`, `tombstones` and `deletes_from_union` may involve moving characters from `text` to the old `tombstones`, and removing characters from the `tombstones` that weren't deleted at the time. We can describe the necessary changes using a `Delta`, but how do we create it? + +We can note that since the 0-segments of `deletes_from_union` correspond to characters in `text` and the non-zero segments correspond to characters in `tombstones`, if we take the complement (0 becomes 1, non-zero becomes 0) of `deletes_from_union` we can use helpers designed for use with tombstones on `text` and vice-versa. So we can use `Delta::synthesize` with the `text` (where you would normally put the tombstones) and the complement of the old and new `deletes_from_union` to create the required `Delta` of the `tombstones` when it normally creates deltas of `text`. + +```rust +/// Move sections from text to tombstones and out of tombstones based on a new and old set of deletions +fn shuffle_tombstones(text: &Rope, tombstones: &Rope, + old_deletes_from_union: &Subset, new_deletes_from_union: &Subset) -> Rope { + // Taking the complement of deletes_from_union leads to an interleaving valid for swapped text and tombstones, + // allowing us to use the same method to insert the text into the tombstones. + let inverse_tombstones_map = old_deletes_from_union.complement(); + let move_delta = Delta::synthesize(text, &inverse_tombstones_map, &new_deletes_from_union.complement()); + move_delta.apply(tombstones) +} +``` + +### Engine::edit_rev + +This is the mini-CRDT function, it enables concurrent edits, but each peer can only have one in flight at a time and all edits must go through a central server. The form this takes is that you can submit `Delta`s to the `Engine` that are based on a revision that is not the current head. For example a plugin can get the text at a revision, make an edit and submit it along with the `RevToken` it is based on, but by that time there might have been new edits. That's not a problem since `edit_rev` can accept an arbitrary past `base_rev`. + +This operation has a number of stages: + +1. Use the `Delta::factor` helper to split the given `delta` into `ins_delta` and `deletes`. This helper returns an `InsertDelta` containing only the inserts and a `Subset` based on the text (before the inserts) containing the deleted characters. When you see "delta" from now on, it refers to both pieces. +1. Use `Engine::deletes_from_union_for_index` to work backwards from the present to find the `deletes_from_union` at the time of the base revision: `deletes_at_rev`. +1. Transform the delta to be based on the union string at the time of `base_rev` rather than the `text` at the time of `base_rev`. This makes later transformations easier. + - The `deletes` are transformed using `Subset::transform_expand` to expand the indices to include the characters that weren't in the text the `deletes` was based on. + - `ins_delta` is transformed using the similar `InsertDelta::transform_expand` helper. The thing is, with inserts it is ambigous if deleted characters between the same two characters in `text` should be placed before or after characters inserted in the same place. + + This comes into play with arbitrary undo, where if we have "abc", we delete "b", and then insert to get "azc", then undo the deletion of "b", should we get "abzc" or "azbc"? We decided to put the inserts after the deletes, so we would get "abzc", but it's not important. +1. Transform the delta to be based on the current head revision's union string instead of `base_rev`'s union string. + - This is done by looping over every `Edit` `Revision` since `base_rev` and `transform_expand`-ing both the `ins_delta` and `deletes` by the inserted characters. + - But again we have the problem of whether we put the `ins_delta` inserts before or after inserts in the same place since then. For this we use the `priority` field of `Revision`. The `priority` of the incoming edit we're transforming is compared with the `priority` of the inserts we're transforming it by, and they're ordered in ascending order of priority. + - Each concurrent plugin has a different `priority` and they are useful for expressing what we expect concurrent edits to do. For example inserted auto-indentation should come before new user edits, but matched brackets should come after concurrent user edits, we can set the `priority` of the plugins to get this behavior. In the case of concurrent edits by the same plugin on different synced devices we break ties by session ID. +1. `Subset::transform_expand` the `deletes` to apply to the head union string after `ins_delta` is applied instead of before. This matches the meaning of `inserts` and `deletes` in `Revision`, whereas `Delta::factor` gives them to us based on the same string. We `transform_expand` a `Subset` by an `InsertDelta` by first using the `InsertDelta::inserted_subset` helper to get a `Subset` of the post-insert string designating which characters were inserted. +1. Transform the `ins_delta` to be based on the head `text` instead of the union string. Now that we've done all the transformation, we can commit it, and since inserts can only affect the `text` we can use `Subset::transform_shrink` and know that only `Copy` regions of the `InsertDelta` will be collapsed so that the indices of inserted segments can be applied to `text`. +1. Apply the `ins_delta` to `text` using `Delta::apply` and also `transform_expand` `deletes_from_union` to include the newly inserted characters. +1. Now that we've applied the inserts, we just need to apply the deletions. But wait! What if the undo group of this edit was undone between `base_rev` and now? The edit might already be undone, in which case the `deletes` shouldn't apply and the inserted characters should be deleted. + 1. We solve this by checking if our undo group is currently undone and if it is we set `to_delete` to the inserted characters, and otherwise set it to `deletes`. + 1. Then we compute a new `deletes_from_union` by using `Subset::union` to delete the characters in `to_delete`. +1. We use a helper called `shuffle` which is like (and uses) `shuffle_tombstones` but it updates both the `text` and `tombstones` from corresponding to an old `deletes_from_union` to a new one. It "shuffles" characters between `text` and `tombstones` as necessary so that their new state corresponds to the new `deletes_from_union`. + +And that's it, after that we just package up the inserted and deleted characters into a `Revision` and add it to the list of `revs` in `Engine`. + +```rust +/// Returns a tuple of a new `Revision` representing the edit based on the +/// current head, a new text `Rope`, a new tombstones `Rope` and a new `deletes_from_union`. +fn mk_new_rev(&self, new_priority: usize, undo_group: usize, + base_rev: RevToken, delta: Delta<RopeInfo>) -> (Revision, Rope, Rope, Subset) { + let ix = self.find_rev_token(base_rev).expect("base revision not found"); + // 1. split + let (ins_delta, deletes) = delta.factor(); + + // 2. Work backwards to find the old deletes_from_union + let deletes_at_rev = self.deletes_from_union_for_index(ix); + // 3. rebase delta to be on the base_rev union instead of the text + let mut union_ins_delta = ins_delta.transform_expand(&deletes_at_rev, true); + let mut new_deletes = deletes.transform_expand(&deletes_at_rev); + + // 4. rebase the delta to be on the head union instead of the base_rev union + let new_full_priority = FullPriority { priority: new_priority, session_id: self.session }; + for r in &self.revs[ix + 1..] { + if let Edit { priority, ref inserts, .. } = r.edit { + if !inserts.is_empty() { + let full_priority = FullPriority { priority, session_id: r.rev_id.session_id() }; + let after = new_full_priority >= full_priority; // should never be == + union_ins_delta = union_ins_delta.transform_expand(inserts, after); + new_deletes = new_deletes.transform_expand(inserts); + } + } + } + + // 5. rebase the deletion to be after the inserts instead of directly on the head union + let new_inserts = union_ins_delta.inserted_subset(); + if !new_inserts.is_empty() { + new_deletes = new_deletes.transform_expand(&new_inserts); + } + + // 6. rebase insertions on text + let cur_deletes_from_union = &self.deletes_from_union; + let text_ins_delta = union_ins_delta.transform_shrink(cur_deletes_from_union); + // 7. apply inserts and rebase deletes_from_union + let text_with_inserts = text_ins_delta.apply(&self.text); + let rebased_deletes_from_union = cur_deletes_from_union.transform_expand(&new_inserts); + + // 8. is the new edit in an undo group that was already undone due to concurrency? + let undone = self.undone_groups.contains(&undo_group); + let new_deletes_from_union = { + let to_delete = if undone { &new_inserts } else { &new_deletes }; + rebased_deletes_from_union.union(to_delete) + }; + + // 9. move deleted or undone-inserted things from text to tombstones + let (new_text, new_tombstones) = shuffle(&text_with_inserts, &self.tombstones, + &rebased_deletes_from_union, &new_deletes_from_union); + + let head_rev = &self.revs.last().unwrap(); + (Revision { + rev_id: self.next_rev_id(), + max_undo_so_far: std::cmp::max(undo_group, head_rev.max_undo_so_far), + edit: Edit { + priority: new_priority, + undo_group: undo_group, + inserts: new_inserts, + deletes: new_deletes, + } + }, new_text, new_tombstones, new_deletes_from_union) +} + +// TODO: have `base_rev` be an index so that it can be used maximally efficiently with the +// head revision, a token or a revision ID. Efficiency loss of token is negligible but unfortunate. +pub fn edit_rev(&mut self, priority: usize, undo_group: usize, + base_rev: RevToken, delta: Delta<RopeInfo>) { + let (new_rev, new_text, new_tombstones, new_deletes_from_union) = + self.mk_new_rev(priority, undo_group, base_rev, delta); + self.rev_id_counter += 1; + self.revs.push(new_rev); + self.text = new_text; + self.tombstones = new_tombstones; + self.deletes_from_union = new_deletes_from_union; +} +``` + +#### InsertDelta::transform_expand + +This is another big function with lots of nested loops. Unlike `Subset::transform_expand` it takes a boolean parameter `after` that resolves the ambiguity of whether inserts should go before or after the characters being transformed over. + +```rust +/// Do a coordinate transformation on an insert-only delta. The `after` parameter +/// controls whether the insertions in `self` come after those specific in the +/// coordinate transform. +pub fn transform_expand(&self, xform: &Subset, after: bool) -> InsertDelta<N> { + // ... +} +``` + +#### shuffle + +This helper is used in many different operations that use the pattern of computing how `deletes_from_union` should change and then updating `text` and `tombstones` to reflect that new state. + +```rust +/// Move sections from text to tombstones and vice versa based on a new and old set of deletions. +/// Returns a tuple of a new text `Rope` and a new `Tombstones` rope described by `new_deletes_from_union`. +fn shuffle(text: &Rope, tombstones: &Rope, + old_deletes_from_union: &Subset, new_deletes_from_union: &Subset) -> (Rope,Rope) { + // Delta that deletes the right bits from the text + let del_delta = Delta::synthesize(tombstones, old_deletes_from_union, new_deletes_from_union); + let new_text = del_delta.apply(text); + (new_text, shuffle_tombstones(text,tombstones,old_deletes_from_union,new_deletes_from_union)) +} +``` + +### Engine::undo + +Undo works conceptually by rewinding to the earliest point in history that a toggled undo group appears, and replaying history from there but with revisions in the new `undone_groups` not applied. + +1. First, it uses the `max_undo_so_far` field on every `Revision` as well as the set of changed undo groups to find the latest point before any of the changed groups were used. +1. Next it uses `Engine::deletes_from_union_before_index` to find the `deletes_from_union` before that earliest revision. The earliest revision might have been the very first one so that's why we need to get it from *before* the revision and not *at* the previous revision. +1. Then it loops over history after that point manipulating `deletes_from_union` to either `transform_expand` by the `inserts` and `union` the `deletes` in the normal case, or `transform_union` (transform then delete) over the `inserts` in the undone case. +1. Now that it has a fixed `deletes_from_union` it uses `shuffle` to update `text` and `tombstones`. + +```rust +// This computes undo all the way from the beginning. An optimization would be to not +// recompute the prefix up to where the history diverges, but it's not clear that's +// even worth the code complexity. +fn compute_undo(&self, groups: &BTreeSet<usize>) -> (Revision, Subset) { + let toggled_groups = self.undone_groups.symmetric_difference(&groups).cloned().collect(); + let first_candidate = self.find_first_undo_candidate_index(&toggled_groups); + // the `false` below: don't invert undos since our first_candidate is based on the current undo set, not past + let mut deletes_from_union = self.deletes_from_union_before_index(first_candidate, false).into_owned(); + + for rev in &self.revs[first_candidate..] { + if let Edit { ref undo_group, ref inserts, ref deletes, .. } = rev.edit { + if groups.contains(undo_group) { + if !inserts.is_empty() { + deletes_from_union = deletes_from_union.transform_union(inserts); + } + } else { + if !inserts.is_empty() { + deletes_from_union = deletes_from_union.transform_expand(inserts); + } + if !deletes.is_empty() { + deletes_from_union = deletes_from_union.union(deletes); + } + } + } + } + + let deletes_bitxor = self.deletes_from_union.bitxor(&deletes_from_union); + let max_undo_so_far = self.revs.last().unwrap().max_undo_so_far; + (Revision { + rev_id: self.next_rev_id(), + max_undo_so_far, + edit: Undo { toggled_groups, deletes_bitxor } + }, deletes_from_union) +} + +pub fn undo(&mut self, groups: BTreeSet<usize>) { + let (new_rev, new_deletes_from_union) = self.compute_undo(&groups); + + let (new_text, new_tombstones) = + shuffle(&self.text, &self.tombstones, &self.deletes_from_union, &new_deletes_from_union); + + self.text = new_text; + self.tombstones = new_tombstones; + self.deletes_from_union = new_deletes_from_union; + self.undone_groups = groups; + self.revs.push(new_rev); + self.rev_id_counter += 1; +} +``` + +### Engine::gc + +This is a large function that is only used in the single-device case to limit the size of history and the size of `deletes_from_union` so that operations like insertion and undo are always fast even on large documents with long histories. It throws away information, so it is incorrect in the multi-device case, and so we have plans for optimizing all our representations and algorithms so that it is unnecessary and we can remove it. It's not particularly interesting, if you want to see how it works you can read the code. + +### Engine::merge + +This is the operation you were (maybe) waiting for! The CRDT merge operation that allows peer-to-peer syncing of edits in a conflict-free eventually-consistent way. It takes `self` and another instance of `Engine` and incorporates any changes which that `Engine` has into `self`. + +It does this by finding changes which the other `Engine` has but `self` doesn't and doing a whole bunch of transformations so that those edits can be appended directly on to the end of `self`'s list of `revs`. The append-only nature of merge preserves the ability for operations like `Engine::delta_rev_head` to work, and allows future optimizations of how things are persisted. + +The fact that, even in a merge, `Revision`s are only ever appended leads to the interesting fact that two peers (Separate devices/engines that share state my merging) can have `Engine`s that represent the same document contents and history, but where the `Revision`s are in a totally different order. This is fine though because the `Revision` ids allow us to compare the identity of two `Revision`s even if their `Subset`s are different due to transforms, and undo groups allow us to maintain and manipulate undo history order separately from CRDT history order. + +In practice the order of the `Revision` history will tend to be very similar between peers. Any edit that occurs while another edit is visible on screen (present in this peer's `Engine`) will never be re-ordered before that visible edit. Thus if there are no concurrent edits made on devices that sync with each other by merging, the devices will end up with the same `Revision` history. + +**Note:** As of the time this was written, Xi's `merge` implementation does not support undo operations, and will panic if one is encountered. We plan to fix this and expect that the structure of the merge operation will stay the same, just with more cases. So for the rest of this description, presume `Edit`s are the only type of `Revision`. + +#### Base and common revisions + +An important part of merging is figuring out which revisions the two sides have in common. These common revisions are found as two parts: + +1. The "base": A prefix of the same length of both histories such that the set of revisions in both prefixes is the same. + - Note that they aren't necessarily in the same order, just all shared. That's because all indices are relative to the union string, which is the same regardless of the order of the revisions that created it. + - We ignore everything in this prefix, so the longer it is the faster the merge runs, but a length of 0 is perfectly fine and in fact at the time this was written, that's what Xi uses. + - Ideally this should be the longest prefix length such that the set of revisions in the prefix is equal in both histories, and we plan on using this later as an important optimization. +1. The "common" revisions: After the base, some revisions on each side will be shared by both sides. The common revisions are the intersection of the two revision sets after the base. + - Note that the common revisions aren't necessarily in the same positions or order on each side. + +![CRDT Merge Flow Example](img/merge-intro.png) + +If you're wondering how you can end up with common revisions not in the base, and in different positions and ordering, it's rare, but it can happen under high levels of asynchrony. These cases can occur even with only two peers. + +See the example sequence below, where the boxes represent revisions, and the arrows represent merges. The red arrow with its two sides illustrated below it, shows such a tricky merge. + +This example isn't meant to show a networking scenario, just a legal sequence of applying operations on two CRDT instances. These scenarios can be caused by asynchrony of the network, but exactly how depends on the syncing topology and ordering guarantees, some ways of using `merge` may require 3 peers to trigger a case like this in real use. + +![CRDT merge common in different order](img/merge-common-diff-3.png) + +The first two steps of the `merge` operation are to find the base index and common revision set. +As of writing these are both the easiest possible correct representations, and not the fastest ones, but we plan on optimizing soon. + +```rust +/// Find an index before which everything is the same +fn find_base_index(a: &[Revision], b: &[Revision]) -> usize { + assert!(a.len() > 0 && b.len() > 0); + assert!(a[0].rev_id == b[0].rev_id); + // TODO find the maximum base revision. + // returning 1 should have the same behavior, but worse performance + return 1; +} + +/// Find a set of revisions common to both lists +fn find_common(a: &[Revision], b: &[Revision]) -> BTreeSet<RevId> { + // TODO make this faster somehow? + let a_ids: BTreeSet<RevId> = a.iter().map(|r| r.rev_id).collect(); + let b_ids: BTreeSet<RevId> = b.iter().map(|r| r.rev_id).collect(); + a_ids.intersection(&b_ids).cloned().collect() +} +``` + +#### Rearranging + +To make the rest of the algorithm easier, it would be nice if we didn't have to worry about any of the common revisions and could just work with the new revisions on each side. We can realize this by transforming and reordering all the new revisions on each side after all of the common revisions. + +We can safely use transforms to reorder two revisions if neither of the revisions depends on the other. A revision depends on all the revisions that were in the `Engine` at the time `Engine::edit_rev` was called. We know that a new revision can't depend on a common revision after it, because the append-only nature means that ordering couldn't occur. Furthermore, the common revision can't depend on the new revision, because by definitions the other peer has the common revision but not the new revision, and merges never merge a revision but not its dependencies. Thus, even without explicit dependency information, we know we can reorder all the new revisions on each side after all the common revisions. + +Note that though it's nice to think about it as reordering the histories, really we just need to compute the transformed new revisions, transforming each new revision to be based on all common revisions after it. See the "computed" and "taken to next step" annotations of the diagram below, they are what `rearrange` returns, note that transformed operations are marked with a prime tick but they maintain their ID. + +![CRDT merge rearrange](img/merge-rearrange.png) + +We do the rearranging by working from the end of the list of revisions to the beginning. We build up a `Subset` representing all the characters that were added to the union string by the common revisions after each point. Starting with the identity transformation (an entirely 0-count `Subset`), whenever we encounter a common revision we add the characters it inserts to the transform. When we encounter a new revision we `transform_expand` its inserts and deletes by the transform `Subset` and add it to the output `Vec`. Then we `transform_shrink` the transform `Subset` by the characters inserted in the new revision, because we only want to fast-forward new revisions over common revisions after them, not new revisions after them. + +That was likely too imprecise and hard to follow, so here's an example diagram and the code: + +![CRDT merge rearrange example](img/merge-rearrange-example.png) + +```rust +/// Returns the operations in `revs` that don't have their `rev_id` in +/// `base_revs`, but modified so that they are in the same order but based on +/// the `base_revs`. This allows the rest of the merge to operate on only +/// revisions not shared by both sides. +/// +/// Conceptually, see the diagram below, with `.` being base revs and `n` being +/// non-base revs, `N` being transformed non-base revs, and rearranges it: +/// .n..n...nn.. -> ........NNNN -> returns vec![N,N,N,N] +fn rearrange(revs: &[Revision], base_revs: &BTreeSet<RevId>, head_len: usize) -> Vec<Revision> { + // transform representing the characters added by common revisions after a point. + let mut s = Subset::new(head_len); + + let mut out = Vec::with_capacity(revs.len() - base_revs.len()); + for rev in revs.iter().rev() { + let is_base = base_revs.contains(&rev.rev_id); + let contents = match rev.edit { + Contents::Edit {priority, undo_group, ref inserts, ref deletes} => { + if is_base { + s = inserts.transform_union(&s); + None + } else { + // fast-forward this revision over all common ones after it + let transformed_inserts = inserts.transform_expand(&s); + let transformed_deletes = deletes.transform_expand(&s); + // we don't want new revisions before this to be transformed after us + s = s.transform_shrink(&transformed_inserts); + Some(Contents::Edit { + inserts: transformed_inserts, + deletes: transformed_deletes, + priority, undo_group, + }) + } + }, + Contents::Undo { .. } => panic!("can't merge undo yet"), + }; + if let Some(edit) = contents { + out.push(Revision { edit, rev_id: rev.rev_id, max_undo_so_far: rev.max_undo_so_far }); + } + } + + out.as_mut_slice().reverse(); + out +} + +``` + +#### Computing Deltas + +Merging the changes from `other` into `self` doesn't just involve appending the `Revision`s, we also have to update the `text` and `tombstones` of `self` to correspond with those new revisions. In `Engine::edit_rev` we transform an `InsertDelta` until we can apply it to the text, but when merging we don't have any `Delta`s. Additionally, the operation for resolving the order of concurrent insertions based on priority is `Delta::transform_expand` and we don't have an equivalent for `Subset` (`Subset::transform_expand` does a slightly different thing). + +There's two possible approaches: + +1. Transform the new revisions from `other` and append them, using a newly written equivalent of `Delta::transform_expand` for `Subset`s. Then work through the resulting histories to figure out what characters we need to add to the `text` and `tombstones`, and where. We think it may be easier to support undo and incremental Ledger updating with this approach, and we plan on switching eventually, but for now it's not what we chose first. +2. Create some `Delta`s! We can turn the new revisions from `other` into a different representation that encodes the `inserts` as an `InsertDelta` so that we can transform them using `Delta::transform_expand` and eventually apply them to the `text` of `self`. + +We can create these `DeltaOp`s by working backwards from the end of the `rearrange`d new revisions from `other` and keeping track of all the characters they insert in a `Subset` using `Subset::transform_union`. Then for each revision we can use `shuffle_tombstones` to extract a `Rope` of all the inserted characters, and then use `Delta::synthesize` to create a `Delta` from our `Subset` of inserts to the inserts `Subset` from the previous iteration (one step forward in time since we're iterating backwards). This gives us a `Delta` inserting the new characters from this `Revision`, which we can bundle into a `DeltaOp`. + +```rust +struct DeltaOp { + rev_id: RevId, + priority: usize, + undo_group: usize, + inserts: InsertDelta<RopeInfo>, + deletes: Subset, +} + +/// Transform `revs`, which doesn't include information on the actual content of the operations, +/// into an `InsertDelta`-based representation that does by working backward from the text and tombstones. +fn compute_deltas(revs: &[Revision], text: &Rope, tombstones: &Rope, deletes_from_union: &Subset) -> Vec<DeltaOp> { + let mut out = Vec::with_capacity(revs.len()); + + let mut cur_all_inserts = Subset::new(deletes_from_union.len()); + for rev in revs.iter().rev() { + match rev.edit { + Contents::Edit {priority, undo_group, ref inserts, ref deletes} => { + let older_all_inserts = inserts.transform_union(&cur_all_inserts); + + // TODO could probably be more efficient by avoiding shuffling from head every time + let tombstones_here = shuffle_tombstones(text, tombstones, deletes_from_union, &older_all_inserts); + let delta = Delta::synthesize(&tombstones_here, &older_all_inserts, &cur_all_inserts); + // TODO create InsertDelta directly and more efficiently instead of factoring + let (ins, _) = delta.factor(); + out.push(DeltaOp { + rev_id: rev.rev_id, + priority, undo_group, + inserts: ins, + deletes: deletes.clone(), + }); + + cur_all_inserts = older_all_inserts; + }, + Contents::Undo { .. } => panic!("can't merge undo yet"), + } + } + + out.as_mut_slice().reverse(); + out +} +``` + +#### Computing Transforms + +Now we have a list of `DeltaOp`s from `other` and a list of new `Revision`s from `self`. Keeping in mind the goal of appending the changes from other, we need to transform the `DeltaOp`s to be based on top of the new `Revision`s from `self`. This really just involves figuring out the correct indices in the union string that includes the newly inserted characters from `self`. + +In order to do this we need the new `inserts` from `self`, but in order to resolve the order of concurrent inserts, we also need the "priority" of the edits. So we have a helper called `compute_transforms` that returns a list of `(priority, inserts)` tuples. + +This helper does one other important thing, which is combine sequential edits by the same peer with the same priority into one transform. This is important because the next stage does a lot of work per-transform. Without this optimization a paragraph of typed inserted characters would be hundreds of transforms, but with the optimization it is one transform. + +```rust +/// Computes a series of priorities and transforms for the deltas on the right +/// from the new revisions on the left. +/// +/// Applies an optimization where it combines sequential revisions with the +/// same priority into one transform to decrease the number of transforms that +/// have to be considered in `rebase` substantially for normal editing +/// patterns. Any large runs of typing in the same place by the same user (e.g +/// typing a paragraph) will be combined into a single segment in a transform +/// as opposed to thousands of revisions. +fn compute_transforms(revs: Vec<Revision>) -> Vec<(FullPriority, Subset)> { + let mut out = Vec::new(); + let mut last_priority: Option<usize> = None; + for r in revs.into_iter() { + if let Contents::Edit {priority, inserts, .. } = r.edit { + if inserts.is_empty() { + continue; + } + if Some(priority) == last_priority { + let last: &mut (FullPriority, Subset) = out.last_mut().unwrap(); + last.1 = last.1.transform_union(&inserts); + } else { + last_priority = Some(priority); + let prio = FullPriority { priority, session_id: r.rev_id.session_id() }; + out.push((prio, inserts)); + } + } + } + out +} +``` + +#### Rebasing + +Now that we have the `DeltaOp`s and transforms, we just need to forward the `DeltaOp`s through the transforms. The helper for this is named `rebase` since it's analogous to a `git rebase`. + +Basically, for every `DeltaOp` from `other`, we: + +1. `Delta::transform_expand` it by each transform from `self`. +1. Update the transforms for the next round so they include the `DeltaOp`s inserts, and so effectively they become part of the base for both sides. +1. Apply the `DeltaOp` to the `text` and `tombstones` +1. Create a `Revision` from it and append it to the history. + +This procedure works iteratively starting with the results of `compute_transforms` and `compute_deltas`. Every iteration it takes the first `DeltaOp`, transforms it and applies it to the text, and updates all the transforms so that it is effectively in the base of both sides. See the diagrams below of an initial state, the operations performed in the first iteration, and the state after the first iteration. You can refer to the code further below to see how they align. + +![CRDT merge rebase initial state](img/merge-rebase-initial.png) +![CRDT merge rebase trace](img/merge-rebase-trace.png) +![CRDT merge rebase state after](img/merge-rebase-after.png) + +```rust +/// Rebase `b_new` on top of `expand_by` and return revision contents that can be appended as new +/// revisions on top of the revisions represented by `expand_by`. +fn rebase(mut expand_by: Vec<(FullPriority, Subset)>, b_new: Vec<DeltaOp>, mut text: Rope, mut tombstones: Rope, + mut deletes_from_union: Subset, mut max_undo_so_far: usize) -> (Vec<Revision>, Rope, Rope, Subset) { + let mut out = Vec::with_capacity(b_new.len()); + + let mut next_expand_by = Vec::with_capacity(expand_by.len()); + for op in b_new.into_iter() { + let DeltaOp { rev_id, priority, undo_group, mut inserts, mut deletes } = op; + let full_priority = FullPriority { priority, session_id: rev_id.session_id() }; + // (1) (2) (3) expand by each in expand_by + for &(trans_priority, ref trans_inserts) in &expand_by { + let after = full_priority >= trans_priority; // should never be == + // d-expand by other + inserts = inserts.transform_expand(trans_inserts, after); + // trans-expand other by expanded so they have the same context + let inserted = inserts.inserted_subset(); + let new_trans_inserts = trans_inserts.transform_expand(&inserted); + // The deletes are already after our inserts, but we need to include the other inserts + deletes = deletes.transform_expand(&new_trans_inserts); + // (6) On the next step we want things in expand_by to have op in the context + next_expand_by.push((trans_priority, new_trans_inserts)); + } + + // (4) Update the text and tombstones + let text_inserts = inserts.transform_shrink(&deletes_from_union); + let text_with_inserts = text_inserts.apply(&text); + let inserted = inserts.inserted_subset(); + + let expanded_deletes_from_union = deletes_from_union.transform_expand(&inserted); + let new_deletes_from_union = expanded_deletes_from_union.union(&deletes); + let (new_text, new_tombstones) = + shuffle(&text_with_inserts, &tombstones, &expanded_deletes_from_union, &new_deletes_from_union); + + text = new_text; + tombstones = new_tombstones; + deletes_from_union = new_deletes_from_union; + + // (5) Build a revision and append it to the history + max_undo_so_far = std::cmp::max(max_undo_so_far, undo_group); + out.push(Revision { + rev_id, max_undo_so_far, + edit: Contents::Edit { + priority, undo_group, deletes, + inserts: inserted, + } + }); + + expand_by = next_expand_by; + next_expand_by = Vec::with_capacity(expand_by.len()); + } + + (out, text, tombstones, deletes_from_union) +} +``` + +#### That's it! + +After all those stages are complete, the merge is done. The `rebase` has appended the transformed versions of all the new `Revision`s from `other` and updated the `text`, `tombstones` and `deletes_from_union`. The actual `Engine::merge` function just ties all these helpers together: + +```rust +/// Merge the new content from another Engine into this one with a CRDT merge +pub fn merge(&mut self, other: &Engine) { + let (mut new_revs, text, tombstones, deletes_from_union) = { + let base_index = find_base_index(&self.revs, &other.revs); + let a_to_merge = &self.revs[base_index..]; + let b_to_merge = &other.revs[base_index..]; + + let common = find_common(a_to_merge, b_to_merge); + + let a_new = rearrange(a_to_merge, &common, self.deletes_from_union.len()); + let b_new = rearrange(b_to_merge, &common, other.deletes_from_union.len()); + + let b_deltas = compute_deltas(&b_new, &other.text, &other.tombstones, &other.deletes_from_union); + let expand_by = compute_transforms(a_new); + + let max_undo = self.max_undo_group_id(); + rebase(expand_by, b_deltas, self.text.clone(), self.tombstones.clone(), self.deletes_from_union.clone(), max_undo) + }; + + self.text = text; + self.tombstones = tombstones; + self.deletes_from_union = deletes_from_union; + self.revs.append(&mut new_revs); +} +``` + +#### Testing + +Every operation is tested in the `tests` module of `engine.rs`. The `Engine::merge` function is tested using a facility for creating and running "merge scripts" that describe a sequence of operations on multiple engines, merges between them, and assertions about their contents. This makes building complex merge scenarios to test much easier. diff --git a/vendor/pulldown-cmark/tools/mk_entities.py b/vendor/pulldown-cmark/tools/mk_entities.py new file mode 100644 index 0000000000..e2afb36781 --- /dev/null +++ b/vendor/pulldown-cmark/tools/mk_entities.py @@ -0,0 +1,71 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +# Note: this script no longer works on python 2! + +# get https://html.spec.whatwg.org/multipage/entities.json +# Usage: python tools/mk_entities.py entities.json > src/entities.rs + +import json +import sys + +def main(args): + with open(args[1]) as json_file: + jsondata = json.load(json_file) + entities = [entity[1:-1] for entity in jsondata.keys() if entity.endswith(';')] + entities.sort() + print(f"""// Copyright 2015 Google Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +//! Expansions of HTML5 entities + +// Autogenerated by mk_entities.py + +const ENTITIES: [(&[u8], &str); {len(entities)}] = [""") + + for e in entities: + codepoints = jsondata['&' + e + ';']["codepoints"]; + s = ''.join([r'\u{%04X}' % cp for cp in codepoints]) + print(f" (b\"{e}\", \"{s}\"),") + print(""" ]; + +pub(crate) fn get_entity(bytes: &[u8]) -> Option<&'static str> { + ENTITIES.binary_search_by_key(&bytes, |&(key, _value)| key).ok().map(|i| ENTITIES[i].1) +} +""") + +main(sys.argv) \ No newline at end of file diff --git a/vendor/pulldown-cmark/tools/mk_puncttable.py b/vendor/pulldown-cmark/tools/mk_puncttable.py new file mode 100644 index 0000000000..16e53b124e --- /dev/null +++ b/vendor/pulldown-cmark/tools/mk_puncttable.py @@ -0,0 +1,130 @@ +# Copyright 2015 Google Inc. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +# get ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt +# Usage: python tools/mk_puncttable.py UnicodeData.txt > src/puncttable.rs + +import sys + +def get_bits(high, punct): + b = 0 + for i in range(16): + if high * 16 + i in punct: + b |= 1 << i + return b + +def main(args): + ascii_punct = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" + ascii_set = set((ord(c) for c in ascii_punct)) + + punct = set() + for line in file(args[1]): + spl = line.split(';') + if spl[2] in ('Pc', 'Pd', 'Pe', 'Pf', 'Pi', 'Po', 'Ps'): + punct.add(int(spl[0], 16)) + pshift = list(set((cp // 16 for cp in punct if cp >= 128))) + pshift.sort() + bits = [get_bits(high, punct) for high in pshift] + print """// Copyright 2015 Google Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +//! CommonMark punctuation set based on spec and Unicode properties. + +// Autogenerated by mk_puncttable.py + +const PUNCT_MASKS_ASCII: [u16; 8] = [""" + for x in range(8): + y = get_bits(x, ascii_set) + print ' 0x%04x, // U+%04X...U+%04X' % (y, x * 16, x * 16 + 15) + print """ ]; + +const PUNCT_TAB: [u16; %i] = [""" % len(pshift) + for x in pshift: + print ' %d, // U+%04X...U+%04X' % (x, x * 16, x * 16 + 15) + print """ ]; + +const PUNCT_MASKS: [u16; %i] = [""" % len(pshift) + for i, y in enumerate(bits): + x = pshift[i] + print ' 0x%04x, // U+%04X...U+%04X' % (y, x * 16, x * 16 + 15) + print """ ]; + +pub fn is_ascii_punctuation(c: u8) -> bool { + c < 128 && (PUNCT_MASKS_ASCII[(c / 16) as usize] & (1 << (c & 15))) != 0 +} + +pub fn is_punctuation(c: char) -> bool { + let cp = c as u32; + if cp < 128 {return is_ascii_punctuation(cp as u8); } + if cp > 0x%04X { return false; } + let high = (cp / 16) as u16; + match PUNCT_TAB.binary_search(&high) { + Ok(index) => (PUNCT_MASKS[index] & (1 << (cp & 15))) != 0, + _ => false + } +} + +#[cfg(test)] +mod tests { + use super::{is_ascii_punctuation, is_punctuation}; + + #[test] + fn test_ascii() { + assert!(is_ascii_punctuation(b'!')); + assert!(is_ascii_punctuation(b'@')); + assert!(is_ascii_punctuation(b'~')); + assert!(!is_ascii_punctuation(b' ')); + assert!(!is_ascii_punctuation(b'0')); + assert!(!is_ascii_punctuation(b'A')); + assert!(!is_ascii_punctuation(0xA1)); + } + + #[test] + fn test_unicode() { + assert!(is_punctuation('~')); + assert!(!is_punctuation(' ')); + + assert!(is_punctuation('\u{00A1}')); + assert!(is_punctuation('\u{060C}')); + assert!(is_punctuation('\u{FF65}')); + assert!(is_punctuation('\u{1BC9F}')); + assert!(!is_punctuation('\u{1BCA0}')); + } +} +""" % max(punct) + +main(sys.argv) diff --git a/vendor/regex-syntax/.cargo-checksum.json b/vendor/regex-syntax/.cargo-checksum.json index 25af66da11..8b80ae753b 100644 --- a/vendor/regex-syntax/.cargo-checksum.json +++ b/vendor/regex-syntax/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"5b9cded231b10942f7620a800f50e7e420f04e9f8c16a3e96d84ba894d48ff32","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","benches/bench.rs":"4d09c75f457459f850877ee334a924f331c701a22fa19b1f7942c3504c8981f4","src/ast/mod.rs":"31825eaa0fdc0ae9939cf118f07c9a3ce7c0485065e0646df353a2d310ae5cd8","src/ast/parse.rs":"d1b5a837df7f7b09e5f6b70350407eeef56dfa5e6d27519fd903c07d16968fd1","src/ast/print.rs":"c7281fdec95b796c4e32393d3f750ab58cb5bea1dd77e87d4284c0ea0a304f1e","src/ast/visitor.rs":"493be4ba270f8cfeffe096b981947a12a5992542c1df1ed470e015f1c41ed081","src/either.rs":"1758e3edd056884eccadd995708d1e374ba9aa65846bd0e13b1aae852607c560","src/error.rs":"ae638c6e6adcc7843dec98eb52b2dda2e5085a7c029a8d7f005ef40d35557617","src/hir/interval.rs":"31e9cd022486dd562d5cacb5d2b15eaca4c4ae93fb11befeebdbf5cbab49cc8f","src/hir/literal/mod.rs":"4fd26946232d056342a5052b4c84a28b6c0b956f57b4a4ff8fe64eb1b710aae5","src/hir/mod.rs":"07bdd0dc1c7c60194ab8a3242cb2fe58d5b51ba36d303d495dcd394726ea469e","src/hir/print.rs":"a7efad3703d1718de65c6657eff6be72a4e96bc3db8a56d08d2a96c0abdb99b8","src/hir/translate.rs":"ba2647fc8407ec88fc1705078b0783d2d7cbff44e54586f68dc54f90f0c548a9","src/hir/visitor.rs":"8e15e646c8c219fd1f4620fc3611dfbd0d63d598bc5c8bcbfb0106053134613c","src/lib.rs":"d1cbe98975034f18276e149bc42ce44d77623a62d53385b7d3a3fa1e2df9f383","src/parser.rs":"70e0386d373af3bc4e491c0371be06069a773cfb0476e44224702c3da643ce24","src/unicode.rs":"d25f23ebc2b52a5ae8074dced1507959b2377586cbaa3193cfaaae7e8252ea64","src/unicode_tables/LICENSE-UNICODE":"74db5baf44a41b1000312c673544b3374e4198af5605c7f9080a402cec42cfa3","src/unicode_tables/age.rs":"ad5413c1e4811d85ad845ccb21f12e6bbf33f7d048d0f91863b18da143eb49e8","src/unicode_tables/case_folding_simple.rs":"270a52df6dcb639cafaa9de563ff4dc88522fa9bfe7174f0b8c140d4208c71c7","src/unicode_tables/general_category.rs":"d0e8e05acf7563e426835502b2b510595a01a2739374ae54db29eefee642ed51","src/unicode_tables/grapheme_cluster_break.rs":"c3cd5dd6f19bbe36737274e3e2a9fb9106ebca3ab742b6791ebe886ec9498887","src/unicode_tables/mod.rs":"c1c05ac6d24cbab0b84d1d8decf87d0a05431fcd37b608e12a946da98349b34e","src/unicode_tables/perl_word.rs":"34050803ae07324c0bd1c976ffeac65df35ea8da3874ab391c997ece258130f3","src/unicode_tables/property_bool.rs":"488c0baf323ca011c1e10457fd62b237987c59bd6eea37eb62dffa0f72be2098","src/unicode_tables/property_names.rs":"08f380d5d3cb9359e96db365450555e118b88438197954692a3a13031f91f823","src/unicode_tables/property_values.rs":"da0ddadeb5a956d18ad3a2702e5a4df4cc860ce0c25c7973e2fbfdfa6a6f3ab0","src/unicode_tables/script.rs":"1584c2d3360fc331c0ae697903b59e7bd309d60a6920db8f6ef35d24a6846ec3","src/unicode_tables/script_extension.rs":"269b12f032940e098abcfa88234a3a0f0c74e036756bb3835d76fc197a73c54d","src/unicode_tables/sentence_break.rs":"444a02e0e0f6409edae73ed32b157c530b1253fe124d46173485f1850db77366","src/unicode_tables/word_break.rs":"f9c8ee8acec3157d79ea4747c1b09f792c1c0097a214bed4d559d62cf7ab9817"},"package":"4e47a2ed29da7a9e1960e1639e7a982e6edc6d49be308a3b02daf511504a16d1"} \ No newline at end of file +{"files":{"Cargo.toml":"3ef0cbe67b6222283d78af4a1173a786df3df7deecbeffb9c7d5d6de16c79316","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","benches/bench.rs":"4d09c75f457459f850877ee334a924f331c701a22fa19b1f7942c3504c8981f4","src/ast/mod.rs":"31825eaa0fdc0ae9939cf118f07c9a3ce7c0485065e0646df353a2d310ae5cd8","src/ast/parse.rs":"f20dc41a4c19943ccea609cc2320dde4c181f65cb09d198e1519f07ba38adb48","src/ast/print.rs":"c7281fdec95b796c4e32393d3f750ab58cb5bea1dd77e87d4284c0ea0a304f1e","src/ast/visitor.rs":"493be4ba270f8cfeffe096b981947a12a5992542c1df1ed470e015f1c41ed081","src/either.rs":"1758e3edd056884eccadd995708d1e374ba9aa65846bd0e13b1aae852607c560","src/error.rs":"ae638c6e6adcc7843dec98eb52b2dda2e5085a7c029a8d7f005ef40d35557617","src/hir/interval.rs":"31e9cd022486dd562d5cacb5d2b15eaca4c4ae93fb11befeebdbf5cbab49cc8f","src/hir/literal/mod.rs":"4fd26946232d056342a5052b4c84a28b6c0b956f57b4a4ff8fe64eb1b710aae5","src/hir/mod.rs":"1868e34846c55ee38ae6517115b30f7876a4183a23591f23243f701228e467d7","src/hir/print.rs":"a7efad3703d1718de65c6657eff6be72a4e96bc3db8a56d08d2a96c0abdb99b8","src/hir/translate.rs":"213573bf87a99e775df12e1ae88bf71eef361e78ed1933de31a39b6bd012d892","src/hir/visitor.rs":"8e15e646c8c219fd1f4620fc3611dfbd0d63d598bc5c8bcbfb0106053134613c","src/lib.rs":"d1cbe98975034f18276e149bc42ce44d77623a62d53385b7d3a3fa1e2df9f383","src/parser.rs":"70e0386d373af3bc4e491c0371be06069a773cfb0476e44224702c3da643ce24","src/unicode.rs":"d25f23ebc2b52a5ae8074dced1507959b2377586cbaa3193cfaaae7e8252ea64","src/unicode_tables/LICENSE-UNICODE":"74db5baf44a41b1000312c673544b3374e4198af5605c7f9080a402cec42cfa3","src/unicode_tables/age.rs":"ad5413c1e4811d85ad845ccb21f12e6bbf33f7d048d0f91863b18da143eb49e8","src/unicode_tables/case_folding_simple.rs":"270a52df6dcb639cafaa9de563ff4dc88522fa9bfe7174f0b8c140d4208c71c7","src/unicode_tables/general_category.rs":"d0e8e05acf7563e426835502b2b510595a01a2739374ae54db29eefee642ed51","src/unicode_tables/grapheme_cluster_break.rs":"c3cd5dd6f19bbe36737274e3e2a9fb9106ebca3ab742b6791ebe886ec9498887","src/unicode_tables/mod.rs":"c1c05ac6d24cbab0b84d1d8decf87d0a05431fcd37b608e12a946da98349b34e","src/unicode_tables/perl_word.rs":"34050803ae07324c0bd1c976ffeac65df35ea8da3874ab391c997ece258130f3","src/unicode_tables/property_bool.rs":"488c0baf323ca011c1e10457fd62b237987c59bd6eea37eb62dffa0f72be2098","src/unicode_tables/property_names.rs":"08f380d5d3cb9359e96db365450555e118b88438197954692a3a13031f91f823","src/unicode_tables/property_values.rs":"da0ddadeb5a956d18ad3a2702e5a4df4cc860ce0c25c7973e2fbfdfa6a6f3ab0","src/unicode_tables/script.rs":"1584c2d3360fc331c0ae697903b59e7bd309d60a6920db8f6ef35d24a6846ec3","src/unicode_tables/script_extension.rs":"269b12f032940e098abcfa88234a3a0f0c74e036756bb3835d76fc197a73c54d","src/unicode_tables/sentence_break.rs":"444a02e0e0f6409edae73ed32b157c530b1253fe124d46173485f1850db77366","src/unicode_tables/word_break.rs":"f9c8ee8acec3157d79ea4747c1b09f792c1c0097a214bed4d559d62cf7ab9817"},"package":"dcfd8681eebe297b81d98498869d4aae052137651ad7b96822f09ceb690d0a96"} \ No newline at end of file diff --git a/vendor/regex-syntax/Cargo.toml b/vendor/regex-syntax/Cargo.toml index bdfc60868c..95c9776be9 100644 --- a/vendor/regex-syntax/Cargo.toml +++ b/vendor/regex-syntax/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,7 +12,7 @@ [package] name = "regex-syntax" -version = "0.6.4" +version = "0.6.6" authors = ["The Rust Project Developers"] description = "A regular expression parser." homepage = "https://github.com/rust-lang/regex" diff --git a/vendor/regex-syntax/src/ast/parse.rs b/vendor/regex-syntax/src/ast/parse.rs index b73baee735..9e9900c965 100644 --- a/vendor/regex-syntax/src/ast/parse.rs +++ b/vendor/regex-syntax/src/ast/parse.rs @@ -1100,6 +1100,13 @@ impl<'s, P: Borrow<Parser>> ParserI<'s, P> { ast::ErrorKind::RepetitionMissing, )), }; + match ast { + Ast::Empty(_) | Ast::Flags(_) => return Err(self.error( + self.span(), + ast::ErrorKind::RepetitionMissing, + )), + _ => {} + } if !self.bump_and_bump_space() { return Err(self.error( Span::new(start, self.pos()), @@ -3124,6 +3131,18 @@ bar ast: Box::new(lit('a', 0)), }))); + assert_eq!( + parser(r"(?i){0}").parse().unwrap_err(), + TestError { + span: span(4..4), + kind: ast::ErrorKind::RepetitionMissing, + }); + assert_eq!( + parser(r"(?m){1,1}").parse().unwrap_err(), + TestError { + span: span(4..4), + kind: ast::ErrorKind::RepetitionMissing, + }); assert_eq!( parser(r"a{").parse().unwrap_err(), TestError { diff --git a/vendor/regex-syntax/src/hir/mod.rs b/vendor/regex-syntax/src/hir/mod.rs index 903e6085be..40b4fea345 100644 --- a/vendor/regex-syntax/src/hir/mod.rs +++ b/vendor/regex-syntax/src/hir/mod.rs @@ -222,9 +222,13 @@ impl Hir { info.set_all_assertions(true); info.set_anchored_start(false); info.set_anchored_end(false); + info.set_line_anchored_start(false); + info.set_line_anchored_end(false); info.set_any_anchored_start(false); info.set_any_anchored_end(false); info.set_match_empty(true); + info.set_literal(true); + info.set_alternation_literal(true); Hir { kind: HirKind::Empty, info: info, @@ -246,9 +250,13 @@ impl Hir { info.set_all_assertions(false); info.set_anchored_start(false); info.set_anchored_end(false); + info.set_line_anchored_start(false); + info.set_line_anchored_end(false); info.set_any_anchored_start(false); info.set_any_anchored_end(false); info.set_match_empty(false); + info.set_literal(true); + info.set_alternation_literal(true); Hir { kind: HirKind::Literal(lit), info: info, @@ -262,9 +270,13 @@ impl Hir { info.set_all_assertions(false); info.set_anchored_start(false); info.set_anchored_end(false); + info.set_line_anchored_start(false); + info.set_line_anchored_end(false); info.set_any_anchored_start(false); info.set_any_anchored_end(false); info.set_match_empty(false); + info.set_literal(false); + info.set_alternation_literal(false); Hir { kind: HirKind::Class(class), info: info, @@ -278,17 +290,29 @@ impl Hir { info.set_all_assertions(true); info.set_anchored_start(false); info.set_anchored_end(false); + info.set_line_anchored_start(false); + info.set_line_anchored_end(false); info.set_any_anchored_start(false); info.set_any_anchored_end(false); info.set_match_empty(true); + info.set_literal(false); + info.set_alternation_literal(false); if let Anchor::StartText = anchor { info.set_anchored_start(true); + info.set_line_anchored_start(true); info.set_any_anchored_start(true); } if let Anchor::EndText = anchor { info.set_anchored_end(true); + info.set_line_anchored_end(true); info.set_any_anchored_end(true); } + if let Anchor::StartLine = anchor { + info.set_line_anchored_start(true); + } + if let Anchor::EndLine = anchor { + info.set_line_anchored_end(true); + } Hir { kind: HirKind::Anchor(anchor), info: info, @@ -302,8 +326,12 @@ impl Hir { info.set_all_assertions(true); info.set_anchored_start(false); info.set_anchored_end(false); + info.set_line_anchored_start(false); + info.set_line_anchored_end(false); info.set_any_anchored_start(false); info.set_any_anchored_end(false); + info.set_literal(false); + info.set_alternation_literal(false); // A negated word boundary matches the empty string, but a normal // word boundary does not! info.set_match_empty(word_boundary.is_negated()); @@ -330,9 +358,17 @@ impl Hir { info.set_anchored_end( !rep.is_match_empty() && rep.hir.is_anchored_end() ); + info.set_line_anchored_start( + !rep.is_match_empty() && rep.hir.is_anchored_start() + ); + info.set_line_anchored_end( + !rep.is_match_empty() && rep.hir.is_anchored_end() + ); info.set_any_anchored_start(rep.hir.is_any_anchored_start()); info.set_any_anchored_end(rep.hir.is_any_anchored_end()); info.set_match_empty(rep.is_match_empty() || rep.hir.is_match_empty()); + info.set_literal(false); + info.set_alternation_literal(false); Hir { kind: HirKind::Repetition(rep), info: info, @@ -346,9 +382,13 @@ impl Hir { info.set_all_assertions(group.hir.is_all_assertions()); info.set_anchored_start(group.hir.is_anchored_start()); info.set_anchored_end(group.hir.is_anchored_end()); + info.set_line_anchored_start(group.hir.is_line_anchored_start()); + info.set_line_anchored_end(group.hir.is_line_anchored_end()); info.set_any_anchored_start(group.hir.is_any_anchored_start()); info.set_any_anchored_end(group.hir.is_any_anchored_end()); info.set_match_empty(group.hir.is_match_empty()); + info.set_literal(false); + info.set_alternation_literal(false); Hir { kind: HirKind::Group(group), info: info, @@ -361,7 +401,7 @@ impl Hir { pub fn concat(mut exprs: Vec<Hir>) -> Hir { match exprs.len() { 0 => Hir::empty(), - 1 => exprs.pop().unwrap(), + 1 => { exprs.pop().unwrap() } _ => { let mut info = HirInfo::new(); info.set_always_utf8(true); @@ -369,6 +409,8 @@ impl Hir { info.set_any_anchored_start(false); info.set_any_anchored_end(false); info.set_match_empty(true); + info.set_literal(true); + info.set_alternation_literal(true); // Some attributes require analyzing all sub-expressions. for e in &exprs { @@ -390,6 +432,14 @@ impl Hir { let x = info.is_match_empty() && e.is_match_empty(); info.set_match_empty(x); + + let x = info.is_literal() && e.is_literal(); + info.set_literal(x); + + let x = + info.is_alternation_literal() + && e.is_alternation_literal(); + info.set_alternation_literal(x); } // Anchored attributes require something slightly more // sophisticated. Normally, WLOG, to determine whether an @@ -418,6 +468,24 @@ impl Hir { .any(|e| { e.is_anchored_end() })); + // Repeat the process for line anchors. + info.set_line_anchored_start( + exprs.iter() + .take_while(|e| { + e.is_line_anchored_start() || e.is_all_assertions() + }) + .any(|e| { + e.is_line_anchored_start() + })); + info.set_line_anchored_end( + exprs.iter() + .rev() + .take_while(|e| { + e.is_line_anchored_end() || e.is_all_assertions() + }) + .any(|e| { + e.is_line_anchored_end() + })); Hir { kind: HirKind::Concat(exprs), info: info, @@ -439,9 +507,13 @@ impl Hir { info.set_all_assertions(true); info.set_anchored_start(true); info.set_anchored_end(true); + info.set_line_anchored_start(true); + info.set_line_anchored_end(true); info.set_any_anchored_start(false); info.set_any_anchored_end(false); info.set_match_empty(false); + info.set_literal(false); + info.set_alternation_literal(true); // Some attributes require analyzing all sub-expressions. for e in &exprs { @@ -457,6 +529,14 @@ impl Hir { let x = info.is_anchored_end() && e.is_anchored_end(); info.set_anchored_end(x); + let x = info.is_line_anchored_start() + && e.is_line_anchored_start(); + info.set_line_anchored_start(x); + + let x = info.is_line_anchored_end() + && e.is_line_anchored_end(); + info.set_line_anchored_end(x); + let x = info.is_any_anchored_start() || e.is_any_anchored_start(); @@ -469,6 +549,11 @@ impl Hir { let x = info.is_match_empty() || e.is_match_empty(); info.set_match_empty(x); + + let x = + info.is_alternation_literal() + && e.is_literal(); + info.set_alternation_literal(x); } Hir { kind: HirKind::Alternation(exprs), @@ -551,6 +636,32 @@ impl Hir { self.info.is_anchored_end() } + /// Return true if and only if this HIR is required to match from the + /// beginning of text or the beginning of a line. This includes expressions + /// like `^foo`, `(?m)^foo`, `^(foo|bar)`, `^(foo|bar)`, `(?m)^foo|^bar` + /// but not `^foo|bar` or `(?m)^foo|bar`. + /// + /// Note that if `is_anchored_start` is `true`, then + /// `is_line_anchored_start` will also be `true`. The reverse implication + /// is not true. For example, `(?m)^foo` is line anchored, but not + /// `is_anchored_start`. + pub fn is_line_anchored_start(&self) -> bool { + self.info.is_line_anchored_start() + } + + /// Return true if and only if this HIR is required to match at the + /// end of text or the end of a line. This includes expressions like + /// `foo$`, `(?m)foo$`, `(foo|bar)$`, `(?m)(foo|bar)$`, `foo$|bar$`, + /// `(?m)(foo|bar)$`, but not `foo$|bar` or `(?m)foo$|bar`. + /// + /// Note that if `is_anchored_end` is `true`, then + /// `is_line_anchored_end` will also be `true`. The reverse implication + /// is not true. For example, `(?m)foo$` is line anchored, but not + /// `is_anchored_end`. + pub fn is_line_anchored_end(&self) -> bool { + self.info.is_line_anchored_end() + } + /// Return true if and only if this HIR contains any sub-expression that /// is required to match at the beginning of text. Specifically, this /// returns true if the `^` symbol (when multiline mode is disabled) or the @@ -575,6 +686,28 @@ impl Hir { pub fn is_match_empty(&self) -> bool { self.info.is_match_empty() } + + /// Return true if and only if this HIR is a simple literal. This is only + /// true when this HIR expression is either itself a `Literal` or a + /// concatenation of only `Literal`s. + /// + /// For example, `f` and `foo` are literals, but `f+`, `(foo)`, `foo()` + /// are not (even though that contain sub-expressions that are literals). + pub fn is_literal(&self) -> bool { + self.info.is_literal() + } + + /// Return true if and only if this HIR is either a simple literal or an + /// alternation of simple literals. This is only + /// true when this HIR expression is either itself a `Literal` or a + /// concatenation of only `Literal`s or an alternation of only `Literal`s. + /// + /// For example, `f`, `foo`, `a|b|c`, and `foo|bar|baz` are alternaiton + /// literals, but `f+`, `(foo)`, `foo()` + /// are not (even though that contain sub-expressions that are literals). + pub fn is_alternation_literal(&self) -> bool { + self.info.is_alternation_literal() + } } impl HirKind { @@ -1299,7 +1432,7 @@ struct HirInfo { /// /// If more attributes need to be added, it is OK to increase the size of /// this as appropriate. - bools: u8, + bools: u16, } // A simple macro for defining bitfield accessors/mutators. @@ -1330,9 +1463,13 @@ impl HirInfo { define_bool!(1, is_all_assertions, set_all_assertions); define_bool!(2, is_anchored_start, set_anchored_start); define_bool!(3, is_anchored_end, set_anchored_end); - define_bool!(4, is_any_anchored_start, set_any_anchored_start); - define_bool!(5, is_any_anchored_end, set_any_anchored_end); - define_bool!(6, is_match_empty, set_match_empty); + define_bool!(4, is_line_anchored_start, set_line_anchored_start); + define_bool!(5, is_line_anchored_end, set_line_anchored_end); + define_bool!(6, is_any_anchored_start, set_any_anchored_start); + define_bool!(7, is_any_anchored_end, set_any_anchored_end); + define_bool!(8, is_match_empty, set_match_empty); + define_bool!(9, is_literal, set_literal); + define_bool!(10, is_alternation_literal, set_alternation_literal); } #[cfg(test)] diff --git a/vendor/regex-syntax/src/hir/translate.rs b/vendor/regex-syntax/src/hir/translate.rs index ba0ac0a20a..c2afd98f7a 100644 --- a/vendor/regex-syntax/src/hir/translate.rs +++ b/vendor/regex-syntax/src/hir/translate.rs @@ -240,11 +240,6 @@ impl<'t, 'p> Visitor for TranslatorI<'t, 'p> { type Err = Error; fn finish(self) -> Result<Hir> { - if self.trans().stack.borrow().is_empty() { - // This can happen if the Ast given consists of a single set of - // flags. e.g., `(?i)`. /shrug - return Ok(Hir::empty()); - } // ... otherwise, we should have exactly one HIR on the stack. assert_eq!(self.trans().stack.borrow().len(), 1); Ok(self.pop().unwrap().unwrap_expr()) @@ -287,6 +282,16 @@ impl<'t, 'p> Visitor for TranslatorI<'t, 'p> { } Ast::Flags(ref x) => { self.set_flags(&x.flags); + // Flags in the AST are generally considered directives and + // not actual sub-expressions. However, they can be used in + // the concrete syntax like `((?i))`, and we need some kind of + // indication of an expression there, and Empty is the correct + // choice. + // + // There can also be things like `(?i)+`, but we rule those out + // in the parser. In the future, we might allow them for + // consistency sake. + self.push(HirFrame::Expr(Hir::empty())); } Ast::Literal(ref x) => { self.push(HirFrame::Expr(self.hir_literal(x)?)); @@ -1547,6 +1552,10 @@ mod tests { hir_group_name(2, "foo", hir_lit("b")), hir_group(3, hir_lit("c")), ])); + assert_eq!(t("()"), hir_group(1, Hir::empty())); + assert_eq!(t("((?i))"), hir_group(1, Hir::empty())); + assert_eq!(t("((?x))"), hir_group(1, Hir::empty())); + assert_eq!(t("(((?x)))"), hir_group(1, hir_group(2, Hir::empty()))); } #[test] @@ -2414,40 +2423,68 @@ mod tests { // Positive examples. assert!(t(r"^").is_anchored_start()); assert!(t(r"$").is_anchored_end()); + assert!(t(r"^").is_line_anchored_start()); + assert!(t(r"$").is_line_anchored_end()); assert!(t(r"^^").is_anchored_start()); assert!(t(r"$$").is_anchored_end()); + assert!(t(r"^^").is_line_anchored_start()); + assert!(t(r"$$").is_line_anchored_end()); assert!(t(r"^$").is_anchored_start()); assert!(t(r"^$").is_anchored_end()); + assert!(t(r"^$").is_line_anchored_start()); + assert!(t(r"^$").is_line_anchored_end()); assert!(t(r"^foo").is_anchored_start()); assert!(t(r"foo$").is_anchored_end()); + assert!(t(r"^foo").is_line_anchored_start()); + assert!(t(r"foo$").is_line_anchored_end()); assert!(t(r"^foo|^bar").is_anchored_start()); assert!(t(r"foo$|bar$").is_anchored_end()); + assert!(t(r"^foo|^bar").is_line_anchored_start()); + assert!(t(r"foo$|bar$").is_line_anchored_end()); assert!(t(r"^(foo|bar)").is_anchored_start()); assert!(t(r"(foo|bar)$").is_anchored_end()); + assert!(t(r"^(foo|bar)").is_line_anchored_start()); + assert!(t(r"(foo|bar)$").is_line_anchored_end()); assert!(t(r"^+").is_anchored_start()); assert!(t(r"$+").is_anchored_end()); + assert!(t(r"^+").is_line_anchored_start()); + assert!(t(r"$+").is_line_anchored_end()); assert!(t(r"^++").is_anchored_start()); assert!(t(r"$++").is_anchored_end()); + assert!(t(r"^++").is_line_anchored_start()); + assert!(t(r"$++").is_line_anchored_end()); assert!(t(r"(^)+").is_anchored_start()); assert!(t(r"($)+").is_anchored_end()); + assert!(t(r"(^)+").is_line_anchored_start()); + assert!(t(r"($)+").is_line_anchored_end()); assert!(t(r"$^").is_anchored_start()); - assert!(t(r"$^").is_anchored_end()); + assert!(t(r"$^").is_anchored_start()); + assert!(t(r"$^").is_line_anchored_end()); + assert!(t(r"$^").is_line_anchored_end()); assert!(t(r"$^|^$").is_anchored_start()); assert!(t(r"$^|^$").is_anchored_end()); + assert!(t(r"$^|^$").is_line_anchored_start()); + assert!(t(r"$^|^$").is_line_anchored_end()); assert!(t(r"\b^").is_anchored_start()); assert!(t(r"$\b").is_anchored_end()); + assert!(t(r"\b^").is_line_anchored_start()); + assert!(t(r"$\b").is_line_anchored_end()); assert!(t(r"^(?m:^)").is_anchored_start()); assert!(t(r"(?m:$)$").is_anchored_end()); + assert!(t(r"^(?m:^)").is_line_anchored_start()); + assert!(t(r"(?m:$)$").is_line_anchored_end()); assert!(t(r"(?m:^)^").is_anchored_start()); assert!(t(r"$(?m:$)").is_anchored_end()); + assert!(t(r"(?m:^)^").is_line_anchored_start()); + assert!(t(r"$(?m:$)").is_line_anchored_end()); // Negative examples. assert!(!t(r"(?m)^").is_anchored_start()); @@ -2459,21 +2496,53 @@ mod tests { assert!(!t(r"a^").is_anchored_start()); assert!(!t(r"$a").is_anchored_start()); + assert!(!t(r"a^").is_line_anchored_start()); + assert!(!t(r"$a").is_line_anchored_start()); - assert!(!t(r"a^").is_anchored_start()); - assert!(!t(r"$a").is_anchored_start()); + assert!(!t(r"a^").is_anchored_end()); + assert!(!t(r"$a").is_anchored_end()); + assert!(!t(r"a^").is_line_anchored_end()); + assert!(!t(r"$a").is_line_anchored_end()); assert!(!t(r"^foo|bar").is_anchored_start()); assert!(!t(r"foo|bar$").is_anchored_end()); + assert!(!t(r"^foo|bar").is_line_anchored_start()); + assert!(!t(r"foo|bar$").is_line_anchored_end()); assert!(!t(r"^*").is_anchored_start()); assert!(!t(r"$*").is_anchored_end()); + assert!(!t(r"^*").is_line_anchored_start()); + assert!(!t(r"$*").is_line_anchored_end()); assert!(!t(r"^*+").is_anchored_start()); assert!(!t(r"$*+").is_anchored_end()); + assert!(!t(r"^*+").is_line_anchored_start()); + assert!(!t(r"$*+").is_line_anchored_end()); assert!(!t(r"^+*").is_anchored_start()); assert!(!t(r"$+*").is_anchored_end()); + assert!(!t(r"^+*").is_line_anchored_start()); + assert!(!t(r"$+*").is_line_anchored_end()); assert!(!t(r"(^)*").is_anchored_start()); assert!(!t(r"($)*").is_anchored_end()); + assert!(!t(r"(^)*").is_line_anchored_start()); + assert!(!t(r"($)*").is_line_anchored_end()); + } + + #[test] + fn analysis_is_line_anchored() { + assert!(t(r"(?m)^(foo|bar)").is_line_anchored_start()); + assert!(t(r"(?m)(foo|bar)$").is_line_anchored_end()); + + assert!(t(r"(?m)^foo|^bar").is_line_anchored_start()); + assert!(t(r"(?m)foo$|bar$").is_line_anchored_end()); + + assert!(t(r"(?m)^").is_line_anchored_start()); + assert!(t(r"(?m)$").is_line_anchored_end()); + + assert!(t(r"(?m:^$)|$^").is_line_anchored_start()); + assert!(t(r"(?m:^$)|$^").is_line_anchored_end()); + + assert!(t(r"$^|(?m:^$)").is_line_anchored_start()); + assert!(t(r"$^|(?m:^$)").is_line_anchored_end()); } #[test] @@ -2529,4 +2598,49 @@ mod tests { assert!(!t(r"\b").is_match_empty()); assert!(!t(r"(?-u)\b").is_match_empty()); } + + #[test] + fn analysis_is_literal() { + // Positive examples. + assert!(t(r"").is_literal()); + assert!(t(r"a").is_literal()); + assert!(t(r"ab").is_literal()); + assert!(t(r"abc").is_literal()); + assert!(t(r"(?m)abc").is_literal()); + + // Negative examples. + assert!(!t(r"^").is_literal()); + assert!(!t(r"a|b").is_literal()); + assert!(!t(r"(a)").is_literal()); + assert!(!t(r"a+").is_literal()); + assert!(!t(r"foo(a)").is_literal()); + assert!(!t(r"(a)foo").is_literal()); + assert!(!t(r"[a]").is_literal()); + } + + #[test] + fn analysis_is_alternation_literal() { + // Positive examples. + assert!(t(r"").is_alternation_literal()); + assert!(t(r"a").is_alternation_literal()); + assert!(t(r"ab").is_alternation_literal()); + assert!(t(r"abc").is_alternation_literal()); + assert!(t(r"(?m)abc").is_alternation_literal()); + assert!(t(r"a|b").is_alternation_literal()); + assert!(t(r"a|b|c").is_alternation_literal()); + assert!(t(r"foo|bar").is_alternation_literal()); + assert!(t(r"foo|bar|baz").is_alternation_literal()); + + // Negative examples. + assert!(!t(r"^").is_alternation_literal()); + assert!(!t(r"(a)").is_alternation_literal()); + assert!(!t(r"a+").is_alternation_literal()); + assert!(!t(r"foo(a)").is_alternation_literal()); + assert!(!t(r"(a)foo").is_alternation_literal()); + assert!(!t(r"[a]").is_alternation_literal()); + assert!(!t(r"[a]|b").is_alternation_literal()); + assert!(!t(r"a|[b]").is_alternation_literal()); + assert!(!t(r"(a)|b").is_alternation_literal()); + assert!(!t(r"a|(b)").is_alternation_literal()); + } } diff --git a/vendor/regex/.cargo-checksum.json b/vendor/regex/.cargo-checksum.json index 135170026f..8393f2ac2e 100644 --- a/vendor/regex/.cargo-checksum.json +++ b/vendor/regex/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CHANGELOG.md":"d51b6cb87b132bc405a65539ca3e49edfd1413e7f358f8cd6ad4164d84acf6a4","Cargo.toml":"b7961d13f82982c6c0628da5ea5a27f3c3e497954305da2a7b0648b039e29443","HACKING.md":"33e3e555fbcf70d7c235068a10c0d9c3d53c02d71712eda52d252d0b20f70eb3","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","PERFORMANCE.md":"c776b18758b6dc8f2f9d37e9a95261f75c5f744925e8ddf216b83953bf7467b7","README.md":"19cc4864bf0b9b1f76cca038ad1e086c08da1d13eb3952f2f6d7c6aae2aba689","UNICODE.md":"27be97e94d0819ae18ae71029559c3de21c8ffd343d4a791959d0fc22b06dfe6","build.rs":"cebf7813476c332764ab9f26f8e0e7d9b5460ff1468e7ab2703eec812f82bdee","examples/regexdna-input.txt":"156a49710bb3e1ed4bc2bbb0af0f383b747b3d0281453cfff39c296124c598f8","examples/regexdna-output.txt":"35e85b19b70a893d752fd43e54e1e9da08bac43559191cea85b33387c24c4cc1","examples/shootout-regex-dna-bytes.rs":"f097a923fef2e9bd9a9abd3686eea84830e8050bb750bcab840b6575873227ff","examples/shootout-regex-dna-cheat.rs":"4b5a590ec88a9ba67cc4a34621cb038a400d45e64a15a354f3e07fdaf41a935b","examples/shootout-regex-dna-replace.rs":"15677e7de356427fe2b983e918de073a7a730337b090d4ab0e815e1e66f74f73","examples/shootout-regex-dna-single-cheat.rs":"5e743b3a6ec968713ce064a289b1fbd11c302add824d1c749a2ffb546c73128e","examples/shootout-regex-dna-single.rs":"c86969adb0fb08c5e23f749ec6922a58404da7d0e1925c848957a5144ddc8815","examples/shootout-regex-dna.rs":"e627f1e5e24c1cf4e9c9d52b844b6d971c59b7169b0e8762d8d9d1cb7debc6e6","rustfmt.toml":"3025e466e14d8ac54e5371397434f79be4976b5bf3faf64e36c5e941980a0cf2","src/backtrack.rs":"0372ada608dca9c8d3e1fabf56e33498f8ff4fbdfd445873c4a4be6657465c68","src/compile.rs":"794434c5cbe6c919adde4589960fbf78826da669b15215167dae9d40df2cf524","src/dfa.rs":"5fcebff2805fcfbbca393706e1dcd2c4b0ebbdd03bd2bdfc08c6156724bde14a","src/error.rs":"d26673a95e372665863c7e01558836ef6e957aadf421d5056525720e16a9683d","src/exec.rs":"b1eb21ec86213f38f8e806c26808143e0312cbc1477eb1107d2010ee55c8a767","src/expand.rs":"3d70f38aa9755b5cdc18e5deb6ddfb89aad9e5c20aeb16eaf6cf89e19ec15edf","src/freqs.rs":"e25871eec51d1c02c15abbc04d61dbea71fb2dbc15f370c98279687416c969de","src/input.rs":"9b092fe88a66b46dee0dfe0a2e67e4b78b01a32f53b28443b5f382b8514d0cfb","src/lib.rs":"c81e67cb35d6ccfafbfd73af57a1fccbadabb9aec13423d27e168d8d8530d684","src/literal/mod.rs":"c395221efe19f36edd9d92c8f8283e5b30553e0e9b408ccb1430d11f038730f8","src/literal/teddy_avx2/fallback.rs":"f24b70f9dd028eefe2802b7bbc6b2dca97663b03a931058e3a59750f0693a15c","src/literal/teddy_avx2/imp.rs":"b0e4634bc9fbc793e3b0938b97a236df4b8fb17a0ac08040a6394bc73042aa8b","src/literal/teddy_avx2/mod.rs":"b7373cb7bc823e60be4e585b93fe15e7a477c2cb16a45563f66c2e5c0d7e660d","src/literal/teddy_ssse3/fallback.rs":"f24b70f9dd028eefe2802b7bbc6b2dca97663b03a931058e3a59750f0693a15c","src/literal/teddy_ssse3/imp.rs":"be4565c47a3807ab09343f2da4ef0e3297d4776719472efb60dee8e55380c2ec","src/literal/teddy_ssse3/mod.rs":"34dba2fde2ec15c1b37faae164a1475b92227ad5c1010bc619d0c318bc30e332","src/pattern.rs":"4e820c17a2b983050f47d3fd13282094ce9f27b75fd852fcec438d61f07f0b0b","src/pikevm.rs":"9600a8b135075f8cf62683e6b08c73834873a203347d275f1e9ca3a97221dbeb","src/prog.rs":"55accd0ef93a71facf348d969cb0ac5af5166288ed617fd2fd0320ca9009619d","src/re_builder.rs":"a71b56428c84a1c14f300451a19570f1ad59ac16f5230d63bae160f78c87fc94","src/re_bytes.rs":"d3ca160c650a29cb1e09342611187d8c683df0e0f5d8b9e277c7d6d596c14b49","src/re_set.rs":"ca831fc302d9d31b0e35ca76098b6f36ffd09481e2c4aaae161786334766be87","src/re_trait.rs":"45b2e81076cce0b87bace2c05e125d44b8e3b71ff8d5c94130a7ae2c915f237d","src/re_unicode.rs":"b7ae7149a651b962087c6e5111c82aa70c237313996a8d7e0e695d429427d40a","src/sparse.rs":"f59784a788555ae03fc73b0cdf4b3aec6d2f54b0edf3d9f2bed4b00171fdc52e","src/testdata/LICENSE":"58cf078acc03da3e280a938c2bd9943f554fc9b6ced89ad93ba35ca436872899","src/testdata/README":"45f869e37f798905c773bfbe0ef19a5fb7e585cbf0b7c21b5b5a784e8cec3c14","src/testdata/basic.dat":"3756a5bdd6f387ed34731197fbdaab8521b0ae1726250100ba235756cb42b4b1","src/testdata/nullsubexpr.dat":"496ac0278eec3b6d9170faace14554569032dd3d909618364d9326156de39ecf","src/testdata/repetition.dat":"1f7959063015b284b18a4a2c1c8b416d438a2d6c4b1a362da43406b865f50e69","src/utf8.rs":"1a2d7bc43ab139bfc2b2610627efd59a7ead2a959492ba73eebb743d482c7957","src/vector/avx2.rs":"1ef39371a9215144b69bf72df9aa3533ea6be44d7425cdc5c8192de79dfc5e96","src/vector/mod.rs":"fc238d33117c500381f57d2d1fbaba14bd6ab855ba3fe55304c37256b1c0e965","src/vector/ssse3.rs":"f8549244fddfcb73f538761c0ae5a81c535e5ae5e129cebf8e3e6f9db4fa79f4","tests/api.rs":"803faacd9ac5efc149959ff63a2132f5ca155f75a246b79807c549b464b5c497","tests/api_str.rs":"8ccb6c3dfe0220229ad33fcaf9dea420b414aea17c7498d978efd1b8aceaa980","tests/bytes.rs":"3564a933f12f84d65488c220d71067a9902ed9860522a7d9139a713f818a0b1c","tests/consistent.rs":"51b12bfec3ec2b49471b508dec537dbbd50823673a34a16b98e38dc3ae2a0793","tests/crates_regex.rs":"7812e91c25a2aad48ba024bcbeb8b922ffc1cfa3113a33615885d72d8a2cae64","tests/crazy.rs":"b0c593be5022341606ddb15b3d28aa39d2d52977db4b1b72c41c6133a7f7a7e0","tests/flags.rs":"cd3788760defc667b32adb2732b6657b289372e1051fc240dfd0e435e2835353","tests/fowler.rs":"e0b7420fa5b636301d4c11cd4dfb803ec09fa7b27be47c594d231167de1241e3","tests/macros.rs":"f021b62e3ce8d122f6450a5aab36972eccf4c21c62a53c604924d4d01d90c0d8","tests/macros_bytes.rs":"5574c19bff5dfa45802238b65f642605f1a8b8adc6a353660a251c80490ad68e","tests/macros_str.rs":"518bde310ceb9fb689b20294279483454601ba3a3fd7c95a04d07331f05d476d","tests/misc.rs":"c8cc85ac916980ebd053df2444fe9b795a00f2ac42c5cd828fc3df487f689265","tests/multiline.rs":"4e872a9473bc229d955716c18c77aa3530625a8f3a28ecaefdb70b9aff0f0a8b","tests/noparse.rs":"8850d31cb95e413e3a67edecce8590cd158f49779abcc2e5722381113346179c","tests/regression.rs":"1f077b6c0057e9877e94ff515774463012cbcb396f5b35af629a7a2cb6f30ce0","tests/replace.rs":"a121da1d86fa39d45b6b29ccd74e4327deaf0c9c1914dc1da46e6358084e4459","tests/searcher.rs":"124c9909a1e8fcfddee8ecfae3a1fb9d76f9ddac62fda23d9b895744728a0aa8","tests/set.rs":"4f632b1f25f69af48053089a5cef272a9bb7cf0ac80277b36ae74888c7adc0df","tests/shortest_match.rs":"7ca223e0a61b1a26a1f36465ab49de021475295e18f4d6421497461af1e107be","tests/suffix_reverse.rs":"cd497c1a51246a8fc727062133470e0c6300620ad80333d20d63c0ee4224ef1c","tests/test_backtrack.rs":"b07a114b2eb7f1f17357629be9c8458e31f7952fb2c327d66d9415f08855c624","tests/test_backtrack_bytes.rs":"dd3cec3c630d6f41892c9111bee87227bf47126651b2402672c30b084fa9c28c","tests/test_backtrack_utf8bytes.rs":"b576b933d6be21f8cedb281e456441d4278350b0145a139dbccb1861639a54f9","tests/test_crates_regex.rs":"6d7f2cfade28ebab6a831282882b83e4b3d66a5171411730505e2a8bb95074a8","tests/test_default.rs":"dc819a5973dd03a58165afa37da20727e8bf7085f1482414290654483fe20aa1","tests/test_default_bytes.rs":"c5228278e0a1d8fab5157dfd2b52642fd0ec68db346dc133f4c16f178d63e856","tests/test_nfa.rs":"aad36ca01f3f7eb23633a1207056e9056d686be2ef6e3661fad83805fa482927","tests/test_nfa_bytes.rs":"198f7b58c5c7dd0a05f16ddb3b9b63dab29ef2a56448378ac602c5d087c01e4e","tests/test_nfa_utf8bytes.rs":"854d80114ca1bed14d4ad3f2b3bf292ff0fa44e12d7d3f2ec6dd17cbbaa82175","tests/unicode.rs":"d5750e15f8c197fc4b6b2ecfa1678d8ad39d609760392d33b3d89c449630c881","tests/word_boundary.rs":"7081317ddcec1e82dd4a2090a571c6abf2ff4bbfa8cd10395e1eb3f386157fae","tests/word_boundary_ascii.rs":"cd0be5b5b485de0ba7994b42e2864585556c3d2d8bf5eab05b58931d9aaf4b87","tests/word_boundary_unicode.rs":"75dbcc35d3abc0f9795c2ea99e216dc227b0a5b58e9ca5eef767815ff0513921"},"package":"37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f"} \ No newline at end of file +{"files":{"CHANGELOG.md":"eb33182c90b46819c9a8a4dbe846a8c1cdf80f5a7f7ee02c9f09b7182a78fc79","Cargo.toml":"afccb28ffde7d32860c7bd18b45101bd4231f18a10b5e3c193d2a4afc3daaafa","HACKING.md":"33e3e555fbcf70d7c235068a10c0d9c3d53c02d71712eda52d252d0b20f70eb3","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","PERFORMANCE.md":"c776b18758b6dc8f2f9d37e9a95261f75c5f744925e8ddf216b83953bf7467b7","README.md":"d28b5f7b619bf88ba6df7dd87b211d5133a8064b7aee119dbe9dc01a0488eac5","UNICODE.md":"27be97e94d0819ae18ae71029559c3de21c8ffd343d4a791959d0fc22b06dfe6","build.rs":"415c0a7bc9b2c5876140bbf0c11f7a57b91ab1a907755f92af68f4886512015b","examples/regexdna-input.txt":"156a49710bb3e1ed4bc2bbb0af0f383b747b3d0281453cfff39c296124c598f8","examples/regexdna-output.txt":"35e85b19b70a893d752fd43e54e1e9da08bac43559191cea85b33387c24c4cc1","examples/shootout-regex-dna-bytes.rs":"f097a923fef2e9bd9a9abd3686eea84830e8050bb750bcab840b6575873227ff","examples/shootout-regex-dna-cheat.rs":"4b5a590ec88a9ba67cc4a34621cb038a400d45e64a15a354f3e07fdaf41a935b","examples/shootout-regex-dna-replace.rs":"15677e7de356427fe2b983e918de073a7a730337b090d4ab0e815e1e66f74f73","examples/shootout-regex-dna-single-cheat.rs":"5e743b3a6ec968713ce064a289b1fbd11c302add824d1c749a2ffb546c73128e","examples/shootout-regex-dna-single.rs":"c86969adb0fb08c5e23f749ec6922a58404da7d0e1925c848957a5144ddc8815","examples/shootout-regex-dna.rs":"e627f1e5e24c1cf4e9c9d52b844b6d971c59b7169b0e8762d8d9d1cb7debc6e6","rustfmt.toml":"3025e466e14d8ac54e5371397434f79be4976b5bf3faf64e36c5e941980a0cf2","src/backtrack.rs":"3b470d78050d0df269399df16d37fcc2215a1b26aca6f5d74d6dfe689d029534","src/compile.rs":"794434c5cbe6c919adde4589960fbf78826da669b15215167dae9d40df2cf524","src/dfa.rs":"5fcebff2805fcfbbca393706e1dcd2c4b0ebbdd03bd2bdfc08c6156724bde14a","src/error.rs":"d26673a95e372665863c7e01558836ef6e957aadf421d5056525720e16a9683d","src/exec.rs":"9a0bcb90790694096ef0daa6e4463108a23c1ebc52cedf48a14d80c1020c8c53","src/expand.rs":"3d70f38aa9755b5cdc18e5deb6ddfb89aad9e5c20aeb16eaf6cf89e19ec15edf","src/freqs.rs":"e25871eec51d1c02c15abbc04d61dbea71fb2dbc15f370c98279687416c969de","src/input.rs":"9b092fe88a66b46dee0dfe0a2e67e4b78b01a32f53b28443b5f382b8514d0cfb","src/lib.rs":"33f097eeb1bd29055ca2605fcc75a25e268c68781b2be92d0657529d0991f4f7","src/literal/mod.rs":"e0505366b57ea4bfb5f7177a9866481049568c60a5f7be966a1e81bd58a65782","src/literal/teddy_avx2/fallback.rs":"f24b70f9dd028eefe2802b7bbc6b2dca97663b03a931058e3a59750f0693a15c","src/literal/teddy_avx2/imp.rs":"eedf24e2e357afa848f15141c02af335a298e54cd1c3b6a597802040c2fa1c71","src/literal/teddy_avx2/mod.rs":"b7373cb7bc823e60be4e585b93fe15e7a477c2cb16a45563f66c2e5c0d7e660d","src/literal/teddy_ssse3/fallback.rs":"f24b70f9dd028eefe2802b7bbc6b2dca97663b03a931058e3a59750f0693a15c","src/literal/teddy_ssse3/imp.rs":"2d23ee8e9d15ae4b4a696e9cfb3a119c3f8116a2867324f0c69212d4cfaa828f","src/literal/teddy_ssse3/mod.rs":"34dba2fde2ec15c1b37faae164a1475b92227ad5c1010bc619d0c318bc30e332","src/pattern.rs":"4e820c17a2b983050f47d3fd13282094ce9f27b75fd852fcec438d61f07f0b0b","src/pikevm.rs":"de13e3c678740ed0e2661051c3179999c0d3202407f024dede390929739a1661","src/prog.rs":"55accd0ef93a71facf348d969cb0ac5af5166288ed617fd2fd0320ca9009619d","src/re_builder.rs":"a71b56428c84a1c14f300451a19570f1ad59ac16f5230d63bae160f78c87fc94","src/re_bytes.rs":"d3ca160c650a29cb1e09342611187d8c683df0e0f5d8b9e277c7d6d596c14b49","src/re_set.rs":"ca831fc302d9d31b0e35ca76098b6f36ffd09481e2c4aaae161786334766be87","src/re_trait.rs":"45b2e81076cce0b87bace2c05e125d44b8e3b71ff8d5c94130a7ae2c915f237d","src/re_unicode.rs":"b7ae7149a651b962087c6e5111c82aa70c237313996a8d7e0e695d429427d40a","src/sparse.rs":"f59784a788555ae03fc73b0cdf4b3aec6d2f54b0edf3d9f2bed4b00171fdc52e","src/testdata/LICENSE":"58cf078acc03da3e280a938c2bd9943f554fc9b6ced89ad93ba35ca436872899","src/testdata/README":"45f869e37f798905c773bfbe0ef19a5fb7e585cbf0b7c21b5b5a784e8cec3c14","src/testdata/basic.dat":"3756a5bdd6f387ed34731197fbdaab8521b0ae1726250100ba235756cb42b4b1","src/testdata/nullsubexpr.dat":"496ac0278eec3b6d9170faace14554569032dd3d909618364d9326156de39ecf","src/testdata/repetition.dat":"1f7959063015b284b18a4a2c1c8b416d438a2d6c4b1a362da43406b865f50e69","src/utf8.rs":"1a2d7bc43ab139bfc2b2610627efd59a7ead2a959492ba73eebb743d482c7957","src/vector/avx2.rs":"1ef39371a9215144b69bf72df9aa3533ea6be44d7425cdc5c8192de79dfc5e96","src/vector/mod.rs":"fc238d33117c500381f57d2d1fbaba14bd6ab855ba3fe55304c37256b1c0e965","src/vector/ssse3.rs":"f8549244fddfcb73f538761c0ae5a81c535e5ae5e129cebf8e3e6f9db4fa79f4","tests/api.rs":"803faacd9ac5efc149959ff63a2132f5ca155f75a246b79807c549b464b5c497","tests/api_str.rs":"8ccb6c3dfe0220229ad33fcaf9dea420b414aea17c7498d978efd1b8aceaa980","tests/bytes.rs":"3564a933f12f84d65488c220d71067a9902ed9860522a7d9139a713f818a0b1c","tests/consistent.rs":"51b12bfec3ec2b49471b508dec537dbbd50823673a34a16b98e38dc3ae2a0793","tests/crates_regex.rs":"7812e91c25a2aad48ba024bcbeb8b922ffc1cfa3113a33615885d72d8a2cae64","tests/crazy.rs":"b0c593be5022341606ddb15b3d28aa39d2d52977db4b1b72c41c6133a7f7a7e0","tests/flags.rs":"cd3788760defc667b32adb2732b6657b289372e1051fc240dfd0e435e2835353","tests/fowler.rs":"e0b7420fa5b636301d4c11cd4dfb803ec09fa7b27be47c594d231167de1241e3","tests/macros.rs":"f021b62e3ce8d122f6450a5aab36972eccf4c21c62a53c604924d4d01d90c0d8","tests/macros_bytes.rs":"5574c19bff5dfa45802238b65f642605f1a8b8adc6a353660a251c80490ad68e","tests/macros_str.rs":"518bde310ceb9fb689b20294279483454601ba3a3fd7c95a04d07331f05d476d","tests/misc.rs":"c8cc85ac916980ebd053df2444fe9b795a00f2ac42c5cd828fc3df487f689265","tests/multiline.rs":"4e872a9473bc229d955716c18c77aa3530625a8f3a28ecaefdb70b9aff0f0a8b","tests/noparse.rs":"8850d31cb95e413e3a67edecce8590cd158f49779abcc2e5722381113346179c","tests/regression.rs":"4457cd8bbbc903d75fe661878b5accb92f715857f337ac5034056e8c91ff4ac3","tests/replace.rs":"a121da1d86fa39d45b6b29ccd74e4327deaf0c9c1914dc1da46e6358084e4459","tests/searcher.rs":"124c9909a1e8fcfddee8ecfae3a1fb9d76f9ddac62fda23d9b895744728a0aa8","tests/set.rs":"4f632b1f25f69af48053089a5cef272a9bb7cf0ac80277b36ae74888c7adc0df","tests/shortest_match.rs":"7ca223e0a61b1a26a1f36465ab49de021475295e18f4d6421497461af1e107be","tests/suffix_reverse.rs":"cd497c1a51246a8fc727062133470e0c6300620ad80333d20d63c0ee4224ef1c","tests/test_backtrack.rs":"b07a114b2eb7f1f17357629be9c8458e31f7952fb2c327d66d9415f08855c624","tests/test_backtrack_bytes.rs":"dd3cec3c630d6f41892c9111bee87227bf47126651b2402672c30b084fa9c28c","tests/test_backtrack_utf8bytes.rs":"b576b933d6be21f8cedb281e456441d4278350b0145a139dbccb1861639a54f9","tests/test_crates_regex.rs":"6d7f2cfade28ebab6a831282882b83e4b3d66a5171411730505e2a8bb95074a8","tests/test_default.rs":"b62d02a3653e0af14ba171b667da97f4f02165294e37bd4019439e5cafeaf656","tests/test_default_bytes.rs":"c5228278e0a1d8fab5157dfd2b52642fd0ec68db346dc133f4c16f178d63e856","tests/test_nfa.rs":"aad36ca01f3f7eb23633a1207056e9056d686be2ef6e3661fad83805fa482927","tests/test_nfa_bytes.rs":"198f7b58c5c7dd0a05f16ddb3b9b63dab29ef2a56448378ac602c5d087c01e4e","tests/test_nfa_utf8bytes.rs":"854d80114ca1bed14d4ad3f2b3bf292ff0fa44e12d7d3f2ec6dd17cbbaa82175","tests/unicode.rs":"d5750e15f8c197fc4b6b2ecfa1678d8ad39d609760392d33b3d89c449630c881","tests/word_boundary.rs":"7081317ddcec1e82dd4a2090a571c6abf2ff4bbfa8cd10395e1eb3f386157fae","tests/word_boundary_ascii.rs":"cd0be5b5b485de0ba7994b42e2864585556c3d2d8bf5eab05b58931d9aaf4b87","tests/word_boundary_unicode.rs":"75dbcc35d3abc0f9795c2ea99e216dc227b0a5b58e9ca5eef767815ff0513921"},"package":"8f0a0bcab2fd7d1d7c54fa9eae6f43eddeb9ce2e7352f8518a814a4f65d60c58"} \ No newline at end of file diff --git a/vendor/regex/CHANGELOG.md b/vendor/regex/CHANGELOG.md index 61d01b2891..2c0d370a77 100644 --- a/vendor/regex/CHANGELOG.md +++ b/vendor/regex/CHANGELOG.md @@ -1,3 +1,80 @@ +1.1.6 (2019-04-16) +================== +This release fixes a regression introduced by a bug fix (for +[BUG #557](https://github.com/rust-lang/regex/issues/557)) which could cause +the regex engine to enter an infinite loop. This bug was originally +[reported against ripgrep](https://github.com/BurntSushi/ripgrep/issues/1247). + + +1.1.5 (2019-04-01) +================== +This release fixes a bug in regex's dependency specification where it requires +a newer version of regex-syntax, but this wasn't communicated correctly in the +Cargo.toml. This would have been caught by a minimal version check, but this +check was disabled because the `rand` crate itself advertises incorrect +dependency specifications. + +Bug fixes: + +* [BUG #570](https://github.com/rust-lang/regex/pull/570): + Fix regex-syntax minimal version. + + +1.1.4 (2019-03-31) +================== +This release fixes a backwards compatibility regression where Regex was no +longer UnwindSafe. This was caused by the upgrade to aho-corasick 0.7, whose +AhoCorasick type was itself not UnwindSafe. This has been fixed in aho-corasick +0.7.4, which we now require. + +Bug fixes: + +* [BUG #568](https://github.com/rust-lang/regex/pull/568): + Fix an API regression where Regex was no longer UnwindSafe. + + +1.1.3 (2019-03-30) +================== +This releases fixes a few bugs and adds a performance improvement when a regex +is a simple alternation of literals. + +Performance improvements: + +* [OPT #566](https://github.com/rust-lang/regex/pull/566): + Upgrades `aho-corasick` to 0.7 and uses it for `foo|bar|...|quux` regexes. + +Bug fixes: + +* [BUG #527](https://github.com/rust-lang/regex/issues/527): + Fix a bug where the parser would panic on patterns like `((?x))`. +* [BUG #555](https://github.com/rust-lang/regex/issues/555): + Fix a bug where the parser would panic on patterns like `(?m){1,1}`. +* [BUG #557](https://github.com/rust-lang/regex/issues/557): + Fix a bug where captures could lead to an incorrect match. + + +1.1.2 (2019-02-27) +================== +This release fixes a bug found in the fix introduced in 1.1.1. + +Bug fixes: + +* [BUG edf45e6f](https://github.com/rust-lang/regex/commit/edf45e6f): + Fix bug introduced in reverse suffix literal matcher in the 1.1.1 release. + + +1.1.1 (2019-02-27) +================== +This is a small release with one fix for a bug caused by literal optimizations. + +Bug fixes: + +* [BUG 661bf53d](https://github.com/rust-lang/regex/commit/661bf53d): + Fixes a bug in the reverse suffix literal optimization. This was originally + reported + [against ripgrep](https://github.com/BurntSushi/ripgrep/issues/1203). + + 1.1.0 (2018-11-30) ================== This is a small release with a couple small enhancements. This release also diff --git a/vendor/regex/Cargo.toml b/vendor/regex/Cargo.toml index cf1a1d9e1d..1dd95e7d3a 100644 --- a/vendor/regex/Cargo.toml +++ b/vendor/regex/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,7 +12,7 @@ [package] name = "regex" -version = "1.1.0" +version = "1.1.6" authors = ["The Rust Project Developers"] exclude = ["/.travis.yml", "/appveyor.yml", "/ci/*", "/scripts/*"] autotests = false @@ -71,13 +71,13 @@ path = "tests/test_backtrack_bytes.rs" name = "crates-regex" path = "tests/test_crates_regex.rs" [dependencies.aho-corasick] -version = "0.6.7" +version = "0.7.3" [dependencies.memchr] version = "2.0.2" [dependencies.regex-syntax] -version = "0.6.2" +version = "0.6.6" [dependencies.thread_local] version = "0.3.6" @@ -92,7 +92,7 @@ version = "0.7" default-features = false [dev-dependencies.rand] -version = "0.5" +version = "0.6.5" [features] default = ["use_std"] diff --git a/vendor/regex/README.md b/vendor/regex/README.md index d90c00fc1d..f281234599 100644 --- a/vendor/regex/README.md +++ b/vendor/regex/README.md @@ -7,11 +7,11 @@ linear time with respect to the size of the regular expression and search text. Much of the syntax and implementation is inspired by [RE2](https://github.com/google/re2). -[![Build Status](https://travis-ci.org/rust-lang/regex.svg?branch=master)](https://travis-ci.org/rust-lang/regex) +[![Build Status](https://travis-ci.com/rust-lang/regex.svg?branch=master)](https://travis-ci.com/rust-lang/regex) [![Build status](https://ci.appveyor.com/api/projects/status/github/rust-lang/regex?svg=true)](https://ci.appveyor.com/project/rust-lang-libs/regex) [![Coverage Status](https://coveralls.io/repos/github/rust-lang/regex/badge.svg?branch=master)](https://coveralls.io/github/rust-lang/regex?branch=master) -[![](http://meritbadge.herokuapp.com/regex)](https://crates.io/crates/regex) -[![Rust](https://img.shields.io/badge/rust-1.20%2B-blue.svg?maxAge=3600)](https://github.com/rust-lang/regex) +[![](https://meritbadge.herokuapp.com/regex)](https://crates.io/crates/regex) +[![Rust](https://img.shields.io/badge/rust-1.24.1%2B-blue.svg?maxAge=3600)](https://github.com/rust-lang/regex) ### Documentation @@ -32,7 +32,7 @@ Add this to your `Cargo.toml`: regex = "1" ``` -and this to your crate root: +and this to your crate root (if you're using Rust 2015): ```rust extern crate regex; @@ -42,8 +42,6 @@ Here's a simple example that matches a date in YYYY-MM-DD format and prints the year, month and day: ```rust -extern crate regex; - use regex::Regex; fn main() { @@ -66,8 +64,6 @@ If you have lots of dates in text that you'd like to iterate over, then it's easy to adapt the above example with an iterator: ```rust -extern crate regex; - use regex::Regex; const TO_SEARCH: &'static str = " @@ -112,9 +108,6 @@ regular expressions are compiled exactly once. For example: ```rust -#[macro_use] extern crate lazy_static; -extern crate regex; - use regex::Regex; fn some_helper_function(text: &str) -> bool { diff --git a/vendor/regex/build.rs b/vendor/regex/build.rs index 9440ab92d7..f45e3c7fc5 100644 --- a/vendor/regex/build.rs +++ b/vendor/regex/build.rs @@ -3,36 +3,29 @@ use std::ffi::OsString; use std::process::Command; fn main() { - let rustc = env::var_os("RUSTC").unwrap_or(OsString::from("rustc")); - let output = Command::new(&rustc) - .arg("--version") - .output() - .unwrap() - .stdout; - let version = String::from_utf8(output).unwrap(); - - enable_simd_optimizations(&version); + let version = match Version::read() { + Ok(version) => version, + Err(err) => { + eprintln!("failed to parse `rustc --version`: {}", err); + return; + } + }; + enable_simd_optimizations(version); } -fn enable_simd_optimizations(version: &str) { +fn enable_simd_optimizations(version: Version) { // We don't activate SIMD optimizations these if we've explicitly disabled // them. Disabling auto optimizations is intended for use in tests, so that // we can reliably test fallback implementations. if env::var_os("CARGO_CFG_REGEX_DISABLE_AUTO_OPTIMIZATIONS").is_some() { return; } - let parsed = match Version::parse(&version) { - Ok(parsed) => parsed, - Err(err) => { - eprintln!("failed to parse `rustc --version`: {}", err); - return; - } - }; - let minimum = Version { major: 1, minor: 27, patch: 0 }; - if version.contains("nightly") || parsed >= minimum { - println!("cargo:rustc-cfg=regex_runtime_teddy_ssse3"); - println!("cargo:rustc-cfg=regex_runtime_teddy_avx2"); + if version < (Version { major: 1, minor: 27, patch: 0 }) { + return; } + + println!("cargo:rustc-cfg=regex_runtime_teddy_ssse3"); + println!("cargo:rustc-cfg=regex_runtime_teddy_avx2"); } #[derive(Clone, Copy, Debug, Eq, PartialEq, PartialOrd, Ord)] @@ -43,6 +36,16 @@ struct Version { } impl Version { + fn read() -> Result<Version, String> { + let rustc = env::var_os("RUSTC").unwrap_or(OsString::from("rustc")); + let output = Command::new(&rustc) + .arg("--version") + .output() + .unwrap() + .stdout; + Version::parse(&String::from_utf8(output).unwrap()) + } + fn parse(mut s: &str) -> Result<Version, String> { if !s.starts_with("rustc ") { return Err(format!("unrecognized version string: {}", s)); diff --git a/vendor/regex/src/backtrack.rs b/vendor/regex/src/backtrack.rs index 6e71e2c2f3..13cdbb62b2 100644 --- a/vendor/regex/src/backtrack.rs +++ b/vendor/regex/src/backtrack.rs @@ -98,6 +98,7 @@ impl<'a, 'm, 'r, 's, I: Input> Bounded<'a, 'm, 'r, 's, I> { slots: &'s mut [Slot], input: I, start: usize, + end: usize, ) -> bool { let mut cache = cache.borrow_mut(); let cache = &mut cache.backtrack; @@ -109,7 +110,7 @@ impl<'a, 'm, 'r, 's, I: Input> Bounded<'a, 'm, 'r, 's, I> { slots: slots, m: cache, }; - b.exec_(start) + b.exec_(start, end) } /// Clears the cache such that the backtracking engine can be executed @@ -147,7 +148,7 @@ impl<'a, 'm, 'r, 's, I: Input> Bounded<'a, 'm, 'r, 's, I> { /// Start backtracking at the given position in the input, but also look /// for literal prefixes. - fn exec_(&mut self, mut at: InputAt) -> bool { + fn exec_(&mut self, mut at: InputAt, end: usize) -> bool { self.clear(); // If this is an anchored regex at the beginning of the input, then // we're either already done or we only need to try backtracking once. @@ -170,7 +171,7 @@ impl<'a, 'm, 'r, 's, I: Input> Bounded<'a, 'm, 'r, 's, I> { if matched && self.prog.matches.len() == 1 { return true; } - if at.is_end() { + if at.pos() == end || at.is_end() { break; } at = self.input.at(at.next_pos()); diff --git a/vendor/regex/src/exec.rs b/vendor/regex/src/exec.rs index 52d970f801..e15d0b09fe 100644 --- a/vendor/regex/src/exec.rs +++ b/vendor/regex/src/exec.rs @@ -10,9 +10,9 @@ use std::cell::RefCell; use std::collections::HashMap; -use std::cmp; use std::sync::Arc; +use aho_corasick::{AhoCorasick, AhoCorasickBuilder, MatchKind}; use thread_local::CachedThreadLocal; use syntax::ParserBuilder; use syntax::hir::Hir; @@ -86,6 +86,16 @@ struct ExecReadOnly { /// Prefix literals are stored on the `Program`, since they are used inside /// the matching engines. suffixes: LiteralSearcher, + /// An Aho-Corasick automaton with leftmost-first match semantics. + /// + /// This is only set when the entire regex is a simple unanchored + /// alternation of literals. We could probably use it more circumstances, + /// but this is already hacky enough in this architecture. + /// + /// N.B. We use u32 as a state ID representation under the assumption that + /// if we were to exhaust the ID space, we probably would have long + /// surpassed the compilation size limit. + ac: Option<AhoCorasick<u32>>, /// match_type encodes as much upfront knowledge about how we're going to /// execute a search as possible. match_type: MatchType, @@ -287,6 +297,7 @@ impl ExecBuilder { dfa: Program::new(), dfa_reverse: Program::new(), suffixes: LiteralSearcher::empty(), + ac: None, match_type: MatchType::Nothing, }); return Ok(Exec { ro: ro, cache: CachedThreadLocal::new() }); @@ -319,12 +330,32 @@ impl ExecBuilder { dfa.dfa_size_limit = self.options.dfa_size_limit; dfa_reverse.dfa_size_limit = self.options.dfa_size_limit; + let mut ac = None; + if parsed.exprs.len() == 1 { + if let Some(lits) = alternation_literals(&parsed.exprs[0]) { + // If we have a small number of literals, then let Teddy + // handle things (see literal/mod.rs). + if lits.len() > 32 { + let fsm = AhoCorasickBuilder::new() + .match_kind(MatchKind::LeftmostFirst) + .auto_configure(&lits) + // We always want this to reduce size, regardless of + // what auto-configure does. + .byte_classes(true) + .build_with_size::<u32, _, _>(&lits) + .expect("AC automaton too big"); + ac = Some(fsm); + } + } + } + let mut ro = ExecReadOnly { res: self.options.pats, nfa: nfa, dfa: dfa, dfa_reverse: dfa_reverse, suffixes: LiteralSearcher::suffixes(suffixes), + ac: ac, match_type: MatchType::Nothing, }; ro.match_type = ro.choose_match_type(self.match_type); @@ -557,7 +588,8 @@ impl<'c> RegularExpression for ExecNoSync<'c> { match self.ro.match_type { MatchType::Literal(ty) => { self.find_literals(ty, text, start).and_then(|(s, e)| { - self.captures_nfa_with_match(slots, text, s, e) + self.captures_nfa_type( + MatchNfaType::Auto, slots, text, s, e) }) } MatchType::Dfa => { @@ -566,17 +598,21 @@ impl<'c> RegularExpression for ExecNoSync<'c> { } else { match self.find_dfa_forward(text, start) { dfa::Result::Match((s, e)) => { - self.captures_nfa_with_match(slots, text, s, e) + self.captures_nfa_type( + MatchNfaType::Auto, slots, text, s, e) } dfa::Result::NoMatch(_) => None, - dfa::Result::Quit => self.captures_nfa(slots, text, start), + dfa::Result::Quit => { + self.captures_nfa(slots, text, start) + } } } } MatchType::DfaAnchoredReverse => { match self.find_dfa_anchored_reverse(text, start) { dfa::Result::Match((s, e)) => { - self.captures_nfa_with_match(slots, text, s, e) + self.captures_nfa_type( + MatchNfaType::Auto, slots, text, s, e) } dfa::Result::NoMatch(_) => None, dfa::Result::Quit => self.captures_nfa(slots, text, start), @@ -585,14 +621,15 @@ impl<'c> RegularExpression for ExecNoSync<'c> { MatchType::DfaSuffix => { match self.find_dfa_reverse_suffix(text, start) { dfa::Result::Match((s, e)) => { - self.captures_nfa_with_match(slots, text, s, e) + self.captures_nfa_type( + MatchNfaType::Auto, slots, text, s, e) } dfa::Result::NoMatch(_) => None, dfa::Result::Quit => self.captures_nfa(slots, text, start), } } MatchType::Nfa(ty) => { - self.captures_nfa_type(ty, slots, text, start) + self.captures_nfa_type(ty, slots, text, start, text.len()) } MatchType::Nothing => None, MatchType::DfaMany => { @@ -633,6 +670,11 @@ impl<'c> ExecNoSync<'c> { lits.find_end(&text[start..]) .map(|(s, e)| (start + s, start + e)) } + AhoCorasick => { + self.ro.ac.as_ref().unwrap() + .find(&text[start..]) + .map(|m| (start + m.start(), start + m.end())) + } } } @@ -745,12 +787,13 @@ impl<'c> ExecNoSync<'c> { debug_assert!(lcs.len() >= 1); let mut start = original_start; let mut end = start; + let mut last_literal = start; while end <= text.len() { - start = end; - end += match lcs.find(&text[end..]) { + last_literal += match lcs.find(&text[last_literal..]) { None => return Some(NoMatch(text.len())), - Some(start) => start + lcs.len(), + Some(i) => i, }; + end = last_literal + lcs.len(); match dfa::Fsm::reverse( &self.ro.dfa_reverse, self.cache, @@ -759,8 +802,12 @@ impl<'c> ExecNoSync<'c> { end - start, ) { Match(0) | NoMatch(0) => return None, - Match(s) => return Some(Match((s + start, end))), - NoMatch(_) => continue, + Match(i) => return Some(Match((start + i, end))), + NoMatch(i) => { + start += i; + last_literal += 1; + continue; + } Quit => return Some(Quit), }; } @@ -825,7 +872,7 @@ impl<'c> ExecNoSync<'c> { text: &[u8], start: usize, ) -> bool { - self.exec_nfa(ty, &mut [false], &mut [], true, text, start) + self.exec_nfa(ty, &mut [false], &mut [], true, text, start, text.len()) } /// Finds the shortest match using an NFA. @@ -841,7 +888,15 @@ impl<'c> ExecNoSync<'c> { start: usize, ) -> Option<usize> { let mut slots = [None, None]; - if self.exec_nfa(ty, &mut [false], &mut slots, true, text, start) { + if self.exec_nfa( + ty, + &mut [false], + &mut slots, + true, + text, + start, + text.len() + ) { slots[1] } else { None @@ -856,7 +911,15 @@ impl<'c> ExecNoSync<'c> { start: usize, ) -> Option<(usize, usize)> { let mut slots = [None, None]; - if self.exec_nfa(ty, &mut [false], &mut slots, false, text, start) { + if self.exec_nfa( + ty, + &mut [false], + &mut slots, + false, + text, + start, + text.len() + ) { match (slots[0], slots[1]) { (Some(s), Some(e)) => Some((s, e)), _ => None, @@ -866,26 +929,6 @@ impl<'c> ExecNoSync<'c> { } } - /// Like find_nfa, but fills in captures and restricts the search space - /// using previously found match information. - /// - /// `slots` should have length equal to `2 * nfa.captures.len()`. - fn captures_nfa_with_match( - &self, - slots: &mut [Slot], - text: &[u8], - match_start: usize, - match_end: usize, - ) -> Option<(usize, usize)> { - // We can't use match_end directly, because we may need to examine one - // "character" after the end of a match for lookahead operators. We - // need to move two characters beyond the end, since some look-around - // operations may falsely assume a premature end of text otherwise. - let e = cmp::min( - next_utf8(text, next_utf8(text, match_end)), text.len()); - self.captures_nfa(slots, &text[..e], match_start) - } - /// Like find_nfa, but fills in captures. /// /// `slots` should have length equal to `2 * nfa.captures.len()`. @@ -895,7 +938,8 @@ impl<'c> ExecNoSync<'c> { text: &[u8], start: usize, ) -> Option<(usize, usize)> { - self.captures_nfa_type(MatchNfaType::Auto, slots, text, start) + self.captures_nfa_type( + MatchNfaType::Auto, slots, text, start, text.len()) } /// Like captures_nfa, but allows specification of type of NFA engine. @@ -905,8 +949,9 @@ impl<'c> ExecNoSync<'c> { slots: &mut [Slot], text: &[u8], start: usize, + end: usize, ) -> Option<(usize, usize)> { - if self.exec_nfa(ty, &mut [false], slots, false, text, start) { + if self.exec_nfa(ty, &mut [false], slots, false, text, start, end) { match (slots[0], slots[1]) { (Some(s), Some(e)) => Some((s, e)), _ => None, @@ -924,6 +969,7 @@ impl<'c> ExecNoSync<'c> { quit_after_match: bool, text: &[u8], start: usize, + end: usize, ) -> bool { use self::MatchNfaType::*; if let Auto = ty { @@ -935,10 +981,10 @@ impl<'c> ExecNoSync<'c> { } match ty { Auto => unreachable!(), - Backtrack => self.exec_backtrack(matches, slots, text, start), + Backtrack => self.exec_backtrack(matches, slots, text, start, end), PikeVM => { self.exec_pikevm( - matches, slots, quit_after_match, text, start) + matches, slots, quit_after_match, text, start, end) } } } @@ -951,6 +997,7 @@ impl<'c> ExecNoSync<'c> { quit_after_match: bool, text: &[u8], start: usize, + end: usize, ) -> bool { if self.ro.nfa.uses_bytes() { pikevm::Fsm::exec( @@ -960,7 +1007,8 @@ impl<'c> ExecNoSync<'c> { slots, quit_after_match, ByteInput::new(text, self.ro.nfa.only_utf8), - start) + start, + end) } else { pikevm::Fsm::exec( &self.ro.nfa, @@ -969,7 +1017,8 @@ impl<'c> ExecNoSync<'c> { slots, quit_after_match, CharInput::new(text), - start) + start, + end) } } @@ -980,6 +1029,7 @@ impl<'c> ExecNoSync<'c> { slots: &mut [Slot], text: &[u8], start: usize, + end: usize, ) -> bool { if self.ro.nfa.uses_bytes() { backtrack::Bounded::exec( @@ -988,7 +1038,8 @@ impl<'c> ExecNoSync<'c> { matches, slots, ByteInput::new(text, self.ro.nfa.only_utf8), - start) + start, + end) } else { backtrack::Bounded::exec( &self.ro.nfa, @@ -996,7 +1047,8 @@ impl<'c> ExecNoSync<'c> { matches, slots, CharInput::new(text), - start) + start, + end) } } @@ -1040,11 +1092,15 @@ impl<'c> ExecNoSync<'c> { &mut [], false, text, - start) + start, + text.len()) } } } - Nfa(ty) => self.exec_nfa(ty, matches, &mut [], false, text, start), + Nfa(ty) => { + self.exec_nfa( + ty, matches, &mut [], false, text, start, text.len()) + } Nothing => false, } } @@ -1076,7 +1132,9 @@ impl Exec { /// Get a searcher that isn't Sync. #[inline(always)] // reduces constant overhead pub fn searcher(&self) -> ExecNoSync { - let create = || Box::new(RefCell::new(ProgramCacheInner::new(&self.ro))); + let create = || { + Box::new(RefCell::new(ProgramCacheInner::new(&self.ro))) + }; ExecNoSync { ro: &self.ro, // a clone is too expensive here! (and not needed) cache: self.cache.get_or(create), @@ -1158,6 +1216,9 @@ impl ExecReadOnly { // aren't anchored. We would then only search for all of them when at // the beginning of the input and use the subset in all other cases. if self.res.len() == 1 { + if self.ac.is_some() { + return Literal(MatchLiteralType::AhoCorasick); + } if self.nfa.prefixes.complete() { return if self.nfa.is_anchored_start { Literal(MatchLiteralType::AnchoredStart) @@ -1249,6 +1310,9 @@ enum MatchLiteralType { AnchoredStart, /// Match literals only at the end of text. AnchoredEnd, + /// Use an Aho-Corasick automaton. This requires `ac` to be Some on + /// ExecReadOnly. + AhoCorasick, } #[derive(Clone, Copy, Debug)] @@ -1290,6 +1354,59 @@ impl ProgramCacheInner { } } +/// Alternation literals checks if the given HIR is a simple alternation of +/// literals, and if so, returns them. Otherwise, this returns None. +fn alternation_literals(expr: &Hir) -> Option<Vec<Vec<u8>>> { + use syntax::hir::{HirKind, Literal}; + + // This is pretty hacky, but basically, if `is_alternation_literal` is + // true, then we can make several assumptions about the structure of our + // HIR. This is what justifies the `unreachable!` statements below. + // + // This code should be refactored once we overhaul this crate's + // optimization pipeline, because this is a terribly inflexible way to go + // about things. + + if !expr.is_alternation_literal() { + return None; + } + let alts = match *expr.kind() { + HirKind::Alternation(ref alts) => alts, + _ => return None, // one literal isn't worth it + }; + + let extendlit = |lit: &Literal, dst: &mut Vec<u8>| { + match *lit { + Literal::Unicode(c) => { + let mut buf = [0; 4]; + dst.extend_from_slice(c.encode_utf8(&mut buf).as_bytes()); + } + Literal::Byte(b) => { + dst.push(b); + } + } + }; + + let mut lits = vec![]; + for alt in alts { + let mut lit = vec![]; + match *alt.kind() { + HirKind::Literal(ref x) => extendlit(x, &mut lit), + HirKind::Concat(ref exprs) => { + for e in exprs { + match *e.kind() { + HirKind::Literal(ref x) => extendlit(x, &mut lit), + _ => unreachable!("expected literal, got {:?}", e), + } + } + } + _ => unreachable!("expected literal or concat, got {:?}", alt), + } + lits.push(lit); + } + Some(lits) +} + #[cfg(test)] mod test { #[test] diff --git a/vendor/regex/src/lib.rs b/vendor/regex/src/lib.rs index 75c5c8b42e..4ea9f99a2d 100644 --- a/vendor/regex/src/lib.rs +++ b/vendor/regex/src/lib.rs @@ -143,7 +143,7 @@ provides more flexibility than is seen here. (See the documentation for `Regex::replace` for more details.) Note that if your regex gets complicated, you can use the `x` flag to -enable insigificant whitespace mode, which also lets you write comments: +enable insignificant whitespace mode, which also lets you write comments: ```rust # extern crate regex; use regex::Regex; diff --git a/vendor/regex/src/literal/mod.rs b/vendor/regex/src/literal/mod.rs index de1bd5339b..abafe35fa1 100644 --- a/vendor/regex/src/literal/mod.rs +++ b/vendor/regex/src/literal/mod.rs @@ -11,7 +11,7 @@ use std::cmp; use std::mem; -use aho_corasick::{Automaton, AcAutomaton, FullAcAutomaton}; +use aho_corasick::{AhoCorasick, AhoCorasickBuilder}; use memchr::{memchr, memchr2, memchr3}; use syntax::hir::literal::{Literal, Literals}; @@ -46,7 +46,7 @@ enum Matcher { /// A single substring, find using Boyer-Moore. BoyerMoore(BoyerMooreSearch), /// An Aho-Corasick automaton. - AC(FullAcAutomaton<Literal>), + AC { ac: AhoCorasick<u32>, lits: Vec<Literal> }, /// A simd accelerated multiple string matcher. Used only for a small /// number of small literals. TeddySSSE3(TeddySSSE3), @@ -102,7 +102,9 @@ impl LiteralSearcher { Bytes(ref sset) => sset.find(haystack).map(|i| (i, i + 1)), FreqyPacked(ref s) => s.find(haystack).map(|i| (i, i + s.len())), BoyerMoore(ref s) => s.find(haystack).map(|i| (i, i + s.len())), - AC(ref aut) => aut.find(haystack).next().map(|m| (m.start, m.end)), + AC { ref ac, .. } => { + ac.find(haystack).map(|m| (m.start(), m.end())) + } TeddySSSE3(ref t) => t.find(haystack).map(|m| (m.start, m.end)), TeddyAVX2(ref t) => t.find(haystack).map(|m| (m.start, m.end)), } @@ -141,7 +143,7 @@ impl LiteralSearcher { Matcher::Bytes(ref sset) => LiteralIter::Bytes(&sset.dense), Matcher::FreqyPacked(ref s) => LiteralIter::Single(&s.pat), Matcher::BoyerMoore(ref s) => LiteralIter::Single(&s.pattern), - Matcher::AC(ref ac) => LiteralIter::AC(ac.patterns()), + Matcher::AC { ref lits, .. } => LiteralIter::AC(lits), Matcher::TeddySSSE3(ref ted) => { LiteralIter::TeddySSSE3(ted.patterns()) } @@ -174,7 +176,7 @@ impl LiteralSearcher { Bytes(ref sset) => sset.dense.len(), FreqyPacked(_) => 1, BoyerMoore(_) => 1, - AC(ref aut) => aut.len(), + AC { ref ac, .. } => ac.pattern_count(), TeddySSSE3(ref ted) => ted.len(), TeddyAVX2(ref ted) => ted.len(), } @@ -188,7 +190,7 @@ impl LiteralSearcher { Bytes(ref sset) => sset.approximate_size(), FreqyPacked(ref single) => single.approximate_size(), BoyerMoore(ref single) => single.approximate_size(), - AC(ref aut) => aut.heap_bytes(), + AC { ref ac, .. } => ac.heap_bytes(), TeddySSSE3(ref ted) => ted.approximate_size(), TeddyAVX2(ref ted) => ted.approximate_size(), } @@ -258,7 +260,11 @@ impl Matcher { // Fallthrough to ol' reliable Aho-Corasick... } let pats = lits.literals().to_owned(); - Matcher::AC(AcAutomaton::new(pats).into_full()) + let ac = AhoCorasickBuilder::new() + .dfa(true) + .build_with_size::<u32, _, _>(&pats) + .unwrap(); + Matcher::AC { ac, lits: pats } } } @@ -772,8 +778,6 @@ impl BoyerMooreSearch { mut window_end: usize, backstop: usize, ) -> Option<usize> { - use std::mem; - let window_end_snapshot = window_end; let skip_of = |we: usize| -> usize { // Unsafe might make this faster, but the benchmarks diff --git a/vendor/regex/src/literal/teddy_avx2/imp.rs b/vendor/regex/src/literal/teddy_avx2/imp.rs index 62015d07d2..3be0b1500f 100644 --- a/vendor/regex/src/literal/teddy_avx2/imp.rs +++ b/vendor/regex/src/literal/teddy_avx2/imp.rs @@ -9,7 +9,7 @@ basically the same as the SSSE3 version, but using 256-bit vectors instead of use std::cmp; -use aho_corasick::{Automaton, AcAutomaton, FullAcAutomaton}; +use aho_corasick::{AhoCorasick, AhoCorasickBuilder}; use syntax::hir::literal::Literals; use vector::avx2::{AVX2VectorBuilder, u8x32}; @@ -38,7 +38,7 @@ pub struct Teddy { pats: Vec<Vec<u8>>, /// An Aho-Corasick automaton of the patterns. We use this when we need to /// search pieces smaller than the Teddy block size. - ac: FullAcAutomaton<Vec<u8>>, + ac: AhoCorasick, /// A set of 8 buckets. Each bucket corresponds to a single member of a /// bitset. A bucket contains zero or more substrings. This is useful /// when the number of substrings exceeds 8, since our bitsets cannot have @@ -88,10 +88,14 @@ impl Teddy { buckets[bucket].push(pati); masks.add(bucket as u8, pat); } + let ac = AhoCorasickBuilder::new() + .dfa(true) + .prefilter(false) + .build(&pats); Some(Teddy { vb: vb, pats: pats.to_vec(), - ac: AcAutomaton::new(pats.to_vec()).into_full(), + ac: ac, buckets: buckets, masks: masks, }) @@ -341,11 +345,11 @@ impl Teddy { /// block based approach. #[inline(never)] fn slow(&self, haystack: &[u8], pos: usize) -> Option<Match> { - self.ac.find(&haystack[pos..]).next().map(|m| { + self.ac.find(&haystack[pos..]).map(|m| { Match { - pat: m.pati, - start: pos + m.start, - end: pos + m.end, + pat: m.pattern(), + start: pos + m.start(), + end: pos + m.end(), } }) } diff --git a/vendor/regex/src/literal/teddy_ssse3/imp.rs b/vendor/regex/src/literal/teddy_ssse3/imp.rs index 85422b6409..c3dc31e04b 100644 --- a/vendor/regex/src/literal/teddy_ssse3/imp.rs +++ b/vendor/regex/src/literal/teddy_ssse3/imp.rs @@ -320,7 +320,7 @@ References use std::cmp; -use aho_corasick::{Automaton, AcAutomaton, FullAcAutomaton}; +use aho_corasick::{AhoCorasick, AhoCorasickBuilder}; use syntax::hir::literal::Literals; use vector::ssse3::{SSSE3VectorBuilder, u8x16}; @@ -349,7 +349,7 @@ pub struct Teddy { pats: Vec<Vec<u8>>, /// An Aho-Corasick automaton of the patterns. We use this when we need to /// search pieces smaller than the Teddy block size. - ac: FullAcAutomaton<Vec<u8>>, + ac: AhoCorasick, /// A set of 8 buckets. Each bucket corresponds to a single member of a /// bitset. A bucket contains zero or more substrings. This is useful /// when the number of substrings exceeds 8, since our bitsets cannot have @@ -399,10 +399,14 @@ impl Teddy { buckets[bucket].push(pati); masks.add(bucket as u8, pat); } + let ac = AhoCorasickBuilder::new() + .dfa(true) + .prefilter(false) + .build(&pats); Some(Teddy { vb: vb, pats: pats.to_vec(), - ac: AcAutomaton::new(pats.to_vec()).into_full(), + ac: ac, buckets: buckets, masks: masks, }) @@ -651,11 +655,11 @@ impl Teddy { /// block based approach. #[inline(never)] fn slow(&self, haystack: &[u8], pos: usize) -> Option<Match> { - self.ac.find(&haystack[pos..]).next().map(|m| { + self.ac.find(&haystack[pos..]).map(|m| { Match { - pat: m.pati, - start: pos + m.start, - end: pos + m.end, + pat: m.pattern(), + start: pos + m.start(), + end: pos + m.end(), } }) } diff --git a/vendor/regex/src/pikevm.rs b/vendor/regex/src/pikevm.rs index 80d44717ae..72f2b3cc84 100644 --- a/vendor/regex/src/pikevm.rs +++ b/vendor/regex/src/pikevm.rs @@ -107,6 +107,7 @@ impl<'r, I: Input> Fsm<'r, I> { quit_after_match: bool, input: I, start: usize, + end: usize, ) -> bool { let mut cache = cache.borrow_mut(); let cache = &mut cache.pikevm; @@ -124,6 +125,7 @@ impl<'r, I: Input> Fsm<'r, I> { slots, quit_after_match, at, + end, ) } @@ -135,6 +137,7 @@ impl<'r, I: Input> Fsm<'r, I> { slots: &mut [Slot], quit_after_match: bool, mut at: InputAt, + end: usize, ) -> bool { let mut matched = false; let mut all_matched = false; @@ -212,7 +215,7 @@ impl<'r, I: Input> Fsm<'r, I> { } } } - if at.is_end() { + if at.pos() == end || at.is_end() { break; } at = at_next; diff --git a/vendor/regex/tests/regression.rs b/vendor/regex/tests/regression.rs index bda63f0bcd..bc3eac2554 100644 --- a/vendor/regex/tests/regression.rs +++ b/vendor/regex/tests/regression.rs @@ -14,6 +14,18 @@ fn regression_many_repeat_stack_overflow() { assert_eq!(vec![(0, 1)], findall!(re, "a")); } +// See: https://github.com/rust-lang/regex/issues/555 +#[test] +fn regression_invalid_repetition_expr() { + assert!(regex_new!("(?m){1,1}").is_err()); +} + +// See: https://github.com/rust-lang/regex/issues/527 +#[test] +fn regression_invalid_flags_expression() { + assert!(regex_new!("(((?x)))").is_ok()); +} + // See: https://github.com/rust-lang/regex/issues/75 mat!(regression_unsorted_binary_search_1, r"(?i)[a_]+", "A_", Some((0, 2))); mat!(regression_unsorted_binary_search_2, r"(?i)[A_]+", "a_", Some((0, 2))); @@ -82,9 +94,19 @@ mat!(wb_start_x, r"(?u:\b)^(?-u:X)", "X", Some((0, 1))); ismatch!(strange_anchor_non_complete_prefix, r"a^{2}", "", false); ismatch!(strange_anchor_non_complete_suffix, r"${2}a", "", false); +// See: https://github.com/BurntSushi/ripgrep/issues/1203 +ismatch!(reverse_suffix1, r"[0-4][0-4][0-4]000", "153.230000", true); +ismatch!(reverse_suffix2, r"\d\d\d000", "153.230000\n", true); +matiter!(reverse_suffix3, r"\d\d\d000", "153.230000\n", (4, 10)); + // See: https://github.com/rust-lang/regex/issues/334 -mat!(captures_after_dfa_premature_end, r"a(b*(X|$))?", "abcbX", +// See: https://github.com/rust-lang/regex/issues/557 +mat!(captures_after_dfa_premature_end1, r"a(b*(X|$))?", "abcbX", + Some((0, 1)), None, None); +mat!(captures_after_dfa_premature_end2, r"a(bc*(X|$))?", "abcbX", Some((0, 1)), None, None); +mat!(captures_after_dfa_premature_end3, r"(aa$)?", "aaz", + Some((0, 0))); // See: https://github.com/rust-lang/regex/issues/437 ismatch!( @@ -109,3 +131,20 @@ ismatch!( \u{10}\u{11}\u{12}\u{13}\u{14}\u{15}\u{16}\u{17}\ \u{18}\u{19}\u{1a}\u{1b}\u{1c}\u{1d}\u{1e}\u{1f}", true); + +// Tests that our Aho-Corasick optimization works correctly. It only +// kicks in when we have >32 literals. +mat!( + ahocorasick1, + "samwise|sam|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|\ + A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z", + "samwise", + Some((0, 7)) +); + +// See: https://github.com/BurntSushi/ripgrep/issues/1247 +#[test] +fn regression_nfa_stops1() { + let re = ::regex::bytes::Regex::new(r"\bs(?:[ab])").unwrap(); + assert_eq!(0, re.find_iter(b"s\xE4").count()); +} diff --git a/vendor/regex/tests/test_default.rs b/vendor/regex/tests/test_default.rs index 0f8a0c2dba..cff213b63c 100644 --- a/vendor/regex/tests/test_default.rs +++ b/vendor/regex/tests/test_default.rs @@ -85,3 +85,37 @@ fn disallow_octal() { fn allow_octal() { assert!(regex::RegexBuilder::new(r"\0").octal(true).build().is_ok()); } + +#[test] +fn oibits() { + use std::panic::UnwindSafe; + use regex::{Regex, RegexBuilder}; + use regex::bytes; + + fn assert_send<T: Send>() {} + fn assert_sync<T: Sync>() {} + fn assert_unwind_safe<T: UnwindSafe>() {} + + assert_send::<Regex>(); + assert_sync::<Regex>(); + assert_unwind_safe::<Regex>(); + assert_send::<RegexBuilder>(); + assert_sync::<RegexBuilder>(); + assert_unwind_safe::<RegexBuilder>(); + + assert_send::<bytes::Regex>(); + assert_sync::<bytes::Regex>(); + assert_unwind_safe::<bytes::Regex>(); + assert_send::<bytes::RegexBuilder>(); + assert_sync::<bytes::RegexBuilder>(); + assert_unwind_safe::<bytes::RegexBuilder>(); +} + +// See: https://github.com/rust-lang/regex/issues/568 +#[test] +fn oibits_regression() { + use std::panic; + use regex::Regex; + + let _ = panic::catch_unwind(|| Regex::new("a").unwrap()); +} diff --git a/vendor/rls-data/.cargo-checksum.json b/vendor/rls-data/.cargo-checksum.json index 805ee6f073..4ef5eb8ca6 100644 --- a/vendor/rls-data/.cargo-checksum.json +++ b/vendor/rls-data/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"9a006d746bbd3e389628fc8e24c51835c79198e641430d3ec2b59b15263b892f","README.md":"7bbd124ce5419c1a600dc4d10091f3c822a1b9a7ab51713c53f900e34126ecdf","src/config.rs":"dbfa4ae1db5f6096d88965d5c8fcac937fdf20065f582ffa56c9a1fac65603fd","src/lib.rs":"c395e03e8559efc117e2f27daf44096ae265ef646f6f1a0d30dea4961cd916e2"},"package":"5f80b84551b32e26affaf7f12374913b5061730c0dcd185d9e8fa5a15e36e65c"} \ No newline at end of file +{"files":{"Cargo.toml":"c94d9438412599480a463b2f37dc544f5bd2eb5c2f74f30f1f0c0732671b842a","README.md":"7bbd124ce5419c1a600dc4d10091f3c822a1b9a7ab51713c53f900e34126ecdf","src/config.rs":"c164da37bfc67cfd03d37e261df5c54bbc9f4e1352d4c2a3cc80d7a6e7a25b62","src/lib.rs":"2785be94cbb4d1540fc3be0c562156443b8ea4ce2108121d182a45d231f93d9a","src/serde_expanded.rs":"d0d5d45d68de663c4e4c2cc7bc081a474fb009f3db418f7cd4bbcf09fb0266ff"},"package":"76c72ea97e045be5f6290bb157ebdc5ee9f2b093831ff72adfaf59025cf5c491"} \ No newline at end of file diff --git a/vendor/rls-data/Cargo.toml b/vendor/rls-data/Cargo.toml index 50124a5635..3e49130099 100644 --- a/vendor/rls-data/Cargo.toml +++ b/vendor/rls-data/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -11,30 +11,24 @@ # will likely look very different (and much more reasonable) [package] +edition = "2018" name = "rls-data" -version = "0.18.2" +version = "0.19.0" authors = ["Nick Cameron <ncameron@mozilla.com>"] description = "Data structures used by the RLS and Rust compiler" categories = ["development-tools"] license = "Apache-2.0/MIT" -repository = "https://github.com/rust-dev-tools/rls-data" +repository = "https://github.com/rust-lang/rls" [dependencies.rls-span] -version = "0.4.1" - -[dependencies.rustc-serialize] -version = "0.3" -optional = true +version = "0.5.0" [dependencies.serde] version = "1.0" -optional = true [dependencies.serde_derive] version = "1.0" optional = true [features] -borrows = [] -default = ["serialize-rustc"] -serialize-rustc = ["rustc-serialize", "rls-span/serialize-rustc"] -serialize-serde = ["serde", "serde_derive", "rls-span/serialize-serde"] +default = [] +derive = ["serde_derive", "rls-span/derive"] diff --git a/vendor/rls-data/src/config.rs b/vendor/rls-data/src/config.rs index 36d6198ec8..f7adb9c6b3 100644 --- a/vendor/rls-data/src/config.rs +++ b/vendor/rls-data/src/config.rs @@ -1,16 +1,6 @@ -// Copyright 2017 The Rust Project Developers. See the COPYRIGHT -// at http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - /// Used to configure save-analysis. -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone, Default)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub struct Config { /// File to output save-analysis data to. pub output_file: Option<String>, diff --git a/vendor/rls-data/src/lib.rs b/vendor/rls-data/src/lib.rs index fc9a35bce5..680a4dc827 100644 --- a/vendor/rls-data/src/lib.rs +++ b/vendor/rls-data/src/lib.rs @@ -1,35 +1,18 @@ -// Copyright 2017 The Rust Project Developers. See the COPYRIGHT -// at http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![cfg_attr(rustbuild, feature(staged_api, rustc_private))] -#![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))] - -#[cfg(feature = "serialize-rustc")] -extern crate rustc_serialize; -extern crate rls_span as span; - -#[cfg(feature = "serialize-serde")] -extern crate serde; -#[cfg(feature = "serialize-serde")] +use rls_span as span; + +#[cfg(feature = "derive")] #[macro_use] extern crate serde_derive; pub mod config; +mod serde_expanded; use std::path::PathBuf; -use config::Config; - +pub use config::Config; -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Default)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] #[repr(C)] pub struct Analysis { /// The Config used to generate this analysis data. @@ -43,49 +26,24 @@ pub struct Analysis { pub refs: Vec<Ref>, pub macro_refs: Vec<MacroRef>, pub relations: Vec<Relation>, - #[cfg(feature = "borrows")] - pub per_fn_borrows: Vec<BorrowData>, } impl Analysis { - #[cfg(not(feature = "borrows"))] - pub fn new(config: Config) -> Analysis { - Analysis { - config, - version: option_env!("CARGO_PKG_VERSION").map(|s| s.to_string()), - prelude: None, - compilation: None, - imports: vec![], - defs: vec![], - impls: vec![], - refs: vec![], - macro_refs: vec![], - relations: vec![], - } - } - - #[cfg(feature = "borrows")] + /// Returns an initialized `Analysis` struct with `config` and also + /// `version` field to Cargo package version. pub fn new(config: Config) -> Analysis { Analysis { config, - version: option_env!("CARGO_PKG_VERSION").map(|s| s.to_string()), - prelude: None, - imports: vec![], - defs: vec![], - impls: vec![], - refs: vec![], - macro_refs: vec![], - relations: vec![], - per_fn_borrows: vec![], + version: option_env!("CARGO_PKG_VERSION").map(ToString::to_string), + ..Analysis::default() } } } // DefId::index is a newtype and so the JSON serialisation is ugly. Therefore // we use our own Id which is the same, but without the newtype. -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub struct Id { pub krate: u32, pub index: u32, @@ -95,17 +53,15 @@ pub struct Id { /// unique crate identifier, which should allow for differentiation between /// different crate targets or versions and should point to the same crate when /// pulled by different other, dependent crates. -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone, PartialEq, Eq, Hash)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub struct GlobalCrateId { pub name: String, pub disambiguator: (u64, u64), } -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub struct SpanData { pub file_name: PathBuf, pub byte_start: u32, @@ -117,9 +73,8 @@ pub struct SpanData { pub column_end: span::Column<span::OneIndexed>, } -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub struct CompilationOptions { pub directory: PathBuf, pub program: String, @@ -127,9 +82,8 @@ pub struct CompilationOptions { pub output: PathBuf, } -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub struct CratePreludeData { pub crate_id: GlobalCrateId, pub crate_root: String, @@ -138,9 +92,8 @@ pub struct CratePreludeData { } /// Data for external crates in the prelude of a crate. -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub struct ExternalCrateData { /// Source file where the external crate is declared. pub file_name: String, @@ -151,9 +104,8 @@ pub struct ExternalCrateData { pub id: GlobalCrateId, } -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub struct Import { pub kind: ImportKind, pub ref_id: Option<Id>, @@ -164,18 +116,16 @@ pub struct Import { pub parent: Option<Id>, } -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub enum ImportKind { ExternCrate, Use, GlobUse, } -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub struct Def { pub kind: DefKind, pub id: Id, @@ -191,9 +141,8 @@ pub struct Def { pub attributes: Vec<Attribute>, } -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub enum DefKind { // value = variant names Enum, @@ -229,9 +178,8 @@ pub enum DefKind { ExternType, } -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub struct Impl { pub id: u32, pub kind: ImplKind, @@ -244,9 +192,8 @@ pub struct Impl { pub attributes: Vec<Attribute>, } -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub enum ImplKind { // impl Foo { ... } Inherent, @@ -263,26 +210,23 @@ pub enum ImplKind { Deref(String, Id), } -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub struct Attribute { pub value: String, pub span: SpanData, } -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub struct Ref { pub kind: RefKind, pub span: SpanData, pub ref_id: Id, } -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub enum RefKind { Function, Mod, @@ -290,18 +234,16 @@ pub enum RefKind { Variable, } -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub struct MacroRef { pub span: SpanData, pub qualname: String, pub callee_span: SpanData, } -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub struct Relation { pub span: SpanData, pub kind: RelationKind, @@ -309,90 +251,97 @@ pub struct Relation { pub to: Id, } -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub enum RelationKind { - Impl { - id: u32, - }, + Impl { id: u32 }, SuperTrait, } -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub struct Signature { pub text: String, pub defs: Vec<SigElement>, pub refs: Vec<SigElement>, } -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] #[derive(Debug, Clone)] +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] pub struct SigElement { pub id: Id, pub start: usize, pub end: usize, } -// Each `BorrowData` represents all of the scopes, loans and moves -// within an fn or closure referred to by `ref_id`. -#[cfg(feature = "borrows")] -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] -#[derive(Debug, Clone)] -pub struct BorrowData { - pub ref_id: Id, - pub scopes: Vec<Scope>, - pub loans: Vec<Loan>, - pub moves: Vec<Move>, - pub span: Option<SpanData>, +// Following macros are copied from the `static-assertions` library: +// https://github.com/nvzqz/static-assertions-rs/blob/9f0f8aa871390f74f2afcdba53c1e02db90b2d17/src/assert_impl.rs +#[macro_export(local_inner_macros)] +macro_rules! assert_impl { + ($($xs:tt)+) => { _assert_impl!($($xs)+); }; } -#[cfg(feature = "borrows")] -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] -#[derive(Debug, Clone, Copy)] -pub enum BorrowKind { - ImmBorrow, - MutBorrow, -} - -// Each `Loan` is either temporary or assigned to a variable. -// The `ref_id` refers to the value that is being loaned/borrowed. -// Not all loans will be valid. Invalid loans can be used to help explain -// improper usage. -#[cfg(feature = "borrows")] -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] -#[derive(Debug, Clone)] -pub struct Loan { - pub ref_id: Id, - pub kind: BorrowKind, - pub span: SpanData, +#[doc(hidden)] +#[macro_export(local_inner_macros)] +macro_rules! _assert_impl { + ($x:ty, $($t:path),+ $(,)*) => { + { + fn assert_impl<'hidden, T>() where T: ?Sized $(+ $t)+ {} + assert_impl::<$x>(); + } + }; + ($label:ident; $($xs:tt)+) => { + #[allow(dead_code, non_snake_case)] + fn $label() { assert_impl!($($xs)+); } + }; } -// Each `Move` represents an attempt to move the value referred to by `ref_id`. -// Not all `Move`s will be valid but can be used to help explain improper usage. -#[cfg(feature = "borrows")] -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] -#[derive(Debug, Clone)] -pub struct Move { - pub ref_id: Id, - pub span: SpanData, +#[doc(hidden)] +macro_rules! assert_serde { + ($($typ:path),* $(,)*) => { + $( assert_impl!($typ, Serialize, Deserialize<'hidden>); )* + }; } -// Each `Scope` refers to "scope" of a variable (we don't track all values here). -// Its ref_id refers to the variable, and the span refers to the scope/region where -// the variable is "live". -#[cfg(feature = "borrows")] -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] -#[derive(Debug, Clone)] -pub struct Scope { - pub ref_id: Id, - pub span: SpanData, +/// Since we manually provide impls in `cfg(not(feature = "derive"))`, it's good +/// to ensure that the types actually implement all the required traits. +#[doc(hidden)] +fn _assertions() { + use serde::{Deserialize, Serialize}; + + assert_serde!( + // rls-data + Analysis, + Id, + GlobalCrateId, + SpanData, + CompilationOptions, + CratePreludeData, + ExternalCrateData, + Import, + Def, + Impl, + Attribute, + Ref, + MacroRef, + Relation, + Signature, + SigElement, + + Config, + // rls-span + span::Column<span::ZeroIndexed>, + span::Location<span::ZeroIndexed>, + span::Position<span::ZeroIndexed>, + span::Range<span::ZeroIndexed>, + span::Row<span::ZeroIndexed>, + span::Span<span::ZeroIndexed>, + + span::Column<span::OneIndexed>, + span::Location<span::OneIndexed>, + span::Position<span::OneIndexed>, + span::Range<span::OneIndexed>, + span::Row<span::OneIndexed>, + span::Span<span::OneIndexed>, + ); } diff --git a/vendor/rls-data/src/serde_expanded.rs b/vendor/rls-data/src/serde_expanded.rs new file mode 100644 index 0000000000..2c6335d58e --- /dev/null +++ b/vendor/rls-data/src/serde_expanded.rs @@ -0,0 +1,9397 @@ +//! This module exists only because Rust does not support proc macros from +//! crates.io (serde_derive) due to cross-compilation issues +//! (https://github.com/rust-lang/rust/pull/60053). +//! +//! Impls here are copied verbatim from the `cargo expand` output. +//! Please remove this in favour of `#[derive(Serialize, Deserialize)]` if +//! possible. + +#![cfg(not(feature = "derive"))] +#![allow(clippy::all)] + +use super::*; + + #[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] + const _IMPL_SERIALIZE_FOR_Config: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for Config { + fn serialize<__S>( + &self, + __serializer: __S, + ) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "Config", + false as usize + 1 + 1 + 1 + 1 + 1 + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "output_file", + &self.output_file, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "full_docs", + &self.full_docs, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "pub_only", + &self.pub_only, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "reachable_only", + &self.reachable_only, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "distro_crate", + &self.distro_crate, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "signatures", + &self.signatures, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "borrow_data", + &self.borrow_data, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } + }; + #[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] + const _IMPL_DESERIALIZE_FOR_Config: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for Config { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __field3, + __field4, + __field5, + __field6, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>( + self, + __value: u64, + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + 3u64 => _serde::export::Ok(__Field::__field3), + 4u64 => _serde::export::Ok(__Field::__field4), + 5u64 => _serde::export::Ok(__Field::__field5), + 6u64 => _serde::export::Ok(__Field::__field6), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 7", + )), + } + } + fn visit_str<__E>( + self, + __value: &str, + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "output_file" => _serde::export::Ok(__Field::__field0), + "full_docs" => _serde::export::Ok(__Field::__field1), + "pub_only" => _serde::export::Ok(__Field::__field2), + "reachable_only" => _serde::export::Ok(__Field::__field3), + "distro_crate" => _serde::export::Ok(__Field::__field4), + "signatures" => _serde::export::Ok(__Field::__field5), + "borrow_data" => _serde::export::Ok(__Field::__field6), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"output_file" => _serde::export::Ok(__Field::__field0), + b"full_docs" => _serde::export::Ok(__Field::__field1), + b"pub_only" => _serde::export::Ok(__Field::__field2), + b"reachable_only" => _serde::export::Ok(__Field::__field3), + b"distro_crate" => _serde::export::Ok(__Field::__field4), + b"signatures" => _serde::export::Ok(__Field::__field5), + b"borrow_data" => _serde::export::Ok(__Field::__field6), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>( + __deserializer: __D, + ) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<Config>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = Config; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct Config") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = match match _serde::de::SeqAccess::next_element::< + Option<String>, + >(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct Config with 7 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<bool>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct Config with 7 elements", + )); + } + }; + let __field2 = + match match _serde::de::SeqAccess::next_element::<bool>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct Config with 7 elements", + )); + } + }; + let __field3 = + match match _serde::de::SeqAccess::next_element::<bool>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 3usize, + &"struct Config with 7 elements", + )); + } + }; + let __field4 = + match match _serde::de::SeqAccess::next_element::<bool>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 4usize, + &"struct Config with 7 elements", + )); + } + }; + let __field5 = + match match _serde::de::SeqAccess::next_element::<bool>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 5usize, + &"struct Config with 7 elements", + )); + } + }; + let __field6 = + match match _serde::de::SeqAccess::next_element::<bool>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 6usize, + &"struct Config with 7 elements", + )); + } + }; + _serde::export::Ok(Config { + output_file: __field0, + full_docs: __field1, + pub_only: __field2, + reachable_only: __field3, + distro_crate: __field4, + signatures: __field5, + borrow_data: __field6, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<Option<String>> = + _serde::export::None; + let mut __field1: _serde::export::Option<bool> = _serde::export::None; + let mut __field2: _serde::export::Option<bool> = _serde::export::None; + let mut __field3: _serde::export::Option<bool> = _serde::export::None; + let mut __field4: _serde::export::Option<bool> = _serde::export::None; + let mut __field5: _serde::export::Option<bool> = _serde::export::None; + let mut __field6: _serde::export::Option<bool> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "output_file", + ), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Option<String>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "full_docs", + ), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<bool>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "pub_only", + ), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<bool>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field3 => { + if _serde::export::Option::is_some(&__field3) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "reachable_only", + ), + ); + } + __field3 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<bool>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field4 => { + if _serde::export::Option::is_some(&__field4) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "distro_crate", + ), + ); + } + __field4 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<bool>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field5 => { + if _serde::export::Option::is_some(&__field5) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "signatures", + ), + ); + } + __field5 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<bool>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field6 => { + if _serde::export::Option::is_some(&__field6) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "borrow_data", + ), + ); + } + __field6 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<bool>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => { + match _serde::private::de::missing_field("output_file") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => { + match _serde::private::de::missing_field("full_docs") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => { + match _serde::private::de::missing_field("pub_only") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field3 = match __field3 { + _serde::export::Some(__field3) => __field3, + _serde::export::None => { + match _serde::private::de::missing_field("reachable_only") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field4 = match __field4 { + _serde::export::Some(__field4) => __field4, + _serde::export::None => { + match _serde::private::de::missing_field("distro_crate") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field5 = match __field5 { + _serde::export::Some(__field5) => __field5, + _serde::export::None => { + match _serde::private::de::missing_field("signatures") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field6 = match __field6 { + _serde::export::Some(__field6) => __field6, + _serde::export::None => { + match _serde::private::de::missing_field("borrow_data") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + _serde::export::Ok(Config { + output_file: __field0, + full_docs: __field1, + pub_only: __field2, + reachable_only: __field3, + distro_crate: __field4, + signatures: __field5, + borrow_data: __field6, + }) + } + } + const FIELDS: &'static [&'static str] = &[ + "output_file", + "full_docs", + "pub_only", + "reachable_only", + "distro_crate", + "signatures", + "borrow_data", + ]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "Config", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<Config>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } + }; + +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_Analysis: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for Analysis { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "Analysis", + false as usize + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "config", + &self.config, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "version", + &self.version, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "compilation", + &self.compilation, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "prelude", + &self.prelude, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "imports", + &self.imports, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "defs", + &self.defs, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "impls", + &self.impls, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "refs", + &self.refs, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "macro_refs", + &self.macro_refs, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "relations", + &self.relations, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_Analysis: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for Analysis { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __field3, + __field4, + __field5, + __field6, + __field7, + __field8, + __field9, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + 3u64 => _serde::export::Ok(__Field::__field3), + 4u64 => _serde::export::Ok(__Field::__field4), + 5u64 => _serde::export::Ok(__Field::__field5), + 6u64 => _serde::export::Ok(__Field::__field6), + 7u64 => _serde::export::Ok(__Field::__field7), + 8u64 => _serde::export::Ok(__Field::__field8), + 9u64 => _serde::export::Ok(__Field::__field9), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 10", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "config" => _serde::export::Ok(__Field::__field0), + "version" => _serde::export::Ok(__Field::__field1), + "compilation" => _serde::export::Ok(__Field::__field2), + "prelude" => _serde::export::Ok(__Field::__field3), + "imports" => _serde::export::Ok(__Field::__field4), + "defs" => _serde::export::Ok(__Field::__field5), + "impls" => _serde::export::Ok(__Field::__field6), + "refs" => _serde::export::Ok(__Field::__field7), + "macro_refs" => _serde::export::Ok(__Field::__field8), + "relations" => _serde::export::Ok(__Field::__field9), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"config" => _serde::export::Ok(__Field::__field0), + b"version" => _serde::export::Ok(__Field::__field1), + b"compilation" => _serde::export::Ok(__Field::__field2), + b"prelude" => _serde::export::Ok(__Field::__field3), + b"imports" => _serde::export::Ok(__Field::__field4), + b"defs" => _serde::export::Ok(__Field::__field5), + b"impls" => _serde::export::Ok(__Field::__field6), + b"refs" => _serde::export::Ok(__Field::__field7), + b"macro_refs" => _serde::export::Ok(__Field::__field8), + b"relations" => _serde::export::Ok(__Field::__field9), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<Analysis>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = Analysis; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct Analysis") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<Config>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct Analysis with 10 elements", + )); + } + }; + let __field1 = match match _serde::de::SeqAccess::next_element::<Option<String>>( + &mut __seq, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct Analysis with 10 elements", + )); + } + }; + let __field2 = match match _serde::de::SeqAccess::next_element::< + Option<CompilationOptions>, + >(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct Analysis with 10 elements", + )); + } + }; + let __field3 = match match _serde::de::SeqAccess::next_element::< + Option<CratePreludeData>, + >(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 3usize, + &"struct Analysis with 10 elements", + )); + } + }; + let __field4 = match match _serde::de::SeqAccess::next_element::<Vec<Import>>( + &mut __seq, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 4usize, + &"struct Analysis with 10 elements", + )); + } + }; + let __field5 = + match match _serde::de::SeqAccess::next_element::<Vec<Def>>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 5usize, + &"struct Analysis with 10 elements", + )); + } + }; + let __field6 = + match match _serde::de::SeqAccess::next_element::<Vec<Impl>>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 6usize, + &"struct Analysis with 10 elements", + )); + } + }; + let __field7 = + match match _serde::de::SeqAccess::next_element::<Vec<Ref>>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 7usize, + &"struct Analysis with 10 elements", + )); + } + }; + let __field8 = match match _serde::de::SeqAccess::next_element::<Vec<MacroRef>>( + &mut __seq, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 8usize, + &"struct Analysis with 10 elements", + )); + } + }; + let __field9 = match match _serde::de::SeqAccess::next_element::<Vec<Relation>>( + &mut __seq, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 9usize, + &"struct Analysis with 10 elements", + )); + } + }; + _serde::export::Ok(Analysis { + config: __field0, + version: __field1, + compilation: __field2, + prelude: __field3, + imports: __field4, + defs: __field5, + impls: __field6, + refs: __field7, + macro_refs: __field8, + relations: __field9, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<Config> = _serde::export::None; + let mut __field1: _serde::export::Option<Option<String>> = _serde::export::None; + let mut __field2: _serde::export::Option<Option<CompilationOptions>> = + _serde::export::None; + let mut __field3: _serde::export::Option<Option<CratePreludeData>> = + _serde::export::None; + let mut __field4: _serde::export::Option<Vec<Import>> = _serde::export::None; + let mut __field5: _serde::export::Option<Vec<Def>> = _serde::export::None; + let mut __field6: _serde::export::Option<Vec<Impl>> = _serde::export::None; + let mut __field7: _serde::export::Option<Vec<Ref>> = _serde::export::None; + let mut __field8: _serde::export::Option<Vec<MacroRef>> = _serde::export::None; + let mut __field9: _serde::export::Option<Vec<Relation>> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "config", + ), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Config>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "version", + ), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Option<String>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "compilation", + ), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::< + Option<CompilationOptions>, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field3 => { + if _serde::export::Option::is_some(&__field3) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "prelude", + ), + ); + } + __field3 = _serde::export::Some( + match _serde::de::MapAccess::next_value::< + Option<CratePreludeData>, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field4 => { + if _serde::export::Option::is_some(&__field4) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "imports", + ), + ); + } + __field4 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Vec<Import>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field5 => { + if _serde::export::Option::is_some(&__field5) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("defs"), + ); + } + __field5 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Vec<Def>>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field6 => { + if _serde::export::Option::is_some(&__field6) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("impls"), + ); + } + __field6 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Vec<Impl>>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field7 => { + if _serde::export::Option::is_some(&__field7) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("refs"), + ); + } + __field7 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Vec<Ref>>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field8 => { + if _serde::export::Option::is_some(&__field8) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "macro_refs", + ), + ); + } + __field8 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Vec<MacroRef>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field9 => { + if _serde::export::Option::is_some(&__field9) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "relations", + ), + ); + } + __field9 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Vec<Relation>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => { + match _serde::private::de::missing_field("config") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => match _serde::private::de::missing_field("version") + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => { + match _serde::private::de::missing_field("compilation") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field3 = match __field3 { + _serde::export::Some(__field3) => __field3, + _serde::export::None => match _serde::private::de::missing_field("prelude") + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field4 = match __field4 { + _serde::export::Some(__field4) => __field4, + _serde::export::None => match _serde::private::de::missing_field("imports") + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field5 = match __field5 { + _serde::export::Some(__field5) => __field5, + _serde::export::None => match _serde::private::de::missing_field("defs") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field6 = match __field6 { + _serde::export::Some(__field6) => __field6, + _serde::export::None => match _serde::private::de::missing_field("impls") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field7 = match __field7 { + _serde::export::Some(__field7) => __field7, + _serde::export::None => match _serde::private::de::missing_field("refs") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field8 = match __field8 { + _serde::export::Some(__field8) => __field8, + _serde::export::None => { + match _serde::private::de::missing_field("macro_refs") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field9 = match __field9 { + _serde::export::Some(__field9) => __field9, + _serde::export::None => { + match _serde::private::de::missing_field("relations") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + _serde::export::Ok(Analysis { + config: __field0, + version: __field1, + compilation: __field2, + prelude: __field3, + imports: __field4, + defs: __field5, + impls: __field6, + refs: __field7, + macro_refs: __field8, + relations: __field9, + }) + } + } + const FIELDS: &'static [&'static str] = &[ + "config", + "version", + "compilation", + "prelude", + "imports", + "defs", + "impls", + "refs", + "macro_refs", + "relations", + ]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "Analysis", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<Analysis>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_Id: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for Id { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "Id", + false as usize + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "krate", + &self.krate, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "index", + &self.index, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_Id: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for Id { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 2", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "krate" => _serde::export::Ok(__Field::__field0), + "index" => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"krate" => _serde::export::Ok(__Field::__field0), + b"index" => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<Id>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = Id; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct Id") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<u32>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct Id with 2 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<u32>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct Id with 2 elements", + )); + } + }; + _serde::export::Ok(Id { + krate: __field0, + index: __field1, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<u32> = _serde::export::None; + let mut __field1: _serde::export::Option<u32> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("krate"), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<u32>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("index"), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<u32>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => match _serde::private::de::missing_field("krate") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => match _serde::private::de::missing_field("index") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + _serde::export::Ok(Id { + krate: __field0, + index: __field1, + }) + } + } + const FIELDS: &'static [&'static str] = &["krate", "index"]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "Id", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<Id>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_GlobalCrateId: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for GlobalCrateId { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "GlobalCrateId", + false as usize + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "name", + &self.name, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "disambiguator", + &self.disambiguator, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_GlobalCrateId: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for GlobalCrateId { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 2", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "name" => _serde::export::Ok(__Field::__field0), + "disambiguator" => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"name" => _serde::export::Ok(__Field::__field0), + b"disambiguator" => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<GlobalCrateId>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = GlobalCrateId; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct GlobalCrateId") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct GlobalCrateId with 2 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<(u64, u64)>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct GlobalCrateId with 2 elements", + )); + } + }; + _serde::export::Ok(GlobalCrateId { + name: __field0, + disambiguator: __field1, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<String> = _serde::export::None; + let mut __field1: _serde::export::Option<(u64, u64)> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("name"), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "disambiguator", + ), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<(u64, u64)>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => match _serde::private::de::missing_field("name") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => { + match _serde::private::de::missing_field("disambiguator") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + _serde::export::Ok(GlobalCrateId { + name: __field0, + disambiguator: __field1, + }) + } + } + const FIELDS: &'static [&'static str] = &["name", "disambiguator"]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "GlobalCrateId", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<GlobalCrateId>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_SpanData: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for SpanData { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "SpanData", + false as usize + 1 + 1 + 1 + 1 + 1 + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "file_name", + &self.file_name, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "byte_start", + &self.byte_start, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "byte_end", + &self.byte_end, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "line_start", + &self.line_start, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "line_end", + &self.line_end, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "column_start", + &self.column_start, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "column_end", + &self.column_end, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_SpanData: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for SpanData { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __field3, + __field4, + __field5, + __field6, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + 3u64 => _serde::export::Ok(__Field::__field3), + 4u64 => _serde::export::Ok(__Field::__field4), + 5u64 => _serde::export::Ok(__Field::__field5), + 6u64 => _serde::export::Ok(__Field::__field6), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 7", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "file_name" => _serde::export::Ok(__Field::__field0), + "byte_start" => _serde::export::Ok(__Field::__field1), + "byte_end" => _serde::export::Ok(__Field::__field2), + "line_start" => _serde::export::Ok(__Field::__field3), + "line_end" => _serde::export::Ok(__Field::__field4), + "column_start" => _serde::export::Ok(__Field::__field5), + "column_end" => _serde::export::Ok(__Field::__field6), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"file_name" => _serde::export::Ok(__Field::__field0), + b"byte_start" => _serde::export::Ok(__Field::__field1), + b"byte_end" => _serde::export::Ok(__Field::__field2), + b"line_start" => _serde::export::Ok(__Field::__field3), + b"line_end" => _serde::export::Ok(__Field::__field4), + b"column_start" => _serde::export::Ok(__Field::__field5), + b"column_end" => _serde::export::Ok(__Field::__field6), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<SpanData>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = SpanData; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct SpanData") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<PathBuf>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct SpanData with 7 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<u32>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct SpanData with 7 elements", + )); + } + }; + let __field2 = + match match _serde::de::SeqAccess::next_element::<u32>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct SpanData with 7 elements", + )); + } + }; + let __field3 = match match _serde::de::SeqAccess::next_element::< + span::Row<span::OneIndexed>, + >(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 3usize, + &"struct SpanData with 7 elements", + )); + } + }; + let __field4 = match match _serde::de::SeqAccess::next_element::< + span::Row<span::OneIndexed>, + >(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 4usize, + &"struct SpanData with 7 elements", + )); + } + }; + let __field5 = match match _serde::de::SeqAccess::next_element::< + span::Column<span::OneIndexed>, + >(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 5usize, + &"struct SpanData with 7 elements", + )); + } + }; + let __field6 = match match _serde::de::SeqAccess::next_element::< + span::Column<span::OneIndexed>, + >(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 6usize, + &"struct SpanData with 7 elements", + )); + } + }; + _serde::export::Ok(SpanData { + file_name: __field0, + byte_start: __field1, + byte_end: __field2, + line_start: __field3, + line_end: __field4, + column_start: __field5, + column_end: __field6, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<PathBuf> = _serde::export::None; + let mut __field1: _serde::export::Option<u32> = _serde::export::None; + let mut __field2: _serde::export::Option<u32> = _serde::export::None; + let mut __field3: _serde::export::Option<span::Row<span::OneIndexed>> = + _serde::export::None; + let mut __field4: _serde::export::Option<span::Row<span::OneIndexed>> = + _serde::export::None; + let mut __field5: _serde::export::Option<span::Column<span::OneIndexed>> = + _serde::export::None; + let mut __field6: _serde::export::Option<span::Column<span::OneIndexed>> = + _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "file_name", + ), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<PathBuf>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "byte_start", + ), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<u32>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "byte_end", + ), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<u32>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field3 => { + if _serde::export::Option::is_some(&__field3) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "line_start", + ), + ); + } + __field3 = _serde::export::Some( + match _serde::de::MapAccess::next_value::< + span::Row<span::OneIndexed>, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field4 => { + if _serde::export::Option::is_some(&__field4) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "line_end", + ), + ); + } + __field4 = _serde::export::Some( + match _serde::de::MapAccess::next_value::< + span::Row<span::OneIndexed>, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field5 => { + if _serde::export::Option::is_some(&__field5) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "column_start", + ), + ); + } + __field5 = _serde::export::Some( + match _serde::de::MapAccess::next_value::< + span::Column<span::OneIndexed>, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field6 => { + if _serde::export::Option::is_some(&__field6) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "column_end", + ), + ); + } + __field6 = _serde::export::Some( + match _serde::de::MapAccess::next_value::< + span::Column<span::OneIndexed>, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => { + match _serde::private::de::missing_field("file_name") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => { + match _serde::private::de::missing_field("byte_start") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => { + match _serde::private::de::missing_field("byte_end") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field3 = match __field3 { + _serde::export::Some(__field3) => __field3, + _serde::export::None => { + match _serde::private::de::missing_field("line_start") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field4 = match __field4 { + _serde::export::Some(__field4) => __field4, + _serde::export::None => { + match _serde::private::de::missing_field("line_end") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field5 = match __field5 { + _serde::export::Some(__field5) => __field5, + _serde::export::None => { + match _serde::private::de::missing_field("column_start") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field6 = match __field6 { + _serde::export::Some(__field6) => __field6, + _serde::export::None => { + match _serde::private::de::missing_field("column_end") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + _serde::export::Ok(SpanData { + file_name: __field0, + byte_start: __field1, + byte_end: __field2, + line_start: __field3, + line_end: __field4, + column_start: __field5, + column_end: __field6, + }) + } + } + const FIELDS: &'static [&'static str] = &[ + "file_name", + "byte_start", + "byte_end", + "line_start", + "line_end", + "column_start", + "column_end", + ]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "SpanData", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<SpanData>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_CompilationOptions: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for CompilationOptions { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "CompilationOptions", + false as usize + 1 + 1 + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "directory", + &self.directory, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "program", + &self.program, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "arguments", + &self.arguments, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "output", + &self.output, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_CompilationOptions: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for CompilationOptions { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __field3, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + 3u64 => _serde::export::Ok(__Field::__field3), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 4", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "directory" => _serde::export::Ok(__Field::__field0), + "program" => _serde::export::Ok(__Field::__field1), + "arguments" => _serde::export::Ok(__Field::__field2), + "output" => _serde::export::Ok(__Field::__field3), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"directory" => _serde::export::Ok(__Field::__field0), + b"program" => _serde::export::Ok(__Field::__field1), + b"arguments" => _serde::export::Ok(__Field::__field2), + b"output" => _serde::export::Ok(__Field::__field3), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<CompilationOptions>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = CompilationOptions; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct CompilationOptions") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<PathBuf>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct CompilationOptions with 4 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct CompilationOptions with 4 elements", + )); + } + }; + let __field2 = match match _serde::de::SeqAccess::next_element::<Vec<String>>( + &mut __seq, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct CompilationOptions with 4 elements", + )); + } + }; + let __field3 = + match match _serde::de::SeqAccess::next_element::<PathBuf>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 3usize, + &"struct CompilationOptions with 4 elements", + )); + } + }; + _serde::export::Ok(CompilationOptions { + directory: __field0, + program: __field1, + arguments: __field2, + output: __field3, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<PathBuf> = _serde::export::None; + let mut __field1: _serde::export::Option<String> = _serde::export::None; + let mut __field2: _serde::export::Option<Vec<String>> = _serde::export::None; + let mut __field3: _serde::export::Option<PathBuf> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "directory", + ), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<PathBuf>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "program", + ), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "arguments", + ), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Vec<String>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field3 => { + if _serde::export::Option::is_some(&__field3) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "output", + ), + ); + } + __field3 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<PathBuf>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => { + match _serde::private::de::missing_field("directory") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => match _serde::private::de::missing_field("program") + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => { + match _serde::private::de::missing_field("arguments") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field3 = match __field3 { + _serde::export::Some(__field3) => __field3, + _serde::export::None => { + match _serde::private::de::missing_field("output") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + _serde::export::Ok(CompilationOptions { + directory: __field0, + program: __field1, + arguments: __field2, + output: __field3, + }) + } + } + const FIELDS: &'static [&'static str] = + &["directory", "program", "arguments", "output"]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "CompilationOptions", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<CompilationOptions>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_CratePreludeData: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for CratePreludeData { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "CratePreludeData", + false as usize + 1 + 1 + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "crate_id", + &self.crate_id, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "crate_root", + &self.crate_root, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "external_crates", + &self.external_crates, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "span", + &self.span, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_CratePreludeData: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for CratePreludeData { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __field3, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + 3u64 => _serde::export::Ok(__Field::__field3), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 4", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "crate_id" => _serde::export::Ok(__Field::__field0), + "crate_root" => _serde::export::Ok(__Field::__field1), + "external_crates" => _serde::export::Ok(__Field::__field2), + "span" => _serde::export::Ok(__Field::__field3), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"crate_id" => _serde::export::Ok(__Field::__field0), + b"crate_root" => _serde::export::Ok(__Field::__field1), + b"external_crates" => _serde::export::Ok(__Field::__field2), + b"span" => _serde::export::Ok(__Field::__field3), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<CratePreludeData>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = CratePreludeData; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct CratePreludeData") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = match match _serde::de::SeqAccess::next_element::<GlobalCrateId>( + &mut __seq, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct CratePreludeData with 4 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct CratePreludeData with 4 elements", + )); + } + }; + let __field2 = match match _serde::de::SeqAccess::next_element::< + Vec<ExternalCrateData>, + >(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct CratePreludeData with 4 elements", + )); + } + }; + let __field3 = + match match _serde::de::SeqAccess::next_element::<SpanData>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 3usize, + &"struct CratePreludeData with 4 elements", + )); + } + }; + _serde::export::Ok(CratePreludeData { + crate_id: __field0, + crate_root: __field1, + external_crates: __field2, + span: __field3, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<GlobalCrateId> = _serde::export::None; + let mut __field1: _serde::export::Option<String> = _serde::export::None; + let mut __field2: _serde::export::Option<Vec<ExternalCrateData>> = + _serde::export::None; + let mut __field3: _serde::export::Option<SpanData> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "crate_id", + ), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<GlobalCrateId>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "crate_root", + ), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "external_crates", + ), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Vec<ExternalCrateData>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field3 => { + if _serde::export::Option::is_some(&__field3) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("span"), + ); + } + __field3 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<SpanData>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => { + match _serde::private::de::missing_field("crate_id") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => { + match _serde::private::de::missing_field("crate_root") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => { + match _serde::private::de::missing_field("external_crates") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field3 = match __field3 { + _serde::export::Some(__field3) => __field3, + _serde::export::None => match _serde::private::de::missing_field("span") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + _serde::export::Ok(CratePreludeData { + crate_id: __field0, + crate_root: __field1, + external_crates: __field2, + span: __field3, + }) + } + } + const FIELDS: &'static [&'static str] = + &["crate_id", "crate_root", "external_crates", "span"]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "CratePreludeData", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<CratePreludeData>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_ExternalCrateData: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for ExternalCrateData { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "ExternalCrateData", + false as usize + 1 + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "file_name", + &self.file_name, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "num", + &self.num, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field(&mut __serde_state, "id", &self.id) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_ExternalCrateData: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for ExternalCrateData { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 3", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "file_name" => _serde::export::Ok(__Field::__field0), + "num" => _serde::export::Ok(__Field::__field1), + "id" => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"file_name" => _serde::export::Ok(__Field::__field0), + b"num" => _serde::export::Ok(__Field::__field1), + b"id" => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<ExternalCrateData>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = ExternalCrateData; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct ExternalCrateData") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct ExternalCrateData with 3 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<u32>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct ExternalCrateData with 3 elements", + )); + } + }; + let __field2 = match match _serde::de::SeqAccess::next_element::<GlobalCrateId>( + &mut __seq, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct ExternalCrateData with 3 elements", + )); + } + }; + _serde::export::Ok(ExternalCrateData { + file_name: __field0, + num: __field1, + id: __field2, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<String> = _serde::export::None; + let mut __field1: _serde::export::Option<u32> = _serde::export::None; + let mut __field2: _serde::export::Option<GlobalCrateId> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "file_name", + ), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("num"), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<u32>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("id"), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<GlobalCrateId>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => { + match _serde::private::de::missing_field("file_name") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => match _serde::private::de::missing_field("num") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => match _serde::private::de::missing_field("id") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + _serde::export::Ok(ExternalCrateData { + file_name: __field0, + num: __field1, + id: __field2, + }) + } + } + const FIELDS: &'static [&'static str] = &["file_name", "num", "id"]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "ExternalCrateData", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<ExternalCrateData>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_Import: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for Import { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "Import", + false as usize + 1 + 1 + 1 + 1 + 1 + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "kind", + &self.kind, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "ref_id", + &self.ref_id, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "span", + &self.span, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "alias_span", + &self.alias_span, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "name", + &self.name, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "value", + &self.value, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "parent", + &self.parent, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_Import: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for Import { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __field3, + __field4, + __field5, + __field6, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + 3u64 => _serde::export::Ok(__Field::__field3), + 4u64 => _serde::export::Ok(__Field::__field4), + 5u64 => _serde::export::Ok(__Field::__field5), + 6u64 => _serde::export::Ok(__Field::__field6), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 7", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "kind" => _serde::export::Ok(__Field::__field0), + "ref_id" => _serde::export::Ok(__Field::__field1), + "span" => _serde::export::Ok(__Field::__field2), + "alias_span" => _serde::export::Ok(__Field::__field3), + "name" => _serde::export::Ok(__Field::__field4), + "value" => _serde::export::Ok(__Field::__field5), + "parent" => _serde::export::Ok(__Field::__field6), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"kind" => _serde::export::Ok(__Field::__field0), + b"ref_id" => _serde::export::Ok(__Field::__field1), + b"span" => _serde::export::Ok(__Field::__field2), + b"alias_span" => _serde::export::Ok(__Field::__field3), + b"name" => _serde::export::Ok(__Field::__field4), + b"value" => _serde::export::Ok(__Field::__field5), + b"parent" => _serde::export::Ok(__Field::__field6), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<Import>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = Import; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct Import") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<ImportKind>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct Import with 7 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<Option<Id>>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct Import with 7 elements", + )); + } + }; + let __field2 = + match match _serde::de::SeqAccess::next_element::<SpanData>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct Import with 7 elements", + )); + } + }; + let __field3 = match match _serde::de::SeqAccess::next_element::<Option<SpanData>>( + &mut __seq, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 3usize, + &"struct Import with 7 elements", + )); + } + }; + let __field4 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 4usize, + &"struct Import with 7 elements", + )); + } + }; + let __field5 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 5usize, + &"struct Import with 7 elements", + )); + } + }; + let __field6 = + match match _serde::de::SeqAccess::next_element::<Option<Id>>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 6usize, + &"struct Import with 7 elements", + )); + } + }; + _serde::export::Ok(Import { + kind: __field0, + ref_id: __field1, + span: __field2, + alias_span: __field3, + name: __field4, + value: __field5, + parent: __field6, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<ImportKind> = _serde::export::None; + let mut __field1: _serde::export::Option<Option<Id>> = _serde::export::None; + let mut __field2: _serde::export::Option<SpanData> = _serde::export::None; + let mut __field3: _serde::export::Option<Option<SpanData>> = + _serde::export::None; + let mut __field4: _serde::export::Option<String> = _serde::export::None; + let mut __field5: _serde::export::Option<String> = _serde::export::None; + let mut __field6: _serde::export::Option<Option<Id>> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("kind"), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<ImportKind>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "ref_id", + ), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Option<Id>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("span"), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<SpanData>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field3 => { + if _serde::export::Option::is_some(&__field3) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "alias_span", + ), + ); + } + __field3 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Option<SpanData>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field4 => { + if _serde::export::Option::is_some(&__field4) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("name"), + ); + } + __field4 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field5 => { + if _serde::export::Option::is_some(&__field5) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("value"), + ); + } + __field5 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field6 => { + if _serde::export::Option::is_some(&__field6) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "parent", + ), + ); + } + __field6 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Option<Id>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => match _serde::private::de::missing_field("kind") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => { + match _serde::private::de::missing_field("ref_id") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => match _serde::private::de::missing_field("span") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field3 = match __field3 { + _serde::export::Some(__field3) => __field3, + _serde::export::None => { + match _serde::private::de::missing_field("alias_span") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field4 = match __field4 { + _serde::export::Some(__field4) => __field4, + _serde::export::None => match _serde::private::de::missing_field("name") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field5 = match __field5 { + _serde::export::Some(__field5) => __field5, + _serde::export::None => match _serde::private::de::missing_field("value") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field6 = match __field6 { + _serde::export::Some(__field6) => __field6, + _serde::export::None => { + match _serde::private::de::missing_field("parent") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + _serde::export::Ok(Import { + kind: __field0, + ref_id: __field1, + span: __field2, + alias_span: __field3, + name: __field4, + value: __field5, + parent: __field6, + }) + } + } + const FIELDS: &'static [&'static str] = &[ + "kind", + "ref_id", + "span", + "alias_span", + "name", + "value", + "parent", + ]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "Import", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<Import>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_ImportKind: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for ImportKind { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + match *self { + ImportKind::ExternCrate => _serde::Serializer::serialize_unit_variant( + __serializer, + "ImportKind", + 0u32, + "ExternCrate", + ), + ImportKind::Use => _serde::Serializer::serialize_unit_variant( + __serializer, + "ImportKind", + 1u32, + "Use", + ), + ImportKind::GlobUse => _serde::Serializer::serialize_unit_variant( + __serializer, + "ImportKind", + 2u32, + "GlobUse", + ), + } + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_ImportKind: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for ImportKind { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "variant identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"variant index 0 <= i < 3", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "ExternCrate" => _serde::export::Ok(__Field::__field0), + "Use" => _serde::export::Ok(__Field::__field1), + "GlobUse" => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Err(_serde::de::Error::unknown_variant( + __value, VARIANTS, + )), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"ExternCrate" => _serde::export::Ok(__Field::__field0), + b"Use" => _serde::export::Ok(__Field::__field1), + b"GlobUse" => _serde::export::Ok(__Field::__field2), + _ => { + let __value = &_serde::export::from_utf8_lossy(__value); + _serde::export::Err(_serde::de::Error::unknown_variant( + __value, VARIANTS, + )) + } + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<ImportKind>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = ImportKind; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "enum ImportKind") + } + fn visit_enum<__A>( + self, + __data: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::EnumAccess<'de>, + { + match match _serde::de::EnumAccess::variant(__data) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + (__Field::__field0, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(ImportKind::ExternCrate) + } + (__Field::__field1, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(ImportKind::Use) + } + (__Field::__field2, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(ImportKind::GlobUse) + } + } + } + } + const VARIANTS: &'static [&'static str] = &["ExternCrate", "Use", "GlobUse"]; + _serde::Deserializer::deserialize_enum( + __deserializer, + "ImportKind", + VARIANTS, + __Visitor { + marker: _serde::export::PhantomData::<ImportKind>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_Def: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for Def { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "Def", + false as usize + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "kind", + &self.kind, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field(&mut __serde_state, "id", &self.id) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "span", + &self.span, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "name", + &self.name, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "qualname", + &self.qualname, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "value", + &self.value, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "parent", + &self.parent, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "children", + &self.children, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "decl_id", + &self.decl_id, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "docs", + &self.docs, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "sig", + &self.sig, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "attributes", + &self.attributes, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_Def: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for Def { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __field3, + __field4, + __field5, + __field6, + __field7, + __field8, + __field9, + __field10, + __field11, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + 3u64 => _serde::export::Ok(__Field::__field3), + 4u64 => _serde::export::Ok(__Field::__field4), + 5u64 => _serde::export::Ok(__Field::__field5), + 6u64 => _serde::export::Ok(__Field::__field6), + 7u64 => _serde::export::Ok(__Field::__field7), + 8u64 => _serde::export::Ok(__Field::__field8), + 9u64 => _serde::export::Ok(__Field::__field9), + 10u64 => _serde::export::Ok(__Field::__field10), + 11u64 => _serde::export::Ok(__Field::__field11), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 12", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "kind" => _serde::export::Ok(__Field::__field0), + "id" => _serde::export::Ok(__Field::__field1), + "span" => _serde::export::Ok(__Field::__field2), + "name" => _serde::export::Ok(__Field::__field3), + "qualname" => _serde::export::Ok(__Field::__field4), + "value" => _serde::export::Ok(__Field::__field5), + "parent" => _serde::export::Ok(__Field::__field6), + "children" => _serde::export::Ok(__Field::__field7), + "decl_id" => _serde::export::Ok(__Field::__field8), + "docs" => _serde::export::Ok(__Field::__field9), + "sig" => _serde::export::Ok(__Field::__field10), + "attributes" => _serde::export::Ok(__Field::__field11), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"kind" => _serde::export::Ok(__Field::__field0), + b"id" => _serde::export::Ok(__Field::__field1), + b"span" => _serde::export::Ok(__Field::__field2), + b"name" => _serde::export::Ok(__Field::__field3), + b"qualname" => _serde::export::Ok(__Field::__field4), + b"value" => _serde::export::Ok(__Field::__field5), + b"parent" => _serde::export::Ok(__Field::__field6), + b"children" => _serde::export::Ok(__Field::__field7), + b"decl_id" => _serde::export::Ok(__Field::__field8), + b"docs" => _serde::export::Ok(__Field::__field9), + b"sig" => _serde::export::Ok(__Field::__field10), + b"attributes" => _serde::export::Ok(__Field::__field11), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<Def>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = Def; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct Def") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<DefKind>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct Def with 12 elements", + )); + } + }; + let __field1 = match match _serde::de::SeqAccess::next_element::<Id>(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct Def with 12 elements", + )); + } + }; + let __field2 = + match match _serde::de::SeqAccess::next_element::<SpanData>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct Def with 12 elements", + )); + } + }; + let __field3 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 3usize, + &"struct Def with 12 elements", + )); + } + }; + let __field4 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 4usize, + &"struct Def with 12 elements", + )); + } + }; + let __field5 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 5usize, + &"struct Def with 12 elements", + )); + } + }; + let __field6 = + match match _serde::de::SeqAccess::next_element::<Option<Id>>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 6usize, + &"struct Def with 12 elements", + )); + } + }; + let __field7 = + match match _serde::de::SeqAccess::next_element::<Vec<Id>>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 7usize, + &"struct Def with 12 elements", + )); + } + }; + let __field8 = + match match _serde::de::SeqAccess::next_element::<Option<Id>>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 8usize, + &"struct Def with 12 elements", + )); + } + }; + let __field9 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 9usize, + &"struct Def with 12 elements", + )); + } + }; + let __field10 = match match _serde::de::SeqAccess::next_element::< + Option<Signature>, + >(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 10usize, + &"struct Def with 12 elements", + )); + } + }; + let __field11 = match match _serde::de::SeqAccess::next_element::<Vec<Attribute>>( + &mut __seq, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 11usize, + &"struct Def with 12 elements", + )); + } + }; + _serde::export::Ok(Def { + kind: __field0, + id: __field1, + span: __field2, + name: __field3, + qualname: __field4, + value: __field5, + parent: __field6, + children: __field7, + decl_id: __field8, + docs: __field9, + sig: __field10, + attributes: __field11, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<DefKind> = _serde::export::None; + let mut __field1: _serde::export::Option<Id> = _serde::export::None; + let mut __field2: _serde::export::Option<SpanData> = _serde::export::None; + let mut __field3: _serde::export::Option<String> = _serde::export::None; + let mut __field4: _serde::export::Option<String> = _serde::export::None; + let mut __field5: _serde::export::Option<String> = _serde::export::None; + let mut __field6: _serde::export::Option<Option<Id>> = _serde::export::None; + let mut __field7: _serde::export::Option<Vec<Id>> = _serde::export::None; + let mut __field8: _serde::export::Option<Option<Id>> = _serde::export::None; + let mut __field9: _serde::export::Option<String> = _serde::export::None; + let mut __field10: _serde::export::Option<Option<Signature>> = + _serde::export::None; + let mut __field11: _serde::export::Option<Vec<Attribute>> = + _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("kind"), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<DefKind>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("id"), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Id>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("span"), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<SpanData>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field3 => { + if _serde::export::Option::is_some(&__field3) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("name"), + ); + } + __field3 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field4 => { + if _serde::export::Option::is_some(&__field4) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "qualname", + ), + ); + } + __field4 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field5 => { + if _serde::export::Option::is_some(&__field5) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("value"), + ); + } + __field5 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field6 => { + if _serde::export::Option::is_some(&__field6) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "parent", + ), + ); + } + __field6 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Option<Id>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field7 => { + if _serde::export::Option::is_some(&__field7) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "children", + ), + ); + } + __field7 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Vec<Id>>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field8 => { + if _serde::export::Option::is_some(&__field8) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "decl_id", + ), + ); + } + __field8 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Option<Id>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field9 => { + if _serde::export::Option::is_some(&__field9) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("docs"), + ); + } + __field9 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field10 => { + if _serde::export::Option::is_some(&__field10) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("sig"), + ); + } + __field10 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Option<Signature>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field11 => { + if _serde::export::Option::is_some(&__field11) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "attributes", + ), + ); + } + __field11 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Vec<Attribute>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => match _serde::private::de::missing_field("kind") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => match _serde::private::de::missing_field("id") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => match _serde::private::de::missing_field("span") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field3 = match __field3 { + _serde::export::Some(__field3) => __field3, + _serde::export::None => match _serde::private::de::missing_field("name") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field4 = match __field4 { + _serde::export::Some(__field4) => __field4, + _serde::export::None => { + match _serde::private::de::missing_field("qualname") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field5 = match __field5 { + _serde::export::Some(__field5) => __field5, + _serde::export::None => match _serde::private::de::missing_field("value") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field6 = match __field6 { + _serde::export::Some(__field6) => __field6, + _serde::export::None => { + match _serde::private::de::missing_field("parent") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field7 = match __field7 { + _serde::export::Some(__field7) => __field7, + _serde::export::None => { + match _serde::private::de::missing_field("children") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field8 = match __field8 { + _serde::export::Some(__field8) => __field8, + _serde::export::None => match _serde::private::de::missing_field("decl_id") + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field9 = match __field9 { + _serde::export::Some(__field9) => __field9, + _serde::export::None => match _serde::private::de::missing_field("docs") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field10 = match __field10 { + _serde::export::Some(__field10) => __field10, + _serde::export::None => match _serde::private::de::missing_field("sig") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field11 = match __field11 { + _serde::export::Some(__field11) => __field11, + _serde::export::None => { + match _serde::private::de::missing_field("attributes") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + _serde::export::Ok(Def { + kind: __field0, + id: __field1, + span: __field2, + name: __field3, + qualname: __field4, + value: __field5, + parent: __field6, + children: __field7, + decl_id: __field8, + docs: __field9, + sig: __field10, + attributes: __field11, + }) + } + } + const FIELDS: &'static [&'static str] = &[ + "kind", + "id", + "span", + "name", + "qualname", + "value", + "parent", + "children", + "decl_id", + "docs", + "sig", + "attributes", + ]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "Def", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<Def>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_DefKind: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for DefKind { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + match *self { + DefKind::Enum => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 0u32, + "Enum", + ), + DefKind::TupleVariant => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 1u32, + "TupleVariant", + ), + DefKind::StructVariant => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 2u32, + "StructVariant", + ), + DefKind::Tuple => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 3u32, + "Tuple", + ), + DefKind::Struct => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 4u32, + "Struct", + ), + DefKind::Union => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 5u32, + "Union", + ), + DefKind::Trait => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 6u32, + "Trait", + ), + DefKind::Function => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 7u32, + "Function", + ), + DefKind::ForeignFunction => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 8u32, + "ForeignFunction", + ), + DefKind::Method => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 9u32, + "Method", + ), + DefKind::Macro => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 10u32, + "Macro", + ), + DefKind::Mod => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 11u32, + "Mod", + ), + DefKind::Type => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 12u32, + "Type", + ), + DefKind::Local => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 13u32, + "Local", + ), + DefKind::Static => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 14u32, + "Static", + ), + DefKind::ForeignStatic => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 15u32, + "ForeignStatic", + ), + DefKind::Const => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 16u32, + "Const", + ), + DefKind::Field => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 17u32, + "Field", + ), + DefKind::ExternType => _serde::Serializer::serialize_unit_variant( + __serializer, + "DefKind", + 18u32, + "ExternType", + ), + } + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_DefKind: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for DefKind { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __field3, + __field4, + __field5, + __field6, + __field7, + __field8, + __field9, + __field10, + __field11, + __field12, + __field13, + __field14, + __field15, + __field16, + __field17, + __field18, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "variant identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + 3u64 => _serde::export::Ok(__Field::__field3), + 4u64 => _serde::export::Ok(__Field::__field4), + 5u64 => _serde::export::Ok(__Field::__field5), + 6u64 => _serde::export::Ok(__Field::__field6), + 7u64 => _serde::export::Ok(__Field::__field7), + 8u64 => _serde::export::Ok(__Field::__field8), + 9u64 => _serde::export::Ok(__Field::__field9), + 10u64 => _serde::export::Ok(__Field::__field10), + 11u64 => _serde::export::Ok(__Field::__field11), + 12u64 => _serde::export::Ok(__Field::__field12), + 13u64 => _serde::export::Ok(__Field::__field13), + 14u64 => _serde::export::Ok(__Field::__field14), + 15u64 => _serde::export::Ok(__Field::__field15), + 16u64 => _serde::export::Ok(__Field::__field16), + 17u64 => _serde::export::Ok(__Field::__field17), + 18u64 => _serde::export::Ok(__Field::__field18), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"variant index 0 <= i < 19", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "Enum" => _serde::export::Ok(__Field::__field0), + "TupleVariant" => _serde::export::Ok(__Field::__field1), + "StructVariant" => _serde::export::Ok(__Field::__field2), + "Tuple" => _serde::export::Ok(__Field::__field3), + "Struct" => _serde::export::Ok(__Field::__field4), + "Union" => _serde::export::Ok(__Field::__field5), + "Trait" => _serde::export::Ok(__Field::__field6), + "Function" => _serde::export::Ok(__Field::__field7), + "ForeignFunction" => _serde::export::Ok(__Field::__field8), + "Method" => _serde::export::Ok(__Field::__field9), + "Macro" => _serde::export::Ok(__Field::__field10), + "Mod" => _serde::export::Ok(__Field::__field11), + "Type" => _serde::export::Ok(__Field::__field12), + "Local" => _serde::export::Ok(__Field::__field13), + "Static" => _serde::export::Ok(__Field::__field14), + "ForeignStatic" => _serde::export::Ok(__Field::__field15), + "Const" => _serde::export::Ok(__Field::__field16), + "Field" => _serde::export::Ok(__Field::__field17), + "ExternType" => _serde::export::Ok(__Field::__field18), + _ => _serde::export::Err(_serde::de::Error::unknown_variant( + __value, VARIANTS, + )), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"Enum" => _serde::export::Ok(__Field::__field0), + b"TupleVariant" => _serde::export::Ok(__Field::__field1), + b"StructVariant" => _serde::export::Ok(__Field::__field2), + b"Tuple" => _serde::export::Ok(__Field::__field3), + b"Struct" => _serde::export::Ok(__Field::__field4), + b"Union" => _serde::export::Ok(__Field::__field5), + b"Trait" => _serde::export::Ok(__Field::__field6), + b"Function" => _serde::export::Ok(__Field::__field7), + b"ForeignFunction" => _serde::export::Ok(__Field::__field8), + b"Method" => _serde::export::Ok(__Field::__field9), + b"Macro" => _serde::export::Ok(__Field::__field10), + b"Mod" => _serde::export::Ok(__Field::__field11), + b"Type" => _serde::export::Ok(__Field::__field12), + b"Local" => _serde::export::Ok(__Field::__field13), + b"Static" => _serde::export::Ok(__Field::__field14), + b"ForeignStatic" => _serde::export::Ok(__Field::__field15), + b"Const" => _serde::export::Ok(__Field::__field16), + b"Field" => _serde::export::Ok(__Field::__field17), + b"ExternType" => _serde::export::Ok(__Field::__field18), + _ => { + let __value = &_serde::export::from_utf8_lossy(__value); + _serde::export::Err(_serde::de::Error::unknown_variant( + __value, VARIANTS, + )) + } + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<DefKind>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = DefKind; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "enum DefKind") + } + fn visit_enum<__A>( + self, + __data: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::EnumAccess<'de>, + { + match match _serde::de::EnumAccess::variant(__data) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + (__Field::__field0, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::Enum) + } + (__Field::__field1, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::TupleVariant) + } + (__Field::__field2, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::StructVariant) + } + (__Field::__field3, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::Tuple) + } + (__Field::__field4, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::Struct) + } + (__Field::__field5, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::Union) + } + (__Field::__field6, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::Trait) + } + (__Field::__field7, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::Function) + } + (__Field::__field8, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::ForeignFunction) + } + (__Field::__field9, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::Method) + } + (__Field::__field10, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::Macro) + } + (__Field::__field11, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::Mod) + } + (__Field::__field12, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::Type) + } + (__Field::__field13, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::Local) + } + (__Field::__field14, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::Static) + } + (__Field::__field15, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::ForeignStatic) + } + (__Field::__field16, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::Const) + } + (__Field::__field17, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::Field) + } + (__Field::__field18, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(DefKind::ExternType) + } + } + } + } + const VARIANTS: &'static [&'static str] = &[ + "Enum", + "TupleVariant", + "StructVariant", + "Tuple", + "Struct", + "Union", + "Trait", + "Function", + "ForeignFunction", + "Method", + "Macro", + "Mod", + "Type", + "Local", + "Static", + "ForeignStatic", + "Const", + "Field", + "ExternType", + ]; + _serde::Deserializer::deserialize_enum( + __deserializer, + "DefKind", + VARIANTS, + __Visitor { + marker: _serde::export::PhantomData::<DefKind>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_Impl: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for Impl { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "Impl", + false as usize + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field(&mut __serde_state, "id", &self.id) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "kind", + &self.kind, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "span", + &self.span, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "value", + &self.value, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "parent", + &self.parent, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "children", + &self.children, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "docs", + &self.docs, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "sig", + &self.sig, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "attributes", + &self.attributes, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_Impl: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for Impl { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __field3, + __field4, + __field5, + __field6, + __field7, + __field8, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + 3u64 => _serde::export::Ok(__Field::__field3), + 4u64 => _serde::export::Ok(__Field::__field4), + 5u64 => _serde::export::Ok(__Field::__field5), + 6u64 => _serde::export::Ok(__Field::__field6), + 7u64 => _serde::export::Ok(__Field::__field7), + 8u64 => _serde::export::Ok(__Field::__field8), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 9", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "id" => _serde::export::Ok(__Field::__field0), + "kind" => _serde::export::Ok(__Field::__field1), + "span" => _serde::export::Ok(__Field::__field2), + "value" => _serde::export::Ok(__Field::__field3), + "parent" => _serde::export::Ok(__Field::__field4), + "children" => _serde::export::Ok(__Field::__field5), + "docs" => _serde::export::Ok(__Field::__field6), + "sig" => _serde::export::Ok(__Field::__field7), + "attributes" => _serde::export::Ok(__Field::__field8), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"id" => _serde::export::Ok(__Field::__field0), + b"kind" => _serde::export::Ok(__Field::__field1), + b"span" => _serde::export::Ok(__Field::__field2), + b"value" => _serde::export::Ok(__Field::__field3), + b"parent" => _serde::export::Ok(__Field::__field4), + b"children" => _serde::export::Ok(__Field::__field5), + b"docs" => _serde::export::Ok(__Field::__field6), + b"sig" => _serde::export::Ok(__Field::__field7), + b"attributes" => _serde::export::Ok(__Field::__field8), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<Impl>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = Impl; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct Impl") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<u32>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct Impl with 9 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<ImplKind>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct Impl with 9 elements", + )); + } + }; + let __field2 = + match match _serde::de::SeqAccess::next_element::<SpanData>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct Impl with 9 elements", + )); + } + }; + let __field3 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 3usize, + &"struct Impl with 9 elements", + )); + } + }; + let __field4 = + match match _serde::de::SeqAccess::next_element::<Option<Id>>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 4usize, + &"struct Impl with 9 elements", + )); + } + }; + let __field5 = + match match _serde::de::SeqAccess::next_element::<Vec<Id>>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 5usize, + &"struct Impl with 9 elements", + )); + } + }; + let __field6 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 6usize, + &"struct Impl with 9 elements", + )); + } + }; + let __field7 = match match _serde::de::SeqAccess::next_element::< + Option<Signature>, + >(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 7usize, + &"struct Impl with 9 elements", + )); + } + }; + let __field8 = match match _serde::de::SeqAccess::next_element::<Vec<Attribute>>( + &mut __seq, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 8usize, + &"struct Impl with 9 elements", + )); + } + }; + _serde::export::Ok(Impl { + id: __field0, + kind: __field1, + span: __field2, + value: __field3, + parent: __field4, + children: __field5, + docs: __field6, + sig: __field7, + attributes: __field8, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<u32> = _serde::export::None; + let mut __field1: _serde::export::Option<ImplKind> = _serde::export::None; + let mut __field2: _serde::export::Option<SpanData> = _serde::export::None; + let mut __field3: _serde::export::Option<String> = _serde::export::None; + let mut __field4: _serde::export::Option<Option<Id>> = _serde::export::None; + let mut __field5: _serde::export::Option<Vec<Id>> = _serde::export::None; + let mut __field6: _serde::export::Option<String> = _serde::export::None; + let mut __field7: _serde::export::Option<Option<Signature>> = + _serde::export::None; + let mut __field8: _serde::export::Option<Vec<Attribute>> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("id"), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<u32>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("kind"), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<ImplKind>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("span"), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<SpanData>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field3 => { + if _serde::export::Option::is_some(&__field3) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("value"), + ); + } + __field3 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field4 => { + if _serde::export::Option::is_some(&__field4) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "parent", + ), + ); + } + __field4 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Option<Id>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field5 => { + if _serde::export::Option::is_some(&__field5) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "children", + ), + ); + } + __field5 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Vec<Id>>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field6 => { + if _serde::export::Option::is_some(&__field6) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("docs"), + ); + } + __field6 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field7 => { + if _serde::export::Option::is_some(&__field7) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("sig"), + ); + } + __field7 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Option<Signature>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field8 => { + if _serde::export::Option::is_some(&__field8) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "attributes", + ), + ); + } + __field8 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Vec<Attribute>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => match _serde::private::de::missing_field("id") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => match _serde::private::de::missing_field("kind") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => match _serde::private::de::missing_field("span") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field3 = match __field3 { + _serde::export::Some(__field3) => __field3, + _serde::export::None => match _serde::private::de::missing_field("value") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field4 = match __field4 { + _serde::export::Some(__field4) => __field4, + _serde::export::None => { + match _serde::private::de::missing_field("parent") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field5 = match __field5 { + _serde::export::Some(__field5) => __field5, + _serde::export::None => { + match _serde::private::de::missing_field("children") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field6 = match __field6 { + _serde::export::Some(__field6) => __field6, + _serde::export::None => match _serde::private::de::missing_field("docs") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field7 = match __field7 { + _serde::export::Some(__field7) => __field7, + _serde::export::None => match _serde::private::de::missing_field("sig") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field8 = match __field8 { + _serde::export::Some(__field8) => __field8, + _serde::export::None => { + match _serde::private::de::missing_field("attributes") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + _serde::export::Ok(Impl { + id: __field0, + kind: __field1, + span: __field2, + value: __field3, + parent: __field4, + children: __field5, + docs: __field6, + sig: __field7, + attributes: __field8, + }) + } + } + const FIELDS: &'static [&'static str] = &[ + "id", + "kind", + "span", + "value", + "parent", + "children", + "docs", + "sig", + "attributes", + ]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "Impl", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<Impl>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_ImplKind: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for ImplKind { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + match *self { + ImplKind::Inherent => _serde::Serializer::serialize_unit_variant( + __serializer, + "ImplKind", + 0u32, + "Inherent", + ), + ImplKind::Direct => _serde::Serializer::serialize_unit_variant( + __serializer, + "ImplKind", + 1u32, + "Direct", + ), + ImplKind::Indirect => _serde::Serializer::serialize_unit_variant( + __serializer, + "ImplKind", + 2u32, + "Indirect", + ), + ImplKind::Blanket => _serde::Serializer::serialize_unit_variant( + __serializer, + "ImplKind", + 3u32, + "Blanket", + ), + ImplKind::Deref(ref __field0, ref __field1) => { + let mut __serde_state = match _serde::Serializer::serialize_tuple_variant( + __serializer, + "ImplKind", + 4u32, + "Deref", + 0 + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeTupleVariant::serialize_field( + &mut __serde_state, + __field0, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeTupleVariant::serialize_field( + &mut __serde_state, + __field1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeTupleVariant::end(__serde_state) + } + } + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_ImplKind: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for ImplKind { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __field3, + __field4, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "variant identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + 3u64 => _serde::export::Ok(__Field::__field3), + 4u64 => _serde::export::Ok(__Field::__field4), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"variant index 0 <= i < 5", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "Inherent" => _serde::export::Ok(__Field::__field0), + "Direct" => _serde::export::Ok(__Field::__field1), + "Indirect" => _serde::export::Ok(__Field::__field2), + "Blanket" => _serde::export::Ok(__Field::__field3), + "Deref" => _serde::export::Ok(__Field::__field4), + _ => _serde::export::Err(_serde::de::Error::unknown_variant( + __value, VARIANTS, + )), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"Inherent" => _serde::export::Ok(__Field::__field0), + b"Direct" => _serde::export::Ok(__Field::__field1), + b"Indirect" => _serde::export::Ok(__Field::__field2), + b"Blanket" => _serde::export::Ok(__Field::__field3), + b"Deref" => _serde::export::Ok(__Field::__field4), + _ => { + let __value = &_serde::export::from_utf8_lossy(__value); + _serde::export::Err(_serde::de::Error::unknown_variant( + __value, VARIANTS, + )) + } + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<ImplKind>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = ImplKind; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "enum ImplKind") + } + fn visit_enum<__A>( + self, + __data: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::EnumAccess<'de>, + { + match match _serde::de::EnumAccess::variant(__data) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + (__Field::__field0, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(ImplKind::Inherent) + } + (__Field::__field1, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(ImplKind::Direct) + } + (__Field::__field2, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(ImplKind::Indirect) + } + (__Field::__field3, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(ImplKind::Blanket) + } + (__Field::__field4, __variant) => { + struct __Visitor<'de> { + marker: _serde::export::PhantomData<ImplKind>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = ImplKind; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str( + __formatter, + "tuple variant ImplKind::Deref", + ) + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = match match _serde::de::SeqAccess::next_element::< + String, + >( + &mut __seq + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde :: export :: Err ( _serde :: de :: Error :: invalid_length ( 0usize , & "tuple variant ImplKind::Deref with 2 elements" ) ) ; + } + }; + let __field1 = match match _serde::de::SeqAccess::next_element::< + Id, + >( + &mut __seq + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde :: export :: Err ( _serde :: de :: Error :: invalid_length ( 1usize , & "tuple variant ImplKind::Deref with 2 elements" ) ) ; + } + }; + _serde::export::Ok(ImplKind::Deref(__field0, __field1)) + } + } + _serde::de::VariantAccess::tuple_variant( + __variant, + 2usize, + __Visitor { + marker: _serde::export::PhantomData::<ImplKind>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } + } + } + const VARIANTS: &'static [&'static str] = + &["Inherent", "Direct", "Indirect", "Blanket", "Deref"]; + _serde::Deserializer::deserialize_enum( + __deserializer, + "ImplKind", + VARIANTS, + __Visitor { + marker: _serde::export::PhantomData::<ImplKind>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_Attribute: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for Attribute { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "Attribute", + false as usize + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "value", + &self.value, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "span", + &self.span, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_Attribute: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for Attribute { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 2", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "value" => _serde::export::Ok(__Field::__field0), + "span" => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"value" => _serde::export::Ok(__Field::__field0), + b"span" => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<Attribute>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = Attribute; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct Attribute") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct Attribute with 2 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<SpanData>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct Attribute with 2 elements", + )); + } + }; + _serde::export::Ok(Attribute { + value: __field0, + span: __field1, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<String> = _serde::export::None; + let mut __field1: _serde::export::Option<SpanData> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("value"), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("span"), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<SpanData>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => match _serde::private::de::missing_field("value") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => match _serde::private::de::missing_field("span") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + _serde::export::Ok(Attribute { + value: __field0, + span: __field1, + }) + } + } + const FIELDS: &'static [&'static str] = &["value", "span"]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "Attribute", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<Attribute>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_Ref: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for Ref { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "Ref", + false as usize + 1 + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "kind", + &self.kind, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "span", + &self.span, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "ref_id", + &self.ref_id, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_Ref: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for Ref { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 3", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "kind" => _serde::export::Ok(__Field::__field0), + "span" => _serde::export::Ok(__Field::__field1), + "ref_id" => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"kind" => _serde::export::Ok(__Field::__field0), + b"span" => _serde::export::Ok(__Field::__field1), + b"ref_id" => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<Ref>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = Ref; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct Ref") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<RefKind>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct Ref with 3 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<SpanData>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct Ref with 3 elements", + )); + } + }; + let __field2 = match match _serde::de::SeqAccess::next_element::<Id>(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct Ref with 3 elements", + )); + } + }; + _serde::export::Ok(Ref { + kind: __field0, + span: __field1, + ref_id: __field2, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<RefKind> = _serde::export::None; + let mut __field1: _serde::export::Option<SpanData> = _serde::export::None; + let mut __field2: _serde::export::Option<Id> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("kind"), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<RefKind>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("span"), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<SpanData>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "ref_id", + ), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Id>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => match _serde::private::de::missing_field("kind") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => match _serde::private::de::missing_field("span") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => { + match _serde::private::de::missing_field("ref_id") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + _serde::export::Ok(Ref { + kind: __field0, + span: __field1, + ref_id: __field2, + }) + } + } + const FIELDS: &'static [&'static str] = &["kind", "span", "ref_id"]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "Ref", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<Ref>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_RefKind: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for RefKind { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + match *self { + RefKind::Function => _serde::Serializer::serialize_unit_variant( + __serializer, + "RefKind", + 0u32, + "Function", + ), + RefKind::Mod => { + _serde::Serializer::serialize_unit_variant(__serializer, "RefKind", 1u32, "Mod") + } + RefKind::Type => _serde::Serializer::serialize_unit_variant( + __serializer, + "RefKind", + 2u32, + "Type", + ), + RefKind::Variable => _serde::Serializer::serialize_unit_variant( + __serializer, + "RefKind", + 3u32, + "Variable", + ), + } + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_RefKind: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for RefKind { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __field3, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "variant identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + 3u64 => _serde::export::Ok(__Field::__field3), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"variant index 0 <= i < 4", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "Function" => _serde::export::Ok(__Field::__field0), + "Mod" => _serde::export::Ok(__Field::__field1), + "Type" => _serde::export::Ok(__Field::__field2), + "Variable" => _serde::export::Ok(__Field::__field3), + _ => _serde::export::Err(_serde::de::Error::unknown_variant( + __value, VARIANTS, + )), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"Function" => _serde::export::Ok(__Field::__field0), + b"Mod" => _serde::export::Ok(__Field::__field1), + b"Type" => _serde::export::Ok(__Field::__field2), + b"Variable" => _serde::export::Ok(__Field::__field3), + _ => { + let __value = &_serde::export::from_utf8_lossy(__value); + _serde::export::Err(_serde::de::Error::unknown_variant( + __value, VARIANTS, + )) + } + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<RefKind>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = RefKind; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "enum RefKind") + } + fn visit_enum<__A>( + self, + __data: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::EnumAccess<'de>, + { + match match _serde::de::EnumAccess::variant(__data) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + (__Field::__field0, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(RefKind::Function) + } + (__Field::__field1, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(RefKind::Mod) + } + (__Field::__field2, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(RefKind::Type) + } + (__Field::__field3, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(RefKind::Variable) + } + } + } + } + const VARIANTS: &'static [&'static str] = &["Function", "Mod", "Type", "Variable"]; + _serde::Deserializer::deserialize_enum( + __deserializer, + "RefKind", + VARIANTS, + __Visitor { + marker: _serde::export::PhantomData::<RefKind>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_MacroRef: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for MacroRef { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "MacroRef", + false as usize + 1 + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "span", + &self.span, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "qualname", + &self.qualname, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "callee_span", + &self.callee_span, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_MacroRef: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for MacroRef { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 3", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "span" => _serde::export::Ok(__Field::__field0), + "qualname" => _serde::export::Ok(__Field::__field1), + "callee_span" => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"span" => _serde::export::Ok(__Field::__field0), + b"qualname" => _serde::export::Ok(__Field::__field1), + b"callee_span" => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<MacroRef>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = MacroRef; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct MacroRef") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<SpanData>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct MacroRef with 3 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct MacroRef with 3 elements", + )); + } + }; + let __field2 = + match match _serde::de::SeqAccess::next_element::<SpanData>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct MacroRef with 3 elements", + )); + } + }; + _serde::export::Ok(MacroRef { + span: __field0, + qualname: __field1, + callee_span: __field2, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<SpanData> = _serde::export::None; + let mut __field1: _serde::export::Option<String> = _serde::export::None; + let mut __field2: _serde::export::Option<SpanData> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("span"), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<SpanData>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "qualname", + ), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "callee_span", + ), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<SpanData>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => match _serde::private::de::missing_field("span") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => { + match _serde::private::de::missing_field("qualname") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => { + match _serde::private::de::missing_field("callee_span") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + _serde::export::Ok(MacroRef { + span: __field0, + qualname: __field1, + callee_span: __field2, + }) + } + } + const FIELDS: &'static [&'static str] = &["span", "qualname", "callee_span"]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "MacroRef", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<MacroRef>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_Relation: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for Relation { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "Relation", + false as usize + 1 + 1 + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "span", + &self.span, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "kind", + &self.kind, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "from", + &self.from, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field(&mut __serde_state, "to", &self.to) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_Relation: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for Relation { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __field3, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + 3u64 => _serde::export::Ok(__Field::__field3), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 4", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "span" => _serde::export::Ok(__Field::__field0), + "kind" => _serde::export::Ok(__Field::__field1), + "from" => _serde::export::Ok(__Field::__field2), + "to" => _serde::export::Ok(__Field::__field3), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"span" => _serde::export::Ok(__Field::__field0), + b"kind" => _serde::export::Ok(__Field::__field1), + b"from" => _serde::export::Ok(__Field::__field2), + b"to" => _serde::export::Ok(__Field::__field3), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<Relation>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = Relation; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct Relation") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<SpanData>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct Relation with 4 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<RelationKind>(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct Relation with 4 elements", + )); + } + }; + let __field2 = match match _serde::de::SeqAccess::next_element::<Id>(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct Relation with 4 elements", + )); + } + }; + let __field3 = match match _serde::de::SeqAccess::next_element::<Id>(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 3usize, + &"struct Relation with 4 elements", + )); + } + }; + _serde::export::Ok(Relation { + span: __field0, + kind: __field1, + from: __field2, + to: __field3, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<SpanData> = _serde::export::None; + let mut __field1: _serde::export::Option<RelationKind> = _serde::export::None; + let mut __field2: _serde::export::Option<Id> = _serde::export::None; + let mut __field3: _serde::export::Option<Id> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("span"), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<SpanData>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("kind"), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<RelationKind>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("from"), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Id>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field3 => { + if _serde::export::Option::is_some(&__field3) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("to"), + ); + } + __field3 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Id>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => match _serde::private::de::missing_field("span") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => match _serde::private::de::missing_field("kind") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => match _serde::private::de::missing_field("from") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field3 = match __field3 { + _serde::export::Some(__field3) => __field3, + _serde::export::None => match _serde::private::de::missing_field("to") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + _serde::export::Ok(Relation { + span: __field0, + kind: __field1, + from: __field2, + to: __field3, + }) + } + } + const FIELDS: &'static [&'static str] = &["span", "kind", "from", "to"]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "Relation", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<Relation>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_RelationKind: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for RelationKind { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + match *self { + RelationKind::Impl { ref id } => { + let mut __serde_state = match _serde::Serializer::serialize_struct_variant( + __serializer, + "RelationKind", + 0u32, + "Impl", + 0 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStructVariant::serialize_field( + &mut __serde_state, + "id", + id, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStructVariant::end(__serde_state) + } + RelationKind::SuperTrait => _serde::Serializer::serialize_unit_variant( + __serializer, + "RelationKind", + 1u32, + "SuperTrait", + ), + } + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_RelationKind: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for RelationKind { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "variant identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"variant index 0 <= i < 2", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "Impl" => _serde::export::Ok(__Field::__field0), + "SuperTrait" => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Err(_serde::de::Error::unknown_variant( + __value, VARIANTS, + )), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"Impl" => _serde::export::Ok(__Field::__field0), + b"SuperTrait" => _serde::export::Ok(__Field::__field1), + _ => { + let __value = &_serde::export::from_utf8_lossy(__value); + _serde::export::Err(_serde::de::Error::unknown_variant( + __value, VARIANTS, + )) + } + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<RelationKind>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = RelationKind; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "enum RelationKind") + } + fn visit_enum<__A>( + self, + __data: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::EnumAccess<'de>, + { + match match _serde::de::EnumAccess::variant(__data) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + (__Field::__field0, __variant) => { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str( + __formatter, + "field identifier", + ) + } + fn visit_u64<__E>( + self, + __value: u64, + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 1", + )), + } + } + fn visit_str<__E>( + self, + __value: &str, + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "id" => _serde::export::Ok(__Field::__field0), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"id" => _serde::export::Ok(__Field::__field0), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>( + __deserializer: __D, + ) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier( + __deserializer, + __FieldVisitor, + ) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<RelationKind>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = RelationKind; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str( + __formatter, + "struct variant RelationKind::Impl", + ) + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = match match _serde::de::SeqAccess::next_element::< + u32, + >( + &mut __seq + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde :: export :: Err ( _serde :: de :: Error :: invalid_length ( 0usize , & "struct variant RelationKind::Impl with 1 element" ) ) ; + } + }; + _serde::export::Ok(RelationKind::Impl { id: __field0 }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<u32> = + _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde :: export :: Err ( < __A :: Error as _serde :: de :: Error > :: duplicate_field ( "id" ) ) ; + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<u32>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >( + &mut __map + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => { + match _serde::private::de::missing_field("id") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + _serde::export::Ok(RelationKind::Impl { id: __field0 }) + } + } + const FIELDS: &'static [&'static str] = &["id"]; + _serde::de::VariantAccess::struct_variant( + __variant, + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<RelationKind>, + lifetime: _serde::export::PhantomData, + }, + ) + } + (__Field::__field1, __variant) => { + match _serde::de::VariantAccess::unit_variant(__variant) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::export::Ok(RelationKind::SuperTrait) + } + } + } + } + const VARIANTS: &'static [&'static str] = &["Impl", "SuperTrait"]; + _serde::Deserializer::deserialize_enum( + __deserializer, + "RelationKind", + VARIANTS, + __Visitor { + marker: _serde::export::PhantomData::<RelationKind>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; + +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_Signature: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for Signature { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "Signature", + false as usize + 1 + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "text", + &self.text, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "defs", + &self.defs, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "refs", + &self.refs, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_Signature: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for Signature { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 3", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "text" => _serde::export::Ok(__Field::__field0), + "defs" => _serde::export::Ok(__Field::__field1), + "refs" => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"text" => _serde::export::Ok(__Field::__field0), + b"defs" => _serde::export::Ok(__Field::__field1), + b"refs" => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<Signature>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = Signature; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct Signature") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct Signature with 3 elements", + )); + } + }; + let __field1 = match match _serde::de::SeqAccess::next_element::<Vec<SigElement>>( + &mut __seq, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct Signature with 3 elements", + )); + } + }; + let __field2 = match match _serde::de::SeqAccess::next_element::<Vec<SigElement>>( + &mut __seq, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct Signature with 3 elements", + )); + } + }; + _serde::export::Ok(Signature { + text: __field0, + defs: __field1, + refs: __field2, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<String> = _serde::export::None; + let mut __field1: _serde::export::Option<Vec<SigElement>> = + _serde::export::None; + let mut __field2: _serde::export::Option<Vec<SigElement>> = + _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("text"), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("defs"), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Vec<SigElement>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("refs"), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Vec<SigElement>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => match _serde::private::de::missing_field("text") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => match _serde::private::de::missing_field("defs") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => match _serde::private::de::missing_field("refs") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + _serde::export::Ok(Signature { + text: __field0, + defs: __field1, + refs: __field2, + }) + } + } + const FIELDS: &'static [&'static str] = &["text", "defs", "refs"]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "Signature", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<Signature>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; + +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_SigElement: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for SigElement { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "SigElement", + false as usize + 1 + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field(&mut __serde_state, "id", &self.id) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "start", + &self.start, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "end", + &self.end, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_SigElement: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for SigElement { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 3", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "id" => _serde::export::Ok(__Field::__field0), + "start" => _serde::export::Ok(__Field::__field1), + "end" => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"id" => _serde::export::Ok(__Field::__field0), + b"start" => _serde::export::Ok(__Field::__field1), + b"end" => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<SigElement>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = SigElement; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct SigElement") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = match match _serde::de::SeqAccess::next_element::<Id>(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct SigElement with 3 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<usize>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct SigElement with 3 elements", + )); + } + }; + let __field2 = + match match _serde::de::SeqAccess::next_element::<usize>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct SigElement with 3 elements", + )); + } + }; + _serde::export::Ok(SigElement { + id: __field0, + start: __field1, + end: __field2, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<Id> = _serde::export::None; + let mut __field1: _serde::export::Option<usize> = _serde::export::None; + let mut __field2: _serde::export::Option<usize> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("id"), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Id>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("start"), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<usize>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("end"), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<usize>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => match _serde::private::de::missing_field("id") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => match _serde::private::de::missing_field("start") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => match _serde::private::de::missing_field("end") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + _serde::export::Ok(SigElement { + id: __field0, + start: __field1, + end: __field2, + }) + } + } + const FIELDS: &'static [&'static str] = &["id", "start", "end"]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "SigElement", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<SigElement>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; diff --git a/vendor/rls-span/.cargo-checksum.json b/vendor/rls-span/.cargo-checksum.json index 913fc58317..2e66eb4f3d 100644 --- a/vendor/rls-span/.cargo-checksum.json +++ b/vendor/rls-span/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"5c83d57714de4f904154486f65ff4e23f045382ec971002d16296905c9a9b875","src/compiler.rs":"8fb338075567a22a7a7fdce82f430e56b264771c481fed9148beb3f8cb48dd3e","src/lib.rs":"7d0bd1dafcc1e638662f811081d78ab3e8e4f8de752964190936837d8d81ded5"},"package":"33d66f1d6c6ccd5c98029f162544131698f6ebb61d8c697681cac409dcd08805"} \ No newline at end of file +{"files":{"Cargo.toml":"aa3996dd8e7eedc977595e9c05845960f2a1cbd6ff4c19859888ca7c5d7499fa","src/compiler.rs":"85d9be126acb74ff553387a1cbe6992aafe93dcf4ffcffa6a986c01397280b87","src/lib.rs":"2395cb6f75ad6ee706729c0bcfd9ff62eceb1ed7bd98de4d0e45298f89d48977","src/serde_expanded.rs":"25876b8a3629e8340cdc9f8fd5aa0afdd129c043e08f2b7d9bbebb7d2ac5028b"},"package":"f1cb4694410d8d2ce43ccff3682f1c782158a018d5a9a92185675677f7533eb3"} \ No newline at end of file diff --git a/vendor/rls-span/Cargo.toml b/vendor/rls-span/Cargo.toml index a19f2fd7b8..43ed171d11 100644 --- a/vendor/rls-span/Cargo.toml +++ b/vendor/rls-span/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -11,20 +11,20 @@ # will likely look very different (and much more reasonable) [package] +edition = "2018" name = "rls-span" -version = "0.4.1" +version = "0.5.1" authors = ["Nick Cameron <ncameron@mozilla.com>"] description = "Types for identifying code spans/ranges" categories = ["development-tools"] license = "Apache-2.0/MIT" -repository = "https://github.com/rust-dev-tools/rls-span" +repository = "https://github.com/rust-lang/rls" [dependencies.rustc-serialize] -version = "0.3" +version = "0.3.24" optional = true [dependencies.serde] version = "1.0" -optional = true [dependencies.serde_derive] version = "1.0" @@ -32,5 +32,5 @@ optional = true [features] default = [] +derive = ["serde_derive"] serialize-rustc = ["rustc-serialize"] -serialize-serde = ["serde", "serde_derive"] diff --git a/vendor/rls-span/src/compiler.rs b/vendor/rls-span/src/compiler.rs index 8eaba2b2ce..3c55134c73 100644 --- a/vendor/rls-span/src/compiler.rs +++ b/vendor/rls-span/src/compiler.rs @@ -1,20 +1,12 @@ -// Copyright 2016 The RLS Project Developers. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -/// These are the structures emitted by the compiler as part of JSON errors. -/// The original source can be found at -/// https://github.com/rust-lang/rust/blob/master/src/libsyntax/json.rs - +///! These are the structures emitted by the compiler as part of JSON errors. +///! The original source can be found at +///! https://github.com/rust-lang/rust/blob/master/src/libsyntax/json.rs use std::path::PathBuf; -use {Span, Row, Column, OneIndexed}; +use crate::{Column, OneIndexed, Row, Span}; -#[cfg_attr(feature = "serialize-serde", derive(Deserialize))] +#[cfg_attr(feature = "derive", derive(Deserialize))] +#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable))] #[derive(Debug, Clone)] pub struct DiagnosticSpan { pub file_name: String, @@ -54,7 +46,8 @@ impl DiagnosticSpan { } } -#[cfg_attr(feature = "serialize-serde", derive(Deserialize))] +#[cfg_attr(feature = "derive", derive(Deserialize))] +#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable))] #[derive(Debug, Clone)] pub struct DiagnosticSpanLine { pub text: String, @@ -65,7 +58,8 @@ pub struct DiagnosticSpanLine { pub highlight_end: usize, } -#[cfg_attr(feature = "serialize-serde", derive(Deserialize))] +#[cfg_attr(feature = "derive", derive(Deserialize))] +#[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable))] #[derive(Debug, Clone)] pub struct DiagnosticSpanMacroExpansion { /// span where macro was applied to generate this code; note that diff --git a/vendor/rls-span/src/lib.rs b/vendor/rls-span/src/lib.rs index 8c65314c99..7e02f6b149 100644 --- a/vendor/rls-span/src/lib.rs +++ b/vendor/rls-span/src/lib.rs @@ -1,31 +1,14 @@ -// Copyright 2016 The RLS Project Developers. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![cfg_attr(rustbuild, feature(staged_api, rustc_private))] -#![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))] - -#[cfg(feature = "serialize-serde")] -extern crate serde; -#[cfg(feature = "serialize-serde")] +#[cfg(feature = "derive")] #[macro_use] extern crate serde_derive; -#[cfg(feature = "serialize-rustc")] -extern crate rustc_serialize; -#[cfg(feature = "serialize-rustc")] -use rustc_serialize::{Encodable, Decodable}; -#[cfg(feature = "serialize-serde")] -use serde::{Serialize, Deserialize}; +use serde::{Deserialize, Serialize}; use std::marker::PhantomData; use std::path::PathBuf; pub mod compiler; +mod serde_expanded; #[derive(Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] pub struct Column<I: Indexed>(pub u32, PhantomData<I>); @@ -44,7 +27,6 @@ impl<I: Indexed> Clone for Column<I> { impl<I: Indexed> Copy for Column<I> {} -#[cfg(feature = "serialize-serde")] impl<I: Indexed> Serialize for Column<I> { fn serialize<S: serde::Serializer>( &self, @@ -54,24 +36,23 @@ impl<I: Indexed> Serialize for Column<I> { } } -#[cfg(feature = "serialize-serde")] impl<'dt, I: Indexed> Deserialize<'dt> for Column<I> { fn deserialize<D: serde::Deserializer<'dt>>( d: D, ) -> std::result::Result<Self, <D as serde::Deserializer<'dt>>::Error> { - <u32 as Deserialize>::deserialize(d).map(|x| Column::new(x)) + <u32 as Deserialize>::deserialize(d).map(Column::new) } } #[cfg(feature = "serialize-rustc")] -impl<I: Indexed> Decodable for Column<I> { +impl<I: Indexed> rustc_serialize::Decodable for Column<I> { fn decode<D: rustc_serialize::Decoder>(d: &mut D) -> Result<Column<I>, D::Error> { - d.read_u32().map(|x| Column::new(x)) + d.read_u32().map(Column::new) } } #[cfg(feature = "serialize-rustc")] -impl<I: Indexed> Encodable for Column<I> { +impl<I: Indexed> rustc_serialize::Encodable for Column<I> { fn encode<S: rustc_serialize::Encoder>(&self, s: &mut S) -> Result<(), S::Error> { s.emit_u32(self.0) } @@ -114,29 +95,27 @@ impl<I: Indexed> Clone for Row<I> { impl<I: Indexed> Copy for Row<I> {} -#[cfg(feature = "serialize-serde")] impl<I: Indexed> serde::Serialize for Row<I> { fn serialize<S: serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> { s.serialize_u32(self.0) } } -#[cfg(feature = "serialize-serde")] impl<'dt, I: Indexed> serde::Deserialize<'dt> for Row<I> { fn deserialize<D: serde::Deserializer<'dt>>(d: D) -> std::result::Result<Self, D::Error> { - <u32 as Deserialize>::deserialize(d).map(|x| Row::new(x)) + <u32 as Deserialize>::deserialize(d).map(Row::new) } } #[cfg(feature = "serialize-rustc")] -impl<I: Indexed> Decodable for Row<I> { +impl<I: Indexed> rustc_serialize::Decodable for Row<I> { fn decode<D: rustc_serialize::Decoder>(d: &mut D) -> Result<Row<I>, D::Error> { - d.read_u32().map(|x| Row::new(x)) + d.read_u32().map(Row::new) } } #[cfg(feature = "serialize-rustc")] -impl<I: Indexed> Encodable for Row<I> { +impl<I: Indexed> rustc_serialize::Encodable for Row<I> { fn encode<S: rustc_serialize::Encoder>(&self, s: &mut S) -> Result<(), S::Error> { s.emit_u32(self.0) } @@ -162,8 +141,8 @@ impl Row<ZeroIndexed> { } } +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] #[derive(Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] pub struct Position<I: Indexed> { pub row: Row<I>, @@ -172,7 +151,7 @@ pub struct Position<I: Indexed> { impl<I: Indexed> Position<I> { pub fn new(row: Row<I>, col: Column<I>) -> Position<I> { - Position { row: row, col: col } + Position { row, col } } } @@ -186,24 +165,18 @@ impl<I: Indexed> Copy for Position<I> {} impl Position<OneIndexed> { pub fn zero_indexed(self) -> Position<ZeroIndexed> { - Position { - row: self.row.zero_indexed(), - col: self.col.zero_indexed(), - } + Position { row: self.row.zero_indexed(), col: self.col.zero_indexed() } } } impl Position<ZeroIndexed> { pub fn one_indexed(self) -> Position<OneIndexed> { - Position { - row: self.row.one_indexed(), - col: self.col.one_indexed(), - } + Position { row: self.row.one_indexed(), col: self.col.one_indexed() } } } +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] #[derive(Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] pub struct Range<I: Indexed> { pub row_start: Row<I>, @@ -219,35 +192,19 @@ impl<I: Indexed> Range<I> { col_start: Column<I>, col_end: Column<I>, ) -> Range<I> { - Range { - row_start: row_start, - row_end: row_end, - col_start: col_start, - col_end: col_end, - } + Range { row_start, row_end, col_start, col_end } } pub fn from_positions(start: Position<I>, end: Position<I>) -> Range<I> { - Range { - row_start: start.row, - row_end: end.row, - col_start: start.col, - col_end: end.col, - } + Range { row_start: start.row, row_end: end.row, col_start: start.col, col_end: end.col } } pub fn start(self) -> Position<I> { - Position { - row: self.row_start, - col: self.col_start, - } + Position { row: self.row_start, col: self.col_start } } pub fn end(self) -> Position<I> { - Position { - row: self.row_end, - col: self.col_end, - } + Position { row: self.row_end, col: self.col_end } } } @@ -281,8 +238,8 @@ impl Range<ZeroIndexed> { } } +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] #[derive(Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] pub struct Location<I: Indexed> { pub file: PathBuf, @@ -291,49 +248,34 @@ pub struct Location<I: Indexed> { impl<I: Indexed> Location<I> { pub fn new<F: Into<PathBuf>>(row: Row<I>, col: Column<I>, file: F) -> Location<I> { - Location { - position: Position { row: row, col: col }, - file: file.into(), - } + Location { position: Position { row, col }, file: file.into() } } pub fn from_position<F: Into<PathBuf>>(position: Position<I>, file: F) -> Location<I> { - Location { - position: position, - file: file.into(), - } + Location { position, file: file.into() } } } impl<I: Indexed> Clone for Location<I> { fn clone(&self) -> Location<I> { - Location { - position: self.position, - file: self.file.clone(), - } + Location { position: self.position, file: self.file.clone() } } } impl Location<OneIndexed> { pub fn zero_indexed(&self) -> Location<ZeroIndexed> { - Location { - position: self.position.zero_indexed(), - file: self.file.clone(), - } + Location { position: self.position.zero_indexed(), file: self.file.clone() } } } impl Location<ZeroIndexed> { pub fn one_indexed(&self) -> Location<OneIndexed> { - Location { - position: self.position.one_indexed(), - file: self.file.clone(), - } + Location { position: self.position.one_indexed(), file: self.file.clone() } } } +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] #[derive(Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] pub struct Span<I: Indexed> { pub file: PathBuf, @@ -348,22 +290,11 @@ impl<I: Indexed> Span<I> { col_end: Column<I>, file: F, ) -> Span<I> { - Span { - range: Range { - row_start: row_start, - row_end: row_end, - col_start: col_start, - col_end: col_end, - }, - file: file.into(), - } + Span { range: Range { row_start, row_end, col_start, col_end }, file: file.into() } } pub fn from_range<F: Into<PathBuf>>(range: Range<I>, file: F) -> Span<I> { - Span { - range: range, - file: file.into(), - } + Span { range, file: file.into() } } pub fn from_positions<F: Into<PathBuf>>( @@ -371,55 +302,41 @@ impl<I: Indexed> Span<I> { end: Position<I>, file: F, ) -> Span<I> { - Span { - range: Range::from_positions(start, end), - file: file.into(), - } + Span { range: Range::from_positions(start, end), file: file.into() } } } impl<I: Indexed> Clone for Span<I> { fn clone(&self) -> Span<I> { - Span { - range: self.range, - file: self.file.clone(), - } + Span { range: self.range, file: self.file.clone() } } } impl Span<OneIndexed> { pub fn zero_indexed(&self) -> Span<ZeroIndexed> { - Span { - range: self.range.zero_indexed(), - file: self.file.clone(), - } + Span { range: self.range.zero_indexed(), file: self.file.clone() } } } impl Span<ZeroIndexed> { pub fn one_indexed(&self) -> Span<OneIndexed> { - Span { - range: self.range.one_indexed(), - file: self.file.clone(), - } + Span { range: self.range.one_indexed(), file: self.file.clone() } } } -#[cfg(feature = "serialize-serde")] -pub trait Indexed {} -#[cfg(not(feature = "serialize-serde"))] pub trait Indexed {} + +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] #[derive(Hash, PartialEq, Eq, Debug, PartialOrd, Ord)] pub struct ZeroIndexed; impl Indexed for ZeroIndexed {} + +#[cfg_attr(feature = "derive", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serialize-rustc", derive(RustcDecodable, RustcEncodable))] -#[cfg_attr(feature = "serialize-serde", derive(Serialize, Deserialize))] #[derive(Hash, PartialEq, Eq, Debug, PartialOrd, Ord)] pub struct OneIndexed; impl Indexed for OneIndexed {} - #[cfg(test)] mod test {} diff --git a/vendor/rls-span/src/serde_expanded.rs b/vendor/rls-span/src/serde_expanded.rs new file mode 100644 index 0000000000..fe40960fbe --- /dev/null +++ b/vendor/rls-span/src/serde_expanded.rs @@ -0,0 +1,2689 @@ +//! This module exists only because Rust does not support proc macros from +//! crates.io (serde_derive) due to cross-compilation issues +//! (https://github.com/rust-lang/rust/pull/60053). +//! +//! Impls here are copied verbatim from the `cargo expand` output. +//! Please remove this in favour of `#[derive(Serialize, Deserialize)]` if +//! possible. +#![cfg(not(feature = "derive"))] +#![allow(clippy::all)] + +use super::*; +use compiler::*; + +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_DiagnosticSpan: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for DiagnosticSpan { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __field3, + __field4, + __field5, + __field6, + __field7, + __field8, + __field9, + __field10, + __field11, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + 3u64 => _serde::export::Ok(__Field::__field3), + 4u64 => _serde::export::Ok(__Field::__field4), + 5u64 => _serde::export::Ok(__Field::__field5), + 6u64 => _serde::export::Ok(__Field::__field6), + 7u64 => _serde::export::Ok(__Field::__field7), + 8u64 => _serde::export::Ok(__Field::__field8), + 9u64 => _serde::export::Ok(__Field::__field9), + 10u64 => _serde::export::Ok(__Field::__field10), + 11u64 => _serde::export::Ok(__Field::__field11), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 12", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "file_name" => _serde::export::Ok(__Field::__field0), + "byte_start" => _serde::export::Ok(__Field::__field1), + "byte_end" => _serde::export::Ok(__Field::__field2), + "line_start" => _serde::export::Ok(__Field::__field3), + "line_end" => _serde::export::Ok(__Field::__field4), + "column_start" => _serde::export::Ok(__Field::__field5), + "column_end" => _serde::export::Ok(__Field::__field6), + "is_primary" => _serde::export::Ok(__Field::__field7), + "text" => _serde::export::Ok(__Field::__field8), + "label" => _serde::export::Ok(__Field::__field9), + "suggested_replacement" => _serde::export::Ok(__Field::__field10), + "expansion" => _serde::export::Ok(__Field::__field11), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"file_name" => _serde::export::Ok(__Field::__field0), + b"byte_start" => _serde::export::Ok(__Field::__field1), + b"byte_end" => _serde::export::Ok(__Field::__field2), + b"line_start" => _serde::export::Ok(__Field::__field3), + b"line_end" => _serde::export::Ok(__Field::__field4), + b"column_start" => _serde::export::Ok(__Field::__field5), + b"column_end" => _serde::export::Ok(__Field::__field6), + b"is_primary" => _serde::export::Ok(__Field::__field7), + b"text" => _serde::export::Ok(__Field::__field8), + b"label" => _serde::export::Ok(__Field::__field9), + b"suggested_replacement" => _serde::export::Ok(__Field::__field10), + b"expansion" => _serde::export::Ok(__Field::__field11), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<DiagnosticSpan>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = DiagnosticSpan; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct DiagnosticSpan") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct DiagnosticSpan with 12 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<u32>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct DiagnosticSpan with 12 elements", + )); + } + }; + let __field2 = + match match _serde::de::SeqAccess::next_element::<u32>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct DiagnosticSpan with 12 elements", + )); + } + }; + let __field3 = + match match _serde::de::SeqAccess::next_element::<usize>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 3usize, + &"struct DiagnosticSpan with 12 elements", + )); + } + }; + let __field4 = + match match _serde::de::SeqAccess::next_element::<usize>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 4usize, + &"struct DiagnosticSpan with 12 elements", + )); + } + }; + let __field5 = + match match _serde::de::SeqAccess::next_element::<usize>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 5usize, + &"struct DiagnosticSpan with 12 elements", + )); + } + }; + let __field6 = + match match _serde::de::SeqAccess::next_element::<usize>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 6usize, + &"struct DiagnosticSpan with 12 elements", + )); + } + }; + let __field7 = + match match _serde::de::SeqAccess::next_element::<bool>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 7usize, + &"struct DiagnosticSpan with 12 elements", + )); + } + }; + let __field8 = match match _serde::de::SeqAccess::next_element::< + Vec<DiagnosticSpanLine>, + >(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 8usize, + &"struct DiagnosticSpan with 12 elements", + )); + } + }; + let __field9 = match match _serde::de::SeqAccess::next_element::<Option<String>>( + &mut __seq, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 9usize, + &"struct DiagnosticSpan with 12 elements", + )); + } + }; + let __field10 = match match _serde::de::SeqAccess::next_element::<Option<String>>( + &mut __seq, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 10usize, + &"struct DiagnosticSpan with 12 elements", + )); + } + }; + let __field11 = match match _serde::de::SeqAccess::next_element::< + Option<Box<DiagnosticSpanMacroExpansion>>, + >(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 11usize, + &"struct DiagnosticSpan with 12 elements", + )); + } + }; + _serde::export::Ok(DiagnosticSpan { + file_name: __field0, + byte_start: __field1, + byte_end: __field2, + line_start: __field3, + line_end: __field4, + column_start: __field5, + column_end: __field6, + is_primary: __field7, + text: __field8, + label: __field9, + suggested_replacement: __field10, + expansion: __field11, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<String> = _serde::export::None; + let mut __field1: _serde::export::Option<u32> = _serde::export::None; + let mut __field2: _serde::export::Option<u32> = _serde::export::None; + let mut __field3: _serde::export::Option<usize> = _serde::export::None; + let mut __field4: _serde::export::Option<usize> = _serde::export::None; + let mut __field5: _serde::export::Option<usize> = _serde::export::None; + let mut __field6: _serde::export::Option<usize> = _serde::export::None; + let mut __field7: _serde::export::Option<bool> = _serde::export::None; + let mut __field8: _serde::export::Option<Vec<DiagnosticSpanLine>> = + _serde::export::None; + let mut __field9: _serde::export::Option<Option<String>> = _serde::export::None; + let mut __field10: _serde::export::Option<Option<String>> = + _serde::export::None; + let mut __field11: _serde::export::Option< + Option<Box<DiagnosticSpanMacroExpansion>>, + > = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "file_name", + ), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "byte_start", + ), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<u32>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "byte_end", + ), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<u32>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field3 => { + if _serde::export::Option::is_some(&__field3) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "line_start", + ), + ); + } + __field3 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<usize>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field4 => { + if _serde::export::Option::is_some(&__field4) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "line_end", + ), + ); + } + __field4 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<usize>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field5 => { + if _serde::export::Option::is_some(&__field5) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "column_start", + ), + ); + } + __field5 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<usize>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field6 => { + if _serde::export::Option::is_some(&__field6) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "column_end", + ), + ); + } + __field6 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<usize>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field7 => { + if _serde::export::Option::is_some(&__field7) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "is_primary", + ), + ); + } + __field7 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<bool>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field8 => { + if _serde::export::Option::is_some(&__field8) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("text"), + ); + } + __field8 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Vec<DiagnosticSpanLine>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field9 => { + if _serde::export::Option::is_some(&__field9) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("label"), + ); + } + __field9 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Option<String>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field10 => { + if _serde::export::Option::is_some(&__field10) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "suggested_replacement", + ), + ); + } + __field10 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Option<String>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field11 => { + if _serde::export::Option::is_some(&__field11) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "expansion", + ), + ); + } + __field11 = _serde::export::Some( + match _serde::de::MapAccess::next_value::< + Option<Box<DiagnosticSpanMacroExpansion>>, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => { + match _serde::private::de::missing_field("file_name") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => { + match _serde::private::de::missing_field("byte_start") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => { + match _serde::private::de::missing_field("byte_end") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field3 = match __field3 { + _serde::export::Some(__field3) => __field3, + _serde::export::None => { + match _serde::private::de::missing_field("line_start") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field4 = match __field4 { + _serde::export::Some(__field4) => __field4, + _serde::export::None => { + match _serde::private::de::missing_field("line_end") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field5 = match __field5 { + _serde::export::Some(__field5) => __field5, + _serde::export::None => { + match _serde::private::de::missing_field("column_start") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field6 = match __field6 { + _serde::export::Some(__field6) => __field6, + _serde::export::None => { + match _serde::private::de::missing_field("column_end") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field7 = match __field7 { + _serde::export::Some(__field7) => __field7, + _serde::export::None => { + match _serde::private::de::missing_field("is_primary") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field8 = match __field8 { + _serde::export::Some(__field8) => __field8, + _serde::export::None => match _serde::private::de::missing_field("text") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field9 = match __field9 { + _serde::export::Some(__field9) => __field9, + _serde::export::None => match _serde::private::de::missing_field("label") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field10 = match __field10 { + _serde::export::Some(__field10) => __field10, + _serde::export::None => { + match _serde::private::de::missing_field("suggested_replacement") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field11 = match __field11 { + _serde::export::Some(__field11) => __field11, + _serde::export::None => { + match _serde::private::de::missing_field("expansion") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + _serde::export::Ok(DiagnosticSpan { + file_name: __field0, + byte_start: __field1, + byte_end: __field2, + line_start: __field3, + line_end: __field4, + column_start: __field5, + column_end: __field6, + is_primary: __field7, + text: __field8, + label: __field9, + suggested_replacement: __field10, + expansion: __field11, + }) + } + } + const FIELDS: &'static [&'static str] = &[ + "file_name", + "byte_start", + "byte_end", + "line_start", + "line_end", + "column_start", + "column_end", + "is_primary", + "text", + "label", + "suggested_replacement", + "expansion", + ]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "DiagnosticSpan", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<DiagnosticSpan>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_DiagnosticSpanLine: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for DiagnosticSpanLine { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 3", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "text" => _serde::export::Ok(__Field::__field0), + "highlight_start" => _serde::export::Ok(__Field::__field1), + "highlight_end" => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"text" => _serde::export::Ok(__Field::__field0), + b"highlight_start" => _serde::export::Ok(__Field::__field1), + b"highlight_end" => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<DiagnosticSpanLine>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = DiagnosticSpanLine; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct DiagnosticSpanLine") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct DiagnosticSpanLine with 3 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<usize>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct DiagnosticSpanLine with 3 elements", + )); + } + }; + let __field2 = + match match _serde::de::SeqAccess::next_element::<usize>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct DiagnosticSpanLine with 3 elements", + )); + } + }; + _serde::export::Ok(DiagnosticSpanLine { + text: __field0, + highlight_start: __field1, + highlight_end: __field2, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<String> = _serde::export::None; + let mut __field1: _serde::export::Option<usize> = _serde::export::None; + let mut __field2: _serde::export::Option<usize> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("text"), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "highlight_start", + ), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<usize>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "highlight_end", + ), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<usize>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => match _serde::private::de::missing_field("text") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => { + match _serde::private::de::missing_field("highlight_start") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => { + match _serde::private::de::missing_field("highlight_end") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + _serde::export::Ok(DiagnosticSpanLine { + text: __field0, + highlight_start: __field1, + highlight_end: __field2, + }) + } + } + const FIELDS: &'static [&'static str] = &["text", "highlight_start", "highlight_end"]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "DiagnosticSpanLine", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<DiagnosticSpanLine>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_DiagnosticSpanMacroExpansion: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for DiagnosticSpanMacroExpansion { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 3", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "span" => _serde::export::Ok(__Field::__field0), + "macro_decl_name" => _serde::export::Ok(__Field::__field1), + "def_site_span" => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"span" => _serde::export::Ok(__Field::__field0), + b"macro_decl_name" => _serde::export::Ok(__Field::__field1), + b"def_site_span" => _serde::export::Ok(__Field::__field2), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de> { + marker: _serde::export::PhantomData<DiagnosticSpanMacroExpansion>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de> _serde::de::Visitor<'de> for __Visitor<'de> { + type Value = DiagnosticSpanMacroExpansion; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str( + __formatter, + "struct DiagnosticSpanMacroExpansion", + ) + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = match match _serde::de::SeqAccess::next_element::<DiagnosticSpan>( + &mut __seq, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct DiagnosticSpanMacroExpansion with 3 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<String>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct DiagnosticSpanMacroExpansion with 3 elements", + )); + } + }; + let __field2 = match match _serde::de::SeqAccess::next_element::< + Option<DiagnosticSpan>, + >(&mut __seq) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct DiagnosticSpanMacroExpansion with 3 elements", + )); + } + }; + _serde::export::Ok(DiagnosticSpanMacroExpansion { + span: __field0, + macro_decl_name: __field1, + def_site_span: __field2, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<DiagnosticSpan> = _serde::export::None; + let mut __field1: _serde::export::Option<String> = _serde::export::None; + let mut __field2: _serde::export::Option<Option<DiagnosticSpan>> = + _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("span"), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<DiagnosticSpan>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "macro_decl_name", + ), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<String>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "def_site_span", + ), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Option<DiagnosticSpan>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => match _serde::private::de::missing_field("span") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => { + match _serde::private::de::missing_field("macro_decl_name") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => { + match _serde::private::de::missing_field("def_site_span") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + _serde::export::Ok(DiagnosticSpanMacroExpansion { + span: __field0, + macro_decl_name: __field1, + def_site_span: __field2, + }) + } + } + const FIELDS: &'static [&'static str] = &["span", "macro_decl_name", "def_site_span"]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "DiagnosticSpanMacroExpansion", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<DiagnosticSpanMacroExpansion>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_Position: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<I: Indexed> _serde::Serialize for Position<I> + where + I: _serde::Serialize, + { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "Position", + false as usize + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "row", + &self.row, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "col", + &self.col, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_Position: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de, I: Indexed> _serde::Deserialize<'de> for Position<I> + where + I: _serde::Deserialize<'de>, + { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 2", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "row" => _serde::export::Ok(__Field::__field0), + "col" => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"row" => _serde::export::Ok(__Field::__field0), + b"col" => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de, I: Indexed> + where + I: _serde::Deserialize<'de>, + { + marker: _serde::export::PhantomData<Position<I>>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de, I: Indexed> _serde::de::Visitor<'de> for __Visitor<'de, I> + where + I: _serde::Deserialize<'de>, + { + type Value = Position<I>; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct Position") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<Row<I>>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct Position with 2 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<Column<I>>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct Position with 2 elements", + )); + } + }; + _serde::export::Ok(Position { row: __field0, col: __field1 }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<Row<I>> = _serde::export::None; + let mut __field1: _serde::export::Option<Column<I>> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("row"), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Row<I>>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("col"), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Column<I>>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => match _serde::private::de::missing_field("row") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => match _serde::private::de::missing_field("col") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + _serde::export::Ok(Position { row: __field0, col: __field1 }) + } + } + const FIELDS: &'static [&'static str] = &["row", "col"]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "Position", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<Position<I>>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_Range: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<I: Indexed> _serde::Serialize for Range<I> + where + I: _serde::Serialize, + { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "Range", + false as usize + 1 + 1 + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "row_start", + &self.row_start, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "row_end", + &self.row_end, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "col_start", + &self.col_start, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "col_end", + &self.col_end, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_Range: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de, I: Indexed> _serde::Deserialize<'de> for Range<I> + where + I: _serde::Deserialize<'de>, + { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __field2, + __field3, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + 2u64 => _serde::export::Ok(__Field::__field2), + 3u64 => _serde::export::Ok(__Field::__field3), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 4", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "row_start" => _serde::export::Ok(__Field::__field0), + "row_end" => _serde::export::Ok(__Field::__field1), + "col_start" => _serde::export::Ok(__Field::__field2), + "col_end" => _serde::export::Ok(__Field::__field3), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"row_start" => _serde::export::Ok(__Field::__field0), + b"row_end" => _serde::export::Ok(__Field::__field1), + b"col_start" => _serde::export::Ok(__Field::__field2), + b"col_end" => _serde::export::Ok(__Field::__field3), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de, I: Indexed> + where + I: _serde::Deserialize<'de>, + { + marker: _serde::export::PhantomData<Range<I>>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de, I: Indexed> _serde::de::Visitor<'de> for __Visitor<'de, I> + where + I: _serde::Deserialize<'de>, + { + type Value = Range<I>; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct Range") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<Row<I>>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct Range with 4 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<Row<I>>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct Range with 4 elements", + )); + } + }; + let __field2 = + match match _serde::de::SeqAccess::next_element::<Column<I>>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 2usize, + &"struct Range with 4 elements", + )); + } + }; + let __field3 = + match match _serde::de::SeqAccess::next_element::<Column<I>>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 3usize, + &"struct Range with 4 elements", + )); + } + }; + _serde::export::Ok(Range { + row_start: __field0, + row_end: __field1, + col_start: __field2, + col_end: __field3, + }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<Row<I>> = _serde::export::None; + let mut __field1: _serde::export::Option<Row<I>> = _serde::export::None; + let mut __field2: _serde::export::Option<Column<I>> = _serde::export::None; + let mut __field3: _serde::export::Option<Column<I>> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "row_start", + ), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Row<I>>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "row_end", + ), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Row<I>>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field2 => { + if _serde::export::Option::is_some(&__field2) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "col_start", + ), + ); + } + __field2 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Column<I>>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field3 => { + if _serde::export::Option::is_some(&__field3) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "col_end", + ), + ); + } + __field3 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Column<I>>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => { + match _serde::private::de::missing_field("row_start") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => match _serde::private::de::missing_field("row_end") + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field2 = match __field2 { + _serde::export::Some(__field2) => __field2, + _serde::export::None => { + match _serde::private::de::missing_field("col_start") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + let __field3 = match __field3 { + _serde::export::Some(__field3) => __field3, + _serde::export::None => match _serde::private::de::missing_field("col_end") + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + _serde::export::Ok(Range { + row_start: __field0, + row_end: __field1, + col_start: __field2, + col_end: __field3, + }) + } + } + const FIELDS: &'static [&'static str] = + &["row_start", "row_end", "col_start", "col_end"]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "Range", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<Range<I>>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_Location: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<I: Indexed> _serde::Serialize for Location<I> + where + I: _serde::Serialize, + { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "Location", + false as usize + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "file", + &self.file, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "position", + &self.position, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_Location: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de, I: Indexed> _serde::Deserialize<'de> for Location<I> + where + I: _serde::Deserialize<'de>, + { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 2", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "file" => _serde::export::Ok(__Field::__field0), + "position" => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"file" => _serde::export::Ok(__Field::__field0), + b"position" => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de, I: Indexed> + where + I: _serde::Deserialize<'de>, + { + marker: _serde::export::PhantomData<Location<I>>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de, I: Indexed> _serde::de::Visitor<'de> for __Visitor<'de, I> + where + I: _serde::Deserialize<'de>, + { + type Value = Location<I>; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct Location") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<PathBuf>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct Location with 2 elements", + )); + } + }; + let __field1 = match match _serde::de::SeqAccess::next_element::<Position<I>>( + &mut __seq, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct Location with 2 elements", + )); + } + }; + _serde::export::Ok(Location { file: __field0, position: __field1 }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<PathBuf> = _serde::export::None; + let mut __field1: _serde::export::Option<Position<I>> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("file"), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<PathBuf>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field( + "position", + ), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Position<I>>( + &mut __map, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => match _serde::private::de::missing_field("file") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => { + match _serde::private::de::missing_field("position") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + } + }; + _serde::export::Ok(Location { file: __field0, position: __field1 }) + } + } + const FIELDS: &'static [&'static str] = &["file", "position"]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "Location", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<Location<I>>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_Span: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<I: Indexed> _serde::Serialize for Span<I> + where + I: _serde::Serialize, + { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + let mut __serde_state = match _serde::Serializer::serialize_struct( + __serializer, + "Span", + false as usize + 1 + 1, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "file", + &self.file, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + match _serde::ser::SerializeStruct::serialize_field( + &mut __serde_state, + "range", + &self.range, + ) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + _serde::ser::SerializeStruct::end(__serde_state) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_Span: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de, I: Indexed> _serde::Deserialize<'de> for Span<I> + where + I: _serde::Deserialize<'de>, + { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + #[allow(non_camel_case_types)] + enum __Field { + __field0, + __field1, + __ignore, + } + struct __FieldVisitor; + impl<'de> _serde::de::Visitor<'de> for __FieldVisitor { + type Value = __Field; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "field identifier") + } + fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + 0u64 => _serde::export::Ok(__Field::__field0), + 1u64 => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Err(_serde::de::Error::invalid_value( + _serde::de::Unexpected::Unsigned(__value), + &"field index 0 <= i < 2", + )), + } + } + fn visit_str<__E>(self, __value: &str) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + "file" => _serde::export::Ok(__Field::__field0), + "range" => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Ok(__Field::__ignore), + } + } + fn visit_bytes<__E>( + self, + __value: &[u8], + ) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + match __value { + b"file" => _serde::export::Ok(__Field::__field0), + b"range" => _serde::export::Ok(__Field::__field1), + _ => _serde::export::Ok(__Field::__ignore), + } + } + } + impl<'de> _serde::Deserialize<'de> for __Field { + #[inline] + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + _serde::Deserializer::deserialize_identifier(__deserializer, __FieldVisitor) + } + } + struct __Visitor<'de, I: Indexed> + where + I: _serde::Deserialize<'de>, + { + marker: _serde::export::PhantomData<Span<I>>, + lifetime: _serde::export::PhantomData<&'de ()>, + } + impl<'de, I: Indexed> _serde::de::Visitor<'de> for __Visitor<'de, I> + where + I: _serde::Deserialize<'de>, + { + type Value = Span<I>; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "struct Span") + } + #[inline] + fn visit_seq<__A>( + self, + mut __seq: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::SeqAccess<'de>, + { + let __field0 = + match match _serde::de::SeqAccess::next_element::<PathBuf>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 0usize, + &"struct Span with 2 elements", + )); + } + }; + let __field1 = + match match _serde::de::SeqAccess::next_element::<Range<I>>(&mut __seq) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } { + _serde::export::Some(__value) => __value, + _serde::export::None => { + return _serde::export::Err(_serde::de::Error::invalid_length( + 1usize, + &"struct Span with 2 elements", + )); + } + }; + _serde::export::Ok(Span { file: __field0, range: __field1 }) + } + #[inline] + fn visit_map<__A>( + self, + mut __map: __A, + ) -> _serde::export::Result<Self::Value, __A::Error> + where + __A: _serde::de::MapAccess<'de>, + { + let mut __field0: _serde::export::Option<PathBuf> = _serde::export::None; + let mut __field1: _serde::export::Option<Range<I>> = _serde::export::None; + while let _serde::export::Some(__key) = + match _serde::de::MapAccess::next_key::<__Field>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + } + { + match __key { + __Field::__field0 => { + if _serde::export::Option::is_some(&__field0) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("file"), + ); + } + __field0 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<PathBuf>(&mut __map) { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + __Field::__field1 => { + if _serde::export::Option::is_some(&__field1) { + return _serde::export::Err( + <__A::Error as _serde::de::Error>::duplicate_field("range"), + ); + } + __field1 = _serde::export::Some( + match _serde::de::MapAccess::next_value::<Range<I>>(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + ); + } + _ => { + let _ = match _serde::de::MapAccess::next_value::< + _serde::de::IgnoredAny, + >(&mut __map) + { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }; + } + } + } + let __field0 = match __field0 { + _serde::export::Some(__field0) => __field0, + _serde::export::None => match _serde::private::de::missing_field("file") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + let __field1 = match __field1 { + _serde::export::Some(__field1) => __field1, + _serde::export::None => match _serde::private::de::missing_field("range") { + _serde::export::Ok(__val) => __val, + _serde::export::Err(__err) => { + return _serde::export::Err(__err); + } + }, + }; + _serde::export::Ok(Span { file: __field0, range: __field1 }) + } + } + const FIELDS: &'static [&'static str] = &["file", "range"]; + _serde::Deserializer::deserialize_struct( + __deserializer, + "Span", + FIELDS, + __Visitor { + marker: _serde::export::PhantomData::<Span<I>>, + lifetime: _serde::export::PhantomData, + }, + ) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_ZeroIndexed: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for ZeroIndexed { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + _serde::Serializer::serialize_unit_struct(__serializer, "ZeroIndexed") + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_ZeroIndexed: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for ZeroIndexed { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + struct __Visitor; + impl<'de> _serde::de::Visitor<'de> for __Visitor { + type Value = ZeroIndexed; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "unit struct ZeroIndexed") + } + #[inline] + fn visit_unit<__E>(self) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + _serde::export::Ok(ZeroIndexed) + } + } + _serde::Deserializer::deserialize_unit_struct(__deserializer, "ZeroIndexed", __Visitor) + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_SERIALIZE_FOR_OneIndexed: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl _serde::Serialize for OneIndexed { + fn serialize<__S>(&self, __serializer: __S) -> _serde::export::Result<__S::Ok, __S::Error> + where + __S: _serde::Serializer, + { + _serde::Serializer::serialize_unit_struct(__serializer, "OneIndexed") + } + } +}; +#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] +const _IMPL_DESERIALIZE_FOR_OneIndexed: () = { + #[allow(unknown_lints)] + #[allow(rust_2018_idioms)] + extern crate serde as _serde; + #[automatically_derived] + impl<'de> _serde::Deserialize<'de> for OneIndexed { + fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error> + where + __D: _serde::Deserializer<'de>, + { + struct __Visitor; + impl<'de> _serde::de::Visitor<'de> for __Visitor { + type Value = OneIndexed; + fn expecting( + &self, + __formatter: &mut _serde::export::Formatter, + ) -> _serde::export::fmt::Result { + _serde::export::Formatter::write_str(__formatter, "unit struct OneIndexed") + } + #[inline] + fn visit_unit<__E>(self) -> _serde::export::Result<Self::Value, __E> + where + __E: _serde::de::Error, + { + _serde::export::Ok(OneIndexed) + } + } + _serde::Deserializer::deserialize_unit_struct(__deserializer, "OneIndexed", __Visitor) + } + } +}; diff --git a/vendor/rustc-rayon-core/.cargo-checksum.json b/vendor/rustc-rayon-core/.cargo-checksum.json index 7cf7af3bc4..80badabbe1 100644 --- a/vendor/rustc-rayon-core/.cargo-checksum.json +++ b/vendor/rustc-rayon-core/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"25d15bab4b5a7fb7e4ed21ba0dea63d0ff43ad0984e2936a8989c60c562eca6d","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0621878e61f0d0fda054bcbe02df75192c28bde1ecc8289cbd86aeba2dd72720","README.md":"2a7718f32e838f8ad7136861e3fb2d74265104a626a1152b1c6737562e873cbe","build.rs":"fa31cb198b772600d100a7c403ddedccef637d2e6b2da431fa7f02ca41307fc6","src/compile_fail/mod.rs":"4d70256295bd64691a8c1994b323559cda1888e85f0b45ca55711541c257dcb6","src/compile_fail/quicksort_race1.rs":"35f498cda38f4eb6e00117f78ed68e0fe5a3fa61c25303d9c08a19bda345bc6c","src/compile_fail/quicksort_race2.rs":"cbb40030c7867cae34bb373b6ec5d97c2ac6de39bc917f47879b30eb423924bc","src/compile_fail/quicksort_race3.rs":"8403643e64c969306b1a9b1243378e6ccdd313b57e1878dbd31393618082fd35","src/compile_fail/rc_return.rs":"b6f1f821ef30086e2990db1ac58a92adaf31e57c23c587c7746d6303865c5c0f","src/compile_fail/rc_upvar.rs":"92a799b313fb88a0eb83fc1aaaea4b61604222b45e20f1c22ff5b092a03f8620","src/compile_fail/scope_join_bad.rs":"7ce5355823be9c01dd6ddf1da110b3cff1092a025788f6f6c58cbd21bd09c8ad","src/internal/mod.rs":"26fb298bbb0d785bae5da8ca181b02f267376e766cea0757a191136fc432103e","src/internal/task.rs":"b66e780e91c40684cae346a44d7785791810340a4e2aef01865922fe17032e9d","src/internal/worker.rs":"ce64d274f8c98b8fab4b79753ecb8099024ceec57e349621363740754a4d0109","src/job.rs":"702fd1758201e2b821238ade080324a005b439cfe71a130f5c270e5024508fd3","src/join/mod.rs":"f6c722fbb15cd151b4d7ddffa6209ad2ae131eca22c7c730799b13249a2ae344","src/join/test.rs":"c183fb506bd39f4d424b6b2acbf53f8782b3a8c7862c3bbb9a41f25631f81f6d","src/latch.rs":"ef6adb739403b56f4e288fde763750a47b866065ba6ec4e6dd47fd4be6044169","src/lib.rs":"2b3cfe1bb173070f37eb6d496083781307bf959b8c161e46dc341f7ee6805b65","src/log.rs":"f0425a9bf0e78a1d4454b38f4259446af62331cd60d1bc364c4049783ea1d63d","src/registry.rs":"65e78c710f048b4d30e27de4e9df99f033100c1b22cf03a05438ddc8793f73c9","src/scope/internal.rs":"d5ec995785710f9e3058bc48b1e5848ffa9760dff8e810106907b2e186794c6d","src/scope/mod.rs":"04cd1c8728d80329577f63ce820b89c10d570cda4c00ebc633f41da9d71ef367","src/scope/test.rs":"0eab0b3a407dc8090396b58a23d029574fad3649944c5917fdd59312c3b45677","src/sleep/README.md":"1adec3679bdd836c911c9a2f9194793ac57deb83d9a95b93caec63e897fbcfec","src/sleep/mod.rs":"69e0d7e0466a5b8b6a5abc18abea46ec661efda150d018a74470ebe0093de326","src/spawn/mod.rs":"d11124fbbdda7db3bd38583e77244dba88403e3ba7fc568e1680ceae92883fff","src/spawn/test.rs":"9b7d9d5326d6ef6016376ece0ae499a4c242ca27e291a4cc9cfd5f9dcf314666","src/test.rs":"ef9c94e0ad117734c6996a24b71918305649a2fadfd407a86cef8f75f4b3b629","src/thread_pool/internal.rs":"a2e946dae865fada283e07b52de039b09a2fb138a33099481e020d53e1ef3c68","src/thread_pool/mod.rs":"6cf52a2c6b5fef68e57d9ad28d99119137dee14a8ef88ba1e79bb0bdc2fc8fef","src/thread_pool/test.rs":"13de2147e36c8286846fbc6fe522da91284d99b5442838a670d5abb1d8f0c185","src/tlv.rs":"fe9997bb586218901355ffde92d377bd0372336de6fe84f26adf1f6bdd2bf920","src/unwind.rs":"181bf714aaa087b46dcd951d7fb611cfc155e7057360e713a7040764b5066a5b","src/util.rs":"63ec7e1c75ea3871593d7fa5fc46689de7a2a86aa080b587880181dafd5e9838","src/worker_local.rs":"0eeb023e3d9d7c3d9fa96cc479722e5714e029f1de17e809187cb60132aa8d44","tests/double_init_fail.rs":"ca6d02537985196e6c4d2a851b8eb3011b7ae2c5b6c10d6af49b18834914c26b","tests/init_zero_threads.rs":"f3488078776b5866249fc198d6e44853ef55a739ddf552bbc655b7ca7d990862","tests/scope_join.rs":"53de4c5cdacf54d45c9955fbb36b7a95b2f2adbaae16ed4c194342cda29ed43d","tests/simple_panic.rs":"2e3a9ad0160c2bd49782240258f3a7d8483b7811c524739f0e390c28ea40bc30","tests/stack_overflow_crash.rs":"c04a5a02e3ca0c26a88b3afab65086b87cc084484634c642271a34939ec875c7"},"package":"526e7b6d2707a5b9bec3927d424ad70fa3cfc68e0ac1b75e46cdbbc95adc5108"} \ No newline at end of file +{"files":{"Cargo.toml":"d8815e72690876b35de03bc7b6a14439aba338b4e84506f08a4e531672d87fe5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0621878e61f0d0fda054bcbe02df75192c28bde1ecc8289cbd86aeba2dd72720","README.md":"2a7718f32e838f8ad7136861e3fb2d74265104a626a1152b1c6737562e873cbe","build.rs":"fa31cb198b772600d100a7c403ddedccef637d2e6b2da431fa7f02ca41307fc6","src/compile_fail/mod.rs":"4d70256295bd64691a8c1994b323559cda1888e85f0b45ca55711541c257dcb6","src/compile_fail/quicksort_race1.rs":"35f498cda38f4eb6e00117f78ed68e0fe5a3fa61c25303d9c08a19bda345bc6c","src/compile_fail/quicksort_race2.rs":"cbb40030c7867cae34bb373b6ec5d97c2ac6de39bc917f47879b30eb423924bc","src/compile_fail/quicksort_race3.rs":"8403643e64c969306b1a9b1243378e6ccdd313b57e1878dbd31393618082fd35","src/compile_fail/rc_return.rs":"b6f1f821ef30086e2990db1ac58a92adaf31e57c23c587c7746d6303865c5c0f","src/compile_fail/rc_upvar.rs":"92a799b313fb88a0eb83fc1aaaea4b61604222b45e20f1c22ff5b092a03f8620","src/compile_fail/scope_join_bad.rs":"7ce5355823be9c01dd6ddf1da110b3cff1092a025788f6f6c58cbd21bd09c8ad","src/internal/mod.rs":"26fb298bbb0d785bae5da8ca181b02f267376e766cea0757a191136fc432103e","src/internal/task.rs":"b66e780e91c40684cae346a44d7785791810340a4e2aef01865922fe17032e9d","src/internal/worker.rs":"ce64d274f8c98b8fab4b79753ecb8099024ceec57e349621363740754a4d0109","src/job.rs":"6b54e072f0620b48c60aba934e0f9eac75ab4413b102c63101665419701064a6","src/join/mod.rs":"8f99f3db575e8ed60ca2f6bc0c7c3bccd78eaa99a5d448ffe7f33e871a0a3cbc","src/join/test.rs":"c183fb506bd39f4d424b6b2acbf53f8782b3a8c7862c3bbb9a41f25631f81f6d","src/latch.rs":"ef6adb739403b56f4e288fde763750a47b866065ba6ec4e6dd47fd4be6044169","src/lib.rs":"4c4b5e4974da232088918f3ae8f951aca6ff32b227a887a5c022332eb3a6635d","src/log.rs":"f0425a9bf0e78a1d4454b38f4259446af62331cd60d1bc364c4049783ea1d63d","src/registry.rs":"6ebf4c2aae31363692be8c0c29adeb1e9d3495955fd43de70d9bea0610833ad8","src/scope/internal.rs":"d5ec995785710f9e3058bc48b1e5848ffa9760dff8e810106907b2e186794c6d","src/scope/mod.rs":"72ce18d3fd2b82b9b05ffeddc145ee5efabd2a0cc62481ba0625ba8579633299","src/scope/test.rs":"0eab0b3a407dc8090396b58a23d029574fad3649944c5917fdd59312c3b45677","src/sleep/README.md":"1adec3679bdd836c911c9a2f9194793ac57deb83d9a95b93caec63e897fbcfec","src/sleep/mod.rs":"69e0d7e0466a5b8b6a5abc18abea46ec661efda150d018a74470ebe0093de326","src/spawn/mod.rs":"3ab75ebdd01cf1ff0412282b133311ff3c1247a969c6983eb76a46cfb0eb8ede","src/spawn/test.rs":"9b7d9d5326d6ef6016376ece0ae499a4c242ca27e291a4cc9cfd5f9dcf314666","src/test.rs":"ef9c94e0ad117734c6996a24b71918305649a2fadfd407a86cef8f75f4b3b629","src/thread_pool/internal.rs":"a2e946dae865fada283e07b52de039b09a2fb138a33099481e020d53e1ef3c68","src/thread_pool/mod.rs":"6cf52a2c6b5fef68e57d9ad28d99119137dee14a8ef88ba1e79bb0bdc2fc8fef","src/thread_pool/test.rs":"13de2147e36c8286846fbc6fe522da91284d99b5442838a670d5abb1d8f0c185","src/tlv.rs":"fe9997bb586218901355ffde92d377bd0372336de6fe84f26adf1f6bdd2bf920","src/unwind.rs":"181bf714aaa087b46dcd951d7fb611cfc155e7057360e713a7040764b5066a5b","src/util.rs":"63ec7e1c75ea3871593d7fa5fc46689de7a2a86aa080b587880181dafd5e9838","src/worker_local.rs":"0eeb023e3d9d7c3d9fa96cc479722e5714e029f1de17e809187cb60132aa8d44","tests/double_init_fail.rs":"ca6d02537985196e6c4d2a851b8eb3011b7ae2c5b6c10d6af49b18834914c26b","tests/init_zero_threads.rs":"f3488078776b5866249fc198d6e44853ef55a739ddf552bbc655b7ca7d990862","tests/scope_join.rs":"53de4c5cdacf54d45c9955fbb36b7a95b2f2adbaae16ed4c194342cda29ed43d","tests/simple_panic.rs":"2e3a9ad0160c2bd49782240258f3a7d8483b7811c524739f0e390c28ea40bc30","tests/stack_overflow_crash.rs":"c04a5a02e3ca0c26a88b3afab65086b87cc084484634c642271a34939ec875c7"},"package":"79d38ca7cbc22fa59f09d8534ea4b27f67b0facf0cbe274433aceea227a02543"} \ No newline at end of file diff --git a/vendor/rustc-rayon-core/Cargo.toml b/vendor/rustc-rayon-core/Cargo.toml index 9875a3180c..1bf71f6219 100644 --- a/vendor/rustc-rayon-core/Cargo.toml +++ b/vendor/rustc-rayon-core/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,7 +12,7 @@ [package] name = "rustc-rayon-core" -version = "0.1.2" +version = "0.2.0" authors = ["Niko Matsakis <niko@alum.mit.edu>", "Josh Stone <cuviper@gmail.com>"] build = "build.rs" description = "Core APIs for Rayon - fork for rustc" @@ -56,7 +56,3 @@ version = "0.2.16" version = "1.2" [dev-dependencies.rand] version = "0.5" - -[features] -default = ["tlv"] -tlv = [] diff --git a/vendor/rustc-rayon-core/src/job.rs b/vendor/rustc-rayon-core/src/job.rs index 3acce305cf..4f71be98ce 100644 --- a/vendor/rustc-rayon-core/src/job.rs +++ b/vendor/rustc-rayon-core/src/job.rs @@ -3,7 +3,6 @@ use std::any::Any; use std::cell::UnsafeCell; use std::mem; use unwind; -#[cfg(feature = "tlv")] use tlv; pub enum JobResult<T> { @@ -77,7 +76,6 @@ where pub latch: L, func: UnsafeCell<Option<F>>, result: UnsafeCell<JobResult<R>>, - #[cfg(feature = "tlv")] tlv: usize, } @@ -87,13 +85,12 @@ where F: FnOnce(bool) -> R + Send, R: Send, { - pub fn new(func: F, latch: L) -> StackJob<L, F, R> { + pub fn new(tlv: usize, func: F, latch: L) -> StackJob<L, F, R> { StackJob { latch: latch, func: UnsafeCell::new(Some(func)), result: UnsafeCell::new(JobResult::None), - #[cfg(feature = "tlv")] - tlv: tlv::get(), + tlv, } } @@ -118,7 +115,6 @@ where { unsafe fn execute(this: *const Self) { let this = &*this; - #[cfg(feature = "tlv")] tlv::set(this.tlv); let abort = unwind::AbortIfPanic; let func = (*this.func.get()).take().unwrap(); @@ -142,7 +138,6 @@ where BODY: FnOnce() + Send, { job: UnsafeCell<Option<BODY>>, - #[cfg(feature = "tlv")] tlv: usize, } @@ -150,11 +145,10 @@ impl<BODY> HeapJob<BODY> where BODY: FnOnce() + Send, { - pub fn new(func: BODY) -> Self { + pub fn new(tlv: usize, func: BODY) -> Self { HeapJob { job: UnsafeCell::new(Some(func)), - #[cfg(feature = "tlv")] - tlv: tlv::get(), + tlv, } } @@ -173,7 +167,6 @@ where { unsafe fn execute(this: *const Self) { let this: Box<Self> = mem::transmute(this); - #[cfg(feature = "tlv")] tlv::set(this.tlv); let job = (*this.job.get()).take().unwrap(); job(); diff --git a/vendor/rustc-rayon-core/src/join/mod.rs b/vendor/rustc-rayon-core/src/join/mod.rs index 4498bdea32..f73da0eb22 100644 --- a/vendor/rustc-rayon-core/src/join/mod.rs +++ b/vendor/rustc-rayon-core/src/join/mod.rs @@ -4,6 +4,7 @@ use log::Event::*; use registry::{self, WorkerThread}; use std::any::Any; use unwind; +use tlv; use FnContext; @@ -120,10 +121,12 @@ where worker: worker_thread.index() }); + let tlv = tlv::get(); // Create virtual wrapper for task b; this all has to be // done here so that the stack frame can keep it all live // long enough. let job_b = StackJob::new( + tlv, |migrated| oper_b(FnContext::new(migrated)), SpinLatch::new(), ); @@ -134,7 +137,7 @@ where let status_a = unwind::halt_unwinding(move || oper_a(FnContext::new(injected))); let result_a = match status_a { Ok(v) => v, - Err(err) => join_recover_from_panic(worker_thread, &job_b.latch, err), + Err(err) => join_recover_from_panic(worker_thread, &job_b.latch, err, tlv), }; // Now that task A has finished, try to pop job B from the @@ -151,7 +154,11 @@ where log!(PoppedRhs { worker: worker_thread.index() }); + // Restore the TLV since we might have run some jobs overwriting it when waiting for job b. + tlv::set(tlv); + let result_b = job_b.run_inline(injected); + return (result_a, result_b); } else { log!(PoppedJob { @@ -171,6 +178,9 @@ where } } + // Restore the TLV since we might have run some jobs overwriting it when waiting for job b. + tlv::set(tlv); + return (result_a, job_b.into_result()); }) } @@ -183,7 +193,12 @@ unsafe fn join_recover_from_panic( worker_thread: &WorkerThread, job_b_latch: &SpinLatch, err: Box<Any + Send>, + tlv: usize, ) -> ! { worker_thread.wait_until(job_b_latch); + + // Restore the TLV since we might have run some jobs overwriting it when waiting for job b. + tlv::set(tlv); + unwind::resume_unwinding(err) } diff --git a/vendor/rustc-rayon-core/src/lib.rs b/vendor/rustc-rayon-core/src/lib.rs index f47fc83f92..123f9f019d 100644 --- a/vendor/rustc-rayon-core/src/lib.rs +++ b/vendor/rustc-rayon-core/src/lib.rs @@ -56,7 +56,6 @@ mod util; mod compile_fail; mod test; -#[cfg(feature = "tlv")] pub mod tlv; #[cfg(rayon_unstable)] diff --git a/vendor/rustc-rayon-core/src/registry.rs b/vendor/rustc-rayon-core/src/registry.rs index 8d5d4e151c..c40aab6e8e 100644 --- a/vendor/rustc-rayon-core/src/registry.rs +++ b/vendor/rustc-rayon-core/src/registry.rs @@ -387,11 +387,15 @@ impl Registry { { // This thread isn't a member of *any* thread pool, so just block. debug_assert!(WorkerThread::current().is_null()); - let job = StackJob::new(|injected| { - let worker_thread = WorkerThread::current(); - assert!(injected && !worker_thread.is_null()); - op(&*worker_thread, true) - }, LockLatch::new()); + let job = StackJob::new( + 0, + |injected| { + let worker_thread = WorkerThread::current(); + assert!(injected && !worker_thread.is_null()); + op(&*worker_thread, true) + }, + LockLatch::new(), + ); self.inject(&[job.as_job_ref()]); self.release_thread(); job.latch.wait(); @@ -410,6 +414,7 @@ impl Registry { debug_assert!(current_thread.registry().id() != self.id()); let latch = TickleLatch::new(SpinLatch::new(), ¤t_thread.registry().sleep); let job = StackJob::new( + 0, |injected| { let worker_thread = WorkerThread::current(); assert!(injected && !worker_thread.is_null()); diff --git a/vendor/rustc-rayon-core/src/scope/mod.rs b/vendor/rustc-rayon-core/src/scope/mod.rs index 47ced9f919..1da252dcf6 100644 --- a/vendor/rustc-rayon-core/src/scope/mod.rs +++ b/vendor/rustc-rayon-core/src/scope/mod.rs @@ -16,6 +16,7 @@ use std::ptr; use std::sync::atomic::{AtomicPtr, Ordering}; use std::sync::Arc; use unwind; +use tlv; mod internal; #[cfg(test)] @@ -45,6 +46,9 @@ pub struct Scope<'scope> { /// `Sync`, but it's still safe to let the `Scope` implement `Sync` because /// the closures are only *moved* across threads to be executed. marker: PhantomData<Box<FnOnce(&Scope<'scope>) + Send + Sync + 'scope>>, + + /// The TLV at the scope's creation. Used to set the TLV for spawned jobs. + tlv: usize, } /// Create a "fork-join" scope `s` and invokes the closure with a @@ -269,9 +273,12 @@ where panic: AtomicPtr::new(ptr::null_mut()), job_completed_latch: CountLatch::new(), marker: PhantomData, + tlv: tlv::get(), }; let result = scope.execute_job_closure(op); scope.steal_till_jobs_complete(owner_thread); + // Restore the TLV if we ran some jobs while waiting + tlv::set(scope.tlv); result.unwrap() // only None if `op` panicked, and that would have been propagated } }) @@ -336,7 +343,10 @@ impl<'scope> Scope<'scope> { { unsafe { self.job_completed_latch.increment(); - let job_ref = Box::new(HeapJob::new(move || self.execute_job(body))).as_job_ref(); + let job_ref = Box::new(HeapJob::new( + self.tlv, + move || self.execute_job(body), + )).as_job_ref(); // Since `Scope` implements `Sync`, we can't be sure // that we're still in a thread of this pool, so we @@ -418,6 +428,8 @@ impl<'scope> Scope<'scope> { log!(ScopeCompletePanicked { owner_thread: owner_thread.index() }); + // Restore the TLV if we ran some jobs while waiting + tlv::set(self.tlv); let value: Box<Box<Any + Send + 'static>> = mem::transmute(panic); unwind::resume_unwinding(*value); } else { diff --git a/vendor/rustc-rayon-core/src/spawn/mod.rs b/vendor/rustc-rayon-core/src/spawn/mod.rs index 8dcd266939..72434d7f3a 100644 --- a/vendor/rustc-rayon-core/src/spawn/mod.rs +++ b/vendor/rustc-rayon-core/src/spawn/mod.rs @@ -68,7 +68,7 @@ where // executed. This ref is decremented at the (*) below. registry.increment_terminate_count(); - let async_job = Box::new(HeapJob::new({ + let async_job = Box::new(HeapJob::new(0, { let registry = registry.clone(); move || { match unwind::halt_unwinding(func) { diff --git a/vendor/rustc-rayon/.cargo-checksum.json b/vendor/rustc-rayon/.cargo-checksum.json index 28a73261e1..90a0d36270 100644 --- a/vendor/rustc-rayon/.cargo-checksum.json +++ b/vendor/rustc-rayon/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"feeee03b953e464b2cd9ef89bd53fde491999aa926c166d73cbb170a72290e05","FAQ.md":"b1d86573ea92518fae26aba7fc5880b64911fc8644abb7cb02b04778670f46e1","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0621878e61f0d0fda054bcbe02df75192c28bde1ecc8289cbd86aeba2dd72720","README.md":"e70e19b9564b62d7822034e06db77c33b14a05408f1310d16b1e92baa1238f32","RELEASES.md":"191039cde95dda4359bbe03331b370ca94d0c0993916ddaa4d10f37eeb535138","build.rs":"76d1773cd07e6b88973c8dfef0582f1a87f334f903227f84fd0c1c836825e179","examples/README.md":"537e6fe9cf696fd4ada9c08bf31055ed6e366ed65668a523e7c5fde77f97c8d3","examples/cpu_monitor.rs":"0f06f94d796246f71f427338ea26382489be0f2d589f9ed320aeb3968ff39f30","src/collections/binary_heap.rs":"b32cff53e94700ae3a8d53bc86e0188a2fefcd190e7fea2b2c5e4de7f57583ab","src/collections/btree_map.rs":"8b8ad1b53eee147dc664edc3da240345d1c8ebd6fa50804126a55f6e90b10967","src/collections/btree_set.rs":"476bae2eaaf4a5d51b6805406905504ad4c4318b3e14f9be90729c57ca3eb56f","src/collections/hash_map.rs":"a7095c4721cbdbf87579f49988044e1725607f444b0eb73087f510a5140fea57","src/collections/hash_set.rs":"a0b9cc007d5e0a28dd7bb01892ec64e17af018ae3a9a16508c875b9c6d67b756","src/collections/linked_list.rs":"ea9f927475985e719ff912063d94998ed449803e24a008cbeff93aef0b68350a","src/collections/mod.rs":"037660cbdd5907808f7df59fa69993582bf978ecaf125a83a1205452bb505a53","src/collections/vec_deque.rs":"130673791079f7efdddd029f4a80c38a7afa319cd9c355f495b3416379cbd4df","src/compile_fail/cannot_collect_filtermap_data.rs":"6a141076c14f95e31bed3433d531bc05d806eed9e0018d1b21420d7ab2fc7eb9","src/compile_fail/cannot_zip_filtered_data.rs":"a28cfb3d00b8d277bfa77a10ca132f972e8f100080ef602fdd3c6fd36ad2a156","src/compile_fail/cell_par_iter.rs":"4f076862d9c66ed42a642a5be97116ca5982608ab76816a8f8305182bf463e9e","src/compile_fail/mod.rs":"2c346e4b52941fe0ac2667eeb753c0c21a1f998a544bb9d9167f200caba0a7bb","src/compile_fail/must_use.rs":"9ddc98d6f3d7a09c5553500207ee1913cbe7013f10a29f7cc8dd6d5547facbb4","src/compile_fail/no_send_par_iter.rs":"ef72499a2df310d9ed85de8128af2040b04d3716814b511a175ac7ff5469b41a","src/compile_fail/rc_par_iter.rs":"0faf3d26a665c3e2acc2f2f1d66ee234e561d24442efa4980a5e946e1cb2eba3","src/delegate.rs":"fa05c22227346baf147da03195e96dc0f705aaf7b2295f02f9f996c22295701e","src/iter/chain.rs":"e5d1b5680927b06b1036c5f945f942bc1f7941a8bb285c5da683afca179a42c5","src/iter/chunks.rs":"6ff72a4c857833307eb9aca4af7bb32402cab80e51c3ece792cdd2b7ff8fe56f","src/iter/cloned.rs":"6a1286421a6b48348e8fc952e641510e5238aa50cd89075a165236d295a16a7f","src/iter/collect/consumer.rs":"5ecc0b43c2761b93821418eb31909a4f7795d6cbd0f5d3ba596367d05db1b0d6","src/iter/collect/mod.rs":"1f9d460c27fce38910b0116da2012399b65f55aea9292dcc9560820448f84b30","src/iter/collect/test.rs":"b50520184ccb727e0fb03651707cee6b175c280bba92190cbff2aa22aff37840","src/iter/empty.rs":"1722635879fc6de21605e49637388dd8c2add986f439e0ebf36f3c5b84412635","src/iter/enumerate.rs":"4f9cc90eada3814a88f050562ff607dd1c4307b0a801aa73b57294ddfc251d29","src/iter/extend.rs":"4e3085c035ab6ac5bd10c7eff9e1817dd6b5d62f7fbff7a1b5884badb2e8b122","src/iter/filter.rs":"0c8003064fbcc94fb96ffc970b815d41dd53528185f6b26951aa6b094336e181","src/iter/filter_map.rs":"0c7444cc05afc547d3f2e76016e1277562e7d23f1a6706a136760e4fab43ed8d","src/iter/find.rs":"5311dec88125ccd69901379bf54a0ec772e0ce342de241046eb6efed43f47257","src/iter/find_first_last/mod.rs":"1f614d414733599b8cdab1df975c233b11af57741dc7d3973c93cf5d272bf0ed","src/iter/find_first_last/test.rs":"2052eb8b87c5a0a0d49a76c83d9d74f81be18aad52ceb1b06d7e209f4fefba94","src/iter/flat_map.rs":"aa318614ad12bf997e028dd604f23d7e6bd03cf048deccea7fef84fa72aa25b0","src/iter/flatten.rs":"d0a567950edc49c9adfcfc32a745334755d73ac1fb1b13b2c68167f1cada3118","src/iter/fold.rs":"fa2b15a23403aee24d30bff13313fdb254bec5afb433f9a25389322dc6476cf4","src/iter/for_each.rs":"271eeb886ba98099f5e960731f06c2c88c4f6ba77df7ec2bcf72a13a4a10d788","src/iter/from_par_iter.rs":"2de6291471532215f04cfe7703078cbf1cdd680a280e334b97028cf3e7aeb3d5","src/iter/inspect.rs":"7c13664d4b9f6ce285ea2fd923596c84abe333c3dc4649f5837d8e6febd260fb","src/iter/interleave.rs":"ab03d10d5f9e78b8df1f9d0f7bef5952c27952f3f3d69c331c53ea9cf5c46ef5","src/iter/interleave_shortest.rs":"7b92302e54b13bf2ec03510632690dfd4fdd70eebdebcc0436fdf59ef5709994","src/iter/intersperse.rs":"dd81b594249b84332a824d9a2200a59f9356827c33a77318a263e5e9e3ab4042","src/iter/len.rs":"e142b3b3b6f48cf4e00187d653baf4b875e2912d1f4aa672cfbf2b1e89c4291e","src/iter/map.rs":"00e87aede26f6d495db804999c25cb8c5a24cca23c92951ea5e9b5ddbe9f0fc6","src/iter/map_with.rs":"f43b4b7c5e633e6fd2a68b9246075bf37a77350dbd02dd1788ece01533266142","src/iter/mod.rs":"17b717cb822edbfb47c69cf9fb194601dcd126fa6cccf82a6d493fe3c32f9a93","src/iter/noop.rs":"f539067c2862edc4fab59557dd4f0bfd38f5144d33190dd8080452088ca4955b","src/iter/once.rs":"82f18b283b990b86d1211eeb05f9e9b733525f6f53860a66a378d19aa05b239c","src/iter/par_bridge.rs":"a9d1e491934233733a9dc42109fe5d0481d56fe81810365281609eebf4814759","src/iter/plumbing/README.md":"cfd6cdbba4ef68657ef38eb9db3b91756ed59f772f02372ba35f49f8e3df8de6","src/iter/plumbing/mod.rs":"079365e3f5177d0677d169f702968b42618e74dbdd93846c21aebf6609d3a2e8","src/iter/product.rs":"2ec750a3f5e28a9f41a4f0ffb42108fe42110a1cfe97db30abda353ed9b3fdb9","src/iter/reduce.rs":"a9e647bf1ebbe421102ff15dce94fa710642e2382445a7151269c762329ee451","src/iter/repeat.rs":"d1c66dd13b9bb686543a073f14ace57b898775a8cf4474c482b7059b4a9e1089","src/iter/rev.rs":"889e731d1293d08e091e130186d4b8c03e43c5b8b57b26074e78a6daeadb21e0","src/iter/skip.rs":"db4263d491ff96660b4cabf4be6907efb6dc9b27ac2bb0bb5579fb7ca6da7e96","src/iter/splitter.rs":"d13565b439bc40e35afb29d25aba49f9ced84fb1a993667c118bc5f9642b4102","src/iter/sum.rs":"2a387b171372fd82af76b79eef3d4a19ff06b4bdf0327f22728cdf4740aeffbd","src/iter/take.rs":"bbb2fc312be1ef8a92a6e4f55406258340e1ef687fefc9aa98e2fb1a97245da0","src/iter/test.rs":"56c20899c0c630710fbff19e80bf8832663dcb00b8de71a56122d7af13771929","src/iter/try_fold.rs":"2c480bd7dd52cd128bd357fb9ef1f6a11bc2adc34b6163cc62d97cf38f3133c0","src/iter/try_reduce.rs":"993f01c228fc26d9ecf7cb88667bd8fdccd7827d7cd721f3915d00c3b5d87f45","src/iter/try_reduce_with.rs":"2e740f55dff4dabf8f022d78770ed17928fa0d48f00b349be4df6e324f54b44b","src/iter/unzip.rs":"b2d4d25fb20b6980e7bb1800ce01cd432b0aa2a83d080dbc16f6f4b0bcb7b922","src/iter/update.rs":"60604cf9af4fb4da85a859552bacf8da7b6052c74d90c7f2886cae6d22e1ff9b","src/iter/while_some.rs":"14e267d6404c8471f69c1fa01a34ccfa8b20c4eeec303291337e11be8ee0f8d2","src/iter/zip.rs":"40132f8ad533678a7f98d4cad3bc991e30f5acd3b645136231ddf05b56fe39b8","src/iter/zip_eq.rs":"22bebd7a241048a0155a145572bfc37eb6d3edd21aca8a2c6db5884b2ec21bb6","src/lib.rs":"80daf907be9c94b86303d45554520897b1484889624804e815c51c80c862ae3a","src/math.rs":"09b82509ac107db85875a6d40c2f4df3de840b900e516023bb167dcb2394f617","src/option.rs":"99cecb616f98800d05c2006e1ccc4f2553595f602c475b84b311f4e758ed881b","src/par_either.rs":"929cea67b4e1430ca08aebb66af2c15415962f0a4c333552d0004b5571ea5195","src/prelude.rs":"ae9af3e527c4b14bab52a71cb4161771a0ca8e0f6bd2e801fa838df105d5eaab","src/private.rs":"70d6d1b4bb9535da5922d1e911df55ee150e23cba9eb675ddaa32b871ad57e73","src/range.rs":"e6cd79984065cbc879b83481e8bc9e4d2ec95629a798bbfc19e147b00a45ebf8","src/result.rs":"dae8c7be83c1928b172cf69842f2980582e2c7c02cd439920d435c36f8dcedd0","src/slice/mergesort.rs":"ebf475e127253c5df945e070652a24f6b29a334f5fbac5a7489b811501d94dc2","src/slice/mod.rs":"ae05c915c452249299c474cb75dbc9ceaaccf48c63c2e303547f3e29ea560c06","src/slice/quicksort.rs":"863ad042c577100c65facb03a9fe98fa578f3575020379ebed5d2483ad891863","src/slice/test.rs":"c770e9f7cc21883a17dc6a328abca1f804e3be736a01d30a9f489a8129f797f9","src/split_producer.rs":"2bc8d4d59f8a30287e73b530eb63adf2c2ccc3240ae6d1a422ffc48104830562","src/str.rs":"23c0059784479a9c5cd7d1595b69905fe843b9da3b928685b78295e178386a13","src/vec.rs":"4e3becdfb85ed8240f6b2f2ad2de12434788c4d632a0a63ed71c2715ae551ef4","tests/clones.rs":"aa83157609fdf42d4f2035d792e360f6fb4869867b4149bfc8c7c5e8cc078df1","tests/debug.rs":"def09ab75e6d9119ff3b218b44fce2ff475650d17774bbeb8ee0d63c3989bb78","tests/intersperse.rs":"ba6ce49d57665ec5ccce24f93faa204f4d48e241389dffc30dcba64c6d7f6752","tests/iter_panic.rs":"2d89cd5cde9da41f58fe51aa6343e0a8ce31763c732c74c6c4340bdabbbfd626","tests/named-threads.rs":"a1b479627bdfd4426e56ee1e1eea74c912abc8a0cd73f6a9d16fa27889d201eb","tests/octillion.rs":"29322021ada22480629f2fd90eda9347ffccfc06e38fb79f8cf8a53b7ca02de1","tests/producer_split_at.rs":"14e2d356f5410cdd1f5459b70e461715ca41a6bd33afc55faa0394576bcc63d5","tests/sort-panic-safe.rs":"1b29c6f11c96d3d117fed611084bd5b9c0ebca7af25ff7acc6af7a14e665d5c6","tests/str.rs":"2a22da4b8ff19b153a67c4750a6a82cbe5e4602ff50d19f8795205d8188038b1"},"package":"8d98c51d9cbbe810c8b6693236d3412d8cd60513ff27a3e1b6af483dca0af544"} \ No newline at end of file +{"files":{"Cargo.toml":"72604523d23d80949177413e858900d076b60c49827cbdd84ca92cd56118a8fc","FAQ.md":"b1d86573ea92518fae26aba7fc5880b64911fc8644abb7cb02b04778670f46e1","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0621878e61f0d0fda054bcbe02df75192c28bde1ecc8289cbd86aeba2dd72720","README.md":"e70e19b9564b62d7822034e06db77c33b14a05408f1310d16b1e92baa1238f32","RELEASES.md":"191039cde95dda4359bbe03331b370ca94d0c0993916ddaa4d10f37eeb535138","build.rs":"76d1773cd07e6b88973c8dfef0582f1a87f334f903227f84fd0c1c836825e179","examples/README.md":"537e6fe9cf696fd4ada9c08bf31055ed6e366ed65668a523e7c5fde77f97c8d3","examples/cpu_monitor.rs":"0f06f94d796246f71f427338ea26382489be0f2d589f9ed320aeb3968ff39f30","src/collections/binary_heap.rs":"b32cff53e94700ae3a8d53bc86e0188a2fefcd190e7fea2b2c5e4de7f57583ab","src/collections/btree_map.rs":"8b8ad1b53eee147dc664edc3da240345d1c8ebd6fa50804126a55f6e90b10967","src/collections/btree_set.rs":"476bae2eaaf4a5d51b6805406905504ad4c4318b3e14f9be90729c57ca3eb56f","src/collections/hash_map.rs":"a7095c4721cbdbf87579f49988044e1725607f444b0eb73087f510a5140fea57","src/collections/hash_set.rs":"a0b9cc007d5e0a28dd7bb01892ec64e17af018ae3a9a16508c875b9c6d67b756","src/collections/linked_list.rs":"ea9f927475985e719ff912063d94998ed449803e24a008cbeff93aef0b68350a","src/collections/mod.rs":"037660cbdd5907808f7df59fa69993582bf978ecaf125a83a1205452bb505a53","src/collections/vec_deque.rs":"130673791079f7efdddd029f4a80c38a7afa319cd9c355f495b3416379cbd4df","src/compile_fail/cannot_collect_filtermap_data.rs":"6a141076c14f95e31bed3433d531bc05d806eed9e0018d1b21420d7ab2fc7eb9","src/compile_fail/cannot_zip_filtered_data.rs":"a28cfb3d00b8d277bfa77a10ca132f972e8f100080ef602fdd3c6fd36ad2a156","src/compile_fail/cell_par_iter.rs":"4f076862d9c66ed42a642a5be97116ca5982608ab76816a8f8305182bf463e9e","src/compile_fail/mod.rs":"2c346e4b52941fe0ac2667eeb753c0c21a1f998a544bb9d9167f200caba0a7bb","src/compile_fail/must_use.rs":"9ddc98d6f3d7a09c5553500207ee1913cbe7013f10a29f7cc8dd6d5547facbb4","src/compile_fail/no_send_par_iter.rs":"ef72499a2df310d9ed85de8128af2040b04d3716814b511a175ac7ff5469b41a","src/compile_fail/rc_par_iter.rs":"0faf3d26a665c3e2acc2f2f1d66ee234e561d24442efa4980a5e946e1cb2eba3","src/delegate.rs":"fa05c22227346baf147da03195e96dc0f705aaf7b2295f02f9f996c22295701e","src/iter/chain.rs":"e5d1b5680927b06b1036c5f945f942bc1f7941a8bb285c5da683afca179a42c5","src/iter/chunks.rs":"6ff72a4c857833307eb9aca4af7bb32402cab80e51c3ece792cdd2b7ff8fe56f","src/iter/cloned.rs":"6a1286421a6b48348e8fc952e641510e5238aa50cd89075a165236d295a16a7f","src/iter/collect/consumer.rs":"5ecc0b43c2761b93821418eb31909a4f7795d6cbd0f5d3ba596367d05db1b0d6","src/iter/collect/mod.rs":"1f9d460c27fce38910b0116da2012399b65f55aea9292dcc9560820448f84b30","src/iter/collect/test.rs":"b50520184ccb727e0fb03651707cee6b175c280bba92190cbff2aa22aff37840","src/iter/empty.rs":"1722635879fc6de21605e49637388dd8c2add986f439e0ebf36f3c5b84412635","src/iter/enumerate.rs":"4f9cc90eada3814a88f050562ff607dd1c4307b0a801aa73b57294ddfc251d29","src/iter/extend.rs":"4e3085c035ab6ac5bd10c7eff9e1817dd6b5d62f7fbff7a1b5884badb2e8b122","src/iter/filter.rs":"0c8003064fbcc94fb96ffc970b815d41dd53528185f6b26951aa6b094336e181","src/iter/filter_map.rs":"0c7444cc05afc547d3f2e76016e1277562e7d23f1a6706a136760e4fab43ed8d","src/iter/find.rs":"5311dec88125ccd69901379bf54a0ec772e0ce342de241046eb6efed43f47257","src/iter/find_first_last/mod.rs":"1f614d414733599b8cdab1df975c233b11af57741dc7d3973c93cf5d272bf0ed","src/iter/find_first_last/test.rs":"2052eb8b87c5a0a0d49a76c83d9d74f81be18aad52ceb1b06d7e209f4fefba94","src/iter/flat_map.rs":"aa318614ad12bf997e028dd604f23d7e6bd03cf048deccea7fef84fa72aa25b0","src/iter/flatten.rs":"d0a567950edc49c9adfcfc32a745334755d73ac1fb1b13b2c68167f1cada3118","src/iter/fold.rs":"fa2b15a23403aee24d30bff13313fdb254bec5afb433f9a25389322dc6476cf4","src/iter/for_each.rs":"271eeb886ba98099f5e960731f06c2c88c4f6ba77df7ec2bcf72a13a4a10d788","src/iter/from_par_iter.rs":"2de6291471532215f04cfe7703078cbf1cdd680a280e334b97028cf3e7aeb3d5","src/iter/inspect.rs":"7c13664d4b9f6ce285ea2fd923596c84abe333c3dc4649f5837d8e6febd260fb","src/iter/interleave.rs":"ab03d10d5f9e78b8df1f9d0f7bef5952c27952f3f3d69c331c53ea9cf5c46ef5","src/iter/interleave_shortest.rs":"7b92302e54b13bf2ec03510632690dfd4fdd70eebdebcc0436fdf59ef5709994","src/iter/intersperse.rs":"dd81b594249b84332a824d9a2200a59f9356827c33a77318a263e5e9e3ab4042","src/iter/len.rs":"e142b3b3b6f48cf4e00187d653baf4b875e2912d1f4aa672cfbf2b1e89c4291e","src/iter/map.rs":"00e87aede26f6d495db804999c25cb8c5a24cca23c92951ea5e9b5ddbe9f0fc6","src/iter/map_with.rs":"f43b4b7c5e633e6fd2a68b9246075bf37a77350dbd02dd1788ece01533266142","src/iter/mod.rs":"17b717cb822edbfb47c69cf9fb194601dcd126fa6cccf82a6d493fe3c32f9a93","src/iter/noop.rs":"f539067c2862edc4fab59557dd4f0bfd38f5144d33190dd8080452088ca4955b","src/iter/once.rs":"82f18b283b990b86d1211eeb05f9e9b733525f6f53860a66a378d19aa05b239c","src/iter/par_bridge.rs":"a9d1e491934233733a9dc42109fe5d0481d56fe81810365281609eebf4814759","src/iter/plumbing/README.md":"cfd6cdbba4ef68657ef38eb9db3b91756ed59f772f02372ba35f49f8e3df8de6","src/iter/plumbing/mod.rs":"079365e3f5177d0677d169f702968b42618e74dbdd93846c21aebf6609d3a2e8","src/iter/product.rs":"2ec750a3f5e28a9f41a4f0ffb42108fe42110a1cfe97db30abda353ed9b3fdb9","src/iter/reduce.rs":"a9e647bf1ebbe421102ff15dce94fa710642e2382445a7151269c762329ee451","src/iter/repeat.rs":"d1c66dd13b9bb686543a073f14ace57b898775a8cf4474c482b7059b4a9e1089","src/iter/rev.rs":"889e731d1293d08e091e130186d4b8c03e43c5b8b57b26074e78a6daeadb21e0","src/iter/skip.rs":"db4263d491ff96660b4cabf4be6907efb6dc9b27ac2bb0bb5579fb7ca6da7e96","src/iter/splitter.rs":"d13565b439bc40e35afb29d25aba49f9ced84fb1a993667c118bc5f9642b4102","src/iter/sum.rs":"2a387b171372fd82af76b79eef3d4a19ff06b4bdf0327f22728cdf4740aeffbd","src/iter/take.rs":"bbb2fc312be1ef8a92a6e4f55406258340e1ef687fefc9aa98e2fb1a97245da0","src/iter/test.rs":"56c20899c0c630710fbff19e80bf8832663dcb00b8de71a56122d7af13771929","src/iter/try_fold.rs":"2c480bd7dd52cd128bd357fb9ef1f6a11bc2adc34b6163cc62d97cf38f3133c0","src/iter/try_reduce.rs":"993f01c228fc26d9ecf7cb88667bd8fdccd7827d7cd721f3915d00c3b5d87f45","src/iter/try_reduce_with.rs":"2e740f55dff4dabf8f022d78770ed17928fa0d48f00b349be4df6e324f54b44b","src/iter/unzip.rs":"b2d4d25fb20b6980e7bb1800ce01cd432b0aa2a83d080dbc16f6f4b0bcb7b922","src/iter/update.rs":"60604cf9af4fb4da85a859552bacf8da7b6052c74d90c7f2886cae6d22e1ff9b","src/iter/while_some.rs":"14e267d6404c8471f69c1fa01a34ccfa8b20c4eeec303291337e11be8ee0f8d2","src/iter/zip.rs":"40132f8ad533678a7f98d4cad3bc991e30f5acd3b645136231ddf05b56fe39b8","src/iter/zip_eq.rs":"22bebd7a241048a0155a145572bfc37eb6d3edd21aca8a2c6db5884b2ec21bb6","src/lib.rs":"80daf907be9c94b86303d45554520897b1484889624804e815c51c80c862ae3a","src/math.rs":"09b82509ac107db85875a6d40c2f4df3de840b900e516023bb167dcb2394f617","src/option.rs":"99cecb616f98800d05c2006e1ccc4f2553595f602c475b84b311f4e758ed881b","src/par_either.rs":"929cea67b4e1430ca08aebb66af2c15415962f0a4c333552d0004b5571ea5195","src/prelude.rs":"ae9af3e527c4b14bab52a71cb4161771a0ca8e0f6bd2e801fa838df105d5eaab","src/private.rs":"70d6d1b4bb9535da5922d1e911df55ee150e23cba9eb675ddaa32b871ad57e73","src/range.rs":"e6cd79984065cbc879b83481e8bc9e4d2ec95629a798bbfc19e147b00a45ebf8","src/result.rs":"dae8c7be83c1928b172cf69842f2980582e2c7c02cd439920d435c36f8dcedd0","src/slice/mergesort.rs":"ebf475e127253c5df945e070652a24f6b29a334f5fbac5a7489b811501d94dc2","src/slice/mod.rs":"ae05c915c452249299c474cb75dbc9ceaaccf48c63c2e303547f3e29ea560c06","src/slice/quicksort.rs":"863ad042c577100c65facb03a9fe98fa578f3575020379ebed5d2483ad891863","src/slice/test.rs":"c770e9f7cc21883a17dc6a328abca1f804e3be736a01d30a9f489a8129f797f9","src/split_producer.rs":"2bc8d4d59f8a30287e73b530eb63adf2c2ccc3240ae6d1a422ffc48104830562","src/str.rs":"23c0059784479a9c5cd7d1595b69905fe843b9da3b928685b78295e178386a13","src/vec.rs":"4e3becdfb85ed8240f6b2f2ad2de12434788c4d632a0a63ed71c2715ae551ef4","tests/clones.rs":"aa83157609fdf42d4f2035d792e360f6fb4869867b4149bfc8c7c5e8cc078df1","tests/debug.rs":"def09ab75e6d9119ff3b218b44fce2ff475650d17774bbeb8ee0d63c3989bb78","tests/intersperse.rs":"ba6ce49d57665ec5ccce24f93faa204f4d48e241389dffc30dcba64c6d7f6752","tests/iter_panic.rs":"2d89cd5cde9da41f58fe51aa6343e0a8ce31763c732c74c6c4340bdabbbfd626","tests/named-threads.rs":"a1b479627bdfd4426e56ee1e1eea74c912abc8a0cd73f6a9d16fa27889d201eb","tests/octillion.rs":"29322021ada22480629f2fd90eda9347ffccfc06e38fb79f8cf8a53b7ca02de1","tests/producer_split_at.rs":"14e2d356f5410cdd1f5459b70e461715ca41a6bd33afc55faa0394576bcc63d5","tests/sort-panic-safe.rs":"1b29c6f11c96d3d117fed611084bd5b9c0ebca7af25ff7acc6af7a14e665d5c6","tests/str.rs":"2a22da4b8ff19b153a67c4750a6a82cbe5e4602ff50d19f8795205d8188038b1"},"package":"0d2e07e19601f21c59aad953c2632172ba70cb27e685771514ea66e4062b3363"} \ No newline at end of file diff --git a/vendor/rustc-rayon/Cargo.toml b/vendor/rustc-rayon/Cargo.toml index 5054064451..c9767a1984 100644 --- a/vendor/rustc-rayon/Cargo.toml +++ b/vendor/rustc-rayon/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,7 +12,7 @@ [package] name = "rustc-rayon" -version = "0.1.2" +version = "0.2.0" authors = ["Niko Matsakis <niko@alum.mit.edu>", "Josh Stone <cuviper@gmail.com>"] build = "build.rs" exclude = ["/ci/*", "/scripts/*", "/.travis.yml", "/appveyor.yml", "/bors.toml"] @@ -31,7 +31,7 @@ version = "1.0" default-features = false [dependencies.rustc-rayon-core] -version = "0.1" +version = "0.2" [dev-dependencies.docopt] version = "1" diff --git a/vendor/rustc-serialize/.cargo-checksum.json b/vendor/rustc-serialize/.cargo-checksum.json deleted file mode 100644 index 5c6ba3c37c..0000000000 --- a/vendor/rustc-serialize/.cargo-checksum.json +++ /dev/null @@ -1 +0,0 @@ -{"files":{"Cargo.toml":"01199fa6ca6337a7513e9ef8951268b8882347e5affaa50e710ac4960d9c65e0","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"0aebc3beb6fc32d6073582d5fea170761689a2c83cddb5436aa26e57b7d04e7b","appveyor.yml":"da991211b72fa6f231af7adb84c9fb72f5a9131d1c0a3d47b8ceffe5a82c8542","benches/base64.rs":"96f7d0c7d260362e41b8cefb4839f1e1b3c18c2f10344f6ccafac7c434f99ca9","benches/hex.rs":"057821307b4b7de02f2c267f9248457386035382916c5afe4b72d6f2e905062c","benches/json.rs":"659f2ae2e1ad5ed022fafce6418d17dfe09c3dcb3f054857dce0effc907da850","src/base64.rs":"57649c590c1fba643ff955910f1d4427feda43414bb0863cd279bea56c3ff178","src/collection_impls.rs":"8ae6bc0d61a4777d834c2b24fa987550cb13c570e1564f87ee32eceff3cb2d5b","src/hex.rs":"a2ba86cf47035b5d9cbf4adf8dc3e941d4e0a6ce1a61a29cbb14ea1fdabac6bb","src/json.rs":"75a788a46612c73bfd14af20fb48855dc8c930747c5255a288d2d09de25ea960","src/lib.rs":"a0e4a368a609f019434e7584f54448cf33ebf3e37e3fb1dd5537d300088184b1","src/serialize.rs":"7ddcc3c32843850e30d05b82a8cda8ae63ec0016e2b0bfbcc46a03ea3ea986e8"},"package":"dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"} \ No newline at end of file diff --git a/vendor/rustc-serialize/Cargo.toml b/vendor/rustc-serialize/Cargo.toml deleted file mode 100644 index 2f44e0c5d0..0000000000 --- a/vendor/rustc-serialize/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] - -name = "rustc-serialize" -version = "0.3.24" -authors = ["The Rust Project Developers"] -license = "MIT/Apache-2.0" -readme = "README.md" -repository = "https://github.com/rust-lang/rustc-serialize" -homepage = "https://github.com/rust-lang/rustc-serialize" -documentation = "https://doc.rust-lang.org/rustc-serialize" -description = """ -Generic serialization/deserialization support corresponding to the -`derive(RustcEncodable, RustcDecodable)` mode in the compiler. Also includes -support for hex, base64, and json encoding and decoding. -""" - -[dev-dependencies] -rand = "0.3" diff --git a/vendor/rustc-serialize/README.md b/vendor/rustc-serialize/README.md deleted file mode 100644 index f680842afc..0000000000 --- a/vendor/rustc-serialize/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# rustc-serialize - -> **NOTE**: This crate is deprecated in favor of [`serde`]. No new feature -> development will happen in this crate, although bug fixes proposed through PRs -> will still be merged. It is very highly recommended by the Rust Library Team -> that you use [`serde`], not this crate. - -[`serde`]: https://serde.rs - -Serialization and deserialization support provided by the compiler in the form -of `derive(RustcEncodable, RustcDecodable)`. - -[![Linux Build Status](https://travis-ci.org/rust-lang-nursery/rustc-serialize.svg?branch=master)](https://travis-ci.org/rust-lang-nursery/rustc-serialize) -[![Windows Build Status](https://ci.appveyor.com/api/projects/status/ka194de75aapwpft?svg=true)](https://ci.appveyor.com/project/alexcrichton/rustc-serialize) - -[Documentation](https://doc.rust-lang.org/rustc-serialize) - -## Usage - -Add this to your `Cargo.toml`: - -```toml -[dependencies] -rustc-serialize = "0.3" -``` - -and this to your crate root: - -```rust -extern crate rustc_serialize; -``` diff --git a/vendor/rustc-serialize/appveyor.yml b/vendor/rustc-serialize/appveyor.yml deleted file mode 100644 index 6a1b8dc19c..0000000000 --- a/vendor/rustc-serialize/appveyor.yml +++ /dev/null @@ -1,17 +0,0 @@ -environment: - matrix: - - TARGET: x86_64-pc-windows-msvc - - TARGET: i686-pc-windows-msvc - - TARGET: i686-pc-windows-gnu -install: - - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe" - - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" - - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin - - SET PATH=%PATH%;C:\MinGW\bin - - rustc -V - - cargo -V - -build: false - -test_script: - - cargo test --verbose diff --git a/vendor/rustc-serialize/benches/base64.rs b/vendor/rustc-serialize/benches/base64.rs deleted file mode 100644 index 6a6565bc14..0000000000 --- a/vendor/rustc-serialize/benches/base64.rs +++ /dev/null @@ -1,48 +0,0 @@ -#![feature(test)] - -extern crate test; -extern crate rustc_serialize; - -use rustc_serialize::base64::{FromBase64, ToBase64, STANDARD}; -use test::Bencher; - -#[bench] -fn bench_to_base64(b: &mut Bencher) { - let s = "イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム \ - ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン"; - b.iter(|| { - s.as_bytes().to_base64(STANDARD); - }); - b.bytes = s.len() as u64; -} - -#[bench] -fn bench_from_base64(b: &mut Bencher) { - let s = "イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム \ - ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン"; - let sb = s.as_bytes().to_base64(STANDARD); - b.iter(|| { - sb.from_base64().unwrap(); - }); - b.bytes = sb.len() as u64; -} - - -#[bench] -fn bench_to_base64_large(b: &mut Bencher) { - let s: Vec<_> = (0..10000).map(|i| ((i as u32 * 12345) % 256) as u8).collect(); - b.iter(|| { - s.to_base64(STANDARD); - }); - b.bytes = s.len() as u64; -} - -#[bench] -fn bench_from_base64_large(b: &mut Bencher) { - let s: Vec<_> = (0..10000).map(|i| ((i as u32 * 12345) % 256) as u8).collect(); - let sb = s.to_base64(STANDARD); - b.iter(|| { - sb.from_base64().unwrap(); - }); - b.bytes = sb.len() as u64; -} diff --git a/vendor/rustc-serialize/benches/hex.rs b/vendor/rustc-serialize/benches/hex.rs deleted file mode 100644 index 97a7735e81..0000000000 --- a/vendor/rustc-serialize/benches/hex.rs +++ /dev/null @@ -1,28 +0,0 @@ -#![feature(test)] - -extern crate test; -extern crate rustc_serialize; - -use test::Bencher; -use rustc_serialize::hex::{FromHex, ToHex}; - -#[bench] -fn bench_to_hex(b: &mut Bencher) { - let s = "イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム \ - ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン"; - b.iter(|| { - s.as_bytes().to_hex(); - }); - b.bytes = s.len() as u64; -} - -#[bench] -fn bench_from_hex(b: &mut Bencher) { - let s = "イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム \ - ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン"; - let sb = s.as_bytes().to_hex(); - b.iter(|| { - sb.from_hex().unwrap(); - }); - b.bytes = sb.len() as u64; -} diff --git a/vendor/rustc-serialize/benches/json.rs b/vendor/rustc-serialize/benches/json.rs deleted file mode 100644 index 20768e116a..0000000000 --- a/vendor/rustc-serialize/benches/json.rs +++ /dev/null @@ -1,84 +0,0 @@ -#![feature(test)] - -extern crate test; -extern crate rustc_serialize; - -use std::string; -use rustc_serialize::json::{Json, Parser}; -use test::Bencher; - -#[bench] -fn bench_streaming_small(b: &mut Bencher) { - b.iter( || { - let mut parser = Parser::new( - r#"{ - "a": 1.0, - "b": [ - true, - "foo\nbar", - { "c": {"d": null} } - ] - }"#.chars() - ); - loop { - match parser.next() { - None => return, - _ => {} - } - } - }); -} -#[bench] -fn bench_small(b: &mut Bencher) { - b.iter( || { - let _ = Json::from_str(r#"{ - "a": 1.0, - "b": [ - true, - "foo\nbar", - { "c": {"d": null} } - ] - }"#); - }); -} - -#[bench] -fn bench_decode_hex_escape(b: &mut Bencher) { - let mut src = "\"".to_string(); - for _ in 0..10 { - src.push_str("\\uF975\\uf9bc\\uF9A0\\uF9C4\\uF975\\uf9bc\\uF9A0\\uF9C4"); - } - src.push_str("\""); - b.iter( || { - let _ = Json::from_str(&src); - }); -} - -fn big_json() -> string::String { - let mut src = "[\n".to_string(); - for _ in 0..500 { - src.push_str(r#"{ "a": true, "b": null, "c":3.1415, "d": "Hello world", "e": \ - [1,2,3]},"#); - } - src.push_str("{}]"); - return src; -} - -#[bench] -fn bench_streaming_large(b: &mut Bencher) { - let src = big_json(); - b.iter( || { - let mut parser = Parser::new(src.chars()); - loop { - match parser.next() { - None => return, - _ => {} - } - } - }); -} -#[bench] -fn bench_large(b: &mut Bencher) { - let src = big_json(); - b.iter( || { let _ = Json::from_str(&src); }); -} diff --git a/vendor/rustc-serialize/src/base64.rs b/vendor/rustc-serialize/src/base64.rs deleted file mode 100644 index 3c346b8947..0000000000 --- a/vendor/rustc-serialize/src/base64.rs +++ /dev/null @@ -1,489 +0,0 @@ -// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. -// -// ignore-lexer-test FIXME #15679 - -//! Base64 binary-to-text encoding - -pub use self::FromBase64Error::*; -pub use self::CharacterSet::*; - -use std::fmt; -use std::error; - -/// Available encoding character sets -#[derive(Clone, Copy, Debug)] -pub enum CharacterSet { - /// The standard character set (uses `+` and `/`) - Standard, - /// The URL safe character set (uses `-` and `_`) - UrlSafe -} - -/// Available newline types -#[derive(Clone, Copy, Debug)] -pub enum Newline { - /// A linefeed (i.e. Unix-style newline) - LF, - /// A carriage return and a linefeed (i.e. Windows-style newline) - CRLF -} - -/// Contains configuration parameters for `to_base64`. -#[derive(Clone, Copy, Debug)] -pub struct Config { - /// Character set to use - pub char_set: CharacterSet, - /// Newline to use - pub newline: Newline, - /// True to pad output with `=` characters - pub pad: bool, - /// `Some(len)` to wrap lines at `len`, `None` to disable line wrapping - pub line_length: Option<usize> -} - -/// Configuration for RFC 4648 standard base64 encoding -pub static STANDARD: Config = - Config {char_set: Standard, newline: Newline::CRLF, pad: true, line_length: None}; - -/// Configuration for RFC 4648 base64url encoding -pub static URL_SAFE: Config = - Config {char_set: UrlSafe, newline: Newline::CRLF, pad: false, line_length: None}; - -/// Configuration for RFC 2045 MIME base64 encoding -pub static MIME: Config = - Config {char_set: Standard, newline: Newline::CRLF, pad: true, line_length: Some(76)}; - -static STANDARD_CHARS: &'static[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ\ - abcdefghijklmnopqrstuvwxyz\ - 0123456789+/"; - -static URLSAFE_CHARS: &'static[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ\ - abcdefghijklmnopqrstuvwxyz\ - 0123456789-_"; - -/// A trait for converting a value to base64 encoding. -pub trait ToBase64 { - /// Converts the value of `self` to a base64 value following the specified - /// format configuration, returning the owned string. - fn to_base64(&self, config: Config) -> String; -} - -impl ToBase64 for [u8] { - /// Turn a vector of `u8` bytes into a base64 string. - /// - /// # Example - /// - /// ```rust - /// extern crate rustc_serialize; - /// use rustc_serialize::base64::{ToBase64, STANDARD}; - /// - /// fn main () { - /// let str = [52,32].to_base64(STANDARD); - /// println!("base 64 output: {:?}", str); - /// } - /// ``` - fn to_base64(&self, config: Config) -> String { - let bytes = match config.char_set { - Standard => STANDARD_CHARS, - UrlSafe => URLSAFE_CHARS - }; - - let len = self.len(); - let newline = match config.newline { - Newline::LF => "\n", - Newline::CRLF => "\r\n", - }; - - // Preallocate memory. - let mut prealloc_len = (len + 2) / 3 * 4; - if let Some(line_length) = config.line_length { - let num_lines = match prealloc_len { - 0 => 0, - n => (n - 1) / line_length - }; - prealloc_len += num_lines * newline.bytes().count(); - } - - let mut out_bytes = vec![b'='; prealloc_len]; - - // Deal with padding bytes - let mod_len = len % 3; - - // Use iterators to reduce branching - { - let mut cur_length = 0; - - let mut s_in = self[..len - mod_len].iter().map(|&x| x as u32); - let mut s_out = out_bytes.iter_mut(); - - // Convenient shorthand - let enc = |val| bytes[val as usize]; - let mut write = |val| *s_out.next().unwrap() = val; - - // Iterate though blocks of 4 - while let (Some(first), Some(second), Some(third)) = - (s_in.next(), s_in.next(), s_in.next()) { - - // Line break if needed - if let Some(line_length) = config.line_length { - if cur_length >= line_length { - for b in newline.bytes() { write(b) }; - cur_length = 0; - } - } - - let n = first << 16 | second << 8 | third; - - // This 24-bit number gets separated into four 6-bit numbers. - write(enc((n >> 18) & 63)); - write(enc((n >> 12) & 63)); - write(enc((n >> 6 ) & 63)); - write(enc((n >> 0 ) & 63)); - - cur_length += 4; - } - - // Line break only needed if padding is required - if mod_len != 0 { - if let Some(line_length) = config.line_length { - if cur_length >= line_length { - for b in newline.bytes() { write(b) }; - } - } - } - - // Heh, would be cool if we knew this was exhaustive - // (the dream of bounded integer types) - match mod_len { - 0 => (), - 1 => { - let n = (self[len-1] as u32) << 16; - write(enc((n >> 18) & 63)); - write(enc((n >> 12) & 63)); - } - 2 => { - let n = (self[len-2] as u32) << 16 | - (self[len-1] as u32) << 8; - write(enc((n >> 18) & 63)); - write(enc((n >> 12) & 63)); - write(enc((n >> 6 ) & 63)); - } - _ => panic!("Algebra is broken, please alert the math police") - } - } - - // We get padding for "free", so only have to drop it if unwanted. - if !config.pad { - while let Some(&b'=') = out_bytes.last() { - out_bytes.pop(); - } - } - - unsafe { String::from_utf8_unchecked(out_bytes) } - } -} - -impl<'a, T: ?Sized + ToBase64> ToBase64 for &'a T { - fn to_base64(&self, config: Config) -> String { - (**self).to_base64(config) - } -} - -/// A trait for converting from base64 encoded values. -pub trait FromBase64 { - /// Converts the value of `self`, interpreted as base64 encoded data, into - /// an owned vector of bytes, returning the vector. - fn from_base64(&self) -> Result<Vec<u8>, FromBase64Error>; -} - -/// Errors that can occur when decoding a base64 encoded string -#[derive(Clone, Copy)] -pub enum FromBase64Error { - /// The input contained a character not part of the base64 format - InvalidBase64Byte(u8, usize), - /// The input had an invalid length - InvalidBase64Length, -} - -impl fmt::Debug for FromBase64Error { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match *self { - InvalidBase64Byte(ch, idx) => - write!(f, "Invalid character '{}' at position {}", ch, idx), - InvalidBase64Length => write!(f, "Invalid length"), - } - } -} - -impl error::Error for FromBase64Error { - fn description(&self) -> &str { - match *self { - InvalidBase64Byte(_, _) => "invalid character", - InvalidBase64Length => "invalid length", - } - } -} - -impl fmt::Display for FromBase64Error { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - fmt::Debug::fmt(&self, f) - } -} - -impl FromBase64 for str { - /// Convert any base64 encoded string (literal, `@`, `&`, or `~`) - /// to the byte values it encodes. - /// - /// You can use the `String::from_utf8` function to turn a `Vec<u8>` into a - /// string with characters corresponding to those values. - /// - /// # Example - /// - /// This converts a string literal to base64 and back. - /// - /// ```rust - /// extern crate rustc_serialize; - /// use rustc_serialize::base64::{ToBase64, FromBase64, STANDARD}; - /// - /// fn main () { - /// let hello_str = b"Hello, World".to_base64(STANDARD); - /// println!("base64 output: {}", hello_str); - /// let res = hello_str.from_base64(); - /// if res.is_ok() { - /// let opt_bytes = String::from_utf8(res.unwrap()); - /// if opt_bytes.is_ok() { - /// println!("decoded from base64: {:?}", opt_bytes.unwrap()); - /// } - /// } - /// } - /// ``` - #[inline] - fn from_base64(&self) -> Result<Vec<u8>, FromBase64Error> { - self.as_bytes().from_base64() - } -} - -impl FromBase64 for [u8] { - fn from_base64(&self) -> Result<Vec<u8>, FromBase64Error> { - let mut r = Vec::with_capacity(self.len()); - let mut buf: u32 = 0; - let mut modulus = 0; - - let mut it = self.iter(); - for byte in it.by_ref() { - let code = DECODE_TABLE[*byte as usize]; - if code >= SPECIAL_CODES_START { - match code { - NEWLINE_CODE => continue, - EQUALS_CODE => break, - INVALID_CODE => return Err(InvalidBase64Byte( - *byte, (byte as *const _ as usize) - self.as_ptr() as usize)), - _ => unreachable!(), - } - } - buf = (buf | code as u32) << 6; - modulus += 1; - if modulus == 4 { - modulus = 0; - r.push((buf >> 22) as u8); - r.push((buf >> 14) as u8); - r.push((buf >> 6 ) as u8); - } - } - - for byte in it { - match *byte { - b'=' | b'\r' | b'\n' => continue, - _ => return Err(InvalidBase64Byte( - *byte, (byte as *const _ as usize) - self.as_ptr() as usize)), - } - } - - match modulus { - 2 => { - r.push((buf >> 10) as u8); - } - 3 => { - r.push((buf >> 16) as u8); - r.push((buf >> 8 ) as u8); - } - 0 => (), - _ => return Err(InvalidBase64Length), - } - - Ok(r) - } -} - -impl<'a, T: ?Sized + FromBase64> FromBase64 for &'a T { - fn from_base64(&self) -> Result<Vec<u8>, FromBase64Error> { - (**self).from_base64() - } -} - -/// Base64 decoding lookup table, generated using: -/// -/// ``` -/// let mut ch = 0u8; -/// for ch in 0..255 { -/// let mut ch = ch as u8; -/// let code = match ch { -/// b'A'...b'Z' => ch - 0x41, -/// b'a'...b'z' => ch - 0x47, -/// b'0'...b'9' => ch + 0x04, -/// b'+' | b'-' => 0x3E, -/// b'/' | b'_' => 0x3F, -/// b'=' => 0xFE, -/// b'\r' | b'\n' => 0xFD, -/// _ => 0xFF, -/// }; -/// print!("0x{:02X}, ", code); -/// if ch % 16 == 15 { println!(""); } -/// else if ch == 0xFF { break; } -/// ch += 1; -/// } -/// println!(""); -/// ``` -const DECODE_TABLE: [u8; 256] = [ - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3E, 0xFF, 0x3E, 0xFF, 0x3F, - 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, - 0xFF, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0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xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -]; -const INVALID_CODE: u8 = 0xFF; -const EQUALS_CODE: u8 = 0xFE; -const NEWLINE_CODE: u8 = 0xFD; -const SPECIAL_CODES_START: u8 = NEWLINE_CODE; - -#[cfg(test)] -mod tests { - use base64::{Config, Newline, FromBase64, ToBase64, STANDARD, URL_SAFE}; - - #[test] - fn test_to_base64_basic() { - assert_eq!("".as_bytes().to_base64(STANDARD), ""); - assert_eq!("f".as_bytes().to_base64(STANDARD), "Zg=="); - assert_eq!("fo".as_bytes().to_base64(STANDARD), "Zm8="); - assert_eq!("foo".as_bytes().to_base64(STANDARD), "Zm9v"); - assert_eq!("foob".as_bytes().to_base64(STANDARD), "Zm9vYg=="); - assert_eq!("fooba".as_bytes().to_base64(STANDARD), "Zm9vYmE="); - assert_eq!("foobar".as_bytes().to_base64(STANDARD), "Zm9vYmFy"); - } - - #[test] - fn test_to_base64_crlf_line_break() { - assert!(![0; 1000].to_base64(Config {line_length: None, ..STANDARD}) - .contains("\r\n")); - assert_eq!(b"foobar".to_base64(Config {line_length: Some(4), - ..STANDARD}), - "Zm9v\r\nYmFy"); - } - - #[test] - fn test_to_base64_lf_line_break() { - assert!(![0; 1000].to_base64(Config {line_length: None, - newline: Newline::LF, - ..STANDARD}) - .contains("\n")); - assert_eq!(b"foobar".to_base64(Config {line_length: Some(4), - newline: Newline::LF, - ..STANDARD}), - "Zm9v\nYmFy"); - } - - #[test] - fn test_to_base64_padding() { - assert_eq!("f".as_bytes().to_base64(Config {pad: false, ..STANDARD}), "Zg"); - assert_eq!("fo".as_bytes().to_base64(Config {pad: false, ..STANDARD}), "Zm8"); - } - - #[test] - fn test_to_base64_url_safe() { - assert_eq!([251, 255].to_base64(URL_SAFE), "-_8"); - assert_eq!([251, 255].to_base64(STANDARD), "+/8="); - } - - #[test] - fn test_to_base64_empty_line_length() { - [].to_base64(Config {line_length: Some(72), ..STANDARD}); - } - - #[test] - fn test_from_base64_basic() { - assert_eq!("".from_base64().unwrap(), b""); - assert_eq!("Zg==".from_base64().unwrap(), b"f"); - assert_eq!("Zm8=".from_base64().unwrap(), b"fo"); - assert_eq!("Zm9v".from_base64().unwrap(), b"foo"); - assert_eq!("Zm9vYg==".from_base64().unwrap(), b"foob"); - assert_eq!("Zm9vYmE=".from_base64().unwrap(), b"fooba"); - assert_eq!("Zm9vYmFy".from_base64().unwrap(), b"foobar"); - } - - #[test] - fn test_from_base64_bytes() { - assert_eq!(b"Zm9vYmFy".from_base64().unwrap(), b"foobar"); - } - - #[test] - fn test_from_base64_newlines() { - assert_eq!("Zm9v\r\nYmFy".from_base64().unwrap(), - b"foobar"); - assert_eq!("Zm9vYg==\r\n".from_base64().unwrap(), - b"foob"); - assert_eq!("Zm9v\nYmFy".from_base64().unwrap(), - b"foobar"); - assert_eq!("Zm9vYg==\n".from_base64().unwrap(), - b"foob"); - } - - #[test] - fn test_from_base64_urlsafe() { - assert_eq!("-_8".from_base64().unwrap(), "+/8=".from_base64().unwrap()); - } - - #[test] - fn test_from_base64_invalid_char() { - assert!("Zm$=".from_base64().is_err()); - assert!("Zg==$".from_base64().is_err()); - } - - #[test] - fn test_from_base64_invalid_padding() { - assert!("Z===".from_base64().is_err()); - } - - #[test] - fn test_base64_random() { - use rand::{thread_rng, Rng}; - - for _ in 0..1000 { - let times = thread_rng().gen_range(1, 100); - let v = thread_rng().gen_iter::<u8>().take(times) - .collect::<Vec<_>>(); - assert_eq!(v.to_base64(STANDARD) - .from_base64() - .unwrap(), - v); - } - } -} diff --git a/vendor/rustc-serialize/src/collection_impls.rs b/vendor/rustc-serialize/src/collection_impls.rs deleted file mode 100644 index f8074c911b..0000000000 --- a/vendor/rustc-serialize/src/collection_impls.rs +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Implementations of serialization for structures found in libcollections - -use std::hash::Hash; - -use {Decodable, Encodable, Decoder, Encoder, cap_capacity}; -use std::collections::{LinkedList, VecDeque, BTreeMap, BTreeSet, HashMap, HashSet}; - -impl< - T: Encodable -> Encodable for LinkedList<T> { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_seq(self.len(), |s| { - for (i, e) in self.iter().enumerate() { - try!(s.emit_seq_elt(i, |s| e.encode(s))); - } - Ok(()) - }) - } -} - -impl<T:Decodable> Decodable for LinkedList<T> { - fn decode<D: Decoder>(d: &mut D) -> Result<LinkedList<T>, D::Error> { - d.read_seq(|d, len| { - let mut list = LinkedList::new(); - for i in 0..len { - list.push_back(try!(d.read_seq_elt(i, |d| Decodable::decode(d)))); - } - Ok(list) - }) - } -} - -impl<T: Encodable> Encodable for VecDeque<T> { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_seq(self.len(), |s| { - for (i, e) in self.iter().enumerate() { - try!(s.emit_seq_elt(i, |s| e.encode(s))); - } - Ok(()) - }) - } -} - -impl<T:Decodable> Decodable for VecDeque<T> { - fn decode<D: Decoder>(d: &mut D) -> Result<VecDeque<T>, D::Error> { - d.read_seq(|d, len| { - let mut deque: VecDeque<T> = VecDeque::new(); - for i in 0..len { - deque.push_back(try!(d.read_seq_elt(i, |d| Decodable::decode(d)))); - } - Ok(deque) - }) - } -} - -impl< - K: Encodable + Ord, - V: Encodable -> Encodable for BTreeMap<K, V> { - fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> { - e.emit_map(self.len(), |e| { - let mut i = 0; - for (key, val) in self.iter() { - try!(e.emit_map_elt_key(i, |e| key.encode(e))); - try!(e.emit_map_elt_val(i, |e| val.encode(e))); - i += 1; - } - Ok(()) - }) - } -} - -impl< - K: Decodable + Ord, - V: Decodable -> Decodable for BTreeMap<K, V> { - fn decode<D: Decoder>(d: &mut D) -> Result<BTreeMap<K, V>, D::Error> { - d.read_map(|d, len| { - let mut map = BTreeMap::new(); - for i in 0..len { - let key = try!(d.read_map_elt_key(i, |d| Decodable::decode(d))); - let val = try!(d.read_map_elt_val(i, |d| Decodable::decode(d))); - map.insert(key, val); - } - Ok(map) - }) - } -} - -impl< - T: Encodable + Ord -> Encodable for BTreeSet<T> { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_seq(self.len(), |s| { - let mut i = 0; - for e in self.iter() { - try!(s.emit_seq_elt(i, |s| e.encode(s))); - i += 1; - } - Ok(()) - }) - } -} - -impl< - T: Decodable + Ord -> Decodable for BTreeSet<T> { - fn decode<D: Decoder>(d: &mut D) -> Result<BTreeSet<T>, D::Error> { - d.read_seq(|d, len| { - let mut set = BTreeSet::new(); - for i in 0..len { - set.insert(try!(d.read_seq_elt(i, |d| Decodable::decode(d)))); - } - Ok(set) - }) - } -} - -impl<K, V> Encodable for HashMap<K, V> - where K: Encodable + Hash + Eq, - V: Encodable, -{ - fn encode<E: Encoder>(&self, e: &mut E) -> Result<(), E::Error> { - e.emit_map(self.len(), |e| { - let mut i = 0; - for (key, val) in self.iter() { - try!(e.emit_map_elt_key(i, |e| key.encode(e))); - try!(e.emit_map_elt_val(i, |e| val.encode(e))); - i += 1; - } - Ok(()) - }) - } -} - -impl<K, V> Decodable for HashMap<K, V> - where K: Decodable + Hash + Eq, - V: Decodable, -{ - fn decode<D: Decoder>(d: &mut D) -> Result<HashMap<K, V>, D::Error> { - d.read_map(|d, len| { - let mut map = HashMap::with_capacity(cap_capacity::<(K, V)>(len)); - for i in 0..len { - let key = try!(d.read_map_elt_key(i, |d| Decodable::decode(d))); - let val = try!(d.read_map_elt_val(i, |d| Decodable::decode(d))); - map.insert(key, val); - } - Ok(map) - }) - } -} - -impl<T> Encodable for HashSet<T> where T: Encodable + Hash + Eq { - fn encode<E: Encoder>(&self, s: &mut E) -> Result<(), E::Error> { - s.emit_seq(self.len(), |s| { - let mut i = 0; - for e in self.iter() { - try!(s.emit_seq_elt(i, |s| e.encode(s))); - i += 1; - } - Ok(()) - }) - } -} - -impl<T> Decodable for HashSet<T> where T: Decodable + Hash + Eq, { - fn decode<D: Decoder>(d: &mut D) -> Result<HashSet<T>, D::Error> { - d.read_seq(|d, len| { - let mut set = HashSet::with_capacity(cap_capacity::<T>(len)); - for i in 0..len { - set.insert(try!(d.read_seq_elt(i, |d| Decodable::decode(d)))); - } - Ok(set) - }) - } -} diff --git a/vendor/rustc-serialize/src/hex.rs b/vendor/rustc-serialize/src/hex.rs deleted file mode 100644 index 3c7df19992..0000000000 --- a/vendor/rustc-serialize/src/hex.rs +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. -// -// ignore-lexer-test FIXME #15679 - -//! Hex binary-to-text encoding - -pub use self::FromHexError::*; - -use std::fmt; -use std::error; - -/// A trait for converting a value to hexadecimal encoding -pub trait ToHex { - /// Converts the value of `self` to a hex value, returning the owned - /// string. - fn to_hex(&self) -> String; -} - -static CHARS: &'static[u8] = b"0123456789abcdef"; - -impl ToHex for [u8] { - /// Turn a vector of `u8` bytes into a hexadecimal string. - /// - /// # Example - /// - /// ```rust - /// extern crate rustc_serialize; - /// use rustc_serialize::hex::ToHex; - /// - /// fn main () { - /// let str = [52,32].to_hex(); - /// println!("{}", str); - /// } - /// ``` - fn to_hex(&self) -> String { - let mut v = Vec::with_capacity(self.len() * 2); - for &byte in self.iter() { - v.push(CHARS[(byte >> 4) as usize]); - v.push(CHARS[(byte & 0xf) as usize]); - } - - unsafe { - String::from_utf8_unchecked(v) - } - } -} - -impl<'a, T: ?Sized + ToHex> ToHex for &'a T { - fn to_hex(&self) -> String { - (**self).to_hex() - } -} - -/// A trait for converting hexadecimal encoded values -pub trait FromHex { - /// Converts the value of `self`, interpreted as hexadecimal encoded data, - /// into an owned vector of bytes, returning the vector. - fn from_hex(&self) -> Result<Vec<u8>, FromHexError>; -} - -/// Errors that can occur when decoding a hex encoded string -#[derive(Clone, Copy)] -pub enum FromHexError { - /// The input contained a character not part of the hex format - InvalidHexCharacter(char, usize), - /// The input had an invalid length - InvalidHexLength, -} - -impl fmt::Debug for FromHexError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match *self { - InvalidHexCharacter(ch, idx) => - write!(f, "Invalid character '{}' at position {}", ch, idx), - InvalidHexLength => write!(f, "Invalid input length"), - } - } -} - -impl error::Error for FromHexError { - fn description(&self) -> &str { - match *self { - InvalidHexCharacter(_, _) => "invalid character", - InvalidHexLength => "invalid length", - } - } -} - -impl fmt::Display for FromHexError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - fmt::Debug::fmt(&self, f) - } -} - -impl FromHex for str { - /// Convert any hexadecimal encoded string (literal, `@`, `&`, or `~`) - /// to the byte values it encodes. - /// - /// You can use the `String::from_utf8` function to turn a - /// `Vec<u8>` into a string with characters corresponding to those values. - /// - /// # Example - /// - /// This converts a string literal to hexadecimal and back. - /// - /// ```rust - /// extern crate rustc_serialize; - /// use rustc_serialize::hex::{FromHex, ToHex}; - /// - /// fn main () { - /// let hello_str = "Hello, World".as_bytes().to_hex(); - /// println!("{}", hello_str); - /// let bytes = hello_str.from_hex().unwrap(); - /// println!("{:?}", bytes); - /// let result_str = String::from_utf8(bytes).unwrap(); - /// println!("{}", result_str); - /// } - /// ``` - fn from_hex(&self) -> Result<Vec<u8>, FromHexError> { - // This may be an overestimate if there is any whitespace - let mut b = Vec::with_capacity(self.len() / 2); - let mut modulus = 0; - let mut buf = 0; - - for (idx, byte) in self.bytes().enumerate() { - buf <<= 4; - - match byte { - b'A'...b'F' => buf |= byte - b'A' + 10, - b'a'...b'f' => buf |= byte - b'a' + 10, - b'0'...b'9' => buf |= byte - b'0', - b' '|b'\r'|b'\n'|b'\t' => { - buf >>= 4; - continue - } - _ => { - let ch = self[idx..].chars().next().unwrap(); - return Err(InvalidHexCharacter(ch, idx)) - } - } - - modulus += 1; - if modulus == 2 { - modulus = 0; - b.push(buf); - } - } - - match modulus { - 0 => Ok(b.into_iter().collect()), - _ => Err(InvalidHexLength), - } - } -} - -impl<'a, T: ?Sized + FromHex> FromHex for &'a T { - fn from_hex(&self) -> Result<Vec<u8>, FromHexError> { - (**self).from_hex() - } -} - -#[cfg(test)] -mod tests { - use hex::{FromHex, ToHex}; - - #[test] - pub fn test_to_hex() { - assert_eq!("foobar".as_bytes().to_hex(), "666f6f626172"); - } - - #[test] - pub fn test_from_hex_okay() { - assert_eq!("666f6f626172".from_hex().unwrap(), - b"foobar"); - assert_eq!("666F6F626172".from_hex().unwrap(), - b"foobar"); - } - - #[test] - pub fn test_from_hex_odd_len() { - assert!("666".from_hex().is_err()); - assert!("66 6".from_hex().is_err()); - } - - #[test] - pub fn test_from_hex_invalid_char() { - assert!("66y6".from_hex().is_err()); - } - - #[test] - pub fn test_from_hex_ignores_whitespace() { - assert_eq!("666f 6f6\r\n26172 ".from_hex().unwrap(), - b"foobar"); - } - - #[test] - pub fn test_to_hex_all_bytes() { - for i in 0..256 { - assert_eq!([i as u8].to_hex(), format!("{:02x}", i)); - } - } - - #[test] - pub fn test_from_hex_all_bytes() { - for i in 0..256 { - let ii: &[u8] = &[i as u8]; - assert_eq!(format!("{:02x}", i).from_hex().unwrap(), - ii); - assert_eq!(format!("{:02X}", i).from_hex().unwrap(), - ii); - } - } -} diff --git a/vendor/rustc-serialize/src/json.rs b/vendor/rustc-serialize/src/json.rs deleted file mode 100644 index e478fe8715..0000000000 --- a/vendor/rustc-serialize/src/json.rs +++ /dev/null @@ -1,3999 +0,0 @@ -// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Rust JSON serialization library -// Copyright (c) 2011 Google Inc. - -//! JSON parsing and serialization -//! -//! # What is JSON? -//! -//! JSON (JavaScript Object Notation) is a way to write data in Javascript. -//! Like XML, it allows encoding structured data in a text format that can be -//! easily read by humans. Its simple syntax and native compatibility with -//! JavaScript have made it a widely used format. -//! -//! Data types that can be encoded are JavaScript types (see the `Json` enum -//! for more details): -//! -//! * `I64`: equivalent to rust's `i64` -//! * `U64`: equivalent to rust's `u64` -//! * `F64`: equivalent to rust's `f64` -//! * `Boolean`: equivalent to rust's `bool` -//! * `String`: equivalent to rust's `String` -//! * `Array`: equivalent to rust's `Vec<T>`, but also allowing objects of -//! different types in the -//! same array -//! * `Object`: equivalent to rust's `BTreeMap<String, json::Json>` -//! * `Null` -//! -//! An object is a series of string keys mapping to values, in `"key": value` -//! format. Arrays are enclosed in square brackets ([ ... ]) and objects in -//! curly brackets ({ ... }). A simple JSON document encoding a person, -//! their age, address and phone numbers could look like -//! -//! ```ignore -//! { -//! "FirstName": "John", -//! "LastName": "Doe", -//! "Age": 43, -//! "Address": { -//! "Street": "Downing Street 10", -//! "City": "London", -//! "Country": "Great Britain" -//! }, -//! "PhoneNumbers": [ -//! "+44 1234567", -//! "+44 2345678" -//! ] -//! } -//! ``` -//! -//! # Rust Type-based Encoding and Decoding -//! -//! Rust provides a mechanism for low boilerplate encoding & decoding of values -//! to and from JSON via the serialization API. To be able to encode a piece -//! of data, it must implement the `rustc_serialize::Encodable` trait. To be -//! able to decode a piece of data, it must implement the -//! `rustc_serialize::Decodable` trait. The Rust compiler provides an -//! annotation to automatically generate the code for these traits: -//! `#[derive(RustcDecodable, RustcEncodable)]` -//! -//! The JSON API provides an enum `json::Json` and a trait `ToJson` to encode -//! objects. The `ToJson` trait provides a `to_json` method to convert an -//! object into a `json::Json` value. A `json::Json` value can be encoded as a -//! string or buffer using the functions described above. You can also use the -//! `json::Encoder` object, which implements the `Encoder` trait. -//! -//! When using `ToJson`, the `Encodable` trait implementation is not -//! mandatory. -//! -//! # Examples of use -//! -//! ## Using Autoserialization -//! -//! Create a struct called `TestStruct` and serialize and deserialize it to and -//! from JSON using the serialization API, using the derived serialization code. -//! -//! ```rust -//! extern crate rustc_serialize; -//! use rustc_serialize::json; -//! -//! // Automatically generate `RustcDecodable` and `RustcEncodable` trait -//! // implementations -//! #[derive(RustcDecodable, RustcEncodable)] -//! pub struct TestStruct { -//! data_int: u8, -//! data_str: String, -//! data_vector: Vec<u8>, -//! } -//! -//! fn main() { -//! let object = TestStruct { -//! data_int: 1, -//! data_str: "homura".to_string(), -//! data_vector: vec![2,3,4,5], -//! }; -//! -//! // Serialize using `json::encode` -//! let encoded = json::encode(&object).unwrap(); -//! -//! // Deserialize using `json::decode` -//! let decoded: TestStruct = json::decode(&encoded).unwrap(); -//! } -//! ``` -//! -//! ## Using the `ToJson` trait -//! -//! The examples below use the `ToJson` trait to generate the JSON string, -//! which is required for custom mappings. -//! -//! ### Simple example of `ToJson` usage -//! -//! ```rust -//! extern crate rustc_serialize; -//! use rustc_serialize::json::{self, ToJson, Json}; -//! -//! // A custom data structure -//! struct ComplexNum { -//! a: f64, -//! b: f64, -//! } -//! -//! // JSON value representation -//! impl ToJson for ComplexNum { -//! fn to_json(&self) -> Json { -//! Json::String(format!("{}+{}i", self.a, self.b)) -//! } -//! } -//! -//! // Only generate `RustcEncodable` trait implementation -//! #[derive(RustcEncodable)] -//! pub struct ComplexNumRecord { -//! uid: u8, -//! dsc: String, -//! val: Json, -//! } -//! -//! fn main() { -//! let num = ComplexNum { a: 0.0001, b: 12.539 }; -//! let data: String = json::encode(&ComplexNumRecord{ -//! uid: 1, -//! dsc: "test".to_string(), -//! val: num.to_json(), -//! }).unwrap(); -//! println!("data: {}", data); -//! // data: {"uid":1,"dsc":"test","val":"0.0001+12.539i"}; -//! } -//! ``` -//! -//! ### Verbose example of `ToJson` usage -//! -//! ```rust -//! extern crate rustc_serialize; -//! use std::collections::BTreeMap; -//! use rustc_serialize::json::{self, Json, ToJson}; -//! -//! // Only generate `Decodable` trait implementation -//! #[derive(RustcDecodable)] -//! pub struct TestStruct { -//! data_int: u8, -//! data_str: String, -//! data_vector: Vec<u8>, -//! } -//! -//! // Specify encoding method manually -//! impl ToJson for TestStruct { -//! fn to_json(&self) -> Json { -//! let mut d = BTreeMap::new(); -//! // All standard types implement `to_json()`, so use it -//! d.insert("data_int".to_string(), self.data_int.to_json()); -//! d.insert("data_str".to_string(), self.data_str.to_json()); -//! d.insert("data_vector".to_string(), self.data_vector.to_json()); -//! Json::Object(d) -//! } -//! } -//! -//! fn main() { -//! // Serialize using `ToJson` -//! let input_data = TestStruct { -//! data_int: 1, -//! data_str: "madoka".to_string(), -//! data_vector: vec![2,3,4,5], -//! }; -//! let json_obj: Json = input_data.to_json(); -//! let json_str: String = json_obj.to_string(); -//! -//! // Deserialize like before -//! let decoded: TestStruct = json::decode(&json_str).unwrap(); -//! } -//! ``` -//! -//! ## Parsing a `str` to `Json` and reading the result -//! -//! ```rust -//! extern crate rustc_serialize; -//! use rustc_serialize::json::Json; -//! -//! fn main() { -//! let data = Json::from_str("{\"foo\": 13, \"bar\": \"baz\"}").unwrap(); -//! println!("data: {}", data); -//! // data: {"bar":"baz","foo":13} -//! println!("object? {}", data.is_object()); -//! // object? true -//! -//! let obj = data.as_object().unwrap(); -//! let foo = obj.get("foo").unwrap(); -//! -//! println!("array? {:?}", foo.as_array()); -//! // array? None -//! println!("u64? {:?}", foo.as_u64()); -//! // u64? Some(13u64) -//! -//! for (key, value) in obj.iter() { -//! println!("{}: {}", key, match *value { -//! Json::U64(v) => format!("{} (u64)", v), -//! Json::String(ref v) => format!("{} (string)", v), -//! _ => format!("other") -//! }); -//! } -//! // bar: baz (string) -//! // foo: 13 (u64) -//! } -//! ``` -//! -//! # The status of this library -//! -//! While this library is the standard way of working with JSON in Rust, -//! there is a next-generation library called Serde that's in the works (it's -//! faster, overcomes some design limitations of rustc-serialize and has more -//! features). You might consider using it when starting a new project or -//! evaluating Rust JSON performance. - -use self::JsonEvent::*; -use self::ErrorCode::*; -use self::ParserError::*; -use self::DecoderError::*; -use self::ParserState::*; -use self::InternalStackElement::*; - -use std::collections::{HashMap, BTreeMap}; -use std::error::Error as StdError; -use std::i64; -use std::io::prelude::*; -use std::mem::swap; -use std::ops::Index; -use std::str::FromStr; -use std::string; -use std::{char, f64, fmt, io, str}; - -use Encodable; - -/// Represents a json value -#[derive(Clone, PartialEq, PartialOrd, Debug)] -pub enum Json { - I64(i64), - U64(u64), - F64(f64), - String(string::String), - Boolean(bool), - Array(self::Array), - Object(self::Object), - Null, -} - -pub type Array = Vec<Json>; -pub type Object = BTreeMap<string::String, Json>; - -pub struct PrettyJson<'a> { inner: &'a Json } - -pub struct AsJson<'a, T: 'a> { inner: &'a T } -pub struct AsPrettyJson<'a, T: 'a> { inner: &'a T, indent: Option<u32> } - -/// The errors that can arise while parsing a JSON stream. -#[derive(Clone, Copy, PartialEq)] -pub enum ErrorCode { - InvalidSyntax, - InvalidNumber, - EOFWhileParsingObject, - EOFWhileParsingArray, - EOFWhileParsingValue, - EOFWhileParsingString, - KeyMustBeAString, - ExpectedColon, - TrailingCharacters, - TrailingComma, - InvalidEscape, - InvalidUnicodeCodePoint, - LoneLeadingSurrogateInHexEscape, - UnexpectedEndOfHexEscape, - UnrecognizedHex, - NotFourDigit, - ControlCharacterInString, - NotUtf8, -} - -#[derive(Debug)] -pub enum ParserError { - /// msg, line, col - SyntaxError(ErrorCode, usize, usize), - IoError(io::Error), -} - -impl PartialEq for ParserError { - fn eq(&self, other: &ParserError) -> bool { - match (self, other) { - (&SyntaxError(msg0, line0, col0), &SyntaxError(msg1, line1, col1)) => - msg0 == msg1 && line0 == line1 && col0 == col1, - (&IoError(_), _) => false, - (_, &IoError(_)) => false, - } - } -} - -// Builder and Parser have the same errors. -pub type BuilderError = ParserError; - -#[derive(PartialEq, Debug)] -pub enum DecoderError { - ParseError(ParserError), - ExpectedError(string::String, string::String), - MissingFieldError(string::String), - UnknownVariantError(string::String), - ApplicationError(string::String), - EOF, -} - -#[derive(Copy, Debug)] -pub enum EncoderError { - FmtError(fmt::Error), - BadHashmapKey, -} - -impl PartialEq for EncoderError { - fn eq(&self, other: &EncoderError) -> bool { - match (*self, *other) { - (EncoderError::FmtError(_), EncoderError::FmtError(_)) => true, - (EncoderError::BadHashmapKey, EncoderError::BadHashmapKey) => true, - _ => false, - } - } -} - -impl Clone for EncoderError { - fn clone(&self) -> Self { *self } -} - -/// Returns a readable error string for a given error code. -pub fn error_str(error: ErrorCode) -> &'static str { - match error { - InvalidSyntax => "invalid syntax", - InvalidNumber => "invalid number", - EOFWhileParsingObject => "EOF While parsing object", - EOFWhileParsingArray => "EOF While parsing array", - EOFWhileParsingValue => "EOF While parsing value", - EOFWhileParsingString => "EOF While parsing string", - KeyMustBeAString => "key must be a string", - ExpectedColon => "expected `:`", - TrailingCharacters => "trailing characters", - TrailingComma => "trailing comma", - InvalidEscape => "invalid escape", - UnrecognizedHex => "invalid \\u{ esc}ape (unrecognized hex)", - NotFourDigit => "invalid \\u{ esc}ape (not four digits)", - ControlCharacterInString => "unescaped control character in string", - NotUtf8 => "contents not utf-8", - InvalidUnicodeCodePoint => "invalid Unicode code point", - LoneLeadingSurrogateInHexEscape => "lone leading surrogate in hex escape", - UnexpectedEndOfHexEscape => "unexpected end of hex escape", - } -} - -/// Shortcut function to decode a JSON `&str` into an object -pub fn decode<T: ::Decodable>(s: &str) -> DecodeResult<T> { - let json = match Json::from_str(s) { - Ok(x) => x, - Err(e) => return Err(ParseError(e)) - }; - - let mut decoder = Decoder::new(json); - ::Decodable::decode(&mut decoder) -} - -/// Shortcut function to encode a `T` into a JSON `String` -pub fn encode<T: ::Encodable>(object: &T) -> EncodeResult<string::String> { - let mut s = String::new(); - { - let mut encoder = Encoder::new(&mut s); - try!(object.encode(&mut encoder)); - } - Ok(s) -} - -impl fmt::Debug for ErrorCode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - error_str(*self).fmt(f) - } -} - -impl StdError for DecoderError { - fn description(&self) -> &str { "decoder error" } - fn cause(&self) -> Option<&StdError> { - match *self { - DecoderError::ParseError(ref e) => Some(e), - _ => None, - } - } -} - -impl fmt::Display for DecoderError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - fmt::Debug::fmt(&self, f) - } -} - -impl From<ParserError> for DecoderError { - fn from(err: ParserError) -> DecoderError { - ParseError(From::from(err)) - } -} - -impl StdError for ParserError { - fn description(&self) -> &str { "failed to parse json" } -} - -impl fmt::Display for ParserError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - fmt::Debug::fmt(&self, f) - } -} - -impl From<io::Error> for ParserError { - fn from(err: io::Error) -> ParserError { - IoError(err) - } -} - -impl StdError for EncoderError { - fn description(&self) -> &str { "encoder error" } -} - -impl fmt::Display for EncoderError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - fmt::Debug::fmt(&self, f) - } -} - -impl From<fmt::Error> for EncoderError { - fn from(err: fmt::Error) -> EncoderError { EncoderError::FmtError(err) } -} - -pub type EncodeResult<T> = Result<T, EncoderError>; -pub type DecodeResult<T> = Result<T, DecoderError>; - -fn escape_str(wr: &mut fmt::Write, v: &str) -> EncodeResult<()> { - try!(wr.write_str("\"")); - - let mut start = 0; - - for (i, byte) in v.bytes().enumerate() { - let escaped = match byte { - b'"' => "\\\"", - b'\\' => "\\\\", - b'\x00' => "\\u0000", - b'\x01' => "\\u0001", - b'\x02' => "\\u0002", - b'\x03' => "\\u0003", - b'\x04' => "\\u0004", - b'\x05' => "\\u0005", - b'\x06' => "\\u0006", - b'\x07' => "\\u0007", - b'\x08' => "\\b", - b'\t' => "\\t", - b'\n' => "\\n", - b'\x0b' => "\\u000b", - b'\x0c' => "\\f", - b'\r' => "\\r", - b'\x0e' => "\\u000e", - b'\x0f' => "\\u000f", - b'\x10' => "\\u0010", - b'\x11' => "\\u0011", - b'\x12' => "\\u0012", - b'\x13' => "\\u0013", - b'\x14' => "\\u0014", - b'\x15' => "\\u0015", - b'\x16' => "\\u0016", - b'\x17' => "\\u0017", - b'\x18' => "\\u0018", - b'\x19' => "\\u0019", - b'\x1a' => "\\u001a", - b'\x1b' => "\\u001b", - b'\x1c' => "\\u001c", - b'\x1d' => "\\u001d", - b'\x1e' => "\\u001e", - b'\x1f' => "\\u001f", - b'\x7f' => "\\u007f", - _ => { continue; } - }; - - if start < i { - try!(wr.write_str(&v[start..i])); - } - - try!(wr.write_str(escaped)); - - start = i + 1; - } - - if start != v.len() { - try!(wr.write_str(&v[start..])); - } - - try!(wr.write_str("\"")); - Ok(()) -} - -fn escape_char(writer: &mut fmt::Write, v: char) -> EncodeResult<()> { - let mut buf = [0; 4]; - let _ = write!(&mut &mut buf[..], "{}", v); - let buf = unsafe { str::from_utf8_unchecked(&buf[..v.len_utf8()]) }; - escape_str(writer, buf) -} - -fn spaces(wr: &mut fmt::Write, n: u32) -> EncodeResult<()> { - let mut n = n as usize; - const BUF: &'static str = " "; - - while n >= BUF.len() { - try!(wr.write_str(BUF)); - n -= BUF.len(); - } - - if n > 0 { - try!(wr.write_str(&BUF[..n])); - } - Ok(()) -} - -fn fmt_number_or_null(v: f64) -> string::String { - use std::num::FpCategory::{Nan, Infinite}; - - match v.classify() { - Nan | Infinite => "null".to_string(), - _ => { - let s = v.to_string(); - if s.contains(".") {s} else {s + ".0"} - } - } -} - -macro_rules! emit_enquoted_if_mapkey { - ($enc:ident,$e:expr) => { - if $enc.is_emitting_map_key { - try!(write!($enc.writer, "\"{}\"", $e)); - Ok(()) - } else { - try!(write!($enc.writer, "{}", $e)); - Ok(()) - } - } -} - -enum EncodingFormat { - Compact, - Pretty { - curr_indent: u32, - indent: u32 - } -} - -/// A structure for implementing serialization to JSON. -pub struct Encoder<'a> { - writer: &'a mut (fmt::Write+'a), - format : EncodingFormat, - is_emitting_map_key: bool, -} - -impl<'a> Encoder<'a> { - /// Creates a new encoder whose output will be written in human-readable - /// JSON to the specified writer - pub fn new_pretty(writer: &'a mut fmt::Write) -> Encoder<'a> { - Encoder { - writer: writer, - format: EncodingFormat::Pretty { - curr_indent: 0, - indent: 2, - }, - is_emitting_map_key: false, - } - } - - /// Creates a new encoder whose output will be written in compact - /// JSON to the specified writer - pub fn new(writer: &'a mut fmt::Write) -> Encoder<'a> { - Encoder { - writer: writer, - format: EncodingFormat::Compact, - is_emitting_map_key: false, - } - } - - /// Set the number of spaces to indent for each level. - /// This is safe to set during encoding. - pub fn set_indent(&mut self, new_indent: u32) -> Result<(), ()> { - if let EncodingFormat::Pretty{ref mut curr_indent, ref mut indent} = self.format { - // self.indent very well could be 0 so we need to use checked division. - let level = curr_indent.checked_div(*indent).unwrap_or(0); - *indent = new_indent; - *curr_indent = level * *indent; - Ok(()) - } else { - Err(()) - } - } -} - -impl<'a> ::Encoder for Encoder<'a> { - type Error = EncoderError; - - fn emit_nil(&mut self) -> EncodeResult<()> { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - try!(write!(self.writer, "null")); - Ok(()) - } - - fn emit_usize(&mut self, v: usize) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) } - fn emit_u64(&mut self, v: u64) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) } - fn emit_u32(&mut self, v: u32) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) } - fn emit_u16(&mut self, v: u16) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) } - fn emit_u8(&mut self, v: u8) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) } - - fn emit_isize(&mut self, v: isize) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) } - fn emit_i64(&mut self, v: i64) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) } - fn emit_i32(&mut self, v: i32) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) } - fn emit_i16(&mut self, v: i16) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) } - fn emit_i8(&mut self, v: i8) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) } - - fn emit_bool(&mut self, v: bool) -> EncodeResult<()> { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - if v { - try!(write!(self.writer, "true")); - } else { - try!(write!(self.writer, "false")); - } - Ok(()) - } - - fn emit_f64(&mut self, v: f64) -> EncodeResult<()> { - emit_enquoted_if_mapkey!(self, fmt_number_or_null(v)) - } - fn emit_f32(&mut self, v: f32) -> EncodeResult<()> { - self.emit_f64(v as f64) - } - - fn emit_char(&mut self, v: char) -> EncodeResult<()> { - escape_char(self.writer, v) - } - fn emit_str(&mut self, v: &str) -> EncodeResult<()> { - escape_str(self.writer, v) - } - - fn emit_enum<F>(&mut self, _name: &str, f: F) -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - f(self) - } - - fn emit_enum_variant<F>(&mut self, - name: &str, - _id: usize, - cnt: usize, - f: F) - -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - // enums are encoded as strings or objects - // Bunny => "Bunny" - // Kangaroo(34,"William") => {"variant": "Kangaroo", "fields": [34,"William"]} - if cnt == 0 { - escape_str(self.writer, name) - } else { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - if let EncodingFormat::Pretty{ref mut curr_indent, indent} = self.format { - try!(write!(self.writer, "{{\n")); - *curr_indent += indent; - try!(spaces(self.writer, *curr_indent)); - try!(write!(self.writer, "\"variant\": ")); - try!(escape_str(self.writer, name)); - try!(write!(self.writer, ",\n")); - try!(spaces(self.writer, *curr_indent)); - try!(write!(self.writer, "\"fields\": [\n")); - *curr_indent += indent; - } else { - try!(write!(self.writer, "{{\"variant\":")); - try!(escape_str(self.writer, name)); - try!(write!(self.writer, ",\"fields\":[")); - } - try!(f(self)); - if let EncodingFormat::Pretty{ref mut curr_indent, indent} = self.format { - *curr_indent -= indent; - try!(write!(self.writer, "\n")); - try!(spaces(self.writer, *curr_indent)); - *curr_indent -= indent; - try!(write!(self.writer, "]\n")); - try!(spaces(self.writer, *curr_indent)); - try!(write!(self.writer, "}}")); - } else { - try!(write!(self.writer, "]}}")); - } - Ok(()) - } - } - - fn emit_enum_variant_arg<F>(&mut self, idx: usize, f: F) -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - if idx != 0 { - try!(write!(self.writer, ",")); - if let EncodingFormat::Pretty{..} = self.format { - try!(write!(self.writer, "\n")); - } - } - if let EncodingFormat::Pretty{curr_indent, ..} = self.format { - try!(spaces(self.writer, curr_indent)); - } - f(self) - } - - fn emit_enum_struct_variant<F>(&mut self, - name: &str, - id: usize, - cnt: usize, - f: F) -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - self.emit_enum_variant(name, id, cnt, f) - } - - fn emit_enum_struct_variant_field<F>(&mut self, - _: &str, - idx: usize, - f: F) -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - self.emit_enum_variant_arg(idx, f) - } - - - fn emit_struct<F>(&mut self, _: &str, len: usize, f: F) -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - if len == 0 { - try!(write!(self.writer, "{{}}")); - } else { - try!(write!(self.writer, "{{")); - if let EncodingFormat::Pretty{ref mut curr_indent, indent} = self.format { - *curr_indent += indent; - } - try!(f(self)); - if let EncodingFormat::Pretty{ref mut curr_indent, indent} = self.format { - *curr_indent -= indent; - try!(write!(self.writer, "\n")); - try!(spaces(self.writer, *curr_indent)); - } - try!(write!(self.writer, "}}")); - } - Ok(()) - } - - fn emit_struct_field<F>(&mut self, name: &str, idx: usize, f: F) -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - if idx != 0 { - try!(write!(self.writer, ",")); - } - if let EncodingFormat::Pretty{curr_indent, ..} = self.format { - try!(write!(self.writer, "\n")); - try!(spaces(self.writer, curr_indent)); - } - try!(escape_str(self.writer, name)); - if let EncodingFormat::Pretty{..} = self.format { - try!(write!(self.writer, ": ")); - } else { - try!(write!(self.writer, ":")); - } - f(self) - } - - fn emit_tuple<F>(&mut self, len: usize, f: F) -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - self.emit_seq(len, f) - } - fn emit_tuple_arg<F>(&mut self, idx: usize, f: F) -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - self.emit_seq_elt(idx, f) - } - - fn emit_tuple_struct<F>(&mut self, _: &str, len: usize, f: F) -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - self.emit_seq(len, f) - } - fn emit_tuple_struct_arg<F>(&mut self, idx: usize, f: F) -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - self.emit_seq_elt(idx, f) - } - - fn emit_option<F>(&mut self, f: F) -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - f(self) - } - fn emit_option_none(&mut self) -> EncodeResult<()> { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - self.emit_nil() - } - fn emit_option_some<F>(&mut self, f: F) -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - f(self) - } - - fn emit_seq<F>(&mut self, len: usize, f: F) -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - if len == 0 { - try!(write!(self.writer, "[]")); - } else { - try!(write!(self.writer, "[")); - if let EncodingFormat::Pretty{ref mut curr_indent, indent} = self.format { - *curr_indent += indent; - } - try!(f(self)); - if let EncodingFormat::Pretty{ref mut curr_indent, indent} = self.format { - *curr_indent -= indent; - try!(write!(self.writer, "\n")); - try!(spaces(self.writer, *curr_indent)); - } - try!(write!(self.writer, "]")); - } - Ok(()) - } - - fn emit_seq_elt<F>(&mut self, idx: usize, f: F) -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - if idx != 0 { - try!(write!(self.writer, ",")); - } - if let EncodingFormat::Pretty{ref mut curr_indent, ..} = self.format { - try!(write!(self.writer, "\n")); - try!(spaces(self.writer, *curr_indent)); - } - f(self) - } - - fn emit_map<F>(&mut self, len: usize, f: F) -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - if len == 0 { - try!(write!(self.writer, "{{}}")); - } else { - try!(write!(self.writer, "{{")); - if let EncodingFormat::Pretty{ref mut curr_indent, indent} = self.format { - *curr_indent += indent; - } - try!(f(self)); - if let EncodingFormat::Pretty{ref mut curr_indent, indent} = self.format { - *curr_indent -= indent; - try!(write!(self.writer, "\n")); - try!(spaces(self.writer, *curr_indent)); - } - try!(write!(self.writer, "}}")); - } - Ok(()) - } - - fn emit_map_elt_key<F>(&mut self, idx: usize, f: F) -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - if idx != 0 { - try!(write!(self.writer, ",")); - } - if let EncodingFormat::Pretty{curr_indent, ..} = self.format { - try!(write!(self.writer, "\n")); - try!(spaces(self.writer, curr_indent)); - } - self.is_emitting_map_key = true; - try!(f(self)); - self.is_emitting_map_key = false; - Ok(()) - } - - fn emit_map_elt_val<F>(&mut self, _idx: usize, f: F) -> EncodeResult<()> where - F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>, - { - if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); } - if let EncodingFormat::Pretty{..} = self.format { - try!(write!(self.writer, ": ")); - } else { - try!(write!(self.writer, ":")); - } - f(self) - } -} - -impl Encodable for Json { - fn encode<S: ::Encoder>(&self, e: &mut S) -> Result<(), S::Error> { - match *self { - Json::I64(v) => v.encode(e), - Json::U64(v) => v.encode(e), - Json::F64(v) => v.encode(e), - Json::String(ref v) => v.encode(e), - Json::Boolean(v) => v.encode(e), - Json::Array(ref v) => v.encode(e), - Json::Object(ref v) => v.encode(e), - Json::Null => e.emit_nil(), - } - } -} - -/// Create an `AsJson` wrapper which can be used to print a value as JSON -/// on-the-fly via `write!` -pub fn as_json<T: Encodable>(t: &T) -> AsJson<T> { - AsJson { inner: t } -} - -/// Create an `AsPrettyJson` wrapper which can be used to print a value as JSON -/// on-the-fly via `write!` -pub fn as_pretty_json<T: Encodable>(t: &T) -> AsPrettyJson<T> { - AsPrettyJson { inner: t, indent: None } -} - -impl Json { - /// Decodes a json value from an `&mut io::Read` - pub fn from_reader(rdr: &mut io::Read) -> Result<Self, BuilderError> { - let contents = { - let mut c = Vec::new(); - try!(rdr.read_to_end(&mut c)); - c - }; - let s = match str::from_utf8(&contents).ok() { - Some(s) => s, - _ => return Err(SyntaxError(NotUtf8, 0, 0)) - }; - let mut builder = Builder::new(s.chars()); - builder.build() - } - - /// Decodes a json value from a string - pub fn from_str(s: &str) -> Result<Self, BuilderError> { - let mut builder = Builder::new(s.chars()); - builder.build() - } - - /// Borrow this json object as a pretty object to generate a pretty - /// representation for it via `Display`. - pub fn pretty(&self) -> PrettyJson { - PrettyJson { inner: self } - } - - /// If the Json value is an Object, returns the value associated with the provided key. - /// Otherwise, returns None. - pub fn find<'a>(&'a self, key: &str) -> Option<&'a Json>{ - match self { - &Json::Object(ref map) => map.get(key), - _ => None - } - } - - /// Attempts to get a nested Json Object for each key in `keys`. - /// If any key is found not to exist, find_path will return None. - /// Otherwise, it will return the Json value associated with the final key. - pub fn find_path<'a>(&'a self, keys: &[&str]) -> Option<&'a Json>{ - let mut target = self; - for key in keys.iter() { - match target.find(*key) { - Some(t) => { target = t; }, - None => return None - } - } - Some(target) - } - - /// If the Json value is an Object, performs a depth-first search until - /// a value associated with the provided key is found. If no value is found - /// or the Json value is not an Object, returns None. - pub fn search<'a>(&'a self, key: &str) -> Option<&'a Json> { - match self { - &Json::Object(ref map) => { - match map.get(key) { - Some(json_value) => Some(json_value), - None => { - for (_, v) in map.iter() { - match v.search(key) { - x if x.is_some() => return x, - _ => () - } - } - None - } - } - }, - _ => None - } - } - - /// Returns true if the Json value is an Object. Returns false otherwise. - pub fn is_object<'a>(&'a self) -> bool { - self.as_object().is_some() - } - - /// If the Json value is an Object, returns a reference to the associated BTreeMap. - /// Returns None otherwise. - pub fn as_object<'a>(&'a self) -> Option<&'a Object> { - match self { - &Json::Object(ref map) => Some(map), - _ => None - } - } - - /// If the Json value is an Object, returns a mutable reference to the associated BTreeMap. - /// Returns None otherwise. - pub fn as_object_mut<'a>(&'a mut self) -> Option<&'a mut Object> { - match self { - &mut Json::Object(ref mut map) => Some(map), - _ => None - } - } - - /// If the Json value is an Object, returns the associated BTreeMap. - /// Returns None otherwise. - pub fn into_object(self) -> Option<Object> { - match self { - Json::Object(map) => Some(map), - _ => None - } - } - - /// Returns true if the Json value is an Array. Returns false otherwise. - pub fn is_array<'a>(&'a self) -> bool { - self.as_array().is_some() - } - - /// If the Json value is an Array, returns a reference to the associated vector. - /// Returns None otherwise. - pub fn as_array<'a>(&'a self) -> Option<&'a Array> { - match self { - &Json::Array(ref array) => Some(&*array), - _ => None - } - } - - /// If the Json value is an Array, returns a mutable reference to the associated vector. - /// Returns None otherwise. - pub fn as_array_mut<'a>(&'a mut self) -> Option<&'a mut Array> { - match self { - &mut Json::Array(ref mut list) => Some(list), - _ => None - } - } - - /// If the Json value is an Array, returns the associated vector. - /// Returns None otherwise. - pub fn into_array(self) -> Option<Array> { - match self { - Json::Array(array) => Some(array), - _ => None - } - } - - /// Returns true if the Json value is a String. Returns false otherwise. - pub fn is_string<'a>(&'a self) -> bool { - self.as_string().is_some() - } - - /// If the Json value is a String, returns the associated str. - /// Returns None otherwise. - pub fn as_string<'a>(&'a self) -> Option<&'a str> { - match *self { - Json::String(ref s) => Some(&s), - _ => None - } - } - - /// Returns true if the Json value is a Number. Returns false otherwise. - pub fn is_number(&self) -> bool { - match *self { - Json::I64(_) | Json::U64(_) | Json::F64(_) => true, - _ => false, - } - } - - /// Returns true if the Json value is a i64. Returns false otherwise. - pub fn is_i64(&self) -> bool { - match *self { - Json::I64(_) => true, - _ => false, - } - } - - /// Returns true if the Json value is a u64. Returns false otherwise. - pub fn is_u64(&self) -> bool { - match *self { - Json::U64(_) => true, - _ => false, - } - } - - /// Returns true if the Json value is a f64. Returns false otherwise. - pub fn is_f64(&self) -> bool { - match *self { - Json::F64(_) => true, - _ => false, - } - } - - /// If the Json value is a number, return or cast it to a i64. - /// Returns None otherwise. - pub fn as_i64(&self) -> Option<i64> { - match *self { - Json::I64(n) => Some(n), - Json::U64(n) if n >= i64::MAX as u64 => None, - Json::U64(n) => Some(n as i64), - _ => None - } - } - - /// If the Json value is a number, return or cast it to a u64. - /// Returns None otherwise. - pub fn as_u64(&self) -> Option<u64> { - match *self { - Json::I64(n) if n >= 0 => Some(n as u64), - Json::U64(n) => Some(n), - _ => None - } - } - - /// If the Json value is a number, return or cast it to a f64. - /// Returns None otherwise. - pub fn as_f64(&self) -> Option<f64> { - match *self { - Json::I64(n) => Some(n as f64), - Json::U64(n) => Some(n as f64), - Json::F64(n) => Some(n), - _ => None - } - } - - /// Returns true if the Json value is a Boolean. Returns false otherwise. - pub fn is_boolean(&self) -> bool { - self.as_boolean().is_some() - } - - /// If the Json value is a Boolean, returns the associated bool. - /// Returns None otherwise. - pub fn as_boolean(&self) -> Option<bool> { - match self { - &Json::Boolean(b) => Some(b), - _ => None - } - } - - /// Returns true if the Json value is a Null. Returns false otherwise. - pub fn is_null(&self) -> bool { - self.as_null().is_some() - } - - /// If the Json value is a Null, returns (). - /// Returns None otherwise. - pub fn as_null(&self) -> Option<()> { - match self { - &Json::Null => Some(()), - _ => None - } - } -} - -impl<'a> Index<&'a str> for Json { - type Output = Json; - - fn index(&self, idx: &str) -> &Json { - self.find(idx).unwrap() - } -} - -impl Index<usize> for Json { - type Output = Json; - - fn index<'a>(&'a self, idx: usize) -> &'a Json { - match self { - &Json::Array(ref v) => &v[idx], - _ => panic!("can only index Json with usize if it is an array") - } - } -} - -/// The output of the streaming parser. -#[derive(PartialEq, Debug)] -pub enum JsonEvent { - ObjectStart, - ObjectEnd, - ArrayStart, - ArrayEnd, - BooleanValue(bool), - I64Value(i64), - U64Value(u64), - F64Value(f64), - StringValue(string::String), - NullValue, - Error(ParserError), -} - -#[derive(PartialEq, Debug)] -enum ParserState { - // Parse a value in an array, true means first element. - ParseArray(bool), - // Parse ',' or ']' after an element in an array. - ParseArrayComma, - // Parse a key:value in an object, true means first element. - ParseObject(bool), - // Parse ',' or ']' after an element in an object. - ParseObjectComma, - // Initial state. - ParseStart, - // Expecting the stream to end. - ParseBeforeFinish, - // Parsing can't continue. - ParseFinished, -} - -/// A Stack represents the current position of the parser in the logical -/// structure of the JSON stream. -/// For example foo.bar[3].x -pub struct Stack { - stack: Vec<InternalStackElement>, - str_buffer: Vec<u8>, -} - -/// StackElements compose a Stack. -/// For example, Key("foo"), Key("bar"), Index(3) and Key("x") are the -/// StackElements compositing the stack that represents foo.bar[3].x -#[derive(PartialEq, Clone, Debug)] -pub enum StackElement<'l> { - Index(u32), - Key(&'l str), -} - -// Internally, Key elements are stored as indices in a buffer to avoid -// allocating a string for every member of an object. -#[derive(PartialEq, Clone, Debug)] -enum InternalStackElement { - InternalIndex(u32), - InternalKey(u16, u16), // start, size -} - -impl Stack { - pub fn new() -> Stack { - Stack { stack: Vec::new(), str_buffer: Vec::new() } - } - - /// Returns The number of elements in the Stack. - pub fn len(&self) -> usize { self.stack.len() } - - /// Returns true if the stack is empty. - pub fn is_empty(&self) -> bool { self.stack.is_empty() } - - /// Provides access to the StackElement at a given index. - /// lower indices are at the bottom of the stack while higher indices are - /// at the top. - pub fn get<'l>(&'l self, idx: usize) -> StackElement<'l> { - match self.stack[idx] { - InternalIndex(i) => StackElement::Index(i), - InternalKey(start, size) => { - StackElement::Key(str::from_utf8( - &self.str_buffer[start as usize .. start as usize + size as usize]).unwrap()) - } - } - } - - /// Compares this stack with an array of StackElements. - pub fn is_equal_to(&self, rhs: &[StackElement]) -> bool { - if self.stack.len() != rhs.len() { return false; } - for i in 0..rhs.len() { - if self.get(i) != rhs[i] { return false; } - } - return true; - } - - /// Returns true if the bottom-most elements of this stack are the same as - /// the ones passed as parameter. - pub fn starts_with(&self, rhs: &[StackElement]) -> bool { - if self.stack.len() < rhs.len() { return false; } - for i in 0..rhs.len() { - if self.get(i) != rhs[i] { return false; } - } - return true; - } - - /// Returns true if the top-most elements of this stack are the same as - /// the ones passed as parameter. - pub fn ends_with(&self, rhs: &[StackElement]) -> bool { - if self.stack.len() < rhs.len() { return false; } - let offset = self.stack.len() - rhs.len(); - for i in 0..rhs.len() { - if self.get(i + offset) != rhs[i] { return false; } - } - return true; - } - - /// Returns the top-most element (if any). - pub fn top<'l>(&'l self) -> Option<StackElement<'l>> { - return match self.stack.last() { - None => None, - Some(&InternalIndex(i)) => Some(StackElement::Index(i)), - Some(&InternalKey(start, size)) => { - Some(StackElement::Key(str::from_utf8( - &self.str_buffer[start as usize .. (start+size) as usize] - ).unwrap())) - } - } - } - - // Used by Parser to insert Key elements at the top of the stack. - fn push_key(&mut self, key: string::String) { - self.stack.push(InternalKey(self.str_buffer.len() as u16, key.len() as u16)); - for c in key.as_bytes().iter() { - self.str_buffer.push(*c); - } - } - - // Used by Parser to insert Index elements at the top of the stack. - fn push_index(&mut self, index: u32) { - self.stack.push(InternalIndex(index)); - } - - // Used by Parser to remove the top-most element of the stack. - fn pop(&mut self) { - assert!(!self.is_empty()); - match *self.stack.last().unwrap() { - InternalKey(_, sz) => { - let new_size = self.str_buffer.len() - sz as usize; - self.str_buffer.truncate(new_size); - } - InternalIndex(_) => {} - } - self.stack.pop(); - } - - // Used by Parser to test whether the top-most element is an index. - fn last_is_index(&self) -> bool { - if self.is_empty() { return false; } - return match *self.stack.last().unwrap() { - InternalIndex(_) => true, - _ => false, - } - } - - // Used by Parser to increment the index of the top-most element. - fn bump_index(&mut self) { - let len = self.stack.len(); - let idx = match *self.stack.last().unwrap() { - InternalIndex(i) => { i + 1 } - _ => { panic!(); } - }; - self.stack[len - 1] = InternalIndex(idx); - } -} - -/// A streaming JSON parser implemented as an iterator of JsonEvent, consuming -/// an iterator of char. -pub struct Parser<T> { - rdr: T, - ch: Option<char>, - line: usize, - col: usize, - // We maintain a stack representing where we are in the logical structure - // of the JSON stream. - stack: Stack, - // A state machine is kept to make it possible to interrupt and resume parsing. - state: ParserState, -} - -impl<T: Iterator<Item = char>> Iterator for Parser<T> { - type Item = JsonEvent; - - fn next(&mut self) -> Option<JsonEvent> { - if self.state == ParseFinished { - return None; - } - - if self.state == ParseBeforeFinish { - self.parse_whitespace(); - // Make sure there is no trailing characters. - if self.eof() { - self.state = ParseFinished; - return None; - } else { - return Some(self.error_event(TrailingCharacters)); - } - } - - return Some(self.parse()); - } -} - -impl<T: Iterator<Item = char>> Parser<T> { - /// Creates the JSON parser. - pub fn new(rdr: T) -> Parser<T> { - let mut p = Parser { - rdr: rdr, - ch: Some('\x00'), - line: 1, - col: 0, - stack: Stack::new(), - state: ParseStart, - }; - p.bump(); - return p; - } - - /// Provides access to the current position in the logical structure of the - /// JSON stream. - pub fn stack<'l>(&'l self) -> &'l Stack { - return &self.stack; - } - - fn eof(&self) -> bool { self.ch.is_none() } - fn ch_or_null(&self) -> char { self.ch.unwrap_or('\x00') } - fn bump(&mut self) { - self.ch = self.rdr.next(); - - if self.ch_is('\n') { - self.line += 1; - self.col = 1; - } else { - self.col += 1; - } - } - - fn next_char(&mut self) -> Option<char> { - self.bump(); - self.ch - } - fn ch_is(&self, c: char) -> bool { - self.ch == Some(c) - } - - fn error<E>(&self, reason: ErrorCode) -> Result<E, ParserError> { - Err(SyntaxError(reason, self.line, self.col)) - } - - fn parse_whitespace(&mut self) { - while self.ch_is(' ') || - self.ch_is('\n') || - self.ch_is('\t') || - self.ch_is('\r') { self.bump(); } - } - - fn parse_number(&mut self) -> JsonEvent { - let mut neg = false; - - if self.ch_is('-') { - self.bump(); - neg = true; - } - - let res = match self.parse_u64() { - Ok(res) => res, - Err(e) => { return Error(e); } - }; - - if self.ch_is('.') || self.ch_is('e') || self.ch_is('E') { - let mut res = res as f64; - - if self.ch_is('.') { - res = match self.parse_decimal(res) { - Ok(res) => res, - Err(e) => { return Error(e); } - }; - } - - if self.ch_is('e') || self.ch_is('E') { - res = match self.parse_exponent(res) { - Ok(res) => res, - Err(e) => { return Error(e); } - }; - } - - if neg { - res *= -1.0; - } - - F64Value(res) - } else { - if neg { - // Make sure we don't underflow. - if res > (i64::MAX as u64) + 1 { - Error(SyntaxError(InvalidNumber, self.line, self.col)) - } else if res == 0 { - I64Value(res as i64) - } else { - I64Value((!res + 1) as i64) - } - } else { - U64Value(res) - } - } - } - - fn parse_u64(&mut self) -> Result<u64, ParserError> { - let mut accum: u64 = 0; - - match self.ch_or_null() { - '0' => { - self.bump(); - - // A leading '0' must be the only digit before the decimal point. - match self.ch_or_null() { - '0' ... '9' => return self.error(InvalidNumber), - _ => () - } - }, - '1' ... '9' => { - while !self.eof() { - match self.ch_or_null() { - c @ '0' ... '9' => { - macro_rules! try_or_invalid { - ($e: expr) => { - match $e { - Some(v) => v, - None => return self.error(InvalidNumber) - } - } - } - accum = try_or_invalid!(accum.checked_mul(10)); - accum = try_or_invalid!(accum.checked_add((c as u64) - ('0' as u64))); - - self.bump(); - } - _ => break, - } - } - } - _ => return self.error(InvalidNumber), - } - - Ok(accum) - } - - fn parse_decimal(&mut self, mut res: f64) -> Result<f64, ParserError> { - self.bump(); - - // Make sure a digit follows the decimal place. - match self.ch_or_null() { - '0' ... '9' => (), - _ => return self.error(InvalidNumber) - } - - let mut dec = 1.0; - let mut frac = 0.0; - while !self.eof() { - match self.ch_or_null() { - c @ '0' ... '9' => { - dec /= 10.0; - frac += (((c as isize) - ('0' as isize)) as f64) * dec; - self.bump(); - } - _ => break, - } - } - - res += frac; - - Ok(res) - } - - fn parse_exponent(&mut self, mut res: f64) -> Result<f64, ParserError> { - self.bump(); - - let mut exp = 0; - let mut neg_exp = false; - - if self.ch_is('+') { - self.bump(); - } else if self.ch_is('-') { - self.bump(); - neg_exp = true; - } - - // Make sure a digit follows the exponent place. - match self.ch_or_null() { - '0' ... '9' => (), - _ => return self.error(InvalidNumber) - } - while !self.eof() { - match self.ch_or_null() { - c @ '0' ... '9' => { - exp *= 10; - exp += (c as usize) - ('0' as usize); - - self.bump(); - } - _ => break - } - } - - let exp = 10_f64.powi(exp as i32); - if neg_exp { - res /= exp; - } else { - res *= exp; - } - - Ok(res) - } - - fn decode_hex_escape(&mut self) -> Result<u16, ParserError> { - let mut i = 0; - let mut n = 0; - while i < 4 { - self.bump(); - n = match self.ch_or_null() { - c @ '0' ... '9' => n * 16 + ((c as u16) - ('0' as u16)), - c @ 'a' ... 'f' => n * 16 + (10 + (c as u16) - ('a' as u16)), - c @ 'A' ... 'F' => n * 16 + (10 + (c as u16) - ('A' as u16)), - _ => return self.error(InvalidEscape) - }; - - i += 1; - } - - Ok(n) - } - - fn parse_str(&mut self) -> Result<string::String, ParserError> { - let mut escape = false; - let mut res = string::String::new(); - - loop { - self.bump(); - if self.eof() { - return self.error(EOFWhileParsingString); - } - - if escape { - match self.ch_or_null() { - '"' => res.push('"'), - '\\' => res.push('\\'), - '/' => res.push('/'), - 'b' => res.push('\x08'), - 'f' => res.push('\x0c'), - 'n' => res.push('\n'), - 'r' => res.push('\r'), - 't' => res.push('\t'), - 'u' => match try!(self.decode_hex_escape()) { - 0xDC00 ... 0xDFFF => { - return self.error(LoneLeadingSurrogateInHexEscape) - } - - // Non-BMP characters are encoded as a sequence of - // two hex escapes, representing UTF-16 surrogates. - n1 @ 0xD800 ... 0xDBFF => { - match (self.next_char(), self.next_char()) { - (Some('\\'), Some('u')) => (), - _ => return self.error(UnexpectedEndOfHexEscape), - } - - let n2 = try!(self.decode_hex_escape()); - if n2 < 0xDC00 || n2 > 0xDFFF { - return self.error(LoneLeadingSurrogateInHexEscape) - } - let c = (((n1 - 0xD800) as u32) << 10 | - (n2 - 0xDC00) as u32) + 0x1_0000; - res.push(char::from_u32(c).unwrap()); - } - - n => match char::from_u32(n as u32) { - Some(c) => res.push(c), - None => return self.error(InvalidUnicodeCodePoint), - }, - }, - _ => return self.error(InvalidEscape), - } - escape = false; - } else if self.ch_is('\\') { - escape = true; - } else { - match self.ch { - Some('"') => { - self.bump(); - return Ok(res); - }, - Some(c) if c <= '\u{1F}' => - return self.error(ControlCharacterInString), - Some(c) => res.push(c), - None => unreachable!() - } - } - } - } - - // Invoked at each iteration, consumes the stream until it has enough - // information to return a JsonEvent. - // Manages an internal state so that parsing can be interrupted and resumed. - // Also keeps track of the position in the logical structure of the json - // stream int the form of a stack that can be queried by the user using the - // stack() method. - fn parse(&mut self) -> JsonEvent { - loop { - // The only paths where the loop can spin a new iteration - // are in the cases ParseArrayComma and ParseObjectComma if ',' - // is parsed. In these cases the state is set to (respectively) - // ParseArray(false) and ParseObject(false), which always return, - // so there is no risk of getting stuck in an infinite loop. - // All other paths return before the end of the loop's iteration. - self.parse_whitespace(); - - match self.state { - ParseStart => { - return self.parse_start(); - } - ParseArray(first) => { - return self.parse_array(first); - } - ParseArrayComma => { - match self.parse_array_comma_or_end() { - Some(evt) => { return evt; } - None => {} - } - } - ParseObject(first) => { - return self.parse_object(first); - } - ParseObjectComma => { - self.stack.pop(); - if self.ch_is(',') { - self.state = ParseObject(false); - self.bump(); - } else { - return self.parse_object_end(); - } - } - _ => { - return self.error_event(InvalidSyntax); - } - } - } - } - - fn parse_start(&mut self) -> JsonEvent { - let val = self.parse_value(); - self.state = match val { - Error(_) => ParseFinished, - ArrayStart => ParseArray(true), - ObjectStart => ParseObject(true), - _ => ParseBeforeFinish, - }; - return val; - } - - fn parse_array(&mut self, first: bool) -> JsonEvent { - if self.ch_is(']') { - if !first { - self.error_event(InvalidSyntax) - } else { - self.state = if self.stack.is_empty() { - ParseBeforeFinish - } else if self.stack.last_is_index() { - ParseArrayComma - } else { - ParseObjectComma - }; - self.bump(); - ArrayEnd - } - } else { - if first { - self.stack.push_index(0); - } - let val = self.parse_value(); - self.state = match val { - Error(_) => ParseFinished, - ArrayStart => ParseArray(true), - ObjectStart => ParseObject(true), - _ => ParseArrayComma, - }; - val - } - } - - fn parse_array_comma_or_end(&mut self) -> Option<JsonEvent> { - if self.ch_is(',') { - self.stack.bump_index(); - self.state = ParseArray(false); - self.bump(); - None - } else if self.ch_is(']') { - self.stack.pop(); - self.state = if self.stack.is_empty() { - ParseBeforeFinish - } else if self.stack.last_is_index() { - ParseArrayComma - } else { - ParseObjectComma - }; - self.bump(); - Some(ArrayEnd) - } else if self.eof() { - Some(self.error_event(EOFWhileParsingArray)) - } else { - Some(self.error_event(InvalidSyntax)) - } - } - - fn parse_object(&mut self, first: bool) -> JsonEvent { - if self.ch_is('}') { - if !first { - if self.stack.is_empty() { - return self.error_event(TrailingComma); - } else { - self.stack.pop(); - } - } - self.state = if self.stack.is_empty() { - ParseBeforeFinish - } else if self.stack.last_is_index() { - ParseArrayComma - } else { - ParseObjectComma - }; - self.bump(); - return ObjectEnd; - } - if self.eof() { - return self.error_event(EOFWhileParsingObject); - } - if !self.ch_is('"') { - return self.error_event(KeyMustBeAString); - } - let s = match self.parse_str() { - Ok(s) => s, - Err(e) => { - self.state = ParseFinished; - return Error(e); - } - }; - self.parse_whitespace(); - if self.eof() { - return self.error_event(EOFWhileParsingObject); - } else if self.ch_or_null() != ':' { - return self.error_event(ExpectedColon); - } - self.stack.push_key(s); - self.bump(); - self.parse_whitespace(); - - let val = self.parse_value(); - - self.state = match val { - Error(_) => ParseFinished, - ArrayStart => ParseArray(true), - ObjectStart => ParseObject(true), - _ => ParseObjectComma, - }; - return val; - } - - fn parse_object_end(&mut self) -> JsonEvent { - if self.ch_is('}') { - self.state = if self.stack.is_empty() { - ParseBeforeFinish - } else if self.stack.last_is_index() { - ParseArrayComma - } else { - ParseObjectComma - }; - self.bump(); - ObjectEnd - } else if self.eof() { - self.error_event(EOFWhileParsingObject) - } else { - self.error_event(InvalidSyntax) - } - } - - fn parse_value(&mut self) -> JsonEvent { - if self.eof() { return self.error_event(EOFWhileParsingValue); } - match self.ch_or_null() { - 'n' => { self.parse_ident("ull", NullValue) } - 't' => { self.parse_ident("rue", BooleanValue(true)) } - 'f' => { self.parse_ident("alse", BooleanValue(false)) } - '0' ... '9' | '-' => self.parse_number(), - '"' => match self.parse_str() { - Ok(s) => StringValue(s), - Err(e) => Error(e), - }, - '[' => { - self.bump(); - ArrayStart - } - '{' => { - self.bump(); - ObjectStart - } - _ => { self.error_event(InvalidSyntax) } - } - } - - fn parse_ident(&mut self, ident: &str, value: JsonEvent) -> JsonEvent { - if ident.chars().all(|c| Some(c) == self.next_char()) { - self.bump(); - value - } else { - Error(SyntaxError(InvalidSyntax, self.line, self.col)) - } - } - - fn error_event(&mut self, reason: ErrorCode) -> JsonEvent { - self.state = ParseFinished; - Error(SyntaxError(reason, self.line, self.col)) - } -} - -/// A Builder consumes a json::Parser to create a generic Json structure. -pub struct Builder<T> { - parser: Parser<T>, - token: Option<JsonEvent>, -} - -impl<T: Iterator<Item = char>> Builder<T> { - /// Create a JSON Builder. - pub fn new(src: T) -> Builder<T> { - Builder { parser: Parser::new(src), token: None, } - } - - // Decode a Json value from a Parser. - pub fn build(&mut self) -> Result<Json, BuilderError> { - self.bump(); - let result = self.build_value(); - self.bump(); - match self.token.take() { - None => {} - Some(Error(e)) => { return Err(e); } - _ => { return Err(SyntaxError(InvalidSyntax, self.parser.line, self.parser.col)); } - } - result - } - - fn bump(&mut self) { - self.token = self.parser.next(); - } - - fn build_value(&mut self) -> Result<Json, BuilderError> { - return match self.token.take() { - Some(NullValue) => Ok(Json::Null), - Some(I64Value(n)) => Ok(Json::I64(n)), - Some(U64Value(n)) => Ok(Json::U64(n)), - Some(F64Value(n)) => Ok(Json::F64(n)), - Some(BooleanValue(b)) => Ok(Json::Boolean(b)), - Some(StringValue(ref mut s)) => { - let mut temp = string::String::new(); - swap(s, &mut temp); - Ok(Json::String(temp)) - } - Some(Error(e)) => Err(e), - Some(ArrayStart) => self.build_array(), - Some(ObjectStart) => self.build_object(), - Some(ObjectEnd) => self.parser.error(InvalidSyntax), - Some(ArrayEnd) => self.parser.error(InvalidSyntax), - None => self.parser.error(EOFWhileParsingValue), - } - } - - fn build_array(&mut self) -> Result<Json, BuilderError> { - self.bump(); - let mut values = Vec::new(); - - loop { - if let Some(ArrayEnd) = self.token { - return Ok(Json::Array(values.into_iter().collect())); - } - match self.build_value() { - Ok(v) => values.push(v), - Err(e) => { return Err(e) } - } - self.bump(); - } - } - - fn build_object(&mut self) -> Result<Json, BuilderError> { - self.bump(); - - let mut values = BTreeMap::new(); - - loop { - match self.token.take() { - Some(ObjectEnd) => { return Ok(Json::Object(values)); } - Some(Error(e)) => { return Err(e); } - None => { break; } - token => { self.token = token; } - } - let key = match self.parser.stack().top() { - Some(StackElement::Key(k)) => { k.to_string() } - _ => { panic!("invalid state"); } - }; - match self.build_value() { - Ok(value) => { values.insert(key, value); } - Err(e) => { return Err(e); } - } - self.bump(); - } - return self.parser.error(EOFWhileParsingObject); - } -} - -/// A structure to decode JSON to values in rust. -pub struct Decoder { - stack: Vec<Json>, -} - -impl Decoder { - /// Creates a new decoder instance for decoding the specified JSON value. - pub fn new(json: Json) -> Decoder { - Decoder { stack: vec![json] } - } -} - -impl Decoder { - fn pop(&mut self) -> DecodeResult<Json> { - match self.stack.pop() { - Some(s) => Ok(s), - None => Err(EOF), - } - } -} - -macro_rules! expect { - ($e:expr, Null) => ({ - match try!($e) { - Json::Null => Ok(()), - other => Err(ExpectedError("Null".to_string(), - format!("{}", other))) - } - }); - ($e:expr, $t:ident) => ({ - match try!($e) { - Json::$t(v) => Ok(v), - other => { - Err(ExpectedError(stringify!($t).to_string(), - format!("{}", other))) - } - } - }) -} - -macro_rules! read_primitive { - ($name:ident, $ty:ident) => { - #[allow(unused_comparisons)] - fn $name(&mut self) -> DecodeResult<$ty> { - match try!(self.pop()) { - Json::I64(i) => { - let other = i as $ty; - if i == other as i64 && (other > 0) == (i > 0) { - Ok(other) - } else { - Err(ExpectedError("Number".to_string(), i.to_string())) - } - } - Json::U64(u) => { - let other = u as $ty; - if u == other as u64 && other >= 0 { - Ok(other) - } else { - Err(ExpectedError("Number".to_string(), u.to_string())) - } - } - Json::F64(f) => { - Err(ExpectedError("Integer".to_string(), f.to_string())) - } - // re: #12967.. a type w/ numeric keys (ie HashMap<usize, V> etc) - // is going to have a string here, as per JSON spec. - Json::String(s) => match s.parse() { - Ok(f) => Ok(f), - Err(_) => Err(ExpectedError("Number".to_string(), s)), - }, - value => { - Err(ExpectedError("Number".to_string(), value.to_string())) - } - } - } - } -} - -impl ::Decoder for Decoder { - type Error = DecoderError; - - fn read_nil(&mut self) -> DecodeResult<()> { - expect!(self.pop(), Null) - } - - read_primitive! { read_usize, usize } - read_primitive! { read_u8, u8 } - read_primitive! { read_u16, u16 } - read_primitive! { read_u32, u32 } - read_primitive! { read_u64, u64 } - read_primitive! { read_isize, isize } - read_primitive! { read_i8, i8 } - read_primitive! { read_i16, i16 } - read_primitive! { read_i32, i32 } - read_primitive! { read_i64, i64 } - - fn read_f32(&mut self) -> DecodeResult<f32> { - self.read_f64().map(|x| x as f32) - } - - fn read_f64(&mut self) -> DecodeResult<f64> { - match try!(self.pop()) { - Json::I64(f) => Ok(f as f64), - Json::U64(f) => Ok(f as f64), - Json::F64(f) => Ok(f), - Json::String(s) => { - // re: #12967.. a type w/ numeric keys (ie HashMap<usize, V> etc) - // is going to have a string here, as per JSON spec. - match s.parse() { - Ok(f) => Ok(f), - Err(_) => Err(ExpectedError("Number".to_string(), s)), - } - }, - Json::Null => Ok(f64::NAN), - value => Err(ExpectedError("Number".to_string(), format!("{}", value))) - } - } - - fn read_bool(&mut self) -> DecodeResult<bool> { - expect!(self.pop(), Boolean) - } - - fn read_char(&mut self) -> DecodeResult<char> { - let s = try!(self.read_str()); - { - let mut it = s.chars(); - match (it.next(), it.next()) { - // exactly one character - (Some(c), None) => return Ok(c), - _ => () - } - } - Err(ExpectedError("single character string".to_string(), format!("{}", s))) - } - - fn read_str(&mut self) -> DecodeResult<string::String> { - expect!(self.pop(), String) - } - - fn read_enum<T, F>(&mut self, _name: &str, f: F) -> DecodeResult<T> where - F: FnOnce(&mut Decoder) -> DecodeResult<T>, - { - f(self) - } - - fn read_enum_variant<T, F>(&mut self, names: &[&str], - mut f: F) -> DecodeResult<T> - where F: FnMut(&mut Decoder, usize) -> DecodeResult<T>, - { - let name = match try!(self.pop()) { - Json::String(s) => s, - Json::Object(mut o) => { - let n = match o.remove(&"variant".to_string()) { - Some(Json::String(s)) => s, - Some(val) => { - return Err(ExpectedError("String".to_string(), format!("{}", val))) - } - None => { - return Err(MissingFieldError("variant".to_string())) - } - }; - match o.remove(&"fields".to_string()) { - Some(Json::Array(l)) => { - for field in l.into_iter().rev() { - self.stack.push(field); - } - }, - Some(val) => { - return Err(ExpectedError("Array".to_string(), format!("{}", val))) - } - None => { - return Err(MissingFieldError("fields".to_string())) - } - } - n - } - json => { - return Err(ExpectedError("String or Object".to_string(), format!("{}", json))) - } - }; - let idx = match names.iter().position(|n| *n == name) { - Some(idx) => idx, - None => return Err(UnknownVariantError(name)) - }; - f(self, idx) - } - - fn read_enum_variant_arg<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where - F: FnOnce(&mut Decoder) -> DecodeResult<T>, - { - f(self) - } - - fn read_enum_struct_variant<T, F>(&mut self, names: &[&str], f: F) -> DecodeResult<T> where - F: FnMut(&mut Decoder, usize) -> DecodeResult<T>, - { - self.read_enum_variant(names, f) - } - - - fn read_enum_struct_variant_field<T, F>(&mut self, - _name: &str, - idx: usize, - f: F) - -> DecodeResult<T> where - F: FnOnce(&mut Decoder) -> DecodeResult<T>, - { - self.read_enum_variant_arg(idx, f) - } - - fn read_struct<T, F>(&mut self, _name: &str, _len: usize, f: F) -> DecodeResult<T> where - F: FnOnce(&mut Decoder) -> DecodeResult<T>, - { - let value = try!(f(self)); - try!(self.pop()); - Ok(value) - } - - fn read_struct_field<T, F>(&mut self, - name: &str, - _idx: usize, - f: F) - -> DecodeResult<T> where - F: FnOnce(&mut Decoder) -> DecodeResult<T>, - { - let mut obj = try!(expect!(self.pop(), Object)); - - let value = match obj.remove(&name.to_string()) { - None => { - // Add a Null and try to parse it as an Option<_> - // to get None as a default value. - self.stack.push(Json::Null); - match f(self) { - Ok(x) => x, - Err(_) => return Err(MissingFieldError(name.to_string())), - } - }, - Some(json) => { - self.stack.push(json); - try!(f(self)) - } - }; - self.stack.push(Json::Object(obj)); - Ok(value) - } - - fn read_tuple<T, F>(&mut self, tuple_len: usize, f: F) -> DecodeResult<T> where - F: FnOnce(&mut Decoder) -> DecodeResult<T>, - { - self.read_seq(move |d, len| { - if len == tuple_len { - f(d) - } else { - Err(ExpectedError(format!("Tuple{}", tuple_len), format!("Tuple{}", len))) - } - }) - } - - fn read_tuple_arg<T, F>(&mut self, idx: usize, f: F) -> DecodeResult<T> where - F: FnOnce(&mut Decoder) -> DecodeResult<T>, - { - self.read_seq_elt(idx, f) - } - - fn read_tuple_struct<T, F>(&mut self, - _name: &str, - len: usize, - f: F) - -> DecodeResult<T> where - F: FnOnce(&mut Decoder) -> DecodeResult<T>, - { - self.read_tuple(len, f) - } - - fn read_tuple_struct_arg<T, F>(&mut self, - idx: usize, - f: F) - -> DecodeResult<T> where - F: FnOnce(&mut Decoder) -> DecodeResult<T>, - { - self.read_tuple_arg(idx, f) - } - - fn read_option<T, F>(&mut self, mut f: F) -> DecodeResult<T> where - F: FnMut(&mut Decoder, bool) -> DecodeResult<T>, - { - match try!(self.pop()) { - Json::Null => f(self, false), - value => { self.stack.push(value); f(self, true) } - } - } - - fn read_seq<T, F>(&mut self, f: F) -> DecodeResult<T> where - F: FnOnce(&mut Decoder, usize) -> DecodeResult<T>, - { - let array = try!(expect!(self.pop(), Array)); - let len = array.len(); - for v in array.into_iter().rev() { - self.stack.push(v); - } - f(self, len) - } - - fn read_seq_elt<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where - F: FnOnce(&mut Decoder) -> DecodeResult<T>, - { - f(self) - } - - fn read_map<T, F>(&mut self, f: F) -> DecodeResult<T> where - F: FnOnce(&mut Decoder, usize) -> DecodeResult<T>, - { - let obj = try!(expect!(self.pop(), Object)); - let len = obj.len(); - for (key, value) in obj.into_iter() { - self.stack.push(value); - self.stack.push(Json::String(key)); - } - f(self, len) - } - - fn read_map_elt_key<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where - F: FnOnce(&mut Decoder) -> DecodeResult<T>, - { - f(self) - } - - fn read_map_elt_val<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where - F: FnOnce(&mut Decoder) -> DecodeResult<T>, - { - f(self) - } - - fn error(&mut self, err: &str) -> DecoderError { - ApplicationError(err.to_string()) - } -} - -/// A trait for converting values to JSON -pub trait ToJson { - /// Converts the value of `self` to an instance of JSON - fn to_json(&self) -> Json; -} - -macro_rules! to_json_impl_i64 { - ($($t:ty), +) => ( - $(impl ToJson for $t { - fn to_json(&self) -> Json { Json::I64(*self as i64) } - })+ - ) -} - -to_json_impl_i64! { isize, i8, i16, i32, i64 } - -macro_rules! to_json_impl_u64 { - ($($t:ty), +) => ( - $(impl ToJson for $t { - fn to_json(&self) -> Json { Json::U64(*self as u64) } - })+ - ) -} - -to_json_impl_u64! { usize, u8, u16, u32, u64 } - -impl ToJson for Json { - fn to_json(&self) -> Json { self.clone() } -} - -impl ToJson for f32 { - fn to_json(&self) -> Json { (*self as f64).to_json() } -} - -impl ToJson for f64 { - fn to_json(&self) -> Json { - use std::num::FpCategory::{Nan, Infinite}; - - match self.classify() { - Nan | Infinite => Json::Null, - _ => Json::F64(*self) - } - } -} - -impl ToJson for () { - fn to_json(&self) -> Json { Json::Null } -} - -impl ToJson for bool { - fn to_json(&self) -> Json { Json::Boolean(*self) } -} - -impl ToJson for str { - fn to_json(&self) -> Json { Json::String(self.to_string()) } -} - -impl ToJson for string::String { - fn to_json(&self) -> Json { Json::String((*self).clone()) } -} - -macro_rules! tuple_impl { - // use variables to indicate the arity of the tuple - ($($tyvar:ident),* ) => { - // the trailing commas are for the 1 tuple - impl< - $( $tyvar : ToJson ),* - > ToJson for ( $( $tyvar ),* , ) { - - #[inline] - #[allow(non_snake_case)] - fn to_json(&self) -> Json { - match *self { - ($(ref $tyvar),*,) => Json::Array(vec![$($tyvar.to_json()),*]) - } - } - } - } -} - -tuple_impl!{A} -tuple_impl!{A, B} -tuple_impl!{A, B, C} -tuple_impl!{A, B, C, D} -tuple_impl!{A, B, C, D, E} -tuple_impl!{A, B, C, D, E, F} -tuple_impl!{A, B, C, D, E, F, G} -tuple_impl!{A, B, C, D, E, F, G, H} -tuple_impl!{A, B, C, D, E, F, G, H, I} -tuple_impl!{A, B, C, D, E, F, G, H, I, J} -tuple_impl!{A, B, C, D, E, F, G, H, I, J, K} -tuple_impl!{A, B, C, D, E, F, G, H, I, J, K, L} - -impl<A: ToJson> ToJson for [A] { - fn to_json(&self) -> Json { Json::Array(self.iter().map(|elt| elt.to_json()).collect()) } -} - -impl<A: ToJson> ToJson for Vec<A> { - fn to_json(&self) -> Json { Json::Array(self.iter().map(|elt| elt.to_json()).collect()) } -} - -impl<A: ToJson> ToJson for BTreeMap<string::String, A> { - fn to_json(&self) -> Json { - let mut d = BTreeMap::new(); - for (key, value) in self.iter() { - d.insert((*key).clone(), value.to_json()); - } - Json::Object(d) - } -} - -impl<A: ToJson> ToJson for HashMap<string::String, A> { - fn to_json(&self) -> Json { - let mut d = BTreeMap::new(); - for (key, value) in self.iter() { - d.insert((*key).clone(), value.to_json()); - } - Json::Object(d) - } -} - -impl<A:ToJson> ToJson for Option<A> { - fn to_json(&self) -> Json { - match *self { - None => Json::Null, - Some(ref value) => value.to_json() - } - } -} - -struct FormatShim<'a, 'b: 'a> { - inner: &'a mut fmt::Formatter<'b>, -} - -impl<'a, 'b> fmt::Write for FormatShim<'a, 'b> { - fn write_str(&mut self, s: &str) -> fmt::Result { - match self.inner.write_str(s) { - Ok(_) => Ok(()), - Err(_) => Err(fmt::Error) - } - } -} - -impl fmt::Display for Json { - /// Encodes a json value into a string - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let mut shim = FormatShim { inner: f }; - let mut encoder = Encoder::new(&mut shim); - match self.encode(&mut encoder) { - Ok(_) => Ok(()), - Err(_) => Err(fmt::Error) - } - } -} - -impl<'a> fmt::Display for PrettyJson<'a> { - /// Encodes a json value into a string - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let mut shim = FormatShim { inner: f }; - let mut encoder = Encoder::new_pretty(&mut shim); - match self.inner.encode(&mut encoder) { - Ok(_) => Ok(()), - Err(_) => Err(fmt::Error) - } - } -} - -impl<'a, T: Encodable> fmt::Display for AsJson<'a, T> { - /// Encodes a json value into a string - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let mut shim = FormatShim { inner: f }; - let mut encoder = Encoder::new(&mut shim); - match self.inner.encode(&mut encoder) { - Ok(_) => Ok(()), - Err(_) => Err(fmt::Error) - } - } -} - -impl<'a, T> AsPrettyJson<'a, T> { - /// Set the indentation level for the emitted JSON - pub fn indent(mut self, indent: u32) -> AsPrettyJson<'a, T> { - self.indent = Some(indent); - self - } -} - -impl<'a, T: Encodable> fmt::Display for AsPrettyJson<'a, T> { - /// Encodes a json value into a string - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let mut shim = FormatShim { inner: f }; - let mut encoder = Encoder::new_pretty(&mut shim); - if let Some(n) = self.indent { - // unwrap cannot panic for pretty encoders - let _ = encoder.set_indent(n); - } - match self.inner.encode(&mut encoder) { - Ok(_) => Ok(()), - Err(_) => Err(fmt::Error) - } - } -} - -impl FromStr for Json { - type Err = ParserError; - fn from_str(s: &str) -> Result<Json, ParserError> { - Json::from_str(s) - } -} - -#[cfg(test)] -mod tests { - use self::Animal::*; - use {Encodable, Decodable}; - use super::Json::*; - use super::ErrorCode::*; - use super::ParserError::*; - use super::DecoderError::*; - use super::JsonEvent::*; - use super::StackElement::*; - use super::{Json, DecodeResult, DecoderError, JsonEvent, Parser, - StackElement, Stack, Decoder, Encoder, EncoderError}; - use std::{i64, u64, f32, f64}; - use std::collections::BTreeMap; - use std::string; - - #[derive(RustcDecodable, Eq, PartialEq, Debug)] - struct OptionData { - opt: Option<usize>, - } - - #[test] - fn test_decode_option_none() { - let s ="{}"; - let obj: OptionData = super::decode(s).unwrap(); - assert_eq!(obj, OptionData { opt: None }); - } - - #[test] - fn test_decode_option_some() { - let s = "{ \"opt\": 10 }"; - let obj: OptionData = super::decode(s).unwrap(); - assert_eq!(obj, OptionData { opt: Some(10) }); - } - - #[test] - fn test_decode_option_malformed() { - check_err::<OptionData>("{ \"opt\": [] }", - ExpectedError("Number".to_string(), "[]".to_string())); - check_err::<OptionData>("{ \"opt\": false }", - ExpectedError("Number".to_string(), "false".to_string())); - } - - #[derive(PartialEq, RustcEncodable, RustcDecodable, Debug)] - enum Animal { - Dog, - Frog(string::String, isize) - } - - #[derive(PartialEq, RustcEncodable, RustcDecodable, Debug)] - struct Inner { - a: (), - b: usize, - c: Vec<string::String>, - } - - #[derive(PartialEq, RustcEncodable, RustcDecodable, Debug)] - struct Outer { - inner: Vec<Inner>, - } - - fn mk_object(items: &[(string::String, Json)]) -> Json { - let mut d = BTreeMap::new(); - - for item in items.iter() { - match *item { - (ref key, ref value) => { d.insert((*key).clone(), (*value).clone()); }, - } - }; - - Object(d) - } - - #[test] - fn test_from_str_trait() { - let s = "null"; - assert!(s.parse::<Json>().unwrap() == s.parse().unwrap()); - } - - #[test] - fn test_write_null() { - assert_eq!(Null.to_string(), "null"); - assert_eq!(Null.pretty().to_string(), "null"); - } - - #[test] - fn test_write_i64() { - assert_eq!(U64(0).to_string(), "0"); - assert_eq!(U64(0).pretty().to_string(), "0"); - - assert_eq!(U64(1234).to_string(), "1234"); - assert_eq!(U64(1234).pretty().to_string(), "1234"); - - assert_eq!(I64(-5678).to_string(), "-5678"); - assert_eq!(I64(-5678).pretty().to_string(), "-5678"); - - assert_eq!(U64(7650007200025252000).to_string(), "7650007200025252000"); - assert_eq!(U64(7650007200025252000).pretty().to_string(), "7650007200025252000"); - } - - #[test] - fn test_write_f64() { - assert_eq!(F64(3.0).to_string(), "3.0"); - assert_eq!(F64(3.0).pretty().to_string(), "3.0"); - - assert_eq!(F64(3.1).to_string(), "3.1"); - assert_eq!(F64(3.1).pretty().to_string(), "3.1"); - - assert_eq!(F64(-1.5).to_string(), "-1.5"); - assert_eq!(F64(-1.5).pretty().to_string(), "-1.5"); - - assert_eq!(F64(0.5).to_string(), "0.5"); - assert_eq!(F64(0.5).pretty().to_string(), "0.5"); - - assert_eq!(F64(f64::NAN).to_string(), "null"); - assert_eq!(F64(f64::NAN).pretty().to_string(), "null"); - - assert_eq!(F64(f64::INFINITY).to_string(), "null"); - assert_eq!(F64(f64::INFINITY).pretty().to_string(), "null"); - - assert_eq!(F64(f64::NEG_INFINITY).to_string(), "null"); - assert_eq!(F64(f64::NEG_INFINITY).pretty().to_string(), "null"); - } - - #[test] - fn test_write_str() { - assert_eq!(String("".to_string()).to_string(), "\"\""); - assert_eq!(String("".to_string()).pretty().to_string(), "\"\""); - - assert_eq!(String("homura".to_string()).to_string(), "\"homura\""); - assert_eq!(String("madoka".to_string()).pretty().to_string(), "\"madoka\""); - } - - #[test] - fn test_write_bool() { - assert_eq!(Boolean(true).to_string(), "true"); - assert_eq!(Boolean(true).pretty().to_string(), "true"); - - assert_eq!(Boolean(false).to_string(), "false"); - assert_eq!(Boolean(false).pretty().to_string(), "false"); - } - - #[test] - fn test_write_array() { - assert_eq!(Array(vec![]).to_string(), "[]"); - assert_eq!(Array(vec![]).pretty().to_string(), "[]"); - - assert_eq!(Array(vec![Boolean(true)]).to_string(), "[true]"); - assert_eq!( - Array(vec![Boolean(true)]).pretty().to_string(), - "\ - [\n \ - true\n\ - ]" - ); - - let long_test_array = Array(vec![ - Boolean(false), - Null, - Array(vec![String("foo\nbar".to_string()), F64(3.5)])]); - - assert_eq!(long_test_array.to_string(), - "[false,null,[\"foo\\nbar\",3.5]]"); - assert_eq!( - long_test_array.pretty().to_string(), - "\ - [\n \ - false,\n \ - null,\n \ - [\n \ - \"foo\\nbar\",\n \ - 3.5\n \ - ]\n\ - ]" - ); - } - - #[test] - fn test_write_object() { - assert_eq!(mk_object(&[]).to_string(), "{}"); - assert_eq!(mk_object(&[]).pretty().to_string(), "{}"); - - assert_eq!( - mk_object(&[ - ("a".to_string(), Boolean(true)) - ]).to_string(), - "{\"a\":true}" - ); - assert_eq!( - mk_object(&[("a".to_string(), Boolean(true))]).pretty().to_string(), - "\ - {\n \ - \"a\": true\n\ - }" - ); - - let complex_obj = mk_object(&[ - ("b".to_string(), Array(vec![ - mk_object(&[("c".to_string(), String("\x0c\r".to_string()))]), - mk_object(&[("d".to_string(), String("".to_string()))]) - ])) - ]); - - assert_eq!( - complex_obj.to_string(), - "{\ - \"b\":[\ - {\"c\":\"\\f\\r\"},\ - {\"d\":\"\"}\ - ]\ - }" - ); - assert_eq!( - complex_obj.pretty().to_string(), - "\ - {\n \ - \"b\": [\n \ - {\n \ - \"c\": \"\\f\\r\"\n \ - },\n \ - {\n \ - \"d\": \"\"\n \ - }\n \ - ]\n\ - }" - ); - - let a = mk_object(&[ - ("a".to_string(), Boolean(true)), - ("b".to_string(), Array(vec![ - mk_object(&[("c".to_string(), String("\x0c\r".to_string()))]), - mk_object(&[("d".to_string(), String("".to_string()))]) - ])) - ]); - - // We can't compare the strings directly because the object fields be - // printed in a different order. - assert_eq!(a.clone(), a.to_string().parse().unwrap()); - assert_eq!(a.clone(), a.pretty().to_string().parse().unwrap()); - } - - #[test] - fn test_write_enum() { - let animal = Dog; - assert_eq!( - format!("{}", super::as_json(&animal)), - "\"Dog\"" - ); - assert_eq!( - format!("{}", super::as_pretty_json(&animal)), - "\"Dog\"" - ); - - let animal = Frog("Henry".to_string(), 349); - assert_eq!( - format!("{}", super::as_json(&animal)), - "{\"variant\":\"Frog\",\"fields\":[\"Henry\",349]}" - ); - assert_eq!( - format!("{}", super::as_pretty_json(&animal)), - "{\n \ - \"variant\": \"Frog\",\n \ - \"fields\": [\n \ - \"Henry\",\n \ - 349\n \ - ]\n\ - }" - ); - } - - macro_rules! check_encoder_for_simple { - ($value:expr, $expected:expr) => ({ - let s = format!("{}", super::as_json(&$value)); - assert_eq!(s, $expected); - - let s = format!("{}", super::as_pretty_json(&$value)); - assert_eq!(s, $expected); - }) - } - - #[test] - fn test_write_some() { - check_encoder_for_simple!(Some("jodhpurs".to_string()), "\"jodhpurs\""); - } - - #[test] - fn test_write_none() { - check_encoder_for_simple!(None::<string::String>, "null"); - } - - #[test] - fn test_write_char() { - check_encoder_for_simple!('a', "\"a\""); - check_encoder_for_simple!('\t', "\"\\t\""); - check_encoder_for_simple!('\u{0000}', "\"\\u0000\""); - check_encoder_for_simple!('\u{001b}', "\"\\u001b\""); - check_encoder_for_simple!('\u{007f}', "\"\\u007f\""); - check_encoder_for_simple!('\u{00a0}', "\"\u{00a0}\""); - check_encoder_for_simple!('\u{abcd}', "\"\u{abcd}\""); - check_encoder_for_simple!('\u{10ffff}', "\"\u{10ffff}\""); - } - - #[test] - fn test_trailing_characters() { - assert_eq!(Json::from_str("nulla"), Err(SyntaxError(TrailingCharacters, 1, 5))); - assert_eq!(Json::from_str("truea"), Err(SyntaxError(TrailingCharacters, 1, 5))); - assert_eq!(Json::from_str("falsea"), Err(SyntaxError(TrailingCharacters, 1, 6))); - assert_eq!(Json::from_str("1a"), Err(SyntaxError(TrailingCharacters, 1, 2))); - assert_eq!(Json::from_str("[]a"), Err(SyntaxError(TrailingCharacters, 1, 3))); - assert_eq!(Json::from_str("{}a"), Err(SyntaxError(TrailingCharacters, 1, 3))); - } - - #[test] - fn test_read_identifiers() { - assert_eq!(Json::from_str("n"), Err(SyntaxError(InvalidSyntax, 1, 2))); - assert_eq!(Json::from_str("nul"), Err(SyntaxError(InvalidSyntax, 1, 4))); - assert_eq!(Json::from_str("t"), Err(SyntaxError(InvalidSyntax, 1, 2))); - assert_eq!(Json::from_str("truz"), Err(SyntaxError(InvalidSyntax, 1, 4))); - assert_eq!(Json::from_str("f"), Err(SyntaxError(InvalidSyntax, 1, 2))); - assert_eq!(Json::from_str("faz"), Err(SyntaxError(InvalidSyntax, 1, 3))); - - assert_eq!(Json::from_str("null"), Ok(Null)); - assert_eq!(Json::from_str("true"), Ok(Boolean(true))); - assert_eq!(Json::from_str("false"), Ok(Boolean(false))); - assert_eq!(Json::from_str(" null "), Ok(Null)); - assert_eq!(Json::from_str(" true "), Ok(Boolean(true))); - assert_eq!(Json::from_str(" false "), Ok(Boolean(false))); - } - - #[test] - fn test_decode_identifiers() { - let v: () = super::decode("null").unwrap(); - assert_eq!(v, ()); - - let v: bool = super::decode("true").unwrap(); - assert_eq!(v, true); - - let v: bool = super::decode("false").unwrap(); - assert_eq!(v, false); - } - - #[test] - fn test_read_number() { - assert_eq!(Json::from_str("+"), Err(SyntaxError(InvalidSyntax, 1, 1))); - assert_eq!(Json::from_str("."), Err(SyntaxError(InvalidSyntax, 1, 1))); - assert_eq!(Json::from_str("NaN"), Err(SyntaxError(InvalidSyntax, 1, 1))); - assert_eq!(Json::from_str("-"), Err(SyntaxError(InvalidNumber, 1, 2))); - assert_eq!(Json::from_str("00"), Err(SyntaxError(InvalidNumber, 1, 2))); - assert_eq!(Json::from_str("1."), Err(SyntaxError(InvalidNumber, 1, 3))); - assert_eq!(Json::from_str("1e"), Err(SyntaxError(InvalidNumber, 1, 3))); - assert_eq!(Json::from_str("1e+"), Err(SyntaxError(InvalidNumber, 1, 4))); - - assert_eq!(Json::from_str("18446744073709551616"), Err(SyntaxError(InvalidNumber, 1, 20))); - assert_eq!(Json::from_str("18446744073709551617"), Err(SyntaxError(InvalidNumber, 1, 20))); - assert_eq!(Json::from_str("-9223372036854775809"), Err(SyntaxError(InvalidNumber, 1, 21))); - - assert_eq!(Json::from_str("3"), Ok(U64(3))); - assert_eq!(Json::from_str("3.1"), Ok(F64(3.1))); - assert_eq!(Json::from_str("-1.2"), Ok(F64(-1.2))); - assert_eq!(Json::from_str("0.4"), Ok(F64(0.4))); - assert_eq!(Json::from_str("0.4e5"), Ok(F64(0.4e5))); - assert_eq!(Json::from_str("0.4e+15"), Ok(F64(0.4e15))); - assert_eq!(Json::from_str("0.4e-01"), Ok(F64(0.4e-01))); - assert_eq!(Json::from_str("123456789.5024"), Ok(F64(123456789.5024))); - assert_eq!(Json::from_str(" 3 "), Ok(U64(3))); - - assert_eq!(Json::from_str("-9223372036854775808"), Ok(I64(i64::MIN))); - assert_eq!(Json::from_str("9223372036854775807"), Ok(U64(i64::MAX as u64))); - assert_eq!(Json::from_str("18446744073709551615"), Ok(U64(u64::MAX))); - } - - #[test] - fn test_decode_numbers() { - let v: f64 = super::decode("3").unwrap(); - assert_eq!(v, 3.0); - - let v: f64 = super::decode("3.1").unwrap(); - assert_eq!(v, 3.1); - - let v: f64 = super::decode("-1.2").unwrap(); - assert_eq!(v, -1.2); - - let v: f64 = super::decode("0.4").unwrap(); - assert_eq!(v, 0.4); - - let v: f64 = super::decode("0.4e5").unwrap(); - assert_eq!(v, 0.4e5); - - let v: f64 = super::decode("0.4e15").unwrap(); - assert_eq!(v, 0.4e15); - - let v: f64 = super::decode("0.4e-01").unwrap(); - assert_eq!(v, 0.4e-01); - - let v: f64 = super::decode("123456789.5024").unwrap(); - assert_eq!(v, 123456789.5024); - - let v: u64 = super::decode("0").unwrap(); - assert_eq!(v, 0); - - let v: u64 = super::decode("18446744073709551615").unwrap(); - assert_eq!(v, u64::MAX); - - let v: i64 = super::decode("-9223372036854775808").unwrap(); - assert_eq!(v, i64::MIN); - - let v: i64 = super::decode("9223372036854775807").unwrap(); - assert_eq!(v, i64::MAX); - - let res: DecodeResult<i64> = super::decode("765.25252"); - match res { - Ok(..) => panic!("expected an error"), - Err(ExpectedError(ref s, _)) => assert_eq!(s, "Integer"), - Err(..) => panic!("expected an 'expected integer' error"), - } - } - - #[test] - fn test_read_str() { - assert_eq!(Json::from_str("\""), Err(SyntaxError(EOFWhileParsingString, 1, 2))); - assert_eq!(Json::from_str("\"lol"), Err(SyntaxError(EOFWhileParsingString, 1, 5))); - assert_eq!(Json::from_str("\"\n\""), Err(SyntaxError(ControlCharacterInString, 2, 1))); - assert_eq!(Json::from_str("\"\0\""), Err(SyntaxError(ControlCharacterInString, 1, 2))); - assert_eq!(Json::from_str("\"\u{1}\""), Err(SyntaxError(ControlCharacterInString, 1, 2))); - assert_eq!(Json::from_str("\"\u{1F}\""), Err(SyntaxError(ControlCharacterInString, 1, 2))); - - // Only C0 control characters are excluded. - assert!('\u{7F}'.is_control()); - assert!('\u{80}'.is_control()); - assert!('\u{9F}'.is_control()); - let c1_controls = "\u{7F}\u{80}\u{9F}".to_string(); - assert_eq!(Json::from_str(&format!("\"{}\"", c1_controls)), Ok(String(c1_controls))); - - assert_eq!(Json::from_str("\"\""), Ok(String("".to_string()))); - assert_eq!(Json::from_str("\"foo\""), Ok(String("foo".to_string()))); - assert_eq!(Json::from_str("\"\\\"\""), Ok(String("\"".to_string()))); - assert_eq!(Json::from_str("\"\\b\""), Ok(String("\x08".to_string()))); - assert_eq!(Json::from_str("\"\\n\""), Ok(String("\n".to_string()))); - assert_eq!(Json::from_str("\"\\r\""), Ok(String("\r".to_string()))); - assert_eq!(Json::from_str("\"\\t\""), Ok(String("\t".to_string()))); - assert_eq!(Json::from_str(" \"foo\" "), Ok(String("foo".to_string()))); - assert_eq!(Json::from_str("\"\\u12ab\""), Ok(String("\u{12ab}".to_string()))); - assert_eq!(Json::from_str("\"\\uAB12\""), Ok(String("\u{AB12}".to_string()))); - } - - #[test] - fn test_decode_str() { - let s = [("\"\"", ""), - ("\"foo\"", "foo"), - ("\"\\\"\"", "\""), - ("\"\\b\"", "\x08"), - ("\"\\n\"", "\n"), - ("\"\\r\"", "\r"), - ("\"\\t\"", "\t"), - ("\"\\u12ab\"", "\u{12ab}"), - ("\"\\uAB12\"", "\u{AB12}")]; - - for &(i, o) in s.iter() { - let v: string::String = super::decode(i).unwrap(); - assert_eq!(v, o); - } - } - - #[test] - fn test_read_array() { - assert_eq!(Json::from_str("["), Err(SyntaxError(EOFWhileParsingValue, 1, 2))); - assert_eq!(Json::from_str("[1"), Err(SyntaxError(EOFWhileParsingArray, 1, 3))); - assert_eq!(Json::from_str("[1,"), Err(SyntaxError(EOFWhileParsingValue, 1, 4))); - assert_eq!(Json::from_str("[1,]"), Err(SyntaxError(InvalidSyntax, 1, 4))); - assert_eq!(Json::from_str("[6 7]"), Err(SyntaxError(InvalidSyntax, 1, 4))); - - assert_eq!(Json::from_str("[]"), Ok(Array(vec![]))); - assert_eq!(Json::from_str("[ ]"), Ok(Array(vec![]))); - assert_eq!(Json::from_str("[true]"), Ok(Array(vec![Boolean(true)]))); - assert_eq!(Json::from_str("[ false ]"), Ok(Array(vec![Boolean(false)]))); - assert_eq!(Json::from_str("[null]"), Ok(Array(vec![Null]))); - assert_eq!(Json::from_str("[3, 1]"), - Ok(Array(vec![U64(3), U64(1)]))); - assert_eq!(Json::from_str("\n[3, 2]\n"), - Ok(Array(vec![U64(3), U64(2)]))); - assert_eq!(Json::from_str("[2, [4, 1]]"), - Ok(Array(vec![U64(2), Array(vec![U64(4), U64(1)])]))); - } - - #[test] - fn test_decode_array() { - let v: Vec<()> = super::decode("[]").unwrap(); - assert_eq!(v, vec![]); - - let v: Vec<()> = super::decode("[null]").unwrap(); - assert_eq!(v, vec![()]); - - let v: Vec<bool> = super::decode("[true]").unwrap(); - assert_eq!(v, vec![true]); - - let v: Vec<isize> = super::decode("[3, 1]").unwrap(); - assert_eq!(v, vec![3, 1]); - - let v: Vec<Vec<usize>> = super::decode("[[3], [1, 2]]").unwrap(); - assert_eq!(v, vec![vec![3], vec![1, 2]]); - } - - #[test] - fn test_decode_tuple() { - let t: (usize, usize, usize) = super::decode("[1, 2, 3]").unwrap(); - assert_eq!(t, (1, 2, 3)); - - let t: (usize, string::String) = super::decode("[1, \"two\"]").unwrap(); - assert_eq!(t, (1, "two".to_string())); - } - - #[test] - fn test_decode_tuple_malformed_types() { - assert!(super::decode::<(usize, string::String)>("[1, 2]").is_err()); - } - - #[test] - fn test_decode_tuple_malformed_length() { - assert!(super::decode::<(usize, usize)>("[1, 2, 3]").is_err()); - } - - #[test] - fn test_read_object() { - assert_eq!(Json::from_str("{"), Err(SyntaxError(EOFWhileParsingObject, 1, 2))); - assert_eq!(Json::from_str("{ "), Err(SyntaxError(EOFWhileParsingObject, 1, 3))); - assert_eq!(Json::from_str("{1"), Err(SyntaxError(KeyMustBeAString, 1, 2))); - assert_eq!(Json::from_str("{ \"a\""), Err(SyntaxError(EOFWhileParsingObject, 1, 6))); - assert_eq!(Json::from_str("{\"a\""), Err(SyntaxError(EOFWhileParsingObject, 1, 5))); - assert_eq!(Json::from_str("{\"a\" "), Err(SyntaxError(EOFWhileParsingObject, 1, 6))); - - assert_eq!(Json::from_str("{\"a\" 1"), Err(SyntaxError(ExpectedColon, 1, 6))); - assert_eq!(Json::from_str("{\"a\":"), Err(SyntaxError(EOFWhileParsingValue, 1, 6))); - assert_eq!(Json::from_str("{\"a\":1"), Err(SyntaxError(EOFWhileParsingObject, 1, 7))); - assert_eq!(Json::from_str("{\"a\":1 1"), Err(SyntaxError(InvalidSyntax, 1, 8))); - assert_eq!(Json::from_str("{\"a\":1,"), Err(SyntaxError(EOFWhileParsingObject, 1, 8))); - - assert_eq!(Json::from_str("{}").unwrap(), mk_object(&[])); - assert_eq!(Json::from_str("{\"a\": 3}").unwrap(), - mk_object(&[("a".to_string(), U64(3))])); - - assert_eq!(Json::from_str( - "{ \"a\": null, \"b\" : true }").unwrap(), - mk_object(&[ - ("a".to_string(), Null), - ("b".to_string(), Boolean(true))])); - assert_eq!(Json::from_str("\n{ \"a\": null, \"b\" : true }\n").unwrap(), - mk_object(&[ - ("a".to_string(), Null), - ("b".to_string(), Boolean(true))])); - assert_eq!(Json::from_str( - "{\"a\" : 1.0 ,\"b\": [ true ]}").unwrap(), - mk_object(&[ - ("a".to_string(), F64(1.0)), - ("b".to_string(), Array(vec![Boolean(true)])) - ])); - assert_eq!(Json::from_str( - "{\ - \"a\": 1.0, \ - \"b\": [\ - true,\ - \"foo\\nbar\", \ - { \"c\": {\"d\": null} } \ - ]\ - }").unwrap(), - mk_object(&[ - ("a".to_string(), F64(1.0)), - ("b".to_string(), Array(vec![ - Boolean(true), - String("foo\nbar".to_string()), - mk_object(&[ - ("c".to_string(), mk_object(&[("d".to_string(), Null)])) - ]) - ])) - ])); - } - - #[test] - fn test_decode_struct() { - let s = "{ - \"inner\": [ - { \"a\": null, \"b\": 2, \"c\": [\"abc\", \"xyz\"] } - ] - }"; - - let v: Outer = super::decode(s).unwrap(); - assert_eq!( - v, - Outer { - inner: vec![ - Inner { a: (), b: 2, c: vec!["abc".to_string(), "xyz".to_string()] } - ] - } - ); - } - - #[derive(RustcDecodable)] - struct FloatStruct { - f: f64, - a: Vec<f64> - } - #[test] - fn test_decode_struct_with_nan() { - let s = "{\"f\":null,\"a\":[null,123]}"; - let obj: FloatStruct = super::decode(s).unwrap(); - assert!(obj.f.is_nan()); - assert!(obj.a[0].is_nan()); - assert_eq!(obj.a[1], 123f64); - } - - #[test] - fn test_decode_option() { - let value: Option<string::String> = super::decode("null").unwrap(); - assert_eq!(value, None); - - let value: Option<string::String> = super::decode("\"jodhpurs\"").unwrap(); - assert_eq!(value, Some("jodhpurs".to_string())); - } - - #[test] - fn test_decode_enum() { - let value: Animal = super::decode("\"Dog\"").unwrap(); - assert_eq!(value, Dog); - - let s = "{\"variant\":\"Frog\",\"fields\":[\"Henry\",349]}"; - let value: Animal = super::decode(s).unwrap(); - assert_eq!(value, Frog("Henry".to_string(), 349)); - } - - #[test] - fn test_decode_result() { - let value: Result<i32, i8> = Ok(4); - let json_value = super::encode(&value).unwrap(); - assert_eq!(json_value, "{\"variant\":\"Ok\",\"fields\":[4]}"); - let decoded_value: Result<i32, i8> = super::decode(&json_value).unwrap(); - assert_eq!(decoded_value, Ok(4)); - } - - #[test] - fn test_decode_map() { - let s = "{\"a\": \"Dog\", \"b\": {\"variant\":\"Frog\",\ - \"fields\":[\"Henry\", 349]}}"; - let mut map: BTreeMap<string::String, Animal> = super::decode(s).unwrap(); - - assert_eq!(map.remove(&"a".to_string()), Some(Dog)); - assert_eq!(map.remove(&"b".to_string()), Some(Frog("Henry".to_string(), 349))); - } - - #[test] - fn test_multiline_errors() { - assert_eq!(Json::from_str("{\n \"foo\":\n \"bar\""), - Err(SyntaxError(EOFWhileParsingObject, 3, 8))); - } - - #[derive(RustcDecodable)] - #[allow(dead_code)] - struct DecodeStruct { - x: f64, - y: bool, - z: string::String, - w: Vec<DecodeStruct> - } - #[derive(RustcDecodable)] - enum DecodeEnum { - A(f64), - B(string::String) - } - fn check_err<T: Decodable>(to_parse: &'static str, expected: DecoderError) { - let res: DecodeResult<T> = match Json::from_str(to_parse) { - Err(e) => Err(ParseError(e)), - Ok(json) => Decodable::decode(&mut Decoder::new(json)) - }; - match res { - Ok(_) => panic!("`{:?}` parsed & decoded ok, expecting error `{:?}`", - to_parse, expected), - Err(ParseError(e)) => panic!("`{}` is not valid json: {:?}", - to_parse, e), - Err(e) => { - assert_eq!(e, expected); - } - } - } - #[test] - fn test_decode_errors_struct() { - check_err::<DecodeStruct>("[]", ExpectedError("Object".to_string(), "[]".to_string())); - check_err::<DecodeStruct>("{\"x\": true, \"y\": true, \"z\": \"\", \"w\": []}", - ExpectedError("Number".to_string(), "true".to_string())); - check_err::<DecodeStruct>("{\"x\": 1, \"y\": [], \"z\": \"\", \"w\": []}", - ExpectedError("Boolean".to_string(), "[]".to_string())); - check_err::<DecodeStruct>("{\"x\": 1, \"y\": true, \"z\": {}, \"w\": []}", - ExpectedError("String".to_string(), "{}".to_string())); - check_err::<DecodeStruct>("{\"x\": 1, \"y\": true, \"z\": \"\", \"w\": null}", - ExpectedError("Array".to_string(), "null".to_string())); - check_err::<DecodeStruct>("{\"x\": 1, \"y\": true, \"z\": \"\"}", - MissingFieldError("w".to_string())); - } - #[test] - fn test_decode_errors_enum() { - check_err::<DecodeEnum>("{}", - MissingFieldError("variant".to_string())); - check_err::<DecodeEnum>("{\"variant\": 1}", - ExpectedError("String".to_string(), "1".to_string())); - check_err::<DecodeEnum>("{\"variant\": \"A\"}", - MissingFieldError("fields".to_string())); - check_err::<DecodeEnum>("{\"variant\": \"A\", \"fields\": null}", - ExpectedError("Array".to_string(), "null".to_string())); - check_err::<DecodeEnum>("{\"variant\": \"C\", \"fields\": []}", - UnknownVariantError("C".to_string())); - } - - #[test] - fn test_find(){ - let json_value = Json::from_str("{\"dog\" : \"cat\"}").unwrap(); - let found_str = json_value.find("dog"); - assert!(found_str.unwrap().as_string().unwrap() == "cat"); - } - - #[test] - fn test_find_path(){ - let json_value = Json::from_str("{\"dog\":{\"cat\": {\"mouse\" : \"cheese\"}}}").unwrap(); - let found_str = json_value.find_path(&["dog", "cat", "mouse"]); - assert!(found_str.unwrap().as_string().unwrap() == "cheese"); - } - - #[test] - fn test_search(){ - let json_value = Json::from_str("{\"dog\":{\"cat\": {\"mouse\" : \"cheese\"}}}").unwrap(); - let found_str = json_value.search("mouse").and_then(|j| j.as_string()); - assert!(found_str.unwrap() == "cheese"); - } - - #[test] - fn test_index(){ - let json_value = Json::from_str("{\"animals\":[\"dog\",\"cat\",\"mouse\"]}").unwrap(); - let ref array = json_value["animals"]; - assert_eq!(array[0].as_string().unwrap(), "dog"); - assert_eq!(array[1].as_string().unwrap(), "cat"); - assert_eq!(array[2].as_string().unwrap(), "mouse"); - } - - #[test] - fn test_is_object(){ - let json_value = Json::from_str("{}").unwrap(); - assert!(json_value.is_object()); - } - - #[test] - fn test_as_object(){ - let json_value = Json::from_str("{}").unwrap(); - let json_object = json_value.as_object(); - assert!(json_object.is_some()); - } - - #[test] - fn test_is_array(){ - let json_value = Json::from_str("[1, 2, 3]").unwrap(); - assert!(json_value.is_array()); - } - - #[test] - fn test_as_array(){ - let json_value = Json::from_str("[1, 2, 3]").unwrap(); - let json_array = json_value.as_array(); - let expected_length = 3; - assert!(json_array.is_some() && json_array.unwrap().len() == expected_length); - } - - #[test] - fn test_is_string(){ - let json_value = Json::from_str("\"dog\"").unwrap(); - assert!(json_value.is_string()); - } - - #[test] - fn test_as_string(){ - let json_value = Json::from_str("\"dog\"").unwrap(); - let json_str = json_value.as_string(); - let expected_str = "dog"; - assert_eq!(json_str, Some(expected_str)); - } - - #[test] - fn test_is_number(){ - let json_value = Json::from_str("12").unwrap(); - assert!(json_value.is_number()); - } - - #[test] - fn test_is_i64(){ - let json_value = Json::from_str("-12").unwrap(); - assert!(json_value.is_i64()); - - let json_value = Json::from_str("12").unwrap(); - assert!(!json_value.is_i64()); - - let json_value = Json::from_str("12.0").unwrap(); - assert!(!json_value.is_i64()); - } - - #[test] - fn test_is_u64(){ - let json_value = Json::from_str("12").unwrap(); - assert!(json_value.is_u64()); - - let json_value = Json::from_str("-12").unwrap(); - assert!(!json_value.is_u64()); - - let json_value = Json::from_str("12.0").unwrap(); - assert!(!json_value.is_u64()); - } - - #[test] - fn test_is_f64(){ - let json_value = Json::from_str("12").unwrap(); - assert!(!json_value.is_f64()); - - let json_value = Json::from_str("-12").unwrap(); - assert!(!json_value.is_f64()); - - let json_value = Json::from_str("12.0").unwrap(); - assert!(json_value.is_f64()); - - let json_value = Json::from_str("-12.0").unwrap(); - assert!(json_value.is_f64()); - } - - #[test] - fn test_as_i64(){ - let json_value = Json::from_str("-12").unwrap(); - let json_num = json_value.as_i64(); - assert_eq!(json_num, Some(-12)); - } - - #[test] - fn test_as_u64(){ - let json_value = Json::from_str("12").unwrap(); - let json_num = json_value.as_u64(); - assert_eq!(json_num, Some(12)); - } - - #[test] - fn test_as_f64(){ - let json_value = Json::from_str("12.0").unwrap(); - let json_num = json_value.as_f64(); - assert_eq!(json_num, Some(12f64)); - } - - #[test] - fn test_is_boolean(){ - let json_value = Json::from_str("false").unwrap(); - assert!(json_value.is_boolean()); - } - - #[test] - fn test_as_boolean(){ - let json_value = Json::from_str("false").unwrap(); - let json_bool = json_value.as_boolean(); - let expected_bool = false; - assert!(json_bool.is_some() && json_bool.unwrap() == expected_bool); - } - - #[test] - fn test_is_null(){ - let json_value = Json::from_str("null").unwrap(); - assert!(json_value.is_null()); - } - - #[test] - fn test_as_null(){ - let json_value = Json::from_str("null").unwrap(); - let json_null = json_value.as_null(); - let expected_null = (); - assert!(json_null.is_some() && json_null.unwrap() == expected_null); - } - - #[test] - fn test_encode_hashmap_with_numeric_key() { - use std::collections::HashMap; - let mut hm: HashMap<usize, bool> = HashMap::new(); - hm.insert(1, true); - let json_str = super::as_pretty_json(&hm).to_string(); - match Json::from_str(&json_str) { - Err(_) => panic!("Unable to parse json_str: {}", json_str), - _ => {} // it parsed and we are good to go - } - } - - #[test] - fn test_negative_zero() { - Json::from_str("{\"test\":-0}").unwrap(); - } - - #[test] - fn test_prettyencode_hashmap_with_numeric_key() { - use std::collections::HashMap; - let mut hm: HashMap<usize, bool> = HashMap::new(); - hm.insert(1, true); - let json_str = super::as_pretty_json(&hm).to_string(); - match Json::from_str(&json_str) { - Err(_) => panic!("Unable to parse json_str: {}", json_str), - _ => {} // it parsed and we are good to go - } - } - - #[test] - fn test_prettyencoder_indent_level_param() { - use std::collections::BTreeMap; - - let mut tree = BTreeMap::new(); - - tree.insert("hello".to_string(), String("guten tag".to_string())); - tree.insert("goodbye".to_string(), String("sayonara".to_string())); - - let json = Array( - // The following layout below should look a lot like - // the pretty-printed JSON (indent * x) - vec! - ( // 0x - String("greetings".to_string()), // 1x - Object(tree), // 1x + 2x + 2x + 1x - ) // 0x - // End JSON array (7 lines) - ); - - // Helper function for counting indents - fn indents(source: &str) -> usize { - let trimmed = source.trim_left_matches(' '); - source.len() - trimmed.len() - } - - // Test up to 4 spaces of indents (more?) - for i in 0..4 { - let printed = super::as_pretty_json(&json).indent(i as u32) - .to_string(); - - // Check for indents at each line - let lines: Vec<&str> = printed.lines().collect(); - assert_eq!(lines.len(), 7); // JSON should be 7 lines - - assert_eq!(indents(lines[0]), 0 * i); // [ - assert_eq!(indents(lines[1]), 1 * i); // "greetings", - assert_eq!(indents(lines[2]), 1 * i); // { - assert_eq!(indents(lines[3]), 2 * i); // "hello": "guten tag", - assert_eq!(indents(lines[4]), 2 * i); // "goodbye": "sayonara" - assert_eq!(indents(lines[5]), 1 * i); // }, - assert_eq!(indents(lines[6]), 0 * i); // ] - - // Finally, test that the pretty-printed JSON is valid - Json::from_str(&printed).ok() - .expect("Pretty-printed JSON is invalid!"); - } - } - - #[test] - fn test_hashmap_with_numeric_key_can_handle_double_quote_delimited_key() { - use std::collections::HashMap; - use Decodable; - let json_str = "{\"1\":true}"; - let json_obj = match Json::from_str(json_str) { - Err(_) => panic!("Unable to parse json_str: {}", json_str), - Ok(o) => o - }; - let mut decoder = Decoder::new(json_obj); - let _hm: HashMap<usize, bool> = Decodable::decode(&mut decoder).unwrap(); - } - - #[test] - fn test_hashmap_with_enum_key() { - use std::collections::HashMap; - use json; - #[derive(RustcEncodable, Eq, Hash, PartialEq, RustcDecodable, Debug)] - enum Enum { - Foo, - #[allow(dead_code)] - Bar, - } - let mut map = HashMap::new(); - map.insert(Enum::Foo, 0); - let result = json::encode(&map).unwrap(); - assert_eq!(result, r#"{"Foo":0}"#); - let decoded: HashMap<Enum, _> = json::decode(&result).unwrap(); - assert_eq!(map, decoded); - } - - #[test] - fn test_hashmap_with_numeric_key_will_error_with_string_keys() { - use std::collections::HashMap; - use Decodable; - let json_str = "{\"a\":true}"; - let json_obj = match Json::from_str(json_str) { - Err(_) => panic!("Unable to parse json_str: {}", json_str), - Ok(o) => o - }; - let mut decoder = Decoder::new(json_obj); - let result: Result<HashMap<usize, bool>, DecoderError> = Decodable::decode(&mut decoder); - assert_eq!(result, Err(ExpectedError("Number".to_string(), "a".to_string()))); - } - - fn assert_stream_equal(src: &str, - expected: Vec<(JsonEvent, Vec<StackElement>)>) { - let mut parser = Parser::new(src.chars()); - let mut i = 0; - loop { - let evt = match parser.next() { - Some(e) => e, - None => { break; } - }; - let (ref expected_evt, ref expected_stack) = expected[i]; - if !parser.stack().is_equal_to(&expected_stack) { - panic!("Parser stack is not equal to {:?}", expected_stack); - } - assert_eq!(&evt, expected_evt); - i+=1; - } - } - #[test] - #[cfg_attr(target_word_size = "32", ignore)] // FIXME(#14064) - fn test_streaming_parser() { - assert_stream_equal( - r#"{ "foo":"bar", "array" : [0, 1, 2, 3, 4, 5], "idents":[null,true,false]}"#, - vec![ - (ObjectStart, vec![]), - (StringValue("bar".to_string()), vec![Key("foo")]), - (ArrayStart, vec![Key("array")]), - (U64Value(0), vec![Key("array"), Index(0)]), - (U64Value(1), vec![Key("array"), Index(1)]), - (U64Value(2), vec![Key("array"), Index(2)]), - (U64Value(3), vec![Key("array"), Index(3)]), - (U64Value(4), vec![Key("array"), Index(4)]), - (U64Value(5), vec![Key("array"), Index(5)]), - (ArrayEnd, vec![Key("array")]), - (ArrayStart, vec![Key("idents")]), - (NullValue, vec![Key("idents"), Index(0)]), - (BooleanValue(true), vec![Key("idents"), Index(1)]), - (BooleanValue(false), vec![Key("idents"), Index(2)]), - (ArrayEnd, vec![Key("idents")]), - (ObjectEnd, vec![]), - ] - ); - } - fn last_event(src: &str) -> JsonEvent { - let mut parser = Parser::new(src.chars()); - let mut evt = NullValue; - loop { - evt = match parser.next() { - Some(e) => e, - None => return evt, - } - } - } - - #[test] - #[cfg_attr(target_word_size = "32", ignore)] // FIXME(#14064) - fn test_read_object_streaming() { - assert_eq!(last_event("{ "), Error(SyntaxError(EOFWhileParsingObject, 1, 3))); - assert_eq!(last_event("{1"), Error(SyntaxError(KeyMustBeAString, 1, 2))); - assert_eq!(last_event("{ \"a\""), Error(SyntaxError(EOFWhileParsingObject, 1, 6))); - assert_eq!(last_event("{\"a\""), Error(SyntaxError(EOFWhileParsingObject, 1, 5))); - assert_eq!(last_event("{\"a\" "), Error(SyntaxError(EOFWhileParsingObject, 1, 6))); - - assert_eq!(last_event("{\"a\" 1"), Error(SyntaxError(ExpectedColon, 1, 6))); - assert_eq!(last_event("{\"a\":"), Error(SyntaxError(EOFWhileParsingValue, 1, 6))); - assert_eq!(last_event("{\"a\":1"), Error(SyntaxError(EOFWhileParsingObject, 1, 7))); - assert_eq!(last_event("{\"a\":1 1"), Error(SyntaxError(InvalidSyntax, 1, 8))); - assert_eq!(last_event("{\"a\":1,"), Error(SyntaxError(EOFWhileParsingObject, 1, 8))); - assert_eq!(last_event("{\"a\":1,}"), Error(SyntaxError(TrailingComma, 1, 8))); - - assert_stream_equal( - "{}", - vec![(ObjectStart, vec![]), (ObjectEnd, vec![])] - ); - assert_stream_equal( - "{\"a\": 3}", - vec![ - (ObjectStart, vec![]), - (U64Value(3), vec![Key("a")]), - (ObjectEnd, vec![]), - ] - ); - assert_stream_equal( - "{ \"a\": null, \"b\" : true }", - vec![ - (ObjectStart, vec![]), - (NullValue, vec![Key("a")]), - (BooleanValue(true), vec![Key("b")]), - (ObjectEnd, vec![]), - ] - ); - assert_stream_equal( - "{\"a\" : 1.0 ,\"b\": [ true ]}", - vec![ - (ObjectStart, vec![]), - (F64Value(1.0), vec![Key("a")]), - (ArrayStart, vec![Key("b")]), - (BooleanValue(true),vec![Key("b"), Index(0)]), - (ArrayEnd, vec![Key("b")]), - (ObjectEnd, vec![]), - ] - ); - assert_stream_equal( - r#"{ - "a": 1.0, - "b": [ - true, - "foo\nbar", - { "c": {"d": null} }, - "\uD834\uDF06" - ] - }"#, - vec![ - (ObjectStart, vec![]), - (F64Value(1.0), vec![Key("a")]), - (ArrayStart, vec![Key("b")]), - (BooleanValue(true), vec![Key("b"), Index(0)]), - (StringValue("foo\nbar".to_string()), vec![Key("b"), Index(1)]), - (ObjectStart, vec![Key("b"), Index(2)]), - (ObjectStart, vec![Key("b"), Index(2), Key("c")]), - (NullValue, vec![Key("b"), Index(2), Key("c"), Key("d")]), - (ObjectEnd, vec![Key("b"), Index(2), Key("c")]), - (ObjectEnd, vec![Key("b"), Index(2)]), - (StringValue("\u{1D306}".to_string()), vec![Key("b"), Index(3)]), - (ArrayEnd, vec![Key("b")]), - (ObjectEnd, vec![]), - ] - ); - } - #[test] - #[cfg_attr(target_word_size = "32", ignore)] // FIXME(#14064) - fn test_read_array_streaming() { - assert_stream_equal( - "[]", - vec![ - (ArrayStart, vec![]), - (ArrayEnd, vec![]), - ] - ); - assert_stream_equal( - "[ ]", - vec![ - (ArrayStart, vec![]), - (ArrayEnd, vec![]), - ] - ); - assert_stream_equal( - "[true]", - vec![ - (ArrayStart, vec![]), - (BooleanValue(true), vec![Index(0)]), - (ArrayEnd, vec![]), - ] - ); - assert_stream_equal( - "[ false ]", - vec![ - (ArrayStart, vec![]), - (BooleanValue(false), vec![Index(0)]), - (ArrayEnd, vec![]), - ] - ); - assert_stream_equal( - "[null]", - vec![ - (ArrayStart, vec![]), - (NullValue, vec![Index(0)]), - (ArrayEnd, vec![]), - ] - ); - assert_stream_equal( - "[3, 1]", - vec![ - (ArrayStart, vec![]), - (U64Value(3), vec![Index(0)]), - (U64Value(1), vec![Index(1)]), - (ArrayEnd, vec![]), - ] - ); - assert_stream_equal( - "\n[3, 2]\n", - vec![ - (ArrayStart, vec![]), - (U64Value(3), vec![Index(0)]), - (U64Value(2), vec![Index(1)]), - (ArrayEnd, vec![]), - ] - ); - assert_stream_equal( - "[2, [4, 1]]", - vec![ - (ArrayStart, vec![]), - (U64Value(2), vec![Index(0)]), - (ArrayStart, vec![Index(1)]), - (U64Value(4), vec![Index(1), Index(0)]), - (U64Value(1), vec![Index(1), Index(1)]), - (ArrayEnd, vec![Index(1)]), - (ArrayEnd, vec![]), - ] - ); - - assert_eq!(last_event("["), Error(SyntaxError(EOFWhileParsingValue, 1, 2))); - - assert_eq!(Json::from_str("["), Err(SyntaxError(EOFWhileParsingValue, 1, 2))); - assert_eq!(Json::from_str("[1"), Err(SyntaxError(EOFWhileParsingArray, 1, 3))); - assert_eq!(Json::from_str("[1,"), Err(SyntaxError(EOFWhileParsingValue, 1, 4))); - assert_eq!(Json::from_str("[1,]"), Err(SyntaxError(InvalidSyntax, 1, 4))); - assert_eq!(Json::from_str("[6 7]"), Err(SyntaxError(InvalidSyntax, 1, 4))); - - } - #[test] - fn test_trailing_characters_streaming() { - assert_eq!(last_event("nulla"), Error(SyntaxError(TrailingCharacters, 1, 5))); - assert_eq!(last_event("truea"), Error(SyntaxError(TrailingCharacters, 1, 5))); - assert_eq!(last_event("falsea"), Error(SyntaxError(TrailingCharacters, 1, 6))); - assert_eq!(last_event("1a"), Error(SyntaxError(TrailingCharacters, 1, 2))); - assert_eq!(last_event("[]a"), Error(SyntaxError(TrailingCharacters, 1, 3))); - assert_eq!(last_event("{}a"), Error(SyntaxError(TrailingCharacters, 1, 3))); - } - #[test] - fn test_read_identifiers_streaming() { - assert_eq!(Parser::new("null".chars()).next(), Some(NullValue)); - assert_eq!(Parser::new("true".chars()).next(), Some(BooleanValue(true))); - assert_eq!(Parser::new("false".chars()).next(), Some(BooleanValue(false))); - - assert_eq!(last_event("n"), Error(SyntaxError(InvalidSyntax, 1, 2))); - assert_eq!(last_event("nul"), Error(SyntaxError(InvalidSyntax, 1, 4))); - assert_eq!(last_event("t"), Error(SyntaxError(InvalidSyntax, 1, 2))); - assert_eq!(last_event("truz"), Error(SyntaxError(InvalidSyntax, 1, 4))); - assert_eq!(last_event("f"), Error(SyntaxError(InvalidSyntax, 1, 2))); - assert_eq!(last_event("faz"), Error(SyntaxError(InvalidSyntax, 1, 3))); - } - - #[test] - fn test_stack() { - let mut stack = Stack::new(); - - assert!(stack.is_empty()); - assert!(stack.len() == 0); - assert!(!stack.last_is_index()); - - stack.push_index(0); - stack.bump_index(); - - assert!(stack.len() == 1); - assert!(stack.is_equal_to(&[Index(1)])); - assert!(stack.starts_with(&[Index(1)])); - assert!(stack.ends_with(&[Index(1)])); - assert!(stack.last_is_index()); - assert!(stack.get(0) == Index(1)); - - stack.push_key("foo".to_string()); - - assert!(stack.len() == 2); - assert!(stack.is_equal_to(&[Index(1), Key("foo")])); - assert!(stack.starts_with(&[Index(1), Key("foo")])); - assert!(stack.starts_with(&[Index(1)])); - assert!(stack.ends_with(&[Index(1), Key("foo")])); - assert!(stack.ends_with(&[Key("foo")])); - assert!(!stack.last_is_index()); - assert!(stack.get(0) == Index(1)); - assert!(stack.get(1) == Key("foo")); - - stack.push_key("bar".to_string()); - - assert!(stack.len() == 3); - assert!(stack.is_equal_to(&[Index(1), Key("foo"), Key("bar")])); - assert!(stack.starts_with(&[Index(1)])); - assert!(stack.starts_with(&[Index(1), Key("foo")])); - assert!(stack.starts_with(&[Index(1), Key("foo"), Key("bar")])); - assert!(stack.ends_with(&[Key("bar")])); - assert!(stack.ends_with(&[Key("foo"), Key("bar")])); - assert!(stack.ends_with(&[Index(1), Key("foo"), Key("bar")])); - assert!(!stack.last_is_index()); - assert!(stack.get(0) == Index(1)); - assert!(stack.get(1) == Key("foo")); - assert!(stack.get(2) == Key("bar")); - - stack.pop(); - - assert!(stack.len() == 2); - assert!(stack.is_equal_to(&[Index(1), Key("foo")])); - assert!(stack.starts_with(&[Index(1), Key("foo")])); - assert!(stack.starts_with(&[Index(1)])); - assert!(stack.ends_with(&[Index(1), Key("foo")])); - assert!(stack.ends_with(&[Key("foo")])); - assert!(!stack.last_is_index()); - assert!(stack.get(0) == Index(1)); - assert!(stack.get(1) == Key("foo")); - } - - #[test] - fn test_to_json() { - use std::collections::{HashMap,BTreeMap}; - use super::ToJson; - - let array2 = Array(vec!(I64(1), I64(2))); - let array3 = Array(vec!(I64(1), I64(2), I64(3))); - let object = { - let mut tree_map = BTreeMap::new(); - tree_map.insert("a".to_string(), U64(1)); - tree_map.insert("b".to_string(), U64(2)); - Object(tree_map) - }; - - assert_eq!(array2.to_json(), array2); - assert_eq!(object.to_json(), object); - assert_eq!(3_isize.to_json(), I64(3)); - assert_eq!(4_i8.to_json(), I64(4)); - assert_eq!(5_i16.to_json(), I64(5)); - assert_eq!(6_i32.to_json(), I64(6)); - assert_eq!(7_i64.to_json(), I64(7)); - assert_eq!(8_usize.to_json(), U64(8)); - assert_eq!(9_u8.to_json(), U64(9)); - assert_eq!(10_u16.to_json(), U64(10)); - assert_eq!(11_u32.to_json(), U64(11)); - assert_eq!(12_u64.to_json(), U64(12)); - assert_eq!(13.0_f32.to_json(), F64(13.0_f64)); - assert_eq!(14.0_f64.to_json(), F64(14.0_f64)); - assert_eq!(().to_json(), Null); - assert_eq!(f32::INFINITY.to_json(), Null); - assert_eq!(f64::NAN.to_json(), Null); - assert_eq!(true.to_json(), Boolean(true)); - assert_eq!(false.to_json(), Boolean(false)); - assert_eq!("abc".to_json(), String("abc".to_string())); - assert_eq!("abc".to_string().to_json(), String("abc".to_string())); - assert_eq!((1, 2).to_json(), array2); - assert_eq!((1, 2, 3).to_json(), array3); - assert_eq!([1, 2].to_json(), array2); - assert_eq!((&[1, 2, 3]).to_json(), array3); - assert_eq!((vec![1, 2]).to_json(), array2); - assert_eq!(vec!(1, 2, 3).to_json(), array3); - let mut tree_map = BTreeMap::new(); - tree_map.insert("a".to_string(), 1 as u32); - tree_map.insert("b".to_string(), 2); - assert_eq!(tree_map.to_json(), object); - let mut hash_map = HashMap::new(); - hash_map.insert("a".to_string(), 1 as u32); - hash_map.insert("b".to_string(), 2); - assert_eq!(hash_map.to_json(), object); - assert_eq!(Some(15).to_json(), I64(15)); - assert_eq!(Some(15 as u32).to_json(), U64(15)); - assert_eq!(None::<isize>.to_json(), Null); - } - - #[test] - fn test_encode_hashmap_with_arbitrary_key() { - use std::collections::HashMap; - #[derive(PartialEq, Eq, Hash, RustcEncodable)] - struct ArbitraryType(u32); - let mut hm: HashMap<ArbitraryType, bool> = HashMap::new(); - hm.insert(ArbitraryType(1), true); - let mut mem_buf = string::String::new(); - let mut encoder = Encoder::new(&mut mem_buf); - let result = hm.encode(&mut encoder); - match result.err().unwrap() { - EncoderError::BadHashmapKey => (), - _ => panic!("expected bad hash map key") - } - } - - #[test] - fn test_encode_decode_phantom_data() { - use std::marker::PhantomData; - - #[derive(Debug, RustcDecodable, RustcEncodable, Eq, PartialEq)] - struct Foo<P> { - phantom_data: PhantomData<P> - } - - let f: Foo<u8> = Foo { - phantom_data: PhantomData - }; - let s = super::encode(&f).unwrap(); - let d: Foo<u8> = super::decode(&s).unwrap(); - assert_eq!(f, d); - } - - #[test] - fn test_bad_json_stack_depleted() { - use json; - #[derive(Debug, RustcDecodable)] - enum ChatEvent { - Variant(i32) - } - let serialized = "{\"variant\": \"Variant\", \"fields\": []}"; - let r: Result<ChatEvent, _> = json::decode(serialized); - assert!(r.unwrap_err() == EOF); - } - - #[test] - fn fixed_length_array() { - #[derive(Debug, RustcDecodable, RustcEncodable, Eq, PartialEq)] - struct Foo { - a: [u8; 1], - b: [i32; 2], - c: [u64; 3], - } - let f = Foo { - a: [0], - b: [1, 2], - c: [3, 4, 5], - }; - let s = super::encode(&f).unwrap(); - let d = super::decode(&s).unwrap(); - assert_eq!(f, d); - } - - #[test] - fn test_unexpected_token() { - match Json::from_str("{\"\":\"\",\"\":{\"\":\"\",\"\":[{\"\":\"\",}}}") { - Err(e) => assert_eq!(e, SyntaxError(InvalidSyntax, 1, 32)), - _ => () - }; - } -} diff --git a/vendor/rustc-serialize/src/lib.rs b/vendor/rustc-serialize/src/lib.rs deleted file mode 100644 index 8b0fb22f27..0000000000 --- a/vendor/rustc-serialize/src/lib.rs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Support code for encoding and decoding types. -//! -//! > **NOTE**: This crate is deprecated in favor of [`serde`]. No new feature -//! > development will happen in this crate, although bug fixes proposed through -//! > PRs will still be merged. It is very highly recommended by the Rust -//! > Library Team that you use [`serde`], not this crate. -//! -//! [`serde`]: https://serde.rs -//! -//! # Usage -//! -//! This crate is [on crates.io](https://crates.io/crates/rustc-serialize) and -//! can be used by adding `rustc-serialize` to the dependencies in your -//! project's `Cargo.toml`. -//! -//! ```toml -//! [dependencies] -//! rustc-serialize = "0.3" -//! ``` -//! -//! and this to your crate root: -//! -//! ```rust -//! extern crate rustc_serialize; -//! ``` - -#![cfg_attr(rustbuild, feature(staged_api, rustc_private))] -#![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))] - -#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "https://www.rust-lang.org/favicon.ico", - html_root_url = "https://doc.rust-lang.org/rustc-serialize/")] -#![cfg_attr(test, deny(warnings))] -#![allow(trivial_numeric_casts)] -#![cfg_attr(rust_build, feature(staged_api))] -#![cfg_attr(rust_build, staged_api)] -#![cfg_attr(rust_build, - unstable(feature = "rustc_private", - reason = "use the crates.io `rustc-serialize` library instead"))] - -#[cfg(test)] extern crate rand; - -pub use self::serialize::{Decoder, Encoder, Decodable, Encodable, - DecoderHelpers, EncoderHelpers}; - - -// Limit collections from allocating more than -// 1 MB for calls to `with_capacity`. -fn cap_capacity<T>(given_len: usize) -> usize { - use std::cmp::min; - use std::mem::size_of; - const PRE_ALLOCATE_CAP: usize = 0x100000; - - match size_of::<T>() { - 0 => min(given_len, PRE_ALLOCATE_CAP), - n => min(given_len, PRE_ALLOCATE_CAP / n) - } -} - -mod serialize; -mod collection_impls; - -pub mod base64; -pub mod hex; -pub mod json; - -mod rustc_serialize { - pub use serialize::*; -} diff --git a/vendor/rustc-serialize/src/serialize.rs b/vendor/rustc-serialize/src/serialize.rs deleted file mode 100644 index 296f3d48e0..0000000000 --- a/vendor/rustc-serialize/src/serialize.rs +++ /dev/null @@ -1,1671 +0,0 @@ -// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Support code for encoding and decoding types. -//! -//! In order to allow extensibility in both what types can be encoded and how -//! they are encoded, encoding and decoding are split into two part each. An -//! implementation of the Encodable trait knows how to turn a specific type into -//! a generic form, and then uses an implementation of the Encoder trait to turn -//! this into concrete output (such as a JSON string). Decoder and Decodable do -//! the same for decoding. - -/* -Core encoding and decoding interfaces. -*/ - -use std::cell::{Cell, RefCell}; -use std::ffi::OsString; -use std::path; -use std::rc::Rc; -use std::sync::Arc; -use std::marker::PhantomData; -use std::borrow::Cow; - -use cap_capacity; - -/// Trait for writing out an encoding when serializing. -/// -/// This trait provides methods to encode basic types and generic forms of -/// collections. Implementations of `Encodable` use it to perform the actual -/// encoding of a type. -/// -/// It is unspecified what is done with the encoding - it could be stored in a -/// variable, or written directly to a file, for example. -/// -/// Encoders can expect to only have a single "root" method call made on this -/// trait. Non-trivial types will call one of the collection-emitting methods, -/// passing a function that may call other methods on the trait, but once the -/// collection-emitting method has returned, encoding should be complete. -pub trait Encoder { - /// The error type for method results. - type Error; - - // Primitive types: - /// Emit a nil value. - /// - /// For example, this might be stored as the null keyword in JSON. - fn emit_nil(&mut self) -> Result<(), Self::Error>; - - /// Emit a usize value. - fn emit_usize(&mut self, v: usize) -> Result<(), Self::Error>; - - /// Emit a u64 value. - fn emit_u64(&mut self, v: u64) -> Result<(), Self::Error>; - - /// Emit a u32 value. - fn emit_u32(&mut self, v: u32) -> Result<(), Self::Error>; - - /// Emit a u16 value. - fn emit_u16(&mut self, v: u16) -> Result<(), Self::Error>; - - /// Emit a u8 value. - fn emit_u8(&mut self, v: u8) -> Result<(), Self::Error>; - - /// Emit a isize value. - fn emit_isize(&mut self, v: isize) -> Result<(), Self::Error>; - - /// Emit a i64 value. - fn emit_i64(&mut self, v: i64) -> Result<(), Self::Error>; - - /// Emit a i32 value. - fn emit_i32(&mut self, v: i32) -> Result<(), Self::Error>; - - /// Emit a i16 value. - fn emit_i16(&mut self, v: i16) -> Result<(), Self::Error>; - - /// Emit a i8 value. - fn emit_i8(&mut self, v: i8) -> Result<(), Self::Error>; - - /// Emit a bool value. - /// - /// For example, this might be stored as the true and false keywords in - /// JSON. - fn emit_bool(&mut self, v: bool) -> Result<(), Self::Error>; - - /// Emit a f64 value. - fn emit_f64(&mut self, v: f64) -> Result<(), Self::Error>; - - /// Emit a f32 value. - fn emit_f32(&mut self, v: f32) -> Result<(), Self::Error>; - - /// Emit a char value. - /// - /// Note that strings should be emitted using `emit_str`, not as a sequence - /// of `emit_char` calls. - fn emit_char(&mut self, v: char) -> Result<(), Self::Error>; - - /// Emit a string value. - fn emit_str(&mut self, v: &str) -> Result<(), Self::Error>; - - // Compound types: - /// Emit an enumeration value. - /// - /// * `name` indicates the enumeration type name. - /// * `f` is a function that will call `emit_enum_variant` or - /// `emit_enum_struct_variant` as appropriate to write the actual value. - fn emit_enum<F>(&mut self, name: &str, f: F) -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; - - /// Emit a enumeration variant value with no or unnamed data. - /// - /// This should only be called from a function passed to `emit_enum`. - /// Variants with named data should use `emit_enum_struct_variant`. - /// - /// * `v_name` is the variant name - /// * `v_id` is the numeric identifier for the variant. - /// * `len` is the number of data items associated with the variant. - /// * `f` is a function that will call `emit_enum_variant_arg` for each data - /// item. It may not be called if len is 0. - /// - /// # Examples - /// - /// ``` - /// use rustc_serialize::Encodable; - /// use rustc_serialize::Encoder; - /// - /// enum Message { - /// Quit, - /// ChangeColor(i32, i32, i32), - /// } - /// - /// impl Encodable for Message { - /// fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - /// s.emit_enum("Message", |s| { - /// match *self { - /// Message::Quit => { - /// s.emit_enum_variant("Quit", 0, 0, |s| Ok(())) - /// } - /// Message::ChangeColor(r, g, b) => { - /// s.emit_enum_variant("ChangeColor", 1, 3, |s| { - /// try!(s.emit_enum_variant_arg(0, |s| { - /// s.emit_i32(r) - /// })); - /// try!(s.emit_enum_variant_arg(1, |s| { - /// s.emit_i32(g) - /// })); - /// try!(s.emit_enum_variant_arg(2, |s| { - /// s.emit_i32(b) - /// })); - /// Ok(()) - /// }) - /// } - /// } - /// }) - /// } - /// } - /// ``` - fn emit_enum_variant<F>(&mut self, v_name: &str, - v_id: usize, - len: usize, - f: F) -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; - - /// Emit an unnamed data item for an enumeration variant. - /// - /// This should only be called from a function passed to - /// `emit_enum_variant`. - /// - /// * `a_idx` is the (zero-based) index of the data item. - /// * `f` is a function that will call the appropriate emit method to encode - /// the data object. - /// - /// Note that variant data items must be emitted in order - starting with - /// index `0` and finishing with index `len-1`. - fn emit_enum_variant_arg<F>(&mut self, a_idx: usize, f: F) - -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; - - /// Emit a enumeration variant value with no or named data. - /// - /// This should only be called from a function passed to `emit_enum`. - /// Variants with unnamed data should use `emit_enum_variant`. - /// - /// * `v_name` is the variant name. - /// * `v_id` is the numeric identifier for the variant. - /// * `len` is the number of data items associated with the variant. - /// * `f` is a function that will call `emit_enum_struct_variant_field` for - /// each data item. It may not be called if `len` is `0`. - /// - /// # Examples - /// - /// ``` - /// use rustc_serialize::Encodable; - /// use rustc_serialize::Encoder; - /// - /// enum Message { - /// Quit, - /// Move { x: i32, y: i32 }, - /// } - /// - /// impl Encodable for Message { - /// fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - /// s.emit_enum("Message", |s| { - /// match *self { - /// Message::Quit => { - /// s.emit_enum_struct_variant("Quit", 0, 0, |s| Ok(())) - /// } - /// Message::Move { x: x, y: y } => { - /// s.emit_enum_struct_variant("Move", 1, 2, |s| { - /// try!(s.emit_enum_struct_variant_field("x", 0, |s| { - /// s.emit_i32(x) - /// })); - /// try!(s.emit_enum_struct_variant_field("y", 1, |s| { - /// s.emit_i32(y) - /// })); - /// Ok(()) - /// }) - /// } - /// } - /// }) - /// } - /// } - /// ``` - fn emit_enum_struct_variant<F>(&mut self, v_name: &str, - v_id: usize, - len: usize, - f: F) -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; - - /// Emit a named data item for an enumeration variant. - /// - /// This should only be called from a function passed to - /// `emit_enum_struct_variant`. - /// - /// * `f_name` is the name of the data item field. - /// * `f_idx` is its (zero-based) index. - /// * `f` is a function that will call the appropriate emit method to encode - /// the data object. - /// - /// Note that fields must be emitted in order - starting with index `0` and - /// finishing with index `len-1`. - fn emit_enum_struct_variant_field<F>(&mut self, - f_name: &str, - f_idx: usize, - f: F) -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; - - /// Emit a struct value. - /// - /// * `name` is the name of the struct. - /// * `len` is the number of members. - /// * `f` is a function that calls `emit_struct_field` for each member. - /// - /// # Examples - /// - /// ``` - /// use rustc_serialize::Encodable; - /// use rustc_serialize::Encoder; - /// - /// struct Point { - /// x: i32, - /// y: i32, - /// } - /// - /// impl Encodable for Point { - /// fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - /// s.emit_struct("Point", 2, |s| { - /// try!(s.emit_struct_field("x", 0, |s| { - /// s.emit_i32(self.x) - /// })); - /// try!(s.emit_struct_field("y", 1, |s| { - /// s.emit_i32(self.y) - /// })); - /// Ok(()) - /// }) - /// } - /// } - /// ``` - fn emit_struct<F>(&mut self, name: &str, len: usize, f: F) - -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; - /// Emit a field item for a struct. - /// - /// This should only be called from a function passed to `emit_struct`. - /// - /// * `f_name` is the name of the data item field. - /// * `f_idx` is its (zero-based) index. - /// * `f` is a function that will call the appropriate emit method to encode - /// the data object. - /// - /// Note that fields must be emitted in order - starting with index `0` and - /// finishing with index `len-1`. - fn emit_struct_field<F>(&mut self, f_name: &str, f_idx: usize, f: F) - -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; - - /// Emit a tuple value. - /// - /// * `len` is the number of items in the tuple. - /// * `f` is a function that calls `emit_tuple_arg` for each member. - /// - /// Note that external `Encodable` implementations should not normally need - /// to use this method directly; it is meant for the use of this module's - /// own implementation of `Encodable` for tuples. - fn emit_tuple<F>(&mut self, len: usize, f: F) -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; - - /// Emit a data item for a tuple. - /// - /// This should only be called from a function passed to `emit_tuple`. - /// - /// * `idx` is the (zero-based) index of the data item. - /// * `f` is a function that will call the appropriate emit method to encode - /// the data object. - /// - /// Note that tuple items must be emitted in order - starting with index `0` - /// and finishing with index `len-1`. - fn emit_tuple_arg<F>(&mut self, idx: usize, f: F) -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; - - /// Emit a tuple struct value. - /// - /// * `name` is the name of the tuple struct. - /// * `len` is the number of items in the tuple struct. - /// * `f` is a function that calls `emit_tuple_struct_arg` for each member. - /// - /// # Examples - /// - /// ``` - /// use rustc_serialize::Encodable; - /// use rustc_serialize::Encoder; - /// - /// struct Pair(i32,i32); - /// - /// impl Encodable for Pair { - /// fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - /// let Pair(first,second) = *self; - /// s.emit_tuple_struct("Pair", 2, |s| { - /// try!(s.emit_tuple_arg(0, |s| { - /// s.emit_i32(first) - /// })); - /// try!(s.emit_tuple_arg(1, |s| { - /// s.emit_i32(second) - /// })); - /// Ok(()) - /// }) - /// } - /// } - /// ``` - fn emit_tuple_struct<F>(&mut self, name: &str, len: usize, f: F) - -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; - - /// Emit a data item for a tuple struct. - /// - /// This should only be called from a function passed to - /// `emit_tuple_struct`. - /// - /// * `f_idx` is the (zero-based) index of the data item. - /// * `f` is a function that will call the appropriate emit method to encode - /// the data object. - /// - /// Note that tuple items must be emitted in order - starting with index `0` - /// and finishing with index `len-1`. - fn emit_tuple_struct_arg<F>(&mut self, f_idx: usize, f: F) - -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; - - // Specialized types: - /// Emit an optional value. - /// - /// `f` is a function that will call either `emit_option_none` or - /// `emit_option_some` as appropriate. - /// - /// This method allows encoders to handle `Option<T>` values specially, - /// rather than using the generic enum methods, because many encoding - /// formats have a built-in "optional" concept. - /// - /// Note that external `Encodable` implementations should not normally need - /// to use this method directly; it is meant for the use of this module's - /// own implementation of `Encodable` for `Option<T>`. - fn emit_option<F>(&mut self, f: F) -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; - - /// Emit the `None` optional value. - /// - /// This should only be called from a function passed to `emit_option`. - fn emit_option_none(&mut self) -> Result<(), Self::Error>; - - /// Emit the `Some(x)` optional value. - /// - /// `f` is a function that will call the appropriate emit method to encode - /// the data object. - /// - /// This should only be called from a function passed to `emit_option`. - fn emit_option_some<F>(&mut self, f: F) -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; - - /// Emit a sequence of values. - /// - /// This should be used for both array-like ordered sequences and set-like - /// unordered ones. - /// - /// * `len` is the number of values in the sequence. - /// * `f` is a function that will call `emit_seq_elt` for each value in the - /// sequence. - fn emit_seq<F>(&mut self, len: usize, f: F) -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; - - /// Emit an element in a sequence. - /// - /// This should only be called from a function passed to `emit_seq`. - /// - /// * `idx` is the (zero-based) index of the value in the sequence. - /// * `f` is a function that will call the appropriate emit method to encode - /// the data object. - /// - /// Note that sequence elements must be emitted in order - starting with - /// index `0` and finishing with index `len-1`. - fn emit_seq_elt<F>(&mut self, idx: usize, f: F) -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; - - /// Emit an associative container (map). - /// - /// * `len` is the number of entries in the map. - /// * `f` is a function that will call `emit_map_elt_key` and - /// `emit_map_elt_val` for each entry in the map. - /// - /// # Examples - /// - /// ``` - /// use rustc_serialize::Encodable; - /// use rustc_serialize::Encoder; - /// - /// struct SimpleMap<K,V> { - /// entries: Vec<(K,V)>, - /// } - /// - /// impl<K:Encodable,V:Encodable> Encodable for SimpleMap<K,V> { - /// fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - /// s.emit_map(self.entries.len(), |s| { - /// for (i, e) in self.entries.iter().enumerate() { - /// let (ref k, ref v) = *e; - /// try!(s.emit_map_elt_key(i, |s| k.encode(s))); - /// try!(s.emit_map_elt_val(i, |s| v.encode(s))); - /// } - /// Ok(()) - /// }) - /// } - /// } - /// ``` - fn emit_map<F>(&mut self, len: usize, f: F) -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; - - /// Emit the key for an entry in a map. - /// - /// This should only be called from a function passed to `emit_map`. - /// - /// * `idx` is the (zero-based) index of the entry in the map - /// * `f` is a function that will call the appropriate emit method to encode - /// the key. - /// - /// Note that map entries must be emitted in order - starting with index `0` - /// and finishing with index `len-1` - and for each entry, the key should be - /// emitted followed immediately by the value. - fn emit_map_elt_key<F>(&mut self, idx: usize, f: F) -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; - - /// Emit the value for an entry in a map. - /// - /// This should only be called from a function passed to `emit_map`. - /// - /// * `idx` is the (zero-based) index of the entry in the map - /// * `f` is a function that will call the appropriate emit method to encode - /// the value. - /// - /// Note that map entries must be emitted in order - starting with index `0` - /// and finishing with index `len-1` - and for each entry, the key should be - /// emitted followed immediately by the value. - fn emit_map_elt_val<F>(&mut self, idx: usize, f: F) -> Result<(), Self::Error> - where F: FnOnce(&mut Self) -> Result<(), Self::Error>; -} - -/// Trait for reading in an encoding for deserialization. -/// -/// This trait provides methods to decode basic types and generic forms of -/// collections. Implementations of `Decodable` use it to perform the actual -/// decoding of a type. -/// -/// Note that, as is typical with deserialization, the design of this API -/// assumes you know in advance the form of the data you are decoding (ie: what -/// type is encoded). -/// -/// Decoders can expect to only have a single "root" method call made on this -/// trait. Non-trivial types will call one of the collection-reading methods, -/// passing a function that may call other methods on the trait, but once the -/// collection-reading method has returned, decoding should be complete. -pub trait Decoder { - /// The error type for method results. - type Error; - - // Primitive types: - /// Read a nil value. - fn read_nil(&mut self) -> Result<(), Self::Error>; - - /// Read a usize value. - fn read_usize(&mut self) -> Result<usize, Self::Error>; - - /// Read a u64 value. - fn read_u64(&mut self) -> Result<u64, Self::Error>; - - /// Read a u32 value. - fn read_u32(&mut self) -> Result<u32, Self::Error>; - - /// Read a u16 value. - fn read_u16(&mut self) -> Result<u16, Self::Error>; - - /// Read a u8 value. - fn read_u8(&mut self) -> Result<u8, Self::Error>; - - /// Read a isize value. - fn read_isize(&mut self) -> Result<isize, Self::Error>; - - /// Read a i64 value. - fn read_i64(&mut self) -> Result<i64, Self::Error>; - - /// Read a i32 value. - fn read_i32(&mut self) -> Result<i32, Self::Error>; - - /// Read a i16 value. - fn read_i16(&mut self) -> Result<i16, Self::Error>; - - /// Read a i8 value. - fn read_i8(&mut self) -> Result<i8, Self::Error>; - - /// Read a bool value. - fn read_bool(&mut self) -> Result<bool, Self::Error>; - - /// Read a f64 value. - fn read_f64(&mut self) -> Result<f64, Self::Error>; - - /// Read a f32 value. - fn read_f32(&mut self) -> Result<f32, Self::Error>; - - /// Read a char value. - fn read_char(&mut self) -> Result<char, Self::Error>; - - /// Read a string value. - fn read_str(&mut self) -> Result<String, Self::Error>; - - // Compound types: - /// Read an enumeration value. - /// - /// * `name` indicates the enumeration type name. It may be used to - /// sanity-check the data being read. - /// * `f` is a function that will call `read_enum_variant` (or - /// `read_enum_struct_variant`) to read the actual value. - fn read_enum<T, F>(&mut self, name: &str, f: F) -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error>; - - /// Read an enumeration value. - /// - /// * `names` is a list of the enumeration variant names. - /// * `f` is a function that will call `read_enum_variant_arg` or - /// `read_enum_struct_variant_field` as appropriate to read the - /// associated values. It will be passed the index into `names` for the - /// variant that is encoded. - fn read_enum_variant<T, F>(&mut self, names: &[&str], f: F) - -> Result<T, Self::Error> - where F: FnMut(&mut Self, usize) -> Result<T, Self::Error>; - - /// Read an unnamed data item for an enumeration variant. - /// - /// This should only be called from a function passed to `read_enum_variant` - /// or `read_enum_struct_variant`, and only when the index provided to that - /// function indicates that the variant has associated unnamed data. It - /// should be called once for each associated data item. - /// - /// * `a_idx` is the (zero-based) index of the data item. - /// * `f` is a function that will call the appropriate read method to deocde - /// the data object. - /// - /// Note that variant data items must be read in order - starting with index - /// `0` and finishing with index `len-1`. Implementations may use `a_idx`, - /// the call order or both to select the correct data to decode. - fn read_enum_variant_arg<T, F>(&mut self, a_idx: usize, f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error>; - - /// Read an enumeration value. - /// - /// This is identical to `read_enum_variant`, and is only provided for - /// symmetry with the `Encoder` API. - fn read_enum_struct_variant<T, F>(&mut self, names: &[&str], f: F) - -> Result<T, Self::Error> - where F: FnMut(&mut Self, usize) -> Result<T, Self::Error>; - - /// Read a named data item for an enumeration variant. - /// - /// This should only be called from a function passed to `read_enum_variant` - /// or `read_enum_struct_variant`, and only when the index provided to that - /// function indicates that the variant has associated named data. It should - /// be called once for each associated field. - /// - /// * `f_name` is the name of the field. - /// * `f_idx` is the (zero-based) index of the data item. - /// * `f` is a function that will call the appropriate read method to deocde - /// the data object. - /// - /// Note that fields must be read in order - starting with index `0` and - /// finishing with index `len-1`. Implementations may use `f_idx`, `f_name`, - /// the call order or any combination to choose the correct data to decode, - /// and may (but are not required to) return an error if these are - /// inconsistent. - fn read_enum_struct_variant_field<T, F>(&mut self, - f_name: &str, - f_idx: usize, - f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error>; - - /// Read an struct value. - /// - /// * `s_name` indicates the struct type name. It may be used to - /// sanity-check the data being read. - /// * `len` indicates the number of fields in the struct. - /// * `f` is a function that will call `read_struct_field` for each field in - /// the struct. - fn read_struct<T, F>(&mut self, s_name: &str, len: usize, f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error>; - - /// Read a field for a struct value. - /// - /// This should only be called from a function passed to `read_struct`. It - /// should be called once for each associated field. - /// - /// * `f_name` is the name of the field. - /// * `f_idx` is the (zero-based) index of the data item. - /// * `f` is a function that will call the appropriate read method to deocde - /// the data object. - /// - /// Note that fields must be read in order - starting with index `0` and - /// finishing with index `len-1`. Implementations may use `f_idx`, `f_name`, - /// the call order or any combination to choose the correct data to decode, - /// and may (but are not required to) return an error if these are - /// inconsistent. - fn read_struct_field<T, F>(&mut self, - f_name: &str, - f_idx: usize, - f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error>; - - /// Read a tuple value. - /// - /// * `len` is the number of items in the tuple. - /// * `f` is a function that will call `read_tuple_arg` for each item in the - /// tuple. - /// - /// Note that external `Decodable` implementations should not normally need - /// to use this method directly; it is meant for the use of this module's - /// own implementation of `Decodable` for tuples. - fn read_tuple<T, F>(&mut self, len: usize, f: F) -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error>; - - /// Read a data item for a tuple. - /// - /// This should only be called from a function passed to `read_tuple`. - /// - /// * `a_idx` is the (zero-based) index of the data item. - /// * `f` is a function that will call the appropriate read method to encode - /// the data object. - /// - /// Note that tuple items must be read in order - starting with index `0` - /// and finishing with index `len-1`. - fn read_tuple_arg<T, F>(&mut self, a_idx: usize, f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error>; - - /// Read a tuple struct value. - /// - /// * `s_name` is the name of the tuple struct. - /// * `len` is the number of items in the tuple struct. - /// * `f` is a function that calls `read_tuple_struct_arg` for each member. - fn read_tuple_struct<T, F>(&mut self, s_name: &str, len: usize, f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error>; - - /// Read a data item for a tuple struct. - /// - /// This should only be called from a function passed to - /// `read_tuple_struct`. - /// - /// * `a_idx` is the (zero-based) index of the data item. - /// * `f` is a function that will call the appropriate read method to encode - /// the data object. - /// - /// Note that tuple struct items must be read in order - starting with index - /// `0` and finishing with index `len-1`. - fn read_tuple_struct_arg<T, F>(&mut self, a_idx: usize, f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error>; - - // Specialized types: - /// Read an optional value. - /// - /// `f` is a function that will will be passed be passed `false` if the - /// value is unset, and `true` if it is set. If the function is passed - /// `true`, it will call the appropriate read methods to read the associated - /// data type. - /// - /// This method allows decoders to handle `Option<T>` values specially, - /// rather than using the generic enum methods, because many encoding - /// formats have a built-in "optional" concept. - /// - /// Note that external `Decodable` implementations should not normally need - /// to use this method directly; it is meant for the use of this module's - /// own implementation of `Decodable` for `Option<T>`. - fn read_option<T, F>(&mut self, f: F) -> Result<T, Self::Error> - where F: FnMut(&mut Self, bool) -> Result<T, Self::Error>; - - /// Read a sequence of values. - /// - /// This should be used for both array-like ordered sequences and set-like - /// unordered ones. - /// - /// * `f` is a function that will be passed the length of the sequence, and - /// will call `read_seq_elt` for each value in the sequence. - fn read_seq<T, F>(&mut self, f: F) -> Result<T, Self::Error> - where F: FnOnce(&mut Self, usize) -> Result<T, Self::Error>; - - /// Read an element in the sequence. - /// - /// This should only be called from a function passed to `read_seq`. - /// - /// * `idx` is the (zero-based) index of the value in the sequence. - /// * `f` is a function that will call the appropriate read method to decode - /// the data object. - /// - /// Note that sequence elements must be read in order - starting with index - /// `0` and finishing with index `len-1`. - fn read_seq_elt<T, F>(&mut self, idx: usize, f: F) -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error>; - - /// Read an associative container (map). - /// - /// * `f` is a function that will be passed the number of entries in the - /// map, and will call `read_map_elt_key` and `read_map_elt_val` to decode - /// each entry. - fn read_map<T, F>(&mut self, f: F) -> Result<T, Self::Error> - where F: FnOnce(&mut Self, usize) -> Result<T, Self::Error>; - - /// Read the key for an entry in a map. - /// - /// This should only be called from a function passed to `read_map`. - /// - /// * `idx` is the (zero-based) index of the entry in the map - /// * `f` is a function that will call the appropriate read method to decode - /// the key. - /// - /// Note that map entries must be read in order - starting with index `0` - /// and finishing with index `len-1` - and for each entry, the key should be - /// read followed immediately by the value. - fn read_map_elt_key<T, F>(&mut self, idx: usize, f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error>; - - /// Read the value for an entry in a map. - /// - /// This should only be called from a function passed to `read_map`. - /// - /// * `idx` is the (zero-based) index of the entry in the map - /// * `f` is a function that will call the appropriate read method to decode - /// the value. - /// - /// Note that map entries must be read in order - starting with index `0` - /// and finishing with index `len-1` - and for each entry, the key should be - /// read followed immediately by the value. - fn read_map_elt_val<T, F>(&mut self, idx: usize, f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error>; - - // Failure - /// Record a decoding error. - /// - /// This allows `Decodable` implementations to report an error using a - /// `Decoder` implementation's error type when inconsistent data is read. - /// For example, when reading a fixed-length array and the wrong length is - /// given by `read_seq`. - fn error(&mut self, err: &str) -> Self::Error; -} - -/// Trait for serializing a type. -/// -/// This can be implemented for custom data types to allow them to be encoded -/// with `Encoder` implementations. Most of Rust's built-in or standard data -/// types (like `i32` and `Vec<T>`) have `Encodable` implementations provided by -/// this module. -/// -/// Note that, in general, you should let the compiler implement this for you by -/// using the `derive(RustcEncodable)` attribute. -/// -/// # Examples -/// -/// ```rust -/// extern crate rustc_serialize; -/// -/// #[derive(RustcEncodable)] -/// struct Point { -/// x: i32, -/// y: i32, -/// } -/// # fn main() {} -/// ``` -/// -/// This generates code equivalent to: -/// -/// ```rust -/// extern crate rustc_serialize; -/// use rustc_serialize::Encodable; -/// use rustc_serialize::Encoder; -/// -/// struct Point { -/// x: i32, -/// y: i32, -/// } -/// -/// impl Encodable for Point { -/// fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { -/// s.emit_struct("Point", 2, |s| { -/// try!(s.emit_struct_field("x", 0, |s| { -/// s.emit_i32(self.x) -/// })); -/// try!(s.emit_struct_field("y", 1, |s| { -/// s.emit_i32(self.y) -/// })); -/// Ok(()) -/// }) -/// } -/// } -/// # fn main() {} -/// ``` -pub trait Encodable { - /// Serialize a value using an `Encoder`. - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>; -} - -/// Trait for deserializing a type. -/// -/// This can be implemented for custom data types to allow them to be decoded -/// with `Decoder` implementations. Most of Rust's built-in or standard data -/// types (like `i32` and `Vec<T>`) have `Decodable` implementations provided by -/// this module. -/// -/// Note that, in general, you should let the compiler implement this for you by -/// using the `derive(RustcDecodable)` attribute. -/// -/// # Examples -/// -/// ```rust -/// extern crate rustc_serialize; -/// -/// #[derive(RustcDecodable)] -/// struct Point { -/// x: i32, -/// y: i32, -/// } -/// # fn main() {} -/// ``` -/// -/// This generates code equivalent to: -/// -/// ```rust -/// extern crate rustc_serialize; -/// use rustc_serialize::Decodable; -/// use rustc_serialize::Decoder; -/// -/// struct Point { -/// x: i32, -/// y: i32, -/// } -/// -/// impl Decodable for Point { -/// fn decode<D: Decoder>(d: &mut D) -> Result<Point, D::Error> { -/// d.read_struct("Point", 2, |d| { -/// let x = try!(d.read_struct_field("x", 0, |d| { d.read_i32() })); -/// let y = try!(d.read_struct_field("y", 1, |d| { d.read_i32() })); -/// Ok(Point{ x: x, y: y }) -/// }) -/// } -/// } -/// # fn main() {} -/// ``` -pub trait Decodable: Sized { - /// Deserialize a value using a `Decoder`. - fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error>; -} - -impl Encodable for usize { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_usize(*self) - } -} - -impl Decodable for usize { - fn decode<D: Decoder>(d: &mut D) -> Result<usize, D::Error> { - d.read_usize() - } -} - -impl Encodable for u8 { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_u8(*self) - } -} - -impl Decodable for u8 { - fn decode<D: Decoder>(d: &mut D) -> Result<u8, D::Error> { - d.read_u8() - } -} - -impl Encodable for u16 { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_u16(*self) - } -} - -impl Decodable for u16 { - fn decode<D: Decoder>(d: &mut D) -> Result<u16, D::Error> { - d.read_u16() - } -} - -impl Encodable for u32 { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_u32(*self) - } -} - -impl Decodable for u32 { - fn decode<D: Decoder>(d: &mut D) -> Result<u32, D::Error> { - d.read_u32() - } -} - -impl Encodable for u64 { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_u64(*self) - } -} - -impl Decodable for u64 { - fn decode<D: Decoder>(d: &mut D) -> Result<u64, D::Error> { - d.read_u64() - } -} - -impl Encodable for isize { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_isize(*self) - } -} - -impl Decodable for isize { - fn decode<D: Decoder>(d: &mut D) -> Result<isize, D::Error> { - d.read_isize() - } -} - -impl Encodable for i8 { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_i8(*self) - } -} - -impl Decodable for i8 { - fn decode<D: Decoder>(d: &mut D) -> Result<i8, D::Error> { - d.read_i8() - } -} - -impl Encodable for i16 { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_i16(*self) - } -} - -impl Decodable for i16 { - fn decode<D: Decoder>(d: &mut D) -> Result<i16, D::Error> { - d.read_i16() - } -} - -impl Encodable for i32 { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_i32(*self) - } -} - -impl Decodable for i32 { - fn decode<D: Decoder>(d: &mut D) -> Result<i32, D::Error> { - d.read_i32() - } -} - -impl Encodable for i64 { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_i64(*self) - } -} - -impl Decodable for i64 { - fn decode<D: Decoder>(d: &mut D) -> Result<i64, D::Error> { - d.read_i64() - } -} - -impl Encodable for str { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_str(self) - } -} - -impl Encodable for String { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_str(self) - } -} - -impl Decodable for String { - fn decode<D: Decoder>(d: &mut D) -> Result<String, D::Error> { - d.read_str() - } -} - -impl Encodable for f32 { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_f32(*self) - } -} - -impl Decodable for f32 { - fn decode<D: Decoder>(d: &mut D) -> Result<f32, D::Error> { - d.read_f32() - } -} - -impl Encodable for f64 { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_f64(*self) - } -} - -impl Decodable for f64 { - fn decode<D: Decoder>(d: &mut D) -> Result<f64, D::Error> { - d.read_f64() - } -} - -impl Encodable for bool { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_bool(*self) - } -} - -impl Decodable for bool { - fn decode<D: Decoder>(d: &mut D) -> Result<bool, D::Error> { - d.read_bool() - } -} - -impl Encodable for char { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_char(*self) - } -} - -impl Decodable for char { - fn decode<D: Decoder>(d: &mut D) -> Result<char, D::Error> { - d.read_char() - } -} - -impl Encodable for () { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_nil() - } -} - -impl Decodable for () { - fn decode<D: Decoder>(d: &mut D) -> Result<(), D::Error> { - d.read_nil() - } -} - -impl<'a, T: ?Sized + Encodable> Encodable for &'a T { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - (**self).encode(s) - } -} - -impl<T: ?Sized + Encodable> Encodable for Box<T> { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - (**self).encode(s) - } -} - -impl< T: Decodable> Decodable for Box<T> { - fn decode<D: Decoder>(d: &mut D) -> Result<Box<T>, D::Error> { - Ok(Box::new(try!(Decodable::decode(d)))) - } -} - -impl< T: Decodable> Decodable for Box<[T]> { - fn decode<D: Decoder>(d: &mut D) -> Result<Box<[T]>, D::Error> { - let v: Vec<T> = try!(Decodable::decode(d)); - Ok(v.into_boxed_slice()) - } -} - -impl<T:Encodable> Encodable for Rc<T> { - #[inline] - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - (**self).encode(s) - } -} - -impl<T:Decodable> Decodable for Rc<T> { - #[inline] - fn decode<D: Decoder>(d: &mut D) -> Result<Rc<T>, D::Error> { - Ok(Rc::new(try!(Decodable::decode(d)))) - } -} - -impl<'a, T:Encodable + ToOwned + ?Sized> Encodable for Cow<'a, T> { - #[inline] - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - (**self).encode(s) - } -} - -impl<'a, T: ?Sized> Decodable for Cow<'a, T> - where T: ToOwned, T::Owned: Decodable -{ - #[inline] - fn decode<D: Decoder>(d: &mut D) -> Result<Cow<'static, T>, D::Error> { - Ok(Cow::Owned(try!(Decodable::decode(d)))) - } -} - -impl<T:Encodable> Encodable for [T] { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_seq(self.len(), |s| { - for (i, e) in self.iter().enumerate() { - try!(s.emit_seq_elt(i, |s| e.encode(s))) - } - Ok(()) - }) - } -} - -impl<T:Encodable> Encodable for Vec<T> { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_seq(self.len(), |s| { - for (i, e) in self.iter().enumerate() { - try!(s.emit_seq_elt(i, |s| e.encode(s))) - } - Ok(()) - }) - } -} - -impl<T:Decodable> Decodable for Vec<T> { - fn decode<D: Decoder>(d: &mut D) -> Result<Vec<T>, D::Error> { - d.read_seq(|d, len| { - let mut v = Vec::with_capacity(cap_capacity::<T>(len)); - for i in 0..len { - v.push(try!(d.read_seq_elt(i, |d| Decodable::decode(d)))); - } - Ok(v) - }) - } -} - -impl<T:Encodable> Encodable for Option<T> { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_option(|s| { - match *self { - None => s.emit_option_none(), - Some(ref v) => s.emit_option_some(|s| v.encode(s)), - } - }) - } -} - -impl<T:Decodable> Decodable for Option<T> { - fn decode<D: Decoder>(d: &mut D) -> Result<Option<T>, D::Error> { - d.read_option(|d, b| { - if b { - Ok(Some(try!(Decodable::decode(d)))) - } else { - Ok(None) - } - }) - } -} - -impl<T:Encodable, E:Encodable> Encodable for Result<T, E> { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_enum("Result", |s| { - match *self { - Ok(ref v) => { - s.emit_enum_variant("Ok", 0, 1, |s| { - try!(s.emit_enum_variant_arg(0, |s| { - v.encode(s) - })); - Ok(()) - }) - } - Err(ref v) => { - s.emit_enum_variant("Err", 1, 1, |s| { - try!(s.emit_enum_variant_arg(0, |s| { - v.encode(s) - })); - Ok(()) - }) - } - } - }) - } -} - -impl<T: Decodable, E: Decodable> Decodable for Result<T, E> { - fn decode<D: Decoder>(d: &mut D) -> Result<Result<T, E>, D::Error> { - d.read_enum("Result", |d| { - d.read_enum_variant(&["Ok", "Err"], |d, idx| { - match idx { - 0 => { - d.read_enum_variant_arg(0, |d| { - T::decode(d) - }).map(|v| Ok(v)) - } - 1 => { - d.read_enum_variant_arg(0, |d| { - E::decode(d) - }).map(|v| Err(v)) - } - _ => panic!("Internal error"), - } - }) - }) - } -} - -impl<T> Encodable for PhantomData<T> { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_nil() - } -} - -impl<T> Decodable for PhantomData<T> { - fn decode<D: Decoder>(_d: &mut D) -> Result<PhantomData<T>, D::Error> { - Ok(PhantomData) - } -} - -macro_rules! peel { - ($name:ident, $($other:ident,)*) => (tuple! { $($other,)* }) -} - -/// Evaluates to the number of identifiers passed to it, for example: -/// `count_idents!(a, b, c) == 3 -macro_rules! count_idents { - () => { 0 }; - ($_i:ident, $($rest:ident,)*) => { 1 + count_idents!($($rest,)*) } -} - -macro_rules! tuple { - () => (); - ( $($name:ident,)+ ) => ( - impl<$($name:Decodable),*> Decodable for ($($name,)*) { - fn decode<D: Decoder>(d: &mut D) -> Result<($($name,)*), D::Error> { - let len: usize = count_idents!($($name,)*); - d.read_tuple(len, |d| { - let mut i = 0; - let ret = ($(try!(d.read_tuple_arg({ i+=1; i-1 }, - |d| -> Result<$name,D::Error> { - Decodable::decode(d) - })),)*); - return Ok(ret); - }) - } - } - impl<$($name:Encodable),*> Encodable for ($($name,)*) { - #[allow(non_snake_case)] - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - let ($(ref $name,)*) = *self; - let mut n = 0; - $(let $name = $name; n += 1;)* - s.emit_tuple(n, |s| { - let mut i = 0; - $(try!(s.emit_tuple_arg({ i+=1; i-1 }, |s| $name.encode(s)));)* - Ok(()) - }) - } - } - peel! { $($name,)* } - ) -} - -tuple! { T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, } - -macro_rules! array { - () => (); - ($len:expr, $($idx:expr,)*) => { - impl<T:Decodable> Decodable for [T; $len] { - fn decode<D: Decoder>(d: &mut D) -> Result<[T; $len], D::Error> { - d.read_seq(|d, len| { - if len != $len { - return Err(d.error("wrong array length")); - } - Ok([$( - try!(d.read_seq_elt($len - $idx - 1, - |d| Decodable::decode(d))) - ),*]) - }) - } - } - - impl<T:Encodable> Encodable for [T; $len] { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_seq($len, |s| { - for i in 0..$len { - try!(s.emit_seq_elt(i, |s| self[i].encode(s))); - } - Ok(()) - }) - } - } - array! { $($idx,)* } - } -} - -array! { - 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, - 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -} - -impl Encodable for path::Path { - #[cfg(target_os = "redox")] - fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> { - self.as_os_str().to_str().unwrap().encode(e) - } - #[cfg(unix)] - fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> { - use std::os::unix::prelude::*; - self.as_os_str().as_bytes().encode(e) - } - #[cfg(windows)] - fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> { - use std::os::windows::prelude::*; - let v = self.as_os_str().encode_wide().collect::<Vec<_>>(); - v.encode(e) - } -} - -impl Encodable for path::PathBuf { - fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> { - (**self).encode(e) - } -} - -impl Decodable for path::PathBuf { - #[cfg(target_os = "redox")] - fn decode<D: Decoder>(d: &mut D) -> Result<path::PathBuf, D::Error> { - let string: String = try!(Decodable::decode(d)); - let s: OsString = OsString::from(string); - let mut p = path::PathBuf::new(); - p.push(s); - Ok(p) - } - #[cfg(unix)] - fn decode<D: Decoder>(d: &mut D) -> Result<path::PathBuf, D::Error> { - use std::os::unix::prelude::*; - let bytes: Vec<u8> = try!(Decodable::decode(d)); - let s: OsString = OsStringExt::from_vec(bytes); - let mut p = path::PathBuf::new(); - p.push(s); - Ok(p) - } - #[cfg(windows)] - fn decode<D: Decoder>(d: &mut D) -> Result<path::PathBuf, D::Error> { - use std::os::windows::prelude::*; - let bytes: Vec<u16> = try!(Decodable::decode(d)); - let s: OsString = OsStringExt::from_wide(&bytes); - let mut p = path::PathBuf::new(); - p.push(s); - Ok(p) - } -} - -impl<T: Encodable + Copy> Encodable for Cell<T> { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - self.get().encode(s) - } -} - -impl<T: Decodable + Copy> Decodable for Cell<T> { - fn decode<D: Decoder>(d: &mut D) -> Result<Cell<T>, D::Error> { - Ok(Cell::new(try!(Decodable::decode(d)))) - } -} - -// FIXME: #15036 -// Should use `try_borrow`, returning a -// `encoder.error("attempting to Encode borrowed RefCell")` -// from `encode` when `try_borrow` returns `None`. - -impl<T: Encodable> Encodable for RefCell<T> { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - self.borrow().encode(s) - } -} - -impl<T: Decodable> Decodable for RefCell<T> { - fn decode<D: Decoder>(d: &mut D) -> Result<RefCell<T>, D::Error> { - Ok(RefCell::new(try!(Decodable::decode(d)))) - } -} - -impl<T:Encodable> Encodable for Arc<T> { - fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - (**self).encode(s) - } -} - -impl<T:Decodable+Send+Sync> Decodable for Arc<T> { - fn decode<D: Decoder>(d: &mut D) -> Result<Arc<T>, D::Error> { - Ok(Arc::new(try!(Decodable::decode(d)))) - } -} - -// ___________________________________________________________________________ -// Helper routines - -/// Trait with helper functions for implementing `Encodable`. -/// -/// This trait is implemented for everything that implements `Encoder`. -/// `Encodable` implementations can make use of it to make their implementations -/// easier. -pub trait EncoderHelpers: Encoder { - /// Emit a vector as a sequence. - /// - /// Storing sequences as vectors is a common pattern. This method makes - /// encoding such sequences easier by wrapping the calls to - /// `Encoder::emit_seq` and `Encoder::emit_seq_elt`. - /// - /// # Examples - /// - /// ``` - /// use rustc_serialize::Encodable; - /// use rustc_serialize::Encoder; - /// use rustc_serialize::EncoderHelpers; - /// - /// struct NumberSequence { - /// elements: Vec<i32>, - /// } - /// - /// impl Encodable for NumberSequence { - /// fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - /// s.emit_struct("NumberSequence", 1, |s| { - /// s.emit_struct_field("elements", 0, |s| { - /// s.emit_from_vec(&self.elements, |s,e| { - /// s.emit_i32(*e) - /// }) - /// }) - /// }) - /// } - /// } - /// ``` - fn emit_from_vec<T, F>(&mut self, v: &[T], f: F) - -> Result<(), <Self as Encoder>::Error> - where F: FnMut(&mut Self, &T) -> Result<(), <Self as Encoder>::Error>; -} - -impl<S:Encoder> EncoderHelpers for S { - fn emit_from_vec<T, F>(&mut self, v: &[T], mut f: F) -> Result<(), S::Error> where - F: FnMut(&mut S, &T) -> Result<(), S::Error>, - { - self.emit_seq(v.len(), |this| { - for (i, e) in v.iter().enumerate() { - try!(this.emit_seq_elt(i, |this| { - f(this, e) - })); - } - Ok(()) - }) - } -} - -/// Trait with helper functions for implementing `Decodable`. -/// -/// This trait is implemented for everything that implements `Decoder`. -/// `Decodable` implementations can make use of it to make their implementations -/// easier. -pub trait DecoderHelpers: Decoder { - /// Read a sequence into a vector. - /// - /// Storing sequences as vectors is a common pattern. This method makes - /// deserializing such sequences easier by wrapping the calls to - /// `Decoder::read_seq` and `Decoder::read_seq_elt`. - /// - /// # Examples - /// - /// ``` - /// use rustc_serialize::Decodable; - /// use rustc_serialize::Decoder; - /// use rustc_serialize::DecoderHelpers; - /// - /// struct NumberSequence { - /// elements: Vec<i32>, - /// } - /// - /// impl Decodable for NumberSequence { - /// fn decode<D: Decoder>(d: &mut D) -> Result<NumberSequence, D::Error> { - /// d.read_struct("NumberSequence", 2, |d| { - /// Ok(NumberSequence{ - /// elements: try!(d.read_struct_field("elements", 0, |d| { - /// d.read_to_vec(|d| { d.read_i32() }) - /// })) - /// }) - /// }) - /// } - /// } - /// ``` - fn read_to_vec<T, F>(&mut self, f: F) - -> Result<Vec<T>, <Self as Decoder>::Error> where - F: FnMut(&mut Self) -> Result<T, <Self as Decoder>::Error>; -} - -impl<D: Decoder> DecoderHelpers for D { - fn read_to_vec<T, F>(&mut self, mut f: F) -> Result<Vec<T>, D::Error> where F: - FnMut(&mut D) -> Result<T, D::Error>, - { - self.read_seq(|this, len| { - let mut v = Vec::with_capacity(cap_capacity::<T>(len)); - for i in 0..len { - v.push(try!(this.read_seq_elt(i, |this| f(this)))); - } - Ok(v) - }) - } -} - -#[test] -#[allow(unused_variables)] -fn capacity_rules() { - use std::usize::MAX; - use std::collections::{HashMap, HashSet}; - - struct MyDecoder; - impl Decoder for MyDecoder { - type Error = (); - - // Primitive types: - fn read_nil(&mut self) -> Result<(), Self::Error> { Err(()) } - fn read_usize(&mut self) -> Result<usize, Self::Error> { Err(()) } - fn read_u64(&mut self) -> Result<u64, Self::Error> { Err(()) } - fn read_u32(&mut self) -> Result<u32, Self::Error> { Err(()) } - fn read_u16(&mut self) -> Result<u16, Self::Error> { Err(()) } - fn read_u8(&mut self) -> Result<u8, Self::Error> { Err(()) } - fn read_isize(&mut self) -> Result<isize, Self::Error> { Err(()) } - fn read_i64(&mut self) -> Result<i64, Self::Error> { Err(()) } - fn read_i32(&mut self) -> Result<i32, Self::Error> { Err(()) } - fn read_i16(&mut self) -> Result<i16, Self::Error> { Err(()) } - fn read_i8(&mut self) -> Result<i8, Self::Error> { Err(()) } - fn read_bool(&mut self) -> Result<bool, Self::Error> { Err(()) } - fn read_f64(&mut self) -> Result<f64, Self::Error> { Err(()) } - fn read_f32(&mut self) -> Result<f32, Self::Error> { Err(()) } - fn read_char(&mut self) -> Result<char, Self::Error> { Err(()) } - fn read_str(&mut self) -> Result<String, Self::Error> { Err(()) } - - // Compound types: - fn read_enum<T, F>(&mut self, name: &str, f: F) -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) } - - fn read_enum_variant<T, F>(&mut self, names: &[&str], f: F) - -> Result<T, Self::Error> - where F: FnMut(&mut Self, usize) -> Result<T, Self::Error> { Err(()) } - fn read_enum_variant_arg<T, F>(&mut self, a_idx: usize, f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) } - - fn read_enum_struct_variant<T, F>(&mut self, names: &[&str], f: F) - -> Result<T, Self::Error> - where F: FnMut(&mut Self, usize) -> Result<T, Self::Error> { Err(()) } - fn read_enum_struct_variant_field<T, F>(&mut self, - f_name: &str, - f_idx: usize, - f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) } - - fn read_struct<T, F>(&mut self, s_name: &str, len: usize, f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) } - fn read_struct_field<T, F>(&mut self, - f_name: &str, - f_idx: usize, - f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) } - - fn read_tuple<T, F>(&mut self, len: usize, f: F) -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) } - fn read_tuple_arg<T, F>(&mut self, a_idx: usize, f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) } - - fn read_tuple_struct<T, F>(&mut self, s_name: &str, len: usize, f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) } - fn read_tuple_struct_arg<T, F>(&mut self, a_idx: usize, f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) } - - // Specialized types: - fn read_option<T, F>(&mut self, f: F) -> Result<T, Self::Error> - where F: FnMut(&mut Self, bool) -> Result<T, Self::Error> { Err(()) } - - fn read_seq<T, F>(&mut self, f: F) -> Result<T, Self::Error> - where F: FnOnce(&mut Self, usize) -> Result<T, Self::Error> { - f(self, MAX) - } - fn read_seq_elt<T, F>(&mut self, idx: usize, f: F) -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) } - - fn read_map<T, F>(&mut self, f: F) -> Result<T, Self::Error> - where F: FnOnce(&mut Self, usize) -> Result<T, Self::Error> { - f(self, MAX) - } - fn read_map_elt_key<T, F>(&mut self, idx: usize, f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) } - fn read_map_elt_val<T, F>(&mut self, idx: usize, f: F) - -> Result<T, Self::Error> - where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) } - - // Failure - fn error(&mut self, err: &str) -> Self::Error { () } - } - - let mut dummy = MyDecoder; - let vec_result: Result<Vec<u8>, ()> = Decodable::decode(&mut dummy); - assert!(vec_result.is_err()); - - let map_result: Result<HashMap<u8, u8>, ()> = Decodable::decode(&mut dummy); - assert!(map_result.is_err()); - - let set_result: Result<HashSet<u8>, ()> = Decodable::decode(&mut dummy); - assert!(set_result.is_err()); -} diff --git a/vendor/unicase/.cargo-checksum.json b/vendor/unicase/.cargo-checksum.json new file mode 100644 index 0000000000..a2d3c39454 --- /dev/null +++ b/vendor/unicase/.cargo-checksum.json @@ -0,0 +1 @@ +{"files":{"Cargo.toml":"d8b056d05f0794bcc0e8852424342570ce4b7536df4ef63c1eb2065091330e82","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"b6f96c1e11a9adb0a60ff1fa3da58bf89296ba8269b50fd330c610e3dfedb4dc","README.md":"4c322162a8ef03e352df3379bfa67dc68660c4aa229ebda28b86d91e7fdda743","build.rs":"ace1b64010b84b7fe3ae538aa8e9743d1a9e139ce32b3e2a9ddfd1a9c86f709d","src/ascii.rs":"400bb2510841a0c9b8d77f4c112de207a25a13630a43e140fee3fdb28ea8764d","src/lib.rs":"a4ceb95ec45e9b7f4a95ee53dd84e3194998e37edc4400f4d4b196e64f6ee210","src/unicode/map.rs":"fee453fd13707608fce636c462ab6d1ee7691f7ebf7c07df7ab0ed03dfa6a43f","src/unicode/mod.rs":"06a9a74af66936957a859740403d593afb4f1b6e9cb5797885ba8d2e7bc24934"},"package":"a84e5511b2a947f3ae965dcb29b13b7b1691b6e7332cf5dbc1744138d5acb7f6"} \ No newline at end of file diff --git a/vendor/unicase/Cargo.toml b/vendor/unicase/Cargo.toml new file mode 100644 index 0000000000..e16c29f944 --- /dev/null +++ b/vendor/unicase/Cargo.toml @@ -0,0 +1,28 @@ +# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO +# +# When uploading crates to the registry Cargo will automatically +# "normalize" Cargo.toml files for maximal compatibility +# with all versions of Cargo and also rewrite `path` dependencies +# to registry (e.g., crates.io) dependencies +# +# If you believe there's an error in this file please file an +# issue against the rust-lang/cargo repository. If you're +# editing this file be aware that the upstream Cargo.toml +# will likely look very different (and much more reasonable) + +[package] +name = "unicase" +version = "2.4.0" +authors = ["Sean McArthur <sean@seanmonstar.com>"] +build = "build.rs" +exclude = ["scripts/*"] +description = "A case-insensitive wrapper around strings." +documentation = "https://docs.rs/unicase" +keywords = ["lowercase", "case", "case-insensitive", "case-folding"] +license = "MIT/Apache-2.0" +repository = "https://github.com/seanmonstar/unicase" +[build-dependencies.version_check] +version = "0.1" + +[features] +nightly = [] diff --git a/vendor/unicase/LICENSE-APACHE b/vendor/unicase/LICENSE-APACHE new file mode 100644 index 0000000000..16fe87b06e --- /dev/null +++ b/vendor/unicase/LICENSE-APACHE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/vendor/unicase/LICENSE-MIT b/vendor/unicase/LICENSE-MIT new file mode 100644 index 0000000000..f9773ff376 --- /dev/null +++ b/vendor/unicase/LICENSE-MIT @@ -0,0 +1,20 @@ +Copyright (c) 2014-2017 Sean McArthur + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/vendor/unicase/README.md b/vendor/unicase/README.md new file mode 100644 index 0000000000..e880299feb --- /dev/null +++ b/vendor/unicase/README.md @@ -0,0 +1,31 @@ +# unicase + +[![Build Status](https://travis-ci.org/seanmonstar/unicase.svg?branch=master)](https://travis-ci.org/seanmonstar/unicase) + +[Documentation](https://docs.rs/unicase) + +Compare strings when case is not important. + +```rust +// ignore ASCII case +let a = UniCase::new("foobar"); +let b = UniCase::new("FOOBAR"); + +assert_eq!(a, b); + +// using unicode case-folding +let c = UniCase::new("Maße") +let d = UniCase::new("MASSE"); +assert_eq!(c, d); +``` + +## License + +Licensed under either of + +- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://apache.org/licenses/LICENSE-2.0) +- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) + +### Contribution + +Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. diff --git a/vendor/unicase/build.rs b/vendor/unicase/build.rs new file mode 100644 index 0000000000..0ed3d8defc --- /dev/null +++ b/vendor/unicase/build.rs @@ -0,0 +1,15 @@ +extern crate version_check as rustc; + +fn main() { + if rustc::is_min_version("1.5.0").map(|(is_min, _)| is_min).unwrap_or(true) { + println!("cargo:rustc-cfg=__unicase__iter_cmp"); + } + + if rustc::is_min_version("1.13.0").map(|(is_min, _)| is_min).unwrap_or(true) { + println!("cargo:rustc-cfg=__unicase__default_hasher"); + } + + if rustc::is_min_version("1.31.0").map(|(is_min, _)| is_min).unwrap_or(true) { + println!("cargo:rustc-cfg=__unicase__const_fns"); + } +} diff --git a/vendor/unicase/src/ascii.rs b/vendor/unicase/src/ascii.rs new file mode 100644 index 0000000000..d656cd2af9 --- /dev/null +++ b/vendor/unicase/src/ascii.rs @@ -0,0 +1,185 @@ +#[allow(deprecated, unused)] +use std::ascii::AsciiExt; +#[cfg(__unicase__iter_cmp)] +use std::cmp::Ordering; +use std::fmt; +use std::hash::{Hash, Hasher}; +use std::ops::{Deref, DerefMut}; +use std::str::FromStr; + +use super::{Ascii, Encoding, UniCase}; + +impl<S> Ascii<S> { + #[inline] + #[cfg(__unicase__const_fns)] + pub const fn new(s: S) -> Ascii<S> { + Ascii(s) + } + + /// Construct a new `Ascii`. + /// + /// For Rust versions >= 1.31, this is a `const fn`. + #[inline] + #[cfg(not(__unicase__const_fns))] + pub fn new(s: S) -> Ascii<S> { + Ascii(s) + } + + #[cfg(__unicase_const_fns)] + pub const fn into_unicase(self) -> UniCase<S> { + UniCase(Encoding::Ascii(self)) + } + + #[cfg(not(__unicase_const_fns))] + pub fn into_unicase(self) -> UniCase<S> { + UniCase(Encoding::Ascii(self)) + } + + #[inline] + pub fn into_inner(self) -> S { + self.0 + } +} + +impl<S> Deref for Ascii<S> { + type Target = S; + #[inline] + fn deref<'a>(&'a self) -> &'a S { + &self.0 + } +} + +impl<S> DerefMut for Ascii<S> { + #[inline] + fn deref_mut<'a>(&'a mut self) -> &'a mut S { + &mut self.0 + } +} + +#[cfg(__unicase__iter_cmp)] +impl<T: AsRef<str>> PartialOrd for Ascii<T> { + #[inline] + fn partial_cmp(&self, other: &Self) -> Option<Ordering> { + Some(self.cmp(other)) + } +} + +#[cfg(__unicase__iter_cmp)] +impl<T: AsRef<str>> Ord for Ascii<T> { + #[inline] + fn cmp(&self, other: &Self) -> Ordering { + let self_chars = self.as_ref().chars().map(|c| c.to_ascii_lowercase()); + let other_chars = other.as_ref().chars().map(|c| c.to_ascii_lowercase()); + self_chars.cmp(other_chars) + } +} + +impl<S: AsRef<str>> AsRef<str> for Ascii<S> { + #[inline] + fn as_ref(&self) -> &str { + self.0.as_ref() + } + +} + +impl<S: fmt::Display> fmt::Display for Ascii<S> { + #[inline] + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fmt::Display::fmt(&self.0, fmt) + } +} + +impl<S1: AsRef<str>> PartialEq<Ascii<S1>> for String { + #[inline] + fn eq(&self, other: &Ascii<S1>) -> bool { + other == self + } +} + +impl<'a, S1: AsRef<str>> PartialEq<Ascii<S1>> for &'a str { + #[inline] + fn eq(&self, other: &Ascii<S1>) -> bool { + other == self + } +} + +impl<S1: AsRef<str>, S2: AsRef<str>> PartialEq<S2> for Ascii<S1> { + #[inline] + fn eq(&self, other: &S2) -> bool { + self.as_ref().eq_ignore_ascii_case(other.as_ref()) + } +} + +impl<S: AsRef<str>> Eq for Ascii<S> {} + +impl<S: FromStr> FromStr for Ascii<S> { + type Err = <S as FromStr>::Err; + fn from_str(s: &str) -> Result<Ascii<S>, <S as FromStr>::Err> { + s.parse().map(Ascii) + } +} + +impl<S: AsRef<str>> Hash for Ascii<S> { + #[inline] + fn hash<H: Hasher>(&self, hasher: &mut H) { + for byte in self.as_ref().bytes().map(|b| b.to_ascii_lowercase()) { + hasher.write_u8(byte); + } + } +} + +#[cfg(test)] +mod tests { + use ::Ascii; + use std::hash::{Hash, Hasher}; + #[cfg(not(__unicase__default_hasher))] + use std::hash::SipHasher as DefaultHasher; + #[cfg(__unicase__default_hasher)] + use std::collections::hash_map::DefaultHasher; + + fn hash<T: Hash>(t: &T) -> u64 { + let mut s = DefaultHasher::new(); + t.hash(&mut s); + s.finish() + } + + #[test] + fn test_case_insensitive() { + let a = Ascii("foobar"); + let b = Ascii("FOOBAR"); + + assert_eq!(a, b); + assert_eq!(hash(&a), hash(&b)); + + assert_eq!(a, "fooBar"); + assert_eq!("fooBar", a); + assert_eq!(String::from("fooBar"), a); + assert_eq!(a, String::from("fooBar")); + } + + #[cfg(feature = "nightly")] + #[bench] + fn bench_ascii_eq(b: &mut ::test::Bencher) { + b.bytes = b"foobar".len() as u64; + b.iter(|| assert_eq!(Ascii("foobar"), Ascii("FOOBAR"))); + } + + #[cfg(__unicase__iter_cmp)] + #[test] + fn test_case_cmp() { + assert!(Ascii("foobar") == Ascii("FOOBAR")); + assert!(Ascii("a") < Ascii("B")); + + assert!(Ascii("A") < Ascii("b")); + assert!(Ascii("aa") > Ascii("a")); + + assert!(Ascii("a") < Ascii("aa")); + assert!(Ascii("a") < Ascii("AA")); + } + + #[cfg(__unicase__const_fns)] + #[test] + fn test_ascii_new_const() { + const _ASCII: Ascii<&'static str> = Ascii::new(""); + } +} diff --git a/vendor/unicase/src/lib.rs b/vendor/unicase/src/lib.rs new file mode 100644 index 0000000000..246cb8b05f --- /dev/null +++ b/vendor/unicase/src/lib.rs @@ -0,0 +1,432 @@ +#![cfg_attr(test, deny(missing_docs))] +#![cfg_attr(test, deny(warnings))] +#![doc(html_root_url = "https://docs.rs/unicase/2.4.0")] +#![cfg_attr(feature = "nightly", feature(test))] + +//! # UniCase +//! +//! UniCase provides a way of specifying strings that are case-insensitive. +//! +//! UniCase supports full [Unicode case +//! folding](https://www.w3.org/International/wiki/Case_folding). It can also +//! utilize faster ASCII case comparisons, if both strings are ASCII. +//! +//! Using the `UniCase::new()` constructor will check the string to see if it +//! is all ASCII. When a `UniCase` is compared against another, if both are +//! ASCII, it will use the faster comparison. +//! +//! There also exists the `Ascii` type in this crate, which will always assume +//! to use the ASCII case comparisons, if the encoding is already known. +//! +//! ## Example +//! +//! ```rust +//! use unicase::UniCase; +//! +//! let a = UniCase::new("Maße"); +//! let b = UniCase::new("MASSE"); +//! let c = UniCase::new("mase"); +//! +//! assert_eq!(a, b); +//! assert!(b != c); +//! ``` +//! +//! ## Ascii +//! +//! ```rust +//! use unicase::Ascii; +//! +//! let a = Ascii::new("foobar"); +//! let b = Ascii::new("FoObAr"); +//! +//! assert_eq!(a, b); +//! ``` + +#[cfg(feature = "nightly")] +extern crate test; + +use std::borrow::Cow; +#[cfg(__unicase__iter_cmp)] +use std::cmp::Ordering; +use std::fmt; +use std::hash::{Hash, Hasher}; +use std::ops::{Deref, DerefMut}; +use std::str::FromStr; + +use self::unicode::Unicode; + +mod ascii; +mod unicode; + +/// Case Insensitive wrapper of strings. +#[derive(Clone, Copy)] +pub struct UniCase<S>(Encoding<S>); + +/// Case Insensitive wrapper of Ascii strings. +#[derive(Clone, Copy, Debug, Default)] +pub struct Ascii<S>(S); + +/// Compare two string-like types for case-less equality, using unicode folding. +/// +/// Equivalent to `UniCase::new(left) == UniCase::new(right)`. +/// +/// Note: This will perform a scan for ASCII characters before doing the +/// the comparison. See `UniCase` for more information. +#[inline] +pub fn eq<S: AsRef<str> + ?Sized>(left: &S, right: &S) -> bool { + UniCase::new(left) == UniCase::new(right) +} + +/// Compare two string-like types for case-less equality, ignoring ASCII case. +/// +/// Equivalent to `Ascii::new(left) == Ascii::new(right)`. +#[inline] +pub fn eq_ascii<S: AsRef<str> + ?Sized>(left: &S, right: &S) -> bool { + Ascii(left) == Ascii(right) +} + +#[derive(Clone, Copy, Debug)] +enum Encoding<S> { + Ascii(Ascii<S>), + Unicode(Unicode<S>), +} + +macro_rules! inner { + + (mut $e:expr) => ({ + match &mut $e { + &mut Encoding::Ascii(ref mut s) => &mut s.0, + &mut Encoding::Unicode(ref mut s) => &mut s.0, + } + }); + ($e:expr) => ({ + match &$e { + &Encoding::Ascii(ref s) => &s.0, + &Encoding::Unicode(ref s) => &s.0, + } + }); +} + +impl<S: AsRef<str> + Default> Default for UniCase<S> { + fn default() -> Self { + Self::new(Default::default()) + } +} + +impl<S: AsRef<str>> UniCase<S> { + /// Creates a new `UniCase`. + /// + /// Note: This scans the text to determine if it is all ASCII or not. + pub fn new(s: S) -> UniCase<S> { + #[allow(deprecated, unused)] + use std::ascii::AsciiExt; + if s.as_ref().is_ascii() { + UniCase(Encoding::Ascii(Ascii(s))) + } else { + UniCase(Encoding::Unicode(Unicode(s))) + } + } +} + +impl<S> UniCase<S> { + /// Creates a new `UniCase`, skipping the ASCII check. + #[cfg(__unicase__const_fns)] + pub const fn unicode(s: S) -> UniCase<S> { + UniCase(Encoding::Unicode(Unicode(s))) + } + + /// Creates a new `UniCase`, skipping the ASCII check. + /// + /// For Rust versions >= 1.31, this is a `const fn`. + #[cfg(not(__unicase__const_fns))] + pub fn unicode(s: S) -> UniCase<S> { + UniCase(Encoding::Unicode(Unicode(s))) + } + + /// Creates a new `UniCase` which performs only ASCII case folding. + #[cfg(__unicase__const_fns)] + pub const fn ascii(s: S) -> UniCase<S> { + UniCase(Encoding::Ascii(Ascii(s))) + } + + /// Creates a new `UniCase` which performs only ASCII case folding. + /// + /// For Rust versions >= 1.31, this is a `const fn`. + #[cfg(not(__unicase__const_fns))] + pub fn ascii(s: S) -> UniCase<S> { + UniCase(Encoding::Ascii(Ascii(s))) + } + + /// Return `true` if this instance will only perform ASCII case folding. + pub fn is_ascii(&self) -> bool { + match self.0 { + Encoding::Ascii(_) => true, + Encoding::Unicode(_) => false, + } + } + + /// Unwraps the inner value held by this `UniCase`. + #[inline] + pub fn into_inner(self) -> S { + match self.0 { + Encoding::Ascii(s) => s.0, + Encoding::Unicode(s) => s.0, + } + } +} + +impl<S> Deref for UniCase<S> { + type Target = S; + #[inline] + fn deref<'a>(&'a self) -> &'a S { + inner!(self.0) + } +} + +impl<S> DerefMut for UniCase<S> { + #[inline] + fn deref_mut<'a>(&'a mut self) -> &'a mut S { + inner!(mut self.0) + } +} + +impl<S: AsRef<str>> AsRef<str> for UniCase<S> { + #[inline] + fn as_ref(&self) -> &str { + inner!(self.0).as_ref() + } + +} + +impl<S: fmt::Debug> fmt::Debug for UniCase<S> { + #[inline] + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fmt::Debug::fmt(inner!(self.0), fmt) + } +} + +impl<S: fmt::Display> fmt::Display for UniCase<S> { + #[inline] + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fmt::Display::fmt(inner!(self.0), fmt) + } +} + + +impl<S1: AsRef<str>, S2: AsRef<str>> PartialEq<UniCase<S2>> for UniCase<S1> { + #[inline] + fn eq(&self, other: &UniCase<S2>) -> bool { + match (&self.0, &other.0) { + (&Encoding::Ascii(ref x), &Encoding::Ascii(ref y)) => x == y, + (&Encoding::Unicode(ref x), &Encoding::Unicode(ref y)) => x == y, + (&Encoding::Ascii(ref x), &Encoding::Unicode(ref y)) => &Unicode(x.as_ref()) == y, + (&Encoding::Unicode(ref x), &Encoding::Ascii(ref y)) => x == &Unicode(y.as_ref()), + } + } +} + +impl<S: AsRef<str>> Eq for UniCase<S> {} + +impl<S: AsRef<str>> Hash for UniCase<S> { + #[inline] + fn hash<H: Hasher>(&self, hasher: &mut H) { + match self.0 { + Encoding::Ascii(ref s) => s.hash(hasher), + Encoding::Unicode(ref s) => s.hash(hasher) + } + } +} + +impl<S> From<Ascii<S>> for UniCase<S> { + fn from(ascii: Ascii<S>) -> Self { + UniCase(Encoding::Ascii(ascii)) + } +} + +macro_rules! from_impl { + ($from:ty => $to:ty; $by:ident) => ( + impl<'a> From<$from> for UniCase<$to> { + fn from(s: $from) -> Self { + UniCase::unicode(s.$by()) + } + } + ); + ($from:ty => $to:ty) => ( from_impl!($from => $to; into); ) +} + +macro_rules! into_impl { + ($to:ty) => ( + impl<'a> Into<$to> for UniCase<$to> { + fn into(self) -> $to { + self.into_inner() + } + } + ); +} + +impl<S: AsRef<str>> From<S> for UniCase<S> { + fn from(s: S) -> Self { + UniCase::unicode(s) + } +} + +from_impl!(&'a str => Cow<'a, str>); +from_impl!(String => Cow<'a, str>); +from_impl!(&'a str => String); +from_impl!(Cow<'a, str> => String; into_owned); +from_impl!(&'a String => &'a str; as_ref); + +into_impl!(&'a str); +into_impl!(String); +into_impl!(Cow<'a, str>); + +#[cfg(__unicase__iter_cmp)] +impl<T: AsRef<str>> PartialOrd for UniCase<T> { + #[inline] + fn partial_cmp(&self, other: &Self) -> Option<Ordering> { + Some(self.cmp(other)) + } +} + +#[cfg(__unicase__iter_cmp)] +impl<T: AsRef<str>> Ord for UniCase<T> { + #[inline] + fn cmp(&self, other: &Self) -> Ordering { + match (&self.0, &other.0) { + (&Encoding::Ascii(ref x), &Encoding::Ascii(ref y)) => x.cmp(y), + (&Encoding::Unicode(ref x), &Encoding::Unicode(ref y)) => x.cmp(y), + (&Encoding::Ascii(ref x), &Encoding::Unicode(ref y)) => Unicode(x.as_ref()).cmp(&Unicode(y.0.as_ref())), + (&Encoding::Unicode(ref x), &Encoding::Ascii(ref y)) => Unicode(x.0.as_ref()).cmp(&Unicode(y.as_ref())), + } + } +} + + + +impl<S: FromStr + AsRef<str>> FromStr for UniCase<S> { + type Err = <S as FromStr>::Err; + fn from_str(s: &str) -> Result<UniCase<S>, Self::Err> { + s.parse().map(UniCase::new) + } +} + +#[cfg(test)] +mod tests { + use super::UniCase; + use std::hash::{Hash, Hasher}; + #[cfg(not(__unicase__default_hasher))] + use std::hash::SipHasher as DefaultHasher; + #[cfg(__unicase__default_hasher)] + use std::collections::hash_map::DefaultHasher; + + fn hash<T: Hash>(t: &T) -> u64 { + let mut s = DefaultHasher::new(); + t.hash(&mut s); + s.finish() + } + + #[test] + fn test_copy_for_refs() { + fn foo<T>(_: UniCase<T>) {} + + let a = UniCase::new("foobar"); + foo(a); + foo(a); + } + + #[test] + fn test_eq_ascii() { + let a = UniCase::new("foobar"); + let b = UniCase::new("FOOBAR"); + let c = UniCase::ascii("FoObAr"); + + assert_eq!(a, b); + assert_eq!(a, c); + assert_eq!(hash(&a), hash(&b)); + assert_eq!(hash(&a), hash(&c)); + assert!(a.is_ascii()); + assert!(b.is_ascii()); + assert!(c.is_ascii()); + } + + #[test] + fn test_eq_unicode() { + let a = UniCase::new("στιγμας"); + let b = UniCase::new("στιγμασ"); + assert_eq!(a, b); + assert_eq!(hash(&a), hash(&b)); + } + + #[cfg(feature = "nightly")] + #[bench] + fn bench_unicase_ascii(b: &mut ::test::Bencher) { + b.bytes = b"foobar".len() as u64; + let x = UniCase::new("foobar"); + let y = UniCase::new("FOOBAR"); + b.iter(|| assert_eq!(x, y)); + } + + #[cfg(feature = "nightly")] + static SUBJECT: &'static [u8] = b"ffoo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz oo bar baz quux herp derp"; + + #[cfg(feature = "nightly")] + #[inline(never)] + fn is_ascii(bytes: &[u8]) -> bool { + #[allow(unused, deprecated)] + use std::ascii::AsciiExt; + bytes.is_ascii() + } + + #[cfg(feature = "nightly")] + #[bench] + fn bench_is_ascii(b: &mut ::test::Bencher) { + b.iter(|| assert!(is_ascii(SUBJECT))); + } + + #[cfg(feature = "nightly")] + #[bench] + fn bench_is_utf8(b: &mut ::test::Bencher) { + b.iter(|| assert!(::std::str::from_utf8(SUBJECT).is_ok())); + } + + #[cfg(__unicase__iter_cmp)] + #[test] + fn test_case_cmp() { + assert!(UniCase::new("a") < UniCase::new("B")); + + assert!(UniCase::new("A") < UniCase::new("b")); + assert!(UniCase::new("aa") > UniCase::new("a")); + + assert!(UniCase::new("a") < UniCase::new("aa")); + assert!(UniCase::new("a") < UniCase::new("AA")); + } + + #[test] + fn test_from_impls() { + let view: &'static str = "foobar"; + let _: UniCase<&'static str> = view.into(); + let _: UniCase<&str> = view.into(); + let _: UniCase<String> = view.into(); + + let owned: String = view.to_owned(); + let _: UniCase<&str> = (&owned).into(); + let _: UniCase<String> = owned.into(); + } + + #[test] + fn test_into_impls() { + let view: UniCase<&'static str> = UniCase::new("foobar"); + let _: &'static str = view.into(); + let _: &str = view.into(); + + let owned: UniCase<String> = "foobar".into(); + let _: String = owned.clone().into(); + let _: &str = owned.as_ref(); + } + + #[cfg(__unicase__const_fns)] + #[test] + fn test_unicase_unicode_const() { + const _UNICASE: UniCase<&'static str> = UniCase::unicode(""); + } +} diff --git a/vendor/unicase/src/unicode/map.rs b/vendor/unicase/src/unicode/map.rs new file mode 100644 index 0000000000..e71191810e --- /dev/null +++ b/vendor/unicase/src/unicode/map.rs @@ -0,0 +1,1497 @@ +// Generated by scripts/mapgen.py +// 2019-03-05 + +use super::fold::Fold; + +pub fn lookup(orig: char) -> Fold { + match orig as u32 { + 0x0041 => Fold::One('\u{0061}',), + 0x0042 => Fold::One('\u{0062}',), + 0x0043 => Fold::One('\u{0063}',), + 0x0044 => Fold::One('\u{0064}',), + 0x0045 => Fold::One('\u{0065}',), + 0x0046 => Fold::One('\u{0066}',), + 0x0047 => Fold::One('\u{0067}',), + 0x0048 => Fold::One('\u{0068}',), + 0x0049 => Fold::One('\u{0069}',), + 0x004A => Fold::One('\u{006A}',), + 0x004B => Fold::One('\u{006B}',), + 0x004C => Fold::One('\u{006C}',), + 0x004D => Fold::One('\u{006D}',), + 0x004E => Fold::One('\u{006E}',), + 0x004F => Fold::One('\u{006F}',), + 0x0050 => Fold::One('\u{0070}',), + 0x0051 => Fold::One('\u{0071}',), + 0x0052 => Fold::One('\u{0072}',), + 0x0053 => Fold::One('\u{0073}',), + 0x0054 => Fold::One('\u{0074}',), + 0x0055 => Fold::One('\u{0075}',), + 0x0056 => Fold::One('\u{0076}',), + 0x0057 => Fold::One('\u{0077}',), + 0x0058 => Fold::One('\u{0078}',), + 0x0059 => Fold::One('\u{0079}',), + 0x005A => Fold::One('\u{007A}',), + 0x00B5 => Fold::One('\u{03BC}',), + 0x00C0 => Fold::One('\u{00E0}',), + 0x00C1 => Fold::One('\u{00E1}',), + 0x00C2 => Fold::One('\u{00E2}',), + 0x00C3 => Fold::One('\u{00E3}',), + 0x00C4 => Fold::One('\u{00E4}',), + 0x00C5 => Fold::One('\u{00E5}',), + 0x00C6 => Fold::One('\u{00E6}',), + 0x00C7 => Fold::One('\u{00E7}',), + 0x00C8 => Fold::One('\u{00E8}',), + 0x00C9 => Fold::One('\u{00E9}',), + 0x00CA => Fold::One('\u{00EA}',), + 0x00CB => Fold::One('\u{00EB}',), + 0x00CC => Fold::One('\u{00EC}',), + 0x00CD => Fold::One('\u{00ED}',), + 0x00CE => Fold::One('\u{00EE}',), + 0x00CF => Fold::One('\u{00EF}',), + 0x00D0 => Fold::One('\u{00F0}',), + 0x00D1 => Fold::One('\u{00F1}',), + 0x00D2 => Fold::One('\u{00F2}',), + 0x00D3 => Fold::One('\u{00F3}',), + 0x00D4 => Fold::One('\u{00F4}',), + 0x00D5 => Fold::One('\u{00F5}',), + 0x00D6 => Fold::One('\u{00F6}',), + 0x00D8 => Fold::One('\u{00F8}',), + 0x00D9 => Fold::One('\u{00F9}',), + 0x00DA => Fold::One('\u{00FA}',), + 0x00DB => Fold::One('\u{00FB}',), + 0x00DC => Fold::One('\u{00FC}',), + 0x00DD => Fold::One('\u{00FD}',), + 0x00DE => Fold::One('\u{00FE}',), + 0x00DF => Fold::Two('\u{0073}', '\u{0073}',), + 0x0100 => Fold::One('\u{0101}',), + 0x0102 => Fold::One('\u{0103}',), + 0x0104 => Fold::One('\u{0105}',), + 0x0106 => Fold::One('\u{0107}',), + 0x0108 => Fold::One('\u{0109}',), + 0x010A => Fold::One('\u{010B}',), + 0x010C => Fold::One('\u{010D}',), + 0x010E => Fold::One('\u{010F}',), + 0x0110 => Fold::One('\u{0111}',), + 0x0112 => Fold::One('\u{0113}',), + 0x0114 => Fold::One('\u{0115}',), + 0x0116 => Fold::One('\u{0117}',), + 0x0118 => Fold::One('\u{0119}',), + 0x011A => Fold::One('\u{011B}',), + 0x011C => Fold::One('\u{011D}',), + 0x011E => Fold::One('\u{011F}',), + 0x0120 => Fold::One('\u{0121}',), + 0x0122 => Fold::One('\u{0123}',), + 0x0124 => Fold::One('\u{0125}',), + 0x0126 => Fold::One('\u{0127}',), + 0x0128 => Fold::One('\u{0129}',), + 0x012A => Fold::One('\u{012B}',), + 0x012C => Fold::One('\u{012D}',), + 0x012E => Fold::One('\u{012F}',), + 0x0130 => Fold::Two('\u{0069}', '\u{0307}',), + 0x0132 => Fold::One('\u{0133}',), + 0x0134 => Fold::One('\u{0135}',), + 0x0136 => Fold::One('\u{0137}',), + 0x0139 => Fold::One('\u{013A}',), + 0x013B => Fold::One('\u{013C}',), + 0x013D => Fold::One('\u{013E}',), + 0x013F => Fold::One('\u{0140}',), + 0x0141 => Fold::One('\u{0142}',), + 0x0143 => Fold::One('\u{0144}',), + 0x0145 => Fold::One('\u{0146}',), + 0x0147 => Fold::One('\u{0148}',), + 0x0149 => Fold::Two('\u{02BC}', '\u{006E}',), + 0x014A => Fold::One('\u{014B}',), + 0x014C => Fold::One('\u{014D}',), + 0x014E => Fold::One('\u{014F}',), + 0x0150 => Fold::One('\u{0151}',), + 0x0152 => Fold::One('\u{0153}',), + 0x0154 => Fold::One('\u{0155}',), + 0x0156 => Fold::One('\u{0157}',), + 0x0158 => Fold::One('\u{0159}',), + 0x015A => Fold::One('\u{015B}',), + 0x015C => Fold::One('\u{015D}',), + 0x015E => Fold::One('\u{015F}',), + 0x0160 => Fold::One('\u{0161}',), + 0x0162 => Fold::One('\u{0163}',), + 0x0164 => Fold::One('\u{0165}',), + 0x0166 => Fold::One('\u{0167}',), + 0x0168 => Fold::One('\u{0169}',), + 0x016A => Fold::One('\u{016B}',), + 0x016C => Fold::One('\u{016D}',), + 0x016E => Fold::One('\u{016F}',), + 0x0170 => Fold::One('\u{0171}',), + 0x0172 => Fold::One('\u{0173}',), + 0x0174 => Fold::One('\u{0175}',), + 0x0176 => Fold::One('\u{0177}',), + 0x0178 => Fold::One('\u{00FF}',), + 0x0179 => Fold::One('\u{017A}',), + 0x017B => Fold::One('\u{017C}',), + 0x017D => Fold::One('\u{017E}',), + 0x017F => Fold::One('\u{0073}',), + 0x0181 => Fold::One('\u{0253}',), + 0x0182 => Fold::One('\u{0183}',), + 0x0184 => Fold::One('\u{0185}',), + 0x0186 => Fold::One('\u{0254}',), + 0x0187 => Fold::One('\u{0188}',), + 0x0189 => Fold::One('\u{0256}',), + 0x018A => Fold::One('\u{0257}',), + 0x018B => Fold::One('\u{018C}',), + 0x018E => Fold::One('\u{01DD}',), + 0x018F => Fold::One('\u{0259}',), + 0x0190 => Fold::One('\u{025B}',), + 0x0191 => Fold::One('\u{0192}',), + 0x0193 => Fold::One('\u{0260}',), + 0x0194 => Fold::One('\u{0263}',), + 0x0196 => Fold::One('\u{0269}',), + 0x0197 => Fold::One('\u{0268}',), + 0x0198 => Fold::One('\u{0199}',), + 0x019C => Fold::One('\u{026F}',), + 0x019D => Fold::One('\u{0272}',), + 0x019F => Fold::One('\u{0275}',), + 0x01A0 => Fold::One('\u{01A1}',), + 0x01A2 => Fold::One('\u{01A3}',), + 0x01A4 => Fold::One('\u{01A5}',), + 0x01A6 => Fold::One('\u{0280}',), + 0x01A7 => Fold::One('\u{01A8}',), + 0x01A9 => Fold::One('\u{0283}',), + 0x01AC => Fold::One('\u{01AD}',), + 0x01AE => Fold::One('\u{0288}',), + 0x01AF => Fold::One('\u{01B0}',), + 0x01B1 => Fold::One('\u{028A}',), + 0x01B2 => Fold::One('\u{028B}',), + 0x01B3 => Fold::One('\u{01B4}',), + 0x01B5 => Fold::One('\u{01B6}',), + 0x01B7 => Fold::One('\u{0292}',), + 0x01B8 => Fold::One('\u{01B9}',), + 0x01BC => Fold::One('\u{01BD}',), + 0x01C4 => Fold::One('\u{01C6}',), + 0x01C5 => Fold::One('\u{01C6}',), + 0x01C7 => Fold::One('\u{01C9}',), + 0x01C8 => Fold::One('\u{01C9}',), + 0x01CA => Fold::One('\u{01CC}',), + 0x01CB => Fold::One('\u{01CC}',), + 0x01CD => Fold::One('\u{01CE}',), + 0x01CF => Fold::One('\u{01D0}',), + 0x01D1 => Fold::One('\u{01D2}',), + 0x01D3 => Fold::One('\u{01D4}',), + 0x01D5 => Fold::One('\u{01D6}',), + 0x01D7 => Fold::One('\u{01D8}',), + 0x01D9 => Fold::One('\u{01DA}',), + 0x01DB => Fold::One('\u{01DC}',), + 0x01DE => Fold::One('\u{01DF}',), + 0x01E0 => Fold::One('\u{01E1}',), + 0x01E2 => Fold::One('\u{01E3}',), + 0x01E4 => Fold::One('\u{01E5}',), + 0x01E6 => Fold::One('\u{01E7}',), + 0x01E8 => Fold::One('\u{01E9}',), + 0x01EA => Fold::One('\u{01EB}',), + 0x01EC => Fold::One('\u{01ED}',), + 0x01EE => Fold::One('\u{01EF}',), + 0x01F0 => Fold::Two('\u{006A}', '\u{030C}',), + 0x01F1 => Fold::One('\u{01F3}',), + 0x01F2 => Fold::One('\u{01F3}',), + 0x01F4 => Fold::One('\u{01F5}',), + 0x01F6 => Fold::One('\u{0195}',), + 0x01F7 => Fold::One('\u{01BF}',), + 0x01F8 => Fold::One('\u{01F9}',), + 0x01FA => Fold::One('\u{01FB}',), + 0x01FC => Fold::One('\u{01FD}',), + 0x01FE => Fold::One('\u{01FF}',), + 0x0200 => Fold::One('\u{0201}',), + 0x0202 => Fold::One('\u{0203}',), + 0x0204 => Fold::One('\u{0205}',), + 0x0206 => Fold::One('\u{0207}',), + 0x0208 => Fold::One('\u{0209}',), + 0x020A => Fold::One('\u{020B}',), + 0x020C => Fold::One('\u{020D}',), + 0x020E => Fold::One('\u{020F}',), + 0x0210 => Fold::One('\u{0211}',), + 0x0212 => Fold::One('\u{0213}',), + 0x0214 => Fold::One('\u{0215}',), + 0x0216 => Fold::One('\u{0217}',), + 0x0218 => Fold::One('\u{0219}',), + 0x021A => Fold::One('\u{021B}',), + 0x021C => Fold::One('\u{021D}',), + 0x021E => Fold::One('\u{021F}',), + 0x0220 => Fold::One('\u{019E}',), + 0x0222 => Fold::One('\u{0223}',), + 0x0224 => Fold::One('\u{0225}',), + 0x0226 => Fold::One('\u{0227}',), + 0x0228 => Fold::One('\u{0229}',), + 0x022A => Fold::One('\u{022B}',), + 0x022C => Fold::One('\u{022D}',), + 0x022E => Fold::One('\u{022F}',), + 0x0230 => Fold::One('\u{0231}',), + 0x0232 => Fold::One('\u{0233}',), + 0x023A => Fold::One('\u{2C65}',), + 0x023B => Fold::One('\u{023C}',), + 0x023D => Fold::One('\u{019A}',), + 0x023E => Fold::One('\u{2C66}',), + 0x0241 => Fold::One('\u{0242}',), + 0x0243 => Fold::One('\u{0180}',), + 0x0244 => Fold::One('\u{0289}',), + 0x0245 => Fold::One('\u{028C}',), + 0x0246 => Fold::One('\u{0247}',), + 0x0248 => Fold::One('\u{0249}',), + 0x024A => Fold::One('\u{024B}',), + 0x024C => Fold::One('\u{024D}',), + 0x024E => Fold::One('\u{024F}',), + 0x0345 => Fold::One('\u{03B9}',), + 0x0370 => Fold::One('\u{0371}',), + 0x0372 => Fold::One('\u{0373}',), + 0x0376 => Fold::One('\u{0377}',), + 0x037F => Fold::One('\u{03F3}',), + 0x0386 => Fold::One('\u{03AC}',), + 0x0388 => Fold::One('\u{03AD}',), + 0x0389 => Fold::One('\u{03AE}',), + 0x038A => Fold::One('\u{03AF}',), + 0x038C => Fold::One('\u{03CC}',), + 0x038E => Fold::One('\u{03CD}',), + 0x038F => Fold::One('\u{03CE}',), + 0x0390 => Fold::Three('\u{03B9}', '\u{0308}', '\u{0301}',), + 0x0391 => Fold::One('\u{03B1}',), + 0x0392 => Fold::One('\u{03B2}',), + 0x0393 => Fold::One('\u{03B3}',), + 0x0394 => Fold::One('\u{03B4}',), + 0x0395 => Fold::One('\u{03B5}',), + 0x0396 => Fold::One('\u{03B6}',), + 0x0397 => Fold::One('\u{03B7}',), + 0x0398 => Fold::One('\u{03B8}',), + 0x0399 => Fold::One('\u{03B9}',), + 0x039A => Fold::One('\u{03BA}',), + 0x039B => Fold::One('\u{03BB}',), + 0x039C => Fold::One('\u{03BC}',), + 0x039D => Fold::One('\u{03BD}',), + 0x039E => Fold::One('\u{03BE}',), + 0x039F => Fold::One('\u{03BF}',), + 0x03A0 => Fold::One('\u{03C0}',), + 0x03A1 => Fold::One('\u{03C1}',), + 0x03A3 => Fold::One('\u{03C3}',), + 0x03A4 => Fold::One('\u{03C4}',), + 0x03A5 => Fold::One('\u{03C5}',), + 0x03A6 => Fold::One('\u{03C6}',), + 0x03A7 => Fold::One('\u{03C7}',), + 0x03A8 => Fold::One('\u{03C8}',), + 0x03A9 => Fold::One('\u{03C9}',), + 0x03AA => Fold::One('\u{03CA}',), + 0x03AB => Fold::One('\u{03CB}',), + 0x03B0 => Fold::Three('\u{03C5}', '\u{0308}', '\u{0301}',), + 0x03C2 => Fold::One('\u{03C3}',), + 0x03CF => Fold::One('\u{03D7}',), + 0x03D0 => Fold::One('\u{03B2}',), + 0x03D1 => Fold::One('\u{03B8}',), + 0x03D5 => Fold::One('\u{03C6}',), + 0x03D6 => Fold::One('\u{03C0}',), + 0x03D8 => Fold::One('\u{03D9}',), + 0x03DA => Fold::One('\u{03DB}',), + 0x03DC => Fold::One('\u{03DD}',), + 0x03DE => Fold::One('\u{03DF}',), + 0x03E0 => Fold::One('\u{03E1}',), + 0x03E2 => Fold::One('\u{03E3}',), + 0x03E4 => Fold::One('\u{03E5}',), + 0x03E6 => Fold::One('\u{03E7}',), + 0x03E8 => Fold::One('\u{03E9}',), + 0x03EA => Fold::One('\u{03EB}',), + 0x03EC => Fold::One('\u{03ED}',), + 0x03EE => Fold::One('\u{03EF}',), + 0x03F0 => Fold::One('\u{03BA}',), + 0x03F1 => Fold::One('\u{03C1}',), + 0x03F4 => Fold::One('\u{03B8}',), + 0x03F5 => Fold::One('\u{03B5}',), + 0x03F7 => Fold::One('\u{03F8}',), + 0x03F9 => Fold::One('\u{03F2}',), + 0x03FA => Fold::One('\u{03FB}',), + 0x03FD => Fold::One('\u{037B}',), + 0x03FE => Fold::One('\u{037C}',), + 0x03FF => Fold::One('\u{037D}',), + 0x0400 => Fold::One('\u{0450}',), + 0x0401 => Fold::One('\u{0451}',), + 0x0402 => Fold::One('\u{0452}',), + 0x0403 => Fold::One('\u{0453}',), + 0x0404 => Fold::One('\u{0454}',), + 0x0405 => Fold::One('\u{0455}',), + 0x0406 => Fold::One('\u{0456}',), + 0x0407 => Fold::One('\u{0457}',), + 0x0408 => Fold::One('\u{0458}',), + 0x0409 => Fold::One('\u{0459}',), + 0x040A => Fold::One('\u{045A}',), + 0x040B => Fold::One('\u{045B}',), + 0x040C => Fold::One('\u{045C}',), + 0x040D => Fold::One('\u{045D}',), + 0x040E => Fold::One('\u{045E}',), + 0x040F => Fold::One('\u{045F}',), + 0x0410 => Fold::One('\u{0430}',), + 0x0411 => Fold::One('\u{0431}',), + 0x0412 => Fold::One('\u{0432}',), + 0x0413 => Fold::One('\u{0433}',), + 0x0414 => Fold::One('\u{0434}',), + 0x0415 => Fold::One('\u{0435}',), + 0x0416 => Fold::One('\u{0436}',), + 0x0417 => Fold::One('\u{0437}',), + 0x0418 => Fold::One('\u{0438}',), + 0x0419 => Fold::One('\u{0439}',), + 0x041A => Fold::One('\u{043A}',), + 0x041B => Fold::One('\u{043B}',), + 0x041C => Fold::One('\u{043C}',), + 0x041D => Fold::One('\u{043D}',), + 0x041E => Fold::One('\u{043E}',), + 0x041F => Fold::One('\u{043F}',), + 0x0420 => Fold::One('\u{0440}',), + 0x0421 => Fold::One('\u{0441}',), + 0x0422 => Fold::One('\u{0442}',), + 0x0423 => Fold::One('\u{0443}',), + 0x0424 => Fold::One('\u{0444}',), + 0x0425 => Fold::One('\u{0445}',), + 0x0426 => Fold::One('\u{0446}',), + 0x0427 => Fold::One('\u{0447}',), + 0x0428 => Fold::One('\u{0448}',), + 0x0429 => Fold::One('\u{0449}',), + 0x042A => Fold::One('\u{044A}',), + 0x042B => Fold::One('\u{044B}',), + 0x042C => Fold::One('\u{044C}',), + 0x042D => Fold::One('\u{044D}',), + 0x042E => Fold::One('\u{044E}',), + 0x042F => Fold::One('\u{044F}',), + 0x0460 => Fold::One('\u{0461}',), + 0x0462 => Fold::One('\u{0463}',), + 0x0464 => Fold::One('\u{0465}',), + 0x0466 => Fold::One('\u{0467}',), + 0x0468 => Fold::One('\u{0469}',), + 0x046A => Fold::One('\u{046B}',), + 0x046C => Fold::One('\u{046D}',), + 0x046E => Fold::One('\u{046F}',), + 0x0470 => Fold::One('\u{0471}',), + 0x0472 => Fold::One('\u{0473}',), + 0x0474 => Fold::One('\u{0475}',), + 0x0476 => Fold::One('\u{0477}',), + 0x0478 => Fold::One('\u{0479}',), + 0x047A => Fold::One('\u{047B}',), + 0x047C => Fold::One('\u{047D}',), + 0x047E => Fold::One('\u{047F}',), + 0x0480 => Fold::One('\u{0481}',), + 0x048A => Fold::One('\u{048B}',), + 0x048C => Fold::One('\u{048D}',), + 0x048E => Fold::One('\u{048F}',), + 0x0490 => Fold::One('\u{0491}',), + 0x0492 => Fold::One('\u{0493}',), + 0x0494 => Fold::One('\u{0495}',), + 0x0496 => Fold::One('\u{0497}',), + 0x0498 => Fold::One('\u{0499}',), + 0x049A => Fold::One('\u{049B}',), + 0x049C => Fold::One('\u{049D}',), + 0x049E => Fold::One('\u{049F}',), + 0x04A0 => Fold::One('\u{04A1}',), + 0x04A2 => Fold::One('\u{04A3}',), + 0x04A4 => Fold::One('\u{04A5}',), + 0x04A6 => Fold::One('\u{04A7}',), + 0x04A8 => Fold::One('\u{04A9}',), + 0x04AA => Fold::One('\u{04AB}',), + 0x04AC => Fold::One('\u{04AD}',), + 0x04AE => Fold::One('\u{04AF}',), + 0x04B0 => Fold::One('\u{04B1}',), + 0x04B2 => Fold::One('\u{04B3}',), + 0x04B4 => Fold::One('\u{04B5}',), + 0x04B6 => Fold::One('\u{04B7}',), + 0x04B8 => Fold::One('\u{04B9}',), + 0x04BA => Fold::One('\u{04BB}',), + 0x04BC => Fold::One('\u{04BD}',), + 0x04BE => Fold::One('\u{04BF}',), + 0x04C0 => Fold::One('\u{04CF}',), + 0x04C1 => Fold::One('\u{04C2}',), + 0x04C3 => Fold::One('\u{04C4}',), + 0x04C5 => Fold::One('\u{04C6}',), + 0x04C7 => Fold::One('\u{04C8}',), + 0x04C9 => Fold::One('\u{04CA}',), + 0x04CB => Fold::One('\u{04CC}',), + 0x04CD => Fold::One('\u{04CE}',), + 0x04D0 => Fold::One('\u{04D1}',), + 0x04D2 => Fold::One('\u{04D3}',), + 0x04D4 => Fold::One('\u{04D5}',), + 0x04D6 => Fold::One('\u{04D7}',), + 0x04D8 => Fold::One('\u{04D9}',), + 0x04DA => Fold::One('\u{04DB}',), + 0x04DC => Fold::One('\u{04DD}',), + 0x04DE => Fold::One('\u{04DF}',), + 0x04E0 => Fold::One('\u{04E1}',), + 0x04E2 => Fold::One('\u{04E3}',), + 0x04E4 => Fold::One('\u{04E5}',), + 0x04E6 => Fold::One('\u{04E7}',), + 0x04E8 => Fold::One('\u{04E9}',), + 0x04EA => Fold::One('\u{04EB}',), + 0x04EC => Fold::One('\u{04ED}',), + 0x04EE => Fold::One('\u{04EF}',), + 0x04F0 => Fold::One('\u{04F1}',), + 0x04F2 => Fold::One('\u{04F3}',), + 0x04F4 => Fold::One('\u{04F5}',), + 0x04F6 => Fold::One('\u{04F7}',), + 0x04F8 => Fold::One('\u{04F9}',), + 0x04FA => Fold::One('\u{04FB}',), + 0x04FC => Fold::One('\u{04FD}',), + 0x04FE => Fold::One('\u{04FF}',), + 0x0500 => Fold::One('\u{0501}',), + 0x0502 => Fold::One('\u{0503}',), + 0x0504 => Fold::One('\u{0505}',), + 0x0506 => Fold::One('\u{0507}',), + 0x0508 => Fold::One('\u{0509}',), + 0x050A => Fold::One('\u{050B}',), + 0x050C => Fold::One('\u{050D}',), + 0x050E => Fold::One('\u{050F}',), + 0x0510 => Fold::One('\u{0511}',), + 0x0512 => Fold::One('\u{0513}',), + 0x0514 => Fold::One('\u{0515}',), + 0x0516 => Fold::One('\u{0517}',), + 0x0518 => Fold::One('\u{0519}',), + 0x051A => Fold::One('\u{051B}',), + 0x051C => Fold::One('\u{051D}',), + 0x051E => Fold::One('\u{051F}',), + 0x0520 => Fold::One('\u{0521}',), + 0x0522 => Fold::One('\u{0523}',), + 0x0524 => Fold::One('\u{0525}',), + 0x0526 => Fold::One('\u{0527}',), + 0x0528 => Fold::One('\u{0529}',), + 0x052A => Fold::One('\u{052B}',), + 0x052C => Fold::One('\u{052D}',), + 0x052E => Fold::One('\u{052F}',), + 0x0531 => Fold::One('\u{0561}',), + 0x0532 => Fold::One('\u{0562}',), + 0x0533 => Fold::One('\u{0563}',), + 0x0534 => Fold::One('\u{0564}',), + 0x0535 => Fold::One('\u{0565}',), + 0x0536 => Fold::One('\u{0566}',), + 0x0537 => Fold::One('\u{0567}',), + 0x0538 => Fold::One('\u{0568}',), + 0x0539 => Fold::One('\u{0569}',), + 0x053A => Fold::One('\u{056A}',), + 0x053B => Fold::One('\u{056B}',), + 0x053C => Fold::One('\u{056C}',), + 0x053D => Fold::One('\u{056D}',), + 0x053E => Fold::One('\u{056E}',), + 0x053F => Fold::One('\u{056F}',), + 0x0540 => Fold::One('\u{0570}',), + 0x0541 => Fold::One('\u{0571}',), + 0x0542 => Fold::One('\u{0572}',), + 0x0543 => Fold::One('\u{0573}',), + 0x0544 => Fold::One('\u{0574}',), + 0x0545 => Fold::One('\u{0575}',), + 0x0546 => Fold::One('\u{0576}',), + 0x0547 => Fold::One('\u{0577}',), + 0x0548 => Fold::One('\u{0578}',), + 0x0549 => Fold::One('\u{0579}',), + 0x054A => Fold::One('\u{057A}',), + 0x054B => Fold::One('\u{057B}',), + 0x054C => Fold::One('\u{057C}',), + 0x054D => Fold::One('\u{057D}',), + 0x054E => Fold::One('\u{057E}',), + 0x054F => Fold::One('\u{057F}',), + 0x0550 => Fold::One('\u{0580}',), + 0x0551 => Fold::One('\u{0581}',), + 0x0552 => Fold::One('\u{0582}',), + 0x0553 => Fold::One('\u{0583}',), + 0x0554 => Fold::One('\u{0584}',), + 0x0555 => Fold::One('\u{0585}',), + 0x0556 => Fold::One('\u{0586}',), + 0x0587 => Fold::Two('\u{0565}', '\u{0582}',), + 0x10A0 => Fold::One('\u{2D00}',), + 0x10A1 => Fold::One('\u{2D01}',), + 0x10A2 => Fold::One('\u{2D02}',), + 0x10A3 => Fold::One('\u{2D03}',), + 0x10A4 => Fold::One('\u{2D04}',), + 0x10A5 => Fold::One('\u{2D05}',), + 0x10A6 => Fold::One('\u{2D06}',), + 0x10A7 => Fold::One('\u{2D07}',), + 0x10A8 => Fold::One('\u{2D08}',), + 0x10A9 => Fold::One('\u{2D09}',), + 0x10AA => Fold::One('\u{2D0A}',), + 0x10AB => Fold::One('\u{2D0B}',), + 0x10AC => Fold::One('\u{2D0C}',), + 0x10AD => Fold::One('\u{2D0D}',), + 0x10AE => Fold::One('\u{2D0E}',), + 0x10AF => Fold::One('\u{2D0F}',), + 0x10B0 => Fold::One('\u{2D10}',), + 0x10B1 => Fold::One('\u{2D11}',), + 0x10B2 => Fold::One('\u{2D12}',), + 0x10B3 => Fold::One('\u{2D13}',), + 0x10B4 => Fold::One('\u{2D14}',), + 0x10B5 => Fold::One('\u{2D15}',), + 0x10B6 => Fold::One('\u{2D16}',), + 0x10B7 => Fold::One('\u{2D17}',), + 0x10B8 => Fold::One('\u{2D18}',), + 0x10B9 => Fold::One('\u{2D19}',), + 0x10BA => Fold::One('\u{2D1A}',), + 0x10BB => Fold::One('\u{2D1B}',), + 0x10BC => Fold::One('\u{2D1C}',), + 0x10BD => Fold::One('\u{2D1D}',), + 0x10BE => Fold::One('\u{2D1E}',), + 0x10BF => Fold::One('\u{2D1F}',), + 0x10C0 => Fold::One('\u{2D20}',), + 0x10C1 => Fold::One('\u{2D21}',), + 0x10C2 => Fold::One('\u{2D22}',), + 0x10C3 => Fold::One('\u{2D23}',), + 0x10C4 => Fold::One('\u{2D24}',), + 0x10C5 => Fold::One('\u{2D25}',), + 0x10C7 => Fold::One('\u{2D27}',), + 0x10CD => Fold::One('\u{2D2D}',), + 0x13F8 => Fold::One('\u{13F0}',), + 0x13F9 => Fold::One('\u{13F1}',), + 0x13FA => Fold::One('\u{13F2}',), + 0x13FB => Fold::One('\u{13F3}',), + 0x13FC => Fold::One('\u{13F4}',), + 0x13FD => Fold::One('\u{13F5}',), + 0x1C80 => Fold::One('\u{0432}',), + 0x1C81 => Fold::One('\u{0434}',), + 0x1C82 => Fold::One('\u{043E}',), + 0x1C83 => Fold::One('\u{0441}',), + 0x1C84 => Fold::One('\u{0442}',), + 0x1C85 => Fold::One('\u{0442}',), + 0x1C86 => Fold::One('\u{044A}',), + 0x1C87 => Fold::One('\u{0463}',), + 0x1C88 => Fold::One('\u{A64B}',), + 0x1C90 => Fold::One('\u{10D0}',), + 0x1C91 => Fold::One('\u{10D1}',), + 0x1C92 => Fold::One('\u{10D2}',), + 0x1C93 => Fold::One('\u{10D3}',), + 0x1C94 => Fold::One('\u{10D4}',), + 0x1C95 => Fold::One('\u{10D5}',), + 0x1C96 => Fold::One('\u{10D6}',), + 0x1C97 => Fold::One('\u{10D7}',), + 0x1C98 => Fold::One('\u{10D8}',), + 0x1C99 => Fold::One('\u{10D9}',), + 0x1C9A => Fold::One('\u{10DA}',), + 0x1C9B => Fold::One('\u{10DB}',), + 0x1C9C => Fold::One('\u{10DC}',), + 0x1C9D => Fold::One('\u{10DD}',), + 0x1C9E => Fold::One('\u{10DE}',), + 0x1C9F => Fold::One('\u{10DF}',), + 0x1CA0 => Fold::One('\u{10E0}',), + 0x1CA1 => Fold::One('\u{10E1}',), + 0x1CA2 => Fold::One('\u{10E2}',), + 0x1CA3 => Fold::One('\u{10E3}',), + 0x1CA4 => Fold::One('\u{10E4}',), + 0x1CA5 => Fold::One('\u{10E5}',), + 0x1CA6 => Fold::One('\u{10E6}',), + 0x1CA7 => Fold::One('\u{10E7}',), + 0x1CA8 => Fold::One('\u{10E8}',), + 0x1CA9 => Fold::One('\u{10E9}',), + 0x1CAA => Fold::One('\u{10EA}',), + 0x1CAB => Fold::One('\u{10EB}',), + 0x1CAC => Fold::One('\u{10EC}',), + 0x1CAD => Fold::One('\u{10ED}',), + 0x1CAE => Fold::One('\u{10EE}',), + 0x1CAF => Fold::One('\u{10EF}',), + 0x1CB0 => Fold::One('\u{10F0}',), + 0x1CB1 => Fold::One('\u{10F1}',), + 0x1CB2 => Fold::One('\u{10F2}',), + 0x1CB3 => Fold::One('\u{10F3}',), + 0x1CB4 => Fold::One('\u{10F4}',), + 0x1CB5 => Fold::One('\u{10F5}',), + 0x1CB6 => Fold::One('\u{10F6}',), + 0x1CB7 => Fold::One('\u{10F7}',), + 0x1CB8 => Fold::One('\u{10F8}',), + 0x1CB9 => Fold::One('\u{10F9}',), + 0x1CBA => Fold::One('\u{10FA}',), + 0x1CBD => Fold::One('\u{10FD}',), + 0x1CBE => Fold::One('\u{10FE}',), + 0x1CBF => Fold::One('\u{10FF}',), + 0x1E00 => Fold::One('\u{1E01}',), + 0x1E02 => Fold::One('\u{1E03}',), + 0x1E04 => Fold::One('\u{1E05}',), + 0x1E06 => Fold::One('\u{1E07}',), + 0x1E08 => Fold::One('\u{1E09}',), + 0x1E0A => Fold::One('\u{1E0B}',), + 0x1E0C => Fold::One('\u{1E0D}',), + 0x1E0E => Fold::One('\u{1E0F}',), + 0x1E10 => Fold::One('\u{1E11}',), + 0x1E12 => Fold::One('\u{1E13}',), + 0x1E14 => Fold::One('\u{1E15}',), + 0x1E16 => Fold::One('\u{1E17}',), + 0x1E18 => Fold::One('\u{1E19}',), + 0x1E1A => Fold::One('\u{1E1B}',), + 0x1E1C => Fold::One('\u{1E1D}',), + 0x1E1E => Fold::One('\u{1E1F}',), + 0x1E20 => Fold::One('\u{1E21}',), + 0x1E22 => Fold::One('\u{1E23}',), + 0x1E24 => Fold::One('\u{1E25}',), + 0x1E26 => Fold::One('\u{1E27}',), + 0x1E28 => Fold::One('\u{1E29}',), + 0x1E2A => Fold::One('\u{1E2B}',), + 0x1E2C => Fold::One('\u{1E2D}',), + 0x1E2E => Fold::One('\u{1E2F}',), + 0x1E30 => Fold::One('\u{1E31}',), + 0x1E32 => Fold::One('\u{1E33}',), + 0x1E34 => Fold::One('\u{1E35}',), + 0x1E36 => Fold::One('\u{1E37}',), + 0x1E38 => Fold::One('\u{1E39}',), + 0x1E3A => Fold::One('\u{1E3B}',), + 0x1E3C => Fold::One('\u{1E3D}',), + 0x1E3E => Fold::One('\u{1E3F}',), + 0x1E40 => Fold::One('\u{1E41}',), + 0x1E42 => Fold::One('\u{1E43}',), + 0x1E44 => Fold::One('\u{1E45}',), + 0x1E46 => Fold::One('\u{1E47}',), + 0x1E48 => Fold::One('\u{1E49}',), + 0x1E4A => Fold::One('\u{1E4B}',), + 0x1E4C => Fold::One('\u{1E4D}',), + 0x1E4E => Fold::One('\u{1E4F}',), + 0x1E50 => Fold::One('\u{1E51}',), + 0x1E52 => Fold::One('\u{1E53}',), + 0x1E54 => Fold::One('\u{1E55}',), + 0x1E56 => Fold::One('\u{1E57}',), + 0x1E58 => Fold::One('\u{1E59}',), + 0x1E5A => Fold::One('\u{1E5B}',), + 0x1E5C => Fold::One('\u{1E5D}',), + 0x1E5E => Fold::One('\u{1E5F}',), + 0x1E60 => Fold::One('\u{1E61}',), + 0x1E62 => Fold::One('\u{1E63}',), + 0x1E64 => Fold::One('\u{1E65}',), + 0x1E66 => Fold::One('\u{1E67}',), + 0x1E68 => Fold::One('\u{1E69}',), + 0x1E6A => Fold::One('\u{1E6B}',), + 0x1E6C => Fold::One('\u{1E6D}',), + 0x1E6E => Fold::One('\u{1E6F}',), + 0x1E70 => Fold::One('\u{1E71}',), + 0x1E72 => Fold::One('\u{1E73}',), + 0x1E74 => Fold::One('\u{1E75}',), + 0x1E76 => Fold::One('\u{1E77}',), + 0x1E78 => Fold::One('\u{1E79}',), + 0x1E7A => Fold::One('\u{1E7B}',), + 0x1E7C => Fold::One('\u{1E7D}',), + 0x1E7E => Fold::One('\u{1E7F}',), + 0x1E80 => Fold::One('\u{1E81}',), + 0x1E82 => Fold::One('\u{1E83}',), + 0x1E84 => Fold::One('\u{1E85}',), + 0x1E86 => Fold::One('\u{1E87}',), + 0x1E88 => Fold::One('\u{1E89}',), + 0x1E8A => Fold::One('\u{1E8B}',), + 0x1E8C => Fold::One('\u{1E8D}',), + 0x1E8E => Fold::One('\u{1E8F}',), + 0x1E90 => Fold::One('\u{1E91}',), + 0x1E92 => Fold::One('\u{1E93}',), + 0x1E94 => Fold::One('\u{1E95}',), + 0x1E96 => Fold::Two('\u{0068}', '\u{0331}',), + 0x1E97 => Fold::Two('\u{0074}', '\u{0308}',), + 0x1E98 => Fold::Two('\u{0077}', '\u{030A}',), + 0x1E99 => Fold::Two('\u{0079}', '\u{030A}',), + 0x1E9A => Fold::Two('\u{0061}', '\u{02BE}',), + 0x1E9B => Fold::One('\u{1E61}',), + 0x1E9E => Fold::Two('\u{0073}', '\u{0073}',), + 0x1EA0 => Fold::One('\u{1EA1}',), + 0x1EA2 => Fold::One('\u{1EA3}',), + 0x1EA4 => Fold::One('\u{1EA5}',), + 0x1EA6 => Fold::One('\u{1EA7}',), + 0x1EA8 => Fold::One('\u{1EA9}',), + 0x1EAA => Fold::One('\u{1EAB}',), + 0x1EAC => Fold::One('\u{1EAD}',), + 0x1EAE => Fold::One('\u{1EAF}',), + 0x1EB0 => Fold::One('\u{1EB1}',), + 0x1EB2 => Fold::One('\u{1EB3}',), + 0x1EB4 => Fold::One('\u{1EB5}',), + 0x1EB6 => Fold::One('\u{1EB7}',), + 0x1EB8 => Fold::One('\u{1EB9}',), + 0x1EBA => Fold::One('\u{1EBB}',), + 0x1EBC => Fold::One('\u{1EBD}',), + 0x1EBE => Fold::One('\u{1EBF}',), + 0x1EC0 => Fold::One('\u{1EC1}',), + 0x1EC2 => Fold::One('\u{1EC3}',), + 0x1EC4 => Fold::One('\u{1EC5}',), + 0x1EC6 => Fold::One('\u{1EC7}',), + 0x1EC8 => Fold::One('\u{1EC9}',), + 0x1ECA => Fold::One('\u{1ECB}',), + 0x1ECC => Fold::One('\u{1ECD}',), + 0x1ECE => Fold::One('\u{1ECF}',), + 0x1ED0 => Fold::One('\u{1ED1}',), + 0x1ED2 => Fold::One('\u{1ED3}',), + 0x1ED4 => Fold::One('\u{1ED5}',), + 0x1ED6 => Fold::One('\u{1ED7}',), + 0x1ED8 => Fold::One('\u{1ED9}',), + 0x1EDA => Fold::One('\u{1EDB}',), + 0x1EDC => Fold::One('\u{1EDD}',), + 0x1EDE => Fold::One('\u{1EDF}',), + 0x1EE0 => Fold::One('\u{1EE1}',), + 0x1EE2 => Fold::One('\u{1EE3}',), + 0x1EE4 => Fold::One('\u{1EE5}',), + 0x1EE6 => Fold::One('\u{1EE7}',), + 0x1EE8 => Fold::One('\u{1EE9}',), + 0x1EEA => Fold::One('\u{1EEB}',), + 0x1EEC => Fold::One('\u{1EED}',), + 0x1EEE => Fold::One('\u{1EEF}',), + 0x1EF0 => Fold::One('\u{1EF1}',), + 0x1EF2 => Fold::One('\u{1EF3}',), + 0x1EF4 => Fold::One('\u{1EF5}',), + 0x1EF6 => Fold::One('\u{1EF7}',), + 0x1EF8 => Fold::One('\u{1EF9}',), + 0x1EFA => Fold::One('\u{1EFB}',), + 0x1EFC => Fold::One('\u{1EFD}',), + 0x1EFE => Fold::One('\u{1EFF}',), + 0x1F08 => Fold::One('\u{1F00}',), + 0x1F09 => Fold::One('\u{1F01}',), + 0x1F0A => Fold::One('\u{1F02}',), + 0x1F0B => Fold::One('\u{1F03}',), + 0x1F0C => Fold::One('\u{1F04}',), + 0x1F0D => Fold::One('\u{1F05}',), + 0x1F0E => Fold::One('\u{1F06}',), + 0x1F0F => Fold::One('\u{1F07}',), + 0x1F18 => Fold::One('\u{1F10}',), + 0x1F19 => Fold::One('\u{1F11}',), + 0x1F1A => Fold::One('\u{1F12}',), + 0x1F1B => Fold::One('\u{1F13}',), + 0x1F1C => Fold::One('\u{1F14}',), + 0x1F1D => Fold::One('\u{1F15}',), + 0x1F28 => Fold::One('\u{1F20}',), + 0x1F29 => Fold::One('\u{1F21}',), + 0x1F2A => Fold::One('\u{1F22}',), + 0x1F2B => Fold::One('\u{1F23}',), + 0x1F2C => Fold::One('\u{1F24}',), + 0x1F2D => Fold::One('\u{1F25}',), + 0x1F2E => Fold::One('\u{1F26}',), + 0x1F2F => Fold::One('\u{1F27}',), + 0x1F38 => Fold::One('\u{1F30}',), + 0x1F39 => Fold::One('\u{1F31}',), + 0x1F3A => Fold::One('\u{1F32}',), + 0x1F3B => Fold::One('\u{1F33}',), + 0x1F3C => Fold::One('\u{1F34}',), + 0x1F3D => Fold::One('\u{1F35}',), + 0x1F3E => Fold::One('\u{1F36}',), + 0x1F3F => Fold::One('\u{1F37}',), + 0x1F48 => Fold::One('\u{1F40}',), + 0x1F49 => Fold::One('\u{1F41}',), + 0x1F4A => Fold::One('\u{1F42}',), + 0x1F4B => Fold::One('\u{1F43}',), + 0x1F4C => Fold::One('\u{1F44}',), + 0x1F4D => Fold::One('\u{1F45}',), + 0x1F50 => Fold::Two('\u{03C5}', '\u{0313}',), + 0x1F52 => Fold::Three('\u{03C5}', '\u{0313}', '\u{0300}',), + 0x1F54 => Fold::Three('\u{03C5}', '\u{0313}', '\u{0301}',), + 0x1F56 => Fold::Three('\u{03C5}', '\u{0313}', '\u{0342}',), + 0x1F59 => Fold::One('\u{1F51}',), + 0x1F5B => Fold::One('\u{1F53}',), + 0x1F5D => Fold::One('\u{1F55}',), + 0x1F5F => Fold::One('\u{1F57}',), + 0x1F68 => Fold::One('\u{1F60}',), + 0x1F69 => Fold::One('\u{1F61}',), + 0x1F6A => Fold::One('\u{1F62}',), + 0x1F6B => Fold::One('\u{1F63}',), + 0x1F6C => Fold::One('\u{1F64}',), + 0x1F6D => Fold::One('\u{1F65}',), + 0x1F6E => Fold::One('\u{1F66}',), + 0x1F6F => Fold::One('\u{1F67}',), + 0x1F80 => Fold::Two('\u{1F00}', '\u{03B9}',), + 0x1F81 => Fold::Two('\u{1F01}', '\u{03B9}',), + 0x1F82 => Fold::Two('\u{1F02}', '\u{03B9}',), + 0x1F83 => Fold::Two('\u{1F03}', '\u{03B9}',), + 0x1F84 => Fold::Two('\u{1F04}', '\u{03B9}',), + 0x1F85 => Fold::Two('\u{1F05}', '\u{03B9}',), + 0x1F86 => Fold::Two('\u{1F06}', '\u{03B9}',), + 0x1F87 => Fold::Two('\u{1F07}', '\u{03B9}',), + 0x1F88 => Fold::Two('\u{1F00}', '\u{03B9}',), + 0x1F89 => Fold::Two('\u{1F01}', '\u{03B9}',), + 0x1F8A => Fold::Two('\u{1F02}', '\u{03B9}',), + 0x1F8B => Fold::Two('\u{1F03}', '\u{03B9}',), + 0x1F8C => Fold::Two('\u{1F04}', '\u{03B9}',), + 0x1F8D => Fold::Two('\u{1F05}', '\u{03B9}',), + 0x1F8E => Fold::Two('\u{1F06}', '\u{03B9}',), + 0x1F8F => Fold::Two('\u{1F07}', '\u{03B9}',), + 0x1F90 => Fold::Two('\u{1F20}', '\u{03B9}',), + 0x1F91 => Fold::Two('\u{1F21}', '\u{03B9}',), + 0x1F92 => Fold::Two('\u{1F22}', '\u{03B9}',), + 0x1F93 => Fold::Two('\u{1F23}', '\u{03B9}',), + 0x1F94 => Fold::Two('\u{1F24}', '\u{03B9}',), + 0x1F95 => Fold::Two('\u{1F25}', '\u{03B9}',), + 0x1F96 => Fold::Two('\u{1F26}', '\u{03B9}',), + 0x1F97 => Fold::Two('\u{1F27}', '\u{03B9}',), + 0x1F98 => Fold::Two('\u{1F20}', '\u{03B9}',), + 0x1F99 => Fold::Two('\u{1F21}', '\u{03B9}',), + 0x1F9A => Fold::Two('\u{1F22}', '\u{03B9}',), + 0x1F9B => Fold::Two('\u{1F23}', '\u{03B9}',), + 0x1F9C => Fold::Two('\u{1F24}', '\u{03B9}',), + 0x1F9D => Fold::Two('\u{1F25}', '\u{03B9}',), + 0x1F9E => Fold::Two('\u{1F26}', '\u{03B9}',), + 0x1F9F => Fold::Two('\u{1F27}', '\u{03B9}',), + 0x1FA0 => Fold::Two('\u{1F60}', '\u{03B9}',), + 0x1FA1 => Fold::Two('\u{1F61}', '\u{03B9}',), + 0x1FA2 => Fold::Two('\u{1F62}', '\u{03B9}',), + 0x1FA3 => Fold::Two('\u{1F63}', '\u{03B9}',), + 0x1FA4 => Fold::Two('\u{1F64}', '\u{03B9}',), + 0x1FA5 => Fold::Two('\u{1F65}', '\u{03B9}',), + 0x1FA6 => Fold::Two('\u{1F66}', '\u{03B9}',), + 0x1FA7 => Fold::Two('\u{1F67}', '\u{03B9}',), + 0x1FA8 => Fold::Two('\u{1F60}', '\u{03B9}',), + 0x1FA9 => Fold::Two('\u{1F61}', '\u{03B9}',), + 0x1FAA => Fold::Two('\u{1F62}', '\u{03B9}',), + 0x1FAB => Fold::Two('\u{1F63}', '\u{03B9}',), + 0x1FAC => Fold::Two('\u{1F64}', '\u{03B9}',), + 0x1FAD => Fold::Two('\u{1F65}', '\u{03B9}',), + 0x1FAE => Fold::Two('\u{1F66}', '\u{03B9}',), + 0x1FAF => Fold::Two('\u{1F67}', '\u{03B9}',), + 0x1FB2 => Fold::Two('\u{1F70}', '\u{03B9}',), + 0x1FB3 => Fold::Two('\u{03B1}', '\u{03B9}',), + 0x1FB4 => Fold::Two('\u{03AC}', '\u{03B9}',), + 0x1FB6 => Fold::Two('\u{03B1}', '\u{0342}',), + 0x1FB7 => Fold::Three('\u{03B1}', '\u{0342}', '\u{03B9}',), + 0x1FB8 => Fold::One('\u{1FB0}',), + 0x1FB9 => Fold::One('\u{1FB1}',), + 0x1FBA => Fold::One('\u{1F70}',), + 0x1FBB => Fold::One('\u{1F71}',), + 0x1FBC => Fold::Two('\u{03B1}', '\u{03B9}',), + 0x1FBE => Fold::One('\u{03B9}',), + 0x1FC2 => Fold::Two('\u{1F74}', '\u{03B9}',), + 0x1FC3 => Fold::Two('\u{03B7}', '\u{03B9}',), + 0x1FC4 => Fold::Two('\u{03AE}', '\u{03B9}',), + 0x1FC6 => Fold::Two('\u{03B7}', '\u{0342}',), + 0x1FC7 => Fold::Three('\u{03B7}', '\u{0342}', '\u{03B9}',), + 0x1FC8 => Fold::One('\u{1F72}',), + 0x1FC9 => Fold::One('\u{1F73}',), + 0x1FCA => Fold::One('\u{1F74}',), + 0x1FCB => Fold::One('\u{1F75}',), + 0x1FCC => Fold::Two('\u{03B7}', '\u{03B9}',), + 0x1FD2 => Fold::Three('\u{03B9}', '\u{0308}', '\u{0300}',), + 0x1FD3 => Fold::Three('\u{03B9}', '\u{0308}', '\u{0301}',), + 0x1FD6 => Fold::Two('\u{03B9}', '\u{0342}',), + 0x1FD7 => Fold::Three('\u{03B9}', '\u{0308}', '\u{0342}',), + 0x1FD8 => Fold::One('\u{1FD0}',), + 0x1FD9 => Fold::One('\u{1FD1}',), + 0x1FDA => Fold::One('\u{1F76}',), + 0x1FDB => Fold::One('\u{1F77}',), + 0x1FE2 => Fold::Three('\u{03C5}', '\u{0308}', '\u{0300}',), + 0x1FE3 => Fold::Three('\u{03C5}', '\u{0308}', '\u{0301}',), + 0x1FE4 => Fold::Two('\u{03C1}', '\u{0313}',), + 0x1FE6 => Fold::Two('\u{03C5}', '\u{0342}',), + 0x1FE7 => Fold::Three('\u{03C5}', '\u{0308}', '\u{0342}',), + 0x1FE8 => Fold::One('\u{1FE0}',), + 0x1FE9 => Fold::One('\u{1FE1}',), + 0x1FEA => Fold::One('\u{1F7A}',), + 0x1FEB => Fold::One('\u{1F7B}',), + 0x1FEC => Fold::One('\u{1FE5}',), + 0x1FF2 => Fold::Two('\u{1F7C}', '\u{03B9}',), + 0x1FF3 => Fold::Two('\u{03C9}', '\u{03B9}',), + 0x1FF4 => Fold::Two('\u{03CE}', '\u{03B9}',), + 0x1FF6 => Fold::Two('\u{03C9}', '\u{0342}',), + 0x1FF7 => Fold::Three('\u{03C9}', '\u{0342}', '\u{03B9}',), + 0x1FF8 => Fold::One('\u{1F78}',), + 0x1FF9 => Fold::One('\u{1F79}',), + 0x1FFA => Fold::One('\u{1F7C}',), + 0x1FFB => Fold::One('\u{1F7D}',), + 0x1FFC => Fold::Two('\u{03C9}', '\u{03B9}',), + 0x2126 => Fold::One('\u{03C9}',), + 0x212A => Fold::One('\u{006B}',), + 0x212B => Fold::One('\u{00E5}',), + 0x2132 => Fold::One('\u{214E}',), + 0x2160 => Fold::One('\u{2170}',), + 0x2161 => Fold::One('\u{2171}',), + 0x2162 => Fold::One('\u{2172}',), + 0x2163 => Fold::One('\u{2173}',), + 0x2164 => Fold::One('\u{2174}',), + 0x2165 => Fold::One('\u{2175}',), + 0x2166 => Fold::One('\u{2176}',), + 0x2167 => Fold::One('\u{2177}',), + 0x2168 => Fold::One('\u{2178}',), + 0x2169 => Fold::One('\u{2179}',), + 0x216A => Fold::One('\u{217A}',), + 0x216B => Fold::One('\u{217B}',), + 0x216C => Fold::One('\u{217C}',), + 0x216D => Fold::One('\u{217D}',), + 0x216E => Fold::One('\u{217E}',), + 0x216F => Fold::One('\u{217F}',), + 0x2183 => Fold::One('\u{2184}',), + 0x24B6 => Fold::One('\u{24D0}',), + 0x24B7 => Fold::One('\u{24D1}',), + 0x24B8 => Fold::One('\u{24D2}',), + 0x24B9 => Fold::One('\u{24D3}',), + 0x24BA => Fold::One('\u{24D4}',), + 0x24BB => Fold::One('\u{24D5}',), + 0x24BC => Fold::One('\u{24D6}',), + 0x24BD => Fold::One('\u{24D7}',), + 0x24BE => Fold::One('\u{24D8}',), + 0x24BF => Fold::One('\u{24D9}',), + 0x24C0 => Fold::One('\u{24DA}',), + 0x24C1 => Fold::One('\u{24DB}',), + 0x24C2 => Fold::One('\u{24DC}',), + 0x24C3 => Fold::One('\u{24DD}',), + 0x24C4 => Fold::One('\u{24DE}',), + 0x24C5 => Fold::One('\u{24DF}',), + 0x24C6 => Fold::One('\u{24E0}',), + 0x24C7 => Fold::One('\u{24E1}',), + 0x24C8 => Fold::One('\u{24E2}',), + 0x24C9 => Fold::One('\u{24E3}',), + 0x24CA => Fold::One('\u{24E4}',), + 0x24CB => Fold::One('\u{24E5}',), + 0x24CC => Fold::One('\u{24E6}',), + 0x24CD => Fold::One('\u{24E7}',), + 0x24CE => Fold::One('\u{24E8}',), + 0x24CF => Fold::One('\u{24E9}',), + 0x2C00 => Fold::One('\u{2C30}',), + 0x2C01 => Fold::One('\u{2C31}',), + 0x2C02 => Fold::One('\u{2C32}',), + 0x2C03 => Fold::One('\u{2C33}',), + 0x2C04 => Fold::One('\u{2C34}',), + 0x2C05 => Fold::One('\u{2C35}',), + 0x2C06 => Fold::One('\u{2C36}',), + 0x2C07 => Fold::One('\u{2C37}',), + 0x2C08 => Fold::One('\u{2C38}',), + 0x2C09 => Fold::One('\u{2C39}',), + 0x2C0A => Fold::One('\u{2C3A}',), + 0x2C0B => Fold::One('\u{2C3B}',), + 0x2C0C => Fold::One('\u{2C3C}',), + 0x2C0D => Fold::One('\u{2C3D}',), + 0x2C0E => Fold::One('\u{2C3E}',), + 0x2C0F => Fold::One('\u{2C3F}',), + 0x2C10 => Fold::One('\u{2C40}',), + 0x2C11 => Fold::One('\u{2C41}',), + 0x2C12 => Fold::One('\u{2C42}',), + 0x2C13 => Fold::One('\u{2C43}',), + 0x2C14 => Fold::One('\u{2C44}',), + 0x2C15 => Fold::One('\u{2C45}',), + 0x2C16 => Fold::One('\u{2C46}',), + 0x2C17 => Fold::One('\u{2C47}',), + 0x2C18 => Fold::One('\u{2C48}',), + 0x2C19 => Fold::One('\u{2C49}',), + 0x2C1A => Fold::One('\u{2C4A}',), + 0x2C1B => Fold::One('\u{2C4B}',), + 0x2C1C => Fold::One('\u{2C4C}',), + 0x2C1D => Fold::One('\u{2C4D}',), + 0x2C1E => Fold::One('\u{2C4E}',), + 0x2C1F => Fold::One('\u{2C4F}',), + 0x2C20 => Fold::One('\u{2C50}',), + 0x2C21 => Fold::One('\u{2C51}',), + 0x2C22 => Fold::One('\u{2C52}',), + 0x2C23 => Fold::One('\u{2C53}',), + 0x2C24 => Fold::One('\u{2C54}',), + 0x2C25 => Fold::One('\u{2C55}',), + 0x2C26 => Fold::One('\u{2C56}',), + 0x2C27 => Fold::One('\u{2C57}',), + 0x2C28 => Fold::One('\u{2C58}',), + 0x2C29 => Fold::One('\u{2C59}',), + 0x2C2A => Fold::One('\u{2C5A}',), + 0x2C2B => Fold::One('\u{2C5B}',), + 0x2C2C => Fold::One('\u{2C5C}',), + 0x2C2D => Fold::One('\u{2C5D}',), + 0x2C2E => Fold::One('\u{2C5E}',), + 0x2C60 => Fold::One('\u{2C61}',), + 0x2C62 => Fold::One('\u{026B}',), + 0x2C63 => Fold::One('\u{1D7D}',), + 0x2C64 => Fold::One('\u{027D}',), + 0x2C67 => Fold::One('\u{2C68}',), + 0x2C69 => Fold::One('\u{2C6A}',), + 0x2C6B => Fold::One('\u{2C6C}',), + 0x2C6D => Fold::One('\u{0251}',), + 0x2C6E => Fold::One('\u{0271}',), + 0x2C6F => Fold::One('\u{0250}',), + 0x2C70 => Fold::One('\u{0252}',), + 0x2C72 => Fold::One('\u{2C73}',), + 0x2C75 => Fold::One('\u{2C76}',), + 0x2C7E => Fold::One('\u{023F}',), + 0x2C7F => Fold::One('\u{0240}',), + 0x2C80 => Fold::One('\u{2C81}',), + 0x2C82 => Fold::One('\u{2C83}',), + 0x2C84 => Fold::One('\u{2C85}',), + 0x2C86 => Fold::One('\u{2C87}',), + 0x2C88 => Fold::One('\u{2C89}',), + 0x2C8A => Fold::One('\u{2C8B}',), + 0x2C8C => Fold::One('\u{2C8D}',), + 0x2C8E => Fold::One('\u{2C8F}',), + 0x2C90 => Fold::One('\u{2C91}',), + 0x2C92 => Fold::One('\u{2C93}',), + 0x2C94 => Fold::One('\u{2C95}',), + 0x2C96 => Fold::One('\u{2C97}',), + 0x2C98 => Fold::One('\u{2C99}',), + 0x2C9A => Fold::One('\u{2C9B}',), + 0x2C9C => Fold::One('\u{2C9D}',), + 0x2C9E => Fold::One('\u{2C9F}',), + 0x2CA0 => Fold::One('\u{2CA1}',), + 0x2CA2 => Fold::One('\u{2CA3}',), + 0x2CA4 => Fold::One('\u{2CA5}',), + 0x2CA6 => Fold::One('\u{2CA7}',), + 0x2CA8 => Fold::One('\u{2CA9}',), + 0x2CAA => Fold::One('\u{2CAB}',), + 0x2CAC => Fold::One('\u{2CAD}',), + 0x2CAE => Fold::One('\u{2CAF}',), + 0x2CB0 => Fold::One('\u{2CB1}',), + 0x2CB2 => Fold::One('\u{2CB3}',), + 0x2CB4 => Fold::One('\u{2CB5}',), + 0x2CB6 => Fold::One('\u{2CB7}',), + 0x2CB8 => Fold::One('\u{2CB9}',), + 0x2CBA => Fold::One('\u{2CBB}',), + 0x2CBC => Fold::One('\u{2CBD}',), + 0x2CBE => Fold::One('\u{2CBF}',), + 0x2CC0 => Fold::One('\u{2CC1}',), + 0x2CC2 => Fold::One('\u{2CC3}',), + 0x2CC4 => Fold::One('\u{2CC5}',), + 0x2CC6 => Fold::One('\u{2CC7}',), + 0x2CC8 => Fold::One('\u{2CC9}',), + 0x2CCA => Fold::One('\u{2CCB}',), + 0x2CCC => Fold::One('\u{2CCD}',), + 0x2CCE => Fold::One('\u{2CCF}',), + 0x2CD0 => Fold::One('\u{2CD1}',), + 0x2CD2 => Fold::One('\u{2CD3}',), + 0x2CD4 => Fold::One('\u{2CD5}',), + 0x2CD6 => Fold::One('\u{2CD7}',), + 0x2CD8 => Fold::One('\u{2CD9}',), + 0x2CDA => Fold::One('\u{2CDB}',), + 0x2CDC => Fold::One('\u{2CDD}',), + 0x2CDE => Fold::One('\u{2CDF}',), + 0x2CE0 => Fold::One('\u{2CE1}',), + 0x2CE2 => Fold::One('\u{2CE3}',), + 0x2CEB => Fold::One('\u{2CEC}',), + 0x2CED => Fold::One('\u{2CEE}',), + 0x2CF2 => Fold::One('\u{2CF3}',), + 0xA640 => Fold::One('\u{A641}',), + 0xA642 => Fold::One('\u{A643}',), + 0xA644 => Fold::One('\u{A645}',), + 0xA646 => Fold::One('\u{A647}',), + 0xA648 => Fold::One('\u{A649}',), + 0xA64A => Fold::One('\u{A64B}',), + 0xA64C => Fold::One('\u{A64D}',), + 0xA64E => Fold::One('\u{A64F}',), + 0xA650 => Fold::One('\u{A651}',), + 0xA652 => Fold::One('\u{A653}',), + 0xA654 => Fold::One('\u{A655}',), + 0xA656 => Fold::One('\u{A657}',), + 0xA658 => Fold::One('\u{A659}',), + 0xA65A => Fold::One('\u{A65B}',), + 0xA65C => Fold::One('\u{A65D}',), + 0xA65E => Fold::One('\u{A65F}',), + 0xA660 => Fold::One('\u{A661}',), + 0xA662 => Fold::One('\u{A663}',), + 0xA664 => Fold::One('\u{A665}',), + 0xA666 => Fold::One('\u{A667}',), + 0xA668 => Fold::One('\u{A669}',), + 0xA66A => Fold::One('\u{A66B}',), + 0xA66C => Fold::One('\u{A66D}',), + 0xA680 => Fold::One('\u{A681}',), + 0xA682 => Fold::One('\u{A683}',), + 0xA684 => Fold::One('\u{A685}',), + 0xA686 => Fold::One('\u{A687}',), + 0xA688 => Fold::One('\u{A689}',), + 0xA68A => Fold::One('\u{A68B}',), + 0xA68C => Fold::One('\u{A68D}',), + 0xA68E => Fold::One('\u{A68F}',), + 0xA690 => Fold::One('\u{A691}',), + 0xA692 => Fold::One('\u{A693}',), + 0xA694 => Fold::One('\u{A695}',), + 0xA696 => Fold::One('\u{A697}',), + 0xA698 => Fold::One('\u{A699}',), + 0xA69A => Fold::One('\u{A69B}',), + 0xA722 => Fold::One('\u{A723}',), + 0xA724 => Fold::One('\u{A725}',), + 0xA726 => Fold::One('\u{A727}',), + 0xA728 => Fold::One('\u{A729}',), + 0xA72A => Fold::One('\u{A72B}',), + 0xA72C => Fold::One('\u{A72D}',), + 0xA72E => Fold::One('\u{A72F}',), + 0xA732 => Fold::One('\u{A733}',), + 0xA734 => Fold::One('\u{A735}',), + 0xA736 => Fold::One('\u{A737}',), + 0xA738 => Fold::One('\u{A739}',), + 0xA73A => Fold::One('\u{A73B}',), + 0xA73C => Fold::One('\u{A73D}',), + 0xA73E => Fold::One('\u{A73F}',), + 0xA740 => Fold::One('\u{A741}',), + 0xA742 => Fold::One('\u{A743}',), + 0xA744 => Fold::One('\u{A745}',), + 0xA746 => Fold::One('\u{A747}',), + 0xA748 => Fold::One('\u{A749}',), + 0xA74A => Fold::One('\u{A74B}',), + 0xA74C => Fold::One('\u{A74D}',), + 0xA74E => Fold::One('\u{A74F}',), + 0xA750 => Fold::One('\u{A751}',), + 0xA752 => Fold::One('\u{A753}',), + 0xA754 => Fold::One('\u{A755}',), + 0xA756 => Fold::One('\u{A757}',), + 0xA758 => Fold::One('\u{A759}',), + 0xA75A => Fold::One('\u{A75B}',), + 0xA75C => Fold::One('\u{A75D}',), + 0xA75E => Fold::One('\u{A75F}',), + 0xA760 => Fold::One('\u{A761}',), + 0xA762 => Fold::One('\u{A763}',), + 0xA764 => Fold::One('\u{A765}',), + 0xA766 => Fold::One('\u{A767}',), + 0xA768 => Fold::One('\u{A769}',), + 0xA76A => Fold::One('\u{A76B}',), + 0xA76C => Fold::One('\u{A76D}',), + 0xA76E => Fold::One('\u{A76F}',), + 0xA779 => Fold::One('\u{A77A}',), + 0xA77B => Fold::One('\u{A77C}',), + 0xA77D => Fold::One('\u{1D79}',), + 0xA77E => Fold::One('\u{A77F}',), + 0xA780 => Fold::One('\u{A781}',), + 0xA782 => Fold::One('\u{A783}',), + 0xA784 => Fold::One('\u{A785}',), + 0xA786 => Fold::One('\u{A787}',), + 0xA78B => Fold::One('\u{A78C}',), + 0xA78D => Fold::One('\u{0265}',), + 0xA790 => Fold::One('\u{A791}',), + 0xA792 => Fold::One('\u{A793}',), + 0xA796 => Fold::One('\u{A797}',), + 0xA798 => Fold::One('\u{A799}',), + 0xA79A => Fold::One('\u{A79B}',), + 0xA79C => Fold::One('\u{A79D}',), + 0xA79E => Fold::One('\u{A79F}',), + 0xA7A0 => Fold::One('\u{A7A1}',), + 0xA7A2 => Fold::One('\u{A7A3}',), + 0xA7A4 => Fold::One('\u{A7A5}',), + 0xA7A6 => Fold::One('\u{A7A7}',), + 0xA7A8 => Fold::One('\u{A7A9}',), + 0xA7AA => Fold::One('\u{0266}',), + 0xA7AB => Fold::One('\u{025C}',), + 0xA7AC => Fold::One('\u{0261}',), + 0xA7AD => Fold::One('\u{026C}',), + 0xA7AE => Fold::One('\u{026A}',), + 0xA7B0 => Fold::One('\u{029E}',), + 0xA7B1 => Fold::One('\u{0287}',), + 0xA7B2 => Fold::One('\u{029D}',), + 0xA7B3 => Fold::One('\u{AB53}',), + 0xA7B4 => Fold::One('\u{A7B5}',), + 0xA7B6 => Fold::One('\u{A7B7}',), + 0xA7B8 => Fold::One('\u{A7B9}',), + 0xA7BA => Fold::One('\u{A7BB}',), + 0xA7BC => Fold::One('\u{A7BD}',), + 0xA7BE => Fold::One('\u{A7BF}',), + 0xA7C2 => Fold::One('\u{A7C3}',), + 0xA7C4 => Fold::One('\u{A794}',), + 0xA7C5 => Fold::One('\u{0282}',), + 0xA7C6 => Fold::One('\u{1D8E}',), + 0xAB70 => Fold::One('\u{13A0}',), + 0xAB71 => Fold::One('\u{13A1}',), + 0xAB72 => Fold::One('\u{13A2}',), + 0xAB73 => Fold::One('\u{13A3}',), + 0xAB74 => Fold::One('\u{13A4}',), + 0xAB75 => Fold::One('\u{13A5}',), + 0xAB76 => Fold::One('\u{13A6}',), + 0xAB77 => Fold::One('\u{13A7}',), + 0xAB78 => Fold::One('\u{13A8}',), + 0xAB79 => Fold::One('\u{13A9}',), + 0xAB7A => Fold::One('\u{13AA}',), + 0xAB7B => Fold::One('\u{13AB}',), + 0xAB7C => Fold::One('\u{13AC}',), + 0xAB7D => Fold::One('\u{13AD}',), + 0xAB7E => Fold::One('\u{13AE}',), + 0xAB7F => Fold::One('\u{13AF}',), + 0xAB80 => Fold::One('\u{13B0}',), + 0xAB81 => Fold::One('\u{13B1}',), + 0xAB82 => Fold::One('\u{13B2}',), + 0xAB83 => Fold::One('\u{13B3}',), + 0xAB84 => Fold::One('\u{13B4}',), + 0xAB85 => Fold::One('\u{13B5}',), + 0xAB86 => Fold::One('\u{13B6}',), + 0xAB87 => Fold::One('\u{13B7}',), + 0xAB88 => Fold::One('\u{13B8}',), + 0xAB89 => Fold::One('\u{13B9}',), + 0xAB8A => Fold::One('\u{13BA}',), + 0xAB8B => Fold::One('\u{13BB}',), + 0xAB8C => Fold::One('\u{13BC}',), + 0xAB8D => Fold::One('\u{13BD}',), + 0xAB8E => Fold::One('\u{13BE}',), + 0xAB8F => Fold::One('\u{13BF}',), + 0xAB90 => Fold::One('\u{13C0}',), + 0xAB91 => Fold::One('\u{13C1}',), + 0xAB92 => Fold::One('\u{13C2}',), + 0xAB93 => Fold::One('\u{13C3}',), + 0xAB94 => Fold::One('\u{13C4}',), + 0xAB95 => Fold::One('\u{13C5}',), + 0xAB96 => Fold::One('\u{13C6}',), + 0xAB97 => Fold::One('\u{13C7}',), + 0xAB98 => Fold::One('\u{13C8}',), + 0xAB99 => Fold::One('\u{13C9}',), + 0xAB9A => Fold::One('\u{13CA}',), + 0xAB9B => Fold::One('\u{13CB}',), + 0xAB9C => Fold::One('\u{13CC}',), + 0xAB9D => Fold::One('\u{13CD}',), + 0xAB9E => Fold::One('\u{13CE}',), + 0xAB9F => Fold::One('\u{13CF}',), + 0xABA0 => Fold::One('\u{13D0}',), + 0xABA1 => Fold::One('\u{13D1}',), + 0xABA2 => Fold::One('\u{13D2}',), + 0xABA3 => Fold::One('\u{13D3}',), + 0xABA4 => Fold::One('\u{13D4}',), + 0xABA5 => Fold::One('\u{13D5}',), + 0xABA6 => Fold::One('\u{13D6}',), + 0xABA7 => Fold::One('\u{13D7}',), + 0xABA8 => Fold::One('\u{13D8}',), + 0xABA9 => Fold::One('\u{13D9}',), + 0xABAA => Fold::One('\u{13DA}',), + 0xABAB => Fold::One('\u{13DB}',), + 0xABAC => Fold::One('\u{13DC}',), + 0xABAD => Fold::One('\u{13DD}',), + 0xABAE => Fold::One('\u{13DE}',), + 0xABAF => Fold::One('\u{13DF}',), + 0xABB0 => Fold::One('\u{13E0}',), + 0xABB1 => Fold::One('\u{13E1}',), + 0xABB2 => Fold::One('\u{13E2}',), + 0xABB3 => Fold::One('\u{13E3}',), + 0xABB4 => Fold::One('\u{13E4}',), + 0xABB5 => Fold::One('\u{13E5}',), + 0xABB6 => Fold::One('\u{13E6}',), + 0xABB7 => Fold::One('\u{13E7}',), + 0xABB8 => Fold::One('\u{13E8}',), + 0xABB9 => Fold::One('\u{13E9}',), + 0xABBA => Fold::One('\u{13EA}',), + 0xABBB => Fold::One('\u{13EB}',), + 0xABBC => Fold::One('\u{13EC}',), + 0xABBD => Fold::One('\u{13ED}',), + 0xABBE => Fold::One('\u{13EE}',), + 0xABBF => Fold::One('\u{13EF}',), + 0xFB00 => Fold::Two('\u{0066}', '\u{0066}',), + 0xFB01 => Fold::Two('\u{0066}', '\u{0069}',), + 0xFB02 => Fold::Two('\u{0066}', '\u{006C}',), + 0xFB03 => Fold::Three('\u{0066}', '\u{0066}', '\u{0069}',), + 0xFB04 => Fold::Three('\u{0066}', '\u{0066}', '\u{006C}',), + 0xFB05 => Fold::Two('\u{0073}', '\u{0074}',), + 0xFB06 => Fold::Two('\u{0073}', '\u{0074}',), + 0xFB13 => Fold::Two('\u{0574}', '\u{0576}',), + 0xFB14 => Fold::Two('\u{0574}', '\u{0565}',), + 0xFB15 => Fold::Two('\u{0574}', '\u{056B}',), + 0xFB16 => Fold::Two('\u{057E}', '\u{0576}',), + 0xFB17 => Fold::Two('\u{0574}', '\u{056D}',), + 0xFF21 => Fold::One('\u{FF41}',), + 0xFF22 => Fold::One('\u{FF42}',), + 0xFF23 => Fold::One('\u{FF43}',), + 0xFF24 => Fold::One('\u{FF44}',), + 0xFF25 => Fold::One('\u{FF45}',), + 0xFF26 => Fold::One('\u{FF46}',), + 0xFF27 => Fold::One('\u{FF47}',), + 0xFF28 => Fold::One('\u{FF48}',), + 0xFF29 => Fold::One('\u{FF49}',), + 0xFF2A => Fold::One('\u{FF4A}',), + 0xFF2B => Fold::One('\u{FF4B}',), + 0xFF2C => Fold::One('\u{FF4C}',), + 0xFF2D => Fold::One('\u{FF4D}',), + 0xFF2E => Fold::One('\u{FF4E}',), + 0xFF2F => Fold::One('\u{FF4F}',), + 0xFF30 => Fold::One('\u{FF50}',), + 0xFF31 => Fold::One('\u{FF51}',), + 0xFF32 => Fold::One('\u{FF52}',), + 0xFF33 => Fold::One('\u{FF53}',), + 0xFF34 => Fold::One('\u{FF54}',), + 0xFF35 => Fold::One('\u{FF55}',), + 0xFF36 => Fold::One('\u{FF56}',), + 0xFF37 => Fold::One('\u{FF57}',), + 0xFF38 => Fold::One('\u{FF58}',), + 0xFF39 => Fold::One('\u{FF59}',), + 0xFF3A => Fold::One('\u{FF5A}',), + 0x10400 => Fold::One('\u{10428}',), + 0x10401 => Fold::One('\u{10429}',), + 0x10402 => Fold::One('\u{1042A}',), + 0x10403 => Fold::One('\u{1042B}',), + 0x10404 => Fold::One('\u{1042C}',), + 0x10405 => Fold::One('\u{1042D}',), + 0x10406 => Fold::One('\u{1042E}',), + 0x10407 => Fold::One('\u{1042F}',), + 0x10408 => Fold::One('\u{10430}',), + 0x10409 => Fold::One('\u{10431}',), + 0x1040A => Fold::One('\u{10432}',), + 0x1040B => Fold::One('\u{10433}',), + 0x1040C => Fold::One('\u{10434}',), + 0x1040D => Fold::One('\u{10435}',), + 0x1040E => Fold::One('\u{10436}',), + 0x1040F => Fold::One('\u{10437}',), + 0x10410 => Fold::One('\u{10438}',), + 0x10411 => Fold::One('\u{10439}',), + 0x10412 => Fold::One('\u{1043A}',), + 0x10413 => Fold::One('\u{1043B}',), + 0x10414 => Fold::One('\u{1043C}',), + 0x10415 => Fold::One('\u{1043D}',), + 0x10416 => Fold::One('\u{1043E}',), + 0x10417 => Fold::One('\u{1043F}',), + 0x10418 => Fold::One('\u{10440}',), + 0x10419 => Fold::One('\u{10441}',), + 0x1041A => Fold::One('\u{10442}',), + 0x1041B => Fold::One('\u{10443}',), + 0x1041C => Fold::One('\u{10444}',), + 0x1041D => Fold::One('\u{10445}',), + 0x1041E => Fold::One('\u{10446}',), + 0x1041F => Fold::One('\u{10447}',), + 0x10420 => Fold::One('\u{10448}',), + 0x10421 => Fold::One('\u{10449}',), + 0x10422 => Fold::One('\u{1044A}',), + 0x10423 => Fold::One('\u{1044B}',), + 0x10424 => Fold::One('\u{1044C}',), + 0x10425 => Fold::One('\u{1044D}',), + 0x10426 => Fold::One('\u{1044E}',), + 0x10427 => Fold::One('\u{1044F}',), + 0x104B0 => Fold::One('\u{104D8}',), + 0x104B1 => Fold::One('\u{104D9}',), + 0x104B2 => Fold::One('\u{104DA}',), + 0x104B3 => Fold::One('\u{104DB}',), + 0x104B4 => Fold::One('\u{104DC}',), + 0x104B5 => Fold::One('\u{104DD}',), + 0x104B6 => Fold::One('\u{104DE}',), + 0x104B7 => Fold::One('\u{104DF}',), + 0x104B8 => Fold::One('\u{104E0}',), + 0x104B9 => Fold::One('\u{104E1}',), + 0x104BA => Fold::One('\u{104E2}',), + 0x104BB => Fold::One('\u{104E3}',), + 0x104BC => Fold::One('\u{104E4}',), + 0x104BD => Fold::One('\u{104E5}',), + 0x104BE => Fold::One('\u{104E6}',), + 0x104BF => Fold::One('\u{104E7}',), + 0x104C0 => Fold::One('\u{104E8}',), + 0x104C1 => Fold::One('\u{104E9}',), + 0x104C2 => Fold::One('\u{104EA}',), + 0x104C3 => Fold::One('\u{104EB}',), + 0x104C4 => Fold::One('\u{104EC}',), + 0x104C5 => Fold::One('\u{104ED}',), + 0x104C6 => Fold::One('\u{104EE}',), + 0x104C7 => Fold::One('\u{104EF}',), + 0x104C8 => Fold::One('\u{104F0}',), + 0x104C9 => Fold::One('\u{104F1}',), + 0x104CA => Fold::One('\u{104F2}',), + 0x104CB => Fold::One('\u{104F3}',), + 0x104CC => Fold::One('\u{104F4}',), + 0x104CD => Fold::One('\u{104F5}',), + 0x104CE => Fold::One('\u{104F6}',), + 0x104CF => Fold::One('\u{104F7}',), + 0x104D0 => Fold::One('\u{104F8}',), + 0x104D1 => Fold::One('\u{104F9}',), + 0x104D2 => Fold::One('\u{104FA}',), + 0x104D3 => Fold::One('\u{104FB}',), + 0x10C80 => Fold::One('\u{10CC0}',), + 0x10C81 => Fold::One('\u{10CC1}',), + 0x10C82 => Fold::One('\u{10CC2}',), + 0x10C83 => Fold::One('\u{10CC3}',), + 0x10C84 => Fold::One('\u{10CC4}',), + 0x10C85 => Fold::One('\u{10CC5}',), + 0x10C86 => Fold::One('\u{10CC6}',), + 0x10C87 => Fold::One('\u{10CC7}',), + 0x10C88 => Fold::One('\u{10CC8}',), + 0x10C89 => Fold::One('\u{10CC9}',), + 0x10C8A => Fold::One('\u{10CCA}',), + 0x10C8B => Fold::One('\u{10CCB}',), + 0x10C8C => Fold::One('\u{10CCC}',), + 0x10C8D => Fold::One('\u{10CCD}',), + 0x10C8E => Fold::One('\u{10CCE}',), + 0x10C8F => Fold::One('\u{10CCF}',), + 0x10C90 => Fold::One('\u{10CD0}',), + 0x10C91 => Fold::One('\u{10CD1}',), + 0x10C92 => Fold::One('\u{10CD2}',), + 0x10C93 => Fold::One('\u{10CD3}',), + 0x10C94 => Fold::One('\u{10CD4}',), + 0x10C95 => Fold::One('\u{10CD5}',), + 0x10C96 => Fold::One('\u{10CD6}',), + 0x10C97 => Fold::One('\u{10CD7}',), + 0x10C98 => Fold::One('\u{10CD8}',), + 0x10C99 => Fold::One('\u{10CD9}',), + 0x10C9A => Fold::One('\u{10CDA}',), + 0x10C9B => Fold::One('\u{10CDB}',), + 0x10C9C => Fold::One('\u{10CDC}',), + 0x10C9D => Fold::One('\u{10CDD}',), + 0x10C9E => Fold::One('\u{10CDE}',), + 0x10C9F => Fold::One('\u{10CDF}',), + 0x10CA0 => Fold::One('\u{10CE0}',), + 0x10CA1 => Fold::One('\u{10CE1}',), + 0x10CA2 => Fold::One('\u{10CE2}',), + 0x10CA3 => Fold::One('\u{10CE3}',), + 0x10CA4 => Fold::One('\u{10CE4}',), + 0x10CA5 => Fold::One('\u{10CE5}',), + 0x10CA6 => Fold::One('\u{10CE6}',), + 0x10CA7 => Fold::One('\u{10CE7}',), + 0x10CA8 => Fold::One('\u{10CE8}',), + 0x10CA9 => Fold::One('\u{10CE9}',), + 0x10CAA => Fold::One('\u{10CEA}',), + 0x10CAB => Fold::One('\u{10CEB}',), + 0x10CAC => Fold::One('\u{10CEC}',), + 0x10CAD => Fold::One('\u{10CED}',), + 0x10CAE => Fold::One('\u{10CEE}',), + 0x10CAF => Fold::One('\u{10CEF}',), + 0x10CB0 => Fold::One('\u{10CF0}',), + 0x10CB1 => Fold::One('\u{10CF1}',), + 0x10CB2 => Fold::One('\u{10CF2}',), + 0x118A0 => Fold::One('\u{118C0}',), + 0x118A1 => Fold::One('\u{118C1}',), + 0x118A2 => Fold::One('\u{118C2}',), + 0x118A3 => Fold::One('\u{118C3}',), + 0x118A4 => Fold::One('\u{118C4}',), + 0x118A5 => Fold::One('\u{118C5}',), + 0x118A6 => Fold::One('\u{118C6}',), + 0x118A7 => Fold::One('\u{118C7}',), + 0x118A8 => Fold::One('\u{118C8}',), + 0x118A9 => Fold::One('\u{118C9}',), + 0x118AA => Fold::One('\u{118CA}',), + 0x118AB => Fold::One('\u{118CB}',), + 0x118AC => Fold::One('\u{118CC}',), + 0x118AD => Fold::One('\u{118CD}',), + 0x118AE => Fold::One('\u{118CE}',), + 0x118AF => Fold::One('\u{118CF}',), + 0x118B0 => Fold::One('\u{118D0}',), + 0x118B1 => Fold::One('\u{118D1}',), + 0x118B2 => Fold::One('\u{118D2}',), + 0x118B3 => Fold::One('\u{118D3}',), + 0x118B4 => Fold::One('\u{118D4}',), + 0x118B5 => Fold::One('\u{118D5}',), + 0x118B6 => Fold::One('\u{118D6}',), + 0x118B7 => Fold::One('\u{118D7}',), + 0x118B8 => Fold::One('\u{118D8}',), + 0x118B9 => Fold::One('\u{118D9}',), + 0x118BA => Fold::One('\u{118DA}',), + 0x118BB => Fold::One('\u{118DB}',), + 0x118BC => Fold::One('\u{118DC}',), + 0x118BD => Fold::One('\u{118DD}',), + 0x118BE => Fold::One('\u{118DE}',), + 0x118BF => Fold::One('\u{118DF}',), + 0x16E40 => Fold::One('\u{16E60}',), + 0x16E41 => Fold::One('\u{16E61}',), + 0x16E42 => Fold::One('\u{16E62}',), + 0x16E43 => Fold::One('\u{16E63}',), + 0x16E44 => Fold::One('\u{16E64}',), + 0x16E45 => Fold::One('\u{16E65}',), + 0x16E46 => Fold::One('\u{16E66}',), + 0x16E47 => Fold::One('\u{16E67}',), + 0x16E48 => Fold::One('\u{16E68}',), + 0x16E49 => Fold::One('\u{16E69}',), + 0x16E4A => Fold::One('\u{16E6A}',), + 0x16E4B => Fold::One('\u{16E6B}',), + 0x16E4C => Fold::One('\u{16E6C}',), + 0x16E4D => Fold::One('\u{16E6D}',), + 0x16E4E => Fold::One('\u{16E6E}',), + 0x16E4F => Fold::One('\u{16E6F}',), + 0x16E50 => Fold::One('\u{16E70}',), + 0x16E51 => Fold::One('\u{16E71}',), + 0x16E52 => Fold::One('\u{16E72}',), + 0x16E53 => Fold::One('\u{16E73}',), + 0x16E54 => Fold::One('\u{16E74}',), + 0x16E55 => Fold::One('\u{16E75}',), + 0x16E56 => Fold::One('\u{16E76}',), + 0x16E57 => Fold::One('\u{16E77}',), + 0x16E58 => Fold::One('\u{16E78}',), + 0x16E59 => Fold::One('\u{16E79}',), + 0x16E5A => Fold::One('\u{16E7A}',), + 0x16E5B => Fold::One('\u{16E7B}',), + 0x16E5C => Fold::One('\u{16E7C}',), + 0x16E5D => Fold::One('\u{16E7D}',), + 0x16E5E => Fold::One('\u{16E7E}',), + 0x16E5F => Fold::One('\u{16E7F}',), + 0x1E900 => Fold::One('\u{1E922}',), + 0x1E901 => Fold::One('\u{1E923}',), + 0x1E902 => Fold::One('\u{1E924}',), + 0x1E903 => Fold::One('\u{1E925}',), + 0x1E904 => Fold::One('\u{1E926}',), + 0x1E905 => Fold::One('\u{1E927}',), + 0x1E906 => Fold::One('\u{1E928}',), + 0x1E907 => Fold::One('\u{1E929}',), + 0x1E908 => Fold::One('\u{1E92A}',), + 0x1E909 => Fold::One('\u{1E92B}',), + 0x1E90A => Fold::One('\u{1E92C}',), + 0x1E90B => Fold::One('\u{1E92D}',), + 0x1E90C => Fold::One('\u{1E92E}',), + 0x1E90D => Fold::One('\u{1E92F}',), + 0x1E90E => Fold::One('\u{1E930}',), + 0x1E90F => Fold::One('\u{1E931}',), + 0x1E910 => Fold::One('\u{1E932}',), + 0x1E911 => Fold::One('\u{1E933}',), + 0x1E912 => Fold::One('\u{1E934}',), + 0x1E913 => Fold::One('\u{1E935}',), + 0x1E914 => Fold::One('\u{1E936}',), + 0x1E915 => Fold::One('\u{1E937}',), + 0x1E916 => Fold::One('\u{1E938}',), + 0x1E917 => Fold::One('\u{1E939}',), + 0x1E918 => Fold::One('\u{1E93A}',), + 0x1E919 => Fold::One('\u{1E93B}',), + 0x1E91A => Fold::One('\u{1E93C}',), + 0x1E91B => Fold::One('\u{1E93D}',), + 0x1E91C => Fold::One('\u{1E93E}',), + 0x1E91D => Fold::One('\u{1E93F}',), + 0x1E91E => Fold::One('\u{1E940}',), + 0x1E91F => Fold::One('\u{1E941}',), + 0x1E920 => Fold::One('\u{1E942}',), + 0x1E921 => Fold::One('\u{1E943}',), + _ => Fold::One(orig,) + } +} diff --git a/vendor/unicase/src/unicode/mod.rs b/vendor/unicase/src/unicode/mod.rs new file mode 100644 index 0000000000..defa51c645 --- /dev/null +++ b/vendor/unicase/src/unicode/mod.rs @@ -0,0 +1,185 @@ +#[cfg(__unicase__iter_cmp)] +use std::cmp::Ordering; +use std::hash::{Hash, Hasher}; + +use self::map::lookup; +mod map; + +#[derive(Clone, Copy, Debug, Default)] +pub struct Unicode<S>(pub S); + +impl<S1: AsRef<str>, S2: AsRef<str>> PartialEq<Unicode<S2>> for Unicode<S1> { + #[inline] + fn eq(&self, other: &Unicode<S2>) -> bool { + self.0.as_ref().chars().flat_map(lookup) + .zip(other.0.as_ref().chars().flat_map(lookup)) + .all(|(a, b)| a == b) + } +} + +impl<S: AsRef<str>> Eq for Unicode<S> {} + +#[cfg(__unicase__iter_cmp)] +impl<T: AsRef<str>> PartialOrd for Unicode<T> { + #[inline] + fn partial_cmp(&self, other: &Self) -> Option<Ordering> { + Some(self.cmp(other)) + } +} + +#[cfg(__unicase__iter_cmp)] +impl<T: AsRef<str>> Ord for Unicode<T> { + #[inline] + fn cmp(&self, other: &Self) -> Ordering { + let self_chars = self.0.as_ref().chars().flat_map(lookup); + let other_chars = other.0.as_ref().chars().flat_map(lookup); + self_chars.cmp(other_chars) + } +} + +impl<S: AsRef<str>> Hash for Unicode<S> { + #[inline] + fn hash<H: Hasher>(&self, hasher: &mut H) { + let mut buf = [0; 4]; + for c in self.0.as_ref().chars().flat_map(|c| lookup(c)) { + let len = char_to_utf8(c, &mut buf); + hasher.write(&buf[..len]) + } + } +} + +#[inline] +fn char_to_utf8(c: char, dst: &mut [u8; 4]) -> usize { + const TAG_CONT: u8 = 0b1000_0000; + const TAG_TWO_B: u8 = 0b1100_0000; + const TAG_THREE_B: u8 = 0b1110_0000; + const TAG_FOUR_B: u8 = 0b1111_0000; + + let code = c as u32; + if code <= 0x7F { + dst[0] = code as u8; + 1 + } else if code <= 0x7FF { + dst[0] = (code >> 6 & 0x1F) as u8 | TAG_TWO_B; + dst[1] = (code & 0x3F) as u8 | TAG_CONT; + 2 + } else if code <= 0xFFFF { + dst[0] = (code >> 12 & 0x0F) as u8 | TAG_THREE_B; + dst[1] = (code >> 6 & 0x3F) as u8 | TAG_CONT; + dst[2] = (code & 0x3F) as u8 | TAG_CONT; + 3 + } else { + dst[0] = (code >> 18 & 0x07) as u8 | TAG_FOUR_B; + dst[1] = (code >> 12 & 0x3F) as u8 | TAG_CONT; + dst[2] = (code >> 6 & 0x3F) as u8 | TAG_CONT; + dst[3] = (code & 0x3F) as u8 | TAG_CONT; + 4 + } +} + +// internal mod so that the enum can be 'pub' +// thanks privacy-checker :___( +mod fold { + #[derive(Clone, Copy)] + pub enum Fold { + Zero, + One(char), + Two(char, char), + Three(char, char, char), + } + + impl Iterator for Fold { + type Item = char; + #[inline] + fn next(&mut self) -> Option<char> { + match *self { + Fold::Zero => None, + Fold::One(one) => { + *self = Fold::Zero; + Some(one) + }, + Fold::Two(one, two) => { + *self = Fold::One(two); + Some(one) + }, + Fold::Three(one, two, three) => { + *self = Fold::Two(one, two); + Some(three) + } + } + } + + #[inline] + fn size_hint(&self) -> (usize, Option<usize>) { + match *self { + Fold::Zero => (0, Some(0)), + Fold::One(..) => (1, Some(1)), + Fold::Two(..) => (2, Some(2)), + Fold::Three(..) => (3, Some(3)) + } + } + + } + impl From<(char,)> for Fold { + #[inline] + fn from((one,): (char,)) -> Fold { + Fold::One(one) + } + } + + impl From<(char, char)> for Fold { + #[inline] + fn from((one, two): (char, char)) -> Fold { + Fold::Two(one, two) + } + } + + impl From<(char, char, char)> for Fold { + #[inline] + fn from((one, two, three): (char, char, char)) -> Fold { + Fold::Three(one, two, three) + } + } +} + +#[cfg(test)] +mod tests { + use super::Unicode; + + macro_rules! eq { + ($left:expr, $right:expr) => ({ + assert_eq!(Unicode($left), Unicode($right)); + }); + } + + #[test] + fn test_ascii_folding() { + eq!("foo bar", "FoO BAR"); + } + + #[test] + fn test_simple_case_folding() { + eq!("στιγμας", "στιγμασ"); + } + + #[test] + fn test_full_case_folding() { + eq!("flour", "flour"); + eq!("Maße", "MASSE"); + eq!("á¾² στο διάολο", "ὰι στο διάολο"); + } + + #[cfg(feature = "nightly")] + #[bench] + fn bench_ascii_folding(b: &mut ::test::Bencher) { + b.bytes = b"foo bar".len() as u64; + b.iter(|| eq!("foo bar", "FoO BAR")); + } + + #[cfg(feature = "nightly")] + #[bench] + fn bench_simple_case_folding(b: &mut ::test::Bencher) { + b.bytes = "στιγμας".len() as u64; + b.iter(|| eq!("στιγμας", "στιγμασ")); + } +} diff --git a/vendor/winapi-util/.cargo-checksum.json b/vendor/winapi-util/.cargo-checksum.json index 9dca4bffc1..2d97cc4675 100644 --- a/vendor/winapi-util/.cargo-checksum.json +++ b/vendor/winapi-util/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"f7b1af2170866320044920c5d6dbadba4490091cf57733cf65905c5df9d27b4a","LICENSE-MIT":"cb3c929a05e6cbc9de9ab06a4c57eeb60ca8c724bef6c138c87d3a577e27aa14","README.md":"a416ab66b4f700c5179fd05cb183bff654a96b4256522ce33f21a9edf8f7cfe9","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","appveyor.yml":"a54111af120906bd75ddd941ebaa335c7967be3c98a0c340b4dffd667b5a5dd2","ci/script.sh":"dc5d33e6f0cff7ad12e6251c03368345c6a697426a2e23155d6812a21b3f7f29","src/console.rs":"29d38498bd8ed9b76d0a6191873ba84851e03c9c79b948512f1060dd7920ee81","src/file.rs":"32471d096486a825d7b673976454050242a0e7c810dc379570af8940e1543f66","src/lib.rs":"52f8b9b14c47a0e87057a4a3c8e61fae7d6dcad241385b778b7da967031cf866","src/win.rs":"3e06ea4c6de859b8f275bceb07f8c1b9d3248221dea9760ebca65b4b7bf36825"},"package":"afc5508759c5bf4285e61feb862b6083c8480aec864fa17a81fdec6f69b461ab"} \ No newline at end of file +{"files":{"COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"d3540b5539ea2a03fc515314e00b2b9a48806e449bd3a7798401237c1e8d568a","LICENSE-MIT":"cb3c929a05e6cbc9de9ab06a4c57eeb60ca8c724bef6c138c87d3a577e27aa14","README.md":"3642ede57eb0718b408fa61d950cad5c08ecbf0d9928e0e7eec6cb7910c37a37","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","appveyor.yml":"a54111af120906bd75ddd941ebaa335c7967be3c98a0c340b4dffd667b5a5dd2","ci/script.sh":"dc5d33e6f0cff7ad12e6251c03368345c6a697426a2e23155d6812a21b3f7f29","src/console.rs":"29d38498bd8ed9b76d0a6191873ba84851e03c9c79b948512f1060dd7920ee81","src/file.rs":"d843dfce58433e1aa39a395adf7ee22b3df3c79d5443910ce56d481a44bebebc","src/lib.rs":"52f8b9b14c47a0e87057a4a3c8e61fae7d6dcad241385b778b7da967031cf866","src/win.rs":"3e06ea4c6de859b8f275bceb07f8c1b9d3248221dea9760ebca65b4b7bf36825"},"package":"7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9"} \ No newline at end of file diff --git a/vendor/winapi-util/Cargo.toml b/vendor/winapi-util/Cargo.toml index e772a1c941..d6a7b7494b 100644 --- a/vendor/winapi-util/Cargo.toml +++ b/vendor/winapi-util/Cargo.toml @@ -12,7 +12,7 @@ [package] name = "winapi-util" -version = "0.1.1" +version = "0.1.2" authors = ["Andrew Gallant <jamslam@gmail.com>"] description = "A dumping ground for high level safe wrappers over winapi." homepage = "https://github.com/BurntSushi/winapi-util" @@ -24,4 +24,4 @@ license = "Unlicense/MIT" repository = "https://github.com/BurntSushi/winapi-util" [target."cfg(windows)".dependencies.winapi] version = "0.3" -features = ["std", "consoleapi", "errhandlingapi", "fileapi", "minwindef", "processenv", "winbase", "wincon", "winerror"] +features = ["std", "consoleapi", "errhandlingapi", "fileapi", "minwindef", "processenv", "winbase", "wincon", "winerror", "winnt"] diff --git a/vendor/winapi-util/README.md b/vendor/winapi-util/README.md index ba4b07869a..145eede1a0 100644 --- a/vendor/winapi-util/README.md +++ b/vendor/winapi-util/README.md @@ -38,7 +38,7 @@ ffi utility bindings in a variety of crates in order to get Windows support. Eventually, I started needing to copy & paste a lot of those utility routines. Since they are utility routines, they often don't make sense to expose directly in the crate in which they are defined. Instead of continuing this process, -I decide to make a crate instead. +I decided to make a crate instead. Normally, I'm not a huge fan of "utility" crates like this that don't have a well defined scope, but this is primarily a practical endeavor to make it diff --git a/vendor/winapi-util/src/file.rs b/vendor/winapi-util/src/file.rs index a9be91a431..99f7981b54 100644 --- a/vendor/winapi-util/src/file.rs +++ b/vendor/winapi-util/src/file.rs @@ -8,6 +8,7 @@ use winapi::um::fileapi::{ BY_HANDLE_FILE_INFORMATION, GetFileInformationByHandle, GetFileType, }; +use winapi::um::winnt; use AsHandleRef; @@ -49,6 +50,12 @@ pub fn typ<H: AsHandleRef>(h: H) -> io::Result<Type> { } } +/// Returns true if and only if the given file attributes contain the +/// `FILE_ATTRIBUTE_HIDDEN` attribute. +pub fn is_hidden(file_attributes: u64) -> bool { + file_attributes & (winnt::FILE_ATTRIBUTE_HIDDEN as u64) > 0 +} + /// Represents file information such as creation time, file size, etc. /// /// This wraps a [`BY_HANDLE_FILE_INFORMATION`]. @@ -65,6 +72,12 @@ impl Information { self.0.dwFileAttributes as u64 } + /// Returns true if and only if this file information has the + /// `FILE_ATTRIBUTE_HIDDEN` attribute. + pub fn is_hidden(&self) -> bool { + is_hidden(self.file_attributes()) + } + /// Return the creation time, if one exists. /// /// This corresponds to `ftCreationTime`. diff --git a/version b/version index 484abbad5e..64d99dd0dd 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.35.0 (3c235d560 2019-05-20) \ No newline at end of file +1.36.0 (a53f9df32 2019-07-03) \ No newline at end of file -- 2.39.5